gyorgy@0: (function($) { gyorgy@0: // current and duration 00:00 / 00:00 gyorgy@0: MediaElementPlayer.prototype.buildcurrent = function(player, controls, layers, media) { gyorgy@0: var t = this; gyorgy@0: gyorgy@0: $('
'+ gyorgy@0: '' + (player.options.alwaysShowHours ? '00:' : '') + '00:00'+ gyorgy@0: '
') gyorgy@0: .appendTo(controls); gyorgy@0: gyorgy@0: t.currenttime = t.controls.find('.mejs-currenttime'); gyorgy@0: gyorgy@0: media.addEventListener('timeupdate',function() { gyorgy@0: player.updateCurrent(); gyorgy@0: }, false); gyorgy@0: }; gyorgy@0: gyorgy@0: MediaElementPlayer.prototype.buildduration = function(player, controls, layers, media) { gyorgy@0: var t = this; gyorgy@0: gyorgy@0: if (controls.children().last().find('.mejs-currenttime').length > 0) { gyorgy@0: $(' | '+ gyorgy@0: '' + (player.options.alwaysShowHours ? '00:' : '') + '00:00') gyorgy@0: .appendTo(controls.find('.mejs-time')); gyorgy@0: } else { gyorgy@0: gyorgy@0: // add class to current time gyorgy@0: controls.find('.mejs-currenttime').parent().addClass('mejs-currenttime-container'); gyorgy@0: gyorgy@0: $('
'+ gyorgy@0: '' + (player.options.alwaysShowHours ? '00:' : '') + '00:00'+ gyorgy@0: '
') gyorgy@0: .appendTo(controls); gyorgy@0: } gyorgy@0: gyorgy@0: t.durationD = t.controls.find('.mejs-duration'); gyorgy@0: gyorgy@0: media.addEventListener('timeupdate',function() { gyorgy@0: player.updateDuration(); gyorgy@0: }, false); gyorgy@0: }; gyorgy@0: gyorgy@0: MediaElementPlayer.prototype.updateCurrent = function() { gyorgy@0: var t = this; gyorgy@0: gyorgy@0: if (t.currenttime) { gyorgy@0: t.currenttime.html(mejs.Utility.secondsToTimeCode(t.media.currentTime | 0, t.options.alwaysShowHours || t.media.duration > 3600 )); gyorgy@0: } gyorgy@0: } gyorgy@0: MediaElementPlayer.prototype.updateDuration = function() { gyorgy@0: var t = this; gyorgy@0: gyorgy@0: if (t.media.duration && t.durationD) { gyorgy@0: t.durationD.html(mejs.Utility.secondsToTimeCode(t.media.duration, t.options.alwaysShowHours)); gyorgy@0: } gyorgy@0: }; gyorgy@0: gyorgy@0: })(mejs.$);