vendor/assets/javascripts/webshims/minified/shims/track.js in webshims-rails-0.4.3 vs vendor/assets/javascripts/webshims/minified/shims/track.js in webshims-rails-0.4.4
- old
+ new
@@ -1,21 +1,21 @@
-jQuery.webshims.register("track",function(d,g,r,s){var i=g.mediaelement;(new Date).getTime();var u={subtitles:1,captions:1,descriptions:1},m=Modernizr.ES5&&Modernizr.objectAccessor,p=function(a){var b={};a.addEventListener=function(a,f){b[a]&&g.error("always use $.bind to the shimed event: "+a+" already bound fn was: "+b[a]+" your fn was: "+f);b[a]=f};a.removeEventListener=function(a,f){b[a]&&b[a]!=f&&g.error("always use $.bind/$.unbind to the shimed event: "+a+" already bound fn was: "+b[a]+" your fn was: "+
-f);b[a]&&delete b[a]};return a},v={getCueById:function(a){for(var b=null,e=0,f=this.length;e<f;e++)if(this[e].id===a){b=this[e];break}return b}},w={shimActiveCues:null,_shimActiveCues:null,activeCues:null,cues:null,kind:"subtitles",label:"",language:"",mode:"disabled",readyState:0,oncuechange:null,toString:function(){return"[object TextTrack]"},addCue:function(a){if(this.cues){var b=this.cues[this.cues.length-1];b&&b.startTime>a.startTime&&g.error("cue startTime higher than previous cue's startTime")}else this.cues=
-i.createCueList();a.track&&a.track.removeCue&&a.track.removeCue(a);a.track=this;this.cues.push(a)},removeCue:function(a){var b=this.cues||[],e=0,f=b.length;if(a.track!=this)g.error("cue not part of track");else{for(;e<f;e++)if(b[e]===a){b.splice(e,1);a.track=null;break}a.track&&g.error("cue not part of track")}},DISABLED:"disabled",OFF:"disabled",HIDDEN:"hidden",SHOWING:"showing",ERROR:3,LOADED:2,LOADING:1,NONE:0},n=["kind","label","srclang"],o={srclang:"language"},x=Function.prototype.call.bind(Object.prototype.hasOwnProperty),
-l=function(a,b){var e=[],f=[],c=[],h,j;a||(a=g.data(this,"mediaelementBase")||g.data(this,"mediaelementBase",{}));if(!b)a.blockTrackListUpdate=!0,b=d.prop(this,"textTracks"),a.blockTrackListUpdate=!1;clearTimeout(a.updateTrackListTimer);d("track",this).each(function(){var a=d.prop(this,"track");c.push(a);-1==b.indexOf(a)&&f.push(a)});if(a.scriptedTextTracks)for(h=0,j=a.scriptedTextTracks.length;h<j;h++)c.push(a.scriptedTextTracks[h]),-1==b.indexOf(a.scriptedTextTracks[h])&&f.push(a.scriptedTextTracks[h]);
-for(h=0,j=b.length;h<j;h++)-1==c.indexOf(b[h])&&e.push(b[h]);if(e.length||f.length){b.splice(0);for(h=0,j=c.length;h<j;h++)b.push(c[h]);for(h=0,j=e.length;h<j;h++)d([b]).triggerHandler(d.Event({type:"removetrack",track:b,track:e[h]}));for(h=0,j=f.length;h<j;h++)d([b]).triggerHandler(d.Event({type:"addtrack",track:b,track:f[h]}));(a.scriptedTextTracks||e.length)&&d(this).triggerHandler("updatetrackdisplay")}},t=function(a,b){b||(b=g.data(a,"trackData"));if(b&&!b.isTriggering)b.isTriggering=!0,setTimeout(function(){(b.track||
-{}).readyState?d(a).closest("audio, video").triggerHandler("updatetrackdisplay"):d(a).triggerHandler("checktrackmode");b.isTriggering=!1},1)},q=d("<div />")[0];r.TextTrackCue=function(a,b,e){3!=arguments.length&&g.error("wrong arguments.length for TextTrackCue.constructor");this.startTime=a;this.endTime=b;this.text=e;this.id="";this.pauseOnExit=!1;p(this)};r.TextTrackCue.prototype={onenter:null,onexit:null,pauseOnExit:!1,getCueAsHTML:function(){var a="",b="",e=s.createDocumentFragment(),f;if(!x(this,
-"getCueAsHTML"))f=this.getCueAsHTML=function(){var c,h;if(a!=this.text){a=this.text;b=i.parseCueTextToHTML(a);q.innerHTML=b;for(c=0,h=q.childNodes.length;c<h;c++)e.appendChild(q.childNodes[c].cloneNode(!0))}return e.cloneNode(!0)};return f?f.apply(this,arguments):e.cloneNode(!0)},track:null,id:""};i.createCueList=function(){return d.extend([],v)};i.parseCueTextToHTML=function(){var a=/(<\/?[^>]+>)/ig,b=/^(?:c|v|ruby|rt|b|i|u)/,e=/\<\s*\//,f=function(b,a,c,f){e.test(f)?b="</"+b+">":(c.splice(0,1),
-b="<"+b+" "+a+'="'+c.join(" ").replace(/\"/g,""")+'">');return b},c=function(a){var c=a.replace(/[<\/>]+/ig,"").split(/[\s\.]+/);c[0]&&(c[0]=c[0].toLowerCase(),b.test(c[0])?"c"==c[0]?a=f("span","class",c,a):"v"==c[0]&&(a=f("q","title",c,a)):a="");return a};return function(b){return b.replace(a,c)}}();i.loadTextTrack=function(a,b,e,f){var c=e.track,h=function(){var e=d.prop(b,"src"),f,k;if("disabled"!=c.mode&&e&&d.attr(b,"src")&&(d(a).unbind("play playing timeupdate updatetrackdisplay",h),d(b).unbind("checktrackmode",
-h),!c.readyState)){f=function(){c.readyState=3;c.cues=null;c.activeCues=c.shimActiveCues=c._shimActiveCues=null;d(b).triggerHandler("error")};c.readyState=1;try{c.cues=i.createCueList(),c.activeCues=c.shimActiveCues=c._shimActiveCues=i.createCueList(),k=d.ajax({dataType:"text",url:e,success:function(e){"text/vtt"!=k.getResponseHeader("content-type")&&g.error("set the mime-type of your WebVTT files to text/vtt. see: http://dev.w3.org/html5/webvtt/#text/vtt");i.parseCaptions(e,c,function(e){e&&"length"in
-e?(c.readyState=2,d(b).triggerHandler("load"),d(a).triggerHandler("updatetrackdisplay")):f()})},error:f})}catch(l){f(),g.warn(l)}}};c.readyState=0;c.shimActiveCues=null;c._shimActiveCues=null;c.activeCues=null;c.cues=null;d(a).unbind("play playing timeupdate updatetrackdisplay",h);d(b).unbind("checktrackmode",h);d(a).bind("play playing timeupdate updatetrackdisplay",h);d(b).bind("checktrackmode",h);if(f)c.mode=u[c.kind]?"showing":"hidden",h()};i.createTextTrack=function(a,b){var e,f;if(b.nodeName&&
-(f=g.data(b,"trackData")))t(b,f),e=f.track;if(!e)e=p(g.objectCreate(w)),m||n.forEach(function(a){var f=d.prop(b,a);f&&(e[o[a]||a]=f)}),b.nodeName?(m&&n.forEach(function(a){g.defineProperty(e,o[a]||a,{get:function(){return d.prop(b,a)}})}),f=g.data(b,"trackData",{track:e}),i.loadTextTrack(a,b,f,d.prop(b,"default")&&d(b).siblings("track[default]").andSelf()[0]==b)):(m&&n.forEach(function(a){g.defineProperty(e,o[a]||a,{value:b[a],writeable:!1})}),e.cues=i.createCueList(),e.activeCues=e._shimActiveCues=
-e.shimActiveCues=i.createCueList(),e.mode="hidden",e.readyState=2);return e};i.parseCaptionChunk=function(){var a=/^(\d{2})?:?(\d{2}):(\d{2})\.(\d+)\s+\-\-\>\s+(\d{2})?:?(\d{2}):(\d{2})\.(\d+)\s*(.*)/,b=/^(DEFAULTS|DEFAULT)\s+\-\-\>\s+(.*)/g,e=/^(STYLE|STYLES)\s+\-\-\>\s*\n([\s\S]*)/g,f=/^(COMMENT|COMMENTS)\s+\-\-\>\s+(.*)/g;return function(c){var h,d,i,k;if(b.exec(c)||e.exec(c)||f.exec(c))return null;for(c=c.split(/\n/g);!c[0].replace(/\s+/ig,"").length&&0<c.length;)c.shift();for(c[0].match(/^\s*[a-z0-9-\_]+\s*$/ig)&&
-(i=""+c.shift().replace(/\s*/ig,""));0<c.length;){if(k=a.exec(c[0]))d=k.slice(1),h=parseInt(3600*(d[0]||0),10)+parseInt(60*(d[1]||0),10)+parseInt(d[2]||0,10)+parseFloat("0."+(d[3]||0)),d=parseInt(3600*(d[4]||0),10)+parseInt(60*(d[5]||0),10)+parseInt(d[6]||0,10)+parseFloat("0."+(d[7]||0));c=c.slice(0,0).concat(c.slice(1));break}if(!h&&!d)return g.warn("couldn't extract time information: "+[h,d,c.join("\n"),i].join(" ; ")),null;c=c.join("\n");h=new TextTrackCue(h,d,c);if(i)h.id=i;return h}}();i.parseCaptions=
-function(a,b,e){i.createCueList();var f,c,d,j,l;a?(d=/^WEBVTT(\s*FILE)?/ig,c=function(k,m){for(;k<m;k++){f=a[k];if(d.test(f))l=!0;else if(f.replace(/\s*/ig,"").length){if(!l){g.error("please use WebVTT format. This is the standard");e(null);break}(f=i.parseCaptionChunk(f,k))&&b.addCue(f)}if(j<(new Date).getTime()-30){k++;setTimeout(function(){j=(new Date).getTime();c(k,m)},90);break}}k>=m&&(l||g.error("please use WebVTT format. This is the standard"),e(b.cues))},a=a.replace(/\r\n/g,"\n"),setTimeout(function(){a=
-a.replace(/\r/g,"\n");setTimeout(function(){j=(new Date).getTime();a=a.split(/\n\n+/g);c(0,a.length)},9)},9)):g.error("Required parameter captionData not supplied.")};i.createTrackList=function(a,b){b=b||g.data(a,"mediaelementBase")||g.data(a,"mediaelementBase",{});if(!b.textTracks)b.textTracks=[],g.defineProperties(b.textTracks,{onaddtrack:{value:null},onremovetrack:{value:null}}),p(b.textTracks);return b.textTracks};Modernizr.track||(g.defineNodeNamesBooleanProperty(["track"],"default"),g.reflectProperties(["track"],
-["srclang","label"]),g.defineNodeNameProperties("track",{src:{reflect:!0,propType:"src"}}));g.defineNodeNameProperties("track",{kind:{attr:Modernizr.track?{set:function(a){var b=g.data(this,"trackData");this.setAttribute("data-kind",a);if(b)b.attrKind=a},get:function(){var a=g.data(this,"trackData");return a&&"attrKind"in a?a.attrKind:this.getAttribute("kind")}}:{},reflect:!0,propType:"enumarated",defaultValue:"subtitles",limitedTo:["subtitles","captions","descriptions","chapters","metadata"]}});
-d.each(n,function(a,b){var e=o[b]||b;g.onNodeNamesPropertyModify("track",b,function(){var a=g.data(this,"trackData"),c=this;if(a)"kind"==b&&t(this,a),m||(a.track[e]=d.prop(this,b)),clearTimeout(a.changedTrackPropTimer),a.changedTrackPropTimer=setTimeout(function(){d(c).trigger("updatesubtitlestate")},1)})});g.onNodeNamesPropertyModify("track","src",function(a){if(a){var a=g.data(this,"trackData"),b;a&&(b=d(this).closest("video, audio"),b[0]&&i.loadTextTrack(b,this,a))}});g.defineNodeNamesProperties(["track"],
-{ERROR:{value:3},LOADED:{value:2},LOADING:{value:1},NONE:{value:0},readyState:{get:function(){return(d.prop(this,"track")||{readyState:0}).readyState},writeable:!1},track:{get:function(){return i.createTextTrack(d(this).closest("audio, video")[0],this)},writeable:!1}},"prop");g.defineNodeNamesProperties(["audio","video"],{textTracks:{get:function(){var a=g.data(this,"mediaelementBase")||g.data(this,"mediaelementBase",{}),b=i.createTrackList(this,a);a.blockTrackListUpdate||l.call(this,a,b);return b},
-writeable:!1},addTextTrack:{value:function(a,b,d){a=i.createTextTrack(this,{kind:a||"",label:b||"",srclang:d||""});b=g.data(this,"mediaelementBase")||g.data(this,"mediaelementBase",{});if(!b.scriptedTextTracks)b.scriptedTextTracks=[];b.scriptedTextTracks.push(a);l.call(this);return a}}},"prop");d(s).bind("emptied ended updatetracklist",function(a){if(d(a.target).is("audio, video")){var b=g.data(a.target,"mediaelementBase");if(b)clearTimeout(b.updateTrackListTimer),b.updateTrackListTimer=setTimeout(function(){l.call(a.target,
-b)},0)}});g.addReady(function(a,b){var e=b.filter("video, audio, track").closest("audio, video");d("video, audio",a).add(e).each(function(){l.call(this)}).each(function(){if(Modernizr.track){var a=this.textTracks;d.prop(this,"textTracks").length!=a.length&&g.error("textTracks couldn't be copied");d("track",this).each(function(){var a=d.prop(this,"track"),b=this.track,e,f;if(b){e=d.prop(this,"kind");f=b.readyState||this.readyState;if(b.mode||f)a.mode=b.mode;if("descriptions"!=e)b.mode="string"==typeof b.mode?
-"disabled":0,this.kind="metadata",d(this).attr({kind:e})}}).bind("load error",function(a){a.originalEvent&&a.stopImmediatePropagation()})}});e.each(function(){var a=this,b=g.data(a,"mediaelementBase");if(b)clearTimeout(b.updateTrackListTimer),b.updateTrackListTimer=setTimeout(function(){l.call(a,b)},9)})});Modernizr.track&&d("video, audio").trigger("trackapichange")});
+jQuery.webshims.register("track",function(d,h,r,s){var i=h.mediaelement;(new Date).getTime();var u={subtitles:1,captions:1,descriptions:1},v=d("<track />"),m=Modernizr.ES5&&Modernizr.objectAccessor,p=function(a){var b={};a.addEventListener=function(a,g){b[a]&&h.error("always use $.on to the shimed event: "+a+" already bound fn was: "+b[a]+" your fn was: "+g);b[a]=g};a.removeEventListener=function(a,g){b[a]&&b[a]!=g&&h.error("always use $.on/$.off to the shimed event: "+a+" already bound fn was: "+
+b[a]+" your fn was: "+g);b[a]&&delete b[a]};return a},w={getCueById:function(a){for(var b=null,e=0,g=this.length;e<g;e++)if(this[e].id===a){b=this[e];break}return b}},x={"0":"disabled",1:"hidden",2:"showing"},y={shimActiveCues:null,_shimActiveCues:null,activeCues:null,cues:null,kind:"subtitles",label:"",language:"",mode:"disabled",readyState:0,oncuechange:null,toString:function(){return"[object TextTrack]"},addCue:function(a){if(this.cues){var b=this.cues[this.cues.length-1];b&&b.startTime>a.startTime&&
+h.error("cue startTime higher than previous cue's startTime")}else this.cues=i.createCueList();a.track&&a.track.removeCue&&a.track.removeCue(a);a.track=this;this.cues.push(a)},removeCue:function(a){var b=this.cues||[],e=0,g=b.length;if(a.track!=this)h.error("cue not part of track");else{for(;e<g;e++)if(b[e]===a){b.splice(e,1);a.track=null;break}a.track&&h.error("cue not part of track")}},DISABLED:"disabled",OFF:"disabled",HIDDEN:"hidden",SHOWING:"showing",ERROR:3,LOADED:2,LOADING:1,NONE:0},n=["kind",
+"label","srclang"],o={srclang:"language"},z=Function.prototype.call.bind(Object.prototype.hasOwnProperty),l=function(a,b){var e=[],g=[],c=[],f,j;a||(a=h.data(this,"mediaelementBase")||h.data(this,"mediaelementBase",{}));if(!b)a.blockTrackListUpdate=!0,b=d.prop(this,"textTracks"),a.blockTrackListUpdate=!1;clearTimeout(a.updateTrackListTimer);d("track",this).each(function(){var a=d.prop(this,"track");c.push(a);-1==b.indexOf(a)&&g.push(a)});if(a.scriptedTextTracks)for(f=0,j=a.scriptedTextTracks.length;f<
+j;f++)c.push(a.scriptedTextTracks[f]),-1==b.indexOf(a.scriptedTextTracks[f])&&g.push(a.scriptedTextTracks[f]);for(f=0,j=b.length;f<j;f++)-1==c.indexOf(b[f])&&e.push(b[f]);if(e.length||g.length){b.splice(0);for(f=0,j=c.length;f<j;f++)b.push(c[f]);for(f=0,j=e.length;f<j;f++)d([b]).triggerHandler(d.Event({type:"removetrack",track:e[f]}));for(f=0,j=g.length;f<j;f++)d([b]).triggerHandler(d.Event({type:"addtrack",track:g[f]}));(a.scriptedTextTracks||e.length)&&d(this).triggerHandler("updatetrackdisplay")}},
+t=function(a,b){b||(b=h.data(a,"trackData"));if(b&&!b.isTriggering)b.isTriggering=!0,setTimeout(function(){(b.track||{}).readyState?d(a).closest("audio, video").triggerHandler("updatetrackdisplay"):d(a).triggerHandler("checktrackmode");b.isTriggering=!1},1)},q=d("<div />")[0];r.TextTrackCue=function(a,b,e){3!=arguments.length&&h.error("wrong arguments.length for TextTrackCue.constructor");this.startTime=a;this.endTime=b;this.text=e;this.id="";this.pauseOnExit=!1;p(this)};r.TextTrackCue.prototype=
+{onenter:null,onexit:null,pauseOnExit:!1,getCueAsHTML:function(){var a="",b="",e=s.createDocumentFragment(),g;if(!z(this,"getCueAsHTML"))g=this.getCueAsHTML=function(){var c,f;if(a!=this.text){a=this.text;b=i.parseCueTextToHTML(a);q.innerHTML=b;for(c=0,f=q.childNodes.length;c<f;c++)e.appendChild(q.childNodes[c].cloneNode(!0))}return e.cloneNode(!0)};return g?g.apply(this,arguments):e.cloneNode(!0)},track:null,id:""};i.createCueList=function(){return d.extend([],w)};i.parseCueTextToHTML=function(){var a=
+/(<\/?[^>]+>)/ig,b=/^(?:c|v|ruby|rt|b|i|u)/,e=/\<\s*\//,g=function(a,b,c,g){e.test(g)?a="</"+a+">":(c.splice(0,1),a="<"+a+" "+b+'="'+c.join(" ").replace(/\"/g,""")+'">');return a},c=function(a){var c=a.replace(/[<\/>]+/ig,"").split(/[\s\.]+/);c[0]&&(c[0]=c[0].toLowerCase(),b.test(c[0])?"c"==c[0]?a=g("span","class",c,a):"v"==c[0]&&(a=g("q","title",c,a)):a="");return a};return function(b){return b.replace(a,c)}}();i.loadTextTrack=function(a,b,e,g){var c=e.track,f=function(){var e=d.prop(b,"src"),
+g,k;if("disabled"!=c.mode&&e&&d.attr(b,"src")&&(d(a).unbind("play playing timeupdate updatetrackdisplay",f),d(b).unbind("checktrackmode",f),!c.readyState)){g=function(){c.readyState=3;c.cues=null;c.activeCues=c.shimActiveCues=c._shimActiveCues=null;d(b).triggerHandler("error")};c.readyState=1;try{c.cues=i.createCueList(),c.activeCues=c.shimActiveCues=c._shimActiveCues=i.createCueList(),k=d.ajax({dataType:"text",url:e,success:function(f){"text/vtt"!=k.getResponseHeader("content-type")&&h.error("set the mime-type of your WebVTT files to text/vtt. see: http://dev.w3.org/html5/webvtt/#text/vtt");
+i.parseCaptions(f,c,function(f){f&&"length"in f?(c.readyState=2,d(b).triggerHandler("load"),d(a).triggerHandler("updatetrackdisplay")):g()})},error:g})}catch(l){g(),h.warn(l)}}};c.readyState=0;c.shimActiveCues=null;c._shimActiveCues=null;c.activeCues=null;c.cues=null;d(a).unbind("play playing timeupdate updatetrackdisplay",f);d(b).unbind("checktrackmode",f);d(a).on("play playing timeupdate updatetrackdisplay",f);d(b).on("checktrackmode",f);if(g)c.mode=u[c.kind]?"showing":"hidden",f()};i.createTextTrack=
+function(a,b){var e,g;if(b.nodeName&&(g=h.data(b,"trackData")))t(b,g),e=g.track;if(!e)e=p(h.objectCreate(y)),m||n.forEach(function(a){var f=d.prop(b,a);f&&(e[o[a]||a]=f)}),b.nodeName?(m&&n.forEach(function(a){h.defineProperty(e,o[a]||a,{get:function(){return d.prop(b,a)}})}),g=h.data(b,"trackData",{track:e}),i.loadTextTrack(a,b,g,d.prop(b,"default")&&d(b).siblings("track[default]").andSelf()[0]==b)):(m&&n.forEach(function(a){h.defineProperty(e,o[a]||a,{value:b[a],writeable:!1})}),e.cues=i.createCueList(),
+e.activeCues=e._shimActiveCues=e.shimActiveCues=i.createCueList(),e.mode="hidden",e.readyState=2);return e};i.parseCaptionChunk=function(){var a=/^(\d{2})?:?(\d{2}):(\d{2})\.(\d+)\s+\-\-\>\s+(\d{2})?:?(\d{2}):(\d{2})\.(\d+)\s*(.*)/,b=/^(DEFAULTS|DEFAULT)\s+\-\-\>\s+(.*)/g,e=/^(STYLE|STYLES)\s+\-\-\>\s*\n([\s\S]*)/g,g=/^(COMMENT|COMMENTS)\s+\-\-\>\s+(.*)/g;return function(c){var f,d,i,k;if(b.exec(c)||e.exec(c)||g.exec(c))return null;for(c=c.split(/\n/g);!c[0].replace(/\s+/ig,"").length&&0<c.length;)c.shift();
+for(c[0].match(/^\s*[a-z0-9-\_]+\s*$/ig)&&(i=""+c.shift().replace(/\s*/ig,""));0<c.length;){if(k=a.exec(c[0]))d=k.slice(1),f=parseInt(3600*(d[0]||0),10)+parseInt(60*(d[1]||0),10)+parseInt(d[2]||0,10)+parseFloat("0."+(d[3]||0)),d=parseInt(3600*(d[4]||0),10)+parseInt(60*(d[5]||0),10)+parseInt(d[6]||0,10)+parseFloat("0."+(d[7]||0));c=c.slice(0,0).concat(c.slice(1));break}if(!f&&!d)return h.warn("couldn't extract time information: "+[f,d,c.join("\n"),i].join(" ; ")),null;c=c.join("\n");f=new TextTrackCue(f,
+d,c);if(i)f.id=i;return f}}();i.parseCaptions=function(a,b,d){i.createCueList();var g,c,f,j,l;a?(f=/^WEBVTT(\s*FILE)?/ig,c=function(k,m){for(;k<m;k++){g=a[k];if(f.test(g))l=!0;else if(g.replace(/\s*/ig,"").length){if(!l){h.error("please use WebVTT format. This is the standard");d(null);break}(g=i.parseCaptionChunk(g,k))&&b.addCue(g)}if(j<(new Date).getTime()-30){k++;setTimeout(function(){j=(new Date).getTime();c(k,m)},90);break}}k>=m&&(l||h.error("please use WebVTT format. This is the standard"),
+d(b.cues))},a=a.replace(/\r\n/g,"\n"),setTimeout(function(){a=a.replace(/\r/g,"\n");setTimeout(function(){j=(new Date).getTime();a=a.split(/\n\n+/g);c(0,a.length)},9)},9)):h.error("Required parameter captionData not supplied.")};i.createTrackList=function(a,b){b=b||h.data(a,"mediaelementBase")||h.data(a,"mediaelementBase",{});if(!b.textTracks)b.textTracks=[],h.defineProperties(b.textTracks,{onaddtrack:{value:null},onremovetrack:{value:null}}),p(b.textTracks);return b.textTracks};Modernizr.track||
+(h.defineNodeNamesBooleanProperty(["track"],"default"),h.reflectProperties(["track"],["srclang","label"]),h.defineNodeNameProperties("track",{src:{reflect:!0,propType:"src"}}));h.defineNodeNameProperties("track",{kind:{attr:Modernizr.track?{set:function(a){var b=h.data(this,"trackData");this.setAttribute("data-kind",a);if(b)b.attrKind=a},get:function(){var a=h.data(this,"trackData");return a&&"attrKind"in a?a.attrKind:this.getAttribute("kind")}}:{},reflect:!0,propType:"enumarated",defaultValue:"subtitles",
+limitedTo:["subtitles","captions","descriptions","chapters","metadata"]}});d.each(n,function(a,b){var e=o[b]||b;h.onNodeNamesPropertyModify("track",b,function(){var a=h.data(this,"trackData"),c=this;if(a)"kind"==b&&t(this,a),m||(a.track[e]=d.prop(this,b)),clearTimeout(a.changedTrackPropTimer),a.changedTrackPropTimer=setTimeout(function(){d(c).trigger("updatesubtitlestate")},1)})});h.onNodeNamesPropertyModify("track","src",function(a){if(a){var a=h.data(this,"trackData"),b;a&&(b=d(this).closest("video, audio"),
+b[0]&&i.loadTextTrack(b,this,a))}});h.defineNodeNamesProperties(["track"],{ERROR:{value:3},LOADED:{value:2},LOADING:{value:1},NONE:{value:0},readyState:{get:function(){return(d.prop(this,"track")||{readyState:0}).readyState},writeable:!1},track:{get:function(){return i.createTextTrack(d(this).closest("audio, video")[0],this)},writeable:!1}},"prop");h.defineNodeNamesProperties(["audio","video"],{textTracks:{get:function(){var a=h.data(this,"mediaelementBase")||h.data(this,"mediaelementBase",{}),b=
+i.createTrackList(this,a);a.blockTrackListUpdate||l.call(this,a,b);return b},writeable:!1},addTextTrack:{value:function(a,b,d){a=i.createTextTrack(this,{kind:v.prop("kind",a||"").prop("kind"),label:b||"",srclang:d||""});b=h.data(this,"mediaelementBase")||h.data(this,"mediaelementBase",{});if(!b.scriptedTextTracks)b.scriptedTextTracks=[];b.scriptedTextTracks.push(a);l.call(this);return a}}},"prop");d(s).on("emptied ended updatetracklist",function(a){if(d(a.target).is("audio, video")){var b=h.data(a.target,
+"mediaelementBase");if(b)clearTimeout(b.updateTrackListTimer),b.updateTrackListTimer=setTimeout(function(){l.call(a.target,b)},0)}});h.addReady(function(a,b){var e=b.filter("video, audio, track").closest("audio, video");d("video, audio",a).add(e).each(function(){l.call(this)}).each(function(){if(Modernizr.track){var a=this.textTracks;d.prop(this,"textTracks").length!=a.length&&h.error("textTracks couldn't be copied");d("track",this).each(function(){var a=d.prop(this,"track"),b=this.track,e,g;if(b){e=
+d.prop(this,"kind");g=b.readyState||this.readyState;if(b.mode||g)a.mode=x[b.mode]||b.mode;if("descriptions"!=e)b.mode="string"==typeof b.mode?"disabled":0,this.kind="metadata",d(this).attr({kind:e})}}).on("load error",function(a){a.originalEvent&&a.stopImmediatePropagation()})}});e.each(function(){var a=this,b=h.data(a,"mediaelementBase");if(b)clearTimeout(b.updateTrackListTimer),b.updateTrackListTimer=setTimeout(function(){l.call(a,b)},9)})});Modernizr.track&&d("video, audio").trigger("trackapichange")});