Videojs add only play control

后端 未结 5 796
情深已故
情深已故 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:50

    If you also want to get rid of the play button, and just have the video play and stop on clicking, check out this alternative solution, which I adapted.

    Insert into your (or elsewhere if not possible) ...

    
    

    then call from your video, e.g.

    Make sure that you do not set the controls in your video tag. Obviously this way, you can fiddle in your own custom button, which the linked solution does.

提交回复
热议问题