如何在webkit / cordova / phonegap上使用ios / iphone设备隐藏html5视频标签的控件? [英] How to hide the controls of the html5 video tag with ios/iphone devices on webkit/cordova/phonegap?

查看:134
本文介绍了如何在webkit / cordova / phonegap上使用ios / iphone设备隐藏html5视频标签的控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

控件总是可见的,无论控制标志的状态(是否存在),视频标签本身都会发出带有控件的触摸事件

The controls are always visible, no matter the state of the "controls" flag (whether it's there or not) and the video tag itself emits the touch events with the controls on

推荐答案

省略控制标志应该使视频标签无控制,无论是否是临时错误,在iphone / ipod设备上完全忽略该标志,控件是也没有意义,因为视频总是在全屏播放,你留下了一大块空间,其唯一目的是吸取所有点击和触摸事件,如黑洞

Omitting the "controls" flag should render the video tag control-less, however a temporary bug or not, the flag is completely ignored at iphone/ipod devices, the controls are also meaningless, as the video always plays in full-screen, you are left with a huge chunk of space, whose only purpose is to suck all the click and touch events like a black hole

此处记录了此行为: https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html

解决方法是将视频标签的宽度/高度设置为1/1 - 将其固定为-10,-10并手动触发播放更换用户界面而不是实际视频

The solution is to set the video tag's width/height to 1/1 - position it with "fixed" to -10,-10 and manually trigger "play" with a replacement UI instead of an actual video

这样视频标签的荒谬性消失了,因为它总是在全屏播放,功能相同

This way the absurdities of the video tag are gone and since it always plays in fullscreen, the functionality is the same

这篇关于如何在webkit / cordova / phonegap上使用ios / iphone设备隐藏html5视频标签的控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆