javascript – JW Player不在ie9和ie10播放MP4视频格式视频
作者:互联网
我在我的网页上实现了jw player 6 player.
我能够在浏览器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>
请帮我解决这个问题.
解决方法:
您的问题如下:
你的档案 – https://s3-us-west-1.amazonaws.com/lyynks-assets/experiment/video/sample.mp4
有这个MIME-TYPE – application / octet-stream
它应该是 – video / mp4
这应该在亚马逊的最后设置.
这在IE9和IE10中不起作用的原因是因为JW6对于支持HTML5播放的浏览器默认为HTML5模式,而HTML5对于MIME-TYPE比Flash更严格.
标签:javascript,jquery,jwplayer 来源: https://codeday.me/bug/20190728/1567058.html