You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
181 KiB
6 lines
181 KiB
2 years ago
|
!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.videojs=b()}(this,function(){function a(a,b){return b={exports:{}},a(b,b.exports),b.exports}function b(a,b){Pb(a).forEach(function(c){return b(a[c],c)})}function c(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Pb(a).reduce(function(c,d){return b(c,a[d],d)},c)}function d(a){for(var c=arguments.length,d=Array(c>1?c-1:0),e=1;e<c;e++)d[e-1]=arguments[e];return Object.assign?Object.assign.apply(Object,[a].concat(d)):(d.forEach(function(c){c&&b(c,function(b,c){a[c]=b})}),a)}function e(a){return!!a&&"object"===("undefined"==typeof a?"undefined":Jb(a))}function f(a){return e(a)&&"[object Object]"===Ob.call(a)&&a.constructor===Object}function g(a){return a.replace(/\n\r?\s*/g,"")}function h(a,b){if(!a||!b)return"";if("function"==typeof gb.getComputedStyle){var c=gb.getComputedStyle(a);return c?c[b]:""}return a.currentStyle[b]||""}function i(a){return"string"==typeof a&&/\S/.test(a)}function j(a){if(/\s/.test(a))throw new Error("class has illegal whitespace characters")}function k(a){return new RegExp("(^|\\s)"+a+"($|\\s)")}function l(){return lb===gb.document&&"undefined"!=typeof lb.createElement}function m(a){return e(a)&&1===a.nodeType}function n(){try{return gb.parent!==gb.self}catch(a){return!0}}function o(a){return function(b,c){if(!i(b))return lb[a](null);i(c)&&(c=lb.querySelector(c));var d=m(c)?c:lb;return d[a]&&d[a](b)}}function p(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},d=arguments[3],e=lb.createElement(a);return Object.getOwnPropertyNames(b).forEach(function(a){var c=b[a];a.indexOf("aria-")!==-1||"role"===a||"type"===a?(Ub.warn(Vb(Wb,a,c)),e.setAttribute(a,c)):"textContent"===a?q(e,c):e[a]=c}),Object.getOwnPropertyNames(c).forEach(function(a){e.setAttribute(a,c[a])}),d&&J(e,d),e}function q(a,b){return"undefined"==typeof a.textContent?a.innerText=b:a.textContent=b,a}function r(a,b){b.firstChild?b.insertBefore(a,b.firstChild):b.appendChild(a)}function s(a,b){return j(b),a.classList?a.classList.contains(b):k(b).test(a.className)}function t(a,b){return a.classList?a.classList.add(b):s(a,b)||(a.className=(a.className+" "+b).trim()),a}function u(a,b){return a.classList?a.classList.remove(b):(j(b),a.className=a.className.split(/\s+/).filter(function(a){return a!==b}).join(" ")),a}function v(a,b,c){var d=s(a,b);if("function"==typeof c&&(c=c(a,b)),"boolean"!=typeof c&&(c=!d),c!==d)return c?t(a,b):u(a,b),a}function w(a,b){Object.getOwnPropertyNames(b).forEach(function(c){var d=b[c];null===d||"undefined"==typeof d||d===!1?a.removeAttribute(c):a.setAttribute(c,d===!0?"":d)})}function x(a){var b={},c=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(a&&a.attributes&&a.attributes.length>0)for(var d=a.attributes,e=d.length-1;e>=0;e--){var f=d[e].name,g=d[e].value;"boolean"!=typeof a[f]&&c.indexOf(","+f+",")===-1||(g=null!==g),b[f]=g}return b}function y(a,b){return a.getAttribute(b)}function z(a,b,c){a.setAttribute(b,c)}function A(a,b){a.removeAttribute(b)}function B(){lb.body.focus(),lb.onselectstart=function(){return!1}}function C(){lb.onselectstart=function(){return!0}}function D(a){if(a&&a.getBoundingClientRect&&a.parentNode){var b=a.getBoundingClientRect(),c={};return["bottom","height","left","right","top","width"].forEach(function(a){void 0!==b[a]&&(c[a]=b[a])}),c.height||(c.height=parseFloat(h(a,"height"))),c.width||(c.width=parseFloat(h(a,"width"))),c}}function E(a){var b=void 0;if(a.getBoundingClientRect&&a.parentNode&&(b=a.getBoundingClientRect()),!b)return{left:0,top:0};var c=lb.documentElement,d=lb.body,e=c.clientLeft||d.clientLeft||0,f=gb.pageXOffset||d.scrollLeft,g=b.left+f-e,h=c.clientTop||d.clientTop||0,i=gb.pageYOffset||d.scrollTop,j=b.top+i-h;return{left:Math.round(g),top:Math.round(j)}}function F(a,b){var c={},d=E(a),e=a.offsetWidth,f=a.offsetHeight,g=d.top,h=d.left,i=b.pageY,j=b.pageX;ret
|
||
|
if(l()){var a=lb.getElementsByTagName("video"),b=lb.getElementsByTagName("audio"),c=[];if(a&&a.length>0)for(var d=0,e=a.length;d<e;d++)c.push(a[d]);if(b&&b.length>0)for(var f=0,g=b.length;f<g;f++)c.push(b[f]);if(c&&c.length>0)for(var h=0,i=c.length;h<i;h++){var j=c[h];if(!j||!j.getAttribute){W(1);break}if(void 0===j.player){var k=j.getAttribute("data-setup");null!==k&&fc(j)}}else ec||W(1)}};l()&&"complete"===lb.readyState?ec=!0:V(gb,"load",function(){ec=!0});var hc=function(a){var b=lb.createElement("style");return b.className=a,b},ic=function(a,b){a.styleSheet?a.styleSheet.cssText=b:a.textContent=b},jc=function(a,b,c){b.guid||(b.guid=L());var d=function(){return b.apply(a,arguments)};return d.guid=c?c+"_"+b.guid:b.guid,d},kc=function(a,b){var c=Date.now(),d=function(){var d=Date.now();d-c>=b&&(a.apply(void 0,arguments),c=d)};return d},lc=function(){};lc.prototype.allowedEvents_={},lc.prototype.on=function(a,b){var c=this.addEventListener;this.addEventListener=function(){},S(this,a,b),this.addEventListener=c},lc.prototype.addEventListener=lc.prototype.on,lc.prototype.off=function(a,b){T(this,a,b)},lc.prototype.removeEventListener=lc.prototype.off,lc.prototype.one=function(a,b){var c=this.addEventListener;this.addEventListener=function(){},V(this,a,b),this.addEventListener=c},lc.prototype.trigger=function(a){var b=a.type||a;"string"==typeof a&&(a={type:b}),a=R(a),this.allowedEvents_[b]&&this["on"+b]&&this["on"+b](a),U(this,a)},lc.prototype.dispatchEvent=lc.prototype.trigger;var mc=function(a){return a instanceof lc||!!a.eventBusEl_&&["on","one","off","trigger"].every(function(b){return"function"==typeof a[b]})},nc=function(a){return"string"==typeof a&&/\S/.test(a)||Array.isArray(a)&&!!a.length},oc=function(a){if(!a.nodeName&&!mc(a))throw new Error("Invalid target; must be a DOM node or evented object.")},pc=function(a){if(!nc(a))throw new Error("Invalid event type; must be a non-empty string or array.")},qc=function(a){if("function"!=typeof a)throw new Error("Invalid listener; must be a function.")},rc=function(a,b){var c=b.length<3||b[0]===a||b[0]===a.eventBusEl_,d=void 0,e=void 0,f=void 0;return c?(d=a.eventBusEl_,b.length>=3&&b.shift(),e=b[0],f=b[1]):(d=b[0],e=b[1],f=b[2]),oc(d),pc(e),qc(f),f=jc(a,f),{isTargetingSelf:c,target:d,type:e,listener:f}},sc=function(a,b,c,d){oc(a),a.nodeName?dc[b](a,c,d):a[b](c,d)},tc={on:function(){for(var a=this,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];var e=rc(this,c),f=e.isTargetingSelf,g=e.target,h=e.type,i=e.listener;if(sc(g,"on",h,i),!f){var j=function(){return a.off(g,h,i)};j.guid=i.guid;var k=function(){return a.off("dispose",j)};k.guid=i.guid,sc(this,"on","dispose",j),sc(g,"on","dispose",k)}},one:function(){for(var a=this,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];var e=rc(this,c),f=e.isTargetingSelf,g=e.target,h=e.type,i=e.listener;if(f)sc(g,"one",h,i);else{var j=function k(){for(var b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];a.off(g,h,k),i.apply(null,c)};j.guid=i.guid,sc(g,"one",h,j)}},off:function(a,b,c){if(!a||nc(a))T(this.eventBusEl_,a,b);else{var d=a,e=b;oc(d),pc(e),qc(c),c=jc(this,c),this.off("dispose",c),d.nodeName?(T(d,e,c),T(d,"dispose",c)):mc(d)&&(d.off(e,c),d.off("dispose",c))}},trigger:function(a,b){return U(this.eventBusEl_,a,b)}},uc={state:{},setState:function(a){var c=this;"function"==typeof a&&(a=a());var d=void 0;return b(a,function(a,b){c.state[b]!==a&&(d=d||{},d[b]={from:c.state[b],to:a}),c.state[b]=a}),d&&mc(this)&&this.trigger({changes:d,type:"statechanged"}),d}},vc=function(){function a(b,c,d){if(Kb(this,a),!b&&this.play?this.player_=b=this:this.player_=b,this.options_=_({},this.options_),c=this.options_=_(this.options_,c),this.id_=c.id||c.el&&c.el.id,!this.id_){var e=b&&b.id&&b.id()||"no_player";this.id_=e+"_component_"+L()}this.name_=c.name||null,c.el?this.el_=c.el:c.createEl!==!1&&(this.el_=this.createEl()),X(this,{eventBusKey:this.el_?"el_":null}),Y(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},c.initChildren!==!1&&this.initChildren(),this.ready(d),c.r
|
||
|
}}),f.selected&&(g.selected=f.selected),d=g,Mb(c,d)}return Lb(b,a),b}(Yc),sd=0,td=1,ud=2,vd=3,wd=function(a){function b(){var c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Kb(this,b);var d=Mb(this,a.call(this)),e=void 0,f=d;if(Cb){f=lb.createElement("custom");for(var g in b.prototype)"constructor"!==g&&(f[g]=b.prototype[g])}var h=new pd(c);if(f.kind=h.kind,f.src=h.src,f.srclang=h.language,f.label=h.label,f["default"]=h["default"],Object.defineProperty(f,"readyState",{get:function(){return e}}),Object.defineProperty(f,"track",{get:function(){return h}}),e=sd,h.addEventListener("loadeddata",function(){e=ud,f.trigger({type:"load",target:f})}),Cb){var i;return i=f,Mb(d,i)}return d}return Lb(b,a),b}(lc);wd.prototype.allowedEvents_={load:"load"},wd.NONE=sd,wd.LOADING=td,wd.LOADED=ud,wd.ERROR=vd;var xd={audio:{ListClass:Oc,TrackClass:qd,capitalName:"Audio"},video:{ListClass:Qc,TrackClass:rd,capitalName:"Video"},text:{ListClass:Rc,TrackClass:pd,capitalName:"Text"}};Object.keys(xd).forEach(function(a){xd[a].getterName=a+"Tracks",xd[a].privateName=a+"Tracks_"});var yd={remoteText:{ListClass:Rc,TrackClass:pd,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Sc,TrackClass:wd,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},zd=_(xd,yd);yd.names=Object.keys(yd),xd.names=Object.keys(xd),zd.names=[].concat(yd.names).concat(xd.names);var Ad=Object.create||function(){function a(){}return function(b){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return a.prototype=b,new a}}();ua.prototype=Ad(Error.prototype),ua.prototype.constructor=ua,ua.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},wa.prototype={set:function(a,b){this.get(a)||""===b||(this.values[a]=b)},get:function(a,b,c){return c?this.has(a)?this.values[a]:b[c]:this.has(a)?this.values[a]:b},has:function(a){return a in this.values},alt:function(a,b,c){for(var d=0;d<c.length;++d)if(b===c[d]){this.set(a,b);break}},integer:function(a,b){/^-?\d+$/.test(b)&&this.set(a,parseInt(b,10))},percent:function(a,b){var c;return!!((c=b.match(/^([\d]{1,3})(\.[\d]*)?%$/))&&(b=parseFloat(b),b>=0&&b<=100))&&(this.set(a,b),!0)}};var Bd={"&":"&","<":"<",">":">","‎":"","‏":""," ":" "},Cd={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Dd={v:"title",lang:"lang"},Ed={rt:"ruby"},Fd=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];Da.prototype.applyStyles=function(a,b){b=b||this.div;for(var c in a)a.hasOwnProperty(c)
|
||
|
var he=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.on(c,"ended",e.handleEnded),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-current-time"},b.prototype.updateContent=function(a){var b=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(b)},b.prototype.handleEnded=function(a){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},b}(ge);he.prototype.controlText_="Current Time",vc.registerComponent("CurrentTimeDisplay",he);var ie=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.on(c,["durationchange","loadedmetadata"],e.throttledUpdateContent),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-duration"},b.prototype.updateContent=function(a){var b=this.player_.duration();b&&this.duration_!==b&&(this.duration_=b,this.updateFormattedTime_(b))},b}(ge);ie.prototype.controlText_="Duration Time",vc.registerComponent("DurationDisplay",ie);var je=function(a){function b(){return Kb(this,b),Mb(this,a.apply(this,arguments))}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},b}(vc);vc.registerComponent("TimeDivider",je);var ke=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.on(c,"durationchange",e.throttledUpdateContent),e.on(c,"ended",e.handleEnded),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-remaining-time"},b.prototype.formatTime_=function(b){return"-"+a.prototype.formatTime_.call(this,b)},b.prototype.updateContent=function(a){this.player_.duration()&&this.updateFormattedTime_(this.player_.remainingTimeDisplay())},b.prototype.handleEnded=function(a){this.player_.duration()&&this.updateFormattedTime_(0)},b}(ge);ke.prototype.controlText_="Remaining Time",vc.registerComponent("RemainingTimeDisplay",ke);var le=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.updateShowing(),e.on(e.player(),"durationchange",e.updateShowing),e}return Lb(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=p("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+"</span>"+this.localize("LIVE")},{"aria-live":"off"}),b.appendChild(this.contentEl_),b},b.prototype.updateShowing=function(a){this.player().duration()===1/0?this.show():this.hide()},b}(vc);vc.registerComponent("LiveDisplay",le);var me=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.bar=e.getChild(e.options_.barName),e.vertical(!!e.options_.vertical),e.on("mousedown",e.handleMouseDown),e.on("touchstart",e.handleMouseDown),e.on("focus",e.handleFocus),e.on("blur",e.handleBlur),e.on("click",e.handleClick),e.on(c,"controlsvisible",e.update),e.playerEvent&&e.on(c,e.playerEvent,e.update),e}return Lb(b,a),b.prototype.createEl=function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return c.className=c.className+" vjs-slider",c=d({tabIndex:0},c),e=d({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},e),a.prototype.createEl.call(this,b,c,e)},b.prototype.handleMouseDown=function(a){var b=this.bar.el_.ownerDocument;a.preventDefault(),B(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(b,"mousemove",this.handleMouseMove),this.on(b,"mouseup",this.handleMouseUp),this.on(b,"touchmove",this.handleMouseMove),this.on(b,"touchend",this.handleMouseUp),this.handleMouseMove(a)},b.prototype.handleMouseMove=function(a){},b.prototype.handleMouseUp=function(){var a=this.bar.el_.ownerDocument;C(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(a,"mousemove",this.handleMouseMove),this.off(a,"mouseup",this.handleMouseUp),this.off(a,"touchmove",this.handleMouseMove),this.off(a,"touchend",this.handleMouseUp),thi
|
||
|
"captions"===this.options_.track.kind&&(f+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),f+="</span>";var g=a.prototype.createEl.call(this,b,d({innerHTML:f},c),e);return g},b}(Fe);vc.registerComponent("SubsCapsMenuItem",Oe);var Pe=function(a){function b(c){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(e.player_.language_)>-1&&(e.label_="captions"),e.menuButton_.controlText(Z(e.label_)),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+a.prototype.buildCSSClass.call(this)},b.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+a.prototype.buildWrapperCSSClass.call(this)},b.prototype.createItems=function(){var b=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||(b.push(new Me(this.player_,{kind:this.label_})),this.hideThreshold_+=1),b=a.prototype.createItems.call(this,b,Oe)},b}(He);Pe.prototype.kinds_=["captions","subtitles"],Pe.prototype.controlText_="Subtitles",vc.registerComponent("SubsCapsButton",Pe);var Qe=function(a){function b(c,d){Kb(this,b);var e=d.track,f=c.audioTracks();d.label=e.label||e.language||"Unknown",d.selected=e.enabled;var g=Mb(this,a.call(this,c,d));g.track=e;var h=jc(g,g.handleTracksChange);return f.addEventListener("change",h),g.on("dispose",function(){f.removeEventListener("change",h)}),g}return Lb(b,a),b.prototype.handleClick=function(b){var c=this.player_.audioTracks();a.prototype.handleClick.call(this,b);for(var d=0;d<c.length;d++){var e=c[d];e.enabled=e===this.track}},b.prototype.handleTracksChange=function(a){this.selected(this.track.enabled)},b}(Ee);vc.registerComponent("AudioTrackMenuItem",Qe);var Re=function(a){function b(c){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Kb(this,b),d.tracks=c.audioTracks(),Mb(this,a.call(this,c,d))}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-audio-button "+a.prototype.buildCSSClass.call(this)},b.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+a.prototype.buildWrapperCSSClass.call(this)},b.prototype.createItems=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;for(var b=this.player_.audioTracks(),c=0;c<b.length;c++){var d=b[c];a.push(new Qe(this.player_,{track:d,selectable:!0}))}return a},b}(De);Re.prototype.controlText_="Audio Track",vc.registerComponent("AudioTrackButton",Re);var Se=function(a){function b(c,d){Kb(this,b);var e=d.rate,f=parseFloat(e,10);d.label=e,d.selected=1===f,d.selectable=!0;var g=Mb(this,a.call(this,c,d));return g.label=e,g.rate=f,g.on(c,"ratechange",g.update),g}return Lb(b,a),b.prototype.handleClick=function(b){a.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},b.prototype.update=function(a){this.selected(this.player().playbackRate()===this.rate)},b}(Ee);Se.prototype.contentElType="button",vc.registerComponent("PlaybackRateMenuItem",Se);var Te=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.updateVisibility(),e.updateLabel(),e.on(c,"loadstart",e.updateVisibility),e.on(c,"ratechange",e.updateLabel),e}return Lb(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this);return this.labelEl_=p("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),b.appendChild(this.labelEl_),b},b.prototype.buildCSSClass=function(){return"vjs-playback-rate "+a.prototype.buildCSSClass.call(this)},b.prototype.buildWrapperCSSClass=function(){return"vjs-playback-rate "+a.prototype.buildWrapperCSSClass.call(this)},b.prototype.createMenu=function(){var a=new Be(this.player()),b=this.playbackRates();if(b)for(var c=b.length-1;c>=0;c--)a.addChild(new Se(this.player(),{rate:b[c]+"x"}));return a},b.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},b.prototype.handleClick=function(a){for(var b=this.player(
|
||
|
Hc.jsonToTextTracks(this.textTracksJson_||[],this.tech_),sf.forEach(function(a){c.on(c.tech_,a,c["handleTech"+Z(a)+"_"])}),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"canplay",this.handleTechCanPlay_),this.on(this.tech_,"canplaythrough",this.handleTechCanPlayThrough_),this.on(this.tech_,"playing",this.handleTechPlaying_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"seeked",this.handleTechSeeked_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===e&&this.tag||r(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},b.prototype.unloadTech_=function(){var a=this;zd.names.forEach(function(b){var c=zd[b];a[c.privateName]=a[c.getterName]()}),this.textTracksJson_=Hc.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1},b.prototype.tech=function(a){return void 0===a&&Ub.warn(Vb(rf)),this.tech_},b.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},b.prototype.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_)},b.prototype.handleTechReady_=function(){if(this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),(this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused())try{delete this.tag.poster}catch(a){Ub("deleting tag.poster throws in some browsers",a)}},b.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},b.prototype.hasStarted=function(a){return void 0!==a?void(this.hasStarted_!==a&&(this.hasStarted_=a,a?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))):!!this.hasStarted_},b.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},b.prototype.handleTechWaiting_=function(){var a=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return a.removeClass("vjs-waiting")})},b.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},b.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},b.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},b.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},b.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},b.prototype.handleTechFirstPlay_=function(){this.options_
|