Sha256: 076f5b2a96c94fc43ac0e35bb48ed8461c0f7a46a4b8275d064bc3c284ef1e1c
Contents?: true
Size: 1.49 KB
Versions: 3
Compression:
Stored size: 1.49 KB
Contents
jQuery.webshims.register("mediaelement-native-fix",function(e,t,n,r,i){if(Modernizr.videoBuffered)return;var s=function(e){var n=t.data(e,"mediaelementBuffered");return n||(n={buffered:{start:function(e){if(e>=n.buffered.length){t.error("buffered index size error");return}return 0},end:function(e){if(e>=n.buffered.length){t.error("buffered index size error");return}return n.loaded},length:0},loaded:0},t.data(e,"mediaelementBuffered",n)),n},o=function(n){n=n.originalEvent;if(!n||!("lengthComputable"in n))return;var r=t.data(n.target,"mediaelement");if(r&&r.isActive!="html5")return;if(n.lengthComputable&&"loaded"in n){var i=n.target.duration,o=s(n.target);o.loaded=i?n.loaded/n.total*i:0,o.loaded&&(o.buffered.length=1),n.type=="load"&&e(n.target).triggerHandler("progress")}},u=function(e){var t=s(e.target);t.buffered.length=0,t.loaded=0};["audio","video"].forEach(function(e){var n=t.defineNodeNameProperty(e,"buffered",{prop:{get:function(){var e=t.data(this,"mediaelement");if(!e||e.isActive!="flash"||!n.prop._supget)return s(this).buffered;n.prop._supget.apply(this)}}})}),function(){var e=r.createElement("video");if(!("preload"in e)&&"autobuffer"in e){var n={metadata:1,none:1};t.onNodeNamesPropertyModify(["audio","video"],["preload"],{set:function(e,r,i){n[e]||i=="removeAttr"?this.autobuffer=!1:!(t.data(this,"mediaelement")||{}).isActive=="html5"&&(this.autobuffer=!0)},initAttr:!0})}}(),t.addReady(function(t,n){e("video, audio",t).add(n.filter("video, audio")).on("load progress",o).on("emptied",u)})});
Version data entries
3 entries across 3 versions & 1 rubygems