aboutsummaryrefslogtreecommitdiffstats
path: root/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js')
-rw-r--r--src/js/ui.js7
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);
}