videojs: Squeeze in 'playback rate' button for Mobile Portrait.

## Issue
- Personally annoyed of having to switch to landscape just to change the setting. There's still space for it.
- This serves as a quick fix until "4712: Video: Allow access to all control in small screen" is figured out
This commit is contained in:
infiinte-persistence 2020-11-20 15:53:22 +08:00 committed by Sean Yesmunt
parent dc87f48040
commit e12506feef

View file

@ -400,21 +400,43 @@
}
}
.video-js:not(.vjs-fullscreen).vjs-layout-small {
.video-js.vjs-fullscreen,
.video-js:not(.vjs-fullscreen) {
// --- Unhide desired components per layout ---
&.vjs-layout-x-small {
.vjs-playback-rate {
display: inherit;
}
}
&.vjs-layout-small {
.vjs-current-time,
.vjs-time-divider,
.vjs-duration,
.vjs-playback-rate {
display: inherit;
}
}
// --- Adjust spacing ---
.vjs-current-time {
display: flex;
padding-left: 0.5em;
padding-right: 0;
}
.vjs-time-divider {
display: flex;
.vjs-duration {
padding-left: 0;
}
.vjs-duration {
display: flex;
padding-left: 0;
padding-right: 0.5em;
.vjs-playback-rate .vjs-playback-rate-value {
// Reduce the gigantic font a bit. Default was 1.5em.
font-size: 1.25em;
line-height: 2.5;
}
.vjs-playback-rate .vjs-menu {
// Extend the width to prevent a potential scrollbar from blocking the text.
width: 8em;
left: -2em;
}
}