【问题标题】:JW Player not playing MP4 video format videos in ie9 and ie10JW Player 无法在 ie9 和 ie10 中播放 MP4 视频格式的视频
【发布时间】:2013-06-19 09:14:07
【问题描述】:

我在我的网页中实现了 jw player 6 播放器。 我可以在浏览器 ie9 和 ie10 的 jw 播放器中播放 mp3 文件。 但我无法在两个浏览器中播放 MP4 文件,但它在 ie8 中运行良好。 以下是我使用的代码。

<head runat="server">
    <meta http-equiv="Content-Type" content="video/mp4" />
    <title>JW Player</title>   
    <script type="text/javascript" src="JwPlayer/jwplayer.js"></script>
    <script type="text/javascript">        jwplayer.key = "Key";</script>
</head>
<body>
    <form id="form1" runat="server">
    <div align="center">
        <div id="container">
            Loading the player ...</div>
        <script type="text/javascript">
            var fileurl = 'https://s3-us-west-1.amazonaws.com/lyynks-assets/experiment/video/sample.mp4';
            if (fileurl != '') {
                jwplayer("container").setup({
                    flashplayer: "JwPlayer/jwplayer.flash.swf",
                    file: fileurl,
                    autostart: "true",
                    height: 500,
                    width: 600
                });
            } else {
                jwplayer("container").setup({
                    flashplayer: "JwPlayer/jwplayer.flash.swf",
                    file: "JwPlayer/video.mp4",
                    autostart: "true",
                    height: 500,
                    width: 600
                });
            }
        </script>
    </div>
    </form>
</body>

请帮我解决这个问题。

【问题讨论】:

    标签: javascript jquery jwplayer


    【解决方案1】:

    您的问题如下:

    您的文件 - https://s3-us-west-1.amazonaws.com/lyynks-assets/experiment/video/sample.mp4

    有这个 MIME-TYPE - application/octet-stream

    应该是-video/mp4

    这应该在亚马逊端设置。

    这在 IE9 和 IE10 中不起作用的原因是,对于支持 HTML5 播放的浏览器,JW6 默认为 HTML5 模式,而且 HTML5 对 MIME-TYPE 的要求比 Flash 更严格。

    【讨论】:

    • 如何添加mime类型?
    • 我有同样的问题,在 IE9 中无法使用,我如何以及在何处添加 mime 类型?
    • 这是一个服务器端设置。你用的是什么服务器?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-10-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-12-25
    • 1970-01-01
    相关资源
    最近更新 更多