diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/assets/player/peertube-videojs-plugin.ts | 4 | ||||
-rw-r--r-- | client/src/sass/video-js-custom.scss | 15 |
2 files changed, 17 insertions, 2 deletions
diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts index add4e521e..4ba37b7d9 100644 --- a/client/src/assets/player/peertube-videojs-plugin.ts +++ b/client/src/assets/player/peertube-videojs-plugin.ts | |||
@@ -156,7 +156,7 @@ const WebTorrentButton = videojsUntyped.extend(Button, { | |||
156 | 156 | ||
157 | div.className = 'vjs-webtorrent' | 157 | div.className = 'vjs-webtorrent' |
158 | // Hide the stats before we get the info | 158 | // Hide the stats before we get the info |
159 | subDiv.style.display = 'none' | 159 | subDiv.className = 'vjs-webtorrent-hidden' |
160 | 160 | ||
161 | this.player_.on('torrentInfo', (event, data) => { | 161 | this.player_.on('torrentInfo', (event, data) => { |
162 | const downloadSpeed = bytes(data.downloadSpeed) | 162 | const downloadSpeed = bytes(data.downloadSpeed) |
@@ -171,7 +171,7 @@ const WebTorrentButton = videojsUntyped.extend(Button, { | |||
171 | 171 | ||
172 | peersNumber.textContent = numPeers | 172 | peersNumber.textContent = numPeers |
173 | 173 | ||
174 | subDiv.style.display = 'block' | 174 | subDiv.className = 'vjs-webtorrent-displayed' |
175 | }) | 175 | }) |
176 | 176 | ||
177 | return div | 177 | return div |
diff --git a/client/src/sass/video-js-custom.scss b/client/src/sass/video-js-custom.scss index 1200c07a5..2fcfc6203 100644 --- a/client/src/sass/video-js-custom.scss +++ b/client/src/sass/video-js-custom.scss | |||
@@ -138,6 +138,14 @@ $control-bar-height: 34px; | |||
138 | text-align: right; | 138 | text-align: right; |
139 | padding-right: 60px; | 139 | padding-right: 60px; |
140 | 140 | ||
141 | .vjs-webtorrent-displayed { | ||
142 | display: block; | ||
143 | } | ||
144 | |||
145 | .vjs-webtorrent-hidden { | ||
146 | display: none; | ||
147 | } | ||
148 | |||
141 | .download-speed-number, .upload-speed-number, .peers-number { | 149 | .download-speed-number, .upload-speed-number, .peers-number { |
142 | font-weight: $font-semibold; | 150 | font-weight: $font-semibold; |
143 | } | 151 | } |
@@ -303,6 +311,12 @@ $control-bar-height: 34px; | |||
303 | } | 311 | } |
304 | } | 312 | } |
305 | } | 313 | } |
314 | |||
315 | @media screen and (max-width: 450px) { | ||
316 | .vjs-webtorrent-displayed { | ||
317 | display: none !important; | ||
318 | } | ||
319 | } | ||
306 | } | 320 | } |
307 | 321 | ||
308 | // Thanks: https://projects.lukehaas.me/css-loaders/ | 322 | // Thanks: https://projects.lukehaas.me/css-loaders/ |
@@ -340,3 +354,4 @@ $control-bar-height: 34px; | |||
340 | } | 354 | } |
341 | } | 355 | } |
342 | } | 356 | } |
357 | |||