diff options
author | Sam Potts <sam@potts.es> | 2018-05-31 23:39:51 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-31 23:39:51 +1000 |
commit | fb22a90d33ad991e1f6de22f201c3b49f54168c1 (patch) | |
tree | 8cc30e7af53cd44f8cb5f035e16f9d6d9804cc39 /src/js/ui.js | |
parent | d70a787af19ece0b9eeeba60d947225c73ded291 (diff) | |
parent | 108bd3dfa078cf22c0446373830e86cba586919c (diff) | |
download | plyr-fb22a90d33ad991e1f6de22f201c3b49f54168c1.tar.lz plyr-fb22a90d33ad991e1f6de22f201c3b49f54168c1.tar.xz plyr-fb22a90d33ad991e1f6de22f201c3b49f54168c1.zip |
Merge pull request #993 from sampotts/develop
v3.3.10
Diffstat (limited to 'src/js/ui.js')
-rw-r--r-- | src/js/ui.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/js/ui.js b/src/js/ui.js index 3a8f2d05..d6ab0e59 100644 --- a/src/js/ui.js +++ b/src/js/ui.js @@ -55,8 +55,10 @@ const ui = { // Remove native controls ui.toggleNativeControls.call(this); - // Captions - captions.setup.call(this); + // Setup captions for HTML5 + if (this.isHTML5) { + captions.setup.call(this); + } // Reset volume this.volume = null; @@ -109,6 +111,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 |