I am adapting my resolution switching work for Vidcaster on VideoJS into a plugin (see https://github.com/videojs/video.js/pull/233).
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.
Much appreciated.
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}' …
would enable the video.js controls, but bear in mind they're disabled for a reason.
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.
Currently the option to initialize a video that will display videojs' custom controls and not the native controls (iOS, for example) is nativeControlsForTouch: false
.
Can be found in the source here.
This option can be set as stated in the answer above through <video data-setup='{"nativeControlsForTouch": false}' …
or through JavaScript: vjs('video_id', {nativeControlsForTouch: false});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With