问题描述
我在网页中实现了jw player 6播放器.我可以在浏览器ie9和ie10中的jw播放器中播放mp3文件.但是我无法在两个浏览器中播放MP4文件,但是在ie8中工作正常.下面是我使用的代码.
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>
请帮助我解决此问题.
推荐答案
您的问题如下:
您的文件- https://s3-us-west- 1.amazonaws.com/lyynks-assets/experiment/video/sample.mp4
具有此MIME类型-application/octet-stream
Has this MIME-TYPE - application/octet-stream
应该是-video/mp4
It should be - video/mp4
这应该在亚马逊的一端进行设置.
This should be set on Amazon's end.
在IE9和IE10中不起作用的原因是,对于支持HTML5播放的浏览器,JW6默认为HTML5模式,并且HTML5在MIME类型方面比Flash更严格.
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.
这篇关于JW Player无法在ie9和ie10中播放MP4视频格式的视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!