|
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.videojs=e()}(this,function(){function t(t,e){xe(t).forEach(function(r){return e(t[r],r)})}function e(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return xe(t).reduce(function(r,n){return e(r,t[n],n)},r)}function r(e){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return Object.assign?Object.assign.apply(Object,[e].concat(n)):(n.forEach(function(r){r&&t(r,function(t,r){e[r]=t})}),e)}function n(t){return!!t&&"object"===(void 0===t?"undefined":Te(t))}function o(t){return n(t)&&"[object Object]"===we.call(t)&&t.constructor===Object}function i(t){return t.replace(/\n\r?\s*/g,"")}function s(t,e){if(!t||!e)return"";if("function"==typeof Kt.getComputedStyle){var r=Kt.getComputedStyle(t);return r?r[e]:""}return t.currentStyle[e]||""}function a(t){return"string"==typeof t&&/\S/.test(t)}function l(t){if(/\s/.test(t))throw new Error("class has illegal whitespace characters")}function c(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}function u(){return Jt===Kt.document&&void 0!==Jt.createElement}function h(t){return n(t)&&1===t.nodeType}function p(){try{return Kt.parent!==Kt.self}catch(t){return!0}}function d(t){return function(e,r){if(!a(e))return Jt[t](null);a(r)&&(r=Jt.querySelector(r));var n=h(r)?r:Jt;return n[t]&&n[t](e)}}function f(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments[3],o=Jt.createElement(t);return Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(Me.warn(Ne(Ie,t,r)),o.setAttribute(t,r)):"textContent"===t?v(o,r):o[t]=r}),Object.getOwnPropertyNames(r).forEach(function(t){o.setAttribute(t,r[t])}),n&&I(o,n),o}function v(t,e){return void 0===t.textContent?t.innerText=e:t.textContent=e,t}function y(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function g(t,e){return l(e),t.classList?t.classList.contains(e):c(e).test(t.className)}function m(t,e){return t.classList?t.classList.add(e):g(t,e)||(t.className=(t.className+" "+e).trim()),t}function _(t,e){return t.classList?t.classList.remove(e):(l(e),t.className=t.className.split(/\s+/).filter(function(t){return t!==e}).join(" ")),t}function b(t,e,r){var n=g(t,e);if("function"==typeof r&&(r=r(t,e)),"boolean"!=typeof r&&(r=!n),r!==n)return r?m(t,e):_(t,e),t}function T(t,e){Object.getOwnPropertyNames(e).forEach(function(r){var n=e[r];null===n||void 0===n||!1===n?t.removeAttribute(r):t.setAttribute(r,!0===n?"":n)})}function C(t){var e={};if(t&&t.attributes&&t.attributes.length>0)for(var r=t.attributes,n=r.length-1;n>=0;n--){var o=r[n].name,i=r[n].value;"boolean"!=typeof t[o]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+o+",")||(i=null!==i),e[o]=i}return e}function k(t,e){return t.getAttribute(e)}function E(t,e,r){t.setAttribute(e,r)}function S(t,e){t.removeAttribute(e)}function w(){Jt.body.focus(),Jt.onselectstart=function(){return!1}}function x(){Jt.onselectstart=function(){return!0}}function j(t){if(t&&t.getBoundingClientRect&&t.parentNode){var e=t.getBoundingClientRect(),r={};return["bottom","height","left","right","top","width"].forEach(function(t){void 0!==e[t]&&(r[t]=e[t])}),r.height||(r.height=parseFloat(s(t,"height"))),r.width||(r.width=parseFloat(s(t,"width"))),r}}function P(t){var e=void 0;if(t.getBoundingClientRect&&t.parentNode&&(e=t.getBoundingClientRect()),!e)return{left:0,top:0};var r=Jt.documentElement,n=Jt.body,o=r.clientLeft||n.clientLeft||0,i=Kt.pageXOffset||n.scrollLeft,s=e.left+i-o,a=r.clientTop||n.clientTop||0,l=Kt.pageYOffset||n.scrollTop,c=e.top+l-a;return{left:Math.round(s),top:Math.round(c)}}function A(t,e){var r={},n=P(t),o=t.offsetWidth,i=t.offsetHeight,s=n.top,a=n.left,l=e.pageY,c=e.pageX;return e.changedTouches&&(c=e.changedTouches[0].pageX,l=e.changedTouches[0].pageY),r.y=Math.max(0,Math.min(1,(s-l+i)/i)),r.x=Math.max(0,Math.min(1,(c-a)/o)),r}function O(t){return n(t)&&3===t.nodeType}function M(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function N(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map(function(t){return"function"==typeof t&&(t=t()),h(t)||O(t)?t:"string"==typeof t&&/\S/.test(t)?Jt.createTextNode(t):void 0}).filter(function(t){return t})}function I(t,e){return N(e).forEach(function(e){return t.appendChild(e)}),t}function D(t,e){return I(M(t),e)}function L(t){return void 0===t.button&&void 0===t.buttons||(0===t.button&&void 0===t.buttons||(9===ve||0===t.button&&1===t.buttons))}function R(){return Fe++}function F(t){var e=t[He];return e||(e=t[He]=R()),Be[e]||(Be[e]={}),Be[e]}function B(t){var e=t[He];return!!e&&!!Object.getOwnPropertyNames(Be[e]).length}function H(t){var e=t[He];if(e){delete Be[e];try{delete t[He]}catch(e){t.removeAttribute?t.removeAttribute(He):t[He]=null}}}function V(t,e){var r=F(t);0===r.handlers[e].length&&(delete r.handlers[e],t.removeEventListener?t.removeEventListener(e,r.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,r.dispatcher)),Object.getOwnPropertyNames(r.handlers).length<=0&&(delete r.handlers,delete r.dispatcher,delete r.disabled),0===Object.getOwnPropertyNames(r).length&&H(t)}function z(t,e,r,n){r.forEach(function(r){t(e,r,n)})}function W(t){function e(){return!0}function r(){return!1}if(!t||!t.isPropagationStopped){var n=t||Kt.event;t={};for(var o in n)"layerX"!==o&&"layerY"!==o&&"keyLocation"!==o&&"webkitMovementX"!==o&&"webkitMovementY"!==o&&("returnValue"===o&&n.preventDefault||(t[o]=n[o]));if(t.target||(t.target=t.srcElement||Jt),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){n.preventDefault&&n.preventDefault(),t.returnValue=!1,n.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),t.cancelBubble=!0,n.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=r,t.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=r,null!==t.clientX&&void 0!==t.clientX){var i=Jt.documentElement,s=Jt.body;t.pageX=t.clientX+(i&&i.scrollLeft||s&&s.scrollLeft||0)-(i&&i.clientLeft||s&&s.clientLeft||0),t.pageY=t.clientY+(i&&i.scrollTop||s&&s.scrollTop||0)-(i&&i.clientTop||s&&s.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}function U(t,e,r){if(Array.isArray(e))return z(U,t,e,r);var n=F(t);if(n.handlers||(n.handlers={}),n.handlers[e]||(n.handlers[e]=[]),r.guid||(r.guid=R()),n.handlers[e].push(r),n.dispatcher||(n.disabled=!1,n.dispatcher=function(e,r){if(!n.disabled){e=W(e);var o=n.handlers[e.type];if(o)for(var i=o.slice(0),s=0,a=i.length;s<a&&!e.isImmediatePropagationStopped();s++)try{i[s].call(t,e,r)}catch(t){Me.error(t)}}}),1===n.handlers[e].length)if(t.addEventListener){var o=!1;Ve&&ze.indexOf(e)>-1&&(o={passive:!0}),t.addEventListener(e,n.dispatcher,o)}else t.attachEvent&&t.attachEvent("on"+e,n.dispatcher)}function q(t,e,r){if(B(t)){var n=F(t);if(n.handlers){if(Array.isArray(e))return z(q,t,e,r);var o=function(t,e){n.handlers[e]=[],V(t,e)};if(void 0!==e){var i=n.handlers[e];if(i){if(!r)return void o(t,e);if(r.guid)for(var s=0;s<i.length;s++)i[s].guid===r.guid&&i.splice(s--,1);V(t,e)}}else for(var a in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},a)&&o(t,a)}}}function K(t,e,r){var n=B(t)?F(t):{},o=t.parentNode||t.ownerDocument;if("string"==typeof e?e={type:e,target:t}:e.target||(e.target=t),e=W(e),n.dispatcher&&n.dispatcher.call(t,e,r),o&&!e.isPropagationStopped()&&!0===e.bubbles)K.call(null,o,e,r);else if(!o&&!e.defaultPrevented){var i=F(e.target);e.target[e.type]&&(i.disabled=!0,"function"==typeof e.target[e.type]&&e.target[e.type](),i.disabled=!1)}return!e.defaultPrevented}function X(t,e,r){if(Array.isArray(e))return z(X,t,e,r);var n=function n(){q(t,e,n),r.apply(this,arguments)};n.guid=r.guid=r.guid||R(),U(t,e,n)}function $(t,e){e&&(qe=e),Kt.setTimeout(Ke,t)}function G(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.eventBusKey;if(n){if(!t[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');t.eventBusEl_=t[n]}else t.eventBusEl_=f("span",{className:"vjs-event-bus"});return r(t,sr),t.on("dispose",function(){t.off(),Kt.setTimeout(function(){t.eventBusEl_=null},0)}),t}function Y(t,e){return r(t,ar),t.state=r({},t.state,e),"function"==typeof t.handleStateChanged&&Ze(t)&&t.on("statechanged",t.handleStateChanged),t}function J(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function Q(t,e){return J(t)===J(e)}function Z(){for(var e={},r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return n.forEach(function(r){r&&t(r,function(t,r){if(!o(t))return void(e[r]=t);o(e[r])||(e[r]={}),e[r]=Z(e[r],t)})}),e}function tt(t,e,r){if("number"!=typeof e||e<0||e>r)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+r+").")}function et(t,e,r,n){return tt(t,n,r.length-1),r[n][e]}function rt(t){return void 0===t||0===t.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:t.length,start:et.bind(null,"start",0,t),end:et.bind(null,"end",1,t)}}function nt(t,e){return Array.isArray(t)?rt(t):void 0===t||void 0===e?rt():rt([[t,e]])}function ot(t,e){var r=0,n=void 0,o=void 0;if(!e)return 0;t&&t.length||(t=nt(0,0));for(var i=0;i<t.length;i++)n=t.start(i),o=t.end(i),o>e&&(o=e),r+=o-n;return r/e}function it(t){if(t instanceof it)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:n(t)&&("number"==typeof t.code&&(this.code=t.code),r(this,t)),this.message||(this.message=it.defaultMessages[this.code]||"")}function st(t,e){var r,n=null;try{r=JSON.parse(t,e)}catch(t){n=t}return[n,r]}function at(t){return void 0!==t&&null!==t&&"function"==typeof t.then}function lt(t){at(t)&&t.then(null,function(t){})}function ct(t){var e=Wr.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)}function ut(t,e,r){if(!zr(e))throw new TypeError("iterator must be a function");arguments.length<3&&(r=this),"[object Array]"===Kr.call(t)?ht(t,e,r):"string"==typeof t?pt(t,e,r):dt(t,e,r)}function ht(t,e,r){for(var n=0,o=t.length;n<o;n++)Xr.call(t,n)&&e.call(r,t[n],n,t)}function pt(t,e,r){for(var n=0,o=t.length;n<o;n++)e.call(r,t.charAt(n),n,t)}function dt(t,e,r){for(var n in t)Xr.call(t,n)&&e.call(r,t[n],n,t)}function ft(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var n in r)Jr.call(r,n)&&(t[n]=r[n])}return t}function vt(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}function yt(t,e,r){var n=t;return zr(e)?(r=e,"string"==typeof t&&(n={uri:t})):n=Yr(e,{uri:t}),n.callback=r,n}function gt(t,e,r){return e=yt(t,e,r),mt(e)}function mt(t){function e(){4===a.readyState&&setTimeout(o,0)}function r(){var t=void 0;if(t=a.response?a.response:a.responseText||_t(a),y)try{t=JSON.parse(t)}catch(t){}return t}function n(t){return clearTimeout(u),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,s(t,g)}function o(){if(!c){var e;clearTimeout(u),e=t.useXDR&&void 0===a.status?200:1223===a.status?204:a.status;var n=g,o=null;return 0!==e?(n={body:r(),statusCode:e,method:p,headers:{},url:h,rawRequest:a},a.getAllResponseHeaders&&(n.headers=Gr(a.getAllResponseHeaders()))):o=new Error("Internal XMLHttpRequest Error"),s(o,n,n.body)}}if(void 0===t.callback)throw new Error("callback argument missing");var i=!1,s=function(e,r,n){i||(i=!0,t.callback(e,r,n))},a=t.xhr||null;a||(a=t.cors||t.useXDR?new gt.XDomainRequest:new gt.XMLHttpRequest);var l,c,u,h=a.url=t.uri||t.url,p=a.method=t.method||"GET",d=t.body||t.data,f=a.headers=t.headers||{},v=!!t.sync,y=!1,g={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:a};if("json"in t&&!1!==t.json&&(y=!0,f.accept||f.Accept||(f.Accept="application/json"),"GET"!==p&&"HEAD"!==p&&(f["content-type"]||f["Content-Type"]||(f["Content-Type"]="application/json"),d=JSON.stringify(!0===t.json?d:t.json))),a.onreadystatechange=e,a.onload=o,a.onerror=n,a.onprogress=function(){},a.onabort=function(){c=!0},a.ontimeout=n,a.open(p,h,!v,t.username,t.password),v||(a.withCredentials=!!t.withCredentials),!v&&t.timeout>0&&(u=setTimeout(function(){if(!c){c=!0,a.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",n(t)}},t.timeout)),a.setRequestHeader)for(l in f)f.hasOwnProperty(l)&&a.setRequestHeader(l,f[l]);else if(t.headers&&!vt(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(a.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(a),a.send(d||null),a}function _t(t){if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;return""!==t.responseType||e?null:t.responseXML}function bt(){}function Tt(t,e,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=t.textTracks();o.kind=e,r&&(o.label=r),n&&(o.language=n),o.tech=t;var s=new un.text.TrackClass(o);return i.addTrack(s),s}function Ct(t,e){dn[t]=dn[t]||[],dn[t].push(e)}function kt(t,e,r){t.setTimeout(function(){return Mt(e,dn[e.type],r,t)},1)}function Et(t,e){t.forEach(function(t){return t.setTech&&t.setTech(e)})}function St(t,e,r){return t.reduceRight(jt(r),e[r]())}function wt(t,e,r,n){return e[r](t.reduce(jt(r),n))}function xt(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o="call"+J(r),i=t.reduce(jt(o),n),s=i===vn,a=s?null:e[r](i);return Pt(t,r,a,s),a}function jt(t){return function(e,r){return e===vn?vn:r[t]?r[t](e):e}}function Pt(t,e,r,n){for(var o=t.length-1;o>=0;o--){var i=t[o];i[e]&&i[e](n,r)}}function At(t){fn[t.id()]=null}function Ot(t,e){var r=fn[t.id()],n=null;if(void 0===r||null===r)return n=e(t),fn[t.id()]=[[e,n]],n;for(var o=0;o<r.length;o++){var i=r[o],s=i[0],a=i[1];s===e&&(n=a)}return null===n&&(n=e(t),r.push([e,n])),n}function Mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments[2],o=arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=e[0],l=e.slice(1);if("string"==typeof a)Mt(t,dn[a],n,o,i,s);else if(a){var c=Ot(o,a);if(!c.setSource)return i.push(c),Mt(t,l,n,o,i,s);c.setSource(r({},t),function(e,r){if(e)return Mt(t,l,n,o,i,s);i.push(c),Mt(r,t.type===r.type?l:dn[r.type],n,o,i,s)})}else l.length?Mt(t,l,n,o,i,s):s?n(t,i):Mt(t,dn["*"],n,o,i,!0)}function Nt(t){var e=bn(t.src);return!t.type&&e&&(t.type=e),t}function It(t,e){var r=void 0;if(4===t.length)r=t[1]+t[1]+t[2]+t[2]+t[3]+t[3];else{if(7!==t.length)throw new Error("Invalid color code provided, "+t+"; must be formatted as e.g. #f0e or #f604e2.");r=t.slice(1)}return"rgba("+parseInt(r.slice(0,2),16)+","+parseInt(r.slice(2,4),16)+","+parseInt(r.slice(4,6),16)+","+e+")"}function Dt(t,e,r){try{t.style[e]=r}catch(t){return}}function Lt(t){In=t}function Rt(){In=Nn}function Ft(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}function Bt(t,e){return Ft(t.options[t.options.selectedIndex].value,e)}function Ht(t,e,r){if(e)for(var n=0;n<t.options.length;n++)if(Ft(t.options[n].value,r)===e){t.selectedIndex=n;break}}function Vt(t,e,r){var o=Vt.getPlayer(t);if(o)return e&&Me.warn('Player "'+t+'" is already initialised. Options will not be applied.'),r&&o.ready(r),o;var i="string"==typeof t?De("#"+yi(t)):t;if(!h(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");Jt.body.contains(i)||Me.warn("The element supplied is not included in the DOM"),e=e||{},Vt.hooks("beforesetup").forEach(function(t){var r=t(i,Z(e));if(!n(r)||Array.isArray(r))return void Me.error("please return an object in beforesetup hooks");e=Z(e,r)});var s=lr.getComponent("Player");return o=new s(i,e,r),Vt.hooks("setup").forEach(function(t){return t(o)}),o}var zt,Wt="6.12.1",Ut="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};zt="undefined"!=typeof window?window:void 0!==Ut?Ut:"undefined"!=typeof self?self:{};var qt,Kt=zt,Xt={},$t=(Object.freeze||Object)({default:Xt}),Gt=$t&&Xt||$t,Yt=void 0!==Ut?Ut:"undefined"!=typeof window?window:{};"undefined"!=typeof document?qt=document:(qt=Yt["__GLOBAL_DOCUMENT_CACHE@4"])||(qt=Yt["__GLOBAL_DOCUMENT_CACHE@4"]=Gt);var Jt=qt,Qt=Kt.navigator&&Kt.navigator.userAgent||"",Zt=/AppleWebKit\/([\d.]+)/i.exec(Qt),te=Zt?parseFloat(Zt.pop()):null,ee=/iPad/i.test(Qt),re=/iPhone/i.test(Qt)&&!ee,ne=/iPod/i.test(Qt),oe=re||ee||ne,ie=function(){var t=Qt.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),se=/Android/i.test(Qt),ae=function(){var t=Qt.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),r=t[2]&&parseFloat(t[2]);return e&&r?parseFloat(t[1]+"."+t[2]):e||null}(),le=se&&/webkit/i.test(Qt)&&ae<2.3,ce=se&&ae<5&&te<537,ue=/Firefox/i.test(Qt),he=/Edge/i.test(Qt),pe=!he&&(/Chrome/i.test(Qt)||/CriOS/i.test(Qt)),de=function(){var t=Qt.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),fe=/MSIE\s8\.0/.test(Qt),ve=function(){var t=/MSIE\s(\d+)\.\d/.exec(Qt),e=t&&parseFloat(t[1]);return!e&&/Trident\/7.0/i.test(Qt)&&/rv:11.0/.test(Qt)&&(e=11),e}(),ye=/Safari/i.test(Qt)&&!pe&&!se&&!he,ge=(ye||oe)&&!pe,me=u()&&("ontouchstart"in Kt||Kt.navigator.maxTouchPoints||Kt.DocumentTouch&&Kt.document instanceof Kt.DocumentTouch),_e=u()&&"backgroundSize"in Kt.document.createElement("video").style,be=(Object.freeze||Object)({IS_IPAD:ee,IS_IPHONE:re,IS_IPOD:ne,IS_IOS:oe,IOS_VERSION:ie,IS_ANDROID:se,ANDROID_VERSION:ae,IS_OLD_ANDROID:le,IS_NATIVE_ANDROID:ce,IS_FIREFOX:ue,IS_EDGE:he,IS_CHROME:pe,CHROME_VERSION:de,IS_IE8:fe,IE_VERSION:ve,IS_SAFARI:ye,IS_ANY_SAFARI:ge,TOUCH_ENABLED:me,BACKGROUND_SIZE_SUPPORTED:_e}),Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ce=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},ke=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},Ee=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},Se=function(t,e){return t.raw=e,t},we=Object.prototype.toString,xe=function(t){return n(t)?Object.keys(t):[]},je=void 0,Pe="info",Ae=[],Oe=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:!!ve&&ve<11,o=je.levels[Pe],i=new RegExp("^("+o+")$");if("log"!==t&&e.unshift(t.toUpperCase()+":"),Ae&&Ae.push([].concat(e)),e.unshift("VIDEOJS:"),Kt.console){var s=Kt.console[t];s||"debug"!==t||(s=Kt.console.info||Kt.console.log),s&&o&&i.test(t)&&(r&&(e=e.map(function(t){if(n(t)||Array.isArray(t))try{return JSON.stringify(t)}catch(e){return String(t)}return String(t)}).join(" ")),s.apply?s[Array.isArray(e)?"apply":"call"](Kt.console,e):s(e))}};je=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];Oe("log",e)},je.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:Pe},je.level=function(t){if("string"==typeof t){if(!je.levels.hasOwnProperty(t))throw new Error('"'+t+'" in not a valid log level');Pe=t}return Pe},je.history=function(){return Ae?[].concat(Ae):[]},je.history.clear=function(){Ae&&(Ae.length=0)},je.history.disable=function(){null!==Ae&&(Ae.length=0,Ae=null)},je.history.enable=function(){null===Ae&&(Ae=[])},je.error=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return Oe("error",e)},je.warn=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return Oe("warn",e)},je.debug=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return Oe("debug",e)};var Me=je,Ne=function(t){for(var e="",r=0;r<arguments.length;r++)e+=i(t[r])+(arguments[r+1]||"");return e},Ie=Se(["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 ","."]),De=d("querySelector"),Le=d("querySelectorAll"),Re=(Object.freeze||Object)({isReal:u,isEl:h,isInFrame:p,createEl:f,textContent:v,prependTo:y,hasClass:g,addClass:m,removeClass:_,toggleClass:b,setAttributes:T,getAttributes:C,getAttribute:k,setAttribute:E,removeAttribute:S,blockTextSelection:w,unblockTextSelection:x,getBoundingClientRect:j,findPosition:P,getPointerPosition:A,isTextNode:O,emptyEl:M,normalizeContent:N,appendContent:I,insertContent:D,isSingleLeftClick:L,$:De,$$:Le}),Fe=1,Be={},He="vdata"+(new Date).getTime(),Ve=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){Ve=!0}});Kt.addEventListener("test",null,t),Kt.removeEventListener("test",null,t)}catch(t){}}();var ze=["touchstart","touchmove"],We=(Object.freeze||Object)({fixEvent:W,on:U,off:q,trigger:K,one:X}),Ue=!1,qe=void 0,Ke=function(){if(u()&&!1!==qe.options.autoSetup){var t=Jt.getElementsByTagName("video"),e=Jt.getElementsByTagName("audio"),r=Jt.getElementsByTagName("video-js"),n=[];if(t&&t.length>0)for(var o=0,i=t.length;o<i;o++)n.push(t[o]);if(e&&e.length>0)for(var s=0,a=e.length;s<a;s++)n.push(e[s]);if(r&&r.length>0)for(var l=0,c=r.length;l<c;l++)n.push(r[l]);if(n&&n.length>0)for(var h=0,p=n.length;h<p;h++){var d=n[h];if(!d||!d.getAttribute){$(1);break}if(void 0===d.player){var f=d.getAttribute("data-setup");null!==f&&qe(d)}}else Ue||$(1)}};u()&&"complete"===Jt.readyState?Ue=!0:X(Kt,"load",function(){Ue=!0});var Xe=function(t){var e=Jt.createElement("style");return e.className=t,e},$e=function(t,e){t.styleSheet?t.styleSheet.cssText=e:t.textContent=e},Ge=function(t,e,r){e.guid||(e.guid=R());var n=function(){return e.apply(t,arguments)};return n.guid=r?r+"_"+e.guid:e.guid,n},Ye=function(t,e){var r=Date.now();return function(){var n=Date.now();n-r>=e&&(t.apply(void 0,arguments),r=n)}},Je=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Kt,o=void 0;return function(){var i=this,s=arguments,a=function(){o=null,a=null,r||t.apply(i,s)};!o&&r&&t.apply(i,s),n.clearTimeout(o),o=n.setTimeout(a,e)}},Qe=function(){};Qe.prototype.allowedEvents_={},Qe.prototype.on=function(t,e){var r=this.addEventListener;this.addEventListener=function(){},U(this,t,e),this.addEventListener=r},Qe.prototype.addEventListener=Qe.prototype.on,Qe.prototype.off=function(t,e){q(this,t,e)},Qe.prototype.removeEventListener=Qe.prototype.off,Qe.prototype.one=function(t,e){var r=this.addEventListener;this.addEventListener=function(){},X(this,t,e),this.addEventListener=r},Qe.prototype.trigger=function(t){var e=t.type||t;"string"==typeof t&&(t={type:e}),t=W(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),K(this,t)},Qe.prototype.dispatchEvent=Qe.prototype.trigger;var Ze=function(t){return t instanceof Qe||!!t.eventBusEl_&&["on","one","off","trigger"].every(function(e){return"function"==typeof t[e]})},tr=function(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},er=function(t){if(!t.nodeName&&!Ze(t))throw new Error("Invalid target; must be a DOM node or evented object.")},rr=function(t){if(!tr(t))throw new Error("Invalid event type; must be a non-empty string or array.")},nr=function(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")},or=function(t,e){var r=e.length<3||e[0]===t||e[0]===t.eventBusEl_,n=void 0,o=void 0,i=void 0;return r?(n=t.eventBusEl_,e.length>=3&&e.shift(),o=e[0],i=e[1]):(n=e[0],o=e[1],i=e[2]),er(n),rr(o),nr(i),i=Ge(t,i),{isTargetingSelf:r,target:n,type:o,listener:i}},ir=function(t,e,r,n){er(t),t.nodeName?We[e](t,r,n):t[e](r,n)},sr={on:function(){for(var t=this,e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];var o=or(this,r),i=o.isTargetingSelf,s=o.target,a=o.type,l=o.listener;if(ir(s,"on",a,l),!i){var c=function(){return t.off(s,a,l)};c.guid=l.guid;var u=function(){return t.off("dispose",c)};u.guid=l.guid,ir(this,"on","dispose",c),ir(s,"on","dispose",u)}},one:function(){for(var t=this,e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];var o=or(this,r),i=o.isTargetingSelf,s=o.target,a=o.type,l=o.listener;if(i)ir(s,"one",a,l);else{var c=function e(){for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];t.off(s,a,e),l.apply(null,n)};c.guid=l.guid,ir(s,"one",a,c)}},off:function(t,e,r){if(!t||tr(t))q(this.eventBusEl_,t,e);else{var n=t,o=e;er(n),rr(o),nr(r),r=Ge(this,r),this.off("dispose",r),n.nodeName?(q(n,o,r),q(n,"dispose",r)):Ze(n)&&(n.off(o,r),n.off("dispose",r))}},trigger:function(t,e){return K(this.eventBusEl_,t,e)}},ar={state:{},setState:function(e){var r=this;"function"==typeof e&&(e=e());var n=void 0;return t(e,function(t,e){r.state[e]!==t&&(n=n||{},n[e]={from:r.state[e],to:t}),r.state[e]=t}),n&&Ze(this)&&this.trigger({changes:n,type:"statechanged"}),n}},lr=function(){function t(e,r,n){if(Ce(this,t),!e&&this.play?this.player_=e=this:this.player_=e,this.options_=Z({},this.options_),r=this.options_=Z(this.options_,r),this.id_=r.id||r.el&&r.el.id,!this.id_){var o=e&&e.id&&e.id()||"no_player";this.id_=o+"_component_"+R()}this.name_=r.name||null,r.el?this.el_=r.el:!1!==r.createEl&&(this.el_=this.createEl()),!1!==r.evented&&G(this,{eventBusKey:this.el_?"el_":null}),Y(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},!1!==r.initChildren&&this.initChildren(),this.ready(n),!1!==r.reportTouchActivity&&this.enableTouchActivity()}return t.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),H(this.el_),this.el_=null),this.player_=null},t.prototype.player=function(){return this.player_},t.prototype.options=function(t){return Me.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.options_=Z(this.options_,t),this.options_):this.options_},t.prototype.el=function(){return this.el_},t.prototype.createEl=function(t,e,r){return f(t,e,r)},t.prototype.localize=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=this.player_.language&&this.player_.language(),o=this.player_.languages&&this.player_.languages(),i=o&&o[n],s=n&&n.split("-")[0],a=o&&o[s],l=r;return i&&i[t]?l=i[t]:a&&a[t]&&(l=a[t]),e&&(l=l.replace(/\{(\d+)\}/g,function(t,r){var n=e[r-1],o=n;return void 0===n&&(o=t),o})),l},t.prototype.contentEl=function(){return this.contentEl_||this.el_},t.prototype.id=function(){return this.id_},t.prototype.name=function(){return this.name_},t.prototype.children=function(){return this.children_},t.prototype.getChildById=function(t){return this.childIndex_[t]},t.prototype.getChild=function(t){if(t)return t=J(t),this.childNameIndex_[t]},t.prototype.addChild=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,o=void 0,i=void 0;if("string"==typeof e){i=J(e);var s=r.componentClass||i;r.name=i;var a=t.getComponent(s);if(!a)throw new Error("Component "+s+" does not exist");if("function"!=typeof a)return null;o=new a(this.player_||this,r)}else o=e;if(this.children_.splice(n,0,o),"function"==typeof o.id&&(this.childIndex_[o.id()]=o),i=i||o.name&&J(o.name()),i&&(this.childNameIndex_[i]=o),"function"==typeof o.el&&o.el()){var l=this.contentEl().children,c=l[n]||null;this.contentEl().insertBefore(o.el(),c)}return o},t.prototype.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.children_){for(var e=!1,r=this.children_.length-1;r>=0;r--)if(this.children_[r]===t){e=!0,this.children_.splice(r,1);break}if(e){this.childIndex_[t.id()]=null,this.childNameIndex_[t.name()]=null;var n=t.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},t.prototype.initChildren=function(){var e=this,r=this.options_.children;if(r){var n=this.options_,o=function(t){var r=t.name,o=t.opts;if(void 0!==n[r]&&(o=n[r]),!1!==o){!0===o&&(o={}),o.playerOptions=e.options_.playerOptions;var i=e.addChild(r,o);i&&(e[r]=i)}},i=void 0,s=t.getComponent("Tech");i=Array.isArray(r)?r:Object.keys(r),i.concat(Object.keys(this.options_).filter(function(t){return!i.some(function(e){return"string"==typeof e?t===e:t===e.name})})).map(function(t){var n=void 0,o=void 0;return"string"==typeof t?(n=t,o=r[n]||e.options_[n]||{}):(n=t.name,o=t),{name:n,opts:o}}).filter(function(e){var r=t.getComponent(e.opts.componentClass||J(e.name));return r&&!s.isTech(r)}).forEach(o)}},t.prototype.buildCSSClass=function(){return""},t.prototype.ready=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(t))},t.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var t=this.readyQueue_;this.readyQueue_=[],t&&t.length>0&&t.forEach(function(t){t.call(this)},this),this.trigger("ready")},1)},t.prototype.$=function(t,e){return De(t,e||this.contentEl())},t.prototype.$$=function(t,e){return Le(t,e||this.contentEl())},t.prototype.hasClass=function(t){return g(this.el_,t)},t.prototype.addClass=function(t){m(this.el_,t)},t.prototype.removeClass=function(t){_(this.el_,t)},t.prototype.toggleClass=function(t,e){b(this.el_,t,e)},t.prototype.show=function(){this.removeClass("vjs-hidden")},t.prototype.hide=function(){this.addClass("vjs-hidden")},t.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},t.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.prototype.getAttribute=function(t){return k(this.el_,t)},t.prototype.setAttribute=function(t,e){E(this.el_,t,e)},t.prototype.removeAttribute=function(t){S(this.el_,t)},t.prototype.width=function(t,e){return this.dimension("width",t,e)},t.prototype.height=function(t,e){return this.dimension("height",t,e)},t.prototype.dimensions=function(t,e){this.width(t,!0),this.height(e)},t.prototype.dimension=function(t,e,r){if(void 0!==e)return null!==e&&e===e||(e=0),-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?this.el_.style[t]=e:this.el_.style[t]="auto"===e?"":e+"px",void(r||this.trigger("componentresize"));if(!this.el_)return 0;var n=this.el_.style[t],o=n.indexOf("px");return-1!==o?parseInt(n.slice(0,o),10):parseInt(this.el_["offset"+J(t)],10)},t.prototype.currentDimension=function(t){var e=0;if("width"!==t&&"height"!==t)throw new Error("currentDimension only accepts width or height value");if("function"==typeof Kt.getComputedStyle){var r=Kt.getComputedStyle(this.el_);e=r.getPropertyValue(t)||r[t]}if(0===(e=parseFloat(e))){var n="offset"+J(t);e=this.el_[n]}return e},
|
|
|
t.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.prototype.currentWidth=function(){return this.currentDimension("width")},t.prototype.currentHeight=function(){return this.currentDimension("height")},t.prototype.focus=function(){this.el_.focus()},t.prototype.blur=function(){this.el_.blur()},t.prototype.emitTapEvents=function(){var t=0,e=null,r=void 0;this.on("touchstart",function(n){1===n.touches.length&&(e={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},t=(new Date).getTime(),r=!0)}),this.on("touchmove",function(t){if(t.touches.length>1)r=!1;else if(e){var n=t.touches[0].pageX-e.pageX,o=t.touches[0].pageY-e.pageY,i=Math.sqrt(n*n+o*o);i>10&&(r=!1)}});var n=function(){r=!1};this.on("touchleave",n),this.on("touchcancel",n),this.on("touchend",function(n){if(e=null,!0===r){(new Date).getTime()-t<200&&(n.preventDefault(),this.trigger("tap"))}})},t.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t=Ge(this.player(),this.player().reportUserActivity),e=void 0;this.on("touchstart",function(){t(),this.clearInterval(e),e=this.setInterval(t,250)});var r=function(r){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",r),this.on("touchcancel",r)}},t.prototype.setTimeout=function(t,e){var r,n,o=this;return t=Ge(this,t),r=Kt.setTimeout(function(){o.off("dispose",n),t()},e),n=function(){return o.clearTimeout(r)},n.guid="vjs-timeout-"+r,this.on("dispose",n),r},t.prototype.clearTimeout=function(t){Kt.clearTimeout(t);var e=function(){};return e.guid="vjs-timeout-"+t,this.off("dispose",e),t},t.prototype.setInterval=function(t,e){var r=this;t=Ge(this,t);var n=Kt.setInterval(t,e),o=function(){return r.clearInterval(n)};return o.guid="vjs-interval-"+n,this.on("dispose",o),n},t.prototype.clearInterval=function(t){Kt.clearInterval(t);var e=function(){};return e.guid="vjs-interval-"+t,this.off("dispose",e),t},t.prototype.requestAnimationFrame=function(t){var e,r,n=this;return this.supportsRaf_?(t=Ge(this,t),e=Kt.requestAnimationFrame(function(){n.off("dispose",r),t()}),r=function(){return n.cancelAnimationFrame(e)},r.guid="vjs-raf-"+e,this.on("dispose",r),e):this.setTimeout(t,1e3/60)},t.prototype.cancelAnimationFrame=function(t){if(this.supportsRaf_){Kt.cancelAnimationFrame(t);var e=function(){};return e.guid="vjs-raf-"+t,this.off("dispose",e),t}return this.clearTimeout(t)},t.registerComponent=function(e,r){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var n=t.getComponent("Tech"),o=n&&n.isTech(r),i=t===r||t.prototype.isPrototypeOf(r.prototype);if(o||!i){var s=void 0;throw s=o?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+e+'"; '+s+".")}e=J(e),t.components_||(t.components_={});var a=t.getComponent("Player");if("Player"===e&&a&&a.players){var l=a.players,c=Object.keys(l);if(l&&c.length>0&&c.map(function(t){return l[t]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=r,r},t.getComponent=function(e){if(e)return e=J(e),t.components_&&t.components_[e]?t.components_[e]:void 0},t}();lr.prototype.supportsRaf_="function"==typeof Kt.requestAnimationFrame&&"function"==typeof Kt.cancelAnimationFrame,lr.registerComponent("Component",lr);for(var cr={},ur=[["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"]],hr=ur[0],pr=void 0,dr=0;dr<ur.length;dr++)if(ur[dr][1]in Jt){pr=ur[dr];break}if(pr)for(var fr=0;fr<pr.length;fr++)cr[hr[fr]]=pr[fr];it.prototype.code=0,it.prototype.message="",it.prototype.status=null,it.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],it.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 vr=0;vr<it.errorTypes.length;vr++)it[it.errorTypes[vr]]=vr,it.prototype[it.errorTypes[vr]]=vr;var yr=st,gr=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(e,r,n){return t[r]&&(e[r]=t[r]),e},{cues:t.cues&&Array.prototype.map.call(t.cues,function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}})})},mr=function(t){var e=t.$$("track"),r=Array.prototype.map.call(e,function(t){return t.track});return Array.prototype.map.call(e,function(t){var e=gr(t.track);return t.src&&(e.src=t.src),e}).concat(Array.prototype.filter.call(t.textTracks(),function(t){return-1===r.indexOf(t)}).map(gr))},_r=function(t,e){return t.forEach(function(t){var r=e.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach(function(t){return r.addCue(t)})}),e.textTracks()},br={textTracksToJson:mr,jsonToTextTracks:_r,trackToJson_:gr},Tr="vjs-modal-dialog",Cr=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.opened_=o.hasBeenOpened_=o.hasBeenFilled_=!1,o.closeable(!o.options_.uncloseable),o.content(o.options_.content),o.contentEl_=f("div",{className:Tr+"-content"},{role:"document"}),o.descEl_=f("p",{className:Tr+"-description vjs-control-text",id:o.el().getAttribute("aria-describedby")}),v(o.descEl_,o.description()),o.el_.appendChild(o.descEl_),o.el_.appendChild(o.contentEl_),o}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},e.prototype.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,t.prototype.dispose.call(this)},e.prototype.buildCSSClass=function(){return Tr+" vjs-hidden "+t.prototype.buildCSSClass.call(this)},e.prototype.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},e.prototype.label=function(){return this.localize(this.options_.label||"Modal Window")},e.prototype.description=function(){var t=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},e.prototype.open=function(){if(!this.opened_){var t=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!t.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&t.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",Ge(this,this.handleKeyPress)),this.hadControls_=t.controls(),t.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},e.prototype.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.opened_},e.prototype.close=function(){if(this.opened_){var t=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",Ge(this,this.handleKeyPress)),this.hadControls_&&t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},e.prototype.closeable=function(t){if("boolean"==typeof t){var e=this.closeable_=!!t,r=this.getChild("closeButton");if(e&&!r){var n=this.contentEl_;this.contentEl_=this.el_,r=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=n,this.on(r,"close",this.close)}!e&&r&&(this.off(r,"close",this.close),this.removeChild(r),r.dispose())}return this.closeable_},e.prototype.fill=function(){this.fillWith(this.content())},e.prototype.fillWith=function(t){var e=this.contentEl(),r=e.parentNode,n=e.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,r.removeChild(e),this.empty(),D(e,t),this.trigger("modalfill"),n?r.insertBefore(e,n):r.appendChild(e);var o=this.getChild("closeButton");o&&r.appendChild(o.el_)},e.prototype.empty=function(){this.trigger("beforemodalempty"),M(this.contentEl()),this.trigger("modalempty")},e.prototype.content=function(t){return void 0!==t&&(this.content_=t),this.content_},e.prototype.conditionalFocus_=function(){var t=Jt.activeElement,e=this.player_.el_;this.previouslyActiveEl_=null,(e.contains(t)||e===t)&&(this.previouslyActiveEl_=t,this.focus(),this.on(Jt,"keydown",this.handleKeyDown))},e.prototype.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null),this.off(Jt,"keydown",this.handleKeyDown)},e.prototype.handleKeyDown=function(t){if(9===t.which){for(var e=this.focusableEls_(),r=this.el_.querySelector(":focus"),n=void 0,o=0;o<e.length;o++)if(r===e[o]){n=o;break}Jt.activeElement===this.el_&&(n=0),t.shiftKey&&0===n?(e[e.length-1].focus(),t.preventDefault()):t.shiftKey||n!==e.length-1||(e[0].focus(),t.preventDefault())}},e.prototype.focusableEls_=function(){var t=this.el_.querySelectorAll("*");return Array.prototype.filter.call(t,function(t){return(t instanceof Kt.HTMLAnchorElement||t instanceof Kt.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof Kt.HTMLInputElement||t instanceof Kt.HTMLSelectElement||t instanceof Kt.HTMLTextAreaElement||t instanceof Kt.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof Kt.HTMLIFrameElement||t instanceof Kt.HTMLObjectElement||t instanceof Kt.HTMLEmbedElement||t.hasAttribute("tabindex")&&-1!==t.getAttribute("tabindex")||t.hasAttribute("contenteditable")})},e}(lr);Cr.prototype.options_={pauseOnOpen:!0,temporary:!0},lr.registerComponent("ModalDialog",Cr);var kr=function(t){function e(){var r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Ce(this,e);var i=Ee(this,t.call(this));if(!o&&(o=i,fe)){o=Jt.createElement("custom");for(var s in e.prototype)"constructor"!==s&&(o[s]=e.prototype[s])}o.tracks_=[],Object.defineProperty(o,"length",{get:function(){return this.tracks_.length}});for(var a=0;a<n.length;a++)o.addTrack(n[a]);return r=o,Ee(i,r)}return ke(e,t),e.prototype.addTrack=function(t){var e=this.tracks_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.tracks_[e]}}),-1===this.tracks_.indexOf(t)&&(this.tracks_.push(t),this.trigger({track:t,type:"addtrack"}))},e.prototype.removeTrack=function(t){for(var e=void 0,r=0,n=this.length;r<n;r++)if(this[r]===t){e=this[r],e.off&&e.off(),this.tracks_.splice(r,1);break}e&&this.trigger({track:e,type:"removetrack"})},e.prototype.getTrackById=function(t){for(var e=null,r=0,n=this.length;r<n;r++){var o=this[r];if(o.id===t){e=o;break}}return e},e}(Qe);kr.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var Er in kr.prototype.allowedEvents_)kr.prototype["on"+Er]=null;var Sr=function(t,e){for(var r=0;r<t.length;r++)Object.keys(t[r]).length&&e.id!==t[r].id&&(t[r].enabled=!1)},wr=function(t){function e(){var r,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Ce(this,e);for(var i=void 0,s=o.length-1;s>=0;s--)if(o[s].enabled){Sr(o,o[s]);break}if(fe){i=Jt.createElement("custom");for(var a in kr.prototype)"constructor"!==a&&(i[a]=kr.prototype[a]);for(var l in e.prototype)"constructor"!==l&&(i[l]=e.prototype[l])}return i=r=Ee(this,t.call(this,o,i)),i.changing_=!1,n=i,Ee(r,n)}return ke(e,t),e.prototype.addTrack=function(e){var r=this;e.enabled&&Sr(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&e.addEventListener("enabledchange",function(){r.changing_||(r.changing_=!0,Sr(r,e),r.changing_=!1,r.trigger("change"))})},e}(kr),xr=function(t,e){for(var r=0;r<t.length;r++)Object.keys(t[r]).length&&e.id!==t[r].id&&(t[r].selected=!1)},jr=function(t){function e(){var r,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Ce(this,e);for(var i=void 0,s=o.length-1;s>=0;s--)if(o[s].selected){xr(o,o[s]);break}if(fe){i=Jt.createElement("custom");for(var a in kr.prototype)"constructor"!==a&&(i[a]=kr.prototype[a]);for(var l in e.prototype)"constructor"!==l&&(i[l]=e.prototype[l])}return i=r=Ee(this,t.call(this,o,i)),i.changing_=!1,Object.defineProperty(i,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),n=i,Ee(r,n)}return ke(e,t),e.prototype.addTrack=function(e){var r=this;e.selected&&xr(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&e.addEventListener("selectedchange",function(){r.changing_||(r.changing_=!0,xr(r,e),r.changing_=!1,r.trigger("change"))})},e}(kr),Pr=function(t){function e(){var r,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Ce(this,e);var i=void 0;if(fe){i=Jt.createElement("custom");for(var s in kr.prototype)"constructor"!==s&&(i[s]=kr.prototype[s]);for(var a in e.prototype)"constructor"!==a&&(i[a]=e.prototype[a])}return i=r=Ee(this,t.call(this,o,i)),n=i,Ee(r,n)}return ke(e,t),e.prototype.addTrack=function(e){t.prototype.addTrack.call(this,e),e.addEventListener("modechange",Ge(this,function(){this.trigger("change")})),-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",Ge(this,function(){this.trigger("selectedlanguagechange")}))},e}(kr),Ar=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Ce(this,t);var r=this;if(fe){r=Jt.createElement("custom");for(var n in t.prototype)"constructor"!==n&&(r[n]=t.prototype[n])}r.trackElements_=[],Object.defineProperty(r,"length",{get:function(){return this.trackElements_.length}});for(var o=0,i=e.length;o<i;o++)r.addTrackElement_(e[o]);if(fe)return r}return t.prototype.addTrackElement_=function(t){var e=this.trackElements_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.trackElements_[e]}}),-1===this.trackElements_.indexOf(t)&&this.trackElements_.push(t)},t.prototype.getTrackElementByTrack_=function(t){for(var e=void 0,r=0,n=this.trackElements_.length;r<n;r++)if(t===this.trackElements_[r].track){e=this.trackElements_[r];break}return e},t.prototype.removeTrackElement_=function(t){for(var e=0,r=this.trackElements_.length;e<r;e++)if(t===this.trackElements_[e]){this.trackElements_.splice(e,1);break}},t}(),Or=function(){function t(e){Ce(this,t);var r=this;if(fe){r=Jt.createElement("custom");for(var n in t.prototype)"constructor"!==n&&(r[n]=t.prototype[n])}if(t.prototype.setCues_.call(r,e),Object.defineProperty(r,"length",{get:function(){return this.length_}}),fe)return r}return t.prototype.setCues_=function(t){var e=this.length||0,r=0,n=t.length;this.cues_=t,this.length_=t.length;var o=function(t){""+t in this||Object.defineProperty(this,""+t,{get:function(){return this.cues_[t]}})};if(e<n)for(r=e;r<n;r++)o.call(this,r)},t.prototype.getCueById=function(t){for(var e=null,r=0,n=this.length;r<n;r++){var o=this[r];if(o.id===t){e=o;break}}return e},t}(),Mr={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Nr={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Ir={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Dr={disabled:"disabled",hidden:"hidden",showing:"showing"},Lr=function(t){function e(){var r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ce(this,e);var o=Ee(this,t.call(this)),i=o;if(fe){i=Jt.createElement("custom");for(var s in e.prototype)"constructor"!==s&&(i[s]=e.prototype[s])}var a={id:n.id||"vjs_track_"+R(),kind:n.kind||"",label:n.label||"",language:n.language||""};for(var l in a)!function(t){Object.defineProperty(i,t,{get:function(){return a[t]},set:function(){}})}(l);return r=i,Ee(o,r)}return ke(e,t),e}(Qe),Rr=function(t){var e=["protocol","hostname","port","pathname","search","hash","host"],r=Jt.createElement("a");r.href=t;var n=""===r.host&&"file:"!==r.protocol,o=void 0;n&&(o=Jt.createElement("div"),o.innerHTML='<a href="'+t+'"></a>',r=o.firstChild,o.setAttribute("style","display:none; position:absolute;"),Jt.body.appendChild(o));for(var i={},s=0;s<e.length;s++)i[e[s]]=r[e[s]];return"http:"===i.protocol&&(i.host=i.host.replace(/:80$/,"")),"https:"===i.protocol&&(i.host=i.host.replace(/:443$/,"")),i.protocol||(i.protocol=Kt.location.protocol),n&&Jt.body.removeChild(o),i},Fr=function(t){if(!t.match(/^https?:\/\//)){var e=Jt.createElement("div");e.innerHTML='<a href="'+t+'">x</a>',t=e.firstChild.href}return t},Br=function(t){if("string"==typeof t){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,r=e.exec(t);if(r)return r.pop().toLowerCase()}return""},Hr=function(t){var e=Kt.location,r=Rr(t);return(":"===r.protocol?e.protocol:r.protocol)+r.host!==e.protocol+e.host},Vr=(Object.freeze||Object)({parseUrl:Rr,getAbsoluteURL:Fr,getFileExtension:Br,isCrossOrigin:Hr}),zr=ct,Wr=Object.prototype.toString,Ur=function(t,e){return e={exports:{}},t(e,e.exports),e.exports}(function(t,e){function r(t){return t.replace(/^\s*|\s*$/g,"")}e=t.exports=r,e.left=function(t){return t.replace(/^\s*/,"")},e.right=function(t){return t.replace(/\s*$/,"")}}),qr=ut,Kr=Object.prototype.toString,Xr=Object.prototype.hasOwnProperty,$r=function(t){return"[object Array]"===Object.prototype.toString.call(t)},Gr=function(t){if(!t)return{};var e={};return qr(Ur(t).split("\n"),function(t){var r=t.indexOf(":"),n=Ur(t.slice(0,r)).toLowerCase(),o=Ur(t.slice(r+1));void 0===e[n]?e[n]=o:$r(e[n])?e[n].push(o):e[n]=[e[n],o]}),e},Yr=ft,Jr=Object.prototype.hasOwnProperty,Qr=gt;gt.XMLHttpRequest=Kt.XMLHttpRequest||bt,gt.XDomainRequest="withCredentials"in new gt.XMLHttpRequest?gt.XMLHttpRequest:Kt.XDomainRequest,function(t,e){for(var r=0;r<t.length;r++)e(t[r])}(["get","put","post","patch","head","delete"],function(t){gt["delete"===t?"del":t]=function(e,r,n){return r=yt(e,r,n),r.method=t.toUpperCase(),mt(r)}});var Zr=function(t,e){var r=new Kt.WebVTT.Parser(Kt,Kt.vttjs,Kt.WebVTT.StringDecoder()),n=[];r.oncue=function(t){e.addCue(t)},r.onparsingerror=function(t){n.push(t)},r.onflush=function(){e.trigger({type:"loadeddata",target:e})},r.parse(t),n.length>0&&(Kt.console&&Kt.console.groupCollapsed&&Kt.console.groupCollapsed("Text Track parsing errors for "+e.src),n.forEach(function(t){return Me.error(t)}),Kt.console&&Kt.console.groupEnd&&Kt.console.groupEnd()),r.flush()},tn=function(t,e){var r={uri:t},n=Hr(t);n&&(r.cors=n),Qr(r,Ge(this,function(t,r,n){if(t)return Me.error(t,r);if(e.loaded_=!0,"function"!=typeof Kt.WebVTT){if(e.tech_){var o=function(){return Zr(n,e)};e.tech_.on("vttjsloaded",o),e.tech_.on("vttjserror",function(){Me.error("vttjs failed to load, stopping trying to process "+e.src),e.tech_.off("vttjsloaded",o)})}}else Zr(n,e)}))},en=function(t){function e(){var r,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Ce(this,e),!o.tech)throw new Error("A tech was not provided.");var i=Z(o,{kind:Ir[o.kind]||"subtitles",language:o.language||o.srclang||""}),s=Dr[i.mode]||"disabled",a=i.default;"metadata"!==i.kind&&"chapters"!==i.kind||(s="hidden");var l=r=Ee(this,t.call(this,i));if(l.tech_=i.tech,fe)for(var c in e.prototype)"constructor"!==c&&(l[c]=e.prototype[c]);l.cues_=[],l.activeCues_=[];var u=new Or(l.cues_),h=new Or(l.activeCues_),p=!1,d=Ge(l,function(){this.activeCues=this.activeCues,p&&(this.trigger("cuechange"),p=!1)});return"disabled"!==s&&l.tech_.ready(function(){l.tech_.on("timeupdate",d)},!0),Object.defineProperty(l,"default",{get:function(){return a},set:function(){}}),Object.defineProperty(l,"mode",{get:function(){return s},set:function(t){var e=this;Dr[t]&&(s=t,"showing"===s&&this.tech_.ready(function(){e.tech_.on("timeupdate",d)},!0),this.trigger("modechange"))}}),Object.defineProperty(l,"cues",{get:function(){return this.loaded_?u:null},set:function(){}}),Object.defineProperty(l,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return h;for(var t=this.tech_.currentTime(),e=[],r=0,n=this.cues.length;r<n;r++){var o=this.cues[r];o.startTime<=t&&o.endTime>=t?e.push(o):o.startTime===o.endTime&&o.startTime<=t&&o.startTime+.5>=t&&e.push(o)}if(p=!1,e.length!==this.activeCues_.length)p=!0;else for(var i=0;i<e.length;i++)-1===this.activeCues_.indexOf(e[i])&&(p=!0);return this.activeCues_=e,h.setCues_(this.activeCues_),h},set:function(){}}),i.src?(l.src=i.src,tn(i.src,l)):l.loaded_=!0,n=l,Ee(r,n)}return ke(e,t),e.prototype.addCue=function(t){var e=t;if(Kt.vttjs&&!(t instanceof Kt.vttjs.VTTCue)){e=new Kt.vttjs.VTTCue(t.startTime,t.endTime,t.text);for(var r in t)r in e||(e[r]=t[r]);e.id=t.id,e.originalCue_=t}for(var n=this.tech_.textTracks(),o=0;o<n.length;o++)n[o]!==this&&n[o].removeCue(e);this.cues_.push(e),this.cues.setCues_(this.cues_)},e.prototype.removeCue=function(t){for(var e=this.cues_.length;e--;){var r=this.cues_[e];if(r===t||r.originalCue_&&r.originalCue_===t){this.cues_.splice(e,1),this.cues.setCues_(this.cues_);break}}},e}(Lr);en.prototype.allowedEvents_={cuechange:"cuechange"};var rn=function(t){function e(){var r,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ce(this,e);var i=Z(o,{kind:Nr[o.kind]||""}),s=r=Ee(this,t.call(this,i)),a=!1;if(fe)for(var l in e.prototype)"constructor"!==l&&(s[l]=e.prototype[l]);return Object.defineProperty(s,"enabled",{get:function(){return a},set:function(t){"boolean"==typeof t&&t!==a&&(a=t,this.trigger("enabledchange"))}}),i.enabled&&(s.enabled=i.enabled),s.loaded_=!0,n=s,Ee(r,n)}return ke(e,t),e}(Lr),nn=function(t){function e(){var r,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ce(this,e);var i=Z(o,{kind:Mr[o.kind]||""}),s=r=Ee(this,t.call(this,i)),a=!1;if(fe)for(var l in e.prototype)"constructor"!==l&&(s[l]=e.prototype[l]);return Object.defineProperty(s,"selected",{get:function(){return a},set:function(t){"boolean"==typeof t&&t!==a&&(a=t,this.trigger("selectedchange"))}}),i.selected&&(s.selected=i.selected),n=s,Ee(r,n)}return ke(e,t),e}(Lr),on=0,sn=2,an=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ce(this,e);var n=Ee(this,t.call(this)),o=void 0,i=n;if(fe){i=Jt.createElement("custom");for(var s in e.prototype)"constructor"!==s&&(i[s]=e.prototype[s])}var a=new en(r);if(i.kind=a.kind,i.src=a.src,i.srclang=a.language,i.label=a.label,i.default=a.default,Object.defineProperty(i,"readyState",{get:function(){return o}}),Object.defineProperty(i,"track",{get:function(){return a}}),o=on,a.addEventListener("loadeddata",function(){o=sn,i.trigger({type:"load",target:i})}),fe){var l;return l=i,Ee(n,l)}return n}return ke(e,t),e}(Qe);an.prototype.allowedEvents_={load:"load"},an.NONE=on,an.LOADING=1,an.LOADED=sn,an.ERROR=3;var ln={audio:{ListClass:wr,TrackClass:rn,capitalName:"Audio"},video:{ListClass:jr,TrackClass:nn,capitalName:"Video"},text:{ListClass:Pr,TrackClass:en,capitalName:"Text"}};Object.keys(ln).forEach(function(t){ln[t].getterName=t+"Tracks",ln[t].privateName=t+"Tracks_"});var cn={remoteText:{ListClass:Pr,TrackClass:en,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Ar,TrackClass:an,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},un=Z(ln,cn);cn.names=Object.keys(cn),ln.names=Object.keys(ln),un.names=[].concat(cn.names).concat(ln.names);var hn={},pn=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};Ce(this,e),r.reportTouchActivity=!1;var o=Ee(this,t.call(this,null,r,n));return o.hasStarted_=!1,o.on("playing",function(){this.hasStarted_=!0}),o.on("loadstart",function(){this.hasStarted_=!1}),un.names.forEach(function(t){var e=un[t];r&&r[e.getterName]&&(o[e.privateName]=r[e.getterName])}),o.featuresProgressEvents||o.manualProgressOn(),o.featuresTimeupdateEvents||o.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(t){!1===r["native"+t+"Tracks"]&&(o["featuresNative"+t+"Tracks"]=!1)}),!1===r.nativeCaptions||!1===r.nativeTextTracks?o.featuresNativeTextTracks=!1:!0!==r.nativeCaptions&&!0!==r.nativeTextTracks||(o.featuresNativeTextTracks=!0),o.featuresNativeTextTracks||o.emulateTextTracks(),o.autoRemoteTextTracks_=new un.text.ListClass,o.initTrackListeners(),r.nativeControlsForTouch||o.emitTapEvents(),o.constructor&&(o.name_=o.constructor.name||"Unknown Tech"),o}return ke(e,t),e.prototype.triggerSourceset=function(t){var e=this;this.isReady_||this.one("ready",function(){return e.setTimeout(function(){return e.triggerSourceset(t)},1)}),this.trigger({src:t,type:"sourceset"})},e.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},e.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},e.prototype.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Ge(this,function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,1===t&&this.stopTrackingProgress()}),500)},e.prototype.onDurationChange=function(t){this.duration_=this.duration()},e.prototype.buffered=function(){return nt(0,0)},e.prototype.bufferedPercent=function(){return ot(this.buffered(),this.duration_)},e.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},e.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},e.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},e.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},e.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.dispose=function(){this.clearTracks(ln.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},e.prototype.clearTracks=function(t){var e=this;t=[].concat(t),t.forEach(function(t){for(var r=e[t+"Tracks"]()||[],n=r.length;n--;){var o=r[n];"text"===t&&e.removeRemoteTextTrack(o),r.removeTrack(o)}})},e.prototype.cleanupAutoTextTracks=function(){for(var t=this.autoRemoteTextTracks_||[],e=t.length;e--;){var r=t[e];this.removeRemoteTextTrack(r)}},e.prototype.reset=function(){},e.prototype.error=function(t){return void 0!==t&&(this.error_=new it(t),this.trigger("error")),this.error_},e.prototype.played=function(){return this.hasStarted_?nt(0,0):nt()},e.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.initTrackListeners=function(){var t=this;ln.names.forEach(function(e){var r=ln[e],n=function(){t.trigger(e+"trackchange")},o=t[r.getterName]();o.addEventListener("removetrack",n),o.addEventListener("addtrack",n),t.on("dispose",function(){o.removeEventListener("removetrack",n),o.removeEventListener("addtrack",n)})})},e.prototype.addWebVttScript_=function(){var t=this;if(!Kt.WebVTT)if(Jt.body.contains(this.el())){if(!this.options_["vtt.js"]&&o(hn)&&Object.keys(hn).length>0)return void this.trigger("vttjsloaded");var e=Jt.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",e.onload=function(){t.trigger("vttjsloaded")},e.onerror=function(){t.trigger("vttjserror")},this.on("dispose",function(){e.onload=null,e.onerror=null}),Kt.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)},e.prototype.emulateTextTracks=function(){var t=this,e=this.textTracks(),r=this.remoteTextTracks(),n=function(t){return e.addTrack(t.track)},o=function(t){return e.removeTrack(t.track)};r.on("addtrack",n),r.on("removetrack",o),this.addWebVttScript_();var i=function(){return t.trigger("texttrackchange")},s=function(){i();for(var t=0;t<e.length;t++){var r=e[t];r.removeEventListener("cuechange",i),"showing"===r.mode&&r.addEventListener("cuechange",i)}};s(),e.addEventListener("change",s),e.addEventListener("addtrack",s),e.addEventListener("removetrack",s),this.on("dispose",function(){r.off("addtrack",n),r.off("removetrack",o),e.removeEventListener("change",s),e.removeEventListener("addtrack",s),e.removeEventListener("removetrack",s);for(var t=0;t<e.length;t++){e[t].removeEventListener("cuechange",i)}})},e.prototype.addTextTrack=function(t,e,r){if(!t)throw new Error("TextTrack kind is required but was not provided");return Tt(this,t,e,r)},e.prototype.createRemoteTextTrack=function(t){var e=Z(t,{tech:this});return new cn.remoteTextEl.TrackClass(e)},e.prototype.addRemoteTextTrack=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments[1],n=this.createRemoteTextTrack(e);return!0!==r&&!1!==r&&(Me.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),r=!0),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),!0!==r&&this.ready(function(){return t.autoRemoteTextTracks_.addTrack(n.track)}),n},e.prototype.removeRemoteTextTrack=function(t){var e=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(e),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)},e.prototype.getVideoPlaybackQuality=function(){return{}},e.prototype.setPoster=function(){},e.prototype.playsinline=function(){},e.prototype.setPlaysinline=function(){},e.prototype.canPlayType=function(){return""},e.canPlayType=function(){return""},e.canPlaySource=function(t,r){return e.canPlayType(t.type)},e.isTech=function(t){return t.prototype instanceof e||t instanceof e||t===e},e.registerTech=function(t,r){if(e.techs_||(e.techs_={}),!e.isTech(r))throw new Error("Tech "+t+" must be a Tech");if(!e.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!e.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=J(t),e.techs_[t]=r,"Tech"!==t&&e.defaultTechOrder_.push(t),r},e.getTech=function(t){if(t)return t=J(t),e.techs_&&e.techs_[t]?e.techs_[t]:Kt&&Kt.videojs&&Kt.videojs[t]?(Me.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),Kt.videojs[t]):void 0},e}(lr);un.names.forEach(function(t){var e=un[t];pn.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}}),pn.prototype.featuresVolumeControl=!0,pn.prototype.featuresMuteControl=!0,
|
|
|
pn.prototype.featuresFullscreenResize=!1,pn.prototype.featuresPlaybackRate=!1,pn.prototype.featuresProgressEvents=!1,pn.prototype.featuresSourceset=!1,pn.prototype.featuresTimeupdateEvents=!1,pn.prototype.featuresNativeTextTracks=!1,pn.withSourceHandlers=function(t){t.registerSourceHandler=function(e,r){var n=t.sourceHandlers;n||(n=t.sourceHandlers=[]),void 0===r&&(r=n.length),n.splice(r,0,e)},t.canPlayType=function(e){for(var r=t.sourceHandlers||[],n=void 0,o=0;o<r.length;o++)if(n=r[o].canPlayType(e))return n;return""},t.selectSourceHandler=function(e,r){for(var n=t.sourceHandlers||[],o=0;o<n.length;o++)if(n[o].canHandleSource(e,r))return n[o];return null},t.canPlaySource=function(e,r){var n=t.selectSourceHandler(e,r);return n?n.canHandleSource(e,r):""},["seekable","seeking","duration"].forEach(function(t){var e=this[t];"function"==typeof e&&(this[t]=function(){return this.sourceHandler_&&this.sourceHandler_[t]?this.sourceHandler_[t].apply(this.sourceHandler_,arguments):e.apply(this,arguments)})},t.prototype),t.prototype.setSource=function(e){var r=t.selectSourceHandler(e,this.options_);r||(t.nativeSourceHandler?r=t.nativeSourceHandler:Me.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),r!==t.nativeSourceHandler&&(this.currentSource_=e),this.sourceHandler_=r.handleSource(e,this,this.options_),this.on("dispose",this.disposeSourceHandler)},t.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)}},lr.registerComponent("Tech",pn),pn.registerTech("Tech",pn),pn.defaultTechOrder_=[];var dn={},fn={},vn={},yn={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},gn={setCurrentTime:1},mn={play:1,pause:1},_n={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL"},bn=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=Br(t);return _n[e.toLowerCase()]||""},Tn=function(t,e){if(!e)return"";if(t.cache_.source.src===e&&t.cache_.source.type)return t.cache_.source.type;var r=t.cache_.sources.filter(function(t){return t.src===e});if(r.length)return r[0].type;for(var n=t.$$("source"),o=0;o<n.length;o++){var i=n[o];if(i.type&&i.src&&i.src===e)return i.type}return bn(e)},Cn=function t(e){if(Array.isArray(e)){var r=[];e.forEach(function(e){e=t(e),Array.isArray(e)?r=r.concat(e):n(e)&&r.push(e)}),e=r}else e="string"==typeof e&&e.trim()?[Nt({src:e})]:n(e)&&"string"==typeof e.src&&e.src&&e.src.trim()?[Nt(e)]:[];return e},kn=function(t){function e(r,n,o){Ce(this,e);var i=Z({createEl:!1},n),s=Ee(this,t.call(this,r,i,o));if(n.playerOptions.sources&&0!==n.playerOptions.sources.length)r.src(n.playerOptions.sources);else for(var a=0,l=n.playerOptions.techOrder;a<l.length;a++){var c=J(l[a]),u=pn.getTech(c);if(c||(u=lr.getComponent(c)),u&&u.isSupported()){r.loadTech_(c);break}}return s}return ke(e,t),e}(lr);lr.registerComponent("MediaLoader",kn);var En=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.emitTapEvents(),o.enable(),o}return ke(e,t),e.prototype.createEl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=r({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===e&&Me.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),o=r({role:"button"},o),this.tabIndex_=n.tabIndex;var i=t.prototype.createEl.call(this,e,n,o);return this.createControlTextEl(i),i},e.prototype.dispose=function(){this.controlTextEl_=null,t.prototype.dispose.call(this)},e.prototype.createControlTextEl=function(t){return this.controlTextEl_=f("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_},e.prototype.controlText=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===t)return this.controlText_||"Need Text";var r=this.localize(t);this.controlText_=t,v(this.controlTextEl_,r),this.nonIconControl||e.setAttribute("title",r)},e.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},e.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},e.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},e.prototype.handleClick=function(t){},e.prototype.handleFocus=function(t){U(Jt,"keydown",Ge(this,this.handleKeyPress))},e.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.trigger("click")):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,e)},e.prototype.handleBlur=function(t){q(Jt,"keydown",Ge(this,this.handleKeyPress))},e}(lr);lr.registerComponent("ClickableComponent",En);var Sn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.update(),r.on("posterchange",Ge(o,o.update)),o}return ke(e,t),e.prototype.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},e.prototype.createEl=function(){var t=f("div",{className:"vjs-poster",tabIndex:-1});return _e||(this.fallbackImg_=f("img"),t.appendChild(this.fallbackImg_)),t},e.prototype.update=function(t){var e=this.player().poster();this.setSrc(e),e?this.show():this.hide()},e.prototype.setSrc=function(t){if(this.fallbackImg_)this.fallbackImg_.src=t;else{var e="";t&&(e='url("'+t+'")'),this.el_.style.backgroundImage=e}},e.prototype.handleClick=function(t){this.player_.controls()&&(this.player_.paused()?lt(this.player_.play()):this.player_.pause())},e}(En);lr.registerComponent("PosterImage",Sn);var wn={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'},xn=function(t){function e(r,n,o){Ce(this,e);var i=Ee(this,t.call(this,r,n,o));return r.on("loadstart",Ge(i,i.toggleDisplay)),r.on("texttrackchange",Ge(i,i.updateDisplay)),r.on("loadstart",Ge(i,i.preselectTrack)),r.ready(Ge(i,function(){if(r.tech_&&r.tech_.featuresNativeTextTracks)return void this.hide();r.on("fullscreenchange",Ge(this,this.updateDisplay));for(var t=this.options_.playerOptions.tracks||[],e=0;e<t.length;e++)this.player_.addRemoteTextTrack(t[e],!0);this.preselectTrack()})),i}return ke(e,t),e.prototype.preselectTrack=function(){for(var t={captions:1,subtitles:1},e=this.player_.textTracks(),r=this.player_.cache_.selectedLanguage,n=void 0,o=void 0,i=void 0,s=0;s<e.length;s++){var a=e[s];r&&r.enabled&&r.language===a.language?a.kind===r.kind?i=a:i||(i=a):r&&!r.enabled?(i=null,n=null,o=null):a.default&&("descriptions"!==a.kind||n?a.kind in t&&!o&&(o=a):n=a)}i?i.mode="showing":o?o.mode="showing":n&&(n.mode="showing")},e.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},e.prototype.clearDisplay=function(){"function"==typeof Kt.WebVTT&&Kt.WebVTT.processCues(Kt,[],this.el_)},e.prototype.updateDisplay=function(){var t=this.player_.textTracks();this.clearDisplay();for(var e=null,r=null,n=t.length;n--;){var o=t[n];"showing"===o.mode&&("descriptions"===o.kind?e=o:r=o)}r?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(r)):e&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(e))},e.prototype.updateForTrack=function(t){if("function"==typeof Kt.WebVTT&&t.activeCues){for(var e=[],r=0;r<t.activeCues.length;r++)e.push(t.activeCues[r]);if(Kt.WebVTT.processCues(Kt,e,this.el_),this.player_.textTrackSettings)for(var n=this.player_.textTrackSettings.getValues(),o=e.length;o--;){var i=e[o];if(i){var s=i.displayState;if(n.color&&(s.firstChild.style.color=n.color),n.textOpacity&&Dt(s.firstChild,"color",It(n.color||"#fff",n.textOpacity)),n.backgroundColor&&(s.firstChild.style.backgroundColor=n.backgroundColor),n.backgroundOpacity&&Dt(s.firstChild,"backgroundColor",It(n.backgroundColor||"#000",n.backgroundOpacity)),n.windowColor&&(n.windowOpacity?Dt(s,"backgroundColor",It(n.windowColor,n.windowOpacity)):s.style.backgroundColor=n.windowColor),n.edgeStyle&&("dropshadow"===n.edgeStyle?s.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===n.edgeStyle?s.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===n.edgeStyle?s.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===n.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),n.fontPercent&&1!==n.fontPercent){var a=Kt.parseFloat(s.style.fontSize);s.style.fontSize=a*n.fontPercent+"px",s.style.height="auto",s.style.top="auto",s.style.bottom="2px"}n.fontFamily&&"default"!==n.fontFamily&&("small-caps"===n.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=wn[n.fontFamily])}}}},e}(lr);lr.registerComponent("TextTrackDisplay",xn);var jn=function(t){function e(){return Ce(this,e),Ee(this,t.apply(this,arguments))}return ke(e,t),e.prototype.createEl=function(){var e=this.player_.isAudio(),r=this.localize(e?"Audio Player":"Video Player"),n=f("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[r])}),o=t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return o.appendChild(n),o},e}(lr);lr.registerComponent("LoadingSpinner",jn);var Pn=function(t){function e(){return Ce(this,e),Ee(this,t.apply(this,arguments))}return ke(e,t),e.prototype.createEl=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t="button",e=r({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},e),n=r({type:"button"},n);var o=lr.prototype.createEl.call(this,t,e,n);return this.createControlTextEl(o),o},e.prototype.addChild=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.constructor.name;return Me.warn("Adding an actionable (user controllable) child to a Button ("+r+") is not supported; use a ClickableComponent instead."),lr.prototype.addChild.call(this,t,e)},e.prototype.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},e.prototype.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},e.prototype.handleKeyPress=function(e){32!==e.which&&13!==e.which&&t.prototype.handleKeyPress.call(this,e)},e}(En);lr.registerComponent("Button",Pn);var An=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.mouseused_=!1,o.on("mousedown",o.handleMouseDown),o}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-big-play-button"},e.prototype.handleClick=function(t){var e=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY)return void lt(e);var r=this.player_.getChild("controlBar"),n=r&&r.getChild("playToggle");if(!n)return void this.player_.focus();var o=function(){return n.focus()};at(e)?e.then(o,function(){}):this.setTimeout(o,1)},e.prototype.handleKeyPress=function(e){this.mouseused_=!1,t.prototype.handleKeyPress.call(this,e)},e.prototype.handleMouseDown=function(t){this.mouseused_=!0},e}(Pn);An.prototype.controlText_="Play Video",lr.registerComponent("BigPlayButton",An);var On=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.controlText(n&&n.controlText||o.localize("Close")),o}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-close-button "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},e}(Pn);lr.registerComponent("CloseButton",On);var Mn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.on(r,"play",o.handlePlay),o.on(r,"pause",o.handlePause),o.on(r,"ended",o.handleEnded),o}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.prototype.handleSeeked=function(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)},e.prototype.handlePlay=function(t){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},e.prototype.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},e.prototype.handleEnded=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},e}(Pn);Mn.prototype.controlText_="Play",lr.registerComponent("PlayToggle",Mn);var Nn=function(t,e){t=t<0?0:t;var r=Math.floor(t%60),n=Math.floor(t/60%60),o=Math.floor(t/3600),i=Math.floor(e/60%60),s=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(o=n=r="-"),o=o>0||s>0?o+":":"",n=((o||i>=10)&&n<10?"0"+n:n)+":",r=r<10?"0"+r:r,o+n+r},In=Nn,Dn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return In(t,e)},Ln=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.throttledUpdateContent=Ye(Ge(o,o.updateContent),25),o.on(r,"timeupdate",o.throttledUpdateContent),o}return ke(e,t),e.prototype.createEl=function(e){var r=this.buildCSSClass(),n=t.prototype.createEl.call(this,"div",{className:r+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=f("span",{className:r+"-display"},{"aria-live":"off"}),this.updateTextNode_(),n.appendChild(this.contentEl_),n},e.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,t.prototype.dispose.call(this)},e.prototype.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=Jt.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},e.prototype.formatTime_=function(t){return Dn(t)},e.prototype.updateFormattedTime_=function(t){var e=this.formatTime_(t);e!==this.formattedTime_&&(this.formattedTime_=e,this.requestAnimationFrame(this.updateTextNode_))},e.prototype.updateContent=function(t){},e}(lr);Ln.prototype.labelText_="Time",Ln.prototype.controlText_="Time",lr.registerComponent("TimeDisplay",Ln);var Rn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.on(r,"ended",o.handleEnded),o}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-current-time"},e.prototype.updateContent=function(t){var e=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(e)},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},e}(Ln);Rn.prototype.labelText_="Current Time",Rn.prototype.controlText_="Current Time",lr.registerComponent("CurrentTimeDisplay",Rn);var Fn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.on(r,"durationchange",o.updateContent),o.on(r,"loadedmetadata",o.throttledUpdateContent),o}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-duration"},e.prototype.updateContent=function(t){var e=this.player_.duration();e&&this.duration_!==e&&(this.duration_=e,this.updateFormattedTime_(e))},e}(Ln);Fn.prototype.labelText_="Duration",Fn.prototype.controlText_="Duration",lr.registerComponent("DurationDisplay",Fn);var Bn=function(t){function e(){return Ce(this,e),Ee(this,t.apply(this,arguments))}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},e}(lr);lr.registerComponent("TimeDivider",Bn);var Hn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.on(r,"durationchange",o.throttledUpdateContent),o.on(r,"ended",o.handleEnded),o}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-remaining-time"},e.prototype.formatTime_=function(e){return"-"+t.prototype.formatTime_.call(this,e)},e.prototype.updateContent=function(t){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(0)},e}(Ln);Hn.prototype.labelText_="Remaining Time",Hn.prototype.controlText_="Remaining Time",lr.registerComponent("RemainingTimeDisplay",Hn);var Vn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.updateShowing(),o.on(o.player(),"durationchange",o.updateShowing),o}return ke(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=f("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},e.prototype.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},e.prototype.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},e}(lr);lr.registerComponent("LiveDisplay",Vn);var zn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.bar=o.getChild(o.options_.barName),o.vertical(!!o.options_.vertical),o.enable(),o}return ke(e,t),e.prototype.enabled=function(){return this.enabled_},e.prototype.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},e.prototype.disable=function(){if(this.enabled()){var t=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},e.prototype.createEl=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.className=n.className+" vjs-slider",n=r({tabIndex:0},n),o=r({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},o),t.prototype.createEl.call(this,e,n,o)},e.prototype.handleMouseDown=function(t){var e=this.bar.el_.ownerDocument;"mousedown"===t.type&&t.preventDefault(),"touchstart"!==t.type||pe||t.preventDefault(),w(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(e,"mousemove",this.handleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchmove",this.handleMouseMove),this.on(e,"touchend",this.handleMouseUp),this.handleMouseMove(t)},e.prototype.handleMouseMove=function(t){},e.prototype.handleMouseUp=function(){var t=this.bar.el_.ownerDocument;x(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},e.prototype.update=function(){if(this.el_){var t=this.getPercent(),e=this.bar;if(e){("number"!=typeof t||t!==t||t<0||t===1/0)&&(t=0);var r=(100*t).toFixed(2)+"%",n=e.el().style;return this.vertical()?n.height=r:n.width=r,t}}},e.prototype.calculateDistance=function(t){var e=A(this.el_,t);return this.vertical()?e.y:e.x},e.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},e.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.prototype.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},e.prototype.vertical=function(t){if(void 0===t)return this.vertical_||!1;this.vertical_=!!t,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},e}(lr);lr.registerComponent("Slider",zn);var Wn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.partEls_=[],o.on(r,"progress",o.update),o}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"</span>: 0%</span>"})},e.prototype.dispose=function(){this.partEls_=null,t.prototype.dispose.call(this)},e.prototype.update=function(t){var e=this.player_.buffered(),r=this.player_.duration(),n=this.player_.bufferedEnd(),o=this.partEls_,i=function(t,e){var r=t/e||0;return 100*(r>=1?1:r)+"%"};this.el_.style.width=i(n,r);for(var s=0;s<e.length;s++){var a=e.start(s),l=e.end(s),c=o[s];c||(c=this.el_.appendChild(f()),o[s]=c),c.style.left=i(a,n),c.style.width=i(l-a,n)}for(var u=o.length;u>e.length;u--)this.el_.removeChild(o[u-1]);o.length=e.length},e}(lr);lr.registerComponent("LoadProgressBar",Wn);var Un=function(t){function e(){return Ce(this,e),Ee(this,t.apply(this,arguments))}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},e.prototype.update=function(t,e,r){var n=j(this.el_),o=j(this.player_.el()),i=t.width*e;if(o&&n){var s=t.left-o.left+i,a=t.width-i+(o.right-t.right),l=n.width/2;s<l?l+=l-s:a<l&&(l=a),l<0?l=0:l>n.width&&(l=n.width),this.el_.style.right="-"+l+"px",v(this.el_,r)}},e}(lr);lr.registerComponent("TimeTooltip",Un);var qn=function(t){function e(){return Ce(this,e),Ee(this,t.apply(this,arguments))}return ke(e,t),e.prototype.createEl=function(){return t.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>"})},e.prototype.update=function(t,e){var r=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var n=r.player_.scrubbing()?r.player_.getCache().currentTime:r.player_.currentTime(),o=Dn(n,r.player_.duration()),i=r.getChild("timeTooltip");i&&i.update(t,e,o)})},e}(lr);qn.prototype.options_={children:[]},ve&&!(ve>8)||oe||se||qn.prototype.options_.children.push("timeTooltip"),lr.registerComponent("PlayProgressBar",qn);var Kn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.update=Ye(Ge(o,o.update),25),o}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},e.prototype.update=function(t,e){var r=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var n=r.player_.duration(),o=Dn(e*n,n);r.el_.style.left=t.width*e+"px",r.getChild("timeTooltip").update(t,e,o)})},e}(lr);Kn.prototype.options_={children:["timeTooltip"]},lr.registerComponent("MouseTimeDisplay",Kn);var Xn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.setEventHandlers_(),o}return ke(e,t),e.prototype.setEventHandlers_=function(){var t=this;this.update=Ye(Ge(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.updateInterval=null,this.on(this.player_,["playing"],function(){t.clearInterval(t.updateInterval),t.updateInterval=t.setInterval(function(){t.requestAnimationFrame(function(){t.update()})},30)}),this.on(this.player_,["ended","pause","waiting"],function(){t.clearInterval(t.updateInterval)}),this.on(this.player_,["timeupdate","ended"],this.update)},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},e.prototype.update_=function(t,e){var r=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*e).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Dn(t,r),Dn(r,r)],"{1} of {2}")),this.bar.update(j(this.el_),e)},e.prototype.update=function(e){var r=t.prototype.update.call(this);return this.update_(this.getCurrentTime_(),r),r},e.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},e.prototype.handleEnded=function(t){this.update_(this.player_.duration(),1)},e.prototype.getPercent=function(){var t=this.getCurrentTime_()/this.player_.duration();return t>=1?1:t},e.prototype.handleMouseDown=function(e){L(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),t.prototype.handleMouseDown.call(this,e))},e.prototype.handleMouseMove=function(t){if(L(t)){var e=this.calculateDistance(t)*this.player_.duration();e===this.player_.duration()&&(e-=.1),this.player_.currentTime(e)}},e.prototype.enable=function(){t.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},e.prototype.disable=function(){t.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},e.prototype.handleMouseUp=function(e){t.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&<(this.player_.play())},e.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},e.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},e.prototype.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.handleAction(e)):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,e)},e}(zn);Xn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},ve&&!(ve>8)||oe||se||Xn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Xn.prototype.playerEvent="timeupdate",lr.registerComponent("SeekBar",Xn);var $n=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.handleMouseMove=Ye(Ge(o,o.handleMouseMove),25),o.throttledHandleMouseSeek=Ye(Ge(o,o.handleMouseSeek),25),o.enable(),o}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},e.prototype.handleMouseMove=function(t){var e=this.getChild("seekBar");if(e){var r=e.getChild("mouseTimeDisplay"),n=e.el(),o=j(n),i=A(n,t).x;i>1?i=1:i<0&&(i=0),r&&r.update(o,i)}},e.prototype.handleMouseSeek=function(t){var e=this.getChild("seekBar");e&&e.handleMouseMove(t)},e.prototype.enabled=function(){return this.enabled_},e.prototype.disable=function(){this.children().forEach(function(t){return t.disable&&t.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},e.prototype.enable=function(){this.children().forEach(function(t){return t.enable&&t.enable()}),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},e.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument,r=this.getChild("seekBar");r&&r.handleMouseDown(t),this.on(e,"mousemove",this.throttledHandleMouseSeek),this.on(e,"touchmove",this.throttledHandleMouseSeek),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument,r=this.getChild("seekBar");r&&r.handleMouseUp(t),this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e}(lr);$n.prototype.options_={children:["seekBar"]},lr.registerComponent("ProgressControl",$n);var Gn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.on(r,"fullscreenchange",o.handleFullscreenChange),!1===Jt[cr.fullscreenEnabled]&&o.disable(),o}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleFullscreenChange=function(t){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},e.prototype.handleClick=function(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},e}(Pn);Gn.prototype.controlText_="Fullscreen",lr.registerComponent("FullscreenToggle",Gn);var Yn=function(t,e){e.tech_&&!e.tech_.featuresVolumeControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")})},Jn=function(t){function e(){return Ce(this,e),Ee(this,t.apply(this,arguments))}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},e}(lr);lr.registerComponent("VolumeLevel",Jn);var Qn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.on("slideractive",o.updateLastVolume_),o.on(r,"volumechange",o.updateARIAAttributes),r.ready(function(){return o.updateARIAAttributes()}),o}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},e.prototype.handleMouseDown=function(e){L(e)&&t.prototype.handleMouseDown.call(this,e)},e.prototype.handleMouseMove=function(t){L(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},e.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},e.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},
|
|
|
e.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},e.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},e.prototype.updateARIAAttributes=function(t){var e=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",e),this.el_.setAttribute("aria-valuetext",e+"%")},e.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},e.prototype.updateLastVolume_=function(){var t=this,e=this.player_.volume();this.one("sliderinactive",function(){0===t.player_.volume()&&t.player_.lastVolume_(e)})},e}(zn);Qn.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Qn.prototype.playerEvent="volumechange",lr.registerComponent("VolumeBar",Qn);var Zn=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ce(this,e),n.vertical=n.vertical||!1,(void 0===n.volumeBar||o(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical);var i=Ee(this,t.call(this,r,n));return Yn(i,r),i.throttledHandleMouseMove=Ye(Ge(i,i.handleMouseMove),25),i.on("mousedown",i.handleMouseDown),i.on("touchstart",i.handleMouseDown),i.on(i.volumeBar,["focus","slideractive"],function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")}),i.on(i.volumeBar,["blur","sliderinactive"],function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")}),i}return ke(e,t),e.prototype.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},e.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument;this.on(e,"mousemove",this.throttledHandleMouseMove),this.on(e,"touchmove",this.throttledHandleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseMove),this.off(e,"touchmove",this.throttledHandleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},e}(lr);Zn.prototype.options_={children:["volumeBar"]},lr.registerComponent("VolumeControl",Zn);var to=function(t,e){e.tech_&&!e.tech_.featuresMuteControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",function(){e.tech_.featuresMuteControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")})},eo=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return to(o,r),o.on(r,["loadstart","volumechange"],o.update),o}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){var e=this.player_.volume(),r=this.player_.lastVolume_();if(0===e){var n=r<.1?.1:r;this.player_.volume(n),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},e.prototype.update=function(t){this.updateIcon_(),this.updateControlText_()},e.prototype.updateIcon_=function(){var t=this.player_.volume(),e=3;oe&&this.player_.muted(this.player_.tech_.el_.muted),0===t||this.player_.muted()?e=0:t<.33?e=1:t<.67&&(e=2);for(var r=0;r<4;r++)_(this.el_,"vjs-vol-"+r);m(this.el_,"vjs-vol-"+e)},e.prototype.updateControlText_=function(){var t=this.player_.muted()||0===this.player_.volume(),e=t?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},e}(Pn);eo.prototype.controlText_="Mute",lr.registerComponent("MuteToggle",eo);var ro=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ce(this,e),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||o(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline);var i=Ee(this,t.call(this,r,n));return i.on(r,["loadstart"],i.volumePanelState_),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}return ke(e,t),e.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},e.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},e.prototype.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},e.prototype.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},e}(lr);ro.prototype.options_={children:["muteToggle","volumeControl"]},lr.registerComponent("VolumePanel",ro);var no=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return n&&(o.menuButton_=n.menuButton),o.focusedChild_=-1,o.on("keydown",o.handleKeyPress),o}return ke(e,t),e.prototype.addItem=function(t){this.addChild(t),t.on("click",Ge(this,function(e){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==t.name()&&this.menuButton_.focus())}))},e.prototype.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=f(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var r=t.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return r.appendChild(this.contentEl_),U(r,"click",function(t){t.preventDefault(),t.stopImmediatePropagation()}),r},e.prototype.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},e.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},e.prototype.stepForward=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_+1),this.focus(t)},e.prototype.stepBack=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_-1),this.focus(t)},e.prototype.focus=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.children().slice();e.length&&e[0].className&&/vjs-menu-title/.test(e[0].className)&&e.shift(),e.length>0&&(t<0?t=0:t>=e.length&&(t=e.length-1),this.focusedChild_=t,e[t].el_.focus())},e}(lr);lr.registerComponent("Menu",no);var oo=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ce(this,e);var o=Ee(this,t.call(this,r,n));o.menuButton_=new Pn(r,n),o.menuButton_.controlText(o.controlText_),o.menuButton_.el_.setAttribute("aria-haspopup","true");var i=Pn.prototype.buildCSSClass();return o.menuButton_.el_.className=o.buildCSSClass()+" "+i,o.menuButton_.removeClass("vjs-control"),o.addChild(o.menuButton_),o.update(),o.enabled_=!0,o.on(o.menuButton_,"tap",o.handleClick),o.on(o.menuButton_,"click",o.handleClick),o.on(o.menuButton_,"focus",o.handleFocus),o.on(o.menuButton_,"blur",o.handleBlur),o.on("keydown",o.handleSubmenuKeyPress),o}return ke(e,t),e.prototype.update=function(){var t=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=t,this.addChild(t),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},e.prototype.createMenu=function(){var t=new no(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var e=f("li",{className:"vjs-menu-title",innerHTML:J(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,t.children_.unshift(e),y(e,t.contentEl())}if(this.items=this.createItems(),this.items)for(var r=0;r<this.items.length;r++)t.addItem(this.items[r]);return t},e.prototype.createItems=function(){},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},e.prototype.buildWrapperCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+Pn.prototype.buildCSSClass()+" "+t.prototype.buildCSSClass.call(this)},e.prototype.buildCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+t.prototype.buildCSSClass.call(this)},e.prototype.controlText=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(t,e)},e.prototype.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",Ge(this,function(t){this.unpressButton(),this.el_.blur()})),this.buttonPressed_?this.unpressButton():this.pressButton()},e.prototype.focus=function(){this.menuButton_.focus()},e.prototype.blur=function(){this.menuButton_.blur()},e.prototype.handleFocus=function(){U(Jt,"keydown",Ge(this,this.handleKeyPress))},e.prototype.handleBlur=function(){q(Jt,"keydown",Ge(this,this.handleKeyPress))},e.prototype.handleKeyPress=function(t){27===t.which||9===t.which?(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus())):38!==t.which&&40!==t.which||this.buttonPressed_||(this.pressButton(),t.preventDefault())},e.prototype.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus()))},e.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),oe&&p())return;this.menu.focus()}},e.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},e.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},e.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},e}(lr);lr.registerComponent("MenuButton",oo);var io=function(t){function e(r,n){Ce(this,e);var o=n.tracks,i=Ee(this,t.call(this,r,n));if(i.items.length<=1&&i.hide(),!o)return Ee(i);var s=Ge(i,i.update);return o.addEventListener("removetrack",s),o.addEventListener("addtrack",s),i.player_.on("ready",s),i.player_.on("dispose",function(){o.removeEventListener("removetrack",s),o.removeEventListener("addtrack",s)}),i}return ke(e,t),e}(oo);lr.registerComponent("TrackButton",io);var so=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.selectable=n.selectable,o.isSelected_=n.selected||!1,o.multiSelectable=n.multiSelectable,o.selected(o.isSelected_),o.selectable?o.multiSelectable?o.el_.setAttribute("role","menuitemcheckbox"):o.el_.setAttribute("role","menuitemradio"):o.el_.setAttribute("role","menuitem"),o}return ke(e,t),e.prototype.createEl=function(e,n,o){return this.nonIconControl=!0,t.prototype.createEl.call(this,"li",r({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},n),o)},e.prototype.handleClick=function(t){this.selected(!0)},e.prototype.selected=function(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},e}(En);lr.registerComponent("MenuItem",so);var ao=function(t){function e(r,n){Ce(this,e);var o=n.track,i=r.textTracks();n.label=o.label||o.language||"Unknown",n.selected="showing"===o.mode;var s=Ee(this,t.call(this,r,n));s.track=o;var a=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];s.handleTracksChange.apply(s,e)},l=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];s.handleSelectedLanguageChange.apply(s,e)};if(r.on(["loadstart","texttrackchange"],a),i.addEventListener("change",a),i.addEventListener("selectedlanguagechange",l),s.on("dispose",function(){r.off(["loadstart","texttrackchange"],a),i.removeEventListener("change",a),i.removeEventListener("selectedlanguagechange",l)}),void 0===i.onchange){var c=void 0;s.on(["tap","click"],function(){if("object"!==Te(Kt.Event))try{c=new Kt.Event("change")}catch(t){}c||(c=Jt.createEvent("Event"),c.initEvent("change",!0,!0)),i.dispatchEvent(c)})}return s.handleTracksChange(),s}return ke(e,t),e.prototype.handleClick=function(e){var r=this.track.kind,n=this.track.kinds,o=this.player_.textTracks();if(n||(n=[r]),t.prototype.handleClick.call(this,e),o)for(var i=0;i<o.length;i++){var s=o[i];s===this.track&&n.indexOf(s.kind)>-1?"showing"!==s.mode&&(s.mode="showing"):"disabled"!==s.mode&&(s.mode="disabled")}},e.prototype.handleTracksChange=function(t){var e="showing"===this.track.mode;e!==this.isSelected_&&this.selected(e)},e.prototype.handleSelectedLanguageChange=function(t){if("showing"===this.track.mode){var e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},e.prototype.dispose=function(){this.track=null,t.prototype.dispose.call(this)},e}(so);lr.registerComponent("TextTrackMenuItem",ao);var lo=function(t){function e(r,n){return Ce(this,e),n.track={player:r,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,Ee(this,t.call(this,r,n))}return ke(e,t),e.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),r=!0,n=0,o=e.length;n<o;n++){var i=e[n];if(this.options_.kinds.indexOf(i.kind)>-1&&"showing"===i.mode){r=!1;break}}r!==this.isSelected_&&this.selected(r)},e.prototype.handleSelectedLanguageChange=function(t){for(var e=this.player().textTracks(),r=!0,n=0,o=e.length;n<o;n++){var i=e[n];if(["captions","descriptions","subtitles"].indexOf(i.kind)>-1&&"showing"===i.mode){r=!1;break}}r&&(this.player_.cache_.selectedLanguage={enabled:!1})},e}(ao);lr.registerComponent("OffTextTrackMenuItem",lo);var co=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ce(this,e),n.tracks=r.textTracks(),Ee(this,t.call(this,r,n))}return ke(e,t),e.prototype.createItems=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ao,r=void 0;this.label_&&(r=this.label_+" off"),t.push(new lo(this.player_,{kinds:this.kinds_,kind:this.kind_,label:r})),this.hideThreshold_+=1;var n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var o=0;o<n.length;o++){var i=n[o];if(this.kinds_.indexOf(i.kind)>-1){var s=new e(this.player_,{track:i,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+i.kind+"-menu-item"),t.push(s)}}return t},e}(io);lr.registerComponent("TextTrackButton",co);var uo=function(t){function e(r,n){Ce(this,e);var o=n.track,i=n.cue,s=r.currentTime();n.selectable=!0,n.multiSelectable=!1,n.label=i.text,n.selected=i.startTime<=s&&s<i.endTime;var a=Ee(this,t.call(this,r,n));return a.track=o,a.cue=i,o.addEventListener("cuechange",Ge(a,a.update)),a}return ke(e,t),e.prototype.handleClick=function(e){t.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},e.prototype.update=function(t){var e=this.cue,r=this.player_.currentTime();this.selected(e.startTime<=r&&r<e.endTime)},e}(so);lr.registerComponent("ChaptersTrackMenuItem",uo);var ho=function(t){function e(r,n,o){return Ce(this,e),Ee(this,t.call(this,r,n,o))}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.update=function(e){this.track_&&(!e||"addtrack"!==e.type&&"removetrack"!==e.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},e.prototype.setTrack=function(t){if(this.track_!==t){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=t,this.track_){this.track_.mode="hidden";var r=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);r&&r.addEventListener("load",this.updateHandler_)}}},e.prototype.findChaptersTrack=function(){for(var t=this.player_.textTracks()||[],e=t.length-1;e>=0;e--){var r=t[e];if(r.kind===this.kind_)return r}},e.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(J(this.kind_))},e.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},e.prototype.createItems=function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var r=0,n=e.length;r<n;r++){var o=e[r],i=new uo(this.player_,{track:this.track_,cue:o});t.push(i)}return t},e}(co);ho.prototype.kind_="chapters",ho.prototype.controlText_="Chapters",lr.registerComponent("ChaptersButton",ho);var po=function(t){function e(r,n,o){Ce(this,e);var i=Ee(this,t.call(this,r,n,o)),s=r.textTracks(),a=Ge(i,i.handleTracksChange);return s.addEventListener("change",a),i.on("dispose",function(){s.removeEventListener("change",a)}),i}return ke(e,t),e.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),r=!1,n=0,o=e.length;n<o;n++){var i=e[n];if(i.kind!==this.kind_&&"showing"===i.mode){r=!0;break}}r?this.disable():this.enable()},e.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildWrapperCSSClass.call(this)},e}(co);po.prototype.kind_="descriptions",po.prototype.controlText_="Descriptions",lr.registerComponent("DescriptionsButton",po);var fo=function(t){function e(r,n,o){return Ce(this,e),Ee(this,t.call(this,r,n,o))}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildWrapperCSSClass.call(this)},e}(co);fo.prototype.kind_="subtitles",fo.prototype.controlText_="Subtitles",lr.registerComponent("SubtitlesButton",fo);var vo=function(t){function e(r,n){Ce(this,e),n.track={player:r,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem";var o=Ee(this,t.call(this,r,n));return o.addClass("vjs-texttrack-settings"),o.controlText(", opens "+n.kind+" settings dialog"),o}return ke(e,t),e.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").open()},e}(ao);lr.registerComponent("CaptionSettingsMenuItem",vo);var yo=function(t){function e(r,n,o){return Ce(this,e),Ee(this,t.call(this,r,n,o))}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-captions-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-captions-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new vo(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),t.prototype.createItems.call(this,e)},e}(co);yo.prototype.kind_="captions",yo.prototype.controlText_="Captions",lr.registerComponent("CaptionsButton",yo);var go=function(t){function e(){return Ce(this,e),Ee(this,t.apply(this,arguments))}return ke(e,t),e.prototype.createEl=function(e,n,o){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),i+="</span>",t.prototype.createEl.call(this,e,r({innerHTML:i},n),o)},e}(ao);lr.registerComponent("SubsCapsMenuItem",go);var mo=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(o.player_.language_)>-1&&(o.label_="captions"),o.menuButton_.controlText(J(o.label_)),o}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new vo(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=t.prototype.createItems.call(this,e,go)},e}(co);mo.prototype.kinds_=["captions","subtitles"],mo.prototype.controlText_="Subtitles",lr.registerComponent("SubsCapsButton",mo);var _o=function(t){function e(r,n){Ce(this,e);var o=n.track,i=r.audioTracks();n.label=o.label||o.language||"Unknown",n.selected=o.enabled;var s=Ee(this,t.call(this,r,n));s.track=o,s.addClass("vjs-"+o.kind+"-menu-item");var a=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];s.handleTracksChange.apply(s,e)};return i.addEventListener("change",a),s.on("dispose",function(){i.removeEventListener("change",a)}),s}return ke(e,t),e.prototype.createEl=function(e,n,o){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "),i+="</span>",t.prototype.createEl.call(this,e,r({innerHTML:i},n),o)},e.prototype.handleClick=function(e){var r=this.player_.audioTracks();t.prototype.handleClick.call(this,e);for(var n=0;n<r.length;n++){var o=r[n];o.enabled=o===this.track}},e.prototype.handleTracksChange=function(t){this.selected(this.track.enabled)},e}(so);lr.registerComponent("AudioTrackMenuItem",_o);var bo=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ce(this,e),n.tracks=r.audioTracks(),Ee(this,t.call(this,r,n))}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-audio-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createItems=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;for(var e=this.player_.audioTracks(),r=0;r<e.length;r++){var n=e[r];t.push(new _o(this.player_,{track:n,selectable:!0,multiSelectable:!1}))}return t},e}(io);bo.prototype.controlText_="Audio Track",lr.registerComponent("AudioTrackButton",bo);var To=function(t){function e(r,n){Ce(this,e);var o=n.rate,i=parseFloat(o,10);n.label=o,n.selected=1===i,n.selectable=!0,n.multiSelectable=!1;var s=Ee(this,t.call(this,r,n));return s.label=o,s.rate=i,s.on(r,"ratechange",s.update),s}return ke(e,t),e.prototype.handleClick=function(e){t.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},e.prototype.update=function(t){this.selected(this.player().playbackRate()===this.rate)},e}(so);To.prototype.contentElType="button",lr.registerComponent("PlaybackRateMenuItem",To);var Co=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.updateVisibility(),o.updateLabel(),o.on(r,"loadstart",o.updateVisibility),o.on(r,"ratechange",o.updateLabel),o}return ke(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this);return this.labelEl_=f("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_),e},e.prototype.dispose=function(){this.labelEl_=null,t.prototype.dispose.call(this)},e.prototype.buildCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createMenu=function(){var t=new no(this.player()),e=this.playbackRates();if(e)for(var r=e.length-1;r>=0;r--)t.addChild(new To(this.player(),{rate:e[r]+"x"}));return t},e.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},e.prototype.handleClick=function(t){for(var e=this.player().playbackRate(),r=this.playbackRates(),n=r[0],o=0;o<r.length;o++)if(r[o]>e){n=r[o];break}this.player().playbackRate(n)},e.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},e.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},e.prototype.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},e.prototype.updateLabel=function(t){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},e}(oo);Co.prototype.controlText_="Playback Rate",lr.registerComponent("PlaybackRateMenuButton",Co);var ko=function(t){function e(){return Ce(this,e),Ee(this,t.apply(this,arguments))}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},e}(lr);lr.registerComponent("Spacer",ko);var Eo=function(t){function e(){return Ce(this,e),Ee(this,t.apply(this,arguments))}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return e.innerHTML=" ",e},e}(ko);lr.registerComponent("CustomControlSpacer",Eo);var So=function(t){function e(){return Ce(this,e),Ee(this,t.apply(this,arguments))}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},e}(lr);So.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},lr.registerComponent("ControlBar",So);var wo=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.on(r,"error",o.open),o}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-error-display "+t.prototype.buildCSSClass.call(this)},e.prototype.content=function(){var t=this.player().error();return t?this.localize(t.message):""},e}(Cr);wo.prototype.options_=Z(Cr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),lr.registerComponent("ErrorDisplay",wo);var xo=["#000","Black"],jo=["#00F","Blue"],Po=["#0FF","Cyan"],Ao=["#0F0","Green"],Oo=["#F0F","Magenta"],Mo=["#F00","Red"],No=["#FFF","White"],Io=["#FF0","Yellow"],Do=["1","Opaque"],Lo=["0.5","Semi-Transparent"],Ro=["0","Transparent"],Fo={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[xo,No,Mo,Ao,jo,Io,Oo,Po]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Do,Lo,Ro]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[No,xo,Mo,Ao,jo,Io,Oo,Po]},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(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Do,Lo]},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:[Ro,Lo,Do]}};Fo.windowColor.options=Fo.backgroundColor.options;var Bo=function(r){function n(e,o){Ce(this,n),o.temporary=!1;var i=Ee(this,r.call(this,e,o));return i.updateDisplay=Ge(i,i.updateDisplay),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=f("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),void 0===o.persistTextTrackSettings&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(".vjs-done-button"),"click",function(){i.saveSettings(),i.close()}),i.on(i.$(".vjs-default-button"),"click",function(){i.setDefaults(),i.updateDisplay()}),t(Fo,function(t){i.on(i.$(t.selector),"change",i.updateDisplay)}),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}return ke(n,r),n.prototype.dispose=function(){this.endDialog=null,r.prototype.dispose.call(this)},n.prototype.createElSelect_=function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"label",o=Fo[t],i=o.id.replace("%s",this.id_),s=[r,i].join(" ").trim();return["<"+n+' id="'+i+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(o.label),"</"+n+">",'<select aria-labelledby="'+s+'">'].concat(o.options.map(function(t){var r=i+"-"+t[1].replace(/\W+/g,"");return['<option id="'+r+'" value="'+t[0]+'" ','aria-labelledby="'+s+" "+r+'">',e.localize(t[1]),"</option>"].join("")})).concat("</select>").join("")},n.prototype.createElFgColor_=function(){var t="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",t),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",t),"</span>","</fieldset>"].join("")},n.prototype.createElBgColor_=function(){var t="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",t),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",t),"</span>","</fieldset>"].join("")},n.prototype.createElWinColor_=function(){var t="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",t),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",t),"</span>","</fieldset>"].join("")},n.prototype.createElColors_=function(){return f("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},
|
|
|
n.prototype.createElFont_=function(){return f("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("")})},n.prototype.createElControls_=function(){var t=this.localize("restore all settings to the default values");return f("div",{className:"vjs-track-settings-controls",innerHTML:['<button class="vjs-default-button" title="'+t+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+t+"</span>","</button>",'<button class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},n.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},n.prototype.label=function(){return this.localize("Caption Settings Dialog")},n.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},n.prototype.buildCSSClass=function(){return r.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},n.prototype.getValues=function(){var t=this;return e(Fo,function(e,r,n){var o=Bt(t.$(r.selector),r.parser);return void 0!==o&&(e[n]=o),e},{})},n.prototype.setValues=function(e){var r=this;t(Fo,function(t,n){Ht(r.$(t.selector),e[n],t.parser)})},n.prototype.setDefaults=function(){var e=this;t(Fo,function(t){var r=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=r})},n.prototype.restoreSettings=function(){var t=void 0;try{t=JSON.parse(Kt.localStorage.getItem("vjs-text-track-settings"))}catch(t){Me.warn(t)}t&&this.setValues(t)},n.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?Kt.localStorage.setItem("vjs-text-track-settings",JSON.stringify(t)):Kt.localStorage.removeItem("vjs-text-track-settings")}catch(t){Me.warn(t)}}},n.prototype.updateDisplay=function(){var t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()},n.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(Jt,"keydown",this.handleKeyDown);var t=this.player_.controlBar,e=t&&t.subsCapsButton,r=t&&t.captionsButton;e?e.focus():r&&r.focus()},n}(Cr);lr.registerComponent("TextTrackSettings",Bo);var Ho=function(t){function e(r,n){Ce(this,e);var o=n.ResizeObserver||Kt.ResizeObserver;null===n.ResizeObserver&&(o=!1);var i=Z({createEl:!o},n),s=Ee(this,t.call(this,r,i));return s.ResizeObserver=n.ResizeObserver||Kt.ResizeObserver,s.loadListener_=null,s.resizeObserver_=null,s.debouncedHandler_=Je(function(){s.resizeHandler()},100,!1,r),o?(s.resizeObserver_=new s.ResizeObserver(s.debouncedHandler_),s.resizeObserver_.observe(r.el())):(s.loadListener_=function(){s.el_.contentWindow&&U(s.el_.contentWindow,"resize",s.debouncedHandler_),s.off("load",s.loadListener_)},s.on("load",s.loadListener_)),s}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager"})},e.prototype.resizeHandler=function(){this.player_.trigger("playerresize")},e.prototype.dispose=function(){this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.el_&&this.el_.contentWindow&&q(this.el_.contentWindow,"resize",this.debouncedHandler_),this.loadListener_&&this.off("load",this.loadListener_),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null},e}(lr);lr.registerComponent("ResizeManager",Ho);var Vo=function(t){var e=t.el();if(e.hasAttribute("src"))return t.triggerSourceset(e.src),!0;var r=t.$$("source"),n=[],o="";if(!r.length)return!1;for(var i=0;i<r.length;i++){var s=r[i].src;s&&-1===n.indexOf(s)&&n.push(s)}return!!n.length&&(1===n.length&&(o=n[0]),t.triggerSourceset(o),!0)},zo={};fe||(zo=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(t){var e=Jt.createElement(this.nodeName.toLowerCase());e.innerHTML=t;for(var r=Jt.createDocumentFragment();e.childNodes.length;)r.appendChild(e.childNodes[0]);return this.innerText="",Kt.Element.prototype.appendChild.call(this,r),this.innerHTML}}));var Wo=function(t,e){for(var r={},n=0;n<t.length&&!((r=Object.getOwnPropertyDescriptor(t[n],e))&&r.set&&r.get);n++);return r.enumerable=!0,r.configurable=!0,r},Uo=function(t){return Wo([t.el(),Kt.HTMLMediaElement.prototype,Kt.Element.prototype,zo],"innerHTML")},qo=function(t){var e=t.el();if(!e.resetSourceWatch_){var r={},n=Uo(t),o=function(r){return function(){for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];var s=r.apply(e,o);return Vo(t),s}};["append","appendChild","insertAdjacentHTML"].forEach(function(t){e[t]&&(r[t]=e[t],e[t]=o(r[t]))}),Object.defineProperty(e,"innerHTML",Z(n,{set:o(n.set)})),e.resetSourceWatch_=function(){e.resetSourceWatch_=null,Object.keys(r).forEach(function(t){e[t]=r[t]}),Object.defineProperty(e,"innerHTML",n)},t.one("sourceset",e.resetSourceWatch_)}},Ko={};fe||(Ko=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?Fr(Kt.Element.prototype.getAttribute.call(this,"src")):""},set:function(t){return Kt.Element.prototype.setAttribute.call(this,"src",t),t}}));var Xo=function(t){return Wo([t.el(),Kt.HTMLMediaElement.prototype,Ko],"src")},$o=function(t){if(t.featuresSourceset){var e=t.el();if(!e.resetSourceset_){var r=Xo(t),n=e.setAttribute,o=e.load;Object.defineProperty(e,"src",Z(r,{set:function(n){var o=r.set.call(e,n);return t.triggerSourceset(e.src),o}})),e.setAttribute=function(r,o){var i=n.call(e,r,o);return/src/i.test(r)&&t.triggerSourceset(e.src),i},e.load=function(){var r=o.call(e);return Vo(t)||(t.triggerSourceset(""),qo(t)),r},e.currentSrc?t.triggerSourceset(e.currentSrc):Vo(t)||qo(t),e.resetSourceset_=function(){e.resetSourceset_=null,e.load=o,e.setAttribute=n,Object.defineProperty(e,"src",r),e.resetSourceWatch_&&e.resetSourceWatch_()}}}},Go=Se(["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."]),Yo=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n)),i=r.source,s=!1;if(i&&(o.el_.currentSrc!==i.src||r.tag&&3===r.tag.initNetworkState_)?o.setSource(i):o.handleLateInit_(o.el_),r.enableSourceset&&o.setupSourcesetHandling_(),o.el_.hasChildNodes()){for(var a=o.el_.childNodes,l=a.length,c=[];l--;){var u=a[l];"track"===u.nodeName.toLowerCase()&&(o.featuresNativeTextTracks?(o.remoteTextTrackEls().addTrackElement_(u),o.remoteTextTracks().addTrack(u.track),o.textTracks().addTrack(u.track),s||o.el_.hasAttribute("crossorigin")||!Hr(u.src)||(s=!0)):c.push(u))}for(var h=0;h<c.length;h++)o.el_.removeChild(c[h])}return o.proxyNativeTracks_(),o.featuresNativeTextTracks&&s&&Me.warn(Ne(Go)),o.restoreMetadataTracksInIOSNativePlayer_(),(me||re||ce)&&!0===r.nativeControlsForTouch&&o.setControls(!0),o.proxyWebkitFullscreen_(),o.triggerReady(),o}return ke(e,t),e.prototype.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),e.disposeMediaElement(this.el_),this.options_=null,t.prototype.dispose.call(this)},e.prototype.setupSourcesetHandling_=function(){$o(this)},e.prototype.restoreMetadataTracksInIOSNativePlayer_=function(){var t=this.textTracks(),e=void 0,r=function(){e=[];for(var r=0;r<t.length;r++){var n=t[r];"metadata"===n.kind&&e.push({track:n,storedMode:n.mode})}};r(),t.addEventListener("change",r),this.on("dispose",function(){return t.removeEventListener("change",r)});var n=function r(){for(var n=0;n<e.length;n++){var o=e[n];"disabled"===o.track.mode&&o.track.mode!==o.storedMode&&(o.track.mode=o.storedMode)}t.removeEventListener("change",r)};this.on("webkitbeginfullscreen",function(){t.removeEventListener("change",r),t.removeEventListener("change",n),t.addEventListener("change",n)}),this.on("webkitendfullscreen",function(){t.removeEventListener("change",r),t.addEventListener("change",r),t.removeEventListener("change",n)})},e.prototype.proxyNativeTracks_=function(){var t=this;ln.names.forEach(function(e){var r=ln[e],n=t.el()[r.getterName],o=t[r.getterName]();if(t["featuresNative"+r.capitalName+"Tracks"]&&n&&n.addEventListener){var i={change:function(t){o.trigger({type:"change",target:o,currentTarget:o,srcElement:o})},addtrack:function(t){o.addTrack(t.track)},removetrack:function(t){o.removeTrack(t.track)}},s=function(){for(var t=[],e=0;e<o.length;e++){for(var r=!1,i=0;i<n.length;i++)if(n[i]===o[e]){r=!0;break}r||t.push(o[e])}for(;t.length;)o.removeTrack(t.shift())};Object.keys(i).forEach(function(e){var r=i[e];n.addEventListener(e,r),t.on("dispose",function(t){return n.removeEventListener(e,r)})}),t.on("loadstart",s),t.on("dispose",function(e){return t.off("loadstart",s)})}})},e.prototype.createEl=function(){var t=this.options_.tag;if(!t||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(t){var n=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(n,t),e.disposeMediaElement(t),t=n}else{t=Jt.createElement("video");var o=this.options_.tag&&C(this.options_.tag),i=Z({},o);me&&!0===this.options_.nativeControlsForTouch||delete i.controls,T(t,r(i,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}void 0!==this.options_.preload&&E(t,"preload",this.options_.preload);for(var s=["loop","muted","playsinline","autoplay"],a=0;a<s.length;a++){var l=s[a],c=this.options_[l];void 0!==c&&(c?E(t,l,l):S(t,l),t[l]=c)}return t},e.prototype.handleLateInit_=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var e=!1,r=function(){e=!0};this.on("loadstart",r);var n=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",n),void this.ready(function(){this.off("loadstart",r),this.off("loadedmetadata",n),e||this.trigger("loadstart")})}var o=["loadstart"];o.push("loadedmetadata"),t.readyState>=2&&o.push("loadeddata"),t.readyState>=3&&o.push("canplay"),t.readyState>=4&&o.push("canplaythrough"),this.ready(function(){o.forEach(function(t){this.trigger(t)},this)})}},e.prototype.setCurrentTime=function(t){try{this.el_.currentTime=t}catch(t){Me(t,"Video is not ready. (Video.js)")}},e.prototype.duration=function(){var t=this;if(this.el_.duration===1/0&&se&&pe&&0===this.el_.currentTime){var e=function e(){t.el_.currentTime>0&&(t.el_.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN},e.prototype.width=function(){return this.el_.offsetWidth},e.prototype.height=function(){return this.el_.offsetHeight},e.prototype.proxyWebkitFullscreen_=function(){var t=this;if("webkitDisplayingFullscreen"in this.el_){var e=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},r=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",r),this.on("dispose",function(){t.off("webkitbeginfullscreen",r),t.off("webkitendfullscreen",e)})}},e.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var t=Kt.navigator&&Kt.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},e.prototype.enterFullScreen=function(){var t=this.el_;t.paused&&t.networkState<=t.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){t.pause(),t.webkitEnterFullScreen()},0)):t.webkitEnterFullScreen()},e.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},e.prototype.src=function(t){if(void 0===t)return this.el_.src;this.setSrc(t)},e.prototype.reset=function(){e.resetMediaElement(this.el_)},e.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},e.prototype.setControls=function(t){this.el_.controls=!!t},e.prototype.addTextTrack=function(e,r,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,r,n):t.prototype.addTextTrack.call(this,e,r,n)},e.prototype.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,e);var r=Jt.createElement("track");return e.kind&&(r.kind=e.kind),e.label&&(r.label=e.label),(e.language||e.srclang)&&(r.srclang=e.language||e.srclang),e.default&&(r.default=e.default),e.id&&(r.id=e.id),e.src&&(r.src=e.src),r},e.prototype.addRemoteTextTrack=function(e,r){var n=t.prototype.addRemoteTextTrack.call(this,e,r);return this.featuresNativeTextTracks&&this.el().appendChild(n),n},e.prototype.removeRemoteTextTrack=function(e){if(t.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var r=this.$$("track"),n=r.length;n--;)e!==r[n]&&e!==r[n].track||this.el().removeChild(r[n])},e.prototype.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),Kt.performance&&"function"==typeof Kt.performance.now?t.creationTime=Kt.performance.now():Kt.performance&&Kt.performance.timing&&"number"==typeof Kt.performance.timing.navigationStart&&(t.creationTime=Kt.Date.now()-Kt.performance.timing.navigationStart),t},e}(pn);if(u()){Yo.TEST_VID=Jt.createElement("video");var Jo=Jt.createElement("track");Jo.kind="captions",Jo.srclang="en",Jo.label="English",Yo.TEST_VID.appendChild(Jo)}Yo.isSupported=function(){try{Yo.TEST_VID.volume=.5}catch(t){return!1}return!(!Yo.TEST_VID||!Yo.TEST_VID.canPlayType)},Yo.canPlayType=function(t){return Yo.TEST_VID.canPlayType(t)},Yo.canPlaySource=function(t,e){return Yo.canPlayType(t.type)},Yo.canControlVolume=function(){try{var t=Yo.TEST_VID.volume;return Yo.TEST_VID.volume=t/2+.1,t!==Yo.TEST_VID.volume}catch(t){return!1}},Yo.canMuteVolume=function(){try{var t=Yo.TEST_VID.muted;return Yo.TEST_VID.muted=!t,Yo.TEST_VID.muted?E(Yo.TEST_VID,"muted","muted"):S(Yo.TEST_VID,"muted"),t!==Yo.TEST_VID.muted}catch(t){return!1}},Yo.canControlPlaybackRate=function(){if(se&&pe&&de<58)return!1;try{var t=Yo.TEST_VID.playbackRate;return Yo.TEST_VID.playbackRate=t/2+.1,t!==Yo.TEST_VID.playbackRate}catch(t){return!1}},Yo.canOverrideAttributes=function(){if(fe)return!1;try{var t=function(){};Object.defineProperty(Jt.createElement("video"),"src",{get:t,set:t}),Object.defineProperty(Jt.createElement("audio"),"src",{get:t,set:t}),Object.defineProperty(Jt.createElement("video"),"innerHTML",{get:t,set:t}),Object.defineProperty(Jt.createElement("audio"),"innerHTML",{get:t,set:t})}catch(t){return!1}return!0},Yo.supportsNativeTextTracks=function(){return ge||oe&&pe},Yo.supportsNativeVideoTracks=function(){return!(!Yo.TEST_VID||!Yo.TEST_VID.videoTracks)},Yo.supportsNativeAudioTracks=function(){return!(!Yo.TEST_VID||!Yo.TEST_VID.audioTracks)},Yo.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],Yo.prototype.featuresVolumeControl=Yo.canControlVolume(),Yo.prototype.featuresMuteControl=Yo.canMuteVolume(),Yo.prototype.featuresPlaybackRate=Yo.canControlPlaybackRate(),Yo.prototype.featuresSourceset=Yo.canOverrideAttributes(),Yo.prototype.movingMediaElementInDOM=!oe,Yo.prototype.featuresFullscreenResize=!0,Yo.prototype.featuresProgressEvents=!0,Yo.prototype.featuresTimeupdateEvents=!0,Yo.prototype.featuresNativeTextTracks=Yo.supportsNativeTextTracks(),Yo.prototype.featuresNativeVideoTracks=Yo.supportsNativeVideoTracks(),Yo.prototype.featuresNativeAudioTracks=Yo.supportsNativeAudioTracks();var Qo=Yo.TEST_VID&&Yo.TEST_VID.constructor.prototype.canPlayType,Zo=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,ti=/^video\/mp4/i;Yo.patchCanPlayType=function(){ae>=4&&!ue&&!pe?Yo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Zo.test(t)?"maybe":Qo.call(this,t)}:le&&(Yo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&ti.test(t)?"maybe":Qo.call(this,t)})},Yo.unpatchCanPlayType=function(){var t=Yo.TEST_VID.constructor.prototype.canPlayType;return Yo.TEST_VID.constructor.prototype.canPlayType=Qo,t},Yo.patchCanPlayType(),Yo.disposeMediaElement=function(t){if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},Yo.resetMediaElement=function(t){if(t){for(var e=t.querySelectorAll("source"),r=e.length;r--;)t.removeChild(e[r]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(t){Yo.prototype[t]=function(){return this.el_[t]||this.el_.hasAttribute(t)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(t){Yo.prototype["set"+J(t)]=function(e){this.el_[t]=e,e?this.el_.setAttribute(t,t):this.el_.removeAttribute(t)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(t){Yo.prototype[t]=function(){return this.el_[t]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(t){Yo.prototype["set"+J(t)]=function(e){this.el_[t]=e}}),["pause","load","play"].forEach(function(t){Yo.prototype[t]=function(){return this.el_[t]()}}),pn.withSourceHandlers(Yo),Yo.nativeSourceHandler={},Yo.nativeSourceHandler.canPlayType=function(t){try{return Yo.TEST_VID.canPlayType(t)}catch(t){return""}},Yo.nativeSourceHandler.canHandleSource=function(t,e){if(t.type)return Yo.nativeSourceHandler.canPlayType(t.type);if(t.src){var r=Br(t.src);return Yo.nativeSourceHandler.canPlayType("video/"+r)}return""},Yo.nativeSourceHandler.handleSource=function(t,e,r){e.setSrc(t.src)},Yo.nativeSourceHandler.dispose=function(){},Yo.registerSourceHandler(Yo.nativeSourceHandler),pn.registerTech("Html5",Yo);var ei=Se(["\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 "]),ri=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],ni={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},oi=function(t){function e(n,o,i){if(Ce(this,e),n.id=n.id||o.id||"vjs_video_"+R(),o=r(e.getTagSettings(n),o),o.initChildren=!1,o.createEl=!1,o.evented=!1,o.reportTouchActivity=!1,!o.language)if("function"==typeof n.closest){var s=n.closest("[lang]");s&&s.getAttribute&&(o.language=s.getAttribute("lang"))}else for(var a=n;a&&1===a.nodeType;){if(C(a).hasOwnProperty("lang")){o.language=a.getAttribute("lang");break}a=a.parentNode}var l=Ee(this,t.call(this,null,o,i));if(l.isPosterFromTech_=!1,l.queuedCallbacks_=[],l.isReady_=!1,l.hasStarted_=!1,l.userActive_=!1,!l.options_||!l.options_.techOrder||!l.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(l.tag=n,l.tagAttributes=n&&C(n),l.language(l.options_.language),o.languages){var c={};Object.getOwnPropertyNames(o.languages).forEach(function(t){c[t.toLowerCase()]=o.languages[t]}),l.languages_=c}else l.languages_=e.prototype.options_.languages;l.cache_={},l.poster_=o.poster||"",l.controls_=!!o.controls,l.cache_.lastVolume=1,n.controls=!1,n.removeAttribute("controls"),n.hasAttribute("autoplay")?l.options_.autoplay=!0:l.autoplay(l.options_.autoplay),l.scrubbing_=!1,l.el_=l.createEl(),l.cache_.lastPlaybackRate=l.defaultPlaybackRate(),G(l,{eventBusKey:"el_"});var u=Z(l.options_);if(o.plugins){var h=o.plugins;Object.keys(h).forEach(function(t){if("function"!=typeof this[t])throw new Error('plugin "'+t+'" does not exist');this[t](h[t])},l)}l.options_.playerOptions=u,l.middleware_=[],l.initChildren(),l.isAudio("audio"===n.nodeName.toLowerCase()),l.controls()?l.addClass("vjs-controls-enabled"):l.addClass("vjs-controls-disabled"),l.el_.setAttribute("role","region"),l.isAudio()?l.el_.setAttribute("aria-label",l.localize("Audio Player")):l.el_.setAttribute("aria-label",l.localize("Video Player")),l.isAudio()&&l.addClass("vjs-audio"),l.flexNotSupported_()&&l.addClass("vjs-no-flex"),oe||l.addClass("vjs-workinghover"),e.players[l.id_]=l;var p=Wt.split(".")[0];return l.addClass("vjs-v"+p),l.userActive(!0),l.reportUserActivity(),l.one("play",l.listenForUserActivity_),l.on("fullscreenchange",l.handleFullscreenChange_),l.on("stageclick",l.handleStageClick_),l.changingSrc_=!1,l.playWaitingForReady_=!1,l.playOnLoadstart_=null,l}return ke(e,t),e.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),e.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),At(this),t.prototype.dispose.call(this)},e.prototype.createEl=function(){var e=this.tag,r=void 0,n=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player"),o="video-js"===this.tag.tagName.toLowerCase();n?r=this.el_=e.parentNode:o||(r=this.el_=t.prototype.createEl.call(this,"div"));var i=C(e);if(o){for(r=this.el_=e,e=this.tag=Jt.createElement("video");r.children.length;)e.appendChild(r.firstChild);g(r,"video-js")||m(r,"video-js"),r.appendChild(e),n=this.playerElIngest_=r,["autoplay","controls","crossOrigin","defaultMuted","defaultPlaybackRate","loop","muted","playbackRate","src","volume"].forEach(function(t){void 0!==r[t]&&(e[t]=r[t])})}if(e.setAttribute("tabindex","-1"),ve&&e.setAttribute("role","application"),e.removeAttribute("width"),e.removeAttribute("height"),Object.getOwnPropertyNames(i).forEach(function(t){"class"===t?(r.className+=" "+i[t],o&&(e.className+=" "+i[t])):(r.setAttribute(t,i[t]),o&&e.setAttribute(t,i[t]))}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=r.player=this,this.addClass("vjs-paused"),!0!==Kt.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Xe("vjs-styles-dimensions");var s=De(".vjs-styles-defaults"),a=De("head");a.insertBefore(this.styleEl_,s?s.nextSibling:a.firstChild)}this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var l=e.getElementsByTagName("a"),c=0;c<l.length;c++){var u=l.item(c);m(u,"vjs-hidden"),u.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!n&&e.parentNode.insertBefore(r,e),y(e,r),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_=r,r},e.prototype.width=function(t){return this.dimension("width",t)},e.prototype.height=function(t){return this.dimension("height",t)},e.prototype.dimension=function(t,e){var r=t+"_";if(void 0===e)return this[r]||0;if(""===e)return this[r]=void 0,void this.updateStyleEl_();var n=parseFloat(e);if(isNaN(n))return void Me.error('Improper value "'+e+'" supplied for for '+t);this[r]=n,this.updateStyleEl_()},e.prototype.fluid=function(t){if(void 0===t)return!!this.fluid_;this.fluid_=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.updateStyleEl_()},e.prototype.aspectRatio=function(t){if(void 0===t)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(t))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=t,this.fluid(!0),this.updateStyleEl_()},e.prototype.updateStyleEl_=function(){if(!0===Kt.VIDEOJS_NO_DYNAMIC_STYLE){var t="number"==typeof this.width_?this.width_:this.options_.width,e="number"==typeof this.height_?this.height_:this.options_.height,r=this.tech_&&this.tech_.el();return void(r&&(t>=0&&(r.width=t),e>=0&&(r.height=e)))}var n=void 0,o=void 0,i=void 0,s=void 0;i=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";var a=i.split(":"),l=a[1]/a[0];n=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/l:this.videoWidth()||300,o=void 0!==this.height_?this.height_:n*l,s=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(s),$e(this.styleEl_,"\n ."+s+" {\n width: "+n+"px;\n height: "+o+"px;\n }\n\n ."+s+".vjs-fluid {\n padding-top: "+100*l+"%;\n }\n ")},e.prototype.loadTech_=function(t,e){var n=this;this.tech_&&this.unloadTech_();var o=J(t),i=t.charAt(0).toLowerCase()+t.slice(1);"Html5"!==o&&this.tag&&(pn.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=o,this.isReady_=!1;var s="string"!=typeof this.autoplay()&&this.autoplay(),a={source:e,autoplay:s,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+o+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};un.names.forEach(function(t){var e=un[t];a[e.getterName]=n[e.privateName]}),r(a,this.options_[o]),r(a,this.options_[i]),r(a,this.options_[t.toLowerCase()]),this.tag&&(a.tag=this.tag),e&&e.src===this.cache_.src&&this.cache_.currentTime>0&&(a.startTime=this.cache_.currentTime);var l=pn.getTech(t);if(!l)throw new Error("No Tech named '"+o+"' exists! '"+o+"' should be registered using videojs.registerTech()'");this.tech_=new l(a),this.tech_.ready(Ge(this,this.handleTechReady_),!0),br.jsonToTextTracks(this.textTracksJson_||[],this.tech_),ri.forEach(function(t){n.on(n.tech_,t,n["handleTech"+J(t)+"_"])}),Object.keys(ni).forEach(function(t){n.on(n.tech_,t,function(e){if(0===n.tech_.playbackRate()&&n.tech_.seeking())return void n.queuedCallbacks_.push({callback:n["handleTech"+ni[t]+"_"].bind(n),event:e});n["handleTech"+ni[t]+"_"](e)})}),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===o&&this.tag||y(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},e.prototype.unloadTech_=function(){var t=this;un.names.forEach(function(e){var r=un[e];t[r.privateName]=t[r.getterName]()}),this.textTracksJson_=br.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},e.prototype.tech=function(t){return void 0===t&&Me.warn(Ne(ei)),this.tech_},e.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_)},e.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_)},e.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(t){Me("deleting tag.poster throws in some browsers",t)}},e.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},e.prototype.manualAutoplay_=function(t){var e=this;if(this.tech_&&"string"==typeof t){var r=function(){var t=e.muted();e.muted(!0);var r=e.play();if(r&&r.then&&r.catch)return r.catch(function(r){e.muted(t)})},n=void 0;if("any"===t?(n=this.play())&&n.then&&n.catch&&n.catch(function(){return r()}):n="muted"===t?r():this.play(),n&&n.then&&n.catch)return n.then(function(){e.trigger({type:"autoplay-success",autoplay:t})}).catch(function(r){e.trigger({type:"autoplay-failure",autoplay:t})})}},e.prototype.updateSourceCaches_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=t,r="";if("string"!=typeof e&&(e=t.src,r=t.type),!/^blob:/.test(e)){this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],e&&!r&&(r=Tn(this,e)),this.cache_.source=Z({},t,{src:e,type:r});for(var n=this.cache_.sources.filter(function(t){return t.src&&t.src===e}),o=[],i=this.$$("source"),s=[],a=0;a<i.length;a++){var l=C(i[a]);o.push(l),l.src&&l.src===e&&s.push(l.src)}s.length&&!n.length?this.cache_.sources=o:n.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=e}},e.prototype.handleTechSourceset_=function(t){var e=this;if(!this.changingSrc_&&(this.updateSourceCaches_(t.src),!t.src)){var r=function t(r){"sourceset"!==r.type&&e.updateSourceCaches_(e.techGet_("currentSrc")),e.tech_.off(["sourceset","loadstart"],t)};this.tech_.one(["sourceset","loadstart"],r)}this.trigger({src:t.src,type:"sourceset"})},e.prototype.hasStarted=function(t){if(void 0===t)return this.hasStarted_;t!==this.hasStarted_&&(this.hasStarted_=t,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},e.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},e.prototype.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(t){return t.callback(t.event)}),this.queuedCallbacks_=[]),
|
|
|
this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},e.prototype.handleTechWaiting_=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return t.removeClass("vjs-waiting")})},e.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},e.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},e.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},e.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},e.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},e.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(Me.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")},e.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},e.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},e.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},e.prototype.handleTechClick_=function(t){L(t)&&this.controls_&&(this.paused()?lt(this.play()):this.pause())},e.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},e.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},e.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},e.prototype.handleTechTouchEnd_=function(t){t.preventDefault()},e.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},e.prototype.handleStageClick_=function(){this.reportUserActivity()},e.prototype.handleTechFullscreenChange_=function(t,e){e&&this.isFullscreen(e.isFullscreen),this.trigger("fullscreenchange")},e.prototype.handleTechError_=function(){var t=this.tech_.error();this.error(t)},e.prototype.handleTechTextData_=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},e.prototype.getCache=function(){return this.cache_},e.prototype.techCall_=function(t,e){this.ready(function(){if(t in gn)return wt(this.middleware_,this.tech_,t,e);if(t in mn)return xt(this.middleware_,this.tech_,t,e);try{this.tech_&&this.tech_[t](e)}catch(t){throw Me(t),t}},!0)},e.prototype.techGet_=function(t){if(this.tech_&&this.tech_.isReady_){if(t in yn)return St(this.middleware_,this.tech_,t);if(t in mn)return xt(this.middleware_,this.tech_,t);try{return this.tech_[t]()}catch(e){if(void 0===this.tech_[t])throw Me("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",e),e;if("TypeError"===e.name)throw Me("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",e),this.tech_.isReady_=!1,e;throw Me(e),e}}},e.prototype.play=function(){var t=this,e=this.options_.Promise||Kt.Promise;return e?new e(function(e){t.play_(e)}):this.play_()},e.prototype.play_=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:lt;if(this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_),this.isReady_){if(!this.changingSrc_&&(this.src()||this.currentSrc()))return void e(this.techGet_("play"));this.playOnLoadstart_=function(){t.playOnLoadstart_=null,e(t.play())},this.one("loadstart",this.playOnLoadstart_)}else{if(this.playWaitingForReady_)return;this.playWaitingForReady_=!0,this.ready(function(){t.playWaitingForReady_=!1,e(t.play())})}},e.prototype.pause=function(){this.techCall_("pause")},e.prototype.paused=function(){return!1!==this.techGet_("paused")},e.prototype.played=function(){return this.techGet_("played")||nt(0,0)},e.prototype.scrubbing=function(t){if(void 0===t)return this.scrubbing_;this.scrubbing_=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},e.prototype.currentTime=function(t){return void 0!==t?(t<0&&(t=0),void this.techCall_("setCurrentTime",t)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},e.prototype.duration=function(t){if(void 0===t)return void 0!==this.cache_.duration?this.cache_.duration:NaN;t=parseFloat(t),t<0&&(t=1/0),t!==this.cache_.duration&&(this.cache_.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))},e.prototype.remainingTime=function(){return this.duration()-this.currentTime()},e.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},e.prototype.buffered=function(){var t=this.techGet_("buffered");return t&&t.length||(t=nt(0,0)),t},e.prototype.bufferedPercent=function(){return ot(this.buffered(),this.duration())},e.prototype.bufferedEnd=function(){var t=this.buffered(),e=this.duration(),r=t.end(t.length-1);return r>e&&(r=e),r},e.prototype.volume=function(t){var e=void 0;return void 0!==t?(e=Math.max(0,Math.min(1,parseFloat(t))),this.cache_.volume=e,this.techCall_("setVolume",e),void(e>0&&this.lastVolume_(e))):(e=parseFloat(this.techGet_("volume")),isNaN(e)?1:e)},e.prototype.muted=function(t){return void 0!==t?void this.techCall_("setMuted",t):this.techGet_("muted")||!1},e.prototype.defaultMuted=function(t){return void 0!==t?this.techCall_("setDefaultMuted",t):this.techGet_("defaultMuted")||!1},e.prototype.lastVolume_=function(t){return void 0!==t&&0!==t?void(this.cache_.lastVolume=t):this.cache_.lastVolume},e.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},e.prototype.isFullscreen=function(t){return void 0!==t?void(this.isFullscreen_=!!t):!!this.isFullscreen_},e.prototype.requestFullscreen=function(){var t=cr;this.isFullscreen(!0),t.requestFullscreen?(U(Jt,t.fullscreenchange,Ge(this,function e(r){this.isFullscreen(Jt[t.fullscreenElement]),!1===this.isFullscreen()&&q(Jt,t.fullscreenchange,e),this.trigger("fullscreenchange")})),this.el_[t.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},e.prototype.exitFullscreen=function(){var t=cr;this.isFullscreen(!1),t.requestFullscreen?Jt[t.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},e.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=Jt.documentElement.style.overflow,U(Jt,"keydown",Ge(this,this.fullWindowOnEscKey)),Jt.documentElement.style.overflow="hidden",m(Jt.body,"vjs-full-window"),this.trigger("enterFullWindow")},e.prototype.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},e.prototype.exitFullWindow=function(){this.isFullWindow=!1,q(Jt,"keydown",this.fullWindowOnEscKey),Jt.documentElement.style.overflow=this.docOrigOverflow,_(Jt.body,"vjs-full-window"),this.trigger("exitFullWindow")},e.prototype.canPlayType=function(t){for(var e=void 0,r=0,n=this.options_.techOrder;r<n.length;r++){var o=n[r],i=pn.getTech(o);if(i||(i=lr.getComponent(o)),i){if(i.isSupported()&&(e=i.canPlayType(t)))return e}else Me.error('The "'+o+'" tech is undefined. Skipped browser support check for that tech.')}return""},e.prototype.selectSource=function(t){var e=this,r=this.options_.techOrder.map(function(t){return[t,pn.getTech(t)]}).filter(function(t){var e=t[0],r=t[1];return r?r.isSupported():(Me.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),n=function(t,e,r){var n=void 0;return t.some(function(t){return e.some(function(e){if(n=r(t,e))return!0})}),n},o=function(t,r){var n=t[0];if(t[1].canPlaySource(r,e.options_[n.toLowerCase()]))return{source:r,tech:n}};return(this.options_.sourceOrder?n(t,r,function(t){return function(e,r){return t(r,e)}}(o)):n(r,t,o))||!1},e.prototype.src=function(t){var e=this;if(void 0===t)return this.cache_.src||"";var r=Cn(t);if(!r.length)return void this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0);this.changingSrc_=!0,this.cache_.sources=r,this.updateSourceCaches_(r[0]),kt(this,r[0],function(t,n){if(e.middleware_=n,e.cache_.sources=r,e.updateSourceCaches_(t),e.src_(t))return r.length>1?e.src(r.slice(1)):(e.changingSrc_=!1,e.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void e.triggerReady());Et(n,e.tech_)})},e.prototype.src_=function(t){var e=this,r=this.selectSource([t]);return!r||(Q(r.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",t):this.techCall_("src",t.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(r.tech,r.source),this.tech_.ready(function(){e.changingSrc_=!1}),!1))},e.prototype.load=function(){this.techCall_("load")},e.prototype.reset=function(){this.tech_&&this.tech_.clearTracks("text"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},e.prototype.currentSources=function(){var t=this.currentSource(),e=[];return 0!==Object.keys(t).length&&e.push(t),this.cache_.sources||e},e.prototype.currentSource=function(){return this.cache_.source||{}},e.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},e.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},e.prototype.preload=function(t){return void 0!==t?(this.techCall_("setPreload",t),void(this.options_.preload=t)):this.techGet_("preload")},e.prototype.autoplay=function(t){if(void 0===t)return this.options_.autoplay||!1;var e=void 0;"string"==typeof t&&/(any|play|muted)/.test(t)?(this.options_.autoplay=t,this.manualAutoplay_(t),e=!1):this.options_.autoplay=!!t,e=e||this.options_.autoplay,this.tech_&&this.techCall_("setAutoplay",e)},e.prototype.playsinline=function(t){return void 0!==t?(this.techCall_("setPlaysinline",t),this.options_.playsinline=t,this):this.techGet_("playsinline")},e.prototype.loop=function(t){return void 0!==t?(this.techCall_("setLoop",t),void(this.options_.loop=t)):this.techGet_("loop")},e.prototype.poster=function(t){if(void 0===t)return this.poster_;t||(t=""),t!==this.poster_&&(this.poster_=t,this.techCall_("setPoster",t),this.isPosterFromTech_=!1,this.trigger("posterchange"))},e.prototype.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var t=this.tech_.poster()||"";t!==this.poster_&&(this.poster_=t,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},e.prototype.controls=function(t){if(void 0===t)return!!this.controls_;t=!!t,this.controls_!==t&&(this.controls_=t,this.usingNativeControls()&&this.techCall_("setControls",t),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},e.prototype.usingNativeControls=function(t){if(void 0===t)return!!this.usingNativeControls_;t=!!t,this.usingNativeControls_!==t&&(this.usingNativeControls_=t,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},e.prototype.error=function(t){return void 0===t?this.error_||null:null===t?(this.error_=t,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new it(t),this.addClass("vjs-error"),Me.error("(CODE:"+this.error_.code+" "+it.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},e.prototype.reportUserActivity=function(t){this.userActivity_=!0},e.prototype.userActive=function(t){if(void 0===t)return this.userActive_;if((t=!!t)!==this.userActive_){if(this.userActive_=t,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",function(t){t.stopPropagation(),t.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},e.prototype.listenForUserActivity_=function(){var t=void 0,e=void 0,r=void 0,n=Ge(this,this.reportUserActivity),o=function(t){t.screenX===e&&t.screenY===r||(e=t.screenX,r=t.screenY,n())},i=function(){n(),this.clearInterval(t),t=this.setInterval(n,250)},s=function(e){n(),this.clearInterval(t)};this.on("mousedown",i),this.on("mousemove",o),this.on("mouseup",s),this.on("keydown",n),this.on("keyup",n);var a=void 0;this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);var t=this.options_.inactivityTimeout;t<=0||(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},t))}},250)},e.prototype.playbackRate=function(t){return void 0!==t?void this.techCall_("setPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1},e.prototype.defaultPlaybackRate=function(t){return void 0!==t?this.techCall_("setDefaultPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},e.prototype.isAudio=function(t){return void 0!==t?void(this.isAudio_=!!t):!!this.isAudio_},e.prototype.addTextTrack=function(t,e,r){if(this.tech_)return this.tech_.addTextTrack(t,e,r)},e.prototype.addRemoteTextTrack=function(t,e){if(this.tech_)return this.tech_.addRemoteTextTrack(t,e)},e.prototype.removeRemoteTextTrack=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.track,r=void 0===e?arguments[0]:e;if(this.tech_)return this.tech_.removeRemoteTextTrack(r)},e.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},e.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},e.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},e.prototype.language=function(t){if(void 0===t)return this.language_;this.language_=String(t).toLowerCase()},e.prototype.languages=function(){return Z(e.prototype.options_.languages,this.languages_)},e.prototype.toJSON=function(){var t=Z(this.options_),e=t.tracks;t.tracks=[];for(var r=0;r<e.length;r++){var n=e[r];n=Z(n),n.player=void 0,t.tracks[r]=n}return t},e.prototype.createModal=function(t,e){var r=this;e=e||{},e.content=t||"";var n=new Cr(this,e);return this.addChild(n),n.on("dispose",function(){r.removeChild(n)}),n.open(),n},e.getTagSettings=function(t){var e={sources:[],tracks:[]},n=C(t),o=n["data-setup"];if(g(t,"vjs-fluid")&&(n.fluid=!0),null!==o){var i=yr(o||"{}"),s=i[0],a=i[1];s&&Me.error(s),r(n,a)}if(r(e,n),t.hasChildNodes())for(var l=t.childNodes,c=0,u=l.length;c<u;c++){var h=l[c],p=h.nodeName.toLowerCase();"source"===p?e.sources.push(C(h)):"track"===p&&e.tracks.push(C(h))}return e},e.prototype.flexNotSupported_=function(){var t=Jt.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},e}(lr);un.names.forEach(function(t){var e=un[t];oi.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}}),oi.players={};var ii=Kt.navigator;oi.prototype.options_={techOrder:pn.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:ii&&(ii.languages&&ii.languages[0]||ii.userLanguage||ii.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media."},fe||oi.prototype.options_.children.push("resizeManager"),["ended","seeking","seekable","networkState","readyState"].forEach(function(t){oi.prototype[t]=function(){return this.techGet_(t)}}),ri.forEach(function(t){oi.prototype["handleTech"+J(t)+"_"]=function(){return this.trigger(t)}}),lr.registerComponent("Player",oi);var si={},ai=function(t){return si.hasOwnProperty(t)},li=function(t){return ai(t)?si[t]:void 0},ci=function(t,e){t.activePlugins_=t.activePlugins_||{},t.activePlugins_[e]=!0},ui=function(t,e,r){var n=(r?"before":"")+"pluginsetup";t.trigger(n,e),t.trigger(n+":"+e.name,e)},hi=function(t,e){var r=function(){ui(this,{name:t,plugin:e,instance:null},!0);var r=e.apply(this,arguments);return ci(this,t),ui(this,{name:t,plugin:e,instance:r}),r};return Object.keys(e).forEach(function(t){r[t]=e[t]}),r},pi=function(t,e){return e.prototype.name=t,function(){ui(this,{name:t,plugin:e,instance:null},!0);for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];var i=new(Function.prototype.bind.apply(e,[null].concat([this].concat(n))));return this[t]=function(){return i},ui(this,i.getEventHash()),i}},di=function(){function t(e){if(Ce(this,t),this.constructor===t)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,G(this),delete this.trigger,Y(this,this.constructor.defaultState),ci(e,this.name),this.dispose=Ge(this,this.dispose),e.on("dispose",this.dispose)}return t.prototype.version=function(){return this.constructor.VERSION},t.prototype.getEventHash=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.name=this.name,t.plugin=this.constructor,t.instance=this,t},t.prototype.trigger=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return K(this.eventBusEl_,t,this.getEventHash(e))},t.prototype.handleStateChanged=function(t){},t.prototype.dispose=function(){var t=this.name,e=this.player;this.trigger("dispose"),this.off(),e.off("dispose",this.dispose),e.activePlugins_[t]=!1,this.player=this.state=null,e[t]=pi(t,si[t])},t.isBasic=function(e){var r="string"==typeof e?li(e):e;return"function"==typeof r&&!t.prototype.isPrototypeOf(r.prototype)},t.registerPlugin=function(e,r){if("string"!=typeof e)throw new Error('Illegal plugin name, "'+e+'", must be a string, was '+(void 0===e?"undefined":Te(e))+".");if(ai(e))Me.warn('A plugin named "'+e+'" already exists. You may want to avoid re-registering plugins!');else if(oi.prototype.hasOwnProperty(e))throw new Error('Illegal plugin name, "'+e+'", cannot share a name with an existing player method!');if("function"!=typeof r)throw new Error('Illegal plugin for "'+e+'", must be a function, was '+(void 0===r?"undefined":Te(r))+".");return si[e]=r,"plugin"!==e&&(t.isBasic(r)?oi.prototype[e]=hi(e,r):oi.prototype[e]=pi(e,r)),r},t.deregisterPlugin=function(t){if("plugin"===t)throw new Error("Cannot de-register base plugin.");ai(t)&&(delete si[t],delete oi.prototype[t])},t.getPlugins=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.keys(si),e=void 0;return t.forEach(function(t){var r=li(t);r&&(e=e||{},e[t]=r)}),e},t.getPluginVersion=function(t){var e=li(t);return e&&e.VERSION||""},t}();di.getPlugin=li,di.BASE_PLUGIN_NAME="plugin",di.registerPlugin("plugin",di),oi.prototype.usingPlugin=function(t){return!!this.activePlugins_&&!0===this.activePlugins_[t]},oi.prototype.hasPlugin=function(t){return!!ai(t)};var fi=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":Te(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.super_=e)},vi=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=function(){t.apply(this,arguments)},n={};"object"===(void 0===e?"undefined":Te(e))?(e.constructor!==Object.prototype.constructor&&(r=e.constructor),n=e):"function"==typeof e&&(r=e),fi(r,t);for(var o in n)n.hasOwnProperty(o)&&(r.prototype[o]=n[o]);return r};"undefined"==typeof HTMLVideoElement&&u()&&(Jt.createElement("video"),Jt.createElement("audio"),Jt.createElement("track"),Jt.createElement("video-js"));var yi=function(t){return 0===t.indexOf("#")?t.slice(1):t};if(Vt.hooks_={},Vt.hooks=function(t,e){return Vt.hooks_[t]=Vt.hooks_[t]||[],e&&(Vt.hooks_[t]=Vt.hooks_[t].concat(e)),Vt.hooks_[t]},Vt.hook=function(t,e){Vt.hooks(t,e)},Vt.hookOnce=function(t,e){Vt.hooks(t,[].concat(e).map(function(e){return function r(){return Vt.removeHook(t,r),e.apply(void 0,arguments)}}))},Vt.removeHook=function(t,e){var r=Vt.hooks(t).indexOf(e);return!(r<=-1)&&(Vt.hooks_[t]=Vt.hooks_[t].slice(),Vt.hooks_[t].splice(r,1),!0)},!0!==Kt.VIDEOJS_NO_DYNAMIC_STYLE&&u()){var gi=De(".vjs-styles-defaults");if(!gi){gi=Xe("vjs-styles-defaults");var mi=De("head");mi&&mi.insertBefore(gi,mi.firstChild),$e(gi,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}return $(1,Vt),Vt.VERSION=Wt,Vt.options=oi.prototype.options_,Vt.getPlayers=function(){return oi.players},Vt.getPlayer=function(t){var e=oi.players,r=void 0;if("string"==typeof t){var n=yi(t),o=e[n];if(o)return o;r=De("#"+n)}else r=t;if(h(r)){var i=r,s=i.player,a=i.playerId;if(s||e[a])return s||e[a]}},Vt.getAllPlayers=function(){return Object.keys(oi.players).map(function(t){return oi.players[t]}).filter(Boolean)},Vt.players=oi.players,Vt.getComponent=lr.getComponent,Vt.registerComponent=function(t,e){pn.isTech(e)&&Me.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),lr.registerComponent.call(lr,t,e)},Vt.getTech=pn.getTech,Vt.registerTech=pn.registerTech,Vt.use=Ct,!fe&&Object.defineProperty?(Object.defineProperty(Vt,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Vt.middleware,"TERMINATOR",{value:vn,writeable:!1,enumerable:!0})):Vt.middleware={TERMINATOR:vn},Vt.browser=be,Vt.TOUCH_ENABLED=me,Vt.extend=vi,Vt.mergeOptions=Z,Vt.bind=Ge,Vt.registerPlugin=di.registerPlugin,Vt.deregisterPlugin=di.deregisterPlugin,Vt.plugin=function(t,e){return Me.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),di.registerPlugin(t,e)},Vt.getPlugins=di.getPlugins,Vt.getPlugin=di.getPlugin,Vt.getPluginVersion=di.getPluginVersion,Vt.addLanguage=function(t,e){var r;return t=(""+t).toLowerCase(),Vt.options.languages=Z(Vt.options.languages,(r={},r[t]=e,r)),Vt.options.languages[t]},Vt.log=Me,Vt.createTimeRange=Vt.createTimeRanges=nt,Vt.formatTime=Dn,Vt.setFormatTime=Lt,Vt.resetFormatTime=Rt,Vt.parseUrl=Rr,Vt.isCrossOrigin=Hr,Vt.EventTarget=Qe,Vt.on=U,Vt.one=X,Vt.off=q,Vt.trigger=K,Vt.xhr=Qr,Vt.TextTrack=en,Vt.AudioTrack=rn,Vt.VideoTrack=nn,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(t){Vt[t]=function(){return Me.warn("videojs."+t+"() is deprecated; use videojs.dom."+t+"() instead"),Re[t].apply(null,arguments)}}),Vt.computedStyle=s,Vt.dom=Re,Vt.url=Vr,Vt});
|