为什么触发 document.body.style.overflow 会重新启动 Flash 视频?
我有一个 JS 函数,在加载页面 10 秒后触发。它执行的任务之一是:
document.body.style.overflow = "hidden"
我在页面上有一个 flowplayer 的副本,它会自动播放。一旦运行上面的代码,正在播放的视频就会重新加载,并从头开始。删除这条线不会导致此类问题。
播放器是最新版本,播放器代码是死基本的
<div class=player_image>
<a style="display:block;width:640px;height:360px" id="player"></a>
<script>
flowplayer("player", "flowplayer-3.2.2.swf", {
playlist: [
{url: 'http://www.domain.com/movie.flv', duration: 100},
{url: 'http://www.domain.com/movie2.flv', duration: 100},
],
plugins: {
controls: null
}
});
</script>
</div>
I have a JS function that triggers after 10 seconds of loading a page. One of the tasks that it does is this:
document.body.style.overflow = "hidden"
I have a copy of flowplayer on the page, which autoplays. As soon as the code above is run, the video that is playing reloads, and starts from the beginning. Removing this line, causes no such problems.
The player is the latest version, and the player code is dead basic
<div class=player_image>
<a style="display:block;width:640px;height:360px" id="player"></a>
<script>
flowplayer("player", "flowplayer-3.2.2.swf", {
playlist: [
{url: 'http://www.domain.com/movie.flv', duration: 100},
{url: 'http://www.domain.com/movie2.flv', duration: 100},
],
plugins: {
controls: null
}
});
</script>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您使用的是火狐浏览器吗?如果是这样,那是因为这个错误:
https://bugzilla.mozilla.org/show_bug .cgi?id=90268
尽管有大量的请求,但这么多年过去了,这个问题仍然没有得到解决。
Are you using Firefox? If so, it's because of this bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=90268
Which, after so many years, has gone unfixed, despite the huge number of requests for it.