You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
181 KiB
6 lines
181 KiB
!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.videojs=b()}(this,function(){function a(a,b){return b={exports:{}},a(b,b.exports),b.exports}function b(a,b){Pb(a).forEach(function(c){return b(a[c],c)})}function c(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Pb(a).reduce(function(c,d){return b(c,a[d],d)},c)}function d(a){for(var c=arguments.length,d=Array(c>1?c-1:0),e=1;e<c;e++)d[e-1]=arguments[e];return Object.assign?Object.assign.apply(Object,[a].concat(d)):(d.forEach(function(c){c&&b(c,function(b,c){a[c]=b})}),a)}function e(a){return!!a&&"object"===("undefined"==typeof a?"undefined":Jb(a))}function f(a){return e(a)&&"[object Object]"===Ob.call(a)&&a.constructor===Object}function g(a){return a.replace(/\n\r?\s*/g,"")}function h(a,b){if(!a||!b)return"";if("function"==typeof gb.getComputedStyle){var c=gb.getComputedStyle(a);return c?c[b]:""}return a.currentStyle[b]||""}function i(a){return"string"==typeof a&&/\S/.test(a)}function j(a){if(/\s/.test(a))throw new Error("class has illegal whitespace characters")}function k(a){return new RegExp("(^|\\s)"+a+"($|\\s)")}function l(){return lb===gb.document&&"undefined"!=typeof lb.createElement}function m(a){return e(a)&&1===a.nodeType}function n(){try{return gb.parent!==gb.self}catch(a){return!0}}function o(a){return function(b,c){if(!i(b))return lb[a](null);i(c)&&(c=lb.querySelector(c));var d=m(c)?c:lb;return d[a]&&d[a](b)}}function p(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},d=arguments[3],e=lb.createElement(a);return Object.getOwnPropertyNames(b).forEach(function(a){var c=b[a];a.indexOf("aria-")!==-1||"role"===a||"type"===a?(Ub.warn(Vb(Wb,a,c)),e.setAttribute(a,c)):"textContent"===a?q(e,c):e[a]=c}),Object.getOwnPropertyNames(c).forEach(function(a){e.setAttribute(a,c[a])}),d&&J(e,d),e}function q(a,b){return"undefined"==typeof a.textContent?a.innerText=b:a.textContent=b,a}function r(a,b){b.firstChild?b.insertBefore(a,b.firstChild):b.appendChild(a)}function s(a,b){return j(b),a.classList?a.classList.contains(b):k(b).test(a.className)}function t(a,b){return a.classList?a.classList.add(b):s(a,b)||(a.className=(a.className+" "+b).trim()),a}function u(a,b){return a.classList?a.classList.remove(b):(j(b),a.className=a.className.split(/\s+/).filter(function(a){return a!==b}).join(" ")),a}function v(a,b,c){var d=s(a,b);if("function"==typeof c&&(c=c(a,b)),"boolean"!=typeof c&&(c=!d),c!==d)return c?t(a,b):u(a,b),a}function w(a,b){Object.getOwnPropertyNames(b).forEach(function(c){var d=b[c];null===d||"undefined"==typeof d||d===!1?a.removeAttribute(c):a.setAttribute(c,d===!0?"":d)})}function x(a){var b={},c=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(a&&a.attributes&&a.attributes.length>0)for(var d=a.attributes,e=d.length-1;e>=0;e--){var f=d[e].name,g=d[e].value;"boolean"!=typeof a[f]&&c.indexOf(","+f+",")===-1||(g=null!==g),b[f]=g}return b}function y(a,b){return a.getAttribute(b)}function z(a,b,c){a.setAttribute(b,c)}function A(a,b){a.removeAttribute(b)}function B(){lb.body.focus(),lb.onselectstart=function(){return!1}}function C(){lb.onselectstart=function(){return!0}}function D(a){if(a&&a.getBoundingClientRect&&a.parentNode){var b=a.getBoundingClientRect(),c={};return["bottom","height","left","right","top","width"].forEach(function(a){void 0!==b[a]&&(c[a]=b[a])}),c.height||(c.height=parseFloat(h(a,"height"))),c.width||(c.width=parseFloat(h(a,"width"))),c}}function E(a){var b=void 0;if(a.getBoundingClientRect&&a.parentNode&&(b=a.getBoundingClientRect()),!b)return{left:0,top:0};var c=lb.documentElement,d=lb.body,e=c.clientLeft||d.clientLeft||0,f=gb.pageXOffset||d.scrollLeft,g=b.left+f-e,h=c.clientTop||d.clientTop||0,i=gb.pageYOffset||d.scrollTop,j=b.top+i-h;return{left:Math.round(g),top:Math.round(j)}}function F(a,b){var c={},d=E(a),e=a.offsetWidth,f=a.offsetHeight,g=d.top,h=d.left,i=b.pageY,j=b.pageX;return b.changedTouches&&(j=b.changedTouches[0].pageX,i=b.changedTouches[0].pageY),c.y=Math.max(0,Math.min(1,(g-i+f)/f)),c.x=Math.max(0,Math.min(1,(j-h)/e)),c}function G(a){return e(a)&&3===a.nodeType}function H(a){for(;a.firstChild;)a.removeChild(a.firstChild);return a}function I(a){return"function"==typeof a&&(a=a()),(Array.isArray(a)?a:[a]).map(function(a){return"function"==typeof a&&(a=a()),m(a)||G(a)?a:"string"==typeof a&&/\S/.test(a)?lb.createTextNode(a):void 0}).filter(function(a){return a})}function J(a,b){return I(b).forEach(function(b){return a.appendChild(b)}),a}function K(a,b){return J(H(a),b)}function L(){return $b++}function M(a){var b=a[ac];return b||(b=a[ac]=L()),_b[b]||(_b[b]={}),_b[b]}function N(a){var b=a[ac];return!!b&&!!Object.getOwnPropertyNames(_b[b]).length}function O(a){var b=a[ac];if(b){delete _b[b];try{delete a[ac]}catch(c){a.removeAttribute?a.removeAttribute(ac):a[ac]=null}}}function P(a,b){var c=M(a);0===c.handlers[b].length&&(delete c.handlers[b],a.removeEventListener?a.removeEventListener(b,c.dispatcher,!1):a.detachEvent&&a.detachEvent("on"+b,c.dispatcher)),Object.getOwnPropertyNames(c.handlers).length<=0&&(delete c.handlers,delete c.dispatcher,delete c.disabled),0===Object.getOwnPropertyNames(c).length&&O(a)}function Q(a,b,c,d){c.forEach(function(c){a(b,c,d)})}function R(a){function b(){return!0}function c(){return!1}if(!a||!a.isPropagationStopped){var d=a||gb.event;a={};for(var e in d)"layerX"!==e&&"layerY"!==e&&"keyLocation"!==e&&"webkitMovementX"!==e&&"webkitMovementY"!==e&&("returnValue"===e&&d.preventDefault||(a[e]=d[e]));if(a.target||(a.target=a.srcElement||lb),a.relatedTarget||(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement),a.preventDefault=function(){d.preventDefault&&d.preventDefault(),a.returnValue=!1,d.returnValue=!1,a.defaultPrevented=!0},a.defaultPrevented=!1,a.stopPropagation=function(){d.stopPropagation&&d.stopPropagation(),a.cancelBubble=!0,d.cancelBubble=!0,a.isPropagationStopped=b},a.isPropagationStopped=c,a.stopImmediatePropagation=function(){d.stopImmediatePropagation&&d.stopImmediatePropagation(),a.isImmediatePropagationStopped=b,a.stopPropagation()},a.isImmediatePropagationStopped=c,null!==a.clientX&&void 0!==a.clientX){var f=lb.documentElement,g=lb.body;a.pageX=a.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=a.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)}a.which=a.charCode||a.keyCode,null!==a.button&&void 0!==a.button&&(a.button=1&a.button?0:4&a.button?1:2&a.button?2:0)}return a}function S(a,b,c){if(Array.isArray(b))return Q(S,a,b,c);var d=M(a);if(d.handlers||(d.handlers={}),d.handlers[b]||(d.handlers[b]=[]),c.guid||(c.guid=L()),d.handlers[b].push(c),d.dispatcher||(d.disabled=!1,d.dispatcher=function(b,c){if(!d.disabled){b=R(b);var e=d.handlers[b.type];if(e)for(var f=e.slice(0),g=0,h=f.length;g<h&&!b.isImmediatePropagationStopped();g++)try{f[g].call(a,b,c)}catch(i){Ub.error(i)}}}),1===d.handlers[b].length)if(a.addEventListener){var e=!1;bc&&cc.indexOf(b)>-1&&(e={passive:!0}),a.addEventListener(b,d.dispatcher,e)}else a.attachEvent&&a.attachEvent("on"+b,d.dispatcher)}function T(a,b,c){if(N(a)){var d=M(a);if(d.handlers){if(Array.isArray(b))return Q(T,a,b,c);var e=function(b){d.handlers[b]=[],P(a,b)};if(b){var f=d.handlers[b];if(f){if(!c)return void e(b);if(c.guid)for(var g=0;g<f.length;g++)f[g].guid===c.guid&&f.splice(g--,1);P(a,b)}}else for(var h in d.handlers)e(h)}}}function U(a,b,c){var d=N(a)?M(a):{},e=a.parentNode||a.ownerDocument;if("string"==typeof b&&(b={type:b,target:a}),b=R(b),d.dispatcher&&d.dispatcher.call(a,b,c),e&&!b.isPropagationStopped()&&b.bubbles===!0)U.call(null,e,b,c);else if(!e&&!b.defaultPrevented){var f=M(b.target);b.target[b.type]&&(f.disabled=!0,"function"==typeof b.target[b.type]&&b.target[b.type](),f.disabled=!1)}return!b.defaultPrevented}function V(a,b,c){if(Array.isArray(b))return Q(V,a,b,c);var d=function e(){T(a,b,e),c.apply(this,arguments)};d.guid=c.guid=c.guid||L(),S(a,b,d)}function W(a,b){b&&(fc=b),gb.setTimeout(gc,a)}function X(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=b.eventBusKey;if(c){if(!a[c].nodeName)throw new Error('The eventBusKey "'+c+'" does not refer to an element.');a.eventBusEl_=a[c]}else a.eventBusEl_=p("span",{className:"vjs-event-bus"});return d(a,tc),a.on("dispose",function(){return a.off()}),a}function Y(a,b){return d(a,uc),a.state=d({},a.state,b),"function"==typeof a.handleStateChanged&&mc(a)&&a.on("statechanged",a.handleStateChanged),a}function Z(a){return"string"!=typeof a?a:a.charAt(0).toUpperCase()+a.slice(1)}function $(a,b){return Z(a)===Z(b)}function _(){for(var a={},c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return d.forEach(function(c){c&&b(c,function(b,c){return f(b)?(f(a[c])||(a[c]={}),void(a[c]=_(a[c],b))):void(a[c]=b)})}),a}function aa(a,b,c){if("number"!=typeof b||b<0||b>c)throw new Error("Failed to execute '"+a+"' on 'TimeRanges': The index provided ("+b+") is non-numeric or out of bounds (0-"+c+").")}function ba(a,b,c,d){return aa(a,d,c.length-1),c[d][b]}function ca(a){return void 0===a||0===a.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:a.length,start:ba.bind(null,"start",0,a),end:ba.bind(null,"end",1,a)}}function da(a,b){return Array.isArray(a)?ca(a):void 0===a||void 0===b?ca():ca([[a,b]])}function ea(a,b){var c=0,d=void 0,e=void 0;if(!b)return 0;a&&a.length||(a=da(0,0));for(var f=0;f<a.length;f++)d=a.start(f),e=a.end(f),e>b&&(e=b),c+=e-d;return c/b}function fa(a){return a instanceof fa?a:("number"==typeof a?this.code=a:"string"==typeof a?this.message=a:e(a)&&("number"==typeof a.code&&(this.code=a.code),d(this,a)),void(this.message||(this.message=fa.defaultMessages[this.code]||"")))}function ga(a,b){var c,d=null;try{c=JSON.parse(a,b)}catch(e){d=e}return[d,c]}function ha(a){var b=dd.call(a);return"[object Function]"===b||"function"==typeof a&&"[object RegExp]"!==b||"undefined"!=typeof window&&(a===window.setTimeout||a===window.alert||a===window.confirm||a===window.prompt)}function ia(a,b,c){if(!cd(b))throw new TypeError("iterator must be a function");arguments.length<3&&(c=this),"[object Array]"===gd.call(a)?ja(a,b,c):"string"==typeof a?ka(a,b,c):la(a,b,c)}function ja(a,b,c){for(var d=0,e=a.length;d<e;d++)hd.call(a,d)&&b.call(c,a[d],d,a)}function ka(a,b,c){for(var d=0,e=a.length;d<e;d++)b.call(c,a.charAt(d),d,a)}function la(a,b,c){for(var d in a)hd.call(a,d)&&b.call(c,a[d],d,a)}function ma(){for(var a={},b=0;b<arguments.length;b++){var c=arguments[b];for(var d in c)ld.call(c,d)&&(a[d]=c[d])}return a}function na(a,b){for(var c=0;c<a.length;c++)b(a[c])}function oa(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function pa(a,b,c){var d=a;return cd(b)?(c=b,"string"==typeof a&&(d={uri:a})):d=kd(b,{uri:a}),d.callback=c,d}function qa(a,b,c){return b=pa(a,b,c),ra(b)}function ra(a){function b(){4===h.readyState&&setTimeout(e,0)}function c(){var a=void 0;if(a=h.response?h.response:h.responseText||sa(h),q)try{a=JSON.parse(a)}catch(b){}return a}function d(a){return clearTimeout(k),a instanceof Error||(a=new Error(""+(a||"Unknown XMLHttpRequest Error"))),a.statusCode=0,g(a,r)}function e(){if(!j){var b;clearTimeout(k),b=a.useXDR&&void 0===h.status?200:1223===h.status?204:h.status;var d=r,e=null;return 0!==b?(d={body:c(),statusCode:b,method:m,headers:{},url:l,rawRequest:h},h.getAllResponseHeaders&&(d.headers=jd(h.getAllResponseHeaders()))):e=new Error("Internal XMLHttpRequest Error"),g(e,d,d.body)}}if("undefined"==typeof a.callback)throw new Error("callback argument missing");var f=!1,g=function(b,c,d){f||(f=!0,a.callback(b,c,d))},h=a.xhr||null;h||(h=a.cors||a.useXDR?new qa.XDomainRequest:new qa.XMLHttpRequest);var i,j,k,l=h.url=a.uri||a.url,m=h.method=a.method||"GET",n=a.body||a.data,o=h.headers=a.headers||{},p=!!a.sync,q=!1,r={body:void 0,headers:{},statusCode:0,method:m,url:l,rawRequest:h};if("json"in a&&a.json!==!1&&(q=!0,o.accept||o.Accept||(o.Accept="application/json"),"GET"!==m&&"HEAD"!==m&&(o["content-type"]||o["Content-Type"]||(o["Content-Type"]="application/json"),n=JSON.stringify(a.json===!0?n:a.json))),h.onreadystatechange=b,h.onload=e,h.onerror=d,h.onprogress=function(){},h.onabort=function(){j=!0},h.ontimeout=d,h.open(m,l,!p,a.username,a.password),p||(h.withCredentials=!!a.withCredentials),!p&&a.timeout>0&&(k=setTimeout(function(){if(!j){j=!0,h.abort("timeout");var a=new Error("XMLHttpRequest timeout");a.code="ETIMEDOUT",d(a)}},a.timeout)),h.setRequestHeader)for(i in o)o.hasOwnProperty(i)&&h.setRequestHeader(i,o[i]);else if(a.headers&&!oa(a.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in a&&(h.responseType=a.responseType),"beforeSend"in a&&"function"==typeof a.beforeSend&&a.beforeSend(h),h.send(n||null),h}function sa(a){if("document"===a.responseType)return a.responseXML;var b=a.responseXML&&"parsererror"===a.responseXML.documentElement.nodeName;return""!==a.responseType||b?null:a.responseXML}function ta(){}function ua(a,b){this.name="ParsingError",this.code=a.code,this.message=b||a.message}function va(a){function b(a,b,c,d){return 3600*(0|a)+60*(0|b)+(0|c)+(0|d)/1e3}var c=a.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return c?c[3]?b(c[1],c[2],c[3].replace(":",""),c[4]):c[1]>59?b(c[1],c[2],0,c[4]):b(0,c[1],c[2],c[4]):null}function wa(){this.values=Ad(null)}function xa(a,b,c,d){var e=d?a.split(d):[a];for(var f in e)if("string"==typeof e[f]){var g=e[f].split(c);if(2===g.length){var h=g[0],i=g[1];b(h,i)}}}function ya(a,b,c){function d(){var b=va(a);if(null===b)throw new ua(ua.Errors.BadTimeStamp,"Malformed timestamp: "+g);return a=a.replace(/^[^\sa-zA-Z-]+/,""),b}function e(a,b){var d=new wa;xa(a,function(a,b){switch(a){case"region":for(var e=c.length-1;e>=0;e--)if(c[e].id===b){d.set(a,c[e].region);break}break;case"vertical":d.alt(a,b,["rl","lr"]);break;case"line":var f=b.split(","),g=f[0];d.integer(a,g),d.percent(a,g)?d.set("snapToLines",!1):null,d.alt(a,g,["auto"]),2===f.length&&d.alt("lineAlign",f[1],["start","middle","end"]);break;case"position":f=b.split(","),d.percent(a,f[0]),2===f.length&&d.alt("positionAlign",f[1],["start","middle","end"]);break;case"size":d.percent(a,b);break;case"align":d.alt(a,b,["start","middle","end","left","right"])}},/:/,/\s/),b.region=d.get("region",null),b.vertical=d.get("vertical",""),b.line=d.get("line","auto"),b.lineAlign=d.get("lineAlign","start"),b.snapToLines=d.get("snapToLines",!0),b.size=d.get("size",100),b.align=d.get("align","middle"),b.position=d.get("position",{start:0,left:0,middle:50,end:100,right:100},b.align),b.positionAlign=d.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},b.align)}function f(){a=a.replace(/^\s+/,"")}var g=a;if(f(),b.startTime=d(),f(),"-->"!==a.substr(0,3))throw new ua(ua.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+g);a=a.substr(3),f(),b.endTime=d(),f(),e(a,b)}function za(a,b){function c(){function a(a){return b=b.substr(a.length),a}if(!b)return null;var c=b.match(/^([^<]*)(<[^>]+>?)?/);return a(c[1]?c[1]:c[2])}function d(a){return Bd[a]}function e(a){for(;n=a.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)a=a.replace(n[0],d);return a}function f(a,b){return!Ed[b.localName]||Ed[b.localName]===a.localName}function g(b,c){var d=Cd[b];if(!d)return null;var e=a.document.createElement(d);e.localName=d;var f=Dd[b];return f&&c&&(e[f]=c.trim()),e}for(var h,i=a.document.createElement("div"),j=i,k=[];null!==(h=c());)if("<"!==h[0])j.appendChild(a.document.createTextNode(e(h)));else{if("/"===h[1]){k.length&&k[k.length-1]===h.substr(2).replace(">","")&&(k.pop(),j=j.parentNode);continue}var l,m=va(h.substr(1,h.length-2));if(m){l=a.document.createProcessingInstruction("timestamp",m),j.appendChild(l);continue}var n=h.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!n)continue;if(l=g(n[1],n[3]),!l)continue;if(!f(j,l))continue;n[2]&&(l.className=n[2].substr(1).replace("."," ")),k.push(n[1]),j.appendChild(l),j=l}return i}function Aa(a){for(var b=0;b<Fd.length;b++){var c=Fd[b];if(a>=c[0]&&a<=c[1])return!0}return!1}function Ba(a){function b(a,b){for(var c=b.childNodes.length-1;c>=0;c--)a.push(b.childNodes[c])}function c(a){if(!a||!a.length)return null;var d=a.pop(),e=d.textContent||d.innerText;if(e){var f=e.match(/^.*(\n|\r)/);return f?(a.length=0,f[0]):e}return"ruby"===d.tagName?c(a):d.childNodes?(b(a,d),c(a)):void 0}var d,e=[],f="";if(!a||!a.childNodes)return"ltr";for(b(e,a);f=c(e);)for(var g=0;g<f.length;g++)if(d=f.charCodeAt(g),Aa(d))return"rtl";return"ltr"}function Ca(a){if("number"==typeof a.line&&(a.snapToLines||a.line>=0&&a.line<=100))return a.line;if(!a.track||!a.track.textTrackList||!a.track.textTrackList.mediaElement)return-1;for(var b=a.track,c=b.textTrackList,d=0,e=0;e<c.length&&c[e]!==b;e++)"showing"===c[e].mode&&d++;return++d*-1}function Da(){}function Ea(a,b,c){var d=/MSIE\s8\.0/.test(navigator.userAgent),e="rgba(255, 255, 255, 1)",f="rgba(0, 0, 0, 0.8)";d&&(e="rgb(255, 255, 255)",f="rgb(0, 0, 0)"),Da.call(this),this.cue=b,this.cueDiv=za(a,b.text);var g={color:e,backgroundColor:f,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};d||(g.writingMode=""===b.vertical?"horizontal-tb":"lr"===b.vertical?"vertical-lr":"vertical-rl",g.unicodeBidi="plaintext"),this.applyStyles(g,this.cueDiv),this.div=a.document.createElement("div"),g={textAlign:"middle"===b.align?"center":b.align,font:c.font,whiteSpace:"pre-line",position:"absolute"},d||(g.direction=Ba(this.cueDiv),g.writingMode=""===b.vertical?"horizontal-tb":"lr"===b.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),this.applyStyles(g),this.div.appendChild(this.cueDiv);var h=0;switch(b.positionAlign){case"start":h=b.position;break;case"middle":h=b.position-b.size/2;break;case"end":h=b.position-b.size}""===b.vertical?this.applyStyles({left:this.formatStyle(h,"%"),width:this.formatStyle(b.size,"%")}):this.applyStyles({top:this.formatStyle(h,"%"),height:this.formatStyle(b.size,"%")}),this.move=function(a){this.applyStyles({top:this.formatStyle(a.top,"px"),bottom:this.formatStyle(a.bottom,"px"),left:this.formatStyle(a.left,"px"),right:this.formatStyle(a.right,"px"),height:this.formatStyle(a.height,"px"),width:this.formatStyle(a.width,"px")})}}function Fa(a){var b,c,d,e,f=/MSIE\s8\.0/.test(navigator.userAgent);if(a.div){c=a.div.offsetHeight,d=a.div.offsetWidth,e=a.div.offsetTop;var g=(g=a.div.childNodes)&&(g=g[0])&&g.getClientRects&&g.getClientRects();a=a.div.getBoundingClientRect(),b=g?Math.max(g[0]&&g[0].height||0,a.height/g.length):0}this.left=a.left,this.right=a.right,this.top=a.top||e,this.height=a.height||c,this.bottom=a.bottom||e+(a.height||c),this.width=a.width||d,this.lineHeight=void 0!==b?b:a.lineHeight,f&&!this.lineHeight&&(this.lineHeight=13)}function Ga(a,b,c,d){function e(a,b){for(var e,f=new Fa(a),g=1,h=0;h<b.length;h++){for(;a.overlapsOppositeAxis(c,b[h])||a.within(c)&&a.overlapsAny(d);)a.move(b[h]);if(a.within(c))return a;var i=a.intersectPercentage(c);g>i&&(e=new Fa(a),g=i),a=new Fa(f)}return e||f}var f=new Fa(b),g=b.cue,h=Ca(g),i=[];if(g.snapToLines){var j;switch(g.vertical){case"":i=["+y","-y"],j="height";break;case"rl":i=["+x","-x"],j="width";break;case"lr":i=["-x","+x"],j="width"}var k=f.lineHeight,l=k*Math.round(h),m=c[j]+k,n=i[0];Math.abs(l)>m&&(l=l<0?-1:1,l*=Math.ceil(m/k)*k),h<0&&(l+=""===g.vertical?c.height:c.width,i=i.reverse()),f.move(n,l)}else{var o=f.lineHeight/c.height*100;switch(g.lineAlign){case"middle":h-=o/2;break;case"end":h-=o}switch(g.vertical){case"":b.applyStyles({top:b.formatStyle(h,"%")});break;case"rl":b.applyStyles({left:b.formatStyle(h,"%")});break;case"lr":b.applyStyles({right:b.formatStyle(h,"%")})}i=["+y","-x","+x","-y"],f=new Fa(b)}var p=e(f,i);b.move(p.toCSSCompatValues(c))}function Ha(){}function Ia(a){if("string"!=typeof a)return!1;var b=Ld[a.toLowerCase()];return!!b&&a.toLowerCase()}function Ja(a){if("string"!=typeof a)return!1;var b=Md[a.toLowerCase()];return!!b&&a.toLowerCase()}function Ka(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)a[d]=c[d]}return a}function La(a,b,c){var d=this,e=/MSIE\s8\.0/.test(navigator.userAgent),f={};e?d=document.createElement("custom"):f.enumerable=!0,d.hasBeenReset=!1;var g="",h=!1,i=a,j=b,k=c,l=null,m="",n=!0,o="auto",p="start",q=50,r="middle",s=50,t="middle";if(Object.defineProperty(d,"id",Ka({},f,{get:function(){return g},set:function(a){g=""+a}})),Object.defineProperty(d,"pauseOnExit",Ka({},f,{get:function(){return h},set:function(a){h=!!a}})),Object.defineProperty(d,"startTime",Ka({},f,{get:function(){return i},set:function(a){if("number"!=typeof a)throw new TypeError("Start time must be set to a number.");i=a,this.hasBeenReset=!0}})),Object.defineProperty(d,"endTime",Ka({},f,{get:function(){return j},set:function(a){if("number"!=typeof a)throw new TypeError("End time must be set to a number.");j=a,this.hasBeenReset=!0}})),Object.defineProperty(d,"text",Ka({},f,{get:function(){return k},set:function(a){k=""+a,this.hasBeenReset=!0}})),Object.defineProperty(d,"region",Ka({},f,{get:function(){return l},set:function(a){l=a,this.hasBeenReset=!0}})),Object.defineProperty(d,"vertical",Ka({},f,{get:function(){return m},set:function(a){var b=Ia(a);if(b===!1)throw new SyntaxError("An invalid or illegal string was specified.");m=b,this.hasBeenReset=!0}})),Object.defineProperty(d,"snapToLines",Ka({},f,{get:function(){return n},set:function(a){n=!!a,this.hasBeenReset=!0}})),Object.defineProperty(d,"line",Ka({},f,{get:function(){return o},set:function(a){if("number"!=typeof a&&a!==Kd)throw new SyntaxError("An invalid number or illegal string was specified.");o=a,this.hasBeenReset=!0}})),Object.defineProperty(d,"lineAlign",Ka({},f,{get:function(){return p},set:function(a){var b=Ja(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");p=b,this.hasBeenReset=!0}})),Object.defineProperty(d,"position",Ka({},f,{get:function(){return q},set:function(a){if(a<0||a>100)throw new Error("Position must be between 0 and 100.");q=a,this.hasBeenReset=!0}})),Object.defineProperty(d,"positionAlign",Ka({},f,{get:function(){return r},set:function(a){var b=Ja(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");r=b,this.hasBeenReset=!0}})),Object.defineProperty(d,"size",Ka({},f,{get:function(){return s},set:function(a){if(a<0||a>100)throw new Error("Size must be between 0 and 100.");s=a,this.hasBeenReset=!0}})),Object.defineProperty(d,"align",Ka({},f,{get:function(){return t},set:function(a){var b=Ja(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");t=b,this.hasBeenReset=!0}})),d.displayState=void 0,e)return d}function Ma(a){if("string"!=typeof a)return!1;var b=Od[a.toLowerCase()];return!!b&&a.toLowerCase()}function Na(a){return"number"==typeof a&&a>=0&&a<=100}function Oa(){var a=100,b=3,c=0,d=100,e=0,f=100,g="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return a},set:function(b){if(!Na(b))throw new Error("Width must be between 0 and 100.");a=b}},lines:{enumerable:!0,get:function(){return b},set:function(a){if("number"!=typeof a)throw new TypeError("Lines must be set to a number.");b=a}},regionAnchorY:{enumerable:!0,get:function(){return d},set:function(a){if(!Na(a))throw new Error("RegionAnchorX must be between 0 and 100.");d=a}},regionAnchorX:{enumerable:!0,get:function(){return c},set:function(a){if(!Na(a))throw new Error("RegionAnchorY must be between 0 and 100.");c=a}},viewportAnchorY:{enumerable:!0,get:function(){return f},set:function(a){if(!Na(a))throw new Error("ViewportAnchorY must be between 0 and 100.");f=a}},viewportAnchorX:{enumerable:!0,get:function(){return e},set:function(a){if(!Na(a))throw new Error("ViewportAnchorX must be between 0 and 100.");e=a}},scroll:{enumerable:!0,get:function(){return g},set:function(a){var b=Ma(a);if(b===!1)throw new SyntaxError("An invalid or illegal string was specified.");g=b}}})}function Pa(a,b,c,d){var e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},f=a.textTracks();e.kind=b,c&&(e.label=c),d&&(e.language=d),e.tech=a;var g=new zd.text.TrackClass(e);return f.addTrack(g),g}function Qa(a,b){Sd[a]=Sd[a]||[],Sd[a].push(b)}function Ra(a,b,c){a.setTimeout(function(){return Wa(b,Sd[b.type],c,a)},1)}function Sa(a,b){a.forEach(function(a){return a.setTech&&a.setTech(b)})}function Ta(a,b,c){return a.reduceRight(Va(c),b[c]())}function Ua(a,b,c,d){return b[c](a.reduce(Va(c),d))}function Va(a){return function(b,c){return c[a]?c[a](b):b}}function Wa(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=arguments[2],e=arguments[3],f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],g=arguments.length>5&&void 0!==arguments[5]&&arguments[5],h=b[0],i=b.slice(1);if("string"==typeof h)Wa(a,Sd[h],c,e,f,g);else if(h){var j=h(e);j.setSource(d({},a),function(b,d){return b?Wa(a,i,c,e,f,g):(f.push(j),void Wa(d,a.type===d.type?i:Sd[d.type],c,e,f,g))})}else i.length?Wa(a,i,c,e,f,g):g?c(a,f):Wa(a,Sd["*"],c,e,f,!0)}function Xa(a,b){return"rgba("+parseInt(a[1]+a[1],16)+","+parseInt(a[2]+a[2],16)+","+parseInt(a[3]+a[3],16)+","+b+")"}function Ya(a,b,c){try{a.style[b]=c}catch(d){return}}function Za(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;a=a<0?0:a;var c=Math.floor(a%60),d=Math.floor(a/60%60),e=Math.floor(a/3600),f=Math.floor(b/60%60),g=Math.floor(b/3600);return(isNaN(a)||a===1/0)&&(e=d=c="-"),e=e>0||g>0?e+":":"",d=((e||f>=10)&&d<10?"0"+d:d)+":",c=c<10?"0"+c:c,e+d+c}function $a(a,b){if(b&&(a=b(a)),a&&"none"!==a)return a}function _a(a,b){var c=a.options[a.options.selectedIndex].value;return $a(c,b)}function ab(a,b,c){if(b)for(var d=0;d<a.options.length;d++)if($a(a.options[d].value,c)===b){a.selectedIndex=d;break}}function bb(a,b,c){var d=void 0;if("string"==typeof a){var f=bb.getPlayers();if(0===a.indexOf("#")&&(a=a.slice(1)),f[a])return b&&Ub.warn('Player "'+a+'" is already initialised. Options will not be applied.'),c&&f[a].ready(c),f[a];d=Xb("#"+a)}else d=a;if(!d||!d.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");if(d.player||tf.players[d.playerId])return d.player||tf.players[d.playerId];b=b||{},bb.hooks("beforesetup").forEach(function(a){var c=a(d,_(b));return!e(c)||Array.isArray(c)?void Ub.error("please return an object in beforesetup hooks"):void(b=_(b,c))});var g=vc.getComponent("Player"),h=new g(d,b,c);return bb.hooks("setup").forEach(function(a){return a(h)}),h}var cb,db="6.3.2",eb="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};cb="undefined"!=typeof window?window:"undefined"!=typeof eb?eb:"undefined"!=typeof self?self:{};var fb,gb=cb,hb={},ib=(Object.freeze||Object)({"default":hb}),jb=ib&&hb||ib,kb="undefined"!=typeof eb?eb:"undefined"!=typeof window?window:{};"undefined"!=typeof document?fb=document:(fb=kb["__GLOBAL_DOCUMENT_CACHE@4"],fb||(fb=kb["__GLOBAL_DOCUMENT_CACHE@4"]=jb));var lb=fb,mb=gb.navigator&&gb.navigator.userAgent||"",nb=/AppleWebKit\/([\d.]+)/i.exec(mb),ob=nb?parseFloat(nb.pop()):null,pb=/iPad/i.test(mb),qb=/iPhone/i.test(mb)&&!pb,rb=/iPod/i.test(mb),sb=qb||pb||rb,tb=function(){var a=mb.match(/OS (\d+)_/i);return a&&a[1]?a[1]:null}(),ub=/Android/i.test(mb),vb=function(){var a=mb.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!a)return null;var b=a[1]&&parseFloat(a[1]),c=a[2]&&parseFloat(a[2]);return b&&c?parseFloat(a[1]+"."+a[2]):b?b:null}(),wb=ub&&/webkit/i.test(mb)&&vb<2.3,xb=ub&&vb<5&&ob<537,yb=/Firefox/i.test(mb),zb=/Edge/i.test(mb),Ab=!zb&&/Chrome/i.test(mb),Bb=function(){var a=mb.match(/Chrome\/(\d+)/);return a&&a[1]?parseFloat(a[1]):null}(),Cb=/MSIE\s8\.0/.test(mb),Db=function(){var a=/MSIE\s(\d+)\.\d/.exec(mb),b=a&&parseFloat(a[1]);return!b&&/Trident\/7.0/i.test(mb)&&/rv:11.0/.test(mb)&&(b=11),b}(),Eb=/Safari/i.test(mb)&&!Ab&&!ub&&!zb,Fb=Eb||sb,Gb=l()&&("ontouchstart"in gb||gb.DocumentTouch&&gb.document instanceof gb.DocumentTouch),Hb=l()&&"backgroundSize"in gb.document.createElement("video").style,Ib=(Object.freeze||Object)({IS_IPAD:pb,IS_IPHONE:qb,IS_IPOD:rb,IS_IOS:sb,IOS_VERSION:tb,IS_ANDROID:ub,ANDROID_VERSION:vb,IS_OLD_ANDROID:wb,IS_NATIVE_ANDROID:xb,IS_FIREFOX:yb,IS_EDGE:zb,IS_CHROME:Ab,CHROME_VERSION:Bb,IS_IE8:Cb,IE_VERSION:Db,IS_SAFARI:Eb,IS_ANY_SAFARI:Fb,TOUCH_ENABLED:Gb,BACKGROUND_SIZE_SUPPORTED:Hb}),Jb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},Kb=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},Lb=function(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)},Mb=function(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b},Nb=function(a,b){return a.raw=b,a},Ob=Object.prototype.toString,Pb=function(a){return e(a)?Object.keys(a):[]},Qb=void 0,Rb="all",Sb=[],Tb=function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:!!Db&&Db<11,d=Qb.levels[Rb],f=new RegExp("^("+d+")$");"log"!==a&&b.unshift(a.toUpperCase()+":"),Sb&&Sb.push([].concat(b)),b.unshift("VIDEOJS:");var g=gb.console&&gb.console[a];g&&d&&f.test(a)&&(c&&(b=b.map(function(a){if(e(a)||Array.isArray(a))try{return JSON.stringify(a)}catch(b){return String(a)}return String(a)}).join(" ")),g.apply?g[Array.isArray(b)?"apply":"call"](gb.console,b):g(b))};Qb=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];Tb("log",b)},Qb.levels={all:"log|warn|error",error:"error",off:"",warn:"warn|error",DEFAULT:Rb},Qb.level=function(a){if("string"==typeof a){if(!Qb.levels.hasOwnProperty(a))throw new Error('"'+a+'" in not a valid log level');Rb=a}return Rb},Qb.history=function(){return Sb?[].concat(Sb):[]},Qb.history.clear=function(){Sb&&(Sb.length=0)},Qb.history.disable=function(){null!==Sb&&(Sb.length=0,Sb=null)},Qb.history.enable=function(){null===Sb&&(Sb=[])},Qb.error=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return Tb("error",b)},Qb.warn=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return Tb("warn",b)};var Ub=Qb,Vb=function(a){for(var b="",c=0;c<arguments.length;c++)b+=g(a[c])+(arguments[c+1]||"");return b},Wb=Nb(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."]),Xb=o("querySelector"),Yb=o("querySelectorAll"),Zb=(Object.freeze||Object)({isReal:l,isEl:m,isInFrame:n,createEl:p,textContent:q,prependTo:r,hasClass:s,addClass:t,removeClass:u,toggleClass:v,setAttributes:w,getAttributes:x,getAttribute:y,setAttribute:z,removeAttribute:A,blockTextSelection:B,unblockTextSelection:C,getBoundingClientRect:D,findPosition:E,getPointerPosition:F,isTextNode:G,emptyEl:H,normalizeContent:I,appendContent:J,insertContent:K,$:Xb,$$:Yb}),$b=1,_b={},ac="vdata"+(new Date).getTime(),bc=!1;!function(){try{var a=Object.defineProperty({},"passive",{get:function(){bc=!0}});gb.addEventListener("test",null,a)}catch(b){}}();var cc=["touchstart","touchmove"],dc=(Object.freeze||Object)({fixEvent:R,on:S,off:T,trigger:U,one:V}),ec=!1,fc=void 0,gc=function(){
|
|
if(l()){var a=lb.getElementsByTagName("video"),b=lb.getElementsByTagName("audio"),c=[];if(a&&a.length>0)for(var d=0,e=a.length;d<e;d++)c.push(a[d]);if(b&&b.length>0)for(var f=0,g=b.length;f<g;f++)c.push(b[f]);if(c&&c.length>0)for(var h=0,i=c.length;h<i;h++){var j=c[h];if(!j||!j.getAttribute){W(1);break}if(void 0===j.player){var k=j.getAttribute("data-setup");null!==k&&fc(j)}}else ec||W(1)}};l()&&"complete"===lb.readyState?ec=!0:V(gb,"load",function(){ec=!0});var hc=function(a){var b=lb.createElement("style");return b.className=a,b},ic=function(a,b){a.styleSheet?a.styleSheet.cssText=b:a.textContent=b},jc=function(a,b,c){b.guid||(b.guid=L());var d=function(){return b.apply(a,arguments)};return d.guid=c?c+"_"+b.guid:b.guid,d},kc=function(a,b){var c=Date.now(),d=function(){var d=Date.now();d-c>=b&&(a.apply(void 0,arguments),c=d)};return d},lc=function(){};lc.prototype.allowedEvents_={},lc.prototype.on=function(a,b){var c=this.addEventListener;this.addEventListener=function(){},S(this,a,b),this.addEventListener=c},lc.prototype.addEventListener=lc.prototype.on,lc.prototype.off=function(a,b){T(this,a,b)},lc.prototype.removeEventListener=lc.prototype.off,lc.prototype.one=function(a,b){var c=this.addEventListener;this.addEventListener=function(){},V(this,a,b),this.addEventListener=c},lc.prototype.trigger=function(a){var b=a.type||a;"string"==typeof a&&(a={type:b}),a=R(a),this.allowedEvents_[b]&&this["on"+b]&&this["on"+b](a),U(this,a)},lc.prototype.dispatchEvent=lc.prototype.trigger;var mc=function(a){return a instanceof lc||!!a.eventBusEl_&&["on","one","off","trigger"].every(function(b){return"function"==typeof a[b]})},nc=function(a){return"string"==typeof a&&/\S/.test(a)||Array.isArray(a)&&!!a.length},oc=function(a){if(!a.nodeName&&!mc(a))throw new Error("Invalid target; must be a DOM node or evented object.")},pc=function(a){if(!nc(a))throw new Error("Invalid event type; must be a non-empty string or array.")},qc=function(a){if("function"!=typeof a)throw new Error("Invalid listener; must be a function.")},rc=function(a,b){var c=b.length<3||b[0]===a||b[0]===a.eventBusEl_,d=void 0,e=void 0,f=void 0;return c?(d=a.eventBusEl_,b.length>=3&&b.shift(),e=b[0],f=b[1]):(d=b[0],e=b[1],f=b[2]),oc(d),pc(e),qc(f),f=jc(a,f),{isTargetingSelf:c,target:d,type:e,listener:f}},sc=function(a,b,c,d){oc(a),a.nodeName?dc[b](a,c,d):a[b](c,d)},tc={on:function(){for(var a=this,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];var e=rc(this,c),f=e.isTargetingSelf,g=e.target,h=e.type,i=e.listener;if(sc(g,"on",h,i),!f){var j=function(){return a.off(g,h,i)};j.guid=i.guid;var k=function(){return a.off("dispose",j)};k.guid=i.guid,sc(this,"on","dispose",j),sc(g,"on","dispose",k)}},one:function(){for(var a=this,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];var e=rc(this,c),f=e.isTargetingSelf,g=e.target,h=e.type,i=e.listener;if(f)sc(g,"one",h,i);else{var j=function k(){for(var b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];a.off(g,h,k),i.apply(null,c)};j.guid=i.guid,sc(g,"one",h,j)}},off:function(a,b,c){if(!a||nc(a))T(this.eventBusEl_,a,b);else{var d=a,e=b;oc(d),pc(e),qc(c),c=jc(this,c),this.off("dispose",c),d.nodeName?(T(d,e,c),T(d,"dispose",c)):mc(d)&&(d.off(e,c),d.off("dispose",c))}},trigger:function(a,b){return U(this.eventBusEl_,a,b)}},uc={state:{},setState:function(a){var c=this;"function"==typeof a&&(a=a());var d=void 0;return b(a,function(a,b){c.state[b]!==a&&(d=d||{},d[b]={from:c.state[b],to:a}),c.state[b]=a}),d&&mc(this)&&this.trigger({changes:d,type:"statechanged"}),d}},vc=function(){function a(b,c,d){if(Kb(this,a),!b&&this.play?this.player_=b=this:this.player_=b,this.options_=_({},this.options_),c=this.options_=_(this.options_,c),this.id_=c.id||c.el&&c.el.id,!this.id_){var e=b&&b.id&&b.id()||"no_player";this.id_=e+"_component_"+L()}this.name_=c.name||null,c.el?this.el_=c.el:c.createEl!==!1&&(this.el_=this.createEl()),X(this,{eventBusKey:this.el_?"el_":null}),Y(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},c.initChildren!==!1&&this.initChildren(),this.ready(d),c.reportTouchActivity!==!1&&this.enableTouchActivity()}return a.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var a=this.children_.length-1;a>=0;a--)this.children_[a].dispose&&this.children_[a].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),O(this.el_),this.el_=null)},a.prototype.player=function(){return this.player_},a.prototype.options=function(a){return Ub.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),a?(this.options_=_(this.options_,a),this.options_):this.options_},a.prototype.el=function(){return this.el_},a.prototype.createEl=function(a,b,c){return p(a,b,c)},a.prototype.localize=function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,d=this.player_.language&&this.player_.language(),e=this.player_.languages&&this.player_.languages(),f=e&&e[d],g=d&&d.split("-")[0],h=e&&e[g],i=c;return f&&f[a]?i=f[a]:h&&h[a]&&(i=h[a]),b&&(i=i.replace(/\{(\d+)\}/g,function(a,c){var d=b[c-1],e=d;return"undefined"==typeof d&&(e=a),e})),i},a.prototype.contentEl=function(){return this.contentEl_||this.el_},a.prototype.id=function(){return this.id_},a.prototype.name=function(){return this.name_},a.prototype.children=function(){return this.children_},a.prototype.getChildById=function(a){return this.childIndex_[a]},a.prototype.getChild=function(a){if(a)return a=Z(a),this.childNameIndex_[a]},a.prototype.addChild=function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,e=void 0,f=void 0;if("string"==typeof b){f=Z(b);var g=c.componentClass||f;c.name=f;var h=a.getComponent(g);if(!h)throw new Error("Component "+g+" does not exist");if("function"!=typeof h)return null;e=new h(this.player_||this,c)}else e=b;if(this.children_.splice(d,0,e),"function"==typeof e.id&&(this.childIndex_[e.id()]=e),f=f||e.name&&Z(e.name()),f&&(this.childNameIndex_[f]=e),"function"==typeof e.el&&e.el()){var i=this.contentEl().children,j=i[d]||null;this.contentEl().insertBefore(e.el(),j)}return e},a.prototype.removeChild=function(a){if("string"==typeof a&&(a=this.getChild(a)),a&&this.children_){for(var b=!1,c=this.children_.length-1;c>=0;c--)if(this.children_[c]===a){b=!0,this.children_.splice(c,1);break}if(b){this.childIndex_[a.id()]=null,this.childNameIndex_[a.name()]=null;var d=a.el();d&&d.parentNode===this.contentEl()&&this.contentEl().removeChild(a.el())}}},a.prototype.initChildren=function(){var b=this,c=this.options_.children;if(c){var d=this.options_,e=function(a){var c=a.name,e=a.opts;if(void 0!==d[c]&&(e=d[c]),e!==!1){e===!0&&(e={}),e.playerOptions=b.options_.playerOptions;var f=b.addChild(c,e);f&&(b[c]=f)}},f=void 0,g=a.getComponent("Tech");f=Array.isArray(c)?c:Object.keys(c),f.concat(Object.keys(this.options_).filter(function(a){return!f.some(function(b){return"string"==typeof b?a===b:a===b.name})})).map(function(a){var d=void 0,e=void 0;return"string"==typeof a?(d=a,e=c[d]||b.options_[d]||{}):(d=a.name,e=a),{name:d,opts:e}}).filter(function(b){var c=a.getComponent(b.opts.componentClass||Z(b.name));return c&&!g.isTech(c)}).forEach(e)}},a.prototype.buildCSSClass=function(){return""},a.prototype.ready=function(a){var b=arguments.length>1&&void 0!==arguments[1]&&arguments[1];a&&(this.isReady_?b?a.call(this):this.setTimeout(a,1):(this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(a)))},a.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var a=this.readyQueue_;this.readyQueue_=[],a&&a.length>0&&a.forEach(function(a){a.call(this)},this),this.trigger("ready")},1)},a.prototype.$=function(a,b){return Xb(a,b||this.contentEl())},a.prototype.$$=function(a,b){return Yb(a,b||this.contentEl())},a.prototype.hasClass=function(a){return s(this.el_,a)},a.prototype.addClass=function(a){t(this.el_,a)},a.prototype.removeClass=function(a){u(this.el_,a)},a.prototype.toggleClass=function(a,b){v(this.el_,a,b)},a.prototype.show=function(){this.removeClass("vjs-hidden")},a.prototype.hide=function(){this.addClass("vjs-hidden")},a.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},a.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},a.prototype.getAttribute=function(a){return y(this.el_,a)},a.prototype.setAttribute=function(a,b){z(this.el_,a,b)},a.prototype.removeAttribute=function(a){A(this.el_,a)},a.prototype.width=function(a,b){return this.dimension("width",a,b)},a.prototype.height=function(a,b){return this.dimension("height",a,b)},a.prototype.dimensions=function(a,b){this.width(a,!0),this.height(b)},a.prototype.dimension=function(a,b,c){if(void 0!==b)return null!==b&&b===b||(b=0),(""+b).indexOf("%")!==-1||(""+b).indexOf("px")!==-1?this.el_.style[a]=b:"auto"===b?this.el_.style[a]="":this.el_.style[a]=b+"px",void(c||this.trigger("componentresize"));if(!this.el_)return 0;var d=this.el_.style[a],e=d.indexOf("px");return e!==-1?parseInt(d.slice(0,e),10):parseInt(this.el_["offset"+Z(a)],10)},a.prototype.currentDimension=function(a){var b=0;if("width"!==a&&"height"!==a)throw new Error("currentDimension only accepts width or height value");if("function"==typeof gb.getComputedStyle){var c=gb.getComputedStyle(this.el_);b=c.getPropertyValue(a)||c[a]}if(b=parseFloat(b),0===b){var d="offset"+Z(a);b=this.el_[d]}return b},a.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},a.prototype.currentWidth=function(){return this.currentDimension("width")},a.prototype.currentHeight=function(){return this.currentDimension("height")},a.prototype.focus=function(){this.el_.focus()},a.prototype.blur=function(){this.el_.blur()},a.prototype.emitTapEvents=function(){var a=0,b=null,c=10,d=200,e=void 0;this.on("touchstart",function(c){1===c.touches.length&&(b={pageX:c.touches[0].pageX,pageY:c.touches[0].pageY},a=(new Date).getTime(),e=!0)}),this.on("touchmove",function(a){if(a.touches.length>1)e=!1;else if(b){var d=a.touches[0].pageX-b.pageX,f=a.touches[0].pageY-b.pageY,g=Math.sqrt(d*d+f*f);g>c&&(e=!1)}});var f=function(){e=!1};this.on("touchleave",f),this.on("touchcancel",f),this.on("touchend",function(c){if(b=null,e===!0){var f=(new Date).getTime()-a;f<d&&(c.preventDefault(),this.trigger("tap"))}})},a.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var a=jc(this.player(),this.player().reportUserActivity),b=void 0;this.on("touchstart",function(){a(),this.clearInterval(b),b=this.setInterval(a,250)});var c=function(c){a(),this.clearInterval(b)};this.on("touchmove",a),this.on("touchend",c),this.on("touchcancel",c)}},a.prototype.setTimeout=function(a,b){a=jc(this,a);var c=gb.setTimeout(a,b),d=function(){this.clearTimeout(c)};return d.guid="vjs-timeout-"+c,this.on("dispose",d),c},a.prototype.clearTimeout=function(a){gb.clearTimeout(a);var b=function(){};return b.guid="vjs-timeout-"+a,this.off("dispose",b),a},a.prototype.setInterval=function(a,b){a=jc(this,a);var c=gb.setInterval(a,b),d=function(){this.clearInterval(c)};return d.guid="vjs-interval-"+c,this.on("dispose",d),c},a.prototype.clearInterval=function(a){gb.clearInterval(a);var b=function(){};return b.guid="vjs-interval-"+a,this.off("dispose",b),a},a.prototype.requestAnimationFrame=function(a){var b=this;if(this.supportsRaf_){a=jc(this,a);var c=gb.requestAnimationFrame(a),d=function(){return b.cancelAnimationFrame(c)};return d.guid="vjs-raf-"+c,this.on("dispose",d),c}return this.setTimeout(a,1e3/60)},a.prototype.cancelAnimationFrame=function(a){if(this.supportsRaf_){gb.cancelAnimationFrame(a);var b=function(){};return b.guid="vjs-raf-"+a,this.off("dispose",b),a}return this.clearTimeout(a)},a.registerComponent=function(b,c){if("string"!=typeof b||!b)throw new Error('Illegal component name, "'+b+'"; must be a non-empty string.');var d=a.getComponent("Tech"),e=d&&d.isTech(c),f=a===c||a.prototype.isPrototypeOf(c.prototype);if(e||!f){var g=void 0;throw g=e?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+b+'"; '+g+".")}b=Z(b),a.components_||(a.components_={});var h=a.getComponent("Player");if("Player"===b&&h&&h.players){var i=h.players,j=Object.keys(i);if(i&&j.length>0&&j.map(function(a){return i[a]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return a.components_[b]=c,c},a.getComponent=function(b){if(b)return b=Z(b),a.components_&&a.components_[b]?a.components_[b]:void 0},a}();vc.prototype.supportsRaf_="function"==typeof gb.requestAnimationFrame&&"function"==typeof gb.cancelAnimationFrame,vc.registerComponent("Component",vc);for(var wc={},xc=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],yc=xc[0],zc=void 0,Ac=0;Ac<xc.length;Ac++)if(xc[Ac][1]in lb){zc=xc[Ac];break}if(zc)for(var Bc=0;Bc<zc.length;Bc++)wc[yc[Bc]]=zc[Bc];fa.prototype.code=0,fa.prototype.message="",fa.prototype.status=null,fa.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],fa.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 Cc=0;Cc<fa.errorTypes.length;Cc++)fa[fa.errorTypes[Cc]]=Cc,fa.prototype[fa.errorTypes[Cc]]=Cc;var Dc=ga,Ec=function(a){var b=["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(b,c,d){return a[c]&&(b[c]=a[c]),b},{cues:a.cues&&Array.prototype.map.call(a.cues,function(a){return{startTime:a.startTime,endTime:a.endTime,text:a.text,id:a.id}})});return b},Fc=function(a){var b=a.$$("track"),c=Array.prototype.map.call(b,function(a){return a.track}),d=Array.prototype.map.call(b,function(a){var b=Ec(a.track);return a.src&&(b.src=a.src),b});return d.concat(Array.prototype.filter.call(a.textTracks(),function(a){return c.indexOf(a)===-1}).map(Ec))},Gc=function(a,b){return a.forEach(function(a){var c=b.addRemoteTextTrack(a).track;!a.src&&a.cues&&a.cues.forEach(function(a){return c.addCue(a)})}),b.textTracks()},Hc={textTracksToJson:Fc,jsonToTextTracks:Gc,trackToJson_:Ec},Ic="vjs-modal-dialog",Jc=27,Kc=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.opened_=e.hasBeenOpened_=e.hasBeenFilled_=!1,e.closeable(!e.options_.uncloseable),e.content(e.options_.content),e.contentEl_=p("div",{className:Ic+"-content"},{role:"document"}),e.descEl_=p("p",{className:Ic+"-description vjs-control-text",id:e.el().getAttribute("aria-describedby")}),q(e.descEl_,e.description()),e.el_.appendChild(e.descEl_),e.el_.appendChild(e.contentEl_),e}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},b.prototype.buildCSSClass=function(){return Ic+" vjs-hidden "+a.prototype.buildCSSClass.call(this)},b.prototype.handleKeyPress=function(a){a.which===Jc&&this.closeable()&&this.close()},b.prototype.label=function(){return this.localize(this.options_.label||"Modal Window")},b.prototype.description=function(){var a=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(a+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),a},b.prototype.open=function(){if(!this.opened_){var a=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!a.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&a.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",jc(this,this.handleKeyPress)),a.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},b.prototype.opened=function(a){return"boolean"==typeof a&&this[a?"open":"close"](),this.opened_},b.prototype.close=function(){if(this.opened_){var a=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&a.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",jc(this,this.handleKeyPress)),a.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},b.prototype.closeable=function c(a){if("boolean"==typeof a){var c=this.closeable_=!!a,b=this.getChild("closeButton");if(c&&!b){var d=this.contentEl_;this.contentEl_=this.el_,b=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=d,this.on(b,"close",this.close)}!c&&b&&(this.off(b,"close",this.close),this.removeChild(b),b.dispose())}return this.closeable_},b.prototype.fill=function(){this.fillWith(this.content())},b.prototype.fillWith=function(a){var b=this.contentEl(),c=b.parentNode,d=b.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,c.removeChild(b),this.empty(),K(b,a),this.trigger("modalfill"),d?c.insertBefore(b,d):c.appendChild(b);var e=this.getChild("closeButton");e&&c.appendChild(e.el_)},b.prototype.empty=function(){this.trigger("beforemodalempty"),H(this.contentEl()),this.trigger("modalempty")},b.prototype.content=function(a){return"undefined"!=typeof a&&(this.content_=a),this.content_},b.prototype.conditionalFocus_=function(){var a=lb.activeElement,b=this.player_.el_;this.previouslyActiveEl_=null,(b.contains(a)||b===a)&&(this.previouslyActiveEl_=a,this.focus(),this.on(lb,"keydown",this.handleKeyDown))},b.prototype.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null),this.off(lb,"keydown",this.handleKeyDown)},b.prototype.handleKeyDown=function(a){if(9===a.which){for(var b=this.focusableEls_(),c=this.el_.querySelector(":focus"),d=void 0,e=0;e<b.length;e++)if(c===b[e]){d=e;break}lb.activeElement===this.el_&&(d=0),a.shiftKey&&0===d?(b[b.length-1].focus(),a.preventDefault()):a.shiftKey||d!==b.length-1||(b[0].focus(),a.preventDefault())}},b.prototype.focusableEls_=function(){var a=this.el_.querySelectorAll("*");return Array.prototype.filter.call(a,function(a){return(a instanceof gb.HTMLAnchorElement||a instanceof gb.HTMLAreaElement)&&a.hasAttribute("href")||(a instanceof gb.HTMLInputElement||a instanceof gb.HTMLSelectElement||a instanceof gb.HTMLTextAreaElement||a instanceof gb.HTMLButtonElement)&&!a.hasAttribute("disabled")||a instanceof gb.HTMLIFrameElement||a instanceof gb.HTMLObjectElement||a instanceof gb.HTMLEmbedElement||a.hasAttribute("tabindex")&&a.getAttribute("tabindex")!==-1||a.hasAttribute("contenteditable")})},b}(vc);Kc.prototype.options_={pauseOnOpen:!0,temporary:!0},vc.registerComponent("ModalDialog",Kc);var Lc=function(a){function b(){var c,d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Kb(this,b);var f=Mb(this,a.call(this));if(!e&&(e=f,Cb)){e=lb.createElement("custom");for(var g in b.prototype)"constructor"!==g&&(e[g]=b.prototype[g])}e.tracks_=[],Object.defineProperty(e,"length",{get:function(){return this.tracks_.length}});for(var h=0;h<d.length;h++)e.addTrack(d[h]);return c=e,Mb(f,c)}return Lb(b,a),b.prototype.addTrack=function(a){var b=this.tracks_.length;""+b in this||Object.defineProperty(this,b,{get:function(){return this.tracks_[b]}}),this.tracks_.indexOf(a)===-1&&(this.tracks_.push(a),this.trigger({track:a,type:"addtrack"}))},b.prototype.removeTrack=function(a){for(var b=void 0,c=0,d=this.length;c<d;c++)if(this[c]===a){b=this[c],b.off&&b.off(),this.tracks_.splice(c,1);break}b&&this.trigger({track:b,type:"removetrack"})},b.prototype.getTrackById=function(a){for(var b=null,c=0,d=this.length;c<d;c++){var e=this[c];if(e.id===a){b=e;break}}return b},b}(lc);Lc.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var Mc in Lc.prototype.allowedEvents_)Lc.prototype["on"+Mc]=null;var Nc=function(a,b){for(var c=0;c<a.length;c++)Object.keys(a[c]).length&&b.id!==a[c].id&&(a[c].enabled=!1)},Oc=function(a){function b(){var c,d,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Kb(this,b);for(var f=void 0,g=e.length-1;g>=0;g--)if(e[g].enabled){Nc(e,e[g]);break}if(Cb){f=lb.createElement("custom");for(var h in Lc.prototype)"constructor"!==h&&(f[h]=Lc.prototype[h]);for(var i in b.prototype)"constructor"!==i&&(f[i]=b.prototype[i])}return f=c=Mb(this,a.call(this,e,f)),f.changing_=!1,d=f,Mb(c,d)}return Lb(b,a),b.prototype.addTrack=function(b){var c=this;b.enabled&&Nc(this,b),a.prototype.addTrack.call(this,b),b.addEventListener&&b.addEventListener("enabledchange",function(){c.changing_||(c.changing_=!0,Nc(c,b),c.changing_=!1,c.trigger("change"))})},b}(Lc),Pc=function(a,b){for(var c=0;c<a.length;c++)Object.keys(a[c]).length&&b.id!==a[c].id&&(a[c].selected=!1)},Qc=function(a){function b(){var c,d,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Kb(this,b);for(var f=void 0,g=e.length-1;g>=0;g--)if(e[g].selected){Pc(e,e[g]);break}if(Cb){f=lb.createElement("custom");for(var h in Lc.prototype)"constructor"!==h&&(f[h]=Lc.prototype[h]);for(var i in b.prototype)"constructor"!==i&&(f[i]=b.prototype[i])}return f=c=Mb(this,a.call(this,e,f)),f.changing_=!1,Object.defineProperty(f,"selectedIndex",{get:function(){for(var a=0;a<this.length;a++)if(this[a].selected)return a;return-1},set:function(){}}),d=f,Mb(c,d)}return Lb(b,a),b.prototype.addTrack=function(b){var c=this;b.selected&&Pc(this,b),a.prototype.addTrack.call(this,b),b.addEventListener&&b.addEventListener("selectedchange",function(){c.changing_||(c.changing_=!0,Pc(c,b),c.changing_=!1,c.trigger("change"))})},b}(Lc),Rc=function(a){function b(){var c,d,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Kb(this,b);var f=void 0;if(Cb){f=lb.createElement("custom");for(var g in Lc.prototype)"constructor"!==g&&(f[g]=Lc.prototype[g]);for(var h in b.prototype)"constructor"!==h&&(f[h]=b.prototype[h])}return f=c=Mb(this,a.call(this,e,f)),d=f,Mb(c,d)}return Lb(b,a),b.prototype.addTrack=function(b){a.prototype.addTrack.call(this,b),b.addEventListener("modechange",jc(this,function(){this.trigger("change")}));var c=["metadata","chapters"];c.indexOf(b.kind)===-1&&b.addEventListener("modechange",jc(this,function(){this.trigger("selectedlanguagechange")}))},b}(Lc),Sc=function(){function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Kb(this,a);var c=this;if(Cb){c=lb.createElement("custom");for(var d in a.prototype)"constructor"!==d&&(c[d]=a.prototype[d])}c.trackElements_=[],Object.defineProperty(c,"length",{get:function(){return this.trackElements_.length}});for(var e=0,f=b.length;e<f;e++)c.addTrackElement_(b[e]);if(Cb)return c}return a.prototype.addTrackElement_=function(a){var b=this.trackElements_.length;""+b in this||Object.defineProperty(this,b,{get:function(){return this.trackElements_[b]}}),this.trackElements_.indexOf(a)===-1&&this.trackElements_.push(a)},a.prototype.getTrackElementByTrack_=function(a){for(var b=void 0,c=0,d=this.trackElements_.length;c<d;c++)if(a===this.trackElements_[c].track){b=this.trackElements_[c];break}return b},a.prototype.removeTrackElement_=function(a){for(var b=0,c=this.trackElements_.length;b<c;b++)if(a===this.trackElements_[b]){this.trackElements_.splice(b,1);break}},a}(),Tc=function(){function a(b){Kb(this,a);var c=this;if(Cb){c=lb.createElement("custom");for(var d in a.prototype)"constructor"!==d&&(c[d]=a.prototype[d])}if(a.prototype.setCues_.call(c,b),Object.defineProperty(c,"length",{get:function(){return this.length_}}),Cb)return c}return a.prototype.setCues_=function(a){var b=this.length||0,c=0,d=a.length;this.cues_=a,this.length_=a.length;var e=function(a){""+a in this||Object.defineProperty(this,""+a,{get:function(){return this.cues_[a]}})};if(b<d)for(c=b;c<d;c++)e.call(this,c)},a.prototype.getCueById=function(a){for(var b=null,c=0,d=this.length;c<d;c++){var e=this[c];if(e.id===a){b=e;break}}return b},a}(),Uc={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Vc={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Wc={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Xc={disabled:"disabled",hidden:"hidden",showing:"showing"},Yc=function(a){function b(){var c,d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Kb(this,b);var e=Mb(this,a.call(this)),f=e;if(Cb){f=lb.createElement("custom");for(var g in b.prototype)"constructor"!==g&&(f[g]=b.prototype[g])}var h={id:d.id||"vjs_track_"+L(),kind:d.kind||"",label:d.label||"",language:d.language||""},i=function(a){Object.defineProperty(f,a,{get:function(){return h[a]},set:function(){}})};for(var j in h)i(j);return c=f,Mb(e,c)}return Lb(b,a),b}(lc),Zc=function(a){var b=["protocol","hostname","port","pathname","search","hash","host"],c=lb.createElement("a");c.href=a;var d=""===c.host&&"file:"!==c.protocol,e=void 0;d&&(e=lb.createElement("div"),e.innerHTML='<a href="'+a+'"></a>',c=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),lb.body.appendChild(e));for(var f={},g=0;g<b.length;g++)f[b[g]]=c[b[g]];return"http:"===f.protocol&&(f.host=f.host.replace(/:80$/,"")),"https:"===f.protocol&&(f.host=f.host.replace(/:443$/,"")),d&&lb.body.removeChild(e),f},$c=function(a){if(!a.match(/^https?:\/\//)){var b=lb.createElement("div");b.innerHTML='<a href="'+a+'">x</a>',a=b.firstChild.href}return a},_c=function(a){if("string"==typeof a){var b=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,c=b.exec(a);if(c)return c.pop().toLowerCase()}return""},ad=function(a){var b=gb.location,c=Zc(a),d=":"===c.protocol?b.protocol:c.protocol,e=d+c.host!==b.protocol+b.host;return e},bd=(Object.freeze||Object)({parseUrl:Zc,getAbsoluteURL:$c,getFileExtension:_c,isCrossOrigin:ad}),cd=ha,dd=Object.prototype.toString,ed=a(function(a,b){function c(a){return a.replace(/^\s*|\s*$/g,"")}b=a.exports=c,b.left=function(a){return a.replace(/^\s*/,"")},b.right=function(a){return a.replace(/\s*$/,"")}}),fd=ia,gd=Object.prototype.toString,hd=Object.prototype.hasOwnProperty,id=function(a){return"[object Array]"===Object.prototype.toString.call(a)},jd=function(a){if(!a)return{};var b={};return fd(ed(a).split("\n"),function(a){var c=a.indexOf(":"),d=ed(a.slice(0,c)).toLowerCase(),e=ed(a.slice(c+1));"undefined"==typeof b[d]?b[d]=e:id(b[d])?b[d].push(e):b[d]=[b[d],e]}),b},kd=ma,ld=Object.prototype.hasOwnProperty,md=qa;qa.XMLHttpRequest=gb.XMLHttpRequest||ta,qa.XDomainRequest="withCredentials"in new qa.XMLHttpRequest?qa.XMLHttpRequest:gb.XDomainRequest,na(["get","put","post","patch","head","delete"],function(a){qa["delete"===a?"del":a]=function(b,c,d){return c=pa(b,c,d),c.method=a.toUpperCase(),ra(c)}});var nd=function(a,b){var c=new gb.WebVTT.Parser(gb,gb.vttjs,gb.WebVTT.StringDecoder()),d=[];c.oncue=function(a){b.addCue(a)},c.onparsingerror=function(a){d.push(a)},c.onflush=function(){b.trigger({type:"loadeddata",target:b})},c.parse(a),d.length>0&&(gb.console&&gb.console.groupCollapsed&&gb.console.groupCollapsed("Text Track parsing errors for "+b.src),d.forEach(function(a){return Ub.error(a)}),gb.console&&gb.console.groupEnd&&gb.console.groupEnd()),c.flush()},od=function(a,b){var c={uri:a},d=ad(a);d&&(c.cors=d),md(c,jc(this,function(a,c,d){if(a)return Ub.error(a,c);if(b.loaded_=!0,"function"!=typeof gb.WebVTT){if(b.tech_){var e=function(){return nd(d,b)};b.tech_.on("vttjsloaded",e),b.tech_.on("vttjserror",function(){Ub.error("vttjs failed to load, stopping trying to process "+b.src),b.tech_.off("vttjsloaded",e)})}}else nd(d,b)}))},pd=function(a){function b(){var c,d,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Kb(this,b),!e.tech)throw new Error("A tech was not provided.");var f=_(e,{kind:Wc[e.kind]||"subtitles",language:e.language||e.srclang||""}),g=Xc[f.mode]||"disabled",h=f["default"];"metadata"!==f.kind&&"chapters"!==f.kind||(g="hidden");var i=c=Mb(this,a.call(this,f));if(i.tech_=f.tech,Cb)for(var j in b.prototype)"constructor"!==j&&(i[j]=b.prototype[j]);i.cues_=[],i.activeCues_=[];var k=new Tc(i.cues_),l=new Tc(i.activeCues_),m=!1,n=jc(i,function(){this.activeCues,m&&(this.trigger("cuechange"),m=!1)});return"disabled"!==g&&i.tech_.ready(function(){i.tech_.on("timeupdate",n)},!0),Object.defineProperty(i,"default",{get:function(){return h},set:function(){}}),Object.defineProperty(i,"mode",{get:function(){return g},set:function(a){var b=this;Xc[a]&&(g=a,"showing"===g&&this.tech_.ready(function(){b.tech_.on("timeupdate",n)},!0),this.trigger("modechange"))}}),Object.defineProperty(i,"cues",{get:function(){return this.loaded_?k:null},set:function(){}}),Object.defineProperty(i,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return l;for(var a=this.tech_.currentTime(),b=[],c=0,d=this.cues.length;c<d;c++){var e=this.cues[c];e.startTime<=a&&e.endTime>=a?b.push(e):e.startTime===e.endTime&&e.startTime<=a&&e.startTime+.5>=a&&b.push(e)}if(m=!1,b.length!==this.activeCues_.length)m=!0;else for(var f=0;f<b.length;f++)this.activeCues_.indexOf(b[f])===-1&&(m=!0);return this.activeCues_=b,l.setCues_(this.activeCues_),l},set:function(){}}),f.src?(i.src=f.src,od(f.src,i)):i.loaded_=!0,d=i,Mb(c,d)}return Lb(b,a),b.prototype.addCue=function(a){var b=a;if(gb.vttjs&&!(a instanceof gb.vttjs.VTTCue)){b=new gb.vttjs.VTTCue(a.startTime,a.endTime,a.text);for(var c in a)c in b||(b[c]=a[c]);b.id=a.id,b.originalCue_=a}for(var d=this.tech_.textTracks(),e=0;e<d.length;e++)d[e]!==this&&d[e].removeCue(b);this.cues_.push(b),this.cues.setCues_(this.cues_)},b.prototype.removeCue=function(a){for(var b=this.cues_.length;b--;){var c=this.cues_[b];if(c===a||c.originalCue_&&c.originalCue_===a){this.cues_.splice(b,1),this.cues.setCues_(this.cues_);break}}},b}(Yc);pd.prototype.allowedEvents_={cuechange:"cuechange"};var qd=function(a){function b(){var c,d,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Kb(this,b);var f=_(e,{kind:Vc[e.kind]||""}),g=c=Mb(this,a.call(this,f)),h=!1;if(Cb)for(var i in b.prototype)"constructor"!==i&&(g[i]=b.prototype[i]);return Object.defineProperty(g,"enabled",{get:function(){return h},set:function(a){"boolean"==typeof a&&a!==h&&(h=a,this.trigger("enabledchange"))}}),f.enabled&&(g.enabled=f.enabled),g.loaded_=!0,d=g,Mb(c,d)}return Lb(b,a),b}(Yc),rd=function(a){function b(){var c,d,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Kb(this,b);var f=_(e,{kind:Uc[e.kind]||""}),g=c=Mb(this,a.call(this,f)),h=!1;if(Cb)for(var i in b.prototype)"constructor"!==i&&(g[i]=b.prototype[i]);return Object.defineProperty(g,"selected",{get:function(){return h},set:function(a){"boolean"==typeof a&&a!==h&&(h=a,this.trigger("selectedchange"));
|
|
}}),f.selected&&(g.selected=f.selected),d=g,Mb(c,d)}return Lb(b,a),b}(Yc),sd=0,td=1,ud=2,vd=3,wd=function(a){function b(){var c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Kb(this,b);var d=Mb(this,a.call(this)),e=void 0,f=d;if(Cb){f=lb.createElement("custom");for(var g in b.prototype)"constructor"!==g&&(f[g]=b.prototype[g])}var h=new pd(c);if(f.kind=h.kind,f.src=h.src,f.srclang=h.language,f.label=h.label,f["default"]=h["default"],Object.defineProperty(f,"readyState",{get:function(){return e}}),Object.defineProperty(f,"track",{get:function(){return h}}),e=sd,h.addEventListener("loadeddata",function(){e=ud,f.trigger({type:"load",target:f})}),Cb){var i;return i=f,Mb(d,i)}return d}return Lb(b,a),b}(lc);wd.prototype.allowedEvents_={load:"load"},wd.NONE=sd,wd.LOADING=td,wd.LOADED=ud,wd.ERROR=vd;var xd={audio:{ListClass:Oc,TrackClass:qd,capitalName:"Audio"},video:{ListClass:Qc,TrackClass:rd,capitalName:"Video"},text:{ListClass:Rc,TrackClass:pd,capitalName:"Text"}};Object.keys(xd).forEach(function(a){xd[a].getterName=a+"Tracks",xd[a].privateName=a+"Tracks_"});var yd={remoteText:{ListClass:Rc,TrackClass:pd,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Sc,TrackClass:wd,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},zd=_(xd,yd);yd.names=Object.keys(yd),xd.names=Object.keys(xd),zd.names=[].concat(yd.names).concat(xd.names);var Ad=Object.create||function(){function a(){}return function(b){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return a.prototype=b,new a}}();ua.prototype=Ad(Error.prototype),ua.prototype.constructor=ua,ua.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},wa.prototype={set:function(a,b){this.get(a)||""===b||(this.values[a]=b)},get:function(a,b,c){return c?this.has(a)?this.values[a]:b[c]:this.has(a)?this.values[a]:b},has:function(a){return a in this.values},alt:function(a,b,c){for(var d=0;d<c.length;++d)if(b===c[d]){this.set(a,b);break}},integer:function(a,b){/^-?\d+$/.test(b)&&this.set(a,parseInt(b,10))},percent:function(a,b){var c;return!!((c=b.match(/^([\d]{1,3})(\.[\d]*)?%$/))&&(b=parseFloat(b),b>=0&&b<=100))&&(this.set(a,b),!0)}};var Bd={"&":"&","<":"<",">":">","‎":"","‏":""," ":" "},Cd={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Dd={v:"title",lang:"lang"},Ed={rt:"ruby"},Fd=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];Da.prototype.applyStyles=function(a,b){b=b||this.div;for(var c in a)a.hasOwnProperty(c)&&(b.style[c]=a[c])},Da.prototype.formatStyle=function(a,b){return 0===a?0:a+b},Ea.prototype=Ad(Da.prototype),Ea.prototype.constructor=Ea,Fa.prototype.move=function(a,b){switch(b=void 0!==b?b:this.lineHeight,a){case"+x":this.left+=b,this.right+=b;break;case"-x":this.left-=b,this.right-=b;break;case"+y":this.top+=b,this.bottom+=b;break;case"-y":this.top-=b,this.bottom-=b}},Fa.prototype.overlaps=function(a){return this.left<a.right&&this.right>a.left&&this.top<a.bottom&&this.bottom>a.top},Fa.prototype.overlapsAny=function(a){for(var b=0;b<a.length;b++)if(this.overlaps(a[b]))return!0;return!1},Fa.prototype.within=function(a){return this.top>=a.top&&this.bottom<=a.bottom&&this.left>=a.left&&this.right<=a.right},Fa.prototype.overlapsOppositeAxis=function(a,b){switch(b){case"+x":return this.left<a.left;case"-x":return this.right>a.right;case"+y":return this.top<a.top;case"-y":return this.bottom>a.bottom}},Fa.prototype.intersectPercentage=function(a){var b=Math.max(0,Math.min(this.right,a.right)-Math.max(this.left,a.left)),c=Math.max(0,Math.min(this.bottom,a.bottom)-Math.max(this.top,a.top)),d=b*c;return d/(this.height*this.width)},Fa.prototype.toCSSCompatValues=function(a){return{top:this.top-a.top,bottom:a.bottom-this.bottom,left:this.left-a.left,right:a.right-this.right,height:this.height,width:this.width}},Fa.getSimpleBoxPosition=function(a){var b=a.div?a.div.offsetHeight:a.tagName?a.offsetHeight:0,c=a.div?a.div.offsetWidth:a.tagName?a.offsetWidth:0,d=a.div?a.div.offsetTop:a.tagName?a.offsetTop:0;a=a.div?a.div.getBoundingClientRect():a.tagName?a.getBoundingClientRect():a;var e={left:a.left,right:a.right,top:a.top||d,height:a.height||b,bottom:a.bottom||d+(a.height||b),width:a.width||c};return e},Ha.StringDecoder=function(){return{decode:function(a){if(!a)return"";if("string"!=typeof a)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(a))}}},Ha.convertCueToDOMTree=function(a,b){return a&&b?za(a,b):null};var Gd=.05,Hd="sans-serif",Id="1.5%";Ha.processCues=function(a,b,c){function d(a){for(var b=0;b<a.length;b++)if(a[b].hasBeenReset||!a[b].displayState)return!0;return!1}if(!a||!b||!c)return null;for(;c.firstChild;)c.removeChild(c.firstChild);var e=a.document.createElement("div");if(e.style.position="absolute",e.style.left="0",e.style.right="0",e.style.top="0",e.style.bottom="0",e.style.margin=Id,c.appendChild(e),d(b)){var f=[],g=Fa.getSimpleBoxPosition(e),h=Math.round(g.height*Gd*100)/100,i={font:h+"px "+Hd};!function(){for(var c,d,h=0;h<b.length;h++)d=b[h],c=new Ea(a,d,i),e.appendChild(c.div),Ga(a,c,g,f),d.displayState=c.div,f.push(Fa.getSimpleBoxPosition(c))}()}else for(var j=0;j<b.length;j++)e.appendChild(b[j].displayState)},Ha.Parser=function(a,b,c){c||(c=b,b={}),b||(b={}),this.window=a,this.vttjs=b,this.state="INITIAL",this.buffer="",this.decoder=c||new TextDecoder("utf8"),this.regionList=[]},Ha.Parser.prototype={reportOrThrowError:function(a){if(!(a instanceof ua))throw a;this.onparsingerror&&this.onparsingerror(a)},parse:function(a){function b(){for(var a=f.buffer,b=0;b<a.length&&"\r"!==a[b]&&"\n"!==a[b];)++b;var c=a.substr(0,b);return"\r"===a[b]&&++b,"\n"===a[b]&&++b,f.buffer=a.substr(b),c}function c(a){var b=new wa;if(xa(a,function(a,c){switch(a){case"id":b.set(a,c);break;case"width":b.percent(a,c);break;case"lines":b.integer(a,c);break;case"regionanchor":case"viewportanchor":var d=c.split(",");if(2!==d.length)break;var e=new wa;if(e.percent("x",d[0]),e.percent("y",d[1]),!e.has("x")||!e.has("y"))break;b.set(a+"X",e.get("x")),b.set(a+"Y",e.get("y"));break;case"scroll":b.alt(a,c,["up"])}},/=/,/\s/),b.has("id")){var c=new(f.vttjs.VTTRegion||f.window.VTTRegion);c.width=b.get("width",100),c.lines=b.get("lines",3),c.regionAnchorX=b.get("regionanchorX",0),c.regionAnchorY=b.get("regionanchorY",100),c.viewportAnchorX=b.get("viewportanchorX",0),c.viewportAnchorY=b.get("viewportanchorY",100),c.scroll=b.get("scroll",""),f.onregion&&f.onregion(c),f.regionList.push({id:b.get("id"),region:c})}}function d(a){var b=new wa;xa(a,function(a,c){switch(a){case"MPEGT":b.integer(a+"S",c);break;case"LOCA":b.set(a+"L",va(c))}},/[^\d]:/,/,/),f.ontimestampmap&&f.ontimestampmap({MPEGTS:b.get("MPEGTS"),LOCAL:b.get("LOCAL")})}function e(a){a.match(/X-TIMESTAMP-MAP/)?xa(a,function(a,b){switch(a){case"X-TIMESTAMP-MAP":d(b)}},/=/):xa(a,function(a,b){switch(a){case"Region":c(b)}},/:/)}var f=this;a&&(f.buffer+=f.decoder.decode(a,{stream:!0}));try{var g;if("INITIAL"===f.state){if(!/\r\n|\n/.test(f.buffer))return this;g=b();var h=g.match(/^WEBVTT([ \t].*)?$/);if(!h||!h[0])throw new ua(ua.Errors.BadSignature);f.state="HEADER"}for(var i=!1;f.buffer;){if(!/\r\n|\n/.test(f.buffer))return this;switch(i?i=!1:g=b(),f.state){case"HEADER":/:/.test(g)?e(g):g||(f.state="ID");continue;case"NOTE":g||(f.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(g)){f.state="NOTE";break}if(!g)continue;if(f.cue=new(f.vttjs.VTTCue||f.window.VTTCue)(0,0,""),f.state="CUE",g.indexOf("-->")===-1){f.cue.id=g;continue}case"CUE":try{ya(g,f.cue,f.regionList)}catch(j){f.reportOrThrowError(j),f.cue=null,f.state="BADCUE";continue}f.state="CUETEXT";continue;case"CUETEXT":var k=g.indexOf("-->")!==-1;if(!g||k&&(i=!0)){f.oncue&&f.oncue(f.cue),f.cue=null,f.state="ID";continue}f.cue.text&&(f.cue.text+="\n"),f.cue.text+=g;continue;case"BADCUE":g||(f.state="ID");continue}}}catch(j){f.reportOrThrowError(j),"CUETEXT"===f.state&&f.cue&&f.oncue&&f.oncue(f.cue),f.cue=null,f.state="INITIAL"===f.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var a=this;try{if(a.buffer+=a.decoder.decode(),(a.cue||"HEADER"===a.state)&&(a.buffer+="\n\n",a.parse()),"INITIAL"===a.state)throw new ua(ua.Errors.BadSignature)}catch(b){a.reportOrThrowError(b)}return a.onflush&&a.onflush(),this}};var Jd=Ha,Kd="auto",Ld={"":!0,lr:!0,rl:!0},Md={start:!0,middle:!0,end:!0,left:!0,right:!0};La.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Nd=La,Od={"":!0,up:!0},Pd=Oa,Qd=a(function(a){var b=a.exports={WebVTT:Jd,VTTCue:Nd,VTTRegion:Pd};gb.vttjs=b,gb.WebVTT=b.WebVTT;var c=b.VTTCue,d=b.VTTRegion,e=gb.VTTCue,f=gb.VTTRegion;b.shim=function(){gb.VTTCue=c,gb.VTTRegion=d},b.restore=function(){gb.VTTCue=e,gb.VTTRegion=f},gb.VTTCue||b.shim()}),Rd=function(a){function b(){var c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};Kb(this,b),c.reportTouchActivity=!1;var e=Mb(this,a.call(this,null,c,d));return e.hasStarted_=!1,e.on("playing",function(){this.hasStarted_=!0}),e.on("loadstart",function(){this.hasStarted_=!1}),zd.names.forEach(function(a){var b=zd[a];c&&c[b.getterName]&&(e[b.privateName]=c[b.getterName])}),e.featuresProgressEvents||e.manualProgressOn(),e.featuresTimeupdateEvents||e.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(a){c["native"+a+"Tracks"]===!1&&(e["featuresNative"+a+"Tracks"]=!1)}),c.nativeCaptions===!1||c.nativeTextTracks===!1?e.featuresNativeTextTracks=!1:c.nativeCaptions!==!0&&c.nativeTextTracks!==!0||(e.featuresNativeTextTracks=!0),e.featuresNativeTextTracks||e.emulateTextTracks(),e.autoRemoteTextTracks_=new zd.text.ListClass,e.initTrackListeners(),c.nativeControlsForTouch||e.emitTapEvents(),e.constructor&&(e.name_=e.constructor.name||"Unknown Tech"),e}return Lb(b,a),b.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},b.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},b.prototype.trackProgress=function(a){this.stopTrackingProgress(),this.progressInterval=this.setInterval(jc(this,function(){var a=this.bufferedPercent();this.bufferedPercent_!==a&&this.trigger("progress"),this.bufferedPercent_=a,1===a&&this.stopTrackingProgress()}),500)},b.prototype.onDurationChange=function(a){this.duration_=this.duration()},b.prototype.buffered=function(){return da(0,0)},b.prototype.bufferedPercent=function(){return ea(this.buffered(),this.duration_)},b.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},b.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},b.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},b.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},b.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},b.prototype.dispose=function(){this.clearTracks(xd.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),a.prototype.dispose.call(this)},b.prototype.clearTracks=function(a){var b=this;a=[].concat(a),a.forEach(function(a){for(var c=b[a+"Tracks"]()||[],d=c.length;d--;){var e=c[d];"text"===a&&b.removeRemoteTextTrack(e),c.removeTrack(e)}})},b.prototype.cleanupAutoTextTracks=function(){for(var a=this.autoRemoteTextTracks_||[],b=a.length;b--;){var c=a[b];this.removeRemoteTextTrack(c)}},b.prototype.reset=function(){},b.prototype.error=function(a){return void 0!==a&&(this.error_=new fa(a),this.trigger("error")),this.error_},b.prototype.played=function(){return this.hasStarted_?da(0,0):da()},b.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},b.prototype.initTrackListeners=function(){var a=this;xd.names.forEach(function(b){var c=xd[b],d=function(){a.trigger(b+"trackchange")},e=a[c.getterName]();e.addEventListener("removetrack",d),e.addEventListener("addtrack",d),a.on("dispose",function(){e.removeEventListener("removetrack",d),e.removeEventListener("addtrack",d)})})},b.prototype.addWebVttScript_=function(){var a=this;if(!gb.WebVTT)if(lb.body.contains(this.el())){if(!this.options_["vtt.js"]&&f(Qd)&&Object.keys(Qd).length>0)return void this.trigger("vttjsloaded");var b=lb.createElement("script");b.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",b.onload=function(){a.trigger("vttjsloaded")},b.onerror=function(){a.trigger("vttjserror")},this.on("dispose",function(){b.onload=null,b.onerror=null}),gb.WebVTT=!0,this.el().parentNode.appendChild(b)}else this.ready(this.addWebVttScript_)},b.prototype.emulateTextTracks=function(){var a=this,b=this.textTracks(),c=this.remoteTextTracks(),d=function(a){return b.addTrack(a.track)},e=function(a){return b.removeTrack(a.track)};c.on("addtrack",d),c.on("removetrack",e),this.addWebVttScript_();var f=function(){return a.trigger("texttrackchange")},g=function(){f();for(var a=0;a<b.length;a++){var c=b[a];c.removeEventListener("cuechange",f),"showing"===c.mode&&c.addEventListener("cuechange",f)}};g(),b.addEventListener("change",g),b.addEventListener("addtrack",g),b.addEventListener("removetrack",g),this.on("dispose",function(){c.off("addtrack",d),c.off("removetrack",e),b.removeEventListener("change",g),b.removeEventListener("addtrack",g),b.removeEventListener("removetrack",g);for(var a=0;a<b.length;a++){var h=b[a];h.removeEventListener("cuechange",f)}})},b.prototype.addTextTrack=function(a,b,c){if(!a)throw new Error("TextTrack kind is required but was not provided");return Pa(this,a,b,c)},b.prototype.createRemoteTextTrack=function(a){var b=_(a,{tech:this});return new yd.remoteTextEl.TrackClass(b)},b.prototype.addRemoteTextTrack=function(){var a=this,b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=arguments[1],d=this.createRemoteTextTrack(b);return c!==!0&&c!==!1&&(Ub.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),c=!0),this.remoteTextTrackEls().addTrackElement_(d),this.remoteTextTracks().addTrack(d.track),c!==!0&&this.ready(function(){return a.autoRemoteTextTracks_.addTrack(d.track)}),d},b.prototype.removeRemoteTextTrack=function(a){var b=this.remoteTextTrackEls().getTrackElementByTrack_(a);this.remoteTextTrackEls().removeTrackElement_(b),this.remoteTextTracks().removeTrack(a),this.autoRemoteTextTracks_.removeTrack(a)},b.prototype.getVideoPlaybackQuality=function(){return{}},b.prototype.setPoster=function(){},b.prototype.playsinline=function(){},b.prototype.setPlaysinline=function(){},b.prototype.canPlayType=function(){return""},b.canPlayType=function(){return""},b.canPlaySource=function(a,c){return b.canPlayType(a.type)},b.isTech=function(a){return a.prototype instanceof b||a instanceof b||a===b},b.registerTech=function(a,c){if(b.techs_||(b.techs_={}),!b.isTech(c))throw new Error("Tech "+a+" must be a Tech");if(!b.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!b.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return a=Z(a),b.techs_[a]=c,"Tech"!==a&&b.defaultTechOrder_.push(a),c},b.getTech=function(a){if(a)return a=Z(a),b.techs_&&b.techs_[a]?b.techs_[a]:gb&&gb.videojs&&gb.videojs[a]?(Ub.warn("The "+a+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),gb.videojs[a]):void 0},b}(vc);zd.names.forEach(function(a){var b=zd[a];Rd.prototype[b.getterName]=function(){return this[b.privateName]=this[b.privateName]||new b.ListClass,this[b.privateName]}}),Rd.prototype.featuresVolumeControl=!0,Rd.prototype.featuresFullscreenResize=!1,Rd.prototype.featuresPlaybackRate=!1,Rd.prototype.featuresProgressEvents=!1,Rd.prototype.featuresTimeupdateEvents=!1,Rd.prototype.featuresNativeTextTracks=!1,Rd.withSourceHandlers=function(a){a.registerSourceHandler=function(b,c){var d=a.sourceHandlers;d||(d=a.sourceHandlers=[]),void 0===c&&(c=d.length),d.splice(c,0,b)},a.canPlayType=function(b){for(var c=a.sourceHandlers||[],d=void 0,e=0;e<c.length;e++)if(d=c[e].canPlayType(b))return d;return""},a.selectSourceHandler=function(b,c){for(var d=a.sourceHandlers||[],e=void 0,f=0;f<d.length;f++)if(e=d[f].canHandleSource(b,c))return d[f];return null},a.canPlaySource=function(b,c){var d=a.selectSourceHandler(b,c);return d?d.canHandleSource(b,c):""};var b=["seekable","duration"];b.forEach(function(a){var b=this[a];"function"==typeof b&&(this[a]=function(){return this.sourceHandler_&&this.sourceHandler_[a]?this.sourceHandler_[a].apply(this.sourceHandler_,arguments):b.apply(this,arguments)})},a.prototype),a.prototype.setSource=function(b){var c=a.selectSourceHandler(b,this.options_);c||(a.nativeSourceHandler?c=a.nativeSourceHandler:Ub.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),c!==a.nativeSourceHandler&&(this.currentSource_=b),this.sourceHandler_=c.handleSource(b,this,this.options_),this.on("dispose",this.disposeSourceHandler)},a.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},vc.registerComponent("Tech",Rd),Rd.registerTech("Tech",Rd),Rd.defaultTechOrder_=[];var Sd={},Td={buffered:1,currentTime:1,duration:1,seekable:1,played:1},Ud={setCurrentTime:1},Vd=function Jf(a){if(Array.isArray(a)){var b=[];a.forEach(function(a){a=Jf(a),Array.isArray(a)?b=b.concat(a):e(a)&&b.push(a)}),a=b}else a="string"==typeof a&&a.trim()?[{src:a}]:e(a)&&"string"==typeof a.src&&a.src&&a.src.trim()?[a]:[];return a},Wd=function(a){function b(c,d,e){Kb(this,b);var f=_({createEl:!1},d),g=Mb(this,a.call(this,c,f,e));if(d.playerOptions.sources&&0!==d.playerOptions.sources.length)c.src(d.playerOptions.sources);else for(var h=0,i=d.playerOptions.techOrder;h<i.length;h++){var j=Z(i[h]),k=Rd.getTech(j);if(j||(k=vc.getComponent(j)),k&&k.isSupported()){c.loadTech_(j);break}}return g}return Lb(b,a),b}(vc);vc.registerComponent("MediaLoader",Wd);var Xd=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.emitTapEvents(),e.enable(),e}return Lb(b,a),b.prototype.createEl=function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};c=d({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},c),"button"===b&&Ub.error("Creating a ClickableComponent with an HTML element of "+b+" is not supported; use a Button instead."),e=d({role:"button","aria-live":"polite"},e),this.tabIndex_=c.tabIndex;var f=a.prototype.createEl.call(this,b,c,e);return this.createControlTextEl(f),f},b.prototype.createControlTextEl=function(a){return this.controlTextEl_=p("span",{className:"vjs-control-text"}),a&&a.appendChild(this.controlTextEl_),this.controlText(this.controlText_,a),this.controlTextEl_},b.prototype.controlText=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(!a)return this.controlText_||"Need Text";var c=this.localize(a);this.controlText_=a,q(this.controlTextEl_,c),this.nonIconControl||b.setAttribute("title",c)},b.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+a.prototype.buildCSSClass.call(this)},b.prototype.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("focus",this.handleFocus),this.on("blur",this.handleBlur))},b.prototype.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(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},b.prototype.handleClick=function(a){},b.prototype.handleFocus=function(a){S(lb,"keydown",jc(this,this.handleKeyPress))},b.prototype.handleKeyPress=function(b){32===b.which||13===b.which?(b.preventDefault(),this.trigger("click")):a.prototype.handleKeyPress&&a.prototype.handleKeyPress.call(this,b)},b.prototype.handleBlur=function(a){T(lb,"keydown",jc(this,this.handleKeyPress))},b}(vc);vc.registerComponent("ClickableComponent",Xd);var Yd=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.update(),c.on("posterchange",jc(e,e.update)),e}return Lb(b,a),b.prototype.dispose=function(){this.player().off("posterchange",this.update),a.prototype.dispose.call(this)},b.prototype.createEl=function(){var a=p("div",{className:"vjs-poster",tabIndex:-1});return Hb||(this.fallbackImg_=p("img"),a.appendChild(this.fallbackImg_)),a},b.prototype.update=function(a){var b=this.player().poster();this.setSrc(b),b?this.show():this.hide()},b.prototype.setSrc=function(a){if(this.fallbackImg_)this.fallbackImg_.src=a;else{var b="";a&&(b='url("'+a+'")'),this.el_.style.backgroundImage=b}},b.prototype.handleClick=function(a){this.player_.controls()&&(this.player_.paused()?this.player_.play():this.player_.pause())},b}(Xd);vc.registerComponent("PosterImage",Yd);var Zd="#222",$d="#ccc",_d={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'},ae=function(a){function b(c,d,e){Kb(this,b);var f=Mb(this,a.call(this,c,d,e));return c.on("loadstart",jc(f,f.toggleDisplay)),c.on("texttrackchange",jc(f,f.updateDisplay)),c.on("loadstart",jc(f,f.preselectTrack)),c.ready(jc(f,function(){if(c.tech_&&c.tech_.featuresNativeTextTracks)return void this.hide();c.on("fullscreenchange",jc(this,this.updateDisplay));for(var a=this.options_.playerOptions.tracks||[],b=0;b<a.length;b++)this.player_.addRemoteTextTrack(a[b],!0);this.preselectTrack()})),f}return Lb(b,a),b.prototype.preselectTrack=function(){for(var a={captions:1,subtitles:1},b=this.player_.textTracks(),c=this.player_.cache_.selectedLanguage,d=void 0,e=void 0,f=void 0,g=0;g<b.length;g++){var h=b[g];c&&c.enabled&&c.language===h.language?h.kind===c.kind?f=h:f||(f=h):c&&!c.enabled?(f=null,d=null,e=null):h["default"]&&("descriptions"!==h.kind||d?h.kind in a&&!e&&(e=h):d=h)}f?f.mode="showing":e?e.mode="showing":d&&(d.mode="showing")},b.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},b.prototype.clearDisplay=function(){"function"==typeof gb.WebVTT&&gb.WebVTT.processCues(gb,[],this.el_)},b.prototype.updateDisplay=function(){var a=this.player_.textTracks();this.clearDisplay();for(var b=null,c=null,d=a.length;d--;){var e=a[d];"showing"===e.mode&&("descriptions"===e.kind?b=e:c=e)}c?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(c)):b&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(b))},b.prototype.updateForTrack=function(a){if("function"==typeof gb.WebVTT&&a.activeCues){for(var b=this.player_.textTrackSettings.getValues(),c=[],d=0;d<a.activeCues.length;d++)c.push(a.activeCues[d]);gb.WebVTT.processCues(gb,c,this.el_);for(var e=c.length;e--;){var f=c[e];if(f){var g=f.displayState;if(b.color&&(g.firstChild.style.color=b.color),b.textOpacity&&Ya(g.firstChild,"color",Xa(b.color||"#fff",b.textOpacity)),b.backgroundColor&&(g.firstChild.style.backgroundColor=b.backgroundColor),b.backgroundOpacity&&Ya(g.firstChild,"backgroundColor",Xa(b.backgroundColor||"#000",b.backgroundOpacity)),b.windowColor&&(b.windowOpacity?Ya(g,"backgroundColor",Xa(b.windowColor,b.windowOpacity)):g.style.backgroundColor=b.windowColor),b.edgeStyle&&("dropshadow"===b.edgeStyle?g.firstChild.style.textShadow="2px 2px 3px "+Zd+", 2px 2px 4px "+Zd+", 2px 2px 5px "+Zd:"raised"===b.edgeStyle?g.firstChild.style.textShadow="1px 1px "+Zd+", 2px 2px "+Zd+", 3px 3px "+Zd:"depressed"===b.edgeStyle?g.firstChild.style.textShadow="1px 1px "+$d+", 0 1px "+$d+", -1px -1px "+Zd+", 0 -1px "+Zd:"uniform"===b.edgeStyle&&(g.firstChild.style.textShadow="0 0 4px "+Zd+", 0 0 4px "+Zd+", 0 0 4px "+Zd+", 0 0 4px "+Zd)),b.fontPercent&&1!==b.fontPercent){var h=gb.parseFloat(g.style.fontSize);g.style.fontSize=h*b.fontPercent+"px",g.style.height="auto",g.style.top="auto",g.style.bottom="2px"}b.fontFamily&&"default"!==b.fontFamily&&("small-caps"===b.fontFamily?g.firstChild.style.fontVariant="small-caps":g.firstChild.style.fontFamily=_d[b.fontFamily])}}}},b}(vc);vc.registerComponent("TextTrackDisplay",ae);var be=function(a){function b(){return Kb(this,b),Mb(this,a.apply(this,arguments))}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},b}(vc);vc.registerComponent("LoadingSpinner",be);var ce=function(a){function b(){return Kb(this,b),Mb(this,a.apply(this,arguments))}return Lb(b,a),b.prototype.createEl=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};a="button",b=d({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},b),c=d({type:"button","aria-live":"polite"},c);var e=vc.prototype.createEl.call(this,a,b,c);return this.createControlTextEl(e),e},b.prototype.addChild=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=this.constructor.name;return Ub.warn("Adding an actionable (user controllable) child to a Button ("+c+") is not supported; use a ClickableComponent instead."),vc.prototype.addChild.call(this,a,b)},b.prototype.enable=function(){a.prototype.enable.call(this),this.el_.removeAttribute("disabled")},b.prototype.disable=function(){a.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},b.prototype.handleKeyPress=function(b){32!==b.which&&13!==b.which&&a.prototype.handleKeyPress.call(this,b)},b}(Xd);vc.registerComponent("Button",ce);var de=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.mouseused_=!1,e.on("mousedown",e.handleMouseDown),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-big-play-button"},b.prototype.handleClick=function(a){var b=this.player_.play();if(!(this.mouseused_&&a.clientX&&a.clientY)){var c=this.player_.getChild("controlBar"),d=c&&c.getChild("playToggle");if(!d)return void this.player_.focus();var e=function(){return d.focus()};if(b&&b.then){var f=function(){};b.then(e,f)}else this.setTimeout(e,1)}},b.prototype.handleKeyPress=function(b){this.mouseused_=!1,a.prototype.handleKeyPress.call(this,b)},b.prototype.handleMouseDown=function(a){this.mouseused_=!0},b}(ce);de.prototype.controlText_="Play Video",vc.registerComponent("BigPlayButton",de);var ee=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.controlText(d&&d.controlText||e.localize("Close")),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-close-button "+a.prototype.buildCSSClass.call(this)},b.prototype.handleClick=function(a){this.trigger({type:"close",bubbles:!1})},b}(ce);vc.registerComponent("CloseButton",ee);var fe=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.on(c,"play",e.handlePlay),e.on(c,"pause",e.handlePause),e.on(c,"ended",e.handleEnded),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-play-control "+a.prototype.buildCSSClass.call(this)},b.prototype.handleClick=function(a){this.player_.paused()?this.player_.play():this.player_.pause()},b.prototype.handleSeeked=function(a){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(a):this.handlePlay(a)},b.prototype.handlePlay=function(a){this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},b.prototype.handlePause=function(a){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},b.prototype.handleEnded=function(a){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},b}(ce);fe.prototype.controlText_="Play",vc.registerComponent("PlayToggle",fe);var ge=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.throttledUpdateContent=kc(jc(e,e.updateContent),25),e.on(c,"timeupdate",e.throttledUpdateContent),e}return Lb(b,a),b.prototype.createEl=function(b){var c=this.buildCSSClass(),d=a.prototype.createEl.call(this,"div",{className:c+" vjs-time-control vjs-control"});return this.contentEl_=p("div",{className:c+"-display"},{"aria-live":"off"},p("span",{className:"vjs-control-text",textContent:this.localize(this.contentText_)})),this.updateTextNode_(),d.appendChild(this.contentEl_),d},b.prototype.updateTextNode_=function(){this.textNode_&&this.contentEl_.removeChild(this.textNode_),this.textNode_=lb.createTextNode(this.formattedTime_||"0:00"),this.contentEl_.appendChild(this.textNode_)},b.prototype.formatTime_=function(a){return Za(a)},b.prototype.updateFormattedTime_=function(a){var b=this.formatTime_(a);b!==this.formattedTime_&&(this.formattedTime_=b,this.requestAnimationFrame(this.updateTextNode_))},b.prototype.updateContent=function(a){},b}(vc);ge.prototype.controlText_="Time",vc.registerComponent("TimeDisplay",ge);
|
|
var he=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.on(c,"ended",e.handleEnded),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-current-time"},b.prototype.updateContent=function(a){var b=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(b)},b.prototype.handleEnded=function(a){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},b}(ge);he.prototype.controlText_="Current Time",vc.registerComponent("CurrentTimeDisplay",he);var ie=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.on(c,["durationchange","loadedmetadata"],e.throttledUpdateContent),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-duration"},b.prototype.updateContent=function(a){var b=this.player_.duration();b&&this.duration_!==b&&(this.duration_=b,this.updateFormattedTime_(b))},b}(ge);ie.prototype.controlText_="Duration Time",vc.registerComponent("DurationDisplay",ie);var je=function(a){function b(){return Kb(this,b),Mb(this,a.apply(this,arguments))}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},b}(vc);vc.registerComponent("TimeDivider",je);var ke=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.on(c,"durationchange",e.throttledUpdateContent),e.on(c,"ended",e.handleEnded),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-remaining-time"},b.prototype.formatTime_=function(b){return"-"+a.prototype.formatTime_.call(this,b)},b.prototype.updateContent=function(a){this.player_.duration()&&this.updateFormattedTime_(this.player_.remainingTimeDisplay())},b.prototype.handleEnded=function(a){this.player_.duration()&&this.updateFormattedTime_(0)},b}(ge);ke.prototype.controlText_="Remaining Time",vc.registerComponent("RemainingTimeDisplay",ke);var le=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.updateShowing(),e.on(e.player(),"durationchange",e.updateShowing),e}return Lb(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=p("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+"</span>"+this.localize("LIVE")},{"aria-live":"off"}),b.appendChild(this.contentEl_),b},b.prototype.updateShowing=function(a){this.player().duration()===1/0?this.show():this.hide()},b}(vc);vc.registerComponent("LiveDisplay",le);var me=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.bar=e.getChild(e.options_.barName),e.vertical(!!e.options_.vertical),e.on("mousedown",e.handleMouseDown),e.on("touchstart",e.handleMouseDown),e.on("focus",e.handleFocus),e.on("blur",e.handleBlur),e.on("click",e.handleClick),e.on(c,"controlsvisible",e.update),e.playerEvent&&e.on(c,e.playerEvent,e.update),e}return Lb(b,a),b.prototype.createEl=function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return c.className=c.className+" vjs-slider",c=d({tabIndex:0},c),e=d({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},e),a.prototype.createEl.call(this,b,c,e)},b.prototype.handleMouseDown=function(a){var b=this.bar.el_.ownerDocument;a.preventDefault(),B(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(b,"mousemove",this.handleMouseMove),this.on(b,"mouseup",this.handleMouseUp),this.on(b,"touchmove",this.handleMouseMove),this.on(b,"touchend",this.handleMouseUp),this.handleMouseMove(a)},b.prototype.handleMouseMove=function(a){},b.prototype.handleMouseUp=function(){var a=this.bar.el_.ownerDocument;C(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(a,"mousemove",this.handleMouseMove),this.off(a,"mouseup",this.handleMouseUp),this.off(a,"touchmove",this.handleMouseMove),this.off(a,"touchend",this.handleMouseUp),this.update()},b.prototype.update=function(){if(this.el_){var a=this.getPercent(),b=this.bar;if(b){("number"!=typeof a||a!==a||a<0||a===1/0)&&(a=0);var c=(100*a).toFixed(2)+"%",d=b.el().style;return this.vertical()?d.height=c:d.width=c,a}}},b.prototype.calculateDistance=function(a){var b=F(this.el_,a);return this.vertical()?b.y:b.x},b.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},b.prototype.handleKeyPress=function(a){37===a.which||40===a.which?(a.preventDefault(),this.stepBack()):38!==a.which&&39!==a.which||(a.preventDefault(),this.stepForward())},b.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},b.prototype.handleClick=function(a){a.stopImmediatePropagation(),a.preventDefault()},b.prototype.vertical=function(a){return void 0===a?this.vertical_||!1:(this.vertical_=!!a,void(this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")))},b}(vc);vc.registerComponent("Slider",me);var ne=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.partEls_=[],e.on(c,"progress",e.update),e}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"</span>: 0%</span>"})},b.prototype.update=function(a){var b=this.player_.buffered(),c=this.player_.duration(),d=this.player_.bufferedEnd(),e=this.partEls_,f=function(a,b){var c=a/b||0;return 100*(c>=1?1:c)+"%"};this.el_.style.width=f(d,c);for(var g=0;g<b.length;g++){var h=b.start(g),i=b.end(g),j=e[g];j||(j=this.el_.appendChild(p()),e[g]=j),j.style.left=f(h,d),j.style.width=f(i-h,d)}for(var k=e.length;k>b.length;k--)this.el_.removeChild(e[k-1]);e.length=b.length},b}(vc);vc.registerComponent("LoadProgressBar",ne);var oe=function(a){function b(){return Kb(this,b),Mb(this,a.apply(this,arguments))}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},b.prototype.update=function(a,b,c){var d=D(this.el_),e=D(this.player_.el()),f=a.width*b;if(e&&d){var g=a.left-e.left+f,h=a.width-f+(e.right-a.right),i=d.width/2;g<i?i+=i-g:h<i&&(i=h),i<0?i=0:i>d.width&&(i=d.width),this.el_.style.right="-"+i+"px",q(this.el_,c)}},b}(vc);vc.registerComponent("TimeTooltip",oe);var pe=function(a){function b(){return Kb(this,b),Mb(this,a.apply(this,arguments))}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"})},b.prototype.update=function(a,b){var c=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var d=c.player_.scrubbing()?c.player_.getCache().currentTime:c.player_.currentTime(),e=Za(d,c.player_.duration()),f=c.getChild("timeTooltip");f&&f.update(a,b,e)})},b}(vc);pe.prototype.options_={children:[]},Db&&!(Db>8)||sb||ub||pe.prototype.options_.children.push("timeTooltip"),vc.registerComponent("PlayProgressBar",pe);var qe=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.update=kc(jc(e,e.update),25),e}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},b.prototype.update=function(a,b){var c=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var d=c.player_.duration(),e=Za(b*d,d);c.el_.style.left=a.width*b+"px",c.getChild("timeTooltip").update(a,b,e)})},b}(vc);qe.prototype.options_={children:["timeTooltip"]},vc.registerComponent("MouseTimeDisplay",qe);var re=5,se=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.update=kc(jc(e,e.update),50),e.on(c,["timeupdate","ended"],e.update),e}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},b.prototype.update=function(){var b=a.prototype.update.call(this),c=this.player_.duration(),d=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();return this.el_.setAttribute("aria-valuenow",(100*b).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Za(d,c),Za(c,c)],"{1} of {2}")),this.bar.update(D(this.el_),b),b},b.prototype.getPercent=function(){var a=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),b=a/this.player_.duration();return b>=1?1:b},b.prototype.handleMouseDown=function(b){this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),a.prototype.handleMouseDown.call(this,b)},b.prototype.handleMouseMove=function(a){var b=this.calculateDistance(a)*this.player_.duration();b===this.player_.duration()&&(b-=.1),this.player_.currentTime(b)},b.prototype.handleMouseUp=function(b){a.prototype.handleMouseUp.call(this,b),this.player_.scrubbing(!1),this.videoWasPlaying&&this.player_.play()},b.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+re)},b.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-re)},b.prototype.handleAction=function(a){this.player_.paused()?this.player_.play():this.player_.pause()},b.prototype.handleKeyPress=function(b){32===b.which||13===b.which?(b.preventDefault(),this.handleAction(b)):a.prototype.handleKeyPress&&a.prototype.handleKeyPress.call(this,b)},b}(me);se.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Db&&!(Db>8)||sb||ub||se.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),se.prototype.playerEvent="timeupdate",vc.registerComponent("SeekBar",se);var te=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.handleMouseMove=kc(jc(e,e.handleMouseMove),25),e.on(e.el_,"mousemove",e.handleMouseMove),e.throttledHandleMouseSeek=kc(jc(e,e.handleMouseSeek),25),e.on(["mousedown","touchstart"],e.handleMouseDown),e}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},b.prototype.handleMouseMove=function(a){var b=this.getChild("seekBar"),c=b.getChild("mouseTimeDisplay"),d=b.el(),e=D(d),f=F(d,a).x;f>1?f=1:f<0&&(f=0),c&&c.update(e,f)},b.prototype.handleMouseSeek=function(a){var b=this.getChild("seekBar");b.handleMouseMove(a)},b.prototype.handleMouseDown=function(a){var b=this.el_.ownerDocument;this.on(b,"mousemove",this.throttledHandleMouseSeek),this.on(b,"touchmove",this.throttledHandleMouseSeek),this.on(b,"mouseup",this.handleMouseUp),this.on(b,"touchend",this.handleMouseUp)},b.prototype.handleMouseUp=function(a){var b=this.el_.ownerDocument;this.off(b,"mousemove",this.throttledHandleMouseSeek),this.off(b,"touchmove",this.throttledHandleMouseSeek),this.off(b,"mouseup",this.handleMouseUp),this.off(b,"touchend",this.handleMouseUp)},b}(vc);te.prototype.options_={children:["seekBar"]},vc.registerComponent("ProgressControl",te);var ue=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.on(c,"fullscreenchange",e.handleFullscreenChange),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+a.prototype.buildCSSClass.call(this)},b.prototype.handleFullscreenChange=function(a){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},b.prototype.handleClick=function(a){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},b}(ce);ue.prototype.controlText_="Fullscreen",vc.registerComponent("FullscreenToggle",ue);var ve=function(a,b){b.tech_&&!b.tech_.featuresVolumeControl&&a.addClass("vjs-hidden"),a.on(b,"loadstart",function(){b.tech_.featuresVolumeControl?a.removeClass("vjs-hidden"):a.addClass("vjs-hidden")})},we=function(a){function b(){return Kb(this,b),Mb(this,a.apply(this,arguments))}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},b}(vc);vc.registerComponent("VolumeLevel",we);var xe=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.on("slideractive",e.updateLastVolume_),e.on(c,"volumechange",e.updateARIAAttributes),c.ready(function(){return e.updateARIAAttributes()}),e}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},b.prototype.handleMouseMove=function(a){this.checkMuted(),this.player_.volume(this.calculateDistance(a))},b.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},b.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},b.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},b.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},b.prototype.updateARIAAttributes=function(a){var b=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",b),this.el_.setAttribute("aria-valuetext",b+"%")},b.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},b.prototype.updateLastVolume_=function(){var a=this,b=this.player_.volume();this.one("sliderinactive",function(){0===a.player_.volume()&&a.player_.lastVolume_(b)})},b}(me);xe.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},xe.prototype.playerEvent="volumechange",vc.registerComponent("VolumeBar",xe);var ye=function(a){function b(c){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Kb(this,b),d.vertical=d.vertical||!1,("undefined"==typeof d.volumeBar||f(d.volumeBar))&&(d.volumeBar=d.volumeBar||{},d.volumeBar.vertical=d.vertical);var e=Mb(this,a.call(this,c,d));return ve(e,c),e.throttledHandleMouseMove=kc(jc(e,e.handleMouseMove),25),e.on("mousedown",e.handleMouseDown),e.on("touchstart",e.handleMouseDown),e.on(e.volumeBar,["focus","slideractive"],function(){e.volumeBar.addClass("vjs-slider-active"),e.addClass("vjs-slider-active"),e.trigger("slideractive")}),e.on(e.volumeBar,["blur","sliderinactive"],function(){e.volumeBar.removeClass("vjs-slider-active"),e.removeClass("vjs-slider-active"),e.trigger("sliderinactive")}),e}return Lb(b,a),b.prototype.createEl=function(){var b="vjs-volume-horizontal";return this.options_.vertical&&(b="vjs-volume-vertical"),a.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+b})},b.prototype.handleMouseDown=function(a){var b=this.el_.ownerDocument;this.on(b,"mousemove",this.throttledHandleMouseMove),this.on(b,"touchmove",this.throttledHandleMouseMove),this.on(b,"mouseup",this.handleMouseUp),this.on(b,"touchend",this.handleMouseUp)},b.prototype.handleMouseUp=function(a){var b=this.el_.ownerDocument;this.off(b,"mousemove",this.throttledHandleMouseMove),this.off(b,"touchmove",this.throttledHandleMouseMove),this.off(b,"mouseup",this.handleMouseUp),this.off(b,"touchend",this.handleMouseUp)},b.prototype.handleMouseMove=function(a){this.volumeBar.handleMouseMove(a)},b}(vc);ye.prototype.options_={children:["volumeBar"]},vc.registerComponent("VolumeControl",ye);var ze=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return ve(e,c),e.on(c,["loadstart","volumechange"],e.update),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-mute-control "+a.prototype.buildCSSClass.call(this)},b.prototype.handleClick=function(a){var b=this.player_.volume(),c=this.player_.lastVolume_();if(0===b){var d=c<.1?.1:c;this.player_.volume(d),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},b.prototype.update=function(a){this.updateIcon_(),this.updateControlText_()},b.prototype.updateIcon_=function(){var a=this.player_.volume(),b=3;0===a||this.player_.muted()?b=0:a<.33?b=1:a<.67&&(b=2);for(var c=0;c<4;c++)u(this.el_,"vjs-vol-"+c);t(this.el_,"vjs-vol-"+b)},b.prototype.updateControlText_=function(){var a=this.player_.muted()||0===this.player_.volume(),b=a?"Unmute":"Mute";this.controlText()!==b&&this.controlText(b)},b}(ce);ze.prototype.controlText_="Mute",vc.registerComponent("MuteToggle",ze);var Ae=function(a){function b(c){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Kb(this,b),"undefined"!=typeof d.inline?d.inline=d.inline:d.inline=!0,("undefined"==typeof d.volumeControl||f(d.volumeControl))&&(d.volumeControl=d.volumeControl||{},d.volumeControl.vertical=!d.inline);var e=Mb(this,a.call(this,c,d));return ve(e,c),e.on(e.volumeControl,["slideractive"],e.sliderActive_),e.on(e.muteToggle,"focus",e.sliderActive_),e.on(e.volumeControl,["sliderinactive"],e.sliderInactive_),e.on(e.muteToggle,"blur",e.sliderInactive_),e}return Lb(b,a),b.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},b.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},b.prototype.createEl=function(){var b="vjs-volume-panel-horizontal";return this.options_.inline||(b="vjs-volume-panel-vertical"),a.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+b})},b}(vc);Ae.prototype.options_={children:["muteToggle","volumeControl"]},vc.registerComponent("VolumePanel",Ae);var Be=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return d&&(e.menuButton_=d.menuButton),e.focusedChild_=-1,e.on("keydown",e.handleKeyPress),e}return Lb(b,a),b.prototype.addItem=function(a){this.addChild(a),a.on("click",jc(this,function(b){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==a.name()&&this.menuButton_.focus())}))},b.prototype.createEl=function(){var b=this.options_.contentElType||"ul";this.contentEl_=p(b,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var c=a.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return c.appendChild(this.contentEl_),S(c,"click",function(a){a.preventDefault(),a.stopImmediatePropagation()}),c},b.prototype.handleKeyPress=function(a){37===a.which||40===a.which?(a.preventDefault(),this.stepForward()):38!==a.which&&39!==a.which||(a.preventDefault(),this.stepBack())},b.prototype.stepForward=function(){var a=0;void 0!==this.focusedChild_&&(a=this.focusedChild_+1),this.focus(a)},b.prototype.stepBack=function(){var a=0;void 0!==this.focusedChild_&&(a=this.focusedChild_-1),this.focus(a)},b.prototype.focus=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,b=this.children().slice(),c=b.length&&b[0].className&&/vjs-menu-title/.test(b[0].className);c&&b.shift(),b.length>0&&(a<0?a=0:a>=b.length&&(a=b.length-1),this.focusedChild_=a,b[a].el_.focus())},b}(vc);vc.registerComponent("Menu",Be);var Ce=function(a){function b(c){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Kb(this,b);var e=Mb(this,a.call(this,c,d));e.menuButton_=new ce(c,d),e.menuButton_.controlText(e.controlText_),e.menuButton_.el_.setAttribute("aria-haspopup","true");var f=ce.prototype.buildCSSClass();return e.menuButton_.el_.className=e.buildCSSClass()+" "+f,e.menuButton_.removeClass("vjs-control"),e.addChild(e.menuButton_),e.update(),e.enabled_=!0,e.on(e.menuButton_,"tap",e.handleClick),e.on(e.menuButton_,"click",e.handleClick),e.on(e.menuButton_,"focus",e.handleFocus),e.on(e.menuButton_,"blur",e.handleBlur),e.on("keydown",e.handleSubmenuKeyPress),e}return Lb(b,a),b.prototype.update=function(){var a=this.createMenu();this.menu&&this.removeChild(this.menu),this.menu=a,this.addChild(a),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},b.prototype.createMenu=function(){var a=new Be(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var b=p("li",{className:"vjs-menu-title",innerHTML:Z(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,a.children_.unshift(b),r(b,a.contentEl())}if(this.items=this.createItems(),this.items)for(var c=0;c<this.items.length;c++)a.addItem(this.items[c]);return a},b.prototype.createItems=function(){},b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},b.prototype.buildWrapperCSSClass=function(){var b="vjs-menu-button";b+=this.options_.inline===!0?"-inline":"-popup";var c=ce.prototype.buildCSSClass();return"vjs-menu-button "+b+" "+c+" "+a.prototype.buildCSSClass.call(this)},b.prototype.buildCSSClass=function(){var b="vjs-menu-button";return b+=this.options_.inline===!0?"-inline":"-popup","vjs-menu-button "+b+" "+a.prototype.buildCSSClass.call(this)},b.prototype.controlText=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(a,b)},b.prototype.handleClick=function(a){this.one(this.menu.contentEl(),"mouseleave",jc(this,function(a){this.unpressButton(),this.el_.blur()})),this.buttonPressed_?this.unpressButton():this.pressButton()},b.prototype.focus=function(){this.menuButton_.focus()},b.prototype.blur=function(){this.menuButton_.blur()},b.prototype.handleFocus=function(){S(lb,"keydown",jc(this,this.handleKeyPress))},b.prototype.handleBlur=function(){T(lb,"keydown",jc(this,this.handleKeyPress))},b.prototype.handleKeyPress=function(a){27===a.which||9===a.which?(this.buttonPressed_&&this.unpressButton(),9!==a.which&&(a.preventDefault(),this.menuButton_.el_.focus())):38!==a.which&&40!==a.which||this.buttonPressed_||(this.pressButton(),a.preventDefault())},b.prototype.handleSubmenuKeyPress=function(a){27!==a.which&&9!==a.which||(this.buttonPressed_&&this.unpressButton(),9!==a.which&&(a.preventDefault(),this.menuButton_.el_.focus()))},b.prototype.pressButton=function(){this.enabled_&&(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),sb||n()||this.menu.focus())},b.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},b.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},b.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},b}(vc);vc.registerComponent("MenuButton",Ce);var De=function(a){function b(c,d){Kb(this,b);var e=d.tracks,f=Mb(this,a.call(this,c,d));if(f.items.length<=1&&f.hide(),!e)return Mb(f);var g=jc(f,f.update);return e.addEventListener("removetrack",g),e.addEventListener("addtrack",g),f.player_.on("ready",g),f.player_.on("dispose",function(){e.removeEventListener("removetrack",g),e.removeEventListener("addtrack",g)}),f}return Lb(b,a),b}(Ce);vc.registerComponent("TrackButton",De);var Ee=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.selectable=d.selectable,e.selected(d.selected),e.selectable?e.el_.setAttribute("role","menuitemcheckbox"):e.el_.setAttribute("role","menuitem"),e}return Lb(b,a),b.prototype.createEl=function(b,c,e){return this.nonIconControl=!0,a.prototype.createEl.call(this,"li",d({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},c),e)},b.prototype.handleClick=function(a){this.selected(!0)},b.prototype.selected=function(a){this.selectable&&(a?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected")):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(" ")))},b}(Xd);vc.registerComponent("MenuItem",Ee);var Fe=function(a){function b(c,d){Kb(this,b);var e=d.track,f=c.textTracks();d.label=e.label||e.language||"Unknown",d.selected="showing"===e.mode;var g=Mb(this,a.call(this,c,d));g.track=e;var h=jc(g,g.handleTracksChange),i=jc(g,g.handleSelectedLanguageChange);if(c.on(["loadstart","texttrackchange"],h),f.addEventListener("change",h),f.addEventListener("selectedlanguagechange",i),g.on("dispose",function(){f.removeEventListener("change",h),f.removeEventListener("selectedlanguagechange",i)}),void 0===f.onchange){var j=void 0;g.on(["tap","click"],function(){if("object"!==Jb(gb.Event))try{j=new gb.Event("change")}catch(a){}j||(j=lb.createEvent("Event"),j.initEvent("change",!0,!0)),f.dispatchEvent(j)})}return g}return Lb(b,a),b.prototype.handleClick=function(b){var c=this.track.kind,d=this.track.kinds,e=this.player_.textTracks();if(d||(d=[c]),a.prototype.handleClick.call(this,b),e)for(var f=0;f<e.length;f++){var g=e[f];g===this.track&&d.indexOf(g.kind)>-1?"showing"!==g.mode&&(g.mode="showing"):"disabled"!==g.mode&&(g.mode="disabled")}},b.prototype.handleTracksChange=function(a){this.selected("showing"===this.track.mode)},b.prototype.handleSelectedLanguageChange=function(a){if("showing"===this.track.mode){var b=this.player_.cache_.selectedLanguage;if(b&&b.enabled&&b.language===this.track.language&&b.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},b}(Ee);vc.registerComponent("TextTrackMenuItem",Fe);var Ge=function(a){function b(c,d){Kb(this,b),d.track={player:c,kind:d.kind,kinds:d.kinds,"default":!1,mode:"disabled"},d.kinds||(d.kinds=[d.kind]),d.label?d.track.label=d.label:d.track.label=d.kinds.join(" and ")+" off",d.selectable=!0;var e=Mb(this,a.call(this,c,d));return e.selected(!0),e}return Lb(b,a),b.prototype.handleTracksChange=function(a){for(var b=this.player().textTracks(),c=!0,d=0,e=b.length;d<e;d++){var f=b[d];if(this.options_.kinds.indexOf(f.kind)>-1&&"showing"===f.mode){c=!1;break}}this.selected(c)},b.prototype.handleSelectedLanguageChange=function(a){for(var b=this.player().textTracks(),c=!0,d=0,e=b.length;d<e;d++){var f=b[d];if(["captions","descriptions","subtitles"].indexOf(f.kind)>-1&&"showing"===f.mode){c=!1;break}}c&&(this.player_.cache_.selectedLanguage={enabled:!1})},b}(Fe);vc.registerComponent("OffTextTrackMenuItem",Ge);var He=function(a){function b(c){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Kb(this,b),d.tracks=c.textTracks(),Mb(this,a.call(this,c,d))}return Lb(b,a),b.prototype.createItems=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fe,c=void 0;this.label_&&(c=this.label_+" off"),a.push(new Ge(this.player_,{kinds:this.kinds_,kind:this.kind_,label:c})),this.hideThreshold_+=1;var d=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var e=0;e<d.length;e++){var f=d[e];if(this.kinds_.indexOf(f.kind)>-1){var g=new b(this.player_,{track:f,selectable:!0});g.addClass("vjs-"+f.kind+"-menu-item"),a.push(g)}}return a},b}(De);vc.registerComponent("TextTrackButton",He);var Ie=function(a){function b(c,d){Kb(this,b);var e=d.track,f=d.cue,g=c.currentTime();d.selectable=!0,d.label=f.text,d.selected=f.startTime<=g&&g<f.endTime;var h=Mb(this,a.call(this,c,d));return h.track=e,h.cue=f,e.addEventListener("cuechange",jc(h,h.update)),h}return Lb(b,a),b.prototype.handleClick=function(b){a.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},b.prototype.update=function(a){var b=this.cue,c=this.player_.currentTime();this.selected(b.startTime<=c&&c<b.endTime)},b}(Ee);vc.registerComponent("ChaptersTrackMenuItem",Ie);var Je=function(a){function b(c,d,e){return Kb(this,b),Mb(this,a.call(this,c,d,e))}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-chapters-button "+a.prototype.buildCSSClass.call(this)},b.prototype.buildWrapperCSSClass=function(){return"vjs-chapters-button "+a.prototype.buildWrapperCSSClass.call(this)},b.prototype.update=function(b){this.track_&&(!b||"addtrack"!==b.type&&"removetrack"!==b.type)||this.setTrack(this.findChaptersTrack()),a.prototype.update.call(this)},b.prototype.setTrack=function(a){if(this.track_!==a){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var b=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);b&&b.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=a,this.track_){this.track_.mode="hidden";var c=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);c&&c.addEventListener("load",this.updateHandler_)}}},b.prototype.findChaptersTrack=function(){for(var a=this.player_.textTracks()||[],b=a.length-1;b>=0;b--){var c=a[b];if(c.kind===this.kind_)return c}},b.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Z(this.kind_))},b.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),a.prototype.createMenu.call(this)},b.prototype.createItems=function(){var a=[];if(!this.track_)return a;var b=this.track_.cues;if(!b)return a;for(var c=0,d=b.length;c<d;c++){var e=b[c],f=new Ie(this.player_,{track:this.track_,cue:e});a.push(f)}return a},b}(He);Je.prototype.kind_="chapters",Je.prototype.controlText_="Chapters",vc.registerComponent("ChaptersButton",Je);var Ke=function(a){function b(c,d,e){Kb(this,b);var f=Mb(this,a.call(this,c,d,e)),g=c.textTracks(),h=jc(f,f.handleTracksChange);return g.addEventListener("change",h),f.on("dispose",function(){g.removeEventListener("change",h)}),f}return Lb(b,a),b.prototype.handleTracksChange=function(a){for(var b=this.player().textTracks(),c=!1,d=0,e=b.length;d<e;d++){var f=b[d];if(f.kind!==this.kind_&&"showing"===f.mode){c=!0;break}}c?this.disable():this.enable()},b.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+a.prototype.buildCSSClass.call(this)},b.prototype.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+a.prototype.buildWrapperCSSClass.call(this)},b}(He);Ke.prototype.kind_="descriptions",Ke.prototype.controlText_="Descriptions",vc.registerComponent("DescriptionsButton",Ke);var Le=function(a){function b(c,d,e){return Kb(this,b),Mb(this,a.call(this,c,d,e))}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+a.prototype.buildCSSClass.call(this)},b.prototype.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+a.prototype.buildWrapperCSSClass.call(this)},b}(He);Le.prototype.kind_="subtitles",Le.prototype.controlText_="Subtitles",vc.registerComponent("SubtitlesButton",Le);var Me=function(a){function b(c,d){Kb(this,b),d.track={player:c,kind:d.kind,label:d.kind+" settings",selectable:!1,"default":!1,mode:"disabled"},d.selectable=!1,d.name="CaptionSettingsMenuItem";var e=Mb(this,a.call(this,c,d));return e.addClass("vjs-texttrack-settings"),e.controlText(", opens "+d.kind+" settings dialog"),e}return Lb(b,a),b.prototype.handleClick=function(a){this.player().getChild("textTrackSettings").open()},b}(Fe);vc.registerComponent("CaptionSettingsMenuItem",Me);var Ne=function(a){function b(c,d,e){return Kb(this,b),Mb(this,a.call(this,c,d,e))}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-captions-button "+a.prototype.buildCSSClass.call(this)},b.prototype.buildWrapperCSSClass=function(){return"vjs-captions-button "+a.prototype.buildWrapperCSSClass.call(this)},b.prototype.createItems=function(){var b=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||(b.push(new Me(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),a.prototype.createItems.call(this,b)},b}(He);Ne.prototype.kind_="captions",Ne.prototype.controlText_="Captions",vc.registerComponent("CaptionsButton",Ne);var Oe=function(a){function b(){return Kb(this,b),Mb(this,a.apply(this,arguments))}return Lb(b,a),b.prototype.createEl=function(b,c,e){var f='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);
|
|
"captions"===this.options_.track.kind&&(f+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),f+="</span>";var g=a.prototype.createEl.call(this,b,d({innerHTML:f},c),e);return g},b}(Fe);vc.registerComponent("SubsCapsMenuItem",Oe);var Pe=function(a){function b(c){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(e.player_.language_)>-1&&(e.label_="captions"),e.menuButton_.controlText(Z(e.label_)),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+a.prototype.buildCSSClass.call(this)},b.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+a.prototype.buildWrapperCSSClass.call(this)},b.prototype.createItems=function(){var b=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||(b.push(new Me(this.player_,{kind:this.label_})),this.hideThreshold_+=1),b=a.prototype.createItems.call(this,b,Oe)},b}(He);Pe.prototype.kinds_=["captions","subtitles"],Pe.prototype.controlText_="Subtitles",vc.registerComponent("SubsCapsButton",Pe);var Qe=function(a){function b(c,d){Kb(this,b);var e=d.track,f=c.audioTracks();d.label=e.label||e.language||"Unknown",d.selected=e.enabled;var g=Mb(this,a.call(this,c,d));g.track=e;var h=jc(g,g.handleTracksChange);return f.addEventListener("change",h),g.on("dispose",function(){f.removeEventListener("change",h)}),g}return Lb(b,a),b.prototype.handleClick=function(b){var c=this.player_.audioTracks();a.prototype.handleClick.call(this,b);for(var d=0;d<c.length;d++){var e=c[d];e.enabled=e===this.track}},b.prototype.handleTracksChange=function(a){this.selected(this.track.enabled)},b}(Ee);vc.registerComponent("AudioTrackMenuItem",Qe);var Re=function(a){function b(c){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Kb(this,b),d.tracks=c.audioTracks(),Mb(this,a.call(this,c,d))}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-audio-button "+a.prototype.buildCSSClass.call(this)},b.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+a.prototype.buildWrapperCSSClass.call(this)},b.prototype.createItems=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;for(var b=this.player_.audioTracks(),c=0;c<b.length;c++){var d=b[c];a.push(new Qe(this.player_,{track:d,selectable:!0}))}return a},b}(De);Re.prototype.controlText_="Audio Track",vc.registerComponent("AudioTrackButton",Re);var Se=function(a){function b(c,d){Kb(this,b);var e=d.rate,f=parseFloat(e,10);d.label=e,d.selected=1===f,d.selectable=!0;var g=Mb(this,a.call(this,c,d));return g.label=e,g.rate=f,g.on(c,"ratechange",g.update),g}return Lb(b,a),b.prototype.handleClick=function(b){a.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},b.prototype.update=function(a){this.selected(this.player().playbackRate()===this.rate)},b}(Ee);Se.prototype.contentElType="button",vc.registerComponent("PlaybackRateMenuItem",Se);var Te=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.updateVisibility(),e.updateLabel(),e.on(c,"loadstart",e.updateVisibility),e.on(c,"ratechange",e.updateLabel),e}return Lb(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this);return this.labelEl_=p("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),b.appendChild(this.labelEl_),b},b.prototype.buildCSSClass=function(){return"vjs-playback-rate "+a.prototype.buildCSSClass.call(this)},b.prototype.buildWrapperCSSClass=function(){return"vjs-playback-rate "+a.prototype.buildWrapperCSSClass.call(this)},b.prototype.createMenu=function(){var a=new Be(this.player()),b=this.playbackRates();if(b)for(var c=b.length-1;c>=0;c--)a.addChild(new Se(this.player(),{rate:b[c]+"x"}));return a},b.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},b.prototype.handleClick=function(a){for(var b=this.player().playbackRate(),c=this.playbackRates(),d=c[0],e=0;e<c.length;e++)if(c[e]>b){d=c[e];break}this.player().playbackRate(d)},b.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},b.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},b.prototype.updateVisibility=function(a){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},b.prototype.updateLabel=function(a){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},b}(Ce);Te.prototype.controlText_="Playback Rate",vc.registerComponent("PlaybackRateMenuButton",Te);var Ue=function(a){function b(){return Kb(this,b),Mb(this,a.apply(this,arguments))}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-spacer "+a.prototype.buildCSSClass.call(this)},b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},b}(vc);vc.registerComponent("Spacer",Ue);var Ve=function(a){function b(){return Kb(this,b),Mb(this,a.apply(this,arguments))}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+a.prototype.buildCSSClass.call(this)},b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,{className:this.buildCSSClass()});return b.innerHTML=" ",b},b}(Ue);vc.registerComponent("CustomControlSpacer",Ve);var We=function(a){function b(){return Kb(this,b),Mb(this,a.apply(this,arguments))}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},b}(vc);We.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},vc.registerComponent("ControlBar",We);var Xe=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.on(c,"error",e.open),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-error-display "+a.prototype.buildCSSClass.call(this)},b.prototype.content=function(){var a=this.player().error();return a?this.localize(a.message):""},b}(Kc);Xe.prototype.options_=_(Kc.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),vc.registerComponent("ErrorDisplay",Xe);var Ye="vjs-text-track-settings",Ze=["#000","Black"],$e=["#00F","Blue"],_e=["#0FF","Cyan"],af=["#0F0","Green"],bf=["#F0F","Magenta"],cf=["#F00","Red"],df=["#FFF","White"],ef=["#FF0","Yellow"],ff=["1","Opaque"],gf=["0.5","Semi-Transparent"],hf=["0","Transparent"],jf={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Ze,df,cf,af,$e,ef,bf,_e]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[ff,gf,hf]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[df,Ze,cf,af,$e,ef,bf,_e]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],"default":2,parser:function(a){return"1.00"===a?null:Number(a)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[ff,gf]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[hf,gf,ff]}};jf.windowColor.options=jf.backgroundColor.options;var kf=function(a){function d(c,e){Kb(this,d),e.temporary=!1;var f=Mb(this,a.call(this,c,e));return f.updateDisplay=jc(f,f.updateDisplay),f.fill(),f.hasBeenOpened_=f.hasBeenFilled_=!0,f.endDialog=p("p",{className:"vjs-control-text",textContent:f.localize("End of dialog window.")}),f.el().appendChild(f.endDialog),f.setDefaults(),void 0===e.persistTextTrackSettings&&(f.options_.persistTextTrackSettings=f.options_.playerOptions.persistTextTrackSettings),f.on(f.$(".vjs-done-button"),"click",function(){f.saveSettings(),f.close()}),f.on(f.$(".vjs-default-button"),"click",function(){f.setDefaults(),f.updateDisplay()}),b(jf,function(a){f.on(f.$(a.selector),"change",f.updateDisplay)}),f.options_.persistTextTrackSettings&&f.restoreSettings(),f}return Lb(d,a),d.prototype.createElSelect_=function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"label",e=jf[a],f=e.id.replace("%s",this.id_);return["<"+d+' id="'+f+'" class="'+("label"===d?"vjs-label":"")+'">',this.localize(e.label),"</"+d+">",'<select aria-labelledby="'+c+" "+f+'">'].concat(e.options.map(function(a){var d=f+"-"+a[1];return['<option id="'+d+'" value="'+a[0]+'" ','aria-labelledby="'+c+" "+f+" "+d+'">',b.localize(a[1]),"</option>"].join("")})).concat("</select>").join("")},d.prototype.createElFgColor_=function(){var a="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+a+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",a),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",a),"</span>","</fieldset>"].join("")},d.prototype.createElBgColor_=function(){var a="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+a+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",a),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",a),"</span>","</fieldset>"].join("")},d.prototype.createElWinColor_=function(){var a="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+a+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",a),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",a),"</span>","</fieldset>"].join("")},d.prototype.createElColors_=function(){return p("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},d.prototype.createElFont_=function(){return p("div",{className:'vjs-track-settings-font">',innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},d.prototype.createElControls_=function(){var a=this.localize("restore all settings to the default values");return p("div",{className:"vjs-track-settings-controls",innerHTML:['<button class="vjs-default-button" title="'+a+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+a+"</span>","</button>",'<button class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},d.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},d.prototype.label=function(){return this.localize("Caption Settings Dialog")},d.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},d.prototype.buildCSSClass=function(){return a.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},d.prototype.getValues=function(){var a=this;return c(jf,function(b,c,d){var e=_a(a.$(c.selector),c.parser);return void 0!==e&&(b[d]=e),b},{})},d.prototype.setValues=function(a){var c=this;b(jf,function(b,d){ab(c.$(b.selector),a[d],b.parser)})},d.prototype.setDefaults=function(){var a=this;b(jf,function(b){var c=b.hasOwnProperty("default")?b["default"]:0;a.$(b.selector).selectedIndex=c})},d.prototype.restoreSettings=function(){var a=void 0;try{a=JSON.parse(gb.localStorage.getItem(Ye))}catch(b){Ub.warn(b)}a&&this.setValues(a)},d.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var a=this.getValues();try{Object.keys(a).length?gb.localStorage.setItem(Ye,JSON.stringify(a)):gb.localStorage.removeItem(Ye)}catch(b){Ub.warn(b)}}},d.prototype.updateDisplay=function(){var a=this.player_.getChild("textTrackDisplay");a&&a.updateDisplay()},d.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(lb,"keydown",this.handleKeyDown);var a=this.player_.controlBar,b=a&&a.subsCapsButton,c=a&&a.captionsButton;b?b.focus():c&&c.focus()},d}(Kc);vc.registerComponent("TextTrackSettings",kf);var lf=Nb(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."],["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."]),mf=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d)),f=c.source,g=!1;if(f&&(e.el_.currentSrc!==f.src||c.tag&&3===c.tag.initNetworkState_)?e.setSource(f):e.handleLateInit_(e.el_),e.el_.hasChildNodes()){for(var h=e.el_.childNodes,i=h.length,j=[];i--;){var k=h[i],l=k.nodeName.toLowerCase();"track"===l&&(e.featuresNativeTextTracks?(e.remoteTextTrackEls().addTrackElement_(k),e.remoteTextTracks().addTrack(k.track),e.textTracks().addTrack(k.track),g||e.el_.hasAttribute("crossorigin")||!ad(k.src)||(g=!0)):j.push(k))}for(var m=0;m<j.length;m++)e.el_.removeChild(j[m])}return e.proxyNativeTracks_(),e.featuresNativeTextTracks&&g&&Ub.warn(Vb(lf)),e.restoreMetadataTracksInIOSNativePlayer_(),(Gb||qb||xb)&&c.nativeControlsForTouch===!0&&e.setControls(!0),e.proxyWebkitFullscreen_(),e.triggerReady(),e}return Lb(b,a),b.prototype.dispose=function(){b.disposeMediaElement(this.el_),a.prototype.dispose.call(this)},b.prototype.restoreMetadataTracksInIOSNativePlayer_=function(){var a=this.textTracks(),b=void 0,c=function(){b=[];for(var c=0;c<a.length;c++){var d=a[c];"metadata"===d.kind&&b.push({track:d,storedMode:d.mode})}};c(),a.addEventListener("change",c);var d=function e(){for(var c=0;c<b.length;c++){var d=b[c];"disabled"===d.track.mode&&d.track.mode!==d.storedMode&&(d.track.mode=d.storedMode)}a.removeEventListener("change",e)};this.on("webkitbeginfullscreen",function(){a.removeEventListener("change",c),a.removeEventListener("change",d),a.addEventListener("change",d)}),this.on("webkitendfullscreen",function(){a.removeEventListener("change",c),a.addEventListener("change",c),a.removeEventListener("change",d)})},b.prototype.proxyNativeTracks_=function(){var a=this;xd.names.forEach(function(b){var c=xd[b],d=a.el()[c.getterName],e=a[c.getterName]();if(a["featuresNative"+c.capitalName+"Tracks"]&&d&&d.addEventListener){var f={change:function(a){e.trigger({type:"change",target:e,currentTarget:e,srcElement:e})},addtrack:function(a){e.addTrack(a.track)},removetrack:function(a){e.removeTrack(a.track)}},g=function(){for(var a=[],b=0;b<e.length;b++){for(var c=!1,f=0;f<d.length;f++)if(d[f]===e[b]){c=!0;break}c||a.push(e[b])}for(;a.length;)e.removeTrack(a.shift())};Object.keys(f).forEach(function(b){var c=f[b];d.addEventListener(b,c),a.on("dispose",function(a){return d.removeEventListener(b,c)})}),a.on("loadstart",g),a.on("dispose",function(b){return a.off("loadstart",g)})}})},b.prototype.createEl=function(){var a=this.options_.tag;if(!a||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(a){var c=a.cloneNode(!0);a.parentNode&&a.parentNode.insertBefore(c,a),b.disposeMediaElement(a),a=c}else{a=lb.createElement("video");var e=this.options_.tag&&x(this.options_.tag),f=_({},e);Gb&&this.options_.nativeControlsForTouch===!0||delete f.controls,w(a,d(f,{id:this.options_.techId,"class":"vjs-tech"}))}a.playerId=this.options_.playerId}"undefined"!=typeof this.options_.preload&&z(a,"preload",this.options_.preload);for(var g=["loop","muted","playsinline","autoplay"],h=g.length-1;h>=0;h--){var i=g[h],j=this.options_[i];"undefined"!=typeof j&&(j?z(a,i,i):A(a,i),a[i]=j)}return a},b.prototype.handleLateInit_=function(a){if(0!==a.networkState&&3!==a.networkState){if(0===a.readyState){var b=!1,c=function(){b=!0};this.on("loadstart",c);var d=function(){b||this.trigger("loadstart")};return this.on("loadedmetadata",d),void this.ready(function(){this.off("loadstart",c),this.off("loadedmetadata",d),b||this.trigger("loadstart")})}var e=["loadstart"];e.push("loadedmetadata"),a.readyState>=2&&e.push("loadeddata"),a.readyState>=3&&e.push("canplay"),a.readyState>=4&&e.push("canplaythrough"),this.ready(function(){e.forEach(function(a){this.trigger(a)},this)})}},b.prototype.setCurrentTime=function(a){try{this.el_.currentTime=a}catch(b){Ub(b,"Video is not ready. (Video.js)")}},b.prototype.duration=function(){var a=this;if(this.el_.duration===1/0&&ub&&Ab&&0===this.el_.currentTime){var b=function c(){a.el_.currentTime>0&&(a.el_.duration===1/0&&a.trigger("durationchange"),a.off("timeupdate",c))};return this.on("timeupdate",b),NaN}return this.el_.duration||NaN},b.prototype.width=function(){return this.el_.offsetWidth},b.prototype.height=function(){return this.el_.offsetHeight},b.prototype.proxyWebkitFullscreen_=function(){var a=this;if("webkitDisplayingFullscreen"in this.el_){var b=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},c=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",b),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",c),this.on("dispose",function(){a.off("webkitbeginfullscreen",c),a.off("webkitendfullscreen",b)})}},b.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var a=gb.navigator&&gb.navigator.userAgent||"";if(/Android/.test(a)||!/Chrome|Mac OS X 10.5/.test(a))return!0}return!1},b.prototype.enterFullScreen=function(){var a=this.el_;a.paused&&a.networkState<=a.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){a.pause(),a.webkitEnterFullScreen()},0)):a.webkitEnterFullScreen()},b.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},b.prototype.src=function(a){return void 0===a?this.el_.src:void this.setSrc(a)},b.prototype.reset=function(){b.resetMediaElement(this.el_)},b.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},b.prototype.setControls=function(a){this.el_.controls=!!a},b.prototype.addTextTrack=function(b,c,d){return this.featuresNativeTextTracks?this.el_.addTextTrack(b,c,d):a.prototype.addTextTrack.call(this,b,c,d)},b.prototype.createRemoteTextTrack=function(b){if(!this.featuresNativeTextTracks)return a.prototype.createRemoteTextTrack.call(this,b);var c=lb.createElement("track");return b.kind&&(c.kind=b.kind),b.label&&(c.label=b.label),(b.language||b.srclang)&&(c.srclang=b.language||b.srclang),b["default"]&&(c["default"]=b["default"]),b.id&&(c.id=b.id),b.src&&(c.src=b.src),c},b.prototype.addRemoteTextTrack=function(b,c){var d=a.prototype.addRemoteTextTrack.call(this,b,c);return this.featuresNativeTextTracks&&this.el().appendChild(d),d},b.prototype.removeRemoteTextTrack=function(b){if(a.prototype.removeRemoteTextTrack.call(this,b),this.featuresNativeTextTracks)for(var c=this.$$("track"),d=c.length;d--;)b!==c[d]&&b!==c[d].track||this.el().removeChild(c[d])},b.prototype.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var a={};return"undefined"!=typeof this.el().webkitDroppedFrameCount&&"undefined"!=typeof this.el().webkitDecodedFrameCount&&(a.droppedVideoFrames=this.el().webkitDroppedFrameCount,a.totalVideoFrames=this.el().webkitDecodedFrameCount),gb.performance&&"function"==typeof gb.performance.now?a.creationTime=gb.performance.now():gb.performance&&gb.performance.timing&&"number"==typeof gb.performance.timing.navigationStart&&(a.creationTime=gb.Date.now()-gb.performance.timing.navigationStart),a},b}(Rd);if(l()){mf.TEST_VID=lb.createElement("video");var nf=lb.createElement("track");nf.kind="captions",nf.srclang="en",nf.label="English",mf.TEST_VID.appendChild(nf)}mf.isSupported=function(){try{mf.TEST_VID.volume=.5}catch(a){return!1}return!(!mf.TEST_VID||!mf.TEST_VID.canPlayType)},mf.canPlayType=function(a){return mf.TEST_VID.canPlayType(a)},mf.canPlaySource=function(a,b){return mf.canPlayType(a.type)},mf.canControlVolume=function(){try{var a=mf.TEST_VID.volume;return mf.TEST_VID.volume=a/2+.1,a!==mf.TEST_VID.volume}catch(b){return!1}},mf.canControlPlaybackRate=function(){if(ub&&Ab&&Bb<58)return!1;try{var a=mf.TEST_VID.playbackRate;return mf.TEST_VID.playbackRate=a/2+.1,a!==mf.TEST_VID.playbackRate}catch(b){return!1}},mf.supportsNativeTextTracks=function(){return Fb},mf.supportsNativeVideoTracks=function(){return!(!mf.TEST_VID||!mf.TEST_VID.videoTracks)},mf.supportsNativeAudioTracks=function(){return!(!mf.TEST_VID||!mf.TEST_VID.audioTracks)},mf.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],mf.prototype.featuresVolumeControl=mf.canControlVolume(),mf.prototype.featuresPlaybackRate=mf.canControlPlaybackRate(),mf.prototype.movingMediaElementInDOM=!sb,mf.prototype.featuresFullscreenResize=!0,mf.prototype.featuresProgressEvents=!0,mf.prototype.featuresTimeupdateEvents=!0,mf.prototype.featuresNativeTextTracks=mf.supportsNativeTextTracks(),mf.prototype.featuresNativeVideoTracks=mf.supportsNativeVideoTracks(),mf.prototype.featuresNativeAudioTracks=mf.supportsNativeAudioTracks();var of=mf.TEST_VID&&mf.TEST_VID.constructor.prototype.canPlayType,pf=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,qf=/^video\/mp4/i;mf.patchCanPlayType=function(){vb>=4&&!yb?mf.TEST_VID.constructor.prototype.canPlayType=function(a){return a&&pf.test(a)?"maybe":of.call(this,a)}:wb&&(mf.TEST_VID.constructor.prototype.canPlayType=function(a){return a&&qf.test(a)?"maybe":of.call(this,a)})},mf.unpatchCanPlayType=function(){var a=mf.TEST_VID.constructor.prototype.canPlayType;return mf.TEST_VID.constructor.prototype.canPlayType=of,a},mf.patchCanPlayType(),mf.disposeMediaElement=function(a){if(a){for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("src"),"function"==typeof a.load&&!function(){try{a.load()}catch(b){}}()}},mf.resetMediaElement=function(a){if(a){for(var b=a.querySelectorAll("source"),c=b.length;c--;)a.removeChild(b[c]);a.removeAttribute("src"),"function"==typeof a.load&&!function(){try{a.load()}catch(b){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(a){mf.prototype[a]=function(){return this.el_[a]||this.el_.hasAttribute(a)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(a){mf.prototype["set"+Z(a)]=function(b){this.el_[a]=b,b?this.el_.setAttribute(a,a):this.el_.removeAttribute(a)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(a){mf.prototype[a]=function(){return this.el_[a]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(a){mf.prototype["set"+Z(a)]=function(b){this.el_[a]=b}}),["pause","load","play"].forEach(function(a){mf.prototype[a]=function(){return this.el_[a]()}}),Rd.withSourceHandlers(mf),mf.nativeSourceHandler={},mf.nativeSourceHandler.canPlayType=function(a){try{return mf.TEST_VID.canPlayType(a)}catch(b){return""}},mf.nativeSourceHandler.canHandleSource=function(a,b){if(a.type)return mf.nativeSourceHandler.canPlayType(a.type);if(a.src){var c=_c(a.src);return mf.nativeSourceHandler.canPlayType("video/"+c)}return""},mf.nativeSourceHandler.handleSource=function(a,b,c){b.setSrc(a.src)},mf.nativeSourceHandler.dispose=function(){},mf.registerSourceHandler(mf.nativeSourceHandler),Rd.registerTech("Html5",mf);var rf=Nb(["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "],["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "]),sf=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","resize","volumechange","texttrackchange"],tf=function(a){function b(c,e,f){if(Kb(this,b),c.id=c.id||"vjs_video_"+L(),e=d(b.getTagSettings(c),e),e.initChildren=!1,e.createEl=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof c.closest){var g=c.closest("[lang]");g&&(e.language=g.getAttribute("lang"))}else for(var h=c;h&&1===h.nodeType;){if(x(h).hasOwnProperty("lang")){e.language=h.getAttribute("lang");break}h=h.parentNode}var i=Mb(this,a.call(this,null,e,f));if(i.isReady_=!1,!i.options_||!i.options_.techOrder||!i.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(i.tag=c,i.tagAttributes=c&&x(c),i.language(i.options_.language),e.languages){var j={};Object.getOwnPropertyNames(e.languages).forEach(function(a){j[a.toLowerCase()]=e.languages[a]}),i.languages_=j}else i.languages_=b.prototype.options_.languages;i.cache_={},i.poster_=e.poster||"",i.controls_=!!e.controls,i.cache_.lastVolume=1,c.controls=!1,i.scrubbing_=!1,i.el_=i.createEl(),X(i,{eventBusKey:"el_"});var k=_(i.options_);if(e.plugins){var l=e.plugins;Object.keys(l).forEach(function(a){if("function"!=typeof this[a])throw new Error('plugin "'+a+'" does not exist');this[a](l[a])},i)}i.options_.playerOptions=k,i.middleware_=[],i.initChildren(),i.isAudio("audio"===c.nodeName.toLowerCase()),i.controls()?i.addClass("vjs-controls-enabled"):i.addClass("vjs-controls-disabled"),i.el_.setAttribute("role","region"),i.isAudio()?i.el_.setAttribute("aria-label",i.localize("Audio Player")):i.el_.setAttribute("aria-label",i.localize("Video Player")),i.isAudio()&&i.addClass("vjs-audio"),i.flexNotSupported_()&&i.addClass("vjs-no-flex"),sb||i.addClass("vjs-workinghover"),b.players[i.id_]=i;var m=db.split(".")[0];return i.addClass("vjs-v"+m),i.userActive(!0),i.reportUserActivity(),i.listenForUserActivity_(),i.on("fullscreenchange",i.handleFullscreenChange_),i.on("stageclick",i.handleStageClick_),i.changingSrc_=!1,i}return Lb(b,a),b.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&this.styleEl_.parentNode.removeChild(this.styleEl_),b.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&this.tech_.dispose(),a.prototype.dispose.call(this)},b.prototype.createEl=function(){var b=this.tag,c=void 0,d=this.playerElIngest_=b.parentNode&&b.parentNode.hasAttribute&&b.parentNode.hasAttribute("data-vjs-player");c=d?this.el_=b.parentNode:this.el_=a.prototype.createEl.call(this,"div"),b.setAttribute("tabindex","-1"),b.removeAttribute("width"),b.removeAttribute("height");var e=x(b);if(Object.getOwnPropertyNames(e).forEach(function(a){"class"===a?c.className+=" "+e[a]:c.setAttribute(a,e[a])}),b.playerId=b.id,b.id+="_html5_api",b.className="vjs-tech",b.player=c.player=this,this.addClass("vjs-paused"),gb.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=hc("vjs-styles-dimensions");var f=Xb(".vjs-styles-defaults"),g=Xb("head");g.insertBefore(this.styleEl_,f?f.nextSibling:g.firstChild)}this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var h=b.getElementsByTagName("a"),i=0;i<h.length;i++){var j=h.item(i);t(j,"vjs-hidden"),j.setAttribute("hidden","hidden")}return b.initNetworkState_=b.networkState,b.parentNode&&!d&&b.parentNode.insertBefore(c,b),r(b,c),this.children_.unshift(b),this.el_.setAttribute("lang",this.language_),this.el_=c,c},b.prototype.width=function(a){return this.dimension("width",a)},b.prototype.height=function(a){return this.dimension("height",a)},b.prototype.dimension=function(a,b){var c=a+"_";if(void 0===b)return this[c]||0;if(""===b)this[c]=void 0;else{var d=parseFloat(b);if(isNaN(d))return void Ub.error('Improper value "'+b+'" supplied for for '+a);this[c]=d}this.updateStyleEl_()},b.prototype.fluid=function(a){return void 0===a?!!this.fluid_:(this.fluid_=!!a,a?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),void this.updateStyleEl_())},b.prototype.aspectRatio=function(a){if(void 0===a)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(a))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=a,this.fluid(!0),this.updateStyleEl_()},b.prototype.updateStyleEl_=function(){if(gb.VIDEOJS_NO_DYNAMIC_STYLE===!0){var a="number"==typeof this.width_?this.width_:this.options_.width,b="number"==typeof this.height_?this.height_:this.options_.height,c=this.tech_&&this.tech_.el();return void(c&&(a>=0&&(c.width=a),b>=0&&(c.height=b)))}var d=void 0,e=void 0,f=void 0,g=void 0;f=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";var h=f.split(":"),i=h[1]/h[0];d=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/i:this.videoWidth()||300,e=void 0!==this.height_?this.height_:d*i,g=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(g),ic(this.styleEl_,"\n ."+g+" {\n width: "+d+"px;\n height: "+e+"px;\n }\n\n ."+g+".vjs-fluid {\n padding-top: "+100*i+"%;\n }\n ")},b.prototype.loadTech_=function(a,b){var c=this;this.tech_&&this.unloadTech_();var e=Z(a),f=a.charAt(0).toLowerCase()+a.slice(1);"Html5"!==e&&this.tag&&(Rd.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=e,this.isReady_=!1;var g={source:b,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+e+"_api",autoplay:this.options_.autoplay,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"]};zd.names.forEach(function(a){var b=zd[a];g[b.getterName]=c[b.privateName]}),d(g,this.options_[e]),d(g,this.options_[f]),d(g,this.options_[a.toLowerCase()]),this.tag&&(g.tag=this.tag),b&&b.src===this.cache_.src&&this.cache_.currentTime>0&&(g.startTime=this.cache_.currentTime);var h=Rd.getTech(a);if(!h)throw new Error("No Tech named '"+e+"' exists! '"+e+"' should be registered using videojs.registerTech()'");this.tech_=new h(g),this.tech_.ready(jc(this,this.handleTechReady_),!0),
|
|
Hc.jsonToTextTracks(this.textTracksJson_||[],this.tech_),sf.forEach(function(a){c.on(c.tech_,a,c["handleTech"+Z(a)+"_"])}),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"canplay",this.handleTechCanPlay_),this.on(this.tech_,"canplaythrough",this.handleTechCanPlayThrough_),this.on(this.tech_,"playing",this.handleTechPlaying_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"seeked",this.handleTechSeeked_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===e&&this.tag||r(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},b.prototype.unloadTech_=function(){var a=this;zd.names.forEach(function(b){var c=zd[b];a[c.privateName]=a[c.getterName]()}),this.textTracksJson_=Hc.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1},b.prototype.tech=function(a){return void 0===a&&Ub.warn(Vb(rf)),this.tech_},b.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},b.prototype.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_)},b.prototype.handleTechReady_=function(){if(this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),(this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused())try{delete this.tag.poster}catch(a){Ub("deleting tag.poster throws in some browsers",a)}},b.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},b.prototype.hasStarted=function(a){return void 0!==a?void(this.hasStarted_!==a&&(this.hasStarted_=a,a?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))):!!this.hasStarted_},b.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},b.prototype.handleTechWaiting_=function(){var a=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return a.removeClass("vjs-waiting")})},b.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},b.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},b.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},b.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},b.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},b.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(Ub.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},b.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},b.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},b.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},b.prototype.handleTechClick_=function(a){0===a.button&&this.controls()&&(this.paused()?this.play():this.pause())},b.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},b.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},b.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},b.prototype.handleTechTouchEnd_=function(a){a.preventDefault()},b.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},b.prototype.handleStageClick_=function(){this.reportUserActivity()},b.prototype.handleTechFullscreenChange_=function(a,b){b&&this.isFullscreen(b.isFullscreen),this.trigger("fullscreenchange")},b.prototype.handleTechError_=function(){var a=this.tech_.error();this.error(a)},b.prototype.handleTechTextData_=function(){var a=null;arguments.length>1&&(a=arguments[1]),this.trigger("textdata",a)},b.prototype.getCache=function(){return this.cache_},b.prototype.techCall_=function(a,b){this.ready(function(){if(a in Ud)return Ua(this.middleware_,this.tech_,a,b);try{this.tech_&&this.tech_[a](b)}catch(c){throw Ub(c),c}},!0)},b.prototype.techGet_=function(a){if(this.tech_&&this.tech_.isReady_){if(a in Td)return Ta(this.middleware_,this.tech_,a);try{return this.tech_[a]()}catch(b){throw void 0===this.tech_[a]?Ub("Video.js: "+a+" method not defined for "+this.techName_+" playback technology.",b):"TypeError"===b.name?(Ub("Video.js: "+a+" unavailable on "+this.techName_+" playback technology element.",b),this.tech_.isReady_=!1):Ub(b),b}}},b.prototype.play=function(){if(this.changingSrc_)this.ready(function(){var a=this.techGet_("play");void 0!==a&&"function"==typeof a.then&&a.then(null,function(a){})});else{if(this.isReady_&&(this.src()||this.currentSrc()))return this.techGet_("play");this.ready(function(){this.tech_.one("loadstart",function(){var a=this.play();void 0!==a&&"function"==typeof a.then&&a.then(null,function(a){})})})}},b.prototype.pause=function(){this.techCall_("pause")},b.prototype.paused=function(){return this.techGet_("paused")!==!1},b.prototype.played=function(){return this.techGet_("played")||da(0,0)},b.prototype.scrubbing=function(a){return"undefined"==typeof a?this.scrubbing_:(this.scrubbing_=!!a,void(a?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")))},b.prototype.currentTime=function(a){return"undefined"!=typeof a?void this.techCall_("setCurrentTime",a):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},b.prototype.duration=function(a){return void 0===a?void 0!==this.cache_.duration?this.cache_.duration:NaN:(a=parseFloat(a),a<0&&(a=1/0),void(a!==this.cache_.duration&&(this.cache_.duration=a,a===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))))},b.prototype.remainingTime=function(){return this.duration()-this.currentTime()},b.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},b.prototype.buffered=function c(){var c=this.techGet_("buffered");return c&&c.length||(c=da(0,0)),c},b.prototype.bufferedPercent=function(){return ea(this.buffered(),this.duration())},b.prototype.bufferedEnd=function(){var a=this.buffered(),b=this.duration(),c=a.end(a.length-1);return c>b&&(c=b),c},b.prototype.volume=function(a){var b=void 0;return void 0!==a?(b=Math.max(0,Math.min(1,parseFloat(a))),this.cache_.volume=b,this.techCall_("setVolume",b),void(b>0&&this.lastVolume_(b))):(b=parseFloat(this.techGet_("volume")),isNaN(b)?1:b)},b.prototype.muted=function(a){return void 0!==a?void this.techCall_("setMuted",a):this.techGet_("muted")||!1},b.prototype.defaultMuted=function(a){return void 0!==a?this.techCall_("setDefaultMuted",a):this.techGet_("defaultMuted")||!1},b.prototype.lastVolume_=function(a){return void 0!==a&&0!==a?void(this.cache_.lastVolume=a):this.cache_.lastVolume},b.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},b.prototype.isFullscreen=function(a){return void 0!==a?void(this.isFullscreen_=!!a):!!this.isFullscreen_},b.prototype.requestFullscreen=function(){var a=wc;this.isFullscreen(!0),a.requestFullscreen?(S(lb,a.fullscreenchange,jc(this,function b(c){this.isFullscreen(lb[a.fullscreenElement]),this.isFullscreen()===!1&&T(lb,a.fullscreenchange,b),this.trigger("fullscreenchange")})),this.el_[a.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},b.prototype.exitFullscreen=function(){var a=wc;this.isFullscreen(!1),a.requestFullscreen?lb[a.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},b.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=lb.documentElement.style.overflow,S(lb,"keydown",jc(this,this.fullWindowOnEscKey)),lb.documentElement.style.overflow="hidden",t(lb.body,"vjs-full-window"),this.trigger("enterFullWindow")},b.prototype.fullWindowOnEscKey=function(a){27===a.keyCode&&(this.isFullscreen()===!0?this.exitFullscreen():this.exitFullWindow())},b.prototype.exitFullWindow=function(){this.isFullWindow=!1,T(lb,"keydown",this.fullWindowOnEscKey),lb.documentElement.style.overflow=this.docOrigOverflow,u(lb.body,"vjs-full-window"),this.trigger("exitFullWindow")},b.prototype.canPlayType=function(a){for(var b=void 0,c=0,d=this.options_.techOrder;c<d.length;c++){var e=d[c],f=Rd.getTech(e);if(f||(f=vc.getComponent(e)),f){if(f.isSupported()&&(b=f.canPlayType(a)))return b}else Ub.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.')}return""},b.prototype.selectSource=function(a){var b=this,c=this.options_.techOrder.map(function(a){return[a,Rd.getTech(a)]}).filter(function(a){var b=a[0],c=a[1];return c?c.isSupported():(Ub.error('The "'+b+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),d=function(a,b,c){var d=void 0;return a.some(function(a){return b.some(function(b){if(d=c(a,b))return!0})}),d},e=void 0,f=function(a){return function(b,c){return a(c,b)}},g=function(a,c){var d=a[0],e=a[1];if(e.canPlaySource(c,b.options_[d.toLowerCase()]))return{source:c,tech:d}};return e=this.options_.sourceOrder?d(a,c,f(g)):d(c,a,g),e||!1},b.prototype.src=function(a){var b=this;if("undefined"==typeof a)return this.cache_.src;var c=Vd(a);return c.length?(this.cache_.sources=c,this.changingSrc_=!0,this.cache_.source=c[0],void Ra(this,c[0],function(a,d){b.middleware_=d;var e=b.src_(a);return e?c.length>1?b.src(c.slice(1)):(b.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void b.triggerReady()):(b.changingSrc_=!1,b.cache_.src=a.src,void Sa(d,b.tech_))})):void this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},b.prototype.src_=function(a){var b=this.selectSource([a]);return!b||($(b.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",a):this.techCall_("src",a.src),"auto"===this.options_.preload&&this.load()},!0),!1):(this.changingSrc_=!0,this.loadTech_(b.tech,b.source),!1))},b.prototype.load=function(){this.techCall_("load")},b.prototype.reset=function(){this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},b.prototype.currentSources=function(){var a=this.currentSource(),b=[];return 0!==Object.keys(a).length&&b.push(a),this.cache_.sources||b},b.prototype.currentSource=function(){return this.cache_.source||{}},b.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},b.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},b.prototype.preload=function(a){return void 0!==a?(this.techCall_("setPreload",a),void(this.options_.preload=a)):this.techGet_("preload")},b.prototype.autoplay=function(a){return void 0!==a?(this.techCall_("setAutoplay",a),void(this.options_.autoplay=a)):this.techGet_("autoplay",a)},b.prototype.playsinline=function(a){return void 0!==a?(this.techCall_("setPlaysinline",a),this.options_.playsinline=a,this):this.techGet_("playsinline")},b.prototype.loop=function(a){return void 0!==a?(this.techCall_("setLoop",a),void(this.options_.loop=a)):this.techGet_("loop")},b.prototype.poster=function(a){return void 0===a?this.poster_:(a||(a=""),this.poster_=a,this.techCall_("setPoster",a),void this.trigger("posterchange"))},b.prototype.handleTechPosterChange_=function(){!this.poster_&&this.tech_&&this.tech_.poster&&(this.poster_=this.tech_.poster()||"",this.trigger("posterchange"))},b.prototype.controls=function(a){return void 0!==a?(a=!!a,void(this.controls_!==a&&(this.controls_=a,this.usingNativeControls()&&this.techCall_("setControls",a),a?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_())))):!!this.controls_},b.prototype.usingNativeControls=function(a){return void 0!==a?(a=!!a,void(this.usingNativeControls_!==a&&(this.usingNativeControls_=a,a?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))))):!!this.usingNativeControls_},b.prototype.error=function(a){return void 0===a?this.error_||null:null===a?(this.error_=a,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new fa(a),this.addClass("vjs-error"),Ub.error("(CODE:"+this.error_.code+" "+fa.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},b.prototype.reportUserActivity=function(a){this.userActivity_=!0},b.prototype.userActive=function(a){return void 0!==a?(a=!!a,void(a!==this.userActive_&&(this.userActive_=a,a?(this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.userActivity_=!1,this.tech_&&this.tech_.one("mousemove",function(a){a.stopPropagation(),a.preventDefault()}),this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive"))))):this.userActive_},b.prototype.listenForUserActivity_=function(){var a=void 0,b=void 0,c=void 0,d=jc(this,this.reportUserActivity),e=function(a){a.screenX===b&&a.screenY===c||(b=a.screenX,c=a.screenY,d())},f=function(){d(),this.clearInterval(a),a=this.setInterval(d,250)},g=function(b){d(),this.clearInterval(a)};this.on("mousedown",f),this.on("mousemove",e),this.on("mouseup",g),this.on("keydown",d),this.on("keyup",d);var h=void 0;this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(h);var a=this.options_.inactivityTimeout;a>0&&(h=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},a))}},250)},b.prototype.playbackRate=function(a){return void 0!==a?void this.techCall_("setPlaybackRate",a):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("playbackRate"):1},b.prototype.defaultPlaybackRate=function(a){return void 0!==a?this.techCall_("setDefaultPlaybackRate",a):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},b.prototype.isAudio=function(a){return void 0!==a?void(this.isAudio_=!!a):!!this.isAudio_},b.prototype.addTextTrack=function(a,b,c){if(this.tech_)return this.tech_.addTextTrack(a,b,c)},b.prototype.addRemoteTextTrack=function(a,b){if(this.tech_)return this.tech_.addRemoteTextTrack(a,b)},b.prototype.removeRemoteTextTrack=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=a.track,c=void 0===b?arguments[0]:b;if(this.tech_)return this.tech_.removeRemoteTextTrack(c)},b.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},b.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},b.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},b.prototype.language=function(a){return void 0===a?this.language_:void(this.language_=String(a).toLowerCase())},b.prototype.languages=function(){return _(b.prototype.options_.languages,this.languages_)},b.prototype.toJSON=function(){var a=_(this.options_),b=a.tracks;a.tracks=[];for(var c=0;c<b.length;c++){var d=b[c];d=_(d),d.player=void 0,a.tracks[c]=d}return a},b.prototype.createModal=function(a,b){var c=this;b=b||{},b.content=a||"";var d=new Kc(this,b);return this.addChild(d),d.on("dispose",function(){c.removeChild(d)}),d.open(),d},b.getTagSettings=function(a){var b={sources:[],tracks:[]},c=x(a),e=c["data-setup"];if(s(a,"vjs-fluid")&&(c.fluid=!0),null!==e){var f=Dc(e||"{}"),g=f[0],h=f[1];g&&Ub.error(g),d(c,h)}if(d(b,c),a.hasChildNodes())for(var i=a.childNodes,j=0,k=i.length;j<k;j++){var l=i[j],m=l.nodeName.toLowerCase();"source"===m?b.sources.push(x(l)):"track"===m&&b.tracks.push(x(l))}return b},b.prototype.flexNotSupported_=function(){var a=lb.createElement("i");return!("flexBasis"in a.style||"webkitFlexBasis"in a.style||"mozFlexBasis"in a.style||"msFlexBasis"in a.style||"msFlexOrder"in a.style)},b}(vc);zd.names.forEach(function(a){var b=zd[a];tf.prototype[b.getterName]=function(){return this.tech_?this.tech_[b.getterName]():(this[b.privateName]=this[b.privateName]||new b.ListClass,this[b.privateName])}}),tf.players={};var uf=gb.navigator;tf.prototype.options_={techOrder:Rd.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:uf&&(uf.languages&&uf.languages[0]||uf.userLanguage||uf.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media."},["ended","seeking","seekable","networkState","readyState"].forEach(function(a){tf.prototype[a]=function(){return this.techGet_(a)}}),sf.forEach(function(a){tf.prototype["handleTech"+Z(a)+"_"]=function(){return this.trigger(a)}}),vc.registerComponent("Player",tf);var vf="plugin",wf="activePlugins_",xf={},yf=function(a){return xf.hasOwnProperty(a)},zf=function(a){return yf(a)?xf[a]:void 0},Af=function(a,b){a[wf]=a[wf]||{},a[wf][b]=!0},Bf=function(a,b,c){var d=(c?"before":"")+"pluginsetup";a.trigger(d,b),a.trigger(d+":"+b.name,b)},Cf=function(a,b){var c=function(){Bf(this,{name:a,plugin:b,instance:null},!0);var c=b.apply(this,arguments);return Af(this,a),Bf(this,{name:a,plugin:b,instance:c}),c};return Object.keys(b).forEach(function(a){c[a]=b[a]}),c},Df=function(a,b){return b.prototype.name=a,function(){Bf(this,{name:a,plugin:b,instance:null},!0);for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];var f=new(Function.prototype.bind.apply(b,[null].concat([this].concat(d))));return this[a]=function(){return f},Bf(this,f.getEventHash()),f}},Ef=function(){function a(b){if(Kb(this,a),this.constructor===a)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=b,X(this),delete this.trigger,Y(this,this.constructor.defaultState),Af(b,this.name),this.dispose=jc(this,this.dispose),b.on("dispose",this.dispose)}return a.prototype.getEventHash=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a.name=this.name,a.plugin=this.constructor,a.instance=this,a},a.prototype.trigger=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return U(this.eventBusEl_,a,this.getEventHash(b))},a.prototype.handleStateChanged=function(a){},a.prototype.dispose=function(){var a=this.name,b=this.player;this.trigger("dispose"),this.off(),b.off("dispose",this.dispose),b[wf][a]=!1,this.player=this.state=null,b[a]=Df(a,xf[a])},a.isBasic=function(b){var c="string"==typeof b?zf(b):b;return"function"==typeof c&&!a.prototype.isPrototypeOf(c.prototype)},a.registerPlugin=function(b,c){if("string"!=typeof b)throw new Error('Illegal plugin name, "'+b+'", must be a string, was '+("undefined"==typeof b?"undefined":Jb(b))+".");if(yf(b))Ub.warn('A plugin named "'+b+'" already exists. You may want to avoid re-registering plugins!');else if(tf.prototype.hasOwnProperty(b))throw new Error('Illegal plugin name, "'+b+'", cannot share a name with an existing player method!');if("function"!=typeof c)throw new Error('Illegal plugin for "'+b+'", must be a function, was '+("undefined"==typeof c?"undefined":Jb(c))+".");return xf[b]=c,b!==vf&&(a.isBasic(c)?tf.prototype[b]=Cf(b,c):tf.prototype[b]=Df(b,c)),c},a.deregisterPlugin=function(a){if(a===vf)throw new Error("Cannot de-register base plugin.");yf(a)&&(delete xf[a],delete tf.prototype[a])},a.getPlugins=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.keys(xf),b=void 0;return a.forEach(function(a){var c=zf(a);c&&(b=b||{},b[a]=c)}),b},a.getPluginVersion=function(a){var b=zf(a);return b&&b.VERSION||""},a}();Ef.getPlugin=zf,Ef.BASE_PLUGIN_NAME=vf,Ef.registerPlugin(vf,Ef),tf.prototype.usingPlugin=function(a){return!!this[wf]&&this[wf][a]===!0},tf.prototype.hasPlugin=function(a){return!!yf(a)};var Ff=function(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof b?"undefined":Jb(b)));a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(a.super_=b)},Gf=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=function(){a.apply(this,arguments)},d={};"object"===("undefined"==typeof b?"undefined":Jb(b))?(b.constructor!==Object.prototype.constructor&&(c=b.constructor),d=b):"function"==typeof b&&(c=b),Ff(c,a);for(var e in d)d.hasOwnProperty(e)&&(c.prototype[e]=d[e]);return c};if("undefined"==typeof HTMLVideoElement&&l()&&(lb.createElement("video"),lb.createElement("audio"),lb.createElement("track")),bb.hooks_={},bb.hooks=function(a,b){return bb.hooks_[a]=bb.hooks_[a]||[],b&&(bb.hooks_[a]=bb.hooks_[a].concat(b)),bb.hooks_[a]},bb.hook=function(a,b){bb.hooks(a,b)},bb.removeHook=function(a,b){var c=bb.hooks(a).indexOf(b);return!(c<=-1)&&(bb.hooks_[a]=bb.hooks_[a].slice(),bb.hooks_[a].splice(c,1),!0)},gb.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&l()){var Hf=Xb(".vjs-styles-defaults");if(!Hf){Hf=hc("vjs-styles-defaults");var If=Xb("head");If&&If.insertBefore(Hf,If.firstChild),ic(Hf,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}return W(1,bb),bb.VERSION=db,bb.options=tf.prototype.options_,bb.getPlayers=function(){return tf.players},bb.players=tf.players,bb.getComponent=vc.getComponent,bb.registerComponent=function(a,b){Rd.isTech(b)&&Ub.warn("The "+a+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),vc.registerComponent.call(vc,a,b)},bb.getTech=Rd.getTech,bb.registerTech=Rd.registerTech,bb.use=Qa,bb.browser=Ib,bb.TOUCH_ENABLED=Gb,bb.extend=Gf,bb.mergeOptions=_,bb.bind=jc,bb.registerPlugin=Ef.registerPlugin,bb.plugin=function(a,b){return Ub.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Ef.registerPlugin(a,b)},bb.getPlugins=Ef.getPlugins,bb.getPlugin=Ef.getPlugin,bb.getPluginVersion=Ef.getPluginVersion,bb.addLanguage=function(a,b){var c;return a=(""+a).toLowerCase(),bb.options.languages=_(bb.options.languages,(c={},c[a]=b,c)),bb.options.languages[a]},bb.log=Ub,bb.createTimeRange=bb.createTimeRanges=da,bb.formatTime=Za,bb.parseUrl=Zc,bb.isCrossOrigin=ad,bb.EventTarget=lc,bb.on=S,bb.one=V,bb.off=T,bb.trigger=U,bb.xhr=md,bb.TextTrack=pd,bb.AudioTrack=qd,bb.VideoTrack=rd,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(a){bb[a]=function(){return Ub.warn("videojs."+a+"() is deprecated; use videojs.dom."+a+"() instead"),Zb[a].apply(null,arguments)}}),bb.computedStyle=h,bb.dom=Zb,bb.url=bd,bb});
|