app/assets/javascripts/pageflow/widgets/player_controls.js in pageflow-0.2.1 vs app/assets/javascripts/pageflow/widgets/player_controls.js in pageflow-0.3.0
- old
+ new
@@ -19,11 +19,12 @@
durationDisplay.html("00:00");
}
player.on('timeupdate', function (position, duration) {
var percent = duration > 0 ? (player.position / player.duration) * 100 : 0;
- if(!isNaN(position)) {
- if(durationDisplay.html().length === 5 && durationDisplay.html().charAt(0) === "0") {
+
+ if (!isNaN(position)) {
+ if (player.duration < 600) {
$(currentTimeDisplay).html(player.formatTime(position).substr(1));
$(durationDisplay).html(player.formatTime(duration).substr(1));
}
else {
$(currentTimeDisplay).html(player.formatTime(position));
\ No newline at end of file