diff options
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 | } |