开发者

Why does triggering document.body.style.overflow restart a flash video?

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=playe开发者_开发知识库r_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>


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜