MVC Quicktime/mov 无法播放

发布于 10-24 19:34 字数 2075 浏览 3 评论 0原文

我正在尝试将 mov 嵌入到 cshtml 页面上,所有资源似乎都正确引用,但视频无法播放。

这些视频位于 /Content/Videos 目录中。

我以为这是一个许可问题,但我授予了每个人许可,但没有运气。

这可能是 IIS 问题吗? (检查 mov 的 mime 类型) 或者 我是否需要在 global.asax (routes.IgnoreRoute) 中为 mov 文件扩展名执行某些操作?

Firebug 显示,当单击播放器播放视频时,它会成功获取视频,但我认为它不应该执行获取操作,我从文件系统打开的纯 html 页面测试了相同的视频,单击玩家时它不会调用获取操作。

我还尝试通过再次在地址栏中输入整个路径来播放电影,但不幸的是,它只是出现了一个带有问号的 Quicktime 徽标。

脚本参考:

<script src="http://www.apple.com/library/quicktime/scripts/ac_quicktime.js" language="JavaScript"
    type="text/javascript"></script>
<script src="http://www.apple.com/library/quicktime/scripts/qtp_library.js" language="JavaScript"
    type="text/javascript"></script>

嵌入视频的脚本:

<script type="text/javascript"><!--
        QT_WritePoster_XHTML('Click to Play', '../Content/Videos/myMovie.jpg',
        '../Content/Videos/myMovie.mov',
        '520', '296', '',
        'controller', 'true',
        'autoplay', 'true',
        'bgcolor', 'black',
        'scale', 'aspect');
//-->
</script>
<noscript>
        <object width="520" height="296" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
            codebase="http://www.apple.com/qtactivex/qtplugin.cab">
            <param name="src" value="../Content/Videos/myMovie.jpg" />
            <param name="href" value="../Content/Videos/myMovie.mov" />
            <param name="target" value="myself" />
            <param name="controller" value="false" />
            <param name="autoplay" value="false" />
            <param name="scale" value="aspect" />
            <embed width="720" height="496" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"
                src="../Content/Videos/myMovie.jpg" href="../Content/Videos/myMovie.mov" target="myself"
                controller="false" autoplay="false" scale="aspect">
    </embed>
        </object>
</noscript>

I am trying to embed a mov onto a cshtml page, all the resources seem to be referencing properly but the video won't play.

The videos are located in the /Content/Videos directory.

I thought it was a permission issue but I granted everyone permission with no luck.

Could this be an IIS issue? (Checked mime types for mov)
or
do I have put to do something in the global.asax (routes.IgnoreRoute) for mov files extensions?

Firebug shows when the player is clicked to play the video it does a successful get of the video but I don't think it is supposed to do a get action, I tested the same video from a plain html page opened from the file system, it doesn't invoke a get action when player is clicked.

I also tried to play the movie by typing the whole path in the address bar again no luck it just comes up with a quicktime logo with a question mark inside it.

Script references:

<script src="http://www.apple.com/library/quicktime/scripts/ac_quicktime.js" language="JavaScript"
    type="text/javascript"></script>
<script src="http://www.apple.com/library/quicktime/scripts/qtp_library.js" language="JavaScript"
    type="text/javascript"></script>

Script to embed the video:

<script type="text/javascript"><!--
        QT_WritePoster_XHTML('Click to Play', '../Content/Videos/myMovie.jpg',
        '../Content/Videos/myMovie.mov',
        '520', '296', '',
        'controller', 'true',
        'autoplay', 'true',
        'bgcolor', 'black',
        'scale', 'aspect');
//-->
</script>
<noscript>
        <object width="520" height="296" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
            codebase="http://www.apple.com/qtactivex/qtplugin.cab">
            <param name="src" value="../Content/Videos/myMovie.jpg" />
            <param name="href" value="../Content/Videos/myMovie.mov" />
            <param name="target" value="myself" />
            <param name="controller" value="false" />
            <param name="autoplay" value="false" />
            <param name="scale" value="aspect" />
            <embed width="720" height="496" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"
                src="../Content/Videos/myMovie.jpg" href="../Content/Videos/myMovie.mov" target="myself"
                controller="false" autoplay="false" scale="aspect">
    </embed>
        </object>
</noscript>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

身边2024-10-31 19:34:03

经过一番研究后发现,IIS 默认情况下不允许流式传输 .mov 文件,但它设法通过安装 II7 媒体包使其正常工作。

http://www .microsoft.com/downloads/en/details.aspx?familyid=93d59f79-9555-473d-a07a-e21020d1fc25&displaylang=en

After a bit of research it seems that IIS does not allow the streaming of .mov files by default, it managed to get it working by installing the II7 media pack.

http://www.microsoft.com/downloads/en/details.aspx?familyid=93d59f79-9555-473d-a07a-e21020d1fc25&displaylang=en

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文