From ff563914bb10728301a24fb9e548c9efb62387eb Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Mon, 12 Apr 2021 10:26:30 +0200 Subject: add stats videojs plugin --- client/src/sass/player/context-menu.scss | 4 +-- client/src/sass/player/index.scss | 1 + client/src/sass/player/stats.scss | 42 ++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 client/src/sass/player/stats.scss (limited to 'client/src/sass/player') diff --git a/client/src/sass/player/context-menu.scss b/client/src/sass/player/context-menu.scss index df78916c6..6bc66af0c 100644 --- a/client/src/sass/player/context-menu.scss +++ b/client/src/sass/player/context-menu.scss @@ -8,7 +8,7 @@ $context-menu-width: 350px; .video-js .vjs-contextmenu-ui-menu { position: absolute; - background-color: rgba(0, 0, 0, 0.5); + background-color: $primary-background-color; padding: 8px 0; border-radius: 4px; width: $context-menu-width; @@ -42,7 +42,7 @@ $context-menu-width: 350px; mask-size: cover; margin-right: 0.8rem !important; - $icons: 'link-2', 'repeat', 'code', 'tick-white'; + $icons: 'link-2', 'repeat', 'code', 'tick-white', 'info'; @each $icon in $icons { &[class$="-#{$icon}"] { diff --git a/client/src/sass/player/index.scss b/client/src/sass/player/index.scss index fe92ce5e0..502ee33ff 100644 --- a/client/src/sass/player/index.scss +++ b/client/src/sass/player/index.scss @@ -6,3 +6,4 @@ @import './upnext'; @import './bezels.scss'; @import './playlist.scss'; +@import './stats.scss'; diff --git a/client/src/sass/player/stats.scss b/client/src/sass/player/stats.scss new file mode 100644 index 000000000..953f6032a --- /dev/null +++ b/client/src/sass/player/stats.scss @@ -0,0 +1,42 @@ +@import './_player-variables'; + +$stats-width: 420px; +$contextmenu-background-color: rgba(0, 0, 0, 0.6); + +.video-js { + + .vjs-stats-content { + position: absolute; + background-color: $contextmenu-background-color; + padding: 5px 0; + border-radius: 4px; + width: $stats-width; + min-width: 27em; + max-width: calc(100vw - 20px); + left: 10px; + top: 10px; + z-index: 64; + font-size: 12px; + line-height: 1.2; + + @include transition(opacity 0.1s); + } + + .vjs-stats-close { + cursor: pointer; + position: absolute; + right: 3px; + top: 3px; + padding: 0; + } + + .vjs-stats-list > div > div { + display: inline-block; + font-weight: 600; + padding: 0 .5em; + text-align: right; + width: 11.5em; + white-space: nowrap; + } + +} -- cgit v1.2.3