What to expect from Trump’s State of the Union address

Polls show Trump’s approval rating among women is almost twice as low as the three previous presidents one year into their presidency [File: Reuters]

United States President Donald Trump impressed a lot of people when he addressed Congress for the first time in February 2017.

His speech to lawmakers was measured, bipartisan and considered by many people to be a success.

It was a contrast to his inauguration remarks just a month before, which were criticised for their partisan, angry tone decrying things like, “the crime and gangs and drugs that have stolen too many lives” and included this memorable, and controversial, line about the state of the country: “This American carnage stops right here and stops right now.”

Play VideoPlayMute0:00/0:00Loaded: 0%Progress: 0%Stream TypeLIVE0:00Playback Rate1xChaptersChaptersDescriptionsdescriptions off, selectedSubtitlesundefined settings, opens undefined settings dialogcaptions and subtitles off, selectedAudio TrackFullscreen

This is a modal window.sddfsdffhdBeginning of dialog window. Escape will cancel and close the window.

TextColorWhiteBlackRedGreenBlueYellowMagentaCyanTransparencyOpaqueSemi-TransparentBackgroundColorBlackWhiteRedGreenBlueYellowMagentaCyanTransparencyOpaqueSemi-TransparentTransparentWindowColorBlackWhiteRedGreenBlueYellowMagentaCyanTransparencyTransparentSemi-TransparentOpaqueFont Size50%75%100%125%150%175%200%300%400%Text Edge StyleNoneRaisedDepressedUniformDropshadowFont FamilyProportional Sans-SerifMonospace Sans-SerifProportional SerifMonospace SerifCasualScriptSmall CapsReset restore all settings to the default valuesDoneClose Modal Dialog

End of dialog window.

(function(p){p.mark&&p.mark(‘bcParseStart’)})(window.performance||{}) (function(a,b){var c=undefined;var d=a.define;var e=b.querySelector(“.bc-iframe”);var f=-1;var g=function(){var a;if(e){return””}if(typeof d===”function”&&d.amd){return require.toUrl(“bc”)}else if(b.currentScript){return b.currentScript.src}a=b.getElementsByTagName(“script”);return a.length&&a[a.length-1].src||””}();var h=g&&g.split(“/”).slice(0,-1).join(“/”)||”.”;var i=”665003303001″;var j;var k=”default”;var l=”BkyLdqdhZ”;var m=function(a,b,c){var d=(a.cssRules||[]).length;try{a.insertRule(b+” { “+c+” } “,d)}catch(e){}};var n=function(){var b=a.navigator.userAgent.match(/applewebkit\/(\d*).*Version\/(\d*.\d*)/i);return p.browser.IS_ANDROID&&p.browser.ANDROID_VERSION<5&&b&&b[2]>0};var o=a.videojs;a.VIDEOJS_NO_DYNAMIC_STYLE=true;(function(a,b){typeof exports===”object”&&typeof module!==”undefined”?module.exports=b():typeof c===”function”&&c.amd?c(b):a.videojs=b()})(this,function(){var c=”6.6.1″;var d=typeof a!==”undefined”?a:typeof global!==”undefined”?global:typeof self!==”undefined”?self:{};function e(a,b){return b={exports:{}},a(b,b.exports),b.exports}var f;if(typeof a!==”undefined”){f=a}else if(typeof d!==”undefined”){f=d}else if(typeof self!==”undefined”){f=self}else{f={}}var g=f;var h={};var i=(Object.freeze||Object)({“default”:h});var j=i&&h||i;var k=typeof d!==”undefined”?d:typeof a!==”undefined”?a:{};var l;if(typeof b!==”undefined”){l=b}else{l=k[“__GLOBAL_DOCUMENT_CACHE@4”];if(!l){l=k[“__GLOBAL_DOCUMENT_CACHE@4″]=j}}var m=l;var n=g.navigator&&g.navigator.userAgent||””;var o=/AppleWebKit\/([\d.]+)/i.exec(n);var p=o?parseFloat(o.pop()):null;var q=/iPad/i.test(n);var r=/iPhone/i.test(n)&&!q;var s=/iPod/i.test(n);var t=r||q||s;var u=function(){var a=n.match(/OS (\d+)_/i);if(a&&a[1]){return a[1]}return null}();var v=/Android/i.test(n);var w=function(){var a=n.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!a){return null}var b=a[1]&&parseFloat(a[1]);var c=a[2]&&parseFloat(a[2]);if(b&&c){return parseFloat(a[1]+”.”+a[2])}else if(b){return b}return null}();var x=v&&/webkit/i.test(n)&&w<2.3;var y=v&&w<5&&p<537;var z=/Firefox/i.test(n);var A=/Edge/i.test(n);var B=!A&&/Chrome/i.test(n);var C=function(){var a=n.match(/Chrome\/(\d+)/);if(a&&a[1]){return parseFloat(a[1])}return null}();var D=/MSIE\s8\.0/.test(n);var E=function(){var a=/MSIE\s(\d+)\.\d/.exec(n);var b=a&&parseFloat(a[1]);if(!b&&/Trident\/7.0/i.test(n)&&/rv:11.0/.test(n)){b=11}return b}();var F=/Safari/i.test(n)&&!B&&!v&&!A;var G=F||t;var H=ga()&&(“ontouchstart”in g||g.DocumentTouch&&g.document instanceof g.DocumentTouch);var I=ga()&&”backgroundSize”in g.document.createElement(“video”).style;var J=(Object.freeze||Object)({IS_IPAD:q,IS_IPHONE:r,IS_IPOD:s,IS_IOS:t,IOS_VERSION:u,IS_ANDROID:v,ANDROID_VERSION:w,IS_OLD_ANDROID:x,IS_NATIVE_ANDROID:y,IS_FIREFOX:z,IS_EDGE:A,IS_CHROME:B,CHROME_VERSION:C,IS_IE8:D,IE_VERSION:E,IS_SAFARI:F,IS_ANY_SAFARI:G,TOUCH_ENABLED:H,BACKGROUND_SIZE_SUPPORTED:I});var K=typeof Symbol===”function”&&typeof Symbol.iterator===”symbol”?function(a){return typeof a}:function(a){return a&&typeof Symbol===”function”&&a.constructor===Symbol&&a!==Symbol.prototype?”symbol”:typeof a};var L=function(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}};var M=function(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b};var N=function(a,b){if(!a){throw new ReferenceError(“this hasn’t been initialised – super() hasn’t been called”)}return b&&(typeof b===”object”||typeof b===”function”)?b:a};var O=function(a,b){a.raw=b;return a};var P=Object.prototype.toString;var Q=function df(a){return U(a)?Object.keys(a):[]};function R(a,b){Q(a).forEach(function(c){return b(a[c],c)})}function S(a,b){var c=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;return Q(a).reduce(function(c,d){return b(c,a[d],d)},c)}function T(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++){c[d-1]=arguments[d]}if(Object.assign){return Object.assign.apply(Object,[a].concat(c))}c.forEach(function(b){if(!b){return}R(b,function(b,c){a[c]=b})});return a}function U(a){return!!a&&(typeof a===”undefined”?”undefined”:K(a))===”object”}function V(a){return U(a)&&P.call(a)===”[object Object]”&&a.constructor===Object}var W=void 0;var X=”info”;var Y=[];var Z=function ef(a,b){var c=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!!E&&E<11;var d=W.levels[X];var e=new RegExp(“^(“+d+”)$”);if(a!==”log”){b.unshift(a.toUpperCase()+”:”)}if(Y){Y.push([].concat(b))}b.unshift(“VIDEOJS:”);if(!g.console){return}var f=g.console[a];if(!f&&a===”debug”){f=g.console.info||g.console.log}if(!f||!d||!e.test(a)){return}if(c){b=b.map(function(a){if(U(a)||Array.isArray(a)){try{return JSON.stringify(a)}catch(b){return String(a)}}return String(a)}).join(” “)}if(!f.apply){f(b)}else{f[Array.isArray(b)?”apply”:”call”](g.console,b)}};W=function ff(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++){b[c]=arguments[c]}Z(“log”,b)};W.levels={all:”debug|log|warn|error”,off:””,debug:”debug|log|warn|error”,info:”log|warn|error”,warn:”warn|error”,error:”error”,DEFAULT:X};W.level=function(a){if(typeof a===”string”){if(!W.levels.hasOwnProperty(a)){throw new Error(‘”‘+a+'” in not a valid log level’)}X=a}return X};W.history=function(){return Y?[].concat(Y):[]};W.history.clear=function(){if(Y){Y.length=0}};W.history.disable=function(){if(Y!==null){Y.length=0;Y=null}};W.history.enable=function(){if(Y===null){Y=[]}};W.error=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++){b[c]=arguments[c]}return Z(“error”,b)};W.warn=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++){b[c]=arguments[c]}return Z(“warn”,b)};W.debug=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++){b[c]=arguments[c]}return Z(“debug”,b)};var $=W;function _(a){return a.replace(/\n\r?\s*/g,””)}var aa=function gf(a){var b=””,c=0;for(;c<arguments.length;c++)b+=_(a[c])+(arguments[c+1]||””);return b};function ba(a,b){if(!a||!b){return””}if(typeof g.getComputedStyle===”function”){var c=g.getComputedStyle(a);return c?c[b]:””}return a.currentStyle[b]||””}var ca=O([“Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set “,” to “,”.”],[“Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set “,” to “,”.”]);function da(a){return typeof a===”string”&&/\S/.test(a)}function ea(a){if(/\s/.test(a)){throw new Error(“class has illegal whitespace characters”)}}function fa(a){return new RegExp(“(^|\\s)”+a+”($|\\s)”)}function ga(){return m===g.document&&typeof m.createElement!==”undefined”}function ha(a){return U(a)&&a.nodeType===1}function ia(){try{return g.parent!==g.self}catch(a){return true}}function ja(a){return function(b,c){if(!da(b)){return m[a](null)}if(da(c)){c=m.querySelector(c)}var d=ha(c)?c:m;return d[a]&&d[a](b)}}function ka(){var a=arguments.length>0&&arguments[0]!==undefined?arguments[0]:”div”;var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var c=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var d=arguments[3];var e=m.createElement(a);Object.getOwnPropertyNames(b).forEach(function(a){var c=b[a];if(a.indexOf(“aria-“)!==-1||a===”role”||a===”type”){$.warn(aa(ca,a,c));e.setAttribute(a,c)}else if(a===”textContent”){la(e,c)}else{e[a]=c}});Object.getOwnPropertyNames(c).forEach(function(a){e.setAttribute(a,c[a])});if(d){Ea(e,d)}return e}function la(a,b){if(typeof a.textContent===”undefined”){a.innerText=b}else{a.textContent=b}return a}function ma(a,b){if(b.firstChild){b.insertBefore(a,b.firstChild)}else{b.appendChild(a)}}function na(a,b){ea(b);if(a.classList){return a.classList.contains(b)}return fa(b).test(a.className)}function oa(a,b){if(a.classList){a.classList.add(b)}else if(!na(a,b)){a.className=(a.className+” “+b).trim()}return a}function pa(a,b){if(a.classList){a.classList.remove(b)}else{ea(b);a.className=a.className.split(/\s+/).filter(function(a){return a!==b}).join(” “)}return a}function qa(a,b,c){var d=na(a,b);if(typeof c===”function”){c=c(a,b)}if(typeof c!==”boolean”){c=!d}if(c===d){return}if(c){oa(a,b)}else{pa(a,b)}return a}function ra(a,b){Object.getOwnPropertyNames(b).forEach(function(c){var d=b[c];if(d===null||typeof d===”undefined”||d===false){a.removeAttribute(c)}else{a.setAttribute(c,d===true?””:d)}})}function sa(a){var b={};var c=”,”+”autoplay,controls,playsinline,loop,muted,default,defaultMuted”+”,”;if(a&&a.attributes&&a.attributes.length>0){var d=a.attributes;for(var e=d.length-1;e>=0;e–){var f=d[e].name;var g=d[e].value;if(typeof a[f]===”boolean”||c.indexOf(“,”+f+”,”)!==-1){g=g!==null?true:false}b[f]=g}}return b}function ta(a,b){return a.getAttribute(b)}function ua(a,b,c){a.setAttribute(b,c)}function va(a,b){a.removeAttribute(b)}function wa(){m.body.focus();m.onselectstart=function(){return false}}function xa(){m.onselectstart=function(){return true}}function ya(a){if(a&&a.getBoundingClientRect&&a.parentNode){var b=a.getBoundingClientRect();var c={};[“bottom”,”height”,”left”,”right”,”top”,”width”].forEach(function(a){if(b[a]!==undefined){c[a]=b[a]}});if(!c.height){c.height=parseFloat(ba(a,”height”))}if(!c.width){c.width=parseFloat(ba(a,”width”))}return c}}function za(a){var b=void 0;if(a.getBoundingClientRect&&a.parentNode){b=a.getBoundingClientRect()}if(!b){return{left:0,top:0}}var c=m.documentElement;var d=m.body;var e=c.clientLeft||d.clientLeft||0;var f=g.pageXOffset||d.scrollLeft;var h=b.left+f-e;var i=c.clientTop||d.clientTop||0;var j=g.pageYOffset||d.scrollTop;var k=b.top+j-i;return{left:Math.round(h),top:Math.round(k)}}function Aa(a,b){var c={};var d=za(a);var e=a.offsetWidth;var f=a.offsetHeight;var g=d.top;var h=d.left;var i=b.pageY;var j=b.pageX;if(b.changedTouches){j=b.changedTouches[0].pageX;i=b.changedTouches[0].pageY}c.y=Math.max(0,Math.min(1,(g-i+f)/f));c.x=Math.max(0,Math.min(1,(j-h)/e));return c}function Ba(a){return U(a)&&a.nodeType===3}function Ca(a){while(a.firstChild){a.removeChild(a.firstChild)}return a}function Da(a){if(typeof a===”function”){a=a()}return(Array.isArray(a)?a:[a]).map(function(a){if(typeof a===”function”){a=a()}if(ha(a)||Ba(a)){return a}if(typeof a===”string”&&/\S/.test(a)){return m.createTextNode(a)}}).filter(function(a){return a})}function Ea(a,b){Da(b).forEach(function(b){return a.appendChild(b)});return a}function Fa(a,b){return Ea(Ca(a),b)}function Ga(a){if(a.button===undefined&&a.buttons===undefined){return true}if(a.button===0&&a.buttons===undefined){return true}if(E===9){return true}if(a.button!==0||a.buttons!==1){return false}return true}var Ha=ja(“querySelector”);var Ia=ja(“querySelectorAll”);var Ja=(Object.freeze||Object)({isReal:ga,isEl:ha,isInFrame:ia,createEl:ka,textContent:la,prependTo:ma,hasClass:na,addClass:oa,removeClass:pa,toggleClass:qa,setAttributes:ra,getAttributes:sa,getAttribute:ta,setAttribute:ua,removeAttribute:va,blockTextSelection:wa,unblockTextSelection:xa,getBoundingClientRect:ya,findPosition:za,getPointerPosition:Aa,isTextNode:Ba,emptyEl:Ca,normalizeContent:Da,appendContent:Ea,insertContent:Fa,isSingleLeftClick:Ga,$:Ha,$$:Ia});var Ka=1;function La(){return Ka++}var Ma={};var Na=”vdata”+(new Date).getTime();function Oa(a){var b=a[Na];if(!b){b=a[Na]=La()}if(!Ma[b]){Ma[b]={}}return Ma[b]}function Pa(a){var b=a[Na];if(!b){return false}return!!Object.getOwnPropertyNames(Ma[b]).length}function Qa(a){var b=a[Na];if(!b){return}delete Ma[b];try{delete a[Na]}catch(c){if(a.removeAttribute){a.removeAttribute(Na)}else{a[Na]=null}}}function Ra(a,b){var c=Oa(a);if(c.handlers[b].length===0){delete c.handlers[b];if(a.removeEventListener){a.removeEventListener(b,c.dispatcher,false)}else if(a.detachEvent){a.detachEvent(“on”+b,c.dispatcher)}}if(Object.getOwnPropertyNames(c.handlers).length<=0){delete c.handlers;delete c.dispatcher;delete c.disabled}if(Object.getOwnPropertyNames(c).length===0){Qa(a)}}function Sa(a,b,c,d){c.forEach(function(c){a(b,c,d)})}function Ta(a){function b(){return true}function c(){return false}if(!a||!a.isPropagationStopped){var d=a||g.event;a={};for(var e in d){if(e!==”layerX”&&e!==”layerY”&&e!==”keyLocation”&&e!==”webkitMovementX”&&e!==”webkitMovementY”){if(!(e===”returnValue”&&d.preventDefault)){a[e]=d[e]}}}if(!a.target){a.target=a.srcElement||m}if(!a.relatedTarget){a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement}a.preventDefault=function(){if(d.preventDefault){d.preventDefault()}a.returnValue=false;d.returnValue=false;a.defaultPrevented=true};a.defaultPrevented=false;a.stopPropagation=function(){if(d.stopPropagation){d.stopPropagation()}a.cancelBubble=true;d.cancelBubble=true;a.isPropagationStopped=b};a.isPropagationStopped=c;a.stopImmediatePropagation=function(){if(d.stopImmediatePropagation){d.stopImmediatePropagation()}a.isImmediatePropagationStopped=b;a.stopPropagation()};a.isImmediatePropagationStopped=c;if(a.clientX!==null&&a.clientX!==undefined){var f=m.documentElement;var h=m.body;a.pageX=a.clientX+(f&&f.scrollLeft||h&&h.scrollLeft||0)-(f&&f.clientLeft||h&&h.clientLeft||0);a.pageY=a.clientY+(f&&f.scrollTop||h&&h.scrollTop||0)-(f&&f.clientTop||h&&h.clientTop||0)}a.which=a.charCode||a.keyCode;if(a.button!==null&&a.button!==undefined){a.button=a.button&1?0:a.button&4?1:a.button&2?2:0}}return a}var Ua=false;(function(){try{var a=Object.defineProperty({},”passive”,{get:function c(){Ua=true}});g.addEventListener(“test”,null,a);g.removeEventListener(“test”,null,a)}catch(b){}})();var Va=[“touchstart”,”touchmove”];function Wa(a,b,c){if(Array.isArray(b)){return Sa(Wa,a,b,c)}var d=Oa(a);if(!d.handlers){d.handlers={}}if(!d.handlers[b]){d.handlers[b]=[]}if(!c.guid){c.guid=La()}d.handlers[b].push(c);if(!d.dispatcher){d.disabled=false;d.dispatcher=function(b,c){if(d.disabled){return}b=Ta(b);var e=d.handlers[b.type];if(e){var f=e.slice(0);for(var g=0,h=f.length;g<h;g++){if(b.isImmediatePropagationStopped()){break}else{try{f[g].call(a,b,c)}catch(i){$.error(i)}}}}}}if(d.handlers[b].length===1){if(a.addEventListener){var e=false;if(Ua&&Va.indexOf(b)>-1){e={passive:true}}a.addEventListener(b,d.dispatcher,e)}else if(a.attachEvent){a.attachEvent(“on”+b,d.dispatcher)}}}function Xa(a,b,c){if(!Pa(a)){return}var d=Oa(a);if(!d.handlers){return}if(Array.isArray(b)){return Sa(Xa,a,b,c)}var e=function i(a,b){d.handlers[b]=[];Ra(a,b)};if(b===undefined){for(var f in d.handlers){if(Object.prototype.hasOwnProperty.call(d.handlers||{},f)){e(a,f)}}return}var g=d.handlers[b];if(!g){return}if(!c){e(a,b);return}if(c.guid){for(var h=0;h<g.length;h++){if(g[h].guid===c.guid){g.splice(h–,1)}}}Ra(a,b)}function Ya(a,b,c){var d=Pa(a)?Oa(a):{};var e=a.parentNode||a.ownerDocument;if(typeof b===”string”){b={type:b,target:a}}b=Ta(b);if(d.dispatcher){d.dispatcher.call(a,b,c)}if(e&&!b.isPropagationStopped()&&b.bubbles===true){Ya.call(null,e,b,c)}else if(!e&&!b.defaultPrevented){var f=Oa(b.target);if(b.target[b.type]){f.disabled=true;if(typeof b.target[b.type]===”function”){b.target[b.type]()}f.disabled=false}}return!b.defaultPrevented}function Za(a,b,c){if(Array.isArray(b)){return Sa(Za,a,b,c)}var d=function e(){Xa(a,b,e);c.apply(this,arguments)};d.guid=c.guid=c.guid||La();Wa(a,b,d)}var $a=(Object.freeze||Object)({fixEvent:Ta,on:Wa,off:Xa,trigger:Ya,one:Za});var _a=false;var ab=void 0;var bb=function hf(){if(!ga()){return}var a=m.getElementsByTagName(“video”);var b=m.getElementsByTagName(“audio”);var c=m.getElementsByTagName(“video-js”);var d=[];if(a&&a.length>0){for(var e=0,f=a.length;e<f;e++){d.push(a[e])}}if(b&&b.length>0){for(var g=0,h=b.length;g<h;g++){d.push(b[g])}}if(c&&c.length>0){for(var i=0,j=c.length;i<j;i++){d.push(c[i])}}if(d&&d.length>0){for(var k=0,l=d.length;k<l;k++){var n=d[k];if(n&&n.getAttribute){if(n.player===undefined){var o=n.getAttribute(“data-setup”);if(o!==null){ab(n)}}}else{cb(1);break}}}else if(!_a){cb(1)}};function cb(a,b){if(b){ab=b}g.setTimeout(bb,a)}if(ga()&&m.readyState===”complete”){_a=true}else{Za(g,”load”,function(){_a=true})}var db=function jf(a){var b=m.createElement(“style”);b.className=a;return b};var eb=function kf(a,b){if(a.styleSheet){a.styleSheet.cssText=b}else{a.textContent=b}};var fb=function lf(a,b,c){if(!b.guid){b.guid=La()}var d=function e(){return b.apply(a,arguments)};d.guid=c?c+”_”+b.guid:b.guid;return d};var gb=function mf(a,b){var c=Date.now();var d=function e(){var d=Date.now();if(d-c>=b){a.apply(undefined,arguments);c=d}};return d};var hb=function nf(){};hb.prototype.allowedEvents_={};hb.prototype.on=function(a,b){var c=this.addEventListener;this.addEventListener=function(){};Wa(this,a,b);this.addEventListener=c};hb.prototype.addEventListener=hb.prototype.on;hb.prototype.off=function(a,b){Xa(this,a,b)};hb.prototype.removeEventListener=hb.prototype.off;hb.prototype.one=function(a,b){var c=this.addEventListener;this.addEventListener=function(){};Za(this,a,b);this.addEventListener=c};hb.prototype.trigger=function(a){var b=a.type||a;if(typeof a===”string”){a={type:b}}a=Ta(a);if(this.allowedEvents_[b]&&this[“on”+b]){this[“on”+b](a)}Ya(this,a)};hb.prototype.dispatchEvent=hb.prototype.trigger;var ib=function of(a){return a instanceof hb||!!a.eventBusEl_&&[“on”,”one”,”off”,”trigger”].every(function(b){return typeof a[b]===”function”})};var jb=function pf(a){return typeof a===”string”&&/\S/.test(a)||Array.isArray(a)&&!!a.length};var kb=function qf(a){if(!a.nodeName&&!ib(a)){throw new Error(“Invalid target; must be a DOM node or evented object.”)}};var lb=function rf(a){if(!jb(a)){throw new Error(“Invalid event type; must be a non-empty string or array.”)}};var mb=function sf(a){if(typeof a!==”function”){throw new Error(“Invalid listener; must be a function.”)}};var nb=function tf(a,b){var c=b.length<3||b[0]===a||b[0]===a.eventBusEl_;var d=void 0;var e=void 0;var f=void 0;if(c){d=a.eventBusEl_;if(b.length>=3){b.shift()}e=b[0];f=b[1]}else{d=b[0];e=b[1];f=b[2]}kb(d);lb(e);mb(f);f=fb(a,f);return{isTargetingSelf:c,target:d,type:e,listener:f}};var ob=function uf(a,b,c,d){kb(a);if(a.nodeName){$a[b](a,c,d)}else{a[b](c,d)}};var pb={on:function vf(){var a=this;for(var b=arguments.length,c=Array(b),d=0;d<b;d++){c[d]=arguments[d]}var e=nb(this,c),f=e.isTargetingSelf,g=e.target,h=e.type,i=e.listener;ob(g,”on”,h,i);if(!f){var j=function l(){return a.off(g,h,i)};j.guid=i.guid;var k=function m(){return a.off(“dispose”,j)};k.guid=i.guid;ob(this,”on”,”dispose”,j);ob(g,”on”,”dispose”,k)}},one:function wf(){var a=this;for(var b=arguments.length,c=Array(b),d=0;d<b;d++){c[d]=arguments[d]}var e=nb(this,c),f=e.isTargetingSelf,g=e.target,h=e.type,i=e.listener;if(f){ob(g,”one”,h,i)}else{var j=function k(){for(var b=arguments.length,c=Array(b),d=0;d<b;d++){c[d]=arguments[d]}a.off(g,h,k);i.apply(null,c)};j.guid=i.guid;ob(g,”one”,h,j)}},off:function xf(a,b,c){if(!a||jb(a)){Xa(this.eventBusEl_,a,b)}else{var d=a;var e=b;kb(d);lb(e);mb(c);c=fb(this,c);this.off(“dispose”,c);if(d.nodeName){Xa(d,e,c);Xa(d,”dispose”,c)}else if(ib(d)){d.off(e,c);d.off(“dispose”,c)}}},trigger:function yf(a,b){return Ya(this.eventBusEl_,a,b)}};function qb(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var c=b.eventBusKey;if(c){if(!a[c].nodeName){throw new Error(‘The eventBusKey “‘+c+'” does not refer to an element.’)}a.eventBusEl_=a[c]}else{a.eventBusEl_=ka(“span”,{className:”vjs-event-bus”})}T(a,pb);a.on(“dispose”,function(){a.off();g.setTimeout(function(){a.eventBusEl_=null},0)});return a}var rb={state:{},setState:function zf(a){var b=this;if(typeof a===”function”){a=a()}var c=void 0;R(a,function(a,d){if(b.state[d]!==a){c=c||{};c[d]={from:b.state[d],to:a}}b.state[d]=a});if(c&&ib(this)){this.trigger({changes:c,type:”statechanged”})}return c}};function sb(a,b){T(a,rb);a.state=T({},a.state,b);if(typeof a.handleStateChanged===”function”&&ib(a)){a.on(“statechanged”,a.handleStateChanged)}return a}function tb(a){if(typeof a!==”string”){return a}return a.charAt(0).toUpperCase()+a.slice(1)}function ub(a,b){return tb(a)===tb(b)}function vb(){var a={};for(var b=arguments.length,c=Array(b),d=0;d<b;d++){c[d]=arguments[d]}c.forEach(function(b){if(!b){return}R(b,function(b,c){if(!V(b)){a[c]=b;return}if(!V(a[c])){a[c]={}}a[c]=vb(a[c],b)})});return a}var wb=function(){function a(b,c,d){L(this,a);if(!b&&this.play){this.player_=b=this}else{this.player_=b}this.options_=vb({},this.options_);c=this.options_=vb(this.options_,c);this.id_=c.id||c.el&&c.el.id;if(!this.id_){var e=b&&b.id&&b.id()||”no_player”;this.id_=e+”_component_”+La()}this.name_=c.name||null;if(c.el){this.el_=c.el}else if(c.createEl!==false){this.el_=this.createEl()}if(c.evented!==false){qb(this,{eventBusKey:this.el_?”el_”:null})}sb(this,this.constructor.defaultState);this.children_=[];this.childIndex_={};this.childNameIndex_={};if(c.initChildren!==false){this.initChildren()}this.ready(d);if(c.reportTouchActivity!==false){this.enableTouchActivity()}}a.prototype.dispose=function b(){this.trigger({type:”dispose”,bubbles:false});if(this.children_){for(var a=this.children_.length-1;a>=0;a–){if(this.children_[a].dispose){this.children_[a].dispose()}}}this.children_=null;this.childIndex_=null;this.childNameIndex_=null;if(this.el_){if(this.el_.parentNode){this.el_.parentNode.removeChild(this.el_)}Qa(this.el_);this.el_=null}this.player_=null};a.prototype.player=function c(){return this.player_};a.prototype.options=function d(a){$.warn(“this.options() has been deprecated and will be moved to the constructor in 6.0”);if(!a){return this.options_}this.options_=vb(this.options_,a);return this.options_};a.prototype.el=function e(){return this.el_};a.prototype.createEl=function f(a,b,c){return ka(a,b,c)};a.prototype.localize=function h(a,b){var c=arguments.length>2&&arguments[2]!==undefined?arguments[2]:a;var d=this.player_.language&&this.player_.language();var e=this.player_.languages&&this.player_.languages();var f=e&&e[d];var g=d&&d.split(“-“)[0];var h=e&&e[g];var i=c;if(f&&f[a]){i=f[a]}else if(h&&h[a]){i=h[a]}if(b){i=i.replace(/\{(\d+)\}/g,function(a,c){var d=b[c-1];var e=d;if(typeof d===”undefined”){e=a}return e})}return i};a.prototype.contentEl=function i(){return this.contentEl_||this.el_};a.prototype.id=function j(){return this.id_};a.prototype.name=function k(){return this.name_};a.prototype.children=function l(){return this.children_};a.prototype.getChildById=function m(a){return this.childIndex_[a]};a.prototype.getChild=function n(a){if(!a){return}a=tb(a);return this.childNameIndex_[a]};a.prototype.addChild=function o(b){var c=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var d=arguments.length>2&&arguments[2]!==undefined?arguments[2]:this.children_.length;var e=void 0;var f=void 0;if(typeof b===”string”){f=tb(b);var g=c.componentClass||f;c.name=f;var h=a.getComponent(g);if(!h){throw new Error(“Component “+g+” does not exist”)}if(typeof h!==”function”){return null}e=new h(this.player_||this,c)}else{e=b}this.children_.splice(d,0,e);if(typeof e.id===”function”){this.childIndex_[e.id()]=e}f=f||e.name&&tb(e.name());if(f){this.childNameIndex_[f]=e}if(typeof e.el===”function”&&e.el()){var i=this.contentEl().children;var j=i[d]||null;this.contentEl().insertBefore(e.el(),j)}return e};a.prototype.removeChild=function p(a){if(typeof a===”string”){a=this.getChild(a)}if(!a||!this.children_){return}var b=false;for(var c=this.children_.length-1;c>=0;c–){if(this.children_[c]===a){b=true;this.children_.splice(c,1);break}}if(!b){return}this.childIndex_[a.id()]=null;this.childNameIndex_[a.name()]=null;var d=a.el();if(d&&d.parentNode===this.contentEl()){this.contentEl().removeChild(a.el())}};a.prototype.initChildren=function q(){var b=this;var c=this.options_.children;if(c){var d=this.options_;var e=function h(a){var c=a.name;var e=a.opts;if(d[c]!==undefined){e=d[c]}if(e===false){return}if(e===true){e={}}e.playerOptions=b.options_.playerOptions;var f=b.addChild(c,e);if(f){b[c]=f}};var f=void 0;var g=a.getComponent(“Tech”);if(Array.isArray(c)){f=c}else{f=Object.keys(c)}f.concat(Object.keys(this.options_).filter(function(a){return!f.some(function(b){if(typeof b===”string”){return a===b}return a===b.name})})).map(function(a){var d=void 0;var e=void 0;if(typeof a===”string”){d=a;e=c[d]||b.options_[d]||{}}else{d=a.name;e=a}return{name:d,opts:e}}).filter(function(b){var c=a.getComponent(b.opts.componentClass||tb(b.name));return c&&!g.isTech(c)}).forEach(e)}};a.prototype.buildCSSClass=function r(){return””};a.prototype.ready=function s(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(!a){return}if(!this.isReady_){this.readyQueue_=this.readyQueue_||[];this.readyQueue_.push(a);return}if(b){a.call(this)}else{this.setTimeout(a,1)}};a.prototype.triggerReady=function t(){this.isReady_=true;this.setTimeout(function(){var a=this.readyQueue_;this.readyQueue_=[];if(a&&a.length>0){a.forEach(function(a){a.call(this)},this)}this.trigger(“ready”)},1)};a.prototype.$=function u(a,b){return Ha(a,b||this.contentEl())};a.prototype.$$=function v(a,b){return Ia(a,b||this.contentEl())};a.prototype.hasClass=function w(a){return na(this.el_,a)};a.prototype.addClass=function x(a){oa(this.el_,a)};a.prototype.removeClass=function y(a){pa(this.el_,a)};a.prototype.toggleClass=function z(a,b){qa(this.el_,a,b)};a.prototype.show=function A(){this.removeClass(“vjs-hidden”)};a.prototype.hide=function B(){this.addClass(“vjs-hidden”)};a.prototype.lockShowing=function C(){this.addClass(“vjs-lock-showing”)};a.prototype.unlockShowing=function D(){this.removeClass(“vjs-lock-showing”)};a.prototype.getAttribute=function E(a){return ta(this.el_,a)};a.prototype.setAttribute=function F(a,b){ua(this.el_,a,b)};a.prototype.removeAttribute=function G(a){va(this.el_,a)};a.prototype.width=function H(a,b){return this.dimension(“width”,a,b)};a.prototype.height=function I(a,b){return this.dimension(“height”,a,b)};a.prototype.dimensions=function J(a,b){this.width(a,true);this.height(b)};a.prototype.dimension=function K(a,b,c){if(b!==undefined){if(b===null||b!==b){b=0}if((“”+b).indexOf(“%”)!==-1||(“”+b).indexOf(“px”)!==-1){this.el_.style[a]=b}else if(b===”auto”){this.el_.style[a]=””}else{this.el_.style[a]=b+”px”}if(!c){this.trigger(“componentresize”)}return}if(!this.el_){return 0}var d=this.el_.style[a];var e=d.indexOf(“px”);if(e!==-1){return parseInt(d.slice(0,e),10)}return parseInt(this.el_[“offset”+tb(a)],10)};a.prototype.currentDimension=function M(a){var b=0;if(a!==”width”&&a!==”height”){throw new Error(“currentDimension only accepts width or height value”)}if(typeof g.getComputedStyle===”function”){var c=g.getComputedStyle(this.el_);b=c.getPropertyValue(a)||c[a]}b=parseFloat(b);if(b===0){var d=”offset”+tb(a);b=this.el_[d]}return b};a.prototype.currentDimensions=function N(){return{width:this.currentDimension(“width”),height:this.currentDimension(“height”)}};a.prototype.currentWidth=function O(){return this.currentDimension(“width”)};a.prototype.currentHeight=function P(){return this.currentDimension(“height”)};a.prototype.focus=function Q(){this.el_.focus()};a.prototype.blur=function R(){this.el_.blur()};a.prototype.emitTapEvents=function S(){var a=0;var b=null;var c=10;var d=200;var e=void 0;this.on(“touchstart”,function(c){if(c.touches.length===1){b={pageX:c.touches[0].pageX,pageY:c.touches[0].pageY};a=(new Date).getTime();e=true}});this.on(“touchmove”,function(a){if(a.touches.length>1){e=false}else if(b){var d=a.touches[0].pageX-b.pageX;var f=a.touches[0].pageY-b.pageY;var g=Math.sqrt(d*d+f*f);if(g>c){e=false}}});var f=function g(){e=false};this.on(“touchleave”,f);this.on(“touchcancel”,f);this.on(“touchend”,function(c){b=null;if(e===true){var f=(new Date).getTime()-a;if(f<d){c.preventDefault();this.trigger(“tap”)}}})};a.prototype.enableTouchActivity=function T(){if(!this.player()||!this.player().reportUserActivity){return}var a=fb(this.player(),this.player().reportUserActivity);var b=void 0;this.on(“touchstart”,function(){a();this.clearInterval(b);b=this.setInterval(a,250)});var c=function d(c){a();this.clearInterval(b)};this.on(“touchmove”,a);this.on(“touchend”,c);this.on(“touchcancel”,c)};a.prototype.setTimeout=function U(a,b){var c=this;a=fb(this,a);var d=g.setTimeout(a,b);var e=function f(){return c.clearTimeout(d)};e.guid=”vjs-timeout-“+d;this.on(“dispose”,e);return d};a.prototype.clearTimeout=function V(a){g.clearTimeout(a);var b=function c(){};b.guid=”vjs-timeout-“+a;this.off(“dispose”,b);return a};a.prototype.setInterval=function W(a,b){var c=this;a=fb(this,a);var d=g.setInterval(a,b);var e=function f(){return c.clearInterval(d)};e.guid=”vjs-interval-“+d;this.on(“dispose”,e);return d};a.prototype.clearInterval=function X(a){g.clearInterval(a);var b=function c(){};b.guid=”vjs-interval-“+a;this.off(“dispose”,b);return a};a.prototype.requestAnimationFrame=function Y(a){var b=this;if(this.supportsRaf_){a=fb(this,a);var c=g.requestAnimationFrame(a);var d=function e(){return b.cancelAnimationFrame(c)};d.guid=”vjs-raf-“+c;this.on(“dispose”,d);return c}return this.setTimeout(a,1e3/60)};a.prototype.cancelAnimationFrame=function Z(a){if(this.supportsRaf_){g.cancelAnimationFrame(a);var b=function c(){};b.guid=”vjs-raf-“+a;this.off(“dispose”,b);return a}return this.clearTimeout(a)};a.registerComponent=function _(b,c){if(typeof b!==”string”||!b){throw new Error(‘Illegal component name, “‘+b+'”; must be a non-empty string.’)}var d=a.getComponent(“Tech”);var e=d&&d.isTech(c);var f=a===c||a.prototype.isPrototypeOf(c.prototype);if(e||!f){var g=void 0;if(e){g=”techs must be registered using Tech.registerTech()”}else{g=”must be a Component subclass”}throw new Error(‘Illegal component, “‘+b+'”; ‘+g+”.”)}b=tb(b);if(!a.components_){a.components_={}}var h=a.getComponent(“Player”);if(b===”Player”&&h&&h.players){var i=h.players;var j=Object.keys(i);if(i&&j.length>0&&j.map(function(a){return i[a]}).every(Boolean)){throw new Error(“Can not register Player component after player has been created.”)}}a.components_[b]=c;return c};a.getComponent=function aa(b){if(!b){return}b=tb(b);if(a.components_&&a.components_[b]){return a.components_[b]}};return a}();wb.prototype.supportsRaf_=typeof g.requestAnimationFrame===”function”&&typeof g.cancelAnimationFrame===”function”;wb.registerComponent(“Component”,wb);function xb(a,b,c){if(typeof b!==”number”||b<0||b>c){throw new Error(“Failed to execute ‘”+a+”‘ on ‘TimeRanges’: The index provided (“+b+”) is non-numeric or out of bounds (0-“+c+”).”)}}function yb(a,b,c,d){xb(a,d,c.length-1);return c[d][b]}function zb(a){if(a===undefined||a.length===0){return{length:0,start:function b(){throw new Error(“This TimeRanges object is empty”)},end:function c(){throw new Error(“This TimeRanges object is empty”)}}}return{length:a.length,start:yb.bind(null,”start”,0,a),end:yb.bind(null,”end”,1,a)}}function Ab(a,b){if(Array.isArray(a)){return zb(a)}else if(a===undefined||b===undefined){return zb()}return zb([[a,b]])}function Bb(a,b){var c=0;var d=void 0;var e=void 0;if(!b){return 0}if(!a||!a.length){a=Ab(0,0)}for(var f=0;f<a.length;f++){d=a.start(f);e=a.end(f);if(e>b){e=b}c+=e-d}return c/b}var Cb={};var Db=[[“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”]];var Eb=Db[0];var Fb=void 0;for(var Gb=0;Gb<Db.length;Gb++){if(Db[Gb][1]in m){Fb=Db[Gb];break}} if(Fb){for(var Hb=0;Hb<Fb.length;Hb++){Cb[Eb[Hb]]=Fb[Hb]}}function Ib(a){if(a instanceof Ib){return a}if(typeof a===”number”){this.code=a}else if(typeof a===”string”){this.message=a}else if(U(a)){if(typeof a.code===”number”){this.code=a.code}T(this,a)}if(!this.message){this.message=Ib.defaultMessages[this.code]||””}}Ib.prototype.code=0;Ib.prototype.message=””;Ib.prototype.status=null;Ib.errorTypes=[“MEDIA_ERR_CUSTOM”,”MEDIA_ERR_ABORTED”,”MEDIA_ERR_NETWORK”,”MEDIA_ERR_DECODE”,”MEDIA_ERR_SRC_NOT_SUPPORTED”,”MEDIA_ERR_ENCRYPTED”];Ib.defaultMessages={1:”You aborted the media playback”,2:”A network error caused the media download to fail part-way.”,3:”The media playback was aborted due to a corruption problem or because the media used features your browser did not support.”,4:”The media could not be loaded, either because the server or network failed or because the format is not supported.”,5:”The media is encrypted and we do not have the keys to decrypt it.”};for(var Jb=0;Jb<Ib.errorTypes.length;Jb++){Ib[Ib.errorTypes[Jb]]=Jb;Ib.prototype[Ib.errorTypes[Jb]]=Jb}var Kb=Lb;function Lb(a,b){var c;var d=null;try{c=JSON.parse(a,b)}catch(e){d=e}return[d,c]}function Mb(a){return a!==undefined&&typeof a.then===”function”}function Nb(a){if(Mb(a)){a.then(null,function(a){})}}var Ob=function Af(a){var b=[“kind”,”label”,”language”,”id”,”inBandMetadataTrackDispatchType”,”mode”,”src”].reduce(function(b,c,d){if(a[c]){b[c]=a[c]}return b},{cues:a.cues&&Array.prototype.map.call(a.cues,function(a){return{startTime:a.startTime,endTime:a.endTime,text:a.text,id:a.id}})});return b};var Pb=function Bf(a){var b=a.$$(“track”);var c=Array.prototype.map.call(b,function(a){return a.track});var d=Array.prototype.map.call(b,function(a){var b=Ob(a.track);if(a.src){b.src=a.src}return b});return d.concat(Array.prototype.filter.call(a.textTracks(),function(a){return c.indexOf(a)===-1}).map(Ob))};var Qb=function Cf(a,b){a.forEach(function(a){var c=b.addRemoteTextTrack(a).track;if(!a.src&&a.cues){a.cues.forEach(function(a){return c.addCue(a)})}});return b.textTracks()};var Rb={textTracksToJson:Pb,jsonToTextTracks:Qb,trackToJson_:Ob};var Sb=”vjs-modal-dialog”;var Tb=27;var Ub=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.opened_=e.hasBeenOpened_=e.hasBeenFilled_=false;e.closeable(!e.options_.uncloseable);e.content(e.options_.content);e.contentEl_=ka(“div”,{className:Sb+”-content”},{role:”document”});e.descEl_=ka(“p”,{className:Sb+”-description vjs-control-text”,id:e.el().getAttribute(“aria-describedby”)});la(e.descEl_,e.description());e.el_.appendChild(e.descEl_);e.el_.appendChild(e.contentEl_);return e}b.prototype.createEl=function c(){return a.prototype.createEl.call(this,”div”,{className:this.buildCSSClass(),tabIndex:-1},{“aria-describedby”:this.id()+”_description”,”aria-hidden”:”true”,”aria-label”:this.label(),role:”dialog”})};b.prototype.dispose=function d(){this.contentEl_=null;this.descEl_=null;this.previouslyActiveEl_=null;a.prototype.dispose.call(this)};b.prototype.buildCSSClass=function e(){return Sb+” vjs-hidden “+a.prototype.buildCSSClass.call(this)};b.prototype.handleKeyPress=function f(a){if(a.which===Tb&&this.closeable()){this.close()}};b.prototype.label=function h(){return this.localize(this.options_.label||”Modal Window”)};b.prototype.description=function i(){var a=this.options_.description||this.localize(“This is a modal window.”);if(this.closeable()){a+=” “+this.localize(“This modal can be closed by pressing the Escape key or activating the close button.”)}return a};b.prototype.open=function j(){if(!this.opened_){var a=this.player();this.trigger(“beforemodalopen”);this.opened_=true;if(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_){this.fill()}this.wasPlaying_=!a.paused();if(this.options_.pauseOnOpen&&this.wasPlaying_){a.pause()}if(this.closeable()){this.on(this.el_.ownerDocument,”keydown”,fb(this,this.handleKeyPress))}this.hadControls_=a.controls();a.controls(false);this.show();this.conditionalFocus_();this.el().setAttribute(“aria-hidden”,”false”);this.trigger(“modalopen”);this.hasBeenOpened_=true}};b.prototype.opened=function k(a){if(typeof a===”boolean”){this[a?”open”:”close”]()}return this.opened_};b.prototype.close=function l(){if(!this.opened_){return}var a=this.player();this.trigger(“beforemodalclose”);this.opened_=false;if(this.wasPlaying_&&this.options_.pauseOnOpen){a.play()}if(this.closeable()){this.off(this.el_.ownerDocument,”keydown”,fb(this,this.handleKeyPress))}if(this.hadControls_){a.controls(true)}this.hide();this.el().setAttribute(“aria-hidden”,”true”);this.trigger(“modalclose”);this.conditionalBlur_();if(this.options_.temporary){this.dispose()}};b.prototype.closeable=function n(a){if(typeof a===”boolean”){var n=this.closeable_=!!a;var b=this.getChild(“closeButton”);if(n&&!b){var c=this.contentEl_;this.contentEl_=this.el_;b=this.addChild(“closeButton”,{controlText:”Close Modal Dialog”});this.contentEl_=c;this.on(b,”close”,this.close)}if(!n&&b){this.off(b,”close”,this.close);this.removeChild(b);b.dispose()}}return this.closeable_};b.prototype.fill=function o(){this.fillWith(this.content())};b.prototype.fillWith=function p(a){var b=this.contentEl();var c=b.parentNode;var d=b.nextSibling;this.trigger(“beforemodalfill”);this.hasBeenFilled_=true;c.removeChild(b);this.empty();Fa(b,a);this.trigger(“modalfill”);if(d){c.insertBefore(b,d)}else{c.appendChild(b)}var e=this.getChild(“closeButton”);if(e){c.appendChild(e.el_)}};b.prototype.empty=function q(){this.trigger(“beforemodalempty”);Ca(this.contentEl());this.trigger(“modalempty”)};b.prototype.content=function r(a){if(typeof a!==”undefined”){this.content_=a}return this.content_};b.prototype.conditionalFocus_=function s(){var a=m.activeElement;var b=this.player_.el_;this.previouslyActiveEl_=null;if(b.contains(a)||b===a){this.previouslyActiveEl_=a;this.focus();this.on(m,”keydown”,this.handleKeyDown)}};b.prototype.conditionalBlur_=function t(){if(this.previouslyActiveEl_){this.previouslyActiveEl_.focus();this.previouslyActiveEl_=null}this.off(m,”keydown”,this.handleKeyDown)};b.prototype.handleKeyDown=function u(a){if(a.which!==9){return}var b=this.focusableEls_();var c=this.el_.querySelector(“:focus”);var d=void 0;for(var e=0;e<b.length;e++){if(c===b[e]){d=e;break}}if(m.activeElement===this.el_){d=0}if(a.shiftKey&&d===0){b[b.length-1].focus();a.preventDefault()}else if(!a.shiftKey&&d===b.length-1){b[0].focus();a.preventDefault()}};b.prototype.focusableEls_=function v(){var a=this.el_.querySelectorAll(“*”);return Array.prototype.filter.call(a,function(a){return(a instanceof g.HTMLAnchorElement||a instanceof g.HTMLAreaElement)&&a.hasAttribute(“href”)||(a instanceof g.HTMLInputElement||a instanceof g.HTMLSelectElement||a instanceof g.HTMLTextAreaElement||a instanceof g.HTMLButtonElement)&&!a.hasAttribute(“disabled”)||a instanceof g.HTMLIFrameElement||a instanceof g.HTMLObjectElement||a instanceof g.HTMLEmbedElement||a.hasAttribute(“tabindex”)&&a.getAttribute(“tabindex”)!==-1||a.hasAttribute(“contenteditable”)})};return b}(wb);Ub.prototype.options_={pauseOnOpen:true,temporary:true};wb.registerComponent(“ModalDialog”,Ub);var Vb=function(a){M(b,a);function b(){var c=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];var d;var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;L(this,b);var f=N(this,a.call(this));if(!e){e=f;if(D){e=m.createElement(“custom”);for(var g in b.prototype){if(g!==”constructor”){e[g]=b.prototype[g]}}}}e.tracks_=[];Object.defineProperty(e,”length”,{get:function i(){return this.tracks_.length}});for(var h=0;h<c.length;h++){e.addTrack(c[h])}return d=e,N(f,d)}b.prototype.addTrack=function c(a){var b=this.tracks_.length;if(!(“”+b in this)){Object.defineProperty(this,b,{get:function c(){return this.tracks_[b]}})}if(this.tracks_.indexOf(a)===-1){this.tracks_.push(a);this.trigger({track:a,type:”addtrack”})}};b.prototype.removeTrack=function d(a){var b=void 0;for(var c=0,d=this.length;c<d;c++){if(this[c]===a){b=this[c];if(b.off){b.off()}this.tracks_.splice(c,1);break}}if(!b){return}this.trigger({track:b,type:”removetrack”})};b.prototype.getTrackById=function e(a){var b=null;for(var c=0,d=this.length;c<d;c++){var e=this[c];if(e.id===a){b=e;break}}return b};return b}(hb);Vb.prototype.allowedEvents_={change:”change”,addtrack:”addtrack”,removetrack:”removetrack”};for(var Wb in Vb.prototype.allowedEvents_){Vb.prototype[“on”+Wb]=null}var Xb=function Df(a,b){for(var c=0;c<a.length;c++){if(!Object.keys(a[c]).length||b.id===a[c].id){continue}a[c].enabled=false}};var Yb=function(a){M(b,a);function b(){var c,d;var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];L(this,b);var f=void 0;for(var g=e.length-1;g>=0;g–){if(e[g].enabled){Xb(e,e[g]);break}}if(D){f=m.createElement(“custom”);for(var h in Vb.prototype){if(h!==”constructor”){f[h]=Vb.prototype[h]}}for(var i in b.prototype){if(i!==”constructor”){f[i]=b.prototype[i]}}}f=(c=N(this,a.call(this,e,f)),c);f.changing_=false;return d=f,N(c,d)}b.prototype.addTrack=function c(b){var c=this;if(b.enabled){Xb(this,b)}a.prototype.addTrack.call(this,b);if(!b.addEventListener){return}b.addEventListener(“enabledchange”,function(){if(c.changing_){return}c.changing_=true;Xb(c,b);c.changing_=false;c.trigger(“change”)})};return b}(Vb);var Zb=function Ef(a,b){for(var c=0;c<a.length;c++){if(!Object.keys(a[c]).length||b.id===a[c].id){continue}a[c].selected=false}};var $b=function(a){M(b,a);function b(){var c,d;var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];L(this,b);var f=void 0;for(var g=e.length-1;g>=0;g–){if(e[g].selected){Zb(e,e[g]);break}}if(D){f=m.createElement(“custom”);for(var h in Vb.prototype){if(h!==”constructor”){f[h]=Vb.prototype[h]}}for(var i in b.prototype){if(i!==”constructor”){f[i]=b.prototype[i]}}}f=(c=N(this,a.call(this,e,f)),c);f.changing_=false;Object.defineProperty(f,”selectedIndex”,{get:function j(){for(var a=0;a<this.length;a++){if(this[a].selected){return a}}return-1},set:function k(){}});return d=f,N(c,d)}b.prototype.addTrack=function c(b){var c=this;if(b.selected){Zb(this,b)}a.prototype.addTrack.call(this,b);if(!b.addEventListener){return}b.addEventListener(“selectedchange”,function(){if(c.changing_){return}c.changing_=true;Zb(c,b);c.changing_=false;c.trigger(“change”)})};return b}(Vb);var _b=function(a){M(b,a);function b(){var c,d;var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];L(this,b);var f=void 0;if(D){f=m.createElement(“custom”);for(var g in Vb.prototype){if(g!==”constructor”){f[g]=Vb.prototype[g]}}for(var h in b.prototype){if(h!==”constructor”){f[h]=b.prototype[h]}}}f=(c=N(this,a.call(this,e,f)),c);return d=f,N(c,d)}b.prototype.addTrack=function c(b){a.prototype.addTrack.call(this,b);b.addEventListener(“modechange”,fb(this,function(){this.trigger(“change”)}));var c=[“metadata”,”chapters”];if(c.indexOf(b.kind)===-1){b.addEventListener(“modechange”,fb(this,function(){this.trigger(“selectedlanguagechange”)}))}};return b}(Vb);var ac=function(){function a(){var b=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];L(this,a);var c=this;if(D){c=m.createElement(“custom”);for(var d in a.prototype){if(d!==”constructor”){c[d]=a.prototype[d]}}}c.trackElements_=[];Object.defineProperty(c,”length”,{get:function g(){return this.trackElements_.length}});for(var e=0,f=b.length;e<f;e++){c.addTrackElement_(b[e])}if(D){return c}}a.prototype.addTrackElement_=function b(a){var b=this.trackElements_.length;if(!(“”+b in this)){Object.defineProperty(this,b,{get:function c(){return this.trackElements_[b]}})}if(this.trackElements_.indexOf(a)===-1){this.trackElements_.push(a)}};a.prototype.getTrackElementByTrack_=function c(a){var b=void 0;for(var c=0,d=this.trackElements_.length;c<d;c++){if(a===this.trackElements_[c].track){b=this.trackElements_[c];break}}return b};a.prototype.removeTrackElement_=function d(a){for(var b=0,c=this.trackElements_.length;b<c;b++){if(a===this.trackElements_[b]){this.trackElements_.splice(b,1);break}}};return a}();var bc=function(){function a(b){L(this,a);var c=this;if(D){c=m.createElement(“custom”);for(var d in a.prototype){if(d!==”constructor”){c[d]=a.prototype[d]}}}a.prototype.setCues_.call(c,b);Object.defineProperty(c,”length”,{get:function e(){return this.length_}});if(D){return c}}a.prototype.setCues_=function b(a){var b=this.length||0;var c=0;var d=a.length;this.cues_=a;this.length_=a.length;var e=function f(a){if(!(“”+a in this)){Object.defineProperty(this,””+a,{get:function b(){return this.cues_[a]}})}};if(b<d){c=b;for(;c<d;c++){e.call(this,c)}}};a.prototype.getCueById=function c(a){var b=null;for(var c=0,d=this.length;c<d;c++){var e=this[c];if(e.id===a){b=e;break}}return b};return a}();var cc={alternative:”alternative”,captions:”captions”,main:”main”,sign:”sign”,subtitles:”subtitles”,commentary:”commentary”};var dc={alternative:”alternative”,descriptions:”descriptions”,main:”main”,”main-desc”:”main-desc”,translation:”translation”,commentary:”commentary”};var ec={subtitles:”subtitles”,captions:”captions”,descriptions:”descriptions”,chapters:”chapters”,metadata:”metadata”};var fc={disabled:”disabled”,hidden:”hidden”,showing:”showing”};var gc=function(a){M(b,a);function b(){var c;var d=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};L(this,b);var e=N(this,a.call(this));var f=e;if(D){f=m.createElement(“custom”);for(var g in b.prototype){if(g!==”constructor”){f[g]=b.prototype[g]}}}var h={id:d.id||”vjs_track_”+La(),kind:d.kind||””,label:d.label||””,language:d.language||””};var i=function k(a){Object.defineProperty(f,a,{get:function b(){return h[a]},set:function c(){}})};for(var j in h){i(j)}return c=f,N(e,c)}return b}(hb);var hc=function Ff(a){var b=[“protocol”,”hostname”,”port”,”pathname”,”search”,”hash”,”host”];var c=m.createElement(“a”);c.href=a;var d=c.host===””&&c.protocol!==”file:”;var e=void 0;if(d){e=m.createElement(“div”);e.innerHTML='<a href=”‘+a+'”></a>’;c=e.firstChild;e.setAttribute(“style”,”display:none; position:absolute;”);m.body.appendChild(e)}var f={};for(var h=0;h<b.length;h++){f[b[h]]=c[b[h]]}if(f.protocol===”http:”){f.host=f.host.replace(/:80$/,””)}if(f.protocol===”https:”){f.host=f.host.replace(/:443$/,””)}if(!f.protocol){f.protocol=g.location.protocol}if(d){m.body.removeChild(e)}return f};var ic=function Gf(a){if(!a.match(/^https?:\/\//)){var b=m.createElement(“div”);b.innerHTML='<a href=”‘+a+'”>x</a>’;a=b.firstChild.href}return a};var jc=function Hf(a){if(typeof a===”string”){var b=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i;var c=b.exec(a);if(c){return c.pop().toLowerCase()}}return””};var kc=function If(a){var b=g.location;var c=hc(a);var d=c.protocol===”:”?b.protocol:c.protocol;var e=d+c.host!==b.protocol+b.host;return e};var lc=(Object.freeze||Object)({parseUrl:hc,getAbsoluteURL:ic,getFileExtension:jc,isCrossOrigin:kc});var mc=oc;var nc=Object.prototype.toString;function oc(b){var c=nc.call(b);return c===”[object Function]”||typeof b===”function”&&c!==”[object RegExp]”||typeof a!==”undefined”&&(b===a.setTimeout||b===a.alert||b===a.confirm||b===a.prompt)}var pc=e(function(a,b){b=a.exports=c;function c(a){return a.replace(/^\s*|\s*$/g,””)}b.left=function(a){return a.replace(/^\s*/,””)};b.right=function(a){return a.replace(/\s*$/,””)}});var qc=tc;var rc=Object.prototype.toString;var sc=Object.prototype.hasOwnProperty;function tc(a,b,c){if(!mc(b)){throw new TypeError(“iterator must be a function”)}if(arguments.length<3){c=this}if(rc.call(a)===”[object Array]”)uc(a,b,c);else if(typeof a===”string”)vc(a,b,c);else wc(a,b,c)}function uc(a,b,c){for(var d=0,e=a.length;d<e;d++){if(sc.call(a,d)){b.call(c,a[d],d,a)}}}function vc(a,b,c){for(var d=0,e=a.length;d<e;d++){b.call(c,a.charAt(d),d,a)}}function wc(a,b,c){for(var d in a){if(sc.call(a,d)){b.call(c,a[d],d,a)}}}var xc=function(a){return Object.prototype.toString.call(a)===”[object Array]”};var yc=function(a){if(!a)return{};var b={};qc(pc(a).split(“\n”),function(a){var c=a.indexOf(“:”),d=pc(a.slice(0,c)).toLowerCase(),e=pc(a.slice(c+1));if(typeof b[d]===”undefined”){b[d]=e}else if(xc(b[d])){b[d].push(e)}else{b[d]=[b[d],e]}});return b};var zc=Bc;var Ac=Object.prototype.hasOwnProperty;function Bc(){var a={};for(var b=0;b<arguments.length;b++){var c=arguments[b];for(var d in c){if(Ac.call(c,d)){a[d]=c[d]}}}return a}var Cc=Gc;Gc.XMLHttpRequest=g.XMLHttpRequest||Jc;Gc.XDomainRequest=”withCredentials”in new Gc.XMLHttpRequest?Gc.XMLHttpRequest:g.XDomainRequest;Dc([“get”,”put”,”post”,”patch”,”head”,”delete”],function(a){Gc[a===”delete”?”del”:a]=function(b,c,d){c=Fc(b,c,d);c.method=a.toUpperCase();return Hc(c)}});function Dc(a,b){for(var c=0;c<a.length;c++){b(a[c])}}function Ec(a){for(var b in a){if(a.hasOwnProperty(b))return false}return true}function Fc(a,b,c){var d=a;if(mc(b)){c=b;if(typeof a===”string”){d={uri:a}}}else{d=zc(b,{uri:a})}d.callback=c;return d}function Gc(a,b,c){b=Fc(a,b,c);return Hc(b)}function Hc(a){if(typeof a.callback===”undefined”){throw new Error(“callback argument missing”)}var b=false;var c=function s(c,d,e){if(!b){b=true;a.callback(c,d,e)}};function d(){if(h.readyState===4){setTimeout(g,0)}}function e(){var a=undefined;if(h.response){a=h.response}else{a=h.responseText||Ic(h)}if(p){try{a=JSON.parse(a)}catch(b){}}return a}function f(a){clearTimeout(q);if(!(a instanceof Error)){a=new Error(“”+(a||”Unknown XMLHttpRequest Error”))}a.statusCode=0;return c(a,r)}function g(){if(j)return;var b;clearTimeout(q);if(a.useXDR&&h.status===undefined){b=200}else{b=h.status===1223?204:h.status}var d=r;var f=null;if(b!==0){d={body:e(),statusCode:b,method:l,headers:{},url:k,rawRequest:h};if(h.getAllResponseHeaders){d.headers=yc(h.getAllResponseHeaders())}}else{f=new Error(“Internal XMLHttpRequest Error”)}return c(f,d,d.body)}var h=a.xhr||null;if(!h){if(a.cors||a.useXDR){h=new Gc.XDomainRequest}else{h=new Gc.XMLHttpRequest}}var i;var j;var k=h.url=a.uri||a.url;var l=h.method=a.method||”GET”;var m=a.body||a.data;var n=h.headers=a.headers||{};var o=!!a.sync;var p=false;var q;var r={body:undefined,headers:{},statusCode:0,method:l,url:k,rawRequest:h};if(“json”in a&&a.json!==false){p=true;n[“accept”]||n[“Accept”]||(n[“Accept”]=”application/json”);if(l!==”GET”&&l!==”HEAD”){n[“content-type”]||n[“Content-Type”]||(n[“Content-Type”]=”application/json”);m=JSON.stringify(a.json===true?m:a.json)}}h.onreadystatechange=d;h.onload=g;h.onerror=f;h.onprogress=function(){};h.onabort=function(){j=true};h.ontimeout=f;h.open(l,k,!o,a.username,a.password);if(!o){h.withCredentials=!!a.withCredentials}if(!o&&a.timeout>0){q=setTimeout(function(){if(j)return;j=true;h.abort(“timeout”);var a=new Error(“XMLHttpRequest timeout”);a.code=”ETIMEDOUT”;f(a)},a.timeout)}if(h.setRequestHeader){for(i in n){if(n.hasOwnProperty(i)){h.setRequestHeader(i,n[i])}}}else if(a.headers&&!Ec(a.headers)){throw new Error(“Headers cannot be set on an XDomainRequest object”)}if(“responseType”in a){h.responseType=a.responseType}if(“beforeSend”in a&&typeof a.beforeSend===”function”){a.beforeSend(h)}h.send(m||null);return h}function Ic(a){if(a.responseType===”document”){return a.responseXML}var b=a.responseXML&&a.responseXML.documentElement.nodeName===”parsererror”;if(a.responseType===””&&!b){return a.responseXML}return null}function Jc(){}var Kc=function Jf(a,b){var c=new g.WebVTT.Parser(g,g.vttjs,g.WebVTT.StringDecoder());var d=[];c.oncue=function(a){b.addCue(a)};c.onparsingerror=function(a){d.push(a)};c.onflush=function(){b.trigger({type:”loadeddata”,target:b})};c.parse(a);if(d.length>0){if(g.console&&g.console.groupCollapsed){g.console.groupCollapsed(“Text Track parsing errors for “+b.src)}d.forEach(function(a){return $.error(a)});if(g.console&&g.console.groupEnd){g.console.groupEnd()}}c.flush()};var Lc=function Kf(a,b){var c={uri:a};var d=kc(a);if(d){c.cors=d}Cc(c,fb(this,function(a,c,d){if(a){return $.error(a,c)}b.loaded_=true;if(typeof g.WebVTT!==”function”){if(b.tech_){var e=function f(){return Kc(d,b)};b.tech_.on(“vttjsloaded”,e);b.tech_.on(“vttjserror”,function(){$.error(“vttjs failed to load, stopping trying to process “+b.src);b.tech_.off(“vttjsloaded”,e)})}}else{Kc(d,b)}}))};var Mc=function(a){M(b,a);function b(){var c,d;var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};L(this,b);if(!e.tech){throw new Error(“A tech was not provided.”)}var f=vb(e,{kind:ec[e.kind]||”subtitles”,language:e.language||e.srclang||””});var g=fc[f.mode]||”disabled”;var h=f[“default”];if(f.kind===”metadata”||f.kind===”chapters”){g=”hidden”}var i=(c=N(this,a.call(this,f)),c);i.tech_=f.tech;if(D){for(var j in b.prototype){if(j!==”constructor”){i[j]=b.prototype[j]}}}i.cues_=[];i.activeCues_=[];var k=new bc(i.cues_);var l=new bc(i.activeCues_);var m=false;var n=fb(i,function(){this.activeCues;if(m){this.trigger(“cuechange”);m=false}});if(g!==”disabled”){i.tech_.ready(function(){i.tech_.on(“timeupdate”,n)},true)}Object.defineProperty(i,”default”,{get:function o(){return h},set:function p(){}});Object.defineProperty(i,”mode”,{get:function q(){return g},set:function r(a){var b=this;if(!fc[a]){return}g=a;if(g===”showing”){this.tech_.ready(function(){b.tech_.on(“timeupdate”,n)},true)}this.trigger(“modechange”)}});Object.defineProperty(i,”cues”,{get:function s(){if(!this.loaded_){return null}return k},set:function t(){}});Object.defineProperty(i,”activeCues”,{get:function u(){if(!this.loaded_){return null}if(this.cues.length===0){return l}var a=this.tech_.currentTime();var b=[];for(var c=0,d=this.cues.length;c<d;c++){var e=this.cues[c];if(e.startTime<=a&&e.endTime>=a){b.push(e)}else if(e.startTime===e.endTime&&e.startTime<=a&&e.startTime+.5>=a){b.push(e)}}m=false;if(b.length!==this.activeCues_.length){m=true}else{for(var f=0;f<b.length;f++){if(this.activeCues_.indexOf(b[f])===-1){m=true}}}this.activeCues_=b;l.setCues_(this.activeCues_);return l},set:function v(){}});if(f.src){i.src=f.src;Lc(f.src,i)}else{i.loaded_=true}return d=i,N(c,d)}b.prototype.addCue=function c(a){var b=a;if(g.vttjs&&!(a instanceof g.vttjs.VTTCue)){b=new g.vttjs.VTTCue(a.startTime,a.endTime,a.text);for(var c in a){if(!(c in b)){b[c]=a[c]}}b.id=a.id;b.originalCue_=a}var d=this.tech_.textTracks();for(var e=0;e<d.length;e++){if(d[e]!==this){d[e].removeCue(b)}}this.cues_.push(b);this.cues.setCues_(this.cues_)};b.prototype.removeCue=function d(a){var b=this.cues_.length;while(b–){var c=this.cues_[b];if(c===a||c.originalCue_&&c.originalCue_===a){this.cues_.splice(b,1);this.cues.setCues_(this.cues_);break}}};return b}(gc);Mc.prototype.allowedEvents_={cuechange:”cuechange”};var Nc=function(a){M(b,a);function b(){var c,d;var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};L(this,b);var f=vb(e,{kind:dc[e.kind]||””});var g=(c=N(this,a.call(this,f)),c);var h=false;if(D){for(var i in b.prototype){if(i!==”constructor”){g[i]=b.prototype[i]}}}Object.defineProperty(g,”enabled”,{get:function j(){return h},set:function k(a){if(typeof a!==”boolean”||a===h){return}h=a;this.trigger(“enabledchange”)}});if(f.enabled){g.enabled=f.enabled}g.loaded_=true;return d=g,N(c,d)}return b}(gc);var Oc=function(a){M(b,a);function b(){var c,d;var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};L(this,b);var f=vb(e,{kind:cc[e.kind]||””});var g=(c=N(this,a.call(this,f)),c);var h=false;if(D){for(var i in b.prototype){if(i!==”constructor”){g[i]=b.prototype[i]}}}Object.defineProperty(g,”selected”,{get:function j(){return h},set:function k(a){if(typeof a!==”boolean”||a===h){return}h=a;this.trigger(“selectedchange”)}});if(f.selected){g.selected=f.selected}return d=g,N(c,d)}return b}(gc);var Pc=0;var Qc=1;var Rc=2;var Sc=3;var Tc=function(a){M(b,a);function b(){var c=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};L(this,b);var d=N(this,a.call(this));var e=void 0;var f=d;if(D){f=m.createElement(“custom”);for(var g in b.prototype){if(g!==”constructor”){f[g]=b.prototype[g]}}}var h=new Mc(c);f.kind=h.kind;f.src=h.src;f.srclang=h.language;f.label=h.label;f[“default”]=h[“default”];Object.defineProperty(f,”readyState”,{get:function j(){return e}});Object.defineProperty(f,”track”,{get:function k(){return h}});e=Pc;h.addEventListener(“loadeddata”,function(){e=Rc;f.trigger({type:”load”,target:f})});if(D){var i;return i=f,N(d,i)}return d}return b}(hb);Tc.prototype.allowedEvents_={load:”load”};Tc.NONE=Pc;Tc.LOADING=Qc;Tc.LOADED=Rc;Tc.ERROR=Sc;var Uc={audio:{ListClass:Yb,TrackClass:Nc,capitalName:”Audio”},video:{ListClass:$b,TrackClass:Oc,capitalName:”Video”},text:{ListClass:_b,TrackClass:Mc,capitalName:”Text”}};Object.keys(Uc).forEach(function(a){Uc[a].getterName=a+”Tracks”;Uc[a].privateName=a+”Tracks_”});var Vc={remoteText:{ListClass:_b,TrackClass:Mc,capitalName:”RemoteText”,getterName:”remoteTextTracks”,privateName:”remoteTextTracks_”},remoteTextEl:{ListClass:ac,TrackClass:Tc,capitalName:”RemoteTextTrackEls”,getterName:”remoteTextTrackEls”,privateName:”remoteTextTrackEls_”}};var Wc=vb(Uc,Vc);Vc.names=Object.keys(Vc);Uc.names=Object.keys(Uc);Wc.names=[].concat(Vc.names).concat(Uc.names);var Xc={};function Yc(a,b,c,d){var e=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{};var f=a.textTracks();e.kind=b;if(c){e.label=c}if(d){e.language=d}e.tech=a;var g=new Wc.text.TrackClass(e);f.addTrack(g);return g}var Zc=function(a){M(b,a);function b(){var c=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var d=arguments.length>1&&arguments[1]!==undefined?arguments[1]:function(){};L(this,b);c.reportTouchActivity=false;var e=N(this,a.call(this,null,c,d));e.hasStarted_=false;e.on(“playing”,function(){this.hasStarted_=true});e.on(“loadstart”,function(){this.hasStarted_=false});Wc.names.forEach(function(a){var b=Wc[a];if(c&&c[b.getterName]){e[b.privateName]=c[b.getterName]}});if(!e.featuresProgressEvents){e.manualProgressOn()}if(!e.featuresTimeupdateEvents){e.manualTimeUpdatesOn()}[“Text”,”Audio”,”Video”].forEach(function(a){if(c[“native”+a+”Tracks”]===false){e[“featuresNative”+a+”Tracks”]=false}});if(c.nativeCaptions===false||c.nativeTextTracks===false){e.featuresNativeTextTracks=false}else if(c.nativeCaptions===true||c.nativeTextTracks===true){e.featuresNativeTextTracks=true}if(!e.featuresNativeTextTracks){e.emulateTextTracks()}e.autoRemoteTextTracks_=new Wc.text.ListClass;e.initTrackListeners();if(!c.nativeControlsForTouch){e.emitTapEvents()}if(e.constructor){e.name_=e.constructor.name||”Unknown Tech”}return e}b.prototype.manualProgressOn=function c(){this.on(“durationchange”,this.onDurationChange);this.manualProgress=true;this.one(“ready”,this.trackProgress)};b.prototype.manualProgressOff=function d(){this.manualProgress=false;this.stopTrackingProgress();this.off(“durationchange”,this.onDurationChange)};b.prototype.trackProgress=function e(a){this.stopTrackingProgress();this.progressInterval=this.setInterval(fb(this,function(){var a=this.bufferedPercent();if(this.bufferedPercent_!==a){this.trigger(“progress”)}this.bufferedPercent_=a;if(a===1){this.stopTrackingProgress()}}),500)};b.prototype.onDurationChange=function f(a){this.duration_=this.duration()};b.prototype.buffered=function h(){return Ab(0,0)};b.prototype.bufferedPercent=function i(){return Bb(this.buffered(),this.duration_)};b.prototype.stopTrackingProgress=function j(){this.clearInterval(this.progressInterval)};b.prototype.manualTimeUpdatesOn=function k(){this.manualTimeUpdates=true;this.on(“play”,this.trackCurrentTime);this.on(“pause”,this.stopTrackingCurrentTime)};b.prototype.manualTimeUpdatesOff=function l(){this.manualTimeUpdates=false;this.stopTrackingCurrentTime();this.off(“play”,this.trackCurrentTime);this.off(“pause”,this.stopTrackingCurrentTime)};b.prototype.trackCurrentTime=function n(){if(this.currentTimeInterval){this.stopTrackingCurrentTime()}this.currentTimeInterval=this.setInterval(function(){this.trigger({type:”timeupdate”,target:this,manuallyTriggered:true})},250)};b.prototype.stopTrackingCurrentTime=function o(){this.clearInterval(this.currentTimeInterval);this.trigger({type:”timeupdate”,target:this,manuallyTriggered:true})};b.prototype.dispose=function p(){this.clearTracks(Uc.names);if(this.manualProgress){this.manualProgressOff()}if(this.manualTimeUpdates){this.manualTimeUpdatesOff()}a.prototype.dispose.call(this)};b.prototype.clearTracks=function q(a){var b=this;a=[].concat(a);a.forEach(function(a){var c=b[a+”Tracks”]()||[];var d=c.length;while(d–){var e=c[d];if(a===”text”){b.removeRemoteTextTrack(e)}c.removeTrack(e)}})};b.prototype.cleanupAutoTextTracks=function r(){var a=this.autoRemoteTextTracks_||[];var b=a.length;while(b–){var c=a[b];this.removeRemoteTextTrack(c)}};b.prototype.reset=function s(){};b.prototype.error=function t(a){if(a!==undefined){this.error_=new Ib(a);this.trigger(“error”)}return this.error_};b.prototype.played=function u(){if(this.hasStarted_){return Ab(0,0)}return Ab()};b.prototype.setCurrentTime=function v(){if(this.manualTimeUpdates){this.trigger({type:”timeupdate”,target:this,manuallyTriggered:true})}};b.prototype.initTrackListeners=function w(){var a=this;Uc.names.forEach(function(b){var c=Uc[b];var d=function f(){a.trigger(b+”trackchange”)};var e=a[c.getterName]();e.addEventListener(“removetrack”,d);e.addEventListener(“addtrack”,d);a.on(“dispose”,function(){e.removeEventListener(“removetrack”,d);e.removeEventListener(“addtrack”,d)})})};b.prototype.addWebVttScript_=function x(){var a=this;if(g.WebVTT){return}if(m.body.contains(this.el())){if(!this.options_[“vtt.js”]&&V(Xc)&&Object.keys(Xc).length>0){this.trigger(“vttjsloaded”);return}var b=m.createElement(“script”);b.src=this.options_[“vtt.js”]||”https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js”;b.onload=function(){a.trigger(“vttjsloaded”)};b.onerror=function(){a.trigger(“vttjserror”)};this.on(“dispose”,function(){b.onload=null;b.onerror=null});g.WebVTT=true;this.el().parentNode.appendChild(b)}else{this.ready(this.addWebVttScript_)}};b.prototype.emulateTextTracks=function y(){var a=this;var b=this.textTracks();var c=this.remoteTextTracks();var d=function h(a){return b.addTrack(a.track)};var e=function i(a){return b.removeTrack(a.track)};c.on(“addtrack”,d);c.on(“removetrack”,e);this.addWebVttScript_();var f=function j(){return a.trigger(“texttrackchange”)};var g=function k(){f();for(var a=0;a<b.length;a++){var c=b[a];c.removeEventListener(“cuechange”,f);if(c.mode===”showing”){c.addEventListener(“cuechange”,f)}}};g();b.addEventListener(“change”,g);b.addEventListener(“addtrack”,g);b.addEventListener(“removetrack”,g);this.on(“dispose”,function(){c.off(“addtrack”,d);c.off(“removetrack”,e);b.removeEventListener(“change”,g);b.removeEventListener(“addtrack”,g);b.removeEventListener(“removetrack”,g);for(var a=0;a<b.length;a++){var h=b[a];h.removeEventListener(“cuechange”,f)}})};b.prototype.addTextTrack=function z(a,b,c){if(!a){throw new Error(“TextTrack kind is required but was not provided”)}return Yc(this,a,b,c)};b.prototype.createRemoteTextTrack=function A(a){var b=vb(a,{tech:this});return new Vc.remoteTextEl.TrackClass(b)};b.prototype.addRemoteTextTrack=function B(){var a=this;var b=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var c=arguments[1];var d=this.createRemoteTextTrack(b);if(c!==true&&c!==false){$.warn(‘Calling addRemoteTextTrack without explicitly setting the “manualCleanup” parameter to `true` is deprecated and default to `false` in future version of video.js’);c=true}this.remoteTextTrackEls().addTrackElement_(d);this.remoteTextTracks().addTrack(d.track);if(c!==true){this.ready(function(){return a.autoRemoteTextTracks_.addTrack(d.track)})}return d};b.prototype.removeRemoteTextTrack=function C(a){var b=this.remoteTextTrackEls().getTrackElementByTrack_(a);this.remoteTextTrackEls().removeTrackElement_(b);this.remoteTextTracks().removeTrack(a);this.autoRemoteTextTracks_.removeTrack(a)};b.prototype.getVideoPlaybackQuality=function D(){return{}};b.prototype.setPoster=function E(){};b.prototype.playsinline=function F(){};b.prototype.setPlaysinline=function G(){};b.prototype.canPlayType=function H(){return””};b.canPlayType=function I(){return””};b.canPlaySource=function J(a,c){return b.canPlayType(a.type)};b.isTech=function K(a){return a.prototype instanceof b||a instanceof b||a===b; };b.registerTech=function O(a,c){if(!b.techs_){b.techs_={}}if(!b.isTech(c)){throw new Error(“Tech “+a+” must be a Tech”)}if(!b.canPlayType){throw new Error(“Techs must have a static canPlayType method on them”)}if(!b.canPlaySource){throw new Error(“Techs must have a static canPlaySource method on them”)}a=tb(a);b.techs_[a]=c;if(a!==”Tech”){b.defaultTechOrder_.push(a)}return c};b.getTech=function P(a){if(!a){return}a=tb(a);if(b.techs_&&b.techs_[a]){return b.techs_[a]}if(g&&g.videojs&&g.videojs[a]){$.warn(“The “+a+” tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)”);return g.videojs[a]}};return b}(wb);Wc.names.forEach(function(a){var b=Wc[a];Zc.prototype[b.getterName]=function(){this[b.privateName]=this[b.privateName]||new b.ListClass;return this[b.privateName]}});Zc.prototype.featuresVolumeControl=true;Zc.prototype.featuresFullscreenResize=false;Zc.prototype.featuresPlaybackRate=false;Zc.prototype.featuresProgressEvents=false;Zc.prototype.featuresTimeupdateEvents=false;Zc.prototype.featuresNativeTextTracks=false;Zc.withSourceHandlers=function(a){a.registerSourceHandler=function(b,c){var d=a.sourceHandlers;if(!d){d=a.sourceHandlers=[]}if(c===undefined){c=d.length}d.splice(c,0,b)};a.canPlayType=function(b){var c=a.sourceHandlers||[];var d=void 0;for(var e=0;e<c.length;e++){d=c[e].canPlayType(b);if(d){return d}}return””};a.selectSourceHandler=function(b,c){var d=a.sourceHandlers||[];var e=void 0;for(var f=0;f<d.length;f++){e=d[f].canHandleSource(b,c);if(e){return d[f]}}return null};a.canPlaySource=function(b,c){var d=a.selectSourceHandler(b,c);if(d){return d.canHandleSource(b,c)}return””};var b=[“seekable”,”duration”];b.forEach(function(a){var b=this[a];if(typeof b!==”function”){return}this[a]=function(){if(this.sourceHandler_&&this.sourceHandler_[a]){return this.sourceHandler_[a].apply(this.sourceHandler_,arguments)}return b.apply(this,arguments)}},a.prototype);a.prototype.setSource=function(b){var c=a.selectSourceHandler(b,this.options_);if(!c){if(a.nativeSourceHandler){c=a.nativeSourceHandler}else{$.error(“No source hander found for the current source.”)}}this.disposeSourceHandler();this.off(“dispose”,this.disposeSourceHandler);if(c!==a.nativeSourceHandler){this.currentSource_=b}this.sourceHandler_=c.handleSource(b,this,this.options_);this.on(“dispose”,this.disposeSourceHandler)};a.prototype.disposeSourceHandler=function(){if(this.currentSource_){this.clearTracks([“audio”,”video”]);this.currentSource_=null}this.cleanupAutoTextTracks();if(this.sourceHandler_){if(this.sourceHandler_.dispose){this.sourceHandler_.dispose()}this.sourceHandler_=null}}};wb.registerComponent(“Tech”,Zc);Zc.registerTech(“Tech”,Zc);Zc.defaultTechOrder_=[];var $c={};function _c(a,b){$c[a]=$c[a]||[];$c[a].push(b)}function ad(a,b,c){a.setTimeout(function(){return hd(b,$c[b.type],c,a)},1)}function bd(a,b){a.forEach(function(a){return a.setTech&&a.setTech(b)})}function cd(a,b,c){return a.reduceRight(gd(c),b[c]())}function dd(a,b,c,d){return b[c](a.reduce(gd(c),d))}var ed={buffered:1,currentTime:1,duration:1,seekable:1,played:1};var fd={setCurrentTime:1};function gd(a){return function(b,c){if(c[a]){return c[a](b)}return b}}function hd(){var a=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];var c=arguments[2];var d=arguments[3];var e=arguments.length>4&&arguments[4]!==undefined?arguments[4]:[];var f=arguments.length>5&&arguments[5]!==undefined?arguments[5]:false;var g=b[0],h=b.slice(1);if(typeof g===”string”){hd(a,$c[g],c,d,e,f)}else if(g){var i=g(d);i.setSource(T({},a),function(b,g){if(b){return hd(a,h,c,d,e,f)}e.push(i);hd(g,a.type===g.type?h:$c[g.type],c,d,e,f)})}else if(h.length){hd(a,h,c,d,e,f)}else if(f){c(a,e)}else{hd(a,$c[“*”],c,d,e,true)}}var id=function Lf(a){if(Array.isArray(a)){var b=[];a.forEach(function(a){a=Lf(a);if(Array.isArray(a)){b=b.concat(a)}else if(U(a)){b.push(a)}});a=b}else if(typeof a===”string”&&a.trim()){a=[{src:a}]}else if(U(a)&&typeof a.src===”string”&&a.src&&a.src.trim()){a=[a]}else{a=[]}return a};var jd=function(a){M(b,a);function b(c,d,e){L(this,b);var f=vb({createEl:false},d);var g=N(this,a.call(this,c,f,e));if(!d.playerOptions.sources||d.playerOptions.sources.length===0){for(var h=0,i=d.playerOptions.techOrder;h<i.length;h++){var j=tb(i[h]);var k=Zc.getTech(j);if(!j){k=wb.getComponent(j)}if(k&&k.isSupported()){c.loadTech_(j);break}}}else{c.src(d.playerOptions.sources)}return g}return b}(wb);wb.registerComponent(“MediaLoader”,jd);var kd=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.emitTapEvents();e.enable();return e}b.prototype.createEl=function c(){var b=arguments.length>0&&arguments[0]!==undefined?arguments[0]:”div”;var c=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var d=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};c=T({innerHTML:'<span aria-hidden=”true” class=”vjs-icon-placeholder”></span>’,className:this.buildCSSClass(),tabIndex:0},c);if(b===”button”){$.error(“Creating a ClickableComponent with an HTML element of “+b+” is not supported; use a Button instead.”)}d=T({role:”button”,”aria-live”:”polite”},d);this.tabIndex_=c.tabIndex;var e=a.prototype.createEl.call(this,b,c,d);this.createControlTextEl(e);return e};b.prototype.dispose=function d(){this.controlTextEl_=null;a.prototype.dispose.call(this)};b.prototype.createControlTextEl=function e(a){this.controlTextEl_=ka(“span”,{className:”vjs-control-text”});if(a){a.appendChild(this.controlTextEl_)}this.controlText(this.controlText_,a);return this.controlTextEl_};b.prototype.controlText=function f(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.el();if(a===undefined){return this.controlText_||”Need Text”}var c=this.localize(a);this.controlText_=a;la(this.controlTextEl_,c);if(!this.nonIconControl){b.setAttribute(“title”,c)}};b.prototype.buildCSSClass=function g(){return”vjs-control vjs-button “+a.prototype.buildCSSClass.call(this)};b.prototype.enable=function h(){if(!this.enabled_){this.enabled_=true;this.removeClass(“vjs-disabled”);this.el_.setAttribute(“aria-disabled”,”false”);if(typeof this.tabIndex_!==”undefined”){this.el_.setAttribute(“tabIndex”,this.tabIndex_)}this.on([“tap”,”click”],this.handleClick);this.on(“focus”,this.handleFocus);this.on(“blur”,this.handleBlur)}};b.prototype.disable=function i(){this.enabled_=false;this.addClass(“vjs-disabled”);this.el_.setAttribute(“aria-disabled”,”true”);if(typeof this.tabIndex_!==”undefined”){this.el_.removeAttribute(“tabIndex”)}this.off([“tap”,”click”],this.handleClick);this.off(“focus”,this.handleFocus);this.off(“blur”,this.handleBlur)};b.prototype.handleClick=function j(a){};b.prototype.handleFocus=function k(a){Wa(m,”keydown”,fb(this,this.handleKeyPress))};b.prototype.handleKeyPress=function l(b){if(b.which===32||b.which===13){b.preventDefault();this.trigger(“click”)}else if(a.prototype.handleKeyPress){a.prototype.handleKeyPress.call(this,b)}};b.prototype.handleBlur=function n(a){Xa(m,”keydown”,fb(this,this.handleKeyPress))};return b}(wb);wb.registerComponent(“ClickableComponent”,kd);var ld=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.update();c.on(“posterchange”,fb(e,e.update));return e}b.prototype.dispose=function c(){this.player().off(“posterchange”,this.update);a.prototype.dispose.call(this)};b.prototype.createEl=function d(){var a=ka(“div”,{className:”vjs-poster”,tabIndex:-1});if(!I){this.fallbackImg_=ka(“img”);a.appendChild(this.fallbackImg_)}return a};b.prototype.update=function e(a){var b=this.player().poster();this.setSrc(b);if(b){this.show()}else{this.hide()}};b.prototype.setSrc=function f(a){if(this.fallbackImg_){this.fallbackImg_.src=a}else{var b=””;if(a){b=’url(“‘+a+'”)’}this.el_.style.backgroundImage=b}};b.prototype.handleClick=function g(a){if(!this.player_.controls()){return}if(this.player_.paused()){this.player_.play()}else{this.player_.pause()}};return b}(kd);wb.registerComponent(“PosterImage”,ld);var md=”#222″;var nd=”#ccc”;var od={monospace:”monospace”,sansSerif:”sans-serif”,serif:”serif”,monospaceSansSerif:'”Andale Mono”, “Lucida Console”, monospace’,monospaceSerif:'”Courier New”, monospace’,proportionalSansSerif:”sans-serif”,proportionalSerif:”serif”,casual:'”Comic Sans MS”, Impact, fantasy’,script:'”Monotype Corsiva”, cursive’,smallcaps:'”Andale Mono”, “Lucida Console”, monospace, sans-serif’};function pd(a,b){return”rgba(“+parseInt(a[1]+a[1],16)+”,”+parseInt(a[2]+a[2],16)+”,”+parseInt(a[3]+a[3],16)+”,”+b+”)”}function qd(a,b,c){try{a.style[b]=c}catch(d){return}}var rd=function(a){M(b,a);function b(c,d,e){L(this,b);var f=N(this,a.call(this,c,d,e));c.on(“loadstart”,fb(f,f.toggleDisplay));c.on(“texttrackchange”,fb(f,f.updateDisplay));c.on(“loadstart”,fb(f,f.preselectTrack));c.ready(fb(f,function(){if(c.tech_&&c.tech_.featuresNativeTextTracks){this.hide();return}c.on(“fullscreenchange”,fb(this,this.updateDisplay));var a=this.options_.playerOptions.tracks||[];for(var b=0;b<a.length;b++){this.player_.addRemoteTextTrack(a[b],true)}this.preselectTrack()}));return f}b.prototype.preselectTrack=function c(){var a={captions:1,subtitles:1};var b=this.player_.textTracks();var c=this.player_.cache_.selectedLanguage;var d=void 0;var e=void 0;var f=void 0;for(var g=0;g<b.length;g++){var h=b[g];if(c&&c.enabled&&c.language===h.language){if(h.kind===c.kind){f=h}else if(!f){f=h}}else if(c&&!c.enabled){f=null;d=null;e=null}else if(h[“default”]){if(h.kind===”descriptions”&&!d){d=h}else if(h.kind in a&&!e){e=h}}}if(f){f.mode=”showing”}else if(e){e.mode=”showing”}else if(d){d.mode=”showing”}};b.prototype.toggleDisplay=function d(){if(this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks){this.hide()}else{this.show()}};b.prototype.createEl=function e(){return a.prototype.createEl.call(this,”div”,{className:”vjs-text-track-display”},{“aria-live”:”off”,”aria-atomic”:”true”})};b.prototype.clearDisplay=function f(){if(typeof g.WebVTT===”function”){g.WebVTT.processCues(g,[],this.el_)}};b.prototype.updateDisplay=function h(){var a=this.player_.textTracks();this.clearDisplay();var b=null;var c=null;var d=a.length;while(d–){var e=a[d];if(e.mode===”showing”){if(e.kind===”descriptions”){b=e}else{c=e}}}if(c){if(this.getAttribute(“aria-live”)!==”off”){this.setAttribute(“aria-live”,”off”)}this.updateForTrack(c)}else if(b){if(this.getAttribute(“aria-live”)!==”assertive”){this.setAttribute(“aria-live”,”assertive”)}this.updateForTrack(b)}};b.prototype.updateForTrack=function i(a){if(typeof g.WebVTT!==”function”||!a.activeCues){return}var b=this.player_.textTrackSettings.getValues();var c=[];for(var d=0;d<a.activeCues.length;d++){c.push(a.activeCues[d])}g.WebVTT.processCues(g,c,this.el_);var e=c.length;while(e–){var f=c[e];if(!f){continue}var h=f.displayState;if(b.color){h.firstChild.style.color=b.color}if(b.textOpacity){qd(h.firstChild,”color”,pd(b.color||”#fff”,b.textOpacity))}if(b.backgroundColor){h.firstChild.style.backgroundColor=b.backgroundColor}if(b.backgroundOpacity){qd(h.firstChild,”backgroundColor”,pd(b.backgroundColor||”#000″,b.backgroundOpacity))}if(b.windowColor){if(b.windowOpacity){qd(h,”backgroundColor”,pd(b.windowColor,b.windowOpacity))}else{h.style.backgroundColor=b.windowColor}}if(b.edgeStyle){if(b.edgeStyle===”dropshadow”){h.firstChild.style.textShadow=”2px 2px 3px “+md+”, 2px 2px 4px “+md+”, 2px 2px 5px “+md}else if(b.edgeStyle===”raised”){h.firstChild.style.textShadow=”1px 1px “+md+”, 2px 2px “+md+”, 3px 3px “+md}else if(b.edgeStyle===”depressed”){h.firstChild.style.textShadow=”1px 1px “+nd+”, 0 1px “+nd+”, -1px -1px “+md+”, 0 -1px “+md}else if(b.edgeStyle===”uniform”){h.firstChild.style.textShadow=”0 0 4px “+md+”, 0 0 4px “+md+”, 0 0 4px “+md+”, 0 0 4px “+md}}if(b.fontPercent&&b.fontPercent!==1){var i=g.parseFloat(h.style.fontSize);h.style.fontSize=i*b.fontPercent+”px”;h.style.height=”auto”;h.style.top=”auto”;h.style.bottom=”2px”}if(b.fontFamily&&b.fontFamily!==”default”){if(b.fontFamily===”small-caps”){h.firstChild.style.fontVariant=”small-caps”}else{h.firstChild.style.fontFamily=od[b.fontFamily]}}}};return b}(wb);wb.registerComponent(“TextTrackDisplay”,rd);var sd=function(a){M(b,a);function b(){L(this,b);return N(this,a.apply(this,arguments))}b.prototype.createEl=function c(){return a.prototype.createEl.call(this,”div”,{className:”vjs-loading-spinner”,dir:”ltr”})};return b}(wb);wb.registerComponent(“LoadingSpinner”,sd);var td=function(a){M(b,a);function b(){L(this,b);return N(this,a.apply(this,arguments))}b.prototype.createEl=function c(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var c=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};a=”button”;b=T({innerHTML:'<span aria-hidden=”true” class=”vjs-icon-placeholder”></span>’,className:this.buildCSSClass()},b);c=T({type:”button”,”aria-live”:”polite”},c);var d=wb.prototype.createEl.call(this,a,b,c);this.createControlTextEl(d);return d};b.prototype.addChild=function d(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var c=this.constructor.name;$.warn(“Adding an actionable (user controllable) child to a Button (“+c+”) is not supported; use a ClickableComponent instead.”);return wb.prototype.addChild.call(this,a,b)};b.prototype.enable=function e(){a.prototype.enable.call(this);this.el_.removeAttribute(“disabled”)};b.prototype.disable=function f(){a.prototype.disable.call(this);this.el_.setAttribute(“disabled”,”disabled”)};b.prototype.handleKeyPress=function g(b){if(b.which===32||b.which===13){return}a.prototype.handleKeyPress.call(this,b)};return b}(kd);wb.registerComponent(“Button”,td);var ud=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.mouseused_=false;e.on(“mousedown”,e.handleMouseDown);return e}b.prototype.buildCSSClass=function c(){return”vjs-big-play-button”};b.prototype.handleClick=function d(a){var b=this.player_.play();if(this.mouseused_&&a.clientX&&a.clientY){return}var c=this.player_.getChild(“controlBar”);var d=c&&c.getChild(“playToggle”);if(!d){this.player_.focus();return}var e=function f(){return d.focus()};if(Mb(b)){b.then(e,function(){})}else{this.setTimeout(e,1)}};b.prototype.handleKeyPress=function e(b){this.mouseused_=false;a.prototype.handleKeyPress.call(this,b)};b.prototype.handleMouseDown=function f(a){this.mouseused_=true};return b}(td);ud.prototype.controlText_=”Play Video”;wb.registerComponent(“BigPlayButton”,ud);var vd=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.controlText(d&&d.controlText||e.localize(“Close”));return e}b.prototype.buildCSSClass=function c(){return”vjs-close-button “+a.prototype.buildCSSClass.call(this)};b.prototype.handleClick=function d(a){this.trigger({type:”close”,bubbles:false})};return b}(td);wb.registerComponent(“CloseButton”,vd);var wd=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.on(c,”play”,e.handlePlay);e.on(c,”pause”,e.handlePause);e.on(c,”ended”,e.handleEnded);return e}b.prototype.buildCSSClass=function c(){return”vjs-play-control “+a.prototype.buildCSSClass.call(this)};b.prototype.handleClick=function d(a){if(this.player_.paused()){this.player_.play()}else{this.player_.pause()}};b.prototype.handleSeeked=function e(a){this.removeClass(“vjs-ended”);if(this.player_.paused()){this.handlePause(a)}else{this.handlePlay(a)}};b.prototype.handlePlay=function f(a){this.removeClass(“vjs-ended”);this.removeClass(“vjs-paused”);this.addClass(“vjs-playing”);this.controlText(“Pause”)};b.prototype.handlePause=function g(a){this.removeClass(“vjs-playing”);this.addClass(“vjs-paused”);this.controlText(“Play”)};b.prototype.handleEnded=function h(a){this.removeClass(“vjs-playing”);this.addClass(“vjs-ended”);this.controlText(“Replay”);this.one(this.player_,”seeked”,this.handleSeeked)};return b}(td);wd.prototype.controlText_=”Play”;wb.registerComponent(“PlayToggle”,wd);function xd(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:a;a=a<0?0:a;var c=Math.floor(a%60);var d=Math.floor(a/60%60);var e=Math.floor(a/3600);var f=Math.floor(b/60%60);var g=Math.floor(b/3600);if(isNaN(a)||a===Infinity){e=d=c=”-“}e=e>0||g>0?e+”:”:””;d=((e||f>=10)&&d<10?”0″+d:d)+”:”;c=c<10?”0″+c:c;return e+d+c}var yd=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.throttledUpdateContent=gb(fb(e,e.updateContent),25);e.on(c,”timeupdate”,e.throttledUpdateContent);return e}b.prototype.createEl=function c(b){var c=this.buildCSSClass();var d=a.prototype.createEl.call(this,”div”,{className:c+” vjs-time-control vjs-control”});this.contentEl_=ka(“div”,{className:c+”-display”},{“aria-live”:”off”},ka(“span”,{className:”vjs-control-text”,textContent:this.localize(this.controlText_)}));this.updateTextNode_();d.appendChild(this.contentEl_);return d};b.prototype.dispose=function d(){this.contentEl_=null;this.textNode_=null;a.prototype.dispose.call(this)};b.prototype.updateTextNode_=function e(){if(!this.contentEl_){return}while(this.contentEl_.firstChild){this.contentEl_.removeChild(this.contentEl_.firstChild)}this.textNode_=m.createTextNode(this.formattedTime_||”0:00″);this.contentEl_.appendChild(this.textNode_)};b.prototype.formatTime_=function f(a){return xd(a)};b.prototype.updateFormattedTime_=function g(a){var b=this.formatTime_(a);if(b===this.formattedTime_){return}this.formattedTime_=b;this.requestAnimationFrame(this.updateTextNode_)};b.prototype.updateContent=function h(a){};return b}(wb);yd.prototype.controlText_=”Time”;wb.registerComponent(“TimeDisplay”,yd);var zd=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.on(c,”ended”,e.handleEnded);return e}b.prototype.buildCSSClass=function c(){return”vjs-current-time”};b.prototype.updateContent=function d(a){var b=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(b)};b.prototype.handleEnded=function e(a){if(!this.player_.duration()){return}this.updateFormattedTime_(this.player_.duration())};return b}(yd);zd.prototype.controlText_=”Current Time”;wb.registerComponent(“CurrentTimeDisplay”,zd);var Ad=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.on(c,”durationchange”,e.updateContent);e.on(c,”loadedmetadata”,e.throttledUpdateContent);return e}b.prototype.buildCSSClass=function c(){return”vjs-duration”};b.prototype.updateContent=function d(a){var b=this.player_.duration();if(b&&this.duration_!==b){this.duration_=b;this.updateFormattedTime_(b)}};return b}(yd);Ad.prototype.controlText_=”Duration Time”;wb.registerComponent(“DurationDisplay”,Ad);var Bd=function(a){M(b,a);function b(){L(this,b);return N(this,a.apply(this,arguments))}b.prototype.createEl=function c(){return a.prototype.createEl.call(this,”div”,{className:”vjs-time-control vjs-time-divider”,innerHTML:”<div><span>/</span></div>”})};return b}(wb);wb.registerComponent(“TimeDivider”,Bd);var Cd=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.on(c,”durationchange”,e.throttledUpdateContent);e.on(c,”ended”,e.handleEnded);return e}b.prototype.buildCSSClass=function c(){return”vjs-remaining-time”};b.prototype.formatTime_=function d(b){return”-“+a.prototype.formatTime_.call(this,b)};b.prototype.updateContent=function e(a){if(!this.player_.duration()){return}if(this.player_.remainingTimeDisplay){this.updateFormattedTime_(this.player_.remainingTimeDisplay())}else{this.updateFormattedTime_(this.player_.remainingTime())}};b.prototype.handleEnded=function f(a){if(!this.player_.duration()){return}this.updateFormattedTime_(0)};return b}(yd);Cd.prototype.controlText_=”Remaining Time”;wb.registerComponent(“RemainingTimeDisplay”,Cd);var Dd=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.updateShowing();e.on(e.player(),”durationchange”,e.updateShowing);return e}b.prototype.createEl=function c(){var b=a.prototype.createEl.call(this,”div”,{className:”vjs-live-control vjs-control”});this.contentEl_=ka(“div”,{className:”vjs-live-display”,innerHTML:'<span class=”vjs-control-text”>’+this.localize(“Stream Type”)+”</span>”+this.localize(“LIVE”)},{“aria-live”:”off”});b.appendChild(this.contentEl_);return b};b.prototype.dispose=function d(){this.contentEl_=null;a.prototype.dispose.call(this)};b.prototype.updateShowing=function e(a){if(this.player().duration()===Infinity){this.show()}else{this.hide()}};return b}(wb);wb.registerComponent(“LiveDisplay”,Dd);var Ed=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.bar=e.getChild(e.options_.barName);e.vertical(!!e.options_.vertical);e.enable();return e}b.prototype.enabled=function c(){return this.enabled_};b.prototype.enable=function d(){if(this.enabled()){return}this.on(“mousedown”,this.handleMouseDown);this.on(“touchstart”,this.handleMouseDown);this.on(“focus”,this.handleFocus);this.on(“blur”,this.handleBlur);this.on(“click”,this.handleClick);this.on(this.player_,”controlsvisible”,this.update);if(this.playerEvent){this.on(this.player_,this.playerEvent,this.update)}this.removeClass(“disabled”);this.setAttribute(“tabindex”,0);this.enabled_=true};b.prototype.disable=function e(){if(!this.enabled()){return}var a=this.bar.el_.ownerDocument;this.off(“mousedown”,this.handleMouseDown);this.off(“touchstart”,this.handleMouseDown);this.off(“focus”,this.handleFocus);this.off(“blur”,this.handleBlur);this.off(“click”,this.handleClick);this.off(this.player_,”controlsvisible”,this.update);this.off(a,”mousemove”,this.handleMouseMove);this.off(a,”mouseup”,this.handleMouseUp);this.off(a,”touchmove”,this.handleMouseMove);this.off(a,”touchend”,this.handleMouseUp);this.removeAttribute(“tabindex”);this.addClass(“disabled”);if(this.playerEvent){this.off(this.player_,this.playerEvent,this.update)}this.enabled_=false};b.prototype.createEl=function f(b){var c=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var d=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};c.className=c.className+” vjs-slider”;c=T({tabIndex:0},c);d=T({role:”slider”,”aria-valuenow”:0,”aria-valuemin”:0,”aria-valuemax”:100,tabIndex:0},d);return a.prototype.createEl.call(this,b,c,d)};b.prototype.handleMouseDown=function g(a){var b=this.bar.el_.ownerDocument;a.preventDefault();wa();this.addClass(“vjs-sliding”);this.trigger(“slideractive”);this.on(b,”mousemove”,this.handleMouseMove);this.on(b,”mouseup”,this.handleMouseUp);this.on(b,”touchmove”,this.handleMouseMove);this.on(b,”touchend”,this.handleMouseUp);this.handleMouseMove(a)};b.prototype.handleMouseMove=function h(a){};b.prototype.handleMouseUp=function i(){var a=this.bar.el_.ownerDocument;xa();this.removeClass(“vjs-sliding”);this.trigger(“sliderinactive”);this.off(a,”mousemove”,this.handleMouseMove);this.off(a,”mouseup”,this.handleMouseUp);this.off(a,”touchmove”,this.handleMouseMove);this.off(a,”touchend”,this.handleMouseUp);this.update()};b.prototype.update=function j(){if(!this.el_){return}var a=this.getPercent();var b=this.bar;if(!b){return}if(typeof a!==”number”||a!==a||a<0||a===Infinity){a=0}var c=(a*100).toFixed(2)+”%”;var d=b.el().style;if(this.vertical()){d.height=c}else{d.width=c}return a};b.prototype.calculateDistance=function k(a){var b=Aa(this.el_,a);if(this.vertical()){return b.y}return b.x};b.prototype.handleFocus=function l(){this.on(this.bar.el_.ownerDocument,”keydown”,this.handleKeyPress)};b.prototype.handleKeyPress=function m(a){if(a.which===37||a.which===40){a.preventDefault();this.stepBack()}else if(a.which===38||a.which===39){a.preventDefault();this.stepForward()}};b.prototype.handleBlur=function n(){this.off(this.bar.el_.ownerDocument,”keydown”,this.handleKeyPress)};b.prototype.handleClick=function o(a){a.stopImmediatePropagation();a.preventDefault()};b.prototype.vertical=function p(a){if(a===undefined){return this.vertical_||false}this.vertical_=!!a;if(this.vertical_){this.addClass(“vjs-slider-vertical”)}else{this.addClass(“vjs-slider-horizontal”)}};return b}(wb);wb.registerComponent(“Slider”,Ed);var Fd=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.partEls_=[];e.on(c,”progress”,e.update);return e}b.prototype.createEl=function c(){return a.prototype.createEl.call(this,”div”,{className:”vjs-load-progress”,innerHTML:'<span class=”vjs-control-text”><span>’+this.localize(“Loaded”)+”</span>: 0%</span>”})};b.prototype.dispose=function d(){this.partEls_=null;a.prototype.dispose.call(this)};b.prototype.update=function e(a){var b=this.player_.buffered();var c=this.player_.duration();var d=this.player_.bufferedEnd();var e=this.partEls_;var f=function l(a,b){var c=a/b||0;return(c>=1?1:c)*100+”%”};this.el_.style.width=f(d,c);for(var g=0;g<b.length;g++){var h=b.start(g);var i=b.end(g);var j=e[g];if(!j){j=this.el_.appendChild(ka());e[g]=j}j.style.left=f(h,d);j.style.width=f(i-h,d)}for(var k=e.length;k>b.length;k–){this.el_.removeChild(e[k-1])}e.length=b.length};return b}(wb);wb.registerComponent(“LoadProgressBar”,Fd);var Gd=function(a){M(b,a);function b(){L(this,b);return N(this,a.apply(this,arguments))}b.prototype.createEl=function c(){return a.prototype.createEl.call(this,”div”,{className:”vjs-time-tooltip”})};b.prototype.update=function d(a,b,c){var d=ya(this.el_);var e=ya(this.player_.el());var f=a.width*b;if(!e||!d){return}var g=a.left-e.left+f;var h=a.width-f+(e.right-a.right);var i=d.width/2;if(g<i){i+=i-g}else if(h<i){i=h}if(i<0){i=0}else if(i>d.width){i=d.width}this.el_.style.right=”-“+i+”px”;la(this.el_,c)};return b}(wb);wb.registerComponent(“TimeTooltip”,Gd);var Hd=function(a){M(b,a);function b(){L(this,b);return N(this,a.apply(this,arguments))}b.prototype.createEl=function c(){return a.prototype.createEl.call(this,”div”,{className:”vjs-play-progress vjs-slider-bar”,innerHTML:'<span class=”vjs-control-text”><span>’+this.localize(“Progress”)+”</span>: 0%</span>”})};b.prototype.update=function d(a,b){var c=this;if(this.rafId_){this.cancelAnimationFrame(this.rafId_)}this.rafId_=this.requestAnimationFrame(function(){var d=c.player_.scrubbing()?c.player_.getCache().currentTime:c.player_.currentTime();var e=xd(d,c.player_.duration());var f=c.getChild(“timeTooltip”);if(f){f.update(a,b,e)}})};return b}(wb);Hd.prototype.options_={children:[]};if((!E||E>8)&&!t&&!v){Hd.prototype.options_.children.push(“timeTooltip”)}wb.registerComponent(“PlayProgressBar”,Hd);var Id=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.update=gb(fb(e,e.update),25);return e}b.prototype.createEl=function c(){return a.prototype.createEl.call(this,”div”,{className:”vjs-mouse-display”})};b.prototype.update=function d(a,b){var c=this;if(this.rafId_){this.cancelAnimationFrame(this.rafId_)}this.rafId_=this.requestAnimationFrame(function(){var d=c.player_.duration();var e=xd(b*d,d);c.el_.style.left=a.width*b+”px”;c.getChild(“timeTooltip”).update(a,b,e)})};return b}(wb);Id.prototype.options_={children:[“timeTooltip”]};wb.registerComponent(“MouseTimeDisplay”,Id);var Jd=5;var Kd=30;var Ld=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.update=gb(fb(e,e.update),Kd);e.on(c,”timeupdate”,e.update);e.on(c,”ended”,e.handleEnded);e.updateInterval=null;e.on(c,[“playing”],function(){e.clearInterval(e.updateInterval);e.updateInterval=e.setInterval(function(){e.requestAnimationFrame(function(){e.update()})},Kd)});e.on(c,[“ended”,”pause”,”waiting”],function(){e.clearInterval(e.updateInterval)});e.on(c,[“timeupdate”,”ended”],e.update);return e}b.prototype.createEl=function c(){return a.prototype.createEl.call(this,”div”,{className:”vjs-progress-holder”},{“aria-label”:this.localize(“Progress Bar”)})};b.prototype.update_=function d(a,b){var c=this.player_.duration();this.el_.setAttribute(“aria-valuenow”,(b*100).toFixed(2));this.el_.setAttribute(“aria-valuetext”,this.localize(“progress bar timing: currentTime={1} duration={2}”,[xd(a,c),xd(c,c)],”{1} of {2}”));this.bar.update(ya(this.el_),b)};b.prototype.update=function e(b){var c=a.prototype.update.call(this);this.update_(this.getCurrentTime_(),c);return c};b.prototype.getCurrentTime_=function f(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()};b.prototype.handleEnded=function g(a){this.update_(this.player_.duration(),1)};b.prototype.getPercent=function h(){var a=this.getCurrentTime_()/this.player_.duration();return a>=1?1:a};b.prototype.handleMouseDown=function i(b){if(!Ga(b)){return}this.player_.scrubbing(true);this.videoWasPlaying=!this.player_.paused();this.player_.pause();a.prototype.handleMouseDown.call(this,b)};b.prototype.handleMouseMove=function j(a){if(!Ga(a)){return}var b=this.calculateDistance(a)*this.player_.duration();if(b===this.player_.duration()){b=b-.1}this.player_.currentTime(b)};b.prototype.enable=function k(){a.prototype.enable.call(this);var b=this.getChild(“mouseTimeDisplay”);if(!b){return}b.show()};b.prototype.disable=function l(){a.prototype.disable.call(this);var b=this.getChild(“mouseTimeDisplay”);if(!b){return}b.hide()};b.prototype.handleMouseUp=function m(b){a.prototype.handleMouseUp.call(this,b);this.player_.scrubbing(false);this.player_.trigger({type:”timeupdate”,target:this,manuallyTriggered:true});if(this.videoWasPlaying){this.player_.play()}};b.prototype.stepForward=function n(){this.player_.currentTime(this.player_.currentTime()+Jd)};b.prototype.stepBack=function o(){this.player_.currentTime(this.player_.currentTime()-Jd)};b.prototype.handleAction=function p(a){if(this.player_.paused()){this.player_.play()}else{this.player_.pause()}};b.prototype.handleKeyPress=function q(b){if(b.which===32||b.which===13){b.preventDefault();this.handleAction(b)}else if(a.prototype.handleKeyPress){a.prototype.handleKeyPress.call(this,b)}};return b}(Ed);Ld.prototype.options_={children:[“loadProgressBar”,”playProgressBar”],barName:”playProgressBar”};if((!E||E>8)&&!t&&!v){Ld.prototype.options_.children.splice(1,0,”mouseTimeDisplay”)}Ld.prototype.playerEvent=”timeupdate”;wb.registerComponent(“SeekBar”,Ld);var Md=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.handleMouseMove=gb(fb(e,e.handleMouseMove),25);e.throttledHandleMouseSeek=gb(fb(e,e.handleMouseSeek),25);e.enable();return e}b.prototype.createEl=function c(){return a.prototype.createEl.call(this,”div”,{className:”vjs-progress-control vjs-control”})};b.prototype.handleMouseMove=function d(a){var b=this.getChild(“seekBar”);var c=b.getChild(“mouseTimeDisplay”);var d=b.el();var e=ya(d);var f=Aa(d,a).x;if(f>1){f=1}else if(f<0){f=0}if(c){c.update(e,f)}};b.prototype.handleMouseSeek=function e(a){var b=this.getChild(“seekBar”);b.handleMouseMove(a)};b.prototype.enabled=function f(){return this.enabled_};b.prototype.disable=function g(){this.children().forEach(function(a){return a.disable&&a.disable()});if(!this.enabled()){return}this.off([“mousedown”,”touchstart”],this.handleMouseDown);this.off(this.el_,”mousemove”,this.handleMouseMove);this.handleMouseUp();this.addClass(“disabled”);this.enabled_=false};b.prototype.enable=function h(){this.children().forEach(function(a){return a.enable&&a.enable()});if(this.enabled()){return}this.on([“mousedown”,”touchstart”],this.handleMouseDown);this.on(this.el_,”mousemove”,this.handleMouseMove);this.removeClass(“disabled”);this.enabled_=true};b.prototype.handleMouseDown=function i(a){var b=this.el_.ownerDocument;this.on(b,”mousemove”,this.throttledHandleMouseSeek);this.on(b,”touchmove”,this.throttledHandleMouseSeek);this.on(b,”mouseup”,this.handleMouseUp);this.on(b,”touchend”,this.handleMouseUp)};b.prototype.handleMouseUp=function j(a){var b=this.el_.ownerDocument;this.off(b,”mousemove”,this.throttledHandleMouseSeek);this.off(b,”touchmove”,this.throttledHandleMouseSeek);this.off(b,”mouseup”,this.handleMouseUp);this.off(b,”touchend”,this.handleMouseUp)};return b}(wb);Md.prototype.options_={children:[“seekBar”]};wb.registerComponent(“ProgressControl”,Md);var Nd=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.on(c,”fullscreenchange”,e.handleFullscreenChange);return e}b.prototype.buildCSSClass=function c(){return”vjs-fullscreen-control “+a.prototype.buildCSSClass.call(this); };b.prototype.handleFullscreenChange=function d(a){if(this.player_.isFullscreen()){this.controlText(“Non-Fullscreen”)}else{this.controlText(“Fullscreen”)}};b.prototype.handleClick=function e(a){if(!this.player_.isFullscreen()){this.player_.requestFullscreen()}else{this.player_.exitFullscreen()}};return b}(td);Nd.prototype.controlText_=”Fullscreen”;wb.registerComponent(“FullscreenToggle”,Nd);var Od=function Mf(a,b){if(b.tech_&&!b.tech_.featuresVolumeControl){a.addClass(“vjs-hidden”)}a.on(b,”loadstart”,function(){if(!b.tech_.featuresVolumeControl){a.addClass(“vjs-hidden”)}else{a.removeClass(“vjs-hidden”)}})};var Pd=function(a){M(b,a);function b(){L(this,b);return N(this,a.apply(this,arguments))}b.prototype.createEl=function c(){return a.prototype.createEl.call(this,”div”,{className:”vjs-volume-level”,innerHTML:'<span class=”vjs-control-text”></span>’})};return b}(wb);wb.registerComponent(“VolumeLevel”,Pd);var Qd=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.on(“slideractive”,e.updateLastVolume_);e.on(c,”volumechange”,e.updateARIAAttributes);c.ready(function(){return e.updateARIAAttributes()});return e}b.prototype.createEl=function c(){return a.prototype.createEl.call(this,”div”,{className:”vjs-volume-bar vjs-slider-bar”},{“aria-label”:this.localize(“Volume Level”),”aria-live”:”polite”})};b.prototype.handleMouseDown=function d(b){if(!Ga(b)){return}a.prototype.handleMouseDown.call(this,b)};b.prototype.handleMouseMove=function e(a){if(!Ga(a)){return}this.checkMuted();this.player_.volume(this.calculateDistance(a))};b.prototype.checkMuted=function f(){if(this.player_.muted()){this.player_.muted(false)}};b.prototype.getPercent=function g(){if(this.player_.muted()){return 0}return this.player_.volume()};b.prototype.stepForward=function h(){this.checkMuted();this.player_.volume(this.player_.volume()+.1)};b.prototype.stepBack=function i(){this.checkMuted();this.player_.volume(this.player_.volume()-.1)};b.prototype.updateARIAAttributes=function j(a){var b=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(“aria-valuenow”,b);this.el_.setAttribute(“aria-valuetext”,b+”%”)};b.prototype.volumeAsPercentage_=function k(){return Math.round(this.player_.volume()*100)};b.prototype.updateLastVolume_=function l(){var a=this;var b=this.player_.volume();this.one(“sliderinactive”,function(){if(a.player_.volume()===0){a.player_.lastVolume_(b)}})};return b}(Ed);Qd.prototype.options_={children:[“volumeLevel”],barName:”volumeLevel”};Qd.prototype.playerEvent=”volumechange”;wb.registerComponent(“VolumeBar”,Qd);var Rd=function(a){M(b,a);function b(c){var d=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};L(this,b);d.vertical=d.vertical||false;if(typeof d.volumeBar===”undefined”||V(d.volumeBar)){d.volumeBar=d.volumeBar||{};d.volumeBar.vertical=d.vertical}var e=N(this,a.call(this,c,d));Od(e,c);e.throttledHandleMouseMove=gb(fb(e,e.handleMouseMove),25);e.on(“mousedown”,e.handleMouseDown);e.on(“touchstart”,e.handleMouseDown);e.on(e.volumeBar,[“focus”,”slideractive”],function(){e.volumeBar.addClass(“vjs-slider-active”);e.addClass(“vjs-slider-active”);e.trigger(“slideractive”)});e.on(e.volumeBar,[“blur”,”sliderinactive”],function(){e.volumeBar.removeClass(“vjs-slider-active”);e.removeClass(“vjs-slider-active”);e.trigger(“sliderinactive”)});return e}b.prototype.createEl=function c(){var b=”vjs-volume-horizontal”;if(this.options_.vertical){b=”vjs-volume-vertical”}return a.prototype.createEl.call(this,”div”,{className:”vjs-volume-control vjs-control “+b})};b.prototype.handleMouseDown=function d(a){var b=this.el_.ownerDocument;this.on(b,”mousemove”,this.throttledHandleMouseMove);this.on(b,”touchmove”,this.throttledHandleMouseMove);this.on(b,”mouseup”,this.handleMouseUp);this.on(b,”touchend”,this.handleMouseUp)};b.prototype.handleMouseUp=function e(a){var b=this.el_.ownerDocument;this.off(b,”mousemove”,this.throttledHandleMouseMove);this.off(b,”touchmove”,this.throttledHandleMouseMove);this.off(b,”mouseup”,this.handleMouseUp);this.off(b,”touchend”,this.handleMouseUp)};b.prototype.handleMouseMove=function f(a){this.volumeBar.handleMouseMove(a)};return b}(wb);Rd.prototype.options_={children:[“volumeBar”]};wb.registerComponent(“VolumeControl”,Rd);var Sd=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));Od(e,c);e.on(c,[“loadstart”,”volumechange”],e.update);return e}b.prototype.buildCSSClass=function c(){return”vjs-mute-control “+a.prototype.buildCSSClass.call(this)};b.prototype.handleClick=function d(a){var b=this.player_.volume();var c=this.player_.lastVolume_();if(b===0){var d=c<.1?.1:c;this.player_.volume(d);this.player_.muted(false)}else{this.player_.muted(this.player_.muted()?false:true)}};b.prototype.update=function e(a){this.updateIcon_();this.updateControlText_()};b.prototype.updateIcon_=function f(){var a=this.player_.volume();var b=3;if(a===0||this.player_.muted()){b=0}else if(a<.33){b=1}else if(a<.67){b=2}for(var c=0;c<4;c++){pa(this.el_,”vjs-vol-“+c)}oa(this.el_,”vjs-vol-“+b)};b.prototype.updateControlText_=function g(){var a=this.player_.muted()||this.player_.volume()===0;var b=a?”Unmute”:”Mute”;if(this.controlText()!==b){this.controlText(b)}};return b}(td);Sd.prototype.controlText_=”Mute”;wb.registerComponent(“MuteToggle”,Sd);var Td=function(a){M(b,a);function b(c){var d=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};L(this,b);if(typeof d.inline!==”undefined”){d.inline=d.inline}else{d.inline=true}if(typeof d.volumeControl===”undefined”||V(d.volumeControl)){d.volumeControl=d.volumeControl||{};d.volumeControl.vertical=!d.inline}var e=N(this,a.call(this,c,d));Od(e,c);e.on(e.volumeControl,[“slideractive”],e.sliderActive_);e.on(e.muteToggle,”focus”,e.sliderActive_);e.on(e.volumeControl,[“sliderinactive”],e.sliderInactive_);e.on(e.muteToggle,”blur”,e.sliderInactive_);return e}b.prototype.sliderActive_=function c(){this.addClass(“vjs-slider-active”)};b.prototype.sliderInactive_=function d(){this.removeClass(“vjs-slider-active”)};b.prototype.createEl=function e(){var b=”vjs-volume-panel-horizontal”;if(!this.options_.inline){b=”vjs-volume-panel-vertical”}return a.prototype.createEl.call(this,”div”,{className:”vjs-volume-panel vjs-control “+b})};return b}(wb);Td.prototype.options_={children:[“muteToggle”,”volumeControl”]};wb.registerComponent(“VolumePanel”,Td);var Ud=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));if(d){e.menuButton_=d.menuButton}e.focusedChild_=-1;e.on(“keydown”,e.handleKeyPress);return e}b.prototype.addItem=function c(a){this.addChild(a);a.on(“click”,fb(this,function(b){if(this.menuButton_){this.menuButton_.unpressButton();if(a.name()!==”CaptionSettingsMenuItem”){this.menuButton_.focus()}}}))};b.prototype.createEl=function d(){var b=this.options_.contentElType||”ul”;this.contentEl_=ka(b,{className:”vjs-menu-content”});this.contentEl_.setAttribute(“role”,”menu”);var c=a.prototype.createEl.call(this,”div”,{append:this.contentEl_,className:”vjs-menu”});c.appendChild(this.contentEl_);Wa(c,”click”,function(a){a.preventDefault();a.stopImmediatePropagation()});return c};b.prototype.dispose=function e(){this.contentEl_=null;a.prototype.dispose.call(this)};b.prototype.handleKeyPress=function f(a){if(a.which===37||a.which===40){a.preventDefault();this.stepForward()}else if(a.which===38||a.which===39){a.preventDefault();this.stepBack()}};b.prototype.stepForward=function g(){var a=0;if(this.focusedChild_!==undefined){a=this.focusedChild_+1}this.focus(a)};b.prototype.stepBack=function h(){var a=0;if(this.focusedChild_!==undefined){a=this.focusedChild_-1}this.focus(a)};b.prototype.focus=function i(){var a=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var b=this.children().slice();var c=b.length&&b[0].className&&/vjs-menu-title/.test(b[0].className);if(c){b.shift()}if(b.length>0){if(a<0){a=0}else if(a>=b.length){a=b.length-1}this.focusedChild_=a;b[a].el_.focus()}};return b}(wb);wb.registerComponent(“Menu”,Ud);var Vd=function(a){M(b,a);function b(c){var d=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};L(this,b);var e=N(this,a.call(this,c,d));e.menuButton_=new td(c,d);e.menuButton_.controlText(e.controlText_);e.menuButton_.el_.setAttribute(“aria-haspopup”,”true”);var f=td.prototype.buildCSSClass();e.menuButton_.el_.className=e.buildCSSClass()+” “+f;e.menuButton_.removeClass(“vjs-control”);e.addChild(e.menuButton_);e.update();e.enabled_=true;e.on(e.menuButton_,”tap”,e.handleClick);e.on(e.menuButton_,”click”,e.handleClick);e.on(e.menuButton_,”focus”,e.handleFocus);e.on(e.menuButton_,”blur”,e.handleBlur);e.on(“keydown”,e.handleSubmenuKeyPress);return e}b.prototype.update=function c(){var a=this.createMenu();if(this.menu){this.menu.dispose();this.removeChild(this.menu)}this.menu=a;this.addChild(a);this.buttonPressed_=false;this.menuButton_.el_.setAttribute(“aria-expanded”,”false”);if(this.items&&this.items.length<=this.hideThreshold_){this.hide()}else{this.show()}};b.prototype.createMenu=function d(){var a=new Ud(this.player_,{menuButton:this});this.hideThreshold_=0;if(this.options_.title){var b=ka(“li”,{className:”vjs-menu-title”,innerHTML:tb(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;a.children_.unshift(b);ma(b,a.contentEl())}this.items=this.createItems();if(this.items){for(var c=0;c<this.items.length;c++){a.addItem(this.items[c])}}return a};b.prototype.createItems=function e(){};b.prototype.createEl=function f(){return a.prototype.createEl.call(this,”div”,{className:this.buildWrapperCSSClass()},{})};b.prototype.buildWrapperCSSClass=function g(){var b=”vjs-menu-button”;if(this.options_.inline===true){b+=”-inline”}else{b+=”-popup”}var c=td.prototype.buildCSSClass();return”vjs-menu-button “+b+” “+c+” “+a.prototype.buildCSSClass.call(this)};b.prototype.buildCSSClass=function h(){var b=”vjs-menu-button”;if(this.options_.inline===true){b+=”-inline”}else{b+=”-popup”}return”vjs-menu-button “+b+” “+a.prototype.buildCSSClass.call(this)};b.prototype.controlText=function i(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(a,b)};b.prototype.handleClick=function j(a){this.one(this.menu.contentEl(),”mouseleave”,fb(this,function(a){this.unpressButton();this.el_.blur()}));if(this.buttonPressed_){this.unpressButton()}else{this.pressButton()}};b.prototype.focus=function k(){this.menuButton_.focus()};b.prototype.blur=function l(){this.menuButton_.blur()};b.prototype.handleFocus=function n(){Wa(m,”keydown”,fb(this,this.handleKeyPress))};b.prototype.handleBlur=function o(){Xa(m,”keydown”,fb(this,this.handleKeyPress))};b.prototype.handleKeyPress=function p(a){if(a.which===27||a.which===9){if(this.buttonPressed_){this.unpressButton()}if(a.which!==9){a.preventDefault();this.menuButton_.el_.focus()}}else if(a.which===38||a.which===40){if(!this.buttonPressed_){this.pressButton();a.preventDefault()}}};b.prototype.handleSubmenuKeyPress=function q(a){if(a.which===27||a.which===9){if(this.buttonPressed_){this.unpressButton()}if(a.which!==9){a.preventDefault();this.menuButton_.el_.focus()}}};b.prototype.pressButton=function r(){if(this.enabled_){this.buttonPressed_=true;this.menu.lockShowing();this.menuButton_.el_.setAttribute(“aria-expanded”,”true”);if(t&&ia()){return}this.menu.focus()}};b.prototype.unpressButton=function s(){if(this.enabled_){this.buttonPressed_=false;this.menu.unlockShowing();this.menuButton_.el_.setAttribute(“aria-expanded”,”false”)}};b.prototype.disable=function u(){this.unpressButton();this.enabled_=false;this.addClass(“vjs-disabled”);this.menuButton_.disable()};b.prototype.enable=function v(){this.enabled_=true;this.removeClass(“vjs-disabled”);this.menuButton_.enable()};return b}(wb);wb.registerComponent(“MenuButton”,Vd);var Wd=function(a){M(b,a);function b(c,d){L(this,b);var e=d.tracks;var f=N(this,a.call(this,c,d));if(f.items.length<=1){f.hide()}if(!e){return N(f)}var g=fb(f,f.update);e.addEventListener(“removetrack”,g);e.addEventListener(“addtrack”,g);f.player_.on(“ready”,g);f.player_.on(“dispose”,function(){e.removeEventListener(“removetrack”,g);e.removeEventListener(“addtrack”,g)});return f}return b}(Vd);wb.registerComponent(“TrackButton”,Wd);var Xd=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.selectable=d.selectable;e.selected(d.selected);if(e.selectable){e.el_.setAttribute(“role”,”menuitemcheckbox”)}else{e.el_.setAttribute(“role”,”menuitem”)}return e}b.prototype.createEl=function c(b,d,e){this.nonIconControl=true;return a.prototype.createEl.call(this,”li”,T({className:”vjs-menu-item”,innerHTML:'<span class=”vjs-menu-item-text”>’+this.localize(this.options_.label)+”</span>”,tabIndex:-1},d),e)};b.prototype.handleClick=function d(a){this.selected(true)};b.prototype.selected=function e(a){if(this.selectable){if(a){this.addClass(“vjs-selected”);this.el_.setAttribute(“aria-checked”,”true”);this.controlText(“, selected”)}else{this.removeClass(“vjs-selected”);this.el_.setAttribute(“aria-checked”,”false”);this.controlText(“”)}}};return b}(kd);wb.registerComponent(“MenuItem”,Xd);var Yd=function(a){M(b,a);function b(c,d){L(this,b);var e=d.track;var f=c.textTracks();d.label=e.label||e.language||”Unknown”;d.selected=e.mode===”showing”;var h=N(this,a.call(this,c,d));h.track=e;var i=function l(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++){b[c]=arguments[c]}h.handleTracksChange.apply(h,b)};var j=function n(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++){b[c]=arguments[c]}h.handleSelectedLanguageChange.apply(h,b)};c.on([“loadstart”,”texttrackchange”],i);f.addEventListener(“change”,i);f.addEventListener(“selectedlanguagechange”,j);h.on(“dispose”,function(){c.off([“loadstart”,”texttrackchange”],i);f.removeEventListener(“change”,i);f.removeEventListener(“selectedlanguagechange”,j)});if(f.onchange===undefined){var k=void 0;h.on([“tap”,”click”],function(){if(K(g.Event)!==”object”){try{k=new g.Event(“change”)}catch(a){}}if(!k){k=m.createEvent(“Event”);k.initEvent(“change”,true,true)}f.dispatchEvent(k)})}h.handleTracksChange();return h}b.prototype.handleClick=function c(b){var c=this.track.kind;var d=this.track.kinds;var e=this.player_.textTracks();if(!d){d=[c]}a.prototype.handleClick.call(this,b);if(!e){return}for(var f=0;f<e.length;f++){var g=e[f];if(g===this.track&&d.indexOf(g.kind)>-1){if(g.mode!==”showing”){g.mode=”showing”}}else if(g.mode!==”disabled”){g.mode=”disabled”}}};b.prototype.handleTracksChange=function d(a){this.selected(this.track.mode===”showing”)};b.prototype.handleSelectedLanguageChange=function e(a){if(this.track.mode===”showing”){var b=this.player_.cache_.selectedLanguage;if(b&&b.enabled&&b.language===this.track.language&&b.kind!==this.track.kind){return}this.player_.cache_.selectedLanguage={enabled:true,language:this.track.language,kind:this.track.kind}}};b.prototype.dispose=function f(){this.track=null;a.prototype.dispose.call(this)};return b}(Xd);wb.registerComponent(“TextTrackMenuItem”,Yd);var Zd=function(a){M(b,a);function b(c,d){L(this,b);d.track={player:c,kind:d.kind,kinds:d.kinds,”default”:false,mode:”disabled”};if(!d.kinds){d.kinds=[d.kind]}if(d.label){d.track.label=d.label}else{d.track.label=d.kinds.join(” and “)+” off”}d.selectable=true;return N(this,a.call(this,c,d))}b.prototype.handleTracksChange=function c(a){var b=this.player().textTracks();var c=true;for(var d=0,e=b.length;d<e;d++){var f=b[d];if(this.options_.kinds.indexOf(f.kind)>-1&&f.mode===”showing”){c=false;break}}this.selected(c)};b.prototype.handleSelectedLanguageChange=function d(a){var b=this.player().textTracks();var c=true;for(var d=0,e=b.length;d<e;d++){var f=b[d];if([“captions”,”descriptions”,”subtitles”].indexOf(f.kind)>-1&&f.mode===”showing”){c=false;break}}if(c){this.player_.cache_.selectedLanguage={enabled:false}}};return b}(Yd);wb.registerComponent(“OffTextTrackMenuItem”,Zd);var $d=function(a){M(b,a);function b(c){var d=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};L(this,b);d.tracks=c.textTracks();return N(this,a.call(this,c,d))}b.prototype.createItems=function c(){var a=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Yd;var c=void 0;if(this.label_){c=this.label_+” off”}a.push(new Zd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:c}));this.hideThreshold_+=1;var d=this.player_.textTracks();if(!Array.isArray(this.kinds_)){this.kinds_=[this.kind_]}for(var e=0;e<d.length;e++){var f=d[e];if(this.kinds_.indexOf(f.kind)>-1){var g=new b(this.player_,{track:f,selectable:true});g.addClass(“vjs-“+f.kind+”-menu-item”);a.push(g)}}return a};return b}(Wd);wb.registerComponent(“TextTrackButton”,$d);var _d=function(a){M(b,a);function b(c,d){L(this,b);var e=d.track;var f=d.cue;var g=c.currentTime();d.selectable=true;d.label=f.text;d.selected=f.startTime<=g&&g<f.endTime;var h=N(this,a.call(this,c,d));h.track=e;h.cue=f;e.addEventListener(“cuechange”,fb(h,h.update));return h}b.prototype.handleClick=function c(b){a.prototype.handleClick.call(this);this.player_.currentTime(this.cue.startTime);this.update(this.cue.startTime)};b.prototype.update=function d(a){var b=this.cue;var c=this.player_.currentTime();this.selected(b.startTime<=c&&c<b.endTime)};return b}(Xd);wb.registerComponent(“ChaptersTrackMenuItem”,_d);var ae=function(a){M(b,a);function b(c,d,e){L(this,b);return N(this,a.call(this,c,d,e))}b.prototype.buildCSSClass=function c(){return”vjs-chapters-button “+a.prototype.buildCSSClass.call(this)};b.prototype.buildWrapperCSSClass=function d(){return”vjs-chapters-button “+a.prototype.buildWrapperCSSClass.call(this)};b.prototype.update=function e(b){if(!this.track_||b&&(b.type===”addtrack”||b.type===”removetrack”)){this.setTrack(this.findChaptersTrack())}a.prototype.update.call(this)};b.prototype.setTrack=function f(a){if(this.track_===a){return}if(!this.updateHandler_){this.updateHandler_=this.update.bind(this)}if(this.track_){var b=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);if(b){b.removeEventListener(“load”,this.updateHandler_)}this.track_=null}this.track_=a;if(this.track_){this.track_.mode=”hidden”;var c=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);if(c){c.addEventListener(“load”,this.updateHandler_)}}};b.prototype.findChaptersTrack=function g(){var a=this.player_.textTracks()||[];for(var b=a.length-1;b>=0;b–){var c=a[b];if(c.kind===this.kind_){return c}}};b.prototype.getMenuCaption=function h(){if(this.track_&&this.track_.label){return this.track_.label}return this.localize(tb(this.kind_))};b.prototype.createMenu=function i(){this.options_.title=this.getMenuCaption();return a.prototype.createMenu.call(this)};b.prototype.createItems=function j(){var a=[];if(!this.track_){return a}var b=this.track_.cues;if(!b){return a}for(var c=0,d=b.length;c<d;c++){var e=b[c];var f=new _d(this.player_,{track:this.track_,cue:e});a.push(f)}return a};return b}($d);ae.prototype.kind_=”chapters”;ae.prototype.controlText_=”Chapters”;wb.registerComponent(“ChaptersButton”,ae);var be=function(a){M(b,a);function b(c,d,e){L(this,b);var f=N(this,a.call(this,c,d,e));var g=c.textTracks();var h=fb(f,f.handleTracksChange);g.addEventListener(“change”,h);f.on(“dispose”,function(){g.removeEventListener(“change”,h)});return f}b.prototype.handleTracksChange=function c(a){var b=this.player().textTracks();var c=false;for(var d=0,e=b.length;d<e;d++){var f=b[d];if(f.kind!==this.kind_&&f.mode===”showing”){c=true;break}}if(c){this.disable()}else{this.enable()}};b.prototype.buildCSSClass=function d(){return”vjs-descriptions-button “+a.prototype.buildCSSClass.call(this)};b.prototype.buildWrapperCSSClass=function e(){return”vjs-descriptions-button “+a.prototype.buildWrapperCSSClass.call(this)};return b}($d);be.prototype.kind_=”descriptions”;be.prototype.controlText_=”Descriptions”;wb.registerComponent(“DescriptionsButton”,be);var ce=function(a){M(b,a);function b(c,d,e){L(this,b);return N(this,a.call(this,c,d,e))}b.prototype.buildCSSClass=function c(){return”vjs-subtitles-button “+a.prototype.buildCSSClass.call(this)};b.prototype.buildWrapperCSSClass=function d(){return”vjs-subtitles-button “+a.prototype.buildWrapperCSSClass.call(this)};return b}($d);ce.prototype.kind_=”subtitles”;ce.prototype.controlText_=”Subtitles”;wb.registerComponent(“SubtitlesButton”,ce);var de=function(a){M(b,a);function b(c,d){L(this,b);d.track={player:c,kind:d.kind,label:d.kind+” settings”,selectable:false,”default”:false,mode:”disabled”};d.selectable=false;d.name=”CaptionSettingsMenuItem”;var e=N(this,a.call(this,c,d));e.addClass(“vjs-texttrack-settings”);e.controlText(“, opens “+d.kind+” settings dialog”);return e}b.prototype.handleClick=function c(a){this.player().getChild(“textTrackSettings”).open()};return b}(Yd);wb.registerComponent(“CaptionSettingsMenuItem”,de);var ee=function(a){M(b,a);function b(c,d,e){L(this,b);return N(this,a.call(this,c,d,e))}b.prototype.buildCSSClass=function c(){return”vjs-captions-button “+a.prototype.buildCSSClass.call(this)};b.prototype.buildWrapperCSSClass=function d(){return”vjs-captions-button “+a.prototype.buildWrapperCSSClass.call(this)};b.prototype.createItems=function e(){var b=[];if(!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)){b.push(new de(this.player_,{kind:this.kind_}));this.hideThreshold_+=1}return a.prototype.createItems.call(this,b)};return b}($d);ee.prototype.kind_=”captions”;ee.prototype.controlText_=”Captions”;wb.registerComponent(“CaptionsButton”,ee);var fe=function(a){M(b,a);function b(){L(this,b);return N(this,a.apply(this,arguments))}b.prototype.createEl=function c(b,d,e){var f='<span class=”vjs-menu-item-text”>’+this.localize(this.options_.label);if(this.options_.track.kind===”captions”){f+=’\n <span aria-hidden=”true” class=”vjs-icon-placeholder”></span>\n <span class=”vjs-control-text”> ‘+this.localize(“Captions”)+”</span>\n “}f+=”</span>”;var g=a.prototype.createEl.call(this,b,T({innerHTML:f},d),e);return g};return b}(Yd);wb.registerComponent(“SubsCapsMenuItem”,fe);var ge=function(a){M(b,a);function b(c){var d=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};L(this,b);var e=N(this,a.call(this,c,d));e.label_=”subtitles”;if([“en”,”en-us”,”en-ca”,”fr-ca”].indexOf(e.player_.language_)>-1){e.label_=”captions”}e.menuButton_.controlText(tb(e.label_));return e}b.prototype.buildCSSClass=function c(){return”vjs-subs-caps-button “+a.prototype.buildCSSClass.call(this)};b.prototype.buildWrapperCSSClass=function d(){return”vjs-subs-caps-button “+a.prototype.buildWrapperCSSClass.call(this)};b.prototype.createItems=function e(){var b=[];if(!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)){b.push(new de(this.player_,{kind:this.label_}));this.hideThreshold_+=1}b=a.prototype.createItems.call(this,b,fe);return b};return b}($d);ge.prototype.kinds_=[“captions”,”subtitles”];ge.prototype.controlText_=”Subtitles”;wb.registerComponent(“SubsCapsButton”,ge);var he=function(a){M(b,a);function b(c,d){L(this,b);var e=d.track;var f=c.audioTracks();d.label=e.label||e.language||”Unknown”;d.selected=e.enabled;var g=N(this,a.call(this,c,d));g.track=e;var h=function i(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++){b[c]=arguments[c]}g.handleTracksChange.apply(g,b)};f.addEventListener(“change”,h);g.on(“dispose”,function(){f.removeEventListener(“change”,h)});return g}b.prototype.handleClick=function c(b){var c=this.player_.audioTracks();a.prototype.handleClick.call(this,b);for(var d=0;d<c.length;d++){var e=c[d];e.enabled=e===this.track}};b.prototype.handleTracksChange=function d(a){this.selected(this.track.enabled)};return b}(Xd);wb.registerComponent(“AudioTrackMenuItem”,he);var ie=function(a){M(b,a);function b(c){var d=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};L(this,b);d.tracks=c.audioTracks();return N(this,a.call(this,c,d))}b.prototype.buildCSSClass=function c(){return”vjs-audio-button “+a.prototype.buildCSSClass.call(this)};b.prototype.buildWrapperCSSClass=function d(){return”vjs-audio-button “+a.prototype.buildWrapperCSSClass.call(this)};b.prototype.createItems=function e(){var a=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];this.hideThreshold_=1;var b=this.player_.audioTracks();for(var c=0;c<b.length;c++){var d=b[c];a.push(new he(this.player_,{track:d,selectable:true}))}return a};return b}(Wd);ie.prototype.controlText_=”Audio Track”;wb.registerComponent(“AudioTrackButton”,ie);var je=function(a){M(b,a);function b(c,d){L(this,b);var e=d.rate;var f=parseFloat(e,10);d.label=e;d.selected=f===1;d.selectable=true;var g=N(this,a.call(this,c,d));g.label=e;g.rate=f;g.on(c,”ratechange”,g.update);return g}b.prototype.handleClick=function c(b){a.prototype.handleClick.call(this);this.player().playbackRate(this.rate)};b.prototype.update=function d(a){this.selected(this.player().playbackRate()===this.rate)};return b}(Xd);je.prototype.contentElType=”button”;wb.registerComponent(“PlaybackRateMenuItem”,je);var ke=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.updateVisibility();e.updateLabel();e.on(c,”loadstart”,e.updateVisibility);e.on(c,”ratechange”,e.updateLabel);return e}b.prototype.createEl=function c(){var b=a.prototype.createEl.call(this);this.labelEl_=ka(“div”,{className:”vjs-playback-rate-value”,innerHTML:”1x”});b.appendChild(this.labelEl_);return b};b.prototype.dispose=function d(){this.labelEl_=null;a.prototype.dispose.call(this)};b.prototype.buildCSSClass=function e(){return”vjs-playback-rate “+a.prototype.buildCSSClass.call(this)};b.prototype.buildWrapperCSSClass=function f(){return”vjs-playback-rate “+a.prototype.buildWrapperCSSClass.call(this)};b.prototype.createMenu=function g(){var a=new Ud(this.player());var b=this.playbackRates();if(b){for(var c=b.length-1;c>=0;c–){a.addChild(new je(this.player(),{rate:b[c]+”x”}))}}return a};b.prototype.updateARIAAttributes=function h(){this.el().setAttribute(“aria-valuenow”,this.player().playbackRate())};b.prototype.handleClick=function i(a){var b=this.player().playbackRate();var c=this.playbackRates();var d=c[0];for(var e=0;e<c.length;e++){if(c[e]>b){d=c[e];break}}this.player().playbackRate(d)};b.prototype.playbackRates=function j(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates};b.prototype.playbackRateSupported=function k(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0};b.prototype.updateVisibility=function l(a){if(this.playbackRateSupported()){this.removeClass(“vjs-hidden”)}else{this.addClass(“vjs-hidden”)}};b.prototype.updateLabel=function m(a){if(this.playbackRateSupported()){this.labelEl_.innerHTML=this.player().playbackRate()+”x”}};return b}(Vd);ke.prototype.controlText_=”Playback Rate”;wb.registerComponent(“PlaybackRateMenuButton”,ke);var le=function(a){M(b,a);function b(){L(this,b);return N(this,a.apply(this,arguments))}b.prototype.buildCSSClass=function c(){return”vjs-spacer “+a.prototype.buildCSSClass.call(this)};b.prototype.createEl=function d(){return a.prototype.createEl.call(this,”div”,{className:this.buildCSSClass()})};return b}(wb);wb.registerComponent(“Spacer”,le);var me=function(a){M(b,a);function b(){L(this,b);return N(this,a.apply(this,arguments))}b.prototype.buildCSSClass=function c(){return”vjs-custom-control-spacer “+a.prototype.buildCSSClass.call(this)};b.prototype.createEl=function d(){var b=a.prototype.createEl.call(this,{className:this.buildCSSClass()});b.innerHTML=” “;return b};return b}(le);wb.registerComponent(“CustomControlSpacer”,me);var ne=function(a){M(b,a);function b(){L(this,b);return N(this,a.apply(this,arguments))}b.prototype.createEl=function c(){return a.prototype.createEl.call(this,”div”,{className:”vjs-control-bar”,dir:”ltr”},{role:”group”})};return b}(wb);ne.prototype.options_={children:[“playToggle”,”volumePanel”,”currentTimeDisplay”,”timeDivider”,”durationDisplay”,”progressControl”,”liveDisplay”,”remainingTimeDisplay”,”customControlSpacer”,”playbackRateMenuButton”,”chaptersButton”,”descriptionsButton”,”subsCapsButton”,”audioTrackButton”,”fullscreenToggle”]};wb.registerComponent(“ControlBar”,ne);var oe=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));e.on(c,”error”,e.open);return e}b.prototype.buildCSSClass=function c(){return”vjs-error-display “+a.prototype.buildCSSClass.call(this)};b.prototype.content=function d(){var a=this.player().error();return a?this.localize(a.message):””};return b}(Ub);oe.prototype.options_=vb(Ub.prototype.options_,{pauseOnOpen:false,fillAlways:true,temporary:false,uncloseable:true});wb.registerComponent(“ErrorDisplay”,oe);var pe=”vjs-text-track-settings”;var qe=[“#000″,”Black”];var re=[“#00F”,”Blue”];var se=[“#0FF”,”Cyan”];var te=[“#0F0″,”Green”];var ue=[“#F0F”,”Magenta”];var ve=[“#F00″,”Red”];var we=[“#FFF”,”White”];var xe=[“#FF0″,”Yellow”];var ye=[“1″,”Opaque”];var ze=[“0.5″,”Semi-Transparent”];var Ae=[“0″,”Transparent”];var Be={backgroundColor:{selector:”.vjs-bg-color > select”,id:”captions-background-color-%s”,label:”Color”,options:[qe,we,ve,te,re,xe,ue,se]},backgroundOpacity:{selector:”.vjs-bg-opacity > select”,id:”captions-background-opacity-%s”,label:”Transparency”,options:[ye,ze,Ae]},color:{selector:”.vjs-fg-color > select”,id:”captions-foreground-color-%s”,label:”Color”,options:[we,qe,ve,te,re,xe,ue,se]},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 Nf(a){return a===”1.00″?null:Number(a)}},textOpacity:{selector:”.vjs-text-opacity > select”,id:”captions-foreground-opacity-%s”,label:”Transparency”,options:[ye,ze]},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:[Ae,ze,ye]}};Be.windowColor.options=Be.backgroundColor.options;function Ce(a,b){if(b){a=b(a)}if(a&&a!==”none”){return a}}function De(a,b){var c=a.options[a.options.selectedIndex].value;return Ce(c,b)}function Ee(a,b,c){if(!b){return}for(var d=0;d<a.options.length;d++){if(Ce(a.options[d].value,c)===b){a.selectedIndex=d;break}}}var Fe=function(a){M(b,a);function b(c,d){L(this,b);d.temporary=false;var e=N(this,a.call(this,c,d));e.updateDisplay=fb(e,e.updateDisplay);e.fill();e.hasBeenOpened_=e.hasBeenFilled_=true;e.endDialog=ka(“p”,{className:”vjs-control-text”,textContent:e.localize(“End of dialog window.”)});e.el().appendChild(e.endDialog);e.setDefaults();if(d.persistTextTrackSettings===undefined){e.options_.persistTextTrackSettings=e.options_.playerOptions.persistTextTrackSettings}e.on(e.$(“.vjs-done-button”),”click”,function(){e.saveSettings();e.close()});e.on(e.$(“.vjs-default-button”),”click”,function(){e.setDefaults();e.updateDisplay()});R(Be,function(a){e.on(e.$(a.selector),”change”,e.updateDisplay)});if(e.options_.persistTextTrackSettings){e.restoreSettings()}return e}b.prototype.dispose=function c(){this.endDialog=null;a.prototype.dispose.call(this)};b.prototype.createElSelect_=function d(a){var b=this;var c=arguments.length>1&&arguments[1]!==undefined?arguments[1]:””;var d=arguments.length>2&&arguments[2]!==undefined?arguments[2]:”label”;var e=Be[a];var f=e.id.replace(“%s”,this.id_);return[“<“+d+’ id=”‘+f+'” class=”‘+(d===”label”?”vjs-label”:””)+'”>’,this.localize(e.label),”</”+d+”>”,'<select aria-labelledby=”‘+(c!==””?c+” “:””)+f+'”>’].concat(e.options.map(function(a){ var d=f+”-“+a[1];return[‘<option id=”‘+d+'” value=”‘+a[0]+'” ‘,’aria-labelledby=”‘+(c!==””?c+” “:””)+f+” “+d+'”>’,b.localize(a[1]),”</option>”].join(“”)})).concat(“</select>”).join(“”)};b.prototype.createElFgColor_=function e(){var a=”captions-text-legend-“+this.id_;return[‘<fieldset class=”vjs-fg-color vjs-track-setting”>’,'<legend id=”‘+a+'”>’,this.localize(“Text”),”</legend>”,this.createElSelect_(“color”,a),'<span class=”vjs-text-opacity vjs-opacity”>’,this.createElSelect_(“textOpacity”,a),”</span>”,”</fieldset>”].join(“”)};b.prototype.createElBgColor_=function f(){var a=”captions-background-“+this.id_;return[‘<fieldset class=”vjs-bg-color vjs-track-setting”>’,'<legend id=”‘+a+'”>’,this.localize(“Background”),”</legend>”,this.createElSelect_(“backgroundColor”,a),'<span class=”vjs-bg-opacity vjs-opacity”>’,this.createElSelect_(“backgroundOpacity”,a),”</span>”,”</fieldset>”].join(“”)};b.prototype.createElWinColor_=function h(){var a=”captions-window-“+this.id_;return[‘<fieldset class=”vjs-window-color vjs-track-setting”>’,'<legend id=”‘+a+'”>’,this.localize(“Window”),”</legend>”,this.createElSelect_(“windowColor”,a),'<span class=”vjs-window-opacity vjs-opacity”>’,this.createElSelect_(“windowOpacity”,a),”</span>”,”</fieldset>”].join(“”)};b.prototype.createElColors_=function i(){return ka(“div”,{className:”vjs-track-settings-colors”,innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join(“”)})};b.prototype.createElFont_=function j(){return ka(“div”,{className:’vjs-track-settings-font”>’,innerHTML:[‘<fieldset class=”vjs-font-percent vjs-track-setting”>’,this.createElSelect_(“fontPercent”,””,”legend”),”</fieldset>”,'<fieldset class=”vjs-edge-style vjs-track-setting”>’,this.createElSelect_(“edgeStyle”,””,”legend”),”</fieldset>”,'<fieldset class=”vjs-font-family vjs-track-setting”>’,this.createElSelect_(“fontFamily”,””,”legend”),”</fieldset>”].join(“”)})};b.prototype.createElControls_=function k(){var a=this.localize(“restore all settings to the default values”);return ka(“div”,{className:”vjs-track-settings-controls”,innerHTML:[‘<button class=”vjs-default-button” title=”‘+a+'”>’,this.localize(“Reset”),'<span class=”vjs-control-text”> ‘+a+”</span>”,”</button>”,'<button class=”vjs-done-button”>’+this.localize(“Done”)+”</button>”].join(“”)})};b.prototype.content=function l(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]};b.prototype.label=function n(){return this.localize(“Caption Settings Dialog”)};b.prototype.description=function o(){return this.localize(“Beginning of dialog window. Escape will cancel and close the window.”)};b.prototype.buildCSSClass=function p(){return a.prototype.buildCSSClass.call(this)+” vjs-text-track-settings”};b.prototype.getValues=function q(){var a=this;return S(Be,function(b,c,d){var e=De(a.$(c.selector),c.parser);if(e!==undefined){b[d]=e}return b},{})};b.prototype.setValues=function r(a){var b=this;R(Be,function(c,d){Ee(b.$(c.selector),a[d],c.parser)})};b.prototype.setDefaults=function s(){var a=this;R(Be,function(b){var c=b.hasOwnProperty(“default”)?b[“default”]:0;a.$(b.selector).selectedIndex=c})};b.prototype.restoreSettings=function t(){var a=void 0;try{a=JSON.parse(g.localStorage.getItem(pe))}catch(b){$.warn(b)}if(a){this.setValues(a)}};b.prototype.saveSettings=function u(){if(!this.options_.persistTextTrackSettings){return}var a=this.getValues();try{if(Object.keys(a).length){g.localStorage.setItem(pe,JSON.stringify(a))}else{g.localStorage.removeItem(pe)}}catch(b){$.warn(b)}};b.prototype.updateDisplay=function v(){var a=this.player_.getChild(“textTrackDisplay”);if(a){a.updateDisplay()}};b.prototype.conditionalBlur_=function w(){this.previouslyActiveEl_=null;this.off(m,”keydown”,this.handleKeyDown);var a=this.player_.controlBar;var b=a&&a.subsCapsButton;var c=a&&a.captionsButton;if(b){b.focus()}else if(c){c.focus()}};return b}(Ub);wb.registerComponent(“TextTrackSettings”,Fe);var Ge=O([“Text Tracks are being loaded from another origin but the crossorigin attribute isn’t used.\n This may prevent text tracks from loading.”],[“Text Tracks are being loaded from another origin but the crossorigin attribute isn’t used.\n This may prevent text tracks from loading.”]);var He=function(a){M(b,a);function b(c,d){L(this,b);var e=N(this,a.call(this,c,d));var f=c.source;var g=false;if(f&&(e.el_.currentSrc!==f.src||c.tag&&c.tag.initNetworkState_===3)){e.setSource(f)}else{e.handleLateInit_(e.el_)}if(e.el_.hasChildNodes()){var h=e.el_.childNodes;var i=h.length;var j=[];while(i–){var k=h[i];var l=k.nodeName.toLowerCase();if(l===”track”){if(!e.featuresNativeTextTracks){j.push(k)}else{e.remoteTextTrackEls().addTrackElement_(k);e.remoteTextTracks().addTrack(k.track);e.textTracks().addTrack(k.track);if(!g&&!e.el_.hasAttribute(“crossorigin”)&&kc(k.src)){g=true}}}}for(var m=0;m<j.length;m++){e.el_.removeChild(j[m])}}e.proxyNativeTracks_();if(e.featuresNativeTextTracks&&g){$.warn(aa(Ge))}e.restoreMetadataTracksInIOSNativePlayer_();if((H||r||y)&&c.nativeControlsForTouch===true){e.setControls(true)}e.proxyWebkitFullscreen_();e.triggerReady();return e}b.prototype.dispose=function c(){b.disposeMediaElement(this.el_);this.options_=null;a.prototype.dispose.call(this)};b.prototype.restoreMetadataTracksInIOSNativePlayer_=function d(){var a=this.textTracks();var b=void 0;var c=function e(){b=[];for(var c=0;c<a.length;c++){var d=a[c];if(d.kind===”metadata”){b.push({track:d,storedMode:d.mode})}}};c();a.addEventListener(“change”,c);this.on(“dispose”,function(){return a.removeEventListener(“change”,c)});var d=function f(){for(var c=0;c<b.length;c++){var d=b[c];if(d.track.mode===”disabled”&&d.track.mode!==d.storedMode){d.track.mode=d.storedMode}}a.removeEventListener(“change”,f)};this.on(“webkitbeginfullscreen”,function(){a.removeEventListener(“change”,c);a.removeEventListener(“change”,d);a.addEventListener(“change”,d)});this.on(“webkitendfullscreen”,function(){a.removeEventListener(“change”,c);a.addEventListener(“change”,c);a.removeEventListener(“change”,d)})};b.prototype.proxyNativeTracks_=function e(){var a=this;Uc.names.forEach(function(b){var c=Uc[b];var d=a.el()[c.getterName];var e=a[c.getterName]();if(!a[“featuresNative”+c.capitalName+”Tracks”]||!d||!d.addEventListener){return}var f={change:function h(a){e.trigger({type:”change”,target:e,currentTarget:e,srcElement:e})},addtrack:function i(a){e.addTrack(a.track)},removetrack:function j(a){e.removeTrack(a.track)}};var g=function k(){var a=[];for(var b=0;b<e.length;b++){var c=false;for(var f=0;f<d.length;f++){if(d[f]===e[b]){c=true;break}}if(!c){a.push(e[b])}}while(a.length){e.removeTrack(a.shift())}};Object.keys(f).forEach(function(b){var c=f[b];d.addEventListener(b,c);a.on(“dispose”,function(a){return d.removeEventListener(b,c)})});a.on(“loadstart”,g);a.on(“dispose”,function(b){return a.off(“loadstart”,g)})})};b.prototype.createEl=function f(){var a=this.options_.tag;if(!a||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(a){var c=a.cloneNode(true);if(a.parentNode){a.parentNode.insertBefore(c,a)}b.disposeMediaElement(a);a=c}else{a=m.createElement(“video”);var d=this.options_.tag&&sa(this.options_.tag);var e=vb({},d);if(!H||this.options_.nativeControlsForTouch!==true){delete e.controls}ra(a,T(e,{id:this.options_.techId,”class”:”vjs-tech”}))}a.playerId=this.options_.playerId}if(typeof this.options_.preload!==”undefined”){ua(a,”preload”,this.options_.preload)}var f=[“loop”,”muted”,”playsinline”,”autoplay”];for(var g=0;g<f.length;g++){var h=f[g];var i=this.options_[h];if(typeof i!==”undefined”){if(i){ua(a,h,h)}else{va(a,h)}a[h]=i}}return a};b.prototype.handleLateInit_=function h(a){if(a.networkState===0||a.networkState===3){return}if(a.readyState===0){var b=false;var c=function f(){b=true};this.on(“loadstart”,c);var d=function g(){if(!b){this.trigger(“loadstart”)}};this.on(“loadedmetadata”,d);this.ready(function(){this.off(“loadstart”,c);this.off(“loadedmetadata”,d);if(!b){this.trigger(“loadstart”)}});return}var e=[“loadstart”];e.push(“loadedmetadata”);if(a.readyState>=2){e.push(“loadeddata”)}if(a.readyState>=3){e.push(“canplay”)}if(a.readyState>=4){e.push(“canplaythrough”)}this.ready(function(){e.forEach(function(a){this.trigger(a)},this)})};b.prototype.setCurrentTime=function i(a){try{this.el_.currentTime=a}catch(b){$(b,”Video is not ready. (Video.js)”)}};b.prototype.duration=function j(){var a=this;if(this.el_.duration===Infinity&&v&&B&&this.el_.currentTime===0){var b=function c(){if(a.el_.currentTime>0){if(a.el_.duration===Infinity){a.trigger(“durationchange”)}a.off(“timeupdate”,c)}};this.on(“timeupdate”,b);return NaN}return this.el_.duration||NaN};b.prototype.width=function k(){return this.el_.offsetWidth};b.prototype.height=function l(){return this.el_.offsetHeight};b.prototype.proxyWebkitFullscreen_=function n(){var a=this;if(!(“webkitDisplayingFullscreen”in this.el_)){return}var b=function d(){this.trigger(“fullscreenchange”,{isFullscreen:false})};var c=function e(){if(“webkitPresentationMode”in this.el_&&this.el_.webkitPresentationMode!==”picture-in-picture”){this.one(“webkitendfullscreen”,b);this.trigger(“fullscreenchange”,{isFullscreen:true})}};this.on(“webkitbeginfullscreen”,c);this.on(“dispose”,function(){a.off(“webkitbeginfullscreen”,c);a.off(“webkitendfullscreen”,b)})};b.prototype.supportsFullScreen=function o(){if(typeof this.el_.webkitEnterFullScreen===”function”){var a=g.navigator&&g.navigator.userAgent||””;if(/Android/.test(a)||!/Chrome|Mac OS X 10.5/.test(a)){return true}}return false};b.prototype.enterFullScreen=function p(){var a=this.el_;if(a.paused&&a.networkState<=a.HAVE_METADATA){this.el_.play();this.setTimeout(function(){a.pause();a.webkitEnterFullScreen()},0)}else{a.webkitEnterFullScreen()}};b.prototype.exitFullScreen=function q(){this.el_.webkitExitFullScreen()};b.prototype.src=function s(a){if(a===undefined){return this.el_.src}this.setSrc(a)};b.prototype.reset=function t(){b.resetMediaElement(this.el_)};b.prototype.currentSrc=function u(){if(this.currentSource_){return this.currentSource_.src}return this.el_.currentSrc};b.prototype.setControls=function w(a){this.el_.controls=!!a};b.prototype.addTextTrack=function x(b,c,d){if(!this.featuresNativeTextTracks){return a.prototype.addTextTrack.call(this,b,c,d)}return this.el_.addTextTrack(b,c,d)};b.prototype.createRemoteTextTrack=function z(b){if(!this.featuresNativeTextTracks){return a.prototype.createRemoteTextTrack.call(this,b)}var c=m.createElement(“track”);if(b.kind){c.kind=b.kind}if(b.label){c.label=b.label}if(b.language||b.srclang){c.srclang=b.language||b.srclang}if(b[“default”]){c[“default”]=b[“default”]}if(b.id){c.id=b.id}if(b.src){c.src=b.src}return c};b.prototype.addRemoteTextTrack=function A(b,c){var d=a.prototype.addRemoteTextTrack.call(this,b,c);if(this.featuresNativeTextTracks){this.el().appendChild(d)}return d};b.prototype.removeRemoteTextTrack=function C(b){a.prototype.removeRemoteTextTrack.call(this,b);if(this.featuresNativeTextTracks){var c=this.$$(“track”);var d=c.length;while(d–){if(b===c[d]||b===c[d].track){this.el().removeChild(c[d])}}}};b.prototype.getVideoPlaybackQuality=function D(){if(typeof this.el().getVideoPlaybackQuality===”function”){return this.el().getVideoPlaybackQuality()}var a={};if(typeof this.el().webkitDroppedFrameCount!==”undefined”&&typeof this.el().webkitDecodedFrameCount!==”undefined”){a.droppedVideoFrames=this.el().webkitDroppedFrameCount;a.totalVideoFrames=this.el().webkitDecodedFrameCount}if(g.performance&&typeof g.performance.now===”function”){a.creationTime=g.performance.now()}else if(g.performance&&g.performance.timing&&typeof g.performance.timing.navigationStart===”number”){a.creationTime=g.Date.now()-g.performance.timing.navigationStart}return a};return b}(Zc);if(ga()){He.TEST_VID=m.createElement(“video”);var Ie=m.createElement(“track”);Ie.kind=”captions”;Ie.srclang=”en”;Ie.label=”English”;He.TEST_VID.appendChild(Ie)}He.isSupported=function(){try{He.TEST_VID.volume=.5}catch(a){return false}return!!(He.TEST_VID&&He.TEST_VID.canPlayType)};He.canPlayType=function(a){return He.TEST_VID.canPlayType(a)};He.canPlaySource=function(a,b){return He.canPlayType(a.type)};He.canControlVolume=function(){try{var a=He.TEST_VID.volume;He.TEST_VID.volume=a/2+.1;return a!==He.TEST_VID.volume}catch(b){return false}};He.canControlPlaybackRate=function(){if(v&&B&&C<58){return false}try{var a=He.TEST_VID.playbackRate;He.TEST_VID.playbackRate=a/2+.1;return a!==He.TEST_VID.playbackRate}catch(b){return false}};He.supportsNativeTextTracks=function(){return G};He.supportsNativeVideoTracks=function(){return!!(He.TEST_VID&&He.TEST_VID.videoTracks)};He.supportsNativeAudioTracks=function(){return!!(He.TEST_VID&&He.TEST_VID.audioTracks)};He.Events=[“loadstart”,”suspend”,”abort”,”error”,”emptied”,”stalled”,”loadedmetadata”,”loadeddata”,”canplay”,”canplaythrough”,”playing”,”waiting”,”seeking”,”seeked”,”ended”,”durationchange”,”timeupdate”,”progress”,”play”,”pause”,”ratechange”,”resize”,”volumechange”];He.prototype.featuresVolumeControl=He.canControlVolume();He.prototype.featuresPlaybackRate=He.canControlPlaybackRate();He.prototype.movingMediaElementInDOM=!t;He.prototype.featuresFullscreenResize=true;He.prototype.featuresProgressEvents=true;He.prototype.featuresTimeupdateEvents=true;He.prototype.featuresNativeTextTracks=He.supportsNativeTextTracks();He.prototype.featuresNativeVideoTracks=He.supportsNativeVideoTracks();He.prototype.featuresNativeAudioTracks=He.supportsNativeAudioTracks();var Je=He.TEST_VID&&He.TEST_VID.constructor.prototype.canPlayType;var Ke=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;var Le=/^video\/mp4/i;He.patchCanPlayType=function(){if(w>=4&&!z){He.TEST_VID.constructor.prototype.canPlayType=function(a){if(a&&Ke.test(a)){return”maybe”}return Je.call(this,a)}}else if(x){He.TEST_VID.constructor.prototype.canPlayType=function(a){if(a&&Le.test(a)){return”maybe”}return Je.call(this,a)}}};He.unpatchCanPlayType=function(){var a=He.TEST_VID.constructor.prototype.canPlayType;He.TEST_VID.constructor.prototype.canPlayType=Je;return a};He.patchCanPlayType();He.disposeMediaElement=function(a){if(!a){return}if(a.parentNode){a.parentNode.removeChild(a)}while(a.hasChildNodes()){a.removeChild(a.firstChild)}a.removeAttribute(“src”);if(typeof a.load===”function”){(function(){try{a.load()}catch(b){}})()}};He.resetMediaElement=function(a){if(!a){return}var b=a.querySelectorAll(“source”);var c=b.length;while(c–){a.removeChild(b[c])}a.removeAttribute(“src”);if(typeof a.load===”function”){(function(){try{a.load()}catch(b){}})()}};[“muted”,”defaultMuted”,”autoplay”,”controls”,”loop”,”playsinline”].forEach(function(a){He.prototype[a]=function(){return this.el_[a]||this.el_.hasAttribute(a)}});[“muted”,”defaultMuted”,”autoplay”,”loop”,”playsinline”].forEach(function(a){He.prototype[“set”+tb(a)]=function(b){this.el_[a]=b;if(b){this.el_.setAttribute(a,a)}else{this.el_.removeAttribute(a)}}});[“paused”,”currentTime”,”buffered”,”volume”,”poster”,”preload”,”error”,”seeking”,”seekable”,”ended”,”playbackRate”,”defaultPlaybackRate”,”played”,”networkState”,”readyState”,”videoWidth”,”videoHeight”].forEach(function(a){He.prototype[a]=function(){return this.el_[a]}});[“volume”,”src”,”poster”,”preload”,”playbackRate”,”defaultPlaybackRate”].forEach(function(a){He.prototype[“set”+tb(a)]=function(b){this.el_[a]=b}});[“pause”,”load”,”play”].forEach(function(a){He.prototype[a]=function(){return this.el_[a]()}});Zc.withSourceHandlers(He);He.nativeSourceHandler={};He.nativeSourceHandler.canPlayType=function(a){try{return He.TEST_VID.canPlayType(a)}catch(b){return””}};He.nativeSourceHandler.canHandleSource=function(a,b){if(a.type){return He.nativeSourceHandler.canPlayType(a.type)}else if(a.src){var c=jc(a.src);return He.nativeSourceHandler.canPlayType(“video/”+c)}return””};He.nativeSourceHandler.handleSource=function(a,b,c){b.setSrc(a.src)};He.nativeSourceHandler.dispose=function(){};He.registerSourceHandler(He.nativeSourceHandler);Zc.registerTech(“Html5”,He);var Me=O([“\n Using the tech directly can be dangerous. I hope you know what you’re doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n “],[“\n Using the tech directly can be dangerous. I hope you know what you’re doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n “]);var Ne=[“progress”,”abort”,”suspend”,”emptied”,”stalled”,”loadedmetadata”,”loadeddata”,”timeupdate”,”ratechange”,”resize”,”volumechange”,”texttrackchange”];var Oe=function(a){M(b,a);function b(d,e,f){L(this,b);d.id=d.id||”vjs_video_”+La();e=T(b.getTagSettings(d),e);e.initChildren=false;e.createEl=false;e.evented=false;e.reportTouchActivity=false;if(!e.language){if(typeof d.closest===”function”){var g=d.closest(“[lang]”);if(g&&g.getAttribute){e.language=g.getAttribute(“lang”)}}else{var h=d;while(h&&h.nodeType===1){if(sa(h).hasOwnProperty(“lang”)){e.language=h.getAttribute(“lang”);break}h=h.parentNode}}}var i=N(this,a.call(this,null,e,f));i.isReady_=false;i.hasStarted_=false;i.userActive_=false;if(!i.options_||!i.options_.techOrder||!i.options_.techOrder.length){throw new Error(“No techOrder specified. Did you overwrite “+”videojs.options instead of just changing the “+”properties you want to override?”)}i.tag=d;i.tagAttributes=d&&sa(d);i.language(i.options_.language);if(e.languages){var j={};Object.getOwnPropertyNames(e.languages).forEach(function(a){j[a.toLowerCase()]=e.languages[a]});i.languages_=j}else{i.languages_=b.prototype.options_.languages}i.cache_={};i.poster_=e.poster||””;i.controls_=!!e.controls;i.cache_.lastVolume=1;d.controls=false;d.removeAttribute(“controls”);i.scrubbing_=false;i.el_=i.createEl();qb(i,{eventBusKey:”el_”});var k=vb(i.options_);if(e.plugins){var l=e.plugins;Object.keys(l).forEach(function(a){if(typeof this[a]===”function”){this[a](l[a])}else{throw new Error(‘plugin “‘+a+'” does not exist’)}},i)}i.options_.playerOptions=k;i.middleware_=[];i.initChildren();i.isAudio(d.nodeName.toLowerCase()===”audio”);if(i.controls()){i.addClass(“vjs-controls-enabled”)}else{i.addClass(“vjs-controls-disabled”)}i.el_.setAttribute(“role”,”region”);if(i.isAudio()){i.el_.setAttribute(“aria-label”,i.localize(“Audio Player”))}else{i.el_.setAttribute(“aria-label”,i.localize(“Video Player”))}if(i.isAudio()){i.addClass(“vjs-audio”)}if(i.flexNotSupported_()){i.addClass(“vjs-no-flex”)}if(!t){i.addClass(“vjs-workinghover”)}b.players[i.id_]=i;var m=c.split(“.”)[0];i.addClass(“vjs-v”+m);i.userActive(true);i.reportUserActivity();i.listenForUserActivity_();i.on(“fullscreenchange”,i.handleFullscreenChange_);i.on(“stageclick”,i.handleStageClick_);i.changingSrc_=false;i.playWaitingForReady_=false;i.playOnLoadstart_=null;i.forceAutoplayInChrome_();return i}b.prototype.dispose=function d(){this.trigger(“dispose”);this.off(“dispose”);if(this.styleEl_&&this.styleEl_.parentNode){this.styleEl_.parentNode.removeChild(this.styleEl_);this.styleEl_=null}b.players[this.id_]=null;if(this.tag&&this.tag.player){this.tag.player=null}if(this.el_&&this.el_.player){this.el_.player=null}if(this.tech_){this.tech_.dispose()}if(this.playerElIngest_){this.playerElIngest_=null}if(this.tag){this.tag=null}a.prototype.dispose.call(this)};b.prototype.createEl=function e(){var b=this.tag;var c=void 0;var d=this.playerElIngest_=b.parentNode&&b.parentNode.hasAttribute&&b.parentNode.hasAttribute(“data-vjs-player”);var e=this.tag.tagName.toLowerCase()===”video-js”;if(d){c=this.el_=b.parentNode}else if(!e){c=this.el_=a.prototype.createEl.call(this,”div”)}var f=sa(b);if(e){c=this.el_=b;b=this.tag=m.createElement(“video”);while(c.children.length){b.appendChild(c.firstChild)}if(!na(c,”video-js”)){oa(c,”video-js”)}c.appendChild(b);d=this.playerElIngest_=c}b.setAttribute(“tabindex”,”-1″);b.removeAttribute(“width”);b.removeAttribute(“height”);Object.getOwnPropertyNames(f).forEach(function(a){if(a===”class”){c.className+=” “+f[a];if(e){b.className+=” “+f[a]}}else{c.setAttribute(a,f[a]);if(e){b.setAttribute(a,f[a])}}});b.playerId=b.id;b.id+=”_html5_api”;b.className=”vjs-tech”;b.player=c.player=this;this.addClass(“vjs-paused”);if(g.VIDEOJS_NO_DYNAMIC_STYLE!==true){this.styleEl_=db(“vjs-styles-dimensions”);var h=Ha(“.vjs-styles-defaults”);var i=Ha(“head”);i.insertBefore(this.styleEl_,h?h.nextSibling:i.firstChild)}this.width(this.options_.width);this.height(this.options_.height);this.fluid(this.options_.fluid);this.aspectRatio(this.options_.aspectRatio);var j=b.getElementsByTagName(“a”);for(var k=0;k<j.length;k++){var l=j.item(k);oa(l,”vjs-hidden”);l.setAttribute(“hidden”,”hidden”)}b.initNetworkState_=b.networkState;if(b.parentNode&&!d){b.parentNode.insertBefore(c,b)}ma(b,c);this.children_.unshift(b);this.el_.setAttribute(“lang”,this.language_);this.el_=c;return c};b.prototype.width=function f(a,b){return this.dimension(“width”,a,b)};b.prototype.height=function h(a,b){return this.dimension(“height”,a,b)};b.prototype.dimension=function i(a,b,c){var d=a+”_”;if(b===undefined){return this[d]||0}if(b===””){this[d]=undefined;this.updateStyleEl_();return}var e=parseFloat(b);if(isNaN(e)){$.error(‘Improper value “‘+b+'” supplied for for ‘+a);return}this[d]=e;this.updateStyleEl_();if(this.isReady_&&!c){this.trigger(“playerresize”)}};b.prototype.fluid=function j(a){if(a===undefined){return!!this.fluid_}this.fluid_=!!a;if(a){this.addClass(“vjs-fluid”)}else{this.removeClass(“vjs-fluid”)}this.updateStyleEl_()};b.prototype.aspectRatio=function k(a){if(a===undefined){return this.aspectRatio_}if(!/^\d+\:\d+$/.test(a)){throw new Error(“Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.”)}this.aspectRatio_=a;this.fluid(true);this.updateStyleEl_()};b.prototype.updateStyleEl_=function l(){if(g.VIDEOJS_NO_DYNAMIC_STYLE===true){var a=typeof this.width_===”number”?this.width_:this.options_.width;var b=typeof this.height_===”number”?this.height_:this.options_.height;var c=this.tech_&&this.tech_.el();if(c){if(a>=0){c.width=a}if(b>=0){c.height=b}}return}var d=void 0;var e=void 0;var f=void 0;var h=void 0;if(this.aspectRatio_!==undefined&&this.aspectRatio_!==”auto”){f=this.aspectRatio_}else if(this.videoWidth()>0){f=this.videoWidth()+”:”+this.videoHeight()}else{f=”16:9″}var i=f.split(“:”);var j=i[1]/i[0];if(this.width_!==undefined){d=this.width_}else if(this.height_!==undefined){d=this.height_/j}else{d=this.videoWidth()||300}if(this.height_!==undefined){e=this.height_}else{e=d*j}if(/^[^a-zA-Z]/.test(this.id())){h=”dimensions-“+this.id()}else{h=this.id()+”-dimensions”}this.addClass(h);eb(this.styleEl_,”\n .”+h+” {\n width: “+d+”px;\n height: “+e+”px;\n }\n\n .”+h+”.vjs-fluid {\n padding-top: “+j*100+”%;\n }\n “)};b.prototype.loadTech_=function n(a,b){var c=this;if(this.tech_){this.unloadTech_()}var d=tb(a);var e=a.charAt(0).toLowerCase()+a.slice(1);if(d!==”Html5″&&this.tag){Zc.getTech(“Html5″).disposeMediaElement(this.tag);this.tag.player=null;this.tag=null}this.techName_=d;this.isReady_=false;var f={source:b,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+”_”+d+”_api”,autoplay:this.options_.autoplay,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||false,”vtt.js”:this.options_[“vtt.js”]};Wc.names.forEach(function(a){var b=Wc[a];f[b.getterName]=c[b.privateName]});T(f,this.options_[d]);T(f,this.options_[e]);T(f,this.options_[a.toLowerCase()]);if(this.tag){f.tag=this.tag}if(b&&b.src===this.cache_.src&&this.cache_.currentTime>0){f.startTime=this.cache_.currentTime}var g=Zc.getTech(a);if(!g){throw new Error(“No Tech named ‘”+d+”‘ exists! ‘”+d+”‘ should be registered using videojs.registerTech()'”)}this.tech_=new g(f);this.tech_.ready(fb(this,this.handleTechReady_),true);Rb.jsonToTextTracks(this.textTracksJson_||[],this.tech_);Ne.forEach(function(a){c.on(c.tech_,a,c[“handleTech”+tb(a)+”_”])});this.on(this.tech_,”loadstart”,this.handleTechLoadStart_);this.on(this.tech_,”waiting”,this.handleTechWaiting_);this.on(this.tech_,”canplay”,this.handleTechCanPlay_);this.on(this.tech_,”canplaythrough”,this.handleTechCanPlayThrough_);this.on(this.tech_,”playing”,this.handleTechPlaying_);this.on(this.tech_,”ended”,this.handleTechEnded_);this.on(this.tech_,”seeking”,this.handleTechSeeking_);this.on(this.tech_,”seeked”,this.handleTechSeeked_);this.on(this.tech_,”play”,this.handleTechPlay_);this.on(this.tech_,”firstplay”,this.handleTechFirstPlay_);this.on(this.tech_,”pause”,this.handleTechPause_);this.on(this.tech_,”durationchange”,this.handleTechDurationChange_);this.on(this.tech_,”fullscreenchange”,this.handleTechFullscreenChange_);this.on(this.tech_,”error”,this.handleTechError_);this.on(this.tech_,”loadedmetadata”,this.updateStyleEl_);this.on(this.tech_,”posterchange”,this.handleTechPosterChange_);this.on(this.tech_,”textdata”,this.handleTechTextData_);this.usingNativeControls(this.techGet_(“controls”));if(this.controls()&&!this.usingNativeControls()){this.addTechControlsListeners_()}if(this.tech_.el().parentNode!==this.el()&&(d!==”Html5″||!this.tag)){ma(this.tech_.el(),this.el())}if(this.tag){this.tag.player=null;this.tag=null}};b.prototype.unloadTech_=function o(){var a=this;Wc.names.forEach(function(b){var c=Wc[b];a[c.privateName]=a[c.getterName]()});this.textTracksJson_=Rb.textTracksToJson(this.tech_);this.isReady_=false;this.tech_.dispose();this.tech_=false};b.prototype.tech=function p(a){if(a===undefined){$.warn(aa(Me))}return this.tech_};b.prototype.addTechControlsListeners_=function q(){this.removeTechControlsListeners_();this.on(this.tech_,”mousedown”,this.handleTechClick_);this.on(this.tech_,”touchstart”,this.handleTechTouchStart_);this.on(this.tech_,”touchmove”,this.handleTechTouchMove_);this.on(this.tech_,”touchend”,this.handleTechTouchEnd_);this.on(this.tech_,”tap”,this.handleTechTap_)};b.prototype.removeTechControlsListeners_=function r(){this.off(this.tech_,”tap”,this.handleTechTap_);this.off(this.tech_,”touchstart”,this.handleTechTouchStart_);this.off(this.tech_,”touchmove”,this.handleTechTouchMove_);this.off(this.tech_,”touchend”,this.handleTechTouchEnd_);this.off(this.tech_,”mousedown”,this.handleTechClick_)};b.prototype.handleTechReady_=function s(){this.triggerReady();if(this.cache_.volume){this.techCall_(“setVolume”,this.cache_.volume)}this.handleTechPosterChange_();this.handleTechDurationChange_();if((this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused()){try{delete this.tag.poster}catch(a){$(“deleting tag.poster throws in some browsers”,a)}}};b.prototype.handleTechLoadStart_=function u(){this.removeClass(“vjs-ended”);this.removeClass(“vjs-seeking”);this.error(null);if(!this.paused()){this.trigger(“loadstart”);this.trigger(“firstplay”)}else{this.hasStarted(false);this.trigger(“loadstart”)}};b.prototype.hasStarted=function w(a){if(a===undefined){return this.hasStarted_}if(a===this.hasStarted_){return}this.hasStarted_=a;if(this.hasStarted_){this.addClass(“vjs-has-started”);this.trigger(“firstplay”)}else{this.removeClass(“vjs-has-started”)}};b.prototype.handleTechPlay_=function x(){this.removeClass(“vjs-ended”);this.removeClass(“vjs-paused”);this.addClass(“vjs-playing”);this.hasStarted(true);this.trigger(“play”)};b.prototype.handleTechWaiting_=function y(){var a=this;this.addClass(“vjs-waiting”);this.trigger(“waiting”);this.one(“timeupdate”,function(){return a.removeClass(“vjs-waiting”)})};b.prototype.handleTechCanPlay_=function z(){this.removeClass(“vjs-waiting”);this.trigger(“canplay”)};b.prototype.handleTechCanPlayThrough_=function A(){this.removeClass(“vjs-waiting”);this.trigger(“canplaythrough”)};b.prototype.handleTechPlaying_=function C(){this.removeClass(“vjs-waiting”);this.trigger(“playing”)};b.prototype.handleTechSeeking_=function D(){this.addClass(“vjs-seeking”);this.trigger(“seeking”)};b.prototype.handleTechSeeked_=function E(){this.removeClass(“vjs-seeking”);this.trigger(“seeked”)};b.prototype.handleTechFirstPlay_=function F(){if(this.options_.starttime){$.warn(“Passing the `starttime` option to the player will be deprecated in 6.0”);this.currentTime(this.options_.starttime)}this.addClass(“vjs-has-started”);this.trigger(“firstplay”)};b.prototype.handleTechPause_=function G(){this.removeClass(“vjs-playing”);this.addClass(“vjs-paused”);this.trigger(“pause”)};b.prototype.handleTechEnded_=function H(){this.addClass(“vjs-ended”);if(this.options_.loop){this.currentTime(0);this.play()}else if(!this.paused()){this.pause()}this.trigger(“ended”)};b.prototype.handleTechDurationChange_=function I(){this.duration(this.techGet_(“duration”))};b.prototype.handleTechClick_=function J(a){if(!Ga(a)){return}if(!this.controls_){return}if(this.paused()){this.play()}else{this.pause()}};b.prototype.handleTechTap_=function K(){this.userActive(!this.userActive())};b.prototype.handleTechTouchStart_=function O(){this.userWasActive=this.userActive()};b.prototype.handleTechTouchMove_=function P(){if(this.userWasActive){this.reportUserActivity()}};b.prototype.handleTechTouchEnd_=function Q(a){a.preventDefault()};b.prototype.handleFullscreenChange_=function R(){if(this.isFullscreen()){this.addClass(“vjs-fullscreen”)}else{this.removeClass(“vjs-fullscreen”)}};b.prototype.handleStageClick_=function S(){this.reportUserActivity()};b.prototype.handleTechFullscreenChange_=function U(a,b){if(b){this.isFullscreen(b.isFullscreen)}this.trigger(“fullscreenchange”)};b.prototype.handleTechError_=function V(){var a=this.tech_.error();this.error(a)};b.prototype.handleTechTextData_=function W(){var a=null;if(arguments.length>1){a=arguments[1]}this.trigger(“textdata”,a)};b.prototype.getCache=function X(){return this.cache_};b.prototype.techCall_=function Y(a,b){this.ready(function(){if(a in fd){return dd(this.middleware_,this.tech_,a,b)}try{if(this.tech_){this.tech_[a](b)}}catch(c){$(c);throw c}},true)};b.prototype.techGet_=function Z(a){if(!this.tech_||!this.tech_.isReady_){return}if(a in ed){return cd(this.middleware_,this.tech_,a)}try{return this.tech_[a]()}catch(b){if(this.tech_[a]===undefined){$(“Video.js: “+a+” method not defined for “+this.techName_+” playback technology.”,b);throw b}if(b.name===”TypeError”){$(“Video.js: “+a+” unavailable on “+this.techName_+” playback technology element.”,b);this.tech_.isReady_=false;throw b}$(b);throw b}};b.prototype.play=function _(){var a=this;if(this.playOnLoadstart_){this.off(“loadstart”,this.playOnLoadstart_)}if(!this.isReady_){if(this.playWaitingForReady_){return}this.playWaitingForReady_=true;this.ready(function(){a.playWaitingForReady_=false;Nb(a.play())})}else if(!this.changingSrc_&&(this.src()||this.currentSrc())){return this.techGet_(“play”)}else{this.playOnLoadstart_=function(){a.playOnLoadstart_=null;Nb(a.play())};this.one(“loadstart”,this.playOnLoadstart_)}};b.prototype.pause=function ba(){this.techCall_(“pause”)};b.prototype.paused=function ca(){return this.techGet_(“paused”)===false?false:true};b.prototype.played=function da(){return this.techGet_(“played”)||Ab(0,0)};b.prototype.scrubbing=function ea(a){if(typeof a===”undefined”){return this.scrubbing_}this.scrubbing_=!!a;if(a){this.addClass(“vjs-scrubbing”)}else{this.removeClass(“vjs-scrubbing”)}};b.prototype.currentTime=function fa(a){if(typeof a!==”undefined”){if(a<0){a=0}this.techCall_(“setCurrentTime”,a);return}this.cache_.currentTime=this.techGet_(“currentTime”)||0;return this.cache_.currentTime};b.prototype.duration=function ga(a){if(a===undefined){return this.cache_.duration!==undefined?this.cache_.duration:NaN}a=parseFloat(a);if(a<0){a=Infinity}if(a!==this.cache_.duration){this.cache_.duration=a;if(a===Infinity){this.addClass(“vjs-live”)}else{this.removeClass(“vjs-live”)}this.trigger(“durationchange”)}};b.prototype.remainingTime=function ha(){return this.duration()-this.currentTime()};b.prototype.remainingTimeDisplay=function ia(){return Math.floor(this.duration())-Math.floor(this.currentTime())};b.prototype.buffered=function ja(){var ja=this.techGet_(“buffered”); if(!ja||!ja.length){ja=Ab(0,0)}return ja};b.prototype.bufferedPercent=function ka(){return Bb(this.buffered(),this.duration())};b.prototype.bufferedEnd=function la(){var a=this.buffered();var b=this.duration();var c=a.end(a.length-1);if(c>b){c=b}return c};b.prototype.volume=function qa(a){var b=void 0;if(a!==undefined){b=Math.max(0,Math.min(1,parseFloat(a)));this.cache_.volume=b;this.techCall_(“setVolume”,b);if(b>0){this.lastVolume_(b)}return}b=parseFloat(this.techGet_(“volume”));return isNaN(b)?1:b};b.prototype.muted=function ra(a){if(a!==undefined){this.techCall_(“setMuted”,a);return}return this.techGet_(“muted”)||false};b.prototype.defaultMuted=function ta(a){if(a!==undefined){return this.techCall_(“setDefaultMuted”,a)}return this.techGet_(“defaultMuted”)||false};b.prototype.lastVolume_=function ua(a){if(a!==undefined&&a!==0){this.cache_.lastVolume=a;return}return this.cache_.lastVolume};b.prototype.supportsFullScreen=function va(){return this.techGet_(“supportsFullScreen”)||false};b.prototype.isFullscreen=function wa(a){if(a!==undefined){this.isFullscreen_=!!a;return}return!!this.isFullscreen_};b.prototype.requestFullscreen=function xa(){var a=Cb;this.isFullscreen(true);if(a.requestFullscreen){Wa(m,a.fullscreenchange,fb(this,function b(c){this.isFullscreen(m[a.fullscreenElement]);if(this.isFullscreen()===false){Xa(m,a.fullscreenchange,b)}this.trigger(“fullscreenchange”)}));this.el_[a.requestFullscreen]()}else if(this.tech_.supportsFullScreen()){this.techCall_(“enterFullScreen”)}else{this.enterFullWindow();this.trigger(“fullscreenchange”)}};b.prototype.exitFullscreen=function ya(){var a=Cb;this.isFullscreen(false);if(a.requestFullscreen){m[a.exitFullscreen]()}else if(this.tech_.supportsFullScreen()){this.techCall_(“exitFullScreen”)}else{this.exitFullWindow();this.trigger(“fullscreenchange”)}};b.prototype.enterFullWindow=function za(){this.isFullWindow=true;this.docOrigOverflow=m.documentElement.style.overflow;Wa(m,”keydown”,fb(this,this.fullWindowOnEscKey));m.documentElement.style.overflow=”hidden”;oa(m.body,”vjs-full-window”);this.trigger(“enterFullWindow”)};b.prototype.fullWindowOnEscKey=function Aa(a){if(a.keyCode===27){if(this.isFullscreen()===true){this.exitFullscreen()}else{this.exitFullWindow()}}};b.prototype.exitFullWindow=function Ba(){this.isFullWindow=false;Xa(m,”keydown”,this.fullWindowOnEscKey);m.documentElement.style.overflow=this.docOrigOverflow;pa(m.body,”vjs-full-window”);this.trigger(“exitFullWindow”)};b.prototype.canPlayType=function Ca(a){var b=void 0;for(var c=0,d=this.options_.techOrder;c<d.length;c++){var e=d[c];var f=Zc.getTech(e);if(!f){f=wb.getComponent(e)}if(!f){$.error(‘The “‘+e+'” tech is undefined. Skipped browser support check for that tech.’);continue}if(f.isSupported()){b=f.canPlayType(a);if(b){return b}}}return””};b.prototype.selectSource=function Da(a){var b=this;var c=this.options_.techOrder.map(function(a){return[a,Zc.getTech(a)]}).filter(function(a){var b=a[0],c=a[1];if(c){return c.isSupported()}$.error(‘The “‘+b+'” tech is undefined. Skipped browser support check for that tech.’);return false});var d=function h(a,b,c){var d=void 0;a.some(function(a){return b.some(function(b){d=c(a,b);if(d){return true}})});return d};var e=void 0;var f=function i(a){return function(b,c){return a(c,b)}};var g=function j(a,c){var d=a[0],e=a[1];if(e.canPlaySource(c,b.options_[d.toLowerCase()])){return{source:c,tech:d}}};if(this.options_.sourceOrder){e=d(a,c,f(g))}else{e=d(c,a,g)}return e||false};b.prototype.src=function Ea(a){var b=this;if(typeof a===”undefined”){return this.cache_.src||””}var c=id(a);if(!c.length){this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0);return}this.cache_.sources=c;this.changingSrc_=true;this.cache_.source=c[0];ad(this,c[0],function(a,d){b.middleware_=d;var e=b.src_(a);if(e){if(c.length>1){return b.src(c.slice(1))}b.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0);b.triggerReady();return}b.changingSrc_=false;b.cache_.src=a.src;bd(d,b.tech_)})};b.prototype.src_=function Fa(a){var b=this.selectSource([a]);if(!b){return true}if(!ub(b.tech,this.techName_)){this.changingSrc_=true;this.loadTech_(b.tech,b.source);return false}this.ready(function(){if(this.tech_.constructor.prototype.hasOwnProperty(“setSource”)){this.techCall_(“setSource”,a)}else{this.techCall_(“src”,a.src)}if(this.options_.preload===”auto”){this.load()}},true);return false};b.prototype.load=function Ia(){this.techCall_(“load”)};b.prototype.reset=function Ja(){this.loadTech_(this.options_.techOrder[0],null);this.techCall_(“reset”)};b.prototype.currentSources=function Ka(){var a=this.currentSource();var b=[];if(Object.keys(a).length!==0){b.push(a)}return this.cache_.sources||b};b.prototype.currentSource=function Ma(){return this.cache_.source||{}};b.prototype.currentSrc=function Na(){return this.currentSource()&&this.currentSource().src||””};b.prototype.currentType=function Oa(){return this.currentSource()&&this.currentSource().type||””};b.prototype.preload=function Pa(a){if(a!==undefined){this.techCall_(“setPreload”,a);this.options_.preload=a;return}return this.techGet_(“preload”)};b.prototype.autoplay=function Qa(a){if(a!==undefined){this.techCall_(“setAutoplay”,a);this.options_.autoplay=a;this.ready(this.forceAutoplayInChrome_);return}return this.techGet_(“autoplay”,a)};b.prototype.forceAutoplayInChrome_=function Ra(){if(this.paused()&&(this.autoplay()||this.options_.autoplay)&&B&&!v){this.play()}};b.prototype.playsinline=function Sa(a){if(a!==undefined){this.techCall_(“setPlaysinline”,a);this.options_.playsinline=a;return this}return this.techGet_(“playsinline”)};b.prototype.loop=function Ta(a){if(a!==undefined){this.techCall_(“setLoop”,a);this.options_.loop=a;return}return this.techGet_(“loop”)};b.prototype.poster=function Ua(a){if(a===undefined){return this.poster_}if(!a){a=””}this.poster_=a;this.techCall_(“setPoster”,a);this.trigger(“posterchange”)};b.prototype.handleTechPosterChange_=function Va(){if(!this.poster_&&this.tech_&&this.tech_.poster){this.poster_=this.tech_.poster()||””;this.trigger(“posterchange”)}};b.prototype.controls=function Ya(a){if(a===undefined){return!!this.controls_}a=!!a;if(this.controls_===a){return}this.controls_=a;if(this.usingNativeControls()){this.techCall_(“setControls”,a)}if(this.controls_){this.removeClass(“vjs-controls-disabled”);this.addClass(“vjs-controls-enabled”);this.trigger(“controlsenabled”);if(!this.usingNativeControls()){this.addTechControlsListeners_()}}else{this.removeClass(“vjs-controls-enabled”);this.addClass(“vjs-controls-disabled”);this.trigger(“controlsdisabled”);if(!this.usingNativeControls()){this.removeTechControlsListeners_()}}};b.prototype.usingNativeControls=function Za(a){if(a===undefined){return!!this.usingNativeControls_}a=!!a;if(this.usingNativeControls_===a){return}this.usingNativeControls_=a;if(this.usingNativeControls_){this.addClass(“vjs-using-native-controls”);this.trigger(“usingnativecontrols”)}else{this.removeClass(“vjs-using-native-controls”);this.trigger(“usingcustomcontrols”)}};b.prototype.error=function $a(a){if(a===undefined){return this.error_||null}if(a===null){this.error_=a;this.removeClass(“vjs-error”);if(this.errorDisplay){this.errorDisplay.close()}return}this.error_=new Ib(a);this.addClass(“vjs-error”);$.error(“(CODE:”+this.error_.code+” “+Ib.errorTypes[this.error_.code]+”)”,this.error_.message,this.error_);this.trigger(“error”);return};b.prototype.reportUserActivity=function _a(a){this.userActivity_=true};b.prototype.userActive=function ab(a){if(a===undefined){return this.userActive_}a=!!a;if(a===this.userActive_){return}this.userActive_=a;if(this.userActive_){this.userActivity_=true;this.removeClass(“vjs-user-inactive”);this.addClass(“vjs-user-active”);this.trigger(“useractive”);return}if(this.tech_){this.tech_.one(“mousemove”,function(a){a.stopPropagation();a.preventDefault()})}this.userActivity_=false;this.removeClass(“vjs-user-active”);this.addClass(“vjs-user-inactive”);this.trigger(“userinactive”)};b.prototype.listenForUserActivity_=function bb(){var a=void 0;var b=void 0;var c=void 0;var d=fb(this,this.reportUserActivity);var e=function i(a){if(a.screenX!==b||a.screenY!==c){b=a.screenX;c=a.screenY;d()}};var f=function j(){d();this.clearInterval(a);a=this.setInterval(d,250)};var g=function k(b){d();this.clearInterval(a)};this.on(“mousedown”,f);this.on(“mousemove”,e);this.on(“mouseup”,g);this.on(“keydown”,d);this.on(“keyup”,d);var h=void 0;this.setInterval(function(){if(!this.userActivity_){return}this.userActivity_=false;this.userActive(true);this.clearTimeout(h);var a=this.options_.inactivityTimeout;if(a<=0){return}h=this.setTimeout(function(){if(!this.userActivity_){this.userActive(false)}},a)},250)};b.prototype.playbackRate=function cb(a){if(a!==undefined){this.techCall_(“setPlaybackRate”,a);return}if(this.tech_&&this.tech_.featuresPlaybackRate){return this.techGet_(“playbackRate”)}return 1};b.prototype.defaultPlaybackRate=function gb(a){if(a!==undefined){return this.techCall_(“setDefaultPlaybackRate”,a)}if(this.tech_&&this.tech_.featuresPlaybackRate){return this.techGet_(“defaultPlaybackRate”)}return 1};b.prototype.isAudio=function hb(a){if(a!==undefined){this.isAudio_=!!a;return}return!!this.isAudio_};b.prototype.addTextTrack=function ib(a,b,c){if(this.tech_){return this.tech_.addTextTrack(a,b,c)}};b.prototype.addRemoteTextTrack=function jb(a,b){if(this.tech_){return this.tech_.addRemoteTextTrack(a,b)}};b.prototype.removeRemoteTextTrack=function kb(){var a=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},b=a.track,c=b===undefined?arguments[0]:b;if(this.tech_){return this.tech_.removeRemoteTextTrack(c)}};b.prototype.getVideoPlaybackQuality=function lb(){return this.techGet_(“getVideoPlaybackQuality”)};b.prototype.videoWidth=function mb(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0};b.prototype.videoHeight=function nb(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0};b.prototype.language=function ob(a){if(a===undefined){return this.language_}this.language_=String(a).toLowerCase()};b.prototype.languages=function pb(){return vb(b.prototype.options_.languages,this.languages_)};b.prototype.toJSON=function rb(){var a=vb(this.options_);var b=a.tracks;a.tracks=[];for(var c=0;c<b.length;c++){var d=b[c];d=vb(d);d.player=undefined;a.tracks[c]=d}return a};b.prototype.createModal=function sb(a,b){var c=this;b=b||{};b.content=a||””;var d=new Ub(this,b);this.addChild(d);d.on(“dispose”,function(){c.removeChild(d)});d.open();return d};b.getTagSettings=function xb(a){var b={sources:[],tracks:[]};var c=sa(a);var d=c[“data-setup”];if(na(a,”vjs-fluid”)){c.fluid=true}if(d!==null){var e=Kb(d||”{}”),f=e[0],g=e[1];if(f){$.error(f)}T(c,g)}T(b,c);if(a.hasChildNodes()){var h=a.childNodes;for(var i=0,j=h.length;i<j;i++){var k=h[i];var l=k.nodeName.toLowerCase();if(l===”source”){b.sources.push(sa(k))}else if(l===”track”){b.tracks.push(sa(k))}}}return b};b.prototype.flexNotSupported_=function yb(){var a=m.createElement(“i”);return!(“flexBasis”in a.style||”webkitFlexBasis”in a.style||”mozFlexBasis”in a.style||”msFlexBasis”in a.style||”msFlexOrder”in a.style)};return b}(wb);Wc.names.forEach(function(a){var b=Wc[a];Oe.prototype[b.getterName]=function(){if(this.tech_){return this.tech_[b.getterName]()}this[b.privateName]=this[b.privateName]||new b.ListClass;return this[b.privateName]}});Oe.players={};var Pe=g.navigator;Oe.prototype.options_={techOrder:Zc.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],children:[“mediaLoader”,”posterImage”,”textTrackDisplay”,”loadingSpinner”,”bigPlayButton”,”controlBar”,”errorDisplay”,”textTrackSettings”],language:Pe&&(Pe.languages&&Pe.languages[0]||Pe.userLanguage||Pe.language)||”en”,languages:{},notSupportedMessage:”No compatible source was found for this media.”};[“ended”,”seeking”,”seekable”,”networkState”,”readyState”].forEach(function(a){Oe.prototype[a]=function(){return this.techGet_(a)}});Ne.forEach(function(a){Oe.prototype[“handleTech”+tb(a)+”_”]=function(){return this.trigger(a)}});wb.registerComponent(“Player”,Oe);var Qe=”plugin”;var Re=”activePlugins_”;var Se={};var Te=function Of(a){return Se.hasOwnProperty(a)};var Ue=function Pf(a){return Te(a)?Se[a]:undefined};var Ve=function Qf(a,b){a[Re]=a[Re]||{};a[Re][b]=true};var We=function Rf(a,b,c){var d=(c?”before”:””)+”pluginsetup”;a.trigger(d,b);a.trigger(d+”:”+b.name,b)};var Xe=function Sf(a,b){var c=function d(){We(this,{name:a,plugin:b,instance:null},true);var c=b.apply(this,arguments);Ve(this,a);We(this,{name:a,plugin:b,instance:c});return c};Object.keys(b).forEach(function(a){c[a]=b[a]});return c};var Ye=function Tf(a,b){b.prototype.name=a;return function(){We(this,{name:a,plugin:b,instance:null},true);for(var c=arguments.length,d=Array(c),e=0;e<c;e++){d[e]=arguments[e]}var f=new(Function.prototype.bind.apply(b,[null].concat([this].concat(d))));this[a]=function(){return f};We(this,f.getEventHash());return f}};var Ze=function(){function a(b){L(this,a);if(this.constructor===a){throw new Error(“Plugin must be sub-classed; not directly instantiated.”)}this.player=b;qb(this);delete this.trigger;sb(this,this.constructor.defaultState);Ve(b,this.name);this.dispose=fb(this,this.dispose);b.on(“dispose”,this.dispose)}a.prototype.version=function b(){return this.constructor.VERSION};a.prototype.getEventHash=function c(){var a=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};a.name=this.name;a.plugin=this.constructor;a.instance=this;return a};a.prototype.trigger=function d(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return Ya(this.eventBusEl_,a,this.getEventHash(b))};a.prototype.handleStateChanged=function e(a){};a.prototype.dispose=function f(){var a=this.name,b=this.player;this.trigger(“dispose”);this.off();b.off(“dispose”,this.dispose);b[Re][a]=false;this.player=this.state=null;b[a]=Ye(a,Se[a])};a.isBasic=function g(b){var c=typeof b===”string”?Ue(b):b;return typeof c===”function”&&!a.prototype.isPrototypeOf(c.prototype)};a.registerPlugin=function h(b,c){if(typeof b!==”string”){throw new Error(‘Illegal plugin name, “‘+b+'”, must be a string, was ‘+(typeof b===”undefined”?”undefined”:K(b))+”.”)}if(Te(b)){$.warn(‘A plugin named “‘+b+'” already exists. You may want to avoid re-registering plugins!’)}else if(Oe.prototype.hasOwnProperty(b)){throw new Error(‘Illegal plugin name, “‘+b+'”, cannot share a name with an existing player method!’)}if(typeof c!==”function”){throw new Error(‘Illegal plugin for “‘+b+'”, must be a function, was ‘+(typeof c===”undefined”?”undefined”:K(c))+”.”)}Se[b]=c;if(b!==Qe){if(a.isBasic(c)){Oe.prototype[b]=Xe(b,c)}else{Oe.prototype[b]=Ye(b,c)}}return c};a.deregisterPlugin=function i(a){if(a===Qe){throw new Error(“Cannot de-register base plugin.”)}if(Te(a)){delete Se[a];delete Oe.prototype[a]}};a.getPlugins=function j(){var a=arguments.length>0&&arguments[0]!==undefined?arguments[0]:Object.keys(Se);var b=void 0;a.forEach(function(a){var c=Ue(a);if(c){b=b||{};b[a]=c}});return b};a.getPluginVersion=function k(a){var b=Ue(a);return b&&b.VERSION||””};return a}();Ze.getPlugin=Ue;Ze.BASE_PLUGIN_NAME=Qe;Ze.registerPlugin(Qe,Ze);Oe.prototype.usingPlugin=function(a){return!!this[Re]&&this[Re][a]===true};Oe.prototype.hasPlugin=function(a){return!!Te(a)};var $e=function Uf(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+(typeof b===”undefined”?”undefined”:K(b)))}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b){a.super_=b}};var _e=function Vf(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var c=function f(){a.apply(this,arguments)};var d={};if((typeof b===”undefined”?”undefined”:K(b))===”object”){if(b.constructor!==Object.prototype.constructor){c=b.constructor}d=b}else if(typeof b===”function”){c=b}$e(c,a);for(var e in d){if(d.hasOwnProperty(e)){c.prototype[e]=d[e]}}return c};if(typeof HTMLVideoElement===”undefined”&&ga()){m.createElement(“video”);m.createElement(“audio”);m.createElement(“track”);m.createElement(“video-js”)}function af(a,b,c){var d=void 0;if(typeof a===”string”){var e=af.getPlayers();if(a.indexOf(“#”)===0){a=a.slice(1)}if(e[a]){if(b){$.warn(‘Player “‘+a+'” is already initialised. Options will not be applied.’)}if(c){e[a].ready(c)}return e[a]}d=Ha(“#”+a)}else{d=a}if(!d||!d.nodeName){throw new TypeError(“The element or ID supplied is not valid. (videojs)”)}if(d.player||Oe.players[d.playerId]){return d.player||Oe.players[d.playerId]}if(ha(d)&&!m.body.contains(d)){$.warn(“The element supplied is not included in the DOM”)}b=b||{};af.hooks(“beforesetup”).forEach(function(a){var c=a(d,vb(b));if(!U(c)||Array.isArray(c)){$.error(“please return an object in beforesetup hooks”);return}b=vb(b,c)});var f=wb.getComponent(“Player”);var g=new f(d,b,c);af.hooks(“setup”).forEach(function(a){return a(g)});return g}af.hooks_={};af.hooks=function(a,b){af.hooks_[a]=af.hooks_[a]||[];if(b){af.hooks_[a]=af.hooks_[a].concat(b)}return af.hooks_[a]};af.hook=function(a,b){af.hooks(a,b)};af.hookOnce=function(a,b){af.hooks(a,[].concat(b).map(function(b){var c=function d(){af.removeHook(a,d);return b.apply(undefined,arguments)};return c}))};af.removeHook=function(a,b){var c=af.hooks(a).indexOf(b);if(c<=-1){return false}af.hooks_[a]=af.hooks_[a].slice();af.hooks_[a].splice(c,1);return true};if(g.VIDEOJS_NO_DYNAMIC_STYLE!==true&&ga()){var bf=Ha(“.vjs-styles-defaults”);if(!bf){bf=db(“vjs-styles-defaults”);var cf=Ha(“head”);if(cf){cf.insertBefore(bf,cf.firstChild)}eb(bf,”\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n “)}}cb(1,af);af.VERSION=c;af.options=Oe.prototype.options_;af.getPlayers=function(){return Oe.players};af.players=Oe.players;af.getComponent=wb.getComponent;af.registerComponent=function(a,b){if(Zc.isTech(b)){$.warn(“The “+a+” tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)”)}wb.registerComponent.call(wb,a,b)};af.getTech=Zc.getTech;af.registerTech=Zc.registerTech;af.use=_c;af.browser=J;af.TOUCH_ENABLED=H;af.extend=_e;af.mergeOptions=vb;af.bind=fb;af.registerPlugin=Ze.registerPlugin;af.plugin=function(a,b){$.warn(“videojs.plugin() is deprecated; use videojs.registerPlugin() instead”);return Ze.registerPlugin(a,b)};af.getPlugins=Ze.getPlugins;af.getPlugin=Ze.getPlugin;af.getPluginVersion=Ze.getPluginVersion;af.addLanguage=function(a,b){var c;a=(“”+a).toLowerCase();af.options.languages=vb(af.options.languages,(c={},c[a]=b,c));return af.options.languages[a]};af.log=$;af.createTimeRange=af.createTimeRanges=Ab;af.formatTime=xd;af.parseUrl=hc;af.isCrossOrigin=kc;af.EventTarget=hb;af.on=Wa;af.one=Za;af.off=Xa;af.trigger=Ya;af.xhr=Cc;af.TextTrack=Mc;af.AudioTrack=Nc;af.VideoTrack=Oc;[“isEl”,”isTextNode”,”createEl”,”hasClass”,”addClass”,”removeClass”,”toggleClass”,”setAttributes”,”getAttributes”,”emptyEl”,”appendContent”,”insertContent”].forEach(function(a){af[a]=function(){$.warn(“videojs.”+a+”() is deprecated; use videojs.dom.”+a+”() instead”);return Ja[a].apply(null,arguments)}});af.computedStyle=ba;af.dom=Ja;af.url=lc;return af});if(!e){if(o&&o.VERSION===a.videojs.VERSION){a.videojs=o}else if(a.bc){(function(b){var c=Object.keys(b);var d,e,f;for(d=0;d<c.length;d++){e=c[d];f=b[e];if(typeof f===”function”&&typeof f.videojs===”function”){if(f.videojs.VERSION===a.videojs.VERSION){a.videojs=f.videojs;break}}}})(a.bc)}}var p=a.videojs;p[“default”]=p;if(!p.getTech(“flash”)){(function(a,b){typeof exports===”object”&&typeof module!==”undefined”?module.exports=b(require(“video.js”)):typeof c===”function”&&c.amd?c([“video.js”],b):a.videojsFlash=b(a.videojs)})(this,function(b){“use strict”;b=b&&b.hasOwnProperty(“default”)?b[“default”]:b;var c=”5.4.1″;var d=”2.1.0″;function e(a){a.streamingFormats={“rtmp/mp4″:”MP4″,”rtmp/flv”:”FLV”};a.streamFromParts=function(a,b){return a+”&”+b};a.streamToParts=function(a){var b={connection:””,stream:””};if(!a){return b}var c=a.search(/&(?!\w+=)/);var d=void 0;if(c!==-1){d=c+1}else{c=d=a.lastIndexOf(“/”)+1;if(c===0){c=d=a.length}}b.connection=a.substring(0,c);b.stream=a.substring(d,a.length);return b};a.isStreamingType=function(b){return b in a.streamingFormats};a.RTMP_RE=/^rtmp[set]?:\/\//i;a.isStreamingSrc=function(b){return a.RTMP_RE.test(b)};a.rtmpSourceHandler={};a.rtmpSourceHandler.canPlayType=function(b){if(a.isStreamingType(b)){return”maybe”}return””};a.rtmpSourceHandler.canHandleSource=function(b,c){var d=a.rtmpSourceHandler.canPlayType(b.type);if(d){return d}if(a.isStreamingSrc(b.src)){return”maybe”}return””};a.rtmpSourceHandler.handleSource=function(b,c,d){var e=a.streamToParts(b.src);c.setRtmpConnection(e.connection);c.setRtmpStream(e.stream)};a.registerSourceHandler(a.rtmpSourceHandler);return a}var f=typeof a!==”undefined”?a:typeof global!==”undefined”?global:typeof self!==”undefined”?self:{};var g;if(typeof a!==”undefined”){g=a}else if(typeof f!==”undefined”){g=f}else if(typeof self!==”undefined”){g=self}else{g={}}var h=g;var i=function(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}};var j=function(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b};var k=function(a,b){if(!a){throw new ReferenceError(“this hasn’t been initialised – super() hasn’t been called”)}return b&&(typeof b===”object”||typeof b===”function”)?b:a};var l=b.getComponent(“Tech”);var m=b.dom;var n=b.url;var o=b.createTimeRange;var p=b.mergeOptions;var q=h&&h.navigator||{};var r=function(a){j(b,a);function b(c,d){i(this,b);var e=k(this,a.call(this,c,d));if(c.source){e.ready(function(){this.setSource(c.source)},true)}if(c.startTime){e.ready(function(){this.load();this.play();this.currentTime(c.startTime)},true)}h.videojs=h.videojs||{};h.videojs.Flash=h.videojs.Flash||{};h.videojs.Flash.onReady=b.onReady;h.videojs.Flash.onEvent=b.onEvent;h.videojs.Flash.onError=b.onError;e.on(“seeked”,function(){this.lastSeekTarget_=undefined});return e}b.prototype.createEl=function d(){var a=this.options_;if(!a.swf){a.swf=”https://vjs.zencdn.net/swf/”+c+”/video-js.swf”}var d=a.techId;var e=p({readyFunction:”videojs.Flash.onReady”,eventProxyFunction:”videojs.Flash.onEvent”,errorEventProxyFunction:”videojs.Flash.onError”,autoplay:a.autoplay,preload:a.preload,loop:a.loop,muted:a.muted},a.flashVars);var f=p({wmode:”opaque”,bgcolor:”#000000″},a.params);var g=p({id:d,name:d,”class”:”vjs-tech”},a.attributes);this.el_=b.embed(a.swf,e,f,g);this.el_.tech=this;return this.el_};b.prototype.play=function e(){if(this.ended()){this.setCurrentTime(0)}this.el_.vjs_play()};b.prototype.pause=function f(){this.el_.vjs_pause()};b.prototype.src=function g(a){if(a===undefined){return this.currentSrc()}return this.setSrc(a)};b.prototype.setSrc=function l(a){var b=this;a=n.getAbsoluteURL(a);this.el_.vjs_src(a);if(this.autoplay()){this.setTimeout(function(){return b.play()},0)}};b.prototype.seeking=function m(){return this.lastSeekTarget_!==undefined};b.prototype.setCurrentTime=function q(b){var c=this.seekable();if(c.length){b=b>c.start(0)?b:c.start(0);b=b<c.end(c.length-1)?b:c.end(c.length-1);this.lastSeekTarget_=b;this.trigger(“seeking”);this.el_.vjs_setProperty(“currentTime”,b);a.prototype.setCurrentTime.call(this)}};b.prototype.currentTime=function r(){if(this.seeking()){return this.lastSeekTarget_||0}return this.el_.vjs_getProperty(“currentTime”)};b.prototype.currentSrc=function s(){if(this.currentSource_){return this.currentSource_.src}return this.el_.vjs_getProperty(“currentSrc”)};b.prototype.duration=function t(){if(this.readyState()===0){return NaN}var t=this.el_.vjs_getProperty(“duration”);return t>=0?t:Infinity};b.prototype.load=function u(){this.el_.vjs_load()};b.prototype.poster=function v(){this.el_.vjs_getProperty(“poster”)};b.prototype.setPoster=function w(){};b.prototype.seekable=function x(){var a=this.duration();if(a===0){return o()}return o(0,a)};b.prototype.buffered=function y(){var a=this.el_.vjs_getProperty(“buffered”);if(a.length===0){return o()}return o(a[0][0],a[0][1])};b.prototype.supportsFullScreen=function z(){return false};b.prototype.enterFullScreen=function A(){return false};b.prototype.getVideoPlaybackQuality=function B(){var a=this.el_.vjs_getProperty(“getVideoPlaybackQuality”);if(h.performance&&typeof h.performance.now===”function”){a.creationTime=h.performance.now()}else if(h.performance&&h.performance.timing&&typeof h.performance.timing.navigationStart===”number”){a.creationTime=h.Date.now()-h.performance.timing.navigationStart}return a};return b}(l);var s=[“rtmpConnection”,”rtmpStream”,”preload”,”defaultPlaybackRate”,”playbackRate”,”autoplay”,”loop”,”controls”,”volume”,”muted”,”defaultMuted”];var t=[“networkState”,”readyState”,”initialTime”,”startOffsetTime”,”paused”,”ended”,”videoWidth”,”videoHeight”];var u=r.prototype;function v(a){var b=a.charAt(0).toUpperCase()+a.slice(1);u[“set”+b]=function(b){return this.el_.vjs_setProperty(a,b)}}function w(a){u[a]=function(){return this.el_.vjs_getProperty(a)}}for(var x=0;x<s.length;x++){w(s[x]);v(s[x])}for(var y=0;y<t.length;y++){w(t[y])}r.isSupported=function(){if(b.browser.IS_CHROME&&!b.browser.IS_ANDROID||b.browser.IS_SAFARI&&!b.browser.IS_IOS){return true}return r.version()[0]>=10};l.withSourceHandlers(r);r.nativeSourceHandler={};r.nativeSourceHandler.canPlayType=function(a){if(a in r.formats){return”maybe”}return””};r.nativeSourceHandler.canHandleSource=function(a,b){var c=void 0;function d(a){var b=n.getFileExtension(a);if(b){return”video/”+b}return””}if(!a.type){c=d(a.src)}else{c=a.type.replace(/;.*/,””).toLowerCase()}return r.nativeSourceHandler.canPlayType(c)};r.nativeSourceHandler.handleSource=function(a,b,c){b.setSrc(a.src)};r.nativeSourceHandler.dispose=function(){};r.registerSourceHandler(r.nativeSourceHandler);r.formats={“video/flv”:”FLV”,”video/x-flv”:”FLV”,”video/mp4″:”MP4″,”video/m4v”:”MP4″};r.onReady=function(a){var b=m.$(“#”+a);var c=b&&b.tech;if(c&&c.el()){r.checkReady(c)}};r.checkReady=function(a){if(!a.el()){return}if(a.el().vjs_getProperty){a.triggerReady()}else{this.setTimeout(function(){r.checkReady(a)},50)}};r.onEvent=function(a,b){var c=m.$(“#”+a).tech;var d=Array.prototype.slice.call(arguments,2);c.setTimeout(function(){c.trigger(b,d)},1)};r.onError=function(a,b){var c=m.$(“#”+a).tech;if(b===”srcnotfound”){return c.error(4)}if(typeof b===”string”){c.error(“FLASH: “+b)}else{b.origin=”flash”;c.error(b)}};r.version=function(){var a=”0,0,0″;try{a=new h.ActiveXObject(“ShockwaveFlash.ShockwaveFlash”).GetVariable(“$version”).replace(/\D+/g,”,”).match(/^,?(.+),?$/)[1]}catch(b){try{if(q.mimeTypes[“application/x-shockwave-flash”].enabledPlugin){a=(q.plugins[“Shockwave Flash 2.0”]||q.plugins[“Shockwave Flash”]).description.replace(/\D+/g,”,”).match(/^,?(.+),?$/)[1]}}catch(c){}}return a.split(“,”)};r.embed=function(a,b,c,d){var e=r.getEmbedCode(a,b,c,d);var f=m.createEl(“div”,{innerHTML:e}).childNodes[0];return f};r.getEmbedCode=function(a,b,c,d){var e='<object type=”application/x-shockwave-flash” ‘;var f=””;var g=””;var h=””;if(b){Object.getOwnPropertyNames(b).forEach(function(a){f+=a+”=”+b[a]+”&amp;”})}c=p({movie:a,flashvars:f,allowScriptAccess:”always”,allowNetworking:”all”},c);Object.getOwnPropertyNames(c).forEach(function(a){g+='<param name=”‘+a+'” value=”‘+c[a]+'” />’});d=p({data:a,width:”100%”,height:”100%”},d);Object.getOwnPropertyNames(d).forEach(function(a){h+=a+’=”‘+d[a]+'” ‘});return””+e+h+”>”+g+”</object>”};e(r);if(l.getTech(“Flash”)){b.log.warn(“Not using videojs-flash as it appears to already be registered”);b.log.warn(“videojs-flash should only be used with video.js@6 and above”)}else{b.registerTech(“Flash”,r)}r.VERSION=d;return r})}(function(a,b){typeof exports===”object”&&typeof module!==”undefined”?module.exports=b(require(“video.js”)):typeof c===”function”&&c.amd?c([“video.js”],b):a.videojsLoscore=b(a.videojs)})(this,function(b){“use strict”;b=”default”in b?b[“default”]:b;var c=typeof a!==”undefined”?a:typeof global!==”undefined”?global:typeof self!==”undefined”?self:{};var d;if(typeof a!==”undefined”){d=a}else if(typeof c!==”undefined”){d=c}else if(typeof self!==”undefined”){d=self}else{d={}}var e=d;function f(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var g=Array.isArray||function(a){return Object.prototype.toString.call(a)===”[object Array]”};function h(a){switch(typeof a){case”string”:return a;case”boolean”:return a?”true”:”false”;case”number”:return isFinite(a)?a:””;default:return””}}function i(a,b,c,d){b=b||”&”;c=c||”=”;if(a===null){a=undefined}if(typeof a===”object”){return j(k(a),function(d){var e=encodeURIComponent(h(d))+c;if(g(a[d])){return j(a[d],function(a){return e+encodeURIComponent(h(a))}).join(b)}else{return e+encodeURIComponent(h(a[d]))}}).join(b)}if(!d)return””;return encodeURIComponent(h(d))+c+encodeURIComponent(h(a))}function j(a,b){if(a.map)return a.map(b);var c=[];for(var d=0;d<a.length;d++){c.push(b(a[d],d))}return c}var k=Object.keys||function(a){var b=[];for(var c in a){if(Object.prototype.hasOwnProperty.call(a,c))b.push(c)}return b};function l(a,b,c,d){b=b||”&”;c=c||”=”;var e={};if(typeof a!==”string”||a.length===0){return e}var h=/\+/g;a=a.split(b);var i=1e3;if(d&&typeof d.maxKeys===”number”){i=d.maxKeys}var j=a.length;if(i>0&&j>i){j=i}for(var k=0;k<j;++k){var l=a[k].replace(h,”%20″),m=l.indexOf(c),n,o,p,q;if(m>=0){n=l.substr(0,m);o=l.substr(m+1)}else{n=l;o=””}p=decodeURIComponent(n);q=decodeURIComponent(o);if(!f(e,p)){e[p]=q}else if(g(e[p])){e[p].push(q)}else{e[p]=[e[p],q]}}return e}var m={encode:i,stringify:i,decode:l,parse:l};var n=”2.6.0″;var o=function aa(a){return Array.isArray(a)};var p=function ba(a){return typeof a===”function”};var q=function ca(a){return a===null||a===undefined};var r=function da(a){return typeof a===”number”&&a===a};var s=function ea(a){return typeof a===”string”&&/\S/.test(a)};var t=function fa(a){return Object.prototype.toString.call(a)===”[object Object]”};var u=(Object.freeze||Object)({isArr:o,isFn:p,isNonEmptyStr:s,isNil:q,isNum:r,isObj:t});var v=typeof Symbol===”function”&&typeof Symbol.iterator===”symbol”?function(a){return typeof a}:function(a){return a&&typeof Symbol===”function”&&a.constructor===Symbol&&a!==Symbol.prototype?”symbol”:typeof a};var w=function(){var a=typeof Symbol===”function”&&Symbol.for&&Symbol.for(“react.element”)||60103;return function b(c,d,e,f){var g=c&&c.defaultProps;var h=arguments.length-3;if(!d&&h!==0){d={}}if(d&&g){for(var i in g){if(d[i]===void 0){d[i]=g[i]}}}else if(!d){d=g||{}}if(h===1){d.children=f}else if(h>1){var j=Array(h);for(var k=0;k<h;k++){j[k]=arguments[k+3]}d.children=j}return{$$typeof:a,type:c,key:e===undefined?null:””+e,ref:null,props:d,_owner:null}}}();var x=function(a){if(typeof Symbol===”function”){if(Symbol.asyncIterator){var b=a[Symbol.asyncIterator];if(b!=null)return b.call(a)}if(Symbol.iterator){return a[Symbol.iterator]()}}throw new TypeError(“Object is not async iterable”)};var y=function(){function a(a){this.value=a}function b(b){var c,d;function e(a,b){return new Promise(function(e,g){var h={key:a,arg:b,resolve:e,reject:g,next:null};if(d){d=d.next=h}else{c=d=h;f(a,b)}})}function f(c,d){try{var e=b[c](d);var h=e.value;if(h instanceof a){Promise.resolve(h.value).then(function(a){f(“next”,a)},function(a){f(“throw”,a)})}else{g(e.done?”return”:”normal”,e.value)}}catch(i){g(“throw”,i)}}function g(a,b){switch(a){case”return”:c.resolve({value:b,done:true});break;case”throw”:c.reject(b);break;default:c.resolve({value:b,done:false});break}c=c.next;if(c){f(c.key,c.arg)}else{d=null}}this._invoke=e;if(typeof b.return!==”function”){this.return=undefined}}if(typeof Symbol===”function”&&Symbol.asyncIterator){ b.prototype[Symbol.asyncIterator]=function(){return this}}b.prototype.next=function(a){return this._invoke(“next”,a)};b.prototype.throw=function(a){return this._invoke(“throw”,a)};b.prototype.return=function(a){return this._invoke(“return”,a)};return{wrap:function(a){return function(){return new b(a.apply(this,arguments))}},await:function(b){return new a(b)}}}();var z=function(a,b){var c={},d=false;function e(c,e){d=true;e=new Promise(function(b){b(a[c](e))});return{done:false,value:b(e)}}if(typeof Symbol===”function”&&Symbol.iterator){c[Symbol.iterator]=function(){return this}}c.next=function(a){if(d){d=false;return a}return e(“next”,a)};if(typeof a.throw===”function”){c.throw=function(a){if(d){d=false;throw a}return e(“throw”,a)}}if(typeof a.return===”function”){c.return=function(a){return e(“return”,a)}}return c};var A=function(a){return function(){var b=a.apply(this,arguments);return new Promise(function(a,c){function d(e,f){try{var g=b[e](f);var h=g.value}catch(i){c(i);return}if(g.done){a(h)}else{return Promise.resolve(h).then(function(a){d(“next”,a)},function(a){d(“throw”,a)})}}return d(“next”)})}};var B=function(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}};var C=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();var D=function(a,b){for(var c in b){var d=b[c];d.configurable=d.enumerable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,c,d)}return a};var E=function(a,b){var c=Object.getOwnPropertyNames(b);for(var d=0;d<c.length;d++){var e=c[d];var f=Object.getOwnPropertyDescriptor(b,e);if(f&&f.configurable&&a[e]===undefined){Object.defineProperty(a,e,f)}}return a};var F=function(a,b,c){if(b in a){Object.defineProperty(a,b,{value:c,enumerable:true,configurable:true,writable:true})}else{a[b]=c}return a};var G=Object.assign||function(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c){if(Object.prototype.hasOwnProperty.call(c,d)){a[d]=c[d]}}}return a};var H=function ga(a,b,c){if(a===null)a=Function.prototype;var d=Object.getOwnPropertyDescriptor(a,b);if(d===undefined){var e=Object.getPrototypeOf(a);if(e===null){return undefined}else{return ga(e,b,c)}}else if(“value”in d){return d.value}else{var f=d.get;if(f===undefined){return undefined}return f.call(c)}};var I=function(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b};var J=function(a,b){if(b!=null&&typeof Symbol!==”undefined”&&b[Symbol.hasInstance]){return b[Symbol.hasInstance](a)}else{return a instanceof b}};var K=function(a){return a&&a.__esModule?a:{“default”:a}};var L=function(a){if(a&&a.__esModule){return a}else{var b={};if(a!=null){for(var c in a){if(Object.prototype.hasOwnProperty.call(a,c))b[c]=a[c]}}b.default=a;return b}};var M=function(a,b){if(a!==b){throw new TypeError(“Cannot instantiate an arrow function”)}};var N=function(a){if(a==null)throw new TypeError(“Cannot destructure undefined”)};var O=function(a,b){var c={};for(var d in a){if(b.indexOf(d)>=0)continue;if(!Object.prototype.hasOwnProperty.call(a,d))continue;c[d]=a[d]}return c};var P=function(a,b){if(!a){throw new ReferenceError(“this hasn’t been initialised – super() hasn’t been called”)}return b&&(typeof b===”object”||typeof b===”function”)?b:a};var Q=typeof global===”undefined”?self:global;var R=function ha(a,b,c,d){var e=Object.getOwnPropertyDescriptor(a,b);if(e===undefined){var f=Object.getPrototypeOf(a);if(f!==null){ha(f,b,c,d)}}else if(“value”in e&&e.writable){e.value=c}else{var g=e.set;if(g!==undefined){g.call(d,c)}}return c};var S=function(){function a(a,b){var c=[];var d=true;var e=false;var f=undefined;try{for(var g=a[Symbol.iterator](),h;!(d=(h=g.next()).done);d=true){c.push(h.value);if(b&&c.length===b)break}}catch(i){e=true;f=i}finally{try{if(!d&&g[“return”])g[“return”]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b)){return b}else if(Symbol.iterator in Object(b)){return a(b,c)}else{throw new TypeError(“Invalid attempt to destructure non-iterable instance”)}}}();var T=function(a,b){if(Array.isArray(a)){return a}else if(Symbol.iterator in Object(a)){var c=[];for(var d=a[Symbol.iterator](),e;!(e=d.next()).done;){c.push(e.value);if(b&&c.length===b)break}return c}else{throw new TypeError(“Invalid attempt to destructure non-iterable instance”)}};var U=function(a,b){return Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(b)}}))};var V=function(a,b){a.raw=b;return a};var W=function(a,b,c){if(a===c){throw new ReferenceError(b+” is not defined – temporal dead zone”)}else{return a}};var X={};var Y=function(a){return Array.isArray(a)?a:Array.from(a)};var Z=function(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}else{return Array.from(a)}};var $=(Object.freeze||Object)({jsx:w,asyncIterator:x,asyncGenerator:y,asyncGeneratorDelegate:z,asyncToGenerator:A,classCallCheck:B,createClass:C,defineEnumerableProperties:D,defaults:E,defineProperty:F,get:H,inherits:I,interopRequireDefault:K,interopRequireWildcard:L,newArrowCheck:M,objectDestructuringEmpty:N,objectWithoutProperties:O,possibleConstructorReturn:P,selfGlobal:Q,set:R,slicedToArray:S,slicedToArrayLoose:T,taggedTemplateLiteral:U,taggedTemplateLiteralLoose:V,temporalRef:W,temporalUndefined:X,toArray:Y,toConsumableArray:Z,”typeof”:v,”extends”:G,”instanceof”:J});var _=G({assign:function ia(){var a;return(a=$).extends.apply(a,arguments)},withoutNilValues:function ja(a){var b=a;if(o(a)){b=a.filter(function(a){return!q(a)}).map(_.withoutNilValues)}else if(t(a)){b={};Object.keys(a).forEach(function(c){if(!q(a[c])){b[c]=_.withoutNilValues(a[c])}})}return b},debounce:function ka(a,b,c){var d=arguments.length>3&&arguments[3]!==undefined?arguments[3]:e;var f=void 0;return function(){var e=this;var g=arguments;var h=function i(){f=null;h=null;if(!c){a.apply(e,g)}};if(!f&&c){a.apply(e,g)}d.clearTimeout(f);f=d.setTimeout(h,b)}},throttle:function la(a,b){var c=Date.now();return function(){var d=Date.now();if(d-c>=b){a.apply(undefined,arguments);c=d}}},qs:function ma(){var a=arguments.length>0&&arguments[0]!==undefined?arguments[0]:e&&e.location||{};return G({hash:m.parse((a.hash||”#”).substr(1)),search:m.parse((a.search||”?”).substr(1))},m)}},u);_.VERSION=n;if(b){b.bc_=_}return _});if(!p.getPlugin(“proxyTracks”)){(function(a,b){typeof exports===”object”&&typeof module!==”undefined”?module.exports=b(require(“video.js”)):typeof c===”function”&&c.amd?c([“video.js”],b):a.videojsProxyTracks=b(a.videojs)})(this,function(a){“use strict”;a=”default”in a?a[“default”]:a;var b=function(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}};var c=function(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b};var d=function(a,b){if(!a){throw new ReferenceError(“this hasn’t been initialised – super() hasn’t been called”)}return b&&(typeof b===”object”||typeof b===”function”)?b:a};var e={activeCues:null,cues:null,id:””,inBandMetadataTrackDispatchType:undefined,kind:”metadata”,label:””,language:””,mode:””,oncuechange:undefined};var f=[“activeCues”,”cues”,”id”,”inBandMetadataTrackDispatchType”,”kind”,”label”,”language”];var g=[“mode”];var h=function m(a,b){if(a===”media”&&b.kind===”metadata”&&b.label===”media-cues”){return true}if(a===”id3″&&b.inBandMetadataTrackDispatchType&&b.inBandMetadataTrackDispatchType.length>0){return true}return false};var i=function(i){c(j,i);function j(c,h){var k;b(this,j);var l=d(this,i.call(this));var m=l;m.player_=c;m.reTriggerEvent_=a.bind(m,m.reTriggerEvent_);m.update_=a.bind(m,m.update_);m.type_=h;f.concat(g).forEach(function(a){var b={get:function c(){return m.track_&&m.track_[a]||e[a]},enumerable:true};if(g.indexOf(a)!==-1){b.set=function(b){if(!m.track_){return}m.track_[a]=b}}Object.defineProperty(m,a,b)});m.update_();var n=c.textTracks();var o=function p(a){if(!m.track_){m.update_(a)}};[“addtrack”,”removetrack”].forEach(function(a){return n.addEventListener(a,m.update_)});m.player_.on(“timeupdate”,o);return k=m,d(l,k)}j.prototype.addCue=function k(){var a=this;var b=arguments;if(!this.track_){this.one(“trackexists”,function(){return a.addCue.apply(a,b)});return}return this.track_.addCue.apply(this.track_,b)};j.prototype.removeCue=function l(){var a=this;var b=arguments;if(!this.track_){return this.one(“trackexists”,function(){return a.removeCue.apply(a,b)})}return this.track_.removeCue.apply(this.track_,b)};j.prototype.reTriggerEvent_=function m(a){this.trigger(a)};j.prototype.update_=function n(){var a=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var b=void 0;if(a.type===”removetrack”&&a.track&&a.track===this.track_){b=null}else if(a.type===”addtrack”&&a.track&&!this.track_&&h(this.type_,a.track)){b=a.track}else{var c=this.player_.textTracks();var d=c.length;while(d–){if(h(this.type_,c[d])){b=c[d];break}}}if(this.track_===b){return}if(this.track_){this.track_.removeEventListener(“cuechange”,this.reTriggerEvent_)}this.track_=b;if(!this.track_){return}if(this.track_.mode!==”hidden”){this.track_.mode=”hidden”}this.track_.addEventListener(“cuechange”,this.reTriggerEvent_);this.trigger(“trackexists”)};return j}(a.EventTarget);i.prototype.allowedEvents_={cuechange:”cuechange”};var j=a.registerPlugin||a.plugin;var k={id3CuePointsTrack:function n(){var a=this.proxyTracks_.id3;if(!a){a=this.proxyTracks_.id3=new i(this,”id3″)}return a},mediaCuePointsTrack:function o(){var a=this.proxyTracks_.media;if(a){return a}a=this.proxyTracks_.media=new i(this,”media”);if(a.track_){return a}this.addTextTrack(“metadata”,”media-cues”);a.update_();return a}};function l(){var b=this;this.proxyTracks_={};Object.keys(k).forEach(function(c){if(a.browser.IS_IE8||!Object.defineProperty){b[c]=function(){a.log(“This API method – player.”+c+”() – is not supported in this browser.”)}}else{b[c]=function(){return k[c].call(b)}}})}j(“proxyTracks”,l);l.VERSION=”__VERSION__”;return l})}if(typeof Uint8Array===”function”&&!p.getTech(“Hls”)){(function(b){if(typeof exports===”object”&&typeof module!==”undefined”){module.exports=b()}else if(typeof c===”function”&&c.amd){c([],b)}else{var d;if(typeof a!==”undefined”){d=a}else if(typeof global!==”undefined”){d=global}else if(typeof self!==”undefined”){d=self}else{d=this}d.videojsFlashlsSourceHandler=b()}})(function(){var b,c,d;return function e(a,b,c){function d(g,h){if(!b[g]){if(!a[g]){var i=typeof require==”function”&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error(“Cannot find module ‘”+g+”‘”);throw j.code=”MODULE_NOT_FOUND”,j}var k=b[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return d(c?c:b)},k,k.exports,e,a,b,c)}return b[g].exports}var f=typeof require==”function”&&require;for(var g=0;g<c.length;g++)d(c[g]);return d}({1:[function(b,c,d){(function(b){“use strict”;d.__esModule=true;d.setupAudioTracks=d.updateAudioTrack=undefined;var c=typeof a!==”undefined”?a[“videojs”]:typeof b!==”undefined”?b[“videojs”]:null;var e=f(c);function f(a){return a&&a.__esModule?a:{“default”:a}}var g=d.updateAudioTrack=function i(a){var b=a.el_.vjs_getProperty(“audioTracks”);var c=a.audioTracks();var d=null;for(var e=0;e<c.length;e++){if(c[e].enabled){d=c[e].id;break}}if(d===null){return}for(var f=0;f<b.length;f++){if(d===b[f].title){a.el_.vjs_setProperty(“audioTrack”,f);return}}};var h=d.setupAudioTracks=function j(a){var b=a.el_.vjs_getProperty(“altAudioTracks”);var c=a.el_.vjs_getProperty(“audioTracks”);var d=a.el_.vjs_getProperty(“audioTrack”);c.forEach(function(c,f){var g=b[c.id];a.audioTracks().addTrack(new e[“default”].AudioTrack({id:g.name,enabled:d===f,language:g.lang,”default”:g.default_track,label:g.name}))})}}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{}],2:[function(a,b,c){“use strict”;c.__esModule=true;var d=c.createRepresentation=function f(a,b){var c={id:b.index+””,width:b.width,height:b.height,bandwidth:b.bitrate,isEnabled_:true};c.enabled=function(b){if(typeof b===”undefined”){return c.isEnabled_}if(b===c.isEnabled_){return}if(b===true||b===false){c.isEnabled_=b;a()}};return c};var e=c.createRepresentations=function g(a){var b=null;var c=function e(){var c=b.filter(function(a){return a.enabled()});if(c.length===b.length||c.length===0){a.el_.vjs_setProperty(“autoLevelCapping”,-1);a.el_.vjs_setProperty(“level”,-1);return}if(c.length===1){a.el_.vjs_setProperty(“level”,parseInt(c[0].id,10));a.el_.vjs_setProperty(“autoLevelCapping”,-1);return}var d=c[c.length-1].id;a.el_.vjs_setProperty(“autoLevelCapping”,parseInt(d,10));a.el_.vjs_setProperty(“level”,-1)};return function(){if(!b){var e=a.el_.vjs_getProperty(“levels”);b=e.filter(function(a){return!a.audio}).map(d.bind(null,c))}return b}}},{}],3:[function(b,c,d){(function(b){var d;if(typeof a!==”undefined”){d=a}else if(typeof b!==”undefined”){d=b}else if(typeof self!==”undefined”){d=self}else{d={}}c.exports=d}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{}],4:[function(a,b,c){“use strict”;var d=4,e=128,f=a(“../utils/stream”);var g=function(a){var b=0,c={payloadType:-1,payloadSize:0},f=0,g=0;while(b<a.byteLength){if(a[b]===e){break}while(a[b]===255){f+=255;b++}f+=a[b++];while(a[b]===255){g+=255;b++}g+=a[b++];if(!c.payload&&f===d){c.payloadType=f;c.payloadSize=g;c.payload=a.subarray(b,b+g);break}b+=g;f=0;g=0}return c};var h=function(a){if(a.payload[0]!==181){return null}if((a.payload[1]<<8|a.payload[2])!==49){return null}if(String.fromCharCode(a.payload[3],a.payload[4],a.payload[5],a.payload[6])!==”GA94″){return null}if(a.payload[7]!==3){return null}return a.payload.subarray(8,a.payload.length-1)};var i=function(a,b){var c=[],d,e,f,g;if(!(b[0]&64)){return c}e=b[0]&31;for(d=0;d<e;d++){f=d*3;g={type:b[f+2]&3,pts:a};if(b[f+2]&4){g.ccData=b[f+3]<<8|b[f+4];c.push(g)}}return c};var j=function(){j.prototype.init.call(this);this.captionPackets_=[];this.ccStreams_=[new p(0,0),new p(0,1),new p(1,0),new p(1,1)];this.reset();this.ccStreams_.forEach(function(a){a.on(“data”,this.trigger.bind(this,”data”));a.on(“done”,this.trigger.bind(this,”done”))},this)};j.prototype=new f;j.prototype.push=function(a){var b,c;if(a.nalUnitType!==”sei_rbsp”){return}b=g(a.escapedRBSP);if(b.payloadType!==d){return}c=h(b);if(!c){return}if(a.dts<this.latestDts_){this.ignoreNextEqualDts_=true;return}else if(a.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.ignoreNextEqualDts_=false;return}this.captionPackets_=this.captionPackets_.concat(i(a.pts,c));this.latestDts_=a.dts};j.prototype.flush=function(){if(!this.captionPackets_.length){this.ccStreams_.forEach(function(a){a.flush()},this);return}this.captionPackets_.forEach(function(a,b){a.presortIndex=b});this.captionPackets_.sort(function(a,b){if(a.pts===b.pts){return a.presortIndex-b.presortIndex}return a.pts-b.pts});this.captionPackets_.forEach(function(a){if(a.type<2){this.dispatchCea608Packet(a)}},this);this.captionPackets_.length=0;this.ccStreams_.forEach(function(a){a.flush()},this);return};j.prototype.reset=function(){this.latestDts_=null;this.ignoreNextEqualDts_=false;this.activeCea608Channel_=[null,null];this.ccStreams_.forEach(function(a){a.reset()})};j.prototype.dispatchCea608Packet=function(a){if(this.setsChannel1Active(a)){this.activeCea608Channel_[a.type]=0}else if(this.setsChannel2Active(a)){this.activeCea608Channel_[a.type]=1}if(this.activeCea608Channel_[a.type]===null){return}this.ccStreams_[(a.type<<1)+this.activeCea608Channel_[a.type]].push(a)};j.prototype.setsChannel1Active=function(a){return(a.ccData&30720)===4096};j.prototype.setsChannel2Active=function(a){return(a.ccData&30720)===6144};var k={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496};var l=function(a){if(a===null){return””}a=k[a]||a;return String.fromCharCode(a)};var m=14;var n=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152];var o=function(){var a=[],b=m+1;while(b–){a.push(“”)}return a};var p=function(a,b){p.prototype.init.call(this);this.field_=a||0;this.dataChannel_=b||0;this.name_=”CC”+((this.field_<<1|this.dataChannel_)+1);this.setConstants();this.reset();this.push=function(a){var b,c,d,e,f;b=a.ccData&32639;if(b===this.lastControlCode_){this.lastControlCode_=null;return}if((b&61440)===4096){this.lastControlCode_=b}else if(b!==this.PADDING_){this.lastControlCode_=null}d=b>>>8;e=b&255;if(b===this.PADDING_){return}else if(b===this.RESUME_CAPTION_LOADING_){this.mode_=”popOn”}else if(b===this.END_OF_CAPTION_){this.clearFormatting(a.pts);this.flushDisplayed(a.pts);c=this.displayed_;this.displayed_=this.nonDisplayed_;this.nonDisplayed_=c;this.startPts_=a.pts}else if(b===this.ROLL_UP_2_ROWS_){this.topRow_=m-1;this.mode_=”rollUp”}else if(b===this.ROLL_UP_3_ROWS_){this.topRow_=m-2;this.mode_=”rollUp”}else if(b===this.ROLL_UP_4_ROWS_){this.topRow_=m-3;this.mode_=”rollUp”}else if(b===this.CARRIAGE_RETURN_){this.clearFormatting(a.pts);this.flushDisplayed(a.pts);this.shiftRowsUp_();this.startPts_=a.pts}else if(b===this.BACKSPACE_){if(this.mode_===”popOn”){this.nonDisplayed_[m]=this.nonDisplayed_[m].slice(0,-1)}else{this.displayed_[m]=this.displayed_[m].slice(0,-1)}}else if(b===this.ERASE_DISPLAYED_MEMORY_){this.flushDisplayed(a.pts);this.displayed_=o()}else if(b===this.ERASE_NON_DISPLAYED_MEMORY_){this.nonDisplayed_=o()}else if(b===this.RESUME_DIRECT_CAPTIONING_){this.mode_=”paintOn”}else if(this.isSpecialCharacter(d,e)){d=(d&3)<<8;f=l(d|e);this[this.mode_](a.pts,f);this.column_++}else if(this.isExtCharacter(d,e)){if(this.mode_===”popOn”){this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1)}else{this.displayed_[m]=this.displayed_[m].slice(0,-1)}d=(d&3)<<8;f=l(d|e);this[this.mode_](a.pts,f);this.column_++}else if(this.isMidRowCode(d,e)){this.clearFormatting(a.pts);this[this.mode_](a.pts,” “);this.column_++;if((e&14)===14){this.addFormatting(a.pts,[“i”])}if((e&1)===1){this.addFormatting(a.pts,[“u”])}}else if(this.isOffsetControlCode(d,e)){this.column_+=e&3}else if(this.isPAC(d,e)){var g=n.indexOf(b&7968);if(g!==this.row_){this.clearFormatting(a.pts);this.row_=g}if(e&1&&this.formatting_.indexOf(“u”)===-1){this.addFormatting(a.pts,[“u”])}if((b&16)===16){this.column_=((b&14)>>1)*4}if(this.isColorPAC(e)){if((e&14)===14){this.addFormatting(a.pts,[“i”])}}}else if(this.isNormalChar(d)){if(e===0){e=null}f=l(d);f+=l(e);this[this.mode_](a.pts,f);this.column_+=f.length}}};p.prototype=new f;p.prototype.flushDisplayed=function(a){var b=this.displayed_.map(function(a){return a.trim()}).join(“\n”).replace(/^\n+|\n+$/g,””);if(b.length){this.trigger(“data”,{startPts:this.startPts_,endPts:a,text:b,stream:this.name_})}};p.prototype.reset=function(){this.mode_=”popOn”;this.topRow_=0;this.startPts_=0;this.displayed_=o();this.nonDisplayed_=o();this.lastControlCode_=null;this.column_=0;this.row_=m;this.formatting_=[]};p.prototype.setConstants=function(){if(this.dataChannel_===0){this.BASE_=16;this.EXT_=17;this.CONTROL_=(20|this.field_)<<8;this.OFFSET_=23}else if(this.dataChannel_===1){this.BASE_=24;this.EXT_=25;this.CONTROL_=(28|this.field_)<<8;this.OFFSET_=31}this.PADDING_=0;this.RESUME_CAPTION_LOADING_=this.CONTROL_|32;this.END_OF_CAPTION_=this.CONTROL_|47;this.ROLL_UP_2_ROWS_=this.CONTROL_|37;this.ROLL_UP_3_ROWS_=this.CONTROL_|38;this.ROLL_UP_4_ROWS_=this.CONTROL_|39;this.CARRIAGE_RETURN_=this.CONTROL_|45;this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41;this.BACKSPACE_=this.CONTROL_|33;this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44;this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46};p.prototype.isSpecialCharacter=function(a,b){return a===this.EXT_&&b>=48&&b<=63};p.prototype.isExtCharacter=function(a,b){return(a===this.EXT_+1||a===this.EXT_+2)&&(b>=32&&b<=63)};p.prototype.isMidRowCode=function(a,b){return a===this.EXT_&&(b>=32&&b<=47)};p.prototype.isOffsetControlCode=function(a,b){return a===this.OFFSET_&&(b>=33&&b<=35)};p.prototype.isPAC=function(a,b){return a>=this.BASE_&&a<this.BASE_+8&&(b>=64&&b<=127)};p.prototype.isColorPAC=function(a){return a>=64&&a<=79||a>=96&&a<=127};p.prototype.isNormalChar=function(a){return a>=32&&a<=127};p.prototype.addFormatting=function(a,b){this.formatting_=this.formatting_.concat(b);var c=b.reduce(function(a,b){return a+”<“+b+”>”},””);this[this.mode_](a,c)};p.prototype.clearFormatting=function(a){if(!this.formatting_.length){return}var b=this.formatting_.reverse().reduce(function(a,b){return a+”</”+b+”>”},””);this.formatting_=[];this[this.mode_](a,b)};p.prototype.popOn=function(a,b){var c=this.nonDisplayed_[this.row_];c+=b;this.nonDisplayed_[this.row_]=c};p.prototype.rollUp=function(a,b){var c=this.displayed_[m];c+=b;this.displayed_[m]=c};p.prototype.shiftRowsUp_=function(){var a;for(a=0;a<this.topRow_;a++){this.displayed_[a]=””}for(a=this.topRow_;a<m;a++){this.displayed_[a]=this.displayed_[a+1]}this.displayed_[m]=””};p.prototype.paintOn=function(){};b.exports={CaptionStream:j,Cea608Stream:p}},{“../utils/stream”:7}],5:[function(a,b,c){“use strict”;var d=a(“../utils/stream”),e=a(“./stream-types”),f=function(a,b,c){var d,e=””;for(d=b;d<c;d++){e+=”%”+(“00″+a[d].toString(16)).slice(-2)}return e},g=function(a,b,c){return decodeURIComponent(f(a,b,c))},h=function(a,b,c){return unescape(f(a,b,c))},i=function(a){return a[0]<<21|a[1]<<14|a[2]<<7|a[3]},j={TXXX:function(a){var b;if(a.data[0]!==3){return}for(b=1;b<a.data.length;b++){if(a.data[b]===0){a.description=g(a.data,1,b);a.value=g(a.data,b+1,a.data.length).replace(/\0*$/,””);break}}a.data=a.value},WXXX:function(a){var b;if(a.data[0]!==3){return}for(b=1;b<a.data.length;b++){if(a.data[b]===0){a.description=g(a.data,1,b);a.url=g(a.data,b+1,a.data.length);break}}},PRIV:function(a){var b;for(b=0;b<a.data.length;b++){if(a.data[b]===0){a.owner=h(a.data,0,b);break}}a.privateData=a.data.subarray(b+1);a.data=a.privateData}},k;k=function(a){var b={debug:!!(a&&a.debug),descriptor:a&&a.descriptor},c=0,d=[],f=0,g;k.prototype.init.call(this);this.dispatchType=e.METADATA_STREAM_TYPE.toString(16);if(b.descriptor){for(g=0;g<b.descriptor.length;g++){this.dispatchType+=(“00″+b.descriptor[g].toString(16)).slice(-2)}}this.push=function(a){var e,g,h,k,l,m;if(a.type!==”timed-metadata”){return}if(a.dataAlignmentIndicator){f=0;d.length=0}if(d.length===0&&(a.data.length<10||a.data[0]!==”I”.charCodeAt(0)||a.data[1]!==”D”.charCodeAt(0)||a.data[2]!==”3″.charCodeAt(0))){if(b.debug){console.log(“Skipping unrecognized metadata packet”)}return}d.push(a);f+=a.data.byteLength;if(d.length===1){c=i(a.data.subarray(6,10));c+=10}if(f<c){return}e={data:new Uint8Array(c),frames:[],pts:d[0].pts,dts:d[0].dts};for(l=0;l<c;){e.data.set(d[0].data.subarray(0,c-l),l);l+=d[0].data.byteLength;f-=d[0].data.byteLength;d.shift()}g=10;if(e.data[5]&64){g+=4;g+=i(e.data.subarray(10,14));c-=i(e.data.subarray(16,20))}do{h=i(e.data.subarray(g+4,g+8));if(h<1){return console.log(“Malformed ID3 frame encountered. Skipping metadata parsing.”)}m=String.fromCharCode(e.data[g],e.data[g+1],e.data[g+2],e.data[g+3]);k={id:m,data:e.data.subarray(g+10,g+h+10)};k.key=k.id;if(j[k.id]){j[k.id](k);if(k.owner===”com.apple.streaming.transportStreamTimestamp”){var n=k.data,o=(n[3]&1)<<30|n[4]<<22|n[5]<<14|n[6]<<6|n[7]>>>2;o*=4;o+=n[7]&3;k.timeStamp=o;if(e.pts===undefined&&e.dts===undefined){e.pts=k.timeStamp;e.dts=k.timeStamp}this.trigger(“timestamp”,k)}}e.frames.push(k);g+=10;g+=h}while(g<c);this.trigger(“data”,e)}};k.prototype=new d;b.exports=k},{“../utils/stream”:7,”./stream-types”:6}],6:[function(a,b,c){“use strict”;b.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},{}],7:[function(a,b,c){“use strict”;var d=function(){this.init=function(){var a={};this.on=function(b,c){if(!a[b]){a[b]=[]}a[b]=a[b].concat(c)};this.off=function(b,c){var d;if(!a[b]){return false}d=a[b].indexOf(c);a[b]=a[b].slice();a[b].splice(d,1);return d>-1};this.trigger=function(b){var c,d,e,f;c=a[b];if(!c){return}if(arguments.length===2){e=c.length;for(d=0;d<e;++d){c[d].call(this,arguments[1])}}else{f=[];d=arguments.length;for(d=1;d<arguments.length;++d){f.push(arguments[d])}e=c.length;for(d=0;d<e;++d){c[d].apply(this,f)}}};this.dispose=function(){a={}}}};d.prototype.pipe=function(a){this.on(“data”,function(b){a.push(b)});this.on(“done”,function(b){a.flush(b)});return a};d.prototype.push=function(a){this.trigger(“data”,a)};d.prototype.flush=function(a){this.trigger(“done”,a)};b.exports=d},{}],8:[function(b,c,d){(function(c){“use strict”;d.__esModule=true;d.FlashlsHandler=undefined;var e=typeof a!==”undefined”?a[“videojs”]:typeof c!==”undefined”?c[“videojs”]:null;var f=n(e);var g=b(“global/window”);var h=n(g);var i=b(“mux.js/lib/m2ts/caption-stream”);var j=b(“mux.js/lib/m2ts/metadata-stream”);var k=n(j);var l=b(“./representations.js”);var m=b(“./flashlsAudioTracks.js”);function n(a){return a&&a.__esModule?a:{“default”:a}}function o(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}var p=function B(a){Object.defineProperties(a.frame,{id:{get:function b(){f[“default”].log.warn(“cue.frame.id is deprecated. Use cue.value.key instead.”);return a.value.key}},value:{get:function c(){f[“default”].log.warn(“cue.frame.value is deprecated. Use cue.value.data instead.”);return a.value.data}},privateData:{get:function d(){f[“default”].log.warn(“cue.frame.privateData is deprecated. Use cue.value.data instead.”);return a.value.data}}})};var q=function C(a,b,c){var d=a.remoteTextTracks()||[];for(var e=0;e<d.length;e++){var f=d[e];if(f.kind===b&&f.label===c){a.removeRemoteTextTrack(f)}}};var r=function D(a){var b=new Uint8Array(a.length);for(var c=0;c<a.length;c++){b[c]=a.charCodeAt(c)}return b};var s=function E(a,b,c){var d=void 0;var e=void 0;if(!c){return}if(!c.cues){return}d=c.cues.length;while(d–){e=c.cues[d];if(e.startTime<=b&&e.endTime>=a){c.removeCue(e)}}};var t=function F(a,b){if(a.length){s(0,a.start(0),b)}};var u=function G(a,b){var c=-1;for(var d=0;d<a.length;d++){if(a[d].id===b){c=d;break}}a.selectedIndex_=c;a.trigger({selectedIndex:c,type:”change”})};var v=1/30;var w=function H(a,b){var c=[];if(a&&a.length){for(var d=0;d<a.length;d++){if(b(a.start(d),a.end(d))){c.push([a.start(d),a.end(d)])}}}return f[“default”].createTimeRanges(c)};var x=function I(a,b){return w(a,function(a,c){return a-v<=b&&c+v>=b})};var y=d.FlashlsHandler=function(){function a(b,c,d){var e=this;o(this,a);if(c.options_&&c.options_.playerId){var g=(0,f[“default”])(c.options_.playerId);if(!g.hasOwnProperty(“hls”)){Object.defineProperty(g,”hls”,{get:function h(){f[“default”].log.warn(“player.hls is deprecated. Use player.tech_.hls instead.”);c.trigger({type:”usage”,name:”flashls-player-access”});return e}})}}Object.defineProperties(this,{stats:{get:function j(){return this.tech_.el_.vjs_getProperty(“stats”)}},bandwidth:{get:function l(){return this.tech_.el_.vjs_getProperty(“stats”).bandwidth}}});this.tech_=c;this.metadataTrack_=null;this.inbandTextTracks_={};this.metadataStream_=new k[“default”];this.captionStream_=new i.CaptionStream;this.onLoadedmetadata_=this.onLoadedmetadata_.bind(this);this.onSeeking_=this.onSeeking_.bind(this);this.onId3updated_=this.onId3updated_.bind(this);this.onCaptionData_=this.onCaptionData_.bind(this);this.onMetadataStreamData_=this.onMetadataStreamData_.bind(this);this.onCaptionStreamData_=this.onCaptionStreamData_.bind(this);this.onLevelSwitch_=this.onLevelSwitch_.bind(this);this.onLevelLoaded_=this.onLevelLoaded_.bind(this);this.onFragmentLoaded_=this.onFragmentLoaded_.bind(this);this.onAudioTrackChanged=this.onAudioTrackChanged.bind(this);this.tech_.on(“loadedmetadata”,this.onLoadedmetadata_);this.tech_.on(“seeking”,this.onSeeking_);this.tech_.on(“id3updated”,this.onId3updated_);this.tech_.on(“captiondata”,this.onCaptionData_);this.tech_.on(“levelswitch”,this.onLevelSwitch_);this.tech_.on(“levelloaded”,this.onLevelLoaded_);this.tech_.on(“fragmentloaded”,this.onFragmentLoaded_);this.metadataStream_.on(“data”,this.onMetadataStreamData_);this.captionStream_.on(“data”,this.onCaptionStreamData_);this.playlists=new f[“default”].EventTarget;this.playlists.media=function(){return e.media_()}}a.prototype.src=function b(a){if(!a){return}this.tech_.setSrc(a.src)};a.prototype.seekable=function c(){var a=this.tech_.el_.vjs_getProperty(“seekableStart”);var b=this.tech_.el_.vjs_getProperty(“seekableEnd”);if(b===0){return f[“default”].createTimeRange()}return f[“default”].createTimeRange(a,b)};a.prototype.media_=function d(){var a=this.tech_.el_.vjs_getProperty(“levels”);var b=this.tech_.el_.vjs_getProperty(“level”);var c=void 0;if(a.length){c={resolvedUri:a[b].url,attributes:{BANDWIDTH:a[b].bitrate,RESOLUTION:{width:a[b].width,height:a[b].height}}}}return c};a.prototype.onLoadedmetadata_=function e(){var a=this;this.representations=(0,l.createRepresentations)(this.tech_);var b=f[“default”].players[this.tech_.options_.playerId];if(b&&b.qualityLevels){this.qualityLevels_=b.qualityLevels();this.representations().forEach(function(b){a.qualityLevels_.addQualityLevel(b)});u(this.qualityLevels_,this.tech_.el_.vjs_getProperty(“level”)+””)}(0,m.setupAudioTracks)(this.tech_);this.tech_.audioTracks().on(“change”,this.onAudioTrackChanged)};a.prototype.onAudioTrackChanged=function g(){(0,m.updateAudioTrack)(this.tech_)};a.prototype.onLevelSwitch_=function j(a,b){if(this.qualityLevels_){u(this.qualityLevels_,b[0].levelIndex+””)}this.playlists.trigger(“mediachange”);this.tech_.trigger({type:”mediachange”,bubbles:true})};a.prototype.onLevelLoaded_=function n(){this.playlists.trigger(“loadedplaylist”)};a.prototype.onFragmentLoaded_=function v(){this.tech_.trigger(“bandwidthupdate”);this.captionStream_.flush()};a.prototype.onSeeking_=function w(){var a=this;s(0,Infinity,this.metadataTrack_);var b=x(this.tech_.buffered(),this.tech_.currentTime());if(!b.length){Object.keys(this.inbandTextTracks_).forEach(function(b){s(0,Infinity,a.inbandTextTracks_[b])});this.captionStream_.reset()}};a.prototype.onId3updated_=function y(a,b){var c=h[“default”].atob(b[0]);var d=r(c);var e={type:”timed-metadata”,dataAlignmentIndicator:true,data:d};this.metadataStream_.push(e)};a.prototype.onMetadataStreamData_=function z(a){var b=this;if(!this.metadataTrack_){this.metadataTrack_=this.tech_.addRemoteTextTrack({kind:”metadata”,label:”Timed Metadata”},false).track;this.metadataTrack_.inBandMetadataTrackDispatchType=””}t(this.tech_.buffered(),this.metadataTrack_);var c=this.tech_.currentTime();a.frames.forEach(function(a){var d=new h[“default”].VTTCue(c,c+.1,a.value||a.url||a.data||””);d.frame=a;d.value=a;p(d);b.metadataTrack_.addCue(d)});if(this.metadataTrack_.cues&&this.metadataTrack_.cues.length){var d=this.metadataTrack_.cues;var e=[];var f=this.tech_.duration();if(isNaN(f)||Math.abs(f)===Infinity){f=Number.MAX_VALUE}for(var g=0;g<d.length;g++){e.push(d[g])}e.sort(function(a,b){return a.startTime-b.startTime});for(var i=0;i<e.length-1;i++){ if(e[i].endTime!==e[i+1].startTime){e[i].endTime=e[i+1].startTime}}e[e.length-1].endTime=f}};a.prototype.onCaptionData_=function A(a,b){var c=this;b[0].forEach(function(a){c.captionStream_.push({pts:a.pos*9e4,dts:a.dts*9e4,escapedRBSP:r(h[“default”].atob(a.data)),nalUnitType:”sei_rbsp”})})};a.prototype.onCaptionStreamData_=function B(a){if(a){if(!this.inbandTextTracks_[a.stream]){q(this.tech_,”captions”,a.stream);this.inbandTextTracks_[a.stream]=this.tech_.addRemoteTextTrack({kind:”captions”,label:a.stream,id:a.stream},false).track}t(this.tech_.buffered(),this.inbandTextTracks_[a.stream]);this.inbandTextTracks_[a.stream].addCue(new h[“default”].VTTCue(a.startPts/9e4,a.endPts/9e4,a.text))}};a.prototype.dispose=function C(){this.tech_.off(“loadedmetadata”,this.onLoadedmetadata_);this.tech_.off(“seeked”,this.onSeeking_);this.tech_.off(“id3updated”,this.onId3updated_);this.tech_.off(“captiondata”,this.onCaptionData_);this.tech_.audioTracks().off(“change”,this.onAudioTrackChanged);this.tech_.off(“levelswitch”,this.onLevelSwitch_);this.tech_.off(“levelloaded”,this.onLevelLoaded_);this.tech_.off(“fragmentloaded”,this.onFragmentLoaded_);if(this.qualityLevels_){this.qualityLevels_.dispose()}};return a}();var z={};var A=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i;z.canPlayType=function(a){return A.test(a)?”maybe”:””};z.canHandleSource=function(a,b){return z.canPlayType(a.type)===”maybe”};z.handleSource=function(a,b,c){b.hls=new y(a,b,c);b.hls.src(a);return b.hls};f[“default”].getTech(“Flash”).registerSourceHandler(z,0);z.VERSION=”1.4.1″;d[“default”]=z}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{“./flashlsAudioTracks.js”:1,”./representations.js”:2,”global/window”:3,”mux.js/lib/m2ts/caption-stream”:4,”mux.js/lib/m2ts/metadata-stream”:5}]},{},[8])(8)});(function(b){if(typeof exports===”object”&&typeof module!==”undefined”){module.exports=b()}else if(typeof c===”function”&&c.amd){c([],b)}else{var d;if(typeof a!==”undefined”){d=a}else if(typeof global!==”undefined”){d=global}else if(typeof self!==”undefined”){d=self}else{d=this}d.videojsHttpStreaming=b()}})(function(){var c,d,e;return function f(a,b,c){function d(g,h){if(!b[g]){if(!a[g]){var i=typeof require==”function”&&require;if(!h&&i)return i(g,!0);if(e)return e(g,!0);var j=new Error(“Cannot find module ‘”+g+”‘”);throw j.code=”MODULE_NOT_FOUND”,j}var k=b[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return d(c?c:b)},k,k.exports,f,a,b,c)}return b[g].exports}var e=typeof require==”function”&&require;for(var g=0;g<c.length;g++)d(c[g]);return d}({1:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});var d=function(){function a(a,b){var c=[];var d=true;var e=false;var f=undefined;try{for(var g=a[Symbol.iterator](),h;!(d=(h=g.next()).done);d=true){c.push(h.value);if(b&&c.length===b)break}}catch(i){e=true;f=i}finally{try{if(!d&&g[“return”])g[“return”]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b)){return b}else if(Symbol.iterator in Object(b)){return a(b,c)}else{throw new TypeError(“Invalid attempt to destructure non-iterable instance”)}}}();function e(a){return a&&a.__esModule?a:{“default”:a}}var f=a(“global/window”);var g=e(f);var h=function j(a,b){var c=a.cues;for(var d=0;d<c.length;d++){var e=c[d];if(b>=e.adStartTime&&b<=e.adEndTime){return e}}return null};var i=function k(a,b){var c=arguments.length<=2||arguments[2]===undefined?0:arguments[2];if(!a.segments){return}var e=c;var f=undefined;for(var i=0;i<a.segments.length;i++){var j=a.segments[i];if(!f){f=h(b,e+j.duration/2)}if(f){if(“cueIn”in j){f.endTime=e;f.adEndTime=e;e+=j.duration;f=null;continue}if(e<f.endTime){e+=j.duration;continue}f.endTime+=j.duration}else{if(“cueOut”in j){f=new g[“default”].VTTCue(e,e+j.duration,j.cueOut);f.adStartTime=e;f.adEndTime=e+parseFloat(j.cueOut);b.addCue(f)}if(“cueOutCont”in j){var k=undefined;var l=undefined;var m=j.cueOutCont.split(“/”).map(parseFloat);var n=d(m,2);k=n[0];l=n[1];f=new g[“default”].VTTCue(e,e+j.duration,””);f.adStartTime=e-k;f.adEndTime=f.adStartTime+l;b.addCue(f)}}e+=j.duration}};c[“default”]={updateAdCues:i,findAdCue:h};b.exports=c[“default”]},{“global/window”:31}],2:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});var d=function j(a,b){return a.start(b)+”-“+a.end(b)};var e=function k(a,b){var c=a.toString(16);return”00″.substring(0,2-c.length)+c+(b%2?” “:””)};var f=function l(a){if(a>=32&&a<126){return String.fromCharCode(a)}return”.”};var g=function m(a){var b={};Object.keys(a).forEach(function(c){var d=a[c];if(ArrayBuffer.isView(d)){b[c]={bytes:d.buffer,byteOffset:d.byteOffset,byteLength:d.byteLength}}else{b[c]=d}});return b};var h=function n(a){var b=a.byterange||{length:Infinity,offset:0};return[b.length,b.offset,a.resolvedUri].join(“,”)};var i={hexDump:function o(a){var b=Array.prototype.slice.call(a);var c=16;var d=””;var g=undefined;var h=undefined;for(var i=0;i<b.length/c;i++){g=b.slice(i*c,i*c+c).map(e).join(“”);h=b.slice(i*c,i*c+c).map(f).join(“”);d+=g+” “+h+”\n”}return d},tagDump:function p(a){return i.hexDump(a.bytes)},textRanges:function q(a){var b=””;var c=undefined;for(c=0;c<a.length;c++){b+=d(a,c)+” “}return b},createTransferableMessage:g,initSegmentId:h};c[“default”]=i;b.exports=c[“default”]},{}],3:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});c[“default”]={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,GOAL_BUFFER_LENGTH_RATE:1,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,BUFFER_LOW_WATER_LINE_RATE:1};b.exports=c[“default”]},{}],4:[function(b,c,d){(function(e){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();var g=function p(a,b,c){var d=true;a:while(d){var e=a,f=b,g=c;d=false;if(e===null)e=Function.prototype;var h=Object.getOwnPropertyDescriptor(e,f);if(h===undefined){var i=Object.getPrototypeOf(e);if(i===null){return undefined}else{a=i;b=f;c=g;d=true;h=i=undefined;continue a}}else if(“value”in h){return h.value}else{var j=h.get;if(j===undefined){return undefined}return j.call(g)}}};function h(a){return a&&a.__esModule?a:{“default”:a}}function i(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}function j(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b}var k=typeof a!==”undefined”?a[“videojs”]:typeof e!==”undefined”?e[“videojs”]:null;var l=b(“mpd-parser”);var m=h(l);var n=b(“./playlist-loader”);var o=function(a){j(b,a);function b(a,c,d){var e=this;i(this,b);g(Object.getPrototypeOf(b.prototype),”constructor”,this).call(this);this.hls_=c;this.withCredentials=d;if(!a){throw new Error(“A non-empty playlist URL or playlist is required”)}if(typeof a===”string”){this.srcUrl=a;this.state=”HAVE_NOTHING”;return}this.state=”HAVE_METADATA”;this.started=true;this.media(a);setTimeout(function(){e.trigger(“loadedmetadata”)},0)}f(b,[{key:”dispose”,value:function c(){this.stopRequest()}},{key:”stopRequest”,value:function d(){if(this.request){var a=this.request;this.request=null;a.onreadystatechange=null;a.abort()}}},{key:”media”,value:function e(a){if(!a){return this.media_}if(this.state===”HAVE_NOTHING”){throw new Error(“Cannot switch media playlist from “+this.state)}if(typeof a===”string”){if(!this.master.playlists[a]){throw new Error(“Unknown playlist URI: “+a)}a=this.master.playlists[a]}var b=!this.media_||a.uri!==this.media_.uri;this.state=”HAVE_METADATA”;this.media_=a;if(b){this.trigger(“mediachanging”);this.trigger(“loadedplaylist”);this.trigger(“mediachange”)}return}},{key:”pause”,value:function h(){this.stopRequest();if(this.state===”HAVE_NOTHING”){this.started=false}}},{key:”load”,value:function k(){if(!this.started){this.start();return}this.trigger(“loadedplaylist”)}},{key:”start”,value:function l(){var a=this;this.started=true;this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(b,c){if(!a.request){return}a.request=null;if(b){a.error={status:c.status,message:”DASH playlist request error at URL: “+a.srcUrl,responseText:c.responseText,code:2};if(a.state===”HAVE_NOTHING”){a.started=false}return a.trigger(“error”)}a.master=m[“default”].parse(c.responseText,a.srcUrl);a.master.uri=a.srcUrl;a.state=”HAVE_MASTER”;a.master.playlists.forEach(function(a){a.mediaSequence=0});for(var d in a.master.mediaGroups.AUDIO){for(var e in a.master.mediaGroups.AUDIO[d]){a.master.mediaGroups.AUDIO[d][e].playlists.forEach(function(a){a.mediaSequence=0})}}for(var f=0;f<a.master.playlists.length;f++){var g=”placeholder-uri-“+f;a.master.playlists[f].uri=g;a.master.playlists[g]=a.master.playlists[f]}(0,n.setupMediaPlaylists)(a.master);(0,n.resolveMediaGroupUris)(a.master);a.trigger(“loadedplaylist”);if(!a.request){a.media(a.master.playlists[0])}setTimeout(function(){a.trigger(“loadedmetadata”)},0)})}}]);return b}(k.EventTarget);d[“default”]=o;c.exports=d[“default”]}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{“./playlist-loader”:10,”mpd-parser”:37}],5:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});function d(a){return a&&a.__esModule?a:{“default”:a}}var e=a(“global/window”);var f=d(e);var g=a(“aes-decrypter”);var h=a(“./bin-utils”);var i=function j(a){a.onmessage=function(a){var b=a.data;var c=new Uint8Array(b.encrypted.bytes,b.encrypted.byteOffset,b.encrypted.byteLength);var d=new Uint32Array(b.key.bytes,b.key.byteOffset,b.key.byteLength/4);var e=new Uint32Array(b.iv.bytes,b.iv.byteOffset,b.iv.byteLength/4);new g.Decrypter(c,d,e,function(a,c){f[“default”].postMessage((0,h.createTransferableMessage)({source:b.source,decrypted:c}),[c.buffer])})}};c[“default”]=function(a){return new i(a)};b.exports=c[“default”]},{“./bin-utils”:2,”aes-decrypter”:27,”global/window”:31}],6:[function(b,c,d){(function(c){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();var f=function V(a,b,c){var d=true;a:while(d){var e=a,f=b,g=c;d=false;if(e===null)e=Function.prototype;var h=Object.getOwnPropertyDescriptor(e,f);if(h===undefined){var i=Object.getPrototypeOf(e);if(i===null){return undefined}else{a=i;b=f;c=g;d=true;h=i=undefined;continue a}}else if(“value”in h){return h.value}else{var j=h.get;if(j===undefined){return undefined}return j.call(g)}}};function g(a){return a&&a.__esModule?a:{“default”:a}}function h(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}function i(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b}var j=b(“./playlist-loader”);var k=g(j);var l=b(“./dash-playlist-loader”);var m=g(l);var n=b(“./playlist.js”);var o=b(“./segment-loader”);var p=g(o);var q=b(“./vtt-segment-loader”);var r=g(q);var s=b(“./ranges”);var t=g(s);var u=typeof a!==”undefined”?a[“videojs”]:typeof c!==”undefined”?c[“videojs”]:null;var v=g(u);var w=b(“./ad-cue-tags”);var x=g(w);var y=b(“./sync-controller”);var z=g(y);var A=b(“videojs-contrib-media-sources/es5/codec-utils”);var B=b(“webworkify”);var C=g(B);var D=b(“./decrypter-worker”);var E=g(D);var F=b(“./config”);var G=g(F);var H=b(“./util/codecs.js”);var I=b(“./media-groups”);var J=60*2;var K=undefined;var L={videoCodec:”avc1″,videoObjectTypeIndicator:”.4d400d”,audioProfile:”2″};var M=[“mediaRequests”,”mediaRequestsAborted”,”mediaRequestsTimedout”,”mediaRequestsErrored”,”mediaTransferDuration”,”mediaBytesTransferred”];var N=function W(a){return this.audioSegmentLoader_[a]+this.mainSegmentLoader_[a]};var O=function X(a){return a.replace(/avc1\.(\d+)\.(\d+)/i,function(a){return(0,A.translateLegacyCodecs)([a])[0]})};d.mapLegacyAvcCodecs_=O;var P=function Y(a,b,c){return a+”/”+b+’; codecs=”‘+c.filter(function(a){return!!a}).join(“, “)+'”‘};var Q=function Z(a){if(a.segments&&a.segments.length&&a.segments[0].map){return”mp4″}return”mp2t”};var R=function $(a){var b=a.attributes||{};if(b.CODECS){return(0,H.parseCodecs)(b.CODECS)}return L};var S=function _(a,b){if(!a.mediaGroups.AUDIO||!b){return null}var c=a.mediaGroups.AUDIO[b];if(!c){return null}for(var d in c){var e=c[d];if(e[“default”]&&e.playlists){return(0,H.parseCodecs)(e.playlists[0].attributes.CODECS).audioProfile}}return null};var T=function aa(a,b){var c=Q(b);var d=R(b);var e=b.attributes||{};var f=true;var g=false;if(!b){return[]}if(a.mediaGroups.AUDIO&&e.AUDIO){var h=a.mediaGroups.AUDIO[e.AUDIO];if(h){g=true;f=false;for(var i in h){if(!h[i].uri&&!h[i].playlists){f=true;break}}}}if(g&&!d.audioProfile){if(!f){d.audioProfile=S(a,e.AUDIO)}if(!d.audioProfile){v[“default”].log.warn(“Multiple audio tracks present but no audio codec string is specified. “+”Attempting to use the default audio codec (mp4a.40.2)”);d.audioProfile=L.audioProfile}}var j={};if(d.videoCodec){j.video=””+d.videoCodec+d.videoObjectTypeIndicator}if(d.audioProfile){j.audio=”mp4a.40.”+d.audioProfile}var k=P(“audio”,c,[j.audio]);var l=P(“video”,c,[j.video]);var m=P(“video”,c,[j.video,j.audio]);if(g){if(!f&&j.video){return[l,k]}return[m,k]}if(!j.video){return[k]}return[m]};d.mimeTypesForPlaylist_=T;var U=function(b){i(c,b);function c(a){var b=this;h(this,c);f(Object.getPrototypeOf(c.prototype),”constructor”,this).call(this);var d=a.url;var e=a.withCredentials;var g=a.mode;var i=a.tech;var j=a.bandwidth;var l=a.externHls;var n=a.useCueTags;var o=a.blacklistDuration;var q=a.enableLowInitialPlaylist;var s=a.sourceType;if(!d){throw new Error(“A non-empty playlist URL is required”)}K=l;this.withCredentials=e;this.tech_=i;this.hls_=i.hls;this.mode_=g;this.sourceType_=s;this.useCueTags_=n;this.blacklistDuration=o;this.enableLowInitialPlaylist=q;if(this.useCueTags_){this.cueTagsTrack_=this.tech_.addTextTrack(“metadata”,”ad-cues”);this.cueTagsTrack_.inBandMetadataTrackDispatchType=””}this.requestOptions_={withCredentials:this.withCredentials,timeout:null};this.mediaTypes_=(0,I.createMediaTypes)();this.mediaSource=new v[“default”].MediaSource({mode:g});this.mediaSource.addEventListener(“sourceopen”,this.handleSourceOpen_.bind(this));this.seekable_=v[“default”].createTimeRanges();this.hasPlayed_=function(){return false};this.syncController_=new z[“default”](a);this.segmentMetadataTrack_=i.addRemoteTextTrack({kind:”metadata”,label:”segment-metadata”},false).track;this.decrypter_=(0,C[“default”])(E[“default”]);var t={hls:this.hls_,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:function u(){return b.seekable()},seeking:function w(){return b.tech_.seeking()},duration:function x(){return b.mediaSource.duration},hasPlayed:function y(){return b.hasPlayed_()},goalBufferLength:function A(){return b.goalBufferLength()},bandwidth:j,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_};this.masterPlaylistLoader_=this.sourceType_===”dash”?new m[“default”](d,this.hls_,this.withCredentials):new k[“default”](d,this.hls_,this.withCredentials);this.setupMasterPlaylistLoaderListeners_();this.mainSegmentLoader_=new p[“default”](v[“default”].mergeOptions(t,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:”main”}),a);this.audioSegmentLoader_=new p[“default”](v[“default”].mergeOptions(t,{loaderType:”audio”}),a);this.subtitleSegmentLoader_=new r[“default”](v[“default”].mergeOptions(t,{loaderType:”vtt”}),a);this.setupSegmentLoaderListeners_();M.forEach(function(a){b[a+”_”]=N.bind(b,a)});this.masterPlaylistLoader_.load()}e(c,[{key:”setupMasterPlaylistLoaderListeners_”,value:function d(){var a=this;this.masterPlaylistLoader_.on(“loadedmetadata”,function(){var b=a.masterPlaylistLoader_.media();var c=a.masterPlaylistLoader_.targetDuration*1.5*1e3;if((0,n.isLowestEnabledRendition)(a.masterPlaylistLoader_.master,a.masterPlaylistLoader_.media())){a.requestOptions_.timeout=0}else{a.requestOptions_.timeout=c}if(b.endList&&a.tech_.preload()!==”none”){a.mainSegmentLoader_.playlist(b,a.requestOptions_);a.mainSegmentLoader_.load()}(0,I.setupMediaGroups)({sourceType:a.sourceType_,segmentLoaders:{AUDIO:a.audioSegmentLoader_,SUBTITLES:a.subtitleSegmentLoader_,main:a.mainSegmentLoader_},tech:a.tech_,requestOptions:a.requestOptions_,masterPlaylistLoader:a.masterPlaylistLoader_,mode:a.mode_,hls:a.hls_,master:a.master(),mediaTypes:a.mediaTypes_,blacklistCurrentPlaylist:a.blacklistCurrentPlaylist.bind(a)});a.triggerPresenceUsage_(a.master(),b);try{a.setupSourceBuffers_()}catch(d){v[“default”].log.warn(“Failed to create SourceBuffers”,d);return a.mediaSource.endOfStream(“decode”)}a.setupFirstPlay();a.trigger(“selectedinitialmedia”)});this.masterPlaylistLoader_.on(“loadedplaylist”,function(){var b=a.masterPlaylistLoader_.media();if(!b){var c=undefined;if(a.enableLowInitialPlaylist){c=a.selectInitialPlaylist()}if(!c){c=a.selectPlaylist()}a.initialMedia_=c;a.masterPlaylistLoader_.media(a.initialMedia_);return}if(a.useCueTags_){a.updateAdCues_(b)}a.mainSegmentLoader_.playlist(b,a.requestOptions_);a.updateDuration();if(!a.tech_.paused()){a.mainSegmentLoader_.load()}if(!b.endList){(function(){var b=function c(){var b=a.seekable();if(b.length!==0){a.mediaSource.addSeekableRange_(b.start(0),b.end(0))}};if(a.duration()!==Infinity){(function(){var c=function d(){if(a.duration()===Infinity){b()}else{a.tech_.one(“durationchange”,d)}};a.tech_.one(“durationchange”,c)})()}else{b()}})()}});this.masterPlaylistLoader_.on(“error”,function(){a.blacklistCurrentPlaylist(a.masterPlaylistLoader_.error)});this.masterPlaylistLoader_.on(“mediachanging”,function(){a.mainSegmentLoader_.abort();a.mainSegmentLoader_.pause()});this.masterPlaylistLoader_.on(“mediachange”,function(){var b=a.masterPlaylistLoader_.media();var c=a.masterPlaylistLoader_.targetDuration*1.5*1e3;if((0,n.isLowestEnabledRendition)(a.masterPlaylistLoader_.master,a.masterPlaylistLoader_.media())){a.requestOptions_.timeout=0}else{a.requestOptions_.timeout=c}a.mainSegmentLoader_.playlist(b,a.requestOptions_);a.mainSegmentLoader_.load();a.tech_.trigger({type:”mediachange”,bubbles:true})});this.masterPlaylistLoader_.on(“playlistunchanged”,function(){var b=a.masterPlaylistLoader_.media();var c=a.stuckAtPlaylistEnd_(b);if(c){a.blacklistCurrentPlaylist({message:”Playlist no longer updating.”});a.tech_.trigger(“playliststuck”)}});this.masterPlaylistLoader_.on(“renditiondisabled”,function(){a.tech_.trigger({type:”usage”,name:”hls-rendition-disabled”})});this.masterPlaylistLoader_.on(“renditionenabled”,function(){a.tech_.trigger({type:”usage”,name:”hls-rendition-enabled”})})}},{key:”triggerPresenceUsage_”,value:function g(a,b){var c=a.mediaGroups||{};var d=true;var e=Object.keys(c.AUDIO);for(var f in c.AUDIO){for(var g in c.AUDIO[f]){var h=c.AUDIO[f][g];if(!h.uri){d=false}}}if(d){this.tech_.trigger({type:”usage”,name:”hls-demuxed”})}if(Object.keys(c.SUBTITLES).length){this.tech_.trigger({type:”usage”,name:”hls-webvtt”})}if(K.Playlist.isAes(b)){this.tech_.trigger({type:”usage”,name:”hls-aes”})}if(K.Playlist.isFmp4(b)){this.tech_.trigger({type:”usage”,name:”hls-fmp4″})}if(e.length&&Object.keys(c.AUDIO[e[0]]).length>1){this.tech_.trigger({type:”usage”,name:”hls-alternate-audio”})}if(this.useCueTags_){this.tech_.trigger({type:”usage”,name:”hls-playlist-cue-tags”})}}},{key:”setupSegmentLoaderListeners_”,value:function j(){var a=this;this.mainSegmentLoader_.on(“bandwidthupdate”,function(){var b=a.selectPlaylist();var c=a.masterPlaylistLoader_.media();var d=a.tech_.buffered();var e=d.length?d.end(d.length-1)-a.tech_.currentTime():0;var f=a.bufferLowWaterLine();if(!c.endList||a.duration()<G[“default”].MAX_BUFFER_LOW_WATER_LINE||b.attributes.BANDWIDTH<c.attributes.BANDWIDTH||e>=f){a.masterPlaylistLoader_.media(b)}a.tech_.trigger(“bandwidthupdate”)});this.mainSegmentLoader_.on(“progress”,function(){a.trigger(“progress”)});this.mainSegmentLoader_.on(“error”,function(){a.blacklistCurrentPlaylist(a.mainSegmentLoader_.error())});this.mainSegmentLoader_.on(“syncinfoupdate”,function(){a.onSyncInfoUpdate_()});this.mainSegmentLoader_.on(“timestampoffset”,function(){a.tech_.trigger({type:”usage”,name:”hls-timestamp-offset”})});this.audioSegmentLoader_.on(“syncinfoupdate”,function(){a.onSyncInfoUpdate_()});this.mainSegmentLoader_.on(“ended”,function(){a.onEndOfStream()});this.mainSegmentLoader_.on(“earlyabort”,function(){a.blacklistCurrentPlaylist({message:”Aborted early because there isn’t enough bandwidth to complete the “+”request without rebuffering.”},J)});this.mainSegmentLoader_.on(“reseteverything”,function(){a.tech_.trigger(“hls-reset”)});this.mainSegmentLoader_.on(“segmenttimemapping”,function(b){a.tech_.trigger({type:”hls-segment-time-mapping”,mapping:b.mapping})});this.audioSegmentLoader_.on(“ended”,function(){a.onEndOfStream()})}},{key:”mediaSecondsLoaded_”,value:function l(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}},{key:”load”,value:function o(){this.mainSegmentLoader_.load();if(this.mediaTypes_.AUDIO.activePlaylistLoader){this.audioSegmentLoader_.load()}if(this.mediaTypes_.SUBTITLES.activePlaylistLoader){this.subtitleSegmentLoader_.load()}}},{key:”fastQualityChange_”,value:function q(){var a=this.selectPlaylist();if(a!==this.masterPlaylistLoader_.media()){this.masterPlaylistLoader_.media(a);this.mainSegmentLoader_.resetLoader()}}},{key:”play”,value:function s(){if(this.setupFirstPlay()){return}if(this.tech_.ended()){this.tech_.setCurrentTime(0)}if(this.hasPlayed_()){this.load()}var a=this.tech_.seekable();if(this.tech_.duration()===Infinity){if(this.tech_.currentTime()<a.start(0)){return this.tech_.setCurrentTime(a.end(a.length-1))}}}},{key:”setupFirstPlay”,value:function u(){var a=this;var b=this.masterPlaylistLoader_.media();if(!b||this.tech_.paused()||this.hasPlayed_()){return false}if(!b.endList){var c=function(){var b=a.seekable();if(!b.length){return{v:false}}if(v[“default”].browser.IE_VERSION&&a.mode_===”html5″&&a.tech_.readyState()===0){a.tech_.one(“loadedmetadata”,function(){a.trigger(“firstplay”);a.tech_.setCurrentTime(b.end(0));a.hasPlayed_=function(){return true}});return{v:false}}a.trigger(“firstplay”);a.tech_.setCurrentTime(b.end(0))}();if(typeof c===”object”)return c.v}this.hasPlayed_=function(){return true};this.load();return true}},{key:”handleSourceOpen_”,value:function w(){try{this.setupSourceBuffers_()}catch(a){v[“default”].log.warn(“Failed to create Source Buffers”,a);return this.mediaSource.endOfStream(“decode”)}if(this.tech_.autoplay()){this.tech_.play()}this.trigger(“sourceopen”)}},{key:”onEndOfStream”,value:function y(){var a=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){a=a&&this.audioSegmentLoader_.ended_}if(a){this.mediaSource.endOfStream()}}},{key:”stuckAtPlaylistEnd_”,value:function A(a){var b=this.seekable();if(!b.length){return false}var c=this.syncController_.getExpiredTime(a,this.mediaSource.duration);if(c===null){return false}var d=K.Playlist.playlistEnd(a,c);var e=this.tech_.currentTime();var f=this.tech_.buffered();if(!f.length){return d-e<=t[“default”].SAFE_TIME_DELTA}var g=f.end(f.length-1);return g-e<=t[“default”].SAFE_TIME_DELTA&&d-g<=t[“default”].SAFE_TIME_DELTA}},{key:”blacklistCurrentPlaylist”,value:function B(a,b){if(a===undefined)a={};var c=undefined;var d=undefined;c=a.playlist||this.masterPlaylistLoader_.media();b=b||a.blacklistDuration||this.blacklistDuration;if(!c){this.error=a;try{return this.mediaSource.endOfStream(“network”)}catch(e){return this.trigger(“error”)}}var f=this.masterPlaylistLoader_.master.playlists.filter(n.isEnabled).length===1;if(f){v[“default”].log.warn(“Problem encountered with the current “+”HLS playlist. Trying again since it is the final playlist.”);this.tech_.trigger(“retryplaylist”);return this.masterPlaylistLoader_.load(f)}c.excludeUntil=Date.now()+b*1e3;this.tech_.trigger(“blacklistplaylist”);this.tech_.trigger({type:”usage”,name:”hls-rendition-blacklisted”});d=this.selectPlaylist();v[“default”].log.warn(“Problem encountered with the current HLS playlist.”+(a.message?” “+a.message:””)+” Switching to another playlist.”);return this.masterPlaylistLoader_.media(d)}},{key:”pauseLoading”,value:function D(){this.mainSegmentLoader_.pause();if(this.mediaTypes_.AUDIO.activePlaylistLoader){this.audioSegmentLoader_.pause()}if(this.mediaTypes_.SUBTITLES.activePlaylistLoader){this.subtitleSegmentLoader_.pause()}}},{key:”setCurrentTime”,value:function F(a){var b=t[“default”].findRange(this.tech_.buffered(),a);if(!(this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media())){return 0}if(!this.masterPlaylistLoader_.media().segments){return 0}if(b&&b.length&&this.mode_!==”flash”){return a}this.mainSegmentLoader_.resetEverything();this.mainSegmentLoader_.abort();if(this.mediaTypes_.AUDIO.activePlaylistLoader){this.audioSegmentLoader_.resetEverything();this.audioSegmentLoader_.abort()}if(this.mediaTypes_.SUBTITLES.activePlaylistLoader){this.subtitleSegmentLoader_.resetEverything();this.subtitleSegmentLoader_.abort()}this.load()}},{key:”duration”,value:function L(){if(!this.masterPlaylistLoader_){return 0}if(this.mediaSource){return this.mediaSource.duration}return K.Playlist.duration(this.masterPlaylistLoader_.media())}},{key:”seekable”,value:function P(){return this.seekable_}},{key:”onSyncInfoUpdate_”,value:function Q(){var a=undefined;var b=undefined;if(!this.masterPlaylistLoader_){return}var c=this.masterPlaylistLoader_.media();if(!c){return}var d=this.syncController_.getExpiredTime(c,this.mediaSource.duration);if(d===null){return}a=K.Playlist.seekable(c,d);if(a.length===0){return}if(this.mediaTypes_.AUDIO.activePlaylistLoader){c=this.mediaTypes_.AUDIO.activePlaylistLoader.media();d=this.syncController_.getExpiredTime(c,this.mediaSource.duration);if(d===null){return}b=K.Playlist.seekable(c,d);if(b.length===0){return}}if(!b){this.seekable_=a}else if(b.start(0)>a.end(0)||a.start(0)>b.end(0)){this.seekable_=a}else{this.seekable_=v[“default”].createTimeRanges([[b.start(0)>a.start(0)?b.start(0):a.start(0),b.end(0)<a.end(0)?b.end(0):a.end(0)]])}this.tech_.trigger(“seekablechanged”)}},{key:”updateDuration”,value:function R(){var a=this;var b=this.mediaSource.duration;var c=K.Playlist.duration(this.masterPlaylistLoader_.media());var d=this.tech_.buffered();var e=function f(){a.mediaSource.duration=c;a.tech_.trigger(“durationchange”);a.mediaSource.removeEventListener(“sourceopen”,f)};if(d.length>0){c=Math.max(c,d.end(d.length-1))}if(b!==c){if(this.mediaSource.readyState!==”open”){this.mediaSource.addEventListener(“sourceopen”,e)}else{e()}}}},{key:”dispose”,value:function S(){var a=this;this.decrypter_.terminate();this.masterPlaylistLoader_.dispose();this.mainSegmentLoader_.dispose();[“AUDIO”,”SUBTITLES”].forEach(function(b){var c=a.mediaTypes_[b].groups;for(var d in c){c[d].forEach(function(a){if(a.playlistLoader){a.playlistLoader.dispose()}})}});this.audioSegmentLoader_.dispose();this.subtitleSegmentLoader_.dispose()}},{key:”master”,value:function U(){return this.masterPlaylistLoader_.master}},{key:”media”,value:function V(){return this.masterPlaylistLoader_.media()||this.initialMedia_}},{key:”setupSourceBuffers_”,value:function W(){var a=this.masterPlaylistLoader_.media();var b=undefined;if(!a||this.mediaSource.readyState!==”open”){return}b=T(this.masterPlaylistLoader_.master,a);if(b.length<1){this.error=”No compatible SourceBuffer configuration for the variant stream:”+a.resolvedUri;return this.mediaSource.endOfStream(“decode”)}this.configureLoaderMimeTypes_(b);this.excludeIncompatibleVariants_(a)}},{key:”configureLoaderMimeTypes_”,value:function X(a){var b=a.length>1&&a[0].indexOf(“,”)===-1?new v[“default”].EventTarget:null;this.mainSegmentLoader_.mimeType(a[0],b);if(a[1]){this.audioSegmentLoader_.mimeType(a[1],b)}}},{key:”excludeIncompatibleVariants_”,value:function Y(b){var c=this.masterPlaylistLoader_.master;var d=2;var e=null;var f=undefined;if(b.attributes.CODECS){f=(0,H.parseCodecs)(b.attributes.CODECS);e=f.videoCodec;d=f.codecCount}c.playlists.forEach(function(b){var c={codecCount:2,videoCodec:null};if(b.attributes.CODECS){var f=b.attributes.CODECS;c=(0,H.parseCodecs)(f);if(a.MediaSource&&a.MediaSource.isTypeSupported&&!a.MediaSource.isTypeSupported(‘video/mp4; codecs=”‘+O(f)+'”‘)){b.excludeUntil=Infinity}}if(c.codecCount!==d){b.excludeUntil=Infinity}if(c.videoCodec!==e){b.excludeUntil=Infinity}})}},{key:”updateAdCues_”,value:function Z(a){var b=0;var c=this.seekable();if(c.length){b=c.start(0)}x[“default”].updateAdCues(a,this.cueTagsTrack_,b)}},{key:”goalBufferLength”,value:function $(){var a=this.tech_.currentTime();var b=G[“default”].GOAL_BUFFER_LENGTH;var c=G[“default”].GOAL_BUFFER_LENGTH_RATE;var d=Math.max(b,G[“default”].MAX_GOAL_BUFFER_LENGTH);return Math.min(b+a*c,d)}},{key:”bufferLowWaterLine”,value:function _(){var a=this.tech_.currentTime();var b=G[“default”].BUFFER_LOW_WATER_LINE;var c=G[“default”].BUFFER_LOW_WATER_LINE_RATE;var d=Math.max(b,G[“default”].MAX_BUFFER_LOW_WATER_LINE);return Math.min(b+a*c,d)}}]);return c}(v[“default”].EventTarget);d.MasterPlaylistController=U}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{“./ad-cue-tags”:1,”./config”:3,”./dash-playlist-loader”:4,”./decrypter-worker”:5,”./media-groups”:7,”./playlist-loader”:10,”./playlist.js”:12,”./ranges”:13,”./segment-loader”:17,”./sync-controller”:19,”./util/codecs.js”:20,”./vtt-segment-loader”:22,”videojs-contrib-media-sources/es5/codec-utils”:69,webworkify:80}],7:[function(b,c,d){(function(c){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});function e(a){return a&&a.__esModule?a:{“default”:a}}var f=typeof a!==”undefined”?a[“videojs”]:typeof c!==”undefined”?c[“videojs”]:null;var g=e(f);var h=b(“./playlist-loader”);var i=e(h);var j=b(“./dash-playlist-loader”);var k=e(j);var l=function y(){};var m=function z(a){var b=a[“default”]?”main”:”alternative”;if(a.characteristics&&a.characteristics.indexOf(“public.accessibility.describes-video”)>=0){b=”main-desc”}return b};var n=function A(a,b){a.abort();a.pause();if(b&&b.activePlaylistLoader){b.activePlaylistLoader.pause();b.activePlaylistLoader=null}};d.stopLoaders=n;var o=function B(a,b){b.activePlaylistLoader=a;a.load()};d.startLoaders=o;var p=function C(a,b){return function(){var c=b.segmentLoaders;var d=c[a];var e=c.main;var f=b.mediaTypes[a];var g=f.activeTrack();var h=f.activeGroup(g);var i=f.activePlaylistLoader;n(d,f);if(!h){return}if(!h.playlistLoader){if(i){e.resetEverything()}return}d.resyncLoader();o(h.playlistLoader,f)}};d.onGroupChanged=p;var q=function D(a,b){return function(){var c=b.segmentLoaders;var d=c[a];var e=c.main;var f=b.mediaTypes[a];var g=f.activeTrack();var h=f.activeGroup(g);var i=f.activePlaylistLoader;n(d,f);if(!h){return}if(!h.playlistLoader){e.resetEverything();return}if(i===h.playlistLoader){o(h.playlistLoader,f);return}if(d.track){d.track(g)}d.resetEverything();o(h.playlistLoader,f)}};d.onTrackChanged=q;var r={AUDIO:function E(a,b){return function(){var c=b.segmentLoaders[a];var d=b.mediaTypes[a];var e=b.blacklistCurrentPlaylist;n(c,d);var f=d.activeTrack();var h=d.activeGroup();var i=(h.filter(function(a){return a[“default”]})[0]||h[0]).id;var j=d.tracks[i];if(f===j){ e({message:”Problem encountered loading the default audio track.”});return}g[“default”].log.warn(“Problem encountered loading the alternate audio track.”+”Switching back to default.”);for(var k in d.tracks){d.tracks[k].enabled=d.tracks[k]===j}d.onTrackChanged()}},SUBTITLES:function F(a,b){return function(){var c=b.segmentLoaders[a];var d=b.mediaTypes[a];g[“default”].log.warn(“Problem encountered loading the subtitle track.”+”Disabling subtitle track.”);n(c,d);var e=d.activeTrack();if(e){e.mode=”disabled”}d.onTrackChanged()}}};d.onError=r;var s={AUDIO:function G(a,b,c){if(!b){return}var d=c.tech;var e=c.requestOptions;var f=c.segmentLoaders[a];b.on(“loadedmetadata”,function(){var a=b.media();f.playlist(a,e);if(!d.paused()||a.endList&&d.preload()!==”none”){f.load()}});b.on(“loadedplaylist”,function(){f.playlist(b.media(),e);if(!d.paused()){f.load()}});b.on(“error”,r[a](a,c))},SUBTITLES:function H(a,b,c){var d=c.tech;var e=c.requestOptions;var f=c.segmentLoaders[a];var g=c.mediaTypes[a];b.on(“loadedmetadata”,function(){var a=b.media();f.playlist(a,e);f.track(g.activeTrack());if(!d.paused()||a.endList&&d.preload()!==”none”){f.load()}});b.on(“loadedplaylist”,function(){f.playlist(b.media(),e);if(!d.paused()){f.load()}});b.on(“error”,r[a](a,c))}};d.setupListeners=s;var t={AUDIO:function I(a,b){var c=b.mode;var d=b.hls;var e=b.sourceType;var f=b.segmentLoaders[a];var h=b.requestOptions.withCredentials;var j=b.master.mediaGroups;var l=b.mediaTypes[a];var n=l.groups;var o=l.tracks;if(!j[a]||Object.keys(j[a]).length===0||c!==”html5″){j[a]={main:{“default”:{“default”:true}}}}for(var p in j[a]){if(!n[p]){n[p]=[]}for(var q in j[a][p]){var t=j[a][p][q];var u=undefined;if(t.resolvedUri){u=new i[“default”](t.resolvedUri,d,h)}else if(t.playlists&&e===”dash”){u=new k[“default”](t.playlists[0],d,h)}else{u=null}t=g[“default”].mergeOptions({id:q,playlistLoader:u},t);s[a](a,t.playlistLoader,b);n[p].push(t);if(typeof o[q]===”undefined”){var v=new g[“default”].AudioTrack({id:q,kind:m(t),enabled:false,language:t.language,”default”:t[“default”],label:q});o[q]=v}}}f.on(“error”,r[a](a,b))},SUBTITLES:function J(a,b){var c=b.tech;var d=b.hls;var e=b.sourceType;var f=b.segmentLoaders[a];var h=b.requestOptions.withCredentials;var j=b.master.mediaGroups;var l=b.mediaTypes[a];var m=l.groups;var n=l.tracks;for(var o in j[a]){if(!m[o]){m[o]=[]}for(var p in j[a][o]){if(j[a][o][p].forced){continue}var q=j[a][o][p];var t=undefined;if(e===”hls”){t=new i[“default”](q.resolvedUri,d,h)}else if(e===”dash”){t=new k[“default”](q.playlists[0],d,h)}q=g[“default”].mergeOptions({id:p,playlistLoader:t},q);s[a](a,q.playlistLoader,b);m[o].push(q);if(typeof n[p]===”undefined”){var u=c.addRemoteTextTrack({id:p,kind:”subtitles”,enabled:false,language:q.language,label:p},false).track;n[p]=u}}}f.on(“error”,r[a](a,b))},”CLOSED-CAPTIONS”:function K(a,b){var c=b.tech;var d=b.master.mediaGroups;var e=b.mediaTypes[a];var f=e.groups;var h=e.tracks;for(var i in d[a]){if(!f[i]){f[i]=[]}for(var j in d[a][i]){var k=d[a][i][j];if(!k.instreamId.match(/CC\d/)){continue}f[i].push(g[“default”].mergeOptions({id:j},k));if(typeof h[j]===”undefined”){var l=c.addRemoteTextTrack({id:k.instreamId,kind:”captions”,enabled:false,language:k.language,label:j},false).track;h[j]=l}}}}};d.initialize=t;var u=function L(a,b){return function(c){var d=b.masterPlaylistLoader;var e=b.mediaTypes[a].groups;var f=d.media();if(!f){return null}var g=null;if(f.attributes[a]){g=e[f.attributes[a]]}g=g||e.main;if(typeof c===”undefined”){return g}if(c===null){return null}return g.filter(function(a){return a.id===c.id})[0]||null}};d.activeGroup=u;var v={AUDIO:function M(a,b){return function(){var c=b.mediaTypes[a].tracks;for(var d in c){if(c[d].enabled){return c[d]}}return null}},SUBTITLES:function N(a,b){return function(){var c=b.mediaTypes[a].tracks;for(var d in c){if(c[d].mode===”showing”){return c[d]}}return null}}};d.activeTrack=v;var w=function O(a){[“AUDIO”,”SUBTITLES”,”CLOSED-CAPTIONS”].forEach(function(b){t[b](b,a)});var b=a.mediaTypes;var c=a.masterPlaylistLoader;var d=a.tech;var e=a.hls;[“AUDIO”,”SUBTITLES”].forEach(function(c){b[c].activeGroup=u(c,a);b[c].activeTrack=v[c](c,a);b[c].onGroupChanged=p(c,a);b[c].onTrackChanged=q(c,a)});var f=b.AUDIO.activeGroup();var g=(f.filter(function(a){return a[“default”]})[0]||f[0]).id;b.AUDIO.tracks[g].enabled=true;b.AUDIO.onTrackChanged();c.on(“mediachange”,function(){[“AUDIO”,”SUBTITLES”].forEach(function(a){return b[a].onGroupChanged()})});var h=function j(){b.AUDIO.onTrackChanged();d.trigger({type:”usage”,name:”hls-audio-change”})};d.audioTracks().addEventListener(“change”,h);d.remoteTextTracks().addEventListener(“change”,b.SUBTITLES.onTrackChanged);e.on(“dispose”,function(){d.audioTracks().removeEventListener(“change”,h);d.remoteTextTracks().removeEventListener(“change”,b.SUBTITLES.onTrackChanged)});d.clearTracks(“audio”);for(var i in b.AUDIO.tracks){d.audioTracks().addTrack(b.AUDIO.tracks[i])}};d.setupMediaGroups=w;var x=function P(){var a={};[“AUDIO”,”SUBTITLES”,”CLOSED-CAPTIONS”].forEach(function(b){a[b]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:l,activeTrack:l,onGroupChanged:l,onTrackChanged:l}});return a};d.createMediaTypes=x}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{“./dash-playlist-loader”:4,”./playlist-loader”:10}],8:[function(b,c,d){(function(c){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});function e(a){return a&&a.__esModule?a:{“default”:a}}var f=typeof a!==”undefined”?a[“videojs”]:typeof c!==”undefined”?c[“videojs”]:null;var g=e(f);var h=b(“./bin-utils”);var i={FAILURE:2,TIMEOUT:-101,ABORTED:-102};d.REQUEST_ERRORS=i;var j=function x(a){var b=undefined;var c=undefined;c=a.offset+a.length-1;b=a.offset;return”bytes=”+b+”-“+c};var k=function y(a){var b={};if(a.byterange){b.Range=j(a.byterange)}return b};var l=function z(a){a.forEach(function(a){a.abort()})};var m=function A(a){return{bandwidth:a.bandwidth,bytesReceived:a.bytesReceived||0,roundTripTime:a.roundTripTime||0}};var n=function B(a){var b=a.target;var c=Date.now()-b.requestTime;var d={bandwidth:Infinity,bytesReceived:0,roundTripTime:c||0};d.bytesReceived=a.loaded;d.bandwidth=Math.floor(d.bytesReceived/d.roundTripTime*8*1e3);return d};var o=function C(a,b){if(b.timedout){return{status:b.status,message:”HLS request timed-out at URL: “+b.uri,code:i.TIMEOUT,xhr:b}}if(b.aborted){return{status:b.status,message:”HLS request aborted at URL: “+b.uri,code:i.ABORTED,xhr:b}}if(a){return{status:b.status,message:”HLS request errored at URL: “+b.uri,code:i.FAILURE,xhr:b}}return null};var p=function D(a,b){return function(c,d){var e=d.response;var f=o(c,d);if(f){return b(f,a)}if(e.byteLength!==16){return b({status:d.status,message:”Invalid HLS key at URL: “+d.uri,code:i.FAILURE,xhr:d},a)}var g=new DataView(e);a.key.bytes=new Uint32Array([g.getUint32(0),g.getUint32(4),g.getUint32(8),g.getUint32(12)]);return b(null,a)}};var q=function E(a,b){return function(c,d){var e=d.response;var f=o(c,d);if(f){return b(f,a)}if(e.byteLength===0){return b({status:d.status,message:”Empty HLS segment content at URL: “+d.uri,code:i.FAILURE,xhr:d},a)}a.map.bytes=new Uint8Array(d.response);return b(null,a)}};var r=function F(a,b){return function(c,d){var e=d.response;var f=o(c,d);if(f){return b(f,a)}if(e.byteLength===0){return b({status:d.status,message:”Empty HLS segment content at URL: “+d.uri,code:i.FAILURE,xhr:d},a)}a.stats=m(d);if(a.key){a.encryptedBytes=new Uint8Array(d.response)}else{a.bytes=new Uint8Array(d.response)}return b(null,a)}};var s=function G(a,b,c){var d=function e(d){if(d.data.source===b.requestId){a.removeEventListener(“message”,e);var f=d.data.decrypted;b.bytes=new Uint8Array(f.bytes,f.byteOffset,f.byteLength);return c(null,b)}};a.addEventListener(“message”,d);a.postMessage((0,h.createTransferableMessage)({source:b.requestId,encrypted:b.encryptedBytes,key:b.key.bytes,iv:b.key.iv}),[b.encryptedBytes.buffer,b.key.bytes.buffer])};var t=function H(a){return a.reduce(function(a,b){return b.code>a.code?b:a})};var u=function I(a,b,c){var d=[];var e=0;return function(f,g){if(f){l(a);d.push(f)}e+=1;if(e===a.length){g.endOfAllRequests=Date.now();if(d.length>0){var h=t(d);return c(h,g)}if(g.encryptedBytes){return s(b,g,c)}return c(null,g)}}};var v=function J(a,b){return function(c){a.stats=g[“default”].mergeOptions(a.stats,n(c));if(!a.stats.firstBytesReceivedAt&&a.stats.bytesReceived){a.stats.firstBytesReceivedAt=Date.now()}return b(c,a)}};var w=function K(a,b,c,d,e,f){var h=[];var i=u(h,c,f);if(d.key){var j=g[“default”].mergeOptions(b,{uri:d.key.resolvedUri,responseType:”arraybuffer”});var m=p(d,i);var n=a(j,m);h.push(n)}if(d.map&&!d.map.bytes){var o=g[“default”].mergeOptions(b,{uri:d.map.resolvedUri,responseType:”arraybuffer”,headers:k(d.map)});var s=q(d,i);var t=a(o,s);h.push(t)}var w=g[“default”].mergeOptions(b,{uri:d.resolvedUri,responseType:”arraybuffer”,headers:k(d)});var x=r(d,i);var y=a(w,x);y.addEventListener(“progress”,v(d,e));h.push(y);return function(){return l(h)}};d.mediaSegmentRequest=w}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{“./bin-utils”:2}],9:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();function e(a){return a&&a.__esModule?a:{“default”:a}}function f(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}var g=a(“global/window”);var h=e(g);var i=a(“./ranges”);var j=e(i);var k=a(“./util/logger”);var l=e(k);var m=[“seeking”,”seeked”,”pause”,”playing”,”error”];var n=function(){function a(b){var c=this;f(this,a);this.tech_=b.tech;this.seekable=b.seekable;this.consecutiveUpdates=0;this.lastRecordedTime=null;this.timer_=null;this.checkCurrentTimeTimeout_=null;this.logger_=(0,l[“default”])(“PlaybackWatcher”);this.logger_(“initialize”);var d=function j(){return c.monitorCurrentTime_()};var e=function k(){return c.techWaiting_()};var g=function n(){return c.cancelTimer_()};var i=function o(){return c.fixesBadSeeks_()};this.tech_.on(“seekablechanged”,i);this.tech_.on(“waiting”,e);this.tech_.on(m,g);this.tech_.on(“canplay”,d);this.dispose=function(){c.logger_(“dispose”);c.tech_.off(“seekablechanged”,i);c.tech_.off(“waiting”,e);c.tech_.off(m,g);c.tech_.off(“canplay”,d);if(c.checkCurrentTimeTimeout_){h[“default”].clearTimeout(c.checkCurrentTimeTimeout_)}c.cancelTimer_()}}d(a,[{key:”monitorCurrentTime_”,value:function b(){this.checkCurrentTime_();if(this.checkCurrentTimeTimeout_){h[“default”].clearTimeout(this.checkCurrentTimeTimeout_)}this.checkCurrentTimeTimeout_=h[“default”].setTimeout(this.monitorCurrentTime_.bind(this),250)}},{key:”checkCurrentTime_”,value:function c(){if(this.tech_.seeking()&&this.fixesBadSeeks_()){this.consecutiveUpdates=0;this.lastRecordedTime=this.tech_.currentTime();return}if(this.tech_.paused()||this.tech_.seeking()){return}var a=this.tech_.currentTime();var b=this.tech_.buffered();if(this.lastRecordedTime===a&&(!b.length||a+j[“default”].SAFE_TIME_DELTA>=b.end(b.length-1))){return this.techWaiting_()}if(this.consecutiveUpdates>=5&&a===this.lastRecordedTime){this.consecutiveUpdates++;this.waiting_()}else if(a===this.lastRecordedTime){this.consecutiveUpdates++}else{this.consecutiveUpdates=0;this.lastRecordedTime=a}}},{key:”cancelTimer_”,value:function e(){this.consecutiveUpdates=0;if(this.timer_){this.logger_(“cancelTimer_”);clearTimeout(this.timer_)}this.timer_=null}},{key:”fixesBadSeeks_”,value:function g(){var a=this.tech_.seeking();var b=this.seekable();var c=this.tech_.currentTime();var d=undefined;if(a&&this.afterSeekableWindow_(b,c)){var e=b.end(b.length-1);d=e}if(a&&this.beforeSeekableWindow_(b,c)){var f=b.start(0);d=f+j[“default”].SAFE_TIME_DELTA}if(typeof d!==”undefined”){this.logger_(“Trying to seek outside of seekable at time “+c+” with “+(“seekable range “+j[“default”].printableRange(b)+”. Seeking to “)+(d+”.”));this.tech_.setCurrentTime(d);return true}return false}},{key:”waiting_”,value:function i(){if(this.techWaiting_()){return}var a=this.tech_.currentTime();var b=this.tech_.buffered();var c=j[“default”].findRange(b,a);if(c.length&&a+3<=c.end(0)){this.cancelTimer_();this.tech_.setCurrentTime(a);this.logger_(“Stopped at “+a+” while inside a buffered region “+(“[“+c.start(0)+” -> “+c.end(0)+”]. Attempting to resume “)+”playback by seeking to the current time.”);this.tech_.trigger({type:”usage”,name:”hls-unknown-waiting”});return}}},{key:”techWaiting_”,value:function k(){var a=this.seekable();var b=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_()){return true}if(this.tech_.seeking()||this.timer_!==null){return true}if(this.beforeSeekableWindow_(a,b)){var c=a.end(a.length-1);this.logger_(“Fell out of live window at time “+b+”. Seeking to “+(“live point (seekable end) “+c));this.cancelTimer_();this.tech_.setCurrentTime(c);this.tech_.trigger({type:”usage”,name:”hls-live-resync”});return true}var d=this.tech_.buffered();var e=j[“default”].findNextRange(d,b);if(this.videoUnderflow_(e,d,b)){this.cancelTimer_();this.tech_.setCurrentTime(b);this.tech_.trigger({type:”usage”,name:”hls-video-underflow”});return true}if(e.length>0){var f=e.start(0)-b;this.logger_(“Stopped at “+b+”, setting timer for “+f+”, seeking “+(“to “+e.start(0)));this.timer_=setTimeout(this.skipTheGap_.bind(this),f*1e3,b);return true}return false}},{key:”afterSeekableWindow_”,value:function n(a,b){if(!a.length){return false}if(b>a.end(a.length-1)+j[“default”].SAFE_TIME_DELTA){return true}return false}},{key:”beforeSeekableWindow_”,value:function o(a,b){if(a.length&&a.start(0)>0&&b<a.start(0)-j[“default”].SAFE_TIME_DELTA){return true}return false}},{key:”videoUnderflow_”,value:function p(a,b,c){if(a.length===0){var d=this.gapFromVideoUnderflow_(b,c);if(d){this.logger_(“Encountered a gap in video from “+d.start+” to “+d.end+”. “+(“Seeking to current time “+c));return true}}return false}},{key:”skipTheGap_”,value:function q(a){var b=this.tech_.buffered();var c=this.tech_.currentTime();var d=j[“default”].findNextRange(b,c);this.cancelTimer_();if(d.length===0||c!==a){return}this.logger_(“skipTheGap_:”,”currentTime:”,c,”scheduled currentTime:”,a,”nextRange start:”,d.start(0));this.tech_.setCurrentTime(d.start(0)+j[“default”].TIME_FUDGE_FACTOR);this.tech_.trigger({type:”usage”,name:”hls-gap-skip”})}},{key:”gapFromVideoUnderflow_”,value:function r(a,b){var c=j[“default”].findGaps(a);for(var d=0;d<c.length;d++){var e=c.start(d);var f=c.end(d);if(b-e<4&&b-e>2){return{start:e,end:f}}}return null}}]);return a}();c[“default”]=n;b.exports=c[“default”]},{“./ranges”:13,”./util/logger”:21,”global/window”:31}],10:[function(b,c,d){(function(c){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();var f=function x(a,b,c){var d=true;a:while(d){var e=a,f=b,g=c;d=false;if(e===null)e=Function.prototype;var h=Object.getOwnPropertyDescriptor(e,f);if(h===undefined){var i=Object.getPrototypeOf(e);if(i===null){return undefined}else{a=i;b=f;c=g;d=true;h=i=undefined;continue a}}else if(“value”in h){return h.value}else{var j=h.get;if(j===undefined){return undefined}return j.call(g)}}};function g(a){return a&&a.__esModule?a:{“default”:a}}function h(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}function i(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b}var j=b(“./resolve-url”);var k=g(j);var l=typeof a!==”undefined”?a[“videojs”]:typeof c!==”undefined”?c[“videojs”]:null;var m=b(“m3u8-parser”);var n=g(m);var o=b(“global/window”);var p=g(o);var q=function y(a,b,c){var d=b.slice();c=c||0;var e=Math.min(a.length,b.length+c);for(var f=c;f<e;f++){d[f-c]=(0,l.mergeOptions)(a[f],d[f-c])}return d};d.updateSegments=q;var r=function z(a,b){if(!a.resolvedUri){a.resolvedUri=(0,k[“default”])(b,a.uri)}if(a.key&&!a.key.resolvedUri){a.key.resolvedUri=(0,k[“default”])(b,a.key.uri)}if(a.map&&!a.map.resolvedUri){a.map.resolvedUri=(0,k[“default”])(b,a.map.uri)}};d.resolveSegmentUris=r;var s=function A(a,b){var c=(0,l.mergeOptions)(a,{});var d=c.playlists.filter(function(a){return a.uri===b.uri})[0];if(!d){return null}if(d.segments&&b.segments&&d.segments.length===b.segments.length&&d.mediaSequence===b.mediaSequence){return null}var e=(0,l.mergeOptions)(d,b);if(d.segments){e.segments=q(d.segments,b.segments,b.mediaSequence-d.mediaSequence)}e.segments.forEach(function(a){r(a,e.resolvedUri)});for(var f=0;f<c.playlists.length;f++){if(c.playlists[f].uri===b.uri){c.playlists[f]=e}}c.playlists[b.uri]=e;return c};d.updateMaster=s;var t=function B(a){var b=a.playlists.length;while(b–){var c=a.playlists[b];a.playlists[c.uri]=c;c.resolvedUri=(0,k[“default”])(a.uri,c.uri);if(!c.attributes){c.attributes={};l.log.warn(“Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.”)}}};d.setupMediaPlaylists=t;var u=function C(a){[“AUDIO”,”SUBTITLES”].forEach(function(b){for(var c in a.mediaGroups[b]){for(var d in a.mediaGroups[b][c]){var e=a.mediaGroups[b][c][d];if(e.uri){e.resolvedUri=(0,k[“default”])(a.uri,e.uri)}}}})};d.resolveMediaGroupUris=u;var v=function D(a,b){var c=a.segments[a.segments.length-1];var d=undefined;if(b&&c&&c.duration){d=c.duration*1e3}else{d=(a.targetDuration||10)*500}return d};d.refreshDelay=v;var w=function(a){i(b,a);function b(a,c,d){var e=this;h(this,b);f(Object.getPrototypeOf(b.prototype),”constructor”,this).call(this);this.srcUrl=a;this.hls_=c;this.withCredentials=d;if(!this.srcUrl){throw new Error(“A non-empty playlist URL is required”)}this.state=”HAVE_NOTHING”;this.on(“mediaupdatetimeout”,function(){if(e.state!==”HAVE_METADATA”){return}e.state=”HAVE_CURRENT_METADATA”;e.request=e.hls_.xhr({uri:(0,k[“default”])(e.master.uri,e.media().uri),withCredentials:e.withCredentials},function(a,b){if(!e.request){return}if(a){return e.playlistRequestError(e.request,e.media().uri,”HAVE_METADATA”)}e.haveMetadata(e.request,e.media().uri)})})}e(b,[{key:”playlistRequestError”,value:function c(a,b,d){this.request=null;if(d){this.state=d}this.error={playlist:this.master.playlists[b],status:a.status,message:”HLS playlist request error at URL: “+b,responseText:a.responseText,code:a.status>=500?4:2};this.trigger(“error”)}},{key:”haveMetadata”,value:function d(a,b){var c=this;this.request=null;this.state=”HAVE_METADATA”;var d=new n[“default”].Parser;d.push(a.responseText);d.end();d.manifest.uri=b;d.manifest.attributes=d.manifest.attributes||{};var e=s(this.master,d.manifest);this.targetDuration=d.manifest.targetDuration;if(e){this.master=e;this.media_=this.master.playlists[d.manifest.uri]}else{this.trigger(“playlistunchanged”)}if(!this.media().endList){p[“default”].clearTimeout(this.mediaUpdateTimeout);this.mediaUpdateTimeout=p[“default”].setTimeout(function(){c.trigger(“mediaupdatetimeout”)},v(this.media(),!!e))}this.trigger(“loadedplaylist”)}},{key:”dispose”,value:function g(){this.stopRequest();p[“default”].clearTimeout(this.mediaUpdateTimeout)}},{key:”stopRequest”,value:function j(){if(this.request){var a=this.request;this.request=null;a.onreadystatechange=null;a.abort()}}},{key:”media”,value:function l(a){var b=this;if(!a){return this.media_}if(this.state===”HAVE_NOTHING”){throw new Error(“Cannot switch media playlist from “+this.state)}var c=this.state;if(typeof a===”string”){if(!this.master.playlists[a]){throw new Error(“Unknown playlist URI: “+a)}a=this.master.playlists[a]}var d=!this.media_||a.uri!==this.media_.uri;if(this.master.playlists[a.uri].endList){if(this.request){this.request.onreadystatechange=null;this.request.abort();this.request=null}this.state=”HAVE_METADATA”;this.media_=a;if(d){this.trigger(“mediachanging”);this.trigger(“mediachange”)}return}if(!d){return}this.state=”SWITCHING_MEDIA”;if(this.request){if((0,k[“default”])(this.master.uri,a.uri)===this.request.url){return}this.request.onreadystatechange=null;this.request.abort();this.request=null}if(this.media_){this.trigger(“mediachanging”)}this.request=this.hls_.xhr({uri:(0,k[“default”])(this.master.uri,a.uri),withCredentials:this.withCredentials},function(d,e){if(!b.request){return}if(d){return b.playlistRequestError(b.request,a.uri,c)}b.haveMetadata(e,a.uri);if(c===”HAVE_MASTER”){b.trigger(“loadedmetadata”)}else{b.trigger(“mediachange”)}})}},{key:”pause”,value:function m(){this.stopRequest();p[“default”].clearTimeout(this.mediaUpdateTimeout);if(this.state===”HAVE_NOTHING”){this.started=false}if(this.state===”SWITCHING_MEDIA”){if(this.media_){this.state=”HAVE_METADATA”}else{this.state=”HAVE_MASTER”}}else if(this.state===”HAVE_CURRENT_METADATA”){this.state=”HAVE_METADATA”}}},{key:”load”,value:function o(a){var b=this;p[“default”].clearTimeout(this.mediaUpdateTimeout);var c=this.media();if(a){var d=c?c.targetDuration/2*1e3:5*1e3;this.mediaUpdateTimeout=p[“default”].setTimeout(function(){return b.load()},d);return}if(!this.started){this.start();return}if(c&&!c.endList){this.trigger(“mediaupdatetimeout”)}else{this.trigger(“loadedplaylist”)}}},{key:”start”,value:function q(){var a=this;this.started=true;this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(b,c){if(!a.request){return}a.request=null;if(b){a.error={status:c.status,message:”HLS playlist request error at URL: “+a.srcUrl,responseText:c.responseText,code:2};if(a.state===”HAVE_NOTHING”){a.started=false}return a.trigger(“error”)}var d=new n[“default”].Parser;d.push(c.responseText);d.end();a.state=”HAVE_MASTER”;d.manifest.uri=a.srcUrl;if(d.manifest.playlists){a.master=d.manifest;t(a.master);u(a.master);a.trigger(“loadedplaylist”);if(!a.request){a.media(d.manifest.playlists[0])}return}a.master={mediaGroups:{AUDIO:{},VIDEO:{},”CLOSED-CAPTIONS”:{},SUBTITLES:{}},uri:p[“default”].location.href,playlists:[{uri:a.srcUrl}]};a.master.playlists[a.srcUrl]=a.master.playlists[0];a.master.playlists[0].resolvedUri=a.srcUrl;a.master.playlists[0].attributes=a.master.playlists[0].attributes||{};a.haveMetadata(c,a.srcUrl);return a.trigger(“loadedmetadata”)})}}]);return b}(l.EventTarget);d[“default”]=w}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{“./resolve-url”:16,”global/window”:31,”m3u8-parser”:32}],11:[function(b,c,d){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});function e(a){return a&&a.__esModule?a:{“default”:a}}var f=b(“./config”);var g=e(f);var h=b(“./playlist”);var i=e(h);var j=b(“./util/codecs.js”);var k=function t(b,c){var d=undefined;if(!b){return””}d=a.getComputedStyle(b);if(!d){return””}return d[c]};var l=function u(a,b){var c=a.slice();a.sort(function(a,d){var e=b(a,d);if(e===0){return c.indexOf(a)-c.indexOf(d)}return e})};var m=function v(b,c){var d=undefined;var e=undefined;if(b.attributes.BANDWIDTH){d=b.attributes.BANDWIDTH}d=d||a.Number.MAX_VALUE;if(c.attributes.BANDWIDTH){e=c.attributes.BANDWIDTH}e=e||a.Number.MAX_VALUE;return d-e};d.comparePlaylistBandwidth=m;var n=function w(b,c){var d=undefined;var e=undefined;if(b.attributes.RESOLUTION&&b.attributes.RESOLUTION.width){d=b.attributes.RESOLUTION.width}d=d||a.Number.MAX_VALUE;if(c.attributes.RESOLUTION&&c.attributes.RESOLUTION.width){e=c.attributes.RESOLUTION.width}e=e||a.Number.MAX_VALUE;if(d===e&&b.attributes.BANDWIDTH&&c.attributes.BANDWIDTH){return b.attributes.BANDWIDTH-c.attributes.BANDWIDTH}return d-e};d.comparePlaylistResolution=n;var o=function x(b,c,d,e){var f=b.playlists.map(function(b){var c=undefined;var d=undefined;var e=undefined;c=b.attributes.RESOLUTION&&b.attributes.RESOLUTION.width;d=b.attributes.RESOLUTION&&b.attributes.RESOLUTION.height;e=b.attributes.BANDWIDTH;e=e||a.Number.MAX_VALUE;return{bandwidth:e,width:c,height:d,playlist:b}});l(f,function(a,b){return a.bandwidth-b.bandwidth});f=f.filter(function(a){return!i[“default”].isIncompatible(a.playlist)});var h=f.filter(function(a){return i[“default”].isEnabled(a.playlist)});if(!h.length){h=f.filter(function(a){return!i[“default”].isDisabled(a.playlist)})}var j=h.filter(function(a){return a.bandwidth*g[“default”].BANDWIDTH_VARIANCE<c});var k=j[j.length-1];var m=j.filter(function(a){return a.bandwidth===k.bandwidth})[0];var n=j.filter(function(a){return a.width&&a.height});l(n,function(a,b){return a.width-b.width});var o=n.filter(function(a){return a.width===d&&a.height===e});k=o[o.length-1];var p=o.filter(function(a){return a.bandwidth===k.bandwidth})[0];var q=undefined;var r=undefined;var s=undefined;if(!p){q=n.filter(function(a){return a.width>d||a.height>e});r=q.filter(function(a){return a.width===q[0].width&&a.height===q[0].height});k=r[r.length-1];s=r.filter(function(a){return a.bandwidth===k.bandwidth})[0]}var t=s||p||m||h[0]||f[0];return t?t.playlist:null};d.simpleSelector=o;var p=function y(){return o(this.playlists.master,this.systemBandwidth,parseInt(k(this.tech_.el(),”width”),10),parseInt(k(this.tech_.el(),”height”),10))};d.lastBandwidthSelector=p;var q=function z(a){var b=-1;if(a<0||a>1){throw new Error(“Moving average bandwidth decay must be between 0 and 1.”)}return function(){if(b<0){b=this.systemBandwidth}b=a*this.systemBandwidth+(1-a)*b;return o(this.playlists.master,b,parseInt(k(this.tech_.el(),”width”),10),parseInt(k(this.tech_.el(),”height”),10))}};d.movingAverageBandwidthSelector=q;var r=function A(a){var b=a.master;var c=a.currentTime;var d=a.bandwidth;var e=a.duration;var f=a.segmentDuration;var g=a.timeUntilRebuffer;var h=a.currentTimeline;var j=a.syncController;var k=b.playlists.filter(function(a){return!i[“default”].isIncompatible(a)});var n=k.filter(i[“default”].isEnabled);if(!n.length){n=k.filter(function(a){return!i[“default”].isDisabled(a)})}var o=n.filter(i[“default”].hasAttribute.bind(null,”BANDWIDTH”));var p=o.map(function(a){var b=j.getSyncPoint(a,e,h,c);var k=b?1:2;var l=i[“default”].estimateSegmentRequestTime(f,d,a);var m=l*k-g;return{playlist:a,rebufferingImpact:m}});var q=p.filter(function(a){return a.rebufferingImpact<=0});l(q,function(a,b){return m(b.playlist,a.playlist)});if(q.length){return q[0]}l(p,function(a,b){return a.rebufferingImpact-b.rebufferingImpact});return p[0]||null};d.minRebufferMaxBandwidthSelector=r;var s=function B(){var a=this.playlists.master.playlists.filter(i[“default”].isEnabled);l(a,function(a,b){return m(a,b)});var b=a.filter(function(a){return(0,j.parseCodecs)(a.attributes.CODECS).videoCodec});return b[0]||null};d.lowestBitrateCompatibleVariantSelector=s},{“./config”:3,”./playlist”:12,”./util/codecs.js”:20}],12:[function(b,c,d){(function(c){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});function e(a){return a&&a.__esModule?a:{“default”:a}}var f=typeof a!==”undefined”?a[“videojs”]:typeof c!==”undefined”?c[“videojs”]:null;var g=b(“global/window”);var h=e(g);var i=function E(a,b){var c=0;var d=b-a.mediaSequence;var e=a.segments[d];if(e){if(typeof e.start!==”undefined”){return{result:e.start,precise:true}}if(typeof e.end!==”undefined”){return{result:e.end-e.duration,precise:true}}}while(d–){e=a.segments[d];if(typeof e.end!==”undefined”){return{result:c+e.end,precise:true}}c+=e.duration;if(typeof e.start!==”undefined”){return{result:c+e.start,precise:true}}}return{result:c,precise:false}};var j=function F(a,b){var c=0;var d=undefined;var e=b-a.mediaSequence;for(;e<a.segments.length;e++){d=a.segments[e];if(typeof d.start!==”undefined”){return{result:d.start-c,precise:true}}c+=d.duration;if(typeof d.end!==”undefined”){return{result:d.end-c,precise:true}}}return{result:-1,precise:false}};var k=function G(a,b,c){var d=undefined;var e=undefined;if(typeof b===”undefined”){b=a.mediaSequence+a.segments.length}if(b<a.mediaSequence){return 0}d=i(a,b);if(d.precise){return d.result}e=j(a,b);if(e.precise){return e.result}return d.result+c};var l=function H(a,b,c){if(!a){return 0}if(typeof c!==”number”){c=0}if(typeof b===”undefined”){if(a.totalDuration){return a.totalDuration}if(!a.endList){return h[“default”].Infinity}}return k(a,b,c)};d.duration=l;var m=function I(a,b,c){var d=0;if(b>c){var e=[c,b];b=e[0];c=e[1]}if(b<0){for(var f=b;f<Math.min(0,c);f++){d+=a.targetDuration}b=0}for(var f=b;f<c;f++){d+=a.segments[f].duration}return d};d.sumDurations=m;var n=function J(a){if(!a.segments.length){return 0}var b=a.segments.length-1;var c=a.segments[b].duration||a.targetDuration;var d=c+a.targetDuration*2;while(b–){c+=a.segments[b].duration;if(c>=d){break}}return Math.max(0,b)};d.safeLiveIndex=n;var o=function K(a,b,c){if(!a||!a.segments){return null}if(a.endList){return l(a)}if(b===null){return null}b=b||0;var d=c?n(a):a.segments.length;return k(a,a.mediaSequence+d,b)};d.playlistEnd=o;var p=function L(a,b){var c=true;var d=b||0;var e=o(a,b,c);if(e===null){return(0,f.createTimeRange)()}return(0,f.createTimeRange)(d,e)};d.seekable=p;var q=function M(a){return a-Math.floor(a)===0};var r=function N(a,b){if(q(b)){return b+a*.1}var c=b.toString().split(“.”)[1].length;for(var d=1;d<=c;d++){var e=Math.pow(10,d);var f=b*e;if(q(f)||d===c){return(f+a)/e}}};var s=r.bind(null,1);var t=r.bind(null,-1);var u=function O(a,b,c,d){var e=undefined;var f=undefined;var g=a.segments.length;var h=b-d;if(h<0){if(c>0){for(e=c-1;e>=0;e–){f=a.segments[e];h+=t(f.duration);if(h>0){return{mediaIndex:e,startTime:d-m(a,c,e)}}}}return{mediaIndex:0,startTime:b}}if(c<0){for(e=c;e<0;e++){h-=a.targetDuration;if(h<0){return{mediaIndex:0,startTime:b}}}c=0}for(e=c;e<g;e++){f=a.segments[e];h-=s(f.duration);if(h<0){return{mediaIndex:e,startTime:d+m(a,c,e)}}}return{mediaIndex:g-1,startTime:b}};d.getMediaInfoForTime=u;var v=function P(a){return a.excludeUntil&&a.excludeUntil>Date.now()};d.isBlacklisted=v;var w=function Q(a){return a.excludeUntil&&a.excludeUntil===Infinity};d.isIncompatible=w;var x=function R(a){var b=v(a);return!a.disabled&&!b};d.isEnabled=x;var y=function S(a){return a.disabled};d.isDisabled=y;var z=function T(a){for(var b=0;b<a.segments.length;b++){if(a.segments[b].key){return true}}return false};d.isAes=z;var A=function U(a){for(var b=0;b<a.segments.length;b++){if(a.segments[b].map){return true}}return false};d.isFmp4=A;var B=function V(a,b){return b.attributes&&b.attributes[a]};d.hasAttribute=B;var C=function W(a,b,c){var d=arguments.length<=3||arguments[3]===undefined?0:arguments[3];if(!B(“BANDWIDTH”,c)){return NaN}var e=a*c.attributes.BANDWIDTH;return(e-d*8)/b};d.estimateSegmentRequestTime=C;var D=function X(a,b){if(a.playlists.length===1){return true}var c=b.attributes.BANDWIDTH||Number.MAX_VALUE;return a.playlists.filter(function(a){if(!x(a)){return false}return(a.attributes.BANDWIDTH||0)<c}).length===0};d.isLowestEnabledRendition=D;d[“default”]={duration:l,seekable:p,safeLiveIndex:n,getMediaInfoForTime:u,isEnabled:x,isDisabled:y,isBlacklisted:v,isIncompatible:w,playlistEnd:o,isAes:z,isFmp4:A,hasAttribute:B,estimateSegmentRequestTime:C,isLowestEnabledRendition:D}}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{“global/window”:31}],13:[function(b,c,d){(function(b){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});var e=function(){function a(a,b){var c=[];var d=true;var e=false;var f=undefined;try{for(var g=a[Symbol.iterator](),h;!(d=(h=g.next()).done);d=true){c.push(h.value);if(b&&c.length===b)break}}catch(i){e=true;f=i}finally{try{if(!d&&g[“return”])g[“return”]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b)){return b}else if(Symbol.iterator in Object(b)){return a(b,c); }else{throw new TypeError(“Invalid attempt to destructure non-iterable instance”)}}}();function f(a){return a&&a.__esModule?a:{“default”:a}}var g=typeof a!==”undefined”?a[“videojs”]:typeof b!==”undefined”?b[“videojs”]:null;var h=f(g);var i=1/30;var j=i*3;var k=function w(a,b){var c=e(b,2);var d=c[0];var f=c[1];return Math.min(Math.max(d,a),f)};var l=function x(a,b){var c=[];var d=undefined;if(a&&a.length){for(d=0;d<a.length;d++){if(b(a.start(d),a.end(d))){c.push([a.start(d),a.end(d)])}}}return h[“default”].createTimeRanges(c)};var m=function y(a,b){return l(a,function(a,c){return a-i<=b&&c+i>=b})};var n=function z(a,b){return l(a,function(a){return a-i>=b})};var o=function A(a){if(a.length<2){return h[“default”].createTimeRanges()}var b=[];for(var c=1;c<a.length;c++){var d=a.end(c-1);var e=a.start(c);b.push([d,e])}return h[“default”].createTimeRanges(b)};var p=function B(a,b){var c=undefined;var d=undefined;var e=undefined;var f=[];var g=[];var h=function i(a){return a[0]<=e&&a[1]>=e};if(a){for(c=0;c<a.length;c++){d=a.start(c);e=a.end(c);g.push([d,e])}}if(b){for(c=0;c<b.length;c++){d=b.start(c);e=b.end(c);if(g.some(h)){continue}f.push(e)}}if(f.length!==1){return null}return f[0]};var q=function C(a,b){var c=null;var d=null;var e=0;var f=[];var g=[];if(!a||!a.length||!b||!b.length){return h[“default”].createTimeRange()}var i=a.length;while(i–){f.push({time:a.start(i),type:”start”});f.push({time:a.end(i),type:”end”})}i=b.length;while(i–){f.push({time:b.start(i),type:”start”});f.push({time:b.end(i),type:”end”})}f.sort(function(a,b){return a.time-b.time});for(i=0;i<f.length;i++){if(f[i].type===”start”){e++;if(e===2){c=f[i].time}}else if(f[i].type===”end”){e–;if(e===1){d=f[i].time}}if(c!==null&&d!==null){g.push([c,d]);c=null;d=null}}return h[“default”].createTimeRanges(g)};var r=function D(a,b,c,d){var e=b.end(0)-b.start(0);var f=a.end(0)-a.start(0);var g=e-f;var h=q(a,d);var i=q(b,d);var j=0;var k=0;var l=h.length;while(l–){j+=h.end(l)-h.start(l);if(h.start(l)===c){j+=g}}l=i.length;while(l–){k+=i.end(l)-i.start(l)}return Math.max(j,k)/e*100};var s=function E(a,b,c,d){var e=a+b;var f=h[“default”].createTimeRanges([[a,e]]);var g=h[“default”].createTimeRanges([[k(a,[c,e]),e]]);if(g.start(0)===g.end(0)){return 0}var i=r(g,f,c,d);if(isNaN(i)||i===Infinity||i===-Infinity){return 0}return i};var t=function F(a){var b=[];if(!a||!a.length){return””}for(var c=0;c<a.length;c++){b.push(a.start(c)+” => “+a.end(c))}return b.join(“, “)};var u=function G(a,b){var c=arguments.length<=2||arguments[2]===undefined?1:arguments[2];var d=a.length?a.end(a.length-1):0;return(d-b)/c};var v=function H(a){var b=[];for(var c=0;c<a.length;c++){b.push({start:a.start(c),end:a.end(c)})}return b};d[“default”]={findRange:m,findNextRange:n,findGaps:o,findSoleUncommonTimeRangesEnd:p,getSegmentBufferedPercent:s,TIME_FUDGE_FACTOR:i,SAFE_TIME_DELTA:j,printableRange:t,timeUntilRebuffer:u,timeRangesToArray:v};c.exports=d[“default”]}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{}],14:[function(b,c,d){(function(b){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});function e(a){return a&&a.__esModule?a:{“default”:a}}var f=typeof a!==”undefined”?a[“videojs”]:typeof b!==”undefined”?b[“videojs”]:null;var g=e(f);var h={errorInterval:30,getSource:function k(a){var b=this.tech({IWillNotUseThisInPlugins:true});var c=b.currentSource_;return a(c)}};var i=function l(a,b){var c=0;var d=0;var e=g[“default”].mergeOptions(h,b);a.ready(function(){a.trigger({type:”usage”,name:”hls-error-reload-initialized”})});var f=function n(){if(d){a.currentTime(d)}};var i=function o(b){if(b===null||b===undefined){return}d=a.duration()!==Infinity&&a.currentTime()||0;a.one(“loadedmetadata”,f);a.src(b);a.trigger({type:”usage”,name:”hls-error-reload”});a.play()};var j=function p(){if(Date.now()-c<e.errorInterval*1e3){a.trigger({type:”usage”,name:”hls-error-reload-canceled”});return}if(!e.getSource||typeof e.getSource!==”function”){g[“default”].log.error(“ERROR: reloadSourceOnError – The option getSource must be a function!”);return}c=Date.now();return e.getSource.call(a,i)};var k=function q(){a.off(“loadedmetadata”,f);a.off(“error”,j);a.off(“dispose”,q)};var m=function r(b){k();l(a,b)};a.on(“error”,j);a.on(“dispose”,k);a.reloadSourceOnError=m};var j=function m(a){i(this,a)};d[“default”]=j;c.exports=d[“default”]}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{}],15:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});function d(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}var e=a(“./playlist.js”);var f=function i(a,b,c){return function(d){var f=a.master.playlists[b];var g=(0,e.isIncompatible)(f);var h=(0,e.isEnabled)(f);if(typeof d===”undefined”){return h}if(d){delete f.disabled}else{f.disabled=true}if(d!==h&&!g){c();if(d){a.trigger(“renditionenabled”)}else{a.trigger(“renditiondisabled”)}}return d}};var g=function j(a,b,c){d(this,j);var e=a.masterPlaylistController_.fastQualityChange_.bind(a.masterPlaylistController_);if(b.attributes.RESOLUTION){var g=b.attributes.RESOLUTION;this.width=g.width;this.height=g.height}this.bandwidth=b.attributes.BANDWIDTH;this.id=c;this.enabled=f(a.playlists,b.uri,e)};var h=function k(a){var b=a.playlists;a.representations=function(){return b.master.playlists.filter(function(a){return!(0,e.isIncompatible)(a)}).map(function(b,c){return new g(a,b,b.uri)})}};c[“default”]=h;b.exports=c[“default”]},{“./playlist.js”:12}],16:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});function d(a){return a&&a.__esModule?a:{“default”:a}}var e=a(“url-toolkit”);var f=d(e);var g=a(“global/window”);var h=d(g);var i=function j(a,b){if(/^[a-z]+:/i.test(b)){return b}if(!/\/\//i.test(a)){a=f[“default”].buildAbsoluteURL(h[“default”].location.href,a)}return f[“default”].buildAbsoluteURL(a,b)};c[“default”]=i;b.exports=c[“default”]},{“global/window”:31,”url-toolkit”:67}],17:[function(b,c,d){(function(c){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();var f=function H(a,b,c){var d=true;a:while(d){var e=a,f=b,g=c;d=false;if(e===null)e=Function.prototype;var h=Object.getOwnPropertyDescriptor(e,f);if(h===undefined){var i=Object.getPrototypeOf(e);if(i===null){return undefined}else{a=i;b=f;c=g;d=true;h=i=undefined;continue a}}else if(“value”in h){return h.value}else{var j=h.get;if(j===undefined){return undefined}return j.call(g)}}};function g(a){return a&&a.__esModule?a:{“default”:a}}function h(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}function i(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b}var j=b(“./playlist”);var k=g(j);var l=typeof a!==”undefined”?a[“videojs”]:typeof c!==”undefined”?c[“videojs”]:null;var m=g(l);var n=b(“./source-updater”);var o=g(n);var p=b(“./config”);var q=g(p);var r=b(“global/window”);var s=g(r);var t=b(“videojs-contrib-media-sources/es5/remove-cues-from-track.js”);var u=g(t);var v=b(“./bin-utils”);var w=b(“./media-segment-request”);var x=b(“./ranges”);var y=b(“./playlist-selectors”);var z=b(“./util/logger”);var A=g(z);var B=500;var C=function I(a,b,c){if(!a||!b){return false}var d=a.segments;var e=c===d.length;return a.endList&&b.readyState===”open”&&e};var D=function J(a){return typeof a===”number”&&isFinite(a)};var E=function K(a,b,c){if(a!==”main”||!b||!c){return null}if(!c.containsAudio&&!c.containsVideo){return”Neither audio nor video found in segment.”}if(b.containsVideo&&!c.containsVideo){return”Only audio found in segment when we expected video.”+” We can’t switch to audio only from a stream that had video.”+” To get rid of this message, please add codec information to the manifest.”}if(!b.containsVideo&&c.containsVideo){return”Video found in segment when we expected only audio.”+” We can’t switch to a stream with video from an audio only stream.”+” To get rid of this message, please add codec information to the manifest.”}return null};d.illegalMediaSwitch=E;var F=function L(a,b,c){var d=undefined;if(a.length&&a.start(0)>0&&a.start(0)<b){d=a.start(0)}else{d=b-30}return Math.min(d,b-c)};d.safeBackBufferTrimTime=F;var G=function(a){i(b,a);function b(a){var c=this;var d=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];h(this,b);f(Object.getPrototypeOf(b.prototype),”constructor”,this).call(this);if(!a){throw new TypeError(“Initialization settings are required”)}if(typeof a.currentTime!==”function”){throw new TypeError(“No currentTime getter specified”)}if(!a.mediaSource){throw new TypeError(“No MediaSource specified”)}this.state=”INIT”;this.bandwidth=a.bandwidth;this.throughput={rate:0,count:0};this.roundTrip=NaN;this.resetStats_();this.mediaIndex=null;this.hasPlayed_=a.hasPlayed;this.currentTime_=a.currentTime;this.seekable_=a.seekable;this.seeking_=a.seeking;this.duration_=a.duration;this.mediaSource_=a.mediaSource;this.hls_=a.hls;this.loaderType_=a.loaderType;this.startingMedia_=void 0;this.segmentMetadataTrack_=a.segmentMetadataTrack;this.goalBufferLength_=a.goalBufferLength;this.sourceType_=a.sourceType;this.checkBufferTimeout_=null;this.error_=void 0;this.currentTimeline_=-1;this.pendingSegment_=null;this.mimeType_=null;this.sourceUpdater_=null;this.xhrOptions_=null;this.activeInitSegmentId_=null;this.initSegments_={};this.decrypter_=a.decrypter;this.syncController_=a.syncController;this.syncPoint_={segmentIndex:0,time:0};this.syncController_.on(“syncinfoupdate”,function(){return c.trigger(“syncinfoupdate”)});this.mediaSource_.addEventListener(“sourceopen”,function(){return c.ended_=false});this.fetchAtBuffer_=false;this.logger_=(0,A[“default”])(“SegmentLoader[“+this.loaderType_+”]”)}e(b,[{key:”resetStats_”,value:function c(){this.mediaBytesTransferred=0;this.mediaRequests=0;this.mediaRequestsAborted=0;this.mediaRequestsTimedout=0;this.mediaRequestsErrored=0;this.mediaTransferDuration=0;this.mediaSecondsLoaded=0}},{key:”dispose”,value:function d(){this.state=”DISPOSED”;this.pause();this.abort_();if(this.sourceUpdater_){this.sourceUpdater_.dispose()}this.resetStats_()}},{key:”abort”,value:function g(){if(this.state!==”WAITING”){if(this.pendingSegment_){this.pendingSegment_=null}return}this.abort_();this.state=”READY”;if(!this.paused()){this.monitorBuffer_()}}},{key:”abort_”,value:function j(){if(this.pendingSegment_){this.pendingSegment_.abortRequests()}this.pendingSegment_=null}},{key:”error”,value:function l(a){if(typeof a!==”undefined”){this.error_=a}this.pendingSegment_=null;return this.error_}},{key:”endOfStream”,value:function n(){this.ended_=true;this.pause();this.trigger(“ended”)}},{key:”buffered_”,value:function p(){if(!this.sourceUpdater_){return m[“default”].createTimeRanges()}return this.sourceUpdater_.buffered()}},{key:”initSegment”,value:function r(a){var b=arguments.length<=1||arguments[1]===undefined?false:arguments[1];if(!a){return null}var c=(0,v.initSegmentId)(a);var d=this.initSegments_[c];if(b&&!d&&a.bytes){this.initSegments_[c]=d={resolvedUri:a.resolvedUri,byterange:a.byterange,bytes:a.bytes}}return d||a}},{key:”couldBeginLoading_”,value:function t(){return this.playlist_&&(this.sourceUpdater_||this.mimeType_&&this.state===”INIT”)&&!this.paused()}},{key:”load”,value:function z(){this.monitorBuffer_();if(!this.playlist_){return}this.syncController_.setDateTimeMapping(this.playlist_);if(this.state===”INIT”&&this.couldBeginLoading_()){return this.init_()}if(!this.couldBeginLoading_()||this.state!==”READY”&&this.state!==”INIT”){return}this.state=”READY”}},{key:”init_”,value:function G(){this.state=”READY”;this.sourceUpdater_=new o[“default”](this.mediaSource_,this.mimeType_,this.sourceBufferEmitter_);this.resetEverything();return this.monitorBuffer_()}},{key:”playlist”,value:function H(a){var b=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];if(!a){return}var c=this.playlist_;var d=this.pendingSegment_;this.playlist_=a;this.xhrOptions_=b;if(!this.hasPlayed_()){a.syncInfo={mediaSequence:a.mediaSequence,time:0}}this.trigger(“syncinfoupdate”);if(this.state===”INIT”&&this.couldBeginLoading_()){return this.init_()}if(!c||c.uri!==a.uri){if(this.mediaIndex!==null){this.resyncLoader()}return}var e=a.mediaSequence-c.mediaSequence;this.logger_(“mediaSequenceDiff”,e);if(this.mediaIndex!==null){this.mediaIndex-=e}if(d){d.mediaIndex-=e;if(d.mediaIndex>=0){d.segment=a.segments[d.mediaIndex]}}this.syncController_.saveExpiredSegmentInfo(c,a)}},{key:”pause”,value:function I(){if(this.checkBufferTimeout_){s[“default”].clearTimeout(this.checkBufferTimeout_);this.checkBufferTimeout_=null}}},{key:”paused”,value:function J(){return this.checkBufferTimeout_===null}},{key:”mimeType”,value:function K(a,b){if(this.mimeType_){return}this.mimeType_=a;this.sourceBufferEmitter_=b;if(this.state===”INIT”&&this.couldBeginLoading_()){this.init_()}}},{key:”resetEverything”,value:function L(){this.ended_=false;this.resetLoader();this.remove(0,this.duration_());this.trigger(“reseteverything”)}},{key:”resetLoader”,value:function M(){this.fetchAtBuffer_=false;this.resyncLoader()}},{key:”resyncLoader”,value:function N(){this.mediaIndex=null;this.syncPoint_=null;this.abort()}},{key:”remove”,value:function O(a,b){if(this.sourceUpdater_){this.sourceUpdater_.remove(a,b)}(0,u[“default”])(a,b,this.segmentMetadataTrack_)}},{key:”monitorBuffer_”,value:function P(){if(this.checkBufferTimeout_){s[“default”].clearTimeout(this.checkBufferTimeout_)}this.checkBufferTimeout_=s[“default”].setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:”monitorBufferTick_”,value:function Q(){if(this.state===”READY”){this.fillBuffer_()}if(this.checkBufferTimeout_){s[“default”].clearTimeout(this.checkBufferTimeout_)}this.checkBufferTimeout_=s[“default”].setTimeout(this.monitorBufferTick_.bind(this),B)}},{key:”fillBuffer_”,value:function R(){if(this.sourceUpdater_.updating()){return}if(!this.syncPoint_){this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_())}var a=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(!a){return}var b=C(this.playlist_,this.mediaSource_,a.mediaIndex);if(b){this.endOfStream();return}if(a.mediaIndex===this.playlist_.segments.length-1&&this.mediaSource_.readyState===”ended”&&!this.seeking_()){return}if(a.timeline!==this.currentTimeline_||a.startOfSegment!==null&&a.startOfSegment<this.sourceUpdater_.timestampOffset()){this.syncController_.reset();a.timestampOffset=a.startOfSegment}this.loadSegment_(a)}},{key:”checkBuffer_”,value:function S(a,b,c,d,e,f){var g=0;var h=undefined;if(a.length){g=a.end(a.length-1)}var i=Math.max(0,g-e);if(!b.segments.length){return null}if(i>=this.goalBufferLength_()){return null}if(!d&&i>=1){return null}if(f===null){c=this.getSyncSegmentCandidate_(b);return this.generateSegmentInfo_(b,c,null,true)}if(c!==null){var j=b.segments[c];if(j&&j.end){h=j.end}else{h=g}return this.generateSegmentInfo_(b,c+1,h,false)}if(this.fetchAtBuffer_){var l=k[“default”].getMediaInfoForTime(b,g,f.segmentIndex,f.time);c=l.mediaIndex;h=l.startTime}else{var l=k[“default”].getMediaInfoForTime(b,e,f.segmentIndex,f.time);c=l.mediaIndex;h=l.startTime}return this.generateSegmentInfo_(b,c,h,false)}},{key:”getSyncSegmentCandidate_”,value:function T(a){var b=this;if(this.currentTimeline_===-1){return 0}var c=a.segments.map(function(a,b){return{timeline:a.timeline,segmentIndex:b}}).filter(function(a){return a.timeline===b.currentTimeline_});if(c.length){return c[Math.min(c.length-1,1)].segmentIndex}return Math.max(a.segments.length-1,0)}},{key:”generateSegmentInfo_”,value:function U(a,b,c,d){if(b<0||b>=a.segments.length){return null}var e=a.segments[b];return{requestId:”segment-loader-“+Math.random(),uri:e.resolvedUri,mediaIndex:b,isSyncRequest:d,startOfSegment:c,playlist:a,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:e.timeline,duration:e.duration,segment:e}}},{key:”abortRequestEarly_”,value:function V(a){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH){return false}if(Date.now()-(a.firstBytesReceivedAt||Date.now())<1e3){return false}var b=this.currentTime_();var c=a.bandwidth;var d=this.pendingSegment_.duration;var e=k[“default”].estimateSegmentRequestTime(d,c,this.playlist_,a.bytesReceived);var f=(0,x.timeUntilRebuffer)(this.buffered_(),b,this.hls_.tech_.playbackRate())-1;if(e<=f){return false}var g=(0,y.minRebufferMaxBandwidthSelector)({master:this.hls_.playlists.master,currentTime:b,bandwidth:c,duration:this.duration_(),segmentDuration:d,timeUntilRebuffer:f,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!g){return}var h=e-f;var i=h-g.rebufferingImpact;var j=.5;if(f<=x.TIME_FUDGE_FACTOR){j=1}if(!g.playlist||g.playlist.uri===this.playlist_.uri||i<j){return false}this.bandwidth=g.playlist.attributes.BANDWIDTH*q[“default”].BANDWIDTH_VARIANCE+1;this.abort();this.trigger(“earlyabort”);return true}},{key:”handleProgress_”,value:function W(a,b){if(!this.pendingSegment_||b.requestId!==this.pendingSegment_.requestId||this.abortRequestEarly_(b.stats)){return}this.trigger(“progress”)}},{key:”loadSegment_”,value:function X(a){this.state=”WAITING”;this.pendingSegment_=a;this.trimBackBuffer_(a);a.abortRequests=(0,w.mediaSegmentRequest)(this.hls_.xhr,this.xhrOptions_,this.decrypter_,this.createSimplifiedSegmentObj_(a),this.handleProgress_.bind(this),this.segmentRequestFinished_.bind(this))}},{key:”trimBackBuffer_”,value:function Y(a){var b=F(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);if(b>0){this.remove(0,b)}}},{key:”createSimplifiedSegmentObj_”,value:function Z(a){var b=a.segment;var c={resolvedUri:b.resolvedUri,byterange:b.byterange,requestId:a.requestId};if(b.key){var d=b.key.iv||new Uint32Array([0,0,0,a.mediaIndex+a.playlist.mediaSequence]);c.key={resolvedUri:b.key.resolvedUri,iv:d}}if(b.map){c.map=this.initSegment(b.map)}return c}},{key:”segmentRequestFinished_”,value:function $(a,b){this.mediaRequests+=1;if(b.stats){this.mediaBytesTransferred+=b.stats.bytesReceived;this.mediaTransferDuration+=b.stats.roundTripTime}if(!this.pendingSegment_){this.mediaRequestsAborted+=1;return}if(b.requestId!==this.pendingSegment_.requestId){return}if(a){this.pendingSegment_=null;this.state=”READY”;if(a.code===w.REQUEST_ERRORS.ABORTED){this.mediaRequestsAborted+=1;return}this.pause();if(a.code===w.REQUEST_ERRORS.TIMEOUT){this.mediaRequestsTimedout+=1;this.bandwidth=1;this.roundTrip=NaN;this.trigger(“bandwidthupdate”);return}this.mediaRequestsErrored+=1;this.error(a);this.trigger(“error”);return}this.bandwidth=b.stats.bandwidth;this.roundTrip=b.stats.roundTripTime;if(b.map){b.map=this.initSegment(b.map,true)}this.processSegmentResponse_(b)}},{key:”processSegmentResponse_”,value:function _(a){var b=this.pendingSegment_;b.bytes=a.bytes;if(a.map){b.segment.map.bytes=a.map.bytes}b.endOfAllRequests=a.endOfAllRequests;this.handleSegment_()}},{key:”handleSegment_”,value:function aa(){var a=this;if(!this.pendingSegment_){this.state=”READY”;return}var b=this.pendingSegment_;var c=b.segment;var d=this.syncController_.probeSegmentInfo(b);if(typeof this.startingMedia_===”undefined”&&d&&(d.containsAudio||d.containsVideo)){this.startingMedia_={containsAudio:d.containsAudio,containsVideo:d.containsVideo}}var e=E(this.loaderType_,this.startingMedia_,d);if(e){this.error({message:e,blacklistDuration:Infinity});this.trigger(“error”);return}if(b.isSyncRequest){this.trigger(“syncinfoupdate”);this.pendingSegment_=null;this.state=”READY”;return}if(b.timestampOffset!==null&&b.timestampOffset!==this.sourceUpdater_.timestampOffset()){this.sourceUpdater_.timestampOffset(b.timestampOffset);this.trigger(“timestampoffset”)}var f=this.syncController_.mappingForTimeline(b.timeline);if(f!==null){this.trigger({type:”segmenttimemapping”,mapping:f})}this.state=”APPENDING”;if(c.map){(function(){var b=(0,v.initSegmentId)(c.map);if(!a.activeInitSegmentId_||a.activeInitSegmentId_!==b){var d=a.initSegment(c.map);a.sourceUpdater_.appendBuffer(d.bytes,function(){a.activeInitSegmentId_=b})}})()}b.byteLength=b.bytes.byteLength;if(typeof c.start===”number”&&typeof c.end===”number”){this.mediaSecondsLoaded+=c.end-c.start}else{this.mediaSecondsLoaded+=c.duration}this.sourceUpdater_.appendBuffer(b.bytes,this.handleUpdateEnd_.bind(this))}},{key:”handleUpdateEnd_”,value:function ba(){this.logger_(“handleUpdateEnd_”,”segmentInfo:”,this.pendingSegment_);if(!this.pendingSegment_){this.state=”READY”;if(!this.paused()){this.monitorBuffer_()}return}var a=this.pendingSegment_;var b=a.segment;var c=this.mediaIndex!==null;this.pendingSegment_=null;this.recordThroughput_(a);this.addSegmentMetadataCue_(a);this.state=”READY”;this.mediaIndex=a.mediaIndex;this.fetchAtBuffer_=true;this.currentTimeline_=a.timeline;this.trigger(“syncinfoupdate”);if(b.end&&this.currentTime_()-b.end>a.playlist.targetDuration*3){this.resetEverything();return}if(c){this.trigger(“bandwidthupdate”)}this.trigger(“progress”);var d=C(a.playlist,this.mediaSource_,a.mediaIndex+1);if(d){this.endOfStream()}if(!this.paused()){this.monitorBuffer_()}}},{key:”recordThroughput_”,value:function ca(a){var b=this.throughput.rate;var c=Date.now()-a.endOfAllRequests+1;var d=Math.floor(a.byteLength/c*8*1e3);this.throughput.rate+=(d-b)/++this.throughput.count}},{key:”addSegmentMetadataCue_”,value:function da(a){if(!this.segmentMetadataTrack_){return}var b=a.segment;var c=b.start;var d=b.end;if(!D(c)||!D(d)){return}(0,u[“default”])(c,d,this.segmentMetadataTrack_);var e=s[“default”].WebKitDataCue||s[“default”].VTTCue;var f={uri:a.uri,timeline:a.timeline,playlist:a.playlist.uri,start:c,end:d};var g=JSON.stringify(f);var h=new e(c,d,g);h.value=f;this.segmentMetadataTrack_.addCue(h)}}]);return b}(m[“default”].EventTarget);d[“default”]=G}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{“./bin-utils”:2,”./config”:3,”./media-segment-request”:8,”./playlist”:12,”./playlist-selectors”:11,”./ranges”:13,”./source-updater”:18,”./util/logger”:21,”global/window”:31,”videojs-contrib-media-sources/es5/remove-cues-from-track.js”:76}],18:[function(b,c,d){(function(b){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();function f(a){return a&&a.__esModule?a:{“default”:a}}function g(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}var h=typeof a!==”undefined”?a[“videojs”]:typeof b!==”undefined”?b[“videojs”]:null;var i=f(h);var j=function l(){};var k=function(){function a(b,c,d){g(this,a);this.callbacks_=[];this.pendingCallback_=null;this.timestampOffset_=0;this.mediaSource=b;this.processedAppend_=false;if(b.readyState===”closed”){b.addEventListener(“sourceopen”,this.createSourceBuffer_.bind(this,c,d))}else{this.createSourceBuffer_(c,d)}}e(a,[{key:”createSourceBuffer_”,value:function b(a,c){var d=this;this.sourceBuffer_=this.mediaSource.addSourceBuffer(a);if(c){c.trigger(“sourcebufferadded”);if(this.mediaSource.sourceBuffers.length<2){c.on(“sourcebufferadded”,function(){d.start_()});return}}this.start_()}},{key:”start_”,value:function c(){var a=this;this.started_=true;this.onUpdateendCallback_=function(){var b=a.pendingCallback_;a.pendingCallback_=null;if(b){b()}a.runCallback_()};this.sourceBuffer_.addEventListener(“updateend”,this.onUpdateendCallback_);this.runCallback_()}},{key:”abort”,value:function d(a){var b=this;if(this.processedAppend_){this.queueCallback_(function(){b.sourceBuffer_.abort()},a)}}},{key:”appendBuffer”,value:function f(a,b){var c=this;this.processedAppend_=true;this.queueCallback_(function(){c.sourceBuffer_.appendBuffer(a)},b)}},{key:”buffered”,value:function h(){if(!this.sourceBuffer_){return i[“default”].createTimeRanges()}return this.sourceBuffer_.buffered}},{key:”remove”,value:function k(a,b){var c=this;if(this.processedAppend_){this.queueCallback_(function(){c.sourceBuffer_.remove(a,b)},j)}}},{key:”updating”,value:function l(){return!this.sourceBuffer_||this.sourceBuffer_.updating||this.pendingCallback_}},{key:”timestampOffset”,value:function m(a){var b=this;if(typeof a!==”undefined”){this.queueCallback_(function(){b.sourceBuffer_.timestampOffset=a});this.timestampOffset_=a}return this.timestampOffset_}},{key:”queueCallback_”,value:function n(a,b){this.callbacks_.push([a.bind(this),b]);this.runCallback_()}},{key:”runCallback_”,value:function o(){var a=undefined;if(!this.updating()&&this.callbacks_.length&&this.started_){a=this.callbacks_.shift();this.pendingCallback_=a[1];a[0]()}}},{key:”dispose”,value:function p(){this.sourceBuffer_.removeEventListener(“updateend”,this.onUpdateendCallback_);if(this.sourceBuffer_&&this.mediaSource.readyState===”open”){this.sourceBuffer_.abort()}}}]);return a}();d[“default”]=k;c.exports=d[“default”]}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{}],19:[function(b,c,d){(function(c){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();var f=function t(a,b,c){var d=true;a:while(d){var e=a,f=b,g=c;d=false;if(e===null)e=Function.prototype;var h=Object.getOwnPropertyDescriptor(e,f);if(h===undefined){var i=Object.getPrototypeOf(e);if(i===null){return undefined}else{a=i;b=f;c=g;d=true;h=i=undefined;continue a}}else if(“value”in h){return h.value}else{var j=h.get;if(j===undefined){return undefined}return j.call(g)}}};function g(a){return a&&a.__esModule?a:{“default”:a}}function h(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}function i(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b}var j=b(“mux.js/lib/mp4/probe”);var k=g(j);var l=b(“mux.js/lib/tools/ts-inspector.js”);var m=b(“./playlist”);var n=typeof a!==”undefined”?a[“videojs”]:typeof c!==”undefined”?c[“videojs”]:null;var o=g(n);var p=b(“./util/logger”);var q=g(p);var r=[{name:”VOD”,run:function u(a,b,c,d,e){if(c!==Infinity){var f={time:0,segmentIndex:0};return f}return null}},{name:”ProgramDateTime”,run:function v(a,b,c,d,e){if(a.datetimeToDisplayTime&&b.dateTimeObject){var f=b.dateTimeObject.getTime()/1e3;var g=f+a.datetimeToDisplayTime;var h={time:g,segmentIndex:0};return h}return null}},{name:”Segment”,run:function w(a,b,c,d,e){var f=b.segments||[];var g=null;var h=null;e=e||0;for(var i=0;i<f.length;i++){var j=f[i];if(j.timeline===d&&typeof j.start!==”undefined”){var k=Math.abs(e-j.start);if(h!==null&&h<k){break}if(!g||h===null||h>=k){h=k;g={time:j.start,segmentIndex:i}}}}return g}},{name:”Discontinuity”,run:function x(a,b,c,d,e){var f=null;e=e||0;if(b.discontinuityStarts&&b.discontinuityStarts.length){var g=null;for(var h=0;h<b.discontinuityStarts.length;h++){var i=b.discontinuityStarts[h];var j=b.discontinuitySequence+h+1;var k=a.discontinuities[j];if(k){var l=Math.abs(e-k.time);if(g!==null&&g<l){break}if(!f||g===null||g>=l){g=l;f={time:k.time,segmentIndex:i}}}}}return f}},{name:”Playlist”,run:function y(a,b,c,d,e){if(b.syncInfo){var f={time:b.syncInfo.time,segmentIndex:b.syncInfo.mediaSequence-b.mediaSequence};return f}return null}}];d.syncPointStrategies=r;var s=function(a){i(b,a);function b(){var a=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];h(this,b);f(Object.getPrototypeOf(b.prototype),”constructor”,this).call(this);this.inspectCache_=undefined;this.timelines=[];this.discontinuities=[];this.datetimeToDisplayTime=null;this.logger_=(0,q[“default”])(“SyncController”)}e(b,[{key:”getSyncPoint”,value:function c(a,b,d,e){var f=this.runStrategies_(a,b,d,e);if(!f.length){return null}return this.selectSyncPoint_(f,{key:”time”,value:e})}},{key:”getExpiredTime”,value:function d(a,b){if(!a||!a.segments){return null}var c=this.runStrategies_(a,b,a.discontinuitySequence,0);if(!c.length){return null}var d=this.selectSyncPoint_(c,{key:”segmentIndex”,value:0});if(d.segmentIndex>0){d.time*=-1}return Math.abs(d.time+(0,m.sumDurations)(a,d.segmentIndex,0))}},{key:”runStrategies_”,value:function g(a,b,c,d){var e=[];for(var f=0;f<r.length;f++){var g=r[f];var h=g.run(this,a,b,c,d);if(h){h.strategy=g.name;e.push({strategy:g.name,syncPoint:h})}}return e}},{key:”selectSyncPoint_”,value:function j(a,b){var c=a[0].syncPoint;var d=Math.abs(a[0].syncPoint[b.key]-b.value);var e=a[0].strategy;for(var f=1;f<a.length;f++){var g=Math.abs(a[f].syncPoint[b.key]-b.value);if(g<d){d=g;c=a[f].syncPoint;e=a[f].strategy}}this.logger_(“syncPoint with strategy <“+e+”> chosen: “,c);return c}},{key:”saveExpiredSegmentInfo”,value:function n(a,b){var c=b.mediaSequence-a.mediaSequence;for(var d=c-1;d>=0;d–){var e=a.segments[d];if(e&&typeof e.start!==”undefined”){b.syncInfo={mediaSequence:a.mediaSequence+d,time:e.start};this.logger_(“playlist sync:”,b.syncInfo);this.trigger(“syncinfoupdate”);break}}}},{key:”setDateTimeMapping”,value:function o(a){if(!this.datetimeToDisplayTime&&a.dateTimeObject){var b=a.dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-b}}},{key:”reset”,value:function p(){this.inspectCache_=undefined}},{key:”probeSegmentInfo”,value:function s(a){var b=a.segment;var c=a.playlist;var d=undefined;if(b.map){d=this.probeMp4Segment_(a)}else{d=this.probeTsSegment_(a)}if(d){if(this.calculateSegmentTimeMapping_(a,d)){this.saveDiscontinuitySyncInfo_(a);if(!c.syncInfo){c.syncInfo={mediaSequence:c.mediaSequence+a.mediaIndex,time:b.start}}}}return d}},{key:”probeMp4Segment_”,value:function t(a){var b=a.segment;var c=k[“default”].timescale(b.map.bytes);var d=k[“default”].startTime(c,a.bytes);if(a.timestampOffset!==null){a.timestampOffset-=d}return{start:d,end:d+b.duration}}},{key:”probeTsSegment_”,value:function u(a){var b=(0,l.inspect)(a.bytes,this.inspectCache_);var c=undefined;var d=undefined;if(!b){return null}if(b.video&&b.video.length===2){this.inspectCache_=b.video[1].dts;c=b.video[0].dtsTime;d=b.video[1].dtsTime}else if(b.audio&&b.audio.length===2){this.inspectCache_=b.audio[1].dts;c=b.audio[0].dtsTime;d=b.audio[1].dtsTime}return{start:c,end:d,containsVideo:b.video&&b.video.length===2,containsAudio:b.audio&&b.audio.length===2}}},{key:”timestampOffsetForTimeline”,value:function v(a){if(typeof this.timelines[a]===”undefined”){return null}return this.timelines[a].time}},{key:”mappingForTimeline”,value:function w(a){if(typeof this.timelines[a]===”undefined”){return null}return this.timelines[a].mapping}},{key:”calculateSegmentTimeMapping_”,value:function x(a,b){var c=a.segment;var d=this.timelines[a.timeline];if(a.timestampOffset!==null){this.logger_(“tsO:”,a.timestampOffset);d={time:a.startOfSegment,mapping:a.startOfSegment-b.start};this.timelines[a.timeline]=d;this.trigger(“timestampoffset”);c.start=a.startOfSegment;c.end=b.end+d.mapping}else if(d){c.start=b.start+d.mapping;c.end=b.end+d.mapping}else{return false}return true}},{key:”saveDiscontinuitySyncInfo_”, value:function y(a){var b=a.playlist;var c=a.segment;if(c.discontinuity){this.discontinuities[c.timeline]={time:c.start,accuracy:0}}else if(b.discontinuityStarts&&b.discontinuityStarts.length){for(var d=0;d<b.discontinuityStarts.length;d++){var e=b.discontinuityStarts[d];var f=b.discontinuitySequence+d+1;var g=e-a.mediaIndex;var h=Math.abs(g);if(!this.discontinuities[f]||this.discontinuities[f].accuracy>h){var i=undefined;if(g<0){i=c.start-(0,m.sumDurations)(b,a.mediaIndex,e)}else{i=c.end+(0,m.sumDurations)(b,a.mediaIndex+1,e)}this.discontinuities[f]={time:i,accuracy:h}}}}}}]);return b}(o[“default”].EventTarget);d[“default”]=s}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{“./playlist”:12,”./util/logger”:21,”mux.js/lib/mp4/probe”:58,”mux.js/lib/tools/ts-inspector.js”:60}],20:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});var d=function e(){var a=arguments.length<=0||arguments[0]===undefined?””:arguments[0];var b={codecCount:0};var c=undefined;b.codecCount=a.split(“,”).length;b.codecCount=b.codecCount||2;c=/(^|\s|,)+(avc1)([^ ,]*)/i.exec(a);if(c){b.videoCodec=c[2];b.videoObjectTypeIndicator=c[3]}b.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(a);b.audioProfile=b.audioProfile&&b.audioProfile[2];return b};c.parseCodecs=d},{}],21:[function(b,c,d){(function(b){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});function e(a){return a&&a.__esModule?a:{“default”:a}}var f=typeof a!==”undefined”?a[“videojs”]:typeof b!==”undefined”?b[“videojs”]:null;var g=e(f);var h=function i(a){if(g[“default”].log.debug){return g[“default”].log.debug.bind(g[“default”],”VHS:”,a+” >”)}return function(){}};d[“default”]=h;c.exports=d[“default”]}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{}],22:[function(b,c,d){(function(e){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();var g=function w(a,b,c){var d=true;a:while(d){var e=a,f=b,g=c;d=false;if(e===null)e=Function.prototype;var h=Object.getOwnPropertyDescriptor(e,f);if(h===undefined){var i=Object.getPrototypeOf(e);if(i===null){return undefined}else{a=i;b=f;c=g;d=true;h=i=undefined;continue a}}else if(“value”in h){return h.value}else{var j=h.get;if(j===undefined){return undefined}return j.call(g)}}};function h(a){return a&&a.__esModule?a:{“default”:a}}function i(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}function j(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b}var k=b(“./segment-loader”);var l=h(k);var m=typeof a!==”undefined”?a[“videojs”]:typeof e!==”undefined”?e[“videojs”]:null;var n=h(m);var o=b(“global/window”);var p=h(o);var q=b(“videojs-contrib-media-sources/es5/remove-cues-from-track.js”);var r=h(q);var s=b(“./bin-utils”);var t=new Uint8Array(“\n\n”.split(“”).map(function(a){return a.charCodeAt(0)}));var u=function x(a){return String.fromCharCode.apply(null,a)};var v=function(a){j(b,a);function b(a){var c=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];i(this,b);g(Object.getPrototypeOf(b.prototype),”constructor”,this).call(this,a,c);this.mediaSource_=null;this.subtitlesTrack_=null}f(b,[{key:”buffered_”,value:function c(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length){return n[“default”].createTimeRanges()}var a=this.subtitlesTrack_.cues;var b=a[0].startTime;var c=a[a.length-1].startTime;return n[“default”].createTimeRanges([[b,c]])}},{key:”initSegment”,value:function d(a){var b=arguments.length<=1||arguments[1]===undefined?false:arguments[1];if(!a){return null}var c=(0,s.initSegmentId)(a);var d=this.initSegments_[c];if(b&&!d&&a.bytes){var e=t.byteLength+a.bytes.byteLength;var f=new Uint8Array(e);f.set(a.bytes);f.set(t,a.bytes.byteLength);this.initSegments_[c]=d={resolvedUri:a.resolvedUri,byterange:a.byterange,bytes:f}}return d||a}},{key:”couldBeginLoading_”,value:function e(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}},{key:”init_”,value:function h(){this.state=”READY”;this.resetEverything();return this.monitorBuffer_()}},{key:”track”,value:function k(a){if(typeof a===”undefined”){return this.subtitlesTrack_}this.subtitlesTrack_=a;if(this.state===”INIT”&&this.couldBeginLoading_()){this.init_()}return this.subtitlesTrack_}},{key:”remove”,value:function l(a,b){(0,r[“default”])(a,b,this.subtitlesTrack_)}},{key:”fillBuffer_”,value:function m(){var a=this;if(!this.syncPoint_){this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_())}var b=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);b=this.skipEmptySegments_(b);if(!b){return}if(this.syncController_.timestampOffsetForTimeline(b.timeline)===null){var c=function d(){a.state=”READY”;if(!a.paused()){a.monitorBuffer_()}};this.syncController_.one(“timestampoffset”,c);this.state=”WAITING_ON_TIMELINE”;return}this.loadSegment_(b)}},{key:”skipEmptySegments_”,value:function o(a){while(a&&a.segment.empty){a=this.generateSegmentInfo_(a.playlist,a.mediaIndex+1,a.startOfSegment+a.duration,a.isSyncRequest)}return a}},{key:”handleSegment_”,value:function q(){var a=this;if(!this.pendingSegment_||!this.subtitlesTrack_){this.state=”READY”;return}this.state=”APPENDING”;var b=this.pendingSegment_;var c=b.segment;if(typeof p[“default”].WebVTT!==”function”&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var d=function(){var b=function c(){a.handleSegment_()};a.state=”WAITING_ON_VTTJS”;a.subtitlesTrack_.tech_.one(“vttjsloaded”,b);a.subtitlesTrack_.tech_.one(“vttjserror”,function(){a.subtitlesTrack_.tech_.off(“vttjsloaded”,b);a.error({message:”Error loading vtt.js”});a.state=”READY”;a.pause();a.trigger(“error”)});return{v:undefined}}();if(typeof d===”object”)return d.v}c.requested=true;try{this.parseVTTCues_(b)}catch(e){this.error({message:e.message});this.state=”READY”;this.pause();return this.trigger(“error”)}this.updateTimeMapping_(b,this.syncController_.timelines[b.timeline],this.playlist_);if(b.isSyncRequest){this.trigger(“syncinfoupdate”);this.pendingSegment_=null;this.state=”READY”;return}b.byteLength=b.bytes.byteLength;this.mediaSecondsLoaded+=c.duration;if(b.cues.length){this.remove(b.cues[0].endTime,b.cues[b.cues.length-1].endTime)}b.cues.forEach(function(b){a.subtitlesTrack_.addCue(b)});this.handleUpdateEnd_()}},{key:”parseVTTCues_”,value:function v(a){var b=undefined;var c=false;if(typeof p[“default”].TextDecoder===”function”){b=new p[“default”].TextDecoder(“utf8”)}else{b=p[“default”].WebVTT.StringDecoder();c=true}var d=new p[“default”].WebVTT.Parser(p[“default”],p[“default”].vttjs,b);a.cues=[];a.timestampmap={MPEGTS:0,LOCAL:0};d.oncue=a.cues.push.bind(a.cues);d.ontimestampmap=function(b){return a.timestampmap=b};d.onparsingerror=function(a){n[“default”].log.warn(“Error encountered when parsing cues: “+a.message)};if(a.segment.map){var e=a.segment.map.bytes;if(c){e=u(e)}d.parse(e)}var f=a.bytes;if(c){f=u(f)}d.parse(f);d.flush()}},{key:”updateTimeMapping_”,value:function w(a,b,c){var d=a.segment;if(!b){return}if(!a.cues.length){d.empty=true;return}var e=a.timestampmap;var f=e.MPEGTS/9e4-e.LOCAL+b.mapping;a.cues.forEach(function(a){a.startTime+=f;a.endTime+=f});if(!c.syncInfo){var g=a.cues[0].startTime;var h=a.cues[a.cues.length-1].startTime;c.syncInfo={mediaSequence:c.mediaSequence+a.mediaIndex,time:Math.min(g,h-d.duration)}}}}]);return b}(l[“default”]);d[“default”]=v;c.exports=d[“default”]}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{“./bin-utils”:2,”./segment-loader”:17,”global/window”:31,”videojs-contrib-media-sources/es5/remove-cues-from-track.js”:76}],23:[function(b,c,d){(function(b){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});function e(a){return a&&a.__esModule?a:{“default”:a}}var f=typeof a!==”undefined”?a[“videojs”]:typeof b!==”undefined”?b[“videojs”]:null;var g=e(f);var h=function i(){var a=function b(a,c){a=(0,f.mergeOptions)({timeout:45e3},a);var d=b.beforeRequest||g[“default”].Hls.xhr.beforeRequest;if(d&&typeof d===”function”){var e=d(a);if(e){a=e}}var h=(0,f.xhr)(a,function(a,b){var d=h.response;if(!a&&d){h.responseTime=Date.now();h.roundTripTime=h.responseTime-h.requestTime;h.bytesReceived=d.byteLength||d.length;if(!h.bandwidth){h.bandwidth=Math.floor(h.bytesReceived/h.roundTripTime*8*1e3)}}if(a&&a.code===”ETIMEDOUT”){h.timedout=true}if(!a&&!h.aborted&&b.statusCode!==200&&b.statusCode!==206&&b.statusCode!==0){a=new Error(“XHR Failed with a response of: “+(h&&(d||h.responseText)))}c(a,h)});var i=h.abort;h.abort=function(){h.aborted=true;return i.apply(h,arguments)};h.uri=a.uri;h.requestTime=Date.now();return h};return a};d[“default”]=h;c.exports=d[“default”]}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{}],24:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();function e(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}var f=function i(){var a=[[[],[],[],[],[]],[[],[],[],[],[]]];var b=a[0];var c=a[1];var d=b[4];var e=c[4];var f=undefined;var g=undefined;var h=undefined;var i=[];var j=[];var k=undefined;var l=undefined;var m=undefined;var n=undefined;var o=undefined;var p=undefined;for(f=0;f<256;f++){j[(i[f]=f<<1^(f>>7)*283)^f]=f}for(g=h=0;!d[g];g^=k||1,h=j[h]||1){n=h^h<<1^h<<2^h<<3^h<<4;n=n>>8^n&255^99;d[g]=n;e[n]=g;m=i[l=i[k=i[g]]];p=m*16843009^l*65537^k*257^g*16843008;o=i[n]*257^n*16843008;for(f=0;f<4;f++){b[f][g]=o=o<<24^o>>>8;c[f][n]=p=p<<24^p>>>8}}for(f=0;f<5;f++){b[f]=b[f].slice(0);c[f]=c[f].slice(0)}return a};var g=null;var h=function(){function a(b){e(this,a);if(!g){g=f()}this._tables=[[g[0][0].slice(),g[0][1].slice(),g[0][2].slice(),g[0][3].slice(),g[0][4].slice()],[g[1][0].slice(),g[1][1].slice(),g[1][2].slice(),g[1][3].slice(),g[1][4].slice()]];var c=undefined;var d=undefined;var h=undefined;var i=undefined;var j=undefined;var k=this._tables[0][4];var l=this._tables[1];var m=b.length;var n=1;if(m!==4&&m!==6&&m!==8){throw new Error(“Invalid aes key size”)}i=b.slice(0);j=[];this._key=[i,j];for(c=m;c<4*m+28;c++){h=i[c-1];if(c%m===0||m===8&&c%m===4){h=k[h>>>24]<<24^k[h>>16&255]<<16^k[h>>8&255]<<8^k[h&255];if(c%m===0){h=h<<8^h>>>24^n<<24;n=n<<1^(n>>7)*283}}i[c]=i[c-m]^h}for(d=0;c;d++,c–){h=i[d&3?c:c-4];if(c<=4||d<4){j[d]=h}else{j[d]=l[0][k[h>>>24]]^l[1][k[h>>16&255]]^l[2][k[h>>8&255]]^l[3][k[h&255]]}}}d(a,[{key:”decrypt”,value:function b(a,c,d,e,f,g){var h=this._key[1];var i=a^h[0];var j=e^h[1];var k=d^h[2];var l=c^h[3];var m=undefined;var n=undefined;var o=undefined;var p=h.length/4-2;var q=undefined;var r=4;var s=this._tables[1];var t=s[0];var u=s[1];var v=s[2];var w=s[3];var x=s[4];for(q=0;q<p;q++){m=t[i>>>24]^u[j>>16&255]^v[k>>8&255]^w[l&255]^h[r];n=t[j>>>24]^u[k>>16&255]^v[l>>8&255]^w[i&255]^h[r+1];o=t[k>>>24]^u[l>>16&255]^v[i>>8&255]^w[j&255]^h[r+2];l=t[l>>>24]^u[i>>16&255]^v[j>>8&255]^w[k&255]^h[r+3];r+=4;i=m;j=n;k=o}for(q=0;q<4;q++){f[(3&-q)+g]=x[i>>>24]<<24^x[j>>16&255]<<16^x[k>>8&255]<<8^x[l&255]^h[r++];m=i;i=j;j=k;k=l;l=m}}}]);return a}();c[“default”]=h;b.exports=c[“default”]},{}],25:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();var e=function l(a,b,c){var d=true;a:while(d){var e=a,f=b,g=c;d=false;if(e===null)e=Function.prototype;var h=Object.getOwnPropertyDescriptor(e,f);if(h===undefined){var i=Object.getPrototypeOf(e);if(i===null){return undefined}else{a=i;b=f;c=g;d=true;h=i=undefined;continue a}}else if(“value”in h){return h.value}else{var j=h.get;if(j===undefined){return undefined}return j.call(g)}}};function f(a){return a&&a.__esModule?a:{“default”:a}}function g(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}function h(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b}var i=a(“./stream”);var j=f(i);var k=function(a){h(b,a);function b(){g(this,b);e(Object.getPrototypeOf(b.prototype),”constructor”,this).call(this,j[“default”]);this.jobs=[];this.delay=1;this.timeout_=null}d(b,[{key:”processJob_”,value:function c(){this.jobs.shift()();if(this.jobs.length){this.timeout_=setTimeout(this.processJob_.bind(this),this.delay)}else{this.timeout_=null}}},{key:”push”,value:function f(a){this.jobs.push(a);if(!this.timeout_){this.timeout_=setTimeout(this.processJob_.bind(this),this.delay)}}}]);return b}(j[“default”]);c[“default”]=k;b.exports=c[“default”]},{“./stream”:28}],26:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();function e(a){return a&&a.__esModule?a:{“default”:a}}function f(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}var g=a(“./aes”);var h=e(g);var i=a(“./async-stream”);var j=e(i);var k=a(“pkcs7”);var l=function o(a){return a<<24|(a&65280)<<8|(a&16711680)>>8|a>>>24};var m=function p(a,b,c){var d=new Int32Array(a.buffer,a.byteOffset,a.byteLength>>2);var e=new h[“default”](Array.prototype.slice.call(b));var f=new Uint8Array(a.byteLength);var g=new Int32Array(f.buffer);var i=undefined;var j=undefined;var k=undefined;var m=undefined;var n=undefined;var o=undefined;var p=undefined;var q=undefined;var r=undefined;i=c[0];j=c[1];k=c[2];m=c[3];for(r=0;r<d.length;r+=4){n=l(d[r]);o=l(d[r+1]);p=l(d[r+2]);q=l(d[r+3]);e.decrypt(n,o,p,q,g,r);g[r]=l(g[r]^i);g[r+1]=l(g[r+1]^j);g[r+2]=l(g[r+2]^k);g[r+3]=l(g[r+3]^m);i=n;j=o;k=p;m=q}return f};c.decrypt=m;var n=function(){function a(b,c,d,e){f(this,a);var g=a.STEP;var h=new Int32Array(b.buffer);var i=new Uint8Array(b.byteLength);var m=0;this.asyncStream_=new j[“default”];this.asyncStream_.push(this.decryptChunk_(h.subarray(m,m+g),c,d,i));for(m=g;m<h.length;m+=g){d=new Uint32Array([l(h[m-4]),l(h[m-3]),l(h[m-2]),l(h[m-1])]);this.asyncStream_.push(this.decryptChunk_(h.subarray(m,m+g),c,d,i))}this.asyncStream_.push(function(){e(null,(0,k.unpad)(i))})}d(a,[{key:”decryptChunk_”,value:function b(a,c,d,e){return function(){var b=m(a,c,d);e.set(b,a.byteOffset)}}}],[{key:”STEP”,get:function c(){return 32e3}}]);return a}();c.Decrypter=n;c[“default”]={Decrypter:n,decrypt:m}},{“./aes”:24,”./async-stream”:25,pkcs7:65}],27:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});function d(a){return a&&a.__esModule?a:{“default”:a}}var e=a(“./decrypter”);var f=a(“./async-stream”);var g=d(f);c[“default”]={decrypt:e.decrypt,Decrypter:e.Decrypter,AsyncStream:g[“default”]};b.exports=c[“default”]},{“./async-stream”:25,”./decrypter”:26}],28:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();function e(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}var f=function(){function a(){e(this,a);this.listeners={}}d(a,[{key:”on”,value:function b(a,c){if(!this.listeners[a]){this.listeners[a]=[]}this.listeners[a].push(c)}},{key:”off”,value:function c(a,b){var c=undefined;if(!this.listeners[a]){return false}c=this.listeners[a].indexOf(b);this.listeners[a].splice(c,1);return c>-1}},{key:”trigger”,value:function f(a){var b=undefined;var c=undefined;var d=undefined;var e=undefined;b=this.listeners[a];if(!b){return}if(arguments.length===2){d=b.length;for(c=0;c<d;++c){b[c].call(this,arguments[1])}}else{e=Array.prototype.slice.call(arguments,1);d=b.length;for(c=0;c<d;++c){b[c].apply(this,e)}}}},{key:”dispose”,value:function g(){this.listeners={}}},{key:”pipe”,value:function h(a){this.on(“data”,function(b){a.push(b)})}}]);return a}();c[“default”]=f;b.exports=c[“default”]},{}],29:[function(a,b,c){},{}],30:[function(c,d,e){(function(e){var f=typeof e!==”undefined”?e:typeof a!==”undefined”?a:{};var g=c(“min-document”);var h;if(typeof b!==”undefined”){h=b}else{h=f[“__GLOBAL_DOCUMENT_CACHE@4”];if(!h){h=f[“__GLOBAL_DOCUMENT_CACHE@4″]=g}}d.exports=h}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{“min-document”:29}],31:[function(b,c,d){(function(b){var d;if(typeof a!==”undefined”){d=a}else if(typeof b!==”undefined”){d=b}else if(typeof self!==”undefined”){d=self}else{d={}}c.exports=d}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{}],32:[function(a,b,c){“use strict”;var d=a(“./line-stream”);var e=j(d);var f=a(“./parse-stream”);var g=j(f);var h=a(“./parser”);var i=j(h);function j(a){return a&&a.__esModule?a:{“default”:a}}b.exports={LineStream:e[“default”],ParseStream:g[“default”],Parser:i[“default”]}},{“./line-stream”:33,”./parse-stream”:34,”./parser”:35}],33:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();var e=a(“./stream”);var f=g(e);function g(a){return a&&a.__esModule?a:{“default”:a}}function h(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}function i(a,b){if(!a){throw new ReferenceError(“this hasn’t been initialised – super() hasn’t been called”)}return b&&(typeof b===”object”||typeof b===”function”)?b:a}function j(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b}var k=function(a){j(b,a);function b(){h(this,b);var a=i(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));a.buffer=””;return a}d(b,[{key:”push”,value:function c(a){var b=void 0;this.buffer+=a;b=this.buffer.indexOf(“\n”);for(;b>-1;b=this.buffer.indexOf(“\n”)){this.trigger(“data”,this.buffer.substring(0,b));this.buffer=this.buffer.substring(b+1)}}}]);return b}(f[“default”]);c[“default”]=k},{“./stream”:36}],34:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});var d=function(){function a(a,b){var c=[];var d=true;var e=false;var f=undefined;try{for(var g=a[Symbol.iterator](),h;!(d=(h=g.next()).done);d=true){c.push(h.value);if(b&&c.length===b)break}}catch(i){e=true;f=i}finally{try{if(!d&&g[“return”])g[“return”]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b)){return b}else if(Symbol.iterator in Object(b)){return a(b,c)}else{throw new TypeError(“Invalid attempt to destructure non-iterable instance”)}}}();var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();var f=a(“./stream”);var g=h(f);function h(a){return a&&a.__esModule?a:{“default”:a}}function i(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}function j(a,b){if(!a){throw new ReferenceError(“this hasn’t been initialised – super() hasn’t been called”)}return b&&(typeof b===”object”||typeof b===”function”)?b:a}function k(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b}var l=function o(){var a=”[^=]*”;var b='”[^”]*”|[^,]*’;var c=”(?:”+a+”)=(?:”+b+”)”;return new RegExp(“(?:^|,)(“+c+”)”)};var m=function p(a){var b=a.split(l());var c={};var d=b.length;var e=void 0;while(d–){if(b[d]===””){continue}e=/([^=]*)=(.*)/.exec(b[d]).slice(1);e[0]=e[0].replace(/^\s+|\s+$/g,””);e[1]=e[1].replace(/^\s+|\s+$/g,””);e[1]=e[1].replace(/^[‘”](.*)[‘”]$/g,”$1″);c[e[0]]=e[1]}return c};var n=function(a){k(b,a);function b(){i(this,b);return j(this,(b.__proto__||Object.getPrototypeOf(b)).call(this))}e(b,[{key:”push”,value:function c(a){var b=void 0;var c=void 0;a=a.replace(/^[\u0000\s]+|[\u0000\s]+$/g,””);if(a.length===0){return}if(a[0]!==”#”){this.trigger(“data”,{type:”uri”,uri:a});return}if(a.indexOf(“#EXT”)!==0){this.trigger(“data”,{type:”comment”,text:a.slice(1)});return}a=a.replace(“\r”,””);b=/^#EXTM3U/.exec(a);if(b){this.trigger(“data”,{type:”tag”,tagType:”m3u”});return}b=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(a);if(b){c={type:”tag”,tagType:”inf”};if(b[1]){c.duration=parseFloat(b[1])}if(b[2]){c.title=b[2]}this.trigger(“data”,c);return}b=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(a);if(b){c={type:”tag”,tagType:”targetduration”};if(b[1]){c.duration=parseInt(b[1],10)}this.trigger(“data”,c);return}b=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(a);if(b){c={type:”tag”,tagType:”totalduration”};if(b[1]){c.duration=parseInt(b[1],10)}this.trigger(“data”,c);return}b=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(a);if(b){c={type:”tag”,tagType:”version”};if(b[1]){c.version=parseInt(b[1],10)}this.trigger(“data”,c);return}b=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(a);if(b){c={type:”tag”,tagType:”media-sequence”};if(b[1]){c.number=parseInt(b[1],10)}this.trigger(“data”,c);return}b=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(a);if(b){c={type:”tag”,tagType:”discontinuity-sequence”};if(b[1]){c.number=parseInt(b[1],10)}this.trigger(“data”,c);return}b=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(a);if(b){c={type:”tag”,tagType:”playlist-type”};if(b[1]){c.playlistType=b[1]}this.trigger(“data”,c);return}b=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(a);if(b){c={type:”tag”,tagType:”byterange”};if(b[1]){c.length=parseInt(b[1],10)}if(b[2]){c.offset=parseInt(b[2],10)}this.trigger(“data”,c);return}b=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(a);if(b){c={type:”tag”,tagType:”allow-cache”};if(b[1]){c.allowed=!/NO/.test(b[1])}this.trigger(“data”,c);return}b=/^#EXT-X-MAP:?(.*)$/.exec(a);if(b){c={type:”tag”,tagType:”map”};if(b[1]){var e=m(b[1]);if(e.URI){c.uri=e.URI}if(e.BYTERANGE){var f=e.BYTERANGE.split(“@”),g=d(f,2),h=g[0],i=g[1];c.byterange={};if(h){c.byterange.length=parseInt(h,10)}if(i){c.byterange.offset=parseInt(i,10)}}}this.trigger(“data”,c);return}b=/^#EXT-X-STREAM-INF:?(.*)$/.exec(a);if(b){c={type:”tag”,tagType:”stream-inf”};if(b[1]){c.attributes=m(b[1]);if(c.attributes.RESOLUTION){var j=c.attributes.RESOLUTION.split(“x”);var k={};if(j[0]){k.width=parseInt(j[0],10)}if(j[1]){k.height=parseInt(j[1],10)}c.attributes.RESOLUTION=k}if(c.attributes.BANDWIDTH){c.attributes.BANDWIDTH=parseInt(c.attributes.BANDWIDTH,10)}if(c.attributes[“PROGRAM-ID”]){c.attributes[“PROGRAM-ID”]=parseInt(c.attributes[“PROGRAM-ID”],10)}}this.trigger(“data”,c);return}b=/^#EXT-X-MEDIA:?(.*)$/.exec(a);if(b){c={type:”tag”,tagType:”media”};if(b[1]){c.attributes=m(b[1])}this.trigger(“data”,c);return}b=/^#EXT-X-ENDLIST/.exec(a);if(b){this.trigger(“data”,{type:”tag”,tagType:”endlist”});return}b=/^#EXT-X-DISCONTINUITY/.exec(a);if(b){this.trigger(“data”,{type:”tag”,tagType:”discontinuity”});return}b=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(a);if(b){c={type:”tag”,tagType:”program-date-time”};if(b[1]){c.dateTimeString=b[1];c.dateTimeObject=new Date(b[1])}this.trigger(“data”,c);return}b=/^#EXT-X-KEY:?(.*)$/.exec(a);if(b){c={type:”tag”,tagType:”key”};if(b[1]){c.attributes=m(b[1]);if(c.attributes.IV){if(c.attributes.IV.substring(0,2).toLowerCase()===”0x”){c.attributes.IV=c.attributes.IV.substring(2)}c.attributes.IV=c.attributes.IV.match(/.{8}/g);c.attributes.IV[0]=parseInt(c.attributes.IV[0],16);c.attributes.IV[1]=parseInt(c.attributes.IV[1],16);c.attributes.IV[2]=parseInt(c.attributes.IV[2],16);c.attributes.IV[3]=parseInt(c.attributes.IV[3],16);c.attributes.IV=new Uint32Array(c.attributes.IV)}}this.trigger(“data”,c);return}b=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(a);if(b){c={type:”tag”,tagType:”cue-out-cont”};if(b[1]){c.data=b[1]}else{c.data=””}this.trigger(“data”,c);return}b=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(a);if(b){c={type:”tag”,tagType:”cue-out”};if(b[1]){c.data=b[1]}else{c.data=””}this.trigger(“data”,c);return}b=/^#EXT-X-CUE-IN:?(.*)?$/.exec(a);if(b){c={type:”tag”,tagType:”cue-in”};if(b[1]){c.data=b[1]}else{c.data=””}this.trigger(“data”,c);return}this.trigger(“data”,{type:”tag”,data:a.slice(4)})}}]);return b}(g[“default”]);c[“default”]=n},{“./stream”:36}],35:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});var d=Object.assign||function(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c){if(Object.prototype.hasOwnProperty.call(c,d)){a[d]=c[d]}}}return a};var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();var f=a(“./stream”);var g=l(f);var h=a(“./line-stream”);var i=l(h);var j=a(“./parse-stream”);var k=l(j);function l(a){return a&&a.__esModule?a:{“default”:a}}function m(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}function n(a,b){if(!a){throw new ReferenceError(“this hasn’t been initialised – super() hasn’t been called”)}return b&&(typeof b===”object”||typeof b===”function”)?b:a}function o(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b}var p=function(a){o(b,a);function b(){m(this,b);var a=n(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));a.lineStream=new i[“default”];a.parseStream=new k[“default”];a.lineStream.pipe(a.parseStream);var c=a;var e=[];var f={};var g=void 0;var h=void 0;var j=function p(){};var l={AUDIO:{},VIDEO:{},”CLOSED-CAPTIONS”:{},SUBTITLES:{}};var o=0;a.manifest={allowCache:true,discontinuityStarts:[],segments:[]};a.parseStream.on(“data”,function(a){var b=void 0;var i=void 0;({tag:function k(){(({“allow-cache”:function k(){this.manifest.allowCache=a.allowed;if(!(“allowed”in a)){this.trigger(“info”,{message:”defaulting allowCache to YES”});this.manifest.allowCache=true}},byterange:function m(){var m={};if(“length”in a){f.byterange=m;m.length=a.length;if(!(“offset”in a)){this.trigger(“info”,{message:”defaulting offset to zero”});a.offset=0}}if(“offset”in a){f.byterange=m;m.offset=a.offset}},endlist:function n(){this.manifest.endList=true},inf:function p(){if(!(“mediaSequence”in this.manifest)){this.manifest.mediaSequence=0;this.trigger(“info”,{message:”defaulting media sequence to zero”})}if(!(“discontinuitySequence”in this.manifest)){this.manifest.discontinuitySequence=0;this.trigger(“info”,{message:”defaulting discontinuity sequence to zero”})}if(a.duration>0){f.duration=a.duration}if(a.duration===0){f.duration=.01;this.trigger(“info”,{message:”updating zero segment duration to a small value”})}this.manifest.segments=e},key:function q(){if(!a.attributes){this.trigger(“warn”,{message:”ignoring key declaration without attribute list”});return}if(a.attributes.METHOD===”NONE”){h=null;return}if(!a.attributes.URI){this.trigger(“warn”,{message:”ignoring key declaration without URI”});return}if(!a.attributes.METHOD){this.trigger(“warn”,{message:”defaulting key method to AES-128″})}h={method:a.attributes.METHOD||”AES-128″,uri:a.attributes.URI};if(typeof a.attributes.IV!==”undefined”){h.iv=a.attributes.IV}},”media-sequence”:function r(){if(!isFinite(a.number)){this.trigger(“warn”,{message:”ignoring invalid media sequence: “+a.number});return}this.manifest.mediaSequence=a.number},”discontinuity-sequence”:function s(){if(!isFinite(a.number)){this.trigger(“warn”,{message:”ignoring invalid discontinuity sequence: “+a.number});return}this.manifest.discontinuitySequence=a.number;o=a.number},”playlist-type”:function t(){if(!/VOD|EVENT/.test(a.playlistType)){this.trigger(“warn”,{message:”ignoring unknown playlist type: “+a.playlist});return}this.manifest.playlistType=a.playlistType},map:function u(){g={};if(a.uri){g.uri=a.uri}if(a.byterange){g.byterange=a.byterange}},”stream-inf”:function v(){this.manifest.playlists=e;this.manifest.mediaGroups=this.manifest.mediaGroups||l;if(!a.attributes){this.trigger(“warn”,{message:”ignoring empty stream-inf attributes”});return}if(!f.attributes){f.attributes={}}d(f.attributes,a.attributes)},media:function w(){this.manifest.mediaGroups=this.manifest.mediaGroups||l;if(!(a.attributes&&a.attributes.TYPE&&a.attributes[“GROUP-ID”]&&a.attributes.NAME)){this.trigger(“warn”,{message:”ignoring incomplete or missing media group”});return}var c=this.manifest.mediaGroups[a.attributes.TYPE];c[a.attributes[“GROUP-ID”]]=c[a.attributes[“GROUP-ID”]]||{};b=c[a.attributes[“GROUP-ID”]];i={“default”:/yes/i.test(a.attributes.DEFAULT)};if(i[“default”]){i.autoselect=true}else{i.autoselect=/yes/i.test(a.attributes.AUTOSELECT)}if(a.attributes.LANGUAGE){i.language=a.attributes.LANGUAGE}if(a.attributes.URI){i.uri=a.attributes.URI}if(a.attributes[“INSTREAM-ID”]){i.instreamId=a.attributes[“INSTREAM-ID”]}if(a.attributes.CHARACTERISTICS){i.characteristics=a.attributes.CHARACTERISTICS}if(a.attributes.FORCED){i.forced=/yes/i.test(a.attributes.FORCED)}b[a.attributes.NAME]=i},discontinuity:function x(){o+=1;f.discontinuity=true;this.manifest.discontinuityStarts.push(e.length)},”program-date-time”:function y(){this.manifest.dateTimeString=a.dateTimeString;this.manifest.dateTimeObject=a.dateTimeObject},targetduration:function z(){if(!isFinite(a.duration)||a.duration<0){this.trigger(“warn”,{message:”ignoring invalid target duration: “+a.duration});return}this.manifest.targetDuration=a.duration},totalduration:function A(){if(!isFinite(a.duration)||a.duration<0){this.trigger(“warn”,{message:”ignoring invalid total duration: “+a.duration});return}this.manifest.totalDuration=a.duration},”cue-out”:function B(){f.cueOut=a.data},”cue-out-cont”:function C(){f.cueOutCont=a.data},”cue-in”:function D(){f.cueIn=a.data}})[a.tagType]||j).call(c)},uri:function m(){f.uri=a.uri;e.push(f);if(this.manifest.targetDuration&&!(“duration”in f)){this.trigger(“warn”,{message:”defaulting segment duration to the target duration”});f.duration=this.manifest.targetDuration; }if(h){f.key=h}f.timeline=o;if(g){f.map=g}f={}},comment:function n(){}})[a.type].call(c)});return a}e(b,[{key:”push”,value:function c(a){this.lineStream.push(a)}},{key:”end”,value:function f(){this.lineStream.push(“\n”)}}]);return b}(g[“default”]);c[“default”]=p},{“./line-stream”:33,”./parse-stream”:34,”./stream”:36}],36:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();function e(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}var f=function(){function a(){e(this,a);this.listeners={}}d(a,[{key:”on”,value:function b(a,c){if(!this.listeners[a]){this.listeners[a]=[]}this.listeners[a].push(c)}},{key:”off”,value:function c(a,b){if(!this.listeners[a]){return false}var c=this.listeners[a].indexOf(b);this.listeners[a].splice(c,1);return c>-1}},{key:”trigger”,value:function f(a){var b=this.listeners[a];var c=void 0;var d=void 0;var e=void 0;if(!b){return}if(arguments.length===2){d=b.length;for(c=0;c<d;++c){b[c].call(this,arguments[1])}}else{e=Array.prototype.slice.call(arguments,1);d=b.length;for(c=0;c<d;++c){b[c].apply(this,e)}}}},{key:”dispose”,value:function g(){this.listeners={}}},{key:”pipe”,value:function h(a){this.on(“data”,function(b){a.push(b)})}}]);return a}();c[“default”]=f},{}],37:[function(a,b,c){“use strict”;function d(a){return a&&typeof a===”object”&&”default”in a?a[“default”]:a}var e=d(a(“url-toolkit”));var f=d(a(“global/window”));var g=”0.2.1″;var h=function G(a){var b;var c=a.attributes,d=a.segments;return{attributes:(b={NAME:c.id,BANDWIDTH:parseInt(c.bandwidth,10),CODECS:c.codecs},b[“PROGRAM-ID”]=1,b),uri:””,endList:true,timeline:c.periodIndex,resolvedUri:””,segments:d}};var i=function H(a){var b;var c=a.attributes,d=a.segments;if(typeof d===”undefined”){d=[{uri:c.url,timeline:c.periodIndex,resolvedUri:c.url||””,duration:c.sourceDuration}]}return{attributes:(b={NAME:c.id,BANDWIDTH:parseInt(c.bandwidth,10)},b[“PROGRAM-ID”]=1,b),uri:””,endList:true,timeline:c.periodIndex,resolvedUri:c.url||””,segments:d}};var j=function I(a){return a.reduce(function(a,b){var c=b.attributes.role&&b.attributes.role.value||”main”;var d=b.attributes.lang||””;var e=”main”;if(d){e=b.attributes.lang+” (“+c+”)”}if(a[e]&&a[e].playlists[0].attributes.BANDWIDTH>b.attributes.bandwidth){return a}a[e]={language:d,autoselect:true,”default”:c===”main”,playlists:[h(b)],uri:””};return a},{})};var k=function J(a){return a.reduce(function(a,b){var c=b.attributes.lang||”text”;if(a[c]){return a}a[c]={language:c,”default”:false,autoselect:false,playlists:[i(b)],uri:””};return a},{})};var l=function K(a){var b;var c=a.attributes,d=a.segments;return{attributes:(b={NAME:c.id,AUDIO:”audio”,SUBTITLES:”subs”,RESOLUTION:{width:parseInt(c.width,10),height:parseInt(c.height,10)},CODECS:c.codecs,BANDWIDTH:parseInt(c.bandwidth,10)},b[“PROGRAM-ID”]=1,b),uri:””,endList:true,timeline:c.periodIndex,resolvedUri:””,segments:d}};var m=function L(a){var b;if(!a.length){return{}}var c=a[0].attributes.sourceDuration;var d=function n(a){var b=a.attributes;return b.mimeType===”video/mp4″||b.contentType===”video”};var e=function o(a){var b=a.attributes;return b.mimeType===”audio/mp4″||b.contentType===”audio”};var f=function p(a){var b=a.attributes;return b.mimeType===”text/vtt”||b.contentType===”text”};var g=a.filter(d).map(l);var h=a.filter(e);var i=a.filter(f);var m={allowCache:true,discontinuityStarts:[],segments:[],endList:true,mediaGroups:(b={AUDIO:{},VIDEO:{}},b[“CLOSED-CAPTIONS”]={},b.SUBTITLES={},b),uri:””,duration:c,playlists:g};if(h.length){m.mediaGroups.AUDIO.audio=j(h)}if(i.length){m.mediaGroups.SUBTITLES.subs=k(i)}return m};var n=function M(a,b){var c=[];for(var d=a;d<b;d++){c.push(d)}return c};var o=function N(a){return a.reduce(function(a,b){return a.concat(b)},[])};var p=function O(a){if(!a.length){return[]}var b=[];for(var c=0;c<a.length;c++){b.push(a[c])}return b};var q=function P(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++){b[c]=arguments[c]}return b.reduce(function(a,b){return Object.keys(b).reduce(function(a,c){a[c]=b[c];return a},a)},{})};var r=function Q(a){if(!(a&&a.attributes)){return{}}return p(a.attributes).reduce(function(a,b){a[b.name]=b.value;return a},{})};var s=function R(a,b){if(/^[a-z]+:/i.test(b)){return b}if(!/\/\//i.test(a)){a=e.buildAbsoluteURL(f.location.href,a)}return e.buildAbsoluteURL(a,b)};var t={INVALID_NUMBER_OF_PERIOD:”INVALID_NUMBER_OF_PERIOD”,DASH_EMPTY_MANIFEST:”DASH_EMPTY_MANIFEST”,DASH_INVALID_XML:”DASH_INVALID_XML”,UNSUPPORTED_SEGMENTATION_TYPE:”UNSUPPORTED_SEGMENTATION_TYPE”};var u=function S(a){var b=parseInt(a.startNumber,10);var c=parseInt(a.duration,10);var d=parseInt(a.timescale,10);var e=a.initialization?a.initialization.replace(/\$RepresentationID\$/gi,a.id):””;var f=c/d;var g=Math.round(a.sourceDuration/f);var h=g?n(b,b+g):[];return h.map(function(b){var c=a.media.replace(/\$Number\$/gi,b).replace(/\$RepresentationID\$/gi,a.id);return{uri:c,timeline:a.periodIndex,duration:f,resolvedUri:s(a.baseUrl,c),map:{uri:e,resolvedUri:s(a.baseUrl,e)}}})};var v=function T(a,b){var c=a.segmentBase,d=a.segmentList,e=a.segmentTemplate;if(e){return u(q(e,b))}if(c){throw new Error(t.UNSUPPORTED_SEGMENTATION_TYPE)}if(d){throw new Error(t.UNSUPPORTED_SEGMENTATION_TYPE)}};var w=function U(a){return a.map(function(a){var b=a.attributes,c=a.segmentType;var d=v(c,b);return{attributes:b,segments:d}})};var x=function V(a){var b=365*24*60*60;var c=30*24*60*60;var d=24*60*60;var e=60*60;var f=60;var g=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/;var h=g.exec(a);if(!h){return 0}var i=h.slice(1),j=i[0],k=i[1],l=i[2],m=i[3],n=i[4],o=i[5];return parseFloat(j||0)*b+parseFloat(k||0)*c+parseFloat(l||0)*d+parseFloat(m||0)*e+parseFloat(n||0)*f+parseFloat(o||0)};var y=function W(a,b){return p(a.childNodes).filter(function(a){var c=a.tagName;return c===b})};var z=function X(a){return a.textContent.trim()};var A=function Y(a){return function(b,c){var d=y(b,”AdaptationSet”);var e=d.map(function(b){var d=r(b);var e=y(b,”Role”)[0];var f={role:r(e)};var g=q({periodIndex:c},a,d,f);var h=y(b,”SegmentTemplate”)[0];var i=y(b,”SegmentList”)[0];var j=y(b,”SegmentBase”)[0];var k={segmentTemplate:h&&r(h),segmentList:i&&r(i),segmentBase:j&&r(j)};var l=y(b,”Representation”);var m=function n(a){var b=y(a,”BaseURL”)[0];var c=b?z(b):””;var d=q(g,r(a),{url:c});return{attributes:d,segmentType:k}};return l.map(m)});return o(e)}};var B=function Z(a,b){return a.map(A(b))};var C=function $(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:””;var c=y(a,”Period”);if(!c.length||c.length&&c.length!==1){throw new Error(t.INVALID_NUMBER_OF_PERIOD)}var d=r(a);var e=y(a,”BaseURL”)[0];var f=e?z(e):””;d.baseUrl=s(b,f);d.sourceDuration=d.mediaPresentationDuration?x(d.mediaPresentationDuration):0;return o(B(c,d))};var D=function _(a){if(a===””){throw new Error(t.DASH_EMPTY_MANIFEST)}var b=new f.DOMParser;var c=b.parseFromString(a,”application/xml”);var d=c&&c.documentElement.tagName===”MPD”?c.documentElement:null;if(!d||d&&d.getElementsByTagName(“parsererror”).length>0){throw new Error(t.DASH_INVALID_XML)}return d};var E=g;var F=function aa(a,b){return m(w(C(D(a),b)))};c.VERSION=E;c.parse=F},{“global/window”:31,”url-toolkit”:38}],38:[function(a,b,d){(function(a){var e=/^((?:[^\/;?#]+:)?)(\/\/[^\/\;?#]*)?(.*?)??(;.*?)?(\?.*?)?(#.*?)?$/;var f=/^([^\/;?#]*)(.*)$/;var g=/(?:\/|^)\.(?=\/)/g;var h=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g;var i={buildAbsoluteURL:function(a,b,c){c=c||{};a=a.trim();b=b.trim();if(!b){if(!c.alwaysNormalize){return a}var d=this.parseURL(a);if(!g){throw new Error(“Error trying to parse base URL.”)}d.path=i.normalizePath(d.path);return i.buildURLFromParts(d)}var e=this.parseURL(b);if(!e){throw new Error(“Error trying to parse relative URL.”)}if(e.scheme){if(!c.alwaysNormalize){return b}e.path=i.normalizePath(e.path);return i.buildURLFromParts(e)}var g=this.parseURL(a);if(!g){throw new Error(“Error trying to parse base URL.”)}if(!g.netLoc&&g.path&&g.path[0]!==”/”){var h=f.exec(g.path);g.netLoc=h[1];g.path=h[2]}if(g.netLoc&&!g.path){g.path=”/”}var j={scheme:g.scheme,netLoc:e.netLoc,path:null,params:e.params,query:e.query,fragment:e.fragment};if(!e.netLoc){j.netLoc=g.netLoc;if(e.path[0]!==”/”){if(!e.path){j.path=g.path;if(!e.params){j.params=g.params;if(!e.query){j.query=g.query}}}else{var k=g.path;var l=k.substring(0,k.lastIndexOf(“/”)+1)+e.path;j.path=i.normalizePath(l)}}}if(j.path===null){j.path=c.alwaysNormalize?i.normalizePath(e.path):e.path}return i.buildURLFromParts(j)},parseURL:function(a){var b=e.exec(a);if(!b){return null}return{scheme:b[1]||””,netLoc:b[2]||””,path:b[3]||””,params:b[4]||””,query:b[5]||””,fragment:b[6]||””}},normalizePath:function(a){a=a.split(“”).reverse().join(“”).replace(g,””);while(a.length!==(a=a.replace(h,””)).length){}return a.split(“”).reverse().join(“”)},buildURLFromParts:function(a){return a.scheme+a.netLoc+a.path+a.params+a.query+a.fragment}};if(typeof d===”object”&&typeof b===”object”)b.exports=i;else if(typeof c===”function”&&c.amd)c([],function(){return i});else if(typeof d===”object”)d[“URLToolkit”]=i;else a[“URLToolkit”]=i})(this)},{}],39:[function(a,b,c){“use strict”;var d=a(“../utils/stream.js”);var e;e=function(){var a=new Uint8Array,b=0;e.prototype.init.call(this);this.setTimestamp=function(a){b=a};this.parseId3TagSize=function(a,b){var c=a[b+6]<<21|a[b+7]<<14|a[b+8]<<7|a[b+9],d=a[b+5],e=(d&16)>>4;if(e){return c+20}return c+10};this.parseAdtsSize=function(a,b){var c=(a[b+5]&224)>>5,d=a[b+4]<<3,e=a[b+3]&3<<11;return e|d|c};this.push=function(c){var d=0,e=0,f,g,h,i;if(a.length){i=a.length;a=new Uint8Array(c.byteLength+i);a.set(a.subarray(0,i));a.set(c,i)}else{a=c}while(a.length-e>=3){if(a[e]===”I”.charCodeAt(0)&&a[e+1]===”D”.charCodeAt(0)&&a[e+2]===”3″.charCodeAt(0)){if(a.length-e<10){break}d=this.parseId3TagSize(a,e);if(d>a.length){break}g={type:”timed-metadata”,data:a.subarray(e,e+d)};this.trigger(“data”,g);e+=d;continue}else if(a[e]&255===255&&(a[e+1]&240)===240){if(a.length-e<7){break}d=this.parseAdtsSize(a,e);if(d>a.length){break}h={type:”audio”,data:a.subarray(e,e+d),pts:b,dts:b};this.trigger(“data”,h);e+=d;continue}e++}f=a.length-e;if(f>0){a=a.subarray(e)}else{a=new Uint8Array}}};e.prototype=new d;b.exports=e},{“../utils/stream.js”:63}],40:[function(a,b,c){“use strict”;var d=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];var e=function(a){return a[0]<<21|a[1]<<14|a[2]<<7|a[3]};var f=function(a,b,c){var d,e=””;for(d=b;d<c;d++){e+=”%”+(“00″+a[d].toString(16)).slice(-2)}return e};var g=function(a,b,c){return unescape(f(a,b,c))};var h=function(a,b){var c=a[b+6]<<21|a[b+7]<<14|a[b+8]<<7|a[b+9],d=a[b+5],e=(d&16)>>4;if(e){return c+20}return c+10};var i=function(a,b){var c=(a[b+5]&224)>>5,d=a[b+4]<<3,e=a[b+3]&3<<11;return e|d|c};var j=function(a,b){if(a[b]===”I”.charCodeAt(0)&&a[b+1]===”D”.charCodeAt(0)&&a[b+2]===”3″.charCodeAt(0)){return”timed-metadata”}else if(a[b]&255===255&&(a[b+1]&240)===240){return”audio”}return null};var k=function(a){var b=0;while(b+5<a.length){if(a[b]!==255||(a[b+1]&246)!==240){b++;continue}return d[(a[b+2]&60)>>>2]}return null};var l=function(a){var b,c,d,f;b=10;if(a[5]&64){b+=4;b+=e(a.subarray(10,14))}do{c=e(a.subarray(b+4,b+8));if(c<1){return null}f=String.fromCharCode(a[b],a[b+1],a[b+2],a[b+3]);if(f===”PRIV”){d=a.subarray(b+10,b+c+10);for(var h=0;h<d.byteLength;h++){if(d[h]===0){var i=g(d,0,h);if(i===”com.apple.streaming.transportStreamTimestamp”){var j=d.subarray(h+1);var k=(j[3]&1)<<30|j[4]<<22|j[5]<<14|j[6]<<6|j[7]>>>2;k*=4;k+=j[7]&3;return k}break}}}b+=10;b+=c}while(b<a.byteLength);return null};b.exports={parseId3TagSize:h,parseAdtsSize:i,parseType:j,parseSampleRate:k,parseAacTimestamp:l}},{}],41:[function(a,b,c){“use strict”;var d=a(“../utils/stream.js”);var e;var f=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];e=function(){var a;e.prototype.init.call(this);this.push=function(b){var c=0,d=0,e,g,h,i,j,k;if(b.type!==”audio”){return}if(a){i=a;a=new Uint8Array(i.byteLength+b.data.byteLength);a.set(i);a.set(b.data,i.byteLength)}else{a=b.data}while(c+5<a.length){if(a[c]!==255||(a[c+1]&246)!==240){c++;continue}g=(~a[c+1]&1)*2;e=(a[c+3]&3)<<11|a[c+4]<<3|(a[c+5]&224)>>5;j=((a[c+6]&3)+1)*1024;k=j*9e4/f[(a[c+2]&60)>>>2];h=c+e;if(a.byteLength<h){return}this.trigger(“data”,{pts:b.pts+d*k,dts:b.dts+d*k,sampleCount:j,audioobjecttype:(a[c+2]>>>6&3)+1,channelcount:(a[c+2]&1)<<2|(a[c+3]&192)>>>6,samplerate:f[(a[c+2]&60)>>>2],samplingfrequencyindex:(a[c+2]&60)>>>2,samplesize:16,data:a.subarray(c+7+g,h)});if(a.byteLength===h){a=undefined;return}d++;a=a.subarray(h)}};this.flush=function(){this.trigger(“done”)}};e.prototype=new d;b.exports=e},{“../utils/stream.js”:63}],42:[function(a,b,c){“use strict”;var d=a(“../utils/stream.js”);var e=a(“../utils/exp-golomb.js”);var f,g;var h;g=function(){var a=0,b,c;g.prototype.init.call(this);this.push=function(d){var e;if(!c){c=d.data}else{e=new Uint8Array(c.byteLength+d.data.byteLength);e.set(c);e.set(d.data,c.byteLength);c=e}for(;a<c.byteLength-3;a++){if(c[a+2]===1){b=a+5;break}}while(b<c.byteLength){switch(c[b]){case 0:if(c[b-1]!==0){b+=2;break}else if(c[b-2]!==0){b++;break}if(a+3!==b-2){this.trigger(“data”,c.subarray(a+3,b-2))}do{b++}while(c[b]!==1&&b<c.length);a=b-2;b+=3;break;case 1:if(c[b-1]!==0||c[b-2]!==0){b+=3;break}this.trigger(“data”,c.subarray(a+3,b-2));a=b-2;b+=3;break;default:b+=3;break}}c=c.subarray(a);b-=a;a=0};this.flush=function(){if(c&&c.byteLength>3){this.trigger(“data”,c.subarray(a+3))}c=null;a=0;this.trigger(“done”)}};g.prototype=new d;h={100:true,110:true,122:true,244:true,44:true,83:true,86:true,118:true,128:true,138:true,139:true,134:true};f=function(){var a=new g,b,c,d,i,j,k,l;f.prototype.init.call(this);b=this;this.push=function(b){if(b.type!==”video”){return}c=b.trackId;d=b.pts;i=b.dts;a.push(b)};a.on(“data”,function(a){var e={trackId:c,pts:d,dts:i,data:a};switch(a[0]&31){case 5:e.nalUnitType=”slice_layer_without_partitioning_rbsp_idr”;break;case 6:e.nalUnitType=”sei_rbsp”;e.escapedRBSP=j(a.subarray(1));break;case 7:e.nalUnitType=”seq_parameter_set_rbsp”;e.escapedRBSP=j(a.subarray(1));e.config=k(e.escapedRBSP);break;case 8:e.nalUnitType=”pic_parameter_set_rbsp”;break;case 9:e.nalUnitType=”access_unit_delimiter_rbsp”;break;default:break}b.trigger(“data”,e)});a.on(“done”,function(){b.trigger(“done”)});this.flush=function(){a.flush()};l=function(a,b){var c=8,d=8,e,f;for(e=0;e<a;e++){if(d!==0){f=b.readExpGolomb();d=(c+f+256)%256}c=d===0?c:d}};j=function(a){var b=a.byteLength,c=[],d=1,e,f;while(d<b-2){if(a[d]===0&&a[d+1]===0&&a[d+2]===3){c.push(d+2);d+=2}else{d++}}if(c.length===0){return a}e=b-c.length;f=new Uint8Array(e);var g=0;for(d=0;d<e;g++,d++){if(g===c[0]){g++;c.shift()}f[d]=a[g]}return f};k=function(a){var b=0,c=0,d=0,f=0,g=1,i,j,k,m,n,o,p,q,r,s,t,u,v,w;i=new e(a);j=i.readUnsignedByte();m=i.readUnsignedByte();k=i.readUnsignedByte();i.skipUnsignedExpGolomb();if(h[j]){n=i.readUnsignedExpGolomb();if(n===3){i.skipBits(1)}i.skipUnsignedExpGolomb();i.skipUnsignedExpGolomb();i.skipBits(1);if(i.readBoolean()){t=n!==3?8:12;for(w=0;w<t;w++){if(i.readBoolean()){if(w<6){l(16,i)}else{l(64,i)}}}}}i.skipUnsignedExpGolomb();o=i.readUnsignedExpGolomb();if(o===0){i.readUnsignedExpGolomb()}else if(o===1){i.skipBits(1);i.skipExpGolomb();i.skipExpGolomb();p=i.readUnsignedExpGolomb();for(w=0;w<p;w++){i.skipExpGolomb()}}i.skipUnsignedExpGolomb();i.skipBits(1);q=i.readUnsignedExpGolomb();r=i.readUnsignedExpGolomb();s=i.readBits(1);if(s===0){i.skipBits(1)}i.skipBits(1);if(i.readBoolean()){b=i.readUnsignedExpGolomb();c=i.readUnsignedExpGolomb();d=i.readUnsignedExpGolomb();f=i.readUnsignedExpGolomb()}if(i.readBoolean()){if(i.readBoolean()){v=i.readUnsignedByte();switch(v){case 1:u=[1,1];break;case 2:u=[12,11];break;case 3:u=[10,11];break;case 4:u=[16,11];break;case 5:u=[40,33];break;case 6:u=[24,11];break;case 7:u=[20,11];break;case 8:u=[32,11];break;case 9:u=[80,33];break;case 10:u=[18,11];break;case 11:u=[15,11];break;case 12:u=[64,33];break;case 13:u=[160,99];break;case 14:u=[4,3];break;case 15:u=[3,2];break;case 16:u=[2,1];break;case 255:{u=[i.readUnsignedByte()<<8|i.readUnsignedByte(),i.readUnsignedByte()<<8|i.readUnsignedByte()];break}}if(u){g=u[0]/u[1]}}}return{profileIdc:j,levelIdc:k,profileCompatibility:m,width:Math.ceil(((q+1)*16-b*2-c*2)*g),height:(2-s)*(r+1)*16-d*2-f*2}}};f.prototype=new d;b.exports={H264Stream:f,NalByteStream:g}},{“../utils/exp-golomb.js”:62,”../utils/stream.js”:63}],43:[function(a,b,c){var d=[33,16,5,32,164,27];var e=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252];var f=function(a){var b=[];while(a–){b.push(0)}return b};var g=function(a){return Object.keys(a).reduce(function(b,c){b[c]=new Uint8Array(a[c].reduce(function(a,b){return a.concat(b)},[]));return b},{})};var h={96e3:[d,[227,64],f(154),[56]],88200:[d,[231],f(170),[56]],64e3:[d,[248,192],f(240),[56]],48e3:[d,[255,192],f(268),[55,148,128],f(54),[112]],44100:[d,[255,192],f(268),[55,163,128],f(84),[112]],32e3:[d,[255,192],f(268),[55,234],f(226),[112]],24e3:[d,[255,192],f(268),[55,255,128],f(268),[111,112],f(126),[224]],16e3:[d,[255,192],f(268),[55,255,128],f(268),[111,255],f(269),[223,108],f(195),[1,192]],12e3:[e,f(268),[3,127,248],f(268),[6,255,240],f(268),[13,255,224],f(268),[27,253,128],f(259),[56]],11025:[e,f(268),[3,127,248],f(268),[6,255,240],f(268),[13,255,224],f(268),[27,255,192],f(268),[55,175,128],f(108),[112]],8e3:[e,f(268),[3,121,16],f(47),[7]]};b.exports=g(h)},{}],44:[function(a,b,c){“use strict”;var d=a(“../utils/stream.js”);var e=function(a){this.numberOfTracks=0;this.metadataStream=a.metadataStream;this.videoTags=[];this.audioTags=[];this.videoTrack=null;this.audioTrack=null;this.pendingCaptions=[];this.pendingMetadata=[];this.pendingTracks=0;this.processedTracks=0;e.prototype.init.call(this);this.push=function(a){if(a.text){return this.pendingCaptions.push(a)}if(a.frames){return this.pendingMetadata.push(a)}if(a.track.type===”video”){this.videoTrack=a.track;this.videoTags=a.tags;this.pendingTracks++}if(a.track.type===”audio”){this.audioTrack=a.track;this.audioTags=a.tags;this.pendingTracks++}}};e.prototype=new d;e.prototype.flush=function(a){var b,c,d,e,f={tags:{},captions:[],captionStreams:{},metadata:[]};if(this.pendingTracks<this.numberOfTracks){if(a!==”VideoSegmentStream”&&a!==”AudioSegmentStream”){return}else if(this.pendingTracks===0){this.processedTracks++;if(this.processedTracks<this.numberOfTracks){return}}}this.processedTracks+=this.pendingTracks;this.pendingTracks=0;if(this.processedTracks<this.numberOfTracks){return}if(this.videoTrack){e=this.videoTrack.timelineStartInfo.pts}else if(this.audioTrack){e=this.audioTrack.timelineStartInfo.pts}f.tags.videoTags=this.videoTags;f.tags.audioTags=this.audioTags;for(d=0;d<this.pendingCaptions.length;d++){c=this.pendingCaptions[d];c.startTime=c.startPts-e;c.startTime/=9e4;c.endTime=c.endPts-e;c.endTime/=9e4;f.captionStreams[c.stream]=true;f.captions.push(c)}for(d=0;d<this.pendingMetadata.length;d++){b=this.pendingMetadata[d];b.cueTime=b.pts-e;b.cueTime/=9e4;f.metadata.push(b)}f.metadata.dispatchType=this.metadataStream.dispatchType;this.videoTrack=null;this.audioTrack=null;this.videoTags=[];this.audioTags=[];this.pendingCaptions.length=0;this.pendingMetadata.length=0;this.pendingTracks=0;this.processedTracks=0;this.trigger(“data”,f);this.trigger(“done”)};b.exports=e},{“../utils/stream.js”:63}],45:[function(a,b,c){“use strict”;var d=a(“./flv-tag.js”);var e=function(a,b,c){var e=new Uint8Array(3+1+1+4),f=new DataView(e.buffer),g,h,i;a=a||0;b=b===undefined?true:b;c=c===undefined?true:c;f.setUint8(0,70);f.setUint8(1,76);f.setUint8(2,86);f.setUint8(3,1);f.setUint8(4,(b?4:0)|(c?1:0));f.setUint32(5,e.byteLength);if(a<=0){h=new Uint8Array(e.byteLength+4);h.set(e);h.set([0,0,0,0],e.byteLength);return h}g=new d(d.METADATA_TAG);g.pts=g.dts=0;g.writeMetaDataDouble(“duration”,a);i=g.finalize().length;h=new Uint8Array(e.byteLength+i);h.set(e);h.set(f.byteLength,i);return h};b.exports=e},{“./flv-tag.js”:46}],46:[function(a,b,c){“use strict”;var d;d=function(a,b){var c=0,e=16384,f=function(a,b){var c,d=a.position+b;if(d<a.bytes.byteLength){return}c=new Uint8Array(d*2);c.set(a.bytes.subarray(0,a.position),0);a.bytes=c;a.view=new DataView(a.bytes.buffer)},g=d.widthBytes||new Uint8Array(“width”.length),h=d.heightBytes||new Uint8Array(“height”.length),i=d.videocodecidBytes||new Uint8Array(“videocodecid”.length),j;if(!d.widthBytes){for(j=0;j<“width”.length;j++){g[j]=”width”.charCodeAt(j)}for(j=0;j<“height”.length;j++){h[j]=”height”.charCodeAt(j)}for(j=0;j<“videocodecid”.length;j++){i[j]=”videocodecid”.charCodeAt(j)}d.widthBytes=g;d.heightBytes=h;d.videocodecidBytes=i}this.keyFrame=false;switch(a){case d.VIDEO_TAG:this.length=16;e*=6;break;case d.AUDIO_TAG:this.length=13;this.keyFrame=true;break;case d.METADATA_TAG:this.length=29;this.keyFrame=true;break;default:throw new Error(“Unknown FLV tag type”)}this.bytes=new Uint8Array(e);this.view=new DataView(this.bytes.buffer);this.bytes[0]=a;this.position=this.length;this.keyFrame=b;this.pts=0;this.dts=0;this.writeBytes=function(a,b,c){var d=b||0,e;c=c||a.byteLength;e=d+c;f(this,c);this.bytes.set(a.subarray(d,e),this.position);this.position+=c;this.length=Math.max(this.length,this.position)};this.writeByte=function(a){f(this,1);this.bytes[this.position]=a;this.position++;this.length=Math.max(this.length,this.position)};this.writeShort=function(a){f(this,2);this.view.setUint16(this.position,a);this.position+=2;this.length=Math.max(this.length,this.position)};this.negIndex=function(a){return this.bytes[this.length-a]};this.nalUnitSize=function(){if(c===0){return 0}return this.length-(c+4)};this.startNalUnit=function(){if(c>0){throw new Error(“Attempted to create new NAL wihout closing the old one”)}c=this.length;this.length+=4;this.position=this.length};this.endNalUnit=function(a){var b,d;if(this.length===c+4){this.length-=4}else if(c>0){b=c+4;d=this.length-b;this.position=c;this.view.setUint32(this.position,d);this.position=this.length;if(a){a.push(this.bytes.subarray(b,b+d))}}c=0};this.writeMetaDataDouble=function(a,b){var d;f(this,2+a.length+9);this.view.setUint16(this.position,a.length);this.position+=2;if(a===”width”){this.bytes.set(g,this.position);this.position+=5}else if(a===”height”){this.bytes.set(h,this.position);this.position+=6}else if(a===”videocodecid”){this.bytes.set(i,this.position);this.position+=12}else{for(d=0;d<a.length;d++){this.bytes[this.position]=a.charCodeAt(d);this.position++}}this.position++;this.view.setFloat64(this.position,b);this.position+=8;this.length=Math.max(this.length,this.position);++c};this.writeMetaDataBoolean=function(a,b){var d;f(this,2);this.view.setUint16(this.position,a.length);this.position+=2;for(d=0;d<a.length;d++){f(this,1);this.bytes[this.position]=a.charCodeAt(d);this.position++}f(this,2);this.view.setUint8(this.position,1);this.position++;this.view.setUint8(this.position,b?1:0);this.position++;this.length=Math.max(this.length,this.position);++c};this.finalize=function(){var a,e;switch(this.bytes[0]){case d.VIDEO_TAG:this.bytes[11]=(this.keyFrame||b?16:32)|7;this.bytes[12]=b?0:1;a=this.pts-this.dts;this.bytes[13]=(a&16711680)>>>16;this.bytes[14]=(a&65280)>>>8;this.bytes[15]=(a&255)>>>0;break;case d.AUDIO_TAG:this.bytes[11]=175;this.bytes[12]=b?0:1;break;case d.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,c);this.position=this.length;this.bytes.set([0,0,9],this.position);this.position+=3;this.length=this.position;break}e=this.length-11;this.bytes[1]=(e&16711680)>>>16;this.bytes[2]=(e&65280)>>>8;this.bytes[3]=(e&255)>>>0;this.bytes[4]=(this.dts&16711680)>>>16;this.bytes[5]=(this.dts&65280)>>>8;this.bytes[6]=(this.dts&255)>>>0;this.bytes[7]=(this.dts&4278190080)>>>24;this.bytes[8]=0;this.bytes[9]=0;this.bytes[10]=0;f(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=d.frameTime(this.bytes);return this}};d.AUDIO_TAG=8;d.VIDEO_TAG=9;d.METADATA_TAG=18;d.isAudioFrame=function(a){return d.AUDIO_TAG===a[0]};d.isVideoFrame=function(a){return d.VIDEO_TAG===a[0]};d.isMetaData=function(a){return d.METADATA_TAG===a[0]};d.isKeyFrame=function(a){if(d.isVideoFrame(a)){return a[11]===23}if(d.isAudioFrame(a)){return true}if(d.isMetaData(a)){return true}return false};d.frameTime=function(a){var b=a[4]<<16;b|=a[5]<<8;b|=a[6]<<0;b|=a[7]<<24;return b};b.exports=d},{}],47:[function(a,b,c){b.exports={tag:a(“./flv-tag”),Transmuxer:a(“./transmuxer”),getFlvHeader:a(“./flv-header”)}},{“./flv-header”:45,”./flv-tag”:46,”./transmuxer”:49}],48:[function(a,b,c){“use strict”;var d=function(){var a=this;this.list=[];this.push=function(a){this.list.push({bytes:a.bytes,dts:a.dts,pts:a.pts,keyFrame:a.keyFrame,metaDataTag:a.metaDataTag})};Object.defineProperty(this,”length”,{get:function(){return a.list.length}})};b.exports=d},{}],49:[function(a,b,c){“use strict”;var d=a(“../utils/stream.js”);var e=a(“./flv-tag.js”);var f=a(“../m2ts/m2ts.js”);var g=a(“../codecs/adts.js”);var h=a(“../codecs/h264”).H264Stream;var i=a(“./coalesce-stream.js”);var j=a(“./tag-list.js”);var k,l,m,n,o,p;n=function(a,b){if(typeof b.pts===”number”){if(a.timelineStartInfo.pts===undefined){a.timelineStartInfo.pts=b.pts}else{a.timelineStartInfo.pts=Math.min(a.timelineStartInfo.pts,b.pts)}}if(typeof b.dts===”number”){if(a.timelineStartInfo.dts===undefined){a.timelineStartInfo.dts=b.dts}else{a.timelineStartInfo.dts=Math.min(a.timelineStartInfo.dts,b.dts)}}};o=function(a,b){var c=new e(e.METADATA_TAG);c.dts=b;c.pts=b;c.writeMetaDataDouble(“videocodecid”,7);c.writeMetaDataDouble(“width”,a.width);c.writeMetaDataDouble(“height”,a.height);return c};p=function(a,b){var c,d=new e(e.VIDEO_TAG,true);d.dts=b;d.pts=b;d.writeByte(1);d.writeByte(a.profileIdc);d.writeByte(a.profileCompatibility);d.writeByte(a.levelIdc);d.writeByte(252|3);d.writeByte(224|1);d.writeShort(a.sps[0].length);d.writeBytes(a.sps[0]);d.writeByte(a.pps.length);for(c=0;c<a.pps.length;++c){d.writeShort(a.pps[c].length);d.writeBytes(a.pps[c])}return d};m=function(a){var b=[],c=[],d;m.prototype.init.call(this);this.push=function(c){n(a,c);if(a){a.audioobjecttype=c.audioobjecttype;a.channelcount=c.channelcount;a.samplerate=c.samplerate;a.samplingfrequencyindex=c.samplingfrequencyindex;a.samplesize=c.samplesize;a.extraData=a.audioobjecttype<<11|a.samplingfrequencyindex<<7|a.channelcount<<3}c.pts=Math.round(c.pts/90);c.dts=Math.round(c.dts/90);b.push(c)};this.flush=function(){var f,g,h,i=new j;if(b.length===0){this.trigger(“done”,”AudioSegmentStream”);return}h=-Infinity;while(b.length){f=b.shift();if(c.length&&f.pts>=c[0]){h=c.shift();this.writeMetaDataTags(i,h)}if(a.extraData!==d||f.pts-h>=1e3){this.writeMetaDataTags(i,f.pts);d=a.extraData;h=f.pts}g=new e(e.AUDIO_TAG);g.pts=f.pts;g.dts=f.dts;g.writeBytes(f.data);i.push(g.finalize())}c.length=0;d=null;this.trigger(“data”,{track:a,tags:i.list});this.trigger(“done”,”AudioSegmentStream”)};this.writeMetaDataTags=function(b,c){var d;d=new e(e.METADATA_TAG);d.pts=c;d.dts=c;d.writeMetaDataDouble(“audiocodecid”,10);d.writeMetaDataBoolean(“stereo”,a.channelcount===2);d.writeMetaDataDouble(“audiosamplerate”,a.samplerate);d.writeMetaDataDouble(“audiosamplesize”,16);b.push(d.finalize());d=new e(e.AUDIO_TAG,true);d.pts=c;d.dts=c;d.view.setUint16(d.position,a.extraData);d.position+=2;d.length=Math.max(d.length,d.position);b.push(d.finalize())};this.onVideoKeyFrame=function(a){c.push(a)}};m.prototype=new d;l=function(a){var b=[],c,d;l.prototype.init.call(this);this.finishFrame=function(b,e){if(!e){return}if(c&&a&&a.newMetadata&&(e.keyFrame||b.length===0)){var f=o(c,e.dts).finalize();var g=p(a,e.dts).finalize();f.metaDataTag=g.metaDataTag=true;b.push(f);b.push(g);a.newMetadata=false;this.trigger(“keyframe”,e.dts)}e.endNalUnit();b.push(e.finalize());d=null};this.push=function(c){n(a,c);c.pts=Math.round(c.pts/90);c.dts=Math.round(c.dts/90);b.push(c)};this.flush=function(){var f,g=new j;while(b.length){if(b[0].nalUnitType===”access_unit_delimiter_rbsp”){break}b.shift()}if(b.length===0){this.trigger(“done”,”VideoSegmentStream”);return}while(b.length){f=b.shift();if(f.nalUnitType===”seq_parameter_set_rbsp”){a.newMetadata=true;c=f.config;a.width=c.width;a.height=c.height;a.sps=[f.data];a.profileIdc=c.profileIdc;a.levelIdc=c.levelIdc;a.profileCompatibility=c.profileCompatibility;d.endNalUnit()}else if(f.nalUnitType===”pic_parameter_set_rbsp”){a.newMetadata=true;a.pps=[f.data];d.endNalUnit()}else if(f.nalUnitType===”access_unit_delimiter_rbsp”){if(d){this.finishFrame(g,d)}d=new e(e.VIDEO_TAG);d.pts=f.pts;d.dts=f.dts}else{if(f.nalUnitType===”slice_layer_without_partitioning_rbsp_idr”){d.keyFrame=true}d.endNalUnit()}d.startNalUnit();d.writeBytes(f.data)}if(d){this.finishFrame(g,d)}this.trigger(“data”,{track:a,tags:g.list});this.trigger(“done”,”VideoSegmentStream”)}};l.prototype=new d;k=function(a){var b=this,c,d,e,j,n,o,p,q,r,s,t,u;k.prototype.init.call(this);a=a||{};this.metadataStream=new f.MetadataStream;a.metadataStream=this.metadataStream;c=new f.TransportPacketStream;d=new f.TransportParseStream;e=new f.ElementaryStream;j=new f.TimestampRolloverStream(“video”);n=new f.TimestampRolloverStream(“audio”);o=new f.TimestampRolloverStream(“timed-metadata”);p=new g;q=new h;u=new i(a);c.pipe(d).pipe(e);e.pipe(j).pipe(q);e.pipe(n).pipe(p);e.pipe(o).pipe(this.metadataStream).pipe(u);t=new f.CaptionStream;q.pipe(t).pipe(u);e.on(“data”,function(a){var b,c,d;if(a.type===”metadata”){b=a.tracks.length;while(b–){if(a.tracks[b].type===”video”){c=a.tracks[b]}else if(a.tracks[b].type===”audio”){d=a.tracks[b]}}if(c&&!r){u.numberOfTracks++;r=new l(c);q.pipe(r).pipe(u)}if(d&&!s){u.numberOfTracks++;s=new m(d);p.pipe(s).pipe(u);if(r){r.on(“keyframe”,s.onVideoKeyFrame)}}}});this.push=function(a){c.push(a)};this.flush=function(){c.flush()};this.resetCaptions=function(){t.reset()};u.on(“data”,function(a){b.trigger(“data”,a)});u.on(“done”,function(){b.trigger(“done”)})};k.prototype=new d;b.exports=k},{“../codecs/adts.js”:41,”../codecs/h264″:42,”../m2ts/m2ts.js”:51,”../utils/stream.js”:63,”./coalesce-stream.js”:44,”./flv-tag.js”:46,”./tag-list.js”:48}],50:[function(a,b,c){“use strict”;var d=4,e=128,f=a(“../utils/stream”);var g=function(a){var b=0,c={payloadType:-1,payloadSize:0},f=0,g=0;while(b<a.byteLength){if(a[b]===e){break}while(a[b]===255){f+=255;b++}f+=a[b++];while(a[b]===255){g+=255;b++}g+=a[b++];if(!c.payload&&f===d){c.payloadType=f;c.payloadSize=g;c.payload=a.subarray(b,b+g);break}b+=g;f=0;g=0}return c};var h=function(a){if(a.payload[0]!==181){return null}if((a.payload[1]<<8|a.payload[2])!==49){return null}if(String.fromCharCode(a.payload[3],a.payload[4],a.payload[5],a.payload[6])!==”GA94″){return null}if(a.payload[7]!==3){return null}return a.payload.subarray(8,a.payload.length-1)};var i=function(a,b){var c=[],d,e,f,g;if(!(b[0]&64)){return c}e=b[0]&31;for(d=0;d<e;d++){f=d*3;g={type:b[f+2]&3,pts:a};if(b[f+2]&4){g.ccData=b[f+3]<<8|b[f+4];c.push(g)}}return c};var j=function(){j.prototype.init.call(this);this.captionPackets_=[];this.ccStreams_=[new p(0,0),new p(0,1),new p(1,0),new p(1,1)];this.reset();this.ccStreams_.forEach(function(a){a.on(“data”,this.trigger.bind(this,”data”));a.on(“done”,this.trigger.bind(this,”done”))},this)};j.prototype=new f;j.prototype.push=function(a){var b,c;if(a.nalUnitType!==”sei_rbsp”){return}b=g(a.escapedRBSP);if(b.payloadType!==d){return}c=h(b);if(!c){return}if(a.dts<this.latestDts_){this.ignoreNextEqualDts_=true;return}else if(a.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.ignoreNextEqualDts_=false;return}this.captionPackets_=this.captionPackets_.concat(i(a.pts,c)); this.latestDts_=a.dts};j.prototype.flush=function(){if(!this.captionPackets_.length){this.ccStreams_.forEach(function(a){a.flush()},this);return}this.captionPackets_.forEach(function(a,b){a.presortIndex=b});this.captionPackets_.sort(function(a,b){if(a.pts===b.pts){return a.presortIndex-b.presortIndex}return a.pts-b.pts});this.captionPackets_.forEach(function(a){if(a.type<2){this.dispatchCea608Packet(a)}},this);this.captionPackets_.length=0;this.ccStreams_.forEach(function(a){a.flush()},this);return};j.prototype.reset=function(){this.latestDts_=null;this.ignoreNextEqualDts_=false;this.activeCea608Channel_=[null,null];this.ccStreams_.forEach(function(a){a.reset()})};j.prototype.dispatchCea608Packet=function(a){if(this.setsChannel1Active(a)){this.activeCea608Channel_[a.type]=0}else if(this.setsChannel2Active(a)){this.activeCea608Channel_[a.type]=1}if(this.activeCea608Channel_[a.type]===null){return}this.ccStreams_[(a.type<<1)+this.activeCea608Channel_[a.type]].push(a)};j.prototype.setsChannel1Active=function(a){return(a.ccData&30720)===4096};j.prototype.setsChannel2Active=function(a){return(a.ccData&30720)===6144};var k={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496};var l=function(a){if(a===null){return””}a=k[a]||a;return String.fromCharCode(a)};var m=14;var n=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152];var o=function(){var a=[],b=m+1;while(b–){a.push(“”)}return a};var p=function(a,b){p.prototype.init.call(this);this.field_=a||0;this.dataChannel_=b||0;this.name_=”CC”+((this.field_<<1|this.dataChannel_)+1);this.setConstants();this.reset();this.push=function(a){var b,c,d,e,f;b=a.ccData&32639;if(b===this.lastControlCode_){this.lastControlCode_=null;return}if((b&61440)===4096){this.lastControlCode_=b}else if(b!==this.PADDING_){this.lastControlCode_=null}d=b>>>8;e=b&255;if(b===this.PADDING_){return}else if(b===this.RESUME_CAPTION_LOADING_){this.mode_=”popOn”}else if(b===this.END_OF_CAPTION_){this.clearFormatting(a.pts);this.flushDisplayed(a.pts);c=this.displayed_;this.displayed_=this.nonDisplayed_;this.nonDisplayed_=c;this.startPts_=a.pts}else if(b===this.ROLL_UP_2_ROWS_){this.topRow_=m-1;this.mode_=”rollUp”}else if(b===this.ROLL_UP_3_ROWS_){this.topRow_=m-2;this.mode_=”rollUp”}else if(b===this.ROLL_UP_4_ROWS_){this.topRow_=m-3;this.mode_=”rollUp”}else if(b===this.CARRIAGE_RETURN_){this.clearFormatting(a.pts);this.flushDisplayed(a.pts);this.shiftRowsUp_();this.startPts_=a.pts}else if(b===this.BACKSPACE_){if(this.mode_===”popOn”){this.nonDisplayed_[m]=this.nonDisplayed_[m].slice(0,-1)}else{this.displayed_[m]=this.displayed_[m].slice(0,-1)}}else if(b===this.ERASE_DISPLAYED_MEMORY_){this.flushDisplayed(a.pts);this.displayed_=o()}else if(b===this.ERASE_NON_DISPLAYED_MEMORY_){this.nonDisplayed_=o()}else if(b===this.RESUME_DIRECT_CAPTIONING_){this.mode_=”paintOn”}else if(this.isSpecialCharacter(d,e)){d=(d&3)<<8;f=l(d|e);this[this.mode_](a.pts,f);this.column_++}else if(this.isExtCharacter(d,e)){if(this.mode_===”popOn”){this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1)}else{this.displayed_[m]=this.displayed_[m].slice(0,-1)}d=(d&3)<<8;f=l(d|e);this[this.mode_](a.pts,f);this.column_++}else if(this.isMidRowCode(d,e)){this.clearFormatting(a.pts);this[this.mode_](a.pts,” “);this.column_++;if((e&14)===14){this.addFormatting(a.pts,[“i”])}if((e&1)===1){this.addFormatting(a.pts,[“u”])}}else if(this.isOffsetControlCode(d,e)){this.column_+=e&3}else if(this.isPAC(d,e)){var g=n.indexOf(b&7968);if(g!==this.row_){this.clearFormatting(a.pts);this.row_=g}if(e&1&&this.formatting_.indexOf(“u”)===-1){this.addFormatting(a.pts,[“u”])}if((b&16)===16){this.column_=((b&14)>>1)*4}if(this.isColorPAC(e)){if((e&14)===14){this.addFormatting(a.pts,[“i”])}}}else if(this.isNormalChar(d)){if(e===0){e=null}f=l(d);f+=l(e);this[this.mode_](a.pts,f);this.column_+=f.length}}};p.prototype=new f;p.prototype.flushDisplayed=function(a){var b=this.displayed_.map(function(a){return a.trim()}).join(“\n”).replace(/^\n+|\n+$/g,””);if(b.length){this.trigger(“data”,{startPts:this.startPts_,endPts:a,text:b,stream:this.name_})}};p.prototype.reset=function(){this.mode_=”popOn”;this.topRow_=0;this.startPts_=0;this.displayed_=o();this.nonDisplayed_=o();this.lastControlCode_=null;this.column_=0;this.row_=m;this.formatting_=[]};p.prototype.setConstants=function(){if(this.dataChannel_===0){this.BASE_=16;this.EXT_=17;this.CONTROL_=(20|this.field_)<<8;this.OFFSET_=23}else if(this.dataChannel_===1){this.BASE_=24;this.EXT_=25;this.CONTROL_=(28|this.field_)<<8;this.OFFSET_=31}this.PADDING_=0;this.RESUME_CAPTION_LOADING_=this.CONTROL_|32;this.END_OF_CAPTION_=this.CONTROL_|47;this.ROLL_UP_2_ROWS_=this.CONTROL_|37;this.ROLL_UP_3_ROWS_=this.CONTROL_|38;this.ROLL_UP_4_ROWS_=this.CONTROL_|39;this.CARRIAGE_RETURN_=this.CONTROL_|45;this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41;this.BACKSPACE_=this.CONTROL_|33;this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44;this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46};p.prototype.isSpecialCharacter=function(a,b){return a===this.EXT_&&b>=48&&b<=63};p.prototype.isExtCharacter=function(a,b){return(a===this.EXT_+1||a===this.EXT_+2)&&(b>=32&&b<=63)};p.prototype.isMidRowCode=function(a,b){return a===this.EXT_&&(b>=32&&b<=47)};p.prototype.isOffsetControlCode=function(a,b){return a===this.OFFSET_&&(b>=33&&b<=35)};p.prototype.isPAC=function(a,b){return a>=this.BASE_&&a<this.BASE_+8&&(b>=64&&b<=127)};p.prototype.isColorPAC=function(a){return a>=64&&a<=79||a>=96&&a<=127};p.prototype.isNormalChar=function(a){return a>=32&&a<=127};p.prototype.addFormatting=function(a,b){this.formatting_=this.formatting_.concat(b);var c=b.reduce(function(a,b){return a+”<“+b+”>”},””);this[this.mode_](a,c)};p.prototype.clearFormatting=function(a){if(!this.formatting_.length){return}var b=this.formatting_.reverse().reduce(function(a,b){return a+”</”+b+”>”},””);this.formatting_=[];this[this.mode_](a,b)};p.prototype.popOn=function(a,b){var c=this.nonDisplayed_[this.row_];c+=b;this.nonDisplayed_[this.row_]=c};p.prototype.rollUp=function(a,b){var c=this.displayed_[m];c+=b;this.displayed_[m]=c};p.prototype.shiftRowsUp_=function(){var a;for(a=0;a<this.topRow_;a++){this.displayed_[a]=””}for(a=this.topRow_;a<m;a++){this.displayed_[a]=this.displayed_[a+1]}this.displayed_[m]=””};p.prototype.paintOn=function(){};b.exports={CaptionStream:j,Cea608Stream:p}},{“../utils/stream”:63}],51:[function(a,b,c){“use strict”;var d=a(“../utils/stream.js”),e=a(“./caption-stream”),f=a(“./stream-types”),g=a(“./timestamp-rollover-stream”).TimestampRolloverStream;var h=a(“./stream-types.js”);var i,j,k;var l=188,m=71;i=function(){var a=new Uint8Array(l),b=0;i.prototype.init.call(this);this.push=function(c){var d=0,e=l,f;if(b){f=new Uint8Array(c.byteLength+b);f.set(a.subarray(0,b));f.set(c,b);b=0}else{f=c}while(e<f.byteLength){if(f[d]===m&&f[e]===m){this.trigger(“data”,f.subarray(d,e));d+=l;e+=l;continue}d++;e++}if(d<f.byteLength){a.set(f.subarray(d),0);b=f.byteLength-d}};this.flush=function(){if(b===l&&a[0]===m){this.trigger(“data”,a);b=0}this.trigger(“done”)}};i.prototype=new d;j=function(){var a,b,c,d;j.prototype.init.call(this);d=this;this.packetsWaitingForPmt=[];this.programMapTable=undefined;a=function(a,d){var e=0;if(d.payloadUnitStartIndicator){e+=a[e]+1}if(d.type===”pat”){b(a.subarray(e),d)}else{c(a.subarray(e),d)}};b=function(a,b){b.section_number=a[7];b.last_section_number=a[8];d.pmtPid=(a[10]&31)<<8|a[11];b.pmtPid=d.pmtPid};c=function(a,b){var c,e,g,h;if(!(a[5]&1)){return}d.programMapTable={video:null,audio:null,”timed-metadata”:{}};c=(a[1]&15)<<8|a[2];e=3+c-4;g=(a[10]&15)<<8|a[11];h=12+g;while(h<e){var i=a[h];var j=(a[h+1]&31)<<8|a[h+2];if(i===f.H264_STREAM_TYPE&&d.programMapTable.video===null){d.programMapTable.video=j}else if(i===f.ADTS_STREAM_TYPE&&d.programMapTable.audio===null){d.programMapTable.audio=j}else if(i===f.METADATA_STREAM_TYPE){d.programMapTable[“timed-metadata”][j]=i}h+=((a[h+3]&15)<<8|a[h+4])+5}b.programMapTable=d.programMapTable};this.push=function(b){var c={},d=4;c.payloadUnitStartIndicator=!!(b[1]&64);c.pid=b[1]&31;c.pid<<=8;c.pid|=b[2];if((b[3]&48)>>>4>1){d+=b[d]+1}if(c.pid===0){c.type=”pat”;a(b.subarray(d),c);this.trigger(“data”,c)}else if(c.pid===this.pmtPid){c.type=”pmt”;a(b.subarray(d),c);this.trigger(“data”,c);while(this.packetsWaitingForPmt.length){this.processPes_.apply(this,this.packetsWaitingForPmt.shift())}}else if(this.programMapTable===undefined){this.packetsWaitingForPmt.push([b,d,c])}else{this.processPes_(b,d,c)}};this.processPes_=function(a,b,c){if(c.pid===this.programMapTable.video){c.streamType=f.H264_STREAM_TYPE}else if(c.pid===this.programMapTable.audio){c.streamType=f.ADTS_STREAM_TYPE}else{c.streamType=this.programMapTable[“timed-metadata”][c.pid]}c.type=”pes”;c.data=a.subarray(b);this.trigger(“data”,c)}};j.prototype=new d;j.STREAM_TYPES={h264:27,adts:15};k=function(){var a=this,b={data:[],size:0},c={data:[],size:0},d={data:[],size:0},e=function(a,b){var c;b.packetLength=6+(a[4]<<8|a[5]);b.dataAlignmentIndicator=(a[6]&4)!==0;c=a[7];if(c&192){b.pts=(a[9]&14)<<27|(a[10]&255)<<20|(a[11]&254)<<12|(a[12]&255)<<5|(a[13]&254)>>>3;b.pts*=4;b.pts+=(a[13]&6)>>>1;b.dts=b.pts;if(c&64){b.dts=(a[14]&14)<<27|(a[15]&255)<<20|(a[16]&254)<<12|(a[17]&255)<<5|(a[18]&254)>>>3;b.dts*=4;b.dts+=(a[18]&6)>>>1}}b.data=a.subarray(9+a[8])},g=function(b,c,d){var f=new Uint8Array(b.size),g={type:c},h=0,i=0,j=false,k;if(!b.data.length||b.size<9){return}g.trackId=b.data[0].pid;for(h=0;h<b.data.length;h++){k=b.data[h];f.set(k.data,i);i+=k.data.byteLength}e(f,g);j=c===”video”||g.packetLength<=b.size;if(d||j){b.size=0;b.data.length=0}if(j){a.trigger(“data”,g)}};k.prototype.init.call(this);this.push=function(e){({pat:function(){},pes:function(){var a,i;switch(e.streamType){case f.H264_STREAM_TYPE:case h.H264_STREAM_TYPE:a=b;i=”video”;break;case f.ADTS_STREAM_TYPE:a=c;i=”audio”;break;case f.METADATA_STREAM_TYPE:a=d;i=”timed-metadata”;break;default:return}if(e.payloadUnitStartIndicator){g(a,i,true)}a.data.push(e);a.size+=e.data.byteLength},pmt:function(){var b={type:”metadata”,tracks:[]},c=e.programMapTable;if(c.video!==null){b.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+c.video,codec:”avc”,type:”video”})}if(c.audio!==null){b.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+c.audio,codec:”adts”,type:”audio”})}a.trigger(“data”,b)}})[e.type]()};this.flush=function(){g(b,”video”);g(c,”audio”);g(d,”timed-metadata”);this.trigger(“done”)}};k.prototype=new d;var n={PAT_PID:0,MP2T_PACKET_LENGTH:l,TransportPacketStream:i,TransportParseStream:j,ElementaryStream:k,TimestampRolloverStream:g,CaptionStream:e.CaptionStream,Cea608Stream:e.Cea608Stream,MetadataStream:a(“./metadata-stream”)};for(var o in f){if(f.hasOwnProperty(o)){n[o]=f[o]}}b.exports=n},{“../utils/stream.js”:63,”./caption-stream”:50,”./metadata-stream”:52,”./stream-types”:54,”./stream-types.js”:54,”./timestamp-rollover-stream”:55}],52:[function(a,b,c){“use strict”;var d=a(“../utils/stream”),e=a(“./stream-types”),f=function(a,b,c){var d,e=””;for(d=b;d<c;d++){e+=”%”+(“00″+a[d].toString(16)).slice(-2)}return e},g=function(a,b,c){return decodeURIComponent(f(a,b,c))},h=function(a,b,c){return unescape(f(a,b,c))},i=function(a){return a[0]<<21|a[1]<<14|a[2]<<7|a[3]},j={TXXX:function(a){var b;if(a.data[0]!==3){return}for(b=1;b<a.data.length;b++){if(a.data[b]===0){a.description=g(a.data,1,b);a.value=g(a.data,b+1,a.data.length).replace(/\0*$/,””);break}}a.data=a.value},WXXX:function(a){var b;if(a.data[0]!==3){return}for(b=1;b<a.data.length;b++){if(a.data[b]===0){a.description=g(a.data,1,b);a.url=g(a.data,b+1,a.data.length);break}}},PRIV:function(a){var b;for(b=0;b<a.data.length;b++){if(a.data[b]===0){a.owner=h(a.data,0,b);break}}a.privateData=a.data.subarray(b+1);a.data=a.privateData}},k;k=function(a){var b={debug:!!(a&&a.debug),descriptor:a&&a.descriptor},c=0,d=[],f=0,g;k.prototype.init.call(this);this.dispatchType=e.METADATA_STREAM_TYPE.toString(16);if(b.descriptor){for(g=0;g<b.descriptor.length;g++){this.dispatchType+=(“00″+b.descriptor[g].toString(16)).slice(-2)}}this.push=function(a){var e,g,h,k,l,m;if(a.type!==”timed-metadata”){return}if(a.dataAlignmentIndicator){f=0;d.length=0}if(d.length===0&&(a.data.length<10||a.data[0]!==”I”.charCodeAt(0)||a.data[1]!==”D”.charCodeAt(0)||a.data[2]!==”3″.charCodeAt(0))){if(b.debug){console.log(“Skipping unrecognized metadata packet”)}return}d.push(a);f+=a.data.byteLength;if(d.length===1){c=i(a.data.subarray(6,10));c+=10}if(f<c){return}e={data:new Uint8Array(c),frames:[],pts:d[0].pts,dts:d[0].dts};for(l=0;l<c;){e.data.set(d[0].data.subarray(0,c-l),l);l+=d[0].data.byteLength;f-=d[0].data.byteLength;d.shift()}g=10;if(e.data[5]&64){g+=4;g+=i(e.data.subarray(10,14));c-=i(e.data.subarray(16,20))}do{h=i(e.data.subarray(g+4,g+8));if(h<1){return console.log(“Malformed ID3 frame encountered. Skipping metadata parsing.”)}m=String.fromCharCode(e.data[g],e.data[g+1],e.data[g+2],e.data[g+3]);k={id:m,data:e.data.subarray(g+10,g+h+10)};k.key=k.id;if(j[k.id]){j[k.id](k);if(k.owner===”com.apple.streaming.transportStreamTimestamp”){var n=k.data,o=(n[3]&1)<<30|n[4]<<22|n[5]<<14|n[6]<<6|n[7]>>>2;o*=4;o+=n[7]&3;k.timeStamp=o;if(e.pts===undefined&&e.dts===undefined){e.pts=k.timeStamp;e.dts=k.timeStamp}this.trigger(“timestamp”,k)}}e.frames.push(k);g+=10;g+=h}while(g<c);this.trigger(“data”,e)}};k.prototype=new d;b.exports=k},{“../utils/stream”:63,”./stream-types”:54}],53:[function(a,b,c){“use strict”;var d=a(“./stream-types.js”);var e=function(a){var b=a[1]&31;b<<=8;b|=a[2];return b};var f=function(a){return!!(a[1]&64)};var g=function(a){var b=0;if((a[3]&48)>>>4>1){b+=a[4]+1}return b};var h=function(a,b){var c=e(a);if(c===0){return”pat”}else if(c===b){return”pmt”}else if(b){return”pes”}return null};var i=function(a){var b=f(a);var c=4+g(a);if(b){c+=a[c]+1}return(a[c+10]&31)<<8|a[c+11]};var j=function(a){var b={};var c=f(a);var d=4+g(a);if(c){d+=a[d]+1}if(!(a[d+5]&1)){return}var e,h,i;e=(a[d+1]&15)<<8|a[d+2];h=3+e-4;i=(a[d+10]&15)<<8|a[d+11];var j=12+i;while(j<h){var k=d+j;b[(a[k+1]&31)<<8|a[k+2]]=a[k];j+=((a[k+3]&15)<<8|a[k+4])+5}return b};var k=function(a,b){var c=e(a);var f=b[c];switch(f){case d.H264_STREAM_TYPE:return”video”;case d.ADTS_STREAM_TYPE:return”audio”;case d.METADATA_STREAM_TYPE:return”timed-metadata”;default:return null}};var l=function(a){var b=f(a);if(!b){return null}var c=4+g(a);if(c>=a.byteLength){return null}var d=null;var e;e=a[c+7];if(e&192){d={};d.pts=(a[c+9]&14)<<27|(a[c+10]&255)<<20|(a[c+11]&254)<<12|(a[c+12]&255)<<5|(a[c+13]&254)>>>3;d.pts*=4;d.pts+=(a[c+13]&6)>>>1;d.dts=d.pts;if(e&64){d.dts=(a[c+14]&14)<<27|(a[c+15]&255)<<20|(a[c+16]&254)<<12|(a[c+17]&255)<<5|(a[c+18]&254)>>>3;d.dts*=4;d.dts+=(a[c+18]&6)>>>1}}return d};var m=function(a){switch(a){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}};var n=function(a){var b=4+g(a);var c=a.subarray(b);var d=0;var e=0;var f=false;var h;for(;e<c.byteLength-3;e++){if(c[e+2]===1){d=e+5;break}}while(d<c.byteLength){switch(c[d]){case 0:if(c[d-1]!==0){d+=2;break}else if(c[d-2]!==0){d++;break}if(e+3!==d-2){h=m(c[e+3]&31);if(h===”slice_layer_without_partitioning_rbsp_idr”){f=true}}do{d++}while(c[d]!==1&&d<c.length);e=d-2;d+=3;break;case 1:if(c[d-1]!==0||c[d-2]!==0){d+=3;break}h=m(c[e+3]&31);if(h===”slice_layer_without_partitioning_rbsp_idr”){f=true}e=d-2;d+=3;break;default:d+=3;break}}c=c.subarray(e);d-=e;e=0;if(c&&c.byteLength>3){h=m(c[e+3]&31);if(h===”slice_layer_without_partitioning_rbsp_idr”){f=true}}return f};b.exports={parseType:h,parsePat:i,parsePmt:j,parsePayloadUnitStartIndicator:f,parsePesType:k,parsePesTime:l,videoPacketContainsKeyFrame:n}},{“./stream-types.js”:54}],54:[function(a,b,c){“use strict”;b.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},{}],55:[function(a,b,c){“use strict”;var d=a(“../utils/stream”);var e=8589934592;var f=4294967296;var g=function(a,b){var c=1;if(a>b){c=-1}while(Math.abs(b-a)>f){a+=c*e}return a};var h=function(a){var b,c;h.prototype.init.call(this);this.type_=a;this.push=function(a){if(a.type!==this.type_){return}if(c===undefined){c=a.dts}a.dts=g(a.dts,c);a.pts=g(a.pts,c);b=a.dts;this.trigger(“data”,a)};this.flush=function(){c=b;this.trigger(“done”)};this.discontinuity=function(){c=void 0;b=void 0}};h.prototype=new d;b.exports={TimestampRolloverStream:h,handleRollover:g}},{“../utils/stream”:63}],56:[function(a,b,c){b.exports={generator:a(“./mp4-generator”),Transmuxer:a(“./transmuxer”).Transmuxer,AudioSegmentStream:a(“./transmuxer”).AudioSegmentStream,VideoSegmentStream:a(“./transmuxer”).VideoSegmentStream}},{“./mp4-generator”:57,”./transmuxer”:59}],57:[function(a,b,c){“use strict”;var d=Math.pow(2,32)-1;var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N;(function(){var a;A={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:[]};if(typeof Uint8Array===”undefined”){return}for(a in A){if(A.hasOwnProperty(a)){A[a]=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)]}}B=new Uint8Array([“i”.charCodeAt(0),”s”.charCodeAt(0),”o”.charCodeAt(0),”m”.charCodeAt(0)]);D=new Uint8Array([“a”.charCodeAt(0),”v”.charCodeAt(0),”c”.charCodeAt(0),”1″.charCodeAt(0)]);C=new Uint8Array([0,0,0,1]);E=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]);F=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]);G={video:E,audio:F};J=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]);K=new Uint8Array([0,0,0,0,0,0,0,0]);L=K;M=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]);N=K;H=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])})();e=function(a){var b=[],c=0,d,e,f;for(d=1;d<arguments.length;d++){b.push(arguments[d])}d=b.length;while(d–){c+=b[d].byteLength}e=new Uint8Array(c+8);f=new DataView(e.buffer,e.byteOffset,e.byteLength);f.setUint32(0,e.byteLength);e.set(a,4);for(d=0,c=8;d<b.length;d++){e.set(b[d],c);c+=b[d].byteLength}return e};f=function(){return e(A.dinf,e(A.dref,J))};g=function(a){return e(A.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,a.audioobjecttype<<3|a.samplingfrequencyindex>>>1,a.samplingfrequencyindex<<7|a.channelcount<<3,6,1,2]))};h=function(){return e(A.ftyp,B,C,B,D)};t=function(a){return e(A.hdlr,G[a])};i=function(a){return e(A.mdat,a)};s=function(a){var b=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,a.duration>>>24&255,a.duration>>>16&255,a.duration>>>8&255,a.duration&255,85,196,0,0]);if(a.samplerate){b[12]=a.samplerate>>>24&255;b[13]=a.samplerate>>>16&255;b[14]=a.samplerate>>>8&255;b[15]=a.samplerate&255}return e(A.mdhd,b)};r=function(a){return e(A.mdia,s(a),t(a.type),k(a))};j=function(a){return e(A.mfhd,new Uint8Array([0,0,0,0,(a&4278190080)>>24,(a&16711680)>>16,(a&65280)>>8,a&255]))};k=function(a){return e(A.minf,a.type===”video”?e(A.vmhd,H):e(A.smhd,I),f(),v(a))};l=function(a,b){var c=[],d=b.length;while(d–){c[d]=x(b[d])}return e.apply(null,[A.moof,j(a)].concat(c))};m=function(a){var b=a.length,c=[];while(b–){c[b]=p(a[b])}return e.apply(null,[A.moov,o(4294967295)].concat(c).concat(n(a)))};n=function(a){var b=a.length,c=[];while(b–){c[b]=y(a[b])}return e.apply(null,[A.mvex].concat(c))};o=function(a){var b=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(a&4278190080)>>24,(a&16711680)>>16,(a&65280)>>8,a&255,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 e(A.mvhd,b)};u=function(a){var b=a.samples||[],c=new Uint8Array(4+b.length),d,f;for(f=0;f<b.length;f++){d=b[f].flags;c[f+4]=d.dependsOn<<4|d.isDependedOn<<2|d.hasRedundancy}return e(A.sdtp,c)};v=function(a){return e(A.stbl,w(a),e(A.stts,N),e(A.stsc,L),e(A.stsz,M),e(A.stco,K))};(function(){var a,b;w=function(c){return e(A.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),c.type===”video”?a(c):b(c))};a=function(a){var b=a.sps||[],c=a.pps||[],d=[],f=[],g;for(g=0;g<b.length;g++){d.push((b[g].byteLength&65280)>>>8);d.push(b[g].byteLength&255);d=d.concat(Array.prototype.slice.call(b[g]))}for(g=0;g<c.length;g++){f.push((c[g].byteLength&65280)>>>8);f.push(c[g].byteLength&255);f=f.concat(Array.prototype.slice.call(c[g]))}return e(A.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,(a.width&65280)>>8,a.width&255,(a.height&65280)>>8,a.height&255,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]),e(A.avcC,new Uint8Array([1,a.profileIdc,a.profileCompatibility,a.levelIdc,255].concat([b.length]).concat(d).concat([c.length]).concat(f))),e(A.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))};b=function(a){return e(A.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(a.channelcount&65280)>>8,a.channelcount&255,(a.samplesize&65280)>>8,a.samplesize&255,0,0,0,0,(a.samplerate&65280)>>8,a.samplerate&255,0,0]),g(a))}})();q=function(a){var b=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(a.id&4278190080)>>24,(a.id&16711680)>>16,(a.id&65280)>>8,a.id&255,0,0,0,0,(a.duration&4278190080)>>24,(a.duration&16711680)>>16,(a.duration&65280)>>8,a.duration&255,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,(a.width&65280)>>8,a.width&255,0,0,(a.height&65280)>>8,a.height&255,0,0]);return e(A.tkhd,b)};x=function(a){var b,c,f,g,h,i,j;b=e(A.tfhd,new Uint8Array([0,0,0,58,(a.id&4278190080)>>24,(a.id&16711680)>>16,(a.id&65280)>>8,a.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));i=Math.floor(a.baseMediaDecodeTime/(d+1));j=Math.floor(a.baseMediaDecodeTime%(d+1));c=e(A.tfdt,new Uint8Array([1,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,i&255,j>>>24&255,j>>>16&255,j>>>8&255,j&255]));h=32+20+8+16+8+8;if(a.type===”audio”){f=z(a,h);return e(A.traf,b,c,f)}g=u(a);f=z(a,g.length+h);return e(A.traf,b,c,f,g)};p=function(a){a.duration=a.duration||4294967295;return e(A.trak,q(a),r(a))};y=function(a){var b=new Uint8Array([0,0,0,0,(a.id&4278190080)>>24,(a.id&16711680)>>16,(a.id&65280)>>8,a.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);if(a.type!==”video”){b[b.length-1]=0}return e(A.trex,b)};(function(){var a,b,c;c=function(a,b){var c=0,d=0,e=0,f=0;if(a.length){if(a[0].duration!==undefined){c=1}if(a[0].size!==undefined){d=2}if(a[0].flags!==undefined){e=4}if(a[0].compositionTimeOffset!==undefined){f=8}}return[0,0,c|d|e|f,1,(a.length&4278190080)>>>24,(a.length&16711680)>>>16,(a.length&65280)>>>8,a.length&255,(b&4278190080)>>>24,(b&16711680)>>>16,(b&65280)>>>8,b&255]};b=function(a,b){var d,f,g,h;f=a.samples||[];b+=8+12+16*f.length;d=c(f,b);for(h=0;h<f.length;h++){g=f[h];d=d.concat([(g.duration&4278190080)>>>24,(g.duration&16711680)>>>16,(g.duration&65280)>>>8,g.duration&255,(g.size&4278190080)>>>24,(g.size&16711680)>>>16,(g.size&65280)>>>8,g.size&255,g.flags.isLeading<<2|g.flags.dependsOn,g.flags.isDependedOn<<6|g.flags.hasRedundancy<<4|g.flags.paddingValue<<1|g.flags.isNonSyncSample,g.flags.degradationPriority&240<<8,g.flags.degradationPriority&15,(g.compositionTimeOffset&4278190080)>>>24,(g.compositionTimeOffset&16711680)>>>16,(g.compositionTimeOffset&65280)>>>8,g.compositionTimeOffset&255])}return e(A.trun,new Uint8Array(d))};a=function(a,b){var d,f,g,h;f=a.samples||[];b+=8+12+8*f.length;d=c(f,b);for(h=0;h<f.length;h++){g=f[h];d=d.concat([(g.duration&4278190080)>>>24,(g.duration&16711680)>>>16,(g.duration&65280)>>>8,g.duration&255,(g.size&4278190080)>>>24,(g.size&16711680)>>>16,(g.size&65280)>>>8,g.size&255])}return e(A.trun,new Uint8Array(d))};z=function(c,d){if(c.type===”audio”){return a(c,d)}return b(c,d)}})();b.exports={ftyp:h,mdat:i,moof:l,moov:m,initSegment:function(a){var b=h(),c=m(a),d;d=new Uint8Array(b.byteLength+c.byteLength);d.set(b);d.set(c,b.byteLength);return d}}},{}],58:[function(a,b,c){“use strict”;var d,e,f,g;d=function(a,b){var c=[],f,g,h,i,j;if(!b.length){return null}for(f=0;f<a.byteLength;){g=a[f]<<24;g|=a[f+1]<<16;g|=a[f+2]<<8;g|=a[f+3];h=e(a.subarray(f+4,f+8));i=g>1?f+g:a.byteLength;if(h===b[0]){if(b.length===1){c.push(a.subarray(f+8,i))}else{j=d(a.subarray(f+8,i),b.slice(1));if(j.length){c=c.concat(j)}}}f=i}return c};e=function(a){var b=””;b+=String.fromCharCode(a[0]);b+=String.fromCharCode(a[1]);b+=String.fromCharCode(a[2]);b+=String.fromCharCode(a[3]);return b};f=function(a){var b={},c=d(a,[“moov”,”trak”]);return c.reduce(function(a,b){var c,e,f,g,h;c=d(b,[“tkhd”])[0];if(!c){return null}e=c[0];f=e===0?12:20;g=c[f]<<24|c[f+1]<<16|c[f+2]<<8|c[f+3];h=d(b,[“mdia”,”mdhd”])[0];if(!h){return null}e=h[0];f=e===0?12:20;a[g]=h[f]<<24|h[f+1]<<16|h[f+2]<<8|h[f+3];return a},b)};g=function(a,b){var c,e,f;c=d(b,[“moof”,”traf”]);e=[].concat.apply([],c.map(function(b){return d(b,[“tfhd”]).map(function(c){var e,f,g;e=c[4]<<24|c[5]<<16|c[6]<<8|c[7];f=a[e]||9e4;g=d(b,[“tfdt”]).map(function(a){var b,c;b=a[0];c=a[4]<<24|a[5]<<16|a[6]<<8|a[7];if(b===1){c*=Math.pow(2,32);c+=a[8]<<24|a[9]<<16|a[10]<<8|a[11]}return c})[0];g=g||Infinity;return g/f})}));f=Math.min.apply(null,e);return isFinite(f)?f:0};b.exports={parseType:e,timescale:f,startTime:g}},{}],59:[function(a,b,c){“use strict”;var d=a(“../utils/stream.js”);var e=a(“./mp4-generator.js”);var f=a(“../m2ts/m2ts.js”);var g=a(“../codecs/adts.js”);var h=a(“../codecs/h264”).H264Stream;var i=a(“../aac”);var j=a(“../data/silence”);var k=a(“../utils/clock”);var l=[“audioobjecttype”,”channelcount”,”samplerate”,”samplingfrequencyindex”,”samplesize”];var m=[“width”,”height”,”profileIdc”,”levelIdc”,”profileCompatibility”];var n=9e4;var o,p,q,r;var s,t,u,v,w,x,y;s=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0}}};t=function(a){if(a[0]===”I”.charCodeAt(0)&&a[1]===”D”.charCodeAt(0)&&a[2]===”3″.charCodeAt(0)){return true}return false};x=function(a,b){var c;if(a.length!==b.length){return false}for(c=0;c<a.length;c++){if(a[c]!==b[c]){return false}}return true};y=function(a){var b,c,d=0;for(b=0;b<a.length;b++){c=a[b];d+=c.data.byteLength}return d};p=function(a){var b=[],c=0,d=0,f=0,g=Infinity;p.prototype.init.call(this);this.push=function(c){u(a,c);if(a){l.forEach(function(b){a[b]=c[b]})}b.push(c)};this.setEarliestDts=function(b){d=b-a.timelineStartInfo.baseMediaDecodeTime};this.setVideoBaseMediaDecodeTime=function(a){g=a};this.setAudioAppendStart=function(a){f=a};this.flush=function(){var d,f,g,h;if(b.length===0){this.trigger(“done”,”AudioSegmentStream”);return}d=this.trimAdtsFramesByEarliestDts_(b);a.baseMediaDecodeTime=w(a);this.prefixWithSilence_(a,d);a.samples=this.generateSampleTable_(d);g=e.mdat(this.concatenateFrameData_(d));b=[];f=e.moof(c,[a]);h=new Uint8Array(f.byteLength+g.byteLength);c++;h.set(f);h.set(g,f.byteLength);v(a);this.trigger(“data”,{track:a,boxes:h});this.trigger(“done”,”AudioSegmentStream”)};this.prefixWithSilence_=function(a,b){var c,d=0,e=0,h=0,i=0,l,m;if(!b.length){return}c=k.audioTsToVideoTs(a.baseMediaDecodeTime,a.samplerate);d=Math.ceil(n/(a.samplerate/1024));if(f&&g){e=c-Math.max(f,g);h=Math.floor(e/d);i=h*d}if(h<1||i>n/2){return}l=j[a.samplerate];if(!l){l=b[0].data}for(m=0;m<h;m++){b.splice(m,0,{data:l})}a.baseMediaDecodeTime-=Math.floor(k.videoTsToAudioTs(i,a.samplerate))};this.trimAdtsFramesByEarliestDts_=function(b){if(a.minSegmentDts>=d){return b}a.minSegmentDts=Infinity;return b.filter(function(b){if(b.dts>=d){a.minSegmentDts=Math.min(a.minSegmentDts,b.dts);a.minSegmentPts=a.minSegmentDts;return true}return false})};this.generateSampleTable_=function(a){var b,c,d=[];for(b=0;b<a.length;b++){c=a[b];d.push({size:c.data.byteLength,duration:1024})}return d};this.concatenateFrameData_=function(a){var b,c,d=0,e=new Uint8Array(y(a));for(b=0;b<a.length;b++){c=a[b];e.set(c.data,d);d+=c.data.byteLength}return e}};p.prototype=new d;o=function(a,b){var c=0,d=[],f=[],g,h;b=b||{};o.prototype.init.call(this);delete a.minPTS;this.gopCache_=[];this.push=function(b){u(a,b);if(b.nalUnitType===”seq_parameter_set_rbsp”&&!g){g=b.config;a.sps=[b.data];m.forEach(function(b){a[b]=g[b]},this)}if(b.nalUnitType===”pic_parameter_set_rbsp”&&!h){h=b.data;a.pps=[b.data]}d.push(b)};this.flush=function(){var g,h,i,j,k,l;while(d.length){if(d[0].nalUnitType===”access_unit_delimiter_rbsp”){break}d.shift()}if(d.length===0){this.resetStream_();this.trigger(“done”,”VideoSegmentStream”);return}g=this.groupNalsIntoFrames_(d);i=this.groupFramesIntoGops_(g);if(!i[0][0].keyFrame){h=this.getGopForFusion_(d[0],a);if(h){i.unshift(h);i.byteLength+=h.byteLength;i.nalCount+=h.nalCount;i.pts=h.pts;i.dts=h.dts;i.duration+=h.duration}else{i=this.extendFirstKeyFrame_(i)}}if(f.length){var m;if(b.alignGopsAtEnd){m=this.alignGopsAtEnd_(i)}else{m=this.alignGopsAtStart_(i)}if(!m){this.gopCache_.unshift({gop:i.pop(),pps:a.pps,sps:a.sps});this.gopCache_.length=Math.min(6,this.gopCache_.length);d=[];this.resetStream_();this.trigger(“done”,”VideoSegmentStream”);return}v(a);i=m}u(a,i);a.samples=this.generateSampleTable_(i);k=e.mdat(this.concatenateNalData_(i));a.baseMediaDecodeTime=w(a);this.trigger(“processedGopsInfo”,i.map(function(a){return{pts:a.pts,dts:a.dts,byteLength:a.byteLength}}));this.gopCache_.unshift({gop:i.pop(),pps:a.pps,sps:a.sps});this.gopCache_.length=Math.min(6,this.gopCache_.length);d=[];this.trigger(“baseMediaDecodeTime”,a.baseMediaDecodeTime);this.trigger(“timelineStartInfo”,a.timelineStartInfo);j=e.moof(c,[a]);l=new Uint8Array(j.byteLength+k.byteLength);c++;l.set(j);l.set(k,j.byteLength);this.trigger(“data”,{track:a,boxes:l});this.resetStream_();this.trigger(“done”,”VideoSegmentStream”)};this.resetStream_=function(){v(a);g=undefined;h=undefined};this.getGopForFusion_=function(b){var c=45e3,d=1e4,e=Infinity,f,g,h,i,j;for(j=0;j<this.gopCache_.length;j++){i=this.gopCache_[j];h=i.gop;if(!(a.pps&&x(a.pps[0],i.pps[0]))||!(a.sps&&x(a.sps[0],i.sps[0]))){continue}if(h.dts<a.timelineStartInfo.dts){continue}f=b.dts-h.dts-h.duration;if(f>=-d&&f<=c){if(!g||e>f){g=i;e=f}}}if(g){return g.gop}return null};this.extendFirstKeyFrame_=function(a){var b;if(!a[0][0].keyFrame&&a.length>1){b=a.shift();a.byteLength-=b.byteLength;a.nalCount-=b.nalCount;a[0][0].dts=b.dts;a[0][0].pts=b.pts;a[0][0].duration+=b.duration}return a};this.groupNalsIntoFrames_=function(a){var b,c,d=[],e=[];d.byteLength=0;for(b=0;b<a.length;b++){c=a[b];if(c.nalUnitType===”access_unit_delimiter_rbsp”){if(d.length){d.duration=c.dts-d.dts;e.push(d)}d=[c];d.byteLength=c.data.byteLength;d.pts=c.pts;d.dts=c.dts}else{if(c.nalUnitType===”slice_layer_without_partitioning_rbsp_idr”){d.keyFrame=true}d.duration=c.dts-d.dts;d.byteLength+=c.data.byteLength;d.push(c)}}if(e.length&&(!d.duration||d.duration<=0)){d.duration=e[e.length-1].duration}e.push(d);return e};this.groupFramesIntoGops_=function(a){var b,c,d=[],e=[];d.byteLength=0;d.nalCount=0;d.duration=0;d.pts=a[0].pts;d.dts=a[0].dts;e.byteLength=0;e.nalCount=0;e.duration=0;e.pts=a[0].pts;e.dts=a[0].dts;for(b=0;b<a.length;b++){c=a[b];if(c.keyFrame){if(d.length){e.push(d);e.byteLength+=d.byteLength;e.nalCount+=d.nalCount;e.duration+=d.duration}d=[c];d.nalCount=c.length; d.byteLength=c.byteLength;d.pts=c.pts;d.dts=c.dts;d.duration=c.duration}else{d.duration+=c.duration;d.nalCount+=c.length;d.byteLength+=c.byteLength;d.push(c)}}if(e.length&&d.duration<=0){d.duration=e[e.length-1].duration}e.byteLength+=d.byteLength;e.nalCount+=d.nalCount;e.duration+=d.duration;e.push(d);return e};this.generateSampleTable_=function(a,b){var c,d,e,f,g,h=b||0,i=[];for(c=0;c<a.length;c++){f=a[c];for(d=0;d<f.length;d++){g=f[d];e=s();e.dataOffset=h;e.compositionTimeOffset=g.pts-g.dts;e.duration=g.duration;e.size=4*g.length;e.size+=g.byteLength;if(g.keyFrame){e.flags.dependsOn=2}h+=e.size;i.push(e)}}return i};this.concatenateNalData_=function(a){var b,c,d,e,f,g,h=0,i=a.byteLength,j=a.nalCount,k=i+4*j,l=new Uint8Array(k),m=new DataView(l.buffer);for(b=0;b<a.length;b++){e=a[b];for(c=0;c<e.length;c++){f=e[c];for(d=0;d<f.length;d++){g=f[d];m.setUint32(h,g.data.byteLength);h+=4;l.set(g.data,h);h+=g.data.byteLength}}}return l};this.alignGopsAtStart_=function(a){var b,c,d,e,g,h,i,j;g=a.byteLength;h=a.nalCount;i=a.duration;b=c=0;while(b<f.length&&c<a.length){d=f[b];e=a[c];if(d.pts===e.pts){break}if(e.pts>d.pts){b++;continue}c++;g-=e.byteLength;h-=e.nalCount;i-=e.duration}if(c===0){return a}if(c===a.length){return null}j=a.slice(c);j.byteLength=g;j.duration=i;j.nalCount=h;j.pts=j[0].pts;j.dts=j[0].dts;return j};this.alignGopsAtEnd_=function(a){var b,c,d,e,g,h;b=f.length-1;c=a.length-1;g=null;h=false;while(b>=0&&c>=0){d=f[b];e=a[c];if(d.pts===e.pts){h=true;break}if(d.pts>e.pts){b–;continue}if(b===f.length-1){g=c}c–}if(!h&&g===null){return null}var i;if(h){i=c}else{i=g}if(i===0){return a}var j=a.slice(i);var k=j.reduce(function(a,b){a.byteLength+=b.byteLength;a.duration+=b.duration;a.nalCount+=b.nalCount;return a},{byteLength:0,duration:0,nalCount:0});j.byteLength=k.byteLength;j.duration=k.duration;j.nalCount=k.nalCount;j.pts=j[0].pts;j.dts=j[0].dts;return j};this.alignGopsWith=function(a){f=a}};o.prototype=new d;u=function(a,b){if(typeof b.pts===”number”){if(a.timelineStartInfo.pts===undefined){a.timelineStartInfo.pts=b.pts}if(a.minSegmentPts===undefined){a.minSegmentPts=b.pts}else{a.minSegmentPts=Math.min(a.minSegmentPts,b.pts)}if(a.maxSegmentPts===undefined){a.maxSegmentPts=b.pts}else{a.maxSegmentPts=Math.max(a.maxSegmentPts,b.pts)}}if(typeof b.dts===”number”){if(a.timelineStartInfo.dts===undefined){a.timelineStartInfo.dts=b.dts}if(a.minSegmentDts===undefined){a.minSegmentDts=b.dts}else{a.minSegmentDts=Math.min(a.minSegmentDts,b.dts)}if(a.maxSegmentDts===undefined){a.maxSegmentDts=b.dts}else{a.maxSegmentDts=Math.max(a.maxSegmentDts,b.dts)}}};v=function(a){delete a.minSegmentDts;delete a.maxSegmentDts;delete a.minSegmentPts;delete a.maxSegmentPts};w=function(a){var b,c,d=a.minSegmentDts-a.timelineStartInfo.dts;b=a.timelineStartInfo.baseMediaDecodeTime;b+=d;b=Math.max(0,b);if(a.type===”audio”){c=a.samplerate/n;b*=c;b=Math.floor(b)}return b};r=function(a,b){this.numberOfTracks=0;this.metadataStream=b;if(typeof a.remux!==”undefined”){this.remuxTracks=!!a.remux}else{this.remuxTracks=true}this.pendingTracks=[];this.videoTrack=null;this.pendingBoxes=[];this.pendingCaptions=[];this.pendingMetadata=[];this.pendingBytes=0;this.emittedTracks=0;r.prototype.init.call(this);this.push=function(a){if(a.text){return this.pendingCaptions.push(a)}if(a.frames){return this.pendingMetadata.push(a)}this.pendingTracks.push(a.track);this.pendingBoxes.push(a.boxes);this.pendingBytes+=a.boxes.byteLength;if(a.track.type===”video”){this.videoTrack=a.track}if(a.track.type===”audio”){this.audioTrack=a.track}}};r.prototype=new d;r.prototype.flush=function(a){var b=0,c={captions:[],captionStreams:{},metadata:[],info:{}},d,f,g,h=0,i;if(this.pendingTracks.length<this.numberOfTracks){if(a!==”VideoSegmentStream”&&a!==”AudioSegmentStream”){return}else if(this.remuxTracks){return}else if(this.pendingTracks.length===0){this.emittedTracks++;if(this.emittedTracks>=this.numberOfTracks){this.trigger(“done”);this.emittedTracks=0}return}}if(this.videoTrack){h=this.videoTrack.timelineStartInfo.pts;m.forEach(function(a){c.info[a]=this.videoTrack[a]},this)}else if(this.audioTrack){h=this.audioTrack.timelineStartInfo.pts;l.forEach(function(a){c.info[a]=this.audioTrack[a]},this)}if(this.pendingTracks.length===1){c.type=this.pendingTracks[0].type}else{c.type=”combined”}this.emittedTracks+=this.pendingTracks.length;g=e.initSegment(this.pendingTracks);c.initSegment=new Uint8Array(g.byteLength);c.initSegment.set(g);c.data=new Uint8Array(this.pendingBytes);for(i=0;i<this.pendingBoxes.length;i++){c.data.set(this.pendingBoxes[i],b);b+=this.pendingBoxes[i].byteLength}for(i=0;i<this.pendingCaptions.length;i++){d=this.pendingCaptions[i];d.startTime=d.startPts-h;d.startTime/=9e4;d.endTime=d.endPts-h;d.endTime/=9e4;c.captionStreams[d.stream]=true;c.captions.push(d)}for(i=0;i<this.pendingMetadata.length;i++){f=this.pendingMetadata[i];f.cueTime=f.pts-h;f.cueTime/=9e4;c.metadata.push(f)}c.metadata.dispatchType=this.metadataStream.dispatchType;this.pendingTracks.length=0;this.videoTrack=null;this.pendingBoxes.length=0;this.pendingCaptions.length=0;this.pendingBytes=0;this.pendingMetadata.length=0;this.trigger(“data”,c);if(this.emittedTracks>=this.numberOfTracks){this.trigger(“done”);this.emittedTracks=0}};q=function(a){var b=this,c=true,d,e;q.prototype.init.call(this);a=a||{};this.baseMediaDecodeTime=a.baseMediaDecodeTime||0;this.transmuxPipeline_={};this.setupAacPipeline=function(){var c={};this.transmuxPipeline_=c;c.type=”aac”;c.metadataStream=new f.MetadataStream;c.aacStream=new i;c.audioTimestampRolloverStream=new f.TimestampRolloverStream(“audio”);c.timedMetadataTimestampRolloverStream=new f.TimestampRolloverStream(“timed-metadata”);c.adtsStream=new g;c.coalesceStream=new r(a,c.metadataStream);c.headOfPipeline=c.aacStream;c.aacStream.pipe(c.audioTimestampRolloverStream).pipe(c.adtsStream);c.aacStream.pipe(c.timedMetadataTimestampRolloverStream).pipe(c.metadataStream).pipe(c.coalesceStream);c.metadataStream.on(“timestamp”,function(a){c.aacStream.setTimestamp(a.timeStamp)});c.aacStream.on(“data”,function(a){if(a.type===”timed-metadata”&&!c.audioSegmentStream){e=e||{timelineStartInfo:{baseMediaDecodeTime:b.baseMediaDecodeTime},codec:”adts”,type:”audio”};c.coalesceStream.numberOfTracks++;c.audioSegmentStream=new p(e);c.adtsStream.pipe(c.audioSegmentStream).pipe(c.coalesceStream)}});c.coalesceStream.on(“data”,this.trigger.bind(this,”data”));c.coalesceStream.on(“done”,this.trigger.bind(this,”done”))};this.setupTsPipeline=function(){var c={};this.transmuxPipeline_=c;c.type=”ts”;c.metadataStream=new f.MetadataStream;c.packetStream=new f.TransportPacketStream;c.parseStream=new f.TransportParseStream;c.elementaryStream=new f.ElementaryStream;c.videoTimestampRolloverStream=new f.TimestampRolloverStream(“video”);c.audioTimestampRolloverStream=new f.TimestampRolloverStream(“audio”);c.timedMetadataTimestampRolloverStream=new f.TimestampRolloverStream(“timed-metadata”);c.adtsStream=new g;c.h264Stream=new h;c.captionStream=new f.CaptionStream;c.coalesceStream=new r(a,c.metadataStream);c.headOfPipeline=c.packetStream;c.packetStream.pipe(c.parseStream).pipe(c.elementaryStream);c.elementaryStream.pipe(c.videoTimestampRolloverStream).pipe(c.h264Stream);c.elementaryStream.pipe(c.audioTimestampRolloverStream).pipe(c.adtsStream);c.elementaryStream.pipe(c.timedMetadataTimestampRolloverStream).pipe(c.metadataStream).pipe(c.coalesceStream);c.h264Stream.pipe(c.captionStream).pipe(c.coalesceStream);c.elementaryStream.on(“data”,function(f){var g;if(f.type===”metadata”){g=f.tracks.length;while(g–){if(!d&&f.tracks[g].type===”video”){d=f.tracks[g];d.timelineStartInfo.baseMediaDecodeTime=b.baseMediaDecodeTime}else if(!e&&f.tracks[g].type===”audio”){e=f.tracks[g];e.timelineStartInfo.baseMediaDecodeTime=b.baseMediaDecodeTime}}if(d&&!c.videoSegmentStream){c.coalesceStream.numberOfTracks++;c.videoSegmentStream=new o(d,a);c.videoSegmentStream.on(“timelineStartInfo”,function(a){if(e){e.timelineStartInfo=a;c.audioSegmentStream.setEarliestDts(a.dts)}});c.videoSegmentStream.on(“processedGopsInfo”,b.trigger.bind(b,”gopInfo”));c.videoSegmentStream.on(“baseMediaDecodeTime”,function(a){if(e){c.audioSegmentStream.setVideoBaseMediaDecodeTime(a)}});c.h264Stream.pipe(c.videoSegmentStream).pipe(c.coalesceStream)}if(e&&!c.audioSegmentStream){c.coalesceStream.numberOfTracks++;c.audioSegmentStream=new p(e);c.adtsStream.pipe(c.audioSegmentStream).pipe(c.coalesceStream)}}});c.coalesceStream.on(“data”,this.trigger.bind(this,”data”));c.coalesceStream.on(“done”,this.trigger.bind(this,”done”))};this.setBaseMediaDecodeTime=function(a){var b=this.transmuxPipeline_;this.baseMediaDecodeTime=a;if(e){e.timelineStartInfo.dts=undefined;e.timelineStartInfo.pts=undefined;v(e);e.timelineStartInfo.baseMediaDecodeTime=a;if(b.audioTimestampRolloverStream){b.audioTimestampRolloverStream.discontinuity()}}if(d){if(b.videoSegmentStream){b.videoSegmentStream.gopCache_=[];b.videoTimestampRolloverStream.discontinuity()}d.timelineStartInfo.dts=undefined;d.timelineStartInfo.pts=undefined;v(d);b.captionStream.reset();d.timelineStartInfo.baseMediaDecodeTime=a}if(b.timedMetadataTimestampRolloverStream){b.timedMetadataTimestampRolloverStream.discontinuity()}};this.setAudioAppendStart=function(a){if(e){this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(a)}};this.alignGopsWith=function(a){if(d&&this.transmuxPipeline_.videoSegmentStream){this.transmuxPipeline_.videoSegmentStream.alignGopsWith(a)}};this.push=function(a){if(c){var b=t(a);if(b&&this.transmuxPipeline_.type!==”aac”){this.setupAacPipeline()}else if(!b&&this.transmuxPipeline_.type!==”ts”){this.setupTsPipeline()}c=false}this.transmuxPipeline_.headOfPipeline.push(a)};this.flush=function(){c=true;this.transmuxPipeline_.headOfPipeline.flush()};this.resetCaptions=function(){if(this.transmuxPipeline_.captionStream){this.transmuxPipeline_.captionStream.reset()}}};q.prototype=new d;b.exports={Transmuxer:q,VideoSegmentStream:o,AudioSegmentStream:p,AUDIO_PROPERTIES:l,VIDEO_PROPERTIES:m}},{“../aac”:39,”../codecs/adts.js”:41,”../codecs/h264″:42,”../data/silence”:43,”../m2ts/m2ts.js”:51,”../utils/clock”:61,”../utils/stream.js”:63,”./mp4-generator.js”:57}],60:[function(a,b,c){“use strict”;var d=a(“../m2ts/stream-types.js”);var e=a(“../m2ts/timestamp-rollover-stream.js”).handleRollover;var f={};f.ts=a(“../m2ts/probe.js”);f.aac=a(“../aac/probe.js”);var g=9e4,h=188,i=71;var j=function(a){if(a[0]===”I”.charCodeAt(0)&&a[1]===”D”.charCodeAt(0)&&a[2]===”3″.charCodeAt(0)){return true}return false};var k=function(a,b){var c=0,d=h,e,g;while(d<a.byteLength){if(a[c]===i&&a[d]===i){e=a.subarray(c,d);g=f.ts.parseType(e,b.pid);switch(g){case”pat”:if(!b.pid){b.pid=f.ts.parsePat(e)}break;case”pmt”:if(!b.table){b.table=f.ts.parsePmt(e)}break;default:break}if(b.pid&&b.table){return}c+=h;d+=h;continue}c++;d++}};var l=function(a,b,c){var d=0,e=h,g,j,k,l,m;var n=false;while(e<a.byteLength){if(a[d]===i&&a[e]===i){g=a.subarray(d,e);j=f.ts.parseType(g,b.pid);switch(j){case”pes”:k=f.ts.parsePesType(g,b.table);l=f.ts.parsePayloadUnitStartIndicator(g);if(k===”audio”&&l){m=f.ts.parsePesTime(g);if(m){m.type=”audio”;c.audio.push(m);n=true}}break;default:break}if(n){break}d+=h;e+=h;continue}d++;e++}e=a.byteLength;d=e-h;n=false;while(d>=0){if(a[d]===i&&a[e]===i){g=a.subarray(d,e);j=f.ts.parseType(g,b.pid);switch(j){case”pes”:k=f.ts.parsePesType(g,b.table);l=f.ts.parsePayloadUnitStartIndicator(g);if(k===”audio”&&l){m=f.ts.parsePesTime(g);if(m){m.type=”audio”;c.audio.push(m);n=true}}break;default:break}if(n){break}d-=h;e-=h;continue}d–;e–}};var m=function(a,b,c){var d=0,e=h,g,j,k,l,m,n,o,p;var q=false;var r={data:[],size:0};while(e<a.byteLength){if(a[d]===i&&a[e]===i){g=a.subarray(d,e);j=f.ts.parseType(g,b.pid);switch(j){case”pes”:k=f.ts.parsePesType(g,b.table);l=f.ts.parsePayloadUnitStartIndicator(g);if(k===”video”){if(l&&!q){m=f.ts.parsePesTime(g);if(m){m.type=”video”;c.video.push(m);q=true}}if(!c.firstKeyFrame){if(l){if(r.size!==0){n=new Uint8Array(r.size);o=0;while(r.data.length){p=r.data.shift();n.set(p,o);o+=p.byteLength}if(f.ts.videoPacketContainsKeyFrame(n)){c.firstKeyFrame=f.ts.parsePesTime(n);c.firstKeyFrame.type=”video”}r.size=0}}r.data.push(g);r.size+=g.byteLength}}break;default:break}if(q&&c.firstKeyFrame){break}d+=h;e+=h;continue}d++;e++}e=a.byteLength;d=e-h;q=false;while(d>=0){if(a[d]===i&&a[e]===i){g=a.subarray(d,e);j=f.ts.parseType(g,b.pid);switch(j){case”pes”:k=f.ts.parsePesType(g,b.table);l=f.ts.parsePayloadUnitStartIndicator(g);if(k===”video”&&l){m=f.ts.parsePesTime(g);if(m){m.type=”video”;c.video.push(m);q=true}}break;default:break}if(q){break}d-=h;e-=h;continue}d–;e–}};var n=function(a,b){if(a.audio&&a.audio.length){var c=b;if(typeof c===”undefined”){c=a.audio[0].dts}a.audio.forEach(function(a){a.dts=e(a.dts,c);a.pts=e(a.pts,c);a.dtsTime=a.dts/g;a.ptsTime=a.pts/g})}if(a.video&&a.video.length){var d=b;if(typeof d===”undefined”){d=a.video[0].dts}a.video.forEach(function(a){a.dts=e(a.dts,d);a.pts=e(a.pts,d);a.dtsTime=a.dts/g;a.ptsTime=a.pts/g});if(a.firstKeyFrame){var f=a.firstKeyFrame;f.dts=e(f.dts,d);f.pts=e(f.pts,d);f.dtsTime=f.dts/g;f.ptsTime=f.dts/g}}};var o=function(a){var b=false,c=0,d=null,e=null,h=0,i=0,j;while(a.length-i>=3){var k=f.aac.parseType(a,i);switch(k){case”timed-metadata”:if(a.length-i<10){b=true;break}h=f.aac.parseId3TagSize(a,i);if(h>a.length){b=true;break}if(e===null){j=a.subarray(i,i+h);e=f.aac.parseAacTimestamp(j)}i+=h;break;case”audio”:if(a.length-i<7){b=true;break}h=f.aac.parseAdtsSize(a,i);if(h>a.length){b=true;break}if(d===null){j=a.subarray(i,i+h);d=f.aac.parseSampleRate(j)}c++;i+=h;break;default:i++;break}if(b){return null}}if(d===null||e===null){return null}var l=g/d;var m={audio:[{type:”audio”,dts:e,pts:e},{type:”audio”,dts:e+c*1024*l,pts:e+c*1024*l}]};return m};var p=function(a){var b={pid:null,table:null};var c={};k(a,b);for(var e in b.table){if(b.table.hasOwnProperty(e)){var f=b.table[e];switch(f){case d.H264_STREAM_TYPE:c.video=[];m(a,b,c);if(c.video.length===0){delete c.video}break;case d.ADTS_STREAM_TYPE:c.audio=[];l(a,b,c);if(c.audio.length===0){delete c.audio}break;default:break}}}return c};var q=function(a,b){var c=j(a);var d;if(c){d=o(a)}else{d=p(a)}if(!d||!d.audio&&!d.video){return null}n(d,b);return d};b.exports={inspect:q}},{“../aac/probe.js”:40,”../m2ts/probe.js”:53,”../m2ts/stream-types.js”:54,”../m2ts/timestamp-rollover-stream.js”:55}],61:[function(a,b,c){var d=9e4,e,f,g,h,i,j;e=function(a){return a*d};f=function(a,b){return a*b};g=function(a){return a/d};h=function(a,b){return a/b};i=function(a,b){return e(h(a,b))};j=function(a,b){return f(g(a),b)};b.exports={secondsToVideoTs:e,secondsToAudioTs:f,videoTsToSeconds:g,audioTsToSeconds:h,audioTsToVideoTs:i,videoTsToAudioTs:j}},{}],62:[function(a,b,c){“use strict”;var d;d=function(a){var b=a.byteLength,c=0,d=0;this.length=function(){return 8*b};this.bitsAvailable=function(){return 8*b+d};this.loadWord=function(){var e=a.byteLength-b,f=new Uint8Array(4),g=Math.min(4,b);if(g===0){throw new Error(“no bytes available”)}f.set(a.subarray(e,e+g));c=new DataView(f.buffer).getUint32(0);d=g*8;b-=g};this.skipBits=function(a){var e;if(d>a){c<<=a;d-=a}else{a-=d;e=Math.floor(a/8);a-=e*8;b-=e;this.loadWord();c<<=a;d-=a}};this.readBits=function(a){var e=Math.min(d,a),f=c>>>32-e;d-=e;if(d>0){c<<=e}else if(b>0){this.loadWord()}e=a-e;if(e>0){return f<<e|this.readBits(e)}return f};this.skipLeadingZeros=function(){var a;for(a=0;a<d;++a){if((c&2147483648>>>a)!==0){c<<=a;d-=a;return a}}this.loadWord();return a+this.skipLeadingZeros()};this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())};this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())};this.readUnsignedExpGolomb=function(){var a=this.skipLeadingZeros();return this.readBits(a+1)-1};this.readExpGolomb=function(){var a=this.readUnsignedExpGolomb();if(1&a){return 1+a>>>1}return-1*(a>>>1)};this.readBoolean=function(){return this.readBits(1)===1};this.readUnsignedByte=function(){return this.readBits(8)};this.loadWord()};b.exports=d},{}],63:[function(a,b,c){“use strict”;var d=function(){this.init=function(){var a={};this.on=function(b,c){if(!a[b]){a[b]=[]}a[b]=a[b].concat(c)};this.off=function(b,c){var d;if(!a[b]){return false}d=a[b].indexOf(c);a[b]=a[b].slice();a[b].splice(d,1);return d>-1};this.trigger=function(b){var c,d,e,f;c=a[b];if(!c){return}if(arguments.length===2){e=c.length;for(d=0;d<e;++d){c[d].call(this,arguments[1])}}else{f=[];d=arguments.length;for(d=1;d<arguments.length;++d){f.push(arguments[d])}e=c.length;for(d=0;d<e;++d){c[d].apply(this,f)}}};this.dispose=function(){a={}}}};d.prototype.pipe=function(a){this.on(“data”,function(b){a.push(b)});this.on(“done”,function(b){a.flush(b)});return a};d.prototype.push=function(a){this.trigger(“data”,a)};d.prototype.flush=function(a){this.trigger(“done”,a)};b.exports=d},{}],64:[function(a,b,c){“use strict”;var d;b.exports=function e(a){var b=d[a.byteLength%16||0],c=new Uint8Array(a.byteLength+b.length);c.set(a);c.set(b,a.byteLength);return c};d=[[16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16],[15,15,15,15,15,15,15,15,15,15,15,15,15,15,15],[14,14,14,14,14,14,14,14,14,14,14,14,14,14],[13,13,13,13,13,13,13,13,13,13,13,13,13],[12,12,12,12,12,12,12,12,12,12,12,12],[11,11,11,11,11,11,11,11,11,11,11],[10,10,10,10,10,10,10,10,10,10],[9,9,9,9,9,9,9,9,9],[8,8,8,8,8,8,8,8],[7,7,7,7,7,7,7],[6,6,6,6,6,6],[5,5,5,5,5],[4,4,4,4],[3,3,3],[2,2],[1]]},{}],65:[function(a,b,c){“use strict”;c.pad=a(“./pad.js”);c.unpad=a(“./unpad.js”)},{“./pad.js”:64,”./unpad.js”:66}],66:[function(a,b,c){“use strict”;b.exports=function d(a){return a.subarray(0,a.byteLength-a[a.byteLength-1])}},{}],67:[function(a,b,d){(function(a){var e={buildAbsoluteURL:function(a,b){b=b.trim();if(/^[a-z]+:/i.test(b)){return b}var c=null;var d=null;var f=/^([^#]*)(.*)$/.exec(b);if(f){d=f[2];b=f[1]}var g=/^([^\?]*)(.*)$/.exec(b);if(g){c=g[2];b=g[1]}var h=/^([^#]*)(.*)$/.exec(a);if(h){a=h[1]}var i=/^([^\?]*)(.*)$/.exec(a);if(i){a=i[1]}var j=/^(([a-z]+:)?\/\/[^:\/]+(:[0-9]+)?)?(\/?.*)$/i.exec(a);if(!j){throw new Error(“Error trying to parse base URL.”)}var k=j[2]||””;var l=j[1]||””;var m=j[4];if(m.indexOf(“/”)!==0&&l!==””){m=”/”+m}var n=null;if(/^\/\//.test(b)){n=k+”//”+e.buildAbsolutePath(“”,b.substring(2))}else if(/^\//.test(b)){n=l+”/”+e.buildAbsolutePath(“”,b.substring(1))}else{n=e.buildAbsolutePath(l+m,b)}if(c){n+=c}if(d){n+=d}return n},buildAbsolutePath:function(a,b){var c=b;var d,e=””,f=a.replace(/[^\/]*$/,c.replace(/(\/|^)(?:\.?\/+)+/g,”$1″));for(var g,h=0;g=f.indexOf(“/../”,h),g>-1;h=g+d){d=/^\/(?:\.\.\/)*/.exec(f.slice(g))[0].length;e=(e+f.substring(h,g)).replace(new RegExp(“(?:\\/+[^\\/]*){0,”+(d-1)/3+”}$”),”/”)}return e+f.substr(h)}};if(typeof d===”object”&&typeof b===”object”)b.exports=e;else if(typeof c===”function”&&c.amd)c([],function(){return e});else if(typeof d===”object”)d[“URLToolkit”]=e;else a[“URLToolkit”]=e})(this)},{}],68:[function(b,c,d){(function(e){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});function f(a){return a&&a.__esModule?a:{“default”:a}}var g=b(“global/window”);var h=f(g);var i=typeof a!==”undefined”?a[“videojs”]:typeof e!==”undefined”?e[“videojs”]:null;var j=f(i);var k=function n(a){Object.defineProperties(a.frame,{id:{get:function b(){j[“default”].log.warn(“cue.frame.id is deprecated. Use cue.value.key instead.”);return a.value.key}},value:{get:function c(){j[“default”].log.warn(“cue.frame.value is deprecated. Use cue.value.data instead.”);return a.value.data}},privateData:{get:function d(){j[“default”].log.warn(“cue.frame.privateData is deprecated. Use cue.value.data instead.”);return a.value.data}}})};var l=function o(a){var b=undefined;if(isNaN(a)||Math.abs(a)===Infinity){b=Number.MAX_VALUE}else{b=a}return b};var m=function p(a,b,c){var d=h[“default”].WebKitDataCue||h[“default”].VTTCue;if(b){b.forEach(function(a){var b=a.stream;this.inbandTextTracks_[b].addCue(new d(a.startTime+this.timestampOffset,a.endTime+this.timestampOffset,a.text))},a)}if(c){(function(){var b=l(a.mediaSource_.duration);c.forEach(function(a){var b=a.cueTime+this.timestampOffset;a.frames.forEach(function(a){var c=new d(b,b,a.value||a.url||a.data||””);c.frame=a;c.value=a;k(c);this.metadataTrack_.addCue(c)},this)},a);if(a.metadataTrack_&&a.metadataTrack_.cues&&a.metadataTrack_.cues.length){(function(){var c=a.metadataTrack_.cues;var d=[];for(var e=0;e<c.length;e++){if(c[e]){d.push(c[e])}}var f=d.reduce(function(a,b){var c=a[b.startTime]||[];c.push(b);a[b.startTime]=c;return a},{});var g=Object.keys(f).sort(function(a,b){return Number(a)-Number(b)});g.forEach(function(a,c){var d=f[a];var e=Number(g[c+1])||b;d.forEach(function(a){a.endTime=e})})})()}})()}};d[“default”]={addTextTrackData:m,durationOfVideo:l};c.exports=d[“default”]}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{“global/window”:31}],69:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});var d=function h(a){return/mp4a\.\d+.\d+/i.test(a)};var e=function i(a){return/avc1\.[\da-f]+/i.test(a)};var f=function j(a){var b={type:””,parameters:{}};var c=a.trim().split(“;”);b.type=c.shift().trim();c.forEach(function(a){var c=a.trim().split(“=”);if(c.length>1){var d=c[0].replace(/”/g,””).trim();var e=c[1].replace(/”/g,””).trim();b.parameters[d]=e}});return b};var g=function k(a){return a.map(function(a){return a.replace(/avc1\.(\d+)\.(\d+)/i,function(a,b,c){var d=(“00″+Number(b).toString(16)).slice(-2);var e=(“00″+Number(c).toString(16)).slice(-2);return”avc1.”+d+”00″+e})})};c[“default”]={isAudioCodec:d,parseContentType:f,isVideoCodec:e,translateLegacyCodecs:g};b.exports=c[“default”]},{}],70:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});var d=function e(a,b,c){var d=b.player_;if(c.captions&&c.captions.length){if(!a.inbandTextTracks_){a.inbandTextTracks_={}}for(var e in c.captionStreams){if(!a.inbandTextTracks_[e]){d.tech_.trigger({type:”usage”,name:”hls-608″});var f=d.textTracks().getTrackById(e);if(f){a.inbandTextTracks_[e]=f}else{a.inbandTextTracks_[e]=d.addRemoteTextTrack({kind:”captions”,id:e,label:e},false).track}}}}if(c.metadata&&c.metadata.length&&!a.metadataTrack_){a.metadataTrack_=d.addRemoteTextTrack({kind:”metadata”,label:”Timed Metadata”},false).track;a.metadataTrack_.inBandMetadataTrackDispatchType=c.metadata.dispatchType}};c[“default”]=d;b.exports=c[“default”]},{}],71:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});var d={TIME_BETWEEN_CHUNKS:1,BYTES_PER_CHUNK:1024*32};c[“default”]=d;b.exports=c[“default”]},{}],72:[function(b,c,d){(function(e){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();var g=function w(a,b,c){var d=true;a:while(d){var e=a,f=b,g=c;d=false;if(e===null)e=Function.prototype;var h=Object.getOwnPropertyDescriptor(e,f);if(h===undefined){var i=Object.getPrototypeOf(e);if(i===null){return undefined}else{a=i;b=f;c=g;d=true;h=i=undefined;continue a}}else if(“value”in h){return h.value}else{var j=h.get;if(j===undefined){return undefined}return j.call(g)}}};function h(a){return a&&a.__esModule?a:{“default”:a}}function i(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}function j(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b}var k=b(“global/document”);var l=h(k);var m=typeof a!==”undefined”?a[“videojs”]:typeof e!==”undefined”?e[“videojs”]:null;var n=h(m);var o=b(“./flash-source-buffer”);var p=h(o);var q=b(“./flash-constants”);var r=h(q);var s=b(“./codec-utils”);var t=function(a){j(b,a);function b(){var a=this;i(this,b);g(Object.getPrototypeOf(b.prototype),”constructor”,this).call(this);this.sourceBuffers=[];this.readyState=”closed”;this.on([“sourceopen”,”webkitsourceopen”],function(b){a.swfObj=l[“default”].getElementById(b.swfId);a.player_=(0,n[“default”])(a.swfObj.parentNode);a.tech_=a.swfObj.tech;a.readyState=”open”;a.tech_.on(“seeking”,function(){var b=a.sourceBuffers.length;while(b–){a.sourceBuffers[b].abort()}});if(a.swfObj){a.swfObj.vjs_load()}})}f(b,[{key:”addSeekableRange_”,value:function c(){}},{key:”addSourceBuffer”,value:function d(a){var b=(0,s.parseContentType)(a);var c=undefined;if(b.type===”video/mp2t”||b.type===”audio/mp2t”){c=new p[“default”](this)}else{throw new Error(“NotSupportedError (Video.js)”)}this.sourceBuffers.push(c);return c}},{key:”endOfStream”,value:function e(a){if(a===”network”){this.tech_.error(2)}else if(a===”decode”){this.tech_.error(3)}if(this.readyState!==”ended”){this.readyState=”ended”;this.swfObj.vjs_endOfStream()}}}]);return b}(n[“default”].EventTarget);d[“default”]=t;try{Object.defineProperty(t.prototype,”duration”,{get:function x(){if(!this.swfObj){return NaN}return this.swfObj.vjs_getProperty(“duration”)},set:function y(a){var b=undefined;var c=this.swfObj.vjs_getProperty(“duration”);this.swfObj.vjs_setProperty(“duration”,a);if(a<c){for(b=0;b<this.sourceBuffers.length;b++){this.sourceBuffers[b].remove(a,c)}}return a}})}catch(u){t.prototype.duration=NaN}for(var v in r[“default”]){t[v]=r[“default”][v]}c.exports=d[“default”]}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{“./codec-utils”:69,”./flash-constants”:71,”./flash-source-buffer”:73,”global/document”:30}],73:[function(b,c,d){(function(e){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();var g=function F(a,b,c){var d=true;a:while(d){var e=a,f=b,g=c;d=false;if(e===null)e=Function.prototype;var h=Object.getOwnPropertyDescriptor(e,f);if(h===undefined){var i=Object.getPrototypeOf(e);if(i===null){return undefined}else{a=i;b=f;c=g;d=true;h=i=undefined;continue a}}else if(“value”in h){return h.value}else{var j=h.get;if(j===undefined){return undefined}return j.call(g)}}};function h(a){return a&&a.__esModule?a:{“default”:a}}function i(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}function j(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b}var k=b(“global/window”);var l=h(k);var m=typeof a!==”undefined”?a[“videojs”]:typeof e!==”undefined”?e[“videojs”]:null;var n=h(m);var o=b(“mux.js/lib/flv”);var p=h(o);var q=b(“./remove-cues-from-track”);var r=h(q);var s=b(“./create-text-tracks-if-necessary”);var t=h(s);var u=b(“./add-text-track-data”);var v=b(“./flash-transmuxer-worker”);var w=h(v);var x=b(“webworkify”);var y=h(x);var z=b(“./flash-constants”);var A=h(z);var B=function G(a){l[“default”].setTimeout(a,A[“default”].TIME_BETWEEN_CHUNKS)};var C=function H(){return Math.random().toString(36).slice(2,8)};var D=function I(a,b){if(typeof b!==”number”||b<0){b=0}var c=Math.pow(10,b);return Math.round(a*c)/c};var E=function(a){j(b,a);function b(a){var c=this;i(this,b);g(Object.getPrototypeOf(b.prototype),”constructor”,this).call(this);var d=undefined;this.chunkSize_=A[“default”].BYTES_PER_CHUNK;this.buffer_=[];this.bufferSize_=0;this.basePtsOffset_=NaN;this.mediaSource_=a;this.audioBufferEnd_=NaN;this.videoBufferEnd_=NaN;this.updating=false;this.timestampOffset_=0;d=l[“default”].btoa(String.fromCharCode.apply(null,Array.prototype.slice.call(p[“default”].getFlvHeader())));var e=this.mediaSource_.player_.id().replace(/[^a-zA-Z0-9]/g,”_”);this.flashEncodedHeaderName_=”vjs_flashEncodedHeader_”+e+C();this.flashEncodedDataName_=”vjs_flashEncodedData_”+e+C();l[“default”][this.flashEncodedHeaderName_]=function(){delete l[“default”][c.flashEncodedHeaderName_];return d};this.mediaSource_.swfObj.vjs_appendChunkReady(this.flashEncodedHeaderName_);this.transmuxer_=(0,y[“default”])(w[“default”]);this.transmuxer_.postMessage({action:”init”,options:{}});this.transmuxer_.onmessage=function(a){if(a.data.action===”data”){c.receiveBuffer_(a.data.segment)}};this.one(“updateend”,function(){c.mediaSource_.tech_.trigger(“loadedmetadata”)});Object.defineProperty(this,”timestampOffset”,{get:function h(){return this.timestampOffset_},set:function j(a){if(typeof a===”number”&&a>=0){this.timestampOffset_=a;this.mediaSource_.swfObj.vjs_discontinuity();this.basePtsOffset_=NaN;this.audioBufferEnd_=NaN;this.videoBufferEnd_=NaN;this.transmuxer_.postMessage({action:”reset”})}}});Object.defineProperty(this,”buffered”,{get:function k(){if(!this.mediaSource_||!this.mediaSource_.swfObj||!(“vjs_getProperty”in this.mediaSource_.swfObj)){return n[“default”].createTimeRange()}var a=this.mediaSource_.swfObj.vjs_getProperty(“buffered”);if(a&&a.length){a[0][0]=D(a[0][0],3);a[0][1]=D(a[0][1],3)}return n[“default”].createTimeRanges(a)}});this.mediaSource_.player_.on(“seeked”,function(){(0,r[“default”])(0,Infinity,c.metadataTrack_);if(c.inbandTextTracks_){for(var a in c.inbandTextTracks_){(0,r[“default”])(0,Infinity,c.inbandTextTracks_[a])}}});var f=this.onHlsReset_.bind(this);this.mediaSource_.player_.tech_.on(“hls-reset”,f);this.mediaSource_.player_.tech_.hls.on(“dispose”,function(){c.transmuxer_.terminate();c.mediaSource_.player_.tech_.off(“hls-reset”,f)})}f(b,[{key:”appendBuffer”,value:function c(a){var b=undefined;if(this.updating){b=new Error(“SourceBuffer.append() cannot be called “+”while an update is in progress”);b.name=”InvalidStateError”;b.code=11;throw b}this.updating=true;this.mediaSource_.readyState=”open”;this.trigger({type:”update”});this.transmuxer_.postMessage({action:”push”,data:a.buffer,byteOffset:a.byteOffset,byteLength:a.byteLength},[a.buffer]);this.transmuxer_.postMessage({action:”flush”})}},{key:”abort”,value:function d(){this.buffer_=[];this.bufferSize_=0;this.mediaSource_.swfObj.vjs_abort();if(this.updating){this.updating=false;this.trigger({type:”updateend”})}}},{key:”remove”,value:function e(a,b){(0,r[“default”])(a,b,this.metadataTrack_);if(this.inbandTextTracks_){for(var c in this.inbandTextTracks_){(0,r[“default”])(a,b,this.inbandTextTracks_[c])}}this.trigger({type:”update”});this.trigger({type:”updateend”})}},{key:”receiveBuffer_”,value:function h(a){var b=this;(0,t[“default”])(this,this.mediaSource_,a);(0,u.addTextTrackData)(this,a.captions,a.metadata);B(function(){var c=b.convertTagsToData_(a);if(b.buffer_.length===0){B(b.processBuffer_.bind(b))}if(c){b.buffer_.push(c);b.bufferSize_+=c.byteLength}})}},{key:”processBuffer_”,value:function k(){var a=this;var b=A[“default”].BYTES_PER_CHUNK;if(!this.buffer_.length){if(this.updating!==false){this.updating=false;this.trigger({type:”updateend”})}return}var c=this.buffer_[0].subarray(0,b);if(c.byteLength<b||this.buffer_[0].byteLength===b){this.buffer_.shift()}else{this.buffer_[0]=this.buffer_[0].subarray(b)}this.bufferSize_-=c.byteLength;var d=[];var e=c.byteLength;for(var f=0;f<e;f++){d.push(String.fromCharCode(c[f]))}var g=l[“default”].btoa(d.join(“”));l[“default”][this.flashEncodedDataName_]=function(){B(a.processBuffer_.bind(a));delete l[“default”][a.flashEncodedDataName_];return g};this.mediaSource_.swfObj.vjs_appendChunkReady(this.flashEncodedDataName_)}},{key:”convertTagsToData_”,value:function m(a){var b=0;var c=this.mediaSource_.tech_;var d=0;var e=undefined;var f=a.tags.videoTags;var g=a.tags.audioTags;if(isNaN(this.basePtsOffset_)&&(f.length||g.length)){var h=f[0]||{ pts:Infinity};var i=g[0]||{pts:Infinity};this.basePtsOffset_=Math.min(i.pts,h.pts)}if(c.seeking()){this.videoBufferEnd_=NaN;this.audioBufferEnd_=NaN}if(isNaN(this.videoBufferEnd_)){if(c.buffered().length){d=c.buffered().end(0)-this.timestampOffset}if(c.seeking()){d=Math.max(d,c.currentTime()-this.timestampOffset)}d*=1e3;d+=this.basePtsOffset_}else{d=this.videoBufferEnd_+.1}var j=f.length;if(j&&f[j-1].pts>=d){while(–j){var k=f[j];if(k.pts>d){continue}if(k.keyFrame||k.metaDataTag){break}}while(j){var l=f[j-1];if(!l.metaDataTag){break}j–}}var m=f.slice(j);var n=undefined;if(isNaN(this.audioBufferEnd_)){n=d}else{n=this.audioBufferEnd_+.1}if(m.length){n=Math.min(n,m[0].pts)}j=0;while(j<g.length){if(g[j].pts>=n){break}j++}var o=g.slice(j);if(o.length){this.audioBufferEnd_=o[o.length-1].pts}if(m.length){this.videoBufferEnd_=m[m.length-1].pts}var p=this.getOrderedTags_(m,o);if(p.length===0){return}if(p[0].pts<d&&c.seeking()){var q=1/30;var r=c.currentTime();var s=(d-p[0].pts)/1e3;var t=r-s;if(t<q){t=0}try{this.mediaSource_.swfObj.vjs_adjustCurrentTime(t)}catch(u){}}for(var v=0;v<p.length;v++){b+=p[v].bytes.byteLength}e=new Uint8Array(b);for(var v=0,w=0;v<p.length;v++){e.set(p[v].bytes,w);w+=p[v].bytes.byteLength}return e}},{key:”getOrderedTags_”,value:function o(a,b){var c=undefined;var d=[];while(a.length||b.length){if(!a.length){c=b.shift()}else if(!b.length){c=a.shift()}else if(b[0].dts<a[0].dts){c=b.shift()}else{c=a.shift()}d.push(c)}return d}},{key:”onHlsReset_”,value:function q(){this.transmuxer_.postMessage({action:”resetCaptions”})}}]);return b}(n[“default”].EventTarget);d[“default”]=E;c.exports=d[“default”]}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{“./add-text-track-data”:68,”./create-text-tracks-if-necessary”:70,”./flash-constants”:71,”./flash-transmuxer-worker”:74,”./remove-cues-from-track”:76,”global/window”:31,”mux.js/lib/flv”:47,webworkify:80}],74:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();function e(a){return a&&a.__esModule?a:{“default”:a}}function f(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}var g=a(“global/window”);var h=e(g);var i=a(“mux.js/lib/flv”);var j=e(i);var k=function n(a){a.on(“data”,function(a){h[“default”].postMessage({action:”data”,segment:a})});a.on(“done”,function(a){h[“default”].postMessage({action:”done”})})};var l=function(){function a(b){f(this,a);this.options=b||{};this.init()}d(a,[{key:”init”,value:function b(){if(this.transmuxer){this.transmuxer.dispose()}this.transmuxer=new j[“default”].Transmuxer(this.options);k(this.transmuxer)}},{key:”push”,value:function c(a){var b=new Uint8Array(a.data,a.byteOffset,a.byteLength);this.transmuxer.push(b)}},{key:”reset”,value:function e(){this.init()}},{key:”flush”,value:function g(){this.transmuxer.flush()}},{key:”resetCaptions”,value:function h(){this.transmuxer.resetCaptions()}}]);return a}();var m=function o(a){a.onmessage=function(a){if(a.data.action===”init”&&a.data.options){this.messageHandlers=new l(a.data.options);return}if(!this.messageHandlers){this.messageHandlers=new l}if(a.data&&a.data.action&&a.data.action!==”init”){if(this.messageHandlers[a.data.action]){this.messageHandlers[a.data.action](a.data)}}}};c[“default”]=function(a){return new m(a)};b.exports=c[“default”]},{“global/window”:31,”mux.js/lib/flv”:47}],75:[function(b,c,d){(function(e){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();var g=function v(a,b,c){var d=true;a:while(d){var e=a,f=b,g=c;d=false;if(e===null)e=Function.prototype;var h=Object.getOwnPropertyDescriptor(e,f);if(h===undefined){var i=Object.getPrototypeOf(e);if(i===null){return undefined}else{a=i;b=f;c=g;d=true;h=i=undefined;continue a}}else if(“value”in h){return h.value}else{var j=h.get;if(j===undefined){return undefined}return j.call(g)}}};function h(a){return a&&a.__esModule?a:{“default”:a}}function i(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}function j(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b}var k=b(“global/window”);var l=h(k);var m=b(“global/document”);var n=h(m);var o=typeof a!==”undefined”?a[“videojs”]:typeof e!==”undefined”?e[“videojs”]:null;var p=h(o);var q=b(“./virtual-source-buffer”);var r=h(q);var s=b(“./add-text-track-data”);var t=b(“./codec-utils”);var u=function(a){j(b,a);function b(){var a=this;i(this,b);g(Object.getPrototypeOf(b.prototype),”constructor”,this).call(this);var c=undefined;this.nativeMediaSource_=new l[“default”].MediaSource;for(c in this.nativeMediaSource_){if(!(c in b.prototype)&&typeof this.nativeMediaSource_[c]===”function”){this[c]=this.nativeMediaSource_[c].bind(this.nativeMediaSource_)}}this.duration_=NaN;Object.defineProperty(this,”duration”,{get:function d(){if(this.duration_===Infinity){return this.duration_}return this.nativeMediaSource_.duration},set:function e(a){this.duration_=a;if(a!==Infinity){this.nativeMediaSource_.duration=a;return}}});Object.defineProperty(this,”seekable”,{get:function f(){if(this.duration_===Infinity){return p[“default”].createTimeRanges([[0,this.nativeMediaSource_.duration]])}return this.nativeMediaSource_.seekable}});Object.defineProperty(this,”readyState”,{get:function h(){return this.nativeMediaSource_.readyState}});Object.defineProperty(this,”activeSourceBuffers”,{get:function j(){return this.activeSourceBuffers_}});this.sourceBuffers=[];this.activeSourceBuffers_=[];this.updateActiveSourceBuffers_=function(){a.activeSourceBuffers_.length=0;if(a.sourceBuffers.length===1){var b=a.sourceBuffers[0];b.appendAudioInitSegment_=true;b.audioDisabled_=!b.audioCodec_;a.activeSourceBuffers_.push(b);return}var c=false;var d=true;for(var e=0;e<a.player_.audioTracks().length;e++){var f=a.player_.audioTracks()[e];if(f.enabled&&f.kind!==”main”){c=true;d=false;break}}a.sourceBuffers.forEach(function(b){b.appendAudioInitSegment_=true;if(b.videoCodec_&&b.audioCodec_){b.audioDisabled_=c}else if(b.videoCodec_&&!b.audioCodec_){b.audioDisabled_=true;d=false}else if(!b.videoCodec_&&b.audioCodec_){b.audioDisabled_=d;if(d){return}}a.activeSourceBuffers_.push(b)})};this.onPlayerMediachange_=function(){a.sourceBuffers.forEach(function(a){a.appendAudioInitSegment_=true})};this.onHlsReset_=function(){a.sourceBuffers.forEach(function(a){if(a.transmuxer_){a.transmuxer_.postMessage({action:”resetCaptions”})}})};this.onHlsSegmentTimeMapping_=function(b){a.sourceBuffers.forEach(function(a){return a.timeMapping_=b.mapping})};[“sourceopen”,”sourceclose”,”sourceended”].forEach(function(a){this.nativeMediaSource_.addEventListener(a,this.trigger.bind(this))},this);this.on(“sourceopen”,function(b){var c=n[“default”].querySelector(‘[src=”‘+a.url_+'”]’);if(!c){return}a.player_=(0,p[“default”])(c.parentNode);a.player_.tech_.on(“hls-reset”,a.onHlsReset_);a.player_.tech_.on(“hls-segment-time-mapping”,a.onHlsSegmentTimeMapping_);if(a.player_.audioTracks&&a.player_.audioTracks()){a.player_.audioTracks().on(“change”,a.updateActiveSourceBuffers_);a.player_.audioTracks().on(“addtrack”,a.updateActiveSourceBuffers_);a.player_.audioTracks().on(“removetrack”,a.updateActiveSourceBuffers_)}a.player_.on(“mediachange”,a.onPlayerMediachange_)});this.on(“sourceended”,function(b){var c=(0,s.durationOfVideo)(a.duration);for(var d=0;d<a.sourceBuffers.length;d++){var e=a.sourceBuffers[d];var f=e.metadataTrack_&&e.metadataTrack_.cues;if(f&&f.length){f[f.length-1].endTime=c}}});this.on(“sourceclose”,function(a){this.sourceBuffers.forEach(function(a){if(a.transmuxer_){a.transmuxer_.terminate()}});this.sourceBuffers.length=0;if(!this.player_){return}if(this.player_.audioTracks&&this.player_.audioTracks()){this.player_.audioTracks().off(“change”,this.updateActiveSourceBuffers_);this.player_.audioTracks().off(“addtrack”,this.updateActiveSourceBuffers_);this.player_.audioTracks().off(“removetrack”,this.updateActiveSourceBuffers_)}if(this.player_.el_){this.player_.off(“mediachange”,this.onPlayerMediachange_);this.player_.tech_.off(“hls-reset”,this.onHlsReset_);this.player_.tech_.off(“hls-segment-time-mapping”,this.onHlsSegmentTimeMapping_)}})}f(b,[{key:”addSeekableRange_”,value:function c(a,b){var c=undefined;if(this.duration!==Infinity){c=new Error(“MediaSource.addSeekableRange() can only be invoked “+”when the duration is Infinity”);c.name=”InvalidStateError”;c.code=11;throw c}if(b>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration)){this.nativeMediaSource_.duration=b}}},{key:”addSourceBuffer”,value:function d(a){var b=undefined;var c=(0,t.parseContentType)(a);if(/^(video|audio)\/mp2t$/i.test(c.type)){var d=[];if(c.parameters&&c.parameters.codecs){d=c.parameters.codecs.split(“,”);d=(0,t.translateLegacyCodecs)(d);d=d.filter(function(a){return(0,t.isAudioCodec)(a)||(0,t.isVideoCodec)(a)})}if(d.length===0){d=[“avc1.4d400d”,”mp4a.40.2″]}b=new r[“default”](this,d);if(this.sourceBuffers.length!==0){this.sourceBuffers[0].createRealSourceBuffers_();b.createRealSourceBuffers_();this.sourceBuffers[0].audioDisabled_=true}}else{b=this.nativeMediaSource_.addSourceBuffer(a)}this.sourceBuffers.push(b);return b}}]);return b}(p[“default”].EventTarget);d[“default”]=u;c.exports=d[“default”]}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{“./add-text-track-data”:68,”./codec-utils”:69,”./virtual-source-buffer”:79,”global/document”:30,”global/window”:31}],76:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});var d=function e(a,b,c){var d=undefined;var e=undefined;if(!c){return}if(!c.cues){return}d=c.cues.length;while(d–){e=c.cues[d];if(e.startTime<=b&&e.endTime>=a){c.removeCue(e)}}};c[“default”]=d;b.exports=c[“default”]},{}],77:[function(a,b,c){“use strict”;Object.defineProperty(c,”__esModule”,{value:true});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();function e(a){return a&&a.__esModule?a:{“default”:a}}function f(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}var g=a(“global/window”);var h=e(g);var i=a(“mux.js/lib/mp4”);var j=e(i);var k=function n(a){a.on(“data”,function(a){var b=a.initSegment;a.initSegment={data:b.buffer,byteOffset:b.byteOffset,byteLength:b.byteLength};var c=a.data;a.data=c.buffer;h[“default”].postMessage({action:”data”,segment:a,byteOffset:c.byteOffset,byteLength:c.byteLength},[a.data])});if(a.captionStream){a.captionStream.on(“data”,function(a){h[“default”].postMessage({action:”caption”,data:a})})}a.on(“done”,function(a){h[“default”].postMessage({action:”done”})});a.on(“gopInfo”,function(a){h[“default”].postMessage({action:”gopInfo”,gopInfo:a})})};var l=function(){function a(b){f(this,a);this.options=b||{};this.init()}d(a,[{key:”init”,value:function b(){if(this.transmuxer){this.transmuxer.dispose()}this.transmuxer=new j[“default”].Transmuxer(this.options);k(this.transmuxer)}},{key:”push”,value:function c(a){var b=new Uint8Array(a.data,a.byteOffset,a.byteLength);this.transmuxer.push(b)}},{key:”reset”,value:function e(){this.init()}},{key:”setTimestampOffset”,value:function g(a){var b=a.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(b*9e4))}},{key:”setAudioAppendStart”,value:function h(a){this.transmuxer.setAudioAppendStart(Math.ceil(a.appendStart*9e4))}},{key:”flush”,value:function i(a){this.transmuxer.flush()}},{key:”resetCaptions”,value:function l(){this.transmuxer.resetCaptions()}},{key:”alignGopsWith”,value:function m(a){this.transmuxer.alignGopsWith(a.gopsToAlignWith.slice())}}]);return a}();var m=function o(a){a.onmessage=function(a){if(a.data.action===”init”&&a.data.options){this.messageHandlers=new l(a.data.options);return}if(!this.messageHandlers){this.messageHandlers=new l}if(a.data&&a.data.action&&a.data.action!==”init”){if(this.messageHandlers[a.data.action]){this.messageHandlers[a.data.action](a.data)}}}};c[“default”]=function(a){return new m(a)};b.exports=c[“default”]},{“global/window”:31,”mux.js/lib/mp4″:56}],78:[function(b,c,d){(function(c){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});function e(a){return a&&a.__esModule?a:{“default”:a}}var f=b(“global/window”);var g=e(f);var h=b(“./flash-media-source”);var i=e(h);var j=b(“./html-media-source”);var k=e(j);var l=typeof a!==”undefined”?a[“videojs”]:typeof c!==”undefined”?c[“videojs”]:null;var m=e(l);var n=0;var o={mode:”auto”};m[“default”].mediaSources={};var p=function t(a,b){var c=m[“default”].mediaSources[a];if(c){c.trigger({type:”sourceopen”,swfId:b})}else{throw new Error(“Media Source not found (Video.js)”)}};var q=function u(){return!!g[“default”].MediaSource&&!!g[“default”].MediaSource.isTypeSupported&&g[“default”].MediaSource.isTypeSupported(‘video/mp4;codecs=”avc1.4d400d,mp4a.40.2″‘)};var r=function v(a){var b=m[“default”].mergeOptions(o,a);this.MediaSource={open:p,supportsNativeMediaSources:q};if(b.mode===”html5″||b.mode===”auto”&&q()){return new k[“default”]}else if(m[“default”].getTech(“Flash”)){return new i[“default”]}throw new Error(“Cannot use Flash or Html5 to create a MediaSource for this video”)};d.MediaSource=r;r.open=p;r.supportsNativeMediaSources=q;var s={createObjectURL:function w(a){var b=”blob:vjs-media-source/”;var c=undefined;if(a instanceof k[“default”]){c=g[“default”].URL.createObjectURL(a.nativeMediaSource_);a.url_=c;return c}if(!(a instanceof i[“default”])){c=g[“default”].URL.createObjectURL(a);a.url_=c;return c}c=b+n;n++;m[“default”].mediaSources[c]=a;return c}};d.URL=s;m[“default”].MediaSource=r;m[“default”].URL=s}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{“./flash-media-source”:72,”./html-media-source”:75,”global/window”:31}],79:[function(b,c,d){(function(c){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();var f=function A(a,b,c){var d=true;a:while(d){var e=a,f=b,g=c;d=false;if(e===null)e=Function.prototype;var h=Object.getOwnPropertyDescriptor(e,f);if(h===undefined){var i=Object.getPrototypeOf(e);if(i===null){return undefined}else{a=i;b=f;c=g;d=true;h=i=undefined;continue a}}else if(“value”in h){return h.value}else{var j=h.get;if(j===undefined){return undefined}return j.call(g)}}};function g(a){return a&&a.__esModule?a:{“default”:a}}function h(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}function i(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b}var j=typeof a!==”undefined”?a[“videojs”]:typeof c!==”undefined”?c[“videojs”]:null;var k=g(j);var l=b(“./create-text-tracks-if-necessary”);var m=g(l);var n=b(“./remove-cues-from-track”);var o=g(n);var p=b(“./add-text-track-data”);var q=b(“webworkify”);var r=g(q);var s=b(“./transmuxer-worker”);var t=g(s);var u=b(“./codec-utils”);var v=function B(a,b){var c=a.addSourceBuffer(b);var d=Object.create(null);d.updating=false;d.realBuffer_=c;var e=function(a){if(typeof c[a]===”function”){d[a]=function(){return c[a].apply(c,arguments)}}else if(typeof d[a]===”undefined”){Object.defineProperty(d,a,{get:function b(){return c[a]},set:function e(b){return c[a]=b}})}};for(var f in c){e(f)}return d};var w=function C(a,b,c){if(!b||!a.length){return[]}var d=Math.ceil((b.currentTime()-c+3)*9e4);var e=undefined;for(e=0;e<a.length;e++){if(a[e].pts>d){break}}return a.slice(e)};d.gopsSafeToAlignWith=w;var x=function D(a,b,c){if(!b.length){return a}if(c){return b.slice()}var d=b[0].pts;var e=0;for(e;e<a.length;e++){if(a[e].pts>=d){break}}return a.slice(0,e).concat(b)};d.updateGopBuffer=x;var y=function E(a,b,c,d){var e=Math.ceil((b-d)*9e4);var f=Math.ceil((c-d)*9e4);var g=a.slice();var h=a.length;while(h–){if(a[h].pts<=f){break}}if(h===-1){return g}var i=h+1;while(i–){if(a[i].pts<=e){break}}i=Math.max(i,0);g.splice(i,h-i+1);return g};d.removeGopBuffer=y;var z=function(a){i(b,a);function b(a,c){var d=this;h(this,b);f(Object.getPrototypeOf(b.prototype),”constructor”,this).call(this,k[“default”].EventTarget);this.timestampOffset_=0;this.pendingBuffers_=[];this.bufferUpdating_=false;this.mediaSource_=a;this.codecs_=c;this.audioCodec_=null;this.videoCodec_=null;this.audioDisabled_=false;this.appendAudioInitSegment_=true;this.gopBuffer_=[];this.timeMapping_=0;this.safeAppend_=k[“default”].browser.IE_VERSION>=11;var e={remux:false,alignGopsAtEnd:this.safeAppend_};this.codecs_.forEach(function(a){if((0,u.isAudioCodec)(a)){d.audioCodec_=a}else if((0,u.isVideoCodec)(a)){d.videoCodec_=a}});this.transmuxer_=(0,r[“default”])(t[“default”]);this.transmuxer_.postMessage({action:”init”,options:e});this.transmuxer_.onmessage=function(a){if(a.data.action===”data”){return d.data_(a)}if(a.data.action===”done”){return d.done_(a)}if(a.data.action===”gopInfo”){return d.appendGopInfo_(a)}};Object.defineProperty(this,”timestampOffset”,{get:function g(){return this.timestampOffset_},set:function i(a){if(typeof a===”number”&&a>=0){this.timestampOffset_=a;this.appendAudioInitSegment_=true;this.gopBuffer_.length=0;this.timeMapping_=0;this.transmuxer_.postMessage({action:”setTimestampOffset”,timestampOffset:a})}}});Object.defineProperty(this,”appendWindowStart”,{get:function j(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart},set:function l(a){if(this.videoBuffer_){this.videoBuffer_.appendWindowStart=a}if(this.audioBuffer_){this.audioBuffer_.appendWindowStart=a}}});Object.defineProperty(this,”updating”,{get:function m(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating)}});Object.defineProperty(this,”buffered”,{get:function n(){var a=null;var b=null;var c=0;var d=[];var e=[];if(!this.videoBuffer_&&!this.audioBuffer_){return k[“default”].createTimeRange()}if(!this.videoBuffer_){return this.audioBuffer_.buffered}if(!this.audioBuffer_){return this.videoBuffer_.buffered}if(this.audioDisabled_){return this.videoBuffer_.buffered}if(this.videoBuffer_.buffered.length===0&&this.audioBuffer_.buffered.length===0){return k[“default”].createTimeRange()}var f=this.videoBuffer_.buffered;var g=this.audioBuffer_.buffered;var h=f.length;while(h–){d.push({time:f.start(h),type:”start”});d.push({time:f.end(h),type:”end”})}h=g.length;while(h–){d.push({time:g.start(h),type:”start”});d.push({time:g.end(h),type:”end”})}d.sort(function(a,b){return a.time-b.time});for(h=0;h<d.length;h++){if(d[h].type===”start”){c++;if(c===2){a=d[h].time}}else if(d[h].type===”end”){c–;if(c===1){b=d[h].time}}if(a!==null&&b!==null){e.push([a,b]);a=null;b=null}}return k[“default”].createTimeRanges(e)}})}e(b,[{key:”data_”,value:function c(a){var b=a.data.segment;b.data=new Uint8Array(b.data,a.data.byteOffset,a.data.byteLength);b.initSegment=new Uint8Array(b.initSegment.data,b.initSegment.byteOffset,b.initSegment.byteLength);(0,m[“default”])(this,this.mediaSource_,b);this.pendingBuffers_.push(b);return}},{key:”done_”,value:function d(a){if(this.mediaSource_.readyState===”closed”){this.pendingBuffers_.length=0;return}this.processPendingSegments_();return}},{key:”createRealSourceBuffers_”,value:function g(){var a=this;var b=[“audio”,”video”];b.forEach(function(c){if(!a[c+”Codec_”]){return}if(a[c+”Buffer_”]){return}var d=null;if(a.mediaSource_[c+”Buffer_”]){d=a.mediaSource_[c+”Buffer_”];d.updating=false}else{var e=c+”Codec_”;var f=c+’/mp4;codecs=”‘+a[e]+'”‘;d=v(a.mediaSource_.nativeMediaSource_,f);a.mediaSource_[c+”Buffer_”]=d}a[c+”Buffer_”]=d;[“update”,”updatestart”,”updateend”].forEach(function(e){d.addEventListener(e,function(){if(c===”audio”&&a.audioDisabled_){return}if(e===”updateend”){a[c+”Buffer_”].updating=false}var d=b.every(function(b){if(b===”audio”&&a.audioDisabled_){return true}if(c!==b&&a[b+”Buffer_”]&&a[b+”Buffer_”].updating){return false}return true});if(d){return a.trigger(e)}})})})}},{key:”appendBuffer”,value:function j(a){this.bufferUpdating_=true;if(this.audioBuffer_&&this.audioBuffer_.buffered.length){var b=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:”setAudioAppendStart”,appendStart:b.end(b.length-1)})}if(this.videoBuffer_){this.transmuxer_.postMessage({action:”alignGopsWith”,gopsToAlignWith:w(this.gopBuffer_,this.mediaSource_.player_,this.timeMapping_)})}this.transmuxer_.postMessage({action:”push”,data:a.buffer,byteOffset:a.byteOffset,byteLength:a.byteLength},[a.buffer]);this.transmuxer_.postMessage({action:”flush”})}},{key:”appendGopInfo_”,value:function l(a){this.gopBuffer_=x(this.gopBuffer_,a.data.gopInfo,this.safeAppend_)}},{key:”remove”,value:function n(a,b){if(this.videoBuffer_){this.videoBuffer_.updating=true;this.videoBuffer_.remove(a,b);this.gopBuffer_=y(this.gopBuffer_,a,b,this.timeMapping_)}if(!this.audioDisabled_&&this.audioBuffer_){this.audioBuffer_.updating=true;this.audioBuffer_.remove(a,b)}(0,o[“default”])(a,b,this.metadataTrack_);if(this.inbandTextTracks_){for(var c in this.inbandTextTracks_){(0,o[“default”])(a,b,this.inbandTextTracks_[c])}}}},{key:”processPendingSegments_”,value:function q(){var a={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};a=this.pendingBuffers_.reduce(function(a,b){var c=b.type;var d=b.data;var e=b.initSegment;a[c].segments.push(d);a[c].bytes+=d.byteLength;a[c].initSegment=e;if(b.captions){a.captions=a.captions.concat(b.captions)}if(b.info){a[c].info=b.info}if(b.metadata){a.metadata=a.metadata.concat(b.metadata)}return a},a);if(!this.videoBuffer_&&!this.audioBuffer_){if(a.video.bytes===0){this.videoCodec_=null}if(a.audio.bytes===0){this.audioCodec_=null}this.createRealSourceBuffers_()}if(a.audio.info){this.mediaSource_.trigger({type:”audioinfo”,info:a.audio.info})}if(a.video.info){this.mediaSource_.trigger({type:”videoinfo”,info:a.video.info})}if(this.appendAudioInitSegment_){if(!this.audioDisabled_&&this.audioBuffer_){a.audio.segments.unshift(a.audio.initSegment);a.audio.bytes+=a.audio.initSegment.byteLength}this.appendAudioInitSegment_=false}var b=false;if(this.videoBuffer_&&a.video.bytes){a.video.segments.unshift(a.video.initSegment);a.video.bytes+=a.video.initSegment.byteLength;this.concatAndAppendSegments_(a.video,this.videoBuffer_);(0,p.addTextTrackData)(this,a.captions,a.metadata)}else if(this.videoBuffer_&&(this.audioDisabled_||!this.audioBuffer_)){b=true}if(!this.audioDisabled_&&this.audioBuffer_){this.concatAndAppendSegments_(a.audio,this.audioBuffer_)}this.pendingBuffers_.length=0;if(b){this.trigger(“updateend”)}this.bufferUpdating_=false}},{key:”concatAndAppendSegments_”,value:function s(a,b){var c=0;var d=undefined;if(a.bytes){d=new Uint8Array(a.bytes);a.segments.forEach(function(a){d.set(a,c);c+=a.byteLength});try{b.updating=true;b.appendBuffer(d)}catch(e){if(this.mediaSource_.player_){this.mediaSource_.player_.error({code:-3,type:”APPEND_BUFFER_ERR”,message:e.message,originalError:e})}}}}},{key:”abort”,value:function z(){if(this.videoBuffer_){this.videoBuffer_.abort()}if(!this.audioDisabled_&&this.audioBuffer_){this.audioBuffer_.abort()}if(this.transmuxer_){this.transmuxer_.postMessage({action:”reset”})}this.pendingBuffers_.length=0;this.bufferUpdating_=false}}]);return b}(k[“default”].EventTarget);d[“default”]=z}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{“./add-text-track-data”:68,”./codec-utils”:69,”./create-text-tracks-if-necessary”:70,”./remove-cues-from-track”:76,”./transmuxer-worker”:77,webworkify:80}],80:[function(b,c,d){var e=arguments[3];var f=arguments[4];var g=arguments[5];var h=JSON.stringify;c.exports=function(b){var c=[];var d;var i=Object.keys(g);for(var j=0,k=i.length;j<k;j++){var l=i[j];if(g[l].exports===b){d=l;break}}if(!d){d=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var m={};for(var j=0,k=i.length;j<k;j++){var l=i[j];m[l]=l}f[d]=[Function([“require”,”module”,”exports”],”(“+b+”)(self)”),m]}var n=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var o={};o[d]=d;f[n]=[Function([“require”],”require(“+h(d)+”)(self)”),o];var p=”(“+e+”)({“+Object.keys(f).map(function(a){return h(a)+”:[“+f[a][0]+”,”+h(f[a][1])+”]”}).join(“,”)+”},{},[“+h(n)+”])”;var q=a.URL||a.webkitURL||a.mozURL||a.msURL;return new Worker(q.createObjectURL(new Blob([p],{type:”text/javascript”})))}},{}],81:[function(b,c,d){(function(e){“use strict”;Object.defineProperty(d,”__esModule”,{value:true});var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||false;d.configurable=true;if(“value”in d)d.writable=true;Object.defineProperty(a,d.key,d)}}return function(b,c,d){if(c)a(b.prototype,c);if(d)a(b,d);return b}}();var g=function Y(a,b,c){var d=true;a:while(d){var e=a,f=b,g=c;d=false;if(e===null)e=Function.prototype;var h=Object.getOwnPropertyDescriptor(e,f);if(h===undefined){var i=Object.getPrototypeOf(e);if(i===null){return undefined}else{a=i;b=f;c=g;d=true;h=i=undefined;continue a}}else if(“value”in h){return h.value}else{var j=h.get;if(j===undefined){return undefined}return j.call(g)}}};function h(a){return a&&a.__esModule?a:{“default”:a}}function i(a,b){if(!(a instanceof b)){throw new TypeError(“Cannot call a class as a function”)}}function j(a,b){if(typeof b!==”function”&&b!==null){throw new TypeError(“Super expression must either be null or a function, not “+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:false,writable:true,configurable:true}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b}var k=b(“global/document”);var l=h(k);var m=b(“./playlist-loader”);var n=h(m);var o=b(“./playlist”);var p=h(o);var q=b(“./xhr”);var r=h(q);var s=b(“aes-decrypter”);var t=b(“./bin-utils”);var u=h(t);var v=b(“./ranges”);var w=b(“videojs-contrib-media-sources”);var x=b(“m3u8-parser”);var y=h(x);var z=typeof a!==”undefined”?a[“videojs”]:typeof e!==”undefined”?e[“videojs”]:null;var A=h(z);var B=b(“./master-playlist-controller”);var C=b(“./config”);var D=h(C);var E=b(“./rendition-mixin”);var F=h(E);var G=b(“global/window”);var H=h(G);var I=b(“./playback-watcher”);var J=h(I);var K=b(“./reload-source-on-error”);var L=h(K);var M=b(“./playlist-selectors.js”);var N={PlaylistLoader:n[“default”],Playlist:p[“default”],Decrypter:s.Decrypter,AsyncStream:s.AsyncStream,decrypt:s.decrypt,utils:u[“default”],STANDARD_PLAYLIST_SELECTOR:M.lastBandwidthSelector,INITIAL_PLAYLIST_SELECTOR:M.lowestBitrateCompatibleVariantSelector,comparePlaylistBandwidth:M.comparePlaylistBandwidth,comparePlaylistResolution:M.comparePlaylistResolution,xhr:(0,r[“default”])()};var O=4194304;[“GOAL_BUFFER_LENGTH”,”MAX_GOAL_BUFFER_LENGTH”,”GOAL_BUFFER_LENGTH_RATE”,”BUFFER_LOW_WATER_LINE”,”MAX_BUFFER_LOW_WATER_LINE”,”BUFFER_LOW_WATER_LINE_RATE”,”BANDWIDTH_VARIANCE”].forEach(function(a){Object.defineProperty(N,a,{get:function b(){A[“default”].log.warn(“using Hls.”+a+” is UNSAFE be sure you know what you are doing”);return D[“default”][a]},set:function c(b){A[“default”].log.warn(“using Hls.”+a+” is UNSAFE be sure you know what you are doing”);if(typeof b!==”number”||b<0){A[“default”].log.warn(“value of Hls.”+a+” must be greater than or equal to 0″);return}D[“default”][a]=b}})});var P=function Z(a){var b=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i;if(b.test(a)){return”hls”}var c=/^application\/dash\+xml/i;if(c.test(a)){return”dash”}return null};d.simpleTypeFromSourceType=P;var Q=function $(a,b){var c=b.media();var d=-1;for(var e=0;e<a.length;e++){if(a[e].id===c.uri){d=e;break}}a.selectedIndex_=d;a.trigger({selectedIndex:d,type:”change”})};var R=function _(a,b){b.representations().forEach(function(b){a.addQualityLevel(b)});Q(a,b.playlists)};N.canPlaySource=function(){return A[“default”].log.warn(“HLS is no longer a tech. Please remove it from “+”your player’s techOrder.”)};var S=function aa(a,b,c){if(!a){return a}var d={};for(var e in a){d[e]={audioContentType:’audio/mp4; codecs=”‘+c.attributes.CODECS+'”‘,videoContentType:’video/mp4; codecs=”‘+b.attributes.CODECS+'”‘};if(typeof a[e]===”string”){d[e].url=a[e]}}return{keySystems:A[“default”].mergeOptions(a,d)}};var T=function ba(a){if(a.options_.sourceType===”dash”){var b=A[“default”].players[a.tech_.options_.playerId];if(b.eme){b.eme.options=S(a.source_.keySystems,a.playlists.media(),a.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader.media())}}};N.supportsNativeHls=function(){var a=l[“default”].createElement(“video”);if(!A[“default”].getTech(“Html5”).isSupported()){return false}var b=[“application/vnd.apple.mpegurl”,”audio/mpegurl”,”audio/x-mpegurl”,”application/x-mpegurl”,”video/x-mpegurl”,”video/mpegurl”,”application/mpegurl”];return b.some(function(b){return/maybe|probably/i.test(a.canPlayType(b))})}();N.supportsNativeDash=function(){if(!A[“default”].getTech(“Html5”).isSupported()){return false}return/maybe|probably/i.test(l[“default”].createElement(“video”).canPlayType(“application/dash+xml”))}();N.isSupported=function(){return A[“default”].log.warn(“HLS is no longer a tech. Please remove it from “+”your player’s techOrder.”)};var U=A[“default”].getComponent(“Component”);var V=function(a){j(b,a);function b(a,c,d){var e=this;i(this,b);g(Object.getPrototypeOf(b.prototype),”constructor”,this).call(this,c,d.hls);if(c.options_&&c.options_.playerId){var f=(0,A[“default”])(c.options_.playerId);if(!f.hasOwnProperty(“hls”)){Object.defineProperty(f,”hls”,{get:function h(){A[“default”].log.warn(“player.hls is deprecated. Use player.tech_.hls instead.”);c.trigger({type:”usage”,name:”hls-player-access”});return e}})}f.vhs=this;f.dash=this}this.tech_=c;this.source_=a;this.stats={};this.ignoreNextSeekingEvent_=false;this.setOptions_();if(this.options_.overrideNative&&(c.featuresNativeVideoTracks||c.featuresNativeAudioTracks)){throw new Error(“Overriding native HLS requires emulated tracks. “+”See https://git.io/vMpjB”)}this.on(l[“default”],[“fullscreenchange”,”webkitfullscreenchange”,”mozfullscreenchange”,”MSFullscreenChange”],function(a){var b=l[“default”].fullscreenElement||l[“default”].webkitFullscreenElement||l[“default”].mozFullScreenElement||l[“default”].msFullscreenElement;if(b&&b.contains(e.tech_.el())){e.masterPlaylistController_.fastQualityChange_()}});this.on(this.tech_,”seeking”,function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=false;return}this.setCurrentTime(this.tech_.currentTime())});this.on(this.tech_,”error”,function(){if(this.masterPlaylistController_){this.masterPlaylistController_.pauseLoading()}});this.on(this.tech_,”play”,this.play)}f(b,[{key:”setOptions_”,value:function c(){var a=this;this.options_.withCredentials=this.options_.withCredentials||false;if(typeof this.options_.blacklistDuration!==”number”){this.options_.blacklistDuration=5*60}if(typeof this.options_.bandwidth!==”number”){ this.options_.bandwidth=O}this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===O;[“withCredentials”,”bandwidth”].forEach(function(b){if(typeof a.source_[b]!==”undefined”){a.options_[b]=a.source_[b]}});this.bandwidth=this.options_.bandwidth}},{key:”src”,value:function d(a,b){var c=this;if(!a){return}this.setOptions_();this.options_.url=this.source_.src;this.options_.tech=this.tech_;this.options_.externHls=N;this.options_.sourceType=P(b);this.masterPlaylistController_=new B.MasterPlaylistController(this.options_);this.playbackWatcher_=new J[“default”](A[“default”].mergeOptions(this.options_,{seekable:function d(){return c.seekable()}}));this.masterPlaylistController_.on(“error”,function(){var a=A[“default”].players[c.tech_.options_.playerId];a.error(c.masterPlaylistController_.error)});this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):N.STANDARD_PLAYLIST_SELECTOR.bind(this);this.masterPlaylistController_.selectInitialPlaylist=N.INITIAL_PLAYLIST_SELECTOR.bind(this);this.playlists=this.masterPlaylistController_.masterPlaylistLoader_;this.mediaSource=this.masterPlaylistController_.mediaSource;Object.defineProperties(this,{selectPlaylist:{get:function e(){return this.masterPlaylistController_.selectPlaylist},set:function f(a){this.masterPlaylistController_.selectPlaylist=a.bind(this)}},throughput:{get:function g(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function h(a){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=a;this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function i(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function j(a){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=a;this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function k(){var a=1/(this.bandwidth||1);var b=undefined;if(this.throughput>0){b=1/this.throughput}else{b=0}var c=Math.floor(1/(a+b));return c},set:function l(){A[“default”].log.error(‘The “systemBandwidth” property is read-only’)}}});Object.defineProperties(this.stats,{bandwidth:{get:function m(){return c.bandwidth||0},enumerable:true},mediaRequests:{get:function n(){return c.masterPlaylistController_.mediaRequests_()||0},enumerable:true},mediaRequestsAborted:{get:function o(){return c.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:true},mediaRequestsTimedout:{get:function p(){return c.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:true},mediaRequestsErrored:{get:function q(){return c.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:true},mediaTransferDuration:{get:function r(){return c.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:true},mediaBytesTransferred:{get:function s(){return c.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:true},mediaSecondsLoaded:{get:function t(){return c.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:true},buffered:{get:function u(){return(0,v.timeRangesToArray)(c.tech_.buffered())},enumerable:true},currentTime:{get:function w(){return c.tech_.currentTime()},enumerable:true},currentSource:{get:function x(){return c.tech_.currentSource_},enumerable:true},currentTech:{get:function y(){return c.tech_.name_},enumerable:true},duration:{get:function z(){return c.tech_.duration()},enumerable:true},master:{get:function C(){return c.playlists.master},enumerable:true},playerDimensions:{get:function D(){return c.tech_.currentDimensions()},enumerable:true},seekable:{get:function E(){return(0,v.timeRangesToArray)(c.tech_.seekable())},enumerable:true},timestamp:{get:function G(){return Date.now()},enumerable:true},videoPlaybackQuality:{get:function H(){return c.tech_.getVideoPlaybackQuality()},enumerable:true}});this.tech_.one(“canplay”,this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_));this.masterPlaylistController_.on(“selectedinitialmedia”,function(){(0,F[“default”])(c);T(c)});this.on(this.masterPlaylistController_,”progress”,function(){this.tech_.trigger(“progress”)});this.on(this.masterPlaylistController_,”firstplay”,function(){this.ignoreNextSeekingEvent_=true});this.tech_.ready(function(){return c.setupQualityLevels_()});if(!this.tech_.el()){return}this.tech_.src(A[“default”].URL.createObjectURL(this.masterPlaylistController_.mediaSource))}},{key:”setupQualityLevels_”,value:function e(){var a=this;var b=A[“default”].players[this.tech_.options_.playerId];if(b&&b.qualityLevels){this.qualityLevels_=b.qualityLevels();this.masterPlaylistController_.on(“selectedinitialmedia”,function(){R(a.qualityLevels_,a)});this.playlists.on(“mediachange”,function(){Q(a.qualityLevels_,a.playlists)})}}},{key:”play”,value:function h(){this.masterPlaylistController_.play()}},{key:”setCurrentTime”,value:function k(a){this.masterPlaylistController_.setCurrentTime(a)}},{key:”duration”,value:function m(){return this.masterPlaylistController_.duration()}},{key:”seekable”,value:function n(){return this.masterPlaylistController_.seekable()}},{key:”dispose”,value:function o(){if(this.playbackWatcher_){this.playbackWatcher_.dispose()}if(this.masterPlaylistController_){this.masterPlaylistController_.dispose()}if(this.qualityLevels_){this.qualityLevels_.dispose()}g(Object.getPrototypeOf(b.prototype),”dispose”,this).call(this)}}]);return b}(U);var W=function ca(a){return{canHandleSource:function b(c){var d=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];var e=A[“default”].mergeOptions(A[“default”].options,d);if(e.hls&&e.hls.mode&&e.hls.mode!==a){return false}return ca.canPlayType(c.type,e)},handleSource:function c(b,d){var e=arguments.length<=2||arguments[2]===undefined?{}:arguments[2];var f=A[“default”].mergeOptions(A[“default”].options,e,{hls:{mode:a}});if(a===”flash”){d.setTimeout(function(){d.trigger(“loadstart”)},1)}d.hls=new V(b,d,f);d.hls.xhr=(0,r[“default”])();d.hls.src(b.src,b.type);return d.hls},canPlayType:function d(a){var b=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];var c=A[“default”].mergeOptions(A[“default”].options,b);if(ca.canPlayType(a,c)){return”maybe”}return””}}};W.canPlayType=function(a,b){if(A[“default”].browser.IE_VERSION&&A[“default”].browser.IE_VERSION<=10){return false}var c=P(a);if(c===”dash”){if(!b.hls.overrideNative&&N.supportsNativeDash){return false}return true}if(!b.hls.overrideNative&&N.supportsNativeHls){return false}return c===”hls”};if(typeof A[“default”].MediaSource===”undefined”||typeof A[“default”].URL===”undefined”){A[“default”].MediaSource=w.MediaSource;A[“default”].URL=w.URL}var X=A[“default”].getTech(“Flash”);if(w.MediaSource.supportsNativeMediaSources()){A[“default”].getTech(“Html5”).registerSourceHandler(W(“html5”),0)}if(H[“default”].Uint8Array&&X){X.registerSourceHandler(W(“flash”))}A[“default”].HlsHandler=V;A[“default”].HlsSourceHandler=W;A[“default”].Hls=N;if(!A[“default”].use){A[“default”].registerComponent(“Hls”,N)}A[“default”].m3u8=y[“default”];A[“default”].options.hls=A[“default”].options.hls||{};if(A[“default”].registerPlugin){A[“default”].registerPlugin(“reloadSourceOnError”,L[“default”])}else{A[“default”].plugin(“reloadSourceOnError”,L[“default”])}c.exports={Hls:N,HlsHandler:V,HlsSourceHandler:W,emeOptions:S,simpleTypeFromSourceType:P}}).call(this,typeof global!==”undefined”?global:typeof self!==”undefined”?self:typeof a!==”undefined”?a:{})},{“./bin-utils”:2,”./config”:3,”./master-playlist-controller”:6,”./playback-watcher”:9,”./playlist”:12,”./playlist-loader”:10,”./playlist-selectors.js”:11,”./ranges”:13,”./reload-source-on-error”:14,”./rendition-mixin”:15,”./xhr”:23,”aes-decrypter”:27,”global/document”:30,”global/window”:31,”m3u8-parser”:32,”videojs-contrib-media-sources”:78}]},{},[81])(81)})}(function(){var c=void 0,d=true,e=null,f=false;function g(){return function(){}}function h(a){return function(){return this[a]}}function i(a){return function(){return a}}var j,k=this;function l(a){var b=typeof a;if(b==”object”)if(a){if(a instanceof Array)return”array”;else if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(c==”[object Window]”)return”object”;if(c==”[object Array]”||typeof a.length==”number”&&typeof a.splice!=”undefined”&&typeof a.propertyIsEnumerable!=”undefined”&&!a.propertyIsEnumerable(“splice”))return”array”;if(c==”[object Function]”||typeof a.call!=”undefined”&&typeof a.propertyIsEnumerable!=”undefined”&&!a.propertyIsEnumerable(“call”))return”function”}else return”null”;else if(b==”function”&&typeof a.call==”undefined”)return”object”;return b}function m(a,b,c){return a.call.apply(a.bind,arguments)}function n(a,b,c){if(!a)throw Error();if(arguments.length>2){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}else return function(){return a.apply(b,arguments)}}function o(a,b,c){o=Function.prototype.bind&&Function.prototype.bind.toString().indexOf(“native code”)!=-1?m:n;return o.apply(e,arguments)}function p(a,b){function c(){}c.prototype=b.prototype;a.ka=b.prototype;a.prototype=new c;a.prototype.constructor=a}function q(){}function r(a,b,c){switch(typeof b){case”string”:u(b,c);break;case”number”:c.push(isFinite(b)&&!isNaN(b)?b:”null”);break;case”boolean”:c.push(b);break;case”undefined”:c.push(“null”);break;case”object”:if(b==e){c.push(“null”);break}if(l(b)==”array”){var d=b.length;c.push(“[“);for(var f=””,g=0;g<d;g++)c.push(f),r(a,b[g],c),f=”,”;c.push(“]”);break}c.push(“{“);d=””;for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(g=b[f],typeof g!=”function”&&(c.push(d),u(f,c),c.push(“:”),r(a,g,c),d=”,”));c.push(“}”);break;case”function”:break;default:throw Error(“Unknown type: “+typeof b)}}var s={‘”‘:’\\”‘,”\\”:”\\\\”,”/”:”\\/”,”\b”:”\\b”,”\f”:”\\f”,”\n”:”\\n”,”\r”:”\\r”,”\t”:”\\t”,”\x0B”:”\\u000b”},t=/\uffff/.test(”

Source Article