diff options
author | Sam Potts <me@sampotts.me> | 2018-01-14 22:55:44 +1100 |
---|---|---|
committer | Sam Potts <me@sampotts.me> | 2018-01-14 22:55:44 +1100 |
commit | cfc86bcb7cc4be3608a08132aaf4946a63594559 (patch) | |
tree | 1880790c87ff9e26f846b61f35992096c2909b9e /src | |
parent | bbdf225d7b25c16d293108a9cf813c521f4d44eb (diff) | |
parent | 5f96ec6ac2765c176645651881fa2d0ba666f58b (diff) | |
download | plyr-cfc86bcb7cc4be3608a08132aaf4946a63594559.tar.lz plyr-cfc86bcb7cc4be3608a08132aaf4946a63594559.tar.xz plyr-cfc86bcb7cc4be3608a08132aaf4946a63594559.zip |
Merge branch 'beta' into beta-with-ads
# Conflicts:
# demo/dist/demo.js
# demo/dist/demo.js.map
# dist/plyr.js
# dist/plyr.js.map
Diffstat (limited to 'src')
-rw-r--r-- | src/js/ui.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/js/ui.js b/src/js/ui.js index 08ed43ab..1ad0c43a 100644 --- a/src/js/ui.js +++ b/src/js/ui.js @@ -345,13 +345,16 @@ const ui = { return; } + // If there's a spot to display duration + const hasDuration = utils.is.element(this.elements.display.duration); + // If there's only one time display, display duration there - if (!utils.is.element(this.elements.display.duration) && this.config.displayDuration && this.paused) { + if (!hasDuration && this.config.displayDuration && this.paused) { ui.updateTimeDisplay.call(this, this.elements.display.currentTime, this.duration); } // If there's a duration element, update content - if (utils.is.element(this.elements.display.duration)) { + if (hasDuration) { ui.updateTimeDisplay.call(this, this.elements.display.duration, this.duration); } |