VideoJS 4本机控件现在在移动设备上默认吗? [英] VideoJS 4 native controls now default on mobile?
问题描述
我正在将我在VideoJS上的Vidcaster的分辨率切换工作改编成插件(请参见 https: //github.com/videojs/video.js/pull/233 ).
I am adapting my resolution switching work for Vidcaster on VideoJS into a plugin (see https://github.com/videojs/video.js/pull/233).
在VideoJS 3.2中,VideoJS控件在移动平台(例如Android和iOS)上处于活动状态.现在,当我启动版本4时,似乎本机控件具有优先权.这意味着无法访问需要对控制栏按钮进行操作的功能(例如轨道等),对吗?
In VideoJS 3.2 the VideoJS controls were active on mobile platforms such as Android and iOS. Now when I boot up version 4 it appears the native controls take precedence. This means that features that require actions on control bar buttons such as tracks, etc are not accessible, correct?
我们想继续向我们的移动用户展示一个分辨率切换按钮.服从本地控制的决定是故意的吗?如果是这样,此决定将在代码中的何处发生?我已经为它挖掘了一段时间.
We would like to continue to present a resolution switching button to our mobile users. Was the decision to defer to the native controls an intentional philosophical one? If so, where in the code does this decision happen? I have been digging for it for a while now.
非常感谢.
推荐答案
According to the source the native controls are default on iOS and Android "until controls are more stable on those devices".
<video data-setup='{"customControlsOnMobile": true}' …
将启用video.js控件,但请记住,它们由于某种原因而被禁用.
<video data-setup='{"customControlsOnMobile": true}' …
would enable the video.js controls, but bear in mind they're disabled for a reason.
更新:此问题与video.js 4有关.对于video.js 5,等效项为nativeControlsForTouch: false
.本机控件始终用在iPhone和旧版Android(已知存在自定义控件问题)上.
Update: This question and answer relate to video.js 4. For video.js 5 the equivalent is nativeControlsForTouch: false
. Native controls are always used on iPhone and older versions of Android known to be problematic with custom controls.
这篇关于VideoJS 4本机控件现在在移动设备上默认吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!