/**
* @license
* video.js 7.8.4
* copyright brightcove, inc.
* available under apache license version 2.0
*
*
* includes vtt.js
* available under apache license version 2.0
*
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("global/window"),require("global/document")):"function"==typeof define&&define.amd?define(["global/window","global/document"],t):(e=e||self).videojs=t(e.window,e.document)}(this,function(y,h){"use strict";y=y&&object.prototype.hasownproperty.call(y,"default")?y.default:y,h=h&&object.prototype.hasownproperty.call(h,"default")?h.default:h;var d="7.8.4",l=[],e=function(o,u){return function(e,t,i){var n=u.levels[t],r=new regexp("^("+n+")$");if("log"!==e&&i.unshift(e.touppercase()+":"),i.unshift(o+":"),l){l.push([].concat(i));var s=l.length-1e3;l.splice(0,0',i=n.firstchild,n.setattribute("style","display:none; position:absolute;"),h.body.appendchild(n));for(var s={},a=0;ax',e=t.firstchild.href}return e}function ut(e){if("string"==typeof e){var t=/^(\/?)([\s\s]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().tolowercase()}return""}function mt(e,t){void 0===t&&(t=y.location);var i=nt(e);return(":"===i.protocol?t.protocol:i.protocol)+i.host!==t.protocol+t.host}var bt=function(n){function e(e){var t;void 0===e&&(e=[]);for(var i=e.length-1;0<=i;i--)if(e[i].enabled){ot(e,e[i]);break}return(t=n.call(this,e)||this).changing_=!1,t}he(e,n);var t=e.prototype;return t.addtrack=function(e){var t=this;e.enabled&&ot(this,e),n.prototype.addtrack.call(this,e),e.addeventlistener&&(e.enabledchange_=function(){t.changing_||(t.changing_=!0,ot(t,e),t.changing_=!1,t.trigger("change"))},e.addeventlistener("enabledchange",e.enabledchange_))},t.removetrack=function(e){n.prototype.removetrack.call(this,e),e.removeeventlistener&&e.enabledchange_&&(e.removeeventlistener("enabledchange",e.enabledchange_),e.enabledchange_=null)},e}(pt),jt=function(n){function e(e){var t;void 0===e&&(e=[]);for(var i=e.length-1;0<=i;i--)if(e[i].selected){dt(e,e[i]);break}return(t=n.call(this,e)||this).changing_=!1,object.defineproperty(ue(t),"selectedindex",{get:function(){for(var e=0;e
* copyright (c) 2014 david björklund
* available under the mit license
*
*/,$t=object.prototype.tostring;var qt=function(e){var r={};return e&&e.trim().split("\n").foreach(function(e){var t=e.indexof(":"),i=e.slice(0,t).trim().tolowercase(),n=e.slice(t+1).trim();"undefined"==typeof r[i]?r[i]=n:array.isarray(r[i])?r[i].push(n):r[i]=[r[i],n]}),r},jt=ti,zt=ti;function ei(e,t,i){var n=e;return yt(t)?(i=t,"string"==typeof e&&(n={uri:e})):n=r({},t,{uri:e}),n.callback=i,n}function ti(e,t,i){return ii(t=ei(e,t,i))}function ii(n){if("undefined"==typeof n.callback)throw new error("callback argument missing");var r=!1,s=function(e,t,i){r||(r=!0,n.callback(e,t,i))};function t(e){return cleartimeout(o),e instanceof error||(e=new error(""+(e||"unknown xmlhttprequest error"))),e.statuscode=0,s(e,m)}function e(){if(!a){var e;cleartimeout(o),e=n.usexdr&&void 0===u.status?200:1223===u.status?204:u.status;var t=m,i=null;return 0!==e?(t={body:function(){var e=void 0;if(e=u.response?u.response:u.responsetext||function(e){try{if("document"===e.responsetype)return e.responsexml;var t=e.responsexml&&"parsererror"===e.responsexml.documentelement.nodename;if(""===e.responsetype&&!t)return e.responsexml}catch(e){}return null}(u),f)try{e=json.parse(e)}catch(e){}return e}(),statuscode:e,method:c,headers:{},url:l,rawrequest:u},u.getallresponseheaders&&(t.headers=qt(u.getallresponseheaders()))):i=new error("internal xmlhttprequest error"),s(i,t,t.body)}}var i,a,o,u=n.xhr||null,l=(u=u||(n.cors||n.usexdr?new ti.xdomainrequest:new ti.xmlhttprequest)).url=n.uri||n.url,c=u.method=n.method||"get",h=n.body||n.data,d=u.headers=n.headers||{},p=!!n.sync,f=!1,m={body:void 0,headers:{},statuscode:0,method:c,url:l,rawrequest:u};if("json"in n&&!1!==n.json&&(f=!0,d.accept||d.accept||(d.accept="application/json"),"get"!==c&&"head"!==c&&(d["content-type"]||d["content-type"]||(d["content-type"]="application/json"),h=json.stringify(!0===n.json?h:n.json))),u.onreadystatechange=function(){4===u.readystate&&settimeout(e,0)},u.onload=e,u.onerror=t,u.onprogress=function(){},u.onabort=function(){a=!0},u.ontimeout=t,u.open(c,l,!p,n.username,n.password),p||(u.withcredentials=!!n.withcredentials),!p&&0=e?t.push(r):r.starttime===r.endtime&&r.starttime<=e&&r.starttime+.5>=e&&t.push(r)}if(o=!1,t.length!==this.activecues_.length)o=!0;else for(var s=0;s]*>?)?/);return e=t[1]?t[1]:t[2],i=i.substr(e.length),e}function t(e,t){var i=bi[e];if(!i)return null;var n=s.document.createelement(i),r=si[e];return r&&t&&(n[r]=t.trim()),n}for(var n,r,a,o,u=s.document.createelement("div"),l=u,c=[];null!==(n=e());)if("<"!==n[0])l.appendchild(s.document.createtextnode((r=n,_i.innerhtml=r,r=_i.textcontent,_i.textcontent="",r)));else{if("/"===n[1]){c.length&&c[c.length-1]===n.substr(2).replace(">","")&&(c.pop(),l=l.parentnode);continue}var h,d=mi(n.substr(1,n.length-2));if(d){h=s.document.createprocessinginstruction("timestamp",d),l.appendchild(h);continue}var p=n.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!p)continue;if(!(h=t(p[1],p[3])))continue;if(a=l,ki[(o=h).localname]&&ki[o.localname]!==a.localname)continue;if(p[2]){var f=p[2].split(".");f.foreach(function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(ti.hasownproperty(i)){var n=t?"background-color":"color",r=ti[i];h.style[n]=r}}),h.classname=f.join(" ")}c.push(p[1]),l.appendchild(h),l=h}return u}var wi=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function ei(e){for(var t=0;t=i[0]&&e<=i[1])return!0}return!1}function xi(){}function ai(e,t,i){xi.call(this),this.cue=t,this.cuediv=ci(e,t.text);var n={color:"rgba(255, 255, 255, 1)",backgroundcolor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingmode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodebidi:"plaintext"};this.applystyles(n,this.cuediv),this.div=e.document.createelement("div"),n={direction:function(e){var t=[],i="";if(!e||!e.childnodes)return"ltr";function r(e,t){for(var i=t.childnodes.length-1;0<=i;i--)e.push(t.childnodes[i])}function s(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textcontent||t.innertext;if(i){var n=i.match(/^.*(\n|\r)/);return n?n[e.length=0]:i}return"ruby"===t.tagname?s(e):t.childnodes?(r(e,t),s(e)):void 0}for(r(t,e);i=s(t);)for(var n=0;nh&&(c=c<0?-1:1,c*=math.ceil(h/l)*l),r<0&&(c+=""===n.vertical?o.height:o.width,s=s.reverse()),i.move(d,c)}else{var p=i.lineheight/o.height*100;switch(n.linealign){case"center":r-=p/2;break;case"end":r-=p}switch(n.vertical){case"":t.applystyles({top:t.formatstyle(r,"%")});break;case"rl":t.applystyles({left:t.formatstyle(r,"%")});break;case"lr":t.applystyles({right:t.formatstyle(r,"%")})}s=["+y","-x","+x","-y"],i=new ii(t)}var f=function(e,t){for(var i,n=new ii(e),r=1,s=0;se.left&&this.tope.top},ii.prototype.overlapsany=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},ii.prototype.overlapsoppositeaxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}},ii.prototype.intersectpercentage=function(e){return math.max(0,math.min(this.right,e.right)-math.max(this.left,e.left))*math.max(0,math.min(this.bottom,e.bottom)-math.max(this.top,e.top))/(this.height*this.width)},ii.prototype.tocsscompatvalues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},ii.getsimpleboxposition=function(e){var t=e.div?e.div.offsetheight:e.tagname?e.offsetheight:0,i=e.div?e.div.offsetwidth:e.tagname?e.offsetwidth:0,n=e.div?e.div.offsettop:e.tagname?e.offsettop:0;return{left:(e=e.div?e.div.getboundingclientrect():e.tagname?e.getboundingclientrect():e).left,right:e.right,top:e.top||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||i}},li.stringdecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new error("error - expected string data.");return decodeuricomponent(encodeuricomponent(e))}}},li.convertcuetodomtree=function(e,t){return e&&t?ci(e,t):null};li.processcues=function(n,r,e){if(!n||!r||!e)return null;for(;e.firstchild;)e.removechild(e.firstchild);var s=n.document.createelement("div");if(s.style.position="absolute",s.style.left="0",s.style.right="0",s.style.top="0",s.style.bottom="0",s.style.margin="1.5%",e.appendchild(s),function(e){for(var t=0;t',classname:this.buildcssclass(),tabindex:0},t),"button"===e&&p.error("creating a clickablecomponent with an html element of "+e+" is not supported; use a button instead."),i=m({role:"button"},i),this.tabindex_=t.tabindex;var n=r.prototype.createel.call(this,e,t,i);return this.createcontroltextel(n),n},t.dispose=function(){this.controltextel_=null,r.prototype.dispose.call(this)},t.createcontroltextel=function(e){return this.controltextel_=s("span",{classname:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendchild(this.controltextel_),this.controltext(this.controltext_,e),this.controltextel_},t.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,k(this.controltextel_,i),this.noniconcontrol||t.setattribute("title",i)},t.buildcssclass=function(){return"vjs-control vjs-button "+r.prototype.buildcssclass.call(this)},t.enable=function(){this.enabled_||(this.enabled_=!0,this.removeclass("vjs-disabled"),this.el_.setattribute("aria-disabled","false"),"undefined"!=typeof this.tabindex_&&this.el_.setattribute("tabindex",this.tabindex_),this.on(["tap","click"],this.handleclick),this.on("keydown",this.handlekeydown))},t.disable=function(){this.enabled_=!1,this.addclass("vjs-disabled"),this.el_.setattribute("aria-disabled","true"),"undefined"!=typeof this.tabindex_&&this.el_.removeattribute("tabindex"),this.off("mouseover",this.handlemouseover),this.off("mouseout",this.handlemouseout),this.off(["tap","click"],this.handleclick),this.off("keydown",this.handlekeydown)},t.handleclick=function(e){this.options_.clickhandler&&this.options_.clickhandler.call(this,arguments)},t.handlekeydown=function(e){xt.iseventkey(e,"space")||xt.iseventkey(e,"enter")?(e.preventdefault(),e.stoppropagation(),this.trigger("click")):r.prototype.handlekeydown.call(this,e)},e}(re);re.registercomponent("clickablecomponent",rn);var sn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).update(),e.on("posterchange",ge(ue(i),i.update)),i}he(e,n);var t=e.prototype;return t.dispose=function(){this.player().off("posterchange",this.update),n.prototype.dispose.call(this)},t.createel=function(){return s("div",{classname:"vjs-poster",tabindex:-1})},t.update=function(e){var t=this.player().poster();this.setsrc(t),t?this.show():this.hide()},t.setsrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundimage=t},t.handleclick=function(e){if(this.player_.controls()){var t=this.player_.usingplugin("eme")&&this.player_.eme.sessions&&0',classname:this.buildcssclass()},t),i=m({type:"button"},i);var n=re.prototype.createel.call(this,"button",t,i);return this.createcontroltextel(n),n},i.addchild=function(e,t){void 0===t&&(t={});var i=this.constructor.name;return p.warn("adding an actionable (user controllable) child to a button ("+i+") is not supported; use a clickablecomponent instead."),re.prototype.addchild.call(this,e,t)},i.enable=function(){t.prototype.enable.call(this),this.el_.removeattribute("disabled")},i.disable=function(){t.prototype.disable.call(this),this.el_.setattribute("disabled","disabled")},i.handlekeydown=function(e){xt.iseventkey(e,"space")||xt.iseventkey(e,"enter")?e.stoppropagation():t.prototype.handlekeydown.call(this,e)},e}(rn);re.registercomponent("button",dn);var pn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).mouseused_=!1,i.on("mousedown",i.handlemousedown),i}he(e,n);var t=e.prototype;return t.buildcssclass=function(){return"vjs-big-play-button"},t.handleclick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientx&&e.clienty){var i=this.player_.usingplugin("eme")&&this.player_.eme.sessions&&0'+this.localize(this.labeltext_)+" "});return this.contentel_=s("span",{classname:e+"-display"},{"aria-live":"off",role:"presentation"}),t.appendchild(this.contentel_),t},t.dispose=function(){this.contentel_=null,this.textnode_=null,n.prototype.dispose.call(this)},t.updatetextnode_=function(e){var t=this;void 0===e&&(e=0),e=yn(e),this.formattedtime_!==e&&(this.formattedtime_=e,this.requestanimationframe(function(){if(t.contentel_){var e=t.textnode_;t.textnode_=h.createtextnode(t.formattedtime_),t.textnode_&&(e?t.contentel_.replacechild(t.textnode_,e):t.contentel_.appendchild(t.textnode_))}}))},t.updatecontent=function(e){},e}(re);_n.prototype.labeltext_="time",_n.prototype.controltext_="time",re.registercomponent("timedisplay",_n);var bn=function(e){function t(){return e.apply(this,arguments)||this}he(t,e);var i=t.prototype;return i.buildcssclass=function(){return"vjs-current-time"},i.updatecontent=function(e){var t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getcache().currenttime:this.player_.currenttime(),this.updatetextnode_(t)},t}(_n);bn.prototype.labeltext_="current time",bn.prototype.controltext_="current time",re.registercomponent("currenttimedisplay",bn);var tn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,"durationchange",i.updatecontent),i.on(e,"loadstart",i.updatecontent),i.on(e,"loadedmetadata",i.updatecontent),i}he(e,n);var t=e.prototype;return t.buildcssclass=function(){return"vjs-duration"},t.updatecontent=function(e){var t=this.player_.duration();this.updatetextnode_(t)},e}(_n);tn.prototype.labeltext_="duration",tn.prototype.controltext_="duration",re.registercomponent("durationdisplay",tn);var sn=function(e){function t(){return e.apply(this,arguments)||this}return he(t,e),t.prototype.createel=function(){return e.prototype.createel.call(this,"div",{classname:"vjs-time-control vjs-time-divider",innerhtml:"/
"},{"aria-hidden":!0})},t}(re);re.registercomponent("timedivider",sn);var kn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,"durationchange",i.updatecontent),i}he(e,n);var t=e.prototype;return t.buildcssclass=function(){return"vjs-remaining-time"},t.createel=function(){var e=n.prototype.createel.call(this);return e.insertbefore(s("span",{},{"aria-hidden":!0},"-"),this.contentel_),e},t.updatecontent=function(e){var t;"number"==typeof this.player_.duration()&&(t=this.player_.ended()?0:this.player_.remainingtimedisplay?this.player_.remainingtimedisplay():this.player_.remainingtime(),this.updatetextnode_(t))},e}(_n);kn.prototype.labeltext_="remaining time",kn.prototype.controltext_="remaining time",re.registercomponent("remainingtimedisplay",kn);var cn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).updateshowing(),i.on(i.player(),"durationchange",i.updateshowing),i}he(e,n);var t=e.prototype;return t.createel=function(){var e=n.prototype.createel.call(this,"div",{classname:"vjs-live-control vjs-control"});return this.contentel_=s("div",{classname:"vjs-live-display",innerhtml:''+this.localize("stream type")+" "+this.localize("live")},{"aria-live":"off"}),e.appendchild(this.contentel_),e},t.dispose=function(){this.contentel_=null,n.prototype.dispose.call(this)},t.updateshowing=function(e){this.player().duration()===1/0?this.show():this.hide()},e}(re);re.registercomponent("livedisplay",cn);var wn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).updateliveedgestatus(),i.player_.livetracker&&i.on(i.player_.livetracker,"liveedgechange",i.updateliveedgestatus),i}he(e,n);var t=e.prototype;return t.createel=function(){var e=n.prototype.createel.call(this,"button",{classname:"vjs-seek-to-live-control vjs-control"});return this.textel_=s("span",{classname:"vjs-seek-to-live-text",innerhtml:this.localize("live")},{"aria-hidden":"true"}),e.appendchild(this.textel_),e},t.updateliveedgestatus=function(){!this.player_.livetracker||this.player_.livetracker.atliveedge()?(this.setattribute("aria-disabled",!0),this.addclass("vjs-at-live-edge"),this.controltext("seek to live, currently playing live")):(this.setattribute("aria-disabled",!1),this.removeclass("vjs-at-live-edge"),this.controltext("seek to live, currently behind live"))},t.handleclick=function(){this.player_.livetracker.seektoliveedge()},t.dispose=function(){this.player_.livetracker&&this.off(this.player_.livetracker,"liveedgechange",this.updateliveedgestatus),this.textel_=null,n.prototype.dispose.call(this)},e}(dn);wn.prototype.controltext_="seek to live, currently playing live",re.registercomponent("seektolive",wn);function en(e,t,i){return e=number(e),math.min(i,math.max(t,isnan(e)?t:e))}var xn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).bar=i.getchild(i.options_.barname),i.vertical(!!i.options_.vertical),i.enable(),i}he(e,n);var t=e.prototype;return t.enabled=function(){return this.enabled_},t.enable=function(){this.enabled()||(this.on("mousedown",this.handlemousedown),this.on("touchstart",this.handlemousedown),this.on("keydown",this.handlekeydown),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.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerdocument;this.off("mousedown",this.handlemousedown),this.off("touchstart",this.handlemousedown),this.off("keydown",this.handlekeydown),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.createel=function(e,t,i){return void 0===t&&(t={}),void 0===i&&(i={}),t.classname=t.classname+" vjs-slider",t=m({tabindex:0},t),i=m({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabindex:0},i),n.prototype.createel.call(this,e,t,i)},t.handlemousedown=function(e){var t=this.bar.el_.ownerdocument;"mousedown"===e.type&&e.preventdefault(),"touchstart"!==e.type||je||e.preventdefault(),n(),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.handlemousemove=function(e){},t.handlemouseup=function(){var e=this.bar.el_.ownerdocument;r(),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.update=function(){var t=this;if(this.el_&&this.bar){var i=this.getprogress();return i===this.progress_||(this.progress_=i,this.requestanimationframe(function(){var e=t.vertical()?"height":"width";t.bar.el().style[e]=(100*i).tofixed(2)+"%"})),i}},t.getprogress=function(){return number(en(this.getpercent(),0,1).tofixed(4))},t.calculatedistance=function(e){var t=b(this.el_,e);return this.vertical()?t.y:t.x},t.handlekeydown=function(e){xt.iseventkey(e,"left")||xt.iseventkey(e,"down")?(e.preventdefault(),e.stoppropagation(),this.stepback()):xt.iseventkey(e,"right")||xt.iseventkey(e,"up")?(e.preventdefault(),e.stoppropagation(),this.stepforward()):n.prototype.handlekeydown.call(this,e)},t.handleclick=function(e){e.stoppropagation(),e.preventdefault()},t.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")},e}(re);re.registercomponent("slider",xn);function an(e,t){return en(e/t*100,0,100).tofixed(2)+"%"}var in=function(r){function e(e,t){var i;return(i=r.call(this,e,t)||this).partels_=[],i.on(e,"progress",i.update),i}he(e,r);var t=e.prototype;return t.createel=function(){var e=r.prototype.createel.call(this,"div",{classname:"vjs-load-progress"}),t=s("span",{classname:"vjs-control-text"}),i=s("span",{textcontent:this.localize("loaded")}),n=h.createtextnode(": ");return this.percentageel_=s("span",{classname:"vjs-control-text-loaded-percentage",textcontent:"0%"}),e.appendchild(t),t.appendchild(i),t.appendchild(n),t.appendchild(this.percentageel_),e},t.dispose=function(){this.partels_=null,this.percentageel_=null,r.prototype.dispose.call(this)},t.update=function(e){var h=this;this.requestanimationframe(function(){var e=h.player_.livetracker,t=h.player_.buffered(),i=e&&e.islive()?e.seekableend():h.player_.duration(),n=h.player_.bufferedend(),r=h.partels_,s=an(n,i);h.percent_!==s&&(h.el_.style.width=s,k(h.percentageel_,s),h.percent_=s);for(var a=0;at.length;c--)h.el_.removechild(r[c-1]);r.length=t.length})},e}(re);re.registercomponent("loadprogressbar",in);var pn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).update=ve(ge(ue(i),i.update),30),i}he(e,n);var t=e.prototype;return t.createel=function(){return n.prototype.createel.call(this,"div",{classname:"vjs-time-tooltip"},{"aria-hidden":"true"})},t.update=function(e,t,i){var n=u(this.el_),r=u(this.player_.el()),s=e.width*t;if(r&&n){var a=e.left-r.left+s,o=e.width-s+(r.right-e.right),u=n.width/2;an.width&&(u=n.width),this.el_.style.right="-"+u+"px",this.write(i)}},t.write=function(e){k(this.el_,e)},t.updatetime=function(r,s,a,o){var u=this;this.rafid_&&this.cancelanimationframe(this.rafid_),this.rafid_=this.requestanimationframe(function(){var e,t=u.player_.duration();if(u.player_.livetracker&&u.player_.livetracker.islive()){var i=u.player_.livetracker.livewindow(),n=i-s*i;e=(n<1?"":"-")+yn(n,i)}else e=yn(a,t);u.update(r,s,e),o&&o()})},e}(re);re.registercomponent("timetooltip",pn);var ln=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).update=ve(ge(ue(i),i.update),30),i}he(e,n);var t=e.prototype;return t.createel=function(){return n.prototype.createel.call(this,"div",{classname:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},t.update=function(e,t){var i=this.getchild("timetooltip");if(i){var n=this.player_.scrubbing()?this.player_.getcache().currenttime:this.player_.currenttime();i.updatetime(e,t,n)}},e}(re);ln.prototype.options_={children:[]},at||xe||ln.prototype.options_.children.push("timetooltip"),re.registercomponent("playprogressbar",ln);var on=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).update=ve(ge(ue(i),i.update),30),i}he(e,n);var t=e.prototype;return t.createel=function(){return n.prototype.createel.call(this,"div",{classname:"vjs-mouse-display"})},t.update=function(e,t){var i=this,n=t*this.player_.duration();this.getchild("timetooltip").updatetime(e,t,n,function(){i.el_.style.left=e.width*t+"px"})},e}(re);on.prototype.options_={children:["timetooltip"]},re.registercomponent("mousetimedisplay",on);var dn=function(s){function e(e,t){var i;return(i=s.call(this,e,t)||this).seteventhandlers_(),i}he(e,s);var t=e.prototype;return t.seteventhandlers_=function(){this.update_=ge(this,this.update),this.update=ve(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.livetracker&&this.on(this.player_.livetracker,"liveedgechange",this.update),this.updateinterval=null,this.on(this.player_,["playing"],this.enableinterval_),this.on(this.player_,["ended","pause","waiting"],this.disableinterval_),"hidden"in h&&"visibilitystate"in h&&this.on(h,"visibilitychange",this.togglevisibility_)},t.togglevisibility_=function(e){h.hidden?this.disableinterval_(e):(this.enableinterval_(),this.update())},t.enableinterval_=function(){this.updateinterval||(this.updateinterval=this.setinterval(this.update,30))},t.disableinterval_=function(e){this.player_.livetracker&&this.player_.livetracker.islive()&&e&&"ended"!==e.type||this.updateinterval&&(this.clearinterval(this.updateinterval),this.updateinterval=null)},t.createel=function(){return s.prototype.createel.call(this,"div",{classname:"vjs-progress-holder"},{"aria-label":this.localize("progress bar")})},t.update=function(e){var n=this,r=s.prototype.update.call(this);return this.requestanimationframe(function(){var e=n.player_.ended()?n.player_.duration():n.getcurrenttime_(),t=n.player_.livetracker,i=n.player_.duration();t&&t.islive()&&(i=n.player_.livetracker.livecurrenttime()),n.percent_!==r&&(n.el_.setattribute("aria-valuenow",(100*r).tofixed(2)),n.percent_=r),n.currenttime_===e&&n.duration_===i||(n.el_.setattribute("aria-valuetext",n.localize("progress bar timing: currenttime={1} duration={2}",[yn(e,i),yn(i,i)],"{1} of {2}")),n.currenttime_=e,n.duration_=i),n.bar&&n.bar.update(u(n.el()),n.getprogress())}),r},t.getcurrenttime_=function(){return this.player_.scrubbing()?this.player_.getcache().currenttime:this.player_.currenttime()},t.getpercent=function(){var e,t=this.getcurrenttime_(),i=this.player_.livetracker;return i&&i.islive()?(e=(t-i.seekablestart())/i.livewindow(),i.atliveedge()&&(e=1)):e=t/this.player_.duration(),e},t.handlemousedown=function(e){w(e)&&(e.stoppropagation(),this.player_.scrubbing(!0),this.videowasplaying=!this.player_.paused(),this.player_.pause(),s.prototype.handlemousedown.call(this,e))},t.handlemousemove=function(e){if(w(e)){var t,i=this.calculatedistance(e),n=this.player_.livetracker;if(n&&n.islive()){if(.99<=i)return void n.seektoliveedge();var r=n.seekablestart(),s=n.livecurrenttime();if(s<=(t=r+i*n.livewindow())&&(t=s),t<=r&&(t=r+.1),t===1/0)return}else(t=i*this.player_.duration())===this.player_.duration()&&(t-=.1);this.player_.currenttime(t)}},t.enable=function(){s.prototype.enable.call(this);var e=this.getchild("mousetimedisplay");e&&e.show()},t.disable=function(){s.prototype.disable.call(this);var e=this.getchild("mousetimedisplay");e&&e.hide()},t.handlemouseup=function(e){s.prototype.handlemouseup.call(this,e),e&&e.stoppropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallytriggered:!0}),this.videowasplaying?kt(this.player_.play()):this.update_()},t.stepforward=function(){this.player_.currenttime(this.player_.currenttime()+5)},t.stepback=function(){this.player_.currenttime(this.player_.currenttime()-5)},t.handleaction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.handlekeydown=function(e){if(xt.iseventkey(e,"space")||xt.iseventkey(e,"enter"))e.preventdefault(),e.stoppropagation(),this.handleaction(e);else if(xt.iseventkey(e,"home"))e.preventdefault(),e.stoppropagation(),this.player_.currenttime(0);else if(xt.iseventkey(e,"end"))e.preventdefault(),e.stoppropagation(),this.player_.currenttime(this.player_.duration());else if(/^[0-9]$/.test(xt(e))){e.preventdefault(),e.stoppropagation();var t=10*(xt.codes[xt(e)]-xt.codes[0])/100;this.player_.currenttime(this.player_.duration()*t)}else xt.iseventkey(e,"pgdn")?(e.preventdefault(),e.stoppropagation(),this.player_.currenttime(this.player_.currenttime()-60)):xt.iseventkey(e,"pgup")?(e.preventdefault(),e.stoppropagation(),this.player_.currenttime(this.player_.currenttime()+60)):s.prototype.handlekeydown.call(this,e)},t.dispose=function(){this.disableinterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.livetracker&&this.on(this.player_.livetracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableinterval_),this.off(this.player_,["ended","pause","waiting"],this.disableinterval_),"hidden"in h&&"visibilitystate"in h&&this.off(h,"visibilitychange",this.togglevisibility_),s.prototype.dispose.call(this)},e}(xn);dn.prototype.options_={children:["loadprogressbar","playprogressbar"],barname:"playprogressbar"},at||xe||dn.prototype.options_.children.splice(1,0,"mousetimedisplay"),re.registercomponent("seekbar",dn);var nn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).handlemousemove=ve(ge(ue(i),i.handlemousemove),30),i.throttledhandlemouseseek=ve(ge(ue(i),i.handlemouseseek),30),i.enable(),i}he(e,n);var t=e.prototype;return t.createel=function(){return n.prototype.createel.call(this,"div",{classname:"vjs-progress-control vjs-control"})},t.handlemousemove=function(e){var t=this.getchild("seekbar");if(t){var i=t.getchild("playprogressbar"),n=t.getchild("mousetimedisplay");if(i||n){var r=t.el(),s=u(r),a=b(r,e).x;a=en(0,1,a),n&&n.update(s,a),i&&i.update(s,t.getprogress())}}},t.handlemouseseek=function(e){var t=this.getchild("seekbar");t&&t.handlemousemove(e)},t.enabled=function(){return this.enabled_},t.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.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.handlemousedown=function(e){var t=this.el_.ownerdocument,i=this.getchild("seekbar");i&&i.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.handlemouseup=function(e){var t=this.el_.ownerdocument,i=this.getchild("seekbar");i&&i.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)},e}(re);nn.prototype.options_={children:["seekbar"]},re.registercomponent("progresscontrol",nn);var rn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,["enterpictureinpicture","leavepictureinpicture"],i.handlepictureinpicturechange),h.pictureinpictureenabled||i.disable(),i}he(e,n);var t=e.prototype;return t.buildcssclass=function(){return"vjs-picture-in-picture-control "+n.prototype.buildcssclass.call(this)},t.handlepictureinpicturechange=function(e){this.player_.isinpictureinpicture()?this.controltext("exit picture-in-picture"):this.controltext("picture-in-picture")},t.handleclick=function(e){this.player_.isinpictureinpicture()?this.player_.exitpictureinpicture():this.player_.requestpictureinpicture()},e}(dn);rn.prototype.controltext_="picture-in-picture",re.registercomponent("pictureinpicturetoggle",rn);var un=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,"fullscreenchange",i.handlefullscreenchange),!1===h[e.fsapi_.fullscreenenabled]&&i.disable(),i}he(e,n);var t=e.prototype;return t.buildcssclass=function(){return"vjs-fullscreen-control "+n.prototype.buildcssclass.call(this)},t.handlefullscreenchange=function(e){this.player_.isfullscreen()?this.controltext("non-fullscreen"):this.controltext("fullscreen")},t.handleclick=function(e){this.player_.isfullscreen()?this.player_.exitfullscreen():this.player_.requestfullscreen()},e}(dn);un.prototype.controltext_="fullscreen",re.registercomponent("fullscreentoggle",un);var mn=function(e){function t(){return e.apply(this,arguments)||this}return he(t,e),t.prototype.createel=function(){return e.prototype.createel.call(this,"div",{classname:"vjs-volume-level",innerhtml:''})},t}(re);re.registercomponent("volumelevel",mn);var bn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on("slideractive",i.updatelastvolume_),i.on(e,"volumechange",i.updateariaattributes),e.ready(function(){return i.updateariaattributes()}),i}he(e,n);var t=e.prototype;return t.createel=function(){return n.prototype.createel.call(this,"div",{classname:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("volume level"),"aria-live":"polite"})},t.handlemousedown=function(e){w(e)&&n.prototype.handlemousedown.call(this,e)},t.handlemousemove=function(e){w(e)&&(this.checkmuted(),this.player_.volume(this.calculatedistance(e)))},t.checkmuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.getpercent=function(){return this.player_.muted()?0:this.player_.volume()},t.stepforward=function(){this.checkmuted(),this.player_.volume(this.player_.volume()+.1)},t.stepback=function(){this.checkmuted(),this.player_.volume(this.player_.volume()-.1)},t.updateariaattributes=function(e){var t=this.player_.muted()?0:this.volumeaspercentage_();this.el_.setattribute("aria-valuenow",t),this.el_.setattribute("aria-valuetext",t+"%")},t.volumeaspercentage_=function(){return math.round(100*this.player_.volume())},t.updatelastvolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",function(){0===e.player_.volume()&&e.player_.lastvolume_(t)})},e}(xn);bn.prototype.options_={children:["volumelevel"],barname:"volumelevel"},bn.prototype.playerevent="volumechange",re.registercomponent("volumebar",bn);var jn=function(n){function e(e,t){var i;return void 0===t&&(t={}),t.vertical=t.vertical||!1,"undefined"!=typeof t.volumebar&&!u(t.volumebar)||(t.volumebar=t.volumebar||{},t.volumebar.vertical=t.vertical),i=n.call(this,e,t)||this,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")})}(ue(i),e),i.throttledhandlemousemove=ve(ge(ue(i),i.handlemousemove),30),i.on("mousedown",i.handlemousedown),i.on("touchstart",i.handlemousedown),i.on(i.volumebar,["focus","slideractive"],function(){i.volumebar.addclass("vjs-slider-active"),i.addclass("vjs-slider-active"),i.trigger("slideractive")}),i.on(i.volumebar,["blur","sliderinactive"],function(){i.volumebar.removeclass("vjs-slider-active"),i.removeclass("vjs-slider-active"),i.trigger("sliderinactive")}),i}he(e,n);var t=e.prototype;return t.createel=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),n.prototype.createel.call(this,"div",{classname:"vjs-volume-control vjs-control "+e})},t.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.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.handlemousemove=function(e){this.volumebar.handlemousemove(e)},e}(re);jn.prototype.options_={children:["volumebar"]},re.registercomponent("volumecontrol",jn);var fn=function(n){function e(e,t){var i;return i=n.call(this,e,t)||this,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")})}(ue(i),e),i.on(e,["loadstart","volumechange"],i.update),i}he(e,n);var t=e.prototype;return t.buildcssclass=function(){return"vjs-mute-control "+n.prototype.buildcssclass.call(this)},t.handleclick=function(e){var t=this.player_.volume(),i=this.player_.lastvolume_();if(0===t){var n=i<.1?.1:i;this.player_.volume(n),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},t.update=function(e){this.updateicon_(),this.updatecontroltext_()},t.updateicon_=function(){var e=this.player_.volume(),t=3;at&&this.player_.tech_&&this.player_.tech_.el_&&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 i=0;i<4;i++)x(this.el_,"vjs-vol-"+i);e(this.el_,"vjs-vol-"+t)},t.updatecontroltext_=function(){var e=this.player_.muted()||0===this.player_.volume()?"unmute":"mute";this.controltext()!==e&&this.controltext(e)},e}(dn);fn.prototype.controltext_="mute",re.registercomponent("mutetoggle",fn);var hn=function(n){function e(e,t){var i;return void 0===t&&(t={}),"undefined"!=typeof t.inline?t.inline=t.inline:t.inline=!0,"undefined"!=typeof t.volumecontrol&&!u(t.volumecontrol)||(t.volumecontrol=t.volumecontrol||{},t.volumecontrol.vertical=!t.inline),(i=n.call(this,e,t)||this).on(e,["loadstart"],i.volumepanelstate_),i.on(i.mutetoggle,"keyup",i.handlekeypress),i.on(i.volumecontrol,"keyup",i.handlevolumecontrolkeyup),i.on("keydown",i.handlekeypress),i.on("mouseover",i.handlemouseover),i.on("mouseout",i.handlemouseout),i.on(i.volumecontrol,["slideractive"],i.slideractive_),i.on(i.volumecontrol,["sliderinactive"],i.sliderinactive_),i}he(e,n);var t=e.prototype;return t.slideractive_=function(){this.addclass("vjs-slider-active")},t.sliderinactive_=function(){this.removeclass("vjs-slider-active")},t.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.createel=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),n.prototype.createel.call(this,"div",{classname:"vjs-volume-panel vjs-control "+e})},t.dispose=function(){this.handlemouseout(),n.prototype.dispose.call(this)},t.handlevolumecontrolkeyup=function(e){xt.iseventkey(e,"esc")&&this.mutetoggle.focus()},t.handlemouseover=function(e){this.addclass("vjs-hover"),he(h,"keyup",ge(this,this.handlekeypress))},t.handlemouseout=function(e){this.removeclass("vjs-hover"),de(h,"keyup",ge(this,this.handlekeypress))},t.handlekeypress=function(e){xt.iseventkey(e,"esc")&&this.handlemouseout()},e}(re);hn.prototype.options_={children:["mutetoggle","volumecontrol"]},re.registercomponent("volumepanel",hn);var vn=function(n){function e(e,t){var i;return i=n.call(this,e,t)||this,t&&(i.menubutton_=t.menubutton),i.focusedchild_=-1,i.on("keydown",i.handlekeydown),i.boundhandleblur_=ge(ue(i),i.handleblur),i.boundhandletapclick_=ge(ue(i),i.handletapclick),i}he(e,n);var t=e.prototype;return t.addeventlistenerforitem=function(e){e instanceof re&&(this.on(e,"blur",this.boundhandleblur_),this.on(e,["tap","click"],this.boundhandletapclick_))},t.removeeventlistenerforitem=function(e){e instanceof re&&(this.off(e,"blur",this.boundhandleblur_),this.off(e,["tap","click"],this.boundhandletapclick_))},t.removechild=function(e){"string"==typeof e&&(e=this.getchild(e)),this.removeeventlistenerforitem(e),n.prototype.removechild.call(this,e)},t.additem=function(e){var t=this.addchild(e);t&&this.addeventlistenerforitem(t)},t.createel=function(){var e=this.options_.contenteltype||"ul";this.contentel_=s(e,{classname:"vjs-menu-content"}),this.contentel_.setattribute("role","menu");var t=n.prototype.createel.call(this,"div",{append:this.contentel_,classname:"vjs-menu"});return t.appendchild(this.contentel_),he(t,"click",function(e){e.preventdefault(),e.stopimmediatepropagation()}),t},t.dispose=function(){this.contentel_=null,this.boundhandleblur_=null,this.boundhandletapclick_=null,n.prototype.dispose.call(this)},t.handleblur=function(e){var t=e.relatedtarget||h.activeelement;if(!this.children().some(function(e){return e.el()===t})){var i=this.menubutton_;i&&i.buttonpressed_&&t!==i.el().firstchild&&i.unpressbutton()}},t.handletapclick=function(t){if(this.menubutton_){this.menubutton_.unpressbutton();var e=this.children();if(!array.isarray(e))return;var i=e.filter(function(e){return e.el()===t.target})[0];if(!i)return;"captionsettingsmenuitem"!==i.name()&&this.menubutton_.focus()}},t.handlekeydown=function(e){xt.iseventkey(e,"left")||xt.iseventkey(e,"down")?(e.preventdefault(),e.stoppropagation(),this.stepforward()):(xt.iseventkey(e,"right")||xt.iseventkey(e,"up"))&&(e.preventdefault(),e.stoppropagation(),this.stepback())},t.stepforward=function(){var e=0;void 0!==this.focusedchild_&&(e=this.focusedchild_+1),this.focus(e)},t.stepback=function(){var e=0;void 0!==this.focusedchild_&&(e=this.focusedchild_-1),this.focus(e)},t.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].classname&&/vjs-menu-title/.test(t[0].classname)&&t.shift(),0=t.length&&(e=t.length-1),t[this.focusedchild_=e].el_.focus())},e}(re);re.registercomponent("menu",vn);var qn=function(r){function e(e,t){var i;void 0===t&&(t={}),(i=r.call(this,e,t)||this).menubutton_=new dn(e,t),i.menubutton_.controltext(i.controltext_),i.menubutton_.el_.setattribute("aria-haspopup","true");var n=dn.prototype.buildcssclass();return i.menubutton_.el_.classname=i.buildcssclass()+" "+n,i.menubutton_.removeclass("vjs-control"),i.addchild(i.menubutton_),i.update(),i.enabled_=!0,i.on(i.menubutton_,"tap",i.handleclick),i.on(i.menubutton_,"click",i.handleclick),i.on(i.menubutton_,"keydown",i.handlekeydown),i.on(i.menubutton_,"mouseenter",function(){i.addclass("vjs-hover"),i.menu.show(),he(h,"keyup",ge(ue(i),i.handlemenukeyup))}),i.on("mouseleave",i.handlemouseleave),i.on("keydown",i.handlesubmenukeydown),i}he(e,r);var t=e.prototype;return t.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.createmenu=function(){var e=new vn(this.player_,{menubutton:this});if(this.hidethreshold_=0,this.options_.title){var t=s("li",{classname:"vjs-menu-title",innerhtml:de(this.options_.title),tabindex:-1});this.hidethreshold_+=1;var i=new re(this.player_,{el:t});e.additem(i)}if(this.items=this.createitems(),this.items)for(var n=0;n