[ 免费领百度爱企查1年会员 ]新活动链接!百度推出的
【免费领百度爱企查1年会员】新活动链接!百度推出的企业信用查询工具。跟企查查差不多!
r,route:o,href:function(e,t,n){var r=',n=o.firstChild,o.setAttribute("style","display:none; position:absolute;"),a.body.appendChild(o));for(var s={},c=0;c',e=t.firstChild.href}return e},Kt=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(e);if(t)return t.pop().toLowerCase()}return""},Zt=function(e){var t=i.location,n=Jt(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},en=(Object.freeze||Object)({parseUrl:Jt,getAbsoluteURL:Qt,getFileExtension:Kt,isCrossOrigin:Zt}),tn=function(e,t){var n=new i.WebVTT.Parser(i,i.vttjs,i.WebVTT.StringDecoder()),r=[];n.oncue=function(e){t.addCue(e)},n.onparsingerror=function(e){r.push(e)},n.onflush=function(){t.trigger({type:"loadeddata",target:t})},n.parse(e),r.length>0&&(i.console&&i.console.groupCollapsed&&i.console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach((function(e){return G.error(e)})),i.console&&i.console.groupEnd&&i.console.groupEnd()),n.flush()},nn=function(e,t){var n={uri:e},r=Zt(e);r&&(n.cors=r),l(n,Ze(this,(function(e,n,r){if(e)return G.error(e,n);if(t.loaded_=!0,"function"!=typeof i.WebVTT){if(t.tech_){var o=function(){return tn(r,t)};t.tech_.on("vttjsloaded",o),t.tech_.on("vttjserror",(function(){G.error("vttjs failed to load, stopping trying to process "+t.src),t.tech_.off("vttjsloaded",o)}))}}else tn(r,t)})))},rn=function(e){function t(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(L(this,t),!r.tech)throw new Error("A tech was not provided.");var o=mt(r,{kind:Xt[r.kind]||"subtitles",language:r.language||r.srclang||""}),i=Gt[o.mode]||"disabled",a=o.default;"metadata"!==o.kind&&"chapters"!==o.kind||(i="hidden");var s=n=N(this,e.call(this,o));if(s.tech_=o.tech,E)for(var c in t.prototype)"constructor"!==c&&(s[c]=t.prototype[c]);s.cues_=[],s.activeCues_=[];var l=new Ut(s.cues_),u=new Ut(s.activeCues_),p=!1,d=Ze(s,(function(){this.activeCues=this.activeCues,p&&(this.trigger("cuechange"),p=!1)}));return"disabled"!==i&&s.tech_.ready((function(){s.tech_.on("timeupdate",d)}),!0),Object.defineProperty(s,"default",{get:function(){return a},set:function(){}}),Object.defineProperty(s,"mode",{get:function(){return i},set:function(e){var t=this;Gt[e]&&("disabled"!==(i=e)?this.tech_.ready((function(){t.tech_.on("timeupdate",d)}),!0):this.tech_.off("timeupdate",d),this.trigger("modechange"))}}),Object.defineProperty(s,"cues",{get:function(){return this.loaded_?l:null},set:function(){}}),Object.defineProperty(s,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return u;for(var e=this.tech_.currentTime(),t=[],n=0,r=this.cues.length;n=e?t.push(o):o.startTime===o.endTime&&o.startTime<=e&&o.startTime+.5>=e&&t.push(o)}if(p=!1,t.length!==this.activeCues_.length)p=!0;else for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{};L(this,t);var o=mt(r,{kind:Wt[r.kind]||""}),i=n=N(this,e.call(this,o)),a=!1;if(E)for(var s in t.prototype)"constructor"!==s&&(i[s]=t.prototype[s]);return Object.defineProperty(i,"enabled",{get:function(){return a},set:function(e){"boolean"==typeof e&&e!==a&&(a=e,this.trigger("enabledchange"))}}),o.enabled&&(i.enabled=o.enabled),i.loaded_=!0,N(n,i)}return D(t,e),t}(Yt),an=function(e){function t(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};L(this,t);var o=mt(r,{kind:Vt[r.kind]||""}),i=n=N(this,e.call(this,o)),a=!1;if(E)for(var s in t.prototype)"constructor"!==s&&(i[s]=t.prototype[s]);return Object.defineProperty(i,"selected",{get:function(){return a},set:function(e){"boolean"==typeof e&&e!==a&&(a=e,this.trigger("selectedchange"))}}),o.selected&&(i.selected=o.selected),N(n,i)}return D(t,e),t}(Yt),sn=0,cn=2,ln=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};L(this,t);var r=N(this,e.call(this)),o=void 0,i=r;if(E)for(var s in i=a.createElement("custom"),t.prototype)"constructor"!==s&&(i[s]=t.prototype[s]);var c=new rn(n);return i.kind=c.kind,i.src=c.src,i.srclang=c.language,i.label=c.label,i.default=c.default,Object.defineProperty(i,"readyState",{get:function(){return o}}),Object.defineProperty(i,"track",{get:function(){return c}}),o=sn,c.addEventListener("loadeddata",(function(){o=cn,i.trigger({type:"load",target:i})})),E?N(r,i):r}return D(t,e),t}(nt);ln.prototype.allowedEvents_={load:"load"},ln.NONE=sn,ln.LOADING=1,ln.LOADED=cn,ln.ERROR=3;var un={audio:{ListClass:Ft,TrackClass:on,capitalName:"Audio"},video:{ListClass:Ht,TrackClass:an,capitalName:"Video"},text:{ListClass:qt,TrackClass:rn,capitalName:"Text"}};Object.keys(un).forEach((function(e){un[e].getterName=e+"Tracks",un[e].privateName=e+"Tracks_"}));var pn={remoteText:{ListClass:qt,TrackClass:rn,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:$t,TrackClass:ln,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},dn=mt(un,pn);pn.names=Object.keys(pn),un.names=Object.keys(un),dn.names=[].concat(pn.names).concat(un.names);var fn=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};L(this,t),n.reportTouchActivity=!1;var o=N(this,e.call(this,null,n,r));return o.hasStarted_=!1,o.on("playing",(function(){this.hasStarted_=!0})),o.on("loadstart",(function(){this.hasStarted_=!1})),dn.names.forEach((function(e){var t=dn[e];n&&n[t.getterName]&&(o[t.privateName]=n[t.getterName])})),o.featuresProgressEvents||o.manualProgressOn(),o.featuresTimeupdateEvents||o.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===n["native"+e+"Tracks"]&&(o["featuresNative"+e+"Tracks"]=!1)})),!1===n.nativeCaptions||!1===n.nativeTextTracks?o.featuresNativeTextTracks=!1:!0!==n.nativeCaptions&&!0!==n.nativeTextTracks||(o.featuresNativeTextTracks=!0),o.featuresNativeTextTracks||o.emulateTextTracks(),o.autoRemoteTextTracks_=new dn.text.ListClass,o.initTrackListeners(),n.nativeControlsForTouch||o.emitTapEvents(),o.constructor&&(o.name_=o.constructor.name||"Unknown Tech"),o}return D(t,e),t.prototype.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",(function(){return t.setTimeout((function(){return t.triggerSourceset(e)}),1)})),this.trigger({src:e,type:"sourceset"})},t.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},t.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},t.prototype.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Ze(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},t.prototype.onDurationChange=function(e){this.duration_=this.duration()},t.prototype.buffered=function(){return yt(0,0)},t.prototype.bufferedPercent=function(){return _t(this.buffered(),this.duration_)},t.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},t.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},t.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},t.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},t.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.dispose=function(){this.clearTracks(un.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},t.prototype.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach((function(e){for(var n=t[e+"Tracks"]()||[],r=n.length;r--;){var o=n[r];"text"===e&&t.removeRemoteTextTrack(o),n.removeTrack(o)}}))},t.prototype.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},t.prototype.reset=function(){},t.prototype.error=function(e){return void 0!==e&&(this.error_=new St(e),this.trigger("error")),this.error_},t.prototype.played=function(){return this.hasStarted_?yt(0,0):yt()},t.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.initTrackListeners=function(){var e=this;un.names.forEach((function(t){var n=un[t],r=function(){e.trigger(t+"trackchange")},o=e[n.getterName]();o.addEventListener("removetrack",r),o.addEventListener("addtrack",r),e.on("dispose",(function(){o.removeEventListener("removetrack",r),o.removeEventListener("addtrack",r)}))}))},t.prototype.addWebVttScript_=function(){var e=this;if(!i.WebVTT)if(a.body.contains(this.el())){if(!this.options_["vtt.js"]&&V(u)&&Object.keys(u).length>0)return void this.trigger("vttjsloaded");var t=a.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),i.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},t.prototype.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},o=function(e){return t.removeTrack(e.track)};n.on("addtrack",r),n.on("removetrack",o),this.addWebVttScript_();var i=function(){return e.trigger("texttrackchange")},a=function(){i();for(var e=0;e4&&void 0!==arguments[4]?arguments[4]:{},i=e.textTracks();o.kind=t,n&&(o.label=n),r&&(o.language=r),o.tech=e;var a=new dn.text.TrackClass(o);return i.addTrack(a),a}(this,e,t,n)},t.prototype.createRemoteTextTrack=function(e){var t=mt(e,{tech:this});return new pn.remoteTextEl.TrackClass(t)},t.prototype.addRemoteTextTrack=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1],r=this.createRemoteTextTrack(t);return!0!==n&&!1!==n&&(G.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),n=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==n&&this.ready((function(){return e.autoRemoteTextTracks_.addTrack(r.track)})),r},t.prototype.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},t.prototype.getVideoPlaybackQuality=function(){return{}},t.prototype.setPoster=function(){},t.prototype.playsinline=function(){},t.prototype.setPlaysinline=function(){},t.prototype.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,n){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,n){if(t.techs_||(t.techs_={}),!t.isTech(n))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=ht(e),t.techs_[e]=n,"Tech"!==e&&t.defaultTechOrder_.push(e),n},t.getTech=function(e){if(e)return e=ht(e),t.techs_&&t.techs_[e]?t.techs_[e]:i&&i.videojs&&i.videojs[e]?(G.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),i.videojs[e]):void 0},t}(vt);dn.names.forEach((function(e){var t=dn[e];fn.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),fn.prototype.featuresVolumeControl=!0,fn.prototype.featuresMuteControl=!0,fn.prototype.featuresFullscreenResize=!1,fn.prototype.featuresPlaybackRate=!1,fn.prototype.featuresProgressEvents=!1,fn.prototype.featuresSourceset=!1,fn.prototype.featuresTimeupdateEvents=!1,fn.prototype.featuresNativeTextTracks=!1,fn.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var r=e.sourceHandlers;r||(r=e.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,t)},e.canPlayType=function(t){for(var n=e.sourceHandlers||[],r=void 0,o=0;o0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2],o=arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=n[0],c=n.slice(1);if("string"==typeof s)e(t,hn[s],r,o,i,a);else if(s){var l=function(e,t){var n=mn[e.id()],r=null;if(null==n)return r=t(e),mn[e.id()]=[[t,r]],r;for(var o=0;o3&&void 0!==arguments[3]?arguments[3]:null,o="call"+ht(n),i=e.reduce(xn(o),r),a=i===vn,s=a?null:t[n](i);return function(e,t,n,r){for(var o=e.length-1;o>=0;o--){var i=e[o];i[t]&&i[t](r,n)}}(e,n,s,a),s}var yn={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},_n={setCurrentTime:1},wn={play:1,pause:1};function xn(e){return function(t,n){return t===vn?vn:n[e]?n[e](t):t}}var kn={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL"},On=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=Kt(e),n=kn[t.toLowerCase()];return n||""},jn=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter((function(e){return e.src===t}));if(n.length)return n[0].type;for(var r=e.$$("source"),o=0;o0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=$({innerHTML:'',className:this.buildCSSClass(),tabIndex:0},n),"button"===t&&G.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),r=$({role:"button"},r),this.tabIndex_=n.tabIndex;var o=e.prototype.createEl.call(this,t,n,r);return this.createControlTextEl(o),o},t.prototype.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},t.prototype.createControlTextEl=function(e){return this.controlTextEl_=oe("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},t.prototype.controlText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,ie(this.controlTextEl_,n),this.nonIconControl||t.setAttribute("title",n)},t.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},t.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},t.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},t.prototype.handleClick=function(e){},t.prototype.handleFocus=function(e){qe(a,"keydown",Ze(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.trigger("click")):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t.prototype.handleBlur=function(e){$e(a,"keydown",Ze(this,this.handleKeyPress))},t}(vt);vt.registerComponent("ClickableComponent",En);var Cn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.update(),n.on("posterchange",Ze(o,o.update)),o}return D(t,e),t.prototype.dispose=function(){this.player().off("posterchange",this.update),e.prototype.dispose.call(this)},t.prototype.createEl=function(){var e=oe("div",{className:"vjs-poster",tabIndex:-1});return M||(this.fallbackImg_=oe("img"),e.appendChild(this.fallbackImg_)),e},t.prototype.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},t.prototype.setSrc=function(e){if(this.fallbackImg_)this.fallbackImg_.src=e;else{var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t}},t.prototype.handleClick=function(e){this.player_.controls()&&(this.player_.paused()?At(this.player_.play()):this.player_.pause())},t}(En);vt.registerComponent("PosterImage",Cn);var An={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Rn(e,t){var n=void 0;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function Pn(e,t,n){try{e.style[t]=n}catch(e){return}}var Mn=function(e){function t(n,r,o){L(this,t);var a=N(this,e.call(this,n,r,o)),s=Ze(a,a.updateDisplay);return n.on("loadstart",Ze(a,a.toggleDisplay)),n.on("texttrackchange",s),n.on("loadstart",Ze(a,a.preselectTrack)),n.ready(Ze(a,(function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)this.hide();else{n.on("fullscreenchange",s),n.on("playerresize",s),i.addEventListener&&i.addEventListener("orientationchange",s),n.on("dispose",(function(){return i.removeEventListener("orientationchange",s)}));for(var e=this.options_.playerOptions.tracks||[],t=0;t1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e="button",t=$({innerHTML:'',className:this.buildCSSClass()},t),n=$({type:"button"},n);var r=vt.prototype.createEl.call(this,e,t,n);return this.createControlTextEl(r),r},t.prototype.addChild=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.constructor.name;return G.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),vt.prototype.addChild.call(this,e,t)},t.prototype.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},t.prototype.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},t.prototype.handleKeyPress=function(t){32!==t.which&&13!==t.which&&e.prototype.handleKeyPress.call(this,t)},t}(En);vt.registerComponent("Button",In);var Ln=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.mouseused_=!1,o.on("mousedown",o.handleMouseDown),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-big-play-button"},t.prototype.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY)At(t);else{var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(r){var o=function(){return r.focus()};Ct(t)?t.then(o,(function(){})):this.setTimeout(o,1)}else this.player_.focus()}},t.prototype.handleKeyPress=function(t){this.mouseused_=!1,e.prototype.handleKeyPress.call(this,t)},t.prototype.handleMouseDown=function(e){this.mouseused_=!0},t}(In);Ln.prototype.controlText_="Play Video",vt.registerComponent("BigPlayButton",Ln);var Dn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.controlText(r&&r.controlText||o.localize("Close")),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t}(In);vt.registerComponent("CloseButton",Dn);var Nn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.on(n,"play",o.handlePlay),o.on(n,"pause",o.handlePause),o.on(n,"ended",o.handleEnded),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.prototype.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.prototype.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.prototype.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},t}(In);Nn.prototype.controlText_="Play",vt.registerComponent("PlayToggle",Nn);var Fn=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),o=Math.floor(e/3600),i=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(o=r=n="-"),(o=o>0||a>0?o+":":"")+(r=((o||i>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)},zn=Fn;var Hn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return zn(e,t)},qn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.throttledUpdateContent=et(Ze(o,o.updateContent),25),o.on(n,"timeupdate",o.throttledUpdateContent),o}return D(t,e),t.prototype.createEl=function(t){var n=this.buildCSSClass(),r=e.prototype.createEl.call(this,"div",{className:n+" vjs-time-control vjs-control",innerHTML:''+this.localize(this.labelText_)+" "});return this.contentEl_=oe("span",{className:n+"-display"},{"aria-live":"off"}),this.updateTextNode_(),r.appendChild(this.contentEl_),r},t.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},t.prototype.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=a.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},t.prototype.formatTime_=function(e){return Hn(e)},t.prototype.updateFormattedTime_=function(e){var t=this.formatTime_(e);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},t.prototype.updateContent=function(e){},t}(vt);qn.prototype.labelText_="Time",qn.prototype.controlText_="Time",vt.registerComponent("TimeDisplay",qn);var $n=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.on(n,"ended",o.handleEnded),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-current-time"},t.prototype.updateContent=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(t)},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},t}(qn);$n.prototype.labelText_="Current Time",$n.prototype.controlText_="Current Time",vt.registerComponent("CurrentTimeDisplay",$n);var Un=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.on(n,"durationchange",o.updateContent),o.on(n,"loadedmetadata",o.throttledUpdateContent),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-duration"},t.prototype.updateContent=function(e){var t=this.player_.duration();t&&this.duration_!==t&&(this.duration_=t,this.updateFormattedTime_(t))},t}(qn);Un.prototype.labelText_="Duration",Un.prototype.controlText_="Duration",vt.registerComponent("DurationDisplay",Un);var Vn=function(e){function t(){return L(this,t),N(this,e.apply(this,arguments))}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"t.length;u--)this.el_.removeChild(o[u-1]);o.length=t.length},t}(vt);vt.registerComponent("LoadProgressBar",Yn);var Jn=function(e){function t(){return L(this,t),N(this,e.apply(this,arguments))}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},t.prototype.update=function(e,t,n){var r=be(this.el_),o=be(this.player_.el()),i=e.width*t;if(o&&r){var a=e.left-o.left+i,s=e.width-i+(o.right-e.right),c=r.width/2;ar.width&&(c=r.width),this.el_.style.right="-"+c+"px",ie(this.el_,n)}},t}(vt);vt.registerComponent("TimeTooltip",Jn);var Qn=function(e){function t(){return L(this,t),N(this,e.apply(this,arguments))}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:''+this.localize("Progress")+": 0%"})},t.prototype.update=function(e,t){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var r=n.player_.scrubbing()?n.player_.getCache().currentTime:n.player_.currentTime(),o=Hn(r,n.player_.duration()),i=n.getChild("timeTooltip");i&&i.update(e,t,o)}))},t}(vt);Qn.prototype.options_={children:[]},C&&!(C>8)||b||_||Qn.prototype.options_.children.push("timeTooltip"),vt.registerComponent("PlayProgressBar",Qn);var Kn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.update=et(Ze(o,o.update),25),o}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.prototype.update=function(e,t){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var r=n.player_.duration(),o=Hn(t*r,r);n.el_.style.left=e.width*t+"px",n.getChild("timeTooltip").update(e,t,o)}))},t}(vt);Kn.prototype.options_={children:["timeTooltip"]},vt.registerComponent("MouseTimeDisplay",Kn);var Zn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.setEventHandlers_(),o}return D(t,e),t.prototype.setEventHandlers_=function(){var e=this;this.update=et(Ze(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.updateInterval=null,this.on(this.player_,["playing"],(function(){e.clearInterval(e.updateInterval),e.updateInterval=e.setInterval((function(){e.requestAnimationFrame((function(){e.update()}))}),30)})),this.on(this.player_,["ended","pause","waiting"],(function(){e.clearInterval(e.updateInterval)})),this.on(this.player_,["timeupdate","ended"],this.update)},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.prototype.update_=function(e,t){var n=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Hn(e,n),Hn(n,n)],"{1} of {2}")),this.bar.update(be(this.el_),t)},t.prototype.update=function(t){var n=e.prototype.update.call(this);return this.update_(this.getCurrentTime_(),n),n},t.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.prototype.handleEnded=function(e){this.update_(this.player_.duration(),1)},t.prototype.getPercent=function(){var e=this.getCurrentTime_()/this.player_.duration();return e>=1?1:e},t.prototype.handleMouseDown=function(t){Te(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},t.prototype.handleMouseMove=function(e){if(Te(e)){var t=this.calculateDistance(e)*this.player_.duration();t===this.player_.duration()&&(t-=.1),this.player_.currentTime(t)}},t.prototype.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},t.prototype.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},t.prototype.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&At(this.player_.play())},t.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},t.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},t.prototype.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.handleAction(t)):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t}(Gn);Zn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},C&&!(C>8)||b||_||Zn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Zn.prototype.playerEvent="timeupdate",vt.registerComponent("SeekBar",Zn);var er=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.handleMouseMove=et(Ze(o,o.handleMouseMove),25),o.throttledHandleMouseSeek=et(Ze(o,o.handleMouseSeek),25),o.enable(),o}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.prototype.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("mouseTimeDisplay"),r=t.el(),o=be(r),i=_e(r,e).x;i>1?i=1:i<0&&(i=0),n&&n.update(o,i)}},t.prototype.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},t.prototype.enabled=function(){return this.enabled_},t.prototype.disable=function(){this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},t.prototype.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},t.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseUp(e),this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t}(vt);er.prototype.options_={children:["seekBar"]},vt.registerComponent("ProgressControl",er);var tr=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.on(n,"fullscreenchange",o.handleFullscreenChange),!1===a[wt.fullscreenEnabled]&&o.disable(),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.prototype.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(In);tr.prototype.controlText_="Fullscreen",vt.registerComponent("FullscreenToggle",tr);var nr=function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))},rr=function(e){function t(){return L(this,t),N(this,e.apply(this,arguments))}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})},t}(vt);vt.registerComponent("VolumeLevel",rr);var or=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.on("slideractive",o.updateLastVolume_),o.on(n,"volumechange",o.updateARIAAttributes),n.ready((function(){return o.updateARIAAttributes()})),o}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.prototype.handleMouseDown=function(t){Te(t)&&e.prototype.handleMouseDown.call(this,t)},t.prototype.handleMouseMove=function(e){Te(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.prototype.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},t.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.prototype.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(Gn);or.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},or.prototype.playerEvent="volumechange",vt.registerComponent("VolumeBar",or);var ir=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L(this,t),r.vertical=r.vertical||!1,(void 0===r.volumeBar||V(r.volumeBar))&&(r.volumeBar=r.volumeBar||{},r.volumeBar.vertical=r.vertical);var o=N(this,e.call(this,n,r));return nr(o,n),o.throttledHandleMouseMove=et(Ze(o,o.handleMouseMove),25),o.on("mousedown",o.handleMouseDown),o.on("touchstart",o.handleMouseDown),o.on(o.volumeBar,["focus","slideractive"],(function(){o.volumeBar.addClass("vjs-slider-active"),o.addClass("vjs-slider-active"),o.trigger("slideractive")})),o.on(o.volumeBar,["blur","sliderinactive"],(function(){o.volumeBar.removeClass("vjs-slider-active"),o.removeClass("vjs-slider-active"),o.trigger("sliderinactive")})),o}return D(t,e),t.prototype.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},t.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(vt);ir.prototype.options_={children:["volumeBar"]},vt.registerComponent("VolumeControl",ir);var ar=function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))},sr=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return ar(o,n),o.on(n,["loadstart","volumechange"],o.update),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},t.prototype.update=function(e){this.updateIcon_(),this.updateControlText_()},t.prototype.updateIcon_=function(){var e=this.player_.volume(),t=3;b&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)le(this.el_,"vjs-vol-"+n);ce(this.el_,"vjs-vol-"+t)},t.prototype.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(In);sr.prototype.controlText_="Mute",vt.registerComponent("MuteToggle",sr);var cr=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L(this,t),void 0!==r.inline?r.inline=r.inline:r.inline=!0,(void 0===r.volumeControl||V(r.volumeControl))&&(r.volumeControl=r.volumeControl||{},r.volumeControl.vertical=!r.inline);var o=N(this,e.call(this,n,r));return o.on(n,["loadstart"],o.volumePanelState_),o.on(o.volumeControl,["slideractive"],o.sliderActive_),o.on(o.volumeControl,["sliderinactive"],o.sliderInactive_),o}return D(t,e),t.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},t.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.prototype.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},t.prototype.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},t}(vt);cr.prototype.options_={children:["muteToggle","volumeControl"]},vt.registerComponent("VolumePanel",cr);var lr=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return r&&(o.menuButton_=r.menuButton),o.focusedChild_=-1,o.on("keydown",o.handleKeyPress),o}return D(t,e),t.prototype.addItem=function(e){this.addChild(e),e.on("click",Ze(this,(function(t){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus())})))},t.prototype.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=oe(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),qe(n,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),n},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepForward()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepBack())},t.prototype.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.prototype.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.prototype.focus=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.children().slice(),n=t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className);n&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(vt);vt.registerComponent("Menu",lr);var ur=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L(this,t);var o=N(this,e.call(this,n,r));o.menuButton_=new In(n,r),o.menuButton_.controlText(o.controlText_),o.menuButton_.el_.setAttribute("aria-haspopup","true");var i=In.prototype.buildCSSClass();return o.menuButton_.el_.className=o.buildCSSClass()+" "+i,o.menuButton_.removeClass("vjs-control"),o.addChild(o.menuButton_),o.update(),o.enabled_=!0,o.on(o.menuButton_,"tap",o.handleClick),o.on(o.menuButton_,"click",o.handleClick),o.on(o.menuButton_,"focus",o.handleFocus),o.on(o.menuButton_,"blur",o.handleBlur),o.on("keydown",o.handleSubmenuKeyPress),o}return D(t,e),t.prototype.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.prototype.createMenu=function(){var e=new lr(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=oe("li",{className:"vjs-menu-title",innerHTML:ht(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,e.children_.unshift(t),ae(t,e.contentEl())}if(this.items=this.createItems(),this.items)for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(e,t)},t.prototype.handleClick=function(e){this.one(this.menu.contentEl(),"mouseleave",Ze(this,(function(e){this.unpressButton(),this.el_.blur()}))),this.buttonPressed_?this.unpressButton():this.pressButton()},t.prototype.focus=function(){this.menuButton_.focus()},t.prototype.blur=function(){this.menuButton_.blur()},t.prototype.handleFocus=function(){qe(a,"keydown",Ze(this,this.handleKeyPress))},t.prototype.handleBlur=function(){$e(a,"keydown",Ze(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(e){27===e.which||9===e.which?(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus())):38!==e.which&&40!==e.which||this.buttonPressed_||(this.pressButton(),e.preventDefault())},t.prototype.handleSubmenuKeyPress=function(e){27!==e.which&&9!==e.which||(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus()))},t.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),b&&ne())return;this.menu.focus()}},t.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},t.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},t.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(vt);vt.registerComponent("MenuButton",ur);var pr=function(e){function t(n,r){L(this,t);var o=r.tracks,i=N(this,e.call(this,n,r));if(i.items.length<=1&&i.hide(),!o)return N(i);var a=Ze(i,i.update);return o.addEventListener("removetrack",a),o.addEventListener("addtrack",a),i.player_.on("ready",a),i.player_.on("dispose",(function(){o.removeEventListener("removetrack",a),o.removeEventListener("addtrack",a)})),i}return D(t,e),t}(ur);vt.registerComponent("TrackButton",pr);var dr=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.selectable=r.selectable,o.isSelected_=r.selected||!1,o.multiSelectable=r.multiSelectable,o.selected(o.isSelected_),o.selectable?o.multiSelectable?o.el_.setAttribute("role","menuitemcheckbox"):o.el_.setAttribute("role","menuitemradio"):o.el_.setAttribute("role","menuitem"),o}return D(t,e),t.prototype.createEl=function(t,n,r){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",$({className:"vjs-menu-item",innerHTML:''+this.localize(this.options_.label)+"",tabIndex:-1},n),r)},t.prototype.handleClick=function(e){this.selected(!0)},t.prototype.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(En);vt.registerComponent("MenuItem",dr);var fr=function(e){function t(n,r){L(this,t);var o=r.track,s=n.textTracks();r.label=o.label||o.language||"Unknown",r.selected="showing"===o.mode;var c=N(this,e.call(this,n,r));c.track=o;var l=function(){for(var e=arguments.length,t=Array(e),n=0;n-1?"showing"!==a.mode&&(a.mode="showing"):"disabled"!==a.mode&&(a.mode="disabled")}},t.prototype.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},t.prototype.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},t.prototype.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(dr);vt.registerComponent("TextTrackMenuItem",fr);var hr=function(e){function t(n,r){return L(this,t),r.track={player:n,kind:r.kind,kinds:r.kinds,default:!1,mode:"disabled"},r.kinds||(r.kinds=[r.kind]),r.label?r.track.label=r.label:r.track.label=r.kinds.join(" and ")+" off",r.selectable=!0,r.multiSelectable=!1,N(this,e.call(this,n,r))}return D(t,e),t.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,o=t.length;r-1&&"showing"===i.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},t.prototype.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,o=t.length;r-1&&"showing"===i.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(fr);vt.registerComponent("OffTextTrackMenuItem",hr);var mr=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return L(this,t),r.tracks=n.textTracks(),N(this,e.call(this,n,r))}return D(t,e),t.prototype.createItems=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fr,n=void 0;this.label_&&(n=this.label_+" off"),e.push(new hr(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var o=0;o-1){var a=new t(this.player_,{track:i,selectable:!0,multiSelectable:!1});a.addClass("vjs-"+i.kind+"-menu-item"),e.push(a)}}return e},t}(pr);vt.registerComponent("TextTrackButton",mr);var vr=function(e){function t(n,r){L(this,t);var o=r.track,i=r.cue,a=n.currentTime();r.selectable=!0,r.multiSelectable=!1,r.label=i.text,r.selected=i.startTime<=a&&a=0;t--){var n=e[t];if(n.kind===this.kind_)return n}},t.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(ht(this.kind_))},t.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},t.prototype.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n\n '+this.localize("Captions")+"\n "),o+="",e.prototype.createEl.call(this,t,$({innerHTML:o},n),r)},t}(fr);vt.registerComponent("SubsCapsMenuItem",xr);var kr=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L(this,t);var o=N(this,e.call(this,n,r));return o.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(o.player_.language_)>-1&&(o.label_="captions"),o.menuButton_.controlText(ht(o.label_)),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new _r(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,xr)},t}(mr);kr.prototype.kinds_=["captions","subtitles"],kr.prototype.controlText_="Subtitles",vt.registerComponent("SubsCapsButton",kr);var Or=function(e){function t(n,r){L(this,t);var o=r.track,i=n.audioTracks();r.label=o.label||o.language||"Unknown",r.selected=o.enabled;var a=N(this,e.call(this,n,r));a.track=o,a.addClass("vjs-"+o.kind+"-menu-item");var s=function(){for(var e=arguments.length,t=Array(e),n=0;n\n '+this.localize("Descriptions")+"\n "),o+="",e.prototype.createEl.call(this,t,$({innerHTML:o},n),r)},t.prototype.handleClick=function(t){var n=this.player_.audioTracks();e.prototype.handleClick.call(this,t);for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return L(this,t),r.tracks=n.audioTracks(),N(this,e.call(this,n,r))}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;for(var t=this.player_.audioTracks(),n=0;n=0;n--)e.addChild(new Tr(this.player(),{rate:t[n]+"x"}));return e},t.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.prototype.handleClick=function(e){for(var t=this.player().playbackRate(),n=this.playbackRates(),r=n[0],o=0;ot){r=n[o];break}this.player().playbackRate(r)},t.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},t.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},t.prototype.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.prototype.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(ur);Sr.prototype.controlText_="Playback Rate",vt.registerComponent("PlaybackRateMenuButton",Sr);var Er=function(e){function t(){return L(this,t),N(this,e.apply(this,arguments))}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(vt);vt.registerComponent("Spacer",Er);var Cr=function(e){function t(){return L(this,t),N(this,e.apply(this,arguments))}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(Er);vt.registerComponent("CustomControlSpacer",Cr);var Ar=function(e){function t(){return L(this,t),N(this,e.apply(this,arguments))}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(vt);Ar.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},vt.registerComponent("ControlBar",Ar);var Rr=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.on(n,"error",o.open),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},t.prototype.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(It);Rr.prototype.options_=mt(It.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),vt.registerComponent("ErrorDisplay",Rr);var Pr=["#000","Black"],Mr=["#00F","Blue"],Br=["#0FF","Cyan"],Ir=["#0F0","Green"],Lr=["#F0F","Magenta"],Dr=["#F00","Red"],Nr=["#FFF","White"],Fr=["#FF0","Yellow"],zr=["1","Opaque"],Hr=["0.5","Semi-Transparent"],qr=["0","Transparent"],$r={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Pr,Nr,Dr,Ir,Mr,Fr,Lr,Br]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[zr,Hr,qr]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Nr,Pr,Dr,Ir,Mr,Fr,Lr,Br]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[zr,Hr]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[qr,Hr,zr]}};function Ur(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}$r.windowColor.options=$r.backgroundColor.options;var Vr=function(e){function t(n,r){L(this,t),r.temporary=!1;var o=N(this,e.call(this,n,r));return o.updateDisplay=Ze(o,o.updateDisplay),o.fill(),o.hasBeenOpened_=o.hasBeenFilled_=!0,o.endDialog=oe("p",{className:"vjs-control-text",textContent:o.localize("End of dialog window.")}),o.el().appendChild(o.endDialog),o.setDefaults(),void 0===r.persistTextTrackSettings&&(o.options_.persistTextTrackSettings=o.options_.playerOptions.persistTextTrackSettings),o.on(o.$(".vjs-done-button"),"click",(function(){o.saveSettings(),o.close()})),o.on(o.$(".vjs-default-button"),"click",(function(){o.setDefaults(),o.updateDisplay()})),q($r,(function(e){o.on(o.$(e.selector),"change",o.updateDisplay)})),o.options_.persistTextTrackSettings&&o.restoreSettings(),o}return D(t,e),t.prototype.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},t.prototype.createElSelect_=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"label",o=$r[e],i=o.id.replace("%s",this.id_),a=[n,i].join(" ").trim();return["<"+r+' id="'+i+'" class="'+("label"===r?"vjs-label":"")+'">',this.localize(o.label),""+r+">",'").join("")},t.prototype.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['"].join("")},t.prototype.createElBgColor_=function(){var e="captions-background-"+this.id_;return['"].join("")},t.prototype.createElWinColor_=function(){var e="captions-window-"+this.id_;return['"].join("")},t.prototype.createElColors_=function(){return oe("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},t.prototype.createElFont_=function(){return oe("div",{className:"vjs-track-settings-font",innerHTML:['",'",'"].join("")})},t.prototype.createElControls_=function(){var e=this.localize("restore all settings to the default values");return oe("div",{className:"vjs-track-settings-controls",innerHTML:['",'"].join("")})},t.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},t.prototype.label=function(){return this.localize("Caption Settings Dialog")},t.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},t.prototype.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},t.prototype.getValues=function(){var e=this;return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return H(e).reduce((function(n,r){return t(n,e[r],r)}),n)}($r,(function(t,n,r){var o,i,a=(o=e.$(n.selector),i=n.parser,Ur(o.options[o.options.selectedIndex].value,i));return void 0!==a&&(t[r]=a),t}),{})},t.prototype.setValues=function(e){var t=this;q($r,(function(n,r){!function(e,t,n){if(t)for(var r=0;r=2&&o.push("loadeddata"),e.readyState>=3&&o.push("canplay"),e.readyState>=4&&o.push("canplaythrough"),this.ready((function(){o.forEach((function(e){this.trigger(e)}),this)}))}},t.prototype.setCurrentTime=function(e){try{this.el_.currentTime=e}catch(e){G(e,"Video is not ready. (Video.js)")}},t.prototype.duration=function(){var e=this;if(this.el_.duration===1/0&&_&&T&&0===this.el_.currentTime){return this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN}return this.el_.duration||NaN},t.prototype.width=function(){return this.el_.offsetWidth},t.prototype.height=function(){return this.el_.offsetHeight},t.prototype.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",(function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)}))}},t.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=i.navigator&&i.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},t.prototype.enterFullScreen=function(){var e=this.el_;e.paused&&e.networkState<=e.HAVE_METADATA?(this.el_.play(),this.setTimeout((function(){e.pause(),e.webkitEnterFullScreen()}),0)):e.webkitEnterFullScreen()},t.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},t.prototype.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},t.prototype.reset=function(){t.resetMediaElement(this.el_)},t.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},t.prototype.setControls=function(e){this.el_.controls=!!e},t.prototype.addTextTrack=function(t,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,r):e.prototype.addTextTrack.call(this,t,n,r)},t.prototype.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=a.createElement("track");return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t.default&&(n.default=t.default),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},t.prototype.addRemoteTextTrack=function(t,n){var r=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},t.prototype.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)t!==n[r]&&t!==n[r].track||this.el().removeChild(n[r])},t.prototype.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),i.performance&&"function"==typeof i.performance.now?e.creationTime=i.performance.now():i.performance&&i.performance.timing&&"number"==typeof i.performance.timing.navigationStart&&(e.creationTime=i.Date.now()-i.performance.timing.navigationStart),e},t}(fn);if(ee()){eo.TEST_VID=a.createElement("video");var to=a.createElement("track");to.kind="captions",to.srclang="en",to.label="English",eo.TEST_VID.appendChild(to)}eo.isSupported=function(){try{eo.TEST_VID.volume=.5}catch(e){return!1}return!(!eo.TEST_VID||!eo.TEST_VID.canPlayType)},eo.canPlayType=function(e){return eo.TEST_VID.canPlayType(e)},eo.canPlaySource=function(e,t){return eo.canPlayType(e.type)},eo.canControlVolume=function(){try{var e=eo.TEST_VID.volume;return eo.TEST_VID.volume=e/2+.1,e!==eo.TEST_VID.volume}catch(e){return!1}},eo.canMuteVolume=function(){try{var e=eo.TEST_VID.muted;return eo.TEST_VID.muted=!e,eo.TEST_VID.muted?he(eo.TEST_VID,"muted","muted"):me(eo.TEST_VID,"muted"),e!==eo.TEST_VID.muted}catch(e){return!1}},eo.canControlPlaybackRate=function(){if(_&&T&&S<58)return!1;try{var e=eo.TEST_VID.playbackRate;return eo.TEST_VID.playbackRate=e/2+.1,e!==eo.TEST_VID.playbackRate}catch(e){return!1}},eo.canOverrideAttributes=function(){if(E)return!1;try{var e=function(){};Object.defineProperty(a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},eo.supportsNativeTextTracks=function(){return R||b&&T},eo.supportsNativeVideoTracks=function(){return!(!eo.TEST_VID||!eo.TEST_VID.videoTracks)},eo.supportsNativeAudioTracks=function(){return!(!eo.TEST_VID||!eo.TEST_VID.audioTracks)},eo.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],eo.prototype.featuresVolumeControl=eo.canControlVolume(),eo.prototype.featuresMuteControl=eo.canMuteVolume(),eo.prototype.featuresPlaybackRate=eo.canControlPlaybackRate(),eo.prototype.featuresSourceset=eo.canOverrideAttributes(),eo.prototype.movingMediaElementInDOM=!b,eo.prototype.featuresFullscreenResize=!0,eo.prototype.featuresProgressEvents=!0,eo.prototype.featuresTimeupdateEvents=!0,eo.prototype.featuresNativeTextTracks=eo.supportsNativeTextTracks(),eo.prototype.featuresNativeVideoTracks=eo.supportsNativeVideoTracks(),eo.prototype.featuresNativeAudioTracks=eo.supportsNativeAudioTracks();var no=eo.TEST_VID&&eo.TEST_VID.constructor.prototype.canPlayType,ro=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,oo=/^video\/mp4/i;eo.patchCanPlayType=function(){w>=4&&!O&&!T?eo.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&ro.test(e)?"maybe":no.call(this,e)}:x&&(eo.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&oo.test(e)?"maybe":no.call(this,e)})},eo.unpatchCanPlayType=function(){var e=eo.TEST_VID.constructor.prototype.canPlayType;return eo.TEST_VID.constructor.prototype.canPlayType=no,e},eo.patchCanPlayType(),eo.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eo.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){eo.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){eo.prototype["set"+ht(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(e){eo.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach((function(e){eo.prototype["set"+ht(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){eo.prototype[e]=function(){return this.el_[e]()}})),fn.withSourceHandlers(eo),eo.nativeSourceHandler={},eo.nativeSourceHandler.canPlayType=function(e){try{return eo.TEST_VID.canPlayType(e)}catch(e){return""}},eo.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eo.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=Kt(e.src);return eo.nativeSourceHandler.canPlayType("video/"+n)}return""},eo.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},eo.nativeSourceHandler.dispose=function(){},eo.registerSourceHandler(eo.nativeSourceHandler),fn.registerTech("Html5",eo);var io=F(["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "],["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "]),ao=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],so={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},co=["tiny","xsmall","small","medium","large","xlarge","huge"],lo={};co.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;lo[e]="vjs-layout-"+t}));var uo={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},po=function(e){function t(n,r,o){if(L(this,t),n.id=n.id||r.id||"vjs_video_"+Re(),(r=$(t.getTagSettings(n),r)).initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var i=n.closest("[lang]");i&&i.getAttribute&&(r.language=i.getAttribute("lang"))}else for(var a=n;a&&1===a.nodeType;){if(de(a).hasOwnProperty("lang")){r.language=a.getAttribute("lang");break}a=a.parentNode}var s=N(this,e.call(this,null,r,o));if(s.log=Y(s.id_),s.isPosterFromTech_=!1,s.queuedCallbacks_=[],s.isReady_=!1,s.hasStarted_=!1,s.userActive_=!1,!s.options_||!s.options_.techOrder||!s.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(s.tag=n,s.tagAttributes=n&&de(n),s.language(s.options_.language),r.languages){var c={};Object.getOwnPropertyNames(r.languages).forEach((function(e){c[e.toLowerCase()]=r.languages[e]})),s.languages_=c}else s.languages_=t.prototype.options_.languages;s.cache_={},s.poster_=r.poster||"",s.controls_=!!r.controls,s.cache_.lastVolume=1,n.controls=!1,n.removeAttribute("controls"),n.hasAttribute("autoplay")?s.options_.autoplay=!0:s.autoplay(s.options_.autoplay),s.scrubbing_=!1,s.el_=s.createEl(),s.cache_.lastPlaybackRate=s.defaultPlaybackRate(),pt(s,{eventBusKey:"el_"});var l=mt(s.options_);if(r.plugins){var u=r.plugins;Object.keys(u).forEach((function(e){if("function"!=typeof this[e])throw new Error('plugin "'+e+'" does not exist');this[e](u[e])}),s)}s.options_.playerOptions=l,s.middleware_=[],s.initChildren(),s.isAudio("audio"===n.nodeName.toLowerCase()),s.controls()?s.addClass("vjs-controls-enabled"):s.addClass("vjs-controls-disabled"),s.el_.setAttribute("role","region"),s.isAudio()?s.el_.setAttribute("aria-label",s.localize("Audio Player")):s.el_.setAttribute("aria-label",s.localize("Video Player")),s.isAudio()&&s.addClass("vjs-audio"),s.flexNotSupported_()&&s.addClass("vjs-no-flex"),b||s.addClass("vjs-workinghover"),t.players[s.id_]=s;var d=p.split(".")[0];return s.addClass("vjs-v"+d),s.userActive(!0),s.reportUserActivity(),s.one("play",s.listenForUserActivity_),s.on("fullscreenchange",s.handleFullscreenChange_),s.on("stageclick",s.handleStageClick_),s.breakpoints(s.options_.breakpoints),s.responsive(s.options_.responsive),s.changingSrc_=!1,s.playWaitingForReady_=!1,s.playOnLoadstart_=null,s}return D(t,e),t.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),mn[this.id()]=null,e.prototype.dispose.call(this)},t.prototype.createEl=function(){var t=this.tag,n=void 0,r=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player"),o="video-js"===this.tag.tagName.toLowerCase();r?n=this.el_=t.parentNode:o||(n=this.el_=e.prototype.createEl.call(this,"div"));var s=de(t);if(o){for(n=this.el_=t,t=this.tag=a.createElement("video");n.children.length;)t.appendChild(n.firstChild);se(n,"video-js")||ce(n,"video-js"),n.appendChild(t),r=this.playerElIngest_=n,["autoplay","controls","crossOrigin","defaultMuted","defaultPlaybackRate","loop","muted","playbackRate","src","volume"].forEach((function(e){void 0!==n[e]&&(t[e]=n[e])}))}if(t.setAttribute("tabindex","-1"),s.tabindex="-1",C&&(t.setAttribute("role","application"),s.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in s&&delete s.width,"height"in s&&delete s.height,Object.getOwnPropertyNames(s).forEach((function(e){"class"===e?(n.className+=" "+s[e],o&&(t.className+=" "+s[e])):(n.setAttribute(e,s[e]),o&&t.setAttribute(e,s[e]))})),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=n.player=this,this.addClass("vjs-paused"),!0!==i.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Qe("vjs-styles-dimensions");var c=Se(".vjs-styles-defaults"),l=Se("head");l.insertBefore(this.styleEl_,c?c.nextSibling:l.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var u=t.getElementsByTagName("a"),p=0;p0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),o=r[1]/r[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/o:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*o,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),Ke(this.styleEl_,"\n ."+n+" {\n width: "+e+"px;\n height: "+t+"px;\n }\n\n ."+n+".vjs-fluid {\n padding-top: "+100*o+"%;\n }\n ")}else{var a="number"==typeof this.width_?this.width_:this.options_.width,s="number"==typeof this.height_?this.height_:this.options_.height,c=this.tech_&&this.tech_.el();c&&(a>=0&&(c.width=a),s>=0&&(c.height=s))}},t.prototype.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var r=ht(e),o=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(fn.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var i={source:t,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+o+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};dn.names.forEach((function(e){var t=dn[e];i[t.getterName]=n[t.privateName]})),$(i,this.options_[r]),$(i,this.options_[o]),$(i,this.options_[e.toLowerCase()]),this.tag&&(i.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(i.startTime=this.cache_.currentTime);var a=fn.getTech(e);if(!a)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new a(i),this.tech_.ready(Ze(this,this.handleTechReady_),!0),Mt(this.textTracksJson_||[],this.tech_),ao.forEach((function(e){n.on(n.tech_,e,n["handleTech"+ht(e)+"_"])})),Object.keys(so).forEach((function(e){n.on(n.tech_,e,(function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+so[e]+"_"].bind(n),event:t}):n["handleTech"+so[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),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.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||ae(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},t.prototype.unloadTech_=function(){var e=this;dn.names.forEach((function(t){var n=dn[t];e[n.privateName]=e[n.getterName]()})),this.textTracksJson_=Pt(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},t.prototype.tech=function(e){return void 0===e&&G.warn(s(io)),this.tech_},t.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_)},t.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_)},t.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(e){G("deleting tag.poster throws in some browsers",e)}},t.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")),this.manualAutoplay_(this.autoplay())},t.prototype.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"==typeof e){var n=function(){var e=t.muted();t.muted(!0);var n=t.play();if(n&&n.then&&n.catch)return n.catch((function(n){t.muted(e)}))},r=void 0;if("any"===e?(r=this.play())&&r.then&&r.catch&&r.catch((function(){return n()})):r="muted"===e?n():this.play(),r&&r.then&&r.catch)return r.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(n){t.trigger({type:"autoplay-failure",autoplay:e})}))}},t.prototype.updateSourceCaches_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e,n="";"string"!=typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=jn(this,t)),this.cache_.source=mt({},e,{src:t,type:n});for(var r=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),o=[],i=this.$$("source"),a=[],s=0;s0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(e){return e.callback(e.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},t.prototype.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return e.removeClass("vjs-waiting")}))},t.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},t.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},t.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},t.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},t.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},t.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(G.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},t.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},t.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},t.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},t.prototype.handleTechClick_=function(e){Te(e)&&this.controls_&&(this.paused()?At(this.play()):this.pause())},t.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},t.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},t.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},t.prototype.handleTechTouchEnd_=function(e){e.preventDefault()},t.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},t.prototype.handleStageClick_=function(){this.reportUserActivity()},t.prototype.handleTechFullscreenChange_=function(e,t){t&&this.isFullscreen(t.isFullscreen),this.trigger("fullscreenchange")},t.prototype.handleTechError_=function(){var e=this.tech_.error();this.error(e)},t.prototype.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},t.prototype.getCache=function(){return this.cache_},t.prototype.techCall_=function(e,t){this.ready((function(){if(e in _n)return function(e,t,n,r){return t[n](e.reduce(xn(n),r))}(this.middleware_,this.tech_,e,t);if(e in wn)return bn(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw G(e),e}}),!0)},t.prototype.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in yn)return function(e,t,n){return e.reduceRight(xn(n),t[n]())}(this.middleware_,this.tech_,e);if(e in wn)return bn(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw G("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw G("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw G(t),t}}},t.prototype.play=function(){var e=this,t=this.options_.Promise||i.Promise;return t?new t((function(t){e.play_(t)})):this.play_()},t.prototype.play_=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:At;if(this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_),this.isReady_){if(!this.changingSrc_&&(this.src()||this.currentSrc()))return void t(this.techGet_("play"));this.playOnLoadstart_=function(){e.playOnLoadstart_=null,t(e.play())},this.one("loadstart",this.playOnLoadstart_)}else{if(this.playWaitingForReady_)return;this.playWaitingForReady_=!0,this.ready((function(){e.playWaitingForReady_=!1,t(e.play())}))}},t.prototype.pause=function(){this.techCall_("pause")},t.prototype.paused=function(){return!1!==this.techGet_("paused")},t.prototype.played=function(){return this.techGet_("played")||yt(0,0)},t.prototype.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},t.prototype.currentTime=function(e){return void 0!==e?(e<0&&(e=0),void this.techCall_("setCurrentTime",e)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},t.prototype.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))},t.prototype.remainingTime=function(){return this.duration()-this.currentTime()},t.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},t.prototype.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=yt(0,0)),e},t.prototype.bufferedPercent=function(){return _t(this.buffered(),this.duration())},t.prototype.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},t.prototype.volume=function(e){var t=void 0;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},t.prototype.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},t.prototype.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},t.prototype.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},t.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},t.prototype.isFullscreen=function(e){if(void 0===e)return!!this.isFullscreen_;this.isFullscreen_=!!e},t.prototype.requestFullscreen=function(){var e=wt;this.isFullscreen(!0),e.requestFullscreen?(qe(a,e.fullscreenchange,Ze(this,(function t(n){this.isFullscreen(a[e.fullscreenElement]),!1===this.isFullscreen()&&$e(a,e.fullscreenchange,t),this.trigger("fullscreenchange")}))),this.el_[e.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},t.prototype.exitFullscreen=function(){var e=wt;this.isFullscreen(!1),e.requestFullscreen?a[e.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},t.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=a.documentElement.style.overflow,qe(a,"keydown",Ze(this,this.fullWindowOnEscKey)),a.documentElement.style.overflow="hidden",ce(a.body,"vjs-full-window"),this.trigger("enterFullWindow")},t.prototype.fullWindowOnEscKey=function(e){27===e.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},t.prototype.exitFullWindow=function(){this.isFullWindow=!1,$e(a,"keydown",this.fullWindowOnEscKey),a.documentElement.style.overflow=this.docOrigOverflow,le(a.body,"vjs-full-window"),this.trigger("exitFullWindow")},t.prototype.canPlayType=function(e){for(var t=void 0,n=0,r=this.options_.techOrder;n1?t.src(n.slice(1)):(t.changingSrc_=!1,t.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void t.triggerReady());o=r,i=t.tech_,o.forEach((function(e){return e.setTech&&e.setTech(i)}))}))):this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},t.prototype.src_=function(e){var t,n,r=this,o=this.selectSource([e]);return!o||(t=o.tech,n=this.techName_,ht(t)!==ht(n)?(this.changingSrc_=!0,this.loadTech_(o.tech,o.source),this.tech_.ready((function(){r.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1))},t.prototype.load=function(){this.techCall_("load")},t.prototype.reset=function(){this.tech_&&this.tech_.clearTracks("text"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},t.prototype.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},t.prototype.currentSource=function(){return this.cache_.source||{}},t.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},t.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},t.prototype.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},t.prototype.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t=void 0;"string"==typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t=t||this.options_.autoplay,this.tech_&&this.techCall_("setAutoplay",t)},t.prototype.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},t.prototype.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},t.prototype.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},t.prototype.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},t.prototype.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},t.prototype.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},t.prototype.error=function(e){return void 0===e?this.error_||null:null===e?(this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new St(e),this.addClass("vjs-error"),G.error("(CODE:"+this.error_.code+" "+St.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},t.prototype.reportUserActivity=function(e){this.userActivity_=!0},t.prototype.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},t.prototype.listenForUserActivity_=function(){var e=void 0,t=void 0,n=void 0,r=Ze(this,this.reportUserActivity);this.on("mousedown",(function(){r(),this.clearInterval(e),e=this.setInterval(r,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,r())})),this.on("mouseup",(function(t){r(),this.clearInterval(e)})),this.on("keydown",r),this.on("keyup",r);var o=void 0;this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(o);var e=this.options_.inactivityTimeout;e<=0||(o=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},t.prototype.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},t.prototype.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},t.prototype.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},t.prototype.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},t.prototype.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},t.prototype.removeRemoteTextTrack=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.track,n=void 0===t?arguments[0]:t;if(this.tech_)return this.tech_.removeRemoteTextTrack(n)},t.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},t.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},t.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},t.prototype.language=function(e){if(void 0===e)return this.language_;this.language_=String(e).toLowerCase()},t.prototype.languages=function(){return mt(t.prototype.options_.languages,this.languages_)},t.prototype.toJSON=function(){var e=mt(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return e.name=this.name,e.plugin=this.constructor,e.instance=this,e},e.prototype.trigger=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ue(this.eventBusEl_,e,this.getEventHash(t))},e.prototype.handleStateChanged=function(e){},e.prototype.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t.activePlugins_[e]=!1,this.player=this.state=null,t[e]=yo(e,ho[e])},e.isBasic=function(t){var n="string"==typeof t?vo(t):t;return"function"==typeof n&&!e.prototype.isPrototypeOf(n.prototype)},e.registerPlugin=function(t,n){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+(void 0===t?"undefined":I(t))+".");if(mo(t))G.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(po.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+(void 0===n?"undefined":I(n))+".");return ho[t]=n,"plugin"!==t&&(e.isBasic(n)?po.prototype[t]=function(e,t){var n=function(){bo(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return go(this,e),bo(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(t,n):po.prototype[t]=yo(t,n)),n},e.deregisterPlugin=function(e){if("plugin"===e)throw new Error("Cannot de-register base plugin.");mo(e)&&(delete ho[e],delete po.prototype[e])},e.getPlugins=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.keys(ho),t=void 0;return e.forEach((function(e){var n=vo(e);n&&((t=t||{})[e]=n)})),t},e.getPluginVersion=function(e){var t=vo(e);return t&&t.VERSION||""},e}();_o.getPlugin=vo,_o.BASE_PLUGIN_NAME="plugin",_o.registerPlugin("plugin",_o),po.prototype.usingPlugin=function(e){return!!this.activePlugins_&&!0===this.activePlugins_[e]},po.prototype.hasPlugin=function(e){return!!mo(e)};var wo=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":I(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.super_=t)};"undefined"==typeof HTMLVideoElement&&ee()&&(a.createElement("video"),a.createElement("audio"),a.createElement("track"),a.createElement("video-js"));var xo=function(e){return 0===e.indexOf("#")?e.slice(1):e};function ko(e,t,n){var r=ko.getPlayer(e);if(r)return t&&G.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var o="string"==typeof e?Se("#"+xo(e)):e;if(!te(o))throw new TypeError("The element or ID supplied is not valid. (videojs)");a.body.contains(o)||G.warn("The element supplied is not included in the DOM"),t=t||{},ko.hooks("beforesetup").forEach((function(e){var n=e(o,mt(t));U(n)&&!Array.isArray(n)?t=mt(t,n):G.error("please return an object in beforesetup hooks")}));var i=vt.getComponent("Player");return r=new i(o,t,n),ko.hooks("setup").forEach((function(e){return e(r)})),r}if(ko.hooks_={},ko.hooks=function(e,t){return ko.hooks_[e]=ko.hooks_[e]||[],t&&(ko.hooks_[e]=ko.hooks_[e].concat(t)),ko.hooks_[e]},ko.hook=function(e,t){ko.hooks(e,t)},ko.hookOnce=function(e,t){ko.hooks(e,[].concat(t).map((function(t){return function n(){return ko.removeHook(e,n),t.apply(void 0,arguments)}})))},ko.removeHook=function(e,t){var n=ko.hooks(e).indexOf(t);return!(n<=-1)&&(ko.hooks_[e]=ko.hooks_[e].slice(),ko.hooks_[e].splice(n,1),!0)},!0!==i.VIDEOJS_NO_DYNAMIC_STYLE&&ee()){var Oo=Se(".vjs-styles-defaults");if(!Oo){Oo=Qe("vjs-styles-defaults");var jo=Se("head");jo&&jo.insertBefore(Oo,jo.firstChild),Ke(Oo,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}Je(1,ko),ko.VERSION=p,ko.options=po.prototype.options_,ko.getPlayers=function(){return po.players},ko.getPlayer=function(e){var t=po.players,n=void 0;if("string"==typeof e){var r=xo(e),o=t[r];if(o)return o;n=Se("#"+r)}else n=e;if(te(n)){var i=n,a=i.player,s=i.playerId;if(a||t[s])return a||t[s]}},ko.getAllPlayers=function(){return Object.keys(po.players).map((function(e){return po.players[e]})).filter(Boolean)},ko.players=po.players,ko.getComponent=vt.getComponent,ko.registerComponent=function(e,t){fn.isTech(t)&&G.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),vt.registerComponent.call(vt,e,t)},ko.getTech=fn.getTech,ko.registerTech=fn.registerTech,ko.use=function(e,t){hn[e]=hn[e]||[],hn[e].push(t)},!E&&Object.defineProperty?(Object.defineProperty(ko,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(ko.middleware,"TERMINATOR",{value:vn,writeable:!1,enumerable:!0})):ko.middleware={TERMINATOR:vn},ko.browser=B,ko.TOUCH_ENABLED=P,ko.extend=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(){e.apply(this,arguments)},r={};for(var o in"object"===(void 0===t?"undefined":I(t))?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),r=t):"function"==typeof t&&(n=t),wo(n,e),r)r.hasOwnProperty(o)&&(n.prototype[o]=r[o]);return n},ko.mergeOptions=mt,ko.bind=Ze,ko.registerPlugin=_o.registerPlugin,ko.deregisterPlugin=_o.deregisterPlugin,ko.plugin=function(e,t){return G.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),_o.registerPlugin(e,t)},ko.getPlugins=_o.getPlugins,ko.getPlugin=_o.getPlugin,ko.getPluginVersion=_o.getPluginVersion,ko.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),ko.options.languages=mt(ko.options.languages,((n={})[e]=t,n)),ko.options.languages[e]},ko.log=G,ko.createLogger=Y,ko.createTimeRange=ko.createTimeRanges=yt,ko.formatTime=Hn,ko.setFormatTime=function(e){zn=e},ko.resetFormatTime=function(){zn=Fn},ko.parseUrl=Jt,ko.isCrossOrigin=Zt,ko.EventTarget=nt,ko.on=qe,ko.one=Ve,ko.off=$e,ko.trigger=Ue,ko.xhr=l,ko.TextTrack=rn,ko.AudioTrack=on,ko.VideoTrack=an,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){ko[e]=function(){return G.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),Ce[e].apply(null,arguments)}})),ko.computedStyle=J,ko.dom=Ce,ko.url=en,e.exports=ko},function(e,t,n){(function(t){var r,o=void 0!==t?t:"undefined"!=typeof window?window:{},i=n(253);"undefined"!=typeof document?r=document:(r=o["__GLOBAL_DOCUMENT_CACHE@4"])||(r=o["__GLOBAL_DOCUMENT_CACHE@4"]=i),e.exports=r}).call(this,n(40))},function(e,t){},function(e,t){function n(e){return e.replace(/\n\r?\s*/g,"")}e.exports=function(e){for(var t="",r=0;raiqicha://open.app?params=',n=o.firstChild,o.setAttribute("style","display:none; position:absolute;"),a.body.appendChild(o));for(var s={},c=0;c',e=t.firstChild.href}return e},Kt=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(e);if(t)return t.pop().toLowerCase()}return""},Zt=function(e){var t=i.location,n=Jt(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},en=(Object.freeze||Object)({parseUrl:Jt,getAbsoluteURL:Qt,getFileExtension:Kt,isCrossOrigin:Zt}),tn=function(e,t){var n=new i.WebVTT.Parser(i,i.vttjs,i.WebVTT.StringDecoder()),r=[];n.oncue=function(e){t.addCue(e)},n.onparsingerror=function(e){r.push(e)},n.onflush=function(){t.trigger({type:"loadeddata",target:t})},n.parse(e),r.length>0&&(i.console&&i.console.groupCollapsed&&i.console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach((function(e){return G.error(e)})),i.console&&i.console.groupEnd&&i.console.groupEnd()),n.flush()},nn=function(e,t){var n={uri:e},r=Zt(e);r&&(n.cors=r),l(n,Ze(this,(function(e,n,r){if(e)return G.error(e,n);if(t.loaded_=!0,"function"!=typeof i.WebVTT){if(t.tech_){var o=function(){return tn(r,t)};t.tech_.on("vttjsloaded",o),t.tech_.on("vttjserror",(function(){G.error("vttjs failed to load, stopping trying to process "+t.src),t.tech_.off("vttjsloaded",o)}))}}else tn(r,t)})))},rn=function(e){function t(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(L(this,t),!r.tech)throw new Error("A tech was not provided.");var o=mt(r,{kind:Xt[r.kind]||"subtitles",language:r.language||r.srclang||""}),i=Gt[o.mode]||"disabled",a=o.default;"metadata"!==o.kind&&"chapters"!==o.kind||(i="hidden");var s=n=N(this,e.call(this,o));if(s.tech_=o.tech,E)for(var c in t.prototype)"constructor"!==c&&(s[c]=t.prototype[c]);s.cues_=[],s.activeCues_=[];var l=new Ut(s.cues_),u=new Ut(s.activeCues_),p=!1,d=Ze(s,(function(){this.activeCues=this.activeCues,p&&(this.trigger("cuechange"),p=!1)}));return"disabled"!==i&&s.tech_.ready((function(){s.tech_.on("timeupdate",d)}),!0),Object.defineProperty(s,"default",{get:function(){return a},set:function(){}}),Object.defineProperty(s,"mode",{get:function(){return i},set:function(e){var t=this;Gt[e]&&("disabled"!==(i=e)?this.tech_.ready((function(){t.tech_.on("timeupdate",d)}),!0):this.tech_.off("timeupdate",d),this.trigger("modechange"))}}),Object.defineProperty(s,"cues",{get:function(){return this.loaded_?l:null},set:function(){}}),Object.defineProperty(s,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return u;for(var e=this.tech_.currentTime(),t=[],n=0,r=this.cues.length;n=e?t.push(o):o.startTime===o.endTime&&o.startTime<=e&&o.startTime+.5>=e&&t.push(o)}if(p=!1,t.length!==this.activeCues_.length)p=!0;else for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{};L(this,t);var o=mt(r,{kind:Wt[r.kind]||""}),i=n=N(this,e.call(this,o)),a=!1;if(E)for(var s in t.prototype)"constructor"!==s&&(i[s]=t.prototype[s]);return Object.defineProperty(i,"enabled",{get:function(){return a},set:function(e){"boolean"==typeof e&&e!==a&&(a=e,this.trigger("enabledchange"))}}),o.enabled&&(i.enabled=o.enabled),i.loaded_=!0,N(n,i)}return D(t,e),t}(Yt),an=function(e){function t(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};L(this,t);var o=mt(r,{kind:Vt[r.kind]||""}),i=n=N(this,e.call(this,o)),a=!1;if(E)for(var s in t.prototype)"constructor"!==s&&(i[s]=t.prototype[s]);return Object.defineProperty(i,"selected",{get:function(){return a},set:function(e){"boolean"==typeof e&&e!==a&&(a=e,this.trigger("selectedchange"))}}),o.selected&&(i.selected=o.selected),N(n,i)}return D(t,e),t}(Yt),sn=0,cn=2,ln=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};L(this,t);var r=N(this,e.call(this)),o=void 0,i=r;if(E)for(var s in i=a.createElement("custom"),t.prototype)"constructor"!==s&&(i[s]=t.prototype[s]);var c=new rn(n);return i.kind=c.kind,i.src=c.src,i.srclang=c.language,i.label=c.label,i.default=c.default,Object.defineProperty(i,"readyState",{get:function(){return o}}),Object.defineProperty(i,"track",{get:function(){return c}}),o=sn,c.addEventListener("loadeddata",(function(){o=cn,i.trigger({type:"load",target:i})})),E?N(r,i):r}return D(t,e),t}(nt);ln.prototype.allowedEvents_={load:"load"},ln.NONE=sn,ln.LOADING=1,ln.LOADED=cn,ln.ERROR=3;var un={audio:{ListClass:Ft,TrackClass:on,capitalName:"Audio"},video:{ListClass:Ht,TrackClass:an,capitalName:"Video"},text:{ListClass:qt,TrackClass:rn,capitalName:"Text"}};Object.keys(un).forEach((function(e){un[e].getterName=e+"Tracks",un[e].privateName=e+"Tracks_"}));var pn={remoteText:{ListClass:qt,TrackClass:rn,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:$t,TrackClass:ln,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},dn=mt(un,pn);pn.names=Object.keys(pn),un.names=Object.keys(un),dn.names=[].concat(pn.names).concat(un.names);var fn=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};L(this,t),n.reportTouchActivity=!1;var o=N(this,e.call(this,null,n,r));return o.hasStarted_=!1,o.on("playing",(function(){this.hasStarted_=!0})),o.on("loadstart",(function(){this.hasStarted_=!1})),dn.names.forEach((function(e){var t=dn[e];n&&n[t.getterName]&&(o[t.privateName]=n[t.getterName])})),o.featuresProgressEvents||o.manualProgressOn(),o.featuresTimeupdateEvents||o.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===n["native"+e+"Tracks"]&&(o["featuresNative"+e+"Tracks"]=!1)})),!1===n.nativeCaptions||!1===n.nativeTextTracks?o.featuresNativeTextTracks=!1:!0!==n.nativeCaptions&&!0!==n.nativeTextTracks||(o.featuresNativeTextTracks=!0),o.featuresNativeTextTracks||o.emulateTextTracks(),o.autoRemoteTextTracks_=new dn.text.ListClass,o.initTrackListeners(),n.nativeControlsForTouch||o.emitTapEvents(),o.constructor&&(o.name_=o.constructor.name||"Unknown Tech"),o}return D(t,e),t.prototype.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",(function(){return t.setTimeout((function(){return t.triggerSourceset(e)}),1)})),this.trigger({src:e,type:"sourceset"})},t.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},t.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},t.prototype.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Ze(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},t.prototype.onDurationChange=function(e){this.duration_=this.duration()},t.prototype.buffered=function(){return yt(0,0)},t.prototype.bufferedPercent=function(){return _t(this.buffered(),this.duration_)},t.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},t.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},t.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},t.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},t.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.dispose=function(){this.clearTracks(un.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},t.prototype.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach((function(e){for(var n=t[e+"Tracks"]()||[],r=n.length;r--;){var o=n[r];"text"===e&&t.removeRemoteTextTrack(o),n.removeTrack(o)}}))},t.prototype.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},t.prototype.reset=function(){},t.prototype.error=function(e){return void 0!==e&&(this.error_=new St(e),this.trigger("error")),this.error_},t.prototype.played=function(){return this.hasStarted_?yt(0,0):yt()},t.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.initTrackListeners=function(){var e=this;un.names.forEach((function(t){var n=un[t],r=function(){e.trigger(t+"trackchange")},o=e[n.getterName]();o.addEventListener("removetrack",r),o.addEventListener("addtrack",r),e.on("dispose",(function(){o.removeEventListener("removetrack",r),o.removeEventListener("addtrack",r)}))}))},t.prototype.addWebVttScript_=function(){var e=this;if(!i.WebVTT)if(a.body.contains(this.el())){if(!this.options_["vtt.js"]&&V(u)&&Object.keys(u).length>0)return void this.trigger("vttjsloaded");var t=a.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),i.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},t.prototype.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},o=function(e){return t.removeTrack(e.track)};n.on("addtrack",r),n.on("removetrack",o),this.addWebVttScript_();var i=function(){return e.trigger("texttrackchange")},a=function(){i();for(var e=0;e4&&void 0!==arguments[4]?arguments[4]:{},i=e.textTracks();o.kind=t,n&&(o.label=n),r&&(o.language=r),o.tech=e;var a=new dn.text.TrackClass(o);return i.addTrack(a),a}(this,e,t,n)},t.prototype.createRemoteTextTrack=function(e){var t=mt(e,{tech:this});return new pn.remoteTextEl.TrackClass(t)},t.prototype.addRemoteTextTrack=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1],r=this.createRemoteTextTrack(t);return!0!==n&&!1!==n&&(G.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),n=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==n&&this.ready((function(){return e.autoRemoteTextTracks_.addTrack(r.track)})),r},t.prototype.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},t.prototype.getVideoPlaybackQuality=function(){return{}},t.prototype.setPoster=function(){},t.prototype.playsinline=function(){},t.prototype.setPlaysinline=function(){},t.prototype.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,n){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,n){if(t.techs_||(t.techs_={}),!t.isTech(n))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=ht(e),t.techs_[e]=n,"Tech"!==e&&t.defaultTechOrder_.push(e),n},t.getTech=function(e){if(e)return e=ht(e),t.techs_&&t.techs_[e]?t.techs_[e]:i&&i.videojs&&i.videojs[e]?(G.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),i.videojs[e]):void 0},t}(vt);dn.names.forEach((function(e){var t=dn[e];fn.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),fn.prototype.featuresVolumeControl=!0,fn.prototype.featuresMuteControl=!0,fn.prototype.featuresFullscreenResize=!1,fn.prototype.featuresPlaybackRate=!1,fn.prototype.featuresProgressEvents=!1,fn.prototype.featuresSourceset=!1,fn.prototype.featuresTimeupdateEvents=!1,fn.prototype.featuresNativeTextTracks=!1,fn.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var r=e.sourceHandlers;r||(r=e.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,t)},e.canPlayType=function(t){for(var n=e.sourceHandlers||[],r=void 0,o=0;o0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2],o=arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=n[0],c=n.slice(1);if("string"==typeof s)e(t,hn[s],r,o,i,a);else if(s){var l=function(e,t){var n=mn[e.id()],r=null;if(null==n)return r=t(e),mn[e.id()]=[[t,r]],r;for(var o=0;o3&&void 0!==arguments[3]?arguments[3]:null,o="call"+ht(n),i=e.reduce(xn(o),r),a=i===vn,s=a?null:t[n](i);return function(e,t,n,r){for(var o=e.length-1;o>=0;o--){var i=e[o];i[t]&&i[t](r,n)}}(e,n,s,a),s}var yn={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},_n={setCurrentTime:1},wn={play:1,pause:1};function xn(e){return function(t,n){return t===vn?vn:n[e]?n[e](t):t}}var kn={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL"},On=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=Kt(e),n=kn[t.toLowerCase()];return n||""},jn=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter((function(e){return e.src===t}));if(n.length)return n[0].type;for(var r=e.$$("source"),o=0;o0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=$({innerHTML:'',className:this.buildCSSClass(),tabIndex:0},n),"button"===t&&G.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),r=$({role:"button"},r),this.tabIndex_=n.tabIndex;var o=e.prototype.createEl.call(this,t,n,r);return this.createControlTextEl(o),o},t.prototype.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},t.prototype.createControlTextEl=function(e){return this.controlTextEl_=oe("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},t.prototype.controlText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,ie(this.controlTextEl_,n),this.nonIconControl||t.setAttribute("title",n)},t.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},t.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},t.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},t.prototype.handleClick=function(e){},t.prototype.handleFocus=function(e){qe(a,"keydown",Ze(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.trigger("click")):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t.prototype.handleBlur=function(e){$e(a,"keydown",Ze(this,this.handleKeyPress))},t}(vt);vt.registerComponent("ClickableComponent",En);var Cn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.update(),n.on("posterchange",Ze(o,o.update)),o}return D(t,e),t.prototype.dispose=function(){this.player().off("posterchange",this.update),e.prototype.dispose.call(this)},t.prototype.createEl=function(){var e=oe("div",{className:"vjs-poster",tabIndex:-1});return M||(this.fallbackImg_=oe("img"),e.appendChild(this.fallbackImg_)),e},t.prototype.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},t.prototype.setSrc=function(e){if(this.fallbackImg_)this.fallbackImg_.src=e;else{var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t}},t.prototype.handleClick=function(e){this.player_.controls()&&(this.player_.paused()?At(this.player_.play()):this.player_.pause())},t}(En);vt.registerComponent("PosterImage",Cn);var An={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Rn(e,t){var n=void 0;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function Pn(e,t,n){try{e.style[t]=n}catch(e){return}}var Mn=function(e){function t(n,r,o){L(this,t);var a=N(this,e.call(this,n,r,o)),s=Ze(a,a.updateDisplay);return n.on("loadstart",Ze(a,a.toggleDisplay)),n.on("texttrackchange",s),n.on("loadstart",Ze(a,a.preselectTrack)),n.ready(Ze(a,(function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)this.hide();else{n.on("fullscreenchange",s),n.on("playerresize",s),i.addEventListener&&i.addEventListener("orientationchange",s),n.on("dispose",(function(){return i.removeEventListener("orientationchange",s)}));for(var e=this.options_.playerOptions.tracks||[],t=0;t1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e="button",t=$({innerHTML:'',className:this.buildCSSClass()},t),n=$({type:"button"},n);var r=vt.prototype.createEl.call(this,e,t,n);return this.createControlTextEl(r),r},t.prototype.addChild=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.constructor.name;return G.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),vt.prototype.addChild.call(this,e,t)},t.prototype.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},t.prototype.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},t.prototype.handleKeyPress=function(t){32!==t.which&&13!==t.which&&e.prototype.handleKeyPress.call(this,t)},t}(En);vt.registerComponent("Button",In);var Ln=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.mouseused_=!1,o.on("mousedown",o.handleMouseDown),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-big-play-button"},t.prototype.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY)At(t);else{var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(r){var o=function(){return r.focus()};Ct(t)?t.then(o,(function(){})):this.setTimeout(o,1)}else this.player_.focus()}},t.prototype.handleKeyPress=function(t){this.mouseused_=!1,e.prototype.handleKeyPress.call(this,t)},t.prototype.handleMouseDown=function(e){this.mouseused_=!0},t}(In);Ln.prototype.controlText_="Play Video",vt.registerComponent("BigPlayButton",Ln);var Dn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.controlText(r&&r.controlText||o.localize("Close")),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t}(In);vt.registerComponent("CloseButton",Dn);var Nn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.on(n,"play",o.handlePlay),o.on(n,"pause",o.handlePause),o.on(n,"ended",o.handleEnded),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.prototype.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.prototype.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.prototype.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},t}(In);Nn.prototype.controlText_="Play",vt.registerComponent("PlayToggle",Nn);var Fn=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),o=Math.floor(e/3600),i=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(o=r=n="-"),(o=o>0||a>0?o+":":"")+(r=((o||i>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)},zn=Fn;var Hn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return zn(e,t)},qn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.throttledUpdateContent=et(Ze(o,o.updateContent),25),o.on(n,"timeupdate",o.throttledUpdateContent),o}return D(t,e),t.prototype.createEl=function(t){var n=this.buildCSSClass(),r=e.prototype.createEl.call(this,"div",{className:n+" vjs-time-control vjs-control",innerHTML:''+this.localize(this.labelText_)+" "});return this.contentEl_=oe("span",{className:n+"-display"},{"aria-live":"off"}),this.updateTextNode_(),r.appendChild(this.contentEl_),r},t.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},t.prototype.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=a.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},t.prototype.formatTime_=function(e){return Hn(e)},t.prototype.updateFormattedTime_=function(e){var t=this.formatTime_(e);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},t.prototype.updateContent=function(e){},t}(vt);qn.prototype.labelText_="Time",qn.prototype.controlText_="Time",vt.registerComponent("TimeDisplay",qn);var $n=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.on(n,"ended",o.handleEnded),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-current-time"},t.prototype.updateContent=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(t)},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},t}(qn);$n.prototype.labelText_="Current Time",$n.prototype.controlText_="Current Time",vt.registerComponent("CurrentTimeDisplay",$n);var Un=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.on(n,"durationchange",o.updateContent),o.on(n,"loadedmetadata",o.throttledUpdateContent),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-duration"},t.prototype.updateContent=function(e){var t=this.player_.duration();t&&this.duration_!==t&&(this.duration_=t,this.updateFormattedTime_(t))},t}(qn);Un.prototype.labelText_="Duration",Un.prototype.controlText_="Duration",vt.registerComponent("DurationDisplay",Un);var Vn=function(e){function t(){return L(this,t),N(this,e.apply(this,arguments))}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"t.length;u--)this.el_.removeChild(o[u-1]);o.length=t.length},t}(vt);vt.registerComponent("LoadProgressBar",Yn);var Jn=function(e){function t(){return L(this,t),N(this,e.apply(this,arguments))}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},t.prototype.update=function(e,t,n){var r=be(this.el_),o=be(this.player_.el()),i=e.width*t;if(o&&r){var a=e.left-o.left+i,s=e.width-i+(o.right-e.right),c=r.width/2;ar.width&&(c=r.width),this.el_.style.right="-"+c+"px",ie(this.el_,n)}},t}(vt);vt.registerComponent("TimeTooltip",Jn);var Qn=function(e){function t(){return L(this,t),N(this,e.apply(this,arguments))}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:''+this.localize("Progress")+": 0%"})},t.prototype.update=function(e,t){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var r=n.player_.scrubbing()?n.player_.getCache().currentTime:n.player_.currentTime(),o=Hn(r,n.player_.duration()),i=n.getChild("timeTooltip");i&&i.update(e,t,o)}))},t}(vt);Qn.prototype.options_={children:[]},C&&!(C>8)||b||_||Qn.prototype.options_.children.push("timeTooltip"),vt.registerComponent("PlayProgressBar",Qn);var Kn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.update=et(Ze(o,o.update),25),o}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.prototype.update=function(e,t){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var r=n.player_.duration(),o=Hn(t*r,r);n.el_.style.left=e.width*t+"px",n.getChild("timeTooltip").update(e,t,o)}))},t}(vt);Kn.prototype.options_={children:["timeTooltip"]},vt.registerComponent("MouseTimeDisplay",Kn);var Zn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.setEventHandlers_(),o}return D(t,e),t.prototype.setEventHandlers_=function(){var e=this;this.update=et(Ze(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.updateInterval=null,this.on(this.player_,["playing"],(function(){e.clearInterval(e.updateInterval),e.updateInterval=e.setInterval((function(){e.requestAnimationFrame((function(){e.update()}))}),30)})),this.on(this.player_,["ended","pause","waiting"],(function(){e.clearInterval(e.updateInterval)})),this.on(this.player_,["timeupdate","ended"],this.update)},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.prototype.update_=function(e,t){var n=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Hn(e,n),Hn(n,n)],"{1} of {2}")),this.bar.update(be(this.el_),t)},t.prototype.update=function(t){var n=e.prototype.update.call(this);return this.update_(this.getCurrentTime_(),n),n},t.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.prototype.handleEnded=function(e){this.update_(this.player_.duration(),1)},t.prototype.getPercent=function(){var e=this.getCurrentTime_()/this.player_.duration();return e>=1?1:e},t.prototype.handleMouseDown=function(t){Te(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},t.prototype.handleMouseMove=function(e){if(Te(e)){var t=this.calculateDistance(e)*this.player_.duration();t===this.player_.duration()&&(t-=.1),this.player_.currentTime(t)}},t.prototype.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},t.prototype.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},t.prototype.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&At(this.player_.play())},t.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},t.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},t.prototype.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.handleAction(t)):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t}(Gn);Zn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},C&&!(C>8)||b||_||Zn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Zn.prototype.playerEvent="timeupdate",vt.registerComponent("SeekBar",Zn);var er=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.handleMouseMove=et(Ze(o,o.handleMouseMove),25),o.throttledHandleMouseSeek=et(Ze(o,o.handleMouseSeek),25),o.enable(),o}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.prototype.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("mouseTimeDisplay"),r=t.el(),o=be(r),i=_e(r,e).x;i>1?i=1:i<0&&(i=0),n&&n.update(o,i)}},t.prototype.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},t.prototype.enabled=function(){return this.enabled_},t.prototype.disable=function(){this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},t.prototype.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},t.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseUp(e),this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t}(vt);er.prototype.options_={children:["seekBar"]},vt.registerComponent("ProgressControl",er);var tr=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.on(n,"fullscreenchange",o.handleFullscreenChange),!1===a[wt.fullscreenEnabled]&&o.disable(),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.prototype.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(In);tr.prototype.controlText_="Fullscreen",vt.registerComponent("FullscreenToggle",tr);var nr=function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))},rr=function(e){function t(){return L(this,t),N(this,e.apply(this,arguments))}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})},t}(vt);vt.registerComponent("VolumeLevel",rr);var or=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.on("slideractive",o.updateLastVolume_),o.on(n,"volumechange",o.updateARIAAttributes),n.ready((function(){return o.updateARIAAttributes()})),o}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.prototype.handleMouseDown=function(t){Te(t)&&e.prototype.handleMouseDown.call(this,t)},t.prototype.handleMouseMove=function(e){Te(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.prototype.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},t.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.prototype.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(Gn);or.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},or.prototype.playerEvent="volumechange",vt.registerComponent("VolumeBar",or);var ir=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L(this,t),r.vertical=r.vertical||!1,(void 0===r.volumeBar||V(r.volumeBar))&&(r.volumeBar=r.volumeBar||{},r.volumeBar.vertical=r.vertical);var o=N(this,e.call(this,n,r));return nr(o,n),o.throttledHandleMouseMove=et(Ze(o,o.handleMouseMove),25),o.on("mousedown",o.handleMouseDown),o.on("touchstart",o.handleMouseDown),o.on(o.volumeBar,["focus","slideractive"],(function(){o.volumeBar.addClass("vjs-slider-active"),o.addClass("vjs-slider-active"),o.trigger("slideractive")})),o.on(o.volumeBar,["blur","sliderinactive"],(function(){o.volumeBar.removeClass("vjs-slider-active"),o.removeClass("vjs-slider-active"),o.trigger("sliderinactive")})),o}return D(t,e),t.prototype.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},t.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(vt);ir.prototype.options_={children:["volumeBar"]},vt.registerComponent("VolumeControl",ir);var ar=function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))},sr=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return ar(o,n),o.on(n,["loadstart","volumechange"],o.update),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},t.prototype.update=function(e){this.updateIcon_(),this.updateControlText_()},t.prototype.updateIcon_=function(){var e=this.player_.volume(),t=3;b&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)le(this.el_,"vjs-vol-"+n);ce(this.el_,"vjs-vol-"+t)},t.prototype.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(In);sr.prototype.controlText_="Mute",vt.registerComponent("MuteToggle",sr);var cr=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L(this,t),void 0!==r.inline?r.inline=r.inline:r.inline=!0,(void 0===r.volumeControl||V(r.volumeControl))&&(r.volumeControl=r.volumeControl||{},r.volumeControl.vertical=!r.inline);var o=N(this,e.call(this,n,r));return o.on(n,["loadstart"],o.volumePanelState_),o.on(o.volumeControl,["slideractive"],o.sliderActive_),o.on(o.volumeControl,["sliderinactive"],o.sliderInactive_),o}return D(t,e),t.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},t.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.prototype.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},t.prototype.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},t}(vt);cr.prototype.options_={children:["muteToggle","volumeControl"]},vt.registerComponent("VolumePanel",cr);var lr=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return r&&(o.menuButton_=r.menuButton),o.focusedChild_=-1,o.on("keydown",o.handleKeyPress),o}return D(t,e),t.prototype.addItem=function(e){this.addChild(e),e.on("click",Ze(this,(function(t){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus())})))},t.prototype.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=oe(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),qe(n,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),n},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepForward()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepBack())},t.prototype.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.prototype.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.prototype.focus=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.children().slice(),n=t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className);n&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(vt);vt.registerComponent("Menu",lr);var ur=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L(this,t);var o=N(this,e.call(this,n,r));o.menuButton_=new In(n,r),o.menuButton_.controlText(o.controlText_),o.menuButton_.el_.setAttribute("aria-haspopup","true");var i=In.prototype.buildCSSClass();return o.menuButton_.el_.className=o.buildCSSClass()+" "+i,o.menuButton_.removeClass("vjs-control"),o.addChild(o.menuButton_),o.update(),o.enabled_=!0,o.on(o.menuButton_,"tap",o.handleClick),o.on(o.menuButton_,"click",o.handleClick),o.on(o.menuButton_,"focus",o.handleFocus),o.on(o.menuButton_,"blur",o.handleBlur),o.on("keydown",o.handleSubmenuKeyPress),o}return D(t,e),t.prototype.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.prototype.createMenu=function(){var e=new lr(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=oe("li",{className:"vjs-menu-title",innerHTML:ht(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,e.children_.unshift(t),ae(t,e.contentEl())}if(this.items=this.createItems(),this.items)for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(e,t)},t.prototype.handleClick=function(e){this.one(this.menu.contentEl(),"mouseleave",Ze(this,(function(e){this.unpressButton(),this.el_.blur()}))),this.buttonPressed_?this.unpressButton():this.pressButton()},t.prototype.focus=function(){this.menuButton_.focus()},t.prototype.blur=function(){this.menuButton_.blur()},t.prototype.handleFocus=function(){qe(a,"keydown",Ze(this,this.handleKeyPress))},t.prototype.handleBlur=function(){$e(a,"keydown",Ze(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(e){27===e.which||9===e.which?(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus())):38!==e.which&&40!==e.which||this.buttonPressed_||(this.pressButton(),e.preventDefault())},t.prototype.handleSubmenuKeyPress=function(e){27!==e.which&&9!==e.which||(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus()))},t.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),b&&ne())return;this.menu.focus()}},t.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},t.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},t.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(vt);vt.registerComponent("MenuButton",ur);var pr=function(e){function t(n,r){L(this,t);var o=r.tracks,i=N(this,e.call(this,n,r));if(i.items.length<=1&&i.hide(),!o)return N(i);var a=Ze(i,i.update);return o.addEventListener("removetrack",a),o.addEventListener("addtrack",a),i.player_.on("ready",a),i.player_.on("dispose",(function(){o.removeEventListener("removetrack",a),o.removeEventListener("addtrack",a)})),i}return D(t,e),t}(ur);vt.registerComponent("TrackButton",pr);var dr=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.selectable=r.selectable,o.isSelected_=r.selected||!1,o.multiSelectable=r.multiSelectable,o.selected(o.isSelected_),o.selectable?o.multiSelectable?o.el_.setAttribute("role","menuitemcheckbox"):o.el_.setAttribute("role","menuitemradio"):o.el_.setAttribute("role","menuitem"),o}return D(t,e),t.prototype.createEl=function(t,n,r){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",$({className:"vjs-menu-item",innerHTML:''+this.localize(this.options_.label)+"",tabIndex:-1},n),r)},t.prototype.handleClick=function(e){this.selected(!0)},t.prototype.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(En);vt.registerComponent("MenuItem",dr);var fr=function(e){function t(n,r){L(this,t);var o=r.track,s=n.textTracks();r.label=o.label||o.language||"Unknown",r.selected="showing"===o.mode;var c=N(this,e.call(this,n,r));c.track=o;var l=function(){for(var e=arguments.length,t=Array(e),n=0;n-1?"showing"!==a.mode&&(a.mode="showing"):"disabled"!==a.mode&&(a.mode="disabled")}},t.prototype.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},t.prototype.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},t.prototype.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(dr);vt.registerComponent("TextTrackMenuItem",fr);var hr=function(e){function t(n,r){return L(this,t),r.track={player:n,kind:r.kind,kinds:r.kinds,default:!1,mode:"disabled"},r.kinds||(r.kinds=[r.kind]),r.label?r.track.label=r.label:r.track.label=r.kinds.join(" and ")+" off",r.selectable=!0,r.multiSelectable=!1,N(this,e.call(this,n,r))}return D(t,e),t.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,o=t.length;r-1&&"showing"===i.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},t.prototype.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,o=t.length;r-1&&"showing"===i.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(fr);vt.registerComponent("OffTextTrackMenuItem",hr);var mr=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return L(this,t),r.tracks=n.textTracks(),N(this,e.call(this,n,r))}return D(t,e),t.prototype.createItems=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fr,n=void 0;this.label_&&(n=this.label_+" off"),e.push(new hr(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var o=0;o-1){var a=new t(this.player_,{track:i,selectable:!0,multiSelectable:!1});a.addClass("vjs-"+i.kind+"-menu-item"),e.push(a)}}return e},t}(pr);vt.registerComponent("TextTrackButton",mr);var vr=function(e){function t(n,r){L(this,t);var o=r.track,i=r.cue,a=n.currentTime();r.selectable=!0,r.multiSelectable=!1,r.label=i.text,r.selected=i.startTime<=a&&a=0;t--){var n=e[t];if(n.kind===this.kind_)return n}},t.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(ht(this.kind_))},t.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},t.prototype.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n\n '+this.localize("Captions")+"\n "),o+="",e.prototype.createEl.call(this,t,$({innerHTML:o},n),r)},t}(fr);vt.registerComponent("SubsCapsMenuItem",xr);var kr=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L(this,t);var o=N(this,e.call(this,n,r));return o.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(o.player_.language_)>-1&&(o.label_="captions"),o.menuButton_.controlText(ht(o.label_)),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new _r(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,xr)},t}(mr);kr.prototype.kinds_=["captions","subtitles"],kr.prototype.controlText_="Subtitles",vt.registerComponent("SubsCapsButton",kr);var Or=function(e){function t(n,r){L(this,t);var o=r.track,i=n.audioTracks();r.label=o.label||o.language||"Unknown",r.selected=o.enabled;var a=N(this,e.call(this,n,r));a.track=o,a.addClass("vjs-"+o.kind+"-menu-item");var s=function(){for(var e=arguments.length,t=Array(e),n=0;n\n '+this.localize("Descriptions")+"\n "),o+="",e.prototype.createEl.call(this,t,$({innerHTML:o},n),r)},t.prototype.handleClick=function(t){var n=this.player_.audioTracks();e.prototype.handleClick.call(this,t);for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return L(this,t),r.tracks=n.audioTracks(),N(this,e.call(this,n,r))}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;for(var t=this.player_.audioTracks(),n=0;n=0;n--)e.addChild(new Tr(this.player(),{rate:t[n]+"x"}));return e},t.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.prototype.handleClick=function(e){for(var t=this.player().playbackRate(),n=this.playbackRates(),r=n[0],o=0;ot){r=n[o];break}this.player().playbackRate(r)},t.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},t.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},t.prototype.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.prototype.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(ur);Sr.prototype.controlText_="Playback Rate",vt.registerComponent("PlaybackRateMenuButton",Sr);var Er=function(e){function t(){return L(this,t),N(this,e.apply(this,arguments))}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(vt);vt.registerComponent("Spacer",Er);var Cr=function(e){function t(){return L(this,t),N(this,e.apply(this,arguments))}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(Er);vt.registerComponent("CustomControlSpacer",Cr);var Ar=function(e){function t(){return L(this,t),N(this,e.apply(this,arguments))}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(vt);Ar.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},vt.registerComponent("ControlBar",Ar);var Rr=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.on(n,"error",o.open),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},t.prototype.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(It);Rr.prototype.options_=mt(It.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),vt.registerComponent("ErrorDisplay",Rr);var Pr=["#000","Black"],Mr=["#00F","Blue"],Br=["#0FF","Cyan"],Ir=["#0F0","Green"],Lr=["#F0F","Magenta"],Dr=["#F00","Red"],Nr=["#FFF","White"],Fr=["#FF0","Yellow"],zr=["1","Opaque"],Hr=["0.5","Semi-Transparent"],qr=["0","Transparent"],$r={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Pr,Nr,Dr,Ir,Mr,Fr,Lr,Br]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[zr,Hr,qr]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Nr,Pr,Dr,Ir,Mr,Fr,Lr,Br]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[zr,Hr]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[qr,Hr,zr]}};function Ur(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}$r.windowColor.options=$r.backgroundColor.options;var Vr=function(e){function t(n,r){L(this,t),r.temporary=!1;var o=N(this,e.call(this,n,r));return o.updateDisplay=Ze(o,o.updateDisplay),o.fill(),o.hasBeenOpened_=o.hasBeenFilled_=!0,o.endDialog=oe("p",{className:"vjs-control-text",textContent:o.localize("End of dialog window.")}),o.el().appendChild(o.endDialog),o.setDefaults(),void 0===r.persistTextTrackSettings&&(o.options_.persistTextTrackSettings=o.options_.playerOptions.persistTextTrackSettings),o.on(o.$(".vjs-done-button"),"click",(function(){o.saveSettings(),o.close()})),o.on(o.$(".vjs-default-button"),"click",(function(){o.setDefaults(),o.updateDisplay()})),q($r,(function(e){o.on(o.$(e.selector),"change",o.updateDisplay)})),o.options_.persistTextTrackSettings&&o.restoreSettings(),o}return D(t,e),t.prototype.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},t.prototype.createElSelect_=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"label",o=$r[e],i=o.id.replace("%s",this.id_),a=[n,i].join(" ").trim();return["<"+r+' id="'+i+'" class="'+("label"===r?"vjs-label":"")+'">',this.localize(o.label),""+r+">",'").join("")},t.prototype.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['"].join("")},t.prototype.createElBgColor_=function(){var e="captions-background-"+this.id_;return['"].join("")},t.prototype.createElWinColor_=function(){var e="captions-window-"+this.id_;return['"].join("")},t.prototype.createElColors_=function(){return oe("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},t.prototype.createElFont_=function(){return oe("div",{className:"vjs-track-settings-font",innerHTML:['",'",'"].join("")})},t.prototype.createElControls_=function(){var e=this.localize("restore all settings to the default values");return oe("div",{className:"vjs-track-settings-controls",innerHTML:['",'"].join("")})},t.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},t.prototype.label=function(){return this.localize("Caption Settings Dialog")},t.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},t.prototype.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},t.prototype.getValues=function(){var e=this;return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return H(e).reduce((function(n,r){return t(n,e[r],r)}),n)}($r,(function(t,n,r){var o,i,a=(o=e.$(n.selector),i=n.parser,Ur(o.options[o.options.selectedIndex].value,i));return void 0!==a&&(t[r]=a),t}),{})},t.prototype.setValues=function(e){var t=this;q($r,(function(n,r){!function(e,t,n){if(t)for(var r=0;r=2&&o.push("loadeddata"),e.readyState>=3&&o.push("canplay"),e.readyState>=4&&o.push("canplaythrough"),this.ready((function(){o.forEach((function(e){this.trigger(e)}),this)}))}},t.prototype.setCurrentTime=function(e){try{this.el_.currentTime=e}catch(e){G(e,"Video is not ready. (Video.js)")}},t.prototype.duration=function(){var e=this;if(this.el_.duration===1/0&&_&&T&&0===this.el_.currentTime){return this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN}return this.el_.duration||NaN},t.prototype.width=function(){return this.el_.offsetWidth},t.prototype.height=function(){return this.el_.offsetHeight},t.prototype.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",(function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)}))}},t.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=i.navigator&&i.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},t.prototype.enterFullScreen=function(){var e=this.el_;e.paused&&e.networkState<=e.HAVE_METADATA?(this.el_.play(),this.setTimeout((function(){e.pause(),e.webkitEnterFullScreen()}),0)):e.webkitEnterFullScreen()},t.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},t.prototype.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},t.prototype.reset=function(){t.resetMediaElement(this.el_)},t.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},t.prototype.setControls=function(e){this.el_.controls=!!e},t.prototype.addTextTrack=function(t,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,r):e.prototype.addTextTrack.call(this,t,n,r)},t.prototype.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=a.createElement("track");return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t.default&&(n.default=t.default),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},t.prototype.addRemoteTextTrack=function(t,n){var r=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},t.prototype.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)t!==n[r]&&t!==n[r].track||this.el().removeChild(n[r])},t.prototype.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),i.performance&&"function"==typeof i.performance.now?e.creationTime=i.performance.now():i.performance&&i.performance.timing&&"number"==typeof i.performance.timing.navigationStart&&(e.creationTime=i.Date.now()-i.performance.timing.navigationStart),e},t}(fn);if(ee()){eo.TEST_VID=a.createElement("video");var to=a.createElement("track");to.kind="captions",to.srclang="en",to.label="English",eo.TEST_VID.appendChild(to)}eo.isSupported=function(){try{eo.TEST_VID.volume=.5}catch(e){return!1}return!(!eo.TEST_VID||!eo.TEST_VID.canPlayType)},eo.canPlayType=function(e){return eo.TEST_VID.canPlayType(e)},eo.canPlaySource=function(e,t){return eo.canPlayType(e.type)},eo.canControlVolume=function(){try{var e=eo.TEST_VID.volume;return eo.TEST_VID.volume=e/2+.1,e!==eo.TEST_VID.volume}catch(e){return!1}},eo.canMuteVolume=function(){try{var e=eo.TEST_VID.muted;return eo.TEST_VID.muted=!e,eo.TEST_VID.muted?he(eo.TEST_VID,"muted","muted"):me(eo.TEST_VID,"muted"),e!==eo.TEST_VID.muted}catch(e){return!1}},eo.canControlPlaybackRate=function(){if(_&&T&&S<58)return!1;try{var e=eo.TEST_VID.playbackRate;return eo.TEST_VID.playbackRate=e/2+.1,e!==eo.TEST_VID.playbackRate}catch(e){return!1}},eo.canOverrideAttributes=function(){if(E)return!1;try{var e=function(){};Object.defineProperty(a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},eo.supportsNativeTextTracks=function(){return R||b&&T},eo.supportsNativeVideoTracks=function(){return!(!eo.TEST_VID||!eo.TEST_VID.videoTracks)},eo.supportsNativeAudioTracks=function(){return!(!eo.TEST_VID||!eo.TEST_VID.audioTracks)},eo.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],eo.prototype.featuresVolumeControl=eo.canControlVolume(),eo.prototype.featuresMuteControl=eo.canMuteVolume(),eo.prototype.featuresPlaybackRate=eo.canControlPlaybackRate(),eo.prototype.featuresSourceset=eo.canOverrideAttributes(),eo.prototype.movingMediaElementInDOM=!b,eo.prototype.featuresFullscreenResize=!0,eo.prototype.featuresProgressEvents=!0,eo.prototype.featuresTimeupdateEvents=!0,eo.prototype.featuresNativeTextTracks=eo.supportsNativeTextTracks(),eo.prototype.featuresNativeVideoTracks=eo.supportsNativeVideoTracks(),eo.prototype.featuresNativeAudioTracks=eo.supportsNativeAudioTracks();var no=eo.TEST_VID&&eo.TEST_VID.constructor.prototype.canPlayType,ro=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,oo=/^video\/mp4/i;eo.patchCanPlayType=function(){w>=4&&!O&&!T?eo.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&ro.test(e)?"maybe":no.call(this,e)}:x&&(eo.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&oo.test(e)?"maybe":no.call(this,e)})},eo.unpatchCanPlayType=function(){var e=eo.TEST_VID.constructor.prototype.canPlayType;return eo.TEST_VID.constructor.prototype.canPlayType=no,e},eo.patchCanPlayType(),eo.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},eo.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){eo.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){eo.prototype["set"+ht(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(e){eo.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach((function(e){eo.prototype["set"+ht(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){eo.prototype[e]=function(){return this.el_[e]()}})),fn.withSourceHandlers(eo),eo.nativeSourceHandler={},eo.nativeSourceHandler.canPlayType=function(e){try{return eo.TEST_VID.canPlayType(e)}catch(e){return""}},eo.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return eo.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=Kt(e.src);return eo.nativeSourceHandler.canPlayType("video/"+n)}return""},eo.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},eo.nativeSourceHandler.dispose=function(){},eo.registerSourceHandler(eo.nativeSourceHandler),fn.registerTech("Html5",eo);var io=F(["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "],["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "]),ao=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],so={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},co=["tiny","xsmall","small","medium","large","xlarge","huge"],lo={};co.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;lo[e]="vjs-layout-"+t}));var uo={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},po=function(e){function t(n,r,o){if(L(this,t),n.id=n.id||r.id||"vjs_video_"+Re(),(r=$(t.getTagSettings(n),r)).initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var i=n.closest("[lang]");i&&i.getAttribute&&(r.language=i.getAttribute("lang"))}else for(var a=n;a&&1===a.nodeType;){if(de(a).hasOwnProperty("lang")){r.language=a.getAttribute("lang");break}a=a.parentNode}var s=N(this,e.call(this,null,r,o));if(s.log=Y(s.id_),s.isPosterFromTech_=!1,s.queuedCallbacks_=[],s.isReady_=!1,s.hasStarted_=!1,s.userActive_=!1,!s.options_||!s.options_.techOrder||!s.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(s.tag=n,s.tagAttributes=n&&de(n),s.language(s.options_.language),r.languages){var c={};Object.getOwnPropertyNames(r.languages).forEach((function(e){c[e.toLowerCase()]=r.languages[e]})),s.languages_=c}else s.languages_=t.prototype.options_.languages;s.cache_={},s.poster_=r.poster||"",s.controls_=!!r.controls,s.cache_.lastVolume=1,n.controls=!1,n.removeAttribute("controls"),n.hasAttribute("autoplay")?s.options_.autoplay=!0:s.autoplay(s.options_.autoplay),s.scrubbing_=!1,s.el_=s.createEl(),s.cache_.lastPlaybackRate=s.defaultPlaybackRate(),pt(s,{eventBusKey:"el_"});var l=mt(s.options_);if(r.plugins){var u=r.plugins;Object.keys(u).forEach((function(e){if("function"!=typeof this[e])throw new Error('plugin "'+e+'" does not exist');this[e](u[e])}),s)}s.options_.playerOptions=l,s.middleware_=[],s.initChildren(),s.isAudio("audio"===n.nodeName.toLowerCase()),s.controls()?s.addClass("vjs-controls-enabled"):s.addClass("vjs-controls-disabled"),s.el_.setAttribute("role","region"),s.isAudio()?s.el_.setAttribute("aria-label",s.localize("Audio Player")):s.el_.setAttribute("aria-label",s.localize("Video Player")),s.isAudio()&&s.addClass("vjs-audio"),s.flexNotSupported_()&&s.addClass("vjs-no-flex"),b||s.addClass("vjs-workinghover"),t.players[s.id_]=s;var d=p.split(".")[0];return s.addClass("vjs-v"+d),s.userActive(!0),s.reportUserActivity(),s.one("play",s.listenForUserActivity_),s.on("fullscreenchange",s.handleFullscreenChange_),s.on("stageclick",s.handleStageClick_),s.breakpoints(s.options_.breakpoints),s.responsive(s.options_.responsive),s.changingSrc_=!1,s.playWaitingForReady_=!1,s.playOnLoadstart_=null,s}return D(t,e),t.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),mn[this.id()]=null,e.prototype.dispose.call(this)},t.prototype.createEl=function(){var t=this.tag,n=void 0,r=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player"),o="video-js"===this.tag.tagName.toLowerCase();r?n=this.el_=t.parentNode:o||(n=this.el_=e.prototype.createEl.call(this,"div"));var s=de(t);if(o){for(n=this.el_=t,t=this.tag=a.createElement("video");n.children.length;)t.appendChild(n.firstChild);se(n,"video-js")||ce(n,"video-js"),n.appendChild(t),r=this.playerElIngest_=n,["autoplay","controls","crossOrigin","defaultMuted","defaultPlaybackRate","loop","muted","playbackRate","src","volume"].forEach((function(e){void 0!==n[e]&&(t[e]=n[e])}))}if(t.setAttribute("tabindex","-1"),s.tabindex="-1",C&&(t.setAttribute("role","application"),s.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in s&&delete s.width,"height"in s&&delete s.height,Object.getOwnPropertyNames(s).forEach((function(e){"class"===e?(n.className+=" "+s[e],o&&(t.className+=" "+s[e])):(n.setAttribute(e,s[e]),o&&t.setAttribute(e,s[e]))})),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=n.player=this,this.addClass("vjs-paused"),!0!==i.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Qe("vjs-styles-dimensions");var c=Se(".vjs-styles-defaults"),l=Se("head");l.insertBefore(this.styleEl_,c?c.nextSibling:l.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var u=t.getElementsByTagName("a"),p=0;p0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),o=r[1]/r[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/o:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*o,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),Ke(this.styleEl_,"\n ."+n+" {\n width: "+e+"px;\n height: "+t+"px;\n }\n\n ."+n+".vjs-fluid {\n padding-top: "+100*o+"%;\n }\n ")}else{var a="number"==typeof this.width_?this.width_:this.options_.width,s="number"==typeof this.height_?this.height_:this.options_.height,c=this.tech_&&this.tech_.el();c&&(a>=0&&(c.width=a),s>=0&&(c.height=s))}},t.prototype.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var r=ht(e),o=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(fn.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var i={source:t,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+o+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};dn.names.forEach((function(e){var t=dn[e];i[t.getterName]=n[t.privateName]})),$(i,this.options_[r]),$(i,this.options_[o]),$(i,this.options_[e.toLowerCase()]),this.tag&&(i.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(i.startTime=this.cache_.currentTime);var a=fn.getTech(e);if(!a)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new a(i),this.tech_.ready(Ze(this,this.handleTechReady_),!0),Mt(this.textTracksJson_||[],this.tech_),ao.forEach((function(e){n.on(n.tech_,e,n["handleTech"+ht(e)+"_"])})),Object.keys(so).forEach((function(e){n.on(n.tech_,e,(function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+so[e]+"_"].bind(n),event:t}):n["handleTech"+so[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),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.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||ae(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},t.prototype.unloadTech_=function(){var e=this;dn.names.forEach((function(t){var n=dn[t];e[n.privateName]=e[n.getterName]()})),this.textTracksJson_=Pt(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},t.prototype.tech=function(e){return void 0===e&&G.warn(s(io)),this.tech_},t.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_)},t.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_)},t.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(e){G("deleting tag.poster throws in some browsers",e)}},t.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")),this.manualAutoplay_(this.autoplay())},t.prototype.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"==typeof e){var n=function(){var e=t.muted();t.muted(!0);var n=t.play();if(n&&n.then&&n.catch)return n.catch((function(n){t.muted(e)}))},r=void 0;if("any"===e?(r=this.play())&&r.then&&r.catch&&r.catch((function(){return n()})):r="muted"===e?n():this.play(),r&&r.then&&r.catch)return r.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(n){t.trigger({type:"autoplay-failure",autoplay:e})}))}},t.prototype.updateSourceCaches_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e,n="";"string"!=typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=jn(this,t)),this.cache_.source=mt({},e,{src:t,type:n});for(var r=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),o=[],i=this.$$("source"),a=[],s=0;s0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(e){return e.callback(e.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},t.prototype.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return e.removeClass("vjs-waiting")}))},t.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},t.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},t.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},t.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},t.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},t.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(G.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},t.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},t.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},t.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},t.prototype.handleTechClick_=function(e){Te(e)&&this.controls_&&(this.paused()?At(this.play()):this.pause())},t.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},t.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},t.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},t.prototype.handleTechTouchEnd_=function(e){e.preventDefault()},t.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},t.prototype.handleStageClick_=function(){this.reportUserActivity()},t.prototype.handleTechFullscreenChange_=function(e,t){t&&this.isFullscreen(t.isFullscreen),this.trigger("fullscreenchange")},t.prototype.handleTechError_=function(){var e=this.tech_.error();this.error(e)},t.prototype.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},t.prototype.getCache=function(){return this.cache_},t.prototype.techCall_=function(e,t){this.ready((function(){if(e in _n)return function(e,t,n,r){return t[n](e.reduce(xn(n),r))}(this.middleware_,this.tech_,e,t);if(e in wn)return bn(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw G(e),e}}),!0)},t.prototype.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in yn)return function(e,t,n){return e.reduceRight(xn(n),t[n]())}(this.middleware_,this.tech_,e);if(e in wn)return bn(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw G("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw G("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw G(t),t}}},t.prototype.play=function(){var e=this,t=this.options_.Promise||i.Promise;return t?new t((function(t){e.play_(t)})):this.play_()},t.prototype.play_=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:At;if(this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_),this.isReady_){if(!this.changingSrc_&&(this.src()||this.currentSrc()))return void t(this.techGet_("play"));this.playOnLoadstart_=function(){e.playOnLoadstart_=null,t(e.play())},this.one("loadstart",this.playOnLoadstart_)}else{if(this.playWaitingForReady_)return;this.playWaitingForReady_=!0,this.ready((function(){e.playWaitingForReady_=!1,t(e.play())}))}},t.prototype.pause=function(){this.techCall_("pause")},t.prototype.paused=function(){return!1!==this.techGet_("paused")},t.prototype.played=function(){return this.techGet_("played")||yt(0,0)},t.prototype.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},t.prototype.currentTime=function(e){return void 0!==e?(e<0&&(e=0),void this.techCall_("setCurrentTime",e)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},t.prototype.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))},t.prototype.remainingTime=function(){return this.duration()-this.currentTime()},t.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},t.prototype.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=yt(0,0)),e},t.prototype.bufferedPercent=function(){return _t(this.buffered(),this.duration())},t.prototype.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},t.prototype.volume=function(e){var t=void 0;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},t.prototype.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},t.prototype.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},t.prototype.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},t.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},t.prototype.isFullscreen=function(e){if(void 0===e)return!!this.isFullscreen_;this.isFullscreen_=!!e},t.prototype.requestFullscreen=function(){var e=wt;this.isFullscreen(!0),e.requestFullscreen?(qe(a,e.fullscreenchange,Ze(this,(function t(n){this.isFullscreen(a[e.fullscreenElement]),!1===this.isFullscreen()&&$e(a,e.fullscreenchange,t),this.trigger("fullscreenchange")}))),this.el_[e.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},t.prototype.exitFullscreen=function(){var e=wt;this.isFullscreen(!1),e.requestFullscreen?a[e.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},t.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=a.documentElement.style.overflow,qe(a,"keydown",Ze(this,this.fullWindowOnEscKey)),a.documentElement.style.overflow="hidden",ce(a.body,"vjs-full-window"),this.trigger("enterFullWindow")},t.prototype.fullWindowOnEscKey=function(e){27===e.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},t.prototype.exitFullWindow=function(){this.isFullWindow=!1,$e(a,"keydown",this.fullWindowOnEscKey),a.documentElement.style.overflow=this.docOrigOverflow,le(a.body,"vjs-full-window"),this.trigger("exitFullWindow")},t.prototype.canPlayType=function(e){for(var t=void 0,n=0,r=this.options_.techOrder;n1?t.src(n.slice(1)):(t.changingSrc_=!1,t.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void t.triggerReady());o=r,i=t.tech_,o.forEach((function(e){return e.setTech&&e.setTech(i)}))}))):this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},t.prototype.src_=function(e){var t,n,r=this,o=this.selectSource([e]);return!o||(t=o.tech,n=this.techName_,ht(t)!==ht(n)?(this.changingSrc_=!0,this.loadTech_(o.tech,o.source),this.tech_.ready((function(){r.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1))},t.prototype.load=function(){this.techCall_("load")},t.prototype.reset=function(){this.tech_&&this.tech_.clearTracks("text"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},t.prototype.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},t.prototype.currentSource=function(){return this.cache_.source||{}},t.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},t.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},t.prototype.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},t.prototype.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t=void 0;"string"==typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t=t||this.options_.autoplay,this.tech_&&this.techCall_("setAutoplay",t)},t.prototype.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},t.prototype.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},t.prototype.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},t.prototype.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},t.prototype.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},t.prototype.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},t.prototype.error=function(e){return void 0===e?this.error_||null:null===e?(this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new St(e),this.addClass("vjs-error"),G.error("(CODE:"+this.error_.code+" "+St.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},t.prototype.reportUserActivity=function(e){this.userActivity_=!0},t.prototype.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},t.prototype.listenForUserActivity_=function(){var e=void 0,t=void 0,n=void 0,r=Ze(this,this.reportUserActivity);this.on("mousedown",(function(){r(),this.clearInterval(e),e=this.setInterval(r,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,r())})),this.on("mouseup",(function(t){r(),this.clearInterval(e)})),this.on("keydown",r),this.on("keyup",r);var o=void 0;this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(o);var e=this.options_.inactivityTimeout;e<=0||(o=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},t.prototype.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},t.prototype.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},t.prototype.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},t.prototype.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},t.prototype.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},t.prototype.removeRemoteTextTrack=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.track,n=void 0===t?arguments[0]:t;if(this.tech_)return this.tech_.removeRemoteTextTrack(n)},t.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},t.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},t.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},t.prototype.language=function(e){if(void 0===e)return this.language_;this.language_=String(e).toLowerCase()},t.prototype.languages=function(){return mt(t.prototype.options_.languages,this.languages_)},t.prototype.toJSON=function(){var e=mt(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return e.name=this.name,e.plugin=this.constructor,e.instance=this,e},e.prototype.trigger=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ue(this.eventBusEl_,e,this.getEventHash(t))},e.prototype.handleStateChanged=function(e){},e.prototype.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t.activePlugins_[e]=!1,this.player=this.state=null,t[e]=yo(e,ho[e])},e.isBasic=function(t){var n="string"==typeof t?vo(t):t;return"function"==typeof n&&!e.prototype.isPrototypeOf(n.prototype)},e.registerPlugin=function(t,n){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+(void 0===t?"undefined":I(t))+".");if(mo(t))G.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(po.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+(void 0===n?"undefined":I(n))+".");return ho[t]=n,"plugin"!==t&&(e.isBasic(n)?po.prototype[t]=function(e,t){var n=function(){bo(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return go(this,e),bo(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(t,n):po.prototype[t]=yo(t,n)),n},e.deregisterPlugin=function(e){if("plugin"===e)throw new Error("Cannot de-register base plugin.");mo(e)&&(delete ho[e],delete po.prototype[e])},e.getPlugins=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.keys(ho),t=void 0;return e.forEach((function(e){var n=vo(e);n&&((t=t||{})[e]=n)})),t},e.getPluginVersion=function(e){var t=vo(e);return t&&t.VERSION||""},e}();_o.getPlugin=vo,_o.BASE_PLUGIN_NAME="plugin",_o.registerPlugin("plugin",_o),po.prototype.usingPlugin=function(e){return!!this.activePlugins_&&!0===this.activePlugins_[e]},po.prototype.hasPlugin=function(e){return!!mo(e)};var wo=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":I(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.super_=t)};"undefined"==typeof HTMLVideoElement&&ee()&&(a.createElement("video"),a.createElement("audio"),a.createElement("track"),a.createElement("video-js"));var xo=function(e){return 0===e.indexOf("#")?e.slice(1):e};function ko(e,t,n){var r=ko.getPlayer(e);if(r)return t&&G.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var o="string"==typeof e?Se("#"+xo(e)):e;if(!te(o))throw new TypeError("The element or ID supplied is not valid. (videojs)");a.body.contains(o)||G.warn("The element supplied is not included in the DOM"),t=t||{},ko.hooks("beforesetup").forEach((function(e){var n=e(o,mt(t));U(n)&&!Array.isArray(n)?t=mt(t,n):G.error("please return an object in beforesetup hooks")}));var i=vt.getComponent("Player");return r=new i(o,t,n),ko.hooks("setup").forEach((function(e){return e(r)})),r}if(ko.hooks_={},ko.hooks=function(e,t){return ko.hooks_[e]=ko.hooks_[e]||[],t&&(ko.hooks_[e]=ko.hooks_[e].concat(t)),ko.hooks_[e]},ko.hook=function(e,t){ko.hooks(e,t)},ko.hookOnce=function(e,t){ko.hooks(e,[].concat(t).map((function(t){return function n(){return ko.removeHook(e,n),t.apply(void 0,arguments)}})))},ko.removeHook=function(e,t){var n=ko.hooks(e).indexOf(t);return!(n<=-1)&&(ko.hooks_[e]=ko.hooks_[e].slice(),ko.hooks_[e].splice(n,1),!0)},!0!==i.VIDEOJS_NO_DYNAMIC_STYLE&&ee()){var Oo=Se(".vjs-styles-defaults");if(!Oo){Oo=Qe("vjs-styles-defaults");var jo=Se("head");jo&&jo.insertBefore(Oo,jo.firstChild),Ke(Oo,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}Je(1,ko),ko.VERSION=p,ko.options=po.prototype.options_,ko.getPlayers=function(){return po.players},ko.getPlayer=function(e){var t=po.players,n=void 0;if("string"==typeof e){var r=xo(e),o=t[r];if(o)return o;n=Se("#"+r)}else n=e;if(te(n)){var i=n,a=i.player,s=i.playerId;if(a||t[s])return a||t[s]}},ko.getAllPlayers=function(){return Object.keys(po.players).map((function(e){return po.players[e]})).filter(Boolean)},ko.players=po.players,ko.getComponent=vt.getComponent,ko.registerComponent=function(e,t){fn.isTech(t)&&G.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),vt.registerComponent.call(vt,e,t)},ko.getTech=fn.getTech,ko.registerTech=fn.registerTech,ko.use=function(e,t){hn[e]=hn[e]||[],hn[e].push(t)},!E&&Object.defineProperty?(Object.defineProperty(ko,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(ko.middleware,"TERMINATOR",{value:vn,writeable:!1,enumerable:!0})):ko.middleware={TERMINATOR:vn},ko.browser=B,ko.TOUCH_ENABLED=P,ko.extend=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(){e.apply(this,arguments)},r={};for(var o in"object"===(void 0===t?"undefined":I(t))?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),r=t):"function"==typeof t&&(n=t),wo(n,e),r)r.hasOwnProperty(o)&&(n.prototype[o]=r[o]);return n},ko.mergeOptions=mt,ko.bind=Ze,ko.registerPlugin=_o.registerPlugin,ko.deregisterPlugin=_o.deregisterPlugin,ko.plugin=function(e,t){return G.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),_o.registerPlugin(e,t)},ko.getPlugins=_o.getPlugins,ko.getPlugin=_o.getPlugin,ko.getPluginVersion=_o.getPluginVersion,ko.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),ko.options.languages=mt(ko.options.languages,((n={})[e]=t,n)),ko.options.languages[e]},ko.log=G,ko.createLogger=Y,ko.createTimeRange=ko.createTimeRanges=yt,ko.formatTime=Hn,ko.setFormatTime=function(e){zn=e},ko.resetFormatTime=function(){zn=Fn},ko.parseUrl=Jt,ko.isCrossOrigin=Zt,ko.EventTarget=nt,ko.on=qe,ko.one=Ve,ko.off=$e,ko.trigger=Ue,ko.xhr=l,ko.TextTrack=rn,ko.AudioTrack=on,ko.VideoTrack=an,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){ko[e]=function(){return G.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),Ce[e].apply(null,arguments)}})),ko.computedStyle=J,ko.dom=Ce,ko.url=en,e.exports=ko},function(e,t,n){(function(t){var r,o=void 0!==t?t:"undefined"!=typeof window?window:{},i=n(253);"undefined"!=typeof document?r=document:(r=o["__GLOBAL_DOCUMENT_CACHE@4"])||(r=o["__GLOBAL_DOCUMENT_CACHE@4"]=i),e.exports=r}).call(this,n(40))},function(e,t){},function(e,t){function n(e){return e.replace(/\n\r?\s*/g,"")}e.exports=function(e){for(var t="",r=0;raiqicha://open.app?params=
r,route:o,href:function(e,t,n){var r=',n=o.firstChild,o.setAttribute("style","display:none; position:absolute;"),a.body.appendChild(o));for(var s={},c=0;c
/
"})},t}(vt);vt.registerComponent("TimeDivider",Vn);var Wn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.on(n,"durationchange",o.throttledUpdateContent),o.on(n,"ended",o.handleEnded),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-remaining-time"},t.prototype.formatTime_=function(t){return"-"+e.prototype.formatTime_.call(this,t)},t.prototype.updateContent=function(e){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(0)},t}(qn);Wn.prototype.labelText_="Remaining Time",Wn.prototype.controlText_="Remaining Time",vt.registerComponent("RemainingTimeDisplay",Wn);var Xn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.updateShowing(),o.on(o.player(),"durationchange",o.updateShowing),o}return D(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=oe("div",{className:"vjs-live-display",innerHTML:''+this.localize("Stream Type")+" "+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(vt);vt.registerComponent("LiveDisplay",Xn);var Gn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.bar=o.getChild(o.options_.barName),o.vertical(!!o.options_.vertical),o.enable(),o}return D(t,e),t.prototype.enabled=function(){return this.enabled_},t.prototype.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},t.prototype.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},t.prototype.createEl=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.className=n.className+" vjs-slider",n=$({tabIndex:0},n),r=$({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),e.prototype.createEl.call(this,t,n,r)},t.prototype.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||T||e.preventDefault(),ve(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},t.prototype.handleMouseMove=function(e){},t.prototype.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;ge(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},t.prototype.update=function(){if(this.el_){var e=this.getPercent(),t=this.bar;if(t){("number"!=typeof e||e!=e||e<0||e===1/0)&&(e=0);var n=(100*e).toFixed(2)+"%",r=t.el().style;return this.vertical()?r.height=n:r.width=n,e}}},t.prototype.calculateDistance=function(e){var t=_e(this.el_,e);return this.vertical()?t.y:t.x},t.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepBack()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepForward())},t.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleClick=function(e){e.stopImmediatePropagation(),e.preventDefault()},t.prototype.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(vt);vt.registerComponent("Slider",Gn);var Yn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.partEls_=[],o.on(n,"progress",o.update),o}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+": 0%"})},t.prototype.dispose=function(){this.partEls_=null,e.prototype.dispose.call(this)},t.prototype.update=function(e){var t=this.player_.buffered(),n=this.player_.duration(),r=this.player_.bufferedEnd(),o=this.partEls_,i=function(e,t){var n=e/t||0;return 100*(n>=1?1:n)+"%"};this.el_.style.width=i(r,n);for(var a=0;a/
"})},t}(vt);vt.registerComponent("TimeDivider",Vn);var Wn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.on(n,"durationchange",o.throttledUpdateContent),o.on(n,"ended",o.handleEnded),o}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-remaining-time"},t.prototype.formatTime_=function(t){return"-"+e.prototype.formatTime_.call(this,t)},t.prototype.updateContent=function(e){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(0)},t}(qn);Wn.prototype.labelText_="Remaining Time",Wn.prototype.controlText_="Remaining Time",vt.registerComponent("RemainingTimeDisplay",Wn);var Xn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.updateShowing(),o.on(o.player(),"durationchange",o.updateShowing),o}return D(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=oe("div",{className:"vjs-live-display",innerHTML:''+this.localize("Stream Type")+" "+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(vt);vt.registerComponent("LiveDisplay",Xn);var Gn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.bar=o.getChild(o.options_.barName),o.vertical(!!o.options_.vertical),o.enable(),o}return D(t,e),t.prototype.enabled=function(){return this.enabled_},t.prototype.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},t.prototype.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},t.prototype.createEl=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.className=n.className+" vjs-slider",n=$({tabIndex:0},n),r=$({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),e.prototype.createEl.call(this,t,n,r)},t.prototype.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||T||e.preventDefault(),ve(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},t.prototype.handleMouseMove=function(e){},t.prototype.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;ge(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},t.prototype.update=function(){if(this.el_){var e=this.getPercent(),t=this.bar;if(t){("number"!=typeof e||e!=e||e<0||e===1/0)&&(e=0);var n=(100*e).toFixed(2)+"%",r=t.el().style;return this.vertical()?r.height=n:r.width=n,e}}},t.prototype.calculateDistance=function(e){var t=_e(this.el_,e);return this.vertical()?t.y:t.x},t.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepBack()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepForward())},t.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleClick=function(e){e.stopImmediatePropagation(),e.preventDefault()},t.prototype.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(vt);vt.registerComponent("Slider",Gn);var Yn=function(e){function t(n,r){L(this,t);var o=N(this,e.call(this,n,r));return o.partEls_=[],o.on(n,"progress",o.update),o}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+": 0%"})},t.prototype.dispose=function(){this.partEls_=null,e.prototype.dispose.call(this)},t.prototype.update=function(e){var t=this.player_.buffered(),n=this.player_.duration(),r=this.player_.bufferedEnd(),o=this.partEls_,i=function(e,t){var n=e/t||0;return 100*(n>=1?1:n)+"%"};this.el_.style.width=i(r,n);for(var a=0;a
收藏的用户(0)
X
正在加载信息~

发表评论