Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML 5: Force window controls to be always visible

This is definitely a trivial thing but I failed to find a working solution on google! How do we force the controls of a html 5 video to always be visible. For example when the video is playing and the cursor is not on the video, the progress bar just fades away! Please let me know how to keep it there at all time!

like image 987
Amir Zadeh Avatar asked Jul 16 '14 07:07

Amir Zadeh


1 Answers

You can style the controls by styling the pseudo elements. To force the controls to remain visible in Webkit browsers you can do:

video::-webkit-media-controls-panel {
    display: flex !important;
    opacity: 1 !important;
}

And I imagine there are other vendor prefixes for the other browsers.

like image 66
Empereol Avatar answered Sep 28 '22 01:09

Empereol