JW Player not playing MP4 video format videos in ie9 and ie10

旧巷老猫 提交于 2019-12-01 21:46:32

问题


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

Please help me to solve this issue.


回答1:


Your issue here is the following:

Your file - https://s3-us-west-1.amazonaws.com/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.



来源:https://stackoverflow.com/questions/17187382/jw-player-not-playing-mp4-video-format-videos-in-ie9-and-ie10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!