iOS - html5 - 全屏模式 - 禁用擦洗
我有一个 html5 视频播放器,带有自定义控件,可以根据需要显示/隐藏。通过 video.removeAttribute("controls") 删除默认控件。
然而,当用户启动全屏时,他将获得默认的 iOS 控件并可以清除广告。
有没有办法禁用全屏模式下的搜索?
谢谢。
I have a html5 videoplayer with custom controls that I show/hide as needed. The default controls are removed via video.removeAttribute("controls").
However, when the user launches fullscreen, he gets the default iOS controls and can scrub through ads.
Is there a way of disabling seeking in fullscreen mode?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据苹果公司称,在全屏模式下,他们将始终提供视频控件:
http://developer.apple.com/library/safari/#documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html
您可以随时禁用全屏在 iPad 上观看广告(删除全屏控制),然后返回全屏观看内容。效果不佳,并且无法在 iPhone/iPod Touch 上运行。
According to Apple, in fullscreen mode, they will always provide video controls:
http://developer.apple.com/library/safari/#documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html
You could always disable fullscreen on iPad for the ad (removing the fullscreen control), then move back to fullscreen for the content. Not optimal, and won't work on iPhone/iPod Touch.
在 iOS 中,没有办法直接阻止用户在全屏模式下进行滑动,但有一个解决方法,大致如下:
使其真正起作用,您需要解决一些更多细节。例如,当您更改当前时间时,也会触发一个 Seed 事件。因此,步骤 3 应该区分由用户拖动或您自己触发的搜索。
截至 2016 年 7 月,IMA3 SDK 实现了类似的功能。您可以在 http://googleads.github.io/googleads-ima- 尝试他们的演示html5/简单/
There is no way to directly prevent user from scrubbing in full screen mode in iOS, but there is a workaround which roughly work as below
To make it really work, there are some more details you need to work out. For example, when you change the currenttime, it will also trigger a seeked event. Therefore the step 3 should distinguish between seeked triggered by user scrubbing or yourself.
As of July 2016, the IMA3 SDK implemented something similar. You can try their demo at http://googleads.github.io/googleads-ima-html5/simple/