aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/js/captions.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/captions.js b/src/js/captions.js
index 52fdd8b3..30c4bc74 100644
--- a/src/js/captions.js
+++ b/src/js/captions.js
@@ -77,8 +77,8 @@ const captions = {
utils.on(this.media.textTracks, 'addtrack removetrack', captions.update.bind(this));
}
- // Update available languages in list
- captions.update.call(this);
+ // Update available languages in list next tick (the event must not be triggered before the listeners)
+ setTimeout(captions.update.bind(this), 0);
},
update() {