Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is it possible to change default html5 video skin/color

Is it possible to change default html5 video player's colors or complete skin?

<video id="sampleMovie" src="HTML5Sample.mov" controls></video>

enter image description here

like image 588
Johnny Avatar asked Dec 09 '13 10:12

Johnny


2 Answers

Yes it is, if your browser supports shadow DOM. On that case you will have selectors available to theme it on css like:

*::-webkit-media-controls-panel {
   background-color: red !important;
}

And many other pseudo attributes. To play with it, you can examine the shadow DOM on crome by enabling "Show user agent shadow DOM" on :

Developer tools -> Settings -> Preferences -> Show user agent shadow DOM

like image 185
Ignacio Vazquez Avatar answered Oct 12 '22 12:10

Ignacio Vazquez


There's no way of re-skinning the browsers native HTML5 video controls. However, you can omit them completely (by removing the controls attribute), and implement your own controls using HTML, CSS and the HTML video API (good reference here).

There's a guide here which will get you started.

like image 45
net.uk.sweet Avatar answered Oct 12 '22 12:10

net.uk.sweet