aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/captions.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/captions.js')
-rw-r--r--src/js/captions.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/js/captions.js b/src/js/captions.js
index 296888b2..5941ebda 100644
--- a/src/js/captions.js
+++ b/src/js/captions.js
@@ -83,6 +83,11 @@ const captions = {
// Set toggled state
this.toggleCaptions(active);
+ // Watch changes to textTracks and update captions menu
+ if (this.config.captions.update) {
+ utils.on(this.media.textTracks, 'change', captions.update.bind(this));
+ }
+
// Update available languages in list
captions.update.call(this);
},