Show hours in player clock
This commit is contained in:
parent
e149b7a6b4
commit
d5c3cb886d
|
@ -167,9 +167,10 @@ var behaviors = {
|
||||||
$(this).removeClass("dragging");
|
$(this).removeClass("dragging");
|
||||||
}).on("slide", function(){
|
}).on("slide", function(){
|
||||||
newTime = $(".time-holder .player-slider").slider('getValue').val();
|
newTime = $(".time-holder .player-slider").slider('getValue').val();
|
||||||
|
hours = Math.floor(newTime/60/60)
|
||||||
minutes = Math.floor(newTime/60)
|
minutes = Math.floor(newTime/60)
|
||||||
seconds = Math.floor(newTime-(minutes*60))
|
seconds = Math.floor(newTime-(minutes*60))
|
||||||
$(".timeshow").html(minutes+":"+(seconds<10?"0":"")+seconds)
|
$(".timeshow").html((hours>0?hours+":":"")+minutes+":"+(seconds<10?"0":"")+seconds)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
play:function() {
|
play:function() {
|
||||||
|
@ -183,9 +184,10 @@ var behaviors = {
|
||||||
// Update the slider
|
// Update the slider
|
||||||
$(".time-holder .player-slider").slider('setValue', event.jPlayer.status.currentTime);
|
$(".time-holder .player-slider").slider('setValue', event.jPlayer.status.currentTime);
|
||||||
// And update the time
|
// And update the time
|
||||||
minutes = Math.floor(event.jPlayer.status.currentTime/60)
|
hours = Math.floor(newTime/60/60)
|
||||||
seconds = Math.floor(event.jPlayer.status.currentTime-(minutes*60))
|
minutes = Math.floor(newTime/60)
|
||||||
$(".timeshow").html(minutes+":"+(seconds<10?"0":"")+seconds)
|
seconds = Math.floor(newTime-(minutes*60))
|
||||||
|
$(".timeshow").html((hours>0?hours+":":"")+minutes+":"+(seconds<10?"0":"")+seconds)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue