Are VideoJS 4 native controls now default on mobile devices?

I am adapting my work of switching permissions for Vidcaster to VideoJS into a plugin (see https://github.com/videojs/video.js/pull/233 ).

In VideoJS 3.2, VideoJS controls were active on mobile platforms such as Android and iOS. Now, when I download version 4, it seems that the original controls take precedence. This means that functions that require actions on the buttons on the control panel, such as tracks, etc., are not available, right?

We would like to continue providing the permission switch button to our mobile users. Was the decision to postpone native control intentional philosophical? If so, where in the code does this decision take place? I’ve been digging this for a long time.

Great importance.

+6
source share
2 answers

According to the source, the original controls are installed by default on iOS and Android until the controls become more stable on these devices.

<video data-setup='{"customControlsOnMobile": true}' … will include the video.js controls, but keep in mind that they are disabled for some reason.

Update: This question and answer applies to video.js 4. For video.js 5, the equivalent of nativeControlsForTouch: false . Native controls are always used on iPhone and earlier versions of Android, which are known to be problematic with custom controls.

+11
source

Currently, you can initialize a video that will display user videojs controls, rather than native controls (e.g. iOS) - nativeControlsForTouch: false . Here can be found in the source here . This parameter can be set, as indicated in the answer above, via <video data-setup='{"nativeControlsForTouch": false}' … or via JavaScript: vjs('video_id', {nativeControlsForTouch: false});

+5
source

Source: https://habr.com/ru/post/945610/


All Articles