VideoJS 4 本机控件现在默认在移动设备上? [英] VideoJS 4 native controls now default on mobile?

查看:17
本文介绍了VideoJS 4 本机控件现在默认在移动设备上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将 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.

非常感谢.

推荐答案

根据source 原生控件在 iOS 和 Android 上是默认的,直到控件在这些设备上更加稳定".

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屋!

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