Videojs add only play control

后端 未结 5 744
情深已故
情深已故 2021-02-04 21:03

I am using Video.js to play videos in my web page. I want to customize player controls to only play button.

my code is



        
5条回答
  •  梦谈多话
    2021-02-04 21:55

    It seems there is also an option to hide/show the controlBar items via data-setup

    The components are listed at https://github.com/videojs/video.js/blob/stable/docs/guides/components.md
    and the description of options https://github.com/videojs/video.js/blob/stable/docs/guides/options.md

    the controlBar is passed as follows:

    data-setup='{ "controlBar": { "muteToggle": false } }'
    

    Edit: as commented, the behaviour of children for options has been simplified and changed, see also the documentation: https://github.com/videojs/video.js/blob/master/docs/guides/options.md#component-options For the background and timings of these changes, see https://github.com/videojs/video.js/issues/953

    the css selector for the big play button is

    .vjs-default-skin .vjs-big-play-button
    

    but please make sure you have alternatives or an appropriate setup when you remove the play option (;

    mine appears to hide the controls by default(?)

提交回复
热议问题