Changeset 327671
- Timestamp:
- 01/01/2011 05:14:09 AM (15 years ago)
- Location:
- media-element-html5-video-and-audio-player/trunk/mediaelement
- Files:
-
- 2 edited
-
mediaelement-and-player.js (modified) (2 diffs)
-
mediaelement-and-player.min.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
media-element-html5-video-and-audio-player/trunk/mediaelement/mediaelement-and-player.js
r327668 r327671 1344 1344 1345 1345 1346 if (x > offset.left && x <= width + offset.left ) {1346 if (x > offset.left && x <= width + offset.left && media.duration) { 1347 1347 percentage = ((x - offset.left) / width); 1348 1348 newTime = percentage * media.duration; … … 1358 1358 timefloatcurrent.html( mejs.Utility.secondsToTimeCode(newTime) ); 1359 1359 } 1360 1361 1362 1363 1360 }, 1364 1361 mouseIsDown = false, -
media-element-html5-video-and-audio-player/trunk/mediaelement/mediaelement-and-player.min.js
r327668 r327671 64 64 false);d.addEventListener("paused",function(){e.removeClass("mejs-pause").addClass("mejs-play")},false)}})(jQuery); 65 65 (function(f){MediaElementPlayer.prototype.buildprogress=function(a,c,b,d){f('<div class="mejs-time-rail"><span class="mejs-time-total"><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span><span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span></span></div>').appendTo(c);var e=c.find(".mejs-time-total"),h=c.find(".mejs-time-loaded"),i=c.find(".mejs-time-current"), 66 k=c.find(".mejs-time-handle"),m=c.find(".mejs-time-float"),p=c.find(".mejs-time-float-current"),l=function(g){g=g.target;var o=null;if(g&&g.bytesTotal!=undefined&&g.bytesTotal>0&&g.bufferedBytes!=undefined)o=g.bufferedBytes/g.bytesTotal;else if(g&&g.buffered&&g.buffered.length>0&&g.buffered.end&&g.duration)o=g.buffered.end(0)/g.duration;o!==null&&h.width(e.width()*o)},j=function(g){g=g.pageX;var o=e.offset(),s=e.outerWidth(),r=0;r=0;if(g>o.left&&g<=s+o.left ){r=(g-o.left)/s;r=r*d.duration;q&&d.setCurrentTime(r);67 m.css("left",g-o.left);p.html(mejs.Utility.secondsToTimeCode(r))}},q=false,n=false;e.bind("mousedown",function(g){q=true;j(g);return false});c.find(".mejs-time-rail").bind("mouseenter",function(){n=true}).bind("mouseleave",function(){n=false});f(document).bind("mouseup",function(){q=false}).bind("mousemove",function(g){if(q||n)j(g)});d.addEventListener("progress",function(g){l(g)},false);d.addEventListener("timeupdate",function(g){l(g);if(d.currentTime&&d.duration){g=e.width()*d.currentTime/d.duration; 68 var o=g-k.outerWidth(true)/2;i.width(g);k.css("left",o)}},false)}})(jQuery);66 k=c.find(".mejs-time-handle"),m=c.find(".mejs-time-float"),p=c.find(".mejs-time-float-current"),l=function(g){g=g.target;var o=null;if(g&&g.bytesTotal!=undefined&&g.bytesTotal>0&&g.bufferedBytes!=undefined)o=g.bufferedBytes/g.bytesTotal;else if(g&&g.buffered&&g.buffered.length>0&&g.buffered.end&&g.duration)o=g.buffered.end(0)/g.duration;o!==null&&h.width(e.width()*o)},j=function(g){g=g.pageX;var o=e.offset(),s=e.outerWidth(),r=0;r=0;if(g>o.left&&g<=s+o.left&&d.duration){r=(g-o.left)/s;r=r*d.duration; 67 q&&d.setCurrentTime(r);m.css("left",g-o.left);p.html(mejs.Utility.secondsToTimeCode(r))}},q=false,n=false;e.bind("mousedown",function(g){q=true;j(g);return false});c.find(".mejs-time-rail").bind("mouseenter",function(){n=true}).bind("mouseleave",function(){n=false});f(document).bind("mouseup",function(){q=false}).bind("mousemove",function(g){if(q||n)j(g)});d.addEventListener("progress",function(g){l(g)},false);d.addEventListener("timeupdate",function(g){l(g);if(d.currentTime&&d.duration){g=e.width()* 68 d.currentTime/d.duration;var o=g-k.outerWidth(true)/2;i.width(g);k.css("left",o)}},false)}})(jQuery); 69 69 (function(f){MediaElementPlayer.prototype.buildcurrent=function(a,c,b,d){f('<div class="mejs-time"><span class="mejs-currenttime">00:00</span></div>').appendTo(c);d.addEventListener("timeupdate",function(){d.currentTime&&c.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(d.currentTime))},false)};MediaElementPlayer.prototype.buildduration=function(a,c,b,d){c.children().last().find(".mejs-currenttime").length>0?f(' <span> | </span> <span class="mejs-duration">00:00</span>').appendTo(c.find(".mejs-time")): 70 70 f('<div class="mejs-time"><span class="mejs-duration">00:00</span></div>').appendTo(c);d.addEventListener("timeupdate",function(){d.duration&&c.find(".mejs-duration").html(mejs.Utility.secondsToTimeCode(d.duration))},false)}})(jQuery);
Note: See TracChangeset
for help on using the changeset viewer.