diff options
| author | Albin Larsson <mail@albinlarsson.com> | 2018-05-29 16:06:07 +0200 | 
|---|---|---|
| committer | Albin Larsson <mail@albinlarsson.com> | 2018-05-29 16:06:07 +0200 | 
| commit | 9d798893b56e2ebe9da2d6b87f639f2d2ecee365 (patch) | |
| tree | 8123dbb3b61e6a631df478ad6f38db354c53c25d /src/js | |
| parent | 69bb0917ad0e2a1ff2c033a0c4ddd2582de8124b (diff) | |
| download | plyr-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')
| -rw-r--r-- | src/js/ui.js | 6 | 
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 | 
