Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable play/pause/full screen for HTML5 <video> on click for YouTube

Is there a way for us to disable the "play/pause/full screen on click" functionality for a HTML5 video through javascript and later put it back when we need it again?

like image 259
jianweichuah Avatar asked Oct 20 '22 17:10

jianweichuah


1 Answers

I don't know if you can disable them but you can remove them using css.

video::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-play-button, video::-webkit-media-controls-pausebutton {
    display: none;
}

http://jsfiddle.net/4ce23z2a/

I hope this helps.

like image 132
Dzhambazov Avatar answered Oct 27 '22 09:10

Dzhambazov