VideoJS 4 native controls now default on mobile?

后端 未结 2 1819
予麋鹿
予麋鹿 2020-12-19 05:53

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 cont

相关标签:
2条回答
  • 2020-12-19 06:34

    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.

    0 讨论(0)
  • 2020-12-19 06:39

    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});

    0 讨论(0)
提交回复
热议问题