1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-12 11:15:04 +02:00
video.js/docs/guides/skins.md

29 lines
1.3 KiB
Markdown
Raw Normal View History

2012-01-09 21:05:19 +03:00
Skins
=====
2012-01-10 00:32:10 +03:00
2013-07-20 06:18:39 +03:00
The default Video.js skin is made using HTML and CSS, so there's no need to learn a complicated skinning language to update colors or even create an entirely new skin.
2012-01-10 00:32:10 +03:00
## Icons
2013-07-20 06:18:39 +03:00
New in version 4.0 is the use of font icons. All of the icons (play, pause, etc.) use the new custom font, which allows the icons to be scaled and colored just like any other text font.
2012-01-10 00:32:10 +03:00
All of the icons are available as variables in the [LESS](https://github.com/videojs/video.js/blob/master/src/css/video-js.less#L87-L99) source, making it easy to replace icons (such as the loading spinner). The easiest way to try this out is by using the [player skin designer](http://designer.videojs.com/).
![available icons](https://i.cloudup.com/wb51GGDDnJ.png)
## Customization
2013-07-20 06:18:39 +03:00
When you create a new skin, you can either override styles in the default skin:
2012-01-10 00:32:10 +03:00
```css
2012-01-10 00:32:10 +03:00
.vjs-default-skin .vjs-play-progress { background: #900; }
```
2012-01-10 00:32:10 +03:00
2013-07-20 06:18:39 +03:00
Or remove the 'vjs-default-skin' class from the video tag and create a new skin from scratch.
2012-01-10 00:32:10 +03:00
```html
2012-01-10 00:32:10 +03:00
<video class="video-js my-custom-skin" ...>
```
2012-01-10 00:32:10 +03:00
2013-07-20 06:18:39 +03:00
More custom skins will be available for download soon. If you have one you like you can share it by forking [this example on CodePen.io](http://codepen.io/heff/pen/EarCt), and adding a link on the [Skins wiki page](https://github.com/videojs/video.js/wiki/Skins).