aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/js/ui.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/js/ui.js b/src/js/ui.js
index 3a8f2d05..aa398e3a 100644
--- a/src/js/ui.js
+++ b/src/js/ui.js
@@ -109,6 +109,12 @@ const ui = {
if (this.poster && this.elements.poster && !this.elements.poster.style.backgroundImage) {
ui.setPoster.call(this, this.poster);
}
+
+ // Manually set the duration if user has overridden it.
+ // The event listeners for it doesn't get called if preload is disabled (#701)
+ if (this.config.duration) {
+ controls.durationUpdate.call(this);
+ }
},
// Setup aria attribute for play and iframe title