使用 Javascript 关闭 iPhone 视频播放器
我有一个带有多个 html5 标签的网页,为用户提供了许多他们可以选择播放的视频的海报/缩略图。当用户触摸其中一个时,iPhone 视频播放器就会打开并播放视频。我希望能够在视频播放完毕后自动关闭视频播放器并将用户返回到缩略图。
我已经为“结束”事件设置了事件侦听器,并且可以检测到视频已完成,但我不知道如何关闭视频播放器并返回缩略图。它只是等待用户触摸“完成”按钮。有什么方法可以用 JavaScript 做到这一点吗?
I have a web page with several html5 tags, offering users a number of posters/thumbnails for videos they can choose to play. When a user touches one of the them the iPhone video player opens and the video plays. I want to be able to automatically close the video player after the video has finished and return the user to the thumbnails.
I have set the event listener for the "ended" event and I can detect that the video has finished, but I can't figure out how to close the video player and return to the thumbnails. It just waits for the user to touch the "done" button. Is there any way of doing this in Javascript??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
jQuery -
不确定支持哪个 iOS 版本。请参阅正确的方法是 webkitExitFullscreen。请参阅 https://developer.mozilla.org/en- US/docs/Web/Guide/API/DOM/Using_full_screen_mode 以获得全面支持
jQuery -
Uncertain what iOS version this was supported. See The correct method is webkitExitFullscreen. See https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode for full support