aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/ui.js
diff options
context:
space:
mode:
authorAlbin Larsson <mail@albinlarsson.com>2018-05-29 16:06:07 +0200
committerAlbin Larsson <mail@albinlarsson.com>2018-05-29 16:06:07 +0200
commit9d798893b56e2ebe9da2d6b87f639f2d2ecee365 (patch)
tree8123dbb3b61e6a631df478ad6f38db354c53c25d /src/js/ui.js
parent69bb0917ad0e2a1ff2c033a0c4ddd2582de8124b (diff)
downloadplyr-9d798893b56e2ebe9da2d6b87f639f2d2ecee365.tar.lz
plyr-9d798893b56e2ebe9da2d6b87f639f2d2ecee365.tar.xz
plyr-9d798893b56e2ebe9da2d6b87f639f2d2ecee365.zip
Call duration update method manually if user config has duration
Diffstat (limited to 'src/js/ui.js')
-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