diff options
author | Chocobozzz <me@florianbigard.com> | 2019-01-11 16:44:45 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-01-14 09:07:08 +0100 |
commit | c32bf839c11557cac527ca5f181d1ce39fc80974 (patch) | |
tree | 9be808496cb8381d09c9b334c6169ca70411e75e /client/src/assets/player/peertube-videojs-plugin.ts | |
parent | f242c2e01e3423ad63a9a6d904062256d60b6971 (diff) | |
download | PeerTube-c32bf839c11557cac527ca5f181d1ce39fc80974.tar.gz PeerTube-c32bf839c11557cac527ca5f181d1ce39fc80974.tar.zst PeerTube-c32bf839c11557cac527ca5f181d1ce39fc80974.zip |
Fix captions in HTTP fallback
Diffstat (limited to 'client/src/assets/player/peertube-videojs-plugin.ts')
-rw-r--r-- | client/src/assets/player/peertube-videojs-plugin.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts index 4a280b7ef..e9fb90c61 100644 --- a/client/src/assets/player/peertube-videojs-plugin.ts +++ b/client/src/assets/player/peertube-videojs-plugin.ts | |||
@@ -620,6 +620,9 @@ class PeerTubePlugin extends Plugin { | |||
620 | this.player.src = this.savePlayerSrcFunction | 620 | this.player.src = this.savePlayerSrcFunction |
621 | this.player.src(httpUrl) | 621 | this.player.src(httpUrl) |
622 | 622 | ||
623 | // We changed the source, so reinit captions | ||
624 | this.initCaptions() | ||
625 | |||
623 | return this.tryToPlay(err => { | 626 | return this.tryToPlay(err => { |
624 | if (err && done) return done(err) | 627 | if (err && done) return done(err) |
625 | 628 | ||
@@ -720,6 +723,8 @@ class PeerTubePlugin extends Plugin { | |||
720 | default: this.defaultSubtitle === caption.language | 723 | default: this.defaultSubtitle === caption.language |
721 | }, false) | 724 | }, false) |
722 | } | 725 | } |
726 | |||
727 | this.player.trigger('captionsChanged') | ||
723 | } | 728 | } |
724 | 729 | ||
725 | // Thanks: https://github.com/videojs/video.js/issues/4460#issuecomment-312861657 | 730 | // Thanks: https://github.com/videojs/video.js/issues/4460#issuecomment-312861657 |