Add resolution switcher plugin for video.js

Allows switching resolutions via the video.js UI.  Also added support on
the player side for 540p, 1440p, and 2160p videos, although the metadata
extractors have not been updated to provide these sources yet.
This commit is contained in:
Calvin Montgomery 2017-07-01 16:50:30 -07:00
parent d36bc160ca
commit 5500054b84
6 changed files with 420 additions and 7 deletions

View file

@ -0,0 +1,31 @@
.vjs-resolution-button .vjs-menu-icon:before {
content: '\f110';
font-family: VideoJS;
font-weight: normal;
font-style: normal;
font-size: 1.8em;
line-height: 1.67em;
}
.vjs-resolution-button .vjs-resolution-button-label {
font-size: 1em;
line-height: 3em;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
text-align: center;
box-sizing: inherit;
}
.vjs-resolution-button .vjs-menu .vjs-menu-content {
width: 6em;
left: 50%; /* Center the menu, in it's parent */
margin-left: -2em; /* half of width, to center */
}
.vjs-resolution-button .vjs-menu li {
text-transform: none;
font-size: 1em;
}