aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plyr.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r--src/js/plyr.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index 4665a2a1..9128ad99 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -1153,13 +1153,14 @@
function _updateTimeDisplay() {
player.secs = parseInt(player.media.currentTime % 60);
player.mins = parseInt((player.media.currentTime / 60) % 60);
+ player.hours = parseInt(((player.media.currentTime / 60) / 60) % 60);
// Ensure it"s two digits. For example, 03 rather than 3.
player.secs = ("0" + player.secs).slice(-2);
player.mins = ("0" + player.mins).slice(-2);
// Render
- player.duration.innerHTML = player.mins + ":" + player.secs;
+ player.duration.innerHTML = (player.hours > 0 ? player.hours + ":" : "") + player.mins + ":" + player.secs;
}
// Handle time change event
@@ -1303,7 +1304,6 @@
// Captions
_on(player.buttons.captions, "change", function() {
- console.log(this.checked);
_toggleCaptions(this.checked);
});