From 13b915bbec23ebbc88cd68e29e5f89a6b538745b Mon Sep 17 00:00:00 2001 From: KasperRT Date: Tue, 24 Feb 2015 23:16:31 +0100 Subject: [PATCH] Fixed small bug with timer of player --- js/playercontrols.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/playercontrols.js b/js/playercontrols.js index 3bad2799..589f6034 100755 --- a/js/playercontrols.js +++ b/js/playercontrols.js @@ -158,6 +158,8 @@ function durationSetter() dMinutes = Math.floor(duration / 60); dSeconds = duration - dMinutes * 60; currDurr = ytplayer.getCurrentTime(); + if(currDurr > duration) + currDurr = duration; minutes = Math.floor(currDurr / 60); seconds = currDurr - minutes * 60; document.getElementById("duration").innerHTML = pad(minutes)+":"+pad(seconds)+" / "+pad(dMinutes)+":"+pad(dSeconds);