/** * @license * Video.js 7.6.0 * Copyright Brightcove, Inc. * Available under Apache License Version 2.0 * * * Includes vtt.js * Available under Apache License Version 2.0 * */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("global/window"),require("global/document")):"function"==typeof define&&define.amd?define(["global/window","global/document"],t):(e=e||self).videojs=t(e.window,e.document)}(this,function(h,d){h=h&&h.hasOwnProperty("default")?h.default:h,d=d&&d.hasOwnProperty("default")?d.default:d;var p="7.6.0";function f(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t,n){return(s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&o(i,n.prototype),i}).apply(null,arguments)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t(e,t){return t=t||e.slice(0),e.raw=t,e}var l=[],e=function(s,a){return function(e,t,n){var r=a.levels[t],i=new RegExp("^("+r+")$");if("log"!==e&&n.unshift(e.toUpperCase()+":"),n.unshift(s+":"),l&&l.push([].concat(n)),h.console){var o=h.console[e];o||"debug"!==e||(o=h.console.info||h.console.log),o&&r&&i.test(e)&&o[Array.isArray(n)?"apply":"call"](h.console,n)}}};var y=function t(n){function r(){for(var e=arguments.length,t=new Array(e),n=0;n',n=r.firstChild,r.setAttribute("style","display:none; position:absolute;"),d.body.appendChild(r));for(var o={},s=0;sx',e=t.firstChild.href}return e}function $t(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(e);if(t)return t.pop().toLowerCase()}return""}function Ht(e){var t=h.location,n=Rt(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host}var Vt=function(r){function e(e){var t;void 0===e&&(e=[]);for(var n=e.length-1;0<=n;n--)if(e[n].enabled){Lt(e,e[n]);break}return(t=r.call(this,e)||this).changing_=!1,t}f(e,r);var t=e.prototype;return t.addTrack=function(e){var t=this;e.enabled&&Lt(this,e),r.prototype.addTrack.call(this,e),e.addEventListener&&(e.enabledChange_=function(){t.changing_||(t.changing_=!0,Lt(t,e),t.changing_=!1,t.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))},t.removeTrack=function(e){r.prototype.removeTrack.call(this,e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)},e}(Nt),Ut=function(r){function e(e){var t;void 0===e&&(e=[]);for(var n=e.length-1;0<=n;n--)if(e[n].selected){Ft(e,e[n]);break}return(t=r.call(this,e)||this).changing_=!1,Object.defineProperty(v(t),"selectedIndex",{get:function(){for(var e=0;e>0},ToUint32:function(e){return this.ToNumber(e)>>>0},ToUint16:function(e){var t=this.ToNumber(e);return Yn(t)||0===t||!Jn(t)?0:function(e,t){var n=e%t;return Math.floor(0<=n?n:n+t)}(Dn(t)*Math.floor(Math.abs(t)),65536)},ToString:function(e){return ar(e)},ToObject:function(e){return this.CheckObjectCoercible(e),or(e)},CheckObjectCoercible:function(e,t){if(null==e)throw new sr(t||"Cannot call method on "+e);return e},IsCallable:Mn,SameValue:function(e,t){return e===t?0!==e||1/e==1/t:Yn(e)&&Yn(t)},Type:function(e){return null===e?"Null":"undefined"==typeof e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0},IsPropertyDescriptor:function(e){if("Object"!==this.Type(e))return!1;var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(Kn(e,n)&&!t[n])return!1;var r=Kn(e,"[[Value]]"),i=Kn(e,"[[Get]]")||Kn(e,"[[Set]]");if(r&&i)throw new sr("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(e){return"undefined"!=typeof e&&(On(this,"Property Descriptor","Desc",e),!(!Kn(e,"[[Get]]")&&!Kn(e,"[[Set]]")))},IsDataDescriptor:function(e){return"undefined"!=typeof e&&(On(this,"Property Descriptor","Desc",e),!(!Kn(e,"[[Value]]")&&!Kn(e,"[[Writable]]")))},IsGenericDescriptor:function(e){return"undefined"!=typeof e&&(On(this,"Property Descriptor","Desc",e),!this.IsAccessorDescriptor(e)&&!this.IsDataDescriptor(e))},FromPropertyDescriptor:function(e){if("undefined"==typeof e)return e;if(On(this,"Property Descriptor","Desc",e),this.IsDataDescriptor(e))return{value:e["[[Value]]"],writable:!!e["[[Writable]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};if(this.IsAccessorDescriptor(e))return{get:e["[[Get]]"],set:e["[[Set]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};throw new sr("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(e){if("Object"!==this.Type(e))throw new sr("ToPropertyDescriptor requires an object");var t={};if(Kn(e,"enumerable")&&(t["[[Enumerable]]"]=this.ToBoolean(e.enumerable)),Kn(e,"configurable")&&(t["[[Configurable]]"]=this.ToBoolean(e.configurable)),Kn(e,"value")&&(t["[[Value]]"]=e.value),Kn(e,"writable")&&(t["[[Writable]]"]=this.ToBoolean(e.writable)),Kn(e,"get")){var n=e.get;if("undefined"!=typeof n&&!this.IsCallable(n))throw new TypeError("getter must be a function");t["[[Get]]"]=n}if(Kn(e,"set")){var r=e.set;if("undefined"!=typeof r&&!this.IsCallable(r))throw new sr("setter must be a function");t["[[Set]]"]=r}if((Kn(t,"[[Get]]")||Kn(t,"[[Set]]"))&&(Kn(t,"[[Value]]")||Kn(t,"[[Writable]]")))throw new sr("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},cr=sn.call(Function.call,String.prototype.replace),ur=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,hr=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/,dr=sn.call(Function.call,Rn());$n(dr,{getPolyfill:Rn,implementation:Fn,shim:function(){var e=Rn();return $n(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}});var pr=dr,fr=Object.prototype.toString,vr=Object.prototype.hasOwnProperty,yr=function(e,t,n){if(!Mn(t))throw new TypeError("iterator must be a function");var r;3<=arguments.length&&(r=n),"[object Array]"===fr.call(e)?function(e,t,n){for(var r=0,i=e.length;r=e?t.push(i):i.startTime===i.endTime&&i.startTime<=e&&i.startTime+.5>=e&&t.push(i)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(var o=0;o