diff options
author | Chocobozzz <me@florianbigard.com> | 2018-04-05 16:15:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-05 16:15:51 +0200 |
commit | a8462c8e3a61f4f7314fe18c0c10cc2946c254d1 (patch) | |
tree | b5330cf0a8c313277f83263724c2a70b2f246c0f /client/src/assets/player/settings-menu-item.ts | |
parent | 3d3441d6c7a5646388ab0a77acad57fdb63b9d32 (diff) | |
download | PeerTube-a8462c8e3a61f4f7314fe18c0c10cc2946c254d1.tar.gz PeerTube-a8462c8e3a61f4f7314fe18c0c10cc2946c254d1.tar.zst PeerTube-a8462c8e3a61f4f7314fe18c0c10cc2946c254d1.zip |
Automatic resolution according to user bandwidth V1
Diffstat (limited to 'client/src/assets/player/settings-menu-item.ts')
-rw-r--r-- | client/src/assets/player/settings-menu-item.ts | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/client/src/assets/player/settings-menu-item.ts b/client/src/assets/player/settings-menu-item.ts index e979ae088..048c88533 100644 --- a/client/src/assets/player/settings-menu-item.ts +++ b/client/src/assets/player/settings-menu-item.ts | |||
@@ -241,21 +241,14 @@ class SettingsMenuItem extends MenuItem { | |||
241 | continue | 241 | continue |
242 | } | 242 | } |
243 | 243 | ||
244 | switch (subMenu) { | 244 | if (subMenuItem.hasClass('vjs-selected')) { |
245 | case 'SubtitlesButton': | 245 | // Prefer to use the function |
246 | case 'CaptionsButton': | 246 | if (typeof subMenuItem.getLabel === 'function') { |
247 | // subtitlesButton entering default check twice and overwriting | 247 | this.settingsSubMenuValueEl_.innerHTML = subMenuItem.getLabel() |
248 | // selected label in main manu | ||
249 | if (subMenuItem.hasClass('vjs-selected')) { | ||
250 | this.settingsSubMenuValueEl_.innerHTML = subMenuItem.options_.label | ||
251 | } | ||
252 | break | 248 | break |
249 | } | ||
253 | 250 | ||
254 | default: | 251 | this.settingsSubMenuValueEl_.innerHTML = subMenuItem.options_.label |
255 | // Set submenu value based on what item is selected | ||
256 | if (subMenuItem.options_.selected || subMenuItem.hasClass('vjs-selected')) { | ||
257 | this.settingsSubMenuValueEl_.innerHTML = subMenuItem.options_.label | ||
258 | } | ||
259 | } | 252 | } |
260 | } | 253 | } |
261 | } | 254 | } |