aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/settings-menu-item.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-01-11 16:44:45 +0100
committerChocobozzz <me@florianbigard.com>2019-01-14 09:07:08 +0100
commitc32bf839c11557cac527ca5f181d1ce39fc80974 (patch)
tree9be808496cb8381d09c9b334c6169ca70411e75e /client/src/assets/player/settings-menu-item.ts
parentf242c2e01e3423ad63a9a6d904062256d60b6971 (diff)
downloadPeerTube-c32bf839c11557cac527ca5f181d1ce39fc80974.tar.gz
PeerTube-c32bf839c11557cac527ca5f181d1ce39fc80974.tar.zst
PeerTube-c32bf839c11557cac527ca5f181d1ce39fc80974.zip
Fix captions in HTTP fallback
Diffstat (limited to 'client/src/assets/player/settings-menu-item.ts')
-rw-r--r--client/src/assets/player/settings-menu-item.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/client/src/assets/player/settings-menu-item.ts b/client/src/assets/player/settings-menu-item.ts
index 698f4627a..2a3460ae5 100644
--- a/client/src/assets/player/settings-menu-item.ts
+++ b/client/src/assets/player/settings-menu-item.ts
@@ -48,6 +48,19 @@ class SettingsMenuItem extends MenuItem {
48 // Update on rate change 48 // Update on rate change
49 player.on('ratechange', this.submenuClickHandler) 49 player.on('ratechange', this.submenuClickHandler)
50 50
51 if (subMenuName === 'CaptionsButton') {
52 // Hack to regenerate captions on HTTP fallback
53 player.on('captionsChanged', () => {
54 setTimeout(() => {
55 this.settingsSubMenuEl_.innerHTML = ''
56 this.settingsSubMenuEl_.appendChild(this.subMenu.menu.el_)
57 this.update()
58 this.bindClickEvents()
59
60 }, 0)
61 })
62 }
63
51 this.reset() 64 this.reset()
52 }, 0) 65 }, 0)
53 }) 66 })