视频播放完毕后,Mobile Safari 对 DOM 执行什么操作?
我有一个带有
具体来说,我使用 flowplayer“播放列表”插件,它采用“模板”并用它动态填充 html 列表(类似于“jquery-tmpl”jQuery 模板的工作方式)。在视频上单击“完成”后,页面会再次显示,所有动态填充的 html 都消失了,只显示带有占位符的模板。
因此,就好像 Safari 正在重新渲染原始页面 HTML,但我的 $(document).ready(function() { ... })
初始化代码没有相应地重新运行。
有谁知道 Mobile Safari 在显示视频返回后对网页到底做了什么?如果我能理解哪些事件正在发生,哪些事件没有发生,我就可以利用正确的内容并重新初始化我的页面 JavaScript。
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? If I can understand what events are and aren't happening, I can tap into the right thing and re-initialize my page javascript.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论