gpt4 book ai didi

javascript - JW 播放器在 IE 8 中不工作

转载 作者:数据小太阳 更新时间:2023-10-29 04:14:58 26 4
gpt4 key购买 nike

我只是在检查 JW Players 与所有浏览器的兼容性。 但是,在 IE 8 浏览器中甚至不会出现空白屏幕,在其他浏览器中它运行良好。

我已经阅读了链接 JWPlayer Not Working for Internet Explorer 8但无法获得任何帮助。

<html>
<head>
<script type="text/javascript" src="jwplayer.js"></script>
</head>
<body>
<script>
if((window.outerWidth && window.outerWidth > 640) || (document.body.clientWidth &&
document.body.clientWidth > 640)){
alert('error');
}
</script>
<div id="myElement">Loading the player ...</div>
<script type="text/javascript">
jwplayer("myElement").setup({
file: "myVideo.mp4",
image: "myPoster.jpg",
});

</script>
<ul>
<li onclick='jwplayer().play()'>Start playback</li>
<li onclick='alert(jwplayer().getVolume())'>Get audio volume</li>
<li onclick='jwplayer().pause();'>pause</li>

</ul>
</body>

</html>

最佳答案

尝试。

<script type="text/javascript">
jwplayer("myElement").setup({
file: "myVideo.mp4",
image: "myPoster.jpg"
});
</script>

去掉逗号

关于javascript - JW 播放器在 IE 8 中不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15541610/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com