最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - JW Player not playing MP4 video format videos in ie9 and ie10 - Stack Overflow

programmeradmin3浏览0评论

I implemented jw player 6 player in my web page. I could able to play mp3 files in jw player in both the browsers ie9 and ie10. But i couldn't able to play MP4 files in both browsers and but it works fine in ie8. Below is my code that i used.

<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 = '.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>

Please help me to solve this issue.

I implemented jw player 6 player in my web page. I could able to play mp3 files in jw player in both the browsers ie9 and ie10. But i couldn't able to play MP4 files in both browsers and but it works fine in ie8. Below is my code that i used.

<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./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>

Please help me to solve this issue.

Share Improve this question asked Jun 19, 2013 at 9:14 ArunArun 1,7049 gold badges26 silver badges41 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

Your issue here is the following:

Your file - https://s3-us-west-1.amazonaws./lyynks-assets/experiment/video/sample.mp4

Has this MIME-TYPE - application/octet-stream

It should be - video/mp4

This should be set on Amazon's end.

The reason this isn't working in IE9 and IE10 is because JW6 defaults to HTML5 mode for browsers that support HTML5 playback, and HTML5 is more strict about MIME-TYPEs than Flash is.

发布评论

评论列表(0)

  1. 暂无评论