Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 15

e,t);else{var

n=e,r=t;pr(n,this,"off"),fr(r,this,"off"),mr(i,this,"off"),i=or(this,i),this.off("d
ispose",i),n.nodeName?
(er(n,r,i),er(n,"dispose",i)):cr(n)&&(n.off(r,i),n.off("dispose",i))}},trigger:func
tion(e,t){pr(this.eventBusEl_,this,"trigger");var i=e&&"string"!=typeof e?
e.type:e;if(!hr(i)){var n="Invalid event type for "+dr(this)+"#trigger; must be a
non-empty string or object with a type key that has a non-empty value.";if(!e)throw
new Error(n);(this.log||xi).error(n)}return tr(this.eventBusEl_,e,t)}};function
_r(e,t){void 0===t&&(t={});var i=t.eventBusKey;if(i){if(!e[i].nodeName)throw new
Error('The eventBusKey "'+i+'" does not refer to an
element.');e.eventBusEl_=e[i]}else e.eventBusEl_=cn("span",{className:"vjs-event-
bus"});return Li(e,yr),e.eventedCallbacks&&e.eventedCallbacks.forEach((function(e)
{e()})),e.on("dispose",(function(){e.off(),
[e,e.el_,e.eventBusEl_].forEach((function(e)
{e&&Kn.has(e)&&Kn.delete(e)})),W().setTimeout((function()
{e.eventBusEl_=null}),0)})),e}var br={state:{},setState:function(e){var
t,i=this;return"function"==typeof e&&(e=e()),Ai(e,(function(e,n){i.state[n]!
==e&&((t=t||{})
[n]={from:i.state[n],to:e}),i.state[n]=e})),t&&cr(this)&&this.trigger({changes:t,ty
pe:"statechanged"}),t}};function Tr(e,t){return
Li(e,br),e.state=Li({},e.state,t),"function"==typeof
e.handleStateChanged&&cr(e)&&e.on("statechanged",e.handleStateChanged),e}var
Cr=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return
e.toLowerCase()}))},Sr=function(e){return"string"!=typeof e?e:e.replace(/./,
(function(e){return e.toUpperCase()}))};function wr(){for(var
e={},t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return
i.forEach((function(t){t&&Ai(t,(function(t,i){Di(t)?(Di(e[i])||
(e[i]={}),e[i]=wr(e[i],t)):e[i]=t}))})),e}var kr=function(){function e()
{this.map_={}}var t=e.prototype;return t.has=function(e){return e in
this.map_},t.delete=function(e){var t=this.has(e);return delete
this.map_[e],t},t.set=function(e,t){return
this.map_[e]=t,this},t.forEach=function(e,t){for(var i in
this.map_)e.call(t,this.map_[i],i,this)},e}(),Er=W().Map?W().Map:kr,xr=function()
{function e(){this.set_={}}var t=e.prototype;return t.has=function(e){return e in
this.set_},t.delete=function(e){var t=this.has(e);return delete
this.set_[e],t},t.add=function(e){return
this.set_[e]=1,this},t.forEach=function(e,t){for(var i in
this.set_)e.call(t,i,i,this)},e}(),jr=W().Set?W().Set:xr,Pr=function(){function
e(e,t,i){var n=this;if(!e&&this.play?
this.player_=e=this:this.player_=e,this.isDisposed_=!
1,this.parentComponent_=null,this.options_=wr({},this.options_),t=this.options_=wr(
this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var
r=e&&e.id&&e.id()||"no_player";this.id_=r+"_component_"+Gn()}this.name_=t.name||
null,t.el?this.el_=t.el:!1!
==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split("
").forEach((function(e){return n.addClass(e)})),!1!==t.evented&&(_r(this,
{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagecha
nge.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Tr
(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.chi
ldNameIndex_={},this.setTimeoutIds_=new jr,this.setIntervalIds_=new
jr,this.rafIds_=new jr,this.namedRafs_=new Er,this.clearingTimersOnDispose_=!1,!1!
==t.initChildren&&this.initChildren(),this.ready(i),!1!
==t.reportTouchActivity&&this.enableTouchActivity()}var t=e.prototype;return
t.dispose=function(){if(!this.isDisposed_)
{if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubb
les:!1}),this.isDisposed_=!0,this.children_)for(var e=this.children_.length-
1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=nu
ll,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.
el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),this.el_=null)
,this.player_=null}},t.isDisposed=function(){return
Boolean(this.isDisposed_)},t.player=function(){return
this.player_},t.options=function(e){return e?
(this.options_=wr(this.options_,e),this.options_):this.options_},t.el=function()
{return this.el_},t.createEl=function(e,t,i){return
cn(e,t,i)},t.localize=function(e,t,i){void 0===i&&(i=e);var
n=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.pla
yer_.languages(),s=r&&r[n],a=n&&n.split("-")[0],o=r&&r[a],l=i;return s&&s[e]?
l=s[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,i){var n=t[i-
1],r=n;return void 0===n&&(r=e),r}))),l},t.handleLanguagechange=function()
{},t.contentEl=function(){return this.contentEl_||this.el_},t.id=function(){return
this.id_},t.name=function(){return this.name_},t.children=function(){return
this.children_},t.getChildById=function(e){return
this.childIndex_[e]},t.getChild=function(e){if(e)return
this.childNameIndex_[e]},t.getDescendant=function(){for(var
e=arguments.length,t=new Array(e),i=0;i<e;i+
+)t[i]=arguments[i];t=t.reduce((function(e,t){return e.concat(t)}),[]);for(var
n=this,r=0;r<t.length;r++)if(!(n=n.getChild(t[r]))||!n.getChild)return;return
n},t.addChild=function(t,i,n){var r,s;if(void 0===i&&(i={}),void
0===n&&(n=this.children_.length),"string"==typeof t){s=Sr(t);var
a=i.componentClass||s;i.name=s;var o=e.getComponent(a);if(!o)throw new
Error("Component "+a+" does not exist");if("function"!=typeof o)return null;r=new
o(this.player_||this,i)}else
r=t;if(r.parentComponent_&&r.parentComponent_.removeChild(r),this.children_.splice(
n,0,r),r.parentComponent_=this,"function"==typeof
r.id&&(this.childIndex_[r.id()]=r),(s=s||
r.name&&Sr(r.name()))&&(this.childNameIndex_[s]=r,this.childNameIndex_[Cr(s)]=r),"f
unction"==typeof r.el&&r.el()){var
l=null;this.children_[n+1]&&(this.children_[n+1].el_?
l=this.children_[n+1].el_:ln(this.children_[n+1])&&(l=this.children_[n+1])),this.co
ntentEl().insertBefore(r.el(),l)}return r},t.removeChild=function(e)
{if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!
1,i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!
0,this.children_.splice(i,1);break}if(t)
{e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[Sr(e.na
me())]=null,this.childNameIndex_[Cr(e.name())]=null;var
n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}
},t.initChildren=function(){var t=this,i=this.options_.children;if(i){var
n,r=this.options_,s=e.getComponent("Tech");(n=Array.isArray(i)?
i:Object.keys(i)).concat(Object.keys(this.options_).filter((function(e){return!
n.some((function(t){return"string"==typeof t?
e===t:e===t.name}))}))).map((function(e){var n,r;return"string"==typeof e?
r=i[n=e]||t.options_[n]||{}:(n=e.name,r=e),{name:n,opts:r}})).filter((function(t)
{var i=e.getComponent(t.opts.componentClass||Sr(t.name));return i&&!
s.isTech(i)})).forEach((function(e){var i=e.name,n=e.opts;if(void 0!
==r[i]&&(n=r[i]),!1!==n){!
0===n&&(n={}),n.playerOptions=t.options_.playerOptions;var
s=t.addChild(i,n);s&&(t[i]=s)}}))}},t.buildCSSClass=function()
{return""},t.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?
void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||
[],void this.readyQueue_.push(e))},t.triggerReady=function(){this.isReady_=!
0,this.setTimeout((function(){var
e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e)
{e.call(this)}),this),this.trigger("ready")}),1)},t.$=function(e,t){return Mn(e,t||
this.contentEl())},t.$$=function(e,t){return Rn(e,t||
this.contentEl())},t.hasClass=function(e){return
fn(this.el_,e)},t.addClass=function(e){mn(this.el_,e)},t.removeClass=function(e)
{gn(this.el_,e)},t.toggleClass=function(e,t){vn(this.el_,e,t)},t.show=function()
{this.removeClass("vjs-hidden")},t.hide=function(){this.addClass("vjs-
hidden")},t.lockShowing=function(){this.addClass("vjs-lock-
showing")},t.unlockShowing=function(){this.removeClass("vjs-lock-
showing")},t.getAttribute=function(e){return
bn(this.el_,e)},t.setAttribute=function(e,t)
{Tn(this.el_,e,t)},t.removeAttribute=function(e)
{Cn(this.el_,e)},t.width=function(e,t){return
this.dimension("width",e,t)},t.height=function(e,t){return
this.dimension("height",e,t)},t.dimensions=function(e,t){this.width(e,!
0),this.height(t)},t.dimension=function(e,t,i){if(void 0!==t)return null!
==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?
this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(i||
this.trigger("componentresize"));if(!this.el_)return 0;var
n=this.el_.style[e],r=n.indexOf("px");return-1!==r?
parseInt(n.slice(0,r),10):parseInt(this.el_["offset"+Sr(e)],10)},t.currentDimension
=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension
only accepts width or height value");if(t=Mi(this.el_,e),0===(t=parseFloat(t))||
isNaN(t)){var i="offset"+Sr(e);t=this.el_[i]}return
t},t.currentDimensions=function()
{return{width:this.currentDimension("width"),height:this.currentDimension("height")
}},t.currentWidth=function(){return
this.currentDimension("width")},t.currentHeight=function(){return
this.currentDimension("height")},t.focus=function()
{this.el_.focus()},t.blur=function(){this.el_.blur()},t.handleKeyDown=function(e)
{this.player_&&(X().isEventKey(e,"Tab")||
e.stopPropagation(),this.player_.handleKeyDown(e))},t.handleKeyPress=function(e)
{this.handleKeyDown(e)},t.emitTapEvents=function(){var
e,t=0,i=null;this.on("touchstart",(function(n)
{1===n.touches.length&&(i={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},t=W()
.performance.now(),e=!0)})),this.on("touchmove",(function(t)
{if(t.touches.length>1)e=!1;else if(i){var n=t.touches[0].pageX-
i.pageX,r=t.touches[0].pageY-i.pageY;Math.sqrt(n*n+r*r)>10&&(e=!1)}}));var
n=function(){e=!
1};this.on("touchleave",n),this.on("touchcancel",n),this.on("touchend",(function(n)
{(i=null,!0===e)&&(W().performance.now()-
t<200&&(n.preventDefault(),this.trigger("tap")))}))},t.enableTouchActivity=function
(){if(this.player()&&this.player().reportUserActivity){var
e,t=or(this.player(),this.player().reportUserActivity);this.on("touchstart",
(function(){t(),this.clearInterval(e),e=this.setInterval(t,250)}));var
i=function(i)
{t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",i),this.on("t
ouchcancel",i)}},t.setTimeout=function(e,t){var i,n=this;return
e=or(this,e),this.clearTimersOnDispose_(),i=W().setTimeout((function()
{n.setTimeoutIds_.has(i)&&n.setTimeoutIds_.delete(i),e()}),t),this.setTimeoutIds_.a
dd(i),i},t.clearTimeout=function(e){return
this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),W().clearTimeout(e)),e},
t.setInterval=function(e,t){e=or(this,e),this.clearTimersOnDispose_();var
i=W().setInterval(e,t);return
this.setIntervalIds_.add(i),i},t.clearInterval=function(e){return
this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),W().clearInterval(e)),
e},t.requestAnimationFrame=function(e){var t,i=this;return this.supportsRaf_?
(this.clearTimersOnDispose_(),e=or(this,e),t=W().requestAnimationFrame((function()
{i.rafIds_.has(t)&&i.rafIds_.delete(t),e()})),this.rafIds_.add(t),t):this.setTimeou
t(e,1e3/60)},t.requestNamedAnimationFrame=function(e,t){var i=this;if(!
this.namedRafs_.has(e)){this.clearTimersOnDispose_(),t=or(this,t);var
n=this.requestAnimationFrame((function()
{t(),i.namedRafs_.has(e)&&i.namedRafs_.delete(e)}));return
this.namedRafs_.set(e,n),e}},t.cancelNamedAnimationFrame=function(e)
{this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.na
medRafs_.delete(e))},t.cancelAnimationFrame=function(e){return this.supportsRaf_?
(this.rafIds_.has(e)&&(this.rafIds_.delete(e),W().cancelAnimationFrame(e)),e):this.
clearTimeout(e)},t.clearTimersOnDispose_=function(){var
e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!
0,this.one("dispose",(function(){[["namedRafs_","cancelNamedAnimationFrame"],
["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],
["setIntervalIds_","clearInterval"]].forEach((function(t){var
i=t[0],n=t[1];e[i].forEach((function(t,i){return e[n]
(i)}))})),e.clearingTimersOnDispose_=!1})))},e.registerComponent=function(t,i)
{if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must
be a non-empty string.');var n,r=e.getComponent("Tech"),s=r&&r.isTech(i),a=e===i||
e.prototype.isPrototypeOf(i.prototype);if(s||!a)throw n=s?"techs must be registered
using Tech.registerTech()":"must be a Component subclass",new Error('Illegal
component, "'+t+'"; '+n+".");t=Sr(t),e.components_||(e.components_={});var
o=e.getComponent("Player");if("Player"===t&&o&&o.players){var
l=o.players,u=Object.keys(l);if(l&&u.length>0&&u.map((function(e){return
l[e]})).every(Boolean))throw new Error("Can not register Player component after
player has been created.")}return
e.components_[t]=i,e.components_[Cr(t)]=i,i},e.getComponent=function(t)
{if(t&&e.components_)return e.components_[t]},e}();function Ir(e,t,i,n){return
function(e,t,i){if("number"!=typeof t||t<0||t>i)throw new Error("Failed to execute
'"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds
(0-"+i+").")}(e,n,i.length-1),i[n][t]}function Ar(e){var t;return t=void 0===e||
0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is
empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:
{length:e.length,start:Ir.bind(null,"start",0,e),end:Ir.bind(null,"end",1,e)},W().S
ymbol&&W().Symbol.iterator&&(t[W().Symbol.iterator]=function(){return(e||
[]).values()}),t}function Lr(e,t){return Array.isArray(e)?Ar(e):void 0===e||void
0===t?Ar():Ar([[e,t]])}function Or(e,t){var i,n,r=0;if(!t)return 0;e&&e.length||
(e=Lr(0,0));for(var s=0;s<e.length;s++)i=e.start(s),(n=e.end(s))>t&&(n=t),r+=n-
i;return r/t}function Dr(e){if(e instanceof Dr)return e;"number"==typeof e?
this.code=e:"string"==typeof e?this.message=e:Oi(e)&&("number"==typeof
e.code&&(this.code=e.code),Li(this,e)),this.message||
(this.message=Dr.defaultMessages[this.code]||"")}Pr.prototype.supportsRaf_="functio
n"==typeof W().requestAnimationFrame&&"function"==typeof
W().cancelAnimationFrame,Pr.registerComponent("Component",Pr),Dr.prototype.code=0,D
r.prototype.message="",Dr.prototype.status=null,Dr.errorTypes=["MEDIA_ERR_CUSTOM","
MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPOR
TED","MEDIA_ERR_ENCRYPTED"],Dr.defaultMessages={1:"You aborted the media
playback",2:"A network error caused the media download to fail part-way.",3:"The
media playback was aborted due to a corruption problem or because the media used
features your browser did not support.",4:"The media could not be loaded, either
because the server or network failed or because the format is not
supported.",5:"The media is encrypted and we do not have the keys to decrypt
it."};for(var Mr=0;Mr<Dr.errorTypes.length;Mr+
+)Dr[Dr.errorTypes[Mr]]=Mr,Dr.prototype[Dr.errorTypes[Mr]]=Mr;function Rr(e){return
null!=e&&"function"==typeof e.then}function Nr(e){Rr(e)&&e.then(null,(function(e)
{}))}var Ur=function(e)
{return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","sr
c"].reduce((function(t,i,n){return e[i]&&(t[i]=e[i]),t}),
{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e)
{return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})},Br=funct
ion(e){var t=e.$$("track"),i=Array.prototype.map.call(t,(function(e){return
e.track}));return Array.prototype.map.call(t,(function(e){var t=Ur(e.track);return
e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),
(function(e){return-1===i.indexOf(e)})).map(Ur))},Vr=function(e,t){return
e.forEach((function(e){var i=t.addRemoteTextTrack(e).track;!
e.src&&e.cues&&e.cues.forEach((function(e){return
i.addCue(e)}))})),t.textTracks()},Fr=function(e){function t(t,i){var
n;return(n=e.call(this,t,i)||this).handleKeyDown_=function(e){return
n.handleKeyDown(e)},n.close_=function(e){return
n.close(e)},n.opened_=n.hasBeenOpened_=n.hasBeenFilled_=!1,n.closeable(!
n.options_.uncloseable),n.content(n.options_.content),n.contentEl_=cn("div",
{className:"vjs-modal-dialog-content"},{role:"document"}),n.descEl_=cn("p",
{className:"vjs-modal-dialog-description vjs-control-
text",id:n.el().getAttribute("aria-
describedby")}),hn(n.descEl_,n.description()),n.el_.appendChild(n.descEl_),n.el_.ap
pendChild(n.contentEl_),n}(0,Y.Z)(t,e);var i=t.prototype;return
i.createEl=function(){return e.prototype.createEl.call(this,"div",
{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()
+"_description","aria-hidden":"true","aria-
label":this.label(),role:"dialog"})},i.dispose=function()
{this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.d
ispose.call(this)},i.buildCSSClass=function(){return"vjs-modal-dialog vjs-hidden
"+e.prototype.buildCSSClass.call(this)},i.label=function(){return
this.localize(this.options_.label||"Modal Window")},i.description=function(){var
e=this.options_.description||this.localize("This is a modal window.");return
this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the
Escape key or activating the close button.")),e},i.open=function(){if(!
this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,
(this.options_.fillAlways||!this.hasBeenOpened_&&!
this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!
e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown"
,this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!
1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-
hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!
0}},i.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"]
(),this.opened_},i.close=function(){if(this.opened_){var
e=this.player();this.trigger("beforemodalclose"),this.opened_=!
1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.han
dleKeyDown_),this.hadControls_&&e.controls(!
0),this.hide(),this.el().setAttribute("aria-
hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.te
mporary&&this.dispose()}},i.closeable=function(e){if("boolean"==typeof e){var
t=this.closeable_=!!e,i=this.getChild("closeButton");if(t&&!i){var
n=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",
{controlText:"Close Modal
Dialog"}),this.contentEl_=n,this.on(i,"close",this.close_)}!
t&&i&&(this.off(i,"close",this.close_),this.removeChild(i),i.dispose())}return
this.closeable_},i.fill=function()
{this.fillWith(this.content())},i.fillWith=function(e){var
t=this.contentEl(),i=t.parentNode,n=t.nextSibling;this.trigger("beforemodalfill"),t
his.hasBeenFilled_=!
0,i.removeChild(t),this.empty(),Ln(t,e),this.trigger("modalfill"),n?
i.insertBefore(t,n):i.appendChild(t);var
r=this.getChild("closeButton");r&&i.appendChild(r.el_)},i.empty=function()
{this.trigger("beforemodalempty"),Pn(this.contentEl()),this.trigger("modalempty")},
i.content=function(e){return void 0!
==e&&(this.content_=e),this.content_},i.conditionalFocus_=function(){var
e=Z().activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,
(t.contains(e)||
t===e)&&(this.previouslyActiveEl_=e,this.focus())},i.conditionalBlur_=function()
{this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveE
l_=null)},i.handleKeyDown=function(e)
{if(e.stopPropagation(),X().isEventKey(e,"Escape")&&this.closeable())return
e.preventDefault(),void this.close();if(X().isEventKey(e,"Tab")){for(var
t,i=this.focusableEls_(),n=this.el_.querySelector(":focus"),r=0;r<i.length;r+
+)if(n===i[r]){t=r;break}Z().activeElement===this.el_&&(t=0),e.shiftKey&&0===t?
(i[i.length-1].focus(),e.preventDefault()):e.shiftKey||t!==i.length-1||
(i[0].focus(),e.preventDefault())}},i.focusableEls_=function(){var
e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(function(e)
{return(e instanceof W().HTMLAnchorElement||e instanceof
W().HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof
W().HTMLInputElement||e instanceof W().HTMLSelectElement||e instanceof
W().HTMLTextAreaElement||e instanceof W().HTMLButtonElement)&&!
e.hasAttribute("disabled")||e instanceof W().HTMLIFrameElement||e instanceof
W().HTMLObjectElement||e instanceof W().HTMLEmbedElement||
e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||
e.hasAttribute("contenteditable")}))},t}(Pr);Fr.prototype.options_={pauseOnOpen:!
0,temporary:!0},Pr.registerComponent("ModalDialog",Fr);var Hr=function(e){function
t(t){var i;void 0===t&&(t=[]),(i=e.call(this)||
this).tracks_=[],Object.defineProperty((0,Q.Z)(i),"length",{get:function(){return
this.tracks_.length}});for(var n=0;n<t.length;n++)i.addTrack(t[n]);return i}(0,Y.Z)
(t,e);var i=t.prototype;return i.addTrack=function(e){var
t=this,i=this.tracks_.length;""+i in this||Object.defineProperty(this,i,
{get:function(){return this.tracks_[i]}}),-
1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addt
rack",target:this})),e.labelchange_=function()
{t.trigger({track:e,type:"labelchange",target:t})},cr(e)&&e.addEventListener("label
change",e.labelchange_)},i.removeTrack=function(e){for(var
t,i=0,n=this.length;i<n;i++)if(this[i]===e)
{(t=this[i]).off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,t
ype:"removetrack",target:this})},i.getTrackById=function(e){for(var
t=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===e){t=r;break}}return
t},t}(ur);for(var qr in
Hr.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"remov
etrack",labelchange:"labelchange"},Hr.prototype.allowedEvents_)Hr.prototype["on"+qr
]=null;var zr=function(e,t){for(var i=0;i<e.length;i+
+)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)},Wr=function(e)
{function t(t){var i;void 0===t&&(t=[]);for(var n=t.length-
1;n>=0;n--)if(t[n].enabled){zr(t,t[n]);break}return(i=e.call(this,t)||
this).changing_=!1,i}(0,Y.Z)(t,e);var i=t.prototype;return i.addTrack=function(t)
{var
i=this;t.enabled&&zr(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&
(t.enabledChange_=function(){i.changing_||(i.changing_=!0,zr(i,t),i.changing_=!
1,i.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},i.re
moveTrack=function(t)
{e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.r
emoveEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}
(Hr),Gr=function(e,t){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!
==e[i].id&&(e[i].selected=!1)},Zr=function(e){function t(t){var i;void
0===t&&(t=[]);for(var n=t.length-1;n>=0;n--)if(t[n].selected)
{Gr(t,t[n]);break}return(i=e.call(this,t)||this).changing_=!
1,Object.defineProperty((0,Q.Z)(i),"selectedIndex",{get:function(){for(var
e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),i}
(0,Y.Z)(t,e);var i=t.prototype;return i.addTrack=function(t){var
i=this;t.selected&&Gr(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&
&(t.selectedChange_=function(){i.changing_||(i.changing_=!0,Gr(i,t),i.changing_=!
1,i.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))},i.
removeTrack=function(t)
{e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.selectedChange_&&(t.
removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)},t}
(Hr),Kr=function(e){function t(){return e.apply(this,arguments)||this}(0,Y.Z)
(t,e);var i=t.prototype;return i.addTrack=function(t){var
i=this;e.prototype.addTrack.call(this,t),this.queueChange_||
(this.queueChange_=function(){return
i.queueTrigger("change")}),this.triggerSelectedlanguagechange||
(this.triggerSelectedlanguagechange_=function(){return
i.trigger("selectedlanguagechange")}),t.addEventListener("modechange",this.queueCha
nge_);-
1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",this.t
riggerSelectedlanguagechange_)},i.removeTrack=function(t)
{e.prototype.removeTrack.call(this,t),t.removeEventListener&&(this.queueChange_&&t.
removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&t
.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},t}(Hr),
$r=function(){function e(e){void
0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",
{get:function(){return this.trackElements_.length}});for(var t=0,i=e.length;t<i;t+
+)this.addTrackElement_(e[t])}var t=e.prototype;return
t.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||
Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-
1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementB
yTrack_=function(e){for(var t,i=0,n=this.trackElements_.length;i<n;i+
+)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return
t},t.removeTrackElement_=function(e){for(var
t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t])
{this.trackElements_[t].track&&"function"==typeof
this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==ty
peof
this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice
(t,1);break}},e}(),Xr=function(){function e(t)
{e.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",
{get:function(){return this.length_}})}var t=e.prototype;return
t.setCues_=function(e){var t=this.length||
0,i=0,n=e.length;this.cues_=e,this.length_=e.length;var r=function(e){""+e in
this||Object.defineProperty(this,""+e,{get:function(){return
this.cues_[e]}})};if(t<n)for(i=t;i<n;i++)r.call(this,i)},t.getCueById=function(e)
{for(var t=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===e)
{t=r;break}}return t},e}
(),Qr={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtit
les:"subtitles",commentary:"commentary"},Yr={alternative:"alternative",descriptions
:"descriptions",main:"main","main-desc":"main-
desc",translation:"translation",commentary:"commentary"},Jr={subtitles:"subtitles",
captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metad
ata"},es={disabled:"disabled",hidden:"hidden",showing:"showing"},ts=function(e)
{function t(t){var i;void 0===t&&(t={}),i=e.call(this)||this;var
n={id:t.id||"vjs_track_"+Gn(),kind:t.kind||"",language:t.language||""},r=t.label||"
",s=function(e){Object.defineProperty((0,Q.Z)(i),e,{get:function(){return
n[e]},set:function(){}})};for(var a in n)s(a);return Object.defineProperty((0,Q.Z)
(i),"label",{get:function(){return r},set:function(e){e!
==r&&(r=e,this.trigger("labelchange"))}}),i}return(0,Y.Z)(t,e),t}
(ur),is=function(e){var
t=["protocol","hostname","port","pathname","search","hash","host"],i=Z().createElem
ent("a");i.href=e;for(var n={},r=0;r<t.length;r+
+)n[t[r]]=i[t[r]];return"http:"===n.protocol&&(n.host=n.host.replace(/:80$/,"")),"h
ttps:"===n.protocol&&(n.host=n.host.replace(/:443$/,"")),n.protocol||
(n.protocol=W().location.protocol),n.host||
(n.host=W().location.host),n},ns=function(e){if(!e.match(/^https?:\/\//)){var
t=Z().createElement("a");t.href=e,e=t.href}return e},rs=function(e)
{if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]
+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return
t.pop().toLowerCase()}return""},ss=function(e,t){void 0===t&&(t=W().location);var
i=is(e);return(":"===i.protocol?t.protocol:i.protocol)+i.host!
==t.protocol+t.host},as=Object.freeze({__proto__:null,parseUrl:is,getAbsoluteURL:ns
,getFileExtension:rs,isCrossOrigin:ss}),os=function(e,t){var
i=new(W().WebVTT.Parser)
(W(),W().vttjs,W().WebVTT.StringDecoder()),n=[];i.oncue=function(e)
{t.addCue(e)},i.onparsingerror=function(e){n.push(e)},i.onflush=function()
{t.trigger({type:"loadeddata",target:t})},i.parse(e),n.length>0&&(W().console&&W().
console.groupCollapsed&&W().console.groupCollapsed("Text Track parsing errors for
"+t.src),n.forEach((function(e){return
xi.error(e)})),W().console&&W().console.groupEnd&&W().console.groupEnd()),i.flush()
},ls=function(e,t){var i={uri:e},n=ss(e);n&&(i.cors=n);var r="use-
credentials"===t.tech_.crossOrigin();r&&(i.withCredentials=r),ie()(i,or(this,
(function(e,i,n){if(e)return xi.error(e,i);t.loaded_=!0,"function"!=typeof
W().WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(function(e)
{if("vttjserror"!==e.type)return os(n,t);xi.error("vttjs failed to load, stopping
trying to process "+t.src)})):os(n,t)})))},us=function(e){function t(t){var
i;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var
n=wr(t,{kind:Jr[t.kind]||"subtitles",language:t.language||
t.srclang||""}),r=es[n.mode]||"disabled",s=n.default;"metadata"!
==n.kind&&"chapters"!==n.kind||(r="hidden"),(i=e.call(this,n)||
this).tech_=n.tech,i.cues_=[],i.activeCues_=[],i.preload_=!1!
==i.tech_.preloadTextTracks;var a=new Xr(i.cues_),o=new Xr(i.activeCues_),l=!
1;i.timeupdateHandler=or((0,Q.Z)(i),(function(){this.tech_.isDisposed()||
(this.tech_.isReady_?
(this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!
1),this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)):this.rvf
_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}));return
i.tech_.one("dispose",(function(){i.stopTracking()})),"disabled"!
==r&&i.startTracking(),Object.defineProperties((0,Q.Z)(i),{default:{get:function()
{return s},set:function(){}},mode:{get:function(){return r},set:function(e)
{es[e]&&r!==e&&(r=e,this.preload_||"disabled"===r||0!==this.cues.length||
ls(this.src,this),this.stopTracking(),"disabled"!
==r&&this.startTracking(),this.trigger("modechange"))}},cues:{get:function(){return
this.loaded_?a:null},set:function(){}},activeCues:{get:function(){if(!
this.loaded_)return null;if(0===this.cues.length)return o;for(var
e=this.tech_.currentTime(),t=[],i=0,n=this.cues.length;i<n;i++){var r=this.cues[i];
(r.startTime<=e&&r.endTime>=e||
r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e)&&t.push(r)}if(l=!
1,t.length!==this.activeCues_.length)l=!0;else for(var s=0;s<t.length;s++)-
1===this.activeCues_.indexOf(t[s])&&(l=!0);return
this.activeCues_=t,o.setCues_(this.activeCues_),o},set:function(){}}}),n.src?
(i.src=n.src,i.preload_||(i.loaded_=!0),(i.preload_||"subtitles"!
==n.kind&&"captions"!==n.kind)&&ls(i.src,(0,Q.Z)(i))):i.loaded_=!0,i}(0,Y.Z)
(t,e);var i=t.prototype;return i.startTracking=function()
{this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)},i.stopTrac
king=function()
{this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void
0)},i.addCue=function(e){var t=e;if(W().vttjs&&!(e instanceof W().vttjs.VTTCue))
{for(var i in t=new(W().vttjs.VTTCue)(e.startTime,e.endTime,e.text),e)i in t||
(t[i]=e[i]);t.id=e.id,t.originalCue_=e}for(var
n=this.tech_.textTracks(),r=0;r<n.length;r++)n[r]!
==this&&n[r].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},i.remo
veCue=function(e){for(var t=this.cues_.length;t--;){var i=this.cues_[t];if(i===e||
i.originalCue_&&i.originalCue_===e)
{this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}
(ts);us.prototype.allowedEvents_={cuechange:"cuechange"};var ds=function(e)
{function t(t){var i;void 0===t&&(t={});var n=wr(t,
{kind:Yr[t.kind]||""});i=e.call(this,n)||this;var r=!1;return
Object.defineProperty((0,Q.Z)(i),"enabled",{get:function(){return
r},set:function(e){"boolean"==typeof e&&e!
==r&&(r=e,this.trigger("enabledchange"))}}),n.enabled&&(i.enabled=n.enabled),i.load
ed_=!0,i}return(0,Y.Z)(t,e),t}(ts),cs=function(e){function t(t){var i;void
0===t&&(t={});var n=wr(t,{kind:Qr[t.kind]||""});i=e.call(this,n)||this;var r=!
1;return Object.defineProperty((0,Q.Z)(i),"selected",{get:function(){return
r},set:function(e){"boolean"==typeof e&&e!
==r&&(r=e,this.trigger("selectedchange"))}}),n.selected&&(i.selected=n.selected),i}
return(0,Y.Z)(t,e),t}(ts),hs=function(e){function t(t){var i,n;void
0===t&&(t={}),i=e.call(this)||this;var r=new us(t);return
i.kind=r.kind,i.src=r.src,i.srclang=r.language,i.label=r.label,i.default=r.default,
Object.defineProperties((0,Q.Z)(i),{readyState:{get:function(){return n}},track:
{get:function(){return r}}}),n=0,r.addEventListener("loadeddata",(function()
{n=2,i.trigger({type:"load",target:(0,Q.Z)(i)})})),i}return(0,Y.Z)(t,e),t}
(ur);hs.prototype.allowedEvents_={load:"load"},hs.NONE=0,hs.LOADING=1,hs.LOADED=2,h
s.ERROR=3;var ps={audio:{ListClass:Wr,TrackClass:ds,capitalName:"Audio"},video:
{ListClass:Zr,TrackClass:cs,capitalName:"Video"},text:
{ListClass:Kr,TrackClass:us,capitalName:"Text"}};Object.keys(ps).forEach((function(
e){ps[e].getterName=e+"Tracks",ps[e].privateName=e+"Tracks_"}));var fs={remoteText:
{ListClass:Kr,TrackClass:us,capitalName:"RemoteText",getterName:"remoteTextTracks",
privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:
$r,TrackClass:hs,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",p
rivateName:"remoteTextTrackEls_"}},ms=(0,K.Z)
({},ps,fs);fs.names=Object.keys(fs),ps.names=Object.keys(ps),ms.names=[].concat(fs.
names).concat(ps.names);var gs=function(e){function t(t,i){var n;return void
0===t&&(t={}),void 0===i&&(i=function(){}),t.reportTouchActivity=!1,
(n=e.call(this,null,t,i)||this).onDurationChange_=function(e){return
n.onDurationChange(e)},n.trackProgress_=function(e){return
n.trackProgress(e)},n.trackCurrentTime_=function(e){return
n.trackCurrentTime(e)},n.stopTrackingCurrentTime_=function(e){return
n.stopTrackingCurrentTime(e)},n.disposeSourceHandler_=function(e){return
n.disposeSourceHandler(e)},n.queuedHanders_=new Set,n.hasStarted_=!
1,n.on("playing",(function(){this.hasStarted_=!0})),n.on("loadstart",(function()
{this.hasStarted_=!1})),ms.names.forEach((function(e){var
i=ms[e];t&&t[i.getterName]&&(n[i.privateName]=t[i.getterName])})),n.featuresProgres
sEvents||n.manualProgressOn(),n.featuresTimeupdateEvents||n.manualTimeUpdatesOn(),
["Text","Audio","Video"].forEach((function(e){!
1===t["native"+e+"Tracks"]&&(n["featuresNative"+e+"Tracks"]=!1)})),!
1===t.nativeCaptions||!1===t.nativeTextTracks?n.featuresNativeTextTracks=!1:!0!
==t.nativeCaptions&&!0!==t.nativeTextTracks||(n.featuresNativeTextTracks=!
0),n.featuresNativeTextTracks||n.emulateTextTracks(),n.preloadTextTracks=!1!
==t.preloadTextTracks,n.autoRemoteTextTracks_=new
ms.text.ListClass,n.initTrackListeners(),t.nativeControlsForTouch||
n.emitTapEvents(),n.constructor&&(n.name_=n.constructor.name||"Unknown Tech"),n}
(0,Y.Z)(t,e);var i=t.prototype;return i.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"})},i.manualProgr
essOn=function()
{this.on("durationchange",this.onDurationChange_),this.manualProgress=!
0,this.one("ready",this.trackProgress_)},i.manualProgressOff=function()
{this.manualProgress=!
1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)},i.
trackProgress=function(e)
{this.stopTrackingProgress(),this.progressInterval=this.setInterval(or(this,
(function(){var e=this.bufferedPercent();this.bufferedPercent_!
==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgr
ess()})),500)},i.onDurationChange=function(e)
{this.duration_=this.duration()},i.buffered=function(){return
Lr(0,0)},i.bufferedPercent=function(){return
Or(this.buffered(),this.duration_)},i.stopTrackingProgress=function()
{this.clearInterval(this.progressInterval)},i.manualTimeUpdatesOn=function()
{this.manualTimeUpdates=!
0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTi
me_)},i.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!
1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("
pause",this.stopTrackingCurrentTime_)},i.trackCurrentTime=function()
{this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=
this.setInterval((function()
{this.trigger({type:"timeupdate",target:this,manuallyTriggered:!
0})}),250)},i.stopTrackingCurrentTime=function()
{this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",targe
t:this,manuallyTriggered:!0})},i.dispose=function()
{this.clearTracks(ps.names),this.manualProgress&&this.manualProgressOff(),this.manu
alTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},i.clearT
racks=function(e){var t=this;(e=[].concat(e)).forEach((function(e){for(var
i=t[e+"Tracks"]()||[],n=i.length;n--;){var
r=i[n];"text"===e&&t.removeRemoteTextTrack(r),i.removeTrack(r)}}))},i.cleanupAutoTe
xtTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var
i=e[t];this.removeRemoteTextTrack(i)}},i.reset=function()
{},i.crossOrigin=function(){},i.setCrossOrigin=function(){},i.error=function(e)
{return void 0!==e&&(this.error_=new
Dr(e),this.trigger("error")),this.error_},i.played=function(){return
this.hasStarted_?Lr(0,0):Lr()},i.play=function(){},i.setScrubbing=function()
{},i.scrubbing=function(){},i.setCurrentTime=function()
{this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTrigge
red:!0})},i.initTrackListeners=function(){var e=this;ps.names.forEach((function(t)
{var i=ps[t],n=function(){e.trigger(t+"trackchange")},r=e[i.getterName]
();r.addEventListener("removetrack",n),r.addEventListener("addtrack",n),e.on("dispo
se",(function()
{r.removeEventListener("removetrack",n),r.removeEventListener("addtrack",n)}))}))},
i.addWebVttScript_=function(){var e=this;if(!
W().WebVTT)if(Z().body.contains(this.el())){if(!
this.options_["vtt.js"]&&Di(re())&&Object.keys(re()).length>0)return void
this.trigger("vttjsloaded");var
t=Z().createElement("script");t.src=this.options_["vtt.js"]||"https://
vjs.zencdn.net/vttjs/0.14.1/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})),W().WebVTT=!
0,this.el().parentNode.appendChild(t)}else
this.ready(this.addWebVttScript_)},i.emulateTextTracks=function(){var
e=this,t=this.textTracks(),i=this.remoteTextTracks(),n=function(e){return
t.addTrack(e.track)},r=function(e){return
t.removeTrack(e.track)};i.on("addtrack",n),i.on("removetrack",r),this.addWebVttScri
pt_();var s=function(){return e.trigger("texttrackchange")},a=function()
{s();for(var e=0;e<t.length;e++){var
i=t[e];i.removeEventListener("cuechange",s),"showing"===i.mode&&i.addEventListener(
"cuechange",s)}};a(),t.addEventListener("change",a),t.addEventListener("addtrack",a
),t.addEventListener("removetrack",a),this.on("dispose",(function()
{i.off("addtrack",n),i.off("removetrack",r),t.removeEventListener("change",a),t.rem
oveEventListener("addtrack",a),t.removeEventListener("removetrack",a);for(var
e=0;e<t.length;e++)
{t[e].removeEventListener("cuechange",s)}}))},i.addTextTrack=function(e,t,i){if(!
e)throw new Error("TextTrack kind is required but was not provided");return
function(e,t,i,n,r){void 0===r&&(r={});var
s=e.textTracks();r.kind=t,i&&(r.label=i),n&&(r.language=n),r.tech=e;var a=new
ms.text.TrackClass(r);return s.addTrack(a),a}
(this,e,t,i)},i.createRemoteTextTrack=function(e){var t=wr(e,{tech:this});return
new fs.remoteTextEl.TrackClass(t)},i.addRemoteTextTrack=function(e,t){var
i=this;void 0===e&&(e={});var n=this.createRemoteTextTrack(e);return!0!==t&&!1!
==t&&(xi.warn('Calling addRemoteTextTrack without explicitly setting the
"manualCleanup" parameter to `true` is deprecated and default to `false` in future
version of video.js'),t=!
0),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n
.track),!0!==t&&this.ready((function(){return
i.autoRemoteTextTracks_.addTrack(n.track)})),n},i.removeRemoteTextTrack=function(e)
{var
t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().re
moveTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTrac
ks_.removeTrack(e)},i.getVideoPlaybackQuality=function()
{return{}},i.requestPictureInPicture=function(){var e=this.options_.Promise||
W().Promise;if(e)return e.reject()},i.disablePictureInPicture=function(){return!
0},i.setDisablePictureInPicture=function()
{},i.requestVideoFrameCallback=function(e){var
t=this,i=Gn();return this.paused()?(this.queuedHanders_.add(i),this.one("playing",
(function()
{t.queuedHanders_.has(i)&&(t.queuedHanders_.delete(i),e())}))):this.requestNamedAni
mationFrame(i,e),i},i.cancelVideoFrameCallback=function(e)
{this.queuedHanders_.has(e)?
this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)},i.setPoster=functi
on(){},i.playsinline=function(){},i.setPlaysinline=function()
{},i.overrideNativeAudioTracks=function(){},i.overrideNativeVideoTracks=function()
{},i.canPlayType=function(){return""},t.canPlayType=function()
{return""},t.canPlaySource=function(e,i){return
t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e
instanceof t||e===t},t.registerTech=function(e,i){if(t.techs_||(t.techs_={}),!
t.isTech(i))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=Sr(e),t.techs_[e]=i,t.techs_[Cr(e)]=i,"Tech"!
==e&&t.defaultTechOrder_.push(e),i},t.getTech=function(e){if(e)return
t.techs_&&t.techs_[e]?t.techs_[e]:(e=Sr(e),W()&&W().videojs&&W().videojs[e]?
(xi.warn("The "+e+" tech was added to the videojs object when it should be
registered using videojs.registerTech(name, tech)"),W().videojs[e]):void 0)},t}
(Pr);ms.names.forEach((function(e){var
t=ms[e];gs.prototype[t.getterName]=function(){return
this[t.privateName]=this[t.privateName]||new
t.ListClass,this[t.privateName]}})),gs.prototype.featuresVolumeControl=!
0,gs.prototype.featuresMuteControl=!0,gs.prototype.featuresFullscreenResize=!
1,gs.prototype.featuresPlaybackRate=!1,gs.prototype.featuresProgressEvents=!
1,gs.prototype.featuresSourceset=!1,gs.prototype.featuresTimeupdateEvents=!
1,gs.prototype.featuresNativeTextTracks=!
1,gs.prototype.featuresVideoFrameCallback=!1,gs.withSourceHandlers=function(e)
{e.registerSourceHandler=function(t,i){var n=e.sourceHandlers;n||
(n=e.sourceHandlers=[]),void
0===i&&(i=n.length),n.splice(i,0,t)},e.canPlayType=function(t){for(var
i,n=e.sourceHandlers||[],r=0;r<n.length;r++)if(i=n[r].canPlayType(t))return
i;return""},e.selectSourceHandler=function(t,i){for(var n=e.sourceHandlers||
[],r=0;r<n.length;r++)if(n[r].canHandleSource(t,i))return n[r];return
null},e.canPlaySource=function(t,i){var n=e.selectSourceHandler(t,i);return n?
n.canHandleSource(t,i):""};["seekable","seeking","duration"].forEach((function(e)
{var t=this[e];"function"==typeof t&&(this[e]=function(){return
this.sourceHandler_&&this.sourceHandler_[e]?
this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)
})}),e.prototype),e.prototype.setSource=function(t){var
i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?
i=e.nativeSourceHandler:xi.error("No source handler found for the current
source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler
_),i!
==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource
(t,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},e.prototype.
disposeSourceHandler=function()
{this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null
),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&t
his.sourceHandler_.dispose(),this.sourceHandler_=null)}},Pr.registerComponent("Tech
",gs),gs.registerTech("Tech",gs),gs.defaultTechOrder_=[];var
vs={},ys={},_s={};function bs(e,t,i){e.setTimeout((function(){return
Es(t,vs[t.type],i,e)}),1)}function Ts(e,t,i,n){void 0===n&&(n=null);var
r="call"+Sr(i),s=e.reduce(ks(r),n),a=s===_s,o=a?null:t[i](s);return
function(e,t,i,n){for(var r=e.length-1;r>=0;r--){var s=e[r];s[t]&&s[t](n,i)}}
(e,i,o,a),o}var
Cs={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume
:1,ended:1},Ss={setCurrentTime:1,setMuted:1,setVolume:1},ws={play:1,pause:1};functi
on ks(e){return function(t,i){return t===_s?_s:i[e]?i[e](t):t}}function
Es(e,t,i,n,r,s){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===r&&(r=[]),void
0===s&&(s=!1);var a=t,o=a[0],l=a.slice(1);if("string"==typeof
o)Es(e,vs[o],i,n,r,s);else if(o){var u=function(e,t){var
i=ys[e.id()],n=null;if(null==i)return n=t(e),ys[e.id()]=[[t,n]],n;for(var
r=0;r<i.length;r++){var s=i[r],a=s[0],o=s[1];a===t&&(n=o)}return
null===n&&(n=t(e),i.push([t,n])),n}(n,o);if(!u.setSource)return
r.push(u),Es(e,l,i,n,r,s);u.setSource(Li({},e),(function(t,a){if(t)return
Es(e,l,i,n,r,s);r.push(u),Es(a,e.type===a.type?l:vs[a.type],i,n,r,s)}))}else
l.length?Es(e,l,i,n,r,s):s?i(e,r):Es(e,vs["*"],i,n,r,!0)}var
xs={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/
mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/
aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/
wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/
jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/
svg+xml",webp:"image/webp"},js=function(e){void 0===e&&(e="");var t=rs(e);return
xs[t.toLowerCase()]||""},Ps=function e(t){if(Array.isArray(t)){var
i=[];t.forEach((function(t){t=e(t),Array.isArray(t)?
i=i.concat(t):Oi(t)&&i.push(t)})),t=i}else t="string"==typeof t&&t.trim()?
[Is({src:t})]:Oi(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[Is(t)]:[];return
t};function Is(e){if(!e.type){var t=js(e.src);t&&(e.type=t)}return e}var
As=function(e){function t(t,i,n){var r,s=wr({createEl:!
1},i);if(r=e.call(this,t,s,n)||this,i.playerOptions.sources&&0!
==i.playerOptions.sources.length)t.src(i.playerOptions.sources);else for(var
a=0,o=i.playerOptions.techOrder;a<o.length;a++){var
l=Sr(o[a]),u=gs.getTech(l);if(l||(u=Pr.getComponent(l)),u&&u.isSupported())
{t.loadTech_(l);break}}return r}return(0,Y.Z)(t,e),t}
(Pr);Pr.registerComponent("MediaLoader",As);var Ls=function(e){function t(t,i){var
n;return(n=e.call(this,t,i)||
this).options_.controlText&&n.controlText(n.options_.controlText),n.handleMouseOver
_=function(e){return n.handleMouseOver(e)},n.handleMouseOut_=function(e){return
n.handleMouseOut(e)},n.handleClick_=function(e){return
n.handleClick(e)},n.handleKeyDown_=function(e){return
n.handleKeyDown(e)},n.emitTapEvents(),n.enable(),n}(0,Y.Z)(t,e);var
i=t.prototype;return i.createEl=function(e,t,i){void 0===e&&(e="div"),void
0===t&&(t={}),void
0===i&&(i={}),t=Li({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&xi.
error("Creating a ClickableComponent with an HTML element of "+e+" is not
supported; use a Button
instead."),i=Li({role:"button"},i),this.tabIndex_=t.tabIndex;var n=cn(e,t,i);return
n.appendChild(cn("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!
0})),this.createControlTextEl(n),n},i.dispose=function()
{this.controlTextEl_=null,e.prototype.dispose.call(this)},i.createControlTextEl=fun
ction(e){return this.controlTextEl_=cn("span",{className:"vjs-control-text"},
{"aria-
live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.contro
lText_,e),this.controlTextEl_},i.controlText=function(e,t){if(void
0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var
i=this.localize(e);this.controlText_=e,hn(this.controlTextEl_,i),this.nonIconContro
l||this.player_.options_.noUITitleAttributes||
t.setAttribute("title",i)},i.buildCSSClass=function(){return"vjs-control vjs-button
"+e.prototype.buildCSSClass.call(this)},i.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("keydown",this.handleKeyDown_))},i.disable=funct
ion(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-
disabled","true"),void 0!
==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.ha
ndleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],
this.handleClick_),this.off("keydown",this.handleKeyDown_)},i.handleLanguagechange=
function(){this.controlText(this.controlText_)},i.handleClick=function(e)
{this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},i.han
dleKeyDown=function(t){X().isEventKey(t,"Space")||X().isEventKey(t,"Enter")?
(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKe
yDown.call(this,t)},t}(Pr);Pr.registerComponent("ClickableComponent",Ls);var
Os=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||
this).update(),n.update_=function(e){return
n.update(e)},t.on("posterchange",n.update_),n}(0,Y.Z)(t,e);var i=t.prototype;return
i.dispose=function()
{this.player().off("posterchange",this.update_),e.prototype.dispose.call(this)},i.c
reateEl=function(){return cn("div",{className:"vjs-poster",tabIndex:-
1})},i.update=function(e){var t=this.player().poster();this.setSrc(t),t?
this.show():this.hide()},i.setSrc=function(e){var
t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},i.handleClick=function
(e){if(this.player_.controls()){var
t=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sess
ions.length>0;!this.player_.tech(!0)||($i||Gi)&&t||this.player_.tech(!
0).focus(),this.player_.paused()?Nr(this.player_.play()):this.player_.pause()}},t}
(Ls);Pr.registerComponent("PosterImage",Os);var
Ds={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 Ms(e,t){var
i;if(4===e.length)i=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.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slic
e(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function
Rs(e,t,i){try{e.style[t]=i}catch(e){return}}var Ns=function(e){function t(t,i,n)
{var r;r=e.call(this,t,i,n)||this;var s=function(e){return
r.updateDisplay(e)};return t.on("loadstart",(function(e){return
r.toggleDisplay(e)})),t.on("texttrackchange",s),t.on("loadedmetadata",(function(e)
{return r.preselectTrack(e)})),t.ready(or((0,Q.Z)(r),(function()
{if(t.tech_&&t.tech_.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchan
ge",s),t.on("playerresize",s),W().addEventListener("orientationchange",s),t.on("dis
pose",(function(){return W().removeEventListener("orientationchange",s)}));for(var
e=this.options_.playerOptions.tracks||[],i=0;i<e.length;i+
+)this.player_.addRemoteTextTrack(e[i],!0);this.preselectTrack()}}))),r}(0,Y.Z)
(t,e);var i=t.prototype;return i.preselectTrack=function(){for(var
e,t,i,n={captions:1,subtitles:1},r=this.player_.textTracks(),s=this.player_.cache_.
selectedLanguage,a=0;a<r.length;a++){var
o=r[a];s&&s.enabled&&s.language&&s.language===o.language&&o.kind in n?
o.kind===s.kind?i=o:i||(i=o):s&&!s.enabled?
(i=null,e=null,t=null):o.default&&("descriptions"!==o.kind||e?o.kind in n&&!
t&&(t=o):e=o)}i?i.mode="showing":t?
t.mode="showing":e&&(e.mode="showing")},i.toggleDisplay=function()
{this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?
this.hide():this.show()},i.createEl=function(){return
e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},
{translate:"yes","aria-live":"off","aria-
atomic":"true"})},i.clearDisplay=function(){"function"==typeof
W().WebVTT&&W().WebVTT.processCues(W(),[],this.el_)},i.updateDisplay=function(){var
e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clea
rDisplay(),t){for(var i=[],n=0;n<e.length;++n){var
r=e[n];"showing"===r.mode&&i.push(r)}this.updateForTrack(i)}else{for(var
s=null,a=null,o=e.length;o--;){var
l=e[o];"showing"===l.mode&&("descriptions"===l.kind?s=l:a=l)}a?("off"!
==this.getAttribute("aria-live")&&this.setAttribute("aria-
live","off"),this.updateForTrack(a)):s&&("assertive"!==this.getAttribute("aria-
live")&&this.setAttribute("aria-
live","assertive"),this.updateForTrack(s))}},i.updateDisplayState=function(e)
{for(var
t=this.player_.textTrackSettings.getValues(),i=e.activeCues,n=i.length;n--;){var
r=i[n];if(r){var
s=r.displayState;if(t.color&&(s.firstChild.style.color=t.color),t.textOpacity&&Rs(s
.firstChild,"color",Ms(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(s.firstC
hild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Rs(s.firstChild,
"backgroundColor",Ms(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&
&(t.windowOpacity?
Rs(s,"backgroundColor",Ms(t.windowColor,t.windowOpacity)):s.style.backgroundColor=t
.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?
s.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px
#222":"raised"===t.edgeStyle?s.firstChild.style.textShadow="1px 1px #222, 2px 2px
#222, 3px 3px #222":"depressed"===t.edgeStyle?s.firstChild.style.textShadow="1px
1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px
#222":"uniform"===t.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px #222, 0 0
4px #222, 0 0 4px #222, 0 0 4px #222")),t.fontPercent&&1!==t.fontPercent){var
a=W().parseFloat(s.style.fontSize);s.style.fontSize=a*t.fontPercent+"px",s.style.he
ight="auto",s.style.top="auto"}t.fontFamily&&"default"!==t.fontFamily&&("small-
caps"===t.fontFamily?s.firstChild.style.fontVariant="small-
caps":s.firstChild.style.fontFamily=Ds[t.fontFamily])}}},i.updateForTrack=function(
e){if(Array.isArray(e)||(e=[e]),"function"==typeof W().WebVTT&&!
e.every((function(e){return!e.activeCues}))){for(var t=[],i=0;i<e.length;+
+i)for(var n=e[i],r=0;r<n.activeCues.length;+
+r)t.push(n.activeCues[r]);W().WebVTT.processCues(W(),t,this.el_);for(var
s=0;s<e.length;++s){for(var a=e[s],o=0;o<a.activeCues.length;++o){var
l=a.activeCues[o].displayState;mn(l,"vjs-text-track-cue"),mn(l,"vjs-text-track-
cue-"+(a.language?
a.language:s)),a.language&&Tn(l,"lang",a.language)}this.player_.textTrackSettings&&
this.updateDisplayState(a)}}},t}
(Pr);Pr.registerComponent("TextTrackDisplay",Ns);var Us=function(e){function t()
{return e.apply(this,arguments)||this}return(0,Y.Z)
(t,e),t.prototype.createEl=function(){var
t=this.player_.isAudio(),i=this.localize(t?"Audio Player":"Video
Player"),n=cn("span",{className:"vjs-control-text",textContent:this.localize("{1}
is loading.",[i])}),r=e.prototype.createEl.call(this,"div",{className:"vjs-loading-
spinner",dir:"ltr"});return r.appendChild(n),r},t}
(Pr);Pr.registerComponent("LoadingSpinner",Us);var Bs=function(e){function t()
{return e.apply(this,arguments)||this}(0,Y.Z)(t,e);var i=t.prototype;return
i.createEl=function(e,t,i){void 0===t&&(t={}),void 0===i&&(i={});var
n=cn("button",t=Li({className:this.buildCSSClass()},t),i=Li({type:"button"},i));ret
urn n.appendChild(cn("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!
0})),this.createControlTextEl(n),n},i.addChild=function(e,t){void 0===t&&(t={});var
i=this.constructor.name;return xi.warn("Adding an actionable (user controllable)
child to a Button ("+i+") is not supported; use a ClickableComponent
instead."),Pr.prototype.addChild.call(this,e,t)},i.enable=function()
{e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},i.disable=func
tion()
{e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},i.han
dleKeyDown=function(t){X().isEventKey(t,"Space")||X().isEventKey(t,"Enter")?
t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}
(Ls);Pr.registerComponent("Button",Bs);var Vs=function(e){function t(t,i){var
n;return(n=e.call(this,t,i)||this).mouseused_=!1,n.on("mousedown",(function(e)
{return n.handleMouseDown(e)})),n}(0,Y.Z)(t,e);var i=t.prototype;return
i.buildCSSClass=function(){return"vjs-big-play-button"},i.handleClick=function(e)
{var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY){var
i=this.player_.usingPlugin("eme")&&th

You might also like