/** * @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(v,d){v=v&&v.hasOwnProperty("default")?v.default:v,d=d&&d.hasOwnProperty("default")?d.default:d;var h="7.6.0";function p(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t,i){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,i){var n=[null];n.push.apply(n,t);var r=new(Function.bind.apply(e,n));return i&&a(r,i.prototype),r}).apply(null,arguments)}function f(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 u=[],e=function(s,o){return function(e,t,i){var n=o.levels[t],r=new RegExp("^("+n+")$");if("log"!==e&&i.unshift(e.toUpperCase()+":"),i.unshift(s+":"),u&&u.push([].concat(i)),v.console){var a=v.console[e];a||"debug"!==e||(a=v.console.info||v.console.log),a&&n&&r.test(e)&&a[Array.isArray(i)?"apply":"call"](v.console,i)}}};var m=function t(i){function n(){for(var e=arguments.length,t=new Array(e),i=0;i',i=n.firstChild,n.setAttribute("style","display:none; position:absolute;"),d.body.appendChild(n));for(var a={},s=0;sx',e=t.firstChild.href}return e}function Ft(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(e);if(t)return t.pop().toLowerCase()}return""}function Vt(e){var t=v.location,i=Nt(e);return(":"===i.protocol?t.protocol:i.protocol)+i.host!==t.protocol+t.host}var Ht=function(n){function e(e){var t;void 0===e&&(e=[]);for(var i=e.length-1;0<=i;i--)if(e[i].enabled){Mt(e,e[i]);break}return(t=n.call(this,e)||this).changing_=!1,t}p(e,n);var t=e.prototype;return t.addTrack=function(e){var t=this;e.enabled&&Mt(this,e),n.prototype.addTrack.call(this,e),e.addEventListener&&(e.enabledChange_=function(){t.changing_||(t.changing_=!0,Mt(t,e),t.changing_=!1,t.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))},t.removeTrack=function(e){n.prototype.removeTrack.call(this,e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)},e}(Dt),qt=function(n){function e(e){var t;void 0===e&&(e=[]);for(var i=e.length-1;0<=i;i--)if(e[i].selected){Bt(e,e[i]);break}return(t=n.call(this,e)||this).changing_=!1,Object.defineProperty(f(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 Ki(t)||0===t||!Qi(t)?0:function(e,t){var i=e%t;return Math.floor(0<=i?i:i+t)}(Ui(t)*Math.floor(Math.abs(t)),65536)},ToString:function(e){return on(e)},ToObject:function(e){return this.CheckObjectCoercible(e),an(e)},CheckObjectCoercible:function(e,t){if(null==e)throw new sn(t||"Cannot call method on "+e);return e},IsCallable:Di,SameValue:function(e,t){return e===t?0!==e||1/e==1/t:Ki(e)&&Ki(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 i in e)if(Wi(e,i)&&!t[i])return!1;var n=Wi(e,"[[Value]]"),r=Wi(e,"[[Get]]")||Wi(e,"[[Set]]");if(n&&r)throw new sn("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(e){return"undefined"!=typeof e&&(Oi(this,"Property Descriptor","Desc",e),!(!Wi(e,"[[Get]]")&&!Wi(e,"[[Set]]")))},IsDataDescriptor:function(e){return"undefined"!=typeof e&&(Oi(this,"Property Descriptor","Desc",e),!(!Wi(e,"[[Value]]")&&!Wi(e,"[[Writable]]")))},IsGenericDescriptor:function(e){return"undefined"!=typeof e&&(Oi(this,"Property Descriptor","Desc",e),!this.IsAccessorDescriptor(e)&&!this.IsDataDescriptor(e))},FromPropertyDescriptor:function(e){if("undefined"==typeof e)return e;if(Oi(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 sn("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(e){if("Object"!==this.Type(e))throw new sn("ToPropertyDescriptor requires an object");var t={};if(Wi(e,"enumerable")&&(t["[[Enumerable]]"]=this.ToBoolean(e.enumerable)),Wi(e,"configurable")&&(t["[[Configurable]]"]=this.ToBoolean(e.configurable)),Wi(e,"value")&&(t["[[Value]]"]=e.value),Wi(e,"writable")&&(t["[[Writable]]"]=this.ToBoolean(e.writable)),Wi(e,"get")){var i=e.get;if("undefined"!=typeof i&&!this.IsCallable(i))throw new TypeError("getter must be a function");t["[[Get]]"]=i}if(Wi(e,"set")){var n=e.set;if("undefined"!=typeof n&&!this.IsCallable(n))throw new sn("setter must be a function");t["[[Set]]"]=n}if((Wi(t,"[[Get]]")||Wi(t,"[[Set]]"))&&(Wi(t,"[[Value]]")||Wi(t,"[[Writable]]")))throw new sn("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},ln=ai.call(Function.call,String.prototype.replace),cn=/^[\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]+/,dn=/[\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]+$/,hn=ai.call(Function.call,Bi());ji(hn,{getPolyfill:Bi,implementation:Mi,shim:function(){var e=Bi();return ji(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}});var pn=hn,fn=Object.prototype.toString,mn=Object.prototype.hasOwnProperty,gn=function(e,t,i){if(!Di(t))throw new TypeError("iterator must be a function");var n;3<=arguments.length&&(n=i),"[object Array]"===fn.call(e)?function(e,t,i){for(var n=0,r=e.length;n=e?t.push(r):r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e&&t.push(r)}if(o=!1,t.length!==this.activeCues_.length)o=!0;else for(var a=0;a