开发者

What is Mobile Safari doing to the DOM after a video finishes playing?

I have a page with a <video> and also a lot of Javascript. On the iPhone and iPad, when you click to play the video, it starts playing in that full-screen player (as usual for the iPhone/iPad). But when the user clicks the "Done" button, and that full screen window disappears and the user is brought back to the web page, many Javascript-y things on the page are broken.

Specifically, I'm using the flowplayer "playlist" plugin which takes a "template" and dynamically populates a list of html with it (similar to how "jquery-tmpl" jQuery templates work). After clicking "Done" on a video, the page shows up again with all of this dynamically populated html gone, and just the template with its placeholders showing.

So it's as if Safari is re-rendering the original page HTML but my $(document).ready(function() { ... }) initialization code isn't getting re-run accordingly.

Does anyone have any insight into what exactly Mobile Safari does to a web page after it returns from showing a video? I开发者_StackOverflow社区f I can understand what events are and aren't happening, I can tap into the right thing and re-initialize my page javascript.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜