Call duration update method manually if user config has duration

This commit is contained in:
Albin Larsson 2018-05-29 16:06:07 +02:00
parent 69bb0917ad
commit 9d798893b5

View File

@ -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