!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).videojs=e()}}(function(){return function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[a]={exports:{}};t[a][0].call(c.exports,function(e){var r=t[a][1][e];return i(r||e)},c,c.exports,e,t,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a0&&void 0!==arguments[0]?arguments[0]:"button",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t=(0,a.assign)({className:this.buildCSSClass()},t),"button"!==e&&(o.default.warn("Creating a Button with an HTML element of "+e+" is deprecated; use ClickableComponent instead."),t=(0,a.assign)({tabIndex:0},t),r=(0,a.assign)({role:"button"},r)),r=(0,a.assign)({type:"button","aria-live":"polite"},r);var n=i.default.prototype.createEl.call(this,e,t,r);return this.createControlTextEl(n),n},t.prototype.addChild=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.constructor.name;return o.default.warn("Adding an actionable (user controllable) child to a Button ("+r+") is not supported; use a ClickableComponent instead."),i.default.prototype.addChild.call(this,e,t)},t.prototype.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},t.prototype.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},t.prototype.handleKeyPress=function(t){32!==t.which&&13!==t.which&&e.prototype.handleKeyPress.call(this,t)},t}(n.default);i.default.registerComponent("Button",u),r.default=u},{3:3,5:5,86:86,88:88}],3:[function(e,t,r){"use strict";r.__esModule=!0;var n=d(e(5)),i=c(e(81)),o=c(e(82)),a=c(e(83)),s=d(e(86)),u=d(e(94)),l=e(88);function c(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return i.emitTapEvents(),i.enable(),i}return t.prototype.createEl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r=(0,l.assign)({className:this.buildCSSClass(),tabIndex:0},r),"button"===t&&s.default.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),n=(0,l.assign)({role:"button","aria-live":"polite"},n),this.tabIndex_=r.tabIndex;var i=e.prototype.createEl.call(this,t,r,n);return this.createControlTextEl(i),i},t.prototype.createControlTextEl=function(e){return this.controlTextEl_=i.createEl("span",{className:"vjs-control-text"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},t.prototype.controlText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(!e)return this.controlText_||"Need Text";var r=this.localize(e);return this.controlText_=e,this.controlTextEl_.innerHTML=r,this.nonIconControl||t.setAttribute("title",r),this},t.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},t.prototype.enable=function(){return this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on("tap",this.handleClick),this.on("click",this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this},t.prototype.disable=function(){return this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("tap",this.handleClick),this.off("click",this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this},t.prototype.handleClick=function(e){},t.prototype.handleFocus=function(e){o.on(u.default,"keydown",a.bind(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.handleClick(t)):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t.prototype.handleBlur=function(e){o.off(u.default,"keydown",a.bind(this,this.handleKeyPress))},t}(n.default);n.default.registerComponent("ClickableComponent",f),r.default=f},{5:5,81:81,82:82,83:83,86:86,88:88,94:94}],4:[function(e,t,r){"use strict";r.__esModule=!0;var n=o(e(2)),i=o(e(5));function o(e){return e&&e.__esModule?e:{default:e}}var a=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return i.controlText(n&&n.controlText||i.localize("Close")),i}return t.prototype.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t}(n.default);i.default.registerComponent("CloseButton",a),r.default=a},{2:2,5:5}],5:[function(e,t,r){"use strict";r.__esModule=!0;var n=f(e(95)),i=d(e(81)),o=d(e(83)),a=d(e(85)),s=d(e(82)),u=f(e(86)),l=f(e(91)),c=f(e(87));function d(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function f(e){return e&&e.__esModule?e:{default:e}}var p=function(){function e(t,r,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t&&this.play?this.player_=t=this:this.player_=t,this.options_=(0,c.default)({},this.options_),r=this.options_=(0,c.default)(this.options_,r),this.id_=r.id||r.el&&r.el.id,!this.id_){var i=t&&t.id&&t.id()||"no_player";this.id_=i+"_component_"+a.newGUID()}this.name_=r.name||null,r.el?this.el_=r.el:!1!==r.createEl&&(this.el_=this.createEl()),this.children_=[],this.childIndex_={},this.childNameIndex_={},!1!==r.initChildren&&this.initChildren(),this.ready(n),!1!==r.reportTouchActivity&&this.enableTouchActivity()}return e.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.off(),this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),i.removeElData(this.el_),this.el_=null},e.prototype.player=function(){return this.player_},e.prototype.options=function(e){return u.default.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),e?(this.options_=(0,c.default)(this.options_,e),this.options_):this.options_},e.prototype.el=function(){return this.el_},e.prototype.createEl=function(e,t,r){return i.createEl(e,t,r)},e.prototype.localize=function(e){var t=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages();if(!t||!r)return e;var n=r[t];if(n&&n[e])return n[e];var i=r[t.split("-")[0]];return i&&i[e]?i[e]:e},e.prototype.contentEl=function(){return this.contentEl_||this.el_},e.prototype.id=function(){return this.id_},e.prototype.name=function(){return this.name_},e.prototype.children=function(){return this.children_},e.prototype.getChildById=function(e){return this.childIndex_[e]},e.prototype.getChild=function(e){if(e)return e=(0,l.default)(e),this.childNameIndex_[e]},e.prototype.addChild=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,i=void 0,o=void 0;if("string"==typeof t){o=(0,l.default)(t),r||(r={}),!0===r&&(u.default.warn("Initializing a child component with `true` is deprecated.Children should be defined in an array when possible, but if necessary use an object instead of `true`."),r={});var a=r.componentClass||o;r.name=o;var s=e.getComponent(a);if(!s)throw new Error("Component "+a+" does not exist");if("function"!=typeof s)return null;i=new s(this.player_||this,r)}else i=t;if(this.children_.splice(n,0,i),"function"==typeof i.id&&(this.childIndex_[i.id()]=i),(o=o||i.name&&(0,l.default)(i.name()))&&(this.childNameIndex_[o]=i),"function"==typeof i.el&&i.el()){var c=this.contentEl().children[n]||null;this.contentEl().insertBefore(i.el(),c)}return i},e.prototype.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,r=this.children_.length-1;r>=0;r--)if(this.children_[r]===e){t=!0,this.children_.splice(r,1);break}if(t){this.childIndex_[e.id()]=null,this.childNameIndex_[e.name()]=null;var n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},e.prototype.initChildren=function(){var t=this,r=this.options_.children;if(r){var n=this.options_,i=function(e){var r=e.name,i=e.opts;if(void 0!==n[r]&&(i=n[r]),!1!==i){!0===i&&(i={}),i.playerOptions=t.options_.playerOptions;var o=t.addChild(r,i);o&&(t[r]=o)}},o=void 0,a=e.getComponent("Tech");(o=Array.isArray(r)?r:Object.keys(r)).concat(Object.keys(this.options_).filter(function(e){return!o.some(function(t){return"string"==typeof t?e===t:e===t.name})})).map(function(e){var n=void 0,i=void 0;return"string"==typeof e?i=r[n=e]||t.options_[n]||{}:(n=e.name,i=e),{name:n,opts:i}}).filter(function(t){var r=e.getComponent(t.opts.componentClass||(0,l.default)(t.name));return r&&!a.isTech(r)}).forEach(i)}},e.prototype.buildCSSClass=function(){return""},e.prototype.on=function(e,t,r){var n=this;if("string"==typeof e||Array.isArray(e))s.on(this.el_,e,o.bind(this,t));else{var i=e,a=t,u=o.bind(this,r),l=function(){return n.off(i,a,u)};l.guid=u.guid,this.on("dispose",l);var c=function(){return n.off("dispose",l)};c.guid=u.guid,e.nodeName?(s.on(i,a,u),s.on(i,"dispose",c)):"function"==typeof e.on&&(i.on(a,u),i.on("dispose",c))}return this},e.prototype.off=function(e,t,r){if(!e||"string"==typeof e||Array.isArray(e))s.off(this.el_,e,t);else{var n=e,i=t,a=o.bind(this,r);this.off("dispose",a),e.nodeName?(s.off(n,i,a),s.off(n,"dispose",a)):(n.off(i,a),n.off("dispose",a))}return this},e.prototype.one=function(e,t,r){var n=this,i=arguments;if("string"==typeof e||Array.isArray(e))s.one(this.el_,e,o.bind(this,t));else{var a=e,u=t,l=o.bind(this,r),c=function e(){n.off(a,u,e),l.apply(null,i)};c.guid=l.guid,this.on(a,u,c)}return this},e.prototype.trigger=function(e,t){return s.trigger(this.el_,e,t),this},e.prototype.ready=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(this.isReady_?t?e.call(this):this.setTimeout(e,1):(this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e))),this},e.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(e){e.call(this)},this),this.trigger("ready")},1)},e.prototype.$=function(e,t){return i.$(e,t||this.contentEl())},e.prototype.$$=function(e,t){return i.$$(e,t||this.contentEl())},e.prototype.hasClass=function(e){return i.hasElClass(this.el_,e)},e.prototype.addClass=function(e){return i.addElClass(this.el_,e),this},e.prototype.removeClass=function(e){return i.removeElClass(this.el_,e),this},e.prototype.toggleClass=function(e,t){return i.toggleElClass(this.el_,e,t),this},e.prototype.show=function(){return this.removeClass("vjs-hidden"),this},e.prototype.hide=function(){return this.addClass("vjs-hidden"),this},e.prototype.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},e.prototype.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},e.prototype.getAttribute=function(e){return i.getAttribute(this.el_,e)},e.prototype.setAttribute=function(e,t){return i.setAttribute(this.el_,e,t),this},e.prototype.removeAttribute=function(e){return i.removeAttribute(this.el_,e),this},e.prototype.width=function(e,t){return this.dimension("width",e,t)},e.prototype.height=function(e,t){return this.dimension("height",e,t)},e.prototype.dimensions=function(e,t){return this.width(e,!0).height(t)},e.prototype.dimension=function(e,t,r){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",r||this.trigger("resize"),this;if(!this.el_)return 0;var n=this.el_.style[e],i=n.indexOf("px");return-1!==i?parseInt(n.slice(0,i),10):parseInt(this.el_["offset"+(0,l.default)(e)],10)},e.prototype.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if("function"==typeof n.default.getComputedStyle){var r=n.default.getComputedStyle(this.el_);t=r.getPropertyValue(e)||r[e]}if(0===(t=parseFloat(t))){var i="offset"+(0,l.default)(e);t=this.el_[i]}return t},e.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},e.prototype.currentWidth=function(){return this.currentDimension("width")},e.prototype.currentHeight=function(){return this.currentDimension("height")},e.prototype.focus=function(){this.el_.focus()},e.prototype.blur=function(){this.el_.blur()},e.prototype.emitTapEvents=function(){var e=0,t=null,r=void 0;this.on("touchstart",function(n){1===n.touches.length&&(t={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},e=(new Date).getTime(),r=!0)}),this.on("touchmove",function(e){if(e.touches.length>1)r=!1;else if(t){var n=e.touches[0].pageX-t.pageX,i=e.touches[0].pageY-t.pageY;Math.sqrt(n*n+i*i)>10&&(r=!1)}});var n=function(){r=!1};this.on("touchleave",n),this.on("touchcancel",n),this.on("touchend",function(n){if(t=null,!0===r){(new Date).getTime()-e<200&&(n.preventDefault(),this.trigger("tap"))}})},e.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e=o.bind(this.player(),this.player().reportUserActivity),t=void 0;this.on("touchstart",function(){e(),this.clearInterval(t),t=this.setInterval(e,250)});var r=function(r){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",r),this.on("touchcancel",r)}},e.prototype.setTimeout=function(e,t){e=o.bind(this,e);var r=n.default.setTimeout(e,t),i=function(){this.clearTimeout(r)};return i.guid="vjs-timeout-"+r,this.on("dispose",i),r},e.prototype.clearTimeout=function(e){n.default.clearTimeout(e);var t=function(){};return t.guid="vjs-timeout-"+e,this.off("dispose",t),e},e.prototype.setInterval=function(e,t){e=o.bind(this,e);var r=n.default.setInterval(e,t),i=function(){this.clearInterval(r)};return i.guid="vjs-interval-"+r,this.on("dispose",i),r},e.prototype.clearInterval=function(e){n.default.clearInterval(e);var t=function(){};return t.guid="vjs-interval-"+e,this.off("dispose",t),e},e.registerComponent=function(t,r){if(t){if(t=(0,l.default)(t),e.components_||(e.components_={}),"Player"===t&&e.components_[t]){var n=e.components_[t];if(n.players&&Object.keys(n.players).length>0&&Object.keys(n.players).map(function(e){return n.players[e]}).every(Boolean))throw new Error("Can not register Player component after player has been created")}return e.components_[t]=r,r}},e.getComponent=function(t){if(t)return t=(0,l.default)(t),e.components_&&e.components_[t]?e.components_[t]:n.default&&n.default.videojs&&n.default.videojs[t]?(u.default.warn("The "+t+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),n.default.videojs[t]):void 0},e.extend=function(t){t=t||{},u.default.warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var r=t.init||t.init||this.prototype.init||this.prototype.init||function(){},n=function(){r.apply(this,arguments)};(n.prototype=Object.create(this.prototype)).constructor=n,n.extend=e.extend;for(var i in t)t.hasOwnProperty(i)&&(n.prototype[i]=t[i]);return n},e}();p.registerComponent("Component",p),r.default=p},{81:81,82:82,83:83,85:85,86:86,87:87,91:91,95:95}],6:[function(e,t,r){"use strict";r.__esModule=!0;var n=a(e(36)),i=a(e(5)),o=a(e(7));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n.tracks=r.audioTracks&&r.audioTracks();var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return i.el_.setAttribute("aria-label","Audio Menu"),i}return t.prototype.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},t.prototype.createItems=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;var t=this.player_.audioTracks&&this.player_.audioTracks();if(!t)return e;for(var r=0;r'+this.localize("Stream Type")+""+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(o.default);o.default.registerComponent("LiveDisplay",s),r.default=s},{5:5,81:81}],11:[function(e,t,r){"use strict";r.__esModule=!0;var n=a(e(2)),i=a(e(5)),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e(81));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return i.on(r,"volumechange",i.update),r.tech_&&!1===r.tech_.featuresVolumeControl&&i.addClass("vjs-hidden"),i.on(r,"loadstart",function(){this.update(),!1===r.tech_.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}),i}return t.prototype.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.player_.muted(!this.player_.muted())},t.prototype.update=function(e){var t=this.player_.volume(),r=3;0===t||this.player_.muted()?r=0:t<.33?r=1:t<.67&&(r=2);var n=this.player_.muted()?"Unmute":"Mute";this.controlText()!==n&&this.controlText(n);for(var i=0;i<4;i++)o.removeElClass(this.el_,"vjs-vol-"+i);o.addElClass(this.el_,"vjs-vol-"+r)},t}(n.default);s.prototype.controlText_="Mute",i.default.registerComponent("MuteToggle",s),r.default=s},{2:2,5:5,81:81}],12:[function(e,t,r){"use strict";r.__esModule=!0;var n=o(e(2)),i=o(e(5));function o(e){return e&&e.__esModule?e:{default:e}}var a=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return i.on(r,"play",i.handlePlay),i.on(r,"pause",i.handlePause),i}return t.prototype.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handlePlay=function(e){this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.prototype.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t}(n.default);a.prototype.controlText_="Play",i.default.registerComponent("PlayToggle",a),r.default=a},{2:2,5:5}],13:[function(e,t,r){"use strict";r.__esModule=!0;var n=u(e(47)),i=u(e(49)),o=u(e(14)),a=u(e(5)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e(81));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return i.updateVisibility(),i.updateLabel(),i.on(r,"loadstart",i.updateVisibility),i.on(r,"ratechange",i.updateLabel),i}return t.prototype.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelEl_=s.createEl("div",{className:"vjs-playback-rate-value",innerHTML:1}),t.appendChild(this.labelEl_),t},t.prototype.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},t.prototype.createMenu=function(){var e=new i.default(this.player()),t=this.playbackRates();if(t)for(var r=t.length-1;r>=0;r--)e.addChild(new o.default(this.player(),{rate:t[r]+"x"}));return e},t.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.prototype.handleClick=function(e){for(var t=this.player().playbackRate(),r=this.playbackRates(),n=r[0],i=0;it){n=r[i];break}this.player().playbackRate(n)},t.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},t.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},t.prototype.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.prototype.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(n.default);l.prototype.controlText_="Playback Rate",a.default.registerComponent("PlaybackRateMenuButton",l),r.default=l},{14:14,47:47,49:49,5:5,81:81}],14:[function(e,t,r){"use strict";r.__esModule=!0;var n=o(e(48)),i=o(e(5));function o(e){return e&&e.__esModule?e:{default:e}}var a=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=n.rate,o=parseFloat(i,10);n.label=i,n.selected=1===o,n.selectable=!0;var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return a.label=i,a.rate=o,a.on(r,"ratechange",a.update),a}return t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},t.prototype.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(n.default);a.prototype.contentElType="button",i.default.registerComponent("PlaybackRateMenuItem",a),r.default=a},{48:48,5:5}],15:[function(e,t,r){"use strict";r.__esModule=!0;var n,i=e(5),o=(n=i,n&&n.__esModule?n:{default:n}),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e(81));var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return i.partEls_=[],i.on(r,"progress",i.update),i}return t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+": 0%"})},t.prototype.update=function(e){var t=this.player_.buffered(),r=this.player_.duration(),n=this.player_.bufferedEnd(),i=this.partEls_,o=function(e,t){var r=e/t||0;return 100*(r>=1?1:r)+"%"};this.el_.style.width=o(n,r);for(var s=0;st.length;d--)this.el_.removeChild(i[d-1]);i.length=t.length},t}(o.default);o.default.registerComponent("LoadProgressBar",s),r.default=s},{5:5,81:81}],16:[function(e,t,r){"use strict";r.__esModule=!0;var n=l(e(5)),i=u(e(81)),o=u(e(83)),a=l(e(84)),s=l(e(80));function u(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return n.playerOptions&&n.playerOptions.controlBar&&n.playerOptions.controlBar.progressControl&&n.playerOptions.controlBar.progressControl.keepTooltipsInside&&(a.keepTooltipsInside=n.playerOptions.controlBar.progressControl.keepTooltipsInside),a.keepTooltipsInside&&(a.tooltip=i.createEl("div",{className:"vjs-time-tooltip"}),a.el().appendChild(a.tooltip),a.addClass("vjs-keep-tooltips-inside")),a.update(0,0),r.on("ready",function(){a.on(r.controlBar.progressControl.el(),"mousemove",o.throttle(o.bind(a,a.handleMouseMove),25))}),a}return t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.prototype.handleMouseMove=function(e){var t=this.player_.duration(),r=this.calculateDistance(e)*t,n=e.pageX-i.findElPosition(this.el().parentNode).left;this.update(r,n)},t.prototype.update=function(e,t){var r=(0,a.default)(e,this.player_.duration());if(this.el().style.left=t+"px",this.el().setAttribute("data-current-time",r),this.keepTooltipsInside){var n=t-this.clampPosition_(t)+1,i=parseFloat((0,s.default)(this.tooltip,"width"))/2;this.tooltip.innerHTML=r,this.tooltip.style.right="-"+(i-n)+"px"}},t.prototype.calculateDistance=function(e){return i.getPointerPosition(this.el().parentNode,e).x},t.prototype.clampPosition_=function(e){if(!this.keepTooltipsInside)return e;var t=parseFloat((0,s.default)(this.player().el(),"width")),r=parseFloat((0,s.default)(this.tooltip,"width"))/2,n=e;return et-r&&(n=Math.floor(t-r)),n},t}(n.default);n.default.registerComponent("MouseTimeDisplay",c),r.default=c},{5:5,80:80,81:81,83:83,84:84}],17:[function(e,t,r){"use strict";r.__esModule=!0;var n=a(e(5)),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e(83)),o=a(e(84));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return o.updateDataAttr(),o.on(r,"timeupdate",o.updateDataAttr),r.ready(i.bind(o,o.updateDataAttr)),n.playerOptions&&n.playerOptions.controlBar&&n.playerOptions.controlBar.progressControl&&n.playerOptions.controlBar.progressControl.keepTooltipsInside&&(o.keepTooltipsInside=n.playerOptions.controlBar.progressControl.keepTooltipsInside),o.keepTooltipsInside&&o.addClass("vjs-keep-tooltips-inside"),o}return t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:''+this.localize("Progress")+": 0%"})},t.prototype.updateDataAttr=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.setAttribute("data-current-time",(0,o.default)(t,this.player_.duration()))},t}(n.default);n.default.registerComponent("PlayProgressBar",s),r.default=s},{5:5,83:83,84:84}],18:[function(e,t,r){"use strict";r.__esModule=!0;var n,i=e(5),o=(n=i,n&&n.__esModule?n:{default:n});e(19),e(16);var a=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t}(o.default);a.prototype.options_={children:["seekBar"]},o.default.registerComponent("ProgressControl",a),r.default=a},{16:16,19:19,5:5}],19:[function(e,t,r){"use strict";r.__esModule=!0;var n=u(e(57)),i=u(e(5)),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e(83)),a=u(e(84)),s=u(e(80));e(15),e(17),e(20);function u(e){return e&&e.__esModule?e:{default:e}}var l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return i.on(r,"timeupdate",i.updateProgress),i.on(r,"ended",i.updateProgress),r.ready(o.bind(i,i.updateProgress)),n.playerOptions&&n.playerOptions.controlBar&&n.playerOptions.controlBar.progressControl&&n.playerOptions.controlBar.progressControl.keepTooltipsInside&&(i.keepTooltipsInside=n.playerOptions.controlBar.progressControl.keepTooltipsInside),i.keepTooltipsInside&&(i.tooltipProgressBar=i.addChild("TooltipProgressBar")),i}return t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":"progress bar"})},t.prototype.updateProgress=function(e){if(this.updateAriaAttributes(this.el_),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.el_),this.tooltipProgressBar.el_.style.width=this.bar.el_.style.width;var t=parseFloat((0,s.default)(this.player().el(),"width")),r=parseFloat((0,s.default)(this.tooltipProgressBar.tooltip,"width")),n=this.tooltipProgressBar.el().style;n.maxWidth=Math.floor(t-r/2)+"px",n.minWidth=Math.ceil(r/2)+"px",n.right="-"+r/2+"px"}},t.prototype.updateAriaAttributes=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();e.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),e.setAttribute("aria-valuetext",(0,a.default)(t,this.player_.duration()))},t.prototype.getPercent=function(){var e=this.player_.currentTime()/this.player_.duration();return e>=1?1:e},t.prototype.handleMouseDown=function(t){this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t)},t.prototype.handleMouseMove=function(e){var t=this.calculateDistance(e)*this.player_.duration();t===this.player_.duration()&&(t-=.1),this.player_.currentTime(t)},t.prototype.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),this.player_.scrubbing(!1),this.videoWasPlaying&&this.player_.play()},t.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},t.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},t}(n.default);l.prototype.options_={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},l.prototype.playerEvent="timeupdate",i.default.registerComponent("SeekBar",l),r.default=l},{15:15,17:17,20:20,5:5,57:57,80:80,83:83,84:84}],20:[function(e,t,r){"use strict";r.__esModule=!0;var n=a(e(5)),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e(83)),o=a(e(84));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return o.updateDataAttr(),o.on(r,"timeupdate",o.updateDataAttr),r.ready(i.bind(o,o.updateDataAttr)),o}return t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-tooltip-progress-bar vjs-slider-bar",innerHTML:'
\n '+this.localize("Progress")+": 0%"});return this.tooltip=t.querySelector(".vjs-time-tooltip"),t},t.prototype.updateDataAttr=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),r=(0,o.default)(t,this.player_.duration());this.el_.setAttribute("data-current-time",r),this.tooltip.innerHTML=r},t}(n.default);n.default.registerComponent("TooltipProgressBar",s),r.default=s},{5:5,83:83,84:84}],21:[function(e,t,r){"use strict";r.__esModule=!0;var n=o(e(22)),i=o(e(5));function o(e){return e&&e.__esModule?e:{default:e}}var a=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return t.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(n.default);i.default.registerComponent("CustomControlSpacer",a),r.default=a},{22:22,5:5}],22:[function(e,t,r){"use strict";r.__esModule=!0;var n,i=e(5),o=(n=i,n&&n.__esModule?n:{default:n});var a=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return t.prototype.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(o.default);o.default.registerComponent("Spacer",a),r.default=a},{5:5}],23:[function(e,t,r){"use strict";r.__esModule=!0;var n=o(e(31)),i=o(e(5));function o(e){return e&&e.__esModule?e:{default:e}}var a=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n.track={player:r,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1;var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return i.addClass("vjs-texttrack-settings"),i.controlText(", opens "+n.kind+" settings dialog"),i}return t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").el_.focus()},t}(n.default);i.default.registerComponent("CaptionSettingsMenuItem",a),r.default=a},{31:31,5:5}],24:[function(e,t,r){"use strict";r.__esModule=!0;var n=a(e(30)),i=a(e(5)),o=a(e(23));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n,i));return o.el_.setAttribute("aria-label","Captions Menu"),o}return t.prototype.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},t.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||(t.push(new o.default(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(n.default);s.prototype.kind_="captions",s.prototype.controlText_="Captions",i.default.registerComponent("CaptionsButton",s),r.default=s},{23:23,30:30,5:5}],25:[function(e,t,r){"use strict";r.__esModule=!0;var n=s(e(30)),i=s(e(5)),o=s(e(26)),a=s(e(91));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n,i));return o.el_.setAttribute("aria-label","Chapters Menu"),o}return t.prototype.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},t.prototype.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),e.prototype.update.call(this)},t.prototype.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var r=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);r&&r.addEventListener("load",this.updateHandler_)}}},t.prototype.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var r=e[t];if(r.kind===this.kind_)return r}},t.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize((0,a.default)(this.kind_))},t.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},t.prototype.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var r=0,n=t.length;r1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n.tracks=r.textTracks(),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n))}return t.prototype.createItems=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.push(new a.default(this.player_,{kind:this.kind_})),this.hideThreshold_+=1;var t=this.player_.textTracks();if(!t)return e;for(var r=0;rCurrent Time 0:00'},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.updateContent=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),r=this.localize("Current Time"),n=(0,o.default)(t,this.player_.duration());n!==this.formattedTime_&&(this.formattedTime_=n,this.contentEl_.innerHTML=''+r+" "+n)},t}(n.default);n.default.registerComponent("CurrentTimeDisplay",s),r.default=s},{5:5,81:81,84:84}],33:[function(e,t,r){"use strict";r.__esModule=!0;var n=a(e(5)),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e(81)),o=a(e(84));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return i.on(r,"durationchange",i.updateContent),i.on(r,"timeupdate",i.updateContent),i.on(r,"loadedmetadata",i.updateContent),i}return t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-control vjs-control"});return this.contentEl_=i.createEl("div",{className:"vjs-duration-display",innerHTML:''+this.localize("Duration Time")+" 0:00"},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.updateContent=function(e){var t=this.player_.duration();if(t&&this.duration_!==t){this.duration_=t;var r=this.localize("Duration Time"),n=(0,o.default)(t);this.contentEl_.innerHTML=''+r+" "+n}},t}(n.default);n.default.registerComponent("DurationDisplay",s),r.default=s},{5:5,81:81,84:84}],34:[function(e,t,r){"use strict";r.__esModule=!0;var n=a(e(5)),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e(81)),o=a(e(84));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return i.on(r,"timeupdate",i.updateContent),i.on(r,"durationchange",i.updateContent),i}return t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return this.contentEl_=i.createEl("div",{className:"vjs-remaining-time-display",innerHTML:''+this.localize("Remaining Time")+" -0:00"},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.updateContent=function(e){if(this.player_.duration()){var t=this.localize("Remaining Time"),r=(0,o.default)(this.player_.remainingTime());r!==this.formattedTime_&&(this.formattedTime_=r,this.contentEl_.innerHTML=''+t+" -"+r)}},t}(n.default);n.default.registerComponent("RemainingTimeDisplay",s),r.default=s},{5:5,81:81,84:84}],35:[function(e,t,r){"use strict";r.__esModule=!0;var n,i=e(5),o=(n=i,n&&n.__esModule?n:{default:n});var a=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"
/
"})},t}(o.default);o.default.registerComponent("TimeDivider",a),r.default=a},{5:5}],36:[function(e,t,r){"use strict";r.__esModule=!0;var n=a(e(47)),i=a(e(5)),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e(83));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=n.tracks,a=s(this,e.call(this,r,n));if(a.items.length<=1&&a.hide(),!i)return s(a);var u=o.bind(a,a.update);return i.addEventListener("removetrack",u),i.addEventListener("addtrack",u),a.player_.on("dispose",function(){i.removeEventListener("removetrack",u),i.removeEventListener("addtrack",u)}),a}return t}(n.default);i.default.registerComponent("TrackButton",u),r.default=u},{47:47,5:5,83:83}],37:[function(e,t,r){"use strict";r.__esModule=!0;var n=a(e(57)),i=a(e(5)),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e(83));e(39);function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return i.on(r,"volumechange",i.updateARIAAttributes),r.ready(o.bind(i,i.updateARIAAttributes)),i}return t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":"volume level"})},t.prototype.handleMouseMove=function(e){this.checkMuted(),this.player_.volume(this.calculateDistance(e))},t.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.prototype.updateARIAAttributes=function(e){var t=(100*this.player_.volume()).toFixed(2);this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},t}(n.default);s.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},s.prototype.playerEvent="volumechange",i.default.registerComponent("VolumeBar",s),r.default=s},{39:39,5:5,57:57,83:83}],38:[function(e,t,r){"use strict";r.__esModule=!0;var n,i=e(5),o=(n=i,n&&n.__esModule?n:{default:n});e(37);var a=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return r.tech_&&!1===r.tech_.featuresVolumeControl&&i.addClass("vjs-hidden"),i.on(r,"loadstart",function(){!1===r.tech_.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}),i}return t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},t}(o.default);a.prototype.options_={children:["volumeBar"]},o.default.registerComponent("VolumeControl",a),r.default=a},{37:37,5:5}],39:[function(e,t,r){"use strict";r.__esModule=!0;var n,i=e(5),o=(n=i,n&&n.__esModule?n:{default:n});var a=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})},t}(o.default);o.default.registerComponent("VolumeLevel",a),r.default=a},{5:5}],40:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e(83)),i=l(e(5)),o=l(e(54)),a=l(e(53)),s=l(e(11)),u=l(e(37));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),void 0===n.inline&&(n.inline=!0),void 0===n.vertical&&(n.inline?n.vertical=!1:n.vertical=!0),n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=!!n.vertical;var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));i.on(r,"volumechange",i.volumeUpdate),i.on(r,"loadstart",i.volumeUpdate);function o(){r.tech_&&!1===r.tech_.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}return o.call(i),i.on(r,"loadstart",o),i.on(i.volumeBar,["slideractive","focus"],function(){this.addClass("vjs-slider-active")}),i.on(i.volumeBar,["sliderinactive","blur"],function(){this.removeClass("vjs-slider-active")}),i.on(i.volumeBar,["focus"],function(){this.addClass("vjs-lock-showing")}),i.on(i.volumeBar,["blur"],function(){this.removeClass("vjs-lock-showing")}),i}return t.prototype.buildCSSClass=function(){var t="";return t=this.options_.vertical?"vjs-volume-menu-button-vertical":"vjs-volume-menu-button-horizontal","vjs-volume-menu-button "+e.prototype.buildCSSClass.call(this)+" "+t},t.prototype.createPopup=function(){var e=new o.default(this.player_,{contentElType:"div"}),t=new u.default(this.player_,this.options_.volumeBar);return e.addChild(t),this.menuContent=e,this.volumeBar=t,this.attachVolumeBarEvents(),e},t.prototype.handleClick=function(t){s.default.prototype.handleClick.call(this),e.prototype.handleClick.call(this)},t.prototype.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],n.bind(this,this.handleMouseDown))},t.prototype.handleMouseDown=function(e){this.on(["mousemove","touchmove"],n.bind(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.el_.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},t.prototype.handleMouseUp=function(e){this.off(["mousemove","touchmove"],n.bind(this.volumeBar,this.volumeBar.handleMouseMove))},t}(a.default);c.prototype.volumeUpdate=s.default.prototype.update,c.prototype.controlText_="Mute",i.default.registerComponent("VolumeMenuButton",c),r.default=c},{11:11,37:37,5:5,53:53,54:54,83:83}],41:[function(e,t,r){"use strict";r.__esModule=!0;var n=a(e(5)),i=a(e(50)),o=a(e(87));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return i.on(r,"error",i.open),i}return t.prototype.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},t.prototype.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(i.default);s.prototype.options_=(0,o.default)(i.default.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),n.default.registerComponent("ErrorDisplay",s),r.default=s},{5:5,50:50,87:87}],42:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e(82));var i=function(){};i.prototype.allowedEvents_={},i.prototype.on=function(e,t){var r=this.addEventListener;this.addEventListener=function(){},n.on(this,e,t),this.addEventListener=r},i.prototype.addEventListener=i.prototype.on,i.prototype.off=function(e,t){n.off(this,e,t)},i.prototype.removeEventListener=i.prototype.off,i.prototype.one=function(e,t){var r=this.addEventListener;this.addEventListener=function(){},n.one(this,e,t),this.addEventListener=r},i.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=n.fixEvent(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),n.trigger(this,e)},i.prototype.dispatchEvent=i.prototype.trigger,r.default=i},{82:82}],43:[function(e,t,r){"use strict";r.__esModule=!0;var n,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e(86),a=(n=o,n&&n.__esModule?n:{default:n}),s=e(88);r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=function(){e.apply(this,arguments)},n={};(0,s.isObject)(t)?("function"==typeof t.init&&(a.default.warn("Constructor logic via init() is deprecated; please use constructor() instead."),t.constructor=t.init),t.constructor!==Object.prototype.constructor&&(r=t.constructor),n=t):"function"==typeof t&&(r=t),function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.super_=t)}(r,e);for(var o in n)n.hasOwnProperty(o)&&(r.prototype[o]=n[o]);return r}},{86:86,88:88}],44:[function(e,t,r){"use strict";r.__esModule=!0;var n,i=e(94),o=(n=i,n&&n.__esModule?n:{default:n});for(var a={},s=[["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"]],u=s[0],l=void 0,c=0;c1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return i.update(),i.enabled_=!0,i.el_.setAttribute("aria-haspopup","true"),i.el_.setAttribute("role","menuitem"),i.on("keydown",i.handleSubmenuKeyPress),i}return t.prototype.update=function(){var e=this.createMenu();this.menu&&this.removeChild(this.menu),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.prototype.createMenu=function(){var e=new o.default(this.player_);if(this.hideThreshold_=0,this.options_.title){var t=a.createEl("li",{className:"vjs-menu-title",innerHTML:(0,u.default)(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,e.children_.unshift(t),a.insertElFirst(t,e.contentEl())}if(this.items=this.createItems(),this.items)for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0,t=this.children().slice();t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className)&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(o.default);o.default.registerComponent("Menu",c),r.default=c},{5:5,81:81,82:82,83:83}],50:[function(e,t,r){"use strict";r.__esModule=!0;var n,i=u(e(81)),o=u(e(83)),a=e(5),s=(n=a,n&&n.__esModule?n:{default:n});function u(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var l="vjs-modal-dialog",c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return o.opened_=o.hasBeenOpened_=o.hasBeenFilled_=!1,o.closeable(!o.options_.uncloseable),o.content(o.options_.content),o.contentEl_=i.createEl("div",{className:l+"-content"},{role:"document"}),o.descEl_=i.createEl("p",{className:l+"-description vjs-offscreen",id:o.el().getAttribute("aria-describedby")}),i.textContent(o.descEl_,o.description()),o.el_.appendChild(o.descEl_),o.el_.appendChild(o.contentEl_),o}return t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},t.prototype.buildCSSClass=function(){return l+" vjs-hidden "+e.prototype.buildCSSClass.call(this)},t.prototype.handleKeyPress=function(e){27===e.which&&this.closeable()&&this.close()},t.prototype.label=function(){return this.options_.label||this.localize("Modal Window")},t.prototype.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},t.prototype.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",o.bind(this,this.handleKeyPress)),e.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}return this},t.prototype.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},t.prototype.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",o.bind(this,this.handleKeyPress)),e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.options_.temporary&&this.dispose()}return this},t.prototype.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,r=this.getChild("closeButton");if(t&&!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)}!t&&r&&(this.off(r,"close",this.close),this.removeChild(r),r.dispose())}return this.closeable_},t.prototype.fill=function(){return this.fillWith(this.content())},t.prototype.fillWith=function(e){var t=this.contentEl(),r=t.parentNode,n=t.nextSibling;return this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,r.removeChild(t),this.empty(),i.insertContent(t,e),this.trigger("modalfill"),n?r.insertBefore(t,n):r.appendChild(t),this},t.prototype.empty=function(){return this.trigger("beforemodalempty"),i.emptyEl(this.contentEl()),this.trigger("modalempty"),this},t.prototype.content=function(e){return void 0!==e&&(this.content_=e),this.content_},t}(s.default);c.prototype.options_={pauseOnOpen:!0,temporary:!0},s.default.registerComponent("ModalDialog",c),r.default=c},{5:5,81:81,83:83}],51:[function(e,t,r){"use strict";r.__esModule=!0;var n=C(e(5)),i=C(e(94)),o=C(e(95)),a=O(e(82)),s=O(e(81)),u=O(e(83)),l=O(e(85)),c=O(e(78)),d=C(e(86)),f=C(e(91)),p=e(90),h=e(79),y=O(e(89)),m=C(e(44)),v=C(e(46)),g=C(e(97)),_=e(88),b=C(e(87)),T=C(e(69)),w=C(e(50)),S=C(e(62)),k=C(e(63)),E=C(e(76));e(61),e(59),e(55),e(68),e(45),e(1),e(4),e(8),e(41),e(71),e(60);function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function C(e){return e&&e.__esModule?e:{default:e}}var j=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n,i){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r.id=r.id||"vjs_video_"+l.newGUID(),(n=(0,_.assign)(t.getTagSettings(r),n)).initChildren=!1,n.createEl=!1,n.reportTouchActivity=!1,!n.language)if("function"==typeof r.closest){var o=r.closest("[lang]");o&&(n.language=o.getAttribute("lang"))}else for(var a=r;a&&1===a.nodeType;){if(s.getElAttributes(a).hasOwnProperty("lang")){n.language=a.getAttribute("lang");break}a=a.parentNode}var u=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,null,n,i));if(!u.options_||!u.options_.techOrder||!u.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(u.tag=r,u.tagAttributes=r&&s.getElAttributes(r),u.language(u.options_.language),n.languages){var f={};Object.getOwnPropertyNames(n.languages).forEach(function(e){f[e.toLowerCase()]=n.languages[e]}),u.languages_=f}else u.languages_=t.prototype.options_.languages;u.cache_={},u.poster_=n.poster||"",u.controls_=!!n.controls,r.controls=!1,u.scrubbing_=!1,u.el_=u.createEl();var p=(0,b.default)(u.options_);if(n.plugins){var h=n.plugins;Object.getOwnPropertyNames(h).forEach(function(e){"function"==typeof this[e]?this[e](h[e]):d.default.error("Unable to find plugin:",e)},u)}return u.options_.playerOptions=p,u.initChildren(),u.isAudio("audio"===r.nodeName.toLowerCase()),u.controls()?u.addClass("vjs-controls-enabled"):u.addClass("vjs-controls-disabled"),u.el_.setAttribute("role","region"),u.isAudio()?u.el_.setAttribute("aria-label","audio player"):u.el_.setAttribute("aria-label","video player"),u.isAudio()&&u.addClass("vjs-audio"),u.flexNotSupported_()&&u.addClass("vjs-no-flex"),c.IS_IOS||u.addClass("vjs-workinghover"),t.players[u.id_]=u,u.userActive(!0),u.reportUserActivity(),u.listenForUserActivity_(),u.on("fullscreenchange",u.handleFullscreenChange_),u.on("stageclick",u.handleStageClick_),u}return t.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&this.styleEl_.parentNode.removeChild(this.styleEl_),t.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(),e.prototype.dispose.call(this)},t.prototype.createEl=function(){var t=this.tag,r=void 0,n=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player");r=this.el_=n?t.parentNode:e.prototype.createEl.call(this,"div"),t.setAttribute("tabindex","-1"),t.removeAttribute("width"),t.removeAttribute("height");var i=s.getElAttributes(t);if(Object.getOwnPropertyNames(i).forEach(function(e){"class"===e?r.className+=" "+i[e]:r.setAttribute(e,i[e])}),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=r.player=this,this.addClass("vjs-paused"),!0!==o.default.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=y.createStyleElement("vjs-styles-dimensions");var a=s.$(".vjs-styles-defaults"),u=s.$("head");u.insertBefore(this.styleEl_,a?a.nextSibling:u.firstChild)}this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var l=t.getElementsByTagName("a"),c=0;c0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),i=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/i:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*i,r=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(r),y.setTextContent(this.styleEl_,"\n ."+r+" {\n width: "+e+"px;\n height: "+t+"px;\n }\n\n ."+r+".vjs-fluid {\n padding-top: "+100*i+"%;\n }\n ")}else{var a="number"==typeof this.width_?this.width_:this.options_.width,s="number"==typeof this.height_?this.height_:this.options_.height,u=this.tech_&&this.tech_.el();u&&(a>=0&&(u.width=a),s>=0&&(u.height=s))}},t.prototype.loadTech_=function(e,t){var r=this;this.tech_&&this.unloadTech_(),"Html5"!==e&&this.tag&&(S.default.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=e,this.isReady_=!1;var i=(0,_.assign)({source:t,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+e+"_api",videoTracks:this.videoTracks_,textTracks:this.textTracks_,audioTracks:this.audioTracks_,autoplay:this.options_.autoplay,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"]},this.options_[e.toLowerCase()]);this.tag&&(i.tag=this.tag),t&&(this.currentType_=t.type,t.src===this.cache_.src&&this.cache_.currentTime>0&&(i.startTime=this.cache_.currentTime),this.cache_.sources=null,this.cache_.source=t,this.cache_.src=t.src);var o=S.default.getTech(e);o||(o=n.default.getComponent(e)),this.tech_=new o(i),this.tech_.ready(u.bind(this,this.handleTechReady_),!0),T.default.jsonToTextTracks(this.textTracksJson_||[],this.tech_),j.forEach(function(e){r.on(r.tech_,e,r["handleTech"+(0,f.default)(e)+"_"])}),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"canplay",this.handleTechCanPlay_),this.on(this.tech_,"canplaythrough",this.handleTechCanPlayThrough_),this.on(this.tech_,"playing",this.handleTechPlaying_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"seeked",this.handleTechSeeked_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===e&&this.tag||s.insertElFirst(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},t.prototype.unloadTech_=function(){this.videoTracks_=this.videoTracks(),this.textTracks_=this.textTracks(),this.audioTracks_=this.audioTracks(),this.textTracksJson_=T.default.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1},t.prototype.tech=function(e){if(e&&e.IWillNotUseThisInPlugins)return this.tech_;var t="\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n `IWillNotUseThisInPlugins` to the `tech` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n ";throw o.default.alert(t),new Error(t)},t.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_)},t.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_)},t.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(e){(0,d.default)("deleting tag.poster throws in some browsers",e)}this.play()}},t.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"))},t.prototype.hasStarted=function(e){return void 0!==e?(this.hasStarted_!==e&&(this.hasStarted_=e,e?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.hasStarted_},t.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},t.prototype.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return e.removeClass("vjs-waiting")})},t.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},t.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},t.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},t.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},t.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},t.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(d.default.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")},t.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},t.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},t.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},t.prototype.handleTechClick_=function(e){0===e.button&&this.controls()&&(this.paused()?this.play():this.pause())},t.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},t.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},t.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},t.prototype.handleTechTouchEnd_=function(e){e.preventDefault()},t.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},t.prototype.handleStageClick_=function(){this.reportUserActivity()},t.prototype.handleTechFullscreenChange_=function(e,t){t&&this.isFullscreen(t.isFullscreen),this.trigger("fullscreenchange")},t.prototype.handleTechError_=function(){var e=this.tech_.error();this.error(e)},t.prototype.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},t.prototype.getCache=function(){return this.cache_},t.prototype.techCall_=function(e,t){if(this.tech_&&!this.tech_.isReady_)this.tech_.ready(function(){this[e](t)},!0);else try{this.tech_&&this.tech_[e](t)}catch(e){throw(0,d.default)(e),e}},t.prototype.techGet_=function(e){if(this.tech_&&this.tech_.isReady_)try{return this.tech_[e]()}catch(t){throw void 0===this.tech_[e]?(0,d.default)("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t):"TypeError"===t.name?((0,d.default)("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1):(0,d.default)(t),t}},t.prototype.play=function(){return this.src()||this.currentSrc()?this.techCall_("play"):this.tech_.one("loadstart",function(){this.play()}),this},t.prototype.pause=function(){return this.techCall_("pause"),this},t.prototype.paused=function(){return!1!==this.techGet_("paused")},t.prototype.scrubbing=function(e){return void 0!==e?(this.scrubbing_=!!e,e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.scrubbing_},t.prototype.currentTime=function(e){return void 0!==e?(this.techCall_("setCurrentTime",e),this):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},t.prototype.duration=function(e){return void 0===e?this.cache_.duration||0:((e=parseFloat(e)||0)<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},t.prototype.remainingTime=function(){return this.duration()-this.currentTime()},t.prototype.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=(0,p.createTimeRange)(0,0)),e},t.prototype.bufferedPercent=function(){return(0,h.bufferedPercent)(this.buffered(),this.duration())},t.prototype.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),r=e.end(e.length-1);return r>t&&(r=t),r},t.prototype.volume=function(e){var t=void 0;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),this):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},t.prototype.muted=function(e){return void 0!==e?(this.techCall_("setMuted",e),this):this.techGet_("muted")||!1},t.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},t.prototype.isFullscreen=function(e){return void 0!==e?(this.isFullscreen_=!!e,this):!!this.isFullscreen_},t.prototype.requestFullscreen=function(){var e=m.default;return this.isFullscreen(!0),e.requestFullscreen?(a.on(i.default,e.fullscreenchange,u.bind(this,function t(r){this.isFullscreen(i.default[e.fullscreenElement]),!1===this.isFullscreen()&&a.off(i.default,e.fullscreenchange,t),this.trigger("fullscreenchange")})),this.el_[e.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},t.prototype.exitFullscreen=function(){var e=m.default;return this.isFullscreen(!1),e.requestFullscreen?i.default[e.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},t.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=i.default.documentElement.style.overflow,a.on(i.default,"keydown",u.bind(this,this.fullWindowOnEscKey)),i.default.documentElement.style.overflow="hidden",s.addElClass(i.default.body,"vjs-full-window"),this.trigger("enterFullWindow")},t.prototype.fullWindowOnEscKey=function(e){27===e.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},t.prototype.exitFullWindow=function(){this.isFullWindow=!1,a.off(i.default,"keydown",this.fullWindowOnEscKey),i.default.documentElement.style.overflow=this.docOrigOverflow,s.removeElClass(i.default.body,"vjs-full-window"),this.trigger("exitFullWindow")},t.prototype.canPlayType=function(e){for(var t=void 0,r=0,i=this.options_.techOrder;r0&&(i=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))}},250)},t.prototype.playbackRate=function(e){return void 0!==e?(this.techCall_("setPlaybackRate",e),this):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("playbackRate"):1},t.prototype.isAudio=function(e){return void 0!==e?(this.isAudio_=!!e,this):!!this.isAudio_},t.prototype.videoTracks=function(){return this.tech_?this.tech_.videoTracks():(this.videoTracks_=this.videoTracks_||new E.default,this.videoTracks_)},t.prototype.audioTracks=function(){return this.tech_?this.tech_.audioTracks():(this.audioTracks_=this.audioTracks_||new k.default,this.audioTracks_)},t.prototype.textTracks=function(){if(this.tech_)return this.tech_.textTracks()},t.prototype.remoteTextTracks=function(){if(this.tech_)return this.tech_.remoteTextTracks()},t.prototype.remoteTextTrackEls=function(){if(this.tech_)return this.tech_.remoteTextTrackEls()},t.prototype.addTextTrack=function(e,t,r){if(this.tech_)return this.tech_.addTextTrack(e,t,r)},t.prototype.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},t.prototype.removeRemoteTextTrack=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).track,t=void 0===e?arguments[0]:e;if(this.tech_)return this.tech_.removeRemoteTextTrack(t)},t.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},t.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},t.prototype.language=function(e){return void 0===e?this.language_:(this.language_=String(e).toLowerCase(),this)},t.prototype.languages=function(){return(0,b.default)(t.prototype.options_.languages,this.languages_)},t.prototype.toJSON=function(){var e=(0,b.default)(this.options_),t=e.tracks;e.tracks=[];for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return i.update(),i}return t.prototype.update=function(){var e=this.createPopup();this.popup&&this.removeChild(this.popup),this.popup=e,this.addChild(e),this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},t.prototype.createPopup=function(){},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t.prototype.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},t}(n.default);i.default.registerComponent("PopupButton",a),r.default=a},{3:3,5:5}],54:[function(e,t,r){"use strict";r.__esModule=!0;var n,i=e(5),o=(n=i,n&&n.__esModule?n:{default:n}),a=l(e(81)),s=l(e(83)),u=l(e(82));function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return t.prototype.addItem=function(e){this.addChild(e),e.on("click",s.bind(this,function(){this.unlockShowing()}))},t.prototype.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=a.createEl(t,{className:"vjs-menu-content"});var r=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return r.appendChild(this.contentEl_),u.on(r,"click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),r},t}(o.default);o.default.registerComponent("Popup",c),r.default=c},{5:5,81:81,82:82,83:83}],55:[function(e,t,r){"use strict";r.__esModule=!0;var n=l(e(3)),i=l(e(5)),o=u(e(83)),a=u(e(81)),s=u(e(78));function u(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return i.update(),r.on("posterchange",o.bind(i,i.update)),i}return t.prototype.dispose=function(){this.player().off("posterchange",this.update),e.prototype.dispose.call(this)},t.prototype.createEl=function(){var e=a.createEl("div",{className:"vjs-poster",tabIndex:-1});return s.BACKGROUND_SIZE_SUPPORTED||(this.fallbackImg_=a.createEl("img"),e.appendChild(this.fallbackImg_)),e},t.prototype.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},t.prototype.setSrc=function(e){if(this.fallbackImg_)this.fallbackImg_.src=e;else{var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t}},t.prototype.handleClick=function(e){this.player_.controls()&&(this.player_.paused()?this.player_.play():this.player_.pause())},t}(n.default);i.default.registerComponent("PosterImage",c),r.default=c},{3:3,5:5,78:78,81:81,83:83}],56:[function(e,t,r){"use strict";r.__esModule=!0,r.hasLoaded=r.autoSetupTimeout=r.autoSetup=void 0;var n=u(e(81)),i=u(e(82)),o=s(e(94)),a=s(e(95));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var l=!1,c=void 0,d=function(){if(n.isReal()){var e=o.default.getElementsByTagName("video"),t=o.default.getElementsByTagName("audio"),r=[];if(e&&e.length>0)for(var i=0,a=e.length;i0)for(var s=0,u=t.length;s0)for(var d=0,p=r.length;d1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.className=r.className+" vjs-slider",r=(0,s.assign)({tabIndex:0},r),n=(0,s.assign)({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n),e.prototype.createEl.call(this,t,r,n)},t.prototype.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;e.preventDefault(),a.blockTextSelection(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},t.prototype.handleMouseMove=function(e){},t.prototype.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;a.unblockTextSelection(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},t.prototype.update=function(){if(this.el_){var e=this.getPercent(),t=this.bar;if(t){("number"!=typeof e||e!=e||e<0||e===1/0)&&(e=0);var r=(100*e).toFixed(2)+"%";this.vertical()?t.el().style.height=r:t.el().style.width=r}}},t.prototype.calculateDistance=function(e){var t=a.getPointerPosition(this.el_,e);return this.vertical()?t.y:t.x},t.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepBack()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepForward())},t.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleClick=function(e){e.stopImmediatePropagation(),e.preventDefault()},t.prototype.vertical=function(e){return void 0===e?this.vertical_||!1:(this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},t}(o.default);o.default.registerComponent("Slider",u),r.default=u},{5:5,81:81,88:88}],58:[function(e,t,r){"use strict";r.__esModule=!0;r.default=function(e){return e.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"},e.streamFromParts=function(e,t){return e+"&"+t},e.streamToParts=function(e){var t={connection:"",stream:""};if(!e)return t;var r=e.search(/&(?!\w+=)/),n=void 0;return-1!==r?n=r+1:0===(r=n=e.lastIndexOf("/")+1)&&(r=n=e.length),t.connection=e.substring(0,r),t.stream=e.substring(n,e.length),t},e.isStreamingType=function(t){return t in e.streamingFormats},e.RTMP_RE=/^rtmp[set]?:\/\//i,e.isStreamingSrc=function(t){return e.RTMP_RE.test(t)},e.rtmpSourceHandler={},e.rtmpSourceHandler.canPlayType=function(t){return e.isStreamingType(t)?"maybe":""},e.rtmpSourceHandler.canHandleSource=function(t,r){var n=e.rtmpSourceHandler.canPlayType(t.type);return n||(e.isStreamingSrc(t.src)?"maybe":"")},e.rtmpSourceHandler.handleSource=function(t,r,n){var i=e.streamToParts(t.src);r.setRtmpConnection(i.connection),r.setRtmpStream(i.stream)},e.registerSourceHandler(e.rtmpSourceHandler),e}},{}],59:[function(e,t,r){"use strict";r.__esModule=!0;var n=f(e(62)),i=d(e(81)),o=d(e(92)),a=e(90),s=f(e(58)),u=f(e(5)),l=f(e(95)),c=e(88);function d(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function f(e){return e&&e.__esModule?e:{default:e}}var p=l.default.navigator,h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return r.source&&i.ready(function(){this.setSource(r.source)},!0),r.startTime&&i.ready(function(){this.load(),this.play(),this.currentTime(r.startTime)},!0),l.default.videojs=l.default.videojs||{},l.default.videojs.Flash=l.default.videojs.Flash||{},l.default.videojs.Flash.onReady=t.onReady,l.default.videojs.Flash.onEvent=t.onEvent,l.default.videojs.Flash.onError=t.onError,i.on("seeked",function(){this.lastSeekTarget_=void 0}),i}return t.prototype.createEl=function(){var e=this.options_;if(!e.swf){e.swf="//vjs.zencdn.net/swf/5.3.0/video-js.swf"}var r=e.techId,n=(0,c.assign)({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:e.autoplay,preload:e.preload,loop:e.loop,muted:e.muted},e.flashVars),i=(0,c.assign)({wmode:"opaque",bgcolor:"#000000"},e.params),o=(0,c.assign)({id:r,name:r,class:"vjs-tech"},e.attributes);return this.el_=t.embed(e.swf,n,i,o),this.el_.tech=this,this.el_},t.prototype.play=function(){this.ended()&&this.setCurrentTime(0),this.el_.vjs_play()},t.prototype.pause=function(){this.el_.vjs_pause()},t.prototype.src=function(e){return void 0===e?this.currentSrc():this.setSrc(e)},t.prototype.setSrc=function(e){var t=this;e=o.getAbsoluteURL(e),this.el_.vjs_src(e),this.autoplay()&&this.setTimeout(function(){return t.play()},0)},t.prototype.seeking=function(){return void 0!==this.lastSeekTarget_},t.prototype.setCurrentTime=function(t){var r=this.seekable();r.length&&(t=(t=t>r.start(0)?t:r.start(0))=0?e:1/0},t.prototype.load=function(){this.el_.vjs_load()},t.prototype.poster=function(){this.el_.vjs_getProperty("poster")},t.prototype.setPoster=function(){},t.prototype.seekable=function(){var e=this.duration();return 0===e?(0,a.createTimeRange)():(0,a.createTimeRange)(0,e)},t.prototype.buffered=function(){var e=this.el_.vjs_getProperty("buffered");return 0===e.length?(0,a.createTimeRange)():(0,a.createTimeRange)(e[0][0],e[0][1])},t.prototype.supportsFullScreen=function(){return!1},t.prototype.enterFullScreen=function(){return!1},t}(n.default),y=h.prototype,m="rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted".split(","),v="networkState,readyState,initialTime,startOffsetTime,paused,ended,videoWidth,videoHeight".split(",");function g(e){var t=e.charAt(0).toUpperCase()+e.slice(1);y["set"+t]=function(t){return this.el_.vjs_setProperty(e,t)}}function _(e){y[e]=function(){return this.el_.vjs_getProperty(e)}}for(var b=0;b=10},n.default.withSourceHandlers(h),h.nativeSourceHandler={},h.nativeSourceHandler.canPlayType=function(e){return e in h.formats?"maybe":""},h.nativeSourceHandler.canHandleSource=function(e,t){var r=void 0;return r=e.type?e.type.replace(/;.*/,"").toLowerCase():function(e){var t=o.getFileExtension(e);return t?"video/"+t:""}(e.src),h.nativeSourceHandler.canPlayType(r)},h.nativeSourceHandler.handleSource=function(e,t,r){t.setSrc(e.src)},h.nativeSourceHandler.dispose=function(){},h.registerSourceHandler(h.nativeSourceHandler),h.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"},h.onReady=function(e){var t=i.getEl(e),r=t&&t.tech;r&&r.el()&&h.checkReady(r)},h.checkReady=function(e){e.el()&&(e.el().vjs_getProperty?e.triggerReady():this.setTimeout(function(){h.checkReady(e)},50))},h.onEvent=function(e,t){var r=i.getEl(e).tech,n=Array.prototype.slice.call(arguments,2);r.setTimeout(function(){r.trigger(t,n)},1)},h.onError=function(e,t){var r=i.getEl(e).tech;if("srcnotfound"===t)return r.error(4);r.error("FLASH: "+t)},h.version=function(){var e="0,0,0";try{e=new l.default.ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(t){try{p.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(e=(p.plugins["Shockwave Flash 2.0"]||p.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(e){}}return e.split(",")},h.embed=function(e,t,r,n){var o=h.getEmbedCode(e,t,r,n);return i.createEl("div",{innerHTML:o}).childNodes[0]},h.getEmbedCode=function(e,t,r,n){var i="",o="",a="";return t&&Object.getOwnPropertyNames(t).forEach(function(e){i+=e+"="+t[e]+"&"}),r=(0,c.assign)({movie:e,flashvars:i,allowScriptAccess:"always",allowNetworking:"all"},r),Object.getOwnPropertyNames(r).forEach(function(e){o+=''}),n=(0,c.assign)({data:e,width:"100%",height:"100%"},n),Object.getOwnPropertyNames(n).forEach(function(e){a+=e+'="'+n[e]+'" '}),'"+o+""},(0,s.default)(h),u.default.registerComponent("Flash",h),n.default.registerTech("Flash",h),r.default=h},{5:5,58:58,62:62,81:81,88:88,90:90,92:92,95:95}],60:[function(e,t,r){"use strict";r.__esModule=!0;var n,i,o=(n=["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."],i=["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."],n.raw=i,n),a=b(e(62)),s=b(e(5)),u=_(e(81)),l=_(e(92)),c=_(e(83)),d=b(e(86)),f=b(e(98)),p=_(e(78)),h=b(e(94)),y=b(e(95)),m=e(88),v=b(e(87)),g=b(e(91));function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function b(e){return e&&e.__esModule?e:{default:e}}var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n)),a=r.source,s=!1;if(a&&(i.el_.currentSrc!==a.src||r.tag&&3===r.tag.initNetworkState_)?i.setSource(a):i.handleLateInit_(i.el_),i.el_.hasChildNodes()){for(var u=i.el_.childNodes,h=u.length,y=[];h--;){var m=u[h];"track"===m.nodeName.toLowerCase()&&(i.featuresNativeTextTracks?(i.remoteTextTrackEls().addTrackElement_(m),i.remoteTextTracks().addTrack_(m.track),s||i.el_.hasAttribute("crossorigin")||!l.isCrossOrigin(m.src)||(s=!0)):y.push(m))}for(var v=0;v=0;a--){var s=o[a],l={};void 0!==this.options_[s]&&(l[s]=this.options_[s]),u.setElAttributes(e,l)}return e},t.prototype.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,r=function(){t=!0};this.on("loadstart",r);var n=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",n),void this.ready(function(){this.off("loadstart",r),this.off("loadedmetadata",n),t||this.trigger("loadstart")})}var i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready(function(){i.forEach(function(e){this.trigger(e)},this)})}},t.prototype.proxyNativeTextTracks_=function(){var e=this.el().textTracks;if(e){for(var t=0;t0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))};return this.on("timeupdate",t),NaN}return this.el_.duration||NaN},t.prototype.width=function(){return this.el_.offsetWidth},t.prototype.height=function(){return this.el_.offsetHeight},t.prototype.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},r=function(){this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0})};this.on("webkitbeginfullscreen",r),this.on("dispose",function(){e.off("webkitbeginfullscreen",r),e.off("webkitendfullscreen",t)})}},t.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=y.default.navigator&&y.default.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},t.prototype.enterFullScreen=function(){var e=this.el_;e.paused&&e.networkState<=e.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){e.pause(),e.webkitEnterFullScreen()},0)):e.webkitEnterFullScreen()},t.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},t.prototype.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},t.prototype.reset=function(){t.resetMediaElement(this.el_)},t.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},t.prototype.setControls=function(e){this.el_.controls=!!e},t.prototype.addTextTrack=function(t,r,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,r,n):e.prototype.addTextTrack.call(this,t,r,n)},t.prototype.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var r=h.default.createElement("track");return t.kind&&(r.kind=t.kind),t.label&&(r.label=t.label),(t.language||t.srclang)&&(r.srclang=t.language||t.srclang),t.default&&(r.default=t.default),t.id&&(r.id=t.id),t.src&&(r.src=t.src),r},t.prototype.addRemoteTextTrack=function(t,r){var n=e.prototype.addRemoteTextTrack.call(this,t,r);return this.featuresNativeTextTracks&&this.el().appendChild(n),n},t.prototype.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var r=this.$$("track"),n=r.length;n--;)t!==r[n]&&t!==r[n].track||this.el().removeChild(r[n])},t}(a.default);if(u.isReal()){T.TEST_VID=h.default.createElement("video");var w=h.default.createElement("track");w.kind="captions",w.srclang="en",w.label="English",T.TEST_VID.appendChild(w)}T.isSupported=function(){try{T.TEST_VID.volume=.5}catch(e){return!1}return!(!T.TEST_VID||!T.TEST_VID.canPlayType)},T.canControlVolume=function(){try{var e=T.TEST_VID.volume;return T.TEST_VID.volume=e/2+.1,e!==T.TEST_VID.volume}catch(e){return!1}},T.canControlPlaybackRate=function(){if(p.IS_ANDROID&&p.IS_CHROME)return!1;try{var e=T.TEST_VID.playbackRate;return T.TEST_VID.playbackRate=e/2+.1,e!==T.TEST_VID.playbackRate}catch(e){return!1}},T.supportsNativeTextTracks=function(){return p.IS_ANY_SAFARI},T.supportsNativeVideoTracks=function(){return!(!T.TEST_VID||!T.TEST_VID.videoTracks)},T.supportsNativeAudioTracks=function(){return!(!T.TEST_VID||!T.TEST_VID.audioTracks)},T.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],T.prototype.featuresVolumeControl=T.canControlVolume(),T.prototype.featuresPlaybackRate=T.canControlPlaybackRate(),T.prototype.movingMediaElementInDOM=!p.IS_IOS,T.prototype.featuresFullscreenResize=!0,T.prototype.featuresProgressEvents=!0,T.prototype.featuresTimeupdateEvents=!0,T.prototype.featuresNativeTextTracks=T.supportsNativeTextTracks(),T.prototype.featuresNativeVideoTracks=T.supportsNativeVideoTracks(),T.prototype.featuresNativeAudioTracks=T.supportsNativeAudioTracks();var S=T.TEST_VID&&T.TEST_VID.constructor.prototype.canPlayType,k=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,E=/^video\/mp4/i;T.patchCanPlayType=function(){p.ANDROID_VERSION>=4&&!p.IS_FIREFOX?T.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&k.test(e)?"maybe":S.call(this,e)}:p.IS_OLD_ANDROID&&(T.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&E.test(e)?"maybe":S.call(this,e)})},T.unpatchCanPlayType=function(){var e=T.TEST_VID.constructor.prototype.canPlayType;return T.TEST_VID.constructor.prototype.canPlayType=S,e},T.patchCanPlayType(),T.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},T.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),r=t.length;r--;)e.removeChild(t[r]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["paused","currentTime","buffered","volume","muted","poster","preload","autoplay","controls","loop","error","seeking","seekable","ended","defaultMuted","playbackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(e){T.prototype[e]=function(){return this.el_[e]}}),["volume","muted","src","poster","preload","autoplay","loop","playbackRate"].forEach(function(e){T.prototype["set"+(0,g.default)(e)]=function(t){this.el_[e]=t}}),["pause","load"].forEach(function(e){T.prototype[e]=function(){return this.el_[e]()}}),a.default.withSourceHandlers(T),T.nativeSourceHandler={},T.nativeSourceHandler.canPlayType=function(e){try{return T.TEST_VID.canPlayType(e)}catch(e){return""}},T.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return T.nativeSourceHandler.canPlayType(e.type);if(e.src){var r=l.getFileExtension(e.src);return T.nativeSourceHandler.canPlayType("video/"+r)}return""},T.nativeSourceHandler.handleSource=function(e,t,r){t.setSrc(e.src)},T.nativeSourceHandler.dispose=function(){},T.registerSourceHandler(T.nativeSourceHandler),s.default.registerComponent("Html5",T),a.default.registerTech("Html5",T),r.default=T},{5:5,62:62,78:78,81:81,83:83,86:86,87:87,88:88,91:91,92:92,94:94,95:95,98:98}],61:[function(e,t,r){"use strict";r.__esModule=!0;var n=a(e(5)),i=a(e(62)),o=a(e(91));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,a,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var u=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,a,s));if(a.playerOptions.sources&&0!==a.playerOptions.sources.length)r.src(a.playerOptions.sources);else for(var l=0,c=a.playerOptions.techOrder;l0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),e.reportTouchActivity=!1;var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,t.call(this,null,e,n));return i.hasStarted_=!1,i.on("playing",function(){this.hasStarted_=!0}),i.on("loadstart",function(){this.hasStarted_=!1}),i.textTracks_=e.textTracks,i.videoTracks_=e.videoTracks,i.audioTracks_=e.audioTracks,i.featuresProgressEvents||i.manualProgressOn(),i.featuresTimeupdateEvents||i.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(t){!1===e["native"+t+"Tracks"]&&(i["featuresNative"+t+"Tracks"]=!1)}),!1===e.nativeCaptions&&(i.featuresNativeTextTracks=!1),i.featuresNativeTextTracks||i.emulateTextTracks(),i.autoRemoteTextTracks_=new u.default,i.initTextTrackListeners(),i.initTrackListeners(),e.nativeControlsForTouch||i.emitTapEvents(),i.constructor&&(i.name_=i.constructor.name||"Unknown Tech"),i}return r.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},r.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},r.prototype.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(d.bind(this,function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()}),500)},r.prototype.onDurationChange=function(e){this.duration_=this.duration()},r.prototype.buffered=function(){return(0,p.createTimeRange)(0,0)},r.prototype.bufferedPercent=function(){return(0,h.bufferedPercent)(this.buffered(),this.duration_)},r.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},r.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},r.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},r.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},r.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},r.prototype.dispose=function(){this.clearTracks(["audio","video","text"]),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},r.prototype.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach(function(e){for(var r=t[e+"Tracks"]()||[],n=r.length;n--;){var i=r[n];"text"===e&&t.removeRemoteTextTrack(i),r.removeTrack_(i)}})},r.prototype.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var r=e[t];this.removeRemoteTextTrack(r)}},r.prototype.reset=function(){},r.prototype.error=function(e){return void 0!==e&&(this.error_=new y.default(e),this.trigger("error")),this.error_},r.prototype.played=function(){return this.hasStarted_?(0,p.createTimeRange)(0,0):(0,p.createTimeRange)()},r.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},r.prototype.initTextTrackListeners=function(){var e=d.bind(this,function(){this.trigger("texttrackchange")}),t=this.textTracks();t&&(t.addEventListener("removetrack",e),t.addEventListener("addtrack",e),this.on("dispose",d.bind(this,function(){t.removeEventListener("removetrack",e),t.removeEventListener("addtrack",e)})))},r.prototype.initTrackListeners=function(){var e=this;["video","audio"].forEach(function(t){var r=function(){e.trigger(t+"trackchange")},n=e[t+"Tracks"]();n.addEventListener("removetrack",r),n.addEventListener("addtrack",r),e.on("dispose",function(){n.removeEventListener("removetrack",r),n.removeEventListener("addtrack",r)})})},r.prototype.addWebVttScript_=function(){var t=this;if(!m.default.WebVTT)if(v.default.body.contains(this.el())){var r=e(105);if(!this.options_["vtt.js"]&&(0,g.isPlain)(r)&&Object.keys(r).length>0)return void this.trigger("vttjsloaded");var n=v.default.createElement("script");n.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.3/vtt.min.js",n.onload=function(){t.trigger("vttjsloaded")},n.onerror=function(){t.trigger("vttjserror")},this.on("dispose",function(){n.onload=null,n.onerror=null}),m.default.WebVTT=!0,this.el().parentNode.appendChild(n)}else this.ready(this.addWebVttScript_)},r.prototype.emulateTextTracks=function(){var e=this,t=this.textTracks();if(t){var r=this.remoteTextTracks(),n=function(e){return t.addTrack_(e.track)},i=function(e){return t.removeTrack_(e.track)};r.on("addtrack",n),r.on("removetrack",i),this.addWebVttScript_();var o=function(){return e.trigger("texttrackchange")},a=function(){o();for(var e=0;e4&&void 0!==arguments[4]?arguments[4]:{},o=e.textTracks();i.kind=t,r&&(i.label=r),n&&(i.language=n),i.tech=e;var a=new s.default(i);return o.addTrack_(a),a}(this,e,t,r)},r.prototype.createRemoteTextTrack=function(e){var t=(0,a.default)(e,{tech:this});return new i.default(t)},r.prototype.addRemoteTextTrack=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],r=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(f.default.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack_(r.track),!0!==t&&this.autoRemoteTextTracks_.addTrack_(r.track),r},r.prototype.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack_(e),this.autoRemoteTextTracks_.removeTrack_(e)},r.prototype.setPoster=function(){},r.prototype.canPlayType=function(){return""},r.isTech=function(e){return e.prototype instanceof r||e instanceof r||e===r},r.registerTech=function(e,t){if(r.techs_||(r.techs_={}),!r.isTech(t))throw new Error("Tech "+e+" must be a Tech");return r.techs_[e]=t,t},r.getTech=function(e){return r.techs_&&r.techs_[e]?r.techs_[e]:m.default&&m.default.videojs&&m.default.videojs[e]?(f.default.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),m.default.videojs[e]):void 0},r}(n.default);b.prototype.textTracks_,b.prototype.audioTracks_,b.prototype.videoTracks_,b.prototype.featuresVolumeControl=!0,b.prototype.featuresFullscreenResize=!1,b.prototype.featuresPlaybackRate=!1,b.prototype.featuresProgressEvents=!1,b.prototype.featuresTimeupdateEvents=!1,b.prototype.featuresNativeTextTracks=!1,b.withSourceHandlers=function(e){e.registerSourceHandler=function(t,r){var n=e.sourceHandlers;n||(n=e.sourceHandlers=[]),void 0===r&&(r=n.length),n.splice(r,0,t)},e.canPlayType=function(t){for(var r=e.sourceHandlers||[],n=void 0,i=0;i0&&void 0!==arguments[0]?arguments[0]:[];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var l=void 0,c=a.length-1;c>=0;c--)if(a[c].enabled){u(a,a[c]);break}if(i.IS_IE8){l=o.default.createElement("custom");for(var d in n.default.prototype)"constructor"!==d&&(l[d]=n.default.prototype[d]);for(var f in t.prototype)"constructor"!==f&&(l[f]=t.prototype[f])}return(l=r=s(this,e.call(this,a,l))).changing_=!1,s(r,l)}return t.prototype.addTrack_=function(t){var r=this;t.enabled&&u(this,t),e.prototype.addTrack_.call(this,t),t.addEventListener&&t.addEventListener("enabledchange",function(){r.changing_||(r.changing_=!0,u(r,t),r.changing_=!1,r.trigger("change"))})},t.prototype.addTrack=function(e){this.addTrack_(e)},t.prototype.removeTrack=function(t){e.prototype.removeTrack_.call(this,t)},t}(n.default);r.default=l},{74:74,78:78,94:94}],64:[function(e,t,r){"use strict";r.__esModule=!0;var n=e(73),i=s(e(75)),o=s(e(87)),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e(78));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(){var r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=(0,o.default)(i,{kind:n.AudioTrackKind[i.kind]||""}),l=(r=u(this,e.call(this,s)),r),c=!1;if(a.IS_IE8)for(var d in t.prototype)"constructor"!==d&&(l[d]=t.prototype[d]);return Object.defineProperty(l,"enabled",{get:function(){return c},set:function(e){"boolean"==typeof e&&e!==c&&(c=e,this.trigger("enabledchange"))}}),s.enabled&&(l.enabled=s.enabled),l.loaded_=!0,u(r,l)}return t}(i.default);r.default=l},{73:73,75:75,78:78,87:87}],65:[function(e,t,r){"use strict";r.__esModule=!0;var n,i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e(78)),o=e(94),a=(n=o,n&&n.__esModule?n:{default:n});var s=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=this;if(i.IS_IE8){r=a.default.createElement("custom");for(var n in e.prototype)"constructor"!==n&&(r[n]=e.prototype[n])}r.trackElements_=[],Object.defineProperty(r,"length",{get:function(){return this.trackElements_.length}});for(var o=0,s=t.length;o0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=u(this,e.call(this)),s=void 0,d=o;if(n.IS_IE8){d=i.default.createElement("custom");for(var f in t.prototype)"constructor"!==f&&(d[f]=t.prototype[f])}var p=new a.default(r);if(d.kind=p.kind,d.src=p.src,d.srclang=p.language,d.label=p.label,d.default=p.default,Object.defineProperty(d,"readyState",{get:function(){return s}}),Object.defineProperty(d,"track",{get:function(){return p}}),s=l,p.addEventListener("loadeddata",function(){s=c,d.trigger({type:"load",target:d})}),n.IS_IE8){return u(o,d)}return o}return t}(o.default);d.prototype.allowedEvents_={load:"load"},d.NONE=l,d.LOADING=1,d.LOADED=c,d.ERROR=3,r.default=d},{42:42,72:72,78:78,94:94}],67:[function(e,t,r){"use strict";r.__esModule=!0;var n,i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e(78)),o=e(94),a=(n=o,n&&n.__esModule?n:{default:n});var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=this;if(i.IS_IE8){r=a.default.createElement("custom");for(var n in e.prototype)"constructor"!==n&&(r[n]=e.prototype[n])}if(e.prototype.setCues_.call(r,t),Object.defineProperty(r,"length",{get:function(){return this.length_}}),i.IS_IE8)return r}return e.prototype.setCues_=function(e){var t=this.length||0,r=0,n=e.length;this.cues_=e,this.length_=e.length;var i=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t0&&void 0!==arguments[0]?arguments[0]:[];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=void 0;if(o.IS_IE8){s=a.default.createElement("custom");for(var u in n.default.prototype)"constructor"!==u&&(s[u]=n.default.prototype[u]);for(var c in t.prototype)"constructor"!==c&&(s[c]=t.prototype[c])}return l(r=l(this,e.call(this,i,s)),s=r)}return t.prototype.addTrack_=function(t){e.prototype.addTrack_.call(this,t),t.addEventListener("modechange",i.bind(this,function(){this.trigger("change")}))},t}(n.default);r.default=c},{74:74,78:78,83:83,94:94}],71:[function(e,t,r){"use strict";r.__esModule=!0;var n=c(e(95)),i=c(e(5)),o=e(81),a=l(e(83)),s=l(e(88)),u=c(e(86));function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function c(e){return e&&e.__esModule?e:{default:e}}var d="vjs-text-track-settings",f=["#000","Black"],p=["#00F","Blue"],h=["#0FF","Cyan"],y=["#0F0","Green"],m=["#F0F","Magenta"],v=["#F00","Red"],g=["#FFF","White"],_=["#FF0","Yellow"],b=["1","Opaque"],T=["0.5","Semi-Transparent"],w=["0","Transparent"],S={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[f,g,v,y,p,_,m,h]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[b,T,w]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[g,f,v,y,p,_,m,h]},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(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[b,T]},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:[w,T,b]}};S.windowColor.options=S.backgroundColor.options;function k(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r,n));return i.setDefaults(),i.hide(),i.updateDisplay=a.bind(i,i.updateDisplay),void 0===n.persistTextTrackSettings&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(".vjs-done-button"),"click",function(){i.saveSettings(),i.hide()}),i.on(i.$(".vjs-default-button"),"click",function(){i.setDefaults(),i.updateDisplay()}),s.each(S,function(e){i.on(i.$(e.selector),"change",i.updateDisplay)}),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}return t.prototype.createElSelect_=function(e){var t=this,r=S[e],n=r.id.replace("%s",this.id_);return[(0,o.createEl)("label",{className:"vjs-label",textContent:r.label},{for:n}),(0,o.createEl)("select",{id:n},void 0,r.options.map(function(e){return(0,o.createEl)("option",{textContent:t.localize(e[1]),value:e[0]})}))]},t.prototype.createElFgColor_=function(){var e=(0,o.createEl)("legend",{textContent:this.localize("Text")}),t=this.createElSelect_("color"),r=(0,o.createEl)("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.createElSelect_("textOpacity"));return(0,o.createEl)("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[e].concat(t,r))},t.prototype.createElBgColor_=function(){var e=(0,o.createEl)("legend",{textContent:this.localize("Background")}),t=this.createElSelect_("backgroundColor"),r=(0,o.createEl)("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.createElSelect_("backgroundOpacity"));return(0,o.createEl)("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[e].concat(t,r))},t.prototype.createElWinColor_=function(){var e=(0,o.createEl)("legend",{textContent:this.localize("Window")}),t=this.createElSelect_("windowColor"),r=(0,o.createEl)("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.createElSelect_("windowOpacity"));return(0,o.createEl)("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[e].concat(t,r))},t.prototype.createElColors_=function(){return(0,o.createEl)("div",{className:"vjs-tracksettings-colors"},void 0,[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()])},t.prototype.createElFont_=function(){var e=(0,o.createEl)("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.createElSelect_("fontPercent")),t=(0,o.createEl)("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.createElSelect_("edgeStyle")),r=(0,o.createEl)("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.createElSelect_("fontFamily"));return(0,o.createEl)("div",{className:"vjs-tracksettings-font"},void 0,[e,t,r])},t.prototype.createElControls_=function(){var e=(0,o.createEl)("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),t=(0,o.createEl)("button",{className:"vjs-done-button",textContent:"Done"});return(0,o.createEl)("div",{className:"vjs-tracksettings-controls"},void 0,[e,t])},t.prototype.createEl=function(){var e=(0,o.createEl)("div",{className:"vjs-tracksettings"},void 0,[this.createElColors_(),this.createElFont_(),this.createElControls_()]),t=(0,o.createEl)("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.id_,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),r=(0,o.createEl)("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.id_,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),n=(0,o.createEl)("div",void 0,{role:"document"},[t,r,e]);return(0,o.createEl)("div",{className:"vjs-caption-settings vjs-modal-overlay",tabIndex:-1},{role:"dialog","aria-labelledby":t.id,"aria-describedby":r.id},n)},t.prototype.getValues=function(){var e=this;return s.reduce(S,function(t,r,n){var i,o,a=(i=e.$(r.selector),o=r.parser,k(i.options[i.options.selectedIndex].value,o));return void 0!==a&&(t[n]=a),t},{})},t.prototype.setValues=function(e){var t=this;s.each(S,function(r,n){!function(e,t,r){if(t)for(var n=0;n0&&(s.default.console&&s.default.console.groupCollapsed&&s.default.console.groupCollapsed("Text Track parsing errors for "+t.src),n.forEach(function(e){return a.default.error(e)}),s.default.console&&s.default.console.groupEnd&&s.default.console.groupEnd()),r.flush()},v=function(e,t){var r={uri:e},n=(0,l.isCrossOrigin)(e);n&&(r.cors=n),(0,c.default)(r,i.bind(this,function(e,r,n){if(e)return a.default.error(e,r);if(t.loaded_=!0,"function"!=typeof s.default.WebVTT){if(t.tech_){var i=function(){return m(n,t)};t.tech_.on("vttjsloaded",i),t.tech_.on("vttjserror",function(){a.default.error("vttjs failed to load, stopping trying to process "+t.src),t.tech_.off("vttjsloaded",i)})}}else m(n,t)}))},g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(){var r,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),!a.tech)throw new Error("A tech was not provided.");var s=(0,d.default)(a,{kind:o.TextTrackKind[a.kind]||"subtitles",language:a.language||a.srclang||""}),u=o.TextTrackMode[s.mode]||"disabled",l=s.default;"metadata"!==s.kind&&"chapters"!==s.kind||(u="hidden");var c=(r=y(this,e.call(this,s)),r);if(c.tech_=s.tech,f.IS_IE8)for(var p in t.prototype)"constructor"!==p&&(c[p]=t.prototype[p]);c.cues_=[],c.activeCues_=[];var h=new n.default(c.cues_),m=new n.default(c.activeCues_),g=!1,_=i.bind(c,function(){this.activeCues,g&&(this.trigger("cuechange"),g=!1)});return"disabled"!==u&&c.tech_.ready(function(){c.tech_.on("timeupdate",_)},!0),Object.defineProperty(c,"default",{get:function(){return l},set:function(){}}),Object.defineProperty(c,"mode",{get:function(){return u},set:function(e){var t=this;o.TextTrackMode[e]&&("showing"===(u=e)&&this.tech_.ready(function(){t.tech_.on("timeupdate",_)},!0),this.trigger("modechange"))}}),Object.defineProperty(c,"cues",{get:function(){return this.loaded_?h:null},set:function(){}}),Object.defineProperty(c,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return m;for(var e=this.tech_.currentTime(),t=[],r=0,n=this.cues.length;r=e?t.push(i):i.startTime===i.endTime&&i.startTime<=e&&i.startTime+.5>=e&&t.push(i)}if(g=!1,t.length!==this.activeCues_.length)g=!0;else for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=s(this,e.call(this));if(!n&&(n=a,i.IS_IE8)){n=o.default.createElement("custom");for(var u in t.prototype)"constructor"!==u&&(n[u]=t.prototype[u])}n.tracks_=[],Object.defineProperty(n,"length",{get:function(){return this.tracks_.length}});for(var l=0;l0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=u(this,e.call(this)),s=a;if(n.IS_IE8){s=i.default.createElement("custom");for(var l in t.prototype)"constructor"!==l&&(s[l]=t.prototype[l])}var c={id:r.id||"vjs_track_"+o.newGUID(),kind:r.kind||"",label:r.label||"",language:r.language||""},d=function(e){Object.defineProperty(s,e,{get:function(){return c[e]},set:function(){}})};for(var f in c)d(f);return u(a,s)}return t}(a(e(42)).default);r.default=l},{42:42,78:78,85:85,94:94}],76:[function(e,t,r){"use strict";r.__esModule=!0;var n=a(e(74)),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e(78)),o=a(e(94));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=function(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var l=void 0,c=a.length-1;c>=0;c--)if(a[c].selected){u(a,a[c]);break}if(i.IS_IE8){l=o.default.createElement("custom");for(var d in n.default.prototype)"constructor"!==d&&(l[d]=n.default.prototype[d]);for(var f in t.prototype)"constructor"!==f&&(l[f]=t.prototype[f])}return(l=r=s(this,e.call(this,a,l))).changing_=!1,Object.defineProperty(l,"selectedIndex",{get:function(){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=(0,o.default)(i,{kind:n.VideoTrackKind[i.kind]||""}),l=(r=u(this,e.call(this,s)),r),c=!1;if(a.IS_IE8)for(var d in t.prototype)"constructor"!==d&&(l[d]=t.prototype[d]);return Object.defineProperty(l,"selected",{get:function(){return c},set:function(e){"boolean"==typeof e&&e!==c&&(c=e,this.trigger("selectedchange"))}}),s.selected&&(l.selected=s.selected),u(r,l)}return t}(i.default);r.default=l},{73:73,75:75,78:78,87:87}],78:[function(e,t,r){"use strict";r.__esModule=!0,r.BACKGROUND_SIZE_SUPPORTED=r.TOUCH_ENABLED=r.IS_ANY_SAFARI=r.IS_SAFARI=r.IE_VERSION=r.IS_IE8=r.IS_CHROME=r.IS_EDGE=r.IS_FIREFOX=r.IS_NATIVE_ANDROID=r.IS_OLD_ANDROID=r.ANDROID_VERSION=r.IS_ANDROID=r.IOS_VERSION=r.IS_IOS=r.IS_IPOD=r.IS_IPHONE=r.IS_IPAD=void 0;var n,i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e(81)),o=e(95),a=(n=o,n&&n.__esModule?n:{default:n});var s=a.default.navigator&&a.default.navigator.userAgent||"",u=/AppleWebKit\/([\d.]+)/i.exec(s),l=u?parseFloat(u.pop()):null,c=r.IS_IPAD=/iPad/i.test(s),d=r.IS_IPHONE=/iPhone/i.test(s)&&!c,f=r.IS_IPOD=/iPod/i.test(s),p=r.IS_IOS=d||c||f,h=(r.IOS_VERSION=function(){var e=s.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),r.IS_ANDROID=/Android/i.test(s)),y=r.ANDROID_VERSION=function(){var e=s.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),r=e[2]&&parseFloat(e[2]);return t&&r?parseFloat(e[1]+"."+e[2]):t||null}(),m=(r.IS_OLD_ANDROID=h&&/webkit/i.test(s)&&y<2.3,r.IS_NATIVE_ANDROID=h&&y<5&&l<537,r.IS_FIREFOX=/Firefox/i.test(s),r.IS_EDGE=/Edge/i.test(s)),v=r.IS_CHROME=!m&&/Chrome/i.test(s),g=(r.IS_IE8=/MSIE\s8\.0/.test(s),r.IE_VERSION=function(){var e=/MSIE\s(\d+)\.\d/.exec(s),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(s)&&/rv:11.0/.test(s)&&(t=11),t}(),r.IS_SAFARI=/Safari/i.test(s)&&!v&&!h&&!m);r.IS_ANY_SAFARI=g||p,r.TOUCH_ENABLED=i.isReal()&&("ontouchstart"in a.default||a.default.DocumentTouch&&a.default.document instanceof a.default.DocumentTouch),r.BACKGROUND_SIZE_SUPPORTED=i.isReal()&&"backgroundSize"in a.default.document.createElement("video").style},{81:81,95:95}],79:[function(e,t,r){"use strict";r.__esModule=!0,r.bufferedPercent=function(e,t){var r=0,i=void 0,o=void 0;if(!t)return 0;e&&e.length||(e=(0,n.createTimeRange)(0,0));for(var a=0;at&&(o=t),r+=o-i;return r/t};var n=e(90)},{90:90}],80:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){if(!e||!t)return"";if("function"==typeof o.default.getComputedStyle){var r=o.default.getComputedStyle(e);return r?r[t]:""}return e.currentStyle[t]||""};var n,i=e(95),o=(n=i,n&&n.__esModule?n:{default:n})},{95:95}],81:[function(e,t,r){"use strict";r.__esModule=!0,r.$$=r.$=void 0;var n,i,o=(n=["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 ","."],i=["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 ","."],n.raw=i,n);r.isReal=function(){return a.default===s.default.document&&void 0!==a.default.createElement},r.isEl=y,r.getEl=function(e){0===e.indexOf("#")&&(e=e.slice(1));return a.default.getElementById(e)},r.createEl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments[3],i=a.default.createElement(e);Object.getOwnPropertyNames(t).forEach(function(e){var r=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(l.default.warn((0,c.default)(o,e,r)),i.setAttribute(e,r)):"textContent"===e?v(i,r):i[e]=r}),Object.getOwnPropertyNames(r).forEach(function(e){i.setAttribute(e,r[e])}),n&&C(i,n);return i},r.textContent=v,r.insertElFirst=function(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)},r.getElData=function(e){var t=e[_];t||(t=e[_]=u.newGUID());g[t]||(g[t]={});return g[t]},r.hasElData=function(e){var t=e[_];if(!t)return!1;return!!Object.getOwnPropertyNames(g[t]).length},r.removeElData=function(e){var t=e[_];if(!t)return;delete g[t];try{delete e[_]}catch(t){e.removeAttribute?e.removeAttribute(_):e[_]=null}},r.hasElClass=b,r.addElClass=T,r.removeElClass=w,r.toggleElClass=function(e,t,r){var n=b(e,t);"function"==typeof r&&(r=r(e,t));"boolean"!=typeof r&&(r=!n);if(r===n)return;r?T(e,t):w(e,t);return e},r.setElAttributes=function(e,t){Object.getOwnPropertyNames(t).forEach(function(r){var n=t[r];null===n||void 0===n||!1===n?e.removeAttribute(r):e.setAttribute(r,!0===n?"":n)})},r.getElAttributes=function(e){var t={},r=",autoplay,controls,loop,muted,default,";if(e&&e.attributes&&e.attributes.length>0)for(var n=e.attributes,i=n.length-1;i>=0;i--){var o=n[i].name,a=n[i].value;"boolean"!=typeof e[o]&&-1===r.indexOf(","+o+",")||(a=null!==a),t[o]=a}return t},r.getAttribute=function(e,t){return e.getAttribute(t)},r.setAttribute=function(e,t,r){e.setAttribute(t,r)},r.removeAttribute=function(e,t){e.removeAttribute(t)},r.blockTextSelection=function(){a.default.body.focus(),a.default.onselectstart=function(){return!1}},r.unblockTextSelection=function(){a.default.onselectstart=function(){return!0}},r.findElPosition=S,r.getPointerPosition=function(e,t){var r={},n=S(e),i=e.offsetWidth,o=e.offsetHeight,a=n.top,s=n.left,u=t.pageY,l=t.pageX;t.changedTouches&&(l=t.changedTouches[0].pageX,u=t.changedTouches[0].pageY);return r.y=Math.max(0,Math.min(1,(a-u+o)/o)),r.x=Math.max(0,Math.min(1,(l-s)/i)),r},r.isTextNode=k,r.emptyEl=E,r.normalizeContent=O,r.appendContent=C,r.insertContent=function(e,t){return C(E(e),t)};var a=f(e(94)),s=f(e(95)),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e(85)),l=f(e(86)),c=f(e(98)),d=e(88);function f(e){return e&&e.__esModule?e:{default:e}}function p(e){return"string"==typeof e&&/\S/.test(e)}function h(e){if(/\s/.test(e))throw new Error("class has illegal whitespace characters")}function y(e){return(0,d.isObject)(e)&&1===e.nodeType}function m(e){return function(t,r){if(!p(t))return a.default[e](null);p(r)&&(r=a.default.querySelector(r));var n=y(r)?r:a.default;return n[e]&&n[e](t)}}function v(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}var g={},_="vdata"+(new Date).getTime();function b(e,t){return h(t),e.classList?e.classList.contains(t):(r=t,new RegExp("(^|\\s)"+r+"($|\\s)")).test(e.className);var r}function T(e,t){return e.classList?e.classList.add(t):b(e,t)||(e.className=(e.className+" "+t).trim()),e}function w(e,t){return e.classList?e.classList.remove(t):(h(t),e.className=e.className.split(/\s+/).filter(function(e){return e!==t}).join(" ")),e}function S(e){var t=void 0;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var r=a.default.documentElement,n=a.default.body,i=r.clientLeft||n.clientLeft||0,o=s.default.pageXOffset||n.scrollLeft,u=t.left+o-i,l=r.clientTop||n.clientTop||0,c=s.default.pageYOffset||n.scrollTop,d=t.top+c-l;return{left:Math.round(u),top:Math.round(d)}}function k(e){return(0,d.isObject)(e)&&3===e.nodeType}function E(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function O(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(function(e){return"function"==typeof e&&(e=e()),y(e)||k(e)?e:"string"==typeof e&&/\S/.test(e)?a.default.createTextNode(e):void 0}).filter(function(e){return e})}function C(e,t){return O(t).forEach(function(t){return e.appendChild(t)}),e}r.$=m("querySelector"),r.$$=m("querySelectorAll")},{85:85,86:86,88:88,94:94,95:95,98:98}],82:[function(e,t,r){"use strict";r.__esModule=!0,r.fixEvent=f,r.on=p,r.off=h,r.trigger=function e(t,r,i){var o=n.hasElData(t)?n.getElData(t):{};var a=t.parentNode||t.ownerDocument;"string"==typeof r&&(r={type:r,target:t});r=f(r);o.dispatcher&&o.dispatcher.call(t,r,i);if(a&&!r.isPropagationStopped()&&!0===r.bubbles)e.call(null,a,r,i);else if(!a&&!r.defaultPrevented){var s=n.getElData(r.target);r.target[r.type]&&(s.disabled=!0,"function"==typeof r.target[r.type]&&r.target[r.type](),s.disabled=!1)}return!r.defaultPrevented},r.one=function e(t,r,n){if(Array.isArray(r))return d(e,t,r,n);var o=function e(){h(t,r,e),n.apply(this,arguments)};o.guid=n.guid=n.guid||i.newGUID();p(t,r,o)};var n=l(e(81)),i=l(e(85)),o=u(e(86)),a=u(e(95)),s=u(e(94));function u(e){return e&&e.__esModule?e:{default:e}}function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function c(e,t){var r=n.getElData(e);0===r.handlers[t].length&&(delete r.handlers[t],e.removeEventListener?e.removeEventListener(t,r.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,r.dispatcher)),Object.getOwnPropertyNames(r.handlers).length<=0&&(delete r.handlers,delete r.dispatcher,delete r.disabled),0===Object.getOwnPropertyNames(r).length&&n.removeElData(e)}function d(e,t,r,n){r.forEach(function(r){e(t,r,n)})}function f(e){function t(){return!0}function r(){return!1}if(!e||!e.isPropagationStopped){var n=e||a.default.event;e={};for(var i in n)"layerX"!==i&&"layerY"!==i&&"keyLocation"!==i&&"webkitMovementX"!==i&&"webkitMovementY"!==i&&("returnValue"===i&&n.preventDefault||(e[i]=n[i]));if(e.target||(e.target=e.srcElement||s.default),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){n.preventDefault&&n.preventDefault(),e.returnValue=!1,n.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),e.cancelBubble=!0,n.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=r,e.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=r,null!==e.clientX&&void 0!==e.clientX){var o=s.default.documentElement,u=s.default.body;e.pageX=e.clientX+(o&&o.scrollLeft||u&&u.scrollLeft||0)-(o&&o.clientLeft||u&&u.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||u&&u.scrollTop||0)-(o&&o.clientTop||u&&u.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e}function p(e,t,r){if(Array.isArray(t))return d(p,e,t,r);var a=n.getElData(e);a.handlers||(a.handlers={}),a.handlers[t]||(a.handlers[t]=[]),r.guid||(r.guid=i.newGUID()),a.handlers[t].push(r),a.dispatcher||(a.disabled=!1,a.dispatcher=function(t,r){if(!a.disabled){t=f(t);var n=a.handlers[t.type];if(n)for(var i=n.slice(0),s=0,u=i.length;s=t&&(e.apply(void 0,arguments),r=n)}}},{85:85}],84:[function(e,t,r){"use strict";r.__esModule=!0;r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;e=e<0?0:e;var r=Math.floor(e%60),n=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=n=r="-"),(i=i>0||a>0?i+":":"")+(n=((i||o>=10)&&n<10?"0"+n:n)+":")+(r=r<10?"0"+r:r)}},{}],85:[function(e,t,r){"use strict";r.__esModule=!0,r.newGUID=function(){return n++};var n=1},{}],86:[function(e,t,r){"use strict";r.__esModule=!0,r.logByType=void 0;var n,i=e(95),o=(n=i,n&&n.__esModule?n:{default:n}),a=e(78),s=e(88);var u=void 0,l=r.logByType=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:!!a.IE_VERSION&&a.IE_VERSION<11;"log"!==e&&t.unshift(e.toUpperCase()+":"),u.history.push(t),t.unshift("VIDEOJS:");var n=o.default.console&&o.default.console[e];n&&(r&&(t=t.map(function(e){if((0,s.isObject)(e)||Array.isArray(e))try{return JSON.stringify(e)}catch(t){return String(e)}return String(e)}).join(" ")),n.apply?n[Array.isArray(t)?"apply":"call"](o.default.console,t):n(t))};(u=function(){for(var e=arguments.length,t=Array(e),r=0;r2&&void 0!==arguments[2]?arguments[2]:0;return o(e).reduce(function(r,n){return t(r,e[n],n)},r)},r.assign=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;nr)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is greater than or equal to the maximum bound ("+r+").")}(e,n,r.length-1),r[n][t]}function s(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:a.bind(null,"start",0,e),end:a.bind(null,"end",1,e)}}function u(e,t){return Array.isArray(e)?s(e):void 0===e||void 0===t?s():s([[e,t]])}r.createTimeRange=u},{86:86}],91:[function(e,t,r){"use strict";r.__esModule=!0;r.default=function(e){return"string"!=typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)}},{}],92:[function(e,t,r){"use strict";r.__esModule=!0,r.isCrossOrigin=r.getFileExtension=r.getAbsoluteURL=r.parseUrl=void 0;var n=o(e(94)),i=o(e(95));function o(e){return e&&e.__esModule?e:{default:e}}var a=r.parseUrl=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],r=n.default.createElement("a");r.href=e;var i=""===r.host&&"file:"!==r.protocol,o=void 0;i&&((o=n.default.createElement("div")).innerHTML='',r=o.firstChild,o.setAttribute("style","display:none; position:absolute;"),n.default.body.appendChild(o));for(var a={},s=0;sx',e=t.firstChild.href}return e},r.getFileExtension=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(e);if(t)return t.pop().toLowerCase()}return""},r.isCrossOrigin=function(e){var t=i.default.location,r=a(e);return(":"===r.protocol?t.protocol:r.protocol)+r.host!==t.protocol+t.host}},{94:94,95:95}],93:[function(e,t,r){"use strict";r.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=P(e(95)),o=P(e(94)),a=x(e(56)),s=x(e(89)),u=P(e(5)),l=P(e(42)),c=x(e(82)),d=P(e(51)),f=P(e(52)),p=P(e(87)),h=x(e(83)),y=P(e(72)),m=P(e(64)),v=P(e(77)),g=e(90),_=P(e(84)),b=P(e(86)),T=x(e(81)),w=x(e(78)),S=x(e(92)),k=e(88),E=P(e(80)),O=P(e(43)),C=P(e(99)),j=P(e(62));function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}"undefined"==typeof HTMLVideoElement&&T.isReal()&&(o.default.createElement("video"),o.default.createElement("audio"),o.default.createElement("track"));function A(e,t,r){var n=void 0;if("string"==typeof e){if(0===e.indexOf("#")&&(e=e.slice(1)),A.getPlayers()[e])return t&&b.default.warn('Player "'+e+'" is already initialised. Options will not be applied.'),r&&A.getPlayers()[e].ready(r),A.getPlayers()[e];n=T.getEl(e)}else n=e;if(!n||!n.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");if(n.player||d.default.players[n.playerId])return n.player||d.default.players[n.playerId];t=t||{},A.hooks("beforesetup").forEach(function(e){var r=e(n,(0,p.default)(t));(0,k.isObject)(r)&&!Array.isArray(r)?t=(0,p.default)(t,r):b.default.error("please return an object in beforesetup hooks")});var i=new(u.default.getComponent("Player"))(n,t,r);return A.hooks("setup").forEach(function(e){return e(i)}),i}if(A.hooks_={},A.hooks=function(e,t){return A.hooks_[e]=A.hooks_[e]||[],t&&(A.hooks_[e]=A.hooks_[e].concat(t)),A.hooks_[e]},A.hook=function(e,t){A.hooks(e,t)},A.removeHook=function(e,t){var r=A.hooks(e).indexOf(t);return!(r<=-1)&&(A.hooks_[e]=A.hooks_[e].slice(),A.hooks_[e].splice(r,1),!0)},!0!==i.default.VIDEOJS_NO_DYNAMIC_STYLE&&T.isReal()){var M=T.$(".vjs-styles-defaults");if(!M){M=s.createStyleElement("vjs-styles-defaults");var I=T.$("head");I&&I.insertBefore(M,I.firstChild),s.setTextContent(M,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}a.autoSetupTimeout(1,A),A.VERSION="5.19.2",A.options=d.default.prototype.options_,A.getPlayers=function(){return d.default.players},A.players=d.default.players,A.getComponent=u.default.getComponent,A.registerComponent=function(e,t){j.default.isTech(t)&&b.default.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),u.default.registerComponent.call(u.default,e,t)},A.getTech=j.default.getTech,A.registerTech=j.default.registerTech,A.browser=w,A.TOUCH_ENABLED=w.TOUCH_ENABLED,A.extend=O.default,A.mergeOptions=p.default,A.bind=h.bind,A.plugin=f.default,A.addLanguage=function(e,t){var r;return e=(""+e).toLowerCase(),A.options.languages=(0,p.default)(A.options.languages,(r={},r[e]=t,r)),A.options.languages[e]},A.log=b.default,A.createTimeRange=A.createTimeRanges=g.createTimeRanges,A.formatTime=_.default,A.parseUrl=S.parseUrl,A.isCrossOrigin=S.isCrossOrigin,A.EventTarget=l.default,A.on=c.on,A.one=c.one,A.off=c.off,A.trigger=c.trigger,A.xhr=C.default,A.TextTrack=y.default,A.AudioTrack=m.default,A.VideoTrack=v.default,A.isEl=T.isEl,A.isTextNode=T.isTextNode,A.createEl=T.createEl,A.hasClass=T.hasElClass,A.addClass=T.addElClass,A.removeClass=T.removeElClass,A.toggleClass=T.toggleElClass,A.setAttributes=T.setElAttributes,A.getAttributes=T.getElAttributes,A.emptyEl=T.emptyEl,A.appendContent=T.appendContent,A.insertContent=T.insertContent,A.computedStyle=E.default,"object"===(void 0===r?"undefined":n(r))&&"object"===(void 0===t?"undefined":n(t))&&(t.exports=A),r.default=A},{42:42,43:43,5:5,51:51,52:52,56:56,62:62,64:64,72:72,77:77,78:78,80:80,81:81,82:82,83:83,84:84,86:86,87:87,88:88,89:89,90:90,92:92,94:94,95:95,99:99}],94:[function(e,t,r){(function(r){var n=void 0!==r?r:"undefined"!=typeof window?window:{},i=e(96);if("undefined"!=typeof document)t.exports=document;else{var o=n["__GLOBAL_DOCUMENT_CACHE@4"];o||(o=n["__GLOBAL_DOCUMENT_CACHE@4"]=i),t.exports=o}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{96:96}],95:[function(e,t,r){(function(e){"undefined"!=typeof window?t.exports=window:void 0!==e?t.exports=e:"undefined"!=typeof self?t.exports=self:t.exports={}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],96:[function(e,t,r){},{}],97:[function(e,t,r){t.exports=function(e,t){var r,n=null;try{r=JSON.parse(e,t)}catch(e){n=e}return[n,r]}},{}],98:[function(e,t,r){t.exports=function(e){for(var t="",r=0;r0&&(c=setTimeout(function(){if(!l){l=!0,a.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",n(e)}},e.timeout)),a.setRequestHeader)for(s in h)h.hasOwnProperty(s)&&a.setRequestHeader(s,h[s]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(a.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(a),a.send(p||null),a}},{100:100,103:103,104:104,95:95}],100:[function(e,t,r){t.exports=function(e){var t=n.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var n=Object.prototype.toString},{}],101:[function(e,t,r){var n=e(100);t.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");arguments.length<3&&(r=this);"[object Array]"===i.call(e)?function(e,t,r){for(var n=0,i=e.length;n59?t(r[1],r[2],0,r[4]):t(0,r[1],r[2],r[4]):null}function i(){this.values=t(null)}i.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,r){return r?this.has(e)?this.values[e]:t[r]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,r){for(var n=0;n=0&&t<=100)&&(this.set(e,t),!0)}};function o(e,t,r,n){var i=n?e.split(n):[e];for(var o in i)if("string"==typeof i[o]){var a=i[o].split(r);if(2===a.length){t(a[0],a[1])}}}function a(e,t,a){var s=e;function u(){var t=n(e);if(null===t)throw new r(r.Errors.BadTimeStamp,"Malformed timestamp: "+s);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function l(){e=e.replace(/^\s+/,"")}if(l(),t.startTime=u(),l(),"--\x3e"!==e.substr(0,3))throw new r(r.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+s);e=e.substr(3),l(),t.endTime=u(),l(),function(e,t){var r=new i;o(e,function(e,t){switch(e){case"region":for(var n=a.length-1;n>=0;n--)if(a[n].id===t){r.set(e,a[n].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var i=t.split(","),o=i[0];r.integer(e,o),r.percent(e,o)&&r.set("snapToLines",!1),r.alt(e,o,["auto"]),2===i.length&&r.alt("lineAlign",i[1],["start","middle","end"]);break;case"position":i=t.split(","),r.percent(e,i[0]),2===i.length&&r.alt("positionAlign",i[1],["start","middle","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","middle","end","left","right"])}},/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical",""),t.line=r.get("line","auto"),t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align","middle"),t.position=r.get("position",{start:0,left:0,middle:50,end:100,right:100},t.align),t.positionAlign=r.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},t.align)}(e,t)}var s={"&":"&","<":"<",">":">","‎":"‎","‏":"‏"," ":" "},u={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},l={v:"title",lang:"lang"},c={rt:"ruby"};function d(e,t){function r(){if(!t)return null;var e=t.match(/^([^<]*)(<[^>]+>?)?/);return r=e[1]?e[1]:e[2],t=t.substr(r.length),r;var r}function i(e){return s[e]}function o(e){for(;v=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(v[0],i);return e}function a(t,r){var n=u[t];if(!n)return null;var i=e.document.createElement(n);i.localName=n;var o=l[t];return o&&r&&(i[o]=r.trim()),i}for(var d,f=e.document.createElement("div"),p=f,h=[];null!==(d=r());)if("<"!==d[0])p.appendChild(e.document.createTextNode(o(d)));else{if("/"===d[1]){h.length&&h[h.length-1]===d.substr(2).replace(">","")&&(h.pop(),p=p.parentNode);continue}var y,m=n(d.substr(1,d.length-2));if(m){y=e.document.createProcessingInstruction("timestamp",m),p.appendChild(y);continue}var v=d.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!v)continue;if(!(y=a(v[1],v[3])))continue;if(g=p,c[(_=y).localName]&&c[_.localName]!==g.localName)continue;v[2]&&(y.className=v[2].substr(1).replace("."," ")),h.push(v[1]),p.appendChild(y),p=y}var g,_;return f}var f=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function p(e){for(var t=0;t=r[0]&&e<=r[1])return!0}return!1}function h(){}h.prototype.applyStyles=function(e,t){t=t||this.div;for(var r in e)e.hasOwnProperty(r)&&(t.style[r]=e[r])},h.prototype.formatStyle=function(e,t){return 0===e?0:e+t};function y(e,t,r){var n=/MSIE\s8\.0/.test(navigator.userAgent),i="rgba(255, 255, 255, 1)",o="rgba(0, 0, 0, 0.8)";n&&(i="rgb(255, 255, 255)",o="rgb(0, 0, 0)"),h.call(this),this.cue=t,this.cueDiv=d(e,t.text);var a={color:i,backgroundColor:o,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};n||(a.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",a.unicodeBidi="plaintext"),this.applyStyles(a,this.cueDiv),this.div=e.document.createElement("div"),a={textAlign:"middle"===t.align?"center":t.align,font:r.font,whiteSpace:"pre-line",position:"absolute"},n||(a.direction=function(e){var t=[],r="";if(!e||!e.childNodes)return"ltr";function n(e,t){for(var r=t.childNodes.length-1;r>=0;r--)e.push(t.childNodes[r])}function i(e){if(!e||!e.length)return null;var t=e.pop(),r=t.textContent||t.innerText;if(r){var o=r.match(/^.*(\n|\r)/);return o?(e.length=0,o[0]):r}return"ruby"===t.tagName?i(e):t.childNodes?(n(e,t),i(e)):void 0}for(n(t,e);r=i(t);)for(var o=0;oe.left&&this.tope.top},m.prototype.overlapsAny=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},m.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}},m.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},m.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},m.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,r=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,n=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||r}};function v(e,t,r,n){var i=new m(t),o=t.cue,a=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,r=t.textTrackList,n=0,i=0;id&&(c=c<0?-1:1,c*=Math.ceil(d/l)*l),a<0&&(c+=""===o.vertical?r.height:r.width,s=s.reverse()),i.move(f,c)}else{var p=i.lineHeight/r.height*100;switch(o.lineAlign){case"middle":a-=p/2;break;case"end":a-=p}switch(o.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}s=["+y","-x","+x","-y"],i=new m(t)}var h=function(e,t){for(var i,o=new m(e),a=1,s=0;su&&(i=new m(e),a=u),e=new m(o)}return i||o}(i,s);t.move(h.toCSSCompatValues(r))}function g(){}g.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},g.convertCueToDOMTree=function(e,t){return e&&t?d(e,t):null};g.processCues=function(e,t,r){if(!e||!t||!r)return null;for(;r.firstChild;)r.removeChild(r.firstChild);var n=e.document.createElement("div");n.style.position="absolute",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.margin="1.5%",r.appendChild(n);if(function(e){for(var t=0;t100)throw new Error("Position must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",a({},l,{get:function(){return T},set:function(e){var t=o(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");T=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",a({},l,{get:function(){return w},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");w=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",a({},l,{get:function(){return S},set:function(e){var t=o(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");S=t,this.hasBeenReset=!0}})),s.displayState=void 0,u)return s}s.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.VTTCue=e.VTTCue||s,t.VTTCue=s}(this,this.vttjs||{})},{}],108:[function(e,t,r){!function(e,t){var r={"":!0,up:!0};function n(e){return"number"==typeof e&&e>=0&&e<=100}function i(){var e=100,t=3,i=0,o=100,a=0,s=100,u="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!n(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!n(e))throw new Error("RegionAnchorX must be between 0 and 100.");o=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!n(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!n(e))throw new Error("ViewportAnchorY must be between 0 and 100.");s=e}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(e){if(!n(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return u},set:function(e){var t,n=(t=e,"string"==typeof t&&!!r[t.toLowerCase()]&&t.toLowerCase());if(!1===n)throw new SyntaxError("An invalid or illegal string was specified.");u=n}}})}e.VTTRegion=e.VTTRegion||i,t.VTTRegion=i}(this,this.vttjs||{})},{}],109:[function(e,t,r){arguments[4][95][0].apply(r,arguments)},{95:95}]},{},[93])(93)}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).videojsContribHls=e()}}(function(){return function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[a]={exports:{}};t[a][0].call(c.exports,function(e){var r=t[a][1][e];return i(r||e)},c,c.exports,e,t,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a=i.adStartTime&&t<=i.adEndTime)return i}return null};r.default={updateAdCues:function(e,t){var r=arguments.length<=2||void 0===arguments[2]?0:arguments[2];if(e.segments)for(var i=r,o=void 0,u=0;u=32&&e<126?String.fromCharCode(e):"."},o={hexDump:function(e){for(var t=Array.prototype.slice.call(e),r="",o=0;ot.start(0)?r.start(0):t.start(0),r.end(0)0&&(r=Math.max(r,n.end(n.length-1))),t!==r&&("open"!==this.mediaSource.readyState?this.mediaSource.addEventListener("sourceopen",i):i())}},{key:"dispose",value:function(){this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.audioPlaylistLoader_&&this.audioPlaylistLoader_.dispose(),this.audioSegmentLoader_.dispose()}},{key:"master",value:function(){return this.masterPlaylistLoader_.master}},{key:"media",value:function(){return this.masterPlaylistLoader_.media()||this.initialMedia_}},{key:"setupSourceBuffers_",value:function(){var e=this.masterPlaylistLoader_.media(),t=void 0;if(e&&"open"===this.mediaSource.readyState){if((t=m(this.masterPlaylistLoader_.master,e)).length<1)return this.error="No compatible SourceBuffer configuration for the variant stream:"+e.resolvedUri,this.mediaSource.endOfStream("decode");this.mainSegmentLoader_.mimeType(t[0]),t[1]&&this.audioSegmentLoader_.mimeType(t[1]),this.excludeIncompatibleVariants_(e)}}},{key:"excludeIncompatibleVariants_",value:function(e){var t=this.masterPlaylistLoader_.master,r=2,n=null,i=null,o=void 0;e.attributes&&e.attributes.CODECS&&(o=h(e.attributes.CODECS),n=o.videoCodec,i=o.audioProfile,r=o.codecCount),t.playlists.forEach(function(e){var t={codecCount:2,videoCodec:null,audioProfile:null};if(e.attributes&&e.attributes.CODECS){var o=e.attributes.CODECS;t=h(o),window.MediaSource&&window.MediaSource.isTypeSupported&&!window.MediaSource.isTypeSupported('video/mp4; codecs="'+y(o)+'"')&&(e.excludeUntil=1/0)}t.codecCount!==r&&(e.excludeUntil=1/0),t.videoCodec!==n&&(e.excludeUntil=1/0),("5"===t.audioProfile&&"5"!==i||"5"===i&&"5"!==t.audioProfile)&&(e.excludeUntil=1/0)})}},{key:"updateAdCues_",value:function(e){var t=0,r=this.seekable();r.length&&(t=r.start(0)),c.default.updateAdCues(e,this.cueTagsTrack_,t)}}]),t}();r.MasterPlaylistController=v}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./ad-cue-tags":1,"./playlist-loader":6,"./ranges":8,"./segment-loader":12,"./sync-controller":15,"videojs-contrib-media-sources/es5/codec-utils":57}],5:[function(e,t,r){(function(n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r")),this.logger_("initialize");var n=function(){return r.waiting_()},i=function(){return r.cancelTimer_()};this.tech_.on("waiting",n),this.tech_.on(u,i),this.monitorCurrentTime_(),this.dispose=function(){r.logger_("dispose"),r.tech_.off("waiting",n),r.tech_.off(u,i),r.checkCurrentTimeTimeout_&&clearTimeout(r.checkCurrentTimeTimeout_),r.cancelTimer_()}}return i(e,[{key:"monitorCurrentTime_",value:function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=setTimeout(this.monitorCurrentTime_.bind(this),250)}},{key:"checkCurrentTime_",value:function(){if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}}},{key:"cancelTimer_",value:function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null}},{key:"waiting_",value:function(){var e=this.seekable(),t=this.tech_.currentTime();if(!this.tech_.seeking()&&null===this.timer_){if(this.fellOutOfLiveWindow_(e,t)){var r=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+r),this.cancelTimer_(),void this.tech_.setCurrentTime(r)}var n=this.tech_.buffered(),i=a.default.findNextRange(n,t);if(this.videoUnderflow_(i,n,t))return this.cancelTimer_(),void this.tech_.setCurrentTime(t);if(i.length>0){var o=i.start(0)-t;this.logger_("Stopped at "+t+", setting timer for "+o+", seeking to "+i.start(0)),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*o,t)}}}},{key:"fellOutOfLiveWindow_",value:function(e,t){return!!(e.length&&e.start(0)>0&&t2)return{start:i,end:o}}return null}},{key:"logger_",value:function(){}}]),e}();r.default=l,t.exports=r.default}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./ranges":8}],6:[function(e,t,r){(function(n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function i(e){return e&&e.__esModule?e:{default:e}}var o=i(e("./resolve-url")),a="undefined"!=typeof window?window.videojs:void 0!==n?n.videojs:null,s=e("./playlist.js"),u=i(e("./stream")),l=i(e("m3u8-parser")),c=i(e("global/window")),d=function(e,t,r){var n=t.slice(),i=void 0,o=void 0;for(r=r||0,i=Math.min(e.length,t.length+r),o=r;o=500?4:2},u.trigger("error")},m=function(e,t){var r=void 0,n=void 0,i=void 0;u.setBandwidth(h||e),h=null,u.state="HAVE_METADATA",(r=new l.default.Parser).push(e.responseText),r.end(),r.manifest.uri=t,i=function(e,t){for(var r=!1,n=(0,a.mergeOptions)(e,{}),i=e.playlists.length,s=void 0,u=void 0,l=void 0;i--;)if((s=n.playlists[i]).uri===t.uri){if(s.segments&&t.segments&&s.segments.length===t.segments.length&&s.mediaSequence===t.mediaSequence)continue;for(n.playlists[i]=(0,a.mergeOptions)(s,t),n.playlists[t.uri]=n.playlists[i],s.segments&&(n.playlists[i].segments=d(s.segments,t.segments,t.mediaSequence-s.mediaSequence)),l=0,n.playlists[i].segments&&(l=n.playlists[i].segments.length);l--;)(u=n.playlists[i].segments[l]).resolvedUri||(u.resolvedUri=(0,o.default)(s.resolvedUri,u.uri)),u.key&&!u.key.resolvedUri&&(u.key.resolvedUri=(0,o.default)(s.resolvedUri,u.key.uri)),u.map&&!u.map.resolvedUri&&(u.map.resolvedUri=(0,o.default)(s.resolvedUri,u.map.uri));r=!0}return r?n:null}(u.master,r.manifest),n=1e3*(r.manifest.targetDuration||10),u.targetDuration=r.manifest.targetDuration,i?(u.master=i,u.media_=u.master.playlists[r.manifest.uri]):n/=2,u.media().endList||(c.default.clearTimeout(p),p=c.default.setTimeout(function(){u.trigger("mediaupdatetimeout")},n)),u.trigger("loadedplaylist")},u.state="HAVE_NOTHING",f=this.dispose,u.dispose=function(){u.stopRequest(),c.default.clearTimeout(p),f.call(this)},u.stopRequest=function(){if(h){var e=h;h=null,e.onreadystatechange=null,e.abort()}},u.enabledPlaylists_=function(){return u.master.playlists.filter(s.isEnabled).length},u.isLowestEnabledRendition_=function(){var e=u.media();if(!e||!e.attributes)return!1;var t=u.media().attributes.BANDWIDTH||0;return!(u.master.playlists.filter(function(e){if(!(0,s.isEnabled)(e))return!1;var r=0;return e&&e.attributes&&(r=e.attributes.BANDWIDTH),r<=t}).length>1)},u.media=function(e){var t=u.state,r=void 0;if(!e)return u.media_;if("HAVE_NOTHING"===u.state)throw new Error("Cannot switch media playlist from "+u.state);if("string"==typeof e){if(!u.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=u.master.playlists[e]}if(r=!u.media_||e.uri!==u.media_.uri,u.master.playlists[e.uri].endList)return h&&(h.onreadystatechange=null,h.abort(),h=null),u.state="HAVE_METADATA",u.media_=e,void(r&&(u.trigger("mediachanging"),u.trigger("mediachange")));if(r){if(u.state="SWITCHING_MEDIA",h){if((0,o.default)(u.master.uri,e.uri)===h.url)return;h.onreadystatechange=null,h.abort(),h=null}this.media_&&this.trigger("mediachanging"),h=this.hls_.xhr({uri:(0,o.default)(u.master.uri,e.uri),withCredentials:n},function(r,n){if(h){if(r)return y(h,e.uri,t);m(n,e.uri),"HAVE_MASTER"===t?u.trigger("loadedmetadata"):u.trigger("mediachange")}})}},u.setBandwidth=function(e){u.bandwidth=e.bandwidth},u.on("mediaupdatetimeout",function(){"HAVE_METADATA"===u.state&&(u.state="HAVE_CURRENT_METADATA",h=this.hls_.xhr({uri:(0,o.default)(u.master.uri,u.media().uri),withCredentials:n},function(e,t){if(h)return e?y(h,u.media().uri):void m(h,u.media().uri)}))}),u.on("firstplay",function(){var e=u.media();e&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0})}),u.pause=function(){u.stopRequest(),c.default.clearTimeout(p)},u.load=function(){u.started?u.media().endList?u.trigger("loadedplaylist"):u.trigger("mediaupdatetimeout"):u.start()},u.start=function(){u.started=!0,h=i.hls_.xhr({uri:t,withCredentials:n},function(e,r){var n=void 0,i=void 0,a=void 0;if(h){if(h=null,e)return u.error={status:r.status,message:"HLS playlist request error at URL: "+t,responseText:r.responseText,code:2},u.trigger("error");if((n=new l.default.Parser).push(r.responseText),n.end(),u.state="HAVE_MASTER",n.manifest.uri=t,n.manifest.playlists){for(u.master=n.manifest,a=u.master.playlists.length;a--;)i=u.master.playlists[a],u.master.playlists[i.uri]=i,i.resolvedUri=(0,o.default)(u.master.uri,i.uri);for(var s in u.master.mediaGroups.AUDIO)for(var d in u.master.mediaGroups.AUDIO[s]){var f=u.master.mediaGroups.AUDIO[s][d];f.uri&&(f.resolvedUri=(0,o.default)(u.master.uri,f.uri))}return u.trigger("loadedplaylist"),void(h||u.media(n.manifest.playlists[0]))}return u.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:c.default.location.href,playlists:[{uri:t}]},u.master.playlists[t]=u.master.playlists[0],u.master.playlists[0].resolvedUri=t,m(r,t),u.trigger("loadedmetadata")}})}};f.prototype=new u.default,r.default=f,t.exports=r.default}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./playlist.js":7,"./resolve-url":11,"./stream":14,"global/window":27,"m3u8-parser":28}],7:[function(e,t,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i="undefined"!=typeof window?window.videojs:void 0!==t?t.videojs:null,o=e("global/window"),a=(n=o,n&&n.__esModule?n:{default:n}),s={UNSAFE_LIVE_SEGMENTS:3},u=function(e,t,r){var n=void 0,i=void 0;return void 0===t&&(t=e.mediaSequence+e.segments.length),tr){var i=[r,t];t=i[0],r=i[1]}if(t<0){for(var o=t;oMath.abs(i)?(o=i,a=-r.time):(o=n,a=t.time),Math.abs(a+c(e,o,0))}if(t)return o=t.mediaSequence-e.mediaSequence,t.time+c(e,o,0);if(r)return o=r.mediaSequence-e.mediaSequence,r.time-c(e,o,0)}(e,r,n),a=o,d=Math.max(0,e.segments.length-s.UNSAFE_LIVE_SEGMENTS),f=u(e,e.mediaSequence+d,o);return(0,i.createTimeRange)(a,f)};r.seekable=d;var f=function(e){return e-Math.floor(e)==0},p=function(e,t){if(f(t))return t+.1*e;for(var r=t.toString().split(".")[1].length,n=1;n<=r;n++){var i=Math.pow(10,n),o=t*i;if(f(o)||n===r)return(o+e)/i}},h=p.bind(null,1),y=p.bind(null,-1),m=function(e,t,r,n){var i=void 0,o=void 0,a=e.segments.length,s=t-n;if(s<0){if(r>0)for(i=r-1;i>=0;i--)if(o=e.segments[i],(s+=y(o.duration))>0)return{mediaIndex:i,startTime:n-c(e,r,i)};return{mediaIndex:0,startTime:t}}if(r<0){for(i=r;i<0;i++)if((s-=e.targetDuration)<0)return{mediaIndex:0,startTime:t};r=0}for(i=r;iDate.now()};r.isBlacklisted=v;var g=function(e){var t=v(e);return!e.disabled&&!t};r.isEnabled=g,s.duration=l,s.seekable=d,s.getMediaInfoForTime_=m,s.isEnabled=g,s.isBlacklisted=v,r.default=s}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"global/window":27}],8:[function(e,t,r){(function(e){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();var i,o="undefined"!=typeof window?window.videojs:void 0!==e?e.videojs:null,a=(i=o,i&&i.__esModule?i:{default:i}),s=function(e,t){var r=[],n=void 0;if(e&&e.length)for(n=0;n=t})},findNextRange:function(e,t){return s(e,function(e){return e-1/30>=t})},findGaps:function(e){if(e.length<2)return a.default.createTimeRanges();for(var t=[],r=1;r=i};if(e)for(r=0;r=d.default.GOAL_BUFFER_LENGTH)return null;if(!n&&l>=1)return null;if(null===o)return r=this.getSyncSegmentCandidate_(t),p("getSync",r),this.generateSegmentInfo_(t,r,null,!0);if(null!==r){p("++",r+1);var c=t.segments[r];return u=c&&c.end?c.end:a,this.generateSegmentInfo_(t,r+1,u,!1)}if(this.fetchAtBuffer_){r=(f=(0,s.getMediaInfoForTime_)(t,a,o.segmentIndex,o.time)).mediaIndex,u=f.startTime}else{var f;r=(f=(0,s.getMediaInfoForTime_)(t,i,o.segmentIndex,o.time)).mediaIndex,u=f.startTime}return p("gMIFT",r,"sos",u),this.generateSegmentInfo_(t,r,u,!1)}},{key:"generateSegmentInfo_",value:function(e,t,r,n){if(t<0||t>=e.segments.length)return null;var i=e.segments[t];return{uri:i.resolvedUri,mediaIndex:t,isSyncRequest:n,startOfSegment:r,playlist:e,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:i.timeline,duration:i.duration}}},{key:"abort_",value:function(){this.xhr_&&this.xhr_.abort(),this.pendingSegment_=null}},{key:"init_",value:function(){return this.state="READY",this.sourceUpdater_=new l.default(this.mediaSource_,this.mimeType_),this.resetEverything(),this.fillBuffer_()}},{key:"fillBuffer_",value:function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.mediaSource_.duration,this.currentTimeline_));var e=this.checkBuffer_(this.sourceUpdater_.buffered(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(e){h(this.playlist_,this.mediaSource_,e.mediaIndex)?this.mediaSource_.endOfStream():(e.mediaIndex!==this.playlist_.segments.length-1||"ended"!==this.mediaSource_.readyState||this.seeking_())&&((e.timeline!==this.currentTimeline_||null!==e.startOfSegment&&e.startOfSegment0&&t.start(0)0&&this.sourceUpdater_.remove(0,o),(t=e.playlist.segments[e.mediaIndex]).key){var a=u.default.mergeOptions(this.xhrOptions_,{uri:t.key.resolvedUri,responseType:"arraybuffer"});r=this.hls_.xhr(a,this.handleResponse_.bind(this))}if(t.map&&!this.initSegments_[m(t.map)]){var s=u.default.mergeOptions(this.xhrOptions_,{uri:t.map.resolvedUri,responseType:"arraybuffer",headers:y(t.map)});n=this.hls_.xhr(s,this.handleResponse_.bind(this))}this.pendingSegment_=e;var l=u.default.mergeOptions(this.xhrOptions_,{uri:e.uri,responseType:"arraybuffer",headers:y(t)});i=this.hls_.xhr(l,this.handleResponse_.bind(this)),this.xhr_={keyXhr:r,initSegmentXhr:n,segmentXhr:i,abort:function(){this.segmentXhr&&(this.segmentXhr.onreadystatechange=null,this.segmentXhr.abort(),this.segmentXhr=null),this.initSegmentXhr&&(this.initSegmentXhr.onreadystatechange=null,this.initSegmentXhr.abort(),this.initSegmentXhr=null),this.keyXhr&&(this.keyXhr.onreadystatechange=null,this.keyXhr.abort(),this.keyXhr=null)}},this.state="WAITING"}},{key:"handleResponse_",value:function(e,t){var r=void 0,n=void 0,i=void 0;if(this.xhr_&&(t===this.xhr_.segmentXhr||t===this.xhr_.keyXhr||t===this.xhr_.initSegmentXhr)){if(n=(r=this.pendingSegment_).playlist.segments[r.mediaIndex],t.timedout)return this.abort_(),this.bandwidth=1,this.roundTrip=NaN,this.state="READY",this.trigger("progress");if(!t.aborted&&e){var o=this.xhr_.keyXhr;return this.abort_(),this.error({status:t.status,message:t===o?"HLS key request error at URL: "+n.key.uri:"HLS segment request error at URL: "+r.uri,code:2,xhr:t}),this.state="READY",this.pause(),this.trigger("error")}if(t.response){if(t===this.xhr_.segmentXhr&&(this.xhr_.segmentXhr=null,r.startOfAppend=Date.now(),this.roundTrip=t.roundTripTime,this.bandwidth=t.bandwidth,this.mediaBytesTransferred+=t.bytesReceived||0,this.mediaRequests+=1,this.mediaTransferDuration+=t.roundTripTime||0,n.key?r.encryptedBytes=new Uint8Array(t.response):r.bytes=new Uint8Array(t.response)),t===this.xhr_.keyXhr){if(this.xhr_.keyXhr=null,16!==t.response.byteLength)return this.abort_(),this.error({status:t.status,message:"Invalid HLS key at URL: "+n.key.uri,code:2,xhr:t}),this.state="READY",this.pause(),this.trigger("error");i=new DataView(t.response),n.key.bytes=new Uint32Array([i.getUint32(0),i.getUint32(4),i.getUint32(8),i.getUint32(12)]),n.key.iv=n.key.iv||new Uint32Array([0,0,0,r.mediaIndex+r.playlist.mediaSequence])}t===this.xhr_.initSegmentXhr&&(this.xhr_.initSegmentXhr=null,n.map.bytes=new Uint8Array(t.response),this.initSegments_[m(n.map)]=n.map),this.xhr_.segmentXhr||this.xhr_.keyXhr||this.xhr_.initSegmentXhr||(this.xhr_=null,this.processResponse_())}else this.abort_()}}},{key:"resetEverything",value:function(){this.resetLoader(),this.remove(0,1/0)}},{key:"resetLoader",value:function(){this.fetchAtBuffer_=!1,this.resyncLoader()}},{key:"resyncLoader",value:function(){this.mediaIndex=null,this.syncPoint_=null}},{key:"remove",value:function(e,t){this.sourceUpdater_&&this.sourceUpdater_.remove(e,t)}},{key:"processResponse_",value:function(){if(this.pendingSegment_){this.state="DECRYPTING";var e=this.pendingSegment_,t=e.playlist.segments[e.mediaIndex];t.key?new c.Decrypter(e.encryptedBytes,t.key.bytes,t.key.iv,function(t,r){e.bytes=r,this.handleSegment_()}.bind(this)):this.handleSegment_()}else this.state="READY"}},{key:"handleSegment_",value:function(){var e=this;if(this.pendingSegment_){this.state="APPENDING";var t=this.pendingSegment_,r=t.playlist.segments[t.mediaIndex];if(this.syncController_.probeSegmentInfo(t),t.isSyncRequest)return this.pendingSegment_=null,void(this.state="READY");null!==t.timestampOffset&&t.timestampOffset!==this.sourceUpdater_.timestampOffset()&&this.sourceUpdater_.timestampOffset(t.timestampOffset),r.map&&function(){var t=m(r.map);if(!e.activeInitSegmentId_||e.activeInitSegmentId_!==t){var n=e.initSegments_[t];e.sourceUpdater_.appendBuffer(n.bytes,function(){e.activeInitSegmentId_=t})}}(),t.byteLength=t.bytes.byteLength,"number"==typeof r.start&&"number"==typeof r.end?this.mediaSecondsLoaded+=r.end-r.start:this.mediaSecondsLoaded+=r.duration,this.sourceUpdater_.appendBuffer(t.bytes,this.handleUpdateEnd_.bind(this))}else this.state="READY"}},{key:"handleUpdateEnd_",value:function(){if(!this.pendingSegment_)return this.state="READY",void(this.paused()||this.fillBuffer_());var e=this.pendingSegment_;this.pendingSegment_=null,this.recordThroughput_(e),p("handleUpdateEnd_");var t=e.mediaIndex;t+=e.playlist.mediaSequence-this.playlist_.mediaSequence,this.mediaIndex=t,this.fetchAtBuffer_=!0;h(e.playlist,this.mediaSource_,t+1)&&this.mediaSource_.endOfStream(),this.state="READY",this.trigger("progress"),this.paused()||this.fillBuffer_()}},{key:"recordThroughput_",value:function(e){var t=this.throughput.rate,r=Date.now()-e.startOfAppend+1,n=Math.floor(e.byteLength/r*8*1e3);this.throughput.rate+=(n-t)/++this.throughput.count}}]),t}();r.default=v,t.exports=r.default}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./config":3,"./playlist":7,"./source-updater":13,"aes-decrypter":20,"global/window":27}],13:[function(e,t,r){(function(e){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r-1)}},{key:"trigger",value:function(e){var t=void 0,r=void 0,n=void 0,i=void 0;if(t=this.listeners[e])if(2===arguments.length)for(n=t.length,r=0;r=0;o--){var a=i[o];if(a.timeline===n&&void 0!==a.start){return{time:a.start,segmentIndex:o}}}return null}},{name:"Discontinuity",run:function(e,t,r,n){if(t.discontinuityStarts.length)for(var i=0;i:",o),o}return null}},{key:"saveExpiredSegmentInfo",value:function(e,t){for(var r=t.mediaSequence-e.mediaSequence-1;r>=0;r--){var n=e.segments[r];if(void 0!==n.start){t.syncInfo={mediaSequence:e.mediaSequence+r,time:n.start},c("playlist sync:",t.syncInfo),this.trigger("syncinfoupdate");break}}}},{key:"setDateTimeMapping",value:function(e){if(!this.datetimeToDisplayTime&&e.dateTimeObject){var t=e.dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-t}}},{key:"reset",value:function(){this.inspectCache_=void 0}},{key:"probeSegmentInfo",value:function(e){var t=void 0;(t=e.playlist.segments[e.mediaIndex].map?this.probeMp4Segment_(e):this.probeTsSegment_(e))&&this.calculateSegmentTimeMapping_(e,t)&&this.saveDiscontinuitySyncInfo_(e)}},{key:"probeMp4Segment_",value:function(e){var t=e.playlist.segments[e.mediaIndex],r=a.default.timescale(t.map.bytes),n=a.default.startTime(r,e.bytes);return null!==e.timestampOffset&&(e.timestampOffset-=n),{start:n,end:n+t.duration}}},{key:"probeTsSegment_",value:function(e){var t=(0,s.inspect)(e.bytes,this.inspectCache_),r=void 0,n=void 0;return t?(t.video&&2===t.video.length?(this.inspectCache_=t.video[1].dts,r=t.video[0].dtsTime,n=t.video[1].dtsTime):t.audio&&2===t.audio.length&&(this.inspectCache_=t.audio[1].dts,r=t.audio[0].dtsTime,n=t.audio[1].dtsTime),{start:r,end:n}):null}},{key:"calculateSegmentTimeMapping_",value:function(e,t){var r=e.playlist.segments[e.mediaIndex],n=this.timelines[e.timeline];if(null!==e.timestampOffset)c("tsO:",e.timestampOffset),n={time:e.timestampOffset,mapping:e.timestampOffset-t.start},this.timelines[e.timeline]=n,r.start=e.timestampOffset,r.end=t.end+n.mapping;else{if(!n)return!1;r.start=t.start+n.mapping,r.end=t.end+n.mapping}return this.trigger("syncinfoupdate"),!0}},{key:"saveDiscontinuitySyncInfo_",value:function(e){var t=e.playlist,r=t.segments[e.mediaIndex];if(r.discontinuity)this.discontinuities[r.timeline]={time:r.start,accuracy:0};else if(t.discontinuityStarts.length)for(var n=0;n0&&(!this.discontinuities[o]||this.discontinuities[o].accuracy>a)&&(this.discontinuities[o]={time:r.end+(0,u.sumDurations)(t,e.mediaIndex+1,i),accuracy:a})}}}]),t}();r.default=f}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./playlist":7,"mux.js/lib/mp4/probe":49,"mux.js/lib/tools/ts-inspector.js":51}],16:[function(e,t,r){(function(e){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n="undefined"!=typeof window?window.videojs:void 0!==e?e.videojs:null;r.default=function(){return function e(t,r){if(t=(0,n.mergeOptions)({timeout:45e3},t),e.beforeRequest&&"function"==typeof e.beforeRequest){var i=e.beforeRequest(t);i&&(t=i)}var o=(0,n.xhr)(t,function(e,t){!e&&o.response&&(o.responseTime=Date.now(),o.roundTripTime=o.responseTime-o.requestTime,o.bytesReceived=o.response.byteLength||o.response.length,o.bandwidth||(o.bandwidth=Math.floor(o.bytesReceived/o.roundTripTime*8*1e3))),e||o.timedout?o.timedout=o.timedout||"ETIMEDOUT"===e.code:o.timedout=!1,e||200===t.statusCode||206===t.statusCode||0===t.statusCode||(e=new Error("XHR Failed with a response of: "+(o&&(o.response||o.responseText)))),r(e,o)});return o.requestTime=Date.now(),o}},t.exports=r.default}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],17:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r>7))^o]=o;for(a=s=0;!n[a];a^=c||1,s=l[s]||1)for(f=(f=s^s<<1^s<<2^s<<3^s<<4)>>8^255&f^99,n[a]=f,i[f]=a,h=16843009*u[d=u[c=u[a]]]^65537*d^257*c^16843008*a,p=257*u[f]^16843008*f,o=0;o<4;o++)t[o][a]=p=p<<24^p>>>8,r[o][f]=h=h<<24^h>>>8;for(o=0;o<5;o++)t[o]=t[o].slice(0),r[o]=r[o].slice(0);return e},o=null,a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o||(o=i()),this._tables=[[o[0][0].slice(),o[0][1].slice(),o[0][2].slice(),o[0][3].slice(),o[0][4].slice()],[o[1][0].slice(),o[1][1].slice(),o[1][2].slice(),o[1][3].slice(),o[1][4].slice()]];var r=void 0,n=void 0,a=void 0,s=void 0,u=void 0,l=this._tables[0][4],c=this._tables[1],d=t.length,f=1;if(4!==d&&6!==d&&8!==d)throw new Error("Invalid aes key size");for(s=t.slice(0),u=[],this._key=[s,u],r=d;r<4*d+28;r++)a=s[r-1],(r%d==0||8===d&&r%d==4)&&(a=l[a>>>24]<<24^l[a>>16&255]<<16^l[a>>8&255]<<8^l[255&a],r%d==0&&(a=a<<8^a>>>24^f<<24,f=f<<1^283*(f>>7))),s[r]=s[r-d]^a;for(n=0;r;n++,r--)a=s[3&n?r:r-4],u[n]=r<=4||n<4?a:c[0][l[a>>>24]]^c[1][l[a>>16&255]]^c[2][l[a>>8&255]]^c[3][l[255&a]]}return n(e,[{key:"decrypt",value:function(e,t,r,n,i,o){var a=this._key[1],s=e^a[0],u=n^a[1],l=r^a[2],c=t^a[3],d=void 0,f=void 0,p=void 0,h=a.length/4-2,y=void 0,m=4,v=this._tables[1],g=v[0],_=v[1],b=v[2],T=v[3],w=v[4];for(y=0;y>>24]^_[u>>16&255]^b[l>>8&255]^T[255&c]^a[m],f=g[u>>>24]^_[l>>16&255]^b[c>>8&255]^T[255&s]^a[m+1],p=g[l>>>24]^_[c>>16&255]^b[s>>8&255]^T[255&u]^a[m+2],c=g[c>>>24]^_[s>>16&255]^b[u>>8&255]^T[255&l]^a[m+3],m+=4,s=d,u=f,l=p;for(y=0;y<4;y++)i[(3&-y)+o]=w[s>>>24]<<24^w[u>>16&255]<<16^w[l>>8&255]<<8^w[255&c]^a[m++],d=s,s=u,u=l,l=c,c=d}}]),e}();r.default=a,t.exports=r.default},{}],18:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r>8|e>>>24},l=function(e,t,r){var n=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),i=new o.default(Array.prototype.slice.call(t)),a=new Uint8Array(e.byteLength),s=new Int32Array(a.buffer),l=void 0,c=void 0,d=void 0,f=void 0,p=void 0,h=void 0,y=void 0,m=void 0,v=void 0;for(l=r[0],c=r[1],d=r[2],f=r[3],v=0;v-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}]),t}();r.default=s},{"./stream":32}],30:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var r=0;r0&&(o.duration=e.duration),0===e.duration&&(o.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=i},key:function(){e.attributes?"NONE"!==e.attributes.METHOD?e.attributes.URI?(e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),l={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(l.iv=e.attributes.IV)):this.trigger("warn",{message:"ignoring key declaration without URI"}):l=null:this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,d=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){u={},e.uri&&(u.uri=e.uri),e.byterange&&(u.byterange=e.byterange)},"stream-inf":function(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||c,e.attributes?(o.attributes||(o.attributes={}),n(o.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||c,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var r=this.manifest.mediaGroups[e.attributes.TYPE];r[e.attributes["GROUP-ID"]]=r[e.attributes["GROUP-ID"]]||{},t=r[e.attributes["GROUP-ID"]],(a={default:/yes/i.test(e.attributes.DEFAULT)}).default?a.autoselect=!0:a.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(a.language=e.attributes.LANGUAGE),e.attributes.URI&&(a.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(a.instreamId=e.attributes["INSTREAM-ID"]),t[e.attributes.NAME]=a}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){d+=1,o.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},"program-date-time":function(){this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):this.manifest.targetDuration=e.duration},totalduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+e.duration}):this.manifest.totalDuration=e.duration},"cue-out":function(){o.cueOut=e.data},"cue-out-cont":function(){o.cueOutCont=e.data},"cue-in":function(){o.cueIn=e.data}})[e.tagType]||function(){}).call(r)},uri:function(){o.uri=e.uri,i.push(o),!this.manifest.targetDuration||"duration"in o||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),o.duration=this.manifest.targetDuration),l&&(o.key=l),o.timeline=d,u&&(o.map=u),o={}},comment:function(){}})[e.type].call(r)}),e}return i(t,[{key:"push",value:function(e){this.lineStream.push(e)}},{key:"end",value:function(){this.lineStream.push("\n")}}]),t}();r.default=l},{"./line-stream":29,"./parse-stream":30,"./stream":32}],32:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r-1}},{key:"trigger",value:function(e){var t=this.listeners[e],r=void 0,n=void 0,i=void 0;if(t)if(2===arguments.length)for(n=t.length,r=0;r>4?r+20:r+10},this.parseAdtsSize=function(e,t){var r=(224&e[t+5])>>5,n=e[t+4]<<3;return 6144&e[t+3]|n|r},this.push=function(r){var n,i,o,a,s=0,u=0;for(e.length?(a=e.length,(e=new Uint8Array(r.byteLength+a)).set(e.subarray(0,a)),e.set(r,a)):e=r;e.length-u>=3;)if(e[u]!=="I".charCodeAt(0)||e[u+1]!=="D".charCodeAt(0)||e[u+2]!=="3".charCodeAt(0))if(!0&e[u]&&240==(240&e[u+1])){if(e.length-u<7)break;if((s=this.parseAdtsSize(e,u))>e.length)break;o={type:"audio",data:e.subarray(u,u+s),pts:t,dts:t},this.trigger("data",o),u+=s}else u++;else{if(e.length-u<10)break;if((s=this.parseId3TagSize(e,u))>e.length)break;i={type:"timed-metadata",data:e.subarray(u,u+s)},this.trigger("data",i),u+=s}n=e.length-u,e=n>0?e.subarray(u):new Uint8Array}}).prototype=new i,t.exports=n},{"../utils/stream.js":53}],34:[function(e,t,r){"use strict";var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]};t.exports={parseId3TagSize:function(e,t){var r=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?r+20:r+10},parseAdtsSize:function(e,t){var r=(224&e[t+5])>>5,n=e[t+4]<<3;return 6144&e[t+3]|n|r},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5>>2];t++}return null},parseAacTimestamp:function(e){var t,r,n;t=10,64&e[5]&&(t+=4,t+=i(e.subarray(10,14)));do{if((r=i(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){n=e.subarray(t+10,t+r+10);for(var o=0;o>>2;return s*=4,s+=3&a[7]}break}}t+=10,t+=r}while(t>5,u=9e4*(s=1024*(1+(3&e[l+6])))/o[(60&e[l+2])>>>2],i=l+r,e.byteLength>>6&3),channelcount:(1&e[l+2])<<2|(192&e[l+3])>>>6,samplerate:o[(60&e[l+2])>>>2],samplingfrequencyindex:(60&e[l+2])>>>2,samplesize:16,data:e.subarray(l+7+n,i)}),e.byteLength===i)return void(e=void 0);c++,e=e.subarray(i)}else l++},this.flush=function(){this.trigger("done")}}).prototype=new i,t.exports=n},{"../utils/stream.js":53}],36:[function(e,t,r){"use strict";var n,i,o,a=e("../utils/stream.js"),s=e("../utils/exp-golomb.js");(i=function(){var e,t,r=0;i.prototype.init.call(this),this.push=function(n){var i;for(t?((i=new Uint8Array(t.byteLength+n.data.byteLength)).set(t),i.set(n.data,t.byteLength),t=i):t=n.data;r3&&this.trigger("data",t.subarray(r+3)),t=null,r=0,this.trigger("done")}}).prototype=new a,o={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(n=function(){var e,t,r,a,u,l,c,d=new i;n.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,r=e.pts,a=e.dts,d.push(e))},d.on("data",function(n){var i={trackId:t,pts:r,dts:a,data:n};switch(31&n[0]){case 5:i.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:i.nalUnitType="sei_rbsp",i.escapedRBSP=u(n.subarray(1));break;case 7:i.nalUnitType="seq_parameter_set_rbsp",i.escapedRBSP=u(n.subarray(1)),i.config=l(i.escapedRBSP);break;case 8:i.nalUnitType="pic_parameter_set_rbsp";break;case 9:i.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",i)}),d.on("done",function(){e.trigger("done")}),this.flush=function(){d.flush()},c=function(e,t){var r,n=8,i=8;for(r=0;r0)throw new Error("Attempted to create new NAL wihout closing the old one");i=this.length,this.length+=4,this.position=this.length},this.endNalUnit=function(e){var t,r;this.length===i+4?this.length-=4:i>0&&(t=i+4,r=this.length-t,this.position=i,this.view.setUint32(this.position,r),this.position=this.length,e&&e.push(this.bytes.subarray(t,t+r))),i=0},this.writeMetaDataDouble=function(e,t){var r;if(a(this,2+e.length+9),this.view.setUint16(this.position,e.length),this.position+=2,"width"===e)this.bytes.set(s,this.position),this.position+=5;else if("height"===e)this.bytes.set(u,this.position),this.position+=6;else if("videocodecid"===e)this.bytes.set(l,this.position),this.position+=12;else for(r=0;r>>16,this.bytes[14]=(65280&e)>>>8,this.bytes[15]=(255&e)>>>0;break;case n.AUDIO_TAG:this.bytes[11]=175,this.bytes[12]=t?0:1;break;case n.METADATA_TAG:this.position=11,this.view.setUint8(this.position,2),this.position++,this.view.setUint16(this.position,10),this.position+=2,this.bytes.set([111,110,77,101,116,97,68,97,116,97],this.position),this.position+=10,this.bytes[this.position]=8,this.position++,this.view.setUint32(this.position,i),this.position=this.length,this.bytes.set([0,0,9],this.position),this.position+=3,this.length=this.position}return r=this.length-11,this.bytes[1]=(16711680&r)>>>16,this.bytes[2]=(65280&r)>>>8,this.bytes[3]=(255&r)>>>0,this.bytes[4]=(16711680&this.dts)>>>16,this.bytes[5]=(65280&this.dts)>>>8,this.bytes[6]=(255&this.dts)>>>0,this.bytes[7]=(4278190080&this.dts)>>>24,this.bytes[8]=0,this.bytes[9]=0,this.bytes[10]=0,a(this,4),this.view.setUint32(this.length,this.length),this.length+=4,this.position+=4,this.bytes=this.bytes.subarray(0,this.length),this.frameTime=n.frameTime(this.bytes),this}}).AUDIO_TAG=8,n.VIDEO_TAG=9,n.METADATA_TAG=18,n.isAudioFrame=function(e){return n.AUDIO_TAG===e[0]},n.isVideoFrame=function(e){return n.VIDEO_TAG===e[0]},n.isMetaData=function(e){return n.METADATA_TAG===e[0]},n.isKeyFrame=function(e){return n.isVideoFrame(e)?23===e[11]:!!n.isAudioFrame(e)||!!n.isMetaData(e)},n.frameTime=function(e){var t=e[4]<<16;return t|=e[5]<<8,t|=e[6]<<0,t|=e[7]<<24},t.exports=n},{}],39:[function(e,t,r){t.exports={tag:e("./flv-tag"),Transmuxer:e("./transmuxer")}},{"./flv-tag":38,"./transmuxer":40}],40:[function(e,t,r){"use strict";var n,i,o,a,s,u,l=e("../utils/stream.js"),c=e("./flv-tag.js"),d=e("../m2ts/m2ts.js"),f=e("../codecs/adts.js"),p=e("../codecs/h264").H264Stream,h=e("./coalesce-stream.js");a=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts?e.timelineStartInfo.pts=t.pts:e.timelineStartInfo.pts=Math.min(e.timelineStartInfo.pts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts?e.timelineStartInfo.dts=t.dts:e.timelineStartInfo.dts=Math.min(e.timelineStartInfo.dts,t.dts))},s=function(e,t){var r=new c(c.METADATA_TAG);return r.dts=t,r.pts=t,r.writeMetaDataDouble("videocodecid",7),r.writeMetaDataDouble("width",e.width),r.writeMetaDataDouble("height",e.height),r},u=function(e,t){var r,n=new c(c.VIDEO_TAG,!0);for(n.dts=t,n.pts=t,n.writeByte(1),n.writeByte(e.profileIdc),n.writeByte(e.profileCompatibility),n.writeByte(e.levelIdc),n.writeByte(255),n.writeByte(225),n.writeShort(e.sps[0].length),n.writeBytes(e.sps[0]),n.writeByte(e.pps.length),r=0;r=1e3)&&((i=new c(c.METADATA_TAG)).pts=n.pts,i.dts=n.dts,i.writeMetaDataDouble("audiocodecid",10),i.writeMetaDataBoolean("stereo",2===e.channelcount),i.writeMetaDataDouble("audiosamplerate",e.samplerate),i.writeMetaDataDouble("audiosamplesize",16),a.push(i),t=e.extraData,(i=new c(c.AUDIO_TAG,!0)).pts=n.pts,i.dts=n.dts,i.view.setUint16(i.position,e.extraData),i.position+=2,i.length=Math.max(i.length,i.position),a.push(i),o=n.pts),(i=new c(c.AUDIO_TAG)).pts=n.pts,i.dts=n.dts,i.writeBytes(n.data),a.push(i);t=null,this.trigger("data",{track:e,tags:a}),this.trigger("done","AudioSegmentStream")}else this.trigger("done","AudioSegmentStream")}}).prototype=new l,(i=function(e){var t,r,n=[];i.prototype.init.call(this),this.finishFrame=function(n,i){i&&(t&&e&&e.newMetadata&&(i.keyFrame||0===n.length)&&(n.push(s(t,i.dts)),n.push(u(e,i.dts)),e.newMetadata=!1),i.endNalUnit(),n.push(i),r=null)},this.push=function(t){a(e,t),t.pts=Math.round(t.pts/90),t.dts=Math.round(t.dts/90),n.push(t)},this.flush=function(){for(var i,o=[];n.length&&"access_unit_delimiter_rbsp"!==n[0].nalUnitType;)n.shift();if(0!==n.length){for(;n.length;)"seq_parameter_set_rbsp"===(i=n.shift()).nalUnitType?(e.newMetadata=!0,t=i.config,e.width=t.width,e.height=t.height,e.sps=[i.data],e.profileIdc=t.profileIdc,e.levelIdc=t.levelIdc,e.profileCompatibility=t.profileCompatibility,r.endNalUnit()):"pic_parameter_set_rbsp"===i.nalUnitType?(e.newMetadata=!0,e.pps=[i.data],r.endNalUnit()):"access_unit_delimiter_rbsp"===i.nalUnitType?(r&&this.finishFrame(o,r),(r=new c(c.VIDEO_TAG)).pts=i.pts,r.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(r.keyFrame=!0),r.endNalUnit()),r.startNalUnit(),r.writeBytes(i.data);r&&this.finishFrame(o,r),this.trigger("data",{track:e,tags:o}),this.trigger("done","VideoSegmentStream")}else this.trigger("done","VideoSegmentStream")}}).prototype=new l,(n=function(e){var t,r,a,s,u,l,y,m,v,g,_,b,T=this;n.prototype.init.call(this),e=e||{},this.metadataStream=new d.MetadataStream,e.metadataStream=this.metadataStream,t=new d.TransportPacketStream,r=new d.TransportParseStream,a=new d.ElementaryStream,s=new d.TimestampRolloverStream("video"),u=new d.TimestampRolloverStream("audio"),l=new d.TimestampRolloverStream("timed-metadata"),y=new f,m=new p,b=new h(e),t.pipe(r).pipe(a),a.pipe(s).pipe(m),a.pipe(u).pipe(y),a.pipe(l).pipe(this.metadataStream).pipe(b),_=new d.CaptionStream,m.pipe(_).pipe(b),a.on("data",function(e){var t,r,n;if("metadata"===e.type){for(t=e.tracks.length;t--;)"video"===e.tracks[t].type?r=e.tracks[t]:"audio"===e.tracks[t].type&&(n=e.tracks[t]);r&&!v&&(b.numberOfTracks++,v=new i(r),m.pipe(v).pipe(b)),n&&!g&&(b.numberOfTracks++,g=new o(n),y.pipe(g).pipe(b))}}),this.push=function(e){t.push(e)},this.flush=function(){t.flush()},b.on("data",function(e){T.trigger("data",e)}),b.on("done",function(){T.trigger("done")}),this.getFlvHeader=function(e,t,r){var n,i,o,a=new Uint8Array(9),s=new DataView(a.buffer);return e=e||0,t=void 0===t||t,r=void 0===r||r,s.setUint8(0,70),s.setUint8(1,76),s.setUint8(2,86),s.setUint8(3,1),s.setUint8(4,(t?4:0)|(r?1:0)),s.setUint32(5,a.byteLength),e<=0?((i=new Uint8Array(a.byteLength+4)).set(a),i.set([0,0,0,0],a.byteLength),i):((n=new c(c.METADATA_TAG)).pts=n.dts=0,n.writeMetaDataDouble("duration",e),o=n.finalize().length,(i=new Uint8Array(a.byteLength+o)).set(a),i.set(s.byteLength,o),i)}}).prototype=new l,t.exports=n},{"../codecs/adts.js":35,"../codecs/h264":36,"../m2ts/m2ts.js":42,"../utils/stream.js":53,"./coalesce-stream.js":37,"./flv-tag.js":38}],41:[function(e,t,r){"use strict";var n=e("../utils/stream"),i=function(){i.prototype.init.call(this),this.captionPackets_=[],this.field1_=new u,this.field1_.on("data",this.trigger.bind(this,"data")),this.field1_.on("done",this.trigger.bind(this,"done"))};i.prototype=new n,i.prototype.push=function(e){var t,r;if("sei_rbsp"===e.nalUnitType&&4===(t=function(e){for(var t=0,r={payloadType:-1,payloadSize:0},n=0,i=0;t>>8)>=16&&n<=23&&i>=64&&i<=127&&(16!==n||i<96)&&(n=32,i=null),(17===n||25===n)&&i>=48&&i<=63&&(n=9834,i=""),16==(240&n))return;0===n&&(n=null),0===i&&(i=null),this[this.mode_](e.pts,n,i)}else this.lastControlCode_=null}}};u.prototype=new n,u.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e){return e.trim()}).filter(function(e){return e.length}).join("\n");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t})},u.prototype.popOn=function(e,t,r){var n=this.nonDisplayed_[14];n+=a(t),n+=a(r),this.nonDisplayed_[14]=n},u.prototype.rollUp=function(e,t,r){var n=this.displayed_[14];""===n&&(this.flushDisplayed(e),this.startPts_=e),n+=a(t),n+=a(r),this.displayed_[14]=n},u.prototype.shiftRowsUp_=function(){var e;for(e=0;e>>4>1&&(n+=t[n]+1),0===r.pid?(r.type="pat",e(t.subarray(n),r),this.trigger("data",r)):r.pid===this.pmtPid?(r.type="pmt",e(t.subarray(n),r),this.trigger("data",r)):void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,n,r]):this.processPes_(t,n,r)},this.processPes_=function(e,t,r){r.streamType=this.programMapTable[r.pid],r.type="pes",r.data=e.subarray(t),this.trigger("data",r)}}).prototype=new a,i.STREAM_TYPES={h264:27,adts:15},(o=function(){var e=this,t={data:[],size:0},r={data:[],size:0},n={data:[],size:0},i=function(t,r){var n,i=new Uint8Array(t.size),o={type:r},a=0;if(t.data.length){for(o.trackId=t.data[0].pid;t.data.length;)n=t.data.shift(),i.set(n.data,a),a+=n.data.byteLength;!function(e,t){var r;t.dataAlignmentIndicator=0!=(4&e[6]),192&(r=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&r&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8])}(i,o),t.size=0,e.trigger("data",o)}};o.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,a;switch(o.streamType){case u.H264_STREAM_TYPE:case c.H264_STREAM_TYPE:e=t,a="video";break;case u.ADTS_STREAM_TYPE:e=r,a="audio";break;case u.METADATA_STREAM_TYPE:e=n,a="timed-metadata";break;default:return}o.payloadUnitStartIndicator&&i(e,a),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var t,r,n={type:"metadata",tracks:[]},i=o.programMapTable;for(t in i)i.hasOwnProperty(t)&&((r={timelineStartInfo:{baseMediaDecodeTime:0}}).id=+t,i[t]===c.H264_STREAM_TYPE?(r.codec="avc",r.type="video"):i[t]===c.ADTS_STREAM_TYPE&&(r.codec="adts",r.type="audio"),n.tracks.push(r));e.trigger("data",n)}})[o.type]()},this.flush=function(){i(t,"video"),i(r,"audio"),i(n,"timed-metadata"),this.trigger("done")}}).prototype=new a;var d={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:n,TransportParseStream:i,ElementaryStream:o,TimestampRolloverStream:l,CaptionStream:s.CaptionStream,Cea608Stream:s.Cea608Stream,MetadataStream:e("./metadata-stream")};for(var f in u)u.hasOwnProperty(f)&&(d[f]=u[f]);t.exports=d},{"../utils/stream.js":53,"./caption-stream":41,"./metadata-stream":43,"./stream-types":45,"./stream-types.js":45,"./timestamp-rollover-stream":46}],43:[function(e,t,r){"use strict";var n,i=e("../utils/stream"),o=e("./stream-types"),a=function(e,t,r){var n,i="";for(n=t;n>>2;p*=4,p+=3&f[7],c.timeStamp=p,void 0===t.pts&&void 0===t.dts&&(t.pts=c.timeStamp,t.dts=c.timeStamp),this.trigger("timestamp",c)}t.frames.push(c),n+=10,n+=o}while(n>>4>1&&(t+=e[4]+1),t},s=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}};t.exports={parseType:function(e,t){var r=i(e);return 0===r?"pat":r===t?"pmt":t?"pes":null},parsePat:function(e){var t=o(e),r=4+a(e);return t&&(r+=e[r]+1),(31&e[r+10])<<8|e[r+11]},parsePmt:function(e){var t={},r=o(e),n=4+a(e);if(r&&(n+=e[n]+1),1&e[n+5]){var i;i=3+((15&e[n+1])<<8|e[n+2])-4;for(var s=12+((15&e[n+10])<<8|e[n+11]);s>>3,n.pts*=4,n.pts+=(6&e[r+13])>>>1,n.dts=n.pts,64&t&&(n.dts=(14&e[r+14])<<27|(255&e[r+15])<<20|(254&e[r+16])<<12|(255&e[r+17])<<5|(254&e[r+18])>>>3,n.dts*=4,n.dts+=(6&e[r+18])>>>1)),n},videoPacketContainsKeyFrame:function(e){for(var t=4+a(e),r=e.subarray(t),n=0,i=0,o=!1;i3&&"slice_layer_without_partitioning_rbsp_idr"===s(31&r[i+3])&&(o=!0),o}}},{"./stream-types.js":45}],45:[function(e,t,r){"use strict";t.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},{}],46:[function(e,t,r){"use strict";var n=e("../utils/stream"),i=function(e,t){var r=1;for(e>t&&(r=-1);Math.abs(t-e)>4294967296;)e+=8589934592*r;return e},o=function(e){var t,r;o.prototype.init.call(this),this.type_=e,this.push=function(e){e.type===this.type_&&(void 0===r&&(r=e.dts),e.dts=i(e.dts,r),e.pts=i(e.pts,r),t=e.dts,this.trigger("data",e))},this.flush=function(){r=t,this.trigger("done")}};o.prototype=new n,t.exports={TimestampRolloverStream:o,handleRollover:i}},{"../utils/stream":53}],47:[function(e,t,r){t.exports={generator:e("./mp4-generator"),Transmuxer:e("./transmuxer").Transmuxer,AudioSegmentStream:e("./transmuxer").AudioSegmentStream,VideoSegmentStream:e("./transmuxer").VideoSegmentStream}},{"./mp4-generator":48,"./transmuxer":50}],48:[function(e,t,r){"use strict";var n,i,o,a,s,u,l,c,d,f,p,h,y,m,v,g,_,b,T,w,S,k,E,O,C,j,x,P,A,M,I,L,D,R,B,N,U=Math.pow(2,32)-1;!function(){var e;if(E={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in E)E.hasOwnProperty(e)&&(E[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);O=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),j=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),C=new Uint8Array([0,0,0,1]),x=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),P=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),A={video:x,audio:P},L=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),I=new Uint8Array([0,0,0,0,0,0,0,0]),D=new Uint8Array([0,0,0,0,0,0,0,0]),R=D,B=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),N=D,M=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),n=function(e){var t,r,n=[],i=0;for(t=1;t>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},a=function(){return n(E.ftyp,O,C,O,j)},g=function(e){return n(E.hdlr,A[e])},s=function(e){return n(E.mdat,e)},v=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),n(E.mdhd,t)},m=function(e){return n(E.mdia,v(e),g(e.type),l(e))},u=function(e){return n(E.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},l=function(e){return n(E.minf,"video"===e.type?n(E.vmhd,M):n(E.smhd,I),i(),b(e))},c=function(e,t){for(var r=[],i=t.length;i--;)r[i]=w(t[i]);return n.apply(null,[E.moof,u(e)].concat(r))},d=function(e){for(var t=e.length,r=[];t--;)r[t]=h(e[t]);return n.apply(null,[E.moov,p(4294967295)].concat(r).concat(f(e)))},f=function(e){for(var t=e.length,r=[];t--;)r[t]=S(e[t]);return n.apply(null,[E.mvex].concat(r))},p=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return n(E.mvhd,t)},_=function(e){var t,r,i=e.samples||[],o=new Uint8Array(4+i.length);for(r=0;r>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));for(t=0;t>>8),a.push(255&i[t].byteLength),a=a.concat(Array.prototype.slice.call(i[t]));return n(E.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),n(E.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([r.length]).concat(o).concat([i.length]).concat(a))),n(E.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},t=function(e){return n(E.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),o(e))}}(),y=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return n(E.tkhd,t)},w=function(e){var t,r,i,o,a,s;return t=n(E.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/(U+1)),s=Math.floor(e.baseMediaDecodeTime%(U+1)),r=n(E.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),92,"audio"===e.type?(i=k(e,92),n(E.traf,t,r,i)):(o=_(e),i=k(e,o.length+92),n(E.traf,t,r,i,o))},h=function(e){return e.duration=e.duration||4294967295,n(E.trak,y(e),m(e))},S=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),n(E.trex,t)},function(){var e,t,r;r=function(e,t){var r=0,n=0,i=0,o=0;return e.length&&(void 0!==e[0].duration&&(r=1),void 0!==e[0].size&&(n=2),void 0!==e[0].flags&&(i=4),void 0!==e[0].compositionTimeOffset&&(o=8)),[0,0,r|n|i|o,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},t=function(e,t){var i,o,a,s;for(t+=20+16*(o=e.samples||[]).length,i=r(o,t),s=0;s>>24,(16711680&a.duration)>>>16,(65280&a.duration)>>>8,255&a.duration,(4278190080&a.size)>>>24,(16711680&a.size)>>>16,(65280&a.size)>>>8,255&a.size,a.flags.isLeading<<2|a.flags.dependsOn,a.flags.isDependedOn<<6|a.flags.hasRedundancy<<4|a.flags.paddingValue<<1|a.flags.isNonSyncSample,61440&a.flags.degradationPriority,15&a.flags.degradationPriority,(4278190080&a.compositionTimeOffset)>>>24,(16711680&a.compositionTimeOffset)>>>16,(65280&a.compositionTimeOffset)>>>8,255&a.compositionTimeOffset]);return n(E.trun,new Uint8Array(i))},e=function(e,t){var i,o,a,s;for(t+=20+8*(o=e.samples||[]).length,i=r(o,t),s=0;s>>24,(16711680&a.duration)>>>16,(65280&a.duration)>>>8,255&a.duration,(4278190080&a.size)>>>24,(16711680&a.size)>>>16,(65280&a.size)>>>8,255&a.size]);return n(E.trun,new Uint8Array(i))},k=function(r,n){return"audio"===r.type?e(r,n):t(r,n)}}(),t.exports={ftyp:a,mdat:s,moof:c,moov:d,initSegment:function(e){var t,r=a(),n=d(e);return(t=new Uint8Array(r.byteLength+n.byteLength)).set(r),t.set(n,r.byteLength),t}}},{}],49:[function(e,t,r){"use strict";var n,i,o,a;n=function(e,t){var r,o,a,s,u,l=[];if(!t.length)return null;for(r=0;r1?r+o:e.byteLength,a===t[0]&&(1===t.length?l.push(e.subarray(r+8,s)):(u=n(e.subarray(r+8,s),t.slice(1))).length&&(l=l.concat(u))),r=s;return l},i=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},o=function(e){return n(e,["moov","trak"]).reduce(function(e,t){var r,i,o,a;return(r=n(t,["tkhd"])[0])?(o=r[i=0===r[0]?12:20]<<24|r[i+1]<<16|r[i+2]<<8|r[i+3],(a=n(t,["mdia","mdhd"])[0])?(i=0===a[0]?12:20,e[o]=a[i]<<24|a[i+1]<<16|a[i+2]<<8|a[i+3],e):null):null},{})},a=function(e,t){var r,i,o;return r=n(t,["moof","traf"]),i=[].concat.apply([],r.map(function(t){return n(t,["tfhd"]).map(function(r){var i,o;return i=r[4]<<24|r[5]<<16|r[6]<<8|r[7],o=e[i]||9e4,(n(t,["tfdt"]).map(function(e){var t,r;return t=e[0],r=e[4]<<24|e[5]<<16|e[6]<<8|e[7],1===t&&(r*=Math.pow(2,32),r+=e[8]<<24|e[9]<<16|e[10]<<8|e[11]),r})[0]||1/0)/o})})),o=Math.min.apply(null,i),isFinite(o)?o:0},t.exports={parseType:i,timescale:o,startTime:a}},{}],50:[function(e,t,r){"use strict";var n,i,o,a,s,u,l,c,d,f,p=e("../utils/stream.js"),h=e("./mp4-generator.js"),y=e("../m2ts/m2ts.js"),m=e("../codecs/adts.js"),v=e("../codecs/h264").H264Stream,g=e("../aac"),_=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],b=["width","height","profileIdc","levelIdc","profileCompatibility"];s=function(e){return e[0]==="I".charCodeAt(0)&&e[1]==="D".charCodeAt(0)&&e[2]==="3".charCodeAt(0)},d=function(e,t){var r;if(e.length!==t.length)return!1;for(r=0;r=n?t:(e.minSegmentDts=1/0,t.filter(function(t){return t.dts>=n&&(e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),e.minSegmentPts=e.minSegmentDts,!0)}))},this.generateSampleTable_=function(e){var t,r,n=[];for(t=0;t=-1e4&&r<=45e3&&(!n||s>r)&&(n=o,s=r));return n?n.gop:null},this.extendFirstKeyFrame_=function(e){var t;return e[0][0].keyFrame||(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},this.groupNalsIntoFrames_=function(e){var t,r,n=[],i=[];for(n.byteLength=0,t=0;t=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(s=this.videoTrack.timelineStartInfo.pts,b.forEach(function(e){a.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(s=this.audioTrack.timelineStartInfo.pts,_.forEach(function(e){a.info[e]=this.audioTrack[e]},this)),1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,n=h.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(n.byteLength),a.initSegment.set(n),a.data=new Uint8Array(this.pendingBytes),i=0;i=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},(o=function(e){var t,r,u=this,c=!0;o.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var t={};this.transmuxPipeline_=t,t.type="aac",t.metadataStream=new y.MetadataStream,t.aacStream=new g,t.audioTimestampRolloverStream=new y.TimestampRolloverStream("audio"),t.timedMetadataTimestampRolloverStream=new y.TimestampRolloverStream("timed-metadata"),t.adtsStream=new m,t.coalesceStream=new a(e,t.metadataStream),t.headOfPipeline=t.aacStream,t.aacStream.pipe(t.audioTimestampRolloverStream).pipe(t.adtsStream),t.aacStream.pipe(t.timedMetadataTimestampRolloverStream).pipe(t.metadataStream).pipe(t.coalesceStream),t.metadataStream.on("timestamp",function(e){t.aacStream.setTimestamp(e.timeStamp)}),t.aacStream.on("data",function(e){"timed-metadata"!==e.type||t.audioSegmentStream||(r=r||{timelineStartInfo:{baseMediaDecodeTime:u.baseMediaDecodeTime},codec:"adts",type:"audio"},t.coalesceStream.numberOfTracks++,t.audioSegmentStream=new i(r),t.adtsStream.pipe(t.audioSegmentStream).pipe(t.coalesceStream))}),t.coalesceStream.on("data",this.trigger.bind(this,"data")),t.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var o={};this.transmuxPipeline_=o,o.type="ts",o.metadataStream=new y.MetadataStream,o.packetStream=new y.TransportPacketStream,o.parseStream=new y.TransportParseStream,o.elementaryStream=new y.ElementaryStream,o.videoTimestampRolloverStream=new y.TimestampRolloverStream("video"),o.audioTimestampRolloverStream=new y.TimestampRolloverStream("audio"),o.timedMetadataTimestampRolloverStream=new y.TimestampRolloverStream("timed-metadata"),o.adtsStream=new m,o.h264Stream=new v,o.captionStream=new y.CaptionStream,o.coalesceStream=new a(e,o.metadataStream),o.headOfPipeline=o.packetStream,o.packetStream.pipe(o.parseStream).pipe(o.elementaryStream),o.elementaryStream.pipe(o.videoTimestampRolloverStream).pipe(o.h264Stream),o.elementaryStream.pipe(o.audioTimestampRolloverStream).pipe(o.adtsStream),o.elementaryStream.pipe(o.timedMetadataTimestampRolloverStream).pipe(o.metadataStream).pipe(o.coalesceStream),o.h264Stream.pipe(o.captionStream).pipe(o.coalesceStream),o.elementaryStream.on("data",function(e){var a;if("metadata"===e.type){for(a=e.tracks.length;a--;)t||"video"!==e.tracks[a].type?r||"audio"!==e.tracks[a].type||((r=e.tracks[a]).timelineStartInfo.baseMediaDecodeTime=u.baseMediaDecodeTime):(t=e.tracks[a]).timelineStartInfo.baseMediaDecodeTime=u.baseMediaDecodeTime;t&&!o.videoSegmentStream&&(o.coalesceStream.numberOfTracks++,o.videoSegmentStream=new n(t),o.videoSegmentStream.on("timelineStartInfo",function(e){r&&(r.timelineStartInfo=e,o.audioSegmentStream.setEarliestDts(e.dts))}),o.h264Stream.pipe(o.videoSegmentStream).pipe(o.coalesceStream)),r&&!o.audioSegmentStream&&(o.coalesceStream.numberOfTracks++,o.audioSegmentStream=new i(r),o.adtsStream.pipe(o.audioSegmentStream).pipe(o.coalesceStream))}}),o.coalesceStream.on("data",this.trigger.bind(this,"data")),o.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(e){var n=this.transmuxPipeline_;this.baseMediaDecodeTime=e,r&&(r.timelineStartInfo.dts=void 0,r.timelineStartInfo.pts=void 0,l(r),r.timelineStartInfo.baseMediaDecodeTime=e),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,l(t),t.timelineStartInfo.baseMediaDecodeTime=e)},this.push=function(e){if(c){var t=s(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),c=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){c=!0,this.transmuxPipeline_.headOfPipeline.flush()}}).prototype=new p,t.exports={Transmuxer:o,VideoSegmentStream:n,AudioSegmentStream:i,AUDIO_PROPERTIES:_,VIDEO_PROPERTIES:b}},{"../aac":33,"../codecs/adts.js":35,"../codecs/h264":36,"../m2ts/m2ts.js":42,"../utils/stream.js":53,"./mp4-generator.js":48}],51:[function(e,t,r){"use strict";var n=e("../m2ts/stream-types.js"),i=e("../m2ts/timestamp-rollover-stream.js").handleRollover,o={};o.ts=e("../m2ts/probe.js"),o.aac=e("../aac/probe.js");var a=function(e,t,r){for(var n,i,a,s,u=0,l=188,c=!1;l=0;)if(71!==e[u]||71!==e[l])u--,l--;else{switch(n=e.subarray(u,l),o.ts.parseType(n,t.pid)){case"pes":i=o.ts.parsePesType(n,t.table),a=o.ts.parsePayloadUnitStartIndicator(n),"audio"===i&&a&&((s=o.ts.parsePesTime(n)).type="audio",r.audio.push(s),c=!0)}if(c)break;u-=188,l-=188}},s=function(e,t,r){for(var n,i,a,s,u,l,c,d=0,f=188,p=!1,h={data:[],size:0};f=0;)if(71!==e[d]||71!==e[f])d--,f--;else{switch(n=e.subarray(d,f),o.ts.parseType(n,t.pid)){case"pes":i=o.ts.parsePesType(n,t.table),a=o.ts.parsePayloadUnitStartIndicator(n),"video"===i&&a&&((s=o.ts.parsePesTime(n)).type="video",r.video.push(s),p=!0)}if(p)break;d-=188,f-=188}},u=function(e){var t={pid:null,table:null},r={};!function(e,t){for(var r,n=0,i=188;i=3;){switch(o.aac.parseType(e,u)){case"timed-metadata":if(e.length-u<10){r=!0;break}if((s=o.aac.parseId3TagSize(e,u))>e.length){r=!0;break}null===a&&(t=e.subarray(u,u+s),a=o.aac.parseAacTimestamp(t)),u+=s;break;case"audio":if(e.length-u<7){r=!0;break}if((s=o.aac.parseAdtsSize(e,u))>e.length){r=!0;break}null===i&&(t=e.subarray(u,u+s),i=o.aac.parseSampleRate(t)),n++,u+=s;break;default:u++}if(r)return null}if(null===i||null===a)return null;var l=9e4/i;return{audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*n*l,pts:a+1024*n*l}]}}(e):u(e))&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var r=t;void 0===r&&(r=e.audio[0].dts),e.audio.forEach(function(e){e.dts=i(e.dts,r),e.pts=i(e.pts,r),e.dtsTime=e.dts/9e4,e.ptsTime=e.pts/9e4})}if(e.video&&e.video.length){var n=t;if(void 0===n&&(n=e.video[0].dts),e.video.forEach(function(e){e.dts=i(e.dts,n),e.pts=i(e.pts,n),e.dtsTime=e.dts/9e4,e.ptsTime=e.pts/9e4}),e.firstKeyFrame){var o=e.firstKeyFrame;o.dts=i(o.dts,n),o.pts=i(o.pts,n),o.dtsTime=o.dts/9e4,o.ptsTime=o.dts/9e4}}}(n,t),n):null}}},{"../aac/probe.js":34,"../m2ts/probe.js":44,"../m2ts/stream-types.js":45,"../m2ts/timestamp-rollover-stream.js":46}],52:[function(e,t,r){"use strict";var n;n=function(e){var t=e.byteLength,r=0,n=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+n},this.loadWord=function(){var i=e.byteLength-t,o=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");o.set(e.subarray(i,i+a)),r=new DataView(o.buffer).getUint32(0),n=8*a,t-=a},this.skipBits=function(e){var i;n>e?(r<<=e,n-=e):(e-=n,e-=8*(i=Math.floor(e/8)),t-=i,this.loadWord(),r<<=e,n-=e)},this.readBits=function(e){var i=Math.min(n,e),o=r>>>32-i;return(n-=i)>0?r<<=i:t>0&&this.loadWord(),(i=e-i)>0?o<>>e))return r<<=e,n-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()},t.exports=n},{}],53:[function(e,t,r){"use strict";var n=function(){this.init=function(){var e={};this.on=function(t,r){e[t]||(e[t]=[]),e[t]=e[t].concat(r)},this.off=function(t,r){var n;return!!e[t]&&(n=e[t].indexOf(r),e[t]=e[t].slice(),e[t].splice(n,1),n>-1)},this.trigger=function(t){var r,n,i,o;if(r=e[t])if(2===arguments.length)for(i=r.length,n=0;n-1;s=n+r)r=/^\/(?:\.\.\/)*/.exec(a.slice(n))[0].length,o=(o+a.substring(s,n)).replace(new RegExp("(?:\\/+[^\\/]*){0,"+(r-1)/3+"}$"),"/");return o+a.substr(s)}};"object"==typeof r&&"object"==typeof t?t.exports=n:"object"==typeof r?r.URLToolkit=n:e.URLToolkit=n}(this)},{}],55:[function(e,t,r){(function(n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function i(e){return e&&e.__esModule?e:{default:e}}var o=i(e("global/window")),a=i("undefined"!=typeof window?window.videojs:void 0!==n?n.videojs:null),s=function(e){return isNaN(e)||Math.abs(e)===1/0?Number.MAX_VALUE:e};r.default={addTextTrackData:function(e,t,r){var n=o.default.WebKitDataCue||o.default.VTTCue;if(t&&t.forEach(function(e){this.inbandTextTrack_.addCue(new n(e.startTime+this.timestampOffset,e.endTime+this.timestampOffset,e.text))},e),r){var i=s(e.mediaSource_.duration);if(r.forEach(function(e){var t=e.cueTime+this.timestampOffset;e.frames.forEach(function(e){var r=new n(t,t,e.value||e.url||e.data||"");r.frame=e,r.value=e,i=r,Object.defineProperties(i.frame,{id:{get:function(){return a.default.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),i.value.key}},value:{get:function(){return a.default.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),i.value.data}},privateData:{get:function(){return a.default.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),i.value.data}}});var i;this.metadataTrack_.addCue(r)},this)},e),e.metadataTrack_&&e.metadataTrack_.cues&&e.metadataTrack_.cues.length){for(var u=e.metadataTrack_.cues,l=[],c=0;c1){var n=r[0].replace(/"/g,"").trim(),i=r[1].replace(/"/g,"").trim();t.parameters[n]=i}}),t},isVideoCodec:function(e){return/avc1\.[\da-f]+/i.test(e)},translateLegacyCodecs:function(e){return e.map(function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,function(e,t,r){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(r).toString(16)).slice(-2)})})}},t.exports=r.default},{}],58:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./cleanup-text-tracks");r.default=function(e,t,r){var i=t.player_;r.captions&&r.captions.length&&!e.inbandTextTrack_&&((0,n.removeExistingTrack)(i,"captions","cc1"),e.inbandTextTrack_=i.addRemoteTextTrack({kind:"captions",label:"cc1"},!1).track),r.metadata&&r.metadata.length&&!e.metadataTrack_&&((0,n.removeExistingTrack)(i,"metadata","Timed Metadata",!0),e.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=r.metadata.dispatchType)},t.exports=r.default},{"./cleanup-text-tracks":56}],59:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.default={TIME_BETWEEN_CHUNKS:4,BYTES_PER_CHUNK:4096},t.exports=r.default},{}],60:[function(e,t,r){(function(n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r=0&&(this.timestampOffset_=e,this.segmentParser_=new l.default.Transmuxer,this.segmentParser_.on("data",this.receiveBuffer_.bind(this)),this.mediaSource_.swfObj.vjs_discontinuity(),this.basePtsOffset_=NaN)}}),Object.defineProperty(this,"buffered",{get:function(){if(!(this.mediaSource_&&this.mediaSource_.swfObj&&"vjs_getProperty"in this.mediaSource_.swfObj))return u.default.createTimeRange();var e=this.mediaSource_.swfObj.vjs_getProperty("buffered");return e&&e.length&&(e[0][0]=y(e[0][0],3),e[0][1]=y(e[0][1],3)),u.default.createTimeRanges(e)}}),this.mediaSource_.player_.on("seeked",function(){(0,c.default)(0,1/0,r.metadataTrack_),(0,c.default)(0,1/0,r.inbandTextTrack_)})}return i(t,[{key:"appendBuffer",value:function(e){var t=this,r=void 0,n=0;if(this.updating)throw(r=new Error("SourceBuffer.append() cannot be called while an update is in progress")).name="InvalidStateError",r.code=11,r;this.updating=!0,this.mediaSource_.readyState="open",this.trigger({type:"update"});!function r(){t.segmentParser_.push(e.subarray(n,n+524288)),(n+=524288)'+o+""),0!==this.bufferSize_?h(this.processBuffer_.bind(this)):(this.updating=!1,this.trigger({type:"updateend"}))}else!1!==this.updating&&(this.updating=!1,this.trigger({type:"updateend"}))}},{key:"convertTagsToData_",value:function(e){var t=0,r=this.mediaSource_.tech_,n=0,i=void 0,o=[],a=[],s=e.tags.videoTags,u=e.tags.audioTags;if(isNaN(this.basePtsOffset_)&&(s.length||u.length)){var l=s[0]||{pts:1/0},c=u[0]||{pts:1/0};this.basePtsOffset_=Math.min(c.pts,l.pts)}r.buffered().length&&(n=r.buffered().end(0)-this.timestampOffset),r.seeking()&&(n=Math.max(n,r.currentTime()-this.timestampOffset)),n*=1e3,n+=this.basePtsOffset_;for(var d=0;d=n&&o.push(u[d]);for(var f=0;f=n)a.push(p);else if(p.keyFrame){for(var h=f+1,y=!1;h=n)break;if(m.keyFrame){y=!0;break}h++}if(y)f=h;else for(;fthis.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))&&(this.nativeMediaSource_.duration=t)}},{key:"addSourceBuffer",value:function(e){var t=void 0,r=(0,f.parseContentType)(e);if(/^(video|audio)\/mp2t$/i.test(r.type)){var n=[];r.parameters&&r.parameters.codecs&&(n=r.parameters.codecs.split(","),n=(n=(0,f.translateLegacyCodecs)(n)).filter(function(e){return(0,f.isAudioCodec)(e)||(0,f.isVideoCodec)(e)})),0===n.length&&(n=["avc1.4d400d","mp4a.40.2"]),t=new c.default(this,n),0!==this.sourceBuffers.length&&(this.sourceBuffers[0].createRealSourceBuffers_(),t.createRealSourceBuffers_(),this.sourceBuffers[0].audioDisabled_=!0)}else t=this.nativeMediaSource_.addSourceBuffer(e);return this.sourceBuffers.push(t),t}}]),t}();r.default=h,t.exports=r.default}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./add-text-track-data":55,"./cleanup-text-tracks":56,"./codec-utils":57,"./virtual-source-buffer":66,"global/document":26,"global/window":27}],63:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.default=function(e,t,r){var n=void 0,i=void 0;if(r&&r.cues)for(n=r.cues.length;n--;)(i=r.cues[n]).startTime<=t&&i.endTime>=e&&r.removeCue(i)},t.exports=r.default},{}],64:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r=0&&(this.timestampOffset_=e,this.appendAudioInitSegment_=!0,this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e}))}}),Object.defineProperty(this,"appendWindowStart",{get:function(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart},set:function(e){this.videoBuffer_&&(this.videoBuffer_.appendWindowStart=e),this.audioBuffer_&&(this.audioBuffer_.appendWindowStart=e)}}),Object.defineProperty(this,"updating",{get:function(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating)}}),Object.defineProperty(this,"buffered",{get:function(){var e=null,t=null,r=0,n=[],i=[];if(!this.videoBuffer_&&!this.audioBuffer_)return s.default.createTimeRange();if(!this.videoBuffer_)return this.audioBuffer_.buffered;if(!this.audioBuffer_)return this.videoBuffer_.buffered;if(this.audioDisabled_)return this.videoBuffer_.buffered;if(0===this.videoBuffer_.buffered.length&&0===this.audioBuffer_.buffered.length)return s.default.createTimeRange();for(var o=this.videoBuffer_.buffered,a=this.audioBuffer_.buffered,u=o.length;u--;)n.push({time:o.start(u),type:"start"}),n.push({time:o.end(u),type:"end"});for(u=a.length;u--;)n.push({time:a.start(u),type:"start"}),n.push({time:a.end(u),type:"end"});for(n.sort(function(e,t){return e.time-t.time}),u=0;u=49}return!0};var E=h.default.getComponent("Component"),O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,E);function t(e,r,n){var o=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,r),r.options_&&r.options_.playerId){var s=(0,h.default)(r.options_.playerId);s.hasOwnProperty("hls")||Object.defineProperty(s,"hls",{get:function(){return h.default.log.warn("player.hls is deprecated. Use player.tech_.hls instead."),o}})}this.tech_=r,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.options_=h.default.mergeOptions(h.default.options.hls||{},n.hls),this.setOptions_(),this.on(a.default,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(e){var t=a.default.fullscreenElement||a.default.webkitFullscreenElement||a.default.mozFullScreenElement||a.default.msFullscreenElement;t&&t.contains(o.tech_.el())&&o.masterPlaylistController_.fastQualityChange_()}),this.on(this.tech_,"seeking",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()}),this.audioTrackChange_=function(){o.masterPlaylistController_.setupAudio()},this.on(this.tech_,"play",this.play)}return n(t,[{key:"setOptions_",value:function(){var e=this;this.options_.withCredentials=this.options_.withCredentials||!1,"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=4194304),["withCredentials","bandwidth"].forEach(function(t){void 0!==e.source_[t]&&(e.options_[t]=e.source_[t])}),this.bandwidth=this.options_.bandwidth}},{key:"src",value:function(e){var t=this;e&&(this.setOptions_(),this.options_.url=this.source_.src,this.options_.tech=this.tech_,this.options_.externHls=T,this.masterPlaylistController_=new y.MasterPlaylistController(this.options_),this.playbackWatcher_=new _.default(h.default.mergeOptions(this.options_,{seekable:function(){return t.seekable()}})),this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):T.STANDARD_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e=1/(this.bandwidth||1),t=void 0;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set:function(){h.default.log.error('The "systemBandwidth" property is read-only')}}}),Object.defineProperties(this.stats,{bandwidth:{get:function(){return t.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return t.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return t.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return t.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return t.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.masterPlaylistController_.on("sourceopen",function(){t.tech_.audioTracks().addEventListener("change",t.audioTrackChange_)}),this.masterPlaylistController_.on("selectedinitialmedia",function(){(0,v.default)(t)}),this.masterPlaylistController_.on("audioupdate",function(){t.tech_.clearTracks("audio"),t.masterPlaylistController_.activeAudioGroup().forEach(function(e){t.tech_.audioTracks().addTrack(e)})}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&this.tech_.src(h.default.URL.createObjectURL(this.masterPlaylistController_.mediaSource)))}},{key:"setupQualityLevels_",value:function(){var e=this,t=h.default.players[this.tech_.options_.playerId];t&&t.qualityLevels&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){t=e.qualityLevels_,(r=e).representations().forEach(function(e){t.addQualityLevel(e)}),S(t,r.playlists);var t,r}),this.playlists.on("mediachange",function(){S(e.qualityLevels_,e.playlists)}))}},{key:"activeAudioGroup_",value:function(){return this.masterPlaylistController_.activeAudioGroup()}},{key:"play",value:function(){this.masterPlaylistController_.play()}},{key:"setCurrentTime",value:function(e){this.masterPlaylistController_.setCurrentTime(e)}},{key:"duration",value:function(){return this.masterPlaylistController_.duration()}},{key:"seekable",value:function(){return this.masterPlaylistController_.seekable()}},{key:"dispose",value:function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_.audioTracks().removeEventListener("change",this.audioTrackChange_),i(Object.getPrototypeOf(t.prototype),"dispose",this).call(this)}}]),t}(),C=function e(t){return{canHandleSource:function(r){return(!h.default.options.hls||!h.default.options.hls.mode||h.default.options.hls.mode===t)&&e.canPlayType(r.type)},handleSource:function(e,r,n){"flash"===t&&r.setTimeout(function(){r.trigger("loadstart")},1);var i=h.default.mergeOptions(n,{hls:{mode:t}});return r.hls=new O(e,r,i),r.hls.xhr=(0,l.default)(),h.default.Hls.xhr.beforeRequest&&(r.hls.xhr.beforeRequest=h.default.Hls.xhr.beforeRequest),r.hls.src(e.src),r.hls},canPlayType:function(t){return e.canPlayType(t)?"maybe":""}}};T.comparePlaylistBandwidth=function(e,t){var r=void 0,n=void 0;return e.attributes&&e.attributes.BANDWIDTH&&(r=e.attributes.BANDWIDTH),r=r||g.default.Number.MAX_VALUE,t.attributes&&t.attributes.BANDWIDTH&&(n=t.attributes.BANDWIDTH),r-(n=n||g.default.Number.MAX_VALUE)},T.comparePlaylistResolution=function(e,t){var r=void 0,n=void 0;return e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(r=e.attributes.RESOLUTION.width),r=r||g.default.Number.MAX_VALUE,t.attributes&&t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(n=t.attributes.RESOLUTION.width),r===(n=n||g.default.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:r-n},C.canPlayType=function(e){return!(!h.default.options.hls.overrideNative&&T.supportsNativeHls)&&/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i.test(e)},void 0!==h.default.MediaSource&&void 0!==h.default.URL||(h.default.MediaSource=f.MediaSource,h.default.URL=f.URL),f.MediaSource.supportsNativeMediaSources()&&h.default.getComponent("Html5").registerSourceHandler(C("html5"),0),g.default.Uint8Array&&h.default.getComponent("Flash").registerSourceHandler(C("flash")),h.default.HlsHandler=O,h.default.HlsSourceHandler=C,h.default.Hls=T,h.default.m3u8=p.default,h.default.registerComponent("Hls",T),h.default.options.hls=h.default.options.hls||{},h.default.plugin("reloadSourceOnError",b.default),t.exports={Hls:T,HlsHandler:O,HlsSourceHandler:C}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./bin-utils":2,"./config":3,"./master-playlist-controller":4,"./playback-watcher":5,"./playlist":7,"./playlist-loader":6,"./reload-source-on-error":9,"./rendition-mixin":10,"./xhr":16,"aes-decrypter":20,"global/document":26,"global/window":27,"m3u8-parser":28,"videojs-contrib-media-sources":65}]},{},[68])(68)}),function(e,t){"function"==typeof define&&define.amd?define("videojs-hotkeys",["video.js"],function(e){return t(e.default||e)}):"undefined"!=typeof module&&module.exports?module.exports=t(require("video.js")):t(videojs)}(0,function(e){"use strict";"undefined"!=typeof window&&(window.videojs_hotkeys={version:"0.2.20"});(e.registerPlugin||e.plugin)("hotkeys",function(t){var r=this,n=r.el(),i=document,o={volumeStep:.1,seekStep:5,enableMute:!0,enableVolumeScroll:!0,enableFullscreen:!0,enableNumbers:!0,enableJogStyle:!1,alwaysCaptureHotkeys:!1,enableModifiersForNumbers:!0,enableInactiveFocus:!0,skipInitialFocus:!1,playPauseKey:function(e){return 32===e.which||179===e.which},rewindKey:function(e){return 37===e.which||177===e.which},forwardKey:function(e){return 39===e.which||176===e.which},volumeUpKey:function(e){return 38===e.which},volumeDownKey:function(e){return 40===e.which},muteKey:function(e){return 77===e.which},fullscreenKey:function(e){return 70===e.which},customKeys:{}},a=e.mergeOptions||e.util.mergeOptions,s=(t=a(o,t||{})).volumeStep,u=t.seekStep,l=t.enableMute,c=t.enableVolumeScroll,d=t.enableFullscreen,f=t.enableNumbers,p=t.enableJogStyle,h=t.alwaysCaptureHotkeys,y=t.enableModifiersForNumbers,m=t.enableInactiveFocus,v=t.skipInitialFocus;n.hasAttribute("tabIndex")||n.setAttribute("tabIndex","-1"),n.style.outline="none",!h&&r.autoplay()||v||r.one("play",function(){n.focus()}),m&&r.on("userinactive",function(){var e=function(){clearTimeout(t)},t=setTimeout(function(){r.off("useractive",e),i.activeElement.parentElement==n.querySelector(".vjs-control-bar")&&n.focus()},10);r.one("useractive",e)}),r.on("play",function(){var e=n.querySelector(".iframeblocker");e&&""===e.style.display&&(e.style.display="block",e.style.bottom="39px")});var g=function(e){if(r.controls()){var t=e.relatedTarget||e.toElement||i.activeElement;if((h||t==n||t==n.querySelector(".vjs-tech")||t==n.querySelector(".iframeblocker")||t==n.querySelector(".vjs-control-bar"))&&c){e=window.event||e;var o=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail));e.preventDefault(),1==o?r.volume(r.volume()+s):-1==o&&r.volume(r.volume()-s)}}},_=function(e,r){return t.playPauseKey(e,r)?1:t.rewindKey(e,r)?2:t.forwardKey(e,r)?3:t.volumeUpKey(e,r)?4:t.volumeDownKey(e,r)?5:t.muteKey(e,r)?6:t.fullscreenKey(e,r)?7:void 0};return r.on("keydown",function(e){var o,a,c=e.which,m=e.preventDefault,v=r.duration();if(r.controls()){var g=i.activeElement;if(h||g==n||g==n.querySelector(".vjs-tech")||g==n.querySelector(".vjs-control-bar")||g==n.querySelector(".iframeblocker"))switch(_(e,r)){case 1:m(),h&&e.stopPropagation(),r.paused()?r.play():r.pause();break;case 2:o=!r.paused(),m(),o&&r.pause(),a=r.currentTime()-u,r.currentTime()<=u&&(a=0),r.currentTime(a),o&&r.play();break;case 3:o=!r.paused(),m(),o&&r.pause(),(a=r.currentTime()+u)>=v&&(a=o?v-.001:v),r.currentTime(a),o&&r.play();break;case 5:m(),p?(a=r.currentTime()-1,r.currentTime()<=1&&(a=0),r.currentTime(a)):r.volume(r.volume()-s);break;case 4:m(),p?((a=r.currentTime()+1)>=v&&(a=v),r.currentTime(a)):r.volume(r.volume()+s);break;case 6:l&&r.muted(!r.muted());break;case 7:d&&(r.isFullscreen()?r.exitFullscreen():r.requestFullscreen());break;default:if((c>47&&c<59||c>95&&c<106)&&(y||!(e.metaKey||e.ctrlKey||e.altKey))&&f){var b=48;c>95&&(b=96);var T=c-b;m(),r.currentTime(r.duration()*T*.1)}for(var w in t.customKeys){var S=t.customKeys[w];S&&S.key&&S.handler&&S.key(e)&&(m(),S.handler(r,t,e))}}}}),r.on("dblclick",function(e){if(r.controls()){var t=e.relatedTarget||e.toElement||i.activeElement;t!=n&&t!=n.querySelector(".vjs-tech")&&t!=n.querySelector(".iframeblocker")||d&&(r.isFullscreen()?r.exitFullscreen():r.requestFullscreen())}}),r.on("mousewheel",g),r.on("DOMMouseScroll",g),this})});