Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 344
Arun Avatar asked Nov 20 '25 10:11

Arun


1 Answers

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.

like image 135
emaxsaun Avatar answered Nov 22 '25 23:11

emaxsaun