{"version":3,"sources":["../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/get.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/superPropBase.js","../node_modules/antd-mobile/lib/accordion/style/css.js","../node_modules/antd-mobile/lib/accordion/index.js","../node_modules/global/window.js","../node_modules/rc-collapse/es/PanelContent.js","../node_modules/rc-collapse/es/Panel.js","../node_modules/rc-collapse/es/openAnimationFactory.js","../node_modules/rc-collapse/es/Collapse.js","../node_modules/rc-collapse/es/index.js","../node_modules/function-bind/index.js","../node_modules/is-callable/index.js","../node_modules/mux.js/lib/mp4/probe.js","../node_modules/define-properties/index.js","../node_modules/object-keys/isArguments.js","../node_modules/string.prototype.trim/implementation.js","../node_modules/es-abstract/GetIntrinsic.js","../node_modules/has/src/index.js","../node_modules/string.prototype.trim/polyfill.js","../node_modules/mux.js/lib/tools/mp4-inspector.js","../node_modules/mux.js/lib/utils/bin.js","../node_modules/mux.js/lib/tools/caption-packet-parser.js","../node_modules/mux.js/lib/utils/stream.js","../node_modules/mux.js/lib/m2ts/stream-types.js","../node_modules/m3u8-parser/dist/m3u8-parser.es.js","../node_modules/pkcs7/dist/pkcs7.es.js","../node_modules/aes-decrypter/dist/aes-decrypter.es.js","../node_modules/video.js/dist/video.es.js","../node_modules/global/document.js","../node_modules/safe-json-parse/tuple.js","../node_modules/keycode/index.js","../node_modules/xhr/index.js","../node_modules/is-function/index.js","../node_modules/parse-headers/parse-headers.js","../node_modules/string.prototype.trim/index.js","../node_modules/function-bind/implementation.js","../node_modules/object-keys/index.js","../node_modules/object-keys/implementation.js","../node_modules/es-abstract/es5.js","../node_modules/es-abstract/helpers/assertRecord.js","../node_modules/es-abstract/helpers/isNaN.js","../node_modules/es-abstract/helpers/isFinite.js","../node_modules/es-abstract/helpers/sign.js","../node_modules/es-abstract/helpers/mod.js","../node_modules/es-to-primitive/es5.js","../node_modules/es-to-primitive/helpers/isPrimitive.js","../node_modules/string.prototype.trim/shim.js","../node_modules/for-each/index.js","../node_modules/xtend/immutable.js","../node_modules/videojs-vtt.js/lib/browser-index.js","../node_modules/videojs-vtt.js/lib/vtt.js","../node_modules/videojs-vtt.js/lib/vttcue.js","../node_modules/videojs-vtt.js/lib/vttregion.js","../node_modules/url-toolkit/src/url-toolkit.js","../node_modules/mpd-parser/dist/mpd-parser.es.js","../node_modules/mux.js/lib/mp4/caption-parser.js","../node_modules/mux.js/lib/m2ts/caption-stream.js","../node_modules/mux.js/lib/tools/ts-inspector.js","../node_modules/mux.js/lib/m2ts/timestamp-rollover-stream.js","../node_modules/mux.js/lib/m2ts/probe.js","../node_modules/mux.js/lib/aac/utils.js","../node_modules/mux.js/lib/utils/clock.js"],"names":["get_get","target","property","receiver","Reflect","get","base","object","Object","prototype","hasOwnProperty","call","getPrototypeOf","_superPropBase","desc","getOwnPropertyDescriptor","value","__webpack_require__","d","__webpack_exports__","defineProperty","exports","_classCallCheck3","_interopRequireDefault","_createClass3","_possibleConstructorReturn3","_inherits3","_rcCollapse","_rcCollapse2","React","obj","__esModule","newObj","key","_interopRequireWildcard","default","Accordion","_React$Component","this","__proto__","apply","arguments","createElement","props","Component","Panel","defaultProps","prefixCls","module","global","win","window","self","_createClass","defineProperties","i","length","descriptor","enumerable","configurable","writable","Constructor","protoProps","staticProps","_defineProperty","PanelContent_PanelContent","_Component","PanelContent","instance","TypeError","_classCallCheck","ReferenceError","_possibleConstructorReturn","subClass","superClass","create","constructor","setPrototypeOf","_inherits","react","nextProps","forceRender","isActive","_classnames","_isActived","_props","children","destroyInactivePanel","role","contentCls","classnames_default","child","react_default","a","className","propTypes","prop_types_default","string","bool","any","es_PanelContent","Panel_createClass","Panel_defineProperty","Panel_possibleConstructorReturn","Panel_CollapsePanel","CollapsePanel","_ref","_temp","_this","Panel_classCallCheck","_len","args","Array","_key","concat","handleItemClick","onItemClick","handleKeyPress","e","keyCode","which","Panel_inherits","_classNames2","id","style","header","headerClass","showArrow","disabled","accordion","headerCls","itemCls","onClick","tabIndex","aria-expanded","onKeyPress","Animate","showProp","exclusive","component","animation","openAnimation","oneOfType","number","node","func","animate","show","transitionName","done","height","es","start","offsetHeight","active","end","openAnimationFactory","enter","leave","Collapse_createClass","Collapse_defineProperty","toArray","activeKey","currentActiveKey","isArray","Collapse_Collapse","Collapse","Collapse_classCallCheck","Collapse_possibleConstructorReturn","_this$props","defaultActiveKey","state","Collapse_inherits","setState","index","arr","arr2","from","_toConsumableArray","indexOf","splice","push","setActiveKey","_this2","newChildren","forEach","String","_child$props","onClickItem","cloneElement","onChange","_classNames","_props2","collapseClassName","getItems","arrayOf","es_Collapse","es_Panel","implementation","Function","bind","fnToStr","toString","constructorRegex","isES6ClassFn","fnStr","test","toStr","hasToStringTag","Symbol","toStringTag","tryFunctionObject","strClass","_findBox","parseType","timescale","startTime","getVideoTrackIds","getTracks","toUnsigned","toHexString","data","path","size","type","subresults","results","byteLength","subarray","slice","buffer","result","fromCharCode","init","reduce","trak","tkhd","version","mdhd","fragment","trafs","baseTimes","map","traf","tfhd","scale","tfdt","Math","pow","Infinity","min","isFinite","traks","videoTrackIds","hdlrs","tkhds","hdlr","view","trackId","handlerType","DataView","byteOffset","getUint8","getUint32","tracks","track","stsd","sampleDescriptions","codec","codecConfig","codecBox","replace","findBox","keys","hasSymbols","origDefineProperty","supportsDescriptors","_","x","arePropertyDescriptorsSupported","name","predicate","fn","predicates","getOwnPropertySymbols","str","isArgs","callee","ES","leftWhitespace","rightWhitespace","S","ToString","CheckObjectCoercible","ThrowTypeError","iterator","getProto","asyncGenIterator","undefined","TypedArray","Uint8Array","INTRINSICS","$ %Array%","$ %ArrayBuffer%","ArrayBuffer","$ %ArrayBufferPrototype%","$ %ArrayIteratorPrototype%","$ %ArrayPrototype%","$ %ArrayProto_entries%","entries","$ %ArrayProto_forEach%","$ %ArrayProto_keys%","$ %ArrayProto_values%","values","$ %AsyncFromSyncIteratorPrototype%","$ %AsyncFunction%","$ %AsyncFunctionPrototype%","$ %AsyncGenerator%","$ %AsyncGeneratorFunction%","$ %AsyncGeneratorPrototype%","$ %AsyncIteratorPrototype%","asyncIterator","$ %Atomics%","Atomics","$ %Boolean%","Boolean","$ %BooleanPrototype%","$ %DataView%","$ %DataViewPrototype%","$ %Date%","Date","$ %DatePrototype%","$ %decodeURI%","decodeURI","$ %decodeURIComponent%","decodeURIComponent","$ %encodeURI%","encodeURI","$ %encodeURIComponent%","encodeURIComponent","$ %Error%","Error","$ %ErrorPrototype%","$ %eval%","eval","$ %EvalError%","EvalError","$ %EvalErrorPrototype%","$ %Float32Array%","Float32Array","$ %Float32ArrayPrototype%","$ %Float64Array%","Float64Array","$ %Float64ArrayPrototype%","$ %Function%","$ %FunctionPrototype%","$ %Generator%","$ %GeneratorFunction%","$ %GeneratorPrototype%","$ %Int8Array%","Int8Array","$ %Int8ArrayPrototype%","$ %Int16Array%","Int16Array","$ %Int16ArrayPrototype%","$ %Int32Array%","Int32Array","$ %Int32ArrayPrototype%","$ %isFinite%","$ %isNaN%","isNaN","$ %IteratorPrototype%","$ %JSON%","JSON","$ %JSONParse%","parse","$ %Map%","Map","$ %MapIteratorPrototype%","$ %MapPrototype%","$ %Math%","$ %Number%","Number","$ %NumberPrototype%","$ %Object%","$ %ObjectPrototype%","$ %ObjProto_toString%","$ %ObjProto_valueOf%","valueOf","$ %parseFloat%","parseFloat","$ %parseInt%","parseInt","$ %Promise%","Promise","$ %PromisePrototype%","$ %PromiseProto_then%","then","$ %Promise_all%","all","$ %Promise_reject%","reject","$ %Promise_resolve%","resolve","$ %Proxy%","Proxy","$ %RangeError%","RangeError","$ %RangeErrorPrototype%","$ %ReferenceError%","$ %ReferenceErrorPrototype%","$ %Reflect%","$ %RegExp%","RegExp","$ %RegExpPrototype%","$ %Set%","Set","$ %SetIteratorPrototype%","$ %SetPrototype%","$ %SharedArrayBuffer%","SharedArrayBuffer","$ %SharedArrayBufferPrototype%","$ %String%","$ %StringIteratorPrototype%","$ %StringPrototype%","$ %Symbol%","$ %SymbolPrototype%","$ %SyntaxError%","SyntaxError","$ %SyntaxErrorPrototype%","$ %ThrowTypeError%","$ %TypedArray%","$ %TypedArrayPrototype%","$ %TypeError%","$ %TypeErrorPrototype%","$ %Uint8Array%","$ %Uint8ArrayPrototype%","$ %Uint8ClampedArray%","Uint8ClampedArray","$ %Uint8ClampedArrayPrototype%","$ %Uint16Array%","Uint16Array","$ %Uint16ArrayPrototype%","$ %Uint32Array%","Uint32Array","$ %Uint32ArrayPrototype%","$ %URIError%","URIError","$ %URIErrorPrototype%","$ %WeakMap%","WeakMap","$ %WeakMapPrototype%","$ %WeakSet%","WeakSet","$ %WeakSetPrototype%","allowMissing","trim","inspectMp4","_textifyMp","parseMp4Date","seconds","parseSampleFlags","flags","isLeading","dependsOn","isDependedOn","hasRedundancy","paddingValue","isNonSyncSample","degradationPriority","nalParse","avcStream","avcView","avc1","dataReferenceIndex","getUint16","width","horizresolution","vertresolution","frameCount","depth","config","avcC","numOfPictureParameterSets","nalSize","offset","configurationVersion","avcProfileIndication","profileCompatibility","avcLevelIndication","lengthSizeMinusOne","sps","pps","numOfSequenceParameterSets","btrt","bufferSizeDB","maxBitrate","avgBitrate","esds","esId","streamPriority","decoderConfig","objectProfileIndication","streamType","bufferSize","decoderConfigDescriptor","tag","audioObjectType","samplingFrequencyIndex","channelConfiguration","ftyp","majorBrand","minorVersion","compatibleBrands","dinf","boxes","dref","dataReferences","escape","mdat","nals","language","creationTime","modificationTime","duration","mdia","mfhd","sequenceNumber","minf","mp4a","channelcount","samplesize","samplerate","streamDescriptor","moof","moov","mvex","mvhd","rate","volume","matrix","nextTrackId","pdin","initialDelay","sdtp","samples","sidx","references","referenceId","earliestPresentationTime","firstOffset","referenceCount","referenceType","referencedSize","subsegmentDuration","startsWithSap","sapType","sapDeltaTime","smhd","balance","stbl","stco","chunkOffsets","entryCount","stsc","sampleToChunks","firstChunk","samplesPerChunk","sampleDescriptionIndex","stsz","sampleSize","stts","timeToSamples","sampleCount","sampleDelta","styp","baseMediaDecodeTime","baseDataOffsetPresent","sampleDescriptionIndexPresent","defaultSampleDurationPresent","defaultSampleSizePresent","defaultSampleFlagsPresent","durationIsEmpty","defaultBaseIsMoof","baseDataOffset","defaultSampleDuration","defaultSampleSize","defaultSampleFlags","baseDataOffsetIsMoof","layer","alternateGroup","trex","defaultSampleDescriptionIndex","sampleDependsOn","sampleIsDependedOn","sampleHasRedundancy","samplePaddingValue","sampleIsDifferenceSample","sampleDegradationPriority","trun","sample","dataOffsetPresent","firstSampleFlagsPresent","sampleDurationPresent","sampleSizePresent","sampleFlagsPresent","sampleCompositionTimeOffsetPresent","dataOffset","getInt32","compositionTimeOffset","url ","vmhd","graphicsmode","opcolor","box","ab","v","z","inspectedMp4","indent","join","filter","prefix","bytes","byte","match","line","stringify","split","inspect","textify","parseTfdt","parseHdlr","parseTfhd","parseTrun","parseSidx","parseSei","payloadType","payloadSize","payload","parseUserData","sei","parseCaptionPackets","pts","userData","count","ccData","discardEmulationPreventionBytes","newLength","newData","emulationPreventionBytesPositions","sourceIndex","shift","USER_DATA_REGISTERED_ITU_T_T35","Stream","listeners","on","listener","off","trigger","callbacks","dispose","pipe","destination","flushSource","flush","partialFlush","endTimeline","reset","H264_STREAM_TYPE","ADTS_STREAM_TYPE","METADATA_STREAM_TYPE","_extends","assign","source","_inheritsLoose","_proto","LineStream","_Stream","nextNewline","substring","parseAttributes","attributes","attr","attrs","exec","ParseStream","customParsers","tagMappers","event","acc","mapper","mappedLine","newLine","tagType","title","playlistType","allowed","URI","uri","BYTERANGE","_attributes$BYTERANGE","byterange","RESOLUTION","resolution","BANDWIDTH","dateTimeString","dateTimeObject","IV","toLowerCase","PRECISE","text","addParser","_this3","expression","customType","dataParser","segment","addTagMapper","_ref2","decodeB64ToUint8Array","b64Text","decodedString","window_default","atob","array","charCodeAt","Parser","lineStream","parseStream","currentMap","_assertThisInitialized","uris","currentUri","defaultMediaGroups","AUDIO","VIDEO","CLOSED-CAPTIONS","SUBTITLES","currentTimeline","manifest","allowCache","discontinuityStarts","segments","entry","mediaGroup","rendition","allow-cache","message","endlist","endList","inf","mediaSequence","discontinuitySequence","METHOD","KEYFORMAT","KEYID","contentProtection","com.widevine.alpha","schemeIdUri","keyId","pssh","method","iv","media-sequence","discontinuity-sequence","playlist-type","playlist","stream-inf","playlists","mediaGroups","media","TYPE","NAME","mediaGroupType","DEFAULT","autoselect","AUTOSELECT","LANGUAGE","instreamId","CHARACTERISTICS","characteristics","FORCED","forced","discontinuity","program-date-time","targetduration","targetDuration","totalduration","totalDuration","timeOffset","precise","cue-out","cueOut","cue-out-cont","cueOutCont","cue-in","cueIn","timeline","comment","custom","chunk","options","classCallCheck","createClass","possibleConstructorReturn","precompute","tables","encTable","decTable","sbox","sboxInv","xInv","th","x2","x4","s","tEnc","tDec","aesTables","AES","_tables","j","tmp","encKey","decKey","keyLen","rcon","decrypt","encrypted0","encrypted1","encrypted2","encrypted3","out","b","c","a2","b2","c2","nInnerRounds","kIndex","table","table0","table1","table2","table3","aes_decrypter_es_Stream","_length","_i","AsyncStream","jobs","delay","timeout_","inherits","processJob_","setTimeout","job","ntoh","word","encrypted","initVector","encrypted32","decipher","decrypted","decrypted32","init0","init1","init2","init3","wordIx","aes_decrypter_es_Decrypter","Decrypter","step","STEP","asyncStream_","decryptChunk_","padded","set","video_es_version","video_es_history","video_es_LogByTypeFactory","log","level","lvl","levels","lvlRegExp","unshift","toUpperCase","console","info","video_es_log","createLogger","logByType","subname","debug","warn","error","history","fname","historyItem","clear","disable","enable","_len2","_key2","_len3","_key3","_len4","_key4","createLogger$1","video_es_toString","isObject","each","video_es_assign","sources","isPlain","computedStyle","el","prop","getComputedStyle","computedStyleValue","getPropertyValue","isNonBlankString","throwIfWhitespace","isReal","document_default","document","isEl","nodeType","isInFrame","parent","createQuerier","selector","context","querySelector","ctx","video_es_createEl","tagName","properties","content","getOwnPropertyNames","propName","val","setAttribute","textContent","attrName","appendContent","innerText","prependTo","firstChild","insertBefore","appendChild","hasClass","element","classToCheck","classList","contains","addClass","classToAdd","add","removeClass","classToRemove","remove","toggleClass","classToToggle","has","setAttributes","attrValue","removeAttribute","getAttributes","knownBooleans","attrVal","getAttribute","attribute","blockTextSelection","body","focus","onselectstart","unblockTextSelection","getBoundingClientRect","parentNode","rect","k","findPosition","left","top","docEl","documentElement","clientLeft","scrollLeft","pageXOffset","clientTop","scrollTop","pageYOffset","round","getPointerPosition","position","boxW","offsetWidth","boxH","boxY","boxX","pageY","pageX","changedTouches","y","max","isTextNode","emptyEl","removeChild","normalizeContent","createTextNode","insertContent","isSingleLeftClick","button","buttons","videojs","$","$$","Dom","freeze","createEl","_windowLoaded","video_es_autoSetup","autoSetup","vids","getElementsByTagName","audios","divs","mediaEls","mediaEl","autoSetupTimeout","player","wait","vjs","setWindowLoaded","removeEventListener","readyState","addEventListener","video_es_createStyleElement","setTextContent","styleSheet","cssText","DomData","_guid","newGUID","_cleanUpEvents","elem","handlers","dispatcher","detachEvent","_handleMultipleEvents","types","callback","fixEvent","returnTrue","returnFalse","isPropagationStopped","old","preventDefault","srcElement","relatedTarget","fromElement","toElement","returnValue","defaultPrevented","stopPropagation","cancelBubble","stopImmediatePropagation","isImmediatePropagationStopped","clientX","doc","clientY","charCode","_supportsPassive","opts","passiveEvents","guid","hash","handlersCopy","m","n","passive","attachEvent","removeType","t","elemData","ownerDocument","bubbles","targetData","one","EVENT_MAP","Events","UPDATE_REFRESH_INTERVAL","uid","bound","video_es_throttle","last","performance","now","video_es_debounce","immediate","timeout","debounced","_later","clearTimeout","cancel","EventTarget","allowedEvents_","ael","dispatchEvent","queueTrigger","oldTimeout","isEvented","eventBusEl_","every","isValidEventType","validateTarget","nodeName","validateEventType","validateListener","normalizeListenArgs","isTargetingSelf","listen","EventedMixin","_normalizeListenArgs","removeListenerOnDispose","removeRemoverOnTargetDispose","_normalizeListenArgs2","wrapper","largs","_normalizeListenArgs3","_len5","_key5","targetOrType","typeOrListener","evented","eventBusKey","eventedCallbacks","StatefulMixin","stateUpdates","changes","to","stateful","defaultState","handleStateChanged","w","toTitleCase","mergeOptions","video_es_Component","ready","play","player_","parentComponent_","options_","id_","name_","el_","children_","childIndex_","childNameIndex_","setTimeoutIds_","setIntervalIds_","rafIds_","clearingTimersOnDispose_","initChildren","reportTouchActivity","enableTouchActivity","localize","tokens","defaultValue","code","languages","primaryCode","primaryLang","localizedString","ret","contentEl","contentEl_","getChildById","getChild","addChild","componentName","componentClassName","componentClass","ComponentClass","getComponent","refNode","childFound","compEl","workingChildren","parentOptions","Tech","some","wchild","isTech","playerOptions","newChild","buildCSSClass","sync","isReady_","readyQueue_","triggerReady","readyQueue","hide","lockShowing","unlockShowing","num","skipListeners","dimension","dimensions","widthOrHeight","pxIndex","currentDimension","computedWidthOrHeight","rule","currentDimensions","currentWidth","currentHeight","blur","handleKeyDown","emitTapEvents","couldBeTap","touchStart","firstTouch","touches","xdiff","ydiff","sqrt","noTap","reportUserActivity","touchHolding","report","clearInterval","setInterval","touchEnd","timeoutId","clearTimersOnDispose_","interval","intervalId","requestAnimationFrame","supportsRaf_","cancelAnimationFrame","_this4","idName","cancelName","registerComponent","ComponentToRegister","reason","isComp","isPrototypeOf","components_","Player","players","playerNames","pname","video_es_inheritsLoose","_setPrototypeOf","o","p","_construct","Parent","Class","construct","sham","isNativeReflectConstruct","video_es_assertThisInitialized","USER_AGENT","navigator","userAgent","webkitVersionMap","appleWebkitVersion","pop","IS_IPAD","IS_IPHONE","IS_IPOD","IS_IOS","IOS_VERSION","IS_ANDROID","ANDROID_VERSION","major","minor","IS_NATIVE_ANDROID","IS_FIREFOX","IS_EDGE","IS_CHROME","CHROME_VERSION","IE_VERSION","IS_SAFARI","IS_ANY_SAFARI","IS_WINDOWS","TOUCH_ENABLED","maxTouchPoints","DocumentTouch","browser","getRange","fnName","valueIndex","ranges","rangeIndex","maxIndex","rangeCheck","createTimeRangesObj","createTimeRanges","bufferedPercent","buffered","bufferedDuration","browserApi","FullscreenApi","prefixed","apiMap","specApi","video_es_i","MediaError","defaultMessages","status","errorTypes","1","2","3","4","5","errNum","isPromise","silencePromise","trackToJson_","cues","cue","endTime","textTrackConverter","tech","trackEls","trackObjs","trackEl","json","src","textTracks","addedTrack","addRemoteTextTrack","addCue","MODAL_CLASS_NAME","video_es_ModalDialog","ModalDialog","opened_","hasBeenOpened_","hasBeenFilled_","closeable","uncloseable","descEl_","description","aria-describedby","aria-hidden","aria-label","label","previouslyActiveEl_","open","fillAlways","fill","wasPlaying_","paused","pauseOnOpen","pause","hadControls_","controls","conditionalFocus_","opened","close","conditionalBlur_","temporary","closeable_","temp","controlText","fillWith","parentEl","nextSiblingEl","nextSibling","empty","closeButton","content_","activeEl","activeElement","playerEl","keycode_default","isEventKey","focusIndex","focusableEls","focusableEls_","shiftKey","allChildren","querySelectorAll","HTMLAnchorElement","HTMLAreaElement","hasAttribute","HTMLInputElement","HTMLSelectElement","HTMLTextAreaElement","HTMLButtonElement","HTMLIFrameElement","HTMLObjectElement","HTMLEmbedElement","TrackList","_EventTarget","tracks_","addTrack","removeTrack","rtrack","l","getTrackById","video_es_event","change","addtrack","removetrack","disableOthers","list","enabled","AudioTrackList","_TrackList","changing_","enabledChange_","disableOthers$1","selected","VideoTrackList","selectedChange_","TextTrackList","queueChange_","triggerSelectedlanguagechange","triggerSelectedlanguagechange_","kind","selectedlanguagechange_","HtmlTrackElementList","trackElements","trackElements_","addTrackElement_","trackElement","getTrackElementByTrack_","trackElement_","removeTrackElement_","TextTrackCueList","setCues_","length_","oldLength","cues_","defineProp","getCueById","VideoTrackKind","alternative","captions","main","sign","subtitles","commentary","AudioTrackKind","descriptions","main-desc","translation","TextTrackKind","chapters","metadata","TextTrackMode","hidden","showing","Track","trackProps","_loop","video_es_parseUrl","url","href","div","addToBody","host","protocol","innerHTML","details","location","video_es_getAbsoluteURL","getFileExtension","pathParts","video_es_isCrossOrigin","winLoc","urlInfo","Url","parseUrl","getAbsoluteURL","isCrossOrigin","video_es_parseCues","srcContent","parser","WebVTT","vttjs","StringDecoder","errors","oncue","onparsingerror","onflush","groupCollapsed","groupEnd","video_es_loadTrack","crossOrigin","cors","xhr_default","err","response","responseBody","loaded_","tech_","video_es_TextTrack","_Track","TextTrack","settings","srclang","mode","default_","activeCues_","activeCues","changed","timeupdateHandler","newMode","ct","currentTime","originalCue","VTTCue","originalCue_","removeCue","_removeCue","cuechange","AudioTrack","newEnabled","VideoTrack","newSelected","NONE","LOADED","HTMLTrackElement","load","LOADING","ERROR","NORMAL","audio","ListClass","TrackClass","capitalName","video","getterName","privateName","REMOTE","remoteText","remoteTextEl","ALL","names","video_es_Tech","hasStarted_","featuresProgressEvents","manualProgressOn","featuresTimeupdateEvents","manualTimeUpdatesOn","nativeCaptions","nativeTextTracks","featuresNativeTextTracks","emulateTextTracks","autoRemoteTextTracks_","initTrackListeners","nativeControlsForTouch","triggerSourceset","onDurationChange","manualProgress","trackProgress","manualProgressOff","stopTrackingProgress","progressInterval","numBufferedPercent","bufferedPercent_","duration_","manualTimeUpdates","trackCurrentTime","stopTrackingCurrentTime","manualTimeUpdatesOff","currentTimeInterval","manuallyTriggered","clearTracks","removeRemoteTextTrack","cleanupAutoTextTracks","error_","played","setCurrentTime","trackListChanges","addWebVttScript_","_this5","browser_index_default","script","onload","onerror","_this6","remoteTracks","remoteTextTracks","handleAddTrack","handleRemoveTrack","updateDisplay","textTracksChanges","addTextTrack","createTrackHelper","createRemoteTextTrack","manualCleanup","_this7","htmlTrackElement","remoteTextTrackEls","getVideoPlaybackQuality","requestPictureInPicture","PromiseClass","setPoster","playsinline","setPlaysinline","overrideNativeAudioTracks","overrideNativeVideoTracks","canPlayType","canPlaySource","srcObj","registerTech","techs_","defaultTechOrder_","getTech","featuresVolumeControl","featuresMuteControl","featuresFullscreenResize","featuresPlaybackRate","featuresSourceset","withSourceHandlers","_Tech","registerSourceHandler","handler","sourceHandlers","can","selectSourceHandler","canHandleSource","sh","originalFn","sourceHandler_","setSource","nativeSourceHandler","disposeSourceHandler","currentSource_","handleSource","middlewares","middlewareInstances","TERMINATOR","next","setSourceHelper","middleware","lastRun","_middleware","mwFactory","mwrest","mw","mws","_mws$i","mwf","mwi","getOrCreateFactory","_src","mediate","arg","callMethod","middlewareValue","middlewareIterator","terminated","executeRight","allowedGetters","seekable","allowedSetters","setVolume","allowedMediators","MimetypesKind","opus","ogv","mp4","mov","m4v","mkv","m4a","mp3","aac","oga","m3u8","jpg","jpeg","gif","png","svg","webp","getMimetype","ext","fixSource","mimetype","MediaLoader","techOrder","techName","isSupported","loadTech_","video_es_ClickableComponent","ClickableComponent","tabIndex_","createControlTextEl","controlTextEl_","aria-live","controlText_","localizedText","nonIconControl","enabled_","handleClick","handleMouseOver","handleMouseOut","PosterImage","_ClickableComponent","update","poster","setSrc","backgroundImage","fontMap","monospace","sansSerif","serif","monospaceSansSerif","monospaceSerif","proportionalSansSerif","proportionalSerif","casual","smallcaps","constructColor","color","opacity","hex","tryUpdateStyle","video_es_TextTrackDisplay","TextTrackDisplay","updateDisplayHandler","toggleDisplay","preselectTrack","firstDesc","firstCaptions","preferredTrack","modes","trackList","userPref","cache_","selectedLanguage","aria-atomic","clearDisplay","processCues","allowMultipleShowingTracks","showingTracks","updateForTrack","descriptionsTrack","captionsSubtitlesTrack","_track","updateDisplayState","overrides","textTrackSettings","getValues","cueDiv","displayState","textOpacity","backgroundColor","backgroundOpacity","windowColor","windowOpacity","edgeStyle","textShadow","fontPercent","fontSize","bottom","fontFamily","fontVariant","_i2","_track2","_j","cueEl","LoadingSpinner","isAudio","playerType","dir","video_es_Button","Button","BigPlayButton","_Button","mouseused_","handleMouseDown","playPromise","cb","playToggle","playFocus","video_es_CloseButton","CloseButton","video_es_PlayToggle","PlayToggle","replay","handlePlay","handlePause","handleEnded","handleSeeked","defaultImplementation","guide","floor","h","gm","gh","formatTime","video_es_TimeDisplay","TimeDisplay","throttledUpdateContent","updateContent","labelText_","updateTextNode_","textNode_","formattedTime_","formatTime_","time","updateFormattedTime_","formattedTime","CurrentTimeDisplay","_TimeDisplay","scrubbing","getCache","DurationDisplay","TimeDivider","RemainingTimeDisplay","remainingTimeDisplay","remainingTime","LiveDisplay","updateShowing","SeekToLive","updateLiveEdgeStatus","liveTracker","textEl_","atLiveEdge","seekToLiveEdge","video_es_Slider","Slider","bar","barName","vertical","playerEvent","handleMouseMove","handleMouseUp","aria-valuenow","aria-valuemin","aria-valuemax","progress","getPercent","percentage","toFixed","sizeKey","calculateDistance","stepBack","stepForward","vertical_","LoadProgressBar","partEls_","isLive","seekableEnd","bufferedEnd","controlTextPercentage","percentify","rounded","percent","part","TimeTooltip","seekBarRect","seekBarPoint","tooltipRect","playerRect","seekBarPointPx","spaceLeftOfPoint","spaceRightOfPoint","right","pullTooltipBy","write","updateTime","rafId_","liveWindow","secondsBehind","PlayProgressBar","timeTooltip","MouseTimeDisplay","video_es_SeekBar","_Slider","SeekBar","setEventHandlers_","updateInterval","enableInterval_","disableInterval_","toggleVisibility_","update_","liveCurrentTime","offsetParent","getCurrentTime_","seekableStart","videoWasPlaying","newTime","distance","mouseTimeDisplay","handleAction","gotoFraction","codes","STEP_SECONDS","ProgressControl","throttledHandleMouseSeek","handleMouseSeek","seekBar","seekBarEl","video_es_PictureInPictureToggle","PictureInPictureToggle","handlePictureInPictureChange","pictureInPictureEnabled","isInPictureInPicture","exitPictureInPicture","video_es_FullscreenToggle","FullscreenToggle","handleFullscreenChange","fsApi_","fullscreenEnabled","isFullscreen","exitFullscreen","requestFullscreen","checkVolumeSupport","VolumeLevel","VolumeBar","updateLastVolume_","updateARIAAttributes","checkMuted","muted","ariaValue","volumeAsPercentage_","volumeBeforeDrag","lastVolume_","VolumeControl","volumeBar","throttledHandleMouseMove","orientationClass","checkMuteSupport","video_es_MuteToggle","MuteToggle","vol","lastVolume","volumeToSet","updateIcon_","updateControlText_","video_es_VolumePanel","VolumePanel","inline","volumeControl","volumePanelState_","muteToggle","handleVolumeControlKeyUp","sliderActive_","sliderInactive_","video_es_Menu","Menu","menuButton_","menuButton","focusedChild_","boundHandleBlur_","handleBlur","boundHandleTapClick_","handleTapClick","addEventListenerForItem","removeEventListenerForItem","addItem","childComponent","contentElType","append","btn","buttonPressed_","unpressButton","childComponents","foundComponent","stepChild","item","video_es_MenuButton","MenuButton","buttonClass","menu","handleMenuKeyUp","handleMouseLeave","handleSubmenuKeyDown","createMenu","items","hideThreshold_","titleEl","titleComponent","createItems","buildWrapperCSSClass","menuButtonClass","pressButton","handleSubmenuKeyPress","TrackButton","_MenuButton","updateHandler","MenuKeys","video_es_MenuItem","MenuItem","selectable","isSelected_","multiSelectable","_selected","video_es_TextTrackMenuItem","_MenuItem","TextTrackMenuItem","kinds","changeHandler","handleTracksChange","selectedLanguageChangeHandler","handleSelectedLanguageChange","onchange","Event","createEvent","initEvent","referenceTrack","shouldBeSelected","OffTextTrackMenuItem","_TextTrackMenuItem","allHidden","TextTrackButton","_TrackButton","TrackMenuItem","label_","kinds_","kind_","ChaptersTrackMenuItem","ChaptersButton","_TextTrackButton","track_","setTrack","findChaptersTrack","updateHandler_","remoteTextTrackEl","_remoteTextTrackEl","getMenuCaption","mi","DescriptionsButton","SubtitlesButton","CaptionSettingsMenuItem","CaptionsButton","SubsCapsMenuItem","SubsCapsButton","language_","AudioTrackMenuItem","audioTracks","AudioTrackButton","PlaybackRateMenuItem","playbackRate","PlaybackRateMenuButton","updateVisibility","updateLabel","labelEl_","rates","playbackRates","currentRate","newRate","playbackRateSupported","Spacer","CustomControlSpacer","_Spacer","ControlBar","ErrorDisplay","_ModalDialog","COLOR_BLACK","COLOR_BLUE","COLOR_CYAN","COLOR_GREEN","COLOR_MAGENTA","COLOR_RED","COLOR_WHITE","COLOR_YELLOW","OPACITY_OPAQUE","OPACITY_SEMI","OPACITY_TRANS","selectConfigs","parseOptionValue","video_es_TextTrackSettings","TextTrackSettings","endDialog","setDefaults","persistTextTrackSettings","saveSettings","restoreSettings","createElSelect_","legendId","selectLabelledbyIds","optionId","createElFgColor_","createElBgColor_","createElWinColor_","createElColors_","createElFont_","createElControls_","defaultsDescription","initial","accum","selectedIndex","setValues","setSelectedOption","localStorage","getItem","setItem","removeItem","ttDisplay","controlBar","subsCapsBtn","subsCapsButton","ccBtn","captionsButton","video_es_ResizeManager","ResizeManager","RESIZE_OBSERVER_AVAILABLE","ResizeObserver","loadListener_","resizeObserver_","debouncedHandler_","resizeHandler","observe","contentWindow","unloadListener_","unobserve","disconnect","resizeObserver","video_es_LiveTracker","LiveTracker","reset_","handleDurationchange","handleVisibilityChange","stopTracking","startTracking","isBehind_","timeupdateSeen_","liveEdgeWindow","seekableIncrement_","trackLive_","pastSeekEnd_","newSeekEnd","lastSeekEnd_","seekableIncrementList_","abs","mid","sortedList","sort","median","pastSeekEnd","behindLiveEdge","behindLiveEdge_","isTracking","hasStarted","trackingInterval_","handleTimeupdate","seekableEnds","seekableStarts","sourcesetLoad","srcUrls","innerHTMLDescriptorPolyfill","cloneNode","dummy","docFrag","createDocumentFragment","childNodes","Element","getDescriptor","priority","firstSourceWatch","resetSourceWatch_","innerDescriptor","HTMLMediaElement","video_es_getInnerHTMLDescriptor","appendWrapper","appendFn","retval","srcDescriptorPolyfill","setupSourceset","resetSourceset_","srcDescriptor","video_es_getSrcDescriptor","oldSetAttribute","oldLoad","currentSrc","video_es_Html5","Html5","crossoriginTracks","initNetworkState_","handleLateInit_","enableSourceset","setupSourcesetHandling_","hasChildNodes","nodes","nodesLength","removeNodes","proxyNativeTracks_","restoreMetadataTracksInIOSNativePlayer_","setControls","proxyWebkitFullscreen_","disposeMediaElement","metadataTracksPreFullscreenState","takeMetadataTrackSnapshot","storedMode","restoreTrackMode","storedTrack","overrideNative_","override","lowerCaseType","eventName","proxyNativeTracksForType_","elTracks","techTracks","currentTarget","removeOldTracks","removeTracks","found","playerElIngest","movingMediaElementInDOM","clone","techId","class","playerId","preload","settingsAttrs","networkState","loadstartFired","setLoadstartFired","triggerLoadstart","eventsToTrigger","checkProgress","NaN","endFn","beginFn","webkitPresentationMode","supportsFullScreen","webkitEnterFullScreen","enterFullScreen","HAVE_METADATA","exitFullScreen","webkitExitFullScreen","resetMediaElement","videoPlaybackQuality","webkitDroppedFrameCount","webkitDecodedFrameCount","droppedVideoFrames","totalVideoFrames","timing","navigationStart","TEST_VID","video_es_track","canControlVolume","canMuteVolume","canControlPlaybackRate","canOverrideAttributes","noop","supportsNativeTextTracks","supportsNativeVideoTracks","videoTracks","supportsNativeAudioTracks","featuresNativeVideoTracks","featuresNativeAudioTracks","mpegurlRE","patchCanPlayType","unpatchCanPlayType","r","TECH_EVENTS_RETRIGGER","TECH_EVENTS_QUEUE","canplay","canplaythrough","playing","seeked","BREAKPOINT_ORDER","BREAKPOINT_CLASSES","charAt","DEFAULT_BREAKPOINTS","tiny","xsmall","small","medium","large","xlarge","huge","video_es_Player","getTagSettings","closest","boundDocumentFullscreenChange_","documentFullscreenChange_","boundFullWindowOnEscKey_","fullWindowOnEscKey","isPosterFromTech_","queuedCallbacks_","userActive_","tagAttributes","languagesToLower","languages_","resetCache_","poster_","controls_","changingSrc_","playCallbacks_","playTerminatedQueue_","autoplay","plugins","scrubbing_","fluid_","updateStyleEl_","playerOptionsCopy","middleware_","flexNotSupported_","majorVersion","userActive","listenForUserActivity_","handleStageClick_","breakpoints","responsive","fullscreenchange","styleEl_","playerElIngest_","divEmbed","tabindex","VIDEOJS_NO_DYNAMIC_STYLE","defaultsStyleEl","head","fill_","fluid","aspectRatio","links","linkEl","_dimension","privDimension","parsedVal","ratio","aspectRatio_","idClass","ratioParts","videoWidth","videoHeight","ratioMultiplier","width_","height_","_width","_height","techEl","unloadTech_","titleTechName","camelTechName","techName_","techOptions","loop","vtt.js","canOverridePoster","techCanOverridePoster","TechClass","handleTechReady_","textTracksJson_","eventObj","seeking","handleTechLoadStart_","handleTechSourceset_","handleTechWaiting_","handleTechEnded_","handleTechSeeking_","handleTechPlay_","handleTechFirstPlay_","handleTechPause_","handleTechDurationChange_","handleTechFullscreenChange_","handleTechEnterPictureInPicture_","handleTechLeavePictureInPicture_","handleTechError_","handleTechPosterChange_","handleTechTextData_","handleTechRateChange_","usingNativeControls","techGet_","addTechControlsListeners_","safety","removeTechControlsListeners_","handleTechClick_","handleTechDoubleClick_","handleTechTouchStart_","handleTechTouchMove_","handleTechTouchEnd_","handleTechTap_","techCall_","manualAutoplay_","promise","previouslyMuted","restoreMuted","mutedPromise","updateSourceCaches_","matchingSources","findMimetype","sourceElSources","sourceEls","matchingSourceEls","sourceObj","updateSourceCaches","playerSrc","currentSource","eventSrc","lastSource_","techSrc","techGet","request","lastPlaybackRate","queued","timeWhenWaiting","timeUpdateListener","handleTechCanPlay_","handleTechCanPlayThrough_","handleTechPlaying_","handleTechSeeked_","starttime","userActions","doubleClick","userWasActive","toggleFullscreenClass_","isFs","fullscreenElement","matches","fullscreen","msMatchesSelector","togglePictureInPictureClass_","inactivityTimeout","defaultPlaybackRate","video_es_set","reduceRight","video_es_get","_this8","play_","_this9","isSrcReady","waitToPlay_","runPlayTerminatedQueue_","runPlayCallbacks_","queue","q","isScrubbing","liveui","percentAsDecimal","_muted","defaultMuted","_defaultMuted","isFS","isFullscreen_","fullscreenOptions","fsOptions","enterFullWindow","exitFullWindow","isFullWindow","docOrigOverflow","overflow","isPiP","isInPictureInPicture_","hotkeys","isContentEditable","excludeElement","handleHotkeys","_hotkeys$fullscreenKe","fullscreenKey","keydownEvent","_hotkeys$muteKey","muteKey","_hotkeys$playPauseKey","playPauseKey","FSToggle","selectSource","_this10","techs","findFirstPassingTechSourcePair","outerArray","innerArray","tester","outerChoice","innerChoice","finder","sourceOrder","_this11","filterSource","newsrc","srcobj","middlewareSource","src_","notSupportedMessage","setTech","str1","str2","_this12","sourceTech","_this13","doReset_","resetControlBarUI_","resetProgressBar_","resetPlaybackRate_","resetVolumeBar_","_this$controlBar","durationDisplay","currentSources","currentType","techAutoplay","newPoster","usingNativeControls_","suppressNotSupportedError","triggerSuppressedError","errorDisplay","userActivity_","mouseInProgress","lastMoveX","lastMoveY","handleActivity","screenX","screenY","isAudio_","toJSON","createModal","_this14","modal","updateCurrentBreakpoint_","currentBreakpoint","candidateBreakpoint","breakpoints_","breakpoint_","removeCurrentBreakpoint_","currentBreakpointClass","_breakpoints","responsive_","loadMedia","_this15","_this$cache_$media","artwork","tt","getMedia","baseOptions","tagOptions","dataSetup","_safeParseTuple","tuple_default","childName","video_es_navigator","html5","flash","userLanguage","navigationUI","pluginStorage","pluginExists","getPlugin","markPluginAsActive","triggerSetupEvent","before","createPluginFactory","PluginSubClass","plugin","getEventHash","Plugin","VERSION","isBasic","registerPlugin","basicPluginWrapper","createBasicPlugin","deregisterPlugin","getPlugins","getPluginVersion","BASE_PLUGIN_NAME","usingPlugin","hasPlugin","normalizeId","videojs$1","getPlayer","defaultView","hooks","hookFunction","PlayerComponent","hooks_","hook","hookOnce","original","removeHook","video_es_style","video_es_head","getPlayers","nId","_tag","_player","getAllPlayers","comp","use","writeable","extend","subClassMethods","methods","super_","addLanguage","_mergeOptions","createTimeRange","setFormatTime","customImplementation","resetFormatTime","xhr","dom","video_es_resolveUrl","baseURL","relativeURL","url_toolkit_default","buildAbsoluteURL","resolveManifestRedirect","handleManifestRedirect","req","responseURL","video_es_classCallCheck","video_es_createClass","video_es_inherits","video_es_possibleConstructorReturn","slicedToArray","_arr","_n","_d","_e","_s","sliceIterator","mergeOptions$1","EventTarget$1","log$1","forEachMediaGroup","master","mediaType","groupKey","labelKey","mediaProperties","updateMaster","mergedPlaylist","updateSegments","baseUri","resolvedUri","resolveSegmentUris","setupMediaPlaylists","resolveMediaGroupUris","refreshDelay","lastSegment","video_es_PlaylistLoader","PlaylistLoader","srcUrl","hls","_options$withCredenti","withCredentials","_options$handleManife","handleManifestRedirects","hls_","hlsOptions","customTagParsers","customTagMappers","playlistRequestError","haveMetadata","startingState","responseText","customParser","media_","mediaUpdateTimeout","stopRequest","finalRenditionTimeout","oldRequest","onreadystatechange","abort","isFinalRendition","mediaChange","started","intervalDuration","endSequence","expired","backward","forward","backwardDuration","forwardDuration","video_es_duration","sumDurations","startIndex","endIndex","durations","safeLiveIndex","distanceFromEnd","safeDistance","playlistEnd","useSafeLiveEnd","isWholeNumber","roundSignificantDigit","increment","numDecimalDigits","ceilLeastSignificantDigit","floorLeastSignificantDigit","isBlacklisted","excludeUntil","isIncompatible","isEnabled","blacklisted","isLowestEnabledRendition","currentBandwidth","MAX_VALUE","Playlist","getMediaInfoForTime","numSegments","mediaIndex","isDisabled","isAes","isFmp4","estimateSegmentRequestTime","segmentDuration","bandwidth","bytesReceived","videojsXHR","mergeOptions$1$1","xhrFactory","XhrFunction","beforeRequest","Hls","newOptions","reqResponse","responseTime","roundTripTime","requestTime","headers","responseHeaders","timedout","aborted","statusCode","originalAbort","segmentXhrHeaders","Range","byterangeEnd","byterangeStr","textRange","range","formatHexString","formatAsciiString","createTransferableMessage","transferable","isView","initSegmentId","initSegment","segmentKeyId","hexDump","utils","tagDump","textRanges","getProgramTime","_ref$time","matchedSegment","segmentEnd","videoTimingInfo","transmuxedPresentationEnd","estimatedStart","transmuxedPresentationStart","findSegmentForPlayerTime","seekTime","programTimeObject","mediaSeconds","programTime","playerTime","transmuxerPrependedSeconds","offsetFromSegmentStart","getTime","playerTimeToProgramTime","programDateTime","toISOString","seekToProgramTime","_ref2$retryCount","retryCount","seekTo","_ref2$pauseAfterSeek","pauseAfterSeek","verifyProgramDateTimeTags","lastSegmentStart","lastSegmentDuration","findSegmentForProgramTime","mediaOffset","comparisonTimeStamp","segmentDateTime","segmentTimeEpoch","getOffsetFromTimestamp","seekToTime","filterRanges","timeRanges","findRange","TIME_FUDGE_FACTOR","findNextRange","printableRange","strArr","timeRangesToArray","timeRangesList","removeCuesFromTrack","durationOfVideo","video_es_addTextTrackData","sourceHandler","captionArray","metadataArray","Cue","WebKitDataCue","caption","stream","inbandTextTracks_","timestampOffset","videoDuration","mediaSource_","cueTime","frames","frame","privateData","deprecateOldCue","metadataTrack_","cuesArray","cuesGroupedByStartTime","timeSlot","sortedStartTimes","idx","cueGroup","nextTime","TARGET","SCRIPT_TYPE","BlobBuilder","WebKitBlobBuilder","MozBlobBuilder","MSBlobBuilder","URL","webkitURL","msURL","Worker","shimWorker","filename","forceFallback","objURL","createSourceObject","worker","term","terminate","revokeObjectURL","wrapTerminate","selfShim","postMessage","onmessage","isThisThread","testWorker","testArray","createObjectURL","Blob","blob","getBlob","TransmuxWorker","document$$1","MAJOR_BRAND","MINOR_VERSION","AVC1_BRAND","VIDEO_HDLR","AUDIO_HDLR","HDLR_TYPES","VMHD","SMHD","DREF","STCO","STSC","STSZ","STTS","UINT32_MAX","pasp","setUint32","audioobjecttype","samplingfrequencyindex","trackFragments","videoSample","audioSample","avc1Box","sequenceParameterSets","pictureParameterSets","profileIdc","levelIdc","sarRatio","hSpacing","vSpacing","trackFragmentHeader","trackFragmentDecodeTime","trackFragmentRun","sampleDependencyTable","upperWordBaseMediaDecodeTime","lowerWordBaseMediaDecodeTime","audioTrun","videoTrun","trunHeader","durationPresent","sizePresent","flagsPresent","metaTable","secondsToVideoTs","secondsToAudioTs","videoTsToSeconds","audioTsToSeconds","audioTsToVideoTs","videoTsToAudioTs","metadataTsToSeconds","mp4Generator","fileType","movie","sampleForFrame","dts","keyFrame","frameUtils","nalUnits","currentNal","currentFrame","nalCount","nalUnitType","currentGop","gops","nalsByteLength","numberOfNals","highPrefix","lowPrefix","zeroFill","coneOfSilence","96000","88200","64000","48000","44100","32000","24000","16000","12000","11025","8000","silence","timestamp","sampleRate","timelineStartPts","keepOriginalTimestamps","clock","audioFrameUtils","audioAppendStartTs","videoBaseMediaDecodeTime","baseMediaDecodeTimeTs","frameDuration","silentFrame","firstFrame","audioGapDuration","audioFillFrameCount","audioFillDuration","ceil","adtsFrames","earliestAllowedDts","minSegmentDts","minSegmentPts","sum","sumFrameByteLengths","ONE_SECOND_IN_TS$1","trackDecodeInfo","maxSegmentDts","maxSegmentPts","timelineStartInfo","captionPacketParser","CaptionStream","captionPackets_","ccStreams_","Cea608Stream","cc","newCaptionPackets","escapedRBSP","latestDts_","ignoreNextEqualDts_","numSameDts_","flushCCStreams","flushType","flushStream","presortIndex","packet","dispatchCea608Packet","activeCea608Channel_","ccStream","setsTextOrXDSActive","setsChannel1Active","setsChannel2Active","CHARACTER_TRANSLATION","42","92","94","95","96","123","124","125","126","127","304","305","306","307","308","309","310","311","312","313","314","315","316","317","318","319","544","545","546","547","548","549","550","551","552","553","554","555","556","557","558","559","560","561","562","563","564","565","566","567","568","569","570","571","572","573","574","575","800","801","802","803","804","805","806","807","808","809","810","811","812","813","814","815","816","817","818","819","820","821","822","823","824","825","826","827","828","829","830","831","getCharFromCode","ROWS","createDisplayBuffer","BOTTOM_ROW","field","dataChannel","field_","dataChannel_","setConstants","swap","char0","char1","lastControlCode_","PADDING_","RESUME_CAPTION_LOADING_","mode_","END_OF_CAPTION_","clearFormatting","flushDisplayed","displayed_","nonDisplayed_","startPts_","ROLL_UP_2_ROWS_","rollUpRows_","setRollUp","ROLL_UP_3_ROWS_","ROLL_UP_4_ROWS_","CARRIAGE_RETURN_","shiftRowsUp_","BACKSPACE_","row_","ERASE_DISPLAYED_MEMORY_","ERASE_NON_DISPLAYED_MEMORY_","RESUME_DIRECT_CAPTIONING_","isSpecialCharacter","column_","isExtCharacter","isMidRowCode","addFormatting","isOffsetControlCode","isPAC","row","formatting_","isColorPAC","isNormalChar","startPts","endPts","topRow_","BASE_","EXT_","CONTROL_","OFFSET_","_char","newBaseRow","format","reverse","popOn","baseRow","rollUp","paintOn","captionStream","streamTypes","handleRollover","reference","direction","TimestampRolloverStream","lastDTS","referenceDTS","type_","_MetadataStream","timestampRolloverStream","percentEncode","parseUtf8","parseSyncSafeInteger","tagParsers","TXXX","WXXX","PRIV","owner","unescape","tagSize","dispatchType","frameStart","frameSize","dataAlignmentIndicator","timeStamp","_TransportPacketStream","_TransportParseStream","_ElementaryStream","metadataStream","TimestampRolloverStream$1","bytesInBuffer","everything","parsePsi","parsePat","parsePmt","packetsWaitingForPmt","programMapTable","psi","payloadUnitStartIndicator","pat","section_number","last_section_number","pmtPid","pmt","tableEnd","timed-metadata","pid","processPes_","STREAM_TYPES","h264","adts","timedMetadata","stream$$1","forceFlush","packetFlushable","packetData","pes","ptsDtsFlags","packetLength","parsePes","flushStreams_","m2ts","PAT_PID","MP2T_PACKET_LENGTH","TransportPacketStream","TransportParseStream","ElementaryStream","MetadataStream","_AdtsStream","m2ts_1","ONE_SECOND_IN_TS$2","ADTS_SAMPLING_FREQUENCIES","handlePartialSegments","frameNum","frameLength","protectionSkipBytes","frameEnd","oldBuffer","adtsFrameDuration","_H264Stream","_NalByteStream","PROFILES_WITH_OPTIONAL_SPS_DATA","expGolomb","workingData","workingBytesAvailable","workingWord","workingBitsAvailable","bitsAvailable","loadWord","workingBytes","availableBytes","skipBits","skipBytes","readBits","bits","valu","skipLeadingZeros","leadingZeroCount","skipUnsignedExpGolomb","skipExpGolomb","readUnsignedExpGolomb","clz","readExpGolomb","readBoolean","readUnsignedByte","syncPoint","swapBuffer","len","100","110","122","244","44","83","86","118","128","138","139","134","currentPts","currentDts","readSequenceParameterSet","skipScalingList","nalByteStream","expGolombDecoder","lastScale","nextScale","chromaFormatIdc","picOrderCntType","numRefFramesInPicOrderCntCycle","picWidthInMbsMinus1","picHeightInMapUnitsMinus1","frameMbsOnlyFlag","scalingListCount","frameCropLeftOffset","frameCropRightOffset","frameCropTopOffset","frameCropBottomOffset","sarScale","_AacStream","H264Stream","NalByteStream","byteIndex","returnSize","lowThree","middle","setTimestamp","bytesLeft","tempLength","_VideoSegmentStream","_AudioSegmentStream","_Transmuxer","_CoalesceStream","isLikelyAacData$1","ONE_SECOND_IN_TS$3","AUDIO_PROPERTIES","VIDEO_PROPERTIES","arrayEquals","generateVideoSegmentTimingInfo","startDts","endDts","prependedContentDuration","setEarliestDts","earliestDts","setVideoBaseMediaDecodeTime","setAudioAppendStart","gopsToAlignWith","minPTS","gopCache_","nalUnit","gopForFusion","firstGop","lastGop","resetStream_","getGopForFusion_","alignedGops","alignGopsAtEnd","alignGopsAtEnd_","alignGopsAtStart_","gop","dtsDistance","nearestGopObj","currentGopObj","nearestDistance","alignIndex","gopIndex","align","alignEndIndex","matchFound","trimIndex","total","alignGopsWith","newGopsToAlignWith","numberOfTracks","remux","remuxTracks","pendingTracks","videoTrack","pendingBoxes","pendingCaptions","pendingMetadata","pendingBytes","emittedTracks","output","audioTrack","id3","captionStreams","setRemux","hasFlushed","transmuxPipeline_","setupAacPipeline","pipeline","aacStream","audioTimestampRolloverStream","timedMetadataTimestampRolloverStream","adtsStream","coalesceStream","headOfPipeline","audioSegmentStream","hasAudio","hasVideo","setupTsPipeline","packetStream","elementaryStream","h264Stream","videoSegmentStream","id3Frame","setBaseMediaDecodeTime","isAac","resetCaptions","transmuxer","Transmuxer","VideoSegmentStream","AudioSegmentStream","MessageHandlers","transmuxer$$1","initArray","typedArray","action","gopInfo","videoSegmentTimingInfo","appendStart","messageHandlers","defaultCodecs","videoCodec","videoObjectTypeIndicator","audioProfile","translateLegacyCodecs","codecs","orig","profile","avcLevel","parseCodecs","parsed","codecCount","makeMimeTypeString","container","mimeTypesForPlaylist","containerType","getContainerType","codecInfo","mediaAttributes","CODECS","getCodecs","isMuxed","isMaat","audioGroup","groupId","audioGroupId","audioType","audioProfileFromDefault","codecStrings","justAudio","justVideo","bothVideoAudio","isAudioCodec","isVideoCodec","gopsSafeToAlignWith","mapping","currentTimePts","videoBuffer","audioBuffer","audioDisabled","arity","extents","videoBuffered","audioBuffered","VirtualSourceBuffer","_videojs$EventTarget","mediaSource","timestampOffset_","pendingBuffers_","bufferUpdating_","codecs_","audioCodec_","videoCodec_","audioDisabled_","appendAudioInitSegment_","gopBuffer_","timeMapping_","safeAppend_","transmuxer_","data_","done_","appendGopInfo_","videoSegmentTimingInfo_","videoBuffer_","audioBuffer_","appendWindowStart","updating","sourceBuffer","inBandMetadataTrackDispatchType","createTextTracksIfNecessary","processPendingSegments_","timingInfo","timingInfoInSeconds","decode","presentation","mimeType","addSourceBuffer","realBuffer_","makeWrappedSourceBuffer","nativeMediaSource_","updateGopBuffer","updatedBuffer","removeGopBuffer","sortedSegments","segmentObj","createRealSourceBuffers_","triggerUpdateend","concatAndAppendSegments_","destinationBuffer","tempBuffer","appendBuffer","originalError","video_es_HtmlMediaSource","HtmlMediaSource","MediaSource","activeSourceBuffers_","sourceBuffers","updateActiveSourceBuffers_","disableCombined","disableAudioOnly","onPlayerMediachange_","onHlsReset_","onHlsSegmentTimeMapping_","url_","sourcebuffer","parsedType","parameters","parameter","pair","parseContentType","urlCount","mediaSources","video_es_open","msObjectURL","swfId","video_es_supportsNativeMediaSources","isTypeSupported","supportsNativeMediaSources","URL$1","EventTarget$1$1","mergeOptions$2","updateMaster$1","oldMaster","newMaster","noChanges","minimumUpdatePeriod","playlistUpdate","group","_playlistUpdate","generateSidxKey","sidxInfo","sidxByteRangeEnd","compareSidxEntry","oldSidxMapping","newSidxMapping","currentSidxInfo","savedSidxInfo","requestSidx_","sidxRange","finishProcessingFn","responseType","video_es_DashPlaylistLoader","DashPlaylistLoader","srcUrlOrPlaylist","masterPlaylistLoader","refreshXml_","refreshMedia_","loadedPlaylists_","sidxMapping_","setupChildLoader","masterPlaylistLoader_","childPlaylist_","minimumUpdatePeriodTimeout_","mediaRequest_","doneFn","mp4_inspector_default","sidxMapping","sidxKey","sidxRequestFinished_","mpd_parser_es","masterXml_","manifestUri","clientOffset","clientOffset_","phonyUri","_phonyUri","haveMaster_","date","masterLoaded_","syncClientServerClock_","onClientServerClockSync_","utcTiming","serverTime","parseMasterXml","hasPendingRequest","masterXml","mediaGroupSidx","video_es_filterChangedSidxMappings","updatedMaster","mediaUri","logger","video_es_noop","SourceUpdater","sourceBufferEmitter","callbacks_","pendingCallback_","processedAppend_","mimeType_","logger_","createSourceBuffer_","sourceBuffer_","start_","started_","onUpdateendCallback_","pendingCallback","removing","runCallback_","queueCallback_","videoSegmentTimingInfoCallback","disposeFn","Config","GOAL_BUFFER_LENGTH","MAX_GOAL_BUFFER_LENGTH","GOAL_BUFFER_LENGTH_RATE","INITIAL_BANDWIDTH","BANDWIDTH_VARIANCE","BUFFER_LOW_WATER_LINE","MAX_BUFFER_LOW_WATER_LINE","BUFFER_LOW_WATER_LINE_RATE","REQUEST_ERRORS","abortAll","activeXhrs","handleErrors","waitForCompletion","decrypter","didError","endOfAllRequests","encryptedBytes","decryptionHandler","requestId","keyBytes","decryptSegment","handleProgress","progressFn","stats","progressEvent","loaded","getProgressStats","firstBytesReceivedAt","mediaSegmentRequest","xhrOptions","decryptionWorker","captionParser","keyXhr","errorObj","handleKeyResponse","initSegmentXhr","isInitialized","timescales","probe_default","video_es_handleInitSegmentResponse","segmentXhr","getRequestStats","fmp4Captions","handleSegmentResponse","video_es_safeGetComputedStyle","stableSort","sortFn","newArray","cmp","video_es_comparePlaylistBandwidth","leftBandwidth","rightBandwidth","finite","video_es_SegmentLoader","SegmentLoader","throughput","roundTrip","resetStats_","hasPlayed_","hasPlayed","currentTime_","seekable_","seeking_","loaderType_","loaderType","startingMedia_","segmentMetadataTrack_","segmentMetadataTrack","goalBufferLength_","goalBufferLength","sourceType_","sourceType","inbandTextTracks","state_","checkBufferTimeout_","currentTimeline_","pendingSegment_","sourceUpdater_","xhrOptions_","activeInitSegmentId_","initSegments_","cacheEncryptionKeys_","cacheEncryptionKeys","keyCache_","captionParser_","caption_parser_default","decrypter_","syncController_","syncController","syncPoint_","segmentIndex","ended_","fetchAtBuffer_","newState","mediaBytesTransferred","mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaSecondsLoaded","abort_","monitorBuffer_","abortRequests","_error","set$$1","storedMap","storedKey","playlist_","setDateTimeMapping","couldBeginLoading_","init_","sourceBufferEmitter_","resetEverything","newPlaylist","oldPlaylist","segmentInfo","syncInfo","oldId","mediaSequenceDiff","saveExpiredSegmentInfo","resyncLoader","_mimeType","resetLoader","clearAllCaptions","monitorBufferTick_","fillBuffer_","getSyncPoint","checkBuffer_","buffered_","isEndOfStream_","endOfStream","startOfSegment","loadSegment_","appendedLastSegment","detectEndOfStream","lastBufferedEnd","bufferedTime","getSyncSegmentCandidate_","generateSegmentInfo_","mediaSourceInfo","_mediaSourceInfo","segmentIndexArray","isSyncRequest","random","measuredBandwidth","requestTimeRemaining","timeUntilRebuffer$$1","timeUntilRebuffer","switchCandidate","duration$$1","compatiblePlaylists","enabledPlaylists","rebufferingEstimates","numRequests","rebufferingImpact","noRebufferingPlaylists","estimate","minRebufferMaxBandwidthSelector","timeSavedBySwitching","minimumTimeSaving","simpleSegment","abortRequestEarly_","trimBackBuffer_","createSimplifiedSegmentObj_","handleProgress_","segmentRequestFinished_","removeToTime","seekable$$1","safeBackBufferTrimTime","segmentKey","processSegmentResponse_","createCaptionsTrackIfNotExists","addCaptionData","clearParsedCaptions","handleSegment_","probeSegmentInfo","containsAudio","containsVideo","startingMedia","newSegmentMedia","illegalMediaSwitchError","blacklistDuration","segmentTimestampInfo","ptsStartTime","ptsTime","dtsStartTime","dtsTime","timelineMapping","mappingForTimeline","initId","_segmentInfo$segment","_segmentInfo$playlist","seq","_segmentInfo$playlist2","segmentInfoString","handleVideoSegmentTimingInfo_","handleUpdateEnd_","isWalkingForward","recordThroughput_","addSegmentMetadataCue_","segmentProcessingTime","segmentProcessingThroughput","uint8ToUtf8","uintArray","VTT_LINE_TERMINATORS","_char2","video_es_VTTSegmentLoader","_SegmentLoader","VTTSegmentLoader","subtitlesTrack_","combinedByteLength","combinedSegment","skipEmptySegments_","timestampOffsetForTimeline","loadHandler","errorHandler","requested","parseVTTCues_","updateTimeMapping_","timelines","decoder","decodeBytesToString","TextDecoder","timestampmap","MPEGTS","LOCAL","ontimestampmap","mapData","segmentData","mappingObj","diff","firstStart","lastStart","findAdCue","mediaTime","adStartTime","adEndTime","tsprobe","ts_inspector_default","syncPointStrategies","run","datetimeToDisplayTime","lastDistance","segmentStart","discontinuitySync","discontinuities","video_es_SyncController","SyncController","inspectCache_","syncPoints","runStrategies_","selectSyncPoint_","strategy","bestSyncPoint","bestDistance","bestStrategy","newDistance","lastRemovedSegment","playlistTimestamp","probeMp4Segment_","probeTsSegment_","calculateSegmentTimeMapping_","saveDiscontinuitySyncInfo_","timeInfo","segmentStartTime","segmentEndTime","accuracy","mediaIndexDiff","Decrypter$1","AsyncStream$$1","Decrypter$$1","decrypt$$1","audioTrackKind_","stopLoaders","segmentLoader","activePlaylistLoader","startLoaders","playlistLoader","onError","segmentLoaders","mediaTypes","blacklistCurrentPlaylist","activeTrack","activeGroup","defaultTrack","onTrackChanged","setupListeners","requestOptions","initialize","_settings$mediaTypes$","groups","variantLabel","_settings$mediaTypes$2","_settings$mediaTypes$3","setupMediaGroups","variants","onGroupChanged","_settings$segmentLoad","mainSegmentLoader","previousActiveLoader","_settings$segmentLoad2","onAudioTrackChanged","createMediaTypes","loaderStats","sumLoaderStat","stat","audioSegmentLoader_","mainSegmentLoader_","video_es_MasterPlaylistController","MasterPlaylistController","externHls","useCueTags","enableLowInitialPlaylist","seekTo_","useCueTags_","cueTagsTrack_","requestOptions_","mediaTypes_","handleSourceOpen_","segmentLoaderSettings","setupMasterPlaylistLoaderListeners_","subtitleSegmentLoader_","setupSegmentLoaderListeners_","requestTimeout","triggerPresenceUsage_","setupSourceBuffers_","setupFirstPlay","updatedPlaylist","excludeUnsupportedVariants_","selectedMedia","selectInitialPlaylist","selectPlaylist","initialMedia_","updateAdCues_","updateDuration","addSeekableRange","addSeekableRange_","onDurationchange","stuckAtPlaylistEnd_","defaultDemuxed","audioGroupKeys","nextPlaylist","currentPlaylist","forwardBuffer","bufferLowWaterLine","onSyncInfoUpdate_","onEndOfStream","ended","isEndOfStream","getExpiredTime","absolutePlaylistEnd","mainSeekable","audioSeekable","oldEnd","oldStart","oldDuration","newDuration","setDuration","mimeTypes","configureLoaderMimeTypes_","excludeIncompatibleVariants_","variant","codecString","variantCodecs","adOffset","adTotal","_segment$cueOutCont$s","_segment$cueOutCont$s2","video_es_updateAdCues","Representation","hlsHandler","loader","playlistUri","changePlaylistFn","mpc","masterPlaylistController_","qualityChangeFunction","smoothQualityChange","incompatible","currentlyEnabled","timerCancelEvents","video_es_PlaybackWatcher","PlaybackWatcher","allowSeeksWithinUnsafeLiveWindow","consecutiveUpdates","lastRecordedTime","timer_","checkCurrentTimeTimeout_","canPlayHandler","monitorCurrentTime_","waitingHandler","techWaiting_","cancelTimerHandler","cancelTimer_","fixesBadSeeksHandler","fixesBadSeeks_","checkCurrentTime_","waiting_","afterSeekableWindow_","beforeSeekableWindow_","currentRange","livePoint","nextRange","videoUnderflow_","difference","skipTheGap_","allowedEnd","gap","gapFromVideoUnderflow_","scheduledCurrentTime","gaps","findGaps","defaultOptions","errorInterval","getSource","IWillNotUseThisInPlugins","reloadSourceOnError","initPlugin","lastCalled","localOptions","loadedMetadataHandler","cleanupEvents","vhs","source_","Hls$1","STANDARD_PLAYLIST_SELECTOR","playerBandwidth","playerWidth","playerHeight","limitRenditionByPlayerDimensions","sortedPlaylistReps","enabledPlaylistReps","rep","bandwidthPlaylistReps","highestRemainingBandwidthRep","bandwidthBestRep","_chosenRep","haveResolution","resolutionBestRepList","resolutionBestRep","resolutionPlusOneList","resolutionPlusOneSmallest","resolutionPlusOneRep","chosenRep","video_es_simpleSelector","systemBandwidth","INITIAL_PLAYLIST_SELECTOR","comparePlaylistBandwidth","comparePlaylistResolution","leftWidth","rightWidth","simpleTypeFromSourceType","handleHlsMediaChange","qualityLevels","selectedIndex_","setupEmeOptions","eme","sourceOptions","keySystemOptions","videoPlaylist","audioPlaylist","keySystemContentTypes","keySystem","audioContentType","videoContentType","emeKeySystems","keySystems","initializeMediaKeys","getVhsLocalStorage","storedObject","supportsNativeHls","canItPlay","supportsNativeDash","supportsTypeNatively","Component$1","video_es_HlsHandler","HlsHandler","dash","setOptions_","overrideNative","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement","smoothQualityChange_","pauseLoading","useBandwidthFromLocalStorage","option","playbackWatcher_","invBandwidth","invThroughput","mediaRequests_","mediaRequestsAborted_","mediaRequestsTimedout_","mediaRequestsErrored_","mediaTransferDuration_","mediaBytesTransferred_","mediaSecondsLoaded_","currentTech","playerDimensions","objectToStore","updateVhsLocalStorage","representations","renditionSelectionMixin","setupQualityLevels_","qualityLevels_","addQualityLevel","getter","get$1","HlsSourceHandler","supportedType","doccy","topLevel","minDoc","reviver","searchInput","hasKeyCode","foundNamedKey","search","aliases","nameOrCode","backspace","tab","ctrl","alt","pause/break","caps lock","esc","space","page up","page down","home","up","down","insert","delete","command","left command","right command","numpad *","numpad +","numpad -","numpad .","numpad /","num lock","scroll lock","my computer","my calculator",";","=",",","-",".","/","`","[","\\","]","'","windows","⇧","⌥","⌃","⌘","ctl","control","break","caps","return","spc","spacebar","pgup","pgdn","ins","del","cmd","alias","isFunction","parseHeaders","xtend","initParams","params","createXHR","_createXHR","called","getBody","responseXML","firefoxBugTakenEffect","getXml","isJson","errorFunc","evt","timeoutTimer","failureResponse","loadFunc","useXDR","rawRequest","getAllResponseHeaders","XDomainRequest","XMLHttpRequest","onprogress","onabort","ontimeout","username","password","setRequestHeader","isEmpty","beforeSend","send","forEachArray","alert","confirm","prompt","define","getPolyfill","shim","boundTrim","that","boundLength","boundArgs","Empty","origKeys","keysShim","originalKeys","isEnumerable","propertyIsEnumerable","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","isArguments","isString","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","GetIntrinsic","$Object","$TypeError","$String","assertRecord","$isNaN","$isFinite","mod","IsCallable","toPrimitive","ES5","ToPrimitive","ToBoolean","ToNumber","ToInteger","ToInt32","ToUint32","ToUint16","posInt","ToObject","optMessage","SameValue","Type","IsPropertyDescriptor","Desc","[[Configurable]]","[[Enumerable]]","[[Get]]","[[Set]]","[[Value]]","[[Writable]]","isData","IsAccessor","IsAccessorDescriptor","IsDataDescriptor","IsGenericDescriptor","FromPropertyDescriptor","ToPropertyDescriptor","Obj","setter","$SyntaxError","Property Descriptor","recordType","argumentName","modulo","remain","isPrimitive","isCallable","ES5internalSlots","O","actualHint","input","polyfill","thisArg","forEachString","forEachObject","VTTRegion","cueShim","regionShim","nativeVTTCue","nativeVTTRegion","restore","_objCreate","F","ParsingError","errorData","parseTimeStamp","computeSeconds","f","Settings","parseOptions","keyValueDelim","groupDelim","kv","parseCue","regionList","oInput","consumeTimeStamp","ts","Errors","BadTimeStamp","skipWhitespace","substr","region","vals","vals0","integer","lineAlign","snapToLines","positionAlign","consumeCueSettings","BadSignature","dflt","defaultKey","ESCAPE","&","<",">","‎","‏"," ","TAG_NAME","u","ruby","rt","lang","TAG_ANNOTATION","NEEDS_PARENT","parseContent","nextToken","unescape1","shouldAdd","current","localName","annotation","rootDiv","tagStack","createProcessingInstruction","strongRTLRanges","isStrongRTLChar","determineBidi","nodeStack","pushNodes","nextTextNode","StyleBox","CueStyleBox","styleOptions","styles","display","writingMode","unicodeBidi","applyStyles","textAlign","font","whiteSpace","textPos","formatStyle","move","BoxPosition","lh","offsetTop","rects","getClientRects","lineHeight","moveBoxToLinePosition","styleBox","containerBox","boxPositions","boxPosition","linePos","textTrackList","mediaElement","computeLinePos","axis","maxPosition","initialAxis","calculatedPercentage","bestPosition","specifiedPosition","overlapsOppositeAxis","within","overlapsAny","intersectPercentage","findBestPosition","toCSSCompatValues","unit","toMove","overlaps","getSimpleBoxPosition","convertCueToDOMTree","cuetext","overlay","paddedOverlay","margin","hasBeenReset","shouldCompute","reportOrThrowError","collectNextLine","pos","parseHeader","parseTimestampMap","xy","anchor","lines","regionAnchorX","regionAnchorY","viewportAnchorX","viewportAnchorY","scroll","onregion","parseRegion","alreadyCollectedLine","hasSubstring","autoKeyword","directionSetting","","lr","rl","alignSetting","findAlignSetting","_id","_pauseOnExit","_startTime","_endTime","_text","_region","_vertical","_snapToLines","_line","_lineAlign","_position","_positionAlign","_size","_align","pauseOnExit","setting","findDirectionSetting","getCueAsHTML","scrollSetting","isValidPercentValue","_lines","_regionAnchorX","_regionAnchorY","_viewportAnchorX","_viewportAnchorY","_scroll","findScrollSetting","root","URL_REGEX","FIRST_SEGMENT_REGEX","SLASH_DOT_REGEX","SLASH_DOT_DOT_REGEX","URLToolkit","alwaysNormalize","basePartsForNormalise","parseURL","normalizePath","buildURLFromParts","relativeParts","scheme","baseParts","netLoc","builtParts","query","baseURLPath","newPath","lastIndexOf","parts","parseUTCTiming","global_window__WEBPACK_IMPORTED_MODULE_0__","global_window__WEBPACK_IMPORTED_MODULE_0___default","merge","objects","flatten","lists","urlToolkit","resolveUrl","baseUrl","relativeUrl","urlTypeToSegment","_ref$baseUrl","_ref$source","_ref$range","_ref$indexRange","indexRange","startRange","endRange","byteRangeToString","segmentRange","static","_attributes$timescale","sourceDuration","dynamic","NOW","availabilityStartTime","_attributes$timescale2","_attributes$start","_attributes$minimumUp","_attributes$timeShift","timeShiftBufferDepth","periodStartWC","periodDuration","segmentCount","availableStart","availableEnd","parseByDuration","_attributes$type","_attributes$timescale4","_segmentRange$type","_attributes$timescale3","periodIndex","_attributes$startNumb","startNumber","toSegments","segmentsFromBase","_attributes$initializ","initialization","_attributes$indexRang","sourceURL","segmentTimeInfo","addSegmentsToPlaylist","sidxByteRange","sidxEnd","mediaReferences","mergeDiscontiguousPlaylists","_acc$name$segments","addSegmentInfoFromSidx","sidxMatch","formatAudioPlaylist","_attributes","formatVttPlaylist","_attributes2","formatVideoPlaylist","_ref3","_attributes3","toM3u8","dashPlaylists","_mediaGroups","_dashPlaylists$0$attr","_dashPlaylists$0$attr2","videoPlaylists","_ref4","contentType","audioPlaylists","_ref5","vttPlaylists","_ref6","mainPlaylist","formattedPlaylists","roleLabel","organizeAudioPlaylists","subs","organizeVttPlaylists","getLiveRValue","parseByTimeline","segmentTimeline","_attributes$minimumUp2","_attributes$media","sIndex","repeat","segmentTime","nextS","identifierPattern","constructTemplateUrl","identifier","identifierReplacement","segmentsFromTemplate","templateValues","RepresentationID","Bandwidth","mapSegment","parseTemplateInfo","Time","segmentsFromList","_attributes$segmentUr","segmentUrls","segmentUrlMap","segmentUrlObject","segmentUrl","mediaRange","SegmentURLToSegmentObject","generateSegments","segmentAttributes","segmentsFn","template","segmentsInfo","_segmentAttributes","_segmentAttributes$ti","findChildren","getContent","parseDuration","_match$slice","year","month","day","hour","minute","second","parsers","mediaPresentationDuration","parsedValue","parseFn","keySystemsMap","urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","buildBaseUrls","referenceUrls","baseUrlElements","baseUrlElement","getSegmentInformation","adaptationSet","segmentTemplate","segmentList","segmentBase","segmentTimelineParentNode","segmentInitializationParentNode","segmentInitialization","generateKeySystemInformation","contentProtectionNodes","psshNode","psshBuffer","toRepresentations","periodAttributes","periodBaseUrls","periodSegmentInfo","adaptationSetAttributes","adaptationSetBaseUrls","roleAttributes","adaptationSetSegmentInfo","representation","repBaseUrlElements","repBaseUrls","representationSegmentInfo","inheritBaseUrls","inheritAttributes","mpd","_options","_options$manifestUri","_options$NOW","_options$clientOffset","periods","mpdAttributes","mpdBaseUrls","period","periodAtt","parsedPeriodId","adaptationSets","toAdaptationSets","stringToMpdXml","manifestString","xml","DOMParser","parseFromString","UTCTimingNode","parseUTCTimingScheme","probe","mapToSample","approximateOffset","parseCaptionNals","videoTrackId","mdats","captionNals","mdatTrafPairs","matchingTraf","seiNals","headerInfo","truns","seiNal","lastMatchedSample","matchingSample","findSeiNals","allSamples","parseSamples","segmentCache","parsedCaptions","parsingPartial","isPartial","isNewInit","parsedData","cachedSegment","parseEmbeddedCaptions","pushNals","nal","resetCaptionStream","cea708Parser","char","StreamTypes","ONE_SECOND_IN_TS","parseAudioPes_","pesType","pusi","endLoop","parsePesType","parsePayloadUnitStartIndicator","parsePesTime","parseVideoPes_","firstKeyFrame","videoPacketContainsKeyFrame","inspectTs_","parsePsi_","baseTimestamp","isLikelyAacData","audioCount","parseId3TagSize","parseAacTimestamp","parseAdtsSize","parseSampleRate","audioTimescale","inspectAac_","audioBaseTimestamp","videoBaseTimestamp","adjustTimestamp_","parsePid","parseAdaptionField","parseNalUnitType","payloadOffset","frameBuffer","frameI","frameSyncPoint","foundKeyFrame"],"mappings":"uGAEe,SAASA,EAAIC,EAAAC,EAAAC,GAiB5B,OAfIH,EADJ,qBAAAI,iBAAAC,IACQD,QAAAC,IAEA,SAAAJ,EAAAC,EAAAC,GACR,IAAAG,ECNe,SAAAC,EAAAL,GACf,MAAAM,OAAAC,UAAAC,eAAAC,KAAAJ,EAAAL,IAEA,QADAK,EAAaC,OAAAI,EAAA,EAAAJ,CAAcD,MAI3B,OAAAA,EDAiBM,CAAaZ,EAAAC,GAC9B,GAAAI,EAAA,CACA,IAAAQ,EAAAN,OAAAO,yBAAAT,EAAAJ,GAEA,OAAAY,EAAAT,IACAS,EAAAT,IAAAM,KAAAR,GAGAW,EAAAE,SAIaf,EAAAC,EAAAC,GAAAF,GAnBbgB,EAAAC,EAAAC,EAAA,sBAAAnB,sCEEAiB,EAAQ,IAERA,EAAQ,6DCFRT,OAAAY,eAAAC,EAAA,cACAL,OAAA,IAGA,IAEAM,EAAAC,EAFuBN,EAAQ,KAM/BO,EAAAD,EAFoBN,EAAQ,KAM5BQ,EAAAF,EAFkCN,EAAQ,KAM1CS,EAAAH,EAFiBN,EAAQ,KAIzBU,EAAkBV,EAAQ,KAE1BW,EAAAL,EAAAI,GAIAE,EAEA,SAAAC,GACA,GAAAA,KAAAC,WACA,OAAAD,EAEA,IAAAE,EAAA,GAEA,SAAAF,EACA,QAAAG,KAAAH,EACAtB,OAAAC,UAAAC,eAAAC,KAAAm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PrototypeOf\";\nimport superPropBase from \"./superPropBase\";\nexport default function _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}","import getPrototypeOf from \"./getPrototypeOf\";\nexport default function _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}","'use strict';\n\nrequire('../../style/css');\n\nrequire('./index.css');","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require('babel-runtime/helpers/inherits');\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _rcCollapse = require('rc-collapse');\n\nvar _rcCollapse2 = _interopRequireDefault(_rcCollapse);\n\nvar _react = require('react');\n\nvar React = _interopRequireWildcard(_react);\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj['default'] = obj;\n return newObj;\n }\n}\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nvar Accordion = function (_React$Component) {\n (0, _inherits3['default'])(Accordion, _React$Component);\n\n function Accordion() {\n (0, _classCallCheck3['default'])(this, Accordion);\n return (0, _possibleConstructorReturn3['default'])(this, (Accordion.__proto__ || Object.getPrototypeOf(Accordion)).apply(this, arguments));\n }\n\n (0, _createClass3['default'])(Accordion, [{\n key: 'render',\n value: function render() {\n return React.createElement(_rcCollapse2['default'], this.props);\n }\n }]);\n return Accordion;\n}(React.Component);\n\nexports['default'] = Accordion;\nAccordion.Panel = _rcCollapse.Panel;\nAccordion.defaultProps = {\n prefixCls: 'am-accordion'\n};\nmodule.exports = exports['default'];","var win;\n\nif (typeof window !== \"undefined\") {\n win = window;\n} else if (typeof global !== \"undefined\") {\n win = global;\n} else if (typeof self !== \"undefined\") {\n win = self;\n} else {\n win = {};\n}\n\nmodule.exports = win;","var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nvar PanelContent = function (_Component) {\n _inherits(PanelContent, _Component);\n\n function PanelContent() {\n _classCallCheck(this, PanelContent);\n\n return _possibleConstructorReturn(this, (PanelContent.__proto__ || Object.getPrototypeOf(PanelContent)).apply(this, arguments));\n }\n\n _createClass(PanelContent, [{\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate(nextProps) {\n return this.props.forceRender || this.props.isActive || nextProps.isActive;\n }\n }, {\n key: 'render',\n value: function render() {\n var _classnames;\n\n this._isActived = this.props.forceRender || this._isActived || this.props.isActive;\n\n if (!this._isActived) {\n return null;\n }\n\n var _props = this.props,\n prefixCls = _props.prefixCls,\n isActive = _props.isActive,\n children = _props.children,\n destroyInactivePanel = _props.destroyInactivePanel,\n forceRender = _props.forceRender,\n role = _props.role;\n var contentCls = classnames((_classnames = {}, _defineProperty(_classnames, prefixCls + '-content', true), _defineProperty(_classnames, prefixCls + '-content-active', isActive), _defineProperty(_classnames, prefixCls + '-content-inactive', !isActive), _classnames));\n var child = !forceRender && !isActive && destroyInactivePanel ? null : React.createElement('div', {\n className: prefixCls + '-content-box'\n }, children);\n return React.createElement('div', {\n className: contentCls,\n role: role\n }, child);\n }\n }]);\n\n return PanelContent;\n}(Component);\n\nPanelContent.propTypes = {\n prefixCls: PropTypes.string,\n isActive: PropTypes.bool,\n children: PropTypes.any,\n destroyInactivePanel: PropTypes.bool,\n forceRender: PropTypes.bool,\n role: PropTypes.string\n};\nexport default PanelContent;","var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport PanelContent from './PanelContent';\nimport Animate from 'rc-animate';\n\nvar CollapsePanel = function (_Component) {\n _inherits(CollapsePanel, _Component);\n\n function CollapsePanel() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, CollapsePanel);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = CollapsePanel.__proto__ || Object.getPrototypeOf(CollapsePanel)).call.apply(_ref, [this].concat(args))), _this), _this.handleItemClick = function () {\n if (_this.props.onItemClick) {\n _this.props.onItemClick();\n }\n }, _this.handleKeyPress = function (e) {\n if (e.key === 'Enter' || e.keyCode === 13 || e.which === 13) {\n _this.handleItemClick();\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(CollapsePanel, [{\n key: 'render',\n value: function render() {\n var _classNames2;\n\n var _props = this.props,\n className = _props.className,\n id = _props.id,\n style = _props.style,\n prefixCls = _props.prefixCls,\n header = _props.header,\n headerClass = _props.headerClass,\n children = _props.children,\n isActive = _props.isActive,\n showArrow = _props.showArrow,\n destroyInactivePanel = _props.destroyInactivePanel,\n disabled = _props.disabled,\n accordion = _props.accordion,\n forceRender = _props.forceRender;\n var headerCls = classNames(prefixCls + '-header', _defineProperty({}, headerClass, headerClass));\n var itemCls = classNames((_classNames2 = {}, _defineProperty(_classNames2, prefixCls + '-item', true), _defineProperty(_classNames2, prefixCls + '-item-active', isActive), _defineProperty(_classNames2, prefixCls + '-item-disabled', disabled), _classNames2), className);\n return React.createElement('div', {\n className: itemCls,\n style: style,\n id: id\n }, React.createElement('div', {\n className: headerCls,\n onClick: this.handleItemClick,\n role: accordion ? 'tab' : 'button',\n tabIndex: disabled ? -1 : 0,\n 'aria-expanded': '' + isActive,\n onKeyPress: this.handleKeyPress\n }, showArrow && React.createElement('i', {\n className: 'arrow'\n }), header), React.createElement(Animate, {\n showProp: 'isActive',\n exclusive: true,\n component: '',\n animation: this.props.openAnimation\n }, React.createElement(PanelContent, {\n prefixCls: prefixCls,\n isActive: isActive,\n destroyInactivePanel: destroyInactivePanel,\n forceRender: forceRender,\n role: accordion ? 'tabpanel' : null\n }, children)));\n }\n }]);\n\n return CollapsePanel;\n}(Component);\n\nCollapsePanel.propTypes = {\n className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n id: PropTypes.string,\n children: PropTypes.any,\n openAnimation: PropTypes.object,\n prefixCls: PropTypes.string,\n header: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.node]),\n headerClass: PropTypes.string,\n showArrow: PropTypes.bool,\n isActive: PropTypes.bool,\n onItemClick: PropTypes.func,\n style: PropTypes.object,\n destroyInactivePanel: PropTypes.bool,\n disabled: PropTypes.bool,\n accordion: PropTypes.bool,\n forceRender: PropTypes.bool\n};\nCollapsePanel.defaultProps = {\n showArrow: true,\n isActive: false,\n destroyInactivePanel: false,\n onItemClick: function onItemClick() {},\n headerClass: '',\n forceRender: false\n};\nexport default CollapsePanel;","import cssAnimation from 'css-animation';\n\nfunction animate(node, show, transitionName, done) {\n var height = void 0;\n return cssAnimation(node, transitionName, {\n start: function start() {\n if (!show) {\n node.style.height = node.offsetHeight + 'px';\n } else {\n height = node.offsetHeight;\n node.style.height = 0;\n }\n },\n active: function active() {\n node.style.height = (show ? height : 0) + 'px';\n },\n end: function end() {\n node.style.height = '';\n done();\n }\n });\n}\n\nfunction animation(prefixCls) {\n return {\n enter: function enter(node, done) {\n return animate(node, true, prefixCls + '-anim', done);\n },\n leave: function leave(node, done) {\n return animate(node, false, prefixCls + '-anim', done);\n }\n };\n}\n\nexport default animation;","var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _toConsumableArray(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nimport React, { Component, Children } from 'react';\nimport PropTypes from 'prop-types';\nimport CollapsePanel from './Panel';\nimport openAnimationFactory from './openAnimationFactory';\nimport classNames from 'classnames';\n\nfunction toArray(activeKey) {\n var currentActiveKey = activeKey;\n\n if (!Array.isArray(currentActiveKey)) {\n currentActiveKey = currentActiveKey ? [currentActiveKey] : [];\n }\n\n return currentActiveKey;\n}\n\nvar Collapse = function (_Component) {\n _inherits(Collapse, _Component);\n\n function Collapse(props) {\n _classCallCheck(this, Collapse);\n\n var _this = _possibleConstructorReturn(this, (Collapse.__proto__ || Object.getPrototypeOf(Collapse)).call(this, props));\n\n var _this$props = _this.props,\n activeKey = _this$props.activeKey,\n defaultActiveKey = _this$props.defaultActiveKey;\n var currentActiveKey = defaultActiveKey;\n\n if ('activeKey' in _this.props) {\n currentActiveKey = activeKey;\n }\n\n _this.state = {\n openAnimation: _this.props.openAnimation || openAnimationFactory(_this.props.prefixCls),\n activeKey: toArray(currentActiveKey)\n };\n return _this;\n }\n\n _createClass(Collapse, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if ('activeKey' in nextProps) {\n this.setState({\n activeKey: toArray(nextProps.activeKey)\n });\n }\n\n if ('openAnimation' in nextProps) {\n this.setState({\n openAnimation: nextProps.openAnimation\n });\n }\n }\n }, {\n key: 'onClickItem',\n value: function onClickItem(key) {\n var activeKey = this.state.activeKey;\n\n if (this.props.accordion) {\n activeKey = activeKey[0] === key ? [] : [key];\n } else {\n activeKey = [].concat(_toConsumableArray(activeKey));\n var index = activeKey.indexOf(key);\n var isActive = index > -1;\n\n if (isActive) {\n // remove active state\n activeKey.splice(index, 1);\n } else {\n activeKey.push(key);\n }\n }\n\n this.setActiveKey(activeKey);\n }\n }, {\n key: 'getItems',\n value: function getItems() {\n var _this2 = this;\n\n var activeKey = this.state.activeKey;\n var _props = this.props,\n prefixCls = _props.prefixCls,\n accordion = _props.accordion,\n destroyInactivePanel = _props.destroyInactivePanel;\n var newChildren = [];\n Children.forEach(this.props.children, function (child, index) {\n if (!child) return; // If there is no key provide, use the panel order as default key\n\n var key = child.key || String(index);\n var _child$props = child.props,\n header = _child$props.header,\n headerClass = _child$props.headerClass,\n disabled = _child$props.disabled;\n var isActive = false;\n\n if (accordion) {\n isActive = activeKey[0] === key;\n } else {\n isActive = activeKey.indexOf(key) > -1;\n }\n\n var props = {\n key: key,\n header: header,\n headerClass: headerClass,\n isActive: isActive,\n prefixCls: prefixCls,\n destroyInactivePanel: destroyInactivePanel,\n openAnimation: _this2.state.openAnimation,\n accordion: accordion,\n children: child.props.children,\n onItemClick: disabled ? null : function () {\n return _this2.onClickItem(key);\n }\n };\n newChildren.push(React.cloneElement(child, props));\n });\n return newChildren;\n }\n }, {\n key: 'setActiveKey',\n value: function setActiveKey(activeKey) {\n if (!('activeKey' in this.props)) {\n this.setState({\n activeKey: activeKey\n });\n }\n\n this.props.onChange(this.props.accordion ? activeKey[0] : activeKey);\n }\n }, {\n key: 'render',\n value: function render() {\n var _classNames;\n\n var _props2 = this.props,\n prefixCls = _props2.prefixCls,\n className = _props2.className,\n style = _props2.style,\n accordion = _props2.accordion;\n var collapseClassName = classNames((_classNames = {}, _defineProperty(_classNames, prefixCls, true), _defineProperty(_classNames, className, !!className), _classNames));\n return React.createElement('div', {\n className: collapseClassName,\n style: style,\n role: accordion ? 'tablist' : null\n }, this.getItems());\n }\n }]);\n\n return Collapse;\n}(Component);\n\nCollapse.propTypes = {\n children: PropTypes.any,\n prefixCls: PropTypes.string,\n activeKey: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n defaultActiveKey: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n openAnimation: PropTypes.object,\n onChange: PropTypes.func,\n accordion: PropTypes.bool,\n className: PropTypes.string,\n style: PropTypes.object,\n destroyInactivePanel: PropTypes.bool\n};\nCollapse.defaultProps = {\n prefixCls: 'rc-collapse',\n onChange: function onChange() {},\n accordion: false,\n destroyInactivePanel: false\n};\nCollapse.Panel = CollapsePanel;\nexport default Collapse;","import Collapse from './Collapse';\nexport default Collapse;\nexport var Panel = Collapse.Panel;","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar constructorRegex = /^\\s*class\\b/;\n\nvar isES6ClassFn = function isES6ClassFunction(value) {\n try {\n var fnStr = fnToStr.call(value);\n return constructorRegex.test(fnStr);\n } catch (e) {\n return false; // not a function\n }\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n try {\n if (isES6ClassFn(value)) {\n return false;\n }\n\n fnToStr.call(value);\n return true;\n } catch (e) {\n return false;\n }\n};\n\nvar toStr = Object.prototype.toString;\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\n\nmodule.exports = function isCallable(value) {\n if (!value) {\n return false;\n }\n\n if (typeof value !== 'function' && typeof value !== 'object') {\n return false;\n }\n\n if (typeof value === 'function' && !value.prototype) {\n return true;\n }\n\n if (hasToStringTag) {\n return tryFunctionObject(value);\n }\n\n if (isES6ClassFn(value)) {\n return false;\n }\n\n var strClass = toStr.call(value);\n return strClass === fnClass || strClass === genClass;\n};","/**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Utilities to detect basic properties and metadata about MP4s.\n */\n'use strict';\n\nvar toUnsigned = require('../utils/bin').toUnsigned;\n\nvar toHexString = require('../utils/bin').toHexString;\n\nvar _findBox, parseType, timescale, startTime, getVideoTrackIds, getTracks; // Find the data for a box specified by its path\n\n\n_findBox = function findBox(data, path) {\n var results = [],\n i,\n size,\n type,\n end,\n subresults;\n\n if (!path.length) {\n // short-circuit the search for empty paths\n return null;\n }\n\n for (i = 0; i < data.byteLength;) {\n size = toUnsigned(data[i] << 24 | data[i + 1] << 16 | data[i + 2] << 8 | data[i + 3]);\n type = parseType(data.subarray(i + 4, i + 8));\n end = size > 1 ? i + size : data.byteLength;\n\n if (type === path[0]) {\n if (path.length === 1) {\n // this is the end of the path and we've found the box we were\n // looking for\n results.push(data.subarray(i + 8, end));\n } else {\n // recursively search for the next box along the path\n subresults = _findBox(data.subarray(i + 8, end), path.slice(1));\n\n if (subresults.length) {\n results = results.concat(subresults);\n }\n }\n }\n\n i = end;\n } // we've finished searching all of data\n\n\n return results;\n};\n/**\n * Returns the string representation of an ASCII encoded four byte buffer.\n * @param buffer {Uint8Array} a four-byte buffer to translate\n * @return {string} the corresponding string\n */\n\n\nparseType = function parseType(buffer) {\n var result = '';\n result += String.fromCharCode(buffer[0]);\n result += String.fromCharCode(buffer[1]);\n result += String.fromCharCode(buffer[2]);\n result += String.fromCharCode(buffer[3]);\n return result;\n};\n/**\n * Parses an MP4 initialization segment and extracts the timescale\n * values for any declared tracks. Timescale values indicate the\n * number of clock ticks per second to assume for time-based values\n * elsewhere in the MP4.\n *\n * To determine the start time of an MP4, you need two pieces of\n * information: the timescale unit and the earliest base media decode\n * time. Multiple timescales can be specified within an MP4 but the\n * base media decode time is always expressed in the timescale from\n * the media header box for the track:\n * ```\n * moov > trak > mdia > mdhd.timescale\n * ```\n * @param init {Uint8Array} the bytes of the init segment\n * @return {object} a hash of track ids to timescale values or null if\n * the init segment is malformed.\n */\n\n\ntimescale = function timescale(init) {\n var result = {},\n traks = _findBox(init, ['moov', 'trak']); // mdhd timescale\n\n\n return traks.reduce(function (result, trak) {\n var tkhd, version, index, id, mdhd;\n tkhd = _findBox(trak, ['tkhd'])[0];\n\n if (!tkhd) {\n return null;\n }\n\n version = tkhd[0];\n index = version === 0 ? 12 : 20;\n id = toUnsigned(tkhd[index] << 24 | tkhd[index + 1] << 16 | tkhd[index + 2] << 8 | tkhd[index + 3]);\n mdhd = _findBox(trak, ['mdia', 'mdhd'])[0];\n\n if (!mdhd) {\n return null;\n }\n\n version = mdhd[0];\n index = version === 0 ? 12 : 20;\n result[id] = toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]);\n return result;\n }, result);\n};\n/**\n * Determine the base media decode start time, in seconds, for an MP4\n * fragment. If multiple fragments are specified, the earliest time is\n * returned.\n *\n * The base media decode time can be parsed from track fragment\n * metadata:\n * ```\n * moof > traf > tfdt.baseMediaDecodeTime\n * ```\n * It requires the timescale value from the mdhd to interpret.\n *\n * @param timescale {object} a hash of track ids to timescale values.\n * @return {number} the earliest base media decode start time for the\n * fragment, in seconds\n */\n\n\nstartTime = function startTime(timescale, fragment) {\n var trafs, baseTimes, result; // we need info from two childrend of each track fragment box\n\n trafs = _findBox(fragment, ['moof', 'traf']); // determine the start times for each track\n\n baseTimes = [].concat.apply([], trafs.map(function (traf) {\n return _findBox(traf, ['tfhd']).map(function (tfhd) {\n var id, scale, baseTime; // get the track id from the tfhd\n\n id = toUnsigned(tfhd[4] << 24 | tfhd[5] << 16 | tfhd[6] << 8 | tfhd[7]); // assume a 90kHz clock if no timescale was specified\n\n scale = timescale[id] || 90e3; // get the base media decode time from the tfdt\n\n baseTime = _findBox(traf, ['tfdt']).map(function (tfdt) {\n var version, result;\n version = tfdt[0];\n result = toUnsigned(tfdt[4] << 24 | tfdt[5] << 16 | tfdt[6] << 8 | tfdt[7]);\n\n if (version === 1) {\n result *= Math.pow(2, 32);\n result += toUnsigned(tfdt[8] << 24 | tfdt[9] << 16 | tfdt[10] << 8 | tfdt[11]);\n }\n\n return result;\n })[0];\n baseTime = baseTime || Infinity; // convert base time to seconds\n\n return baseTime / scale;\n });\n })); // return the minimum\n\n result = Math.min.apply(null, baseTimes);\n return isFinite(result) ? result : 0;\n};\n/**\n * Find the trackIds of the video tracks in this source.\n * Found by parsing the Handler Reference and Track Header Boxes:\n * moov > trak > mdia > hdlr\n * moov > trak > tkhd\n *\n * @param {Uint8Array} init - The bytes of the init segment for this source\n * @return {Number[]} A list of trackIds\n *\n * @see ISO-BMFF-12/2015, Section 8.4.3\n **/\n\n\ngetVideoTrackIds = function getVideoTrackIds(init) {\n var traks = _findBox(init, ['moov', 'trak']);\n\n var videoTrackIds = [];\n traks.forEach(function (trak) {\n var hdlrs = _findBox(trak, ['mdia', 'hdlr']);\n\n var tkhds = _findBox(trak, ['tkhd']);\n\n hdlrs.forEach(function (hdlr, index) {\n var handlerType = parseType(hdlr.subarray(8, 12));\n var tkhd = tkhds[index];\n var view;\n var version;\n var trackId;\n\n if (handlerType === 'vide') {\n view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n version = view.getUint8(0);\n trackId = version === 0 ? view.getUint32(12) : view.getUint32(20);\n videoTrackIds.push(trackId);\n }\n });\n });\n return videoTrackIds;\n};\n/**\n * Get all the video, audio, and hint tracks from a non fragmented\n * mp4 segment\n */\n\n\ngetTracks = function getTracks(init) {\n var traks = _findBox(init, ['moov', 'trak']);\n\n var tracks = [];\n traks.forEach(function (trak) {\n var track = {};\n\n var tkhd = _findBox(trak, ['tkhd'])[0];\n\n var view, version; // id\n\n if (tkhd) {\n view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n version = view.getUint8(0);\n track.id = version === 0 ? view.getUint32(12) : view.getUint32(20);\n }\n\n var hdlr = _findBox(trak, ['mdia', 'hdlr'])[0]; // type\n\n\n if (hdlr) {\n var type = parseType(hdlr.subarray(8, 12));\n\n if (type === 'vide') {\n track.type = 'video';\n } else if (type === 'soun') {\n track.type = 'audio';\n } else {\n track.type = type;\n }\n } // codec\n\n\n var stsd = _findBox(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0];\n\n if (stsd) {\n var sampleDescriptions = stsd.subarray(8); // gives the codec type string\n\n track.codec = parseType(sampleDescriptions.subarray(4, 8));\n\n var codecBox = _findBox(sampleDescriptions, [track.codec])[0];\n\n var codecConfig, codecConfigType;\n\n if (codecBox) {\n // https://tools.ietf.org/html/rfc6381#section-3.3\n if (/^[a-z]vc[1-9]$/i.test(track.codec)) {\n // we don't need anything but the \"config\" parameter of the\n // avc1 codecBox\n codecConfig = codecBox.subarray(78);\n codecConfigType = parseType(codecConfig.subarray(4, 8));\n\n if (codecConfigType === 'avcC' && codecConfig.length > 11) {\n track.codec += '.'; // left padded with zeroes for single digit hex\n // profile idc\n\n track.codec += toHexString(codecConfig[9]); // the byte containing the constraint_set flags\n\n track.codec += toHexString(codecConfig[10]); // level idc\n\n track.codec += toHexString(codecConfig[11]);\n } else {\n // TODO: show a warning that we couldn't parse the codec\n // and are using the default\n track.codec = 'avc1.4d400d';\n }\n } else if (/^mp4[a,v]$/i.test(track.codec)) {\n // we do not need anything but the streamDescriptor of the mp4a codecBox\n codecConfig = codecBox.subarray(28);\n codecConfigType = parseType(codecConfig.subarray(4, 8));\n\n if (codecConfigType === 'esds' && codecConfig.length > 20 && codecConfig[19] !== 0) {\n track.codec += '.' + toHexString(codecConfig[19]); // this value is only a single digit\n\n track.codec += '.' + toHexString(codecConfig[20] >>> 2 & 0x3f).replace(/^0/, '');\n } else {\n // TODO: show a warning that we couldn't parse the codec\n // and are using the default\n track.codec = 'mp4a.40.2';\n }\n } else {// TODO: show a warning? for unknown codec type\n }\n }\n }\n\n var mdhd = _findBox(trak, ['mdia', 'mdhd'])[0];\n\n if (mdhd && tkhd) {\n var index = version === 0 ? 12 : 20;\n track.timescale = toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]);\n }\n\n tracks.push(track);\n });\n return tracks;\n};\n\nmodule.exports = {\n findBox: _findBox,\n parseType: parseType,\n timescale: timescale,\n startTime: startTime,\n videoTrackIds: getVideoTrackIds,\n tracks: getTracks\n};","'use strict';\n\nvar keys = require('object-keys');\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar origDefineProperty = Object.defineProperty;\n\nvar isFunction = function isFunction(fn) {\n return typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar arePropertyDescriptorsSupported = function arePropertyDescriptorsSupported() {\n var obj = {};\n\n try {\n origDefineProperty(obj, 'x', {\n enumerable: false,\n value: obj\n }); // eslint-disable-next-line no-unused-vars, no-restricted-syntax\n\n for (var _ in obj) {\n // jscs:ignore disallowUnusedVariables\n return false;\n }\n\n return obj.x === obj;\n } catch (e) {\n /* this is IE 8. */\n return false;\n }\n};\n\nvar supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();\n\nvar defineProperty = function defineProperty(object, name, value, predicate) {\n if (name in object && (!isFunction(predicate) || !predicate())) {\n return;\n }\n\n if (supportsDescriptors) {\n origDefineProperty(object, name, {\n configurable: true,\n enumerable: false,\n value: value,\n writable: true\n });\n } else {\n object[name] = value;\n }\n};\n\nvar defineProperties = function defineProperties(object, map) {\n var predicates = arguments.length > 2 ? arguments[2] : {};\n var props = keys(map);\n\n if (hasSymbols) {\n props = concat.call(props, Object.getOwnPropertySymbols(map));\n }\n\n for (var i = 0; i < props.length; i += 1) {\n defineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n }\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\nmodule.exports = defineProperties;","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n var str = toStr.call(value);\n var isArgs = str === '[object Arguments]';\n\n if (!isArgs) {\n isArgs = str !== '[object Array]' && value !== null && typeof value === 'object' && typeof value.length === 'number' && value.length >= 0 && toStr.call(value.callee) === '[object Function]';\n }\n\n return isArgs;\n};","'use strict';\n\nvar bind = require('function-bind');\n\nvar ES = require('es-abstract/es5');\n\nvar replace = bind.call(Function.call, String.prototype.replace);\n/* eslint-disable no-control-regex */\n\nvar leftWhitespace = /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n var S = ES.ToString(ES.CheckObjectCoercible(this));\n return replace(replace(S, leftWhitespace, ''), rightWhitespace, '');\n};","'use strict';\n/* globals\n\tSet,\n\tMap,\n\tWeakSet,\n\tWeakMap,\n\n\tPromise,\n\n\tSymbol,\n\tProxy,\n\n\tAtomics,\n\tSharedArrayBuffer,\n\n\tArrayBuffer,\n\tDataView,\n\tUint8Array,\n\tFloat32Array,\n\tFloat64Array,\n\tInt8Array,\n\tInt16Array,\n\tInt32Array,\n\tUint8ClampedArray,\n\tUint16Array,\n\tUint32Array,\n*/\n\nvar undefined; // eslint-disable-line no-shadow-restricted-names\n\nvar ThrowTypeError = Object.getOwnPropertyDescriptor ? function () {\n return Object.getOwnPropertyDescriptor(arguments, 'callee').get;\n}() : function () {\n throw new TypeError();\n};\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar getProto = Object.getPrototypeOf || function (x) {\n return x.__proto__;\n}; // eslint-disable-line no-proto\n\n\nvar generator; // = function * () {};\n\nvar generatorFunction = generator ? getProto(generator) : undefined;\nvar asyncFn; // async function() {};\n\nvar asyncFunction = asyncFn ? asyncFn.constructor : undefined;\nvar asyncGen; // async function * () {};\n\nvar asyncGenFunction = asyncGen ? getProto(asyncGen) : undefined;\nvar asyncGenIterator = asyncGen ? asyncGen() : undefined;\nvar TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);\nvar INTRINSICS = {\n '$ %Array%': Array,\n '$ %ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n '$ %ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer.prototype,\n '$ %ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,\n '$ %ArrayPrototype%': Array.prototype,\n '$ %ArrayProto_entries%': Array.prototype.entries,\n '$ %ArrayProto_forEach%': Array.prototype.forEach,\n '$ %ArrayProto_keys%': Array.prototype.keys,\n '$ %ArrayProto_values%': Array.prototype.values,\n '$ %AsyncFromSyncIteratorPrototype%': undefined,\n '$ %AsyncFunction%': asyncFunction,\n '$ %AsyncFunctionPrototype%': asyncFunction ? asyncFunction.prototype : undefined,\n '$ %AsyncGenerator%': asyncGen ? getProto(asyncGenIterator) : undefined,\n '$ %AsyncGeneratorFunction%': asyncGenFunction,\n '$ %AsyncGeneratorPrototype%': asyncGenFunction ? asyncGenFunction.prototype : undefined,\n '$ %AsyncIteratorPrototype%': asyncGenIterator && hasSymbols && Symbol.asyncIterator ? asyncGenIterator[Symbol.asyncIterator]() : undefined,\n '$ %Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n '$ %Boolean%': Boolean,\n '$ %BooleanPrototype%': Boolean.prototype,\n '$ %DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n '$ %DataViewPrototype%': typeof DataView === 'undefined' ? undefined : DataView.prototype,\n '$ %Date%': Date,\n '$ %DatePrototype%': Date.prototype,\n '$ %decodeURI%': decodeURI,\n '$ %decodeURIComponent%': decodeURIComponent,\n '$ %encodeURI%': encodeURI,\n '$ %encodeURIComponent%': encodeURIComponent,\n '$ %Error%': Error,\n '$ %ErrorPrototype%': Error.prototype,\n '$ %eval%': eval,\n // eslint-disable-line no-eval\n '$ %EvalError%': EvalError,\n '$ %EvalErrorPrototype%': EvalError.prototype,\n '$ %Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n '$ %Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined : Float32Array.prototype,\n '$ %Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n '$ %Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined : Float64Array.prototype,\n '$ %Function%': Function,\n '$ %FunctionPrototype%': Function.prototype,\n '$ %Generator%': generator ? getProto(generator()) : undefined,\n '$ %GeneratorFunction%': generatorFunction,\n '$ %GeneratorPrototype%': generatorFunction ? generatorFunction.prototype : undefined,\n '$ %Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n '$ %Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined : Int8Array.prototype,\n '$ %Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n '$ %Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined : Int8Array.prototype,\n '$ %Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n '$ %Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined : Int32Array.prototype,\n '$ %isFinite%': isFinite,\n '$ %isNaN%': isNaN,\n '$ %IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,\n '$ %JSON%': JSON,\n '$ %JSONParse%': JSON.parse,\n '$ %Map%': typeof Map === 'undefined' ? undefined : Map,\n '$ %MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),\n '$ %MapPrototype%': typeof Map === 'undefined' ? undefined : Map.prototype,\n '$ %Math%': Math,\n '$ %Number%': Number,\n '$ %NumberPrototype%': Number.prototype,\n '$ %Object%': Object,\n '$ %ObjectPrototype%': Object.prototype,\n '$ %ObjProto_toString%': Object.prototype.toString,\n '$ %ObjProto_valueOf%': Object.prototype.valueOf,\n '$ %parseFloat%': parseFloat,\n '$ %parseInt%': parseInt,\n '$ %Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n '$ %PromisePrototype%': typeof Promise === 'undefined' ? undefined : Promise.prototype,\n '$ %PromiseProto_then%': typeof Promise === 'undefined' ? undefined : Promise.prototype.then,\n '$ %Promise_all%': typeof Promise === 'undefined' ? undefined : Promise.all,\n '$ %Promise_reject%': typeof Promise === 'undefined' ? undefined : Promise.reject,\n '$ %Promise_resolve%': typeof Promise === 'undefined' ? undefined : Promise.resolve,\n '$ %Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n '$ %RangeError%': RangeError,\n '$ %RangeErrorPrototype%': RangeError.prototype,\n '$ %ReferenceError%': ReferenceError,\n '$ %ReferenceErrorPrototype%': ReferenceError.prototype,\n '$ %Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n '$ %RegExp%': RegExp,\n '$ %RegExpPrototype%': RegExp.prototype,\n '$ %Set%': typeof Set === 'undefined' ? undefined : Set,\n '$ %SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),\n '$ %SetPrototype%': typeof Set === 'undefined' ? undefined : Set.prototype,\n '$ %SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n '$ %SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer.prototype,\n '$ %String%': String,\n '$ %StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,\n '$ %StringPrototype%': String.prototype,\n '$ %Symbol%': hasSymbols ? Symbol : undefined,\n '$ %SymbolPrototype%': hasSymbols ? Symbol.prototype : undefined,\n '$ %SyntaxError%': SyntaxError,\n '$ %SyntaxErrorPrototype%': SyntaxError.prototype,\n '$ %ThrowTypeError%': ThrowTypeError,\n '$ %TypedArray%': TypedArray,\n '$ %TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined,\n '$ %TypeError%': TypeError,\n '$ %TypeErrorPrototype%': TypeError.prototype,\n '$ %Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n '$ %Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array.prototype,\n '$ %Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n '$ %Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray.prototype,\n '$ %Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n '$ %Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array.prototype,\n '$ %Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n '$ %Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array.prototype,\n '$ %URIError%': URIError,\n '$ %URIErrorPrototype%': URIError.prototype,\n '$ %WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n '$ %WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined : WeakMap.prototype,\n '$ %WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,\n '$ %WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined : WeakSet.prototype\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n if (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n throw new TypeError('\"allowMissing\" argument must be a boolean');\n }\n\n var key = '$ ' + name;\n\n if (!(key in INTRINSICS)) {\n throw new SyntaxError('intrinsic ' + name + ' does not exist!');\n } // istanbul ignore if // hopefully this is impossible to test :-)\n\n\n if (typeof INTRINSICS[key] === 'undefined' && !allowMissing) {\n throw new TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n }\n\n return INTRINSICS[key];\n};","'use strict';\n\nvar bind = require('function-bind');\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = \"\\u200B\";\n\nmodule.exports = function getPolyfill() {\n if (String.prototype.trim && zeroWidthSpace.trim() === zeroWidthSpace) {\n return String.prototype.trim;\n }\n\n return implementation;\n};","/**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Parse the internal MP4 structure into an equivalent javascript\n * object.\n */\n'use strict';\n\nvar inspectMp4,\n _textifyMp,\n parseType = require('../mp4/probe').parseType,\n parseMp4Date = function parseMp4Date(seconds) {\n return new Date(seconds * 1000 - 2082844800000);\n},\n parseSampleFlags = function parseSampleFlags(flags) {\n return {\n isLeading: (flags[0] & 0x0c) >>> 2,\n dependsOn: flags[0] & 0x03,\n isDependedOn: (flags[1] & 0xc0) >>> 6,\n hasRedundancy: (flags[1] & 0x30) >>> 4,\n paddingValue: (flags[1] & 0x0e) >>> 1,\n isNonSyncSample: flags[1] & 0x01,\n degradationPriority: flags[2] << 8 | flags[3]\n };\n},\n nalParse = function nalParse(avcStream) {\n var avcView = new DataView(avcStream.buffer, avcStream.byteOffset, avcStream.byteLength),\n result = [],\n i,\n length;\n\n for (i = 0; i + 4 < avcStream.length; i += length) {\n length = avcView.getUint32(i);\n i += 4; // bail if this doesn't appear to be an H264 stream\n\n if (length <= 0) {\n result.push('<span style=\\'color:red;\\'>MALFORMED DATA</span>');\n continue;\n }\n\n switch (avcStream[i] & 0x1F) {\n case 0x01:\n result.push('slice_layer_without_partitioning_rbsp');\n break;\n\n case 0x05:\n result.push('slice_layer_without_partitioning_rbsp_idr');\n break;\n\n case 0x06:\n result.push('sei_rbsp');\n break;\n\n case 0x07:\n result.push('seq_parameter_set_rbsp');\n break;\n\n case 0x08:\n result.push('pic_parameter_set_rbsp');\n break;\n\n case 0x09:\n result.push('access_unit_delimiter_rbsp');\n break;\n\n default:\n result.push('UNKNOWN NAL - ' + avcStream[i] & 0x1F);\n break;\n }\n }\n\n return result;\n},\n // registry of handlers for individual mp4 box types\nparse = {\n // codingname, not a first-class box type. stsd entries share the\n // same format as real boxes so the parsing infrastructure can be\n // shared\n avc1: function avc1(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n return {\n dataReferenceIndex: view.getUint16(6),\n width: view.getUint16(24),\n height: view.getUint16(26),\n horizresolution: view.getUint16(28) + view.getUint16(30) / 16,\n vertresolution: view.getUint16(32) + view.getUint16(34) / 16,\n frameCount: view.getUint16(40),\n depth: view.getUint16(74),\n config: inspectMp4(data.subarray(78, data.byteLength))\n };\n },\n avcC: function avcC(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n configurationVersion: data[0],\n avcProfileIndication: data[1],\n profileCompatibility: data[2],\n avcLevelIndication: data[3],\n lengthSizeMinusOne: data[4] & 0x03,\n sps: [],\n pps: []\n },\n numOfSequenceParameterSets = data[5] & 0x1f,\n numOfPictureParameterSets,\n nalSize,\n offset,\n i; // iterate past any SPSs\n\n offset = 6;\n\n for (i = 0; i < numOfSequenceParameterSets; i++) {\n nalSize = view.getUint16(offset);\n offset += 2;\n result.sps.push(new Uint8Array(data.subarray(offset, offset + nalSize)));\n offset += nalSize;\n } // iterate past any PPSs\n\n\n numOfPictureParameterSets = data[offset];\n offset++;\n\n for (i = 0; i < numOfPictureParameterSets; i++) {\n nalSize = view.getUint16(offset);\n offset += 2;\n result.pps.push(new Uint8Array(data.subarray(offset, offset + nalSize)));\n offset += nalSize;\n }\n\n return result;\n },\n btrt: function btrt(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n return {\n bufferSizeDB: view.getUint32(0),\n maxBitrate: view.getUint32(4),\n avgBitrate: view.getUint32(8)\n };\n },\n esds: function esds(data) {\n return {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n esId: data[6] << 8 | data[7],\n streamPriority: data[8] & 0x1f,\n decoderConfig: {\n objectProfileIndication: data[11],\n streamType: data[12] >>> 2 & 0x3f,\n bufferSize: data[13] << 16 | data[14] << 8 | data[15],\n maxBitrate: data[16] << 24 | data[17] << 16 | data[18] << 8 | data[19],\n avgBitrate: data[20] << 24 | data[21] << 16 | data[22] << 8 | data[23],\n decoderConfigDescriptor: {\n tag: data[24],\n length: data[25],\n audioObjectType: data[26] >>> 3 & 0x1f,\n samplingFrequencyIndex: (data[26] & 0x07) << 1 | data[27] >>> 7 & 0x01,\n channelConfiguration: data[27] >>> 3 & 0x0f\n }\n }\n };\n },\n ftyp: function ftyp(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n majorBrand: parseType(data.subarray(0, 4)),\n minorVersion: view.getUint32(4),\n compatibleBrands: []\n },\n i = 8;\n\n while (i < data.byteLength) {\n result.compatibleBrands.push(parseType(data.subarray(i, i + 4)));\n i += 4;\n }\n\n return result;\n },\n dinf: function dinf(data) {\n return {\n boxes: inspectMp4(data)\n };\n },\n dref: function dref(data) {\n return {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n dataReferences: inspectMp4(data.subarray(8))\n };\n },\n hdlr: function hdlr(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n version: view.getUint8(0),\n flags: new Uint8Array(data.subarray(1, 4)),\n handlerType: parseType(data.subarray(8, 12)),\n name: ''\n },\n i = 8; // parse out the name field\n\n for (i = 24; i < data.byteLength; i++) {\n if (data[i] === 0x00) {\n // the name field is null-terminated\n i++;\n break;\n }\n\n result.name += String.fromCharCode(data[i]);\n } // decode UTF-8 to javascript's internal representation\n // see http://ecmanaut.blogspot.com/2006/07/encoding-decoding-utf8-in-javascript.html\n\n\n result.name = decodeURIComponent(escape(result.name));\n return result;\n },\n mdat: function mdat(data) {\n return {\n byteLength: data.byteLength,\n nals: nalParse(data)\n };\n },\n mdhd: function mdhd(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n i = 4,\n language,\n result = {\n version: view.getUint8(0),\n flags: new Uint8Array(data.subarray(1, 4)),\n language: ''\n };\n\n if (result.version === 1) {\n i += 4;\n result.creationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n\n i += 8;\n result.modificationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n\n i += 4;\n result.timescale = view.getUint32(i);\n i += 8;\n result.duration = view.getUint32(i); // truncating top 4 bytes\n } else {\n result.creationTime = parseMp4Date(view.getUint32(i));\n i += 4;\n result.modificationTime = parseMp4Date(view.getUint32(i));\n i += 4;\n result.timescale = view.getUint32(i);\n i += 4;\n result.duration = view.getUint32(i);\n }\n\n i += 4; // language is stored as an ISO-639-2/T code in an array of three 5-bit fields\n // each field is the packed difference between its ASCII value and 0x60\n\n language = view.getUint16(i);\n result.language += String.fromCharCode((language >> 10) + 0x60);\n result.language += String.fromCharCode(((language & 0x03e0) >> 5) + 0x60);\n result.language += String.fromCharCode((language & 0x1f) + 0x60);\n return result;\n },\n mdia: function mdia(data) {\n return {\n boxes: inspectMp4(data)\n };\n },\n mfhd: function mfhd(data) {\n return {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n sequenceNumber: data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]\n };\n },\n minf: function minf(data) {\n return {\n boxes: inspectMp4(data)\n };\n },\n // codingname, not a first-class box type. stsd entries share the\n // same format as real boxes so the parsing infrastructure can be\n // shared\n mp4a: function mp4a(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n // 6 bytes reserved\n dataReferenceIndex: view.getUint16(6),\n // 4 + 4 bytes reserved\n channelcount: view.getUint16(16),\n samplesize: view.getUint16(18),\n // 2 bytes pre_defined\n // 2 bytes reserved\n samplerate: view.getUint16(24) + view.getUint16(26) / 65536\n }; // if there are more bytes to process, assume this is an ISO/IEC\n // 14496-14 MP4AudioSampleEntry and parse the ESDBox\n\n if (data.byteLength > 28) {\n result.streamDescriptor = inspectMp4(data.subarray(28))[0];\n }\n\n return result;\n },\n moof: function moof(data) {\n return {\n boxes: inspectMp4(data)\n };\n },\n moov: function moov(data) {\n return {\n boxes: inspectMp4(data)\n };\n },\n mvex: function mvex(data) {\n return {\n boxes: inspectMp4(data)\n };\n },\n mvhd: function mvhd(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n i = 4,\n result = {\n version: view.getUint8(0),\n flags: new Uint8Array(data.subarray(1, 4))\n };\n\n if (result.version === 1) {\n i += 4;\n result.creationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n\n i += 8;\n result.modificationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n\n i += 4;\n result.timescale = view.getUint32(i);\n i += 8;\n result.duration = view.getUint32(i); // truncating top 4 bytes\n } else {\n result.creationTime = parseMp4Date(view.getUint32(i));\n i += 4;\n result.modificationTime = parseMp4Date(view.getUint32(i));\n i += 4;\n result.timescale = view.getUint32(i);\n i += 4;\n result.duration = view.getUint32(i);\n }\n\n i += 4; // convert fixed-point, base 16 back to a number\n\n result.rate = view.getUint16(i) + view.getUint16(i + 2) / 16;\n i += 4;\n result.volume = view.getUint8(i) + view.getUint8(i + 1) / 8;\n i += 2;\n i += 2;\n i += 2 * 4;\n result.matrix = new Uint32Array(data.subarray(i, i + 9 * 4));\n i += 9 * 4;\n i += 6 * 4;\n result.nextTrackId = view.getUint32(i);\n return result;\n },\n pdin: function pdin(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n return {\n version: view.getUint8(0),\n flags: new Uint8Array(data.subarray(1, 4)),\n rate: view.getUint32(4),\n initialDelay: view.getUint32(8)\n };\n },\n sdtp: function sdtp(data) {\n var result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n samples: []\n },\n i;\n\n for (i = 4; i < data.byteLength; i++) {\n result.samples.push({\n dependsOn: (data[i] & 0x30) >> 4,\n isDependedOn: (data[i] & 0x0c) >> 2,\n hasRedundancy: data[i] & 0x03\n });\n }\n\n return result;\n },\n sidx: function sidx(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n references: [],\n referenceId: view.getUint32(4),\n timescale: view.getUint32(8),\n earliestPresentationTime: view.getUint32(12),\n firstOffset: view.getUint32(16)\n },\n referenceCount = view.getUint16(22),\n i;\n\n for (i = 24; referenceCount; i += 12, referenceCount--) {\n result.references.push({\n referenceType: (data[i] & 0x80) >>> 7,\n referencedSize: view.getUint32(i) & 0x7FFFFFFF,\n subsegmentDuration: view.getUint32(i + 4),\n startsWithSap: !!(data[i + 8] & 0x80),\n sapType: (data[i + 8] & 0x70) >>> 4,\n sapDeltaTime: view.getUint32(i + 8) & 0x0FFFFFFF\n });\n }\n\n return result;\n },\n smhd: function smhd(data) {\n return {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n balance: data[4] + data[5] / 256\n };\n },\n stbl: function stbl(data) {\n return {\n boxes: inspectMp4(data)\n };\n },\n stco: function stco(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n chunkOffsets: []\n },\n entryCount = view.getUint32(4),\n i;\n\n for (i = 8; entryCount; i += 4, entryCount--) {\n result.chunkOffsets.push(view.getUint32(i));\n }\n\n return result;\n },\n stsc: function stsc(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n entryCount = view.getUint32(4),\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n sampleToChunks: []\n },\n i;\n\n for (i = 8; entryCount; i += 12, entryCount--) {\n result.sampleToChunks.push({\n firstChunk: view.getUint32(i),\n samplesPerChunk: view.getUint32(i + 4),\n sampleDescriptionIndex: view.getUint32(i + 8)\n });\n }\n\n return result;\n },\n stsd: function stsd(data) {\n return {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n sampleDescriptions: inspectMp4(data.subarray(8))\n };\n },\n stsz: function stsz(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n sampleSize: view.getUint32(4),\n entries: []\n },\n i;\n\n for (i = 12; i < data.byteLength; i += 4) {\n result.entries.push(view.getUint32(i));\n }\n\n return result;\n },\n stts: function stts(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n timeToSamples: []\n },\n entryCount = view.getUint32(4),\n i;\n\n for (i = 8; entryCount; i += 8, entryCount--) {\n result.timeToSamples.push({\n sampleCount: view.getUint32(i),\n sampleDelta: view.getUint32(i + 4)\n });\n }\n\n return result;\n },\n styp: function styp(data) {\n return parse.ftyp(data);\n },\n tfdt: function tfdt(data) {\n var result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n baseMediaDecodeTime: data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]\n };\n\n if (result.version === 1) {\n result.baseMediaDecodeTime *= Math.pow(2, 32);\n result.baseMediaDecodeTime += data[8] << 24 | data[9] << 16 | data[10] << 8 | data[11];\n }\n\n return result;\n },\n tfhd: function tfhd(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n trackId: view.getUint32(4)\n },\n baseDataOffsetPresent = result.flags[2] & 0x01,\n sampleDescriptionIndexPresent = result.flags[2] & 0x02,\n defaultSampleDurationPresent = result.flags[2] & 0x08,\n defaultSampleSizePresent = result.flags[2] & 0x10,\n defaultSampleFlagsPresent = result.flags[2] & 0x20,\n durationIsEmpty = result.flags[0] & 0x010000,\n defaultBaseIsMoof = result.flags[0] & 0x020000,\n i;\n i = 8;\n\n if (baseDataOffsetPresent) {\n i += 4; // truncate top 4 bytes\n // FIXME: should we read the full 64 bits?\n\n result.baseDataOffset = view.getUint32(12);\n i += 4;\n }\n\n if (sampleDescriptionIndexPresent) {\n result.sampleDescriptionIndex = view.getUint32(i);\n i += 4;\n }\n\n if (defaultSampleDurationPresent) {\n result.defaultSampleDuration = view.getUint32(i);\n i += 4;\n }\n\n if (defaultSampleSizePresent) {\n result.defaultSampleSize = view.getUint32(i);\n i += 4;\n }\n\n if (defaultSampleFlagsPresent) {\n result.defaultSampleFlags = view.getUint32(i);\n }\n\n if (durationIsEmpty) {\n result.durationIsEmpty = true;\n }\n\n if (!baseDataOffsetPresent && defaultBaseIsMoof) {\n result.baseDataOffsetIsMoof = true;\n }\n\n return result;\n },\n tkhd: function tkhd(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n i = 4,\n result = {\n version: view.getUint8(0),\n flags: new Uint8Array(data.subarray(1, 4))\n };\n\n if (result.version === 1) {\n i += 4;\n result.creationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n\n i += 8;\n result.modificationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n\n i += 4;\n result.trackId = view.getUint32(i);\n i += 4;\n i += 8;\n result.duration = view.getUint32(i); // truncating top 4 bytes\n } else {\n result.creationTime = parseMp4Date(view.getUint32(i));\n i += 4;\n result.modificationTime = parseMp4Date(view.getUint32(i));\n i += 4;\n result.trackId = view.getUint32(i);\n i += 4;\n i += 4;\n result.duration = view.getUint32(i);\n }\n\n i += 4;\n i += 2 * 4;\n result.layer = view.getUint16(i);\n i += 2;\n result.alternateGroup = view.getUint16(i);\n i += 2; // convert fixed-point, base 16 back to a number\n\n result.volume = view.getUint8(i) + view.getUint8(i + 1) / 8;\n i += 2;\n i += 2;\n result.matrix = new Uint32Array(data.subarray(i, i + 9 * 4));\n i += 9 * 4;\n result.width = view.getUint16(i) + view.getUint16(i + 2) / 16;\n i += 4;\n result.height = view.getUint16(i) + view.getUint16(i + 2) / 16;\n return result;\n },\n traf: function traf(data) {\n return {\n boxes: inspectMp4(data)\n };\n },\n trak: function trak(data) {\n return {\n boxes: inspectMp4(data)\n };\n },\n trex: function trex(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n return {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n trackId: view.getUint32(4),\n defaultSampleDescriptionIndex: view.getUint32(8),\n defaultSampleDuration: view.getUint32(12),\n defaultSampleSize: view.getUint32(16),\n sampleDependsOn: data[20] & 0x03,\n sampleIsDependedOn: (data[21] & 0xc0) >> 6,\n sampleHasRedundancy: (data[21] & 0x30) >> 4,\n samplePaddingValue: (data[21] & 0x0e) >> 1,\n sampleIsDifferenceSample: !!(data[21] & 0x01),\n sampleDegradationPriority: view.getUint16(22)\n };\n },\n trun: function trun(data) {\n var result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n samples: []\n },\n view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n // Flag interpretation\n dataOffsetPresent = result.flags[2] & 0x01,\n // compare with 2nd byte of 0x1\n firstSampleFlagsPresent = result.flags[2] & 0x04,\n // compare with 2nd byte of 0x4\n sampleDurationPresent = result.flags[1] & 0x01,\n // compare with 2nd byte of 0x100\n sampleSizePresent = result.flags[1] & 0x02,\n // compare with 2nd byte of 0x200\n sampleFlagsPresent = result.flags[1] & 0x04,\n // compare with 2nd byte of 0x400\n sampleCompositionTimeOffsetPresent = result.flags[1] & 0x08,\n // compare with 2nd byte of 0x800\n sampleCount = view.getUint32(4),\n offset = 8,\n sample;\n\n if (dataOffsetPresent) {\n // 32 bit signed integer\n result.dataOffset = view.getInt32(offset);\n offset += 4;\n } // Overrides the flags for the first sample only. The order of\n // optional values will be: duration, size, compositionTimeOffset\n\n\n if (firstSampleFlagsPresent && sampleCount) {\n sample = {\n flags: parseSampleFlags(data.subarray(offset, offset + 4))\n };\n offset += 4;\n\n if (sampleDurationPresent) {\n sample.duration = view.getUint32(offset);\n offset += 4;\n }\n\n if (sampleSizePresent) {\n sample.size = view.getUint32(offset);\n offset += 4;\n }\n\n if (sampleCompositionTimeOffsetPresent) {\n // Note: this should be a signed int if version is 1\n sample.compositionTimeOffset = view.getUint32(offset);\n offset += 4;\n }\n\n result.samples.push(sample);\n sampleCount--;\n }\n\n while (sampleCount--) {\n sample = {};\n\n if (sampleDurationPresent) {\n sample.duration = view.getUint32(offset);\n offset += 4;\n }\n\n if (sampleSizePresent) {\n sample.size = view.getUint32(offset);\n offset += 4;\n }\n\n if (sampleFlagsPresent) {\n sample.flags = parseSampleFlags(data.subarray(offset, offset + 4));\n offset += 4;\n }\n\n if (sampleCompositionTimeOffsetPresent) {\n // Note: this should be a signed int if version is 1\n sample.compositionTimeOffset = view.getUint32(offset);\n offset += 4;\n }\n\n result.samples.push(sample);\n }\n\n return result;\n },\n 'url ': function url(data) {\n return {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4))\n };\n },\n vmhd: function vmhd(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n return {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n graphicsmode: view.getUint16(4),\n opcolor: new Uint16Array([view.getUint16(6), view.getUint16(8), view.getUint16(10)])\n };\n }\n};\n/**\n * Return a javascript array of box objects parsed from an ISO base\n * media file.\n * @param data {Uint8Array} the binary data of the media to be inspected\n * @return {array} a javascript array of potentially nested box objects\n */\n\n\ninspectMp4 = function inspectMp4(data) {\n var i = 0,\n result = [],\n view,\n size,\n type,\n end,\n box; // Convert data from Uint8Array to ArrayBuffer, to follow Dataview API\n\n var ab = new ArrayBuffer(data.length);\n var v = new Uint8Array(ab);\n\n for (var z = 0; z < data.length; ++z) {\n v[z] = data[z];\n }\n\n view = new DataView(ab);\n\n while (i < data.byteLength) {\n // parse box data\n size = view.getUint32(i);\n type = parseType(data.subarray(i + 4, i + 8));\n end = size > 1 ? i + size : data.byteLength; // parse type-specific data\n\n box = (parse[type] || function (data) {\n return {\n data: data\n };\n })(data.subarray(i + 8, end));\n\n box.size = size;\n box.type = type; // store this box and move to the next\n\n result.push(box);\n i = end;\n }\n\n return result;\n};\n/**\n * Returns a textual representation of the javascript represtentation\n * of an MP4 file. You can use it as an alternative to\n * JSON.stringify() to compare inspected MP4s.\n * @param inspectedMp4 {array} the parsed array of boxes in an MP4\n * file\n * @param depth {number} (optional) the number of ancestor boxes of\n * the elements of inspectedMp4. Assumed to be zero if unspecified.\n * @return {string} a text representation of the parsed MP4\n */\n\n\n_textifyMp = function textifyMp4(inspectedMp4, depth) {\n var indent;\n depth = depth || 0;\n indent = new Array(depth * 2 + 1).join(' '); // iterate over all the boxes\n\n return inspectedMp4.map(function (box, index) {\n // list the box type first at the current indentation level\n return indent + box.type + '\\n' + // the type is already included and handle child boxes separately\n Object.keys(box).filter(function (key) {\n return key !== 'type' && key !== 'boxes'; // output all the box properties\n }).map(function (key) {\n var prefix = indent + ' ' + key + ': ',\n value = box[key]; // print out raw bytes as hexademical\n\n if (value instanceof Uint8Array || value instanceof Uint32Array) {\n var bytes = Array.prototype.slice.call(new Uint8Array(value.buffer, value.byteOffset, value.byteLength)).map(function (byte) {\n return ' ' + ('00' + byte.toString(16)).slice(-2);\n }).join('').match(/.{1,24}/g);\n\n if (!bytes) {\n return prefix + '<>';\n }\n\n if (bytes.length === 1) {\n return prefix + '<' + bytes.join('').slice(1) + '>';\n }\n\n return prefix + '<\\n' + bytes.map(function (line) {\n return indent + ' ' + line;\n }).join('\\n') + '\\n' + indent + ' >';\n } // stringify generic objects\n\n\n return prefix + JSON.stringify(value, null, 2).split('\\n').map(function (line, index) {\n if (index === 0) {\n return line;\n }\n\n return indent + ' ' + line;\n }).join('\\n');\n }).join('\\n') + ( // recursively textify the child boxes\n box.boxes ? '\\n' + _textifyMp(box.boxes, depth + 1) : '');\n }).join('\\n');\n};\n\nmodule.exports = {\n inspect: inspectMp4,\n textify: _textifyMp,\n parseTfdt: parse.tfdt,\n parseHdlr: parse.hdlr,\n parseTfhd: parse.tfhd,\n parseTrun: parse.trun,\n parseSidx: parse.sidx\n};","/**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\nvar toUnsigned = function toUnsigned(value) {\n return value >>> 0;\n};\n\nvar toHexString = function toHexString(value) {\n return ('00' + value.toString(16)).slice(-2);\n};\n\nmodule.exports = {\n toUnsigned: toUnsigned,\n toHexString: toHexString\n};","/**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Reads in-band caption information from a video elementary\n * stream. Captions must follow the CEA-708 standard for injection\n * into an MPEG-2 transport streams.\n * @see https://en.wikipedia.org/wiki/CEA-708\n * @see https://www.gpo.gov/fdsys/pkg/CFR-2007-title47-vol1/pdf/CFR-2007-title47-vol1-sec15-119.pdf\n */\n'use strict'; // Supplemental enhancement information (SEI) NAL units have a\n// payload type field to indicate how they are to be\n// interpreted. CEAS-708 caption content is always transmitted with\n// payload type 0x04.\n\nvar USER_DATA_REGISTERED_ITU_T_T35 = 4,\n RBSP_TRAILING_BITS = 128;\n/**\n * Parse a supplemental enhancement information (SEI) NAL unit.\n * Stops parsing once a message of type ITU T T35 has been found.\n *\n * @param bytes {Uint8Array} the bytes of a SEI NAL unit\n * @return {object} the parsed SEI payload\n * @see Rec. ITU-T H.264, 7.3.2.3.1\n */\n\nvar parseSei = function parseSei(bytes) {\n var i = 0,\n result = {\n payloadType: -1,\n payloadSize: 0\n },\n payloadType = 0,\n payloadSize = 0; // go through the sei_rbsp parsing each each individual sei_message\n\n while (i < bytes.byteLength) {\n // stop once we have hit the end of the sei_rbsp\n if (bytes[i] === RBSP_TRAILING_BITS) {\n break;\n } // Parse payload type\n\n\n while (bytes[i] === 0xFF) {\n payloadType += 255;\n i++;\n }\n\n payloadType += bytes[i++]; // Parse payload size\n\n while (bytes[i] === 0xFF) {\n payloadSize += 255;\n i++;\n }\n\n payloadSize += bytes[i++]; // this sei_message is a 608/708 caption so save it and break\n // there can only ever be one caption message in a frame's sei\n\n if (!result.payload && payloadType === USER_DATA_REGISTERED_ITU_T_T35) {\n result.payloadType = payloadType;\n result.payloadSize = payloadSize;\n result.payload = bytes.subarray(i, i + payloadSize);\n break;\n } // skip the payload and parse the next message\n\n\n i += payloadSize;\n payloadType = 0;\n payloadSize = 0;\n }\n\n return result;\n}; // see ANSI/SCTE 128-1 (2013), section 8.1\n\n\nvar parseUserData = function parseUserData(sei) {\n // itu_t_t35_contry_code must be 181 (United States) for\n // captions\n if (sei.payload[0] !== 181) {\n return null;\n } // itu_t_t35_provider_code should be 49 (ATSC) for captions\n\n\n if ((sei.payload[1] << 8 | sei.payload[2]) !== 49) {\n return null;\n } // the user_identifier should be \"GA94\" to indicate ATSC1 data\n\n\n if (String.fromCharCode(sei.payload[3], sei.payload[4], sei.payload[5], sei.payload[6]) !== 'GA94') {\n return null;\n } // finally, user_data_type_code should be 0x03 for caption data\n\n\n if (sei.payload[7] !== 0x03) {\n return null;\n } // return the user_data_type_structure and strip the trailing\n // marker bits\n\n\n return sei.payload.subarray(8, sei.payload.length - 1);\n}; // see CEA-708-D, section 4.4\n\n\nvar parseCaptionPackets = function parseCaptionPackets(pts, userData) {\n var results = [],\n i,\n count,\n offset,\n data; // if this is just filler, return immediately\n\n if (!(userData[0] & 0x40)) {\n return results;\n } // parse out the cc_data_1 and cc_data_2 fields\n\n\n count = userData[0] & 0x1f;\n\n for (i = 0; i < count; i++) {\n offset = i * 3;\n data = {\n type: userData[offset + 2] & 0x03,\n pts: pts\n }; // capture cc data when cc_valid is 1\n\n if (userData[offset + 2] & 0x04) {\n data.ccData = userData[offset + 3] << 8 | userData[offset + 4];\n results.push(data);\n }\n }\n\n return results;\n};\n\nvar discardEmulationPreventionBytes = function discardEmulationPreventionBytes(data) {\n var length = data.byteLength,\n emulationPreventionBytesPositions = [],\n i = 1,\n newLength,\n newData; // Find all `Emulation Prevention Bytes`\n\n while (i < length - 2) {\n if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\n emulationPreventionBytesPositions.push(i + 2);\n i += 2;\n } else {\n i++;\n }\n } // If no Emulation Prevention Bytes were found just return the original\n // array\n\n\n if (emulationPreventionBytesPositions.length === 0) {\n return data;\n } // Create a new array to hold the NAL unit data\n\n\n newLength = length - emulationPreventionBytesPositions.length;\n newData = new Uint8Array(newLength);\n var sourceIndex = 0;\n\n for (i = 0; i < newLength; sourceIndex++, i++) {\n if (sourceIndex === emulationPreventionBytesPositions[0]) {\n // Skip this byte\n sourceIndex++; // Remove this position index\n\n emulationPreventionBytesPositions.shift();\n }\n\n newData[i] = data[sourceIndex];\n }\n\n return newData;\n}; // exports\n\n\nmodule.exports = {\n parseSei: parseSei,\n parseUserData: parseUserData,\n parseCaptionPackets: parseCaptionPackets,\n discardEmulationPreventionBytes: discardEmulationPreventionBytes,\n USER_DATA_REGISTERED_ITU_T_T35: USER_DATA_REGISTERED_ITU_T_T35\n};","/**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * A lightweight readable stream implemention that handles event dispatching.\n * Objects that inherit from streams should call init in their constructors.\n */\n'use strict';\n\nvar Stream = function Stream() {\n this.init = function () {\n var listeners = {};\n /**\n * Add a listener for a specified event type.\n * @param type {string} the event name\n * @param listener {function} the callback to be invoked when an event of\n * the specified type occurs\n */\n\n this.on = function (type, listener) {\n if (!listeners[type]) {\n listeners[type] = [];\n }\n\n listeners[type] = listeners[type].concat(listener);\n };\n /**\n * Remove a listener for a specified event type.\n * @param type {string} the event name\n * @param listener {function} a function previously registered for this\n * type of event through `on`\n */\n\n\n this.off = function (type, listener) {\n var index;\n\n if (!listeners[type]) {\n return false;\n }\n\n index = listeners[type].indexOf(listener);\n listeners[type] = listeners[type].slice();\n listeners[type].splice(index, 1);\n return index > -1;\n };\n /**\n * Trigger an event of the specified type on this stream. Any additional\n * arguments to this function are passed as parameters to event listeners.\n * @param type {string} the event name\n */\n\n\n this.trigger = function (type) {\n var callbacks, i, length, args;\n callbacks = listeners[type];\n\n if (!callbacks) {\n return;\n } // Slicing the arguments on every invocation of this method\n // can add a significant amount of overhead. Avoid the\n // intermediate object creation for the common case of a\n // single callback argument\n\n\n if (arguments.length === 2) {\n length = callbacks.length;\n\n for (i = 0; i < length; ++i) {\n callbacks[i].call(this, arguments[1]);\n }\n } else {\n args = [];\n i = arguments.length;\n\n for (i = 1; i < arguments.length; ++i) {\n args.push(arguments[i]);\n }\n\n length = callbacks.length;\n\n for (i = 0; i < length; ++i) {\n callbacks[i].apply(this, args);\n }\n }\n };\n /**\n * Destroys the stream and cleans up.\n */\n\n\n this.dispose = function () {\n listeners = {};\n };\n };\n};\n/**\n * Forwards all `data` events on this stream to the destination stream. The\n * destination stream should provide a method `push` to receive the data\n * events as they arrive.\n * @param destination {stream} the stream that will receive all `data` events\n * @param autoFlush {boolean} if false, we will not call `flush` on the destination\n * when the current stream emits a 'done' event\n * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n */\n\n\nStream.prototype.pipe = function (destination) {\n this.on('data', function (data) {\n destination.push(data);\n });\n this.on('done', function (flushSource) {\n destination.flush(flushSource);\n });\n this.on('partialdone', function (flushSource) {\n destination.partialFlush(flushSource);\n });\n this.on('endedtimeline', function (flushSource) {\n destination.endTimeline(flushSource);\n });\n this.on('reset', function (flushSource) {\n destination.reset(flushSource);\n });\n return destination;\n}; // Default stream functions that are expected to be overridden to perform\n// actual work. These are provided by the prototype as a sort of no-op\n// implementation so that we don't have to check for their existence in the\n// `pipe` function above.\n\n\nStream.prototype.push = function (data) {\n this.trigger('data', data);\n};\n\nStream.prototype.flush = function (flushSource) {\n this.trigger('done', flushSource);\n};\n\nStream.prototype.partialFlush = function (flushSource) {\n this.trigger('partialdone', flushSource);\n};\n\nStream.prototype.endTimeline = function (flushSource) {\n this.trigger('endedtimeline', flushSource);\n};\n\nStream.prototype.reset = function (flushSource) {\n this.trigger('reset', flushSource);\n};\n\nmodule.exports = Stream;","/**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n'use strict';\n\nmodule.exports = {\n H264_STREAM_TYPE: 0x1B,\n ADTS_STREAM_TYPE: 0x0F,\n METADATA_STREAM_TYPE: 0x15\n};","/*! @name m3u8-parser @version 4.4.0 @license Apache-2.0 */\nimport window from 'global/window';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n/**\n * @file stream.js\n */\n\n/**\n * A lightweight readable stream implementation that handles event dispatching.\n *\n * @class Stream\n */\n\n\nvar Stream =\n/*#__PURE__*/\nfunction () {\n function Stream() {\n this.listeners = {};\n }\n /**\n * Add a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener the callback to be invoked when an event of\n * the specified type occurs\n */\n\n\n var _proto = Stream.prototype;\n\n _proto.on = function on(type, listener) {\n if (!this.listeners[type]) {\n this.listeners[type] = [];\n }\n\n this.listeners[type].push(listener);\n }\n /**\n * Remove a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener a function previously registered for this\n * type of event through `on`\n * @return {boolean} if we could turn it off or not\n */\n ;\n\n _proto.off = function off(type, listener) {\n if (!this.listeners[type]) {\n return false;\n }\n\n var index = this.listeners[type].indexOf(listener);\n this.listeners[type].splice(index, 1);\n return index > -1;\n }\n /**\n * Trigger an event of the specified type on this stream. Any additional\n * arguments to this function are passed as parameters to event listeners.\n *\n * @param {string} type the event name\n */\n ;\n\n _proto.trigger = function trigger(type) {\n var callbacks = this.listeners[type];\n var i;\n var length;\n var args;\n\n if (!callbacks) {\n return;\n } // Slicing the arguments on every invocation of this method\n // can add a significant amount of overhead. Avoid the\n // intermediate object creation for the common case of a\n // single callback argument\n\n\n if (arguments.length === 2) {\n length = callbacks.length;\n\n for (i = 0; i < length; ++i) {\n callbacks[i].call(this, arguments[1]);\n }\n } else {\n args = Array.prototype.slice.call(arguments, 1);\n length = callbacks.length;\n\n for (i = 0; i < length; ++i) {\n callbacks[i].apply(this, args);\n }\n }\n }\n /**\n * Destroys the stream and cleans up.\n */\n ;\n\n _proto.dispose = function dispose() {\n this.listeners = {};\n }\n /**\n * Forwards all `data` events on this stream to the destination stream. The\n * destination stream should provide a method `push` to receive the data\n * events as they arrive.\n *\n * @param {Stream} destination the stream that will receive all `data` events\n * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n */\n ;\n\n _proto.pipe = function pipe(destination) {\n this.on('data', function (data) {\n destination.push(data);\n });\n };\n\n return Stream;\n}();\n/**\n * A stream that buffers string input and generates a `data` event for each\n * line.\n *\n * @class LineStream\n * @extends Stream\n */\n\n\nvar LineStream =\n/*#__PURE__*/\nfunction (_Stream) {\n _inheritsLoose(LineStream, _Stream);\n\n function LineStream() {\n var _this;\n\n _this = _Stream.call(this) || this;\n _this.buffer = '';\n return _this;\n }\n /**\n * Add new data to be parsed.\n *\n * @param {string} data the text to process\n */\n\n\n var _proto = LineStream.prototype;\n\n _proto.push = function push(data) {\n var nextNewline;\n this.buffer += data;\n nextNewline = this.buffer.indexOf('\\n');\n\n for (; nextNewline > -1; nextNewline = this.buffer.indexOf('\\n')) {\n this.trigger('data', this.buffer.substring(0, nextNewline));\n this.buffer = this.buffer.substring(nextNewline + 1);\n }\n };\n\n return LineStream;\n}(Stream);\n/**\n * \"forgiving\" attribute list psuedo-grammar:\n * attributes -> keyvalue (',' keyvalue)*\n * keyvalue -> key '=' value\n * key -> [^=]*\n * value -> '\"' [^\"]* '\"' | [^,]*\n */\n\n\nvar attributeSeparator = function attributeSeparator() {\n var key = '[^=]*';\n var value = '\"[^\"]*\"|[^,]*';\n var keyvalue = '(?:' + key + ')=(?:' + value + ')';\n return new RegExp('(?:^|,)(' + keyvalue + ')');\n};\n/**\n * Parse attributes from a line given the separator\n *\n * @param {string} attributes the attribute line to parse\n */\n\n\nvar parseAttributes = function parseAttributes(attributes) {\n // split the string using attributes as the separator\n var attrs = attributes.split(attributeSeparator());\n var result = {};\n var i = attrs.length;\n var attr;\n\n while (i--) {\n // filter out unmatched portions of the string\n if (attrs[i] === '') {\n continue;\n } // split the key and value\n\n\n attr = /([^=]*)=(.*)/.exec(attrs[i]).slice(1); // trim whitespace and remove optional quotes around the value\n\n attr[0] = attr[0].replace(/^\\s+|\\s+$/g, '');\n attr[1] = attr[1].replace(/^\\s+|\\s+$/g, '');\n attr[1] = attr[1].replace(/^['\"](.*)['\"]$/g, '$1');\n result[attr[0]] = attr[1];\n }\n\n return result;\n};\n/**\n * A line-level M3U8 parser event stream. It expects to receive input one\n * line at a time and performs a context-free parse of its contents. A stream\n * interpretation of a manifest can be useful if the manifest is expected to\n * be too large to fit comfortably into memory or the entirety of the input\n * is not immediately available. Otherwise, it's probably much easier to work\n * with a regular `Parser` object.\n *\n * Produces `data` events with an object that captures the parser's\n * interpretation of the input. That object has a property `tag` that is one\n * of `uri`, `comment`, or `tag`. URIs only have a single additional\n * property, `line`, which captures the entirety of the input without\n * interpretation. Comments similarly have a single additional property\n * `text` which is the input without the leading `#`.\n *\n * Tags always have a property `tagType` which is the lower-cased version of\n * the M3U8 directive without the `#EXT` or `#EXT-X-` prefix. For instance,\n * `#EXT-X-MEDIA-SEQUENCE` becomes `media-sequence` when parsed. Unrecognized\n * tags are given the tag type `unknown` and a single additional property\n * `data` with the remainder of the input.\n *\n * @class ParseStream\n * @extends Stream\n */\n\n\nvar ParseStream =\n/*#__PURE__*/\nfunction (_Stream) {\n _inheritsLoose(ParseStream, _Stream);\n\n function ParseStream() {\n var _this;\n\n _this = _Stream.call(this) || this;\n _this.customParsers = [];\n _this.tagMappers = [];\n return _this;\n }\n /**\n * Parses an additional line of input.\n *\n * @param {string} line a single line of an M3U8 file to parse\n */\n\n\n var _proto = ParseStream.prototype;\n\n _proto.push = function push(line) {\n var _this2 = this;\n\n var match;\n var event; // strip whitespace\n\n line = line.trim();\n\n if (line.length === 0) {\n // ignore empty lines\n return;\n } // URIs\n\n\n if (line[0] !== '#') {\n this.trigger('data', {\n type: 'uri',\n uri: line\n });\n return;\n } // map tags\n\n\n var newLines = this.tagMappers.reduce(function (acc, mapper) {\n var mappedLine = mapper(line); // skip if unchanged\n\n if (mappedLine === line) {\n return acc;\n }\n\n return acc.concat([mappedLine]);\n }, [line]);\n newLines.forEach(function (newLine) {\n for (var i = 0; i < _this2.customParsers.length; i++) {\n if (_this2.customParsers[i].call(_this2, newLine)) {\n return;\n }\n } // Comments\n\n\n if (newLine.indexOf('#EXT') !== 0) {\n _this2.trigger('data', {\n type: 'comment',\n text: newLine.slice(1)\n });\n\n return;\n } // strip off any carriage returns here so the regex matching\n // doesn't have to account for them.\n\n\n newLine = newLine.replace('\\r', ''); // Tags\n\n match = /^#EXTM3U/.exec(newLine);\n\n if (match) {\n _this2.trigger('data', {\n type: 'tag',\n tagType: 'm3u'\n });\n\n return;\n }\n\n match = /^#EXTINF:?([0-9\\.]*)?,?(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'inf'\n };\n\n if (match[1]) {\n event.duration = parseFloat(match[1]);\n }\n\n if (match[2]) {\n event.title = match[2];\n }\n\n _this2.trigger('data', event);\n\n return;\n }\n\n match = /^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'targetduration'\n };\n\n if (match[1]) {\n event.duration = parseInt(match[1], 10);\n }\n\n _this2.trigger('data', event);\n\n return;\n }\n\n match = /^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'totalduration'\n };\n\n if (match[1]) {\n event.duration = parseInt(match[1], 10);\n }\n\n _this2.trigger('data', event);\n\n return;\n }\n\n match = /^#EXT-X-VERSION:?([0-9.]*)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'version'\n };\n\n if (match[1]) {\n event.version = parseInt(match[1], 10);\n }\n\n _this2.trigger('data', event);\n\n return;\n }\n\n match = /^#EXT-X-MEDIA-SEQUENCE:?(\\-?[0-9.]*)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'media-sequence'\n };\n\n if (match[1]) {\n event.number = parseInt(match[1], 10);\n }\n\n _this2.trigger('data', event);\n\n return;\n }\n\n match = /^#EXT-X-DISCONTINUITY-SEQUENCE:?(\\-?[0-9.]*)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'discontinuity-sequence'\n };\n\n if (match[1]) {\n event.number = parseInt(match[1], 10);\n }\n\n _this2.trigger('data', event);\n\n return;\n }\n\n match = /^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'playlist-type'\n };\n\n if (match[1]) {\n event.playlistType = match[1];\n }\n\n _this2.trigger('data', event);\n\n return;\n }\n\n match = /^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'byterange'\n };\n\n if (match[1]) {\n event.length = parseInt(match[1], 10);\n }\n\n if (match[2]) {\n event.offset = parseInt(match[2], 10);\n }\n\n _this2.trigger('data', event);\n\n return;\n }\n\n match = /^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'allow-cache'\n };\n\n if (match[1]) {\n event.allowed = !/NO/.test(match[1]);\n }\n\n _this2.trigger('data', event);\n\n return;\n }\n\n match = /^#EXT-X-MAP:?(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'map'\n };\n\n if (match[1]) {\n var attributes = parseAttributes(match[1]);\n\n if (attributes.URI) {\n event.uri = attributes.URI;\n }\n\n if (attributes.BYTERANGE) {\n var _attributes$BYTERANGE = attributes.BYTERANGE.split('@'),\n length = _attributes$BYTERANGE[0],\n offset = _attributes$BYTERANGE[1];\n\n event.byterange = {};\n\n if (length) {\n event.byterange.length = parseInt(length, 10);\n }\n\n if (offset) {\n event.byterange.offset = parseInt(offset, 10);\n }\n }\n }\n\n _this2.trigger('data', event);\n\n return;\n }\n\n match = /^#EXT-X-STREAM-INF:?(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'stream-inf'\n };\n\n if (match[1]) {\n event.attributes = parseAttributes(match[1]);\n\n if (event.attributes.RESOLUTION) {\n var split = event.attributes.RESOLUTION.split('x');\n var resolution = {};\n\n if (split[0]) {\n resolution.width = parseInt(split[0], 10);\n }\n\n if (split[1]) {\n resolution.height = parseInt(split[1], 10);\n }\n\n event.attributes.RESOLUTION = resolution;\n }\n\n if (event.attributes.BANDWIDTH) {\n event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10);\n }\n\n if (event.attributes['PROGRAM-ID']) {\n event.attributes['PROGRAM-ID'] = parseInt(event.attributes['PROGRAM-ID'], 10);\n }\n }\n\n _this2.trigger('data', event);\n\n return;\n }\n\n match = /^#EXT-X-MEDIA:?(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'media'\n };\n\n if (match[1]) {\n event.attributes = parseAttributes(match[1]);\n }\n\n _this2.trigger('data', event);\n\n return;\n }\n\n match = /^#EXT-X-ENDLIST/.exec(newLine);\n\n if (match) {\n _this2.trigger('data', {\n type: 'tag',\n tagType: 'endlist'\n });\n\n return;\n }\n\n match = /^#EXT-X-DISCONTINUITY/.exec(newLine);\n\n if (match) {\n _this2.trigger('data', {\n type: 'tag',\n tagType: 'discontinuity'\n });\n\n return;\n }\n\n match = /^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'program-date-time'\n };\n\n if (match[1]) {\n event.dateTimeString = match[1];\n event.dateTimeObject = new Date(match[1]);\n }\n\n _this2.trigger('data', event);\n\n return;\n }\n\n match = /^#EXT-X-KEY:?(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'key'\n };\n\n if (match[1]) {\n event.attributes = parseAttributes(match[1]); // parse the IV string into a Uint32Array\n\n if (event.attributes.IV) {\n if (event.attributes.IV.substring(0, 2).toLowerCase() === '0x') {\n event.attributes.IV = event.attributes.IV.substring(2);\n }\n\n event.attributes.IV = event.attributes.IV.match(/.{8}/g);\n event.attributes.IV[0] = parseInt(event.attributes.IV[0], 16);\n event.attributes.IV[1] = parseInt(event.attributes.IV[1], 16);\n event.attributes.IV[2] = parseInt(event.attributes.IV[2], 16);\n event.attributes.IV[3] = parseInt(event.attributes.IV[3], 16);\n event.attributes.IV = new Uint32Array(event.attributes.IV);\n }\n }\n\n _this2.trigger('data', event);\n\n return;\n }\n\n match = /^#EXT-X-START:?(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'start'\n };\n\n if (match[1]) {\n event.attributes = parseAttributes(match[1]);\n event.attributes['TIME-OFFSET'] = parseFloat(event.attributes['TIME-OFFSET']);\n event.attributes.PRECISE = /YES/.test(event.attributes.PRECISE);\n }\n\n _this2.trigger('data', event);\n\n return;\n }\n\n match = /^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'cue-out-cont'\n };\n\n if (match[1]) {\n event.data = match[1];\n } else {\n event.data = '';\n }\n\n _this2.trigger('data', event);\n\n return;\n }\n\n match = /^#EXT-X-CUE-OUT:?(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'cue-out'\n };\n\n if (match[1]) {\n event.data = match[1];\n } else {\n event.data = '';\n }\n\n _this2.trigger('data', event);\n\n return;\n }\n\n match = /^#EXT-X-CUE-IN:?(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'cue-in'\n };\n\n if (match[1]) {\n event.data = match[1];\n } else {\n event.data = '';\n }\n\n _this2.trigger('data', event);\n\n return;\n } // unknown tag type\n\n\n _this2.trigger('data', {\n type: 'tag',\n data: newLine.slice(4)\n });\n });\n }\n /**\n * Add a parser for custom headers\n *\n * @param {Object} options a map of options for the added parser\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {string} options.customType the custom type to register to the output\n * @param {Function} [options.dataParser] function to parse the line into an object\n * @param {boolean} [options.segment] should tag data be attached to the segment object\n */\n ;\n\n _proto.addParser = function addParser(_ref) {\n var _this3 = this;\n\n var expression = _ref.expression,\n customType = _ref.customType,\n dataParser = _ref.dataParser,\n segment = _ref.segment;\n\n if (typeof dataParser !== 'function') {\n dataParser = function dataParser(line) {\n return line;\n };\n }\n\n this.customParsers.push(function (line) {\n var match = expression.exec(line);\n\n if (match) {\n _this3.trigger('data', {\n type: 'custom',\n data: dataParser(line),\n customType: customType,\n segment: segment\n });\n\n return true;\n }\n });\n }\n /**\n * Add a custom header mapper\n *\n * @param {Object} options\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {Function} options.map function to translate tag into a different tag\n */\n ;\n\n _proto.addTagMapper = function addTagMapper(_ref2) {\n var expression = _ref2.expression,\n map = _ref2.map;\n\n var mapFn = function mapFn(line) {\n if (expression.test(line)) {\n return map(line);\n }\n\n return line;\n };\n\n this.tagMappers.push(mapFn);\n };\n\n return ParseStream;\n}(Stream);\n\nfunction decodeB64ToUint8Array(b64Text) {\n var decodedString = window.atob(b64Text || '');\n var array = new Uint8Array(decodedString.length);\n\n for (var i = 0; i < decodedString.length; i++) {\n array[i] = decodedString.charCodeAt(i);\n }\n\n return array;\n}\n/**\n * A parser for M3U8 files. The current interpretation of the input is\n * exposed as a property `manifest` on parser objects. It's just two lines to\n * create and parse a manifest once you have the contents available as a string:\n *\n * ```js\n * var parser = new m3u8.Parser();\n * parser.push(xhr.responseText);\n * ```\n *\n * New input can later be applied to update the manifest object by calling\n * `push` again.\n *\n * The parser attempts to create a usable manifest object even if the\n * underlying input is somewhat nonsensical. It emits `info` and `warning`\n * events during the parse if it encounters input that seems invalid or\n * requires some property of the manifest object to be defaulted.\n *\n * @class Parser\n * @extends Stream\n */\n\n\nvar Parser =\n/*#__PURE__*/\nfunction (_Stream) {\n _inheritsLoose(Parser, _Stream);\n\n function Parser() {\n var _this;\n\n _this = _Stream.call(this) || this;\n _this.lineStream = new LineStream();\n _this.parseStream = new ParseStream();\n\n _this.lineStream.pipe(_this.parseStream);\n /* eslint-disable consistent-this */\n\n\n var self = _assertThisInitialized(_this);\n /* eslint-enable consistent-this */\n\n\n var uris = [];\n var currentUri = {}; // if specified, the active EXT-X-MAP definition\n\n var currentMap; // if specified, the active decryption key\n\n var _key;\n\n var noop = function noop() {};\n\n var defaultMediaGroups = {\n 'AUDIO': {},\n 'VIDEO': {},\n 'CLOSED-CAPTIONS': {},\n 'SUBTITLES': {}\n }; // This is the Widevine UUID from DASH IF IOP. The same exact string is\n // used in MPDs with Widevine encrypted streams.\n\n var widevineUuid = 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'; // group segments into numbered timelines delineated by discontinuities\n\n var currentTimeline = 0; // the manifest is empty until the parse stream begins delivering data\n\n _this.manifest = {\n allowCache: true,\n discontinuityStarts: [],\n segments: []\n }; // update the manifest with the m3u8 entry from the parse stream\n\n _this.parseStream.on('data', function (entry) {\n var mediaGroup;\n var rendition;\n ({\n tag: function tag() {\n // switch based on the tag type\n (({\n 'allow-cache': function allowCache() {\n this.manifest.allowCache = entry.allowed;\n\n if (!('allowed' in entry)) {\n this.trigger('info', {\n message: 'defaulting allowCache to YES'\n });\n this.manifest.allowCache = true;\n }\n },\n byterange: function byterange() {\n var byterange = {};\n\n if ('length' in entry) {\n currentUri.byterange = byterange;\n byterange.length = entry.length;\n\n if (!('offset' in entry)) {\n this.trigger('info', {\n message: 'defaulting offset to zero'\n });\n entry.offset = 0;\n }\n }\n\n if ('offset' in entry) {\n currentUri.byterange = byterange;\n byterange.offset = entry.offset;\n }\n },\n endlist: function endlist() {\n this.manifest.endList = true;\n },\n inf: function inf() {\n if (!('mediaSequence' in this.manifest)) {\n this.manifest.mediaSequence = 0;\n this.trigger('info', {\n message: 'defaulting media sequence to zero'\n });\n }\n\n if (!('discontinuitySequence' in this.manifest)) {\n this.manifest.discontinuitySequence = 0;\n this.trigger('info', {\n message: 'defaulting discontinuity sequence to zero'\n });\n }\n\n if (entry.duration > 0) {\n currentUri.duration = entry.duration;\n }\n\n if (entry.duration === 0) {\n currentUri.duration = 0.01;\n this.trigger('info', {\n message: 'updating zero segment duration to a small value'\n });\n }\n\n this.manifest.segments = uris;\n },\n key: function key() {\n if (!entry.attributes) {\n this.trigger('warn', {\n message: 'ignoring key declaration without attribute list'\n });\n return;\n } // clear the active encryption key\n\n\n if (entry.attributes.METHOD === 'NONE') {\n _key = null;\n return;\n }\n\n if (!entry.attributes.URI) {\n this.trigger('warn', {\n message: 'ignoring key declaration without URI'\n });\n return;\n } // check if the content is encrypted for Widevine\n // Widevine/HLS spec: https://storage.googleapis.com/wvdocs/Widevine_DRM_HLS.pdf\n\n\n if (entry.attributes.KEYFORMAT === widevineUuid) {\n var VALID_METHODS = ['SAMPLE-AES', 'SAMPLE-AES-CTR', 'SAMPLE-AES-CENC'];\n\n if (VALID_METHODS.indexOf(entry.attributes.METHOD) === -1) {\n this.trigger('warn', {\n message: 'invalid key method provided for Widevine'\n });\n return;\n }\n\n if (entry.attributes.METHOD === 'SAMPLE-AES-CENC') {\n this.trigger('warn', {\n message: 'SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead'\n });\n }\n\n if (entry.attributes.URI.substring(0, 23) !== 'data:text/plain;base64,') {\n this.trigger('warn', {\n message: 'invalid key URI provided for Widevine'\n });\n return;\n }\n\n if (!(entry.attributes.KEYID && entry.attributes.KEYID.substring(0, 2) === '0x')) {\n this.trigger('warn', {\n message: 'invalid key ID provided for Widevine'\n });\n return;\n } // if Widevine key attributes are valid, store them as `contentProtection`\n // on the manifest to emulate Widevine tag structure in a DASH mpd\n\n\n this.manifest.contentProtection = {\n 'com.widevine.alpha': {\n attributes: {\n schemeIdUri: entry.attributes.KEYFORMAT,\n // remove '0x' from the key id string\n keyId: entry.attributes.KEYID.substring(2)\n },\n // decode the base64-encoded PSSH box\n pssh: decodeB64ToUint8Array(entry.attributes.URI.split(',')[1])\n }\n };\n return;\n }\n\n if (!entry.attributes.METHOD) {\n this.trigger('warn', {\n message: 'defaulting key method to AES-128'\n });\n } // setup an encryption key for upcoming segments\n\n\n _key = {\n method: entry.attributes.METHOD || 'AES-128',\n uri: entry.attributes.URI\n };\n\n if (typeof entry.attributes.IV !== 'undefined') {\n _key.iv = entry.attributes.IV;\n }\n },\n 'media-sequence': function mediaSequence() {\n if (!isFinite(entry.number)) {\n this.trigger('warn', {\n message: 'ignoring invalid media sequence: ' + entry.number\n });\n return;\n }\n\n this.manifest.mediaSequence = entry.number;\n },\n 'discontinuity-sequence': function discontinuitySequence() {\n if (!isFinite(entry.number)) {\n this.trigger('warn', {\n message: 'ignoring invalid discontinuity sequence: ' + entry.number\n });\n return;\n }\n\n this.manifest.discontinuitySequence = entry.number;\n currentTimeline = entry.number;\n },\n 'playlist-type': function playlistType() {\n if (!/VOD|EVENT/.test(entry.playlistType)) {\n this.trigger('warn', {\n message: 'ignoring unknown playlist type: ' + entry.playlist\n });\n return;\n }\n\n this.manifest.playlistType = entry.playlistType;\n },\n map: function map() {\n currentMap = {};\n\n if (entry.uri) {\n currentMap.uri = entry.uri;\n }\n\n if (entry.byterange) {\n currentMap.byterange = entry.byterange;\n }\n },\n 'stream-inf': function streamInf() {\n this.manifest.playlists = uris;\n this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n\n if (!entry.attributes) {\n this.trigger('warn', {\n message: 'ignoring empty stream-inf attributes'\n });\n return;\n }\n\n if (!currentUri.attributes) {\n currentUri.attributes = {};\n }\n\n _extends(currentUri.attributes, entry.attributes);\n },\n media: function media() {\n this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n\n if (!(entry.attributes && entry.attributes.TYPE && entry.attributes['GROUP-ID'] && entry.attributes.NAME)) {\n this.trigger('warn', {\n message: 'ignoring incomplete or missing media group'\n });\n return;\n } // find the media group, creating defaults as necessary\n\n\n var mediaGroupType = this.manifest.mediaGroups[entry.attributes.TYPE];\n mediaGroupType[entry.attributes['GROUP-ID']] = mediaGroupType[entry.attributes['GROUP-ID']] || {};\n mediaGroup = mediaGroupType[entry.attributes['GROUP-ID']]; // collect the rendition metadata\n\n rendition = {\n default: /yes/i.test(entry.attributes.DEFAULT)\n };\n\n if (rendition.default) {\n rendition.autoselect = true;\n } else {\n rendition.autoselect = /yes/i.test(entry.attributes.AUTOSELECT);\n }\n\n if (entry.attributes.LANGUAGE) {\n rendition.language = entry.attributes.LANGUAGE;\n }\n\n if (entry.attributes.URI) {\n rendition.uri = entry.attributes.URI;\n }\n\n if (entry.attributes['INSTREAM-ID']) {\n rendition.instreamId = entry.attributes['INSTREAM-ID'];\n }\n\n if (entry.attributes.CHARACTERISTICS) {\n rendition.characteristics = entry.attributes.CHARACTERISTICS;\n }\n\n if (entry.attributes.FORCED) {\n rendition.forced = /yes/i.test(entry.attributes.FORCED);\n } // insert the new rendition\n\n\n mediaGroup[entry.attributes.NAME] = rendition;\n },\n discontinuity: function discontinuity() {\n currentTimeline += 1;\n currentUri.discontinuity = true;\n this.manifest.discontinuityStarts.push(uris.length);\n },\n 'program-date-time': function programDateTime() {\n if (typeof this.manifest.dateTimeString === 'undefined') {\n // PROGRAM-DATE-TIME is a media-segment tag, but for backwards\n // compatibility, we add the first occurence of the PROGRAM-DATE-TIME tag\n // to the manifest object\n // TODO: Consider removing this in future major version\n this.manifest.dateTimeString = entry.dateTimeString;\n this.manifest.dateTimeObject = entry.dateTimeObject;\n }\n\n currentUri.dateTimeString = entry.dateTimeString;\n currentUri.dateTimeObject = entry.dateTimeObject;\n },\n targetduration: function targetduration() {\n if (!isFinite(entry.duration) || entry.duration < 0) {\n this.trigger('warn', {\n message: 'ignoring invalid target duration: ' + entry.duration\n });\n return;\n }\n\n this.manifest.targetDuration = entry.duration;\n },\n totalduration: function totalduration() {\n if (!isFinite(entry.duration) || entry.duration < 0) {\n this.trigger('warn', {\n message: 'ignoring invalid total duration: ' + entry.duration\n });\n return;\n }\n\n this.manifest.totalDuration = entry.duration;\n },\n start: function start() {\n if (!entry.attributes || isNaN(entry.attributes['TIME-OFFSET'])) {\n this.trigger('warn', {\n message: 'ignoring start declaration without appropriate attribute list'\n });\n return;\n }\n\n this.manifest.start = {\n timeOffset: entry.attributes['TIME-OFFSET'],\n precise: entry.attributes.PRECISE\n };\n },\n 'cue-out': function cueOut() {\n currentUri.cueOut = entry.data;\n },\n 'cue-out-cont': function cueOutCont() {\n currentUri.cueOutCont = entry.data;\n },\n 'cue-in': function cueIn() {\n currentUri.cueIn = entry.data;\n }\n })[entry.tagType] || noop).call(self);\n },\n uri: function uri() {\n currentUri.uri = entry.uri;\n uris.push(currentUri); // if no explicit duration was declared, use the target duration\n\n if (this.manifest.targetDuration && !('duration' in currentUri)) {\n this.trigger('warn', {\n message: 'defaulting segment duration to the target duration'\n });\n currentUri.duration = this.manifest.targetDuration;\n } // annotate with encryption information, if necessary\n\n\n if (_key) {\n currentUri.key = _key;\n }\n\n currentUri.timeline = currentTimeline; // annotate with initialization segment information, if necessary\n\n if (currentMap) {\n currentUri.map = currentMap;\n } // prepare for the next URI\n\n\n currentUri = {};\n },\n comment: function comment() {// comments are not important for playback\n },\n custom: function custom() {\n // if this is segment-level data attach the output to the segment\n if (entry.segment) {\n currentUri.custom = currentUri.custom || {};\n currentUri.custom[entry.customType] = entry.data; // if this is manifest-level data attach to the top level manifest object\n } else {\n this.manifest.custom = this.manifest.custom || {};\n this.manifest.custom[entry.customType] = entry.data;\n }\n }\n })[entry.type].call(self);\n });\n\n return _this;\n }\n /**\n * Parse the input string and update the manifest object.\n *\n * @param {string} chunk a potentially incomplete portion of the manifest\n */\n\n\n var _proto = Parser.prototype;\n\n _proto.push = function push(chunk) {\n this.lineStream.push(chunk);\n }\n /**\n * Flush any remaining input. This can be handy if the last line of an M3U8\n * manifest did not contain a trailing newline but the file has been\n * completely received.\n */\n ;\n\n _proto.end = function end() {\n // flush any buffered input\n this.lineStream.push('\\n');\n }\n /**\n * Add an additional parser for non-standard tags\n *\n * @param {Object} options a map of options for the added parser\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {string} options.type the type to register to the output\n * @param {Function} [options.dataParser] function to parse the line into an object\n * @param {boolean} [options.segment] should tag data be attached to the segment object\n */\n ;\n\n _proto.addParser = function addParser(options) {\n this.parseStream.addParser(options);\n }\n /**\n * Add a custom header mapper\n *\n * @param {Object} options\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {Function} options.map function to translate tag into a different tag\n */\n ;\n\n _proto.addTagMapper = function addTagMapper(options) {\n this.parseStream.addTagMapper(options);\n };\n\n return Parser;\n}(Stream);\n\nexport { LineStream, ParseStream, Parser };","/*\n * pkcs7.pad\n * https://github.com/brightcove/pkcs7\n *\n * Copyright (c) 2014 Brightcove\n * Licensed under the apache2 license.\n */\nvar PADDING = void 0;\n/**\n * Returns a new Uint8Array that is padded with PKCS#7 padding.\n * @param plaintext {Uint8Array} the input bytes before encryption\n * @return {Uint8Array} the padded bytes\n * @see http://tools.ietf.org/html/rfc5652\n */\n\nfunction pad(plaintext) {\n var padding = PADDING[plaintext.byteLength % 16 || 0];\n var result = new Uint8Array(plaintext.byteLength + padding.length);\n result.set(plaintext);\n result.set(padding, plaintext.byteLength);\n return result;\n} // pre-define the padding values\n\n\nPADDING = [[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]];\n/**\n * Returns the subarray of a Uint8Array without PKCS#7 padding.\n * @param padded {Uint8Array} unencrypted bytes that have been padded\n * @return {Uint8Array} the unpadded bytes\n * @see http://tools.ietf.org/html/rfc5652\n */\n\nfunction unpad(padded) {\n return padded.subarray(0, padded.byteLength - padded[padded.byteLength - 1]);\n}\n\nvar version = \"1.0.2\";\nexport { pad, unpad, version as VERSION };","import { unpad } from 'pkcs7';\n\nvar classCallCheck = function classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar inherits = function inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nvar possibleConstructorReturn = function possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n/**\n * @file aes.js\n *\n * This file contains an adaptation of the AES decryption algorithm\n * from the Standford Javascript Cryptography Library. That work is\n * covered by the following copyright and permissions notice:\n *\n * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\n * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation\n * are those of the authors and should not be interpreted as representing\n * official policies, either expressed or implied, of the authors.\n */\n\n/**\n * Expand the S-box tables.\n *\n * @private\n */\n\n\nvar precompute = function precompute() {\n var tables = [[[], [], [], [], []], [[], [], [], [], []]];\n var encTable = tables[0];\n var decTable = tables[1];\n var sbox = encTable[4];\n var sboxInv = decTable[4];\n var i = void 0;\n var x = void 0;\n var xInv = void 0;\n var d = [];\n var th = [];\n var x2 = void 0;\n var x4 = void 0;\n var x8 = void 0;\n var s = void 0;\n var tEnc = void 0;\n var tDec = void 0; // Compute double and third tables\n\n for (i = 0; i < 256; i++) {\n th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n }\n\n for (x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n // Compute sbox\n s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n s = s >> 8 ^ s & 255 ^ 99;\n sbox[x] = s;\n sboxInv[s] = x; // Compute MixColumns\n\n x8 = d[x4 = d[x2 = d[x]]];\n tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n for (i = 0; i < 4; i++) {\n encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n }\n } // Compactify. Considerable speedup on Firefox.\n\n\n for (i = 0; i < 5; i++) {\n encTable[i] = encTable[i].slice(0);\n decTable[i] = decTable[i].slice(0);\n }\n\n return tables;\n};\n\nvar aesTables = null;\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @class AES\n * @param key {Array} The key as an array of 4, 6 or 8 words.\n */\n\nvar AES = function () {\n function AES(key) {\n classCallCheck(this, AES);\n /**\n * The expanded S-box and inverse S-box tables. These will be computed\n * on the client so that we don't have to send them down the wire.\n *\n * There are two tables, _tables[0] is for encryption and\n * _tables[1] is for decryption.\n *\n * The first 4 sub-tables are the expanded S-box with MixColumns. The\n * last (_tables[01][4]) is the S-box itself.\n *\n * @private\n */\n // if we have yet to precompute the S-box tables\n // do so now\n\n if (!aesTables) {\n aesTables = precompute();\n } // then make a copy of that object for use\n\n\n this._tables = [[aesTables[0][0].slice(), aesTables[0][1].slice(), aesTables[0][2].slice(), aesTables[0][3].slice(), aesTables[0][4].slice()], [aesTables[1][0].slice(), aesTables[1][1].slice(), aesTables[1][2].slice(), aesTables[1][3].slice(), aesTables[1][4].slice()]];\n var i = void 0;\n var j = void 0;\n var tmp = void 0;\n var encKey = void 0;\n var decKey = void 0;\n var sbox = this._tables[0][4];\n var decTable = this._tables[1];\n var keyLen = key.length;\n var rcon = 1;\n\n if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n throw new Error('Invalid aes key size');\n }\n\n encKey = key.slice(0);\n decKey = [];\n this._key = [encKey, decKey]; // schedule encryption keys\n\n for (i = keyLen; i < 4 * keyLen + 28; i++) {\n tmp = encKey[i - 1]; // apply sbox\n\n if (i % keyLen === 0 || keyLen === 8 && i % keyLen === 4) {\n tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255]; // shift rows and add rcon\n\n if (i % keyLen === 0) {\n tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n rcon = rcon << 1 ^ (rcon >> 7) * 283;\n }\n }\n\n encKey[i] = encKey[i - keyLen] ^ tmp;\n } // schedule decryption keys\n\n\n for (j = 0; i; j++, i--) {\n tmp = encKey[j & 3 ? i : i - 4];\n\n if (i <= 4 || j < 4) {\n decKey[j] = tmp;\n } else {\n decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ decTable[1][sbox[tmp >> 16 & 255]] ^ decTable[2][sbox[tmp >> 8 & 255]] ^ decTable[3][sbox[tmp & 255]];\n }\n }\n }\n /**\n * Decrypt 16 bytes, specified as four 32-bit words.\n *\n * @param {Number} encrypted0 the first word to decrypt\n * @param {Number} encrypted1 the second word to decrypt\n * @param {Number} encrypted2 the third word to decrypt\n * @param {Number} encrypted3 the fourth word to decrypt\n * @param {Int32Array} out the array to write the decrypted words\n * into\n * @param {Number} offset the offset into the output array to start\n * writing results\n * @return {Array} The plaintext.\n */\n\n\n AES.prototype.decrypt = function decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\n var key = this._key[1]; // state variables a,b,c,d are loaded with pre-whitened data\n\n var a = encrypted0 ^ key[0];\n var b = encrypted3 ^ key[1];\n var c = encrypted2 ^ key[2];\n var d = encrypted1 ^ key[3];\n var a2 = void 0;\n var b2 = void 0;\n var c2 = void 0; // key.length === 2 ?\n\n var nInnerRounds = key.length / 4 - 2;\n var i = void 0;\n var kIndex = 4;\n var table = this._tables[1]; // load up the tables\n\n var table0 = table[0];\n var table1 = table[1];\n var table2 = table[2];\n var table3 = table[3];\n var sbox = table[4]; // Inner rounds. Cribbed from OpenSSL.\n\n for (i = 0; i < nInnerRounds; i++) {\n a2 = table0[a >>> 24] ^ table1[b >> 16 & 255] ^ table2[c >> 8 & 255] ^ table3[d & 255] ^ key[kIndex];\n b2 = table0[b >>> 24] ^ table1[c >> 16 & 255] ^ table2[d >> 8 & 255] ^ table3[a & 255] ^ key[kIndex + 1];\n c2 = table0[c >>> 24] ^ table1[d >> 16 & 255] ^ table2[a >> 8 & 255] ^ table3[b & 255] ^ key[kIndex + 2];\n d = table0[d >>> 24] ^ table1[a >> 16 & 255] ^ table2[b >> 8 & 255] ^ table3[c & 255] ^ key[kIndex + 3];\n kIndex += 4;\n a = a2;\n b = b2;\n c = c2;\n } // Last round.\n\n\n for (i = 0; i < 4; i++) {\n out[(3 & -i) + offset] = sbox[a >>> 24] << 24 ^ sbox[b >> 16 & 255] << 16 ^ sbox[c >> 8 & 255] << 8 ^ sbox[d & 255] ^ key[kIndex++];\n a2 = a;\n a = b;\n b = c;\n c = d;\n d = a2;\n }\n };\n\n return AES;\n}();\n/**\n * @file stream.js\n */\n\n/**\n * A lightweight readable stream implemention that handles event dispatching.\n *\n * @class Stream\n */\n\n\nvar Stream = function () {\n function Stream() {\n classCallCheck(this, Stream);\n this.listeners = {};\n }\n /**\n * Add a listener for a specified event type.\n *\n * @param {String} type the event name\n * @param {Function} listener the callback to be invoked when an event of\n * the specified type occurs\n */\n\n\n Stream.prototype.on = function on(type, listener) {\n if (!this.listeners[type]) {\n this.listeners[type] = [];\n }\n\n this.listeners[type].push(listener);\n };\n /**\n * Remove a listener for a specified event type.\n *\n * @param {String} type the event name\n * @param {Function} listener a function previously registered for this\n * type of event through `on`\n * @return {Boolean} if we could turn it off or not\n */\n\n\n Stream.prototype.off = function off(type, listener) {\n if (!this.listeners[type]) {\n return false;\n }\n\n var index = this.listeners[type].indexOf(listener);\n this.listeners[type].splice(index, 1);\n return index > -1;\n };\n /**\n * Trigger an event of the specified type on this stream. Any additional\n * arguments to this function are passed as parameters to event listeners.\n *\n * @param {String} type the event name\n */\n\n\n Stream.prototype.trigger = function trigger(type) {\n var callbacks = this.listeners[type];\n\n if (!callbacks) {\n return;\n } // Slicing the arguments on every invocation of this method\n // can add a significant amount of overhead. Avoid the\n // intermediate object creation for the common case of a\n // single callback argument\n\n\n if (arguments.length === 2) {\n var length = callbacks.length;\n\n for (var i = 0; i < length; ++i) {\n callbacks[i].call(this, arguments[1]);\n }\n } else {\n var args = Array.prototype.slice.call(arguments, 1);\n var _length = callbacks.length;\n\n for (var _i = 0; _i < _length; ++_i) {\n callbacks[_i].apply(this, args);\n }\n }\n };\n /**\n * Destroys the stream and cleans up.\n */\n\n\n Stream.prototype.dispose = function dispose() {\n this.listeners = {};\n };\n /**\n * Forwards all `data` events on this stream to the destination stream. The\n * destination stream should provide a method `push` to receive the data\n * events as they arrive.\n *\n * @param {Stream} destination the stream that will receive all `data` events\n * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n */\n\n\n Stream.prototype.pipe = function pipe(destination) {\n this.on('data', function (data) {\n destination.push(data);\n });\n };\n\n return Stream;\n}();\n/**\n * @file async-stream.js\n */\n\n/**\n * A wrapper around the Stream class to use setTiemout\n * and run stream \"jobs\" Asynchronously\n *\n * @class AsyncStream\n * @extends Stream\n */\n\n\nvar AsyncStream = function (_Stream) {\n inherits(AsyncStream, _Stream);\n\n function AsyncStream() {\n classCallCheck(this, AsyncStream);\n\n var _this = possibleConstructorReturn(this, _Stream.call(this, Stream));\n\n _this.jobs = [];\n _this.delay = 1;\n _this.timeout_ = null;\n return _this;\n }\n /**\n * process an async job\n *\n * @private\n */\n\n\n AsyncStream.prototype.processJob_ = function processJob_() {\n this.jobs.shift()();\n\n if (this.jobs.length) {\n this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n } else {\n this.timeout_ = null;\n }\n };\n /**\n * push a job into the stream\n *\n * @param {Function} job the job to push into the stream\n */\n\n\n AsyncStream.prototype.push = function push(job) {\n this.jobs.push(job);\n\n if (!this.timeout_) {\n this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n }\n };\n\n return AsyncStream;\n}(Stream);\n/**\n * @file decrypter.js\n *\n * An asynchronous implementation of AES-128 CBC decryption with\n * PKCS#7 padding.\n */\n\n/**\n * Convert network-order (big-endian) bytes into their little-endian\n * representation.\n */\n\n\nvar ntoh = function ntoh(word) {\n return word << 24 | (word & 0xff00) << 8 | (word & 0xff0000) >> 8 | word >>> 24;\n};\n/**\n * Decrypt bytes using AES-128 with CBC and PKCS#7 padding.\n *\n * @param {Uint8Array} encrypted the encrypted bytes\n * @param {Uint32Array} key the bytes of the decryption key\n * @param {Uint32Array} initVector the initialization vector (IV) to\n * use for the first round of CBC.\n * @return {Uint8Array} the decrypted bytes\n *\n * @see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard\n * @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29\n * @see https://tools.ietf.org/html/rfc2315\n */\n\n\nvar decrypt = function decrypt(encrypted, key, initVector) {\n // word-level access to the encrypted bytes\n var encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2);\n var decipher = new AES(Array.prototype.slice.call(key)); // byte and word-level access for the decrypted output\n\n var decrypted = new Uint8Array(encrypted.byteLength);\n var decrypted32 = new Int32Array(decrypted.buffer); // temporary variables for working with the IV, encrypted, and\n // decrypted data\n\n var init0 = void 0;\n var init1 = void 0;\n var init2 = void 0;\n var init3 = void 0;\n var encrypted0 = void 0;\n var encrypted1 = void 0;\n var encrypted2 = void 0;\n var encrypted3 = void 0; // iteration variable\n\n var wordIx = void 0; // pull out the words of the IV to ensure we don't modify the\n // passed-in reference and easier access\n\n init0 = initVector[0];\n init1 = initVector[1];\n init2 = initVector[2];\n init3 = initVector[3]; // decrypt four word sequences, applying cipher-block chaining (CBC)\n // to each decrypted block\n\n for (wordIx = 0; wordIx < encrypted32.length; wordIx += 4) {\n // convert big-endian (network order) words into little-endian\n // (javascript order)\n encrypted0 = ntoh(encrypted32[wordIx]);\n encrypted1 = ntoh(encrypted32[wordIx + 1]);\n encrypted2 = ntoh(encrypted32[wordIx + 2]);\n encrypted3 = ntoh(encrypted32[wordIx + 3]); // decrypt the block\n\n decipher.decrypt(encrypted0, encrypted1, encrypted2, encrypted3, decrypted32, wordIx); // XOR with the IV, and restore network byte-order to obtain the\n // plaintext\n\n decrypted32[wordIx] = ntoh(decrypted32[wordIx] ^ init0);\n decrypted32[wordIx + 1] = ntoh(decrypted32[wordIx + 1] ^ init1);\n decrypted32[wordIx + 2] = ntoh(decrypted32[wordIx + 2] ^ init2);\n decrypted32[wordIx + 3] = ntoh(decrypted32[wordIx + 3] ^ init3); // setup the IV for the next round\n\n init0 = encrypted0;\n init1 = encrypted1;\n init2 = encrypted2;\n init3 = encrypted3;\n }\n\n return decrypted;\n};\n/**\n * The `Decrypter` class that manages decryption of AES\n * data through `AsyncStream` objects and the `decrypt`\n * function\n *\n * @param {Uint8Array} encrypted the encrypted bytes\n * @param {Uint32Array} key the bytes of the decryption key\n * @param {Uint32Array} initVector the initialization vector (IV) to\n * @param {Function} done the function to run when done\n * @class Decrypter\n */\n\n\nvar Decrypter = function () {\n function Decrypter(encrypted, key, initVector, done) {\n classCallCheck(this, Decrypter);\n var step = Decrypter.STEP;\n var encrypted32 = new Int32Array(encrypted.buffer);\n var decrypted = new Uint8Array(encrypted.byteLength);\n var i = 0;\n this.asyncStream_ = new AsyncStream(); // split up the encryption job and do the individual chunks asynchronously\n\n this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n\n for (i = step; i < encrypted32.length; i += step) {\n initVector = new Uint32Array([ntoh(encrypted32[i - 4]), ntoh(encrypted32[i - 3]), ntoh(encrypted32[i - 2]), ntoh(encrypted32[i - 1])]);\n this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n } // invoke the done() callback when everything is finished\n\n\n this.asyncStream_.push(function () {\n // remove pkcs#7 padding from the decrypted bytes\n done(null, unpad(decrypted));\n });\n }\n /**\n * a getter for step the maximum number of bytes to process at one time\n *\n * @return {Number} the value of step 32000\n */\n\n /**\n * @private\n */\n\n\n Decrypter.prototype.decryptChunk_ = function decryptChunk_(encrypted, key, initVector, decrypted) {\n return function () {\n var bytes = decrypt(encrypted, key, initVector);\n decrypted.set(bytes, encrypted.byteOffset);\n };\n };\n\n createClass(Decrypter, null, [{\n key: 'STEP',\n get: function get$$1() {\n // 4 * 8000;\n return 32000;\n }\n }]);\n return Decrypter;\n}();\n/**\n * @file index.js\n *\n * Index module to easily import the primary components of AES-128\n * decryption. Like this:\n *\n * ```js\n * import {Decrypter, decrypt, AsyncStream} from 'aes-decrypter';\n * ```\n */\n\n\nexport { decrypt, Decrypter, AsyncStream };","/**\n * @license\n * Video.js 7.6.5 <http://videojs.com/>\n * Copyright Brightcove, Inc. <https://www.brightcove.com/>\n * Available under Apache License Version 2.0\n * <https://github.com/videojs/video.js/blob/master/LICENSE>\n *\n * Includes vtt.js <https://github.com/mozilla/vtt.js>\n * Available under Apache License Version 2.0\n * <https://github.com/mozilla/vtt.js/blob/master/LICENSE>\n */\nimport window$1 from 'global/window';\nimport document from 'global/document';\nimport safeParseTuple from 'safe-json-parse/tuple';\nimport keycode from 'keycode';\nimport XHR from 'xhr';\nimport vtt from 'videojs-vtt.js';\nimport URLToolkit from 'url-toolkit';\nimport { Parser } from 'm3u8-parser';\nimport { parse, parseUTCTiming } from 'mpd-parser';\nimport mp4Inspector from 'mux.js/lib/tools/mp4-inspector';\nimport mp4probe from 'mux.js/lib/mp4/probe';\nimport CaptionParser from 'mux.js/lib/mp4/caption-parser';\nimport tsInspector from 'mux.js/lib/tools/ts-inspector.js';\nimport { Decrypter, AsyncStream, decrypt } from 'aes-decrypter';\nvar version = \"7.6.5\";\n/**\n * @file create-logger.js\n * @module create-logger\n */\n\nvar history = [];\n/**\n * Log messages to the console and history based on the type of message\n *\n * @private\n * @param {string} type\n * The name of the console method to use.\n *\n * @param {Array} args\n * The arguments to be passed to the matching console method.\n */\n\nvar LogByTypeFactory = function LogByTypeFactory(name, log) {\n return function (type, level, args) {\n var lvl = log.levels[level];\n var lvlRegExp = new RegExp(\"^(\" + lvl + \")$\");\n\n if (type !== 'log') {\n // Add the type to the front of the message when it's not \"log\".\n args.unshift(type.toUpperCase() + ':');\n } // Add console prefix after adding to history.\n\n\n args.unshift(name + ':'); // Add a clone of the args at this point to history.\n\n if (history) {\n history.push([].concat(args));\n } // If there's no console then don't try to output messages, but they will\n // still be stored in history.\n\n\n if (!window$1.console) {\n return;\n } // Was setting these once outside of this function, but containing them\n // in the function makes it easier to test cases where console doesn't exist\n // when the module is executed.\n\n\n var fn = window$1.console[type];\n\n if (!fn && type === 'debug') {\n // Certain browsers don't have support for console.debug. For those, we\n // should default to the closest comparable log.\n fn = window$1.console.info || window$1.console.log;\n } // Bail out if there's no console or if this type is not allowed by the\n // current logging level.\n\n\n if (!fn || !lvl || !lvlRegExp.test(type)) {\n return;\n }\n\n fn[Array.isArray(args) ? 'apply' : 'call'](window$1.console, args);\n };\n};\n\nfunction createLogger(name) {\n // This is the private tracking variable for logging level.\n var level = 'info'; // the curried logByType bound to the specific log and history\n\n var logByType;\n /**\n * Logs plain debug messages. Similar to `console.log`.\n *\n * Due to [limitations](https://github.com/jsdoc3/jsdoc/issues/955#issuecomment-313829149)\n * of our JSDoc template, we cannot properly document this as both a function\n * and a namespace, so its function signature is documented here.\n *\n * #### Arguments\n * ##### *args\n * Mixed[]\n *\n * Any combination of values that could be passed to `console.log()`.\n *\n * #### Return Value\n *\n * `undefined`\n *\n * @namespace\n * @param {Mixed[]} args\n * One or more messages or objects that should be logged.\n */\n\n var log = function log() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n logByType('log', level, args);\n }; // This is the logByType helper that the logging methods below use\n\n\n logByType = LogByTypeFactory(name, log);\n /**\n * Create a new sublogger which chains the old name to the new name.\n *\n * For example, doing `videojs.log.createLogger('player')` and then using that logger will log the following:\n * ```js\n * mylogger('foo');\n * // > VIDEOJS: player: foo\n * ```\n *\n * @param {string} name\n * The name to add call the new logger\n * @return {Object}\n */\n\n log.createLogger = function (subname) {\n return createLogger(name + ': ' + subname);\n };\n /**\n * Enumeration of available logging levels, where the keys are the level names\n * and the values are `|`-separated strings containing logging methods allowed\n * in that logging level. These strings are used to create a regular expression\n * matching the function name being called.\n *\n * Levels provided by Video.js are:\n *\n * - `off`: Matches no calls. Any value that can be cast to `false` will have\n * this effect. The most restrictive.\n * - `all`: Matches only Video.js-provided functions (`debug`, `log`,\n * `log.warn`, and `log.error`).\n * - `debug`: Matches `log.debug`, `log`, `log.warn`, and `log.error` calls.\n * - `info` (default): Matches `log`, `log.warn`, and `log.error` calls.\n * - `warn`: Matches `log.warn` and `log.error` calls.\n * - `error`: Matches only `log.error` calls.\n *\n * @type {Object}\n */\n\n\n log.levels = {\n all: 'debug|log|warn|error',\n off: '',\n debug: 'debug|log|warn|error',\n info: 'log|warn|error',\n warn: 'warn|error',\n error: 'error',\n DEFAULT: level\n };\n /**\n * Get or set the current logging level.\n *\n * If a string matching a key from {@link module:log.levels} is provided, acts\n * as a setter.\n *\n * @param {string} [lvl]\n * Pass a valid level to set a new logging level.\n *\n * @return {string}\n * The current logging level.\n */\n\n log.level = function (lvl) {\n if (typeof lvl === 'string') {\n if (!log.levels.hasOwnProperty(lvl)) {\n throw new Error(\"\\\"\" + lvl + \"\\\" in not a valid log level\");\n }\n\n level = lvl;\n }\n\n return level;\n };\n /**\n * Returns an array containing everything that has been logged to the history.\n *\n * This array is a shallow clone of the internal history record. However, its\n * contents are _not_ cloned; so, mutating objects inside this array will\n * mutate them in history.\n *\n * @return {Array}\n */\n\n\n log.history = function () {\n return history ? [].concat(history) : [];\n };\n /**\n * Allows you to filter the history by the given logger name\n *\n * @param {string} fname\n * The name to filter by\n *\n * @return {Array}\n * The filtered list to return\n */\n\n\n log.history.filter = function (fname) {\n return (history || []).filter(function (historyItem) {\n // if the first item in each historyItem includes `fname`, then it's a match\n return new RegExp(\".*\" + fname + \".*\").test(historyItem[0]);\n });\n };\n /**\n * Clears the internal history tracking, but does not prevent further history\n * tracking.\n */\n\n\n log.history.clear = function () {\n if (history) {\n history.length = 0;\n }\n };\n /**\n * Disable history tracking if it is currently enabled.\n */\n\n\n log.history.disable = function () {\n if (history !== null) {\n history.length = 0;\n history = null;\n }\n };\n /**\n * Enable history tracking if it is currently disabled.\n */\n\n\n log.history.enable = function () {\n if (history === null) {\n history = [];\n }\n };\n /**\n * Logs error messages. Similar to `console.error`.\n *\n * @param {Mixed[]} args\n * One or more messages or objects that should be logged as an error\n */\n\n\n log.error = function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return logByType('error', level, args);\n };\n /**\n * Logs warning messages. Similar to `console.warn`.\n *\n * @param {Mixed[]} args\n * One or more messages or objects that should be logged as a warning.\n */\n\n\n log.warn = function () {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n return logByType('warn', level, args);\n };\n /**\n * Logs debug messages. Similar to `console.debug`, but may also act as a comparable\n * log if `console.debug` is not available\n *\n * @param {Mixed[]} args\n * One or more messages or objects that should be logged as debug.\n */\n\n\n log.debug = function () {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n return logByType('debug', level, args);\n };\n\n return log;\n}\n/**\n * @file log.js\n * @module log\n */\n\n\nvar log = createLogger('VIDEOJS');\nvar createLogger$1 = log.createLogger;\n/**\n * @file obj.js\n * @module obj\n */\n\n/**\n * @callback obj:EachCallback\n *\n * @param {Mixed} value\n * The current key for the object that is being iterated over.\n *\n * @param {string} key\n * The current key-value for object that is being iterated over\n */\n\n/**\n * @callback obj:ReduceCallback\n *\n * @param {Mixed} accum\n * The value that is accumulating over the reduce loop.\n *\n * @param {Mixed} value\n * The current key for the object that is being iterated over.\n *\n * @param {string} key\n * The current key-value for object that is being iterated over\n *\n * @return {Mixed}\n * The new accumulated value.\n */\n\nvar toString = Object.prototype.toString;\n/**\n * Get the keys of an Object\n *\n * @param {Object}\n * The Object to get the keys from\n *\n * @return {string[]}\n * An array of the keys from the object. Returns an empty array if the\n * object passed in was invalid or had no keys.\n *\n * @private\n */\n\nvar keys = function keys(object) {\n return isObject(object) ? Object.keys(object) : [];\n};\n/**\n * Array-like iteration for objects.\n *\n * @param {Object} object\n * The object to iterate over\n *\n * @param {obj:EachCallback} fn\n * The callback function which is called for each key in the object.\n */\n\n\nfunction each(object, fn) {\n keys(object).forEach(function (key) {\n return fn(object[key], key);\n });\n}\n/**\n * Array-like reduce for objects.\n *\n * @param {Object} object\n * The Object that you want to reduce.\n *\n * @param {Function} fn\n * A callback function which is called for each key in the object. It\n * receives the accumulated value and the per-iteration value and key\n * as arguments.\n *\n * @param {Mixed} [initial = 0]\n * Starting value\n *\n * @return {Mixed}\n * The final accumulated value.\n */\n\n\nfunction reduce(object, fn, initial) {\n if (initial === void 0) {\n initial = 0;\n }\n\n return keys(object).reduce(function (accum, key) {\n return fn(accum, object[key], key);\n }, initial);\n}\n/**\n * Object.assign-style object shallow merge/extend.\n *\n * @param {Object} target\n * @param {Object} ...sources\n * @return {Object}\n */\n\n\nfunction assign(target) {\n for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n sources[_key - 1] = arguments[_key];\n }\n\n if (Object.assign) {\n return Object.assign.apply(Object, [target].concat(sources));\n }\n\n sources.forEach(function (source) {\n if (!source) {\n return;\n }\n\n each(source, function (value, key) {\n target[key] = value;\n });\n });\n return target;\n}\n/**\n * Returns whether a value is an object of any kind - including DOM nodes,\n * arrays, regular expressions, etc. Not functions, though.\n *\n * This avoids the gotcha where using `typeof` on a `null` value\n * results in `'object'`.\n *\n * @param {Object} value\n * @return {boolean}\n */\n\n\nfunction isObject(value) {\n return !!value && typeof value === 'object';\n}\n/**\n * Returns whether an object appears to be a \"plain\" object - that is, a\n * direct instance of `Object`.\n *\n * @param {Object} value\n * @return {boolean}\n */\n\n\nfunction isPlain(value) {\n return isObject(value) && toString.call(value) === '[object Object]' && value.constructor === Object;\n}\n/**\n * @file computed-style.js\n * @module computed-style\n */\n\n/**\n * A safe getComputedStyle.\n *\n * This is needed because in Firefox, if the player is loaded in an iframe with\n * `display:none`, then `getComputedStyle` returns `null`, so, we do a\n * null-check to make sure that the player doesn't break in these cases.\n *\n * @function\n * @param {Element} el\n * The element you want the computed style of\n *\n * @param {string} prop\n * The property name you want\n *\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n */\n\n\nfunction computedStyle(el, prop) {\n if (!el || !prop) {\n return '';\n }\n\n if (typeof window$1.getComputedStyle === 'function') {\n var computedStyleValue = window$1.getComputedStyle(el);\n return computedStyleValue ? computedStyleValue.getPropertyValue(prop) || computedStyleValue[prop] : '';\n }\n\n return '';\n}\n/**\n * @file dom.js\n * @module dom\n */\n\n/**\n * Detect if a value is a string with any non-whitespace characters.\n *\n * @private\n * @param {string} str\n * The string to check\n *\n * @return {boolean}\n * Will be `true` if the string is non-blank, `false` otherwise.\n *\n */\n\n\nfunction isNonBlankString(str) {\n return typeof str === 'string' && /\\S/.test(str);\n}\n/**\n * Throws an error if the passed string has whitespace. This is used by\n * class methods to be relatively consistent with the classList API.\n *\n * @private\n * @param {string} str\n * The string to check for whitespace.\n *\n * @throws {Error}\n * Throws an error if there is whitespace in the string.\n */\n\n\nfunction throwIfWhitespace(str) {\n if (/\\s/.test(str)) {\n throw new Error('class has illegal whitespace characters');\n }\n}\n/**\n * Produce a regular expression for matching a className within an elements className.\n *\n * @private\n * @param {string} className\n * The className to generate the RegExp for.\n *\n * @return {RegExp}\n * The RegExp that will check for a specific `className` in an elements\n * className.\n */\n\n\nfunction classRegExp(className) {\n return new RegExp('(^|\\\\s)' + className + '($|\\\\s)');\n}\n/**\n * Whether the current DOM interface appears to be real (i.e. not simulated).\n *\n * @return {boolean}\n * Will be `true` if the DOM appears to be real, `false` otherwise.\n */\n\n\nfunction isReal() {\n // Both document and window will never be undefined thanks to `global`.\n return document === window$1.document;\n}\n/**\n * Determines, via duck typing, whether or not a value is a DOM element.\n *\n * @param {Mixed} value\n * The value to check.\n *\n * @return {boolean}\n * Will be `true` if the value is a DOM element, `false` otherwise.\n */\n\n\nfunction isEl(value) {\n return isObject(value) && value.nodeType === 1;\n}\n/**\n * Determines if the current DOM is embedded in an iframe.\n *\n * @return {boolean}\n * Will be `true` if the DOM is embedded in an iframe, `false`\n * otherwise.\n */\n\n\nfunction isInFrame() {\n // We need a try/catch here because Safari will throw errors when attempting\n // to get either `parent` or `self`\n try {\n return window$1.parent !== window$1.self;\n } catch (x) {\n return true;\n }\n}\n/**\n * Creates functions to query the DOM using a given method.\n *\n * @private\n * @param {string} method\n * The method to create the query with.\n *\n * @return {Function}\n * The query method\n */\n\n\nfunction createQuerier(method) {\n return function (selector, context) {\n if (!isNonBlankString(selector)) {\n return document[method](null);\n }\n\n if (isNonBlankString(context)) {\n context = document.querySelector(context);\n }\n\n var ctx = isEl(context) ? context : document;\n return ctx[method] && ctx[method](selector);\n };\n}\n/**\n * Creates an element and applies properties, attributes, and inserts content.\n *\n * @param {string} [tagName='div']\n * Name of tag to be created.\n *\n * @param {Object} [properties={}]\n * Element properties to be applied.\n *\n * @param {Object} [attributes={}]\n * Element attributes to be applied.\n *\n * @param {module:dom~ContentDescriptor} content\n * A content descriptor object.\n *\n * @return {Element}\n * The element that was created.\n */\n\n\nfunction createEl(tagName, properties, attributes, content) {\n if (tagName === void 0) {\n tagName = 'div';\n }\n\n if (properties === void 0) {\n properties = {};\n }\n\n if (attributes === void 0) {\n attributes = {};\n }\n\n var el = document.createElement(tagName);\n Object.getOwnPropertyNames(properties).forEach(function (propName) {\n var val = properties[propName]; // See #2176\n // We originally were accepting both properties and attributes in the\n // same object, but that doesn't work so well.\n\n if (propName.indexOf('aria-') !== -1 || propName === 'role' || propName === 'type') {\n log.warn('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 \" + propName + \" to \" + val + \".\"));\n el.setAttribute(propName, val); // Handle textContent since it's not supported everywhere and we have a\n // method for it.\n } else if (propName === 'textContent') {\n textContent(el, val);\n } else {\n el[propName] = val;\n }\n });\n Object.getOwnPropertyNames(attributes).forEach(function (attrName) {\n el.setAttribute(attrName, attributes[attrName]);\n });\n\n if (content) {\n appendContent(el, content);\n }\n\n return el;\n}\n/**\n * Injects text into an element, replacing any existing contents entirely.\n *\n * @param {Element} el\n * The element to add text content into\n *\n * @param {string} text\n * The text content to add.\n *\n * @return {Element}\n * The element with added text content.\n */\n\n\nfunction textContent(el, text) {\n if (typeof el.textContent === 'undefined') {\n el.innerText = text;\n } else {\n el.textContent = text;\n }\n\n return el;\n}\n/**\n * Insert an element as the first child node of another\n *\n * @param {Element} child\n * Element to insert\n *\n * @param {Element} parent\n * Element to insert child into\n */\n\n\nfunction prependTo(child, parent) {\n if (parent.firstChild) {\n parent.insertBefore(child, parent.firstChild);\n } else {\n parent.appendChild(child);\n }\n}\n/**\n * Check if an element has a class name.\n *\n * @param {Element} element\n * Element to check\n *\n * @param {string} classToCheck\n * Class name to check for\n *\n * @return {boolean}\n * Will be `true` if the element has a class, `false` otherwise.\n *\n * @throws {Error}\n * Throws an error if `classToCheck` has white space.\n */\n\n\nfunction hasClass(element, classToCheck) {\n throwIfWhitespace(classToCheck);\n\n if (element.classList) {\n return element.classList.contains(classToCheck);\n }\n\n return classRegExp(classToCheck).test(element.className);\n}\n/**\n * Add a class name to an element.\n *\n * @param {Element} element\n * Element to add class name to.\n *\n * @param {string} classToAdd\n * Class name to add.\n *\n * @return {Element}\n * The DOM element with the added class name.\n */\n\n\nfunction addClass(element, classToAdd) {\n if (element.classList) {\n element.classList.add(classToAdd); // Don't need to `throwIfWhitespace` here because `hasElClass` will do it\n // in the case of classList not being supported.\n } else if (!hasClass(element, classToAdd)) {\n element.className = (element.className + ' ' + classToAdd).trim();\n }\n\n return element;\n}\n/**\n * Remove a class name from an element.\n *\n * @param {Element} element\n * Element to remove a class name from.\n *\n * @param {string} classToRemove\n * Class name to remove\n *\n * @return {Element}\n * The DOM element with class name removed.\n */\n\n\nfunction removeClass(element, classToRemove) {\n if (element.classList) {\n element.classList.remove(classToRemove);\n } else {\n throwIfWhitespace(classToRemove);\n element.className = element.className.split(/\\s+/).filter(function (c) {\n return c !== classToRemove;\n }).join(' ');\n }\n\n return element;\n}\n/**\n * The callback definition for toggleClass.\n *\n * @callback module:dom~PredicateCallback\n * @param {Element} element\n * The DOM element of the Component.\n *\n * @param {string} classToToggle\n * The `className` that wants to be toggled\n *\n * @return {boolean|undefined}\n * If `true` is returned, the `classToToggle` will be added to the\n * `element`. If `false`, the `classToToggle` will be removed from\n * the `element`. If `undefined`, the callback will be ignored.\n */\n\n/**\n * Adds or removes a class name to/from an element depending on an optional\n * condition or the presence/absence of the class name.\n *\n * @param {Element} element\n * The element to toggle a class name on.\n *\n * @param {string} classToToggle\n * The class that should be toggled.\n *\n * @param {boolean|module:dom~PredicateCallback} [predicate]\n * See the return value for {@link module:dom~PredicateCallback}\n *\n * @return {Element}\n * The element with a class that has been toggled.\n */\n\n\nfunction toggleClass(element, classToToggle, predicate) {\n // This CANNOT use `classList` internally because IE11 does not support the\n // second parameter to the `classList.toggle()` method! Which is fine because\n // `classList` will be used by the add/remove functions.\n var has = hasClass(element, classToToggle);\n\n if (typeof predicate === 'function') {\n predicate = predicate(element, classToToggle);\n }\n\n if (typeof predicate !== 'boolean') {\n predicate = !has;\n } // If the necessary class operation matches the current state of the\n // element, no action is required.\n\n\n if (predicate === has) {\n return;\n }\n\n if (predicate) {\n addClass(element, classToToggle);\n } else {\n removeClass(element, classToToggle);\n }\n\n return element;\n}\n/**\n * Apply attributes to an HTML element.\n *\n * @param {Element} el\n * Element to add attributes to.\n *\n * @param {Object} [attributes]\n * Attributes to be applied.\n */\n\n\nfunction setAttributes(el, attributes) {\n Object.getOwnPropertyNames(attributes).forEach(function (attrName) {\n var attrValue = attributes[attrName];\n\n if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) {\n el.removeAttribute(attrName);\n } else {\n el.setAttribute(attrName, attrValue === true ? '' : attrValue);\n }\n });\n}\n/**\n * Get an element's attribute values, as defined on the HTML tag.\n *\n * Attributes are not the same as properties. They're defined on the tag\n * or with setAttribute.\n *\n * @param {Element} tag\n * Element from which to get tag attributes.\n *\n * @return {Object}\n * All attributes of the element. Boolean attributes will be `true` or\n * `false`, others will be strings.\n */\n\n\nfunction getAttributes(tag) {\n var obj = {}; // known boolean attributes\n // we can check for matching boolean properties, but not all browsers\n // and not all tags know about these attributes, so, we still want to check them manually\n\n var knownBooleans = ',' + 'autoplay,controls,playsinline,loop,muted,default,defaultMuted' + ',';\n\n if (tag && tag.attributes && tag.attributes.length > 0) {\n var attrs = tag.attributes;\n\n for (var i = attrs.length - 1; i >= 0; i--) {\n var attrName = attrs[i].name;\n var attrVal = attrs[i].value; // check for known booleans\n // the matching element property will return a value for typeof\n\n if (typeof tag[attrName] === 'boolean' || knownBooleans.indexOf(',' + attrName + ',') !== -1) {\n // the value of an included boolean attribute is typically an empty\n // string ('') which would equal false if we just check for a false value.\n // we also don't want support bad code like autoplay='false'\n attrVal = attrVal !== null ? true : false;\n }\n\n obj[attrName] = attrVal;\n }\n }\n\n return obj;\n}\n/**\n * Get the value of an element's attribute.\n *\n * @param {Element} el\n * A DOM element.\n *\n * @param {string} attribute\n * Attribute to get the value of.\n *\n * @return {string}\n * The value of the attribute.\n */\n\n\nfunction getAttribute(el, attribute) {\n return el.getAttribute(attribute);\n}\n/**\n * Set the value of an element's attribute.\n *\n * @param {Element} el\n * A DOM element.\n *\n * @param {string} attribute\n * Attribute to set.\n *\n * @param {string} value\n * Value to set the attribute to.\n */\n\n\nfunction setAttribute(el, attribute, value) {\n el.setAttribute(attribute, value);\n}\n/**\n * Remove an element's attribute.\n *\n * @param {Element} el\n * A DOM element.\n *\n * @param {string} attribute\n * Attribute to remove.\n */\n\n\nfunction removeAttribute(el, attribute) {\n el.removeAttribute(attribute);\n}\n/**\n * Attempt to block the ability to select text.\n */\n\n\nfunction blockTextSelection() {\n document.body.focus();\n\n document.onselectstart = function () {\n return false;\n };\n}\n/**\n * Turn off text selection blocking.\n */\n\n\nfunction unblockTextSelection() {\n document.onselectstart = function () {\n return true;\n };\n}\n/**\n * Identical to the native `getBoundingClientRect` function, but ensures that\n * the method is supported at all (it is in all browsers we claim to support)\n * and that the element is in the DOM before continuing.\n *\n * This wrapper function also shims properties which are not provided by some\n * older browsers (namely, IE8).\n *\n * Additionally, some browsers do not support adding properties to a\n * `ClientRect`/`DOMRect` object; so, we shallow-copy it with the standard\n * properties (except `x` and `y` which are not widely supported). This helps\n * avoid implementations where keys are non-enumerable.\n *\n * @param {Element} el\n * Element whose `ClientRect` we want to calculate.\n *\n * @return {Object|undefined}\n * Always returns a plain object - or `undefined` if it cannot.\n */\n\n\nfunction getBoundingClientRect(el) {\n if (el && el.getBoundingClientRect && el.parentNode) {\n var rect = el.getBoundingClientRect();\n var result = {};\n ['bottom', 'height', 'left', 'right', 'top', 'width'].forEach(function (k) {\n if (rect[k] !== undefined) {\n result[k] = rect[k];\n }\n });\n\n if (!result.height) {\n result.height = parseFloat(computedStyle(el, 'height'));\n }\n\n if (!result.width) {\n result.width = parseFloat(computedStyle(el, 'width'));\n }\n\n return result;\n }\n}\n/**\n * Represents the position of a DOM element on the page.\n *\n * @typedef {Object} module:dom~Position\n *\n * @property {number} left\n * Pixels to the left.\n *\n * @property {number} top\n * Pixels from the top.\n */\n\n/**\n * Get the position of an element in the DOM.\n *\n * Uses `getBoundingClientRect` technique from John Resig.\n *\n * @see http://ejohn.org/blog/getboundingclientrect-is-awesome/\n *\n * @param {Element} el\n * Element from which to get offset.\n *\n * @return {module:dom~Position}\n * The position of the element that was passed in.\n */\n\n\nfunction findPosition(el) {\n var box;\n\n if (el.getBoundingClientRect && el.parentNode) {\n box = el.getBoundingClientRect();\n }\n\n if (!box) {\n return {\n left: 0,\n top: 0\n };\n }\n\n var docEl = document.documentElement;\n var body = document.body;\n var clientLeft = docEl.clientLeft || body.clientLeft || 0;\n var scrollLeft = window$1.pageXOffset || body.scrollLeft;\n var left = box.left + scrollLeft - clientLeft;\n var clientTop = docEl.clientTop || body.clientTop || 0;\n var scrollTop = window$1.pageYOffset || body.scrollTop;\n var top = box.top + scrollTop - clientTop; // Android sometimes returns slightly off decimal values, so need to round\n\n return {\n left: Math.round(left),\n top: Math.round(top)\n };\n}\n/**\n * Represents x and y coordinates for a DOM element or mouse pointer.\n *\n * @typedef {Object} module:dom~Coordinates\n *\n * @property {number} x\n * x coordinate in pixels\n *\n * @property {number} y\n * y coordinate in pixels\n */\n\n/**\n * Get the pointer position within an element.\n *\n * The base on the coordinates are the bottom left of the element.\n *\n * @param {Element} el\n * Element on which to get the pointer position on.\n *\n * @param {EventTarget~Event} event\n * Event object.\n *\n * @return {module:dom~Coordinates}\n * A coordinates object corresponding to the mouse position.\n *\n */\n\n\nfunction getPointerPosition(el, event) {\n var position = {};\n var box = findPosition(el);\n var boxW = el.offsetWidth;\n var boxH = el.offsetHeight;\n var boxY = box.top;\n var boxX = box.left;\n var pageY = event.pageY;\n var pageX = event.pageX;\n\n if (event.changedTouches) {\n pageX = event.changedTouches[0].pageX;\n pageY = event.changedTouches[0].pageY;\n }\n\n position.y = Math.max(0, Math.min(1, (boxY - pageY + boxH) / boxH));\n position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW));\n return position;\n}\n/**\n * Determines, via duck typing, whether or not a value is a text node.\n *\n * @param {Mixed} value\n * Check if this value is a text node.\n *\n * @return {boolean}\n * Will be `true` if the value is a text node, `false` otherwise.\n */\n\n\nfunction isTextNode(value) {\n return isObject(value) && value.nodeType === 3;\n}\n/**\n * Empties the contents of an element.\n *\n * @param {Element} el\n * The element to empty children from\n *\n * @return {Element}\n * The element with no children\n */\n\n\nfunction emptyEl(el) {\n while (el.firstChild) {\n el.removeChild(el.firstChild);\n }\n\n return el;\n}\n/**\n * This is a mixed value that describes content to be injected into the DOM\n * via some method. It can be of the following types:\n *\n * Type | Description\n * -----------|-------------\n * `string` | The value will be normalized into a text node.\n * `Element` | The value will be accepted as-is.\n * `TextNode` | The value will be accepted as-is.\n * `Array` | A one-dimensional array of strings, elements, text nodes, or functions. These functions should return a string, element, or text node (any other return value, like an array, will be ignored).\n * `Function` | A function, which is expected to return a string, element, text node, or array - any of the other possible values described above. This means that a content descriptor could be a function that returns an array of functions, but those second-level functions must return strings, elements, or text nodes.\n *\n * @typedef {string|Element|TextNode|Array|Function} module:dom~ContentDescriptor\n */\n\n/**\n * Normalizes content for eventual insertion into the DOM.\n *\n * This allows a wide range of content definition methods, but helps protect\n * from falling into the trap of simply writing to `innerHTML`, which could\n * be an XSS concern.\n *\n * The content for an element can be passed in multiple types and\n * combinations, whose behavior is as follows:\n *\n * @param {module:dom~ContentDescriptor} content\n * A content descriptor value.\n *\n * @return {Array}\n * All of the content that was passed in, normalized to an array of\n * elements or text nodes.\n */\n\n\nfunction normalizeContent(content) {\n // First, invoke content if it is a function. If it produces an array,\n // that needs to happen before normalization.\n if (typeof content === 'function') {\n content = content();\n } // Next up, normalize to an array, so one or many items can be normalized,\n // filtered, and returned.\n\n\n return (Array.isArray(content) ? content : [content]).map(function (value) {\n // First, invoke value if it is a function to produce a new value,\n // which will be subsequently normalized to a Node of some kind.\n if (typeof value === 'function') {\n value = value();\n }\n\n if (isEl(value) || isTextNode(value)) {\n return value;\n }\n\n if (typeof value === 'string' && /\\S/.test(value)) {\n return document.createTextNode(value);\n }\n }).filter(function (value) {\n return value;\n });\n}\n/**\n * Normalizes and appends content to an element.\n *\n * @param {Element} el\n * Element to append normalized content to.\n *\n * @param {module:dom~ContentDescriptor} content\n * A content descriptor value.\n *\n * @return {Element}\n * The element with appended normalized content.\n */\n\n\nfunction appendContent(el, content) {\n normalizeContent(content).forEach(function (node) {\n return el.appendChild(node);\n });\n return el;\n}\n/**\n * Normalizes and inserts content into an element; this is identical to\n * `appendContent()`, except it empties the element first.\n *\n * @param {Element} el\n * Element to insert normalized content into.\n *\n * @param {module:dom~ContentDescriptor} content\n * A content descriptor value.\n *\n * @return {Element}\n * The element with inserted normalized content.\n */\n\n\nfunction insertContent(el, content) {\n return appendContent(emptyEl(el), content);\n}\n/**\n * Check if an event was a single left click.\n *\n * @param {EventTarget~Event} event\n * Event object.\n *\n * @return {boolean}\n * Will be `true` if a single left click, `false` otherwise.\n */\n\n\nfunction isSingleLeftClick(event) {\n // Note: if you create something draggable, be sure to\n // call it on both `mousedown` and `mousemove` event,\n // otherwise `mousedown` should be enough for a button\n if (event.button === undefined && event.buttons === undefined) {\n // Why do we need `buttons` ?\n // Because, middle mouse sometimes have this:\n // e.button === 0 and e.buttons === 4\n // Furthermore, we want to prevent combination click, something like\n // HOLD middlemouse then left click, that would be\n // e.button === 0, e.buttons === 5\n // just `button` is not gonna work\n // Alright, then what this block does ?\n // this is for chrome `simulate mobile devices`\n // I want to support this as well\n return true;\n }\n\n if (event.button === 0 && event.buttons === undefined) {\n // Touch screen, sometimes on some specific device, `buttons`\n // doesn't have anything (safari on ios, blackberry...)\n return true;\n } // `mouseup` event on a single left click has\n // `button` and `buttons` equal to 0\n\n\n if (event.type === 'mouseup' && event.button === 0 && event.buttons === 0) {\n return true;\n }\n\n if (event.button !== 0 || event.buttons !== 1) {\n // This is the reason we have those if else block above\n // if any special case we can catch and let it slide\n // we do it above, when get to here, this definitely\n // is-not-left-click\n return false;\n }\n\n return true;\n}\n/**\n * Finds a single DOM element matching `selector` within the optional\n * `context` of another DOM element (defaulting to `document`).\n *\n * @param {string} selector\n * A valid CSS selector, which will be passed to `querySelector`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {Element|null}\n * The element that was found or null.\n */\n\n\nvar $ = createQuerier('querySelector');\n/**\n * Finds a all DOM elements matching `selector` within the optional\n * `context` of another DOM element (defaulting to `document`).\n *\n * @param {string} selector\n * A valid CSS selector, which will be passed to `querySelectorAll`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {NodeList}\n * A element list of elements that were found. Will be empty if none\n * were found.\n *\n */\n\nvar $$ = createQuerier('querySelectorAll');\nvar Dom =\n/*#__PURE__*/\nObject.freeze({\n isReal: isReal,\n isEl: isEl,\n isInFrame: isInFrame,\n createEl: createEl,\n textContent: textContent,\n prependTo: prependTo,\n hasClass: hasClass,\n addClass: addClass,\n removeClass: removeClass,\n toggleClass: toggleClass,\n setAttributes: setAttributes,\n getAttributes: getAttributes,\n getAttribute: getAttribute,\n setAttribute: setAttribute,\n removeAttribute: removeAttribute,\n blockTextSelection: blockTextSelection,\n unblockTextSelection: unblockTextSelection,\n getBoundingClientRect: getBoundingClientRect,\n findPosition: findPosition,\n getPointerPosition: getPointerPosition,\n isTextNode: isTextNode,\n emptyEl: emptyEl,\n normalizeContent: normalizeContent,\n appendContent: appendContent,\n insertContent: insertContent,\n isSingleLeftClick: isSingleLeftClick,\n $: $,\n $$: $$\n});\n/**\n * @file setup.js - Functions for setting up a player without\n * user interaction based on the data-setup `attribute` of the video tag.\n *\n * @module setup\n */\n\nvar _windowLoaded = false;\nvar videojs;\n/**\n * Set up any tags that have a data-setup `attribute` when the player is started.\n */\n\nvar autoSetup = function autoSetup() {\n // Protect against breakage in non-browser environments and check global autoSetup option.\n if (!isReal() || videojs.options.autoSetup === false) {\n return;\n }\n\n var vids = Array.prototype.slice.call(document.getElementsByTagName('video'));\n var audios = Array.prototype.slice.call(document.getElementsByTagName('audio'));\n var divs = Array.prototype.slice.call(document.getElementsByTagName('video-js'));\n var mediaEls = vids.concat(audios, divs); // Check if any media elements exist\n\n if (mediaEls && mediaEls.length > 0) {\n for (var i = 0, e = mediaEls.length; i < e; i++) {\n var mediaEl = mediaEls[i]; // Check if element exists, has getAttribute func.\n\n if (mediaEl && mediaEl.getAttribute) {\n // Make sure this player hasn't already been set up.\n if (mediaEl.player === undefined) {\n var options = mediaEl.getAttribute('data-setup'); // Check if data-setup attr exists.\n // We only auto-setup if they've added the data-setup attr.\n\n if (options !== null) {\n // Create new video.js instance.\n videojs(mediaEl);\n }\n } // If getAttribute isn't defined, we need to wait for the DOM.\n\n } else {\n autoSetupTimeout(1);\n break;\n }\n } // No videos were found, so keep looping unless page is finished loading.\n\n } else if (!_windowLoaded) {\n autoSetupTimeout(1);\n }\n};\n/**\n * Wait until the page is loaded before running autoSetup. This will be called in\n * autoSetup if `hasLoaded` returns false.\n *\n * @param {number} wait\n * How long to wait in ms\n *\n * @param {module:videojs} [vjs]\n * The videojs library function\n */\n\n\nfunction autoSetupTimeout(wait, vjs) {\n if (vjs) {\n videojs = vjs;\n }\n\n window$1.setTimeout(autoSetup, wait);\n}\n/**\n * Used to set the internal tracking of window loaded state to true.\n *\n * @private\n */\n\n\nfunction setWindowLoaded() {\n _windowLoaded = true;\n window$1.removeEventListener('load', setWindowLoaded);\n}\n\nif (isReal()) {\n if (document.readyState === 'complete') {\n setWindowLoaded();\n } else {\n /**\n * Listen for the load event on window, and set _windowLoaded to true.\n *\n * We use a standard event listener here to avoid incrementing the GUID\n * before any players are created.\n *\n * @listens load\n */\n window$1.addEventListener('load', setWindowLoaded);\n }\n}\n/**\n * @file stylesheet.js\n * @module stylesheet\n */\n\n/**\n * Create a DOM syle element given a className for it.\n *\n * @param {string} className\n * The className to add to the created style element.\n *\n * @return {Element}\n * The element that was created.\n */\n\n\nvar createStyleElement = function createStyleElement(className) {\n var style = document.createElement('style');\n style.className = className;\n return style;\n};\n/**\n * Add text to a DOM element.\n *\n * @param {Element} el\n * The Element to add text content to.\n *\n * @param {string} content\n * The text to add to the element.\n */\n\n\nvar setTextContent = function setTextContent(el, content) {\n if (el.styleSheet) {\n el.styleSheet.cssText = content;\n } else {\n el.textContent = content;\n }\n};\n/**\n * @file dom-data.js\n * @module dom-data\n */\n\n/**\n * Element Data Store.\n *\n * Allows for binding data to an element without putting it directly on the\n * element. Ex. Event listeners are stored here.\n * (also from jsninja.com, slightly modified and updated for closure compiler)\n *\n * @type {Object}\n * @private\n */\n\n\nvar DomData = new WeakMap();\n/**\n * @file guid.js\n * @module guid\n */\n// Default value for GUIDs. This allows us to reset the GUID counter in tests.\n//\n// The initial GUID is 3 because some users have come to rely on the first\n// default player ID ending up as `vjs_video_3`.\n//\n// See: https://github.com/videojs/video.js/pull/6216\n\nvar _initialGuid = 3;\n/**\n * Unique ID for an element or function\n *\n * @type {Number}\n */\n\nvar _guid = _initialGuid;\n/**\n * Get a unique auto-incrementing ID by number that has not been returned before.\n *\n * @return {number}\n * A new unique ID.\n */\n\nfunction newGUID() {\n return _guid++;\n}\n/**\n * @file events.js. An Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)\n * (Original book version wasn't completely usable, so fixed some things and made Closure Compiler compatible)\n * This should work very similarly to jQuery's events, however it's based off the book version which isn't as\n * robust as jquery's, so there's probably some differences.\n *\n * @file events.js\n * @module events\n */\n\n/**\n * Clean up the listener cache and dispatchers\n *\n * @param {Element|Object} elem\n * Element to clean up\n *\n * @param {string} type\n * Type of event to clean up\n */\n\n\nfunction _cleanUpEvents(elem, type) {\n if (!DomData.has(elem)) {\n return;\n }\n\n var data = DomData.get(elem); // Remove the events of a particular type if there are none left\n\n if (data.handlers[type].length === 0) {\n delete data.handlers[type]; // data.handlers[type] = null;\n // Setting to null was causing an error with data.handlers\n // Remove the meta-handler from the element\n\n if (elem.removeEventListener) {\n elem.removeEventListener(type, data.dispatcher, false);\n } else if (elem.detachEvent) {\n elem.detachEvent('on' + type, data.dispatcher);\n }\n } // Remove the events object if there are no types left\n\n\n if (Object.getOwnPropertyNames(data.handlers).length <= 0) {\n delete data.handlers;\n delete data.dispatcher;\n delete data.disabled;\n } // Finally remove the element data if there is no data left\n\n\n if (Object.getOwnPropertyNames(data).length === 0) {\n DomData[\"delete\"](elem);\n }\n}\n/**\n * Loops through an array of event types and calls the requested method for each type.\n *\n * @param {Function} fn\n * The event method we want to use.\n *\n * @param {Element|Object} elem\n * Element or object to bind listeners to\n *\n * @param {string} type\n * Type of event to bind to.\n *\n * @param {EventTarget~EventListener} callback\n * Event listener.\n */\n\n\nfunction _handleMultipleEvents(fn, elem, types, callback) {\n types.forEach(function (type) {\n // Call the event method for each one of the types\n fn(elem, type, callback);\n });\n}\n/**\n * Fix a native event to have standard property values\n *\n * @param {Object} event\n * Event object to fix.\n *\n * @return {Object}\n * Fixed event object.\n */\n\n\nfunction fixEvent(event) {\n function returnTrue() {\n return true;\n }\n\n function returnFalse() {\n return false;\n } // Test if fixing up is needed\n // Used to check if !event.stopPropagation instead of isPropagationStopped\n // But native events return true for stopPropagation, but don't have\n // other expected methods like isPropagationStopped. Seems to be a problem\n // with the Javascript Ninja code. So we're just overriding all events now.\n\n\n if (!event || !event.isPropagationStopped) {\n var old = event || window$1.event;\n event = {}; // Clone the old object so that we can modify the values event = {};\n // IE8 Doesn't like when you mess with native event properties\n // Firefox returns false for event.hasOwnProperty('type') and other props\n // which makes copying more difficult.\n // TODO: Probably best to create a whitelist of event props\n\n for (var key in old) {\n // Safari 6.0.3 warns you if you try to copy deprecated layerX/Y\n // Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation\n // and webkitMovementX/Y\n if (key !== 'layerX' && key !== 'layerY' && key !== 'keyLocation' && key !== 'webkitMovementX' && key !== 'webkitMovementY') {\n // Chrome 32+ warns if you try to copy deprecated returnValue, but\n // we still want to if preventDefault isn't supported (IE8).\n if (!(key === 'returnValue' && old.preventDefault)) {\n event[key] = old[key];\n }\n }\n } // The event occurred on this element\n\n\n if (!event.target) {\n event.target = event.srcElement || document;\n } // Handle which other element the event is related to\n\n\n if (!event.relatedTarget) {\n event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;\n } // Stop the default browser action\n\n\n event.preventDefault = function () {\n if (old.preventDefault) {\n old.preventDefault();\n }\n\n event.returnValue = false;\n old.returnValue = false;\n event.defaultPrevented = true;\n };\n\n event.defaultPrevented = false; // Stop the event from bubbling\n\n event.stopPropagation = function () {\n if (old.stopPropagation) {\n old.stopPropagation();\n }\n\n event.cancelBubble = true;\n old.cancelBubble = true;\n event.isPropagationStopped = returnTrue;\n };\n\n event.isPropagationStopped = returnFalse; // Stop the event from bubbling and executing other handlers\n\n event.stopImmediatePropagation = function () {\n if (old.stopImmediatePropagation) {\n old.stopImmediatePropagation();\n }\n\n event.isImmediatePropagationStopped = returnTrue;\n event.stopPropagation();\n };\n\n event.isImmediatePropagationStopped = returnFalse; // Handle mouse position\n\n if (event.clientX !== null && event.clientX !== undefined) {\n var doc = document.documentElement;\n var body = document.body;\n event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);\n event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);\n } // Handle key presses\n\n\n event.which = event.charCode || event.keyCode; // Fix button for mouse clicks:\n // 0 == left; 1 == middle; 2 == right\n\n if (event.button !== null && event.button !== undefined) {\n // The following is disabled because it does not pass videojs-standard\n // and... yikes.\n\n /* eslint-disable */\n event.button = event.button & 1 ? 0 : event.button & 4 ? 1 : event.button & 2 ? 2 : 0;\n /* eslint-enable */\n }\n } // Returns fixed-up instance\n\n\n return event;\n}\n/**\n * Whether passive event listeners are supported\n */\n\n\nvar _supportsPassive = false;\n\n(function () {\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function get() {\n _supportsPassive = true;\n }\n });\n window$1.addEventListener('test', null, opts);\n window$1.removeEventListener('test', null, opts);\n } catch (e) {// disregard\n }\n})();\n/**\n * Touch events Chrome expects to be passive\n */\n\n\nvar passiveEvents = ['touchstart', 'touchmove'];\n/**\n * Add an event listener to element\n * It stores the handler function in a separate cache object\n * and adds a generic handler to the element's event,\n * along with a unique id (guid) to the element.\n *\n * @param {Element|Object} elem\n * Element or object to bind listeners to\n *\n * @param {string|string[]} type\n * Type of event to bind to.\n *\n * @param {EventTarget~EventListener} fn\n * Event listener.\n */\n\nfunction on(elem, type, fn) {\n if (Array.isArray(type)) {\n return _handleMultipleEvents(on, elem, type, fn);\n }\n\n if (!DomData.has(elem)) {\n DomData.set(elem, {});\n }\n\n var data = DomData.get(elem); // We need a place to store all our handler data\n\n if (!data.handlers) {\n data.handlers = {};\n }\n\n if (!data.handlers[type]) {\n data.handlers[type] = [];\n }\n\n if (!fn.guid) {\n fn.guid = newGUID();\n }\n\n data.handlers[type].push(fn);\n\n if (!data.dispatcher) {\n data.disabled = false;\n\n data.dispatcher = function (event, hash) {\n if (data.disabled) {\n return;\n }\n\n event = fixEvent(event);\n var handlers = data.handlers[event.type];\n\n if (handlers) {\n // Copy handlers so if handlers are added/removed during the process it doesn't throw everything off.\n var handlersCopy = handlers.slice(0);\n\n for (var m = 0, n = handlersCopy.length; m < n; m++) {\n if (event.isImmediatePropagationStopped()) {\n break;\n } else {\n try {\n handlersCopy[m].call(elem, event, hash);\n } catch (e) {\n log.error(e);\n }\n }\n }\n }\n };\n }\n\n if (data.handlers[type].length === 1) {\n if (elem.addEventListener) {\n var options = false;\n\n if (_supportsPassive && passiveEvents.indexOf(type) > -1) {\n options = {\n passive: true\n };\n }\n\n elem.addEventListener(type, data.dispatcher, options);\n } else if (elem.attachEvent) {\n elem.attachEvent('on' + type, data.dispatcher);\n }\n }\n}\n/**\n * Removes event listeners from an element\n *\n * @param {Element|Object} elem\n * Object to remove listeners from.\n *\n * @param {string|string[]} [type]\n * Type of listener to remove. Don't include to remove all events from element.\n *\n * @param {EventTarget~EventListener} [fn]\n * Specific listener to remove. Don't include to remove listeners for an event\n * type.\n */\n\n\nfunction off(elem, type, fn) {\n // Don't want to add a cache object through getElData if not needed\n if (!DomData.has(elem)) {\n return;\n }\n\n var data = DomData.get(elem); // If no events exist, nothing to unbind\n\n if (!data.handlers) {\n return;\n }\n\n if (Array.isArray(type)) {\n return _handleMultipleEvents(off, elem, type, fn);\n } // Utility function\n\n\n var removeType = function removeType(el, t) {\n data.handlers[t] = [];\n\n _cleanUpEvents(el, t);\n }; // Are we removing all bound events?\n\n\n if (type === undefined) {\n for (var t in data.handlers) {\n if (Object.prototype.hasOwnProperty.call(data.handlers || {}, t)) {\n removeType(elem, t);\n }\n }\n\n return;\n }\n\n var handlers = data.handlers[type]; // If no handlers exist, nothing to unbind\n\n if (!handlers) {\n return;\n } // If no listener was provided, remove all listeners for type\n\n\n if (!fn) {\n removeType(elem, type);\n return;\n } // We're only removing a single handler\n\n\n if (fn.guid) {\n for (var n = 0; n < handlers.length; n++) {\n if (handlers[n].guid === fn.guid) {\n handlers.splice(n--, 1);\n }\n }\n }\n\n _cleanUpEvents(elem, type);\n}\n/**\n * Trigger an event for an element\n *\n * @param {Element|Object} elem\n * Element to trigger an event on\n *\n * @param {EventTarget~Event|string} event\n * A string (the type) or an event object with a type attribute\n *\n * @param {Object} [hash]\n * data hash to pass along with the event\n *\n * @return {boolean|undefined}\n * Returns the opposite of `defaultPrevented` if default was\n * prevented. Otherwise, returns `undefined`\n */\n\n\nfunction trigger(elem, event, hash) {\n // Fetches element data and a reference to the parent (for bubbling).\n // Don't want to add a data object to cache for every parent,\n // so checking hasElData first.\n var elemData = DomData.has(elem) ? DomData.get(elem) : {};\n var parent = elem.parentNode || elem.ownerDocument; // type = event.type || event,\n // handler;\n // If an event name was passed as a string, creates an event out of it\n\n if (typeof event === 'string') {\n event = {\n type: event,\n target: elem\n };\n } else if (!event.target) {\n event.target = elem;\n } // Normalizes the event properties.\n\n\n event = fixEvent(event); // If the passed element has a dispatcher, executes the established handlers.\n\n if (elemData.dispatcher) {\n elemData.dispatcher.call(elem, event, hash);\n } // Unless explicitly stopped or the event does not bubble (e.g. media events)\n // recursively calls this function to bubble the event up the DOM.\n\n\n if (parent && !event.isPropagationStopped() && event.bubbles === true) {\n trigger.call(null, parent, event, hash); // If at the top of the DOM, triggers the default action unless disabled.\n } else if (!parent && !event.defaultPrevented && event.target && event.target[event.type]) {\n if (!DomData.has(event.target)) {\n DomData.set(event.target, {});\n }\n\n var targetData = DomData.get(event.target); // Checks if the target has a default action for this event.\n\n if (event.target[event.type]) {\n // Temporarily disables event dispatching on the target as we have already executed the handler.\n targetData.disabled = true; // Executes the default action.\n\n if (typeof event.target[event.type] === 'function') {\n event.target[event.type]();\n } // Re-enables event dispatching.\n\n\n targetData.disabled = false;\n }\n } // Inform the triggerer if the default was prevented by returning false\n\n\n return !event.defaultPrevented;\n}\n/**\n * Trigger a listener only once for an event.\n *\n * @param {Element|Object} elem\n * Element or object to bind to.\n *\n * @param {string|string[]} type\n * Name/type of event\n *\n * @param {Event~EventListener} fn\n * Event listener function\n */\n\n\nfunction one(elem, type, fn) {\n if (Array.isArray(type)) {\n return _handleMultipleEvents(one, elem, type, fn);\n }\n\n var func = function func() {\n off(elem, type, func);\n fn.apply(this, arguments);\n }; // copy the guid to the new function so it can removed using the original function's ID\n\n\n func.guid = fn.guid = fn.guid || newGUID();\n on(elem, type, func);\n}\n/**\n * Trigger a listener only once and then turn if off for all\n * configured events\n *\n * @param {Element|Object} elem\n * Element or object to bind to.\n *\n * @param {string|string[]} type\n * Name/type of event\n *\n * @param {Event~EventListener} fn\n * Event listener function\n */\n\n\nfunction any(elem, type, fn) {\n var func = function func() {\n off(elem, type, func);\n fn.apply(this, arguments);\n }; // copy the guid to the new function so it can removed using the original function's ID\n\n\n func.guid = fn.guid = fn.guid || newGUID(); // multiple ons, but one off for everything\n\n on(elem, type, func);\n}\n\nvar Events =\n/*#__PURE__*/\nObject.freeze({\n fixEvent: fixEvent,\n on: on,\n off: off,\n trigger: trigger,\n one: one,\n any: any\n});\n/**\n * @file fn.js\n * @module fn\n */\n\nvar UPDATE_REFRESH_INTERVAL = 30;\n/**\n * Bind (a.k.a proxy or context). A simple method for changing the context of\n * a function.\n *\n * It also stores a unique id on the function so it can be easily removed from\n * events.\n *\n * @function\n * @param {Mixed} context\n * The object to bind as scope.\n *\n * @param {Function} fn\n * The function to be bound to a scope.\n *\n * @param {number} [uid]\n * An optional unique ID for the function to be set\n *\n * @return {Function}\n * The new function that will be bound into the context given\n */\n\nvar bind = function bind(context, fn, uid) {\n // Make sure the function has a unique ID\n if (!fn.guid) {\n fn.guid = newGUID();\n } // Create the new function that changes the context\n\n\n var bound = fn.bind(context); // Allow for the ability to individualize this function\n // Needed in the case where multiple objects might share the same prototype\n // IF both items add an event listener with the same function, then you try to remove just one\n // it will remove both because they both have the same guid.\n // when using this, you need to use the bind method when you remove the listener as well.\n // currently used in text tracks\n\n bound.guid = uid ? uid + '_' + fn.guid : fn.guid;\n return bound;\n};\n/**\n * Wraps the given function, `fn`, with a new function that only invokes `fn`\n * at most once per every `wait` milliseconds.\n *\n * @function\n * @param {Function} fn\n * The function to be throttled.\n *\n * @param {number} wait\n * The number of milliseconds by which to throttle.\n *\n * @return {Function}\n */\n\n\nvar throttle = function throttle(fn, wait) {\n var last = window$1.performance.now();\n\n var throttled = function throttled() {\n var now = window$1.performance.now();\n\n if (now - last >= wait) {\n fn.apply(void 0, arguments);\n last = now;\n }\n };\n\n return throttled;\n};\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked.\n *\n * Inspired by lodash and underscore implementations.\n *\n * @function\n * @param {Function} func\n * The function to wrap with debounce behavior.\n *\n * @param {number} wait\n * The number of milliseconds to wait after the last invocation.\n *\n * @param {boolean} [immediate]\n * Whether or not to invoke the function immediately upon creation.\n *\n * @param {Object} [context=window]\n * The \"context\" in which the debounced function should debounce. For\n * example, if this function should be tied to a Video.js player,\n * the player can be passed here. Alternatively, defaults to the\n * global `window` object.\n *\n * @return {Function}\n * A debounced function.\n */\n\n\nvar debounce = function debounce(func, wait, immediate, context) {\n if (context === void 0) {\n context = window$1;\n }\n\n var timeout;\n\n var cancel = function cancel() {\n context.clearTimeout(timeout);\n timeout = null;\n };\n /* eslint-disable consistent-this */\n\n\n var debounced = function debounced() {\n var self = this;\n var args = arguments;\n\n var _later = function later() {\n timeout = null;\n _later = null;\n\n if (!immediate) {\n func.apply(self, args);\n }\n };\n\n if (!timeout && immediate) {\n func.apply(self, args);\n }\n\n context.clearTimeout(timeout);\n timeout = context.setTimeout(_later, wait);\n };\n /* eslint-enable consistent-this */\n\n\n debounced.cancel = cancel;\n return debounced;\n};\n/**\n * @file src/js/event-target.js\n */\n\n/**\n * `EventTarget` is a class that can have the same API as the DOM `EventTarget`. It\n * adds shorthand functions that wrap around lengthy functions. For example:\n * the `on` function is a wrapper around `addEventListener`.\n *\n * @see [EventTarget Spec]{@link https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget}\n * @class EventTarget\n */\n\n\nvar EventTarget = function EventTarget() {};\n/**\n * A Custom DOM event.\n *\n * @typedef {Object} EventTarget~Event\n * @see [Properties]{@link https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent}\n */\n\n/**\n * All event listeners should follow the following format.\n *\n * @callback EventTarget~EventListener\n * @this {EventTarget}\n *\n * @param {EventTarget~Event} event\n * the event that triggered this function\n *\n * @param {Object} [hash]\n * hash of data sent during the event\n */\n\n/**\n * An object containing event names as keys and booleans as values.\n *\n * > NOTE: If an event name is set to a true value here {@link EventTarget#trigger}\n * will have extra functionality. See that function for more information.\n *\n * @property EventTarget.prototype.allowedEvents_\n * @private\n */\n\n\nEventTarget.prototype.allowedEvents_ = {};\n/**\n * Adds an `event listener` to an instance of an `EventTarget`. An `event listener` is a\n * function that will get called when an event with a certain name gets triggered.\n *\n * @param {string|string[]} type\n * An event name or an array of event names.\n *\n * @param {EventTarget~EventListener} fn\n * The function to call with `EventTarget`s\n */\n\nEventTarget.prototype.on = function (type, fn) {\n // Remove the addEventListener alias before calling Events.on\n // so we don't get into an infinite type loop\n var ael = this.addEventListener;\n\n this.addEventListener = function () {};\n\n on(this, type, fn);\n this.addEventListener = ael;\n};\n/**\n * An alias of {@link EventTarget#on}. Allows `EventTarget` to mimic\n * the standard DOM API.\n *\n * @function\n * @see {@link EventTarget#on}\n */\n\n\nEventTarget.prototype.addEventListener = EventTarget.prototype.on;\n/**\n * Removes an `event listener` for a specific event from an instance of `EventTarget`.\n * This makes it so that the `event listener` will no longer get called when the\n * named event happens.\n *\n * @param {string|string[]} type\n * An event name or an array of event names.\n *\n * @param {EventTarget~EventListener} fn\n * The function to remove.\n */\n\nEventTarget.prototype.off = function (type, fn) {\n off(this, type, fn);\n};\n/**\n * An alias of {@link EventTarget#off}. Allows `EventTarget` to mimic\n * the standard DOM API.\n *\n * @function\n * @see {@link EventTarget#off}\n */\n\n\nEventTarget.prototype.removeEventListener = EventTarget.prototype.off;\n/**\n * This function will add an `event listener` that gets triggered only once. After the\n * first trigger it will get removed. This is like adding an `event listener`\n * with {@link EventTarget#on} that calls {@link EventTarget#off} on itself.\n *\n * @param {string|string[]} type\n * An event name or an array of event names.\n *\n * @param {EventTarget~EventListener} fn\n * The function to be called once for each event name.\n */\n\nEventTarget.prototype.one = function (type, fn) {\n // Remove the addEventListener aliasing Events.on\n // so we don't get into an infinite type loop\n var ael = this.addEventListener;\n\n this.addEventListener = function () {};\n\n one(this, type, fn);\n this.addEventListener = ael;\n};\n\nEventTarget.prototype.any = function (type, fn) {\n // Remove the addEventListener aliasing Events.on\n // so we don't get into an infinite type loop\n var ael = this.addEventListener;\n\n this.addEventListener = function () {};\n\n any(this, type, fn);\n this.addEventListener = ael;\n};\n/**\n * This function causes an event to happen. This will then cause any `event listeners`\n * that are waiting for that event, to get called. If there are no `event listeners`\n * for an event then nothing will happen.\n *\n * If the name of the `Event` that is being triggered is in `EventTarget.allowedEvents_`.\n * Trigger will also call the `on` + `uppercaseEventName` function.\n *\n * Example:\n * 'click' is in `EventTarget.allowedEvents_`, so, trigger will attempt to call\n * `onClick` if it exists.\n *\n * @param {string|EventTarget~Event|Object} event\n * The name of the event, an `Event`, or an object with a key of type set to\n * an event name.\n */\n\n\nEventTarget.prototype.trigger = function (event) {\n var type = event.type || event; // deprecation\n // In a future version we should default target to `this`\n // similar to how we default the target to `elem` in\n // `Events.trigger`. Right now the default `target` will be\n // `document` due to the `Event.fixEvent` call.\n\n if (typeof event === 'string') {\n event = {\n type: type\n };\n }\n\n event = fixEvent(event);\n\n if (this.allowedEvents_[type] && this['on' + type]) {\n this['on' + type](event);\n }\n\n trigger(this, event);\n};\n/**\n * An alias of {@link EventTarget#trigger}. Allows `EventTarget` to mimic\n * the standard DOM API.\n *\n * @function\n * @see {@link EventTarget#trigger}\n */\n\n\nEventTarget.prototype.dispatchEvent = EventTarget.prototype.trigger;\nvar EVENT_MAP;\n\nEventTarget.prototype.queueTrigger = function (event) {\n var _this = this; // only set up EVENT_MAP if it'll be used\n\n\n if (!EVENT_MAP) {\n EVENT_MAP = new Map();\n }\n\n var type = event.type || event;\n var map = EVENT_MAP.get(this);\n\n if (!map) {\n map = new Map();\n EVENT_MAP.set(this, map);\n }\n\n var oldTimeout = map.get(type);\n map[\"delete\"](type);\n window$1.clearTimeout(oldTimeout);\n var timeout = window$1.setTimeout(function () {\n // if we cleared out all timeouts for the current target, delete its map\n if (map.size === 0) {\n map = null;\n EVENT_MAP[\"delete\"](_this);\n }\n\n _this.trigger(event);\n }, 0);\n map.set(type, timeout);\n};\n/**\n * @file mixins/evented.js\n * @module evented\n */\n\n/**\n * Returns whether or not an object has had the evented mixin applied.\n *\n * @param {Object} object\n * An object to test.\n *\n * @return {boolean}\n * Whether or not the object appears to be evented.\n */\n\n\nvar isEvented = function isEvented(object) {\n return object instanceof EventTarget || !!object.eventBusEl_ && ['on', 'one', 'off', 'trigger'].every(function (k) {\n return typeof object[k] === 'function';\n });\n};\n/**\n * Adds a callback to run after the evented mixin applied.\n *\n * @param {Object} object\n * An object to Add\n * @param {Function} callback\n * The callback to run.\n */\n\n\nvar addEventedCallback = function addEventedCallback(target, callback) {\n if (isEvented(target)) {\n callback();\n } else {\n if (!target.eventedCallbacks) {\n target.eventedCallbacks = [];\n }\n\n target.eventedCallbacks.push(callback);\n }\n};\n/**\n * Whether a value is a valid event type - non-empty string or array.\n *\n * @private\n * @param {string|Array} type\n * The type value to test.\n *\n * @return {boolean}\n * Whether or not the type is a valid event type.\n */\n\n\nvar isValidEventType = function isValidEventType(type) {\n return (// The regex here verifies that the `type` contains at least one non-\n // whitespace character.\n typeof type === 'string' && /\\S/.test(type) || Array.isArray(type) && !!type.length\n );\n};\n/**\n * Validates a value to determine if it is a valid event target. Throws if not.\n *\n * @private\n * @throws {Error}\n * If the target does not appear to be a valid event target.\n *\n * @param {Object} target\n * The object to test.\n */\n\n\nvar validateTarget = function validateTarget(target) {\n if (!target.nodeName && !isEvented(target)) {\n throw new Error('Invalid target; must be a DOM node or evented object.');\n }\n};\n/**\n * Validates a value to determine if it is a valid event target. Throws if not.\n *\n * @private\n * @throws {Error}\n * If the type does not appear to be a valid event type.\n *\n * @param {string|Array} type\n * The type to test.\n */\n\n\nvar validateEventType = function validateEventType(type) {\n if (!isValidEventType(type)) {\n throw new Error('Invalid event type; must be a non-empty string or array.');\n }\n};\n/**\n * Validates a value to determine if it is a valid listener. Throws if not.\n *\n * @private\n * @throws {Error}\n * If the listener is not a function.\n *\n * @param {Function} listener\n * The listener to test.\n */\n\n\nvar validateListener = function validateListener(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Invalid listener; must be a function.');\n }\n};\n/**\n * Takes an array of arguments given to `on()` or `one()`, validates them, and\n * normalizes them into an object.\n *\n * @private\n * @param {Object} self\n * The evented object on which `on()` or `one()` was called. This\n * object will be bound as the `this` value for the listener.\n *\n * @param {Array} args\n * An array of arguments passed to `on()` or `one()`.\n *\n * @return {Object}\n * An object containing useful values for `on()` or `one()` calls.\n */\n\n\nvar normalizeListenArgs = function normalizeListenArgs(self, args) {\n // If the number of arguments is less than 3, the target is always the\n // evented object itself.\n var isTargetingSelf = args.length < 3 || args[0] === self || args[0] === self.eventBusEl_;\n var target;\n var type;\n var listener;\n\n if (isTargetingSelf) {\n target = self.eventBusEl_; // Deal with cases where we got 3 arguments, but we are still listening to\n // the evented object itself.\n\n if (args.length >= 3) {\n args.shift();\n }\n\n type = args[0];\n listener = args[1];\n } else {\n target = args[0];\n type = args[1];\n listener = args[2];\n }\n\n validateTarget(target);\n validateEventType(type);\n validateListener(listener);\n listener = bind(self, listener);\n return {\n isTargetingSelf: isTargetingSelf,\n target: target,\n type: type,\n listener: listener\n };\n};\n/**\n * Adds the listener to the event type(s) on the target, normalizing for\n * the type of target.\n *\n * @private\n * @param {Element|Object} target\n * A DOM node or evented object.\n *\n * @param {string} method\n * The event binding method to use (\"on\" or \"one\").\n *\n * @param {string|Array} type\n * One or more event type(s).\n *\n * @param {Function} listener\n * A listener function.\n */\n\n\nvar listen = function listen(target, method, type, listener) {\n validateTarget(target);\n\n if (target.nodeName) {\n Events[method](target, type, listener);\n } else {\n target[method](type, listener);\n }\n};\n/**\n * Contains methods that provide event capabilities to an object which is passed\n * to {@link module:evented|evented}.\n *\n * @mixin EventedMixin\n */\n\n\nvar EventedMixin = {\n /**\n * Add a listener to an event (or events) on this object or another evented\n * object.\n *\n * @param {string|Array|Element|Object} targetOrType\n * If this is a string or array, it represents the event type(s)\n * that will trigger the listener.\n *\n * Another evented object can be passed here instead, which will\n * cause the listener to listen for events on _that_ object.\n *\n * In either case, the listener's `this` value will be bound to\n * this object.\n *\n * @param {string|Array|Function} typeOrListener\n * If the first argument was a string or array, this should be the\n * listener function. Otherwise, this is a string or array of event\n * type(s).\n *\n * @param {Function} [listener]\n * If the first argument was another evented object, this will be\n * the listener function.\n */\n on: function on() {\n var _this = this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var _normalizeListenArgs = normalizeListenArgs(this, args),\n isTargetingSelf = _normalizeListenArgs.isTargetingSelf,\n target = _normalizeListenArgs.target,\n type = _normalizeListenArgs.type,\n listener = _normalizeListenArgs.listener;\n\n listen(target, 'on', type, listener); // If this object is listening to another evented object.\n\n if (!isTargetingSelf) {\n // If this object is disposed, remove the listener.\n var removeListenerOnDispose = function removeListenerOnDispose() {\n return _this.off(target, type, listener);\n }; // Use the same function ID as the listener so we can remove it later it\n // using the ID of the original listener.\n\n\n removeListenerOnDispose.guid = listener.guid; // Add a listener to the target's dispose event as well. This ensures\n // that if the target is disposed BEFORE this object, we remove the\n // removal listener that was just added. Otherwise, we create a memory leak.\n\n var removeRemoverOnTargetDispose = function removeRemoverOnTargetDispose() {\n return _this.off('dispose', removeListenerOnDispose);\n }; // Use the same function ID as the listener so we can remove it later\n // it using the ID of the original listener.\n\n\n removeRemoverOnTargetDispose.guid = listener.guid;\n listen(this, 'on', 'dispose', removeListenerOnDispose);\n listen(target, 'on', 'dispose', removeRemoverOnTargetDispose);\n }\n },\n\n /**\n * Add a listener to an event (or events) on this object or another evented\n * object. The listener will be called once per event and then removed.\n *\n * @param {string|Array|Element|Object} targetOrType\n * If this is a string or array, it represents the event type(s)\n * that will trigger the listener.\n *\n * Another evented object can be passed here instead, which will\n * cause the listener to listen for events on _that_ object.\n *\n * In either case, the listener's `this` value will be bound to\n * this object.\n *\n * @param {string|Array|Function} typeOrListener\n * If the first argument was a string or array, this should be the\n * listener function. Otherwise, this is a string or array of event\n * type(s).\n *\n * @param {Function} [listener]\n * If the first argument was another evented object, this will be\n * the listener function.\n */\n one: function one() {\n var _this2 = this;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var _normalizeListenArgs2 = normalizeListenArgs(this, args),\n isTargetingSelf = _normalizeListenArgs2.isTargetingSelf,\n target = _normalizeListenArgs2.target,\n type = _normalizeListenArgs2.type,\n listener = _normalizeListenArgs2.listener; // Targeting this evented object.\n\n\n if (isTargetingSelf) {\n listen(target, 'one', type, listener); // Targeting another evented object.\n } else {\n // TODO: This wrapper is incorrect! It should only\n // remove the wrapper for the event type that called it.\n // Instead all listners are removed on the first trigger!\n // see https://github.com/videojs/video.js/issues/5962\n var wrapper = function wrapper() {\n _this2.off(target, type, wrapper);\n\n for (var _len3 = arguments.length, largs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n largs[_key3] = arguments[_key3];\n }\n\n listener.apply(null, largs);\n }; // Use the same function ID as the listener so we can remove it later\n // it using the ID of the original listener.\n\n\n wrapper.guid = listener.guid;\n listen(target, 'one', type, wrapper);\n }\n },\n\n /**\n * Add a listener to an event (or events) on this object or another evented\n * object. The listener will only be called once for the first event that is triggered\n * then removed.\n *\n * @param {string|Array|Element|Object} targetOrType\n * If this is a string or array, it represents the event type(s)\n * that will trigger the listener.\n *\n * Another evented object can be passed here instead, which will\n * cause the listener to listen for events on _that_ object.\n *\n * In either case, the listener's `this` value will be bound to\n * this object.\n *\n * @param {string|Array|Function} typeOrListener\n * If the first argument was a string or array, this should be the\n * listener function. Otherwise, this is a string or array of event\n * type(s).\n *\n * @param {Function} [listener]\n * If the first argument was another evented object, this will be\n * the listener function.\n */\n any: function any() {\n var _this3 = this;\n\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n var _normalizeListenArgs3 = normalizeListenArgs(this, args),\n isTargetingSelf = _normalizeListenArgs3.isTargetingSelf,\n target = _normalizeListenArgs3.target,\n type = _normalizeListenArgs3.type,\n listener = _normalizeListenArgs3.listener; // Targeting this evented object.\n\n\n if (isTargetingSelf) {\n listen(target, 'any', type, listener); // Targeting another evented object.\n } else {\n var wrapper = function wrapper() {\n _this3.off(target, type, wrapper);\n\n for (var _len5 = arguments.length, largs = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n largs[_key5] = arguments[_key5];\n }\n\n listener.apply(null, largs);\n }; // Use the same function ID as the listener so we can remove it later\n // it using the ID of the original listener.\n\n\n wrapper.guid = listener.guid;\n listen(target, 'any', type, wrapper);\n }\n },\n\n /**\n * Removes listener(s) from event(s) on an evented object.\n *\n * @param {string|Array|Element|Object} [targetOrType]\n * If this is a string or array, it represents the event type(s).\n *\n * Another evented object can be passed here instead, in which case\n * ALL 3 arguments are _required_.\n *\n * @param {string|Array|Function} [typeOrListener]\n * If the first argument was a string or array, this may be the\n * listener function. Otherwise, this is a string or array of event\n * type(s).\n *\n * @param {Function} [listener]\n * If the first argument was another evented object, this will be\n * the listener function; otherwise, _all_ listeners bound to the\n * event type(s) will be removed.\n */\n off: function off$1(targetOrType, typeOrListener, listener) {\n // Targeting this evented object.\n if (!targetOrType || isValidEventType(targetOrType)) {\n off(this.eventBusEl_, targetOrType, typeOrListener); // Targeting another evented object.\n } else {\n var target = targetOrType;\n var type = typeOrListener; // Fail fast and in a meaningful way!\n\n validateTarget(target);\n validateEventType(type);\n validateListener(listener); // Ensure there's at least a guid, even if the function hasn't been used\n\n listener = bind(this, listener); // Remove the dispose listener on this evented object, which was given\n // the same guid as the event listener in on().\n\n this.off('dispose', listener);\n\n if (target.nodeName) {\n off(target, type, listener);\n off(target, 'dispose', listener);\n } else if (isEvented(target)) {\n target.off(type, listener);\n target.off('dispose', listener);\n }\n }\n },\n\n /**\n * Fire an event on this evented object, causing its listeners to be called.\n *\n * @param {string|Object} event\n * An event type or an object with a type property.\n *\n * @param {Object} [hash]\n * An additional object to pass along to listeners.\n *\n * @return {boolean}\n * Whether or not the default behavior was prevented.\n */\n trigger: function trigger$1(event, hash) {\n return trigger(this.eventBusEl_, event, hash);\n }\n};\n/**\n * Applies {@link module:evented~EventedMixin|EventedMixin} to a target object.\n *\n * @param {Object} target\n * The object to which to add event methods.\n *\n * @param {Object} [options={}]\n * Options for customizing the mixin behavior.\n *\n * @param {string} [options.eventBusKey]\n * By default, adds a `eventBusEl_` DOM element to the target object,\n * which is used as an event bus. If the target object already has a\n * DOM element that should be used, pass its key here.\n *\n * @return {Object}\n * The target object.\n */\n\nfunction evented(target, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n eventBusKey = _options.eventBusKey; // Set or create the eventBusEl_.\n\n if (eventBusKey) {\n if (!target[eventBusKey].nodeName) {\n throw new Error(\"The eventBusKey \\\"\" + eventBusKey + \"\\\" does not refer to an element.\");\n }\n\n target.eventBusEl_ = target[eventBusKey];\n } else {\n target.eventBusEl_ = createEl('span', {\n className: 'vjs-event-bus'\n });\n }\n\n assign(target, EventedMixin);\n\n if (target.eventedCallbacks) {\n target.eventedCallbacks.forEach(function (callback) {\n callback();\n });\n } // When any evented object is disposed, it removes all its listeners.\n\n\n target.on('dispose', function () {\n target.off();\n window$1.setTimeout(function () {\n target.eventBusEl_ = null;\n }, 0);\n });\n return target;\n}\n/**\n * @file mixins/stateful.js\n * @module stateful\n */\n\n/**\n * Contains methods that provide statefulness to an object which is passed\n * to {@link module:stateful}.\n *\n * @mixin StatefulMixin\n */\n\n\nvar StatefulMixin = {\n /**\n * A hash containing arbitrary keys and values representing the state of\n * the object.\n *\n * @type {Object}\n */\n state: {},\n\n /**\n * Set the state of an object by mutating its\n * {@link module:stateful~StatefulMixin.state|state} object in place.\n *\n * @fires module:stateful~StatefulMixin#statechanged\n * @param {Object|Function} stateUpdates\n * A new set of properties to shallow-merge into the plugin state.\n * Can be a plain object or a function returning a plain object.\n *\n * @return {Object|undefined}\n * An object containing changes that occurred. If no changes\n * occurred, returns `undefined`.\n */\n setState: function setState(stateUpdates) {\n var _this = this; // Support providing the `stateUpdates` state as a function.\n\n\n if (typeof stateUpdates === 'function') {\n stateUpdates = stateUpdates();\n }\n\n var changes;\n each(stateUpdates, function (value, key) {\n // Record the change if the value is different from what's in the\n // current state.\n if (_this.state[key] !== value) {\n changes = changes || {};\n changes[key] = {\n from: _this.state[key],\n to: value\n };\n }\n\n _this.state[key] = value;\n }); // Only trigger \"statechange\" if there were changes AND we have a trigger\n // function. This allows us to not require that the target object be an\n // evented object.\n\n if (changes && isEvented(this)) {\n /**\n * An event triggered on an object that is both\n * {@link module:stateful|stateful} and {@link module:evented|evented}\n * indicating that its state has changed.\n *\n * @event module:stateful~StatefulMixin#statechanged\n * @type {Object}\n * @property {Object} changes\n * A hash containing the properties that were changed and\n * the values they were changed `from` and `to`.\n */\n this.trigger({\n changes: changes,\n type: 'statechanged'\n });\n }\n\n return changes;\n }\n};\n/**\n * Applies {@link module:stateful~StatefulMixin|StatefulMixin} to a target\n * object.\n *\n * If the target object is {@link module:evented|evented} and has a\n * `handleStateChanged` method, that method will be automatically bound to the\n * `statechanged` event on itself.\n *\n * @param {Object} target\n * The object to be made stateful.\n *\n * @param {Object} [defaultState]\n * A default set of properties to populate the newly-stateful object's\n * `state` property.\n *\n * @return {Object}\n * Returns the `target`.\n */\n\nfunction stateful(target, defaultState) {\n assign(target, StatefulMixin); // This happens after the mixing-in because we need to replace the `state`\n // added in that step.\n\n target.state = assign({}, target.state, defaultState); // Auto-bind the `handleStateChanged` method of the target object if it exists.\n\n if (typeof target.handleStateChanged === 'function' && isEvented(target)) {\n target.on('statechanged', target.handleStateChanged);\n }\n\n return target;\n}\n/**\n * @file string-cases.js\n * @module to-lower-case\n */\n\n/**\n * Lowercase the first letter of a string.\n *\n * @param {string} string\n * String to be lowercased\n *\n * @return {string}\n * The string with a lowercased first letter\n */\n\n\nvar toLowerCase = function toLowerCase(string) {\n if (typeof string !== 'string') {\n return string;\n }\n\n return string.replace(/./, function (w) {\n return w.toLowerCase();\n });\n};\n/**\n * Uppercase the first letter of a string.\n *\n * @param {string} string\n * String to be uppercased\n *\n * @return {string}\n * The string with an uppercased first letter\n */\n\n\nvar toTitleCase = function toTitleCase(string) {\n if (typeof string !== 'string') {\n return string;\n }\n\n return string.replace(/./, function (w) {\n return w.toUpperCase();\n });\n};\n/**\n * Compares the TitleCase versions of the two strings for equality.\n *\n * @param {string} str1\n * The first string to compare\n *\n * @param {string} str2\n * The second string to compare\n *\n * @return {boolean}\n * Whether the TitleCase versions of the strings are equal\n */\n\n\nvar titleCaseEquals = function titleCaseEquals(str1, str2) {\n return toTitleCase(str1) === toTitleCase(str2);\n};\n/**\n * @file merge-options.js\n * @module merge-options\n */\n\n/**\n * Merge two objects recursively.\n *\n * Performs a deep merge like\n * {@link https://lodash.com/docs/4.17.10#merge|lodash.merge}, but only merges\n * plain objects (not arrays, elements, or anything else).\n *\n * Non-plain object values will be copied directly from the right-most\n * argument.\n *\n * @static\n * @param {Object[]} sources\n * One or more objects to merge into a new object.\n *\n * @return {Object}\n * A new object that is the merged result of all sources.\n */\n\n\nfunction mergeOptions() {\n var result = {};\n\n for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {\n sources[_key] = arguments[_key];\n }\n\n sources.forEach(function (source) {\n if (!source) {\n return;\n }\n\n each(source, function (value, key) {\n if (!isPlain(value)) {\n result[key] = value;\n return;\n }\n\n if (!isPlain(result[key])) {\n result[key] = {};\n }\n\n result[key] = mergeOptions(result[key], value);\n });\n });\n return result;\n}\n/**\n * Player Component - Base class for all UI objects\n *\n * @file component.js\n */\n\n/**\n * Base class for all UI Components.\n * Components are UI objects which represent both a javascript object and an element\n * in the DOM. They can be children of other components, and can have\n * children themselves.\n *\n * Components can also use methods from {@link EventTarget}\n */\n\n\nvar Component =\n/*#__PURE__*/\nfunction () {\n /**\n * A callback that is called when a component is ready. Does not have any\n * paramters and any callback value will be ignored.\n *\n * @callback Component~ReadyCallback\n * @this Component\n */\n\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {Object[]} [options.children]\n * An array of children objects to intialize this component with. Children objects have\n * a name property that will be used if more than one component of the same type needs to be\n * added.\n *\n * @param {Component~ReadyCallback} [ready]\n * Function that gets called when the `Component` is ready.\n */\n function Component(player, options, ready) {\n // The component might be the player itself and we can't pass `this` to super\n if (!player && this.play) {\n this.player_ = player = this; // eslint-disable-line\n } else {\n this.player_ = player;\n } // Hold the reference to the parent component via `addChild` method\n\n\n this.parentComponent_ = null; // Make a copy of prototype.options_ to protect against overriding defaults\n\n this.options_ = mergeOptions({}, this.options_); // Updated options with supplied options\n\n options = this.options_ = mergeOptions(this.options_, options); // Get ID from options or options element if one is supplied\n\n this.id_ = options.id || options.el && options.el.id; // If there was no ID from the options, generate one\n\n if (!this.id_) {\n // Don't require the player ID function in the case of mock players\n var id = player && player.id && player.id() || 'no_player';\n this.id_ = id + \"_component_\" + newGUID();\n }\n\n this.name_ = options.name || null; // Create element if one wasn't provided in options\n\n if (options.el) {\n this.el_ = options.el;\n } else if (options.createEl !== false) {\n this.el_ = this.createEl();\n } // if evented is anything except false, we want to mixin in evented\n\n\n if (options.evented !== false) {\n // Make this an evented object and use `el_`, if available, as its event bus\n evented(this, {\n eventBusKey: this.el_ ? 'el_' : null\n });\n }\n\n stateful(this, this.constructor.defaultState);\n this.children_ = [];\n this.childIndex_ = {};\n this.childNameIndex_ = {};\n this.setTimeoutIds_ = new Set();\n this.setIntervalIds_ = new Set();\n this.rafIds_ = new Set();\n this.clearingTimersOnDispose_ = false; // Add any child components in options\n\n if (options.initChildren !== false) {\n this.initChildren();\n }\n\n this.ready(ready); // Don't want to trigger ready here or it will before init is actually\n // finished for all children that run this constructor\n\n if (options.reportTouchActivity !== false) {\n this.enableTouchActivity();\n }\n }\n /**\n * Dispose of the `Component` and all child components.\n *\n * @fires Component#dispose\n */\n\n\n var _proto = Component.prototype;\n\n _proto.dispose = function dispose() {\n /**\n * Triggered when a `Component` is disposed.\n *\n * @event Component#dispose\n * @type {EventTarget~Event}\n *\n * @property {boolean} [bubbles=false]\n * set to false so that the close event does not\n * bubble up\n */\n this.trigger({\n type: 'dispose',\n bubbles: false\n }); // Dispose all children.\n\n if (this.children_) {\n for (var i = this.children_.length - 1; i >= 0; i--) {\n if (this.children_[i].dispose) {\n this.children_[i].dispose();\n }\n }\n } // Delete child references\n\n\n this.children_ = null;\n this.childIndex_ = null;\n this.childNameIndex_ = null;\n this.parentComponent_ = null;\n\n if (this.el_) {\n // Remove element from DOM\n if (this.el_.parentNode) {\n this.el_.parentNode.removeChild(this.el_);\n }\n\n if (DomData.has(this.el_)) {\n DomData[\"delete\"](this.el_);\n }\n\n this.el_ = null;\n } // remove reference to the player after disposing of the element\n\n\n this.player_ = null;\n }\n /**\n * Return the {@link Player} that the `Component` has attached to.\n *\n * @return {Player}\n * The player that this `Component` has attached to.\n */\n ;\n\n _proto.player = function player() {\n return this.player_;\n }\n /**\n * Deep merge of options objects with new options.\n * > Note: When both `obj` and `options` contain properties whose values are objects.\n * The two properties get merged using {@link module:mergeOptions}\n *\n * @param {Object} obj\n * The object that contains new options.\n *\n * @return {Object}\n * A new object of `this.options_` and `obj` merged together.\n */\n ;\n\n _proto.options = function options(obj) {\n if (!obj) {\n return this.options_;\n }\n\n this.options_ = mergeOptions(this.options_, obj);\n return this.options_;\n }\n /**\n * Get the `Component`s DOM element\n *\n * @return {Element}\n * The DOM element for this `Component`.\n */\n ;\n\n _proto.el = function el() {\n return this.el_;\n }\n /**\n * Create the `Component`s DOM element.\n *\n * @param {string} [tagName]\n * Element's DOM node type. e.g. 'div'\n *\n * @param {Object} [properties]\n * An object of properties that should be set.\n *\n * @param {Object} [attributes]\n * An object of attributes that should be set.\n *\n * @return {Element}\n * The element that gets created.\n */\n ;\n\n _proto.createEl = function createEl$1(tagName, properties, attributes) {\n return createEl(tagName, properties, attributes);\n }\n /**\n * Localize a string given the string in english.\n *\n * If tokens are provided, it'll try and run a simple token replacement on the provided string.\n * The tokens it looks for look like `{1}` with the index being 1-indexed into the tokens array.\n *\n * If a `defaultValue` is provided, it'll use that over `string`,\n * if a value isn't found in provided language files.\n * This is useful if you want to have a descriptive key for token replacement\n * but have a succinct localized string and not require `en.json` to be included.\n *\n * Currently, it is used for the progress bar timing.\n * ```js\n * {\n * \"progress bar timing: currentTime={1} duration={2}\": \"{1} of {2}\"\n * }\n * ```\n * It is then used like so:\n * ```js\n * this.localize('progress bar timing: currentTime={1} duration{2}',\n * [this.player_.currentTime(), this.player_.duration()],\n * '{1} of {2}');\n * ```\n *\n * Which outputs something like: `01:23 of 24:56`.\n *\n *\n * @param {string} string\n * The string to localize and the key to lookup in the language files.\n * @param {string[]} [tokens]\n * If the current item has token replacements, provide the tokens here.\n * @param {string} [defaultValue]\n * Defaults to `string`. Can be a default value to use for token replacement\n * if the lookup key is needed to be separate.\n *\n * @return {string}\n * The localized string or if no localization exists the english string.\n */\n ;\n\n _proto.localize = function localize(string, tokens, defaultValue) {\n if (defaultValue === void 0) {\n defaultValue = string;\n }\n\n var code = this.player_.language && this.player_.language();\n var languages = this.player_.languages && this.player_.languages();\n var language = languages && languages[code];\n var primaryCode = code && code.split('-')[0];\n var primaryLang = languages && languages[primaryCode];\n var localizedString = defaultValue;\n\n if (language && language[string]) {\n localizedString = language[string];\n } else if (primaryLang && primaryLang[string]) {\n localizedString = primaryLang[string];\n }\n\n if (tokens) {\n localizedString = localizedString.replace(/\\{(\\d+)\\}/g, function (match, index) {\n var value = tokens[index - 1];\n var ret = value;\n\n if (typeof value === 'undefined') {\n ret = match;\n }\n\n return ret;\n });\n }\n\n return localizedString;\n }\n /**\n * Return the `Component`s DOM element. This is where children get inserted.\n * This will usually be the the same as the element returned in {@link Component#el}.\n *\n * @return {Element}\n * The content element for this `Component`.\n */\n ;\n\n _proto.contentEl = function contentEl() {\n return this.contentEl_ || this.el_;\n }\n /**\n * Get this `Component`s ID\n *\n * @return {string}\n * The id of this `Component`\n */\n ;\n\n _proto.id = function id() {\n return this.id_;\n }\n /**\n * Get the `Component`s name. The name gets used to reference the `Component`\n * and is set during registration.\n *\n * @return {string}\n * The name of this `Component`.\n */\n ;\n\n _proto.name = function name() {\n return this.name_;\n }\n /**\n * Get an array of all child components\n *\n * @return {Array}\n * The children\n */\n ;\n\n _proto.children = function children() {\n return this.children_;\n }\n /**\n * Returns the child `Component` with the given `id`.\n *\n * @param {string} id\n * The id of the child `Component` to get.\n *\n * @return {Component|undefined}\n * The child `Component` with the given `id` or undefined.\n */\n ;\n\n _proto.getChildById = function getChildById(id) {\n return this.childIndex_[id];\n }\n /**\n * Returns the child `Component` with the given `name`.\n *\n * @param {string} name\n * The name of the child `Component` to get.\n *\n * @return {Component|undefined}\n * The child `Component` with the given `name` or undefined.\n */\n ;\n\n _proto.getChild = function getChild(name) {\n if (!name) {\n return;\n }\n\n return this.childNameIndex_[name];\n }\n /**\n * Add a child `Component` inside the current `Component`.\n *\n *\n * @param {string|Component} child\n * The name or instance of a child to add.\n *\n * @param {Object} [options={}]\n * The key/value store of options that will get passed to children of\n * the child.\n *\n * @param {number} [index=this.children_.length]\n * The index to attempt to add a child into.\n *\n * @return {Component}\n * The `Component` that gets added as a child. When using a string the\n * `Component` will get created by this process.\n */\n ;\n\n _proto.addChild = function addChild(child, options, index) {\n if (options === void 0) {\n options = {};\n }\n\n if (index === void 0) {\n index = this.children_.length;\n }\n\n var component;\n var componentName; // If child is a string, create component with options\n\n if (typeof child === 'string') {\n componentName = toTitleCase(child);\n var componentClassName = options.componentClass || componentName; // Set name through options\n\n options.name = componentName; // Create a new object & element for this controls set\n // If there's no .player_, this is a player\n\n var ComponentClass = Component.getComponent(componentClassName);\n\n if (!ComponentClass) {\n throw new Error(\"Component \" + componentClassName + \" does not exist\");\n } // data stored directly on the videojs object may be\n // misidentified as a component to retain\n // backwards-compatibility with 4.x. check to make sure the\n // component class can be instantiated.\n\n\n if (typeof ComponentClass !== 'function') {\n return null;\n }\n\n component = new ComponentClass(this.player_ || this, options); // child is a component instance\n } else {\n component = child;\n }\n\n if (component.parentComponent_) {\n component.parentComponent_.removeChild(component);\n }\n\n this.children_.splice(index, 0, component);\n component.parentComponent_ = this;\n\n if (typeof component.id === 'function') {\n this.childIndex_[component.id()] = component;\n } // If a name wasn't used to create the component, check if we can use the\n // name function of the component\n\n\n componentName = componentName || component.name && toTitleCase(component.name());\n\n if (componentName) {\n this.childNameIndex_[componentName] = component;\n this.childNameIndex_[toLowerCase(componentName)] = component;\n } // Add the UI object's element to the container div (box)\n // Having an element is not required\n\n\n if (typeof component.el === 'function' && component.el()) {\n var childNodes = this.contentEl().children;\n var refNode = childNodes[index] || null;\n this.contentEl().insertBefore(component.el(), refNode);\n } // Return so it can stored on parent object if desired.\n\n\n return component;\n }\n /**\n * Remove a child `Component` from this `Component`s list of children. Also removes\n * the child `Component`s element from this `Component`s element.\n *\n * @param {Component} component\n * The child `Component` to remove.\n */\n ;\n\n _proto.removeChild = function removeChild(component) {\n if (typeof component === 'string') {\n component = this.getChild(component);\n }\n\n if (!component || !this.children_) {\n return;\n }\n\n var childFound = false;\n\n for (var i = this.children_.length - 1; i >= 0; i--) {\n if (this.children_[i] === component) {\n childFound = true;\n this.children_.splice(i, 1);\n break;\n }\n }\n\n if (!childFound) {\n return;\n }\n\n component.parentComponent_ = null;\n this.childIndex_[component.id()] = null;\n this.childNameIndex_[toTitleCase(component.name())] = null;\n this.childNameIndex_[toLowerCase(component.name())] = null;\n var compEl = component.el();\n\n if (compEl && compEl.parentNode === this.contentEl()) {\n this.contentEl().removeChild(component.el());\n }\n }\n /**\n * Add and initialize default child `Component`s based upon options.\n */\n ;\n\n _proto.initChildren = function initChildren() {\n var _this = this;\n\n var children = this.options_.children;\n\n if (children) {\n // `this` is `parent`\n var parentOptions = this.options_;\n\n var handleAdd = function handleAdd(child) {\n var name = child.name;\n var opts = child.opts; // Allow options for children to be set at the parent options\n // e.g. videojs(id, { controlBar: false });\n // instead of videojs(id, { children: { controlBar: false });\n\n if (parentOptions[name] !== undefined) {\n opts = parentOptions[name];\n } // Allow for disabling default components\n // e.g. options['children']['posterImage'] = false\n\n\n if (opts === false) {\n return;\n } // Allow options to be passed as a simple boolean if no configuration\n // is necessary.\n\n\n if (opts === true) {\n opts = {};\n } // We also want to pass the original player options\n // to each component as well so they don't need to\n // reach back into the player for options later.\n\n\n opts.playerOptions = _this.options_.playerOptions; // Create and add the child component.\n // Add a direct reference to the child by name on the parent instance.\n // If two of the same component are used, different names should be supplied\n // for each\n\n var newChild = _this.addChild(name, opts);\n\n if (newChild) {\n _this[name] = newChild;\n }\n }; // Allow for an array of children details to passed in the options\n\n\n var workingChildren;\n var Tech = Component.getComponent('Tech');\n\n if (Array.isArray(children)) {\n workingChildren = children;\n } else {\n workingChildren = Object.keys(children);\n }\n\n workingChildren // children that are in this.options_ but also in workingChildren would\n // give us extra children we do not want. So, we want to filter them out.\n .concat(Object.keys(this.options_).filter(function (child) {\n return !workingChildren.some(function (wchild) {\n if (typeof wchild === 'string') {\n return child === wchild;\n }\n\n return child === wchild.name;\n });\n })).map(function (child) {\n var name;\n var opts;\n\n if (typeof child === 'string') {\n name = child;\n opts = children[name] || _this.options_[name] || {};\n } else {\n name = child.name;\n opts = child;\n }\n\n return {\n name: name,\n opts: opts\n };\n }).filter(function (child) {\n // we have to make sure that child.name isn't in the techOrder since\n // techs are registerd as Components but can't aren't compatible\n // See https://github.com/videojs/video.js/issues/2772\n var c = Component.getComponent(child.opts.componentClass || toTitleCase(child.name));\n return c && !Tech.isTech(c);\n }).forEach(handleAdd);\n }\n }\n /**\n * Builds the default DOM class name. Should be overriden by sub-components.\n *\n * @return {string}\n * The DOM class name for this object.\n *\n * @abstract\n */\n ;\n\n _proto.buildCSSClass = function buildCSSClass() {\n // Child classes can include a function that does:\n // return 'CLASS NAME' + this._super();\n return '';\n }\n /**\n * Bind a listener to the component's ready state.\n * Different from event listeners in that if the ready event has already happened\n * it will trigger the function immediately.\n *\n * @return {Component}\n * Returns itself; method can be chained.\n */\n ;\n\n _proto.ready = function ready(fn, sync) {\n if (sync === void 0) {\n sync = false;\n }\n\n if (!fn) {\n return;\n }\n\n if (!this.isReady_) {\n this.readyQueue_ = this.readyQueue_ || [];\n this.readyQueue_.push(fn);\n return;\n }\n\n if (sync) {\n fn.call(this);\n } else {\n // Call the function asynchronously by default for consistency\n this.setTimeout(fn, 1);\n }\n }\n /**\n * Trigger all the ready listeners for this `Component`.\n *\n * @fires Component#ready\n */\n ;\n\n _proto.triggerReady = function triggerReady() {\n this.isReady_ = true; // Ensure ready is triggered asynchronously\n\n this.setTimeout(function () {\n var readyQueue = this.readyQueue_; // Reset Ready Queue\n\n this.readyQueue_ = [];\n\n if (readyQueue && readyQueue.length > 0) {\n readyQueue.forEach(function (fn) {\n fn.call(this);\n }, this);\n } // Allow for using event listeners also\n\n /**\n * Triggered when a `Component` is ready.\n *\n * @event Component#ready\n * @type {EventTarget~Event}\n */\n\n\n this.trigger('ready');\n }, 1);\n }\n /**\n * Find a single DOM element matching a `selector`. This can be within the `Component`s\n * `contentEl()` or another custom context.\n *\n * @param {string} selector\n * A valid CSS selector, which will be passed to `querySelector`.\n *\n * @param {Element|string} [context=this.contentEl()]\n * A DOM element within which to query. Can also be a selector string in\n * which case the first matching element will get used as context. If\n * missing `this.contentEl()` gets used. If `this.contentEl()` returns\n * nothing it falls back to `document`.\n *\n * @return {Element|null}\n * the dom element that was found, or null\n *\n * @see [Information on CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_Started/Selectors)\n */\n ;\n\n _proto.$ = function $$1(selector, context) {\n return $(selector, context || this.contentEl());\n }\n /**\n * Finds all DOM element matching a `selector`. This can be within the `Component`s\n * `contentEl()` or another custom context.\n *\n * @param {string} selector\n * A valid CSS selector, which will be passed to `querySelectorAll`.\n *\n * @param {Element|string} [context=this.contentEl()]\n * A DOM element within which to query. Can also be a selector string in\n * which case the first matching element will get used as context. If\n * missing `this.contentEl()` gets used. If `this.contentEl()` returns\n * nothing it falls back to `document`.\n *\n * @return {NodeList}\n * a list of dom elements that were found\n *\n * @see [Information on CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_Started/Selectors)\n */\n ;\n\n _proto.$$ = function $$$1(selector, context) {\n return $$(selector, context || this.contentEl());\n }\n /**\n * Check if a component's element has a CSS class name.\n *\n * @param {string} classToCheck\n * CSS class name to check.\n *\n * @return {boolean}\n * - True if the `Component` has the class.\n * - False if the `Component` does not have the class`\n */\n ;\n\n _proto.hasClass = function hasClass$1(classToCheck) {\n return hasClass(this.el_, classToCheck);\n }\n /**\n * Add a CSS class name to the `Component`s element.\n *\n * @param {string} classToAdd\n * CSS class name to add\n */\n ;\n\n _proto.addClass = function addClass$1(classToAdd) {\n addClass(this.el_, classToAdd);\n }\n /**\n * Remove a CSS class name from the `Component`s element.\n *\n * @param {string} classToRemove\n * CSS class name to remove\n */\n ;\n\n _proto.removeClass = function removeClass$1(classToRemove) {\n removeClass(this.el_, classToRemove);\n }\n /**\n * Add or remove a CSS class name from the component's element.\n * - `classToToggle` gets added when {@link Component#hasClass} would return false.\n * - `classToToggle` gets removed when {@link Component#hasClass} would return true.\n *\n * @param {string} classToToggle\n * The class to add or remove based on (@link Component#hasClass}\n *\n * @param {boolean|Dom~predicate} [predicate]\n * An {@link Dom~predicate} function or a boolean\n */\n ;\n\n _proto.toggleClass = function toggleClass$1(classToToggle, predicate) {\n toggleClass(this.el_, classToToggle, predicate);\n }\n /**\n * Show the `Component`s element if it is hidden by removing the\n * 'vjs-hidden' class name from it.\n */\n ;\n\n _proto.show = function show() {\n this.removeClass('vjs-hidden');\n }\n /**\n * Hide the `Component`s element if it is currently showing by adding the\n * 'vjs-hidden` class name to it.\n */\n ;\n\n _proto.hide = function hide() {\n this.addClass('vjs-hidden');\n }\n /**\n * Lock a `Component`s element in its visible state by adding the 'vjs-lock-showing'\n * class name to it. Used during fadeIn/fadeOut.\n *\n * @private\n */\n ;\n\n _proto.lockShowing = function lockShowing() {\n this.addClass('vjs-lock-showing');\n }\n /**\n * Unlock a `Component`s element from its visible state by removing the 'vjs-lock-showing'\n * class name from it. Used during fadeIn/fadeOut.\n *\n * @private\n */\n ;\n\n _proto.unlockShowing = function unlockShowing() {\n this.removeClass('vjs-lock-showing');\n }\n /**\n * Get the value of an attribute on the `Component`s element.\n *\n * @param {string} attribute\n * Name of the attribute to get the value from.\n *\n * @return {string|null}\n * - The value of the attribute that was asked for.\n * - Can be an empty string on some browsers if the attribute does not exist\n * or has no value\n * - Most browsers will return null if the attibute does not exist or has\n * no value.\n *\n * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute}\n */\n ;\n\n _proto.getAttribute = function getAttribute$1(attribute) {\n return getAttribute(this.el_, attribute);\n }\n /**\n * Set the value of an attribute on the `Component`'s element\n *\n * @param {string} attribute\n * Name of the attribute to set.\n *\n * @param {string} value\n * Value to set the attribute to.\n *\n * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute}\n */\n ;\n\n _proto.setAttribute = function setAttribute$1(attribute, value) {\n setAttribute(this.el_, attribute, value);\n }\n /**\n * Remove an attribute from the `Component`s element.\n *\n * @param {string} attribute\n * Name of the attribute to remove.\n *\n * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute}\n */\n ;\n\n _proto.removeAttribute = function removeAttribute$1(attribute) {\n removeAttribute(this.el_, attribute);\n }\n /**\n * Get or set the width of the component based upon the CSS styles.\n * See {@link Component#dimension} for more detailed information.\n *\n * @param {number|string} [num]\n * The width that you want to set postfixed with '%', 'px' or nothing.\n *\n * @param {boolean} [skipListeners]\n * Skip the componentresize event trigger\n *\n * @return {number|string}\n * The width when getting, zero if there is no width. Can be a string\n * postpixed with '%' or 'px'.\n */\n ;\n\n _proto.width = function width(num, skipListeners) {\n return this.dimension('width', num, skipListeners);\n }\n /**\n * Get or set the height of the component based upon the CSS styles.\n * See {@link Component#dimension} for more detailed information.\n *\n * @param {number|string} [num]\n * The height that you want to set postfixed with '%', 'px' or nothing.\n *\n * @param {boolean} [skipListeners]\n * Skip the componentresize event trigger\n *\n * @return {number|string}\n * The width when getting, zero if there is no width. Can be a string\n * postpixed with '%' or 'px'.\n */\n ;\n\n _proto.height = function height(num, skipListeners) {\n return this.dimension('height', num, skipListeners);\n }\n /**\n * Set both the width and height of the `Component` element at the same time.\n *\n * @param {number|string} width\n * Width to set the `Component`s element to.\n *\n * @param {number|string} height\n * Height to set the `Component`s element to.\n */\n ;\n\n _proto.dimensions = function dimensions(width, height) {\n // Skip componentresize listeners on width for optimization\n this.width(width, true);\n this.height(height);\n }\n /**\n * Get or set width or height of the `Component` element. This is the shared code\n * for the {@link Component#width} and {@link Component#height}.\n *\n * Things to know:\n * - If the width or height in an number this will return the number postfixed with 'px'.\n * - If the width/height is a percent this will return the percent postfixed with '%'\n * - Hidden elements have a width of 0 with `window.getComputedStyle`. This function\n * defaults to the `Component`s `style.width` and falls back to `window.getComputedStyle`.\n * See [this]{@link http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/}\n * for more information\n * - If you want the computed style of the component, use {@link Component#currentWidth}\n * and {@link {Component#currentHeight}\n *\n * @fires Component#componentresize\n *\n * @param {string} widthOrHeight\n 8 'width' or 'height'\n *\n * @param {number|string} [num]\n 8 New dimension\n *\n * @param {boolean} [skipListeners]\n * Skip componentresize event trigger\n *\n * @return {number}\n * The dimension when getting or 0 if unset\n */\n ;\n\n _proto.dimension = function dimension(widthOrHeight, num, skipListeners) {\n if (num !== undefined) {\n // Set to zero if null or literally NaN (NaN !== NaN)\n if (num === null || num !== num) {\n num = 0;\n } // Check if using css width/height (% or px) and adjust\n\n\n if (('' + num).indexOf('%') !== -1 || ('' + num).indexOf('px') !== -1) {\n this.el_.style[widthOrHeight] = num;\n } else if (num === 'auto') {\n this.el_.style[widthOrHeight] = '';\n } else {\n this.el_.style[widthOrHeight] = num + 'px';\n } // skipListeners allows us to avoid triggering the resize event when setting both width and height\n\n\n if (!skipListeners) {\n /**\n * Triggered when a component is resized.\n *\n * @event Component#componentresize\n * @type {EventTarget~Event}\n */\n this.trigger('componentresize');\n }\n\n return;\n } // Not setting a value, so getting it\n // Make sure element exists\n\n\n if (!this.el_) {\n return 0;\n } // Get dimension value from style\n\n\n var val = this.el_.style[widthOrHeight];\n var pxIndex = val.indexOf('px');\n\n if (pxIndex !== -1) {\n // Return the pixel value with no 'px'\n return parseInt(val.slice(0, pxIndex), 10);\n } // No px so using % or no style was set, so falling back to offsetWidth/height\n // If component has display:none, offset will return 0\n // TODO: handle display:none and no dimension style using px\n\n\n return parseInt(this.el_['offset' + toTitleCase(widthOrHeight)], 10);\n }\n /**\n * Get the computed width or the height of the component's element.\n *\n * Uses `window.getComputedStyle`.\n *\n * @param {string} widthOrHeight\n * A string containing 'width' or 'height'. Whichever one you want to get.\n *\n * @return {number}\n * The dimension that gets asked for or 0 if nothing was set\n * for that dimension.\n */\n ;\n\n _proto.currentDimension = function currentDimension(widthOrHeight) {\n var computedWidthOrHeight = 0;\n\n if (widthOrHeight !== 'width' && widthOrHeight !== 'height') {\n throw new Error('currentDimension only accepts width or height value');\n }\n\n computedWidthOrHeight = computedStyle(this.el_, widthOrHeight); // remove 'px' from variable and parse as integer\n\n computedWidthOrHeight = parseFloat(computedWidthOrHeight); // if the computed value is still 0, it's possible that the browser is lying\n // and we want to check the offset values.\n // This code also runs wherever getComputedStyle doesn't exist.\n\n if (computedWidthOrHeight === 0 || isNaN(computedWidthOrHeight)) {\n var rule = \"offset\" + toTitleCase(widthOrHeight);\n computedWidthOrHeight = this.el_[rule];\n }\n\n return computedWidthOrHeight;\n }\n /**\n * An object that contains width and height values of the `Component`s\n * computed style. Uses `window.getComputedStyle`.\n *\n * @typedef {Object} Component~DimensionObject\n *\n * @property {number} width\n * The width of the `Component`s computed style.\n *\n * @property {number} height\n * The height of the `Component`s computed style.\n */\n\n /**\n * Get an object that contains computed width and height values of the\n * component's element.\n *\n * Uses `window.getComputedStyle`.\n *\n * @return {Component~DimensionObject}\n * The computed dimensions of the component's element.\n */\n ;\n\n _proto.currentDimensions = function currentDimensions() {\n return {\n width: this.currentDimension('width'),\n height: this.currentDimension('height')\n };\n }\n /**\n * Get the computed width of the component's element.\n *\n * Uses `window.getComputedStyle`.\n *\n * @return {number}\n * The computed width of the component's element.\n */\n ;\n\n _proto.currentWidth = function currentWidth() {\n return this.currentDimension('width');\n }\n /**\n * Get the computed height of the component's element.\n *\n * Uses `window.getComputedStyle`.\n *\n * @return {number}\n * The computed height of the component's element.\n */\n ;\n\n _proto.currentHeight = function currentHeight() {\n return this.currentDimension('height');\n }\n /**\n * Set the focus to this component\n */\n ;\n\n _proto.focus = function focus() {\n this.el_.focus();\n }\n /**\n * Remove the focus from this component\n */\n ;\n\n _proto.blur = function blur() {\n this.el_.blur();\n }\n /**\n * When this Component receives a `keydown` event which it does not process,\n * it passes the event to the Player for handling.\n *\n * @param {EventTarget~Event} event\n * The `keydown` event that caused this function to be called.\n */\n ;\n\n _proto.handleKeyDown = function handleKeyDown(event) {\n if (this.player_) {\n // We only stop propagation here because we want unhandled events to fall\n // back to the browser.\n event.stopPropagation();\n this.player_.handleKeyDown(event);\n }\n }\n /**\n * Many components used to have a `handleKeyPress` method, which was poorly\n * named because it listened to a `keydown` event. This method name now\n * delegates to `handleKeyDown`. This means anyone calling `handleKeyPress`\n * will not see their method calls stop working.\n *\n * @param {EventTarget~Event} event\n * The event that caused this function to be called.\n */\n ;\n\n _proto.handleKeyPress = function handleKeyPress(event) {\n this.handleKeyDown(event);\n }\n /**\n * Emit a 'tap' events when touch event support gets detected. This gets used to\n * support toggling the controls through a tap on the video. They get enabled\n * because every sub-component would have extra overhead otherwise.\n *\n * @private\n * @fires Component#tap\n * @listens Component#touchstart\n * @listens Component#touchmove\n * @listens Component#touchleave\n * @listens Component#touchcancel\n * @listens Component#touchend\n */\n ;\n\n _proto.emitTapEvents = function emitTapEvents() {\n // Track the start time so we can determine how long the touch lasted\n var touchStart = 0;\n var firstTouch = null; // Maximum movement allowed during a touch event to still be considered a tap\n // Other popular libs use anywhere from 2 (hammer.js) to 15,\n // so 10 seems like a nice, round number.\n\n var tapMovementThreshold = 10; // The maximum length a touch can be while still being considered a tap\n\n var touchTimeThreshold = 200;\n var couldBeTap;\n this.on('touchstart', function (event) {\n // If more than one finger, don't consider treating this as a click\n if (event.touches.length === 1) {\n // Copy pageX/pageY from the object\n firstTouch = {\n pageX: event.touches[0].pageX,\n pageY: event.touches[0].pageY\n }; // Record start time so we can detect a tap vs. \"touch and hold\"\n\n touchStart = window$1.performance.now(); // Reset couldBeTap tracking\n\n couldBeTap = true;\n }\n });\n this.on('touchmove', function (event) {\n // If more than one finger, don't consider treating this as a click\n if (event.touches.length > 1) {\n couldBeTap = false;\n } else if (firstTouch) {\n // Some devices will throw touchmoves for all but the slightest of taps.\n // So, if we moved only a small distance, this could still be a tap\n var xdiff = event.touches[0].pageX - firstTouch.pageX;\n var ydiff = event.touches[0].pageY - firstTouch.pageY;\n var touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n\n if (touchDistance > tapMovementThreshold) {\n couldBeTap = false;\n }\n }\n });\n\n var noTap = function noTap() {\n couldBeTap = false;\n }; // TODO: Listen to the original target. http://youtu.be/DujfpXOKUp8?t=13m8s\n\n\n this.on('touchleave', noTap);\n this.on('touchcancel', noTap); // When the touch ends, measure how long it took and trigger the appropriate\n // event\n\n this.on('touchend', function (event) {\n firstTouch = null; // Proceed only if the touchmove/leave/cancel event didn't happen\n\n if (couldBeTap === true) {\n // Measure how long the touch lasted\n var touchTime = window$1.performance.now() - touchStart; // Make sure the touch was less than the threshold to be considered a tap\n\n if (touchTime < touchTimeThreshold) {\n // Don't let browser turn this into a click\n event.preventDefault();\n /**\n * Triggered when a `Component` is tapped.\n *\n * @event Component#tap\n * @type {EventTarget~Event}\n */\n\n this.trigger('tap'); // It may be good to copy the touchend event object and change the\n // type to tap, if the other event properties aren't exact after\n // Events.fixEvent runs (e.g. event.target)\n }\n }\n });\n }\n /**\n * This function reports user activity whenever touch events happen. This can get\n * turned off by any sub-components that wants touch events to act another way.\n *\n * Report user touch activity when touch events occur. User activity gets used to\n * determine when controls should show/hide. It is simple when it comes to mouse\n * events, because any mouse event should show the controls. So we capture mouse\n * events that bubble up to the player and report activity when that happens.\n * With touch events it isn't as easy as `touchstart` and `touchend` toggle player\n * controls. So touch events can't help us at the player level either.\n *\n * User activity gets checked asynchronously. So what could happen is a tap event\n * on the video turns the controls off. Then the `touchend` event bubbles up to\n * the player. Which, if it reported user activity, would turn the controls right\n * back on. We also don't want to completely block touch events from bubbling up.\n * Furthermore a `touchmove` event and anything other than a tap, should not turn\n * controls back on.\n *\n * @listens Component#touchstart\n * @listens Component#touchmove\n * @listens Component#touchend\n * @listens Component#touchcancel\n */\n ;\n\n _proto.enableTouchActivity = function enableTouchActivity() {\n // Don't continue if the root player doesn't support reporting user activity\n if (!this.player() || !this.player().reportUserActivity) {\n return;\n } // listener for reporting that the user is active\n\n\n var report = bind(this.player(), this.player().reportUserActivity);\n var touchHolding;\n this.on('touchstart', function () {\n report(); // For as long as the they are touching the device or have their mouse down,\n // we consider them active even if they're not moving their finger or mouse.\n // So we want to continue to update that they are active\n\n this.clearInterval(touchHolding); // report at the same interval as activityCheck\n\n touchHolding = this.setInterval(report, 250);\n });\n\n var touchEnd = function touchEnd(event) {\n report(); // stop the interval that maintains activity if the touch is holding\n\n this.clearInterval(touchHolding);\n };\n\n this.on('touchmove', report);\n this.on('touchend', touchEnd);\n this.on('touchcancel', touchEnd);\n }\n /**\n * A callback that has no parameters and is bound into `Component`s context.\n *\n * @callback Component~GenericCallback\n * @this Component\n */\n\n /**\n * Creates a function that runs after an `x` millisecond timeout. This function is a\n * wrapper around `window.setTimeout`. There are a few reasons to use this one\n * instead though:\n * 1. It gets cleared via {@link Component#clearTimeout} when\n * {@link Component#dispose} gets called.\n * 2. The function callback will gets turned into a {@link Component~GenericCallback}\n *\n * > Note: You can't use `window.clearTimeout` on the id returned by this function. This\n * will cause its dispose listener not to get cleaned up! Please use\n * {@link Component#clearTimeout} or {@link Component#dispose} instead.\n *\n * @param {Component~GenericCallback} fn\n * The function that will be run after `timeout`.\n *\n * @param {number} timeout\n * Timeout in milliseconds to delay before executing the specified function.\n *\n * @return {number}\n * Returns a timeout ID that gets used to identify the timeout. It can also\n * get used in {@link Component#clearTimeout} to clear the timeout that\n * was set.\n *\n * @listens Component#dispose\n * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout}\n */\n ;\n\n _proto.setTimeout = function setTimeout(fn, timeout) {\n var _this2 = this; // declare as variables so they are properly available in timeout function\n // eslint-disable-next-line\n\n\n var timeoutId;\n fn = bind(this, fn);\n this.clearTimersOnDispose_();\n timeoutId = window$1.setTimeout(function () {\n if (_this2.setTimeoutIds_.has(timeoutId)) {\n _this2.setTimeoutIds_[\"delete\"](timeoutId);\n }\n\n fn();\n }, timeout);\n this.setTimeoutIds_.add(timeoutId);\n return timeoutId;\n }\n /**\n * Clears a timeout that gets created via `window.setTimeout` or\n * {@link Component#setTimeout}. If you set a timeout via {@link Component#setTimeout}\n * use this function instead of `window.clearTimout`. If you don't your dispose\n * listener will not get cleaned up until {@link Component#dispose}!\n *\n * @param {number} timeoutId\n * The id of the timeout to clear. The return value of\n * {@link Component#setTimeout} or `window.setTimeout`.\n *\n * @return {number}\n * Returns the timeout id that was cleared.\n *\n * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearTimeout}\n */\n ;\n\n _proto.clearTimeout = function clearTimeout(timeoutId) {\n if (this.setTimeoutIds_.has(timeoutId)) {\n this.setTimeoutIds_[\"delete\"](timeoutId);\n window$1.clearTimeout(timeoutId);\n }\n\n return timeoutId;\n }\n /**\n * Creates a function that gets run every `x` milliseconds. This function is a wrapper\n * around `window.setInterval`. There are a few reasons to use this one instead though.\n * 1. It gets cleared via {@link Component#clearInterval} when\n * {@link Component#dispose} gets called.\n * 2. The function callback will be a {@link Component~GenericCallback}\n *\n * @param {Component~GenericCallback} fn\n * The function to run every `x` seconds.\n *\n * @param {number} interval\n * Execute the specified function every `x` milliseconds.\n *\n * @return {number}\n * Returns an id that can be used to identify the interval. It can also be be used in\n * {@link Component#clearInterval} to clear the interval.\n *\n * @listens Component#dispose\n * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval}\n */\n ;\n\n _proto.setInterval = function setInterval(fn, interval) {\n fn = bind(this, fn);\n this.clearTimersOnDispose_();\n var intervalId = window$1.setInterval(fn, interval);\n this.setIntervalIds_.add(intervalId);\n return intervalId;\n }\n /**\n * Clears an interval that gets created via `window.setInterval` or\n * {@link Component#setInterval}. If you set an inteval via {@link Component#setInterval}\n * use this function instead of `window.clearInterval`. If you don't your dispose\n * listener will not get cleaned up until {@link Component#dispose}!\n *\n * @param {number} intervalId\n * The id of the interval to clear. The return value of\n * {@link Component#setInterval} or `window.setInterval`.\n *\n * @return {number}\n * Returns the interval id that was cleared.\n *\n * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearInterval}\n */\n ;\n\n _proto.clearInterval = function clearInterval(intervalId) {\n if (this.setIntervalIds_.has(intervalId)) {\n this.setIntervalIds_[\"delete\"](intervalId);\n window$1.clearInterval(intervalId);\n }\n\n return intervalId;\n }\n /**\n * Queues up a callback to be passed to requestAnimationFrame (rAF), but\n * with a few extra bonuses:\n *\n * - Supports browsers that do not support rAF by falling back to\n * {@link Component#setTimeout}.\n *\n * - The callback is turned into a {@link Component~GenericCallback} (i.e.\n * bound to the component).\n *\n * - Automatic cancellation of the rAF callback is handled if the component\n * is disposed before it is called.\n *\n * @param {Component~GenericCallback} fn\n * A function that will be bound to this component and executed just\n * before the browser's next repaint.\n *\n * @return {number}\n * Returns an rAF ID that gets used to identify the timeout. It can\n * also be used in {@link Component#cancelAnimationFrame} to cancel\n * the animation frame callback.\n *\n * @listens Component#dispose\n * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame}\n */\n ;\n\n _proto.requestAnimationFrame = function requestAnimationFrame(fn) {\n var _this3 = this; // Fall back to using a timer.\n\n\n if (!this.supportsRaf_) {\n return this.setTimeout(fn, 1000 / 60);\n }\n\n this.clearTimersOnDispose_(); // declare as variables so they are properly available in rAF function\n // eslint-disable-next-line\n\n var id;\n fn = bind(this, fn);\n id = window$1.requestAnimationFrame(function () {\n if (_this3.rafIds_.has(id)) {\n _this3.rafIds_[\"delete\"](id);\n }\n\n fn();\n });\n this.rafIds_.add(id);\n return id;\n }\n /**\n * Cancels a queued callback passed to {@link Component#requestAnimationFrame}\n * (rAF).\n *\n * If you queue an rAF callback via {@link Component#requestAnimationFrame},\n * use this function instead of `window.cancelAnimationFrame`. If you don't,\n * your dispose listener will not get cleaned up until {@link Component#dispose}!\n *\n * @param {number} id\n * The rAF ID to clear. The return value of {@link Component#requestAnimationFrame}.\n *\n * @return {number}\n * Returns the rAF ID that was cleared.\n *\n * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/window/cancelAnimationFrame}\n */\n ;\n\n _proto.cancelAnimationFrame = function cancelAnimationFrame(id) {\n // Fall back to using a timer.\n if (!this.supportsRaf_) {\n return this.clearTimeout(id);\n }\n\n if (this.rafIds_.has(id)) {\n this.rafIds_[\"delete\"](id);\n window$1.cancelAnimationFrame(id);\n }\n\n return id;\n }\n /**\n * A function to setup `requestAnimationFrame`, `setTimeout`,\n * and `setInterval`, clearing on dispose.\n *\n * > Previously each timer added and removed dispose listeners on it's own.\n * For better performance it was decided to batch them all, and use `Set`s\n * to track outstanding timer ids.\n *\n * @private\n */\n ;\n\n _proto.clearTimersOnDispose_ = function clearTimersOnDispose_() {\n var _this4 = this;\n\n if (this.clearingTimersOnDispose_) {\n return;\n }\n\n this.clearingTimersOnDispose_ = true;\n this.one('dispose', function () {\n [['rafIds_', 'cancelAnimationFrame'], ['setTimeoutIds_', 'clearTimeout'], ['setIntervalIds_', 'clearInterval']].forEach(function (_ref) {\n var idName = _ref[0],\n cancelName = _ref[1];\n\n _this4[idName].forEach(_this4[cancelName], _this4);\n });\n _this4.clearingTimersOnDispose_ = false;\n });\n }\n /**\n * Register a `Component` with `videojs` given the name and the component.\n *\n * > NOTE: {@link Tech}s should not be registered as a `Component`. {@link Tech}s\n * should be registered using {@link Tech.registerTech} or\n * {@link videojs:videojs.registerTech}.\n *\n * > NOTE: This function can also be seen on videojs as\n * {@link videojs:videojs.registerComponent}.\n *\n * @param {string} name\n * The name of the `Component` to register.\n *\n * @param {Component} ComponentToRegister\n * The `Component` class to register.\n *\n * @return {Component}\n * The `Component` that was registered.\n */\n ;\n\n Component.registerComponent = function registerComponent(name, ComponentToRegister) {\n if (typeof name !== 'string' || !name) {\n throw new Error(\"Illegal component name, \\\"\" + name + \"\\\"; must be a non-empty string.\");\n }\n\n var Tech = Component.getComponent('Tech'); // We need to make sure this check is only done if Tech has been registered.\n\n var isTech = Tech && Tech.isTech(ComponentToRegister);\n var isComp = Component === ComponentToRegister || Component.prototype.isPrototypeOf(ComponentToRegister.prototype);\n\n if (isTech || !isComp) {\n var reason;\n\n if (isTech) {\n reason = 'techs must be registered using Tech.registerTech()';\n } else {\n reason = 'must be a Component subclass';\n }\n\n throw new Error(\"Illegal component, \\\"\" + name + \"\\\"; \" + reason + \".\");\n }\n\n name = toTitleCase(name);\n\n if (!Component.components_) {\n Component.components_ = {};\n }\n\n var Player = Component.getComponent('Player');\n\n if (name === 'Player' && Player && Player.players) {\n var players = Player.players;\n var playerNames = Object.keys(players); // If we have players that were disposed, then their name will still be\n // in Players.players. So, we must loop through and verify that the value\n // for each item is not null. This allows registration of the Player component\n // after all players have been disposed or before any were created.\n\n if (players && playerNames.length > 0 && playerNames.map(function (pname) {\n return players[pname];\n }).every(Boolean)) {\n throw new Error('Can not register Player component after player has been created.');\n }\n }\n\n Component.components_[name] = ComponentToRegister;\n Component.components_[toLowerCase(name)] = ComponentToRegister;\n return ComponentToRegister;\n }\n /**\n * Get a `Component` based on the name it was registered with.\n *\n * @param {string} name\n * The Name of the component to get.\n *\n * @return {Component}\n * The `Component` that got registered under the given name.\n *\n * @deprecated In `videojs` 6 this will not return `Component`s that were not\n * registered using {@link Component.registerComponent}. Currently we\n * check the global `videojs` object for a `Component` name and\n * return that if it exists.\n */\n ;\n\n Component.getComponent = function getComponent(name) {\n if (!name || !Component.components_) {\n return;\n }\n\n return Component.components_[name];\n };\n\n return Component;\n}();\n/**\n * Whether or not this component supports `requestAnimationFrame`.\n *\n * This is exposed primarily for testing purposes.\n *\n * @private\n * @type {Boolean}\n */\n\n\nComponent.prototype.supportsRaf_ = typeof window$1.requestAnimationFrame === 'function' && typeof window$1.cancelAnimationFrame === 'function';\nComponent.registerComponent('Component', Component);\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n/**\n * @file browser.js\n * @module browser\n */\n\n\nvar USER_AGENT = window$1.navigator && window$1.navigator.userAgent || '';\nvar webkitVersionMap = /AppleWebKit\\/([\\d.]+)/i.exec(USER_AGENT);\nvar appleWebkitVersion = webkitVersionMap ? parseFloat(webkitVersionMap.pop()) : null;\n/**\n * Whether or not this device is an iPad.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar IS_IPAD = /iPad/i.test(USER_AGENT);\n/**\n * Whether or not this device is an iPhone.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n// The Facebook app's UIWebView identifies as both an iPhone and iPad, so\n// to identify iPhones, we need to exclude iPads.\n// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/\n\nvar IS_IPHONE = /iPhone/i.test(USER_AGENT) && !IS_IPAD;\n/**\n * Whether or not this device is an iPod.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar IS_IPOD = /iPod/i.test(USER_AGENT);\n/**\n * Whether or not this is an iOS device.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD;\n/**\n * The detected iOS version - or `null`.\n *\n * @static\n * @const\n * @type {string|null}\n */\n\nvar IOS_VERSION = function () {\n var match = USER_AGENT.match(/OS (\\d+)_/i);\n\n if (match && match[1]) {\n return match[1];\n }\n\n return null;\n}();\n/**\n * Whether or not this is an Android device.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\n\nvar IS_ANDROID = /Android/i.test(USER_AGENT);\n/**\n * The detected Android version - or `null`.\n *\n * @static\n * @const\n * @type {number|string|null}\n */\n\nvar ANDROID_VERSION = function () {\n // This matches Android Major.Minor.Patch versions\n // ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned\n var match = USER_AGENT.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i);\n\n if (!match) {\n return null;\n }\n\n var major = match[1] && parseFloat(match[1]);\n var minor = match[2] && parseFloat(match[2]);\n\n if (major && minor) {\n return parseFloat(match[1] + '.' + match[2]);\n } else if (major) {\n return major;\n }\n\n return null;\n}();\n/**\n * Whether or not this is a native Android browser.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\n\nvar IS_NATIVE_ANDROID = IS_ANDROID && ANDROID_VERSION < 5 && appleWebkitVersion < 537;\n/**\n * Whether or not this is Mozilla Firefox.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar IS_FIREFOX = /Firefox/i.test(USER_AGENT);\n/**\n * Whether or not this is Microsoft Edge.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar IS_EDGE = /Edge/i.test(USER_AGENT);\n/**\n * Whether or not this is Google Chrome.\n *\n * This will also be `true` for Chrome on iOS, which will have different support\n * as it is actually Safari under the hood.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar IS_CHROME = !IS_EDGE && (/Chrome/i.test(USER_AGENT) || /CriOS/i.test(USER_AGENT));\n/**\n * The detected Google Chrome version - or `null`.\n *\n * @static\n * @const\n * @type {number|null}\n */\n\nvar CHROME_VERSION = function () {\n var match = USER_AGENT.match(/(Chrome|CriOS)\\/(\\d+)/);\n\n if (match && match[2]) {\n return parseFloat(match[2]);\n }\n\n return null;\n}();\n/**\n * The detected Internet Explorer version - or `null`.\n *\n * @static\n * @const\n * @type {number|null}\n */\n\n\nvar IE_VERSION = function () {\n var result = /MSIE\\s(\\d+)\\.\\d/.exec(USER_AGENT);\n var version = result && parseFloat(result[1]);\n\n if (!version && /Trident\\/7.0/i.test(USER_AGENT) && /rv:11.0/.test(USER_AGENT)) {\n // IE 11 has a different user agent string than other IE versions\n version = 11.0;\n }\n\n return version;\n}();\n/**\n * Whether or not this is desktop Safari.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\n\nvar IS_SAFARI = /Safari/i.test(USER_AGENT) && !IS_CHROME && !IS_ANDROID && !IS_EDGE;\n/**\n * Whether or not this is any flavor of Safari - including iOS.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar IS_ANY_SAFARI = (IS_SAFARI || IS_IOS) && !IS_CHROME;\n/**\n * Whether or not this is a Windows machine.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar IS_WINDOWS = /Windows/i.test(USER_AGENT);\n/**\n * Whether or not this device is touch-enabled.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar TOUCH_ENABLED = isReal() && ('ontouchstart' in window$1 || window$1.navigator.maxTouchPoints || window$1.DocumentTouch && window$1.document instanceof window$1.DocumentTouch);\nvar browser =\n/*#__PURE__*/\nObject.freeze({\n IS_IPAD: IS_IPAD,\n IS_IPHONE: IS_IPHONE,\n IS_IPOD: IS_IPOD,\n IS_IOS: IS_IOS,\n IOS_VERSION: IOS_VERSION,\n IS_ANDROID: IS_ANDROID,\n ANDROID_VERSION: ANDROID_VERSION,\n IS_NATIVE_ANDROID: IS_NATIVE_ANDROID,\n IS_FIREFOX: IS_FIREFOX,\n IS_EDGE: IS_EDGE,\n IS_CHROME: IS_CHROME,\n CHROME_VERSION: CHROME_VERSION,\n IE_VERSION: IE_VERSION,\n IS_SAFARI: IS_SAFARI,\n IS_ANY_SAFARI: IS_ANY_SAFARI,\n IS_WINDOWS: IS_WINDOWS,\n TOUCH_ENABLED: TOUCH_ENABLED\n});\n/**\n * @file time-ranges.js\n * @module time-ranges\n */\n\n/**\n * Returns the time for the specified index at the start or end\n * of a TimeRange object.\n *\n * @typedef {Function} TimeRangeIndex\n *\n * @param {number} [index=0]\n * The range number to return the time for.\n *\n * @return {number}\n * The time offset at the specified index.\n *\n * @deprecated The index argument must be provided.\n * In the future, leaving it out will throw an error.\n */\n\n/**\n * An object that contains ranges of time.\n *\n * @typedef {Object} TimeRange\n *\n * @property {number} length\n * The number of time ranges represented by this object.\n *\n * @property {module:time-ranges~TimeRangeIndex} start\n * Returns the time offset at which a specified time range begins.\n *\n * @property {module:time-ranges~TimeRangeIndex} end\n * Returns the time offset at which a specified time range ends.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges\n */\n\n/**\n * Check if any of the time ranges are over the maximum index.\n *\n * @private\n * @param {string} fnName\n * The function name to use for logging\n *\n * @param {number} index\n * The index to check\n *\n * @param {number} maxIndex\n * The maximum possible index\n *\n * @throws {Error} if the timeRanges provided are over the maxIndex\n */\n\nfunction rangeCheck(fnName, index, maxIndex) {\n if (typeof index !== 'number' || index < 0 || index > maxIndex) {\n throw new Error(\"Failed to execute '\" + fnName + \"' on 'TimeRanges': The index provided (\" + index + \") is non-numeric or out of bounds (0-\" + maxIndex + \").\");\n }\n}\n/**\n * Get the time for the specified index at the start or end\n * of a TimeRange object.\n *\n * @private\n * @param {string} fnName\n * The function name to use for logging\n *\n * @param {string} valueIndex\n * The property that should be used to get the time. should be\n * 'start' or 'end'\n *\n * @param {Array} ranges\n * An array of time ranges\n *\n * @param {Array} [rangeIndex=0]\n * The index to start the search at\n *\n * @return {number}\n * The time that offset at the specified index.\n *\n * @deprecated rangeIndex must be set to a value, in the future this will throw an error.\n * @throws {Error} if rangeIndex is more than the length of ranges\n */\n\n\nfunction getRange(fnName, valueIndex, ranges, rangeIndex) {\n rangeCheck(fnName, rangeIndex, ranges.length - 1);\n return ranges[rangeIndex][valueIndex];\n}\n/**\n * Create a time range object given ranges of time.\n *\n * @private\n * @param {Array} [ranges]\n * An array of time ranges.\n */\n\n\nfunction createTimeRangesObj(ranges) {\n if (ranges === undefined || ranges.length === 0) {\n return {\n length: 0,\n start: function start() {\n throw new Error('This TimeRanges object is empty');\n },\n end: function end() {\n throw new Error('This TimeRanges object is empty');\n }\n };\n }\n\n return {\n length: ranges.length,\n start: getRange.bind(null, 'start', 0, ranges),\n end: getRange.bind(null, 'end', 1, ranges)\n };\n}\n/**\n * Create a `TimeRange` object which mimics an\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges|HTML5 TimeRanges instance}.\n *\n * @param {number|Array[]} start\n * The start of a single range (a number) or an array of ranges (an\n * array of arrays of two numbers each).\n *\n * @param {number} end\n * The end of a single range. Cannot be used with the array form of\n * the `start` argument.\n */\n\n\nfunction createTimeRanges(start, end) {\n if (Array.isArray(start)) {\n return createTimeRangesObj(start);\n } else if (start === undefined || end === undefined) {\n return createTimeRangesObj();\n }\n\n return createTimeRangesObj([[start, end]]);\n}\n/**\n * @file buffer.js\n * @module buffer\n */\n\n/**\n * Compute the percentage of the media that has been buffered.\n *\n * @param {TimeRange} buffered\n * The current `TimeRange` object representing buffered time ranges\n *\n * @param {number} duration\n * Total duration of the media\n *\n * @return {number}\n * Percent buffered of the total duration in decimal form.\n */\n\n\nfunction bufferedPercent(buffered, duration) {\n var bufferedDuration = 0;\n var start;\n var end;\n\n if (!duration) {\n return 0;\n }\n\n if (!buffered || !buffered.length) {\n buffered = createTimeRanges(0, 0);\n }\n\n for (var i = 0; i < buffered.length; i++) {\n start = buffered.start(i);\n end = buffered.end(i); // buffered end can be bigger than duration by a very small fraction\n\n if (end > duration) {\n end = duration;\n }\n\n bufferedDuration += end - start;\n }\n\n return bufferedDuration / duration;\n}\n/**\n * @file fullscreen-api.js\n * @module fullscreen-api\n * @private\n */\n\n/**\n * Store the browser-specific methods for the fullscreen API.\n *\n * @type {Object}\n * @see [Specification]{@link https://fullscreen.spec.whatwg.org}\n * @see [Map Approach From Screenfull.js]{@link https://github.com/sindresorhus/screenfull.js}\n */\n\n\nvar FullscreenApi = {\n prefixed: true\n}; // browser API methods\n\nvar apiMap = [['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror', 'fullscreen'], // WebKit\n['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror', '-webkit-full-screen'], // Mozilla\n['mozRequestFullScreen', 'mozCancelFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'mozfullscreenchange', 'mozfullscreenerror', '-moz-full-screen'], // Microsoft\n['msRequestFullscreen', 'msExitFullscreen', 'msFullscreenElement', 'msFullscreenEnabled', 'MSFullscreenChange', 'MSFullscreenError', '-ms-fullscreen']];\nvar specApi = apiMap[0];\nvar browserApi; // determine the supported set of functions\n\nfor (var i = 0; i < apiMap.length; i++) {\n // check for exitFullscreen function\n if (apiMap[i][1] in document) {\n browserApi = apiMap[i];\n break;\n }\n} // map the browser API names to the spec API names\n\n\nif (browserApi) {\n for (var _i = 0; _i < browserApi.length; _i++) {\n FullscreenApi[specApi[_i]] = browserApi[_i];\n }\n\n FullscreenApi.prefixed = browserApi[0] !== specApi[0];\n}\n/**\n * @file media-error.js\n */\n\n/**\n * A Custom `MediaError` class which mimics the standard HTML5 `MediaError` class.\n *\n * @param {number|string|Object|MediaError} value\n * This can be of multiple types:\n * - number: should be a standard error code\n * - string: an error message (the code will be 0)\n * - Object: arbitrary properties\n * - `MediaError` (native): used to populate a video.js `MediaError` object\n * - `MediaError` (video.js): will return itself if it's already a\n * video.js `MediaError` object.\n *\n * @see [MediaError Spec]{@link https://dev.w3.org/html5/spec-author-view/video.html#mediaerror}\n * @see [Encrypted MediaError Spec]{@link https://www.w3.org/TR/2013/WD-encrypted-media-20130510/#error-codes}\n *\n * @class MediaError\n */\n\n\nfunction MediaError(value) {\n // Allow redundant calls to this constructor to avoid having `instanceof`\n // checks peppered around the code.\n if (value instanceof MediaError) {\n return value;\n }\n\n if (typeof value === 'number') {\n this.code = value;\n } else if (typeof value === 'string') {\n // default code is zero, so this is a custom error\n this.message = value;\n } else if (isObject(value)) {\n // We assign the `code` property manually because native `MediaError` objects\n // do not expose it as an own/enumerable property of the object.\n if (typeof value.code === 'number') {\n this.code = value.code;\n }\n\n assign(this, value);\n }\n\n if (!this.message) {\n this.message = MediaError.defaultMessages[this.code] || '';\n }\n}\n/**\n * The error code that refers two one of the defined `MediaError` types\n *\n * @type {Number}\n */\n\n\nMediaError.prototype.code = 0;\n/**\n * An optional message that to show with the error. Message is not part of the HTML5\n * video spec but allows for more informative custom errors.\n *\n * @type {String}\n */\n\nMediaError.prototype.message = '';\n/**\n * An optional status code that can be set by plugins to allow even more detail about\n * the error. For example a plugin might provide a specific HTTP status code and an\n * error message for that code. Then when the plugin gets that error this class will\n * know how to display an error message for it. This allows a custom message to show\n * up on the `Player` error overlay.\n *\n * @type {Array}\n */\n\nMediaError.prototype.status = null;\n/**\n * Errors indexed by the W3C standard. The order **CANNOT CHANGE**! See the\n * specification listed under {@link MediaError} for more information.\n *\n * @enum {array}\n * @readonly\n * @property {string} 0 - MEDIA_ERR_CUSTOM\n * @property {string} 1 - MEDIA_ERR_ABORTED\n * @property {string} 2 - MEDIA_ERR_NETWORK\n * @property {string} 3 - MEDIA_ERR_DECODE\n * @property {string} 4 - MEDIA_ERR_SRC_NOT_SUPPORTED\n * @property {string} 5 - MEDIA_ERR_ENCRYPTED\n */\n\nMediaError.errorTypes = ['MEDIA_ERR_CUSTOM', 'MEDIA_ERR_ABORTED', 'MEDIA_ERR_NETWORK', 'MEDIA_ERR_DECODE', 'MEDIA_ERR_SRC_NOT_SUPPORTED', 'MEDIA_ERR_ENCRYPTED'];\n/**\n * The default `MediaError` messages based on the {@link MediaError.errorTypes}.\n *\n * @type {Array}\n * @constant\n */\n\nMediaError.defaultMessages = {\n 1: 'You aborted the media playback',\n 2: 'A network error caused the media download to fail part-way.',\n 3: 'The media playback was aborted due to a corruption problem or because the media used features your browser did not support.',\n 4: 'The media could not be loaded, either because the server or network failed or because the format is not supported.',\n 5: 'The media is encrypted and we do not have the keys to decrypt it.'\n}; // Add types as properties on MediaError\n// e.g. MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = 4;\n\nfor (var errNum = 0; errNum < MediaError.errorTypes.length; errNum++) {\n MediaError[MediaError.errorTypes[errNum]] = errNum; // values should be accessible on both the class and instance\n\n MediaError.prototype[MediaError.errorTypes[errNum]] = errNum;\n} // jsdocs for instance/static members added above\n\n/**\n * Returns whether an object is `Promise`-like (i.e. has a `then` method).\n *\n * @param {Object} value\n * An object that may or may not be `Promise`-like.\n *\n * @return {boolean}\n * Whether or not the object is `Promise`-like.\n */\n\n\nfunction isPromise(value) {\n return value !== undefined && value !== null && typeof value.then === 'function';\n}\n/**\n * Silence a Promise-like object.\n *\n * This is useful for avoiding non-harmful, but potentially confusing \"uncaught\n * play promise\" rejection error messages.\n *\n * @param {Object} value\n * An object that may or may not be `Promise`-like.\n */\n\n\nfunction silencePromise(value) {\n if (isPromise(value)) {\n value.then(null, function (e) {});\n }\n}\n/**\n * @file text-track-list-converter.js Utilities for capturing text track state and\n * re-creating tracks based on a capture.\n *\n * @module text-track-list-converter\n */\n\n/**\n * Examine a single {@link TextTrack} and return a JSON-compatible javascript object that\n * represents the {@link TextTrack}'s state.\n *\n * @param {TextTrack} track\n * The text track to query.\n *\n * @return {Object}\n * A serializable javascript representation of the TextTrack.\n * @private\n */\n\n\nvar trackToJson_ = function trackToJson_(track) {\n var ret = ['kind', 'label', 'language', 'id', 'inBandMetadataTrackDispatchType', 'mode', 'src'].reduce(function (acc, prop, i) {\n if (track[prop]) {\n acc[prop] = track[prop];\n }\n\n return acc;\n }, {\n cues: track.cues && Array.prototype.map.call(track.cues, function (cue) {\n return {\n startTime: cue.startTime,\n endTime: cue.endTime,\n text: cue.text,\n id: cue.id\n };\n })\n });\n return ret;\n};\n/**\n * Examine a {@link Tech} and return a JSON-compatible javascript array that represents the\n * state of all {@link TextTrack}s currently configured. The return array is compatible with\n * {@link text-track-list-converter:jsonToTextTracks}.\n *\n * @param {Tech} tech\n * The tech object to query\n *\n * @return {Array}\n * A serializable javascript representation of the {@link Tech}s\n * {@link TextTrackList}.\n */\n\n\nvar textTracksToJson = function textTracksToJson(tech) {\n var trackEls = tech.$$('track');\n var trackObjs = Array.prototype.map.call(trackEls, function (t) {\n return t.track;\n });\n var tracks = Array.prototype.map.call(trackEls, function (trackEl) {\n var json = trackToJson_(trackEl.track);\n\n if (trackEl.src) {\n json.src = trackEl.src;\n }\n\n return json;\n });\n return tracks.concat(Array.prototype.filter.call(tech.textTracks(), function (track) {\n return trackObjs.indexOf(track) === -1;\n }).map(trackToJson_));\n};\n/**\n * Create a set of remote {@link TextTrack}s on a {@link Tech} based on an array of javascript\n * object {@link TextTrack} representations.\n *\n * @param {Array} json\n * An array of `TextTrack` representation objects, like those that would be\n * produced by `textTracksToJson`.\n *\n * @param {Tech} tech\n * The `Tech` to create the `TextTrack`s on.\n */\n\n\nvar jsonToTextTracks = function jsonToTextTracks(json, tech) {\n json.forEach(function (track) {\n var addedTrack = tech.addRemoteTextTrack(track).track;\n\n if (!track.src && track.cues) {\n track.cues.forEach(function (cue) {\n return addedTrack.addCue(cue);\n });\n }\n });\n return tech.textTracks();\n};\n\nvar textTrackConverter = {\n textTracksToJson: textTracksToJson,\n jsonToTextTracks: jsonToTextTracks,\n trackToJson_: trackToJson_\n};\nvar MODAL_CLASS_NAME = 'vjs-modal-dialog';\n/**\n * The `ModalDialog` displays over the video and its controls, which blocks\n * interaction with the player until it is closed.\n *\n * Modal dialogs include a \"Close\" button and will close when that button\n * is activated - or when ESC is pressed anywhere.\n *\n * @extends Component\n */\n\nvar ModalDialog =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(ModalDialog, _Component);\n /**\n * Create an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {Mixed} [options.content=undefined]\n * Provide customized content for this modal.\n *\n * @param {string} [options.description]\n * A text description for the modal, primarily for accessibility.\n *\n * @param {boolean} [options.fillAlways=false]\n * Normally, modals are automatically filled only the first time\n * they open. This tells the modal to refresh its content\n * every time it opens.\n *\n * @param {string} [options.label]\n * A text label for the modal, primarily for accessibility.\n *\n * @param {boolean} [options.pauseOnOpen=true]\n * If `true`, playback will will be paused if playing when\n * the modal opens, and resumed when it closes.\n *\n * @param {boolean} [options.temporary=true]\n * If `true`, the modal can only be opened once; it will be\n * disposed as soon as it's closed.\n *\n * @param {boolean} [options.uncloseable=false]\n * If `true`, the user will not be able to close the modal\n * through the UI in the normal ways. Programmatic closing is\n * still possible.\n */\n\n\n function ModalDialog(player, options) {\n var _this;\n\n _this = _Component.call(this, player, options) || this;\n _this.opened_ = _this.hasBeenOpened_ = _this.hasBeenFilled_ = false;\n\n _this.closeable(!_this.options_.uncloseable);\n\n _this.content(_this.options_.content); // Make sure the contentEl is defined AFTER any children are initialized\n // because we only want the contents of the modal in the contentEl\n // (not the UI elements like the close button).\n\n\n _this.contentEl_ = createEl('div', {\n className: MODAL_CLASS_NAME + \"-content\"\n }, {\n role: 'document'\n });\n _this.descEl_ = createEl('p', {\n className: MODAL_CLASS_NAME + \"-description vjs-control-text\",\n id: _this.el().getAttribute('aria-describedby')\n });\n textContent(_this.descEl_, _this.description());\n\n _this.el_.appendChild(_this.descEl_);\n\n _this.el_.appendChild(_this.contentEl_);\n\n return _this;\n }\n /**\n * Create the `ModalDialog`'s DOM element\n *\n * @return {Element}\n * The DOM element that gets created.\n */\n\n\n var _proto = ModalDialog.prototype;\n\n _proto.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: this.buildCSSClass(),\n tabIndex: -1\n }, {\n 'aria-describedby': this.id() + \"_description\",\n 'aria-hidden': 'true',\n 'aria-label': this.label(),\n 'role': 'dialog'\n });\n };\n\n _proto.dispose = function dispose() {\n this.contentEl_ = null;\n this.descEl_ = null;\n this.previouslyActiveEl_ = null;\n\n _Component.prototype.dispose.call(this);\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n ;\n\n _proto.buildCSSClass = function buildCSSClass() {\n return MODAL_CLASS_NAME + \" vjs-hidden \" + _Component.prototype.buildCSSClass.call(this);\n }\n /**\n * Returns the label string for this modal. Primarily used for accessibility.\n *\n * @return {string}\n * the localized or raw label of this modal.\n */\n ;\n\n _proto.label = function label() {\n return this.localize(this.options_.label || 'Modal Window');\n }\n /**\n * Returns the description string for this modal. Primarily used for\n * accessibility.\n *\n * @return {string}\n * The localized or raw description of this modal.\n */\n ;\n\n _proto.description = function description() {\n var desc = this.options_.description || this.localize('This is a modal window.'); // Append a universal closeability message if the modal is closeable.\n\n if (this.closeable()) {\n desc += ' ' + this.localize('This modal can be closed by pressing the Escape key or activating the close button.');\n }\n\n return desc;\n }\n /**\n * Opens the modal.\n *\n * @fires ModalDialog#beforemodalopen\n * @fires ModalDialog#modalopen\n */\n ;\n\n _proto.open = function open() {\n if (!this.opened_) {\n var player = this.player();\n /**\n * Fired just before a `ModalDialog` is opened.\n *\n * @event ModalDialog#beforemodalopen\n * @type {EventTarget~Event}\n */\n\n this.trigger('beforemodalopen');\n this.opened_ = true; // Fill content if the modal has never opened before and\n // never been filled.\n\n if (this.options_.fillAlways || !this.hasBeenOpened_ && !this.hasBeenFilled_) {\n this.fill();\n } // If the player was playing, pause it and take note of its previously\n // playing state.\n\n\n this.wasPlaying_ = !player.paused();\n\n if (this.options_.pauseOnOpen && this.wasPlaying_) {\n player.pause();\n }\n\n this.on('keydown', this.handleKeyDown); // Hide controls and note if they were enabled.\n\n this.hadControls_ = player.controls();\n player.controls(false);\n this.show();\n this.conditionalFocus_();\n this.el().setAttribute('aria-hidden', 'false');\n /**\n * Fired just after a `ModalDialog` is opened.\n *\n * @event ModalDialog#modalopen\n * @type {EventTarget~Event}\n */\n\n this.trigger('modalopen');\n this.hasBeenOpened_ = true;\n }\n }\n /**\n * If the `ModalDialog` is currently open or closed.\n *\n * @param {boolean} [value]\n * If given, it will open (`true`) or close (`false`) the modal.\n *\n * @return {boolean}\n * the current open state of the modaldialog\n */\n ;\n\n _proto.opened = function opened(value) {\n if (typeof value === 'boolean') {\n this[value ? 'open' : 'close']();\n }\n\n return this.opened_;\n }\n /**\n * Closes the modal, does nothing if the `ModalDialog` is\n * not open.\n *\n * @fires ModalDialog#beforemodalclose\n * @fires ModalDialog#modalclose\n */\n ;\n\n _proto.close = function close() {\n if (!this.opened_) {\n return;\n }\n\n var player = this.player();\n /**\n * Fired just before a `ModalDialog` is closed.\n *\n * @event ModalDialog#beforemodalclose\n * @type {EventTarget~Event}\n */\n\n this.trigger('beforemodalclose');\n this.opened_ = false;\n\n if (this.wasPlaying_ && this.options_.pauseOnOpen) {\n player.play();\n }\n\n this.off('keydown', this.handleKeyDown);\n\n if (this.hadControls_) {\n player.controls(true);\n }\n\n this.hide();\n this.el().setAttribute('aria-hidden', 'true');\n /**\n * Fired just after a `ModalDialog` is closed.\n *\n * @event ModalDialog#modalclose\n * @type {EventTarget~Event}\n */\n\n this.trigger('modalclose');\n this.conditionalBlur_();\n\n if (this.options_.temporary) {\n this.dispose();\n }\n }\n /**\n * Check to see if the `ModalDialog` is closeable via the UI.\n *\n * @param {boolean} [value]\n * If given as a boolean, it will set the `closeable` option.\n *\n * @return {boolean}\n * Returns the final value of the closable option.\n */\n ;\n\n _proto.closeable = function closeable(value) {\n if (typeof value === 'boolean') {\n var closeable = this.closeable_ = !!value;\n var close = this.getChild('closeButton'); // If this is being made closeable and has no close button, add one.\n\n if (closeable && !close) {\n // The close button should be a child of the modal - not its\n // content element, so temporarily change the content element.\n var temp = this.contentEl_;\n this.contentEl_ = this.el_;\n close = this.addChild('closeButton', {\n controlText: 'Close Modal Dialog'\n });\n this.contentEl_ = temp;\n this.on(close, 'close', this.close);\n } // If this is being made uncloseable and has a close button, remove it.\n\n\n if (!closeable && close) {\n this.off(close, 'close', this.close);\n this.removeChild(close);\n close.dispose();\n }\n }\n\n return this.closeable_;\n }\n /**\n * Fill the modal's content element with the modal's \"content\" option.\n * The content element will be emptied before this change takes place.\n */\n ;\n\n _proto.fill = function fill() {\n this.fillWith(this.content());\n }\n /**\n * Fill the modal's content element with arbitrary content.\n * The content element will be emptied before this change takes place.\n *\n * @fires ModalDialog#beforemodalfill\n * @fires ModalDialog#modalfill\n *\n * @param {Mixed} [content]\n * The same rules apply to this as apply to the `content` option.\n */\n ;\n\n _proto.fillWith = function fillWith(content) {\n var contentEl = this.contentEl();\n var parentEl = contentEl.parentNode;\n var nextSiblingEl = contentEl.nextSibling;\n /**\n * Fired just before a `ModalDialog` is filled with content.\n *\n * @event ModalDialog#beforemodalfill\n * @type {EventTarget~Event}\n */\n\n this.trigger('beforemodalfill');\n this.hasBeenFilled_ = true; // Detach the content element from the DOM before performing\n // manipulation to avoid modifying the live DOM multiple times.\n\n parentEl.removeChild(contentEl);\n this.empty();\n insertContent(contentEl, content);\n /**\n * Fired just after a `ModalDialog` is filled with content.\n *\n * @event ModalDialog#modalfill\n * @type {EventTarget~Event}\n */\n\n this.trigger('modalfill'); // Re-inject the re-filled content element.\n\n if (nextSiblingEl) {\n parentEl.insertBefore(contentEl, nextSiblingEl);\n } else {\n parentEl.appendChild(contentEl);\n } // make sure that the close button is last in the dialog DOM\n\n\n var closeButton = this.getChild('closeButton');\n\n if (closeButton) {\n parentEl.appendChild(closeButton.el_);\n }\n }\n /**\n * Empties the content element. This happens anytime the modal is filled.\n *\n * @fires ModalDialog#beforemodalempty\n * @fires ModalDialog#modalempty\n */\n ;\n\n _proto.empty = function empty() {\n /**\n * Fired just before a `ModalDialog` is emptied.\n *\n * @event ModalDialog#beforemodalempty\n * @type {EventTarget~Event}\n */\n this.trigger('beforemodalempty');\n emptyEl(this.contentEl());\n /**\n * Fired just after a `ModalDialog` is emptied.\n *\n * @event ModalDialog#modalempty\n * @type {EventTarget~Event}\n */\n\n this.trigger('modalempty');\n }\n /**\n * Gets or sets the modal content, which gets normalized before being\n * rendered into the DOM.\n *\n * This does not update the DOM or fill the modal, but it is called during\n * that process.\n *\n * @param {Mixed} [value]\n * If defined, sets the internal content value to be used on the\n * next call(s) to `fill`. This value is normalized before being\n * inserted. To \"clear\" the internal content value, pass `null`.\n *\n * @return {Mixed}\n * The current content of the modal dialog\n */\n ;\n\n _proto.content = function content(value) {\n if (typeof value !== 'undefined') {\n this.content_ = value;\n }\n\n return this.content_;\n }\n /**\n * conditionally focus the modal dialog if focus was previously on the player.\n *\n * @private\n */\n ;\n\n _proto.conditionalFocus_ = function conditionalFocus_() {\n var activeEl = document.activeElement;\n var playerEl = this.player_.el_;\n this.previouslyActiveEl_ = null;\n\n if (playerEl.contains(activeEl) || playerEl === activeEl) {\n this.previouslyActiveEl_ = activeEl;\n this.focus();\n }\n }\n /**\n * conditionally blur the element and refocus the last focused element\n *\n * @private\n */\n ;\n\n _proto.conditionalBlur_ = function conditionalBlur_() {\n if (this.previouslyActiveEl_) {\n this.previouslyActiveEl_.focus();\n this.previouslyActiveEl_ = null;\n }\n }\n /**\n * Keydown handler. Attached when modal is focused.\n *\n * @listens keydown\n */\n ;\n\n _proto.handleKeyDown = function handleKeyDown(event) {\n // Do not allow keydowns to reach out of the modal dialog.\n event.stopPropagation();\n\n if (keycode.isEventKey(event, 'Escape') && this.closeable()) {\n event.preventDefault();\n this.close();\n return;\n } // exit early if it isn't a tab key\n\n\n if (!keycode.isEventKey(event, 'Tab')) {\n return;\n }\n\n var focusableEls = this.focusableEls_();\n var activeEl = this.el_.querySelector(':focus');\n var focusIndex;\n\n for (var i = 0; i < focusableEls.length; i++) {\n if (activeEl === focusableEls[i]) {\n focusIndex = i;\n break;\n }\n }\n\n if (document.activeElement === this.el_) {\n focusIndex = 0;\n }\n\n if (event.shiftKey && focusIndex === 0) {\n focusableEls[focusableEls.length - 1].focus();\n event.preventDefault();\n } else if (!event.shiftKey && focusIndex === focusableEls.length - 1) {\n focusableEls[0].focus();\n event.preventDefault();\n }\n }\n /**\n * get all focusable elements\n *\n * @private\n */\n ;\n\n _proto.focusableEls_ = function focusableEls_() {\n var allChildren = this.el_.querySelectorAll('*');\n return Array.prototype.filter.call(allChildren, function (child) {\n return (child instanceof window$1.HTMLAnchorElement || child instanceof window$1.HTMLAreaElement) && child.hasAttribute('href') || (child instanceof window$1.HTMLInputElement || child instanceof window$1.HTMLSelectElement || child instanceof window$1.HTMLTextAreaElement || child instanceof window$1.HTMLButtonElement) && !child.hasAttribute('disabled') || child instanceof window$1.HTMLIFrameElement || child instanceof window$1.HTMLObjectElement || child instanceof window$1.HTMLEmbedElement || child.hasAttribute('tabindex') && child.getAttribute('tabindex') !== -1 || child.hasAttribute('contenteditable');\n });\n };\n\n return ModalDialog;\n}(Component);\n/**\n * Default options for `ModalDialog` default options.\n *\n * @type {Object}\n * @private\n */\n\n\nModalDialog.prototype.options_ = {\n pauseOnOpen: true,\n temporary: true\n};\nComponent.registerComponent('ModalDialog', ModalDialog);\n/**\n * Common functionaliy between {@link TextTrackList}, {@link AudioTrackList}, and\n * {@link VideoTrackList}\n *\n * @extends EventTarget\n */\n\nvar TrackList =\n/*#__PURE__*/\nfunction (_EventTarget) {\n _inheritsLoose(TrackList, _EventTarget);\n /**\n * Create an instance of this class\n *\n * @param {Track[]} tracks\n * A list of tracks to initialize the list with.\n *\n * @abstract\n */\n\n\n function TrackList(tracks) {\n var _this;\n\n if (tracks === void 0) {\n tracks = [];\n }\n\n _this = _EventTarget.call(this) || this;\n _this.tracks_ = [];\n /**\n * @memberof TrackList\n * @member {number} length\n * The current number of `Track`s in the this Trackist.\n * @instance\n */\n\n Object.defineProperty(_assertThisInitialized(_this), 'length', {\n get: function get() {\n return this.tracks_.length;\n }\n });\n\n for (var i = 0; i < tracks.length; i++) {\n _this.addTrack(tracks[i]);\n }\n\n return _this;\n }\n /**\n * Add a {@link Track} to the `TrackList`\n *\n * @param {Track} track\n * The audio, video, or text track to add to the list.\n *\n * @fires TrackList#addtrack\n */\n\n\n var _proto = TrackList.prototype;\n\n _proto.addTrack = function addTrack(track) {\n var index = this.tracks_.length;\n\n if (!('' + index in this)) {\n Object.defineProperty(this, index, {\n get: function get() {\n return this.tracks_[index];\n }\n });\n } // Do not add duplicate tracks\n\n\n if (this.tracks_.indexOf(track) === -1) {\n this.tracks_.push(track);\n /**\n * Triggered when a track is added to a track list.\n *\n * @event TrackList#addtrack\n * @type {EventTarget~Event}\n * @property {Track} track\n * A reference to track that was added.\n */\n\n this.trigger({\n track: track,\n type: 'addtrack',\n target: this\n });\n }\n }\n /**\n * Remove a {@link Track} from the `TrackList`\n *\n * @param {Track} rtrack\n * The audio, video, or text track to remove from the list.\n *\n * @fires TrackList#removetrack\n */\n ;\n\n _proto.removeTrack = function removeTrack(rtrack) {\n var track;\n\n for (var i = 0, l = this.length; i < l; i++) {\n if (this[i] === rtrack) {\n track = this[i];\n\n if (track.off) {\n track.off();\n }\n\n this.tracks_.splice(i, 1);\n break;\n }\n }\n\n if (!track) {\n return;\n }\n /**\n * Triggered when a track is removed from track list.\n *\n * @event TrackList#removetrack\n * @type {EventTarget~Event}\n * @property {Track} track\n * A reference to track that was removed.\n */\n\n\n this.trigger({\n track: track,\n type: 'removetrack',\n target: this\n });\n }\n /**\n * Get a Track from the TrackList by a tracks id\n *\n * @param {string} id - the id of the track to get\n * @method getTrackById\n * @return {Track}\n * @private\n */\n ;\n\n _proto.getTrackById = function getTrackById(id) {\n var result = null;\n\n for (var i = 0, l = this.length; i < l; i++) {\n var track = this[i];\n\n if (track.id === id) {\n result = track;\n break;\n }\n }\n\n return result;\n };\n\n return TrackList;\n}(EventTarget);\n/**\n * Triggered when a different track is selected/enabled.\n *\n * @event TrackList#change\n * @type {EventTarget~Event}\n */\n\n/**\n * Events that can be called with on + eventName. See {@link EventHandler}.\n *\n * @property {Object} TrackList#allowedEvents_\n * @private\n */\n\n\nTrackList.prototype.allowedEvents_ = {\n change: 'change',\n addtrack: 'addtrack',\n removetrack: 'removetrack'\n}; // emulate attribute EventHandler support to allow for feature detection\n\nfor (var event in TrackList.prototype.allowedEvents_) {\n TrackList.prototype['on' + event] = null;\n}\n/**\n * Anywhere we call this function we diverge from the spec\n * as we only support one enabled audiotrack at a time\n *\n * @param {AudioTrackList} list\n * list to work on\n *\n * @param {AudioTrack} track\n * The track to skip\n *\n * @private\n */\n\n\nvar disableOthers = function disableOthers(list, track) {\n for (var i = 0; i < list.length; i++) {\n if (!Object.keys(list[i]).length || track.id === list[i].id) {\n continue;\n } // another audio track is enabled, disable it\n\n\n list[i].enabled = false;\n }\n};\n/**\n * The current list of {@link AudioTrack} for a media file.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotracklist}\n * @extends TrackList\n */\n\n\nvar AudioTrackList =\n/*#__PURE__*/\nfunction (_TrackList) {\n _inheritsLoose(AudioTrackList, _TrackList);\n /**\n * Create an instance of this class.\n *\n * @param {AudioTrack[]} [tracks=[]]\n * A list of `AudioTrack` to instantiate the list with.\n */\n\n\n function AudioTrackList(tracks) {\n var _this;\n\n if (tracks === void 0) {\n tracks = [];\n } // make sure only 1 track is enabled\n // sorted from last index to first index\n\n\n for (var i = tracks.length - 1; i >= 0; i--) {\n if (tracks[i].enabled) {\n disableOthers(tracks, tracks[i]);\n break;\n }\n }\n\n _this = _TrackList.call(this, tracks) || this;\n _this.changing_ = false;\n return _this;\n }\n /**\n * Add an {@link AudioTrack} to the `AudioTrackList`.\n *\n * @param {AudioTrack} track\n * The AudioTrack to add to the list\n *\n * @fires TrackList#addtrack\n */\n\n\n var _proto = AudioTrackList.prototype;\n\n _proto.addTrack = function addTrack(track) {\n var _this2 = this;\n\n if (track.enabled) {\n disableOthers(this, track);\n }\n\n _TrackList.prototype.addTrack.call(this, track); // native tracks don't have this\n\n\n if (!track.addEventListener) {\n return;\n }\n\n track.enabledChange_ = function () {\n // when we are disabling other tracks (since we don't support\n // more than one track at a time) we will set changing_\n // to true so that we don't trigger additional change events\n if (_this2.changing_) {\n return;\n }\n\n _this2.changing_ = true;\n disableOthers(_this2, track);\n _this2.changing_ = false;\n\n _this2.trigger('change');\n };\n /**\n * @listens AudioTrack#enabledchange\n * @fires TrackList#change\n */\n\n\n track.addEventListener('enabledchange', track.enabledChange_);\n };\n\n _proto.removeTrack = function removeTrack(rtrack) {\n _TrackList.prototype.removeTrack.call(this, rtrack);\n\n if (rtrack.removeEventListener && rtrack.enabledChange_) {\n rtrack.removeEventListener('enabledchange', rtrack.enabledChange_);\n rtrack.enabledChange_ = null;\n }\n };\n\n return AudioTrackList;\n}(TrackList);\n/**\n * Un-select all other {@link VideoTrack}s that are selected.\n *\n * @param {VideoTrackList} list\n * list to work on\n *\n * @param {VideoTrack} track\n * The track to skip\n *\n * @private\n */\n\n\nvar disableOthers$1 = function disableOthers(list, track) {\n for (var i = 0; i < list.length; i++) {\n if (!Object.keys(list[i]).length || track.id === list[i].id) {\n continue;\n } // another video track is enabled, disable it\n\n\n list[i].selected = false;\n }\n};\n/**\n * The current list of {@link VideoTrack} for a video.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#videotracklist}\n * @extends TrackList\n */\n\n\nvar VideoTrackList =\n/*#__PURE__*/\nfunction (_TrackList) {\n _inheritsLoose(VideoTrackList, _TrackList);\n /**\n * Create an instance of this class.\n *\n * @param {VideoTrack[]} [tracks=[]]\n * A list of `VideoTrack` to instantiate the list with.\n */\n\n\n function VideoTrackList(tracks) {\n var _this;\n\n if (tracks === void 0) {\n tracks = [];\n } // make sure only 1 track is enabled\n // sorted from last index to first index\n\n\n for (var i = tracks.length - 1; i >= 0; i--) {\n if (tracks[i].selected) {\n disableOthers$1(tracks, tracks[i]);\n break;\n }\n }\n\n _this = _TrackList.call(this, tracks) || this;\n _this.changing_ = false;\n /**\n * @member {number} VideoTrackList#selectedIndex\n * The current index of the selected {@link VideoTrack`}.\n */\n\n Object.defineProperty(_assertThisInitialized(_this), 'selectedIndex', {\n get: function get() {\n for (var _i = 0; _i < this.length; _i++) {\n if (this[_i].selected) {\n return _i;\n }\n }\n\n return -1;\n },\n set: function set() {}\n });\n return _this;\n }\n /**\n * Add a {@link VideoTrack} to the `VideoTrackList`.\n *\n * @param {VideoTrack} track\n * The VideoTrack to add to the list\n *\n * @fires TrackList#addtrack\n */\n\n\n var _proto = VideoTrackList.prototype;\n\n _proto.addTrack = function addTrack(track) {\n var _this2 = this;\n\n if (track.selected) {\n disableOthers$1(this, track);\n }\n\n _TrackList.prototype.addTrack.call(this, track); // native tracks don't have this\n\n\n if (!track.addEventListener) {\n return;\n }\n\n track.selectedChange_ = function () {\n if (_this2.changing_) {\n return;\n }\n\n _this2.changing_ = true;\n disableOthers$1(_this2, track);\n _this2.changing_ = false;\n\n _this2.trigger('change');\n };\n /**\n * @listens VideoTrack#selectedchange\n * @fires TrackList#change\n */\n\n\n track.addEventListener('selectedchange', track.selectedChange_);\n };\n\n _proto.removeTrack = function removeTrack(rtrack) {\n _TrackList.prototype.removeTrack.call(this, rtrack);\n\n if (rtrack.removeEventListener && rtrack.selectedChange_) {\n rtrack.removeEventListener('selectedchange', rtrack.selectedChange_);\n rtrack.selectedChange_ = null;\n }\n };\n\n return VideoTrackList;\n}(TrackList);\n/**\n * The current list of {@link TextTrack} for a media file.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttracklist}\n * @extends TrackList\n */\n\n\nvar TextTrackList =\n/*#__PURE__*/\nfunction (_TrackList) {\n _inheritsLoose(TextTrackList, _TrackList);\n\n function TextTrackList() {\n return _TrackList.apply(this, arguments) || this;\n }\n\n var _proto = TextTrackList.prototype;\n /**\n * Add a {@link TextTrack} to the `TextTrackList`\n *\n * @param {TextTrack} track\n * The text track to add to the list.\n *\n * @fires TrackList#addtrack\n */\n\n _proto.addTrack = function addTrack(track) {\n var _this = this;\n\n _TrackList.prototype.addTrack.call(this, track);\n\n if (!this.queueChange_) {\n this.queueChange_ = function () {\n return _this.queueTrigger('change');\n };\n }\n\n if (!this.triggerSelectedlanguagechange) {\n this.triggerSelectedlanguagechange_ = function () {\n return _this.trigger('selectedlanguagechange');\n };\n }\n /**\n * @listens TextTrack#modechange\n * @fires TrackList#change\n */\n\n\n track.addEventListener('modechange', this.queueChange_);\n var nonLanguageTextTrackKind = ['metadata', 'chapters'];\n\n if (nonLanguageTextTrackKind.indexOf(track.kind) === -1) {\n track.addEventListener('modechange', this.triggerSelectedlanguagechange_);\n }\n };\n\n _proto.removeTrack = function removeTrack(rtrack) {\n _TrackList.prototype.removeTrack.call(this, rtrack); // manually remove the event handlers we added\n\n\n if (rtrack.removeEventListener) {\n if (this.queueChange_) {\n rtrack.removeEventListener('modechange', this.queueChange_);\n }\n\n if (this.selectedlanguagechange_) {\n rtrack.removeEventListener('modechange', this.triggerSelectedlanguagechange_);\n }\n }\n };\n\n return TextTrackList;\n}(TrackList);\n/**\n * @file html-track-element-list.js\n */\n\n/**\n * The current list of {@link HtmlTrackElement}s.\n */\n\n\nvar HtmlTrackElementList =\n/*#__PURE__*/\nfunction () {\n /**\n * Create an instance of this class.\n *\n * @param {HtmlTrackElement[]} [tracks=[]]\n * A list of `HtmlTrackElement` to instantiate the list with.\n */\n function HtmlTrackElementList(trackElements) {\n if (trackElements === void 0) {\n trackElements = [];\n }\n\n this.trackElements_ = [];\n /**\n * @memberof HtmlTrackElementList\n * @member {number} length\n * The current number of `Track`s in the this Trackist.\n * @instance\n */\n\n Object.defineProperty(this, 'length', {\n get: function get() {\n return this.trackElements_.length;\n }\n });\n\n for (var i = 0, length = trackElements.length; i < length; i++) {\n this.addTrackElement_(trackElements[i]);\n }\n }\n /**\n * Add an {@link HtmlTrackElement} to the `HtmlTrackElementList`\n *\n * @param {HtmlTrackElement} trackElement\n * The track element to add to the list.\n *\n * @private\n */\n\n\n var _proto = HtmlTrackElementList.prototype;\n\n _proto.addTrackElement_ = function addTrackElement_(trackElement) {\n var index = this.trackElements_.length;\n\n if (!('' + index in this)) {\n Object.defineProperty(this, index, {\n get: function get() {\n return this.trackElements_[index];\n }\n });\n } // Do not add duplicate elements\n\n\n if (this.trackElements_.indexOf(trackElement) === -1) {\n this.trackElements_.push(trackElement);\n }\n }\n /**\n * Get an {@link HtmlTrackElement} from the `HtmlTrackElementList` given an\n * {@link TextTrack}.\n *\n * @param {TextTrack} track\n * The track associated with a track element.\n *\n * @return {HtmlTrackElement|undefined}\n * The track element that was found or undefined.\n *\n * @private\n */\n ;\n\n _proto.getTrackElementByTrack_ = function getTrackElementByTrack_(track) {\n var trackElement_;\n\n for (var i = 0, length = this.trackElements_.length; i < length; i++) {\n if (track === this.trackElements_[i].track) {\n trackElement_ = this.trackElements_[i];\n break;\n }\n }\n\n return trackElement_;\n }\n /**\n * Remove a {@link HtmlTrackElement} from the `HtmlTrackElementList`\n *\n * @param {HtmlTrackElement} trackElement\n * The track element to remove from the list.\n *\n * @private\n */\n ;\n\n _proto.removeTrackElement_ = function removeTrackElement_(trackElement) {\n for (var i = 0, length = this.trackElements_.length; i < length; i++) {\n if (trackElement === this.trackElements_[i]) {\n if (this.trackElements_[i].track && typeof this.trackElements_[i].track.off === 'function') {\n this.trackElements_[i].track.off();\n }\n\n if (typeof this.trackElements_[i].off === 'function') {\n this.trackElements_[i].off();\n }\n\n this.trackElements_.splice(i, 1);\n break;\n }\n }\n };\n\n return HtmlTrackElementList;\n}();\n/**\n * @file text-track-cue-list.js\n */\n\n/**\n * @typedef {Object} TextTrackCueList~TextTrackCue\n *\n * @property {string} id\n * The unique id for this text track cue\n *\n * @property {number} startTime\n * The start time for this text track cue\n *\n * @property {number} endTime\n * The end time for this text track cue\n *\n * @property {boolean} pauseOnExit\n * Pause when the end time is reached if true.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcue}\n */\n\n/**\n * A List of TextTrackCues.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcuelist}\n */\n\n\nvar TextTrackCueList =\n/*#__PURE__*/\nfunction () {\n /**\n * Create an instance of this class..\n *\n * @param {Array} cues\n * A list of cues to be initialized with\n */\n function TextTrackCueList(cues) {\n TextTrackCueList.prototype.setCues_.call(this, cues);\n /**\n * @memberof TextTrackCueList\n * @member {number} length\n * The current number of `TextTrackCue`s in the TextTrackCueList.\n * @instance\n */\n\n Object.defineProperty(this, 'length', {\n get: function get() {\n return this.length_;\n }\n });\n }\n /**\n * A setter for cues in this list. Creates getters\n * an an index for the cues.\n *\n * @param {Array} cues\n * An array of cues to set\n *\n * @private\n */\n\n\n var _proto = TextTrackCueList.prototype;\n\n _proto.setCues_ = function setCues_(cues) {\n var oldLength = this.length || 0;\n var i = 0;\n var l = cues.length;\n this.cues_ = cues;\n this.length_ = cues.length;\n\n var defineProp = function defineProp(index) {\n if (!('' + index in this)) {\n Object.defineProperty(this, '' + index, {\n get: function get() {\n return this.cues_[index];\n }\n });\n }\n };\n\n if (oldLength < l) {\n i = oldLength;\n\n for (; i < l; i++) {\n defineProp.call(this, i);\n }\n }\n }\n /**\n * Get a `TextTrackCue` that is currently in the `TextTrackCueList` by id.\n *\n * @param {string} id\n * The id of the cue that should be searched for.\n *\n * @return {TextTrackCueList~TextTrackCue|null}\n * A single cue or null if none was found.\n */\n ;\n\n _proto.getCueById = function getCueById(id) {\n var result = null;\n\n for (var i = 0, l = this.length; i < l; i++) {\n var cue = this[i];\n\n if (cue.id === id) {\n result = cue;\n break;\n }\n }\n\n return result;\n };\n\n return TextTrackCueList;\n}();\n/**\n * @file track-kinds.js\n */\n\n/**\n * All possible `VideoTrackKind`s\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-videotrack-kind\n * @typedef VideoTrack~Kind\n * @enum\n */\n\n\nvar VideoTrackKind = {\n alternative: 'alternative',\n captions: 'captions',\n main: 'main',\n sign: 'sign',\n subtitles: 'subtitles',\n commentary: 'commentary'\n};\n/**\n * All possible `AudioTrackKind`s\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-audiotrack-kind\n * @typedef AudioTrack~Kind\n * @enum\n */\n\nvar AudioTrackKind = {\n 'alternative': 'alternative',\n 'descriptions': 'descriptions',\n 'main': 'main',\n 'main-desc': 'main-desc',\n 'translation': 'translation',\n 'commentary': 'commentary'\n};\n/**\n * All possible `TextTrackKind`s\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-texttrack-kind\n * @typedef TextTrack~Kind\n * @enum\n */\n\nvar TextTrackKind = {\n subtitles: 'subtitles',\n captions: 'captions',\n descriptions: 'descriptions',\n chapters: 'chapters',\n metadata: 'metadata'\n};\n/**\n * All possible `TextTrackMode`s\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackmode\n * @typedef TextTrack~Mode\n * @enum\n */\n\nvar TextTrackMode = {\n disabled: 'disabled',\n hidden: 'hidden',\n showing: 'showing'\n};\n/**\n * A Track class that contains all of the common functionality for {@link AudioTrack},\n * {@link VideoTrack}, and {@link TextTrack}.\n *\n * > Note: This class should not be used directly\n *\n * @see {@link https://html.spec.whatwg.org/multipage/embedded-content.html}\n * @extends EventTarget\n * @abstract\n */\n\nvar Track =\n/*#__PURE__*/\nfunction (_EventTarget) {\n _inheritsLoose(Track, _EventTarget);\n /**\n * Create an instance of this class.\n *\n * @param {Object} [options={}]\n * Object of option names and values\n *\n * @param {string} [options.kind='']\n * A valid kind for the track type you are creating.\n *\n * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n * A unique id for this AudioTrack.\n *\n * @param {string} [options.label='']\n * The menu label for this track.\n *\n * @param {string} [options.language='']\n * A valid two character language code.\n *\n * @abstract\n */\n\n\n function Track(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _EventTarget.call(this) || this;\n var trackProps = {\n id: options.id || 'vjs_track_' + newGUID(),\n kind: options.kind || '',\n label: options.label || '',\n language: options.language || ''\n };\n /**\n * @memberof Track\n * @member {string} id\n * The id of this track. Cannot be changed after creation.\n * @instance\n *\n * @readonly\n */\n\n /**\n * @memberof Track\n * @member {string} kind\n * The kind of track that this is. Cannot be changed after creation.\n * @instance\n *\n * @readonly\n */\n\n /**\n * @memberof Track\n * @member {string} label\n * The label of this track. Cannot be changed after creation.\n * @instance\n *\n * @readonly\n */\n\n /**\n * @memberof Track\n * @member {string} language\n * The two letter language code for this track. Cannot be changed after\n * creation.\n * @instance\n *\n * @readonly\n */\n\n var _loop = function _loop(key) {\n Object.defineProperty(_assertThisInitialized(_this), key, {\n get: function get() {\n return trackProps[key];\n },\n set: function set() {}\n });\n };\n\n for (var key in trackProps) {\n _loop(key);\n }\n\n return _this;\n }\n\n return Track;\n}(EventTarget);\n/**\n * @file url.js\n * @module url\n */\n\n/**\n * @typedef {Object} url:URLObject\n *\n * @property {string} protocol\n * The protocol of the url that was parsed.\n *\n * @property {string} hostname\n * The hostname of the url that was parsed.\n *\n * @property {string} port\n * The port of the url that was parsed.\n *\n * @property {string} pathname\n * The pathname of the url that was parsed.\n *\n * @property {string} search\n * The search query of the url that was parsed.\n *\n * @property {string} hash\n * The hash of the url that was parsed.\n *\n * @property {string} host\n * The host of the url that was parsed.\n */\n\n/**\n * Resolve and parse the elements of a URL.\n *\n * @function\n * @param {String} url\n * The url to parse\n *\n * @return {url:URLObject}\n * An object of url details\n */\n\n\nvar parseUrl = function parseUrl(url) {\n var props = ['protocol', 'hostname', 'port', 'pathname', 'search', 'hash', 'host']; // add the url to an anchor and let the browser parse the URL\n\n var a = document.createElement('a');\n a.href = url; // IE8 (and 9?) Fix\n // ie8 doesn't parse the URL correctly until the anchor is actually\n // added to the body, and an innerHTML is needed to trigger the parsing\n\n var addToBody = a.host === '' && a.protocol !== 'file:';\n var div;\n\n if (addToBody) {\n div = document.createElement('div');\n div.innerHTML = \"<a href=\\\"\" + url + \"\\\"></a>\";\n a = div.firstChild; // prevent the div from affecting layout\n\n div.setAttribute('style', 'display:none; position:absolute;');\n document.body.appendChild(div);\n } // Copy the specific URL properties to a new object\n // This is also needed for IE8 because the anchor loses its\n // properties when it's removed from the dom\n\n\n var details = {};\n\n for (var i = 0; i < props.length; i++) {\n details[props[i]] = a[props[i]];\n } // IE9 adds the port to the host property unlike everyone else. If\n // a port identifier is added for standard ports, strip it.\n\n\n if (details.protocol === 'http:') {\n details.host = details.host.replace(/:80$/, '');\n }\n\n if (details.protocol === 'https:') {\n details.host = details.host.replace(/:443$/, '');\n }\n\n if (!details.protocol) {\n details.protocol = window$1.location.protocol;\n }\n\n if (addToBody) {\n document.body.removeChild(div);\n }\n\n return details;\n};\n/**\n * Get absolute version of relative URL. Used to tell Flash the correct URL.\n *\n * @function\n * @param {string} url\n * URL to make absolute\n *\n * @return {string}\n * Absolute URL\n *\n * @see http://stackoverflow.com/questions/470832/getting-an-absolute-url-from-a-relative-one-ie6-issue\n */\n\n\nvar getAbsoluteURL = function getAbsoluteURL(url) {\n // Check if absolute URL\n if (!url.match(/^https?:\\/\\//)) {\n // Convert to absolute URL. Flash hosted off-site needs an absolute URL.\n var div = document.createElement('div');\n div.innerHTML = \"<a href=\\\"\" + url + \"\\\">x</a>\";\n url = div.firstChild.href;\n }\n\n return url;\n};\n/**\n * Returns the extension of the passed file name. It will return an empty string\n * if passed an invalid path.\n *\n * @function\n * @param {string} path\n * The fileName path like '/path/to/file.mp4'\n *\n * @return {string}\n * The extension in lower case or an empty string if no\n * extension could be found.\n */\n\n\nvar getFileExtension = function getFileExtension(path) {\n if (typeof path === 'string') {\n var splitPathRe = /^(\\/?)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?)(\\.([^\\.\\/\\?]+)))(?:[\\/]*|[\\?].*)$/;\n var pathParts = splitPathRe.exec(path);\n\n if (pathParts) {\n return pathParts.pop().toLowerCase();\n }\n }\n\n return '';\n};\n/**\n * Returns whether the url passed is a cross domain request or not.\n *\n * @function\n * @param {string} url\n * The url to check.\n *\n * @return {boolean}\n * Whether it is a cross domain request or not.\n */\n\n\nvar isCrossOrigin = function isCrossOrigin(url) {\n var winLoc = window$1.location;\n var urlInfo = parseUrl(url); // IE8 protocol relative urls will return ':' for protocol\n\n var srcProtocol = urlInfo.protocol === ':' ? winLoc.protocol : urlInfo.protocol; // Check if url is for another domain/origin\n // IE8 doesn't know location.origin, so we won't rely on it here\n\n var crossOrigin = srcProtocol + urlInfo.host !== winLoc.protocol + winLoc.host;\n return crossOrigin;\n};\n\nvar Url =\n/*#__PURE__*/\nObject.freeze({\n parseUrl: parseUrl,\n getAbsoluteURL: getAbsoluteURL,\n getFileExtension: getFileExtension,\n isCrossOrigin: isCrossOrigin\n});\n/**\n * Takes a webvtt file contents and parses it into cues\n *\n * @param {string} srcContent\n * webVTT file contents\n *\n * @param {TextTrack} track\n * TextTrack to add cues to. Cues come from the srcContent.\n *\n * @private\n */\n\nvar parseCues = function parseCues(srcContent, track) {\n var parser = new window$1.WebVTT.Parser(window$1, window$1.vttjs, window$1.WebVTT.StringDecoder());\n var errors = [];\n\n parser.oncue = function (cue) {\n track.addCue(cue);\n };\n\n parser.onparsingerror = function (error) {\n errors.push(error);\n };\n\n parser.onflush = function () {\n track.trigger({\n type: 'loadeddata',\n target: track\n });\n };\n\n parser.parse(srcContent);\n\n if (errors.length > 0) {\n if (window$1.console && window$1.console.groupCollapsed) {\n window$1.console.groupCollapsed(\"Text Track parsing errors for \" + track.src);\n }\n\n errors.forEach(function (error) {\n return log.error(error);\n });\n\n if (window$1.console && window$1.console.groupEnd) {\n window$1.console.groupEnd();\n }\n }\n\n parser.flush();\n};\n/**\n * Load a `TextTrack` from a specified url.\n *\n * @param {string} src\n * Url to load track from.\n *\n * @param {TextTrack} track\n * Track to add cues to. Comes from the content at the end of `url`.\n *\n * @private\n */\n\n\nvar loadTrack = function loadTrack(src, track) {\n var opts = {\n uri: src\n };\n var crossOrigin = isCrossOrigin(src);\n\n if (crossOrigin) {\n opts.cors = crossOrigin;\n }\n\n XHR(opts, bind(this, function (err, response, responseBody) {\n if (err) {\n return log.error(err, response);\n }\n\n track.loaded_ = true; // Make sure that vttjs has loaded, otherwise, wait till it finished loading\n // NOTE: this is only used for the alt/video.novtt.js build\n\n if (typeof window$1.WebVTT !== 'function') {\n if (track.tech_) {\n // to prevent use before define eslint error, we define loadHandler\n // as a let here\n track.tech_.any(['vttjsloaded', 'vttjserror'], function (event) {\n if (event.type === 'vttjserror') {\n log.error(\"vttjs failed to load, stopping trying to process \" + track.src);\n return;\n }\n\n return parseCues(responseBody, track);\n });\n }\n } else {\n parseCues(responseBody, track);\n }\n }));\n};\n/**\n * A representation of a single `TextTrack`.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrack}\n * @extends Track\n */\n\n\nvar TextTrack =\n/*#__PURE__*/\nfunction (_Track) {\n _inheritsLoose(TextTrack, _Track);\n /**\n * Create an instance of this class.\n *\n * @param {Object} options={}\n * Object of option names and values\n *\n * @param {Tech} options.tech\n * A reference to the tech that owns this TextTrack.\n *\n * @param {TextTrack~Kind} [options.kind='subtitles']\n * A valid text track kind.\n *\n * @param {TextTrack~Mode} [options.mode='disabled']\n * A valid text track mode.\n *\n * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n * A unique id for this TextTrack.\n *\n * @param {string} [options.label='']\n * The menu label for this track.\n *\n * @param {string} [options.language='']\n * A valid two character language code.\n *\n * @param {string} [options.srclang='']\n * A valid two character language code. An alternative, but deprioritized\n * version of `options.language`\n *\n * @param {string} [options.src]\n * A url to TextTrack cues.\n *\n * @param {boolean} [options.default]\n * If this track should default to on or off.\n */\n\n\n function TextTrack(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n if (!options.tech) {\n throw new Error('A tech was not provided.');\n }\n\n var settings = mergeOptions(options, {\n kind: TextTrackKind[options.kind] || 'subtitles',\n language: options.language || options.srclang || ''\n });\n var mode = TextTrackMode[settings.mode] || 'disabled';\n var default_ = settings[\"default\"];\n\n if (settings.kind === 'metadata' || settings.kind === 'chapters') {\n mode = 'hidden';\n }\n\n _this = _Track.call(this, settings) || this;\n _this.tech_ = settings.tech;\n _this.cues_ = [];\n _this.activeCues_ = [];\n var cues = new TextTrackCueList(_this.cues_);\n var activeCues = new TextTrackCueList(_this.activeCues_);\n var changed = false;\n var timeupdateHandler = bind(_assertThisInitialized(_this), function () {\n // Accessing this.activeCues for the side-effects of updating itself\n // due to its nature as a getter function. Do not remove or cues will\n // stop updating!\n // Use the setter to prevent deletion from uglify (pure_getters rule)\n this.activeCues = this.activeCues;\n\n if (changed) {\n this.trigger('cuechange');\n changed = false;\n }\n });\n\n if (mode !== 'disabled') {\n _this.tech_.ready(function () {\n _this.tech_.on('timeupdate', timeupdateHandler);\n }, true);\n }\n\n Object.defineProperties(_assertThisInitialized(_this), {\n /**\n * @memberof TextTrack\n * @member {boolean} default\n * If this track was set to be on or off by default. Cannot be changed after\n * creation.\n * @instance\n *\n * @readonly\n */\n \"default\": {\n get: function get() {\n return default_;\n },\n set: function set() {}\n },\n\n /**\n * @memberof TextTrack\n * @member {string} mode\n * Set the mode of this TextTrack to a valid {@link TextTrack~Mode}. Will\n * not be set if setting to an invalid mode.\n * @instance\n *\n * @fires TextTrack#modechange\n */\n mode: {\n get: function get() {\n return mode;\n },\n set: function set(newMode) {\n var _this2 = this;\n\n if (!TextTrackMode[newMode]) {\n return;\n }\n\n mode = newMode;\n\n if (mode !== 'disabled') {\n this.tech_.ready(function () {\n _this2.tech_.on('timeupdate', timeupdateHandler);\n }, true);\n } else {\n this.tech_.off('timeupdate', timeupdateHandler);\n }\n /**\n * An event that fires when mode changes on this track. This allows\n * the TextTrackList that holds this track to act accordingly.\n *\n * > Note: This is not part of the spec!\n *\n * @event TextTrack#modechange\n * @type {EventTarget~Event}\n */\n\n\n this.trigger('modechange');\n }\n },\n\n /**\n * @memberof TextTrack\n * @member {TextTrackCueList} cues\n * The text track cue list for this TextTrack.\n * @instance\n */\n cues: {\n get: function get() {\n if (!this.loaded_) {\n return null;\n }\n\n return cues;\n },\n set: function set() {}\n },\n\n /**\n * @memberof TextTrack\n * @member {TextTrackCueList} activeCues\n * The list text track cues that are currently active for this TextTrack.\n * @instance\n */\n activeCues: {\n get: function get() {\n if (!this.loaded_) {\n return null;\n } // nothing to do\n\n\n if (this.cues.length === 0) {\n return activeCues;\n }\n\n var ct = this.tech_.currentTime();\n var active = [];\n\n for (var i = 0, l = this.cues.length; i < l; i++) {\n var cue = this.cues[i];\n\n if (cue.startTime <= ct && cue.endTime >= ct) {\n active.push(cue);\n } else if (cue.startTime === cue.endTime && cue.startTime <= ct && cue.startTime + 0.5 >= ct) {\n active.push(cue);\n }\n }\n\n changed = false;\n\n if (active.length !== this.activeCues_.length) {\n changed = true;\n } else {\n for (var _i = 0; _i < active.length; _i++) {\n if (this.activeCues_.indexOf(active[_i]) === -1) {\n changed = true;\n }\n }\n }\n\n this.activeCues_ = active;\n activeCues.setCues_(this.activeCues_);\n return activeCues;\n },\n // /!\\ Keep this setter empty (see the timeupdate handler above)\n set: function set() {}\n }\n });\n\n if (settings.src) {\n _this.src = settings.src;\n loadTrack(settings.src, _assertThisInitialized(_this));\n } else {\n _this.loaded_ = true;\n }\n\n return _this;\n }\n /**\n * Add a cue to the internal list of cues.\n *\n * @param {TextTrack~Cue} cue\n * The cue to add to our internal list\n */\n\n\n var _proto = TextTrack.prototype;\n\n _proto.addCue = function addCue(originalCue) {\n var cue = originalCue;\n\n if (window$1.vttjs && !(originalCue instanceof window$1.vttjs.VTTCue)) {\n cue = new window$1.vttjs.VTTCue(originalCue.startTime, originalCue.endTime, originalCue.text);\n\n for (var prop in originalCue) {\n if (!(prop in cue)) {\n cue[prop] = originalCue[prop];\n }\n } // make sure that `id` is copied over\n\n\n cue.id = originalCue.id;\n cue.originalCue_ = originalCue;\n }\n\n var tracks = this.tech_.textTracks();\n\n for (var i = 0; i < tracks.length; i++) {\n if (tracks[i] !== this) {\n tracks[i].removeCue(cue);\n }\n }\n\n this.cues_.push(cue);\n this.cues.setCues_(this.cues_);\n }\n /**\n * Remove a cue from our internal list\n *\n * @param {TextTrack~Cue} removeCue\n * The cue to remove from our internal list\n */\n ;\n\n _proto.removeCue = function removeCue(_removeCue) {\n var i = this.cues_.length;\n\n while (i--) {\n var cue = this.cues_[i];\n\n if (cue === _removeCue || cue.originalCue_ && cue.originalCue_ === _removeCue) {\n this.cues_.splice(i, 1);\n this.cues.setCues_(this.cues_);\n break;\n }\n }\n };\n\n return TextTrack;\n}(Track);\n/**\n * cuechange - One or more cues in the track have become active or stopped being active.\n */\n\n\nTextTrack.prototype.allowedEvents_ = {\n cuechange: 'cuechange'\n};\n/**\n * A representation of a single `AudioTrack`. If it is part of an {@link AudioTrackList}\n * only one `AudioTrack` in the list will be enabled at a time.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotrack}\n * @extends Track\n */\n\nvar AudioTrack =\n/*#__PURE__*/\nfunction (_Track) {\n _inheritsLoose(AudioTrack, _Track);\n /**\n * Create an instance of this class.\n *\n * @param {Object} [options={}]\n * Object of option names and values\n *\n * @param {AudioTrack~Kind} [options.kind='']\n * A valid audio track kind\n *\n * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n * A unique id for this AudioTrack.\n *\n * @param {string} [options.label='']\n * The menu label for this track.\n *\n * @param {string} [options.language='']\n * A valid two character language code.\n *\n * @param {boolean} [options.enabled]\n * If this track is the one that is currently playing. If this track is part of\n * an {@link AudioTrackList}, only one {@link AudioTrack} will be enabled.\n */\n\n\n function AudioTrack(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n var settings = mergeOptions(options, {\n kind: AudioTrackKind[options.kind] || ''\n });\n _this = _Track.call(this, settings) || this;\n var enabled = false;\n /**\n * @memberof AudioTrack\n * @member {boolean} enabled\n * If this `AudioTrack` is enabled or not. When setting this will\n * fire {@link AudioTrack#enabledchange} if the state of enabled is changed.\n * @instance\n *\n * @fires VideoTrack#selectedchange\n */\n\n Object.defineProperty(_assertThisInitialized(_this), 'enabled', {\n get: function get() {\n return enabled;\n },\n set: function set(newEnabled) {\n // an invalid or unchanged value\n if (typeof newEnabled !== 'boolean' || newEnabled === enabled) {\n return;\n }\n\n enabled = newEnabled;\n /**\n * An event that fires when enabled changes on this track. This allows\n * the AudioTrackList that holds this track to act accordingly.\n *\n * > Note: This is not part of the spec! Native tracks will do\n * this internally without an event.\n *\n * @event AudioTrack#enabledchange\n * @type {EventTarget~Event}\n */\n\n this.trigger('enabledchange');\n }\n }); // if the user sets this track to selected then\n // set selected to that true value otherwise\n // we keep it false\n\n if (settings.enabled) {\n _this.enabled = settings.enabled;\n }\n\n _this.loaded_ = true;\n return _this;\n }\n\n return AudioTrack;\n}(Track);\n/**\n * A representation of a single `VideoTrack`.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#videotrack}\n * @extends Track\n */\n\n\nvar VideoTrack =\n/*#__PURE__*/\nfunction (_Track) {\n _inheritsLoose(VideoTrack, _Track);\n /**\n * Create an instance of this class.\n *\n * @param {Object} [options={}]\n * Object of option names and values\n *\n * @param {string} [options.kind='']\n * A valid {@link VideoTrack~Kind}\n *\n * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n * A unique id for this AudioTrack.\n *\n * @param {string} [options.label='']\n * The menu label for this track.\n *\n * @param {string} [options.language='']\n * A valid two character language code.\n *\n * @param {boolean} [options.selected]\n * If this track is the one that is currently playing.\n */\n\n\n function VideoTrack(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n var settings = mergeOptions(options, {\n kind: VideoTrackKind[options.kind] || ''\n });\n _this = _Track.call(this, settings) || this;\n var selected = false;\n /**\n * @memberof VideoTrack\n * @member {boolean} selected\n * If this `VideoTrack` is selected or not. When setting this will\n * fire {@link VideoTrack#selectedchange} if the state of selected changed.\n * @instance\n *\n * @fires VideoTrack#selectedchange\n */\n\n Object.defineProperty(_assertThisInitialized(_this), 'selected', {\n get: function get() {\n return selected;\n },\n set: function set(newSelected) {\n // an invalid or unchanged value\n if (typeof newSelected !== 'boolean' || newSelected === selected) {\n return;\n }\n\n selected = newSelected;\n /**\n * An event that fires when selected changes on this track. This allows\n * the VideoTrackList that holds this track to act accordingly.\n *\n * > Note: This is not part of the spec! Native tracks will do\n * this internally without an event.\n *\n * @event VideoTrack#selectedchange\n * @type {EventTarget~Event}\n */\n\n this.trigger('selectedchange');\n }\n }); // if the user sets this track to selected then\n // set selected to that true value otherwise\n // we keep it false\n\n if (settings.selected) {\n _this.selected = settings.selected;\n }\n\n return _this;\n }\n\n return VideoTrack;\n}(Track);\n/**\n * @memberof HTMLTrackElement\n * @typedef {HTMLTrackElement~ReadyState}\n * @enum {number}\n */\n\n\nvar NONE = 0;\nvar LOADING = 1;\nvar LOADED = 2;\nvar ERROR = 3;\n/**\n * A single track represented in the DOM.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#htmltrackelement}\n * @extends EventTarget\n */\n\nvar HTMLTrackElement =\n/*#__PURE__*/\nfunction (_EventTarget) {\n _inheritsLoose(HTMLTrackElement, _EventTarget);\n /**\n * Create an instance of this class.\n *\n * @param {Object} options={}\n * Object of option names and values\n *\n * @param {Tech} options.tech\n * A reference to the tech that owns this HTMLTrackElement.\n *\n * @param {TextTrack~Kind} [options.kind='subtitles']\n * A valid text track kind.\n *\n * @param {TextTrack~Mode} [options.mode='disabled']\n * A valid text track mode.\n *\n * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n * A unique id for this TextTrack.\n *\n * @param {string} [options.label='']\n * The menu label for this track.\n *\n * @param {string} [options.language='']\n * A valid two character language code.\n *\n * @param {string} [options.srclang='']\n * A valid two character language code. An alternative, but deprioritized\n * vesion of `options.language`\n *\n * @param {string} [options.src]\n * A url to TextTrack cues.\n *\n * @param {boolean} [options.default]\n * If this track should default to on or off.\n */\n\n\n function HTMLTrackElement(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _EventTarget.call(this) || this;\n var readyState;\n var track = new TextTrack(options);\n _this.kind = track.kind;\n _this.src = track.src;\n _this.srclang = track.language;\n _this.label = track.label;\n _this[\"default\"] = track[\"default\"];\n Object.defineProperties(_assertThisInitialized(_this), {\n /**\n * @memberof HTMLTrackElement\n * @member {HTMLTrackElement~ReadyState} readyState\n * The current ready state of the track element.\n * @instance\n */\n readyState: {\n get: function get() {\n return readyState;\n }\n },\n\n /**\n * @memberof HTMLTrackElement\n * @member {TextTrack} track\n * The underlying TextTrack object.\n * @instance\n *\n */\n track: {\n get: function get() {\n return track;\n }\n }\n });\n readyState = NONE;\n /**\n * @listens TextTrack#loadeddata\n * @fires HTMLTrackElement#load\n */\n\n track.addEventListener('loadeddata', function () {\n readyState = LOADED;\n\n _this.trigger({\n type: 'load',\n target: _assertThisInitialized(_this)\n });\n });\n return _this;\n }\n\n return HTMLTrackElement;\n}(EventTarget);\n\nHTMLTrackElement.prototype.allowedEvents_ = {\n load: 'load'\n};\nHTMLTrackElement.NONE = NONE;\nHTMLTrackElement.LOADING = LOADING;\nHTMLTrackElement.LOADED = LOADED;\nHTMLTrackElement.ERROR = ERROR;\n/*\n * This file contains all track properties that are used in\n * player.js, tech.js, html5.js and possibly other techs in the future.\n */\n\nvar NORMAL = {\n audio: {\n ListClass: AudioTrackList,\n TrackClass: AudioTrack,\n capitalName: 'Audio'\n },\n video: {\n ListClass: VideoTrackList,\n TrackClass: VideoTrack,\n capitalName: 'Video'\n },\n text: {\n ListClass: TextTrackList,\n TrackClass: TextTrack,\n capitalName: 'Text'\n }\n};\nObject.keys(NORMAL).forEach(function (type) {\n NORMAL[type].getterName = type + \"Tracks\";\n NORMAL[type].privateName = type + \"Tracks_\";\n});\nvar REMOTE = {\n remoteText: {\n ListClass: TextTrackList,\n TrackClass: TextTrack,\n capitalName: 'RemoteText',\n getterName: 'remoteTextTracks',\n privateName: 'remoteTextTracks_'\n },\n remoteTextEl: {\n ListClass: HtmlTrackElementList,\n TrackClass: HTMLTrackElement,\n capitalName: 'RemoteTextTrackEls',\n getterName: 'remoteTextTrackEls',\n privateName: 'remoteTextTrackEls_'\n }\n};\nvar ALL = mergeOptions(NORMAL, REMOTE);\nREMOTE.names = Object.keys(REMOTE);\nNORMAL.names = Object.keys(NORMAL);\nALL.names = [].concat(REMOTE.names).concat(NORMAL.names);\n/**\n * An Object containing a structure like: `{src: 'url', type: 'mimetype'}` or string\n * that just contains the src url alone.\n * * `var SourceObject = {src: 'http://ex.com/video.mp4', type: 'video/mp4'};`\n * `var SourceString = 'http://example.com/some-video.mp4';`\n *\n * @typedef {Object|string} Tech~SourceObject\n *\n * @property {string} src\n * The url to the source\n *\n * @property {string} type\n * The mime type of the source\n */\n\n/**\n * A function used by {@link Tech} to create a new {@link TextTrack}.\n *\n * @private\n *\n * @param {Tech} self\n * An instance of the Tech class.\n *\n * @param {string} kind\n * `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\n *\n * @param {string} [label]\n * Label to identify the text track\n *\n * @param {string} [language]\n * Two letter language abbreviation\n *\n * @param {Object} [options={}]\n * An object with additional text track options\n *\n * @return {TextTrack}\n * The text track that was created.\n */\n\nfunction createTrackHelper(self, kind, label, language, options) {\n if (options === void 0) {\n options = {};\n }\n\n var tracks = self.textTracks();\n options.kind = kind;\n\n if (label) {\n options.label = label;\n }\n\n if (language) {\n options.language = language;\n }\n\n options.tech = self;\n var track = new ALL.text.TrackClass(options);\n tracks.addTrack(track);\n return track;\n}\n/**\n * This is the base class for media playback technology controllers, such as\n * {@link Flash} and {@link HTML5}\n *\n * @extends Component\n */\n\n\nvar Tech =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(Tech, _Component);\n /**\n * Create an instance of this Tech.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {Component~ReadyCallback} ready\n * Callback function to call when the `HTML5` Tech is ready.\n */\n\n\n function Tech(options, ready) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n if (ready === void 0) {\n ready = function ready() {};\n } // we don't want the tech to report user activity automatically.\n // This is done manually in addControlsListeners\n\n\n options.reportTouchActivity = false;\n _this = _Component.call(this, null, options, ready) || this; // keep track of whether the current source has played at all to\n // implement a very limited played()\n\n _this.hasStarted_ = false;\n\n _this.on('playing', function () {\n this.hasStarted_ = true;\n });\n\n _this.on('loadstart', function () {\n this.hasStarted_ = false;\n });\n\n ALL.names.forEach(function (name) {\n var props = ALL[name];\n\n if (options && options[props.getterName]) {\n _this[props.privateName] = options[props.getterName];\n }\n }); // Manually track progress in cases where the browser/flash player doesn't report it.\n\n if (!_this.featuresProgressEvents) {\n _this.manualProgressOn();\n } // Manually track timeupdates in cases where the browser/flash player doesn't report it.\n\n\n if (!_this.featuresTimeupdateEvents) {\n _this.manualTimeUpdatesOn();\n }\n\n ['Text', 'Audio', 'Video'].forEach(function (track) {\n if (options[\"native\" + track + \"Tracks\"] === false) {\n _this[\"featuresNative\" + track + \"Tracks\"] = false;\n }\n });\n\n if (options.nativeCaptions === false || options.nativeTextTracks === false) {\n _this.featuresNativeTextTracks = false;\n } else if (options.nativeCaptions === true || options.nativeTextTracks === true) {\n _this.featuresNativeTextTracks = true;\n }\n\n if (!_this.featuresNativeTextTracks) {\n _this.emulateTextTracks();\n }\n\n _this.autoRemoteTextTracks_ = new ALL.text.ListClass();\n\n _this.initTrackListeners(); // Turn on component tap events only if not using native controls\n\n\n if (!options.nativeControlsForTouch) {\n _this.emitTapEvents();\n }\n\n if (_this.constructor) {\n _this.name_ = _this.constructor.name || 'Unknown Tech';\n }\n\n return _this;\n }\n /**\n * A special function to trigger source set in a way that will allow player\n * to re-trigger if the player or tech are not ready yet.\n *\n * @fires Tech#sourceset\n * @param {string} src The source string at the time of the source changing.\n */\n\n\n var _proto = Tech.prototype;\n\n _proto.triggerSourceset = function triggerSourceset(src) {\n var _this2 = this;\n\n if (!this.isReady_) {\n // on initial ready we have to trigger source set\n // 1ms after ready so that player can watch for it.\n this.one('ready', function () {\n return _this2.setTimeout(function () {\n return _this2.triggerSourceset(src);\n }, 1);\n });\n }\n /**\n * Fired when the source is set on the tech causing the media element\n * to reload.\n *\n * @see {@link Player#event:sourceset}\n * @event Tech#sourceset\n * @type {EventTarget~Event}\n */\n\n\n this.trigger({\n src: src,\n type: 'sourceset'\n });\n }\n /* Fallbacks for unsupported event types\n ================================================================================ */\n\n /**\n * Polyfill the `progress` event for browsers that don't support it natively.\n *\n * @see {@link Tech#trackProgress}\n */\n ;\n\n _proto.manualProgressOn = function manualProgressOn() {\n this.on('durationchange', this.onDurationChange);\n this.manualProgress = true; // Trigger progress watching when a source begins loading\n\n this.one('ready', this.trackProgress);\n }\n /**\n * Turn off the polyfill for `progress` events that was created in\n * {@link Tech#manualProgressOn}\n */\n ;\n\n _proto.manualProgressOff = function manualProgressOff() {\n this.manualProgress = false;\n this.stopTrackingProgress();\n this.off('durationchange', this.onDurationChange);\n }\n /**\n * This is used to trigger a `progress` event when the buffered percent changes. It\n * sets an interval function that will be called every 500 milliseconds to check if the\n * buffer end percent has changed.\n *\n * > This function is called by {@link Tech#manualProgressOn}\n *\n * @param {EventTarget~Event} event\n * The `ready` event that caused this to run.\n *\n * @listens Tech#ready\n * @fires Tech#progress\n */\n ;\n\n _proto.trackProgress = function trackProgress(event) {\n this.stopTrackingProgress();\n this.progressInterval = this.setInterval(bind(this, function () {\n // Don't trigger unless buffered amount is greater than last time\n var numBufferedPercent = this.bufferedPercent();\n\n if (this.bufferedPercent_ !== numBufferedPercent) {\n /**\n * See {@link Player#progress}\n *\n * @event Tech#progress\n * @type {EventTarget~Event}\n */\n this.trigger('progress');\n }\n\n this.bufferedPercent_ = numBufferedPercent;\n\n if (numBufferedPercent === 1) {\n this.stopTrackingProgress();\n }\n }), 500);\n }\n /**\n * Update our internal duration on a `durationchange` event by calling\n * {@link Tech#duration}.\n *\n * @param {EventTarget~Event} event\n * The `durationchange` event that caused this to run.\n *\n * @listens Tech#durationchange\n */\n ;\n\n _proto.onDurationChange = function onDurationChange(event) {\n this.duration_ = this.duration();\n }\n /**\n * Get and create a `TimeRange` object for buffering.\n *\n * @return {TimeRange}\n * The time range object that was created.\n */\n ;\n\n _proto.buffered = function buffered() {\n return createTimeRanges(0, 0);\n }\n /**\n * Get the percentage of the current video that is currently buffered.\n *\n * @return {number}\n * A number from 0 to 1 that represents the decimal percentage of the\n * video that is buffered.\n *\n */\n ;\n\n _proto.bufferedPercent = function bufferedPercent$1() {\n return bufferedPercent(this.buffered(), this.duration_);\n }\n /**\n * Turn off the polyfill for `progress` events that was created in\n * {@link Tech#manualProgressOn}\n * Stop manually tracking progress events by clearing the interval that was set in\n * {@link Tech#trackProgress}.\n */\n ;\n\n _proto.stopTrackingProgress = function stopTrackingProgress() {\n this.clearInterval(this.progressInterval);\n }\n /**\n * Polyfill the `timeupdate` event for browsers that don't support it.\n *\n * @see {@link Tech#trackCurrentTime}\n */\n ;\n\n _proto.manualTimeUpdatesOn = function manualTimeUpdatesOn() {\n this.manualTimeUpdates = true;\n this.on('play', this.trackCurrentTime);\n this.on('pause', this.stopTrackingCurrentTime);\n }\n /**\n * Turn off the polyfill for `timeupdate` events that was created in\n * {@link Tech#manualTimeUpdatesOn}\n */\n ;\n\n _proto.manualTimeUpdatesOff = function manualTimeUpdatesOff() {\n this.manualTimeUpdates = false;\n this.stopTrackingCurrentTime();\n this.off('play', this.trackCurrentTime);\n this.off('pause', this.stopTrackingCurrentTime);\n }\n /**\n * Sets up an interval function to track current time and trigger `timeupdate` every\n * 250 milliseconds.\n *\n * @listens Tech#play\n * @triggers Tech#timeupdate\n */\n ;\n\n _proto.trackCurrentTime = function trackCurrentTime() {\n if (this.currentTimeInterval) {\n this.stopTrackingCurrentTime();\n }\n\n this.currentTimeInterval = this.setInterval(function () {\n /**\n * Triggered at an interval of 250ms to indicated that time is passing in the video.\n *\n * @event Tech#timeupdate\n * @type {EventTarget~Event}\n */\n this.trigger({\n type: 'timeupdate',\n target: this,\n manuallyTriggered: true\n }); // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\n }, 250);\n }\n /**\n * Stop the interval function created in {@link Tech#trackCurrentTime} so that the\n * `timeupdate` event is no longer triggered.\n *\n * @listens {Tech#pause}\n */\n ;\n\n _proto.stopTrackingCurrentTime = function stopTrackingCurrentTime() {\n this.clearInterval(this.currentTimeInterval); // #1002 - if the video ends right before the next timeupdate would happen,\n // the progress bar won't make it all the way to the end\n\n this.trigger({\n type: 'timeupdate',\n target: this,\n manuallyTriggered: true\n });\n }\n /**\n * Turn off all event polyfills, clear the `Tech`s {@link AudioTrackList},\n * {@link VideoTrackList}, and {@link TextTrackList}, and dispose of this Tech.\n *\n * @fires Component#dispose\n */\n ;\n\n _proto.dispose = function dispose() {\n // clear out all tracks because we can't reuse them between techs\n this.clearTracks(NORMAL.names); // Turn off any manual progress or timeupdate tracking\n\n if (this.manualProgress) {\n this.manualProgressOff();\n }\n\n if (this.manualTimeUpdates) {\n this.manualTimeUpdatesOff();\n }\n\n _Component.prototype.dispose.call(this);\n }\n /**\n * Clear out a single `TrackList` or an array of `TrackLists` given their names.\n *\n * > Note: Techs without source handlers should call this between sources for `video`\n * & `audio` tracks. You don't want to use them between tracks!\n *\n * @param {string[]|string} types\n * TrackList names to clear, valid names are `video`, `audio`, and\n * `text`.\n */\n ;\n\n _proto.clearTracks = function clearTracks(types) {\n var _this3 = this;\n\n types = [].concat(types); // clear out all tracks because we can't reuse them between techs\n\n types.forEach(function (type) {\n var list = _this3[type + \"Tracks\"]() || [];\n var i = list.length;\n\n while (i--) {\n var track = list[i];\n\n if (type === 'text') {\n _this3.removeRemoteTextTrack(track);\n }\n\n list.removeTrack(track);\n }\n });\n }\n /**\n * Remove any TextTracks added via addRemoteTextTrack that are\n * flagged for automatic garbage collection\n */\n ;\n\n _proto.cleanupAutoTextTracks = function cleanupAutoTextTracks() {\n var list = this.autoRemoteTextTracks_ || [];\n var i = list.length;\n\n while (i--) {\n var track = list[i];\n this.removeRemoteTextTrack(track);\n }\n }\n /**\n * Reset the tech, which will removes all sources and reset the internal readyState.\n *\n * @abstract\n */\n ;\n\n _proto.reset = function reset() {}\n /**\n * Get or set an error on the Tech.\n *\n * @param {MediaError} [err]\n * Error to set on the Tech\n *\n * @return {MediaError|null}\n * The current error object on the tech, or null if there isn't one.\n */\n ;\n\n _proto.error = function error(err) {\n if (err !== undefined) {\n this.error_ = new MediaError(err);\n this.trigger('error');\n }\n\n return this.error_;\n }\n /**\n * Returns the `TimeRange`s that have been played through for the current source.\n *\n * > NOTE: This implementation is incomplete. It does not track the played `TimeRange`.\n * It only checks whether the source has played at all or not.\n *\n * @return {TimeRange}\n * - A single time range if this video has played\n * - An empty set of ranges if not.\n */\n ;\n\n _proto.played = function played() {\n if (this.hasStarted_) {\n return createTimeRanges(0, 0);\n }\n\n return createTimeRanges();\n }\n /**\n * Causes a manual time update to occur if {@link Tech#manualTimeUpdatesOn} was\n * previously called.\n *\n * @fires Tech#timeupdate\n */\n ;\n\n _proto.setCurrentTime = function setCurrentTime() {\n // improve the accuracy of manual timeupdates\n if (this.manualTimeUpdates) {\n /**\n * A manual `timeupdate` event.\n *\n * @event Tech#timeupdate\n * @type {EventTarget~Event}\n */\n this.trigger({\n type: 'timeupdate',\n target: this,\n manuallyTriggered: true\n });\n }\n }\n /**\n * Turn on listeners for {@link VideoTrackList}, {@link {AudioTrackList}, and\n * {@link TextTrackList} events.\n *\n * This adds {@link EventTarget~EventListeners} for `addtrack`, and `removetrack`.\n *\n * @fires Tech#audiotrackchange\n * @fires Tech#videotrackchange\n * @fires Tech#texttrackchange\n */\n ;\n\n _proto.initTrackListeners = function initTrackListeners() {\n var _this4 = this;\n /**\n * Triggered when tracks are added or removed on the Tech {@link AudioTrackList}\n *\n * @event Tech#audiotrackchange\n * @type {EventTarget~Event}\n */\n\n /**\n * Triggered when tracks are added or removed on the Tech {@link VideoTrackList}\n *\n * @event Tech#videotrackchange\n * @type {EventTarget~Event}\n */\n\n /**\n * Triggered when tracks are added or removed on the Tech {@link TextTrackList}\n *\n * @event Tech#texttrackchange\n * @type {EventTarget~Event}\n */\n\n\n NORMAL.names.forEach(function (name) {\n var props = NORMAL[name];\n\n var trackListChanges = function trackListChanges() {\n _this4.trigger(name + \"trackchange\");\n };\n\n var tracks = _this4[props.getterName]();\n\n tracks.addEventListener('removetrack', trackListChanges);\n tracks.addEventListener('addtrack', trackListChanges);\n\n _this4.on('dispose', function () {\n tracks.removeEventListener('removetrack', trackListChanges);\n tracks.removeEventListener('addtrack', trackListChanges);\n });\n });\n }\n /**\n * Emulate TextTracks using vtt.js if necessary\n *\n * @fires Tech#vttjsloaded\n * @fires Tech#vttjserror\n */\n ;\n\n _proto.addWebVttScript_ = function addWebVttScript_() {\n var _this5 = this;\n\n if (window$1.WebVTT) {\n return;\n } // Initially, Tech.el_ is a child of a dummy-div wait until the Component system\n // signals that the Tech is ready at which point Tech.el_ is part of the DOM\n // before inserting the WebVTT script\n\n\n if (document.body.contains(this.el())) {\n // load via require if available and vtt.js script location was not passed in\n // as an option. novtt builds will turn the above require call into an empty object\n // which will cause this if check to always fail.\n if (!this.options_['vtt.js'] && isPlain(vtt) && Object.keys(vtt).length > 0) {\n this.trigger('vttjsloaded');\n return;\n } // load vtt.js via the script location option or the cdn of no location was\n // passed in\n\n\n var script = document.createElement('script');\n script.src = this.options_['vtt.js'] || 'https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js';\n\n script.onload = function () {\n /**\n * Fired when vtt.js is loaded.\n *\n * @event Tech#vttjsloaded\n * @type {EventTarget~Event}\n */\n _this5.trigger('vttjsloaded');\n };\n\n script.onerror = function () {\n /**\n * Fired when vtt.js was not loaded due to an error\n *\n * @event Tech#vttjsloaded\n * @type {EventTarget~Event}\n */\n _this5.trigger('vttjserror');\n };\n\n this.on('dispose', function () {\n script.onload = null;\n script.onerror = null;\n }); // but have not loaded yet and we set it to true before the inject so that\n // we don't overwrite the injected window.WebVTT if it loads right away\n\n window$1.WebVTT = true;\n this.el().parentNode.appendChild(script);\n } else {\n this.ready(this.addWebVttScript_);\n }\n }\n /**\n * Emulate texttracks\n *\n */\n ;\n\n _proto.emulateTextTracks = function emulateTextTracks() {\n var _this6 = this;\n\n var tracks = this.textTracks();\n var remoteTracks = this.remoteTextTracks();\n\n var handleAddTrack = function handleAddTrack(e) {\n return tracks.addTrack(e.track);\n };\n\n var handleRemoveTrack = function handleRemoveTrack(e) {\n return tracks.removeTrack(e.track);\n };\n\n remoteTracks.on('addtrack', handleAddTrack);\n remoteTracks.on('removetrack', handleRemoveTrack);\n this.addWebVttScript_();\n\n var updateDisplay = function updateDisplay() {\n return _this6.trigger('texttrackchange');\n };\n\n var textTracksChanges = function textTracksChanges() {\n updateDisplay();\n\n for (var i = 0; i < tracks.length; i++) {\n var track = tracks[i];\n track.removeEventListener('cuechange', updateDisplay);\n\n if (track.mode === 'showing') {\n track.addEventListener('cuechange', updateDisplay);\n }\n }\n };\n\n textTracksChanges();\n tracks.addEventListener('change', textTracksChanges);\n tracks.addEventListener('addtrack', textTracksChanges);\n tracks.addEventListener('removetrack', textTracksChanges);\n this.on('dispose', function () {\n remoteTracks.off('addtrack', handleAddTrack);\n remoteTracks.off('removetrack', handleRemoveTrack);\n tracks.removeEventListener('change', textTracksChanges);\n tracks.removeEventListener('addtrack', textTracksChanges);\n tracks.removeEventListener('removetrack', textTracksChanges);\n\n for (var i = 0; i < tracks.length; i++) {\n var track = tracks[i];\n track.removeEventListener('cuechange', updateDisplay);\n }\n });\n }\n /**\n * Create and returns a remote {@link TextTrack} object.\n *\n * @param {string} kind\n * `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\n *\n * @param {string} [label]\n * Label to identify the text track\n *\n * @param {string} [language]\n * Two letter language abbreviation\n *\n * @return {TextTrack}\n * The TextTrack that gets created.\n */\n ;\n\n _proto.addTextTrack = function addTextTrack(kind, label, language) {\n if (!kind) {\n throw new Error('TextTrack kind is required but was not provided');\n }\n\n return createTrackHelper(this, kind, label, language);\n }\n /**\n * Create an emulated TextTrack for use by addRemoteTextTrack\n *\n * This is intended to be overridden by classes that inherit from\n * Tech in order to create native or custom TextTracks.\n *\n * @param {Object} options\n * The object should contain the options to initialize the TextTrack with.\n *\n * @param {string} [options.kind]\n * `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata).\n *\n * @param {string} [options.label].\n * Label to identify the text track\n *\n * @param {string} [options.language]\n * Two letter language abbreviation.\n *\n * @return {HTMLTrackElement}\n * The track element that gets created.\n */\n ;\n\n _proto.createRemoteTextTrack = function createRemoteTextTrack(options) {\n var track = mergeOptions(options, {\n tech: this\n });\n return new REMOTE.remoteTextEl.TrackClass(track);\n }\n /**\n * Creates a remote text track object and returns an html track element.\n *\n * > Note: This can be an emulated {@link HTMLTrackElement} or a native one.\n *\n * @param {Object} options\n * See {@link Tech#createRemoteTextTrack} for more detailed properties.\n *\n * @param {boolean} [manualCleanup=true]\n * - When false: the TextTrack will be automatically removed from the video\n * element whenever the source changes\n * - When True: The TextTrack will have to be cleaned up manually\n *\n * @return {HTMLTrackElement}\n * An Html Track Element.\n *\n * @deprecated The default functionality for this function will be equivalent\n * to \"manualCleanup=false\" in the future. The manualCleanup parameter will\n * also be removed.\n */\n ;\n\n _proto.addRemoteTextTrack = function addRemoteTextTrack(options, manualCleanup) {\n var _this7 = this;\n\n if (options === void 0) {\n options = {};\n }\n\n var htmlTrackElement = this.createRemoteTextTrack(options);\n\n if (manualCleanup !== true && manualCleanup !== false) {\n // deprecation warning\n log.warn('Calling addRemoteTextTrack without explicitly setting the \"manualCleanup\" parameter to `true` is deprecated and default to `false` in future version of video.js');\n manualCleanup = true;\n } // store HTMLTrackElement and TextTrack to remote list\n\n\n this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);\n this.remoteTextTracks().addTrack(htmlTrackElement.track);\n\n if (manualCleanup !== true) {\n // create the TextTrackList if it doesn't exist\n this.ready(function () {\n return _this7.autoRemoteTextTracks_.addTrack(htmlTrackElement.track);\n });\n }\n\n return htmlTrackElement;\n }\n /**\n * Remove a remote text track from the remote `TextTrackList`.\n *\n * @param {TextTrack} track\n * `TextTrack` to remove from the `TextTrackList`\n */\n ;\n\n _proto.removeRemoteTextTrack = function removeRemoteTextTrack(track) {\n var trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track); // remove HTMLTrackElement and TextTrack from remote list\n\n this.remoteTextTrackEls().removeTrackElement_(trackElement);\n this.remoteTextTracks().removeTrack(track);\n this.autoRemoteTextTracks_.removeTrack(track);\n }\n /**\n * Gets available media playback quality metrics as specified by the W3C's Media\n * Playback Quality API.\n *\n * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\n *\n * @return {Object}\n * An object with supported media playback quality metrics\n *\n * @abstract\n */\n ;\n\n _proto.getVideoPlaybackQuality = function getVideoPlaybackQuality() {\n return {};\n }\n /**\n * Attempt to create a floating video window always on top of other windows\n * so that users may continue consuming media while they interact with other\n * content sites, or applications on their device.\n *\n * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\n *\n * @return {Promise|undefined}\n * A promise with a Picture-in-Picture window if the browser supports\n * Promises (or one was passed in as an option). It returns undefined\n * otherwise.\n *\n * @abstract\n */\n ;\n\n _proto.requestPictureInPicture = function requestPictureInPicture() {\n var PromiseClass = this.options_.Promise || window$1.Promise;\n\n if (PromiseClass) {\n return PromiseClass.reject();\n }\n }\n /**\n * A method to set a poster from a `Tech`.\n *\n * @abstract\n */\n ;\n\n _proto.setPoster = function setPoster() {}\n /**\n * A method to check for the presence of the 'playsinline' <video> attribute.\n *\n * @abstract\n */\n ;\n\n _proto.playsinline = function playsinline() {}\n /**\n * A method to set or unset the 'playsinline' <video> attribute.\n *\n * @abstract\n */\n ;\n\n _proto.setPlaysinline = function setPlaysinline() {}\n /**\n * Attempt to force override of native audio tracks.\n *\n * @param {boolean} override - If set to true native audio will be overridden,\n * otherwise native audio will potentially be used.\n *\n * @abstract\n */\n ;\n\n _proto.overrideNativeAudioTracks = function overrideNativeAudioTracks() {}\n /**\n * Attempt to force override of native video tracks.\n *\n * @param {boolean} override - If set to true native video will be overridden,\n * otherwise native video will potentially be used.\n *\n * @abstract\n */\n ;\n\n _proto.overrideNativeVideoTracks = function overrideNativeVideoTracks() {}\n /*\n * Check if the tech can support the given mime-type.\n *\n * The base tech does not support any type, but source handlers might\n * overwrite this.\n *\n * @param {string} type\n * The mimetype to check for support\n *\n * @return {string}\n * 'probably', 'maybe', or empty string\n *\n * @see [Spec]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType}\n *\n * @abstract\n */\n ;\n\n _proto.canPlayType = function canPlayType() {\n return '';\n }\n /**\n * Check if the type is supported by this tech.\n *\n * The base tech does not support any type, but source handlers might\n * overwrite this.\n *\n * @param {string} type\n * The media type to check\n * @return {string} Returns the native video element's response\n */\n ;\n\n Tech.canPlayType = function canPlayType() {\n return '';\n }\n /**\n * Check if the tech can support the given source\n *\n * @param {Object} srcObj\n * The source object\n * @param {Object} options\n * The options passed to the tech\n * @return {string} 'probably', 'maybe', or '' (empty string)\n */\n ;\n\n Tech.canPlaySource = function canPlaySource(srcObj, options) {\n return Tech.canPlayType(srcObj.type);\n }\n /*\n * Return whether the argument is a Tech or not.\n * Can be passed either a Class like `Html5` or a instance like `player.tech_`\n *\n * @param {Object} component\n * The item to check\n *\n * @return {boolean}\n * Whether it is a tech or not\n * - True if it is a tech\n * - False if it is not\n */\n ;\n\n Tech.isTech = function isTech(component) {\n return component.prototype instanceof Tech || component instanceof Tech || component === Tech;\n }\n /**\n * Registers a `Tech` into a shared list for videojs.\n *\n * @param {string} name\n * Name of the `Tech` to register.\n *\n * @param {Object} tech\n * The `Tech` class to register.\n */\n ;\n\n Tech.registerTech = function registerTech(name, tech) {\n if (!Tech.techs_) {\n Tech.techs_ = {};\n }\n\n if (!Tech.isTech(tech)) {\n throw new Error(\"Tech \" + name + \" must be a Tech\");\n }\n\n if (!Tech.canPlayType) {\n throw new Error('Techs must have a static canPlayType method on them');\n }\n\n if (!Tech.canPlaySource) {\n throw new Error('Techs must have a static canPlaySource method on them');\n }\n\n name = toTitleCase(name);\n Tech.techs_[name] = tech;\n Tech.techs_[toLowerCase(name)] = tech;\n\n if (name !== 'Tech') {\n // camel case the techName for use in techOrder\n Tech.defaultTechOrder_.push(name);\n }\n\n return tech;\n }\n /**\n * Get a `Tech` from the shared list by name.\n *\n * @param {string} name\n * `camelCase` or `TitleCase` name of the Tech to get\n *\n * @return {Tech|undefined}\n * The `Tech` or undefined if there was no tech with the name requested.\n */\n ;\n\n Tech.getTech = function getTech(name) {\n if (!name) {\n return;\n }\n\n if (Tech.techs_ && Tech.techs_[name]) {\n return Tech.techs_[name];\n }\n\n name = toTitleCase(name);\n\n if (window$1 && window$1.videojs && window$1.videojs[name]) {\n log.warn(\"The \" + name + \" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)\");\n return window$1.videojs[name];\n }\n };\n\n return Tech;\n}(Component);\n/**\n * Get the {@link VideoTrackList}\n *\n * @returns {VideoTrackList}\n * @method Tech.prototype.videoTracks\n */\n\n/**\n * Get the {@link AudioTrackList}\n *\n * @returns {AudioTrackList}\n * @method Tech.prototype.audioTracks\n */\n\n/**\n * Get the {@link TextTrackList}\n *\n * @returns {TextTrackList}\n * @method Tech.prototype.textTracks\n */\n\n/**\n * Get the remote element {@link TextTrackList}\n *\n * @returns {TextTrackList}\n * @method Tech.prototype.remoteTextTracks\n */\n\n/**\n * Get the remote element {@link HtmlTrackElementList}\n *\n * @returns {HtmlTrackElementList}\n * @method Tech.prototype.remoteTextTrackEls\n */\n\n\nALL.names.forEach(function (name) {\n var props = ALL[name];\n\n Tech.prototype[props.getterName] = function () {\n this[props.privateName] = this[props.privateName] || new props.ListClass();\n return this[props.privateName];\n };\n});\n/**\n * List of associated text tracks\n *\n * @type {TextTrackList}\n * @private\n * @property Tech#textTracks_\n */\n\n/**\n * List of associated audio tracks.\n *\n * @type {AudioTrackList}\n * @private\n * @property Tech#audioTracks_\n */\n\n/**\n * List of associated video tracks.\n *\n * @type {VideoTrackList}\n * @private\n * @property Tech#videoTracks_\n */\n\n/**\n * Boolean indicating whether the `Tech` supports volume control.\n *\n * @type {boolean}\n * @default\n */\n\nTech.prototype.featuresVolumeControl = true;\n/**\n * Boolean indicating whether the `Tech` supports muting volume.\n *\n * @type {bolean}\n * @default\n */\n\nTech.prototype.featuresMuteControl = true;\n/**\n * Boolean indicating whether the `Tech` supports fullscreen resize control.\n * Resizing plugins using request fullscreen reloads the plugin\n *\n * @type {boolean}\n * @default\n */\n\nTech.prototype.featuresFullscreenResize = false;\n/**\n * Boolean indicating whether the `Tech` supports changing the speed at which the video\n * plays. Examples:\n * - Set player to play 2x (twice) as fast\n * - Set player to play 0.5x (half) as fast\n *\n * @type {boolean}\n * @default\n */\n\nTech.prototype.featuresPlaybackRate = false;\n/**\n * Boolean indicating whether the `Tech` supports the `progress` event. This is currently\n * not triggered by video-js-swf. This will be used to determine if\n * {@link Tech#manualProgressOn} should be called.\n *\n * @type {boolean}\n * @default\n */\n\nTech.prototype.featuresProgressEvents = false;\n/**\n * Boolean indicating whether the `Tech` supports the `sourceset` event.\n *\n * A tech should set this to `true` and then use {@link Tech#triggerSourceset}\n * to trigger a {@link Tech#event:sourceset} at the earliest time after getting\n * a new source.\n *\n * @type {boolean}\n * @default\n */\n\nTech.prototype.featuresSourceset = false;\n/**\n * Boolean indicating whether the `Tech` supports the `timeupdate` event. This is currently\n * not triggered by video-js-swf. This will be used to determine if\n * {@link Tech#manualTimeUpdates} should be called.\n *\n * @type {boolean}\n * @default\n */\n\nTech.prototype.featuresTimeupdateEvents = false;\n/**\n * Boolean indicating whether the `Tech` supports the native `TextTrack`s.\n * This will help us integrate with native `TextTrack`s if the browser supports them.\n *\n * @type {boolean}\n * @default\n */\n\nTech.prototype.featuresNativeTextTracks = false;\n/**\n * A functional mixin for techs that want to use the Source Handler pattern.\n * Source handlers are scripts for handling specific formats.\n * The source handler pattern is used for adaptive formats (HLS, DASH) that\n * manually load video data and feed it into a Source Buffer (Media Source Extensions)\n * Example: `Tech.withSourceHandlers.call(MyTech);`\n *\n * @param {Tech} _Tech\n * The tech to add source handler functions to.\n *\n * @mixes Tech~SourceHandlerAdditions\n */\n\nTech.withSourceHandlers = function (_Tech) {\n /**\n * Register a source handler\n *\n * @param {Function} handler\n * The source handler class\n *\n * @param {number} [index]\n * Register it at the following index\n */\n _Tech.registerSourceHandler = function (handler, index) {\n var handlers = _Tech.sourceHandlers;\n\n if (!handlers) {\n handlers = _Tech.sourceHandlers = [];\n }\n\n if (index === undefined) {\n // add to the end of the list\n index = handlers.length;\n }\n\n handlers.splice(index, 0, handler);\n };\n /**\n * Check if the tech can support the given type. Also checks the\n * Techs sourceHandlers.\n *\n * @param {string} type\n * The mimetype to check.\n *\n * @return {string}\n * 'probably', 'maybe', or '' (empty string)\n */\n\n\n _Tech.canPlayType = function (type) {\n var handlers = _Tech.sourceHandlers || [];\n var can;\n\n for (var i = 0; i < handlers.length; i++) {\n can = handlers[i].canPlayType(type);\n\n if (can) {\n return can;\n }\n }\n\n return '';\n };\n /**\n * Returns the first source handler that supports the source.\n *\n * TODO: Answer question: should 'probably' be prioritized over 'maybe'\n *\n * @param {Tech~SourceObject} source\n * The source object\n *\n * @param {Object} options\n * The options passed to the tech\n *\n * @return {SourceHandler|null}\n * The first source handler that supports the source or null if\n * no SourceHandler supports the source\n */\n\n\n _Tech.selectSourceHandler = function (source, options) {\n var handlers = _Tech.sourceHandlers || [];\n var can;\n\n for (var i = 0; i < handlers.length; i++) {\n can = handlers[i].canHandleSource(source, options);\n\n if (can) {\n return handlers[i];\n }\n }\n\n return null;\n };\n /**\n * Check if the tech can support the given source.\n *\n * @param {Tech~SourceObject} srcObj\n * The source object\n *\n * @param {Object} options\n * The options passed to the tech\n *\n * @return {string}\n * 'probably', 'maybe', or '' (empty string)\n */\n\n\n _Tech.canPlaySource = function (srcObj, options) {\n var sh = _Tech.selectSourceHandler(srcObj, options);\n\n if (sh) {\n return sh.canHandleSource(srcObj, options);\n }\n\n return '';\n };\n /**\n * When using a source handler, prefer its implementation of\n * any function normally provided by the tech.\n */\n\n\n var deferrable = ['seekable', 'seeking', 'duration'];\n /**\n * A wrapper around {@link Tech#seekable} that will call a `SourceHandler`s seekable\n * function if it exists, with a fallback to the Techs seekable function.\n *\n * @method _Tech.seekable\n */\n\n /**\n * A wrapper around {@link Tech#duration} that will call a `SourceHandler`s duration\n * function if it exists, otherwise it will fallback to the techs duration function.\n *\n * @method _Tech.duration\n */\n\n deferrable.forEach(function (fnName) {\n var originalFn = this[fnName];\n\n if (typeof originalFn !== 'function') {\n return;\n }\n\n this[fnName] = function () {\n if (this.sourceHandler_ && this.sourceHandler_[fnName]) {\n return this.sourceHandler_[fnName].apply(this.sourceHandler_, arguments);\n }\n\n return originalFn.apply(this, arguments);\n };\n }, _Tech.prototype);\n /**\n * Create a function for setting the source using a source object\n * and source handlers.\n * Should never be called unless a source handler was found.\n *\n * @param {Tech~SourceObject} source\n * A source object with src and type keys\n */\n\n _Tech.prototype.setSource = function (source) {\n var sh = _Tech.selectSourceHandler(source, this.options_);\n\n if (!sh) {\n // Fall back to a native source hander when unsupported sources are\n // deliberately set\n if (_Tech.nativeSourceHandler) {\n sh = _Tech.nativeSourceHandler;\n } else {\n log.error('No source handler found for the current source.');\n }\n } // Dispose any existing source handler\n\n\n this.disposeSourceHandler();\n this.off('dispose', this.disposeSourceHandler);\n\n if (sh !== _Tech.nativeSourceHandler) {\n this.currentSource_ = source;\n }\n\n this.sourceHandler_ = sh.handleSource(source, this, this.options_);\n this.one('dispose', this.disposeSourceHandler);\n };\n /**\n * Clean up any existing SourceHandlers and listeners when the Tech is disposed.\n *\n * @listens Tech#dispose\n */\n\n\n _Tech.prototype.disposeSourceHandler = function () {\n // if we have a source and get another one\n // then we are loading something new\n // than clear all of our current tracks\n if (this.currentSource_) {\n this.clearTracks(['audio', 'video']);\n this.currentSource_ = null;\n } // always clean up auto-text tracks\n\n\n this.cleanupAutoTextTracks();\n\n if (this.sourceHandler_) {\n if (this.sourceHandler_.dispose) {\n this.sourceHandler_.dispose();\n }\n\n this.sourceHandler_ = null;\n }\n };\n}; // The base Tech class needs to be registered as a Component. It is the only\n// Tech that can be registered as a Component.\n\n\nComponent.registerComponent('Tech', Tech);\nTech.registerTech('Tech', Tech);\n/**\n * A list of techs that should be added to techOrder on Players\n *\n * @private\n */\n\nTech.defaultTechOrder_ = [];\n/**\n * @file middleware.js\n * @module middleware\n */\n\nvar middlewares = {};\nvar middlewareInstances = {};\nvar TERMINATOR = {};\n/**\n * A middleware object is a plain JavaScript object that has methods that\n * match the {@link Tech} methods found in the lists of allowed\n * {@link module:middleware.allowedGetters|getters},\n * {@link module:middleware.allowedSetters|setters}, and\n * {@link module:middleware.allowedMediators|mediators}.\n *\n * @typedef {Object} MiddlewareObject\n */\n\n/**\n * A middleware factory function that should return a\n * {@link module:middleware~MiddlewareObject|MiddlewareObject}.\n *\n * This factory will be called for each player when needed, with the player\n * passed in as an argument.\n *\n * @callback MiddlewareFactory\n * @param {Player} player\n * A Video.js player.\n */\n\n/**\n * Define a middleware that the player should use by way of a factory function\n * that returns a middleware object.\n *\n * @param {string} type\n * The MIME type to match or `\"*\"` for all MIME types.\n *\n * @param {MiddlewareFactory} middleware\n * A middleware factory function that will be executed for\n * matching types.\n */\n\nfunction use(type, middleware) {\n middlewares[type] = middlewares[type] || [];\n middlewares[type].push(middleware);\n}\n/**\n * Asynchronously sets a source using middleware by recursing through any\n * matching middlewares and calling `setSource` on each, passing along the\n * previous returned value each time.\n *\n * @param {Player} player\n * A {@link Player} instance.\n *\n * @param {Tech~SourceObject} src\n * A source object.\n *\n * @param {Function}\n * The next middleware to run.\n */\n\n\nfunction setSource(player, src, next) {\n player.setTimeout(function () {\n return setSourceHelper(src, middlewares[src.type], next, player);\n }, 1);\n}\n/**\n * When the tech is set, passes the tech to each middleware's `setTech` method.\n *\n * @param {Object[]} middleware\n * An array of middleware instances.\n *\n * @param {Tech} tech\n * A Video.js tech.\n */\n\n\nfunction setTech(middleware, tech) {\n middleware.forEach(function (mw) {\n return mw.setTech && mw.setTech(tech);\n });\n}\n/**\n * Calls a getter on the tech first, through each middleware\n * from right to left to the player.\n *\n * @param {Object[]} middleware\n * An array of middleware instances.\n *\n * @param {Tech} tech\n * The current tech.\n *\n * @param {string} method\n * A method name.\n *\n * @return {Mixed}\n * The final value from the tech after middleware has intercepted it.\n */\n\n\nfunction get(middleware, tech, method) {\n return middleware.reduceRight(middlewareIterator(method), tech[method]());\n}\n/**\n * Takes the argument given to the player and calls the setter method on each\n * middleware from left to right to the tech.\n *\n * @param {Object[]} middleware\n * An array of middleware instances.\n *\n * @param {Tech} tech\n * The current tech.\n *\n * @param {string} method\n * A method name.\n *\n * @param {Mixed} arg\n * The value to set on the tech.\n *\n * @return {Mixed}\n * The return value of the `method` of the `tech`.\n */\n\n\nfunction set(middleware, tech, method, arg) {\n return tech[method](middleware.reduce(middlewareIterator(method), arg));\n}\n/**\n * Takes the argument given to the player and calls the `call` version of the\n * method on each middleware from left to right.\n *\n * Then, call the passed in method on the tech and return the result unchanged\n * back to the player, through middleware, this time from right to left.\n *\n * @param {Object[]} middleware\n * An array of middleware instances.\n *\n * @param {Tech} tech\n * The current tech.\n *\n * @param {string} method\n * A method name.\n *\n * @param {Mixed} arg\n * The value to set on the tech.\n *\n * @return {Mixed}\n * The return value of the `method` of the `tech`, regardless of the\n * return values of middlewares.\n */\n\n\nfunction mediate(middleware, tech, method, arg) {\n if (arg === void 0) {\n arg = null;\n }\n\n var callMethod = 'call' + toTitleCase(method);\n var middlewareValue = middleware.reduce(middlewareIterator(callMethod), arg);\n var terminated = middlewareValue === TERMINATOR; // deprecated. The `null` return value should instead return TERMINATOR to\n // prevent confusion if a techs method actually returns null.\n\n var returnValue = terminated ? null : tech[method](middlewareValue);\n executeRight(middleware, method, returnValue, terminated);\n return returnValue;\n}\n/**\n * Enumeration of allowed getters where the keys are method names.\n *\n * @type {Object}\n */\n\n\nvar allowedGetters = {\n buffered: 1,\n currentTime: 1,\n duration: 1,\n seekable: 1,\n played: 1,\n paused: 1,\n volume: 1\n};\n/**\n * Enumeration of allowed setters where the keys are method names.\n *\n * @type {Object}\n */\n\nvar allowedSetters = {\n setCurrentTime: 1,\n setVolume: 1\n};\n/**\n * Enumeration of allowed mediators where the keys are method names.\n *\n * @type {Object}\n */\n\nvar allowedMediators = {\n play: 1,\n pause: 1\n};\n\nfunction middlewareIterator(method) {\n return function (value, mw) {\n // if the previous middleware terminated, pass along the termination\n if (value === TERMINATOR) {\n return TERMINATOR;\n }\n\n if (mw[method]) {\n return mw[method](value);\n }\n\n return value;\n };\n}\n\nfunction executeRight(mws, method, value, terminated) {\n for (var i = mws.length - 1; i >= 0; i--) {\n var mw = mws[i];\n\n if (mw[method]) {\n mw[method](terminated, value);\n }\n }\n}\n/**\n * Clear the middleware cache for a player.\n *\n * @param {Player} player\n * A {@link Player} instance.\n */\n\n\nfunction clearCacheForPlayer(player) {\n middlewareInstances[player.id()] = null;\n}\n/**\n * {\n * [playerId]: [[mwFactory, mwInstance], ...]\n * }\n *\n * @private\n */\n\n\nfunction getOrCreateFactory(player, mwFactory) {\n var mws = middlewareInstances[player.id()];\n var mw = null;\n\n if (mws === undefined || mws === null) {\n mw = mwFactory(player);\n middlewareInstances[player.id()] = [[mwFactory, mw]];\n return mw;\n }\n\n for (var i = 0; i < mws.length; i++) {\n var _mws$i = mws[i],\n mwf = _mws$i[0],\n mwi = _mws$i[1];\n\n if (mwf !== mwFactory) {\n continue;\n }\n\n mw = mwi;\n }\n\n if (mw === null) {\n mw = mwFactory(player);\n mws.push([mwFactory, mw]);\n }\n\n return mw;\n}\n\nfunction setSourceHelper(src, middleware, next, player, acc, lastRun) {\n if (src === void 0) {\n src = {};\n }\n\n if (middleware === void 0) {\n middleware = [];\n }\n\n if (acc === void 0) {\n acc = [];\n }\n\n if (lastRun === void 0) {\n lastRun = false;\n }\n\n var _middleware = middleware,\n mwFactory = _middleware[0],\n mwrest = _middleware.slice(1); // if mwFactory is a string, then we're at a fork in the road\n\n\n if (typeof mwFactory === 'string') {\n setSourceHelper(src, middlewares[mwFactory], next, player, acc, lastRun); // if we have an mwFactory, call it with the player to get the mw,\n // then call the mw's setSource method\n } else if (mwFactory) {\n var mw = getOrCreateFactory(player, mwFactory); // if setSource isn't present, implicitly select this middleware\n\n if (!mw.setSource) {\n acc.push(mw);\n return setSourceHelper(src, mwrest, next, player, acc, lastRun);\n }\n\n mw.setSource(assign({}, src), function (err, _src) {\n // something happened, try the next middleware on the current level\n // make sure to use the old src\n if (err) {\n return setSourceHelper(src, mwrest, next, player, acc, lastRun);\n } // we've succeeded, now we need to go deeper\n\n\n acc.push(mw); // if it's the same type, continue down the current chain\n // otherwise, we want to go down the new chain\n\n setSourceHelper(_src, src.type === _src.type ? mwrest : middlewares[_src.type], next, player, acc, lastRun);\n });\n } else if (mwrest.length) {\n setSourceHelper(src, mwrest, next, player, acc, lastRun);\n } else if (lastRun) {\n next(src, acc);\n } else {\n setSourceHelper(src, middlewares['*'], next, player, acc, true);\n }\n}\n/**\n * Mimetypes\n *\n * @see http://hul.harvard.edu/ois/////systems/wax/wax-public-help/mimetypes.htm\n * @typedef Mimetypes~Kind\n * @enum\n */\n\n\nvar MimetypesKind = {\n opus: 'video/ogg',\n ogv: 'video/ogg',\n mp4: 'video/mp4',\n mov: 'video/mp4',\n m4v: 'video/mp4',\n mkv: 'video/x-matroska',\n m4a: 'audio/mp4',\n mp3: 'audio/mpeg',\n aac: 'audio/aac',\n oga: 'audio/ogg',\n m3u8: 'application/x-mpegURL',\n jpg: 'image/jpeg',\n jpeg: 'image/jpeg',\n gif: 'image/gif',\n png: 'image/png',\n svg: 'image/svg+xml',\n webp: 'image/webp'\n};\n/**\n * Get the mimetype of a given src url if possible\n *\n * @param {string} src\n * The url to the src\n *\n * @return {string}\n * return the mimetype if it was known or empty string otherwise\n */\n\nvar getMimetype = function getMimetype(src) {\n if (src === void 0) {\n src = '';\n }\n\n var ext = getFileExtension(src);\n var mimetype = MimetypesKind[ext.toLowerCase()];\n return mimetype || '';\n};\n/**\n * Find the mime type of a given source string if possible. Uses the player\n * source cache.\n *\n * @param {Player} player\n * The player object\n *\n * @param {string} src\n * The source string\n *\n * @return {string}\n * The type that was found\n */\n\n\nvar findMimetype = function findMimetype(player, src) {\n if (!src) {\n return '';\n } // 1. check for the type in the `source` cache\n\n\n if (player.cache_.source.src === src && player.cache_.source.type) {\n return player.cache_.source.type;\n } // 2. see if we have this source in our `currentSources` cache\n\n\n var matchingSources = player.cache_.sources.filter(function (s) {\n return s.src === src;\n });\n\n if (matchingSources.length) {\n return matchingSources[0].type;\n } // 3. look for the src url in source elements and use the type there\n\n\n var sources = player.$$('source');\n\n for (var i = 0; i < sources.length; i++) {\n var s = sources[i];\n\n if (s.type && s.src && s.src === src) {\n return s.type;\n }\n } // 4. finally fallback to our list of mime types based on src url extension\n\n\n return getMimetype(src);\n};\n/**\n * @module filter-source\n */\n\n/**\n * Filter out single bad source objects or multiple source objects in an\n * array. Also flattens nested source object arrays into a 1 dimensional\n * array of source objects.\n *\n * @param {Tech~SourceObject|Tech~SourceObject[]} src\n * The src object to filter\n *\n * @return {Tech~SourceObject[]}\n * An array of sourceobjects containing only valid sources\n *\n * @private\n */\n\n\nvar filterSource = function filterSource(src) {\n // traverse array\n if (Array.isArray(src)) {\n var newsrc = [];\n src.forEach(function (srcobj) {\n srcobj = filterSource(srcobj);\n\n if (Array.isArray(srcobj)) {\n newsrc = newsrc.concat(srcobj);\n } else if (isObject(srcobj)) {\n newsrc.push(srcobj);\n }\n });\n src = newsrc;\n } else if (typeof src === 'string' && src.trim()) {\n // convert string into object\n src = [fixSource({\n src: src\n })];\n } else if (isObject(src) && typeof src.src === 'string' && src.src && src.src.trim()) {\n // src is already valid\n src = [fixSource(src)];\n } else {\n // invalid source, turn it into an empty array\n src = [];\n }\n\n return src;\n};\n/**\n * Checks src mimetype, adding it when possible\n *\n * @param {Tech~SourceObject} src\n * The src object to check\n * @return {Tech~SourceObject}\n * src Object with known type\n */\n\n\nfunction fixSource(src) {\n if (!src.type) {\n var mimetype = getMimetype(src.src);\n\n if (mimetype) {\n src.type = mimetype;\n }\n }\n\n return src;\n}\n/**\n * The `MediaLoader` is the `Component` that decides which playback technology to load\n * when a player is initialized.\n *\n * @extends Component\n */\n\n\nvar MediaLoader =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(MediaLoader, _Component);\n /**\n * Create an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should attach to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {Component~ReadyCallback} [ready]\n * The function that is run when this component is ready.\n */\n\n\n function MediaLoader(player, options, ready) {\n var _this; // MediaLoader has no element\n\n\n var options_ = mergeOptions({\n createEl: false\n }, options);\n _this = _Component.call(this, player, options_, ready) || this; // If there are no sources when the player is initialized,\n // load the first supported playback technology.\n\n if (!options.playerOptions.sources || options.playerOptions.sources.length === 0) {\n for (var i = 0, j = options.playerOptions.techOrder; i < j.length; i++) {\n var techName = toTitleCase(j[i]);\n var tech = Tech.getTech(techName); // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n\n if (!techName) {\n tech = Component.getComponent(techName);\n } // Check if the browser supports this technology\n\n\n if (tech && tech.isSupported()) {\n player.loadTech_(techName);\n break;\n }\n }\n } else {\n // Loop through playback technologies (HTML5, Flash) and check for support.\n // Then load the best source.\n // A few assumptions here:\n // All playback technologies respect preload false.\n player.src(options.playerOptions.sources);\n }\n\n return _this;\n }\n\n return MediaLoader;\n}(Component);\n\nComponent.registerComponent('MediaLoader', MediaLoader);\n/**\n * Component which is clickable or keyboard actionable, but is not a\n * native HTML button.\n *\n * @extends Component\n */\n\nvar ClickableComponent =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(ClickableComponent, _Component);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function ClickableComponent(player, options) {\n var _this;\n\n _this = _Component.call(this, player, options) || this;\n\n _this.emitTapEvents();\n\n _this.enable();\n\n return _this;\n }\n /**\n * Create the `ClickableComponent`s DOM element.\n *\n * @param {string} [tag=div]\n * The element's node type.\n *\n * @param {Object} [props={}]\n * An object of properties that should be set on the element.\n *\n * @param {Object} [attributes={}]\n * An object of attributes that should be set on the element.\n *\n * @return {Element}\n * The element that gets created.\n */\n\n\n var _proto = ClickableComponent.prototype;\n\n _proto.createEl = function createEl(tag, props, attributes) {\n if (tag === void 0) {\n tag = 'div';\n }\n\n if (props === void 0) {\n props = {};\n }\n\n if (attributes === void 0) {\n attributes = {};\n }\n\n props = assign({\n innerHTML: '<span aria-hidden=\"true\" class=\"vjs-icon-placeholder\"></span>',\n className: this.buildCSSClass(),\n tabIndex: 0\n }, props);\n\n if (tag === 'button') {\n log.error(\"Creating a ClickableComponent with an HTML element of \" + tag + \" is not supported; use a Button instead.\");\n } // Add ARIA attributes for clickable element which is not a native HTML button\n\n\n attributes = assign({\n role: 'button'\n }, attributes);\n this.tabIndex_ = props.tabIndex;\n\n var el = _Component.prototype.createEl.call(this, tag, props, attributes);\n\n this.createControlTextEl(el);\n return el;\n };\n\n _proto.dispose = function dispose() {\n // remove controlTextEl_ on dispose\n this.controlTextEl_ = null;\n\n _Component.prototype.dispose.call(this);\n }\n /**\n * Create a control text element on this `ClickableComponent`\n *\n * @param {Element} [el]\n * Parent element for the control text.\n *\n * @return {Element}\n * The control text element that gets created.\n */\n ;\n\n _proto.createControlTextEl = function createControlTextEl(el) {\n this.controlTextEl_ = createEl('span', {\n className: 'vjs-control-text'\n }, {\n // let the screen reader user know that the text of the element may change\n 'aria-live': 'polite'\n });\n\n if (el) {\n el.appendChild(this.controlTextEl_);\n }\n\n this.controlText(this.controlText_, el);\n return this.controlTextEl_;\n }\n /**\n * Get or set the localize text to use for the controls on the `ClickableComponent`.\n *\n * @param {string} [text]\n * Control text for element.\n *\n * @param {Element} [el=this.el()]\n * Element to set the title on.\n *\n * @return {string}\n * - The control text when getting\n */\n ;\n\n _proto.controlText = function controlText(text, el) {\n if (el === void 0) {\n el = this.el();\n }\n\n if (text === undefined) {\n return this.controlText_ || 'Need Text';\n }\n\n var localizedText = this.localize(text);\n this.controlText_ = text;\n textContent(this.controlTextEl_, localizedText);\n\n if (!this.nonIconControl) {\n // Set title attribute if only an icon is shown\n el.setAttribute('title', localizedText);\n }\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n ;\n\n _proto.buildCSSClass = function buildCSSClass() {\n return \"vjs-control vjs-button \" + _Component.prototype.buildCSSClass.call(this);\n }\n /**\n * Enable this `ClickableComponent`\n */\n ;\n\n _proto.enable = function enable() {\n if (!this.enabled_) {\n this.enabled_ = true;\n this.removeClass('vjs-disabled');\n this.el_.setAttribute('aria-disabled', 'false');\n\n if (typeof this.tabIndex_ !== 'undefined') {\n this.el_.setAttribute('tabIndex', this.tabIndex_);\n }\n\n this.on(['tap', 'click'], this.handleClick);\n this.on('keydown', this.handleKeyDown);\n }\n }\n /**\n * Disable this `ClickableComponent`\n */\n ;\n\n _proto.disable = function disable() {\n this.enabled_ = false;\n this.addClass('vjs-disabled');\n this.el_.setAttribute('aria-disabled', 'true');\n\n if (typeof this.tabIndex_ !== 'undefined') {\n this.el_.removeAttribute('tabIndex');\n }\n\n this.off('mouseover', this.handleMouseOver);\n this.off('mouseout', this.handleMouseOut);\n this.off(['tap', 'click'], this.handleClick);\n this.off('keydown', this.handleKeyDown);\n }\n /**\n * Event handler that is called when a `ClickableComponent` receives a\n * `click` or `tap` event.\n *\n * @param {EventTarget~Event} event\n * The `tap` or `click` event that caused this function to be called.\n *\n * @listens tap\n * @listens click\n * @abstract\n */\n ;\n\n _proto.handleClick = function handleClick(event) {}\n /**\n * Event handler that is called when a `ClickableComponent` receives a\n * `keydown` event.\n *\n * By default, if the key is Space or Enter, it will trigger a `click` event.\n *\n * @param {EventTarget~Event} event\n * The `keydown` event that caused this function to be called.\n *\n * @listens keydown\n */\n ;\n\n _proto.handleKeyDown = function handleKeyDown(event) {\n // Support Space or Enter key operation to fire a click event. Also,\n // prevent the event from propagating through the DOM and triggering\n // Player hotkeys.\n if (keycode.isEventKey(event, 'Space') || keycode.isEventKey(event, 'Enter')) {\n event.preventDefault();\n event.stopPropagation();\n this.trigger('click');\n } else {\n // Pass keypress handling up for unsupported keys\n _Component.prototype.handleKeyDown.call(this, event);\n }\n };\n\n return ClickableComponent;\n}(Component);\n\nComponent.registerComponent('ClickableComponent', ClickableComponent);\n/**\n * A `ClickableComponent` that handles showing the poster image for the player.\n *\n * @extends ClickableComponent\n */\n\nvar PosterImage =\n/*#__PURE__*/\nfunction (_ClickableComponent) {\n _inheritsLoose(PosterImage, _ClickableComponent);\n /**\n * Create an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should attach to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function PosterImage(player, options) {\n var _this;\n\n _this = _ClickableComponent.call(this, player, options) || this;\n\n _this.update();\n\n player.on('posterchange', bind(_assertThisInitialized(_this), _this.update));\n return _this;\n }\n /**\n * Clean up and dispose of the `PosterImage`.\n */\n\n\n var _proto = PosterImage.prototype;\n\n _proto.dispose = function dispose() {\n this.player().off('posterchange', this.update);\n\n _ClickableComponent.prototype.dispose.call(this);\n }\n /**\n * Create the `PosterImage`s DOM element.\n *\n * @return {Element}\n * The element that gets created.\n */\n ;\n\n _proto.createEl = function createEl$1() {\n var el = createEl('div', {\n className: 'vjs-poster',\n // Don't want poster to be tabbable.\n tabIndex: -1\n });\n return el;\n }\n /**\n * An {@link EventTarget~EventListener} for {@link Player#posterchange} events.\n *\n * @listens Player#posterchange\n *\n * @param {EventTarget~Event} [event]\n * The `Player#posterchange` event that triggered this function.\n */\n ;\n\n _proto.update = function update(event) {\n var url = this.player().poster();\n this.setSrc(url); // If there's no poster source we should display:none on this component\n // so it's not still clickable or right-clickable\n\n if (url) {\n this.show();\n } else {\n this.hide();\n }\n }\n /**\n * Set the source of the `PosterImage` depending on the display method.\n *\n * @param {string} url\n * The URL to the source for the `PosterImage`.\n */\n ;\n\n _proto.setSrc = function setSrc(url) {\n var backgroundImage = ''; // Any falsy value should stay as an empty string, otherwise\n // this will throw an extra error\n\n if (url) {\n backgroundImage = \"url(\\\"\" + url + \"\\\")\";\n }\n\n this.el_.style.backgroundImage = backgroundImage;\n }\n /**\n * An {@link EventTarget~EventListener} for clicks on the `PosterImage`. See\n * {@link ClickableComponent#handleClick} for instances where this will be triggered.\n *\n * @listens tap\n * @listens click\n * @listens keydown\n *\n * @param {EventTarget~Event} event\n + The `click`, `tap` or `keydown` event that caused this function to be called.\n */\n ;\n\n _proto.handleClick = function handleClick(event) {\n // We don't want a click to trigger playback when controls are disabled\n if (!this.player_.controls()) {\n return;\n }\n\n if (this.player_.tech(true)) {\n this.player_.tech(true).focus();\n }\n\n if (this.player_.paused()) {\n silencePromise(this.player_.play());\n } else {\n this.player_.pause();\n }\n };\n\n return PosterImage;\n}(ClickableComponent);\n\nComponent.registerComponent('PosterImage', PosterImage);\nvar darkGray = '#222';\nvar lightGray = '#ccc';\nvar fontMap = {\n monospace: 'monospace',\n sansSerif: 'sans-serif',\n serif: 'serif',\n monospaceSansSerif: '\"Andale Mono\", \"Lucida Console\", monospace',\n monospaceSerif: '\"Courier New\", monospace',\n proportionalSansSerif: 'sans-serif',\n proportionalSerif: 'serif',\n casual: '\"Comic Sans MS\", Impact, fantasy',\n script: '\"Monotype Corsiva\", cursive',\n smallcaps: '\"Andale Mono\", \"Lucida Console\", monospace, sans-serif'\n};\n/**\n * Construct an rgba color from a given hex color code.\n *\n * @param {number} color\n * Hex number for color, like #f0e or #f604e2.\n *\n * @param {number} opacity\n * Value for opacity, 0.0 - 1.0.\n *\n * @return {string}\n * The rgba color that was created, like 'rgba(255, 0, 0, 0.3)'.\n */\n\nfunction constructColor(color, opacity) {\n var hex;\n\n if (color.length === 4) {\n // color looks like \"#f0e\"\n hex = color[1] + color[1] + color[2] + color[2] + color[3] + color[3];\n } else if (color.length === 7) {\n // color looks like \"#f604e2\"\n hex = color.slice(1);\n } else {\n throw new Error('Invalid color code provided, ' + color + '; must be formatted as e.g. #f0e or #f604e2.');\n }\n\n return 'rgba(' + parseInt(hex.slice(0, 2), 16) + ',' + parseInt(hex.slice(2, 4), 16) + ',' + parseInt(hex.slice(4, 6), 16) + ',' + opacity + ')';\n}\n/**\n * Try to update the style of a DOM element. Some style changes will throw an error,\n * particularly in IE8. Those should be noops.\n *\n * @param {Element} el\n * The DOM element to be styled.\n *\n * @param {string} style\n * The CSS property on the element that should be styled.\n *\n * @param {string} rule\n * The style rule that should be applied to the property.\n *\n * @private\n */\n\n\nfunction tryUpdateStyle(el, style, rule) {\n try {\n el.style[style] = rule;\n } catch (e) {\n // Satisfies linter.\n return;\n }\n}\n/**\n * The component for displaying text track cues.\n *\n * @extends Component\n */\n\n\nvar TextTrackDisplay =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(TextTrackDisplay, _Component);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {Component~ReadyCallback} [ready]\n * The function to call when `TextTrackDisplay` is ready.\n */\n\n\n function TextTrackDisplay(player, options, ready) {\n var _this;\n\n _this = _Component.call(this, player, options, ready) || this;\n var updateDisplayHandler = bind(_assertThisInitialized(_this), _this.updateDisplay);\n player.on('loadstart', bind(_assertThisInitialized(_this), _this.toggleDisplay));\n player.on('texttrackchange', updateDisplayHandler);\n player.on('loadedmetadata', bind(_assertThisInitialized(_this), _this.preselectTrack)); // This used to be called during player init, but was causing an error\n // if a track should show by default and the display hadn't loaded yet.\n // Should probably be moved to an external track loader when we support\n // tracks that don't need a display.\n\n player.ready(bind(_assertThisInitialized(_this), function () {\n if (player.tech_ && player.tech_.featuresNativeTextTracks) {\n this.hide();\n return;\n }\n\n player.on('fullscreenchange', updateDisplayHandler);\n player.on('playerresize', updateDisplayHandler);\n window$1.addEventListener('orientationchange', updateDisplayHandler);\n player.on('dispose', function () {\n return window$1.removeEventListener('orientationchange', updateDisplayHandler);\n });\n var tracks = this.options_.playerOptions.tracks || [];\n\n for (var i = 0; i < tracks.length; i++) {\n this.player_.addRemoteTextTrack(tracks[i], true);\n }\n\n this.preselectTrack();\n }));\n return _this;\n }\n /**\n * Preselect a track following this precedence:\n * - matches the previously selected {@link TextTrack}'s language and kind\n * - matches the previously selected {@link TextTrack}'s language only\n * - is the first default captions track\n * - is the first default descriptions track\n *\n * @listens Player#loadstart\n */\n\n\n var _proto = TextTrackDisplay.prototype;\n\n _proto.preselectTrack = function preselectTrack() {\n var modes = {\n captions: 1,\n subtitles: 1\n };\n var trackList = this.player_.textTracks();\n var userPref = this.player_.cache_.selectedLanguage;\n var firstDesc;\n var firstCaptions;\n var preferredTrack;\n\n for (var i = 0; i < trackList.length; i++) {\n var track = trackList[i];\n\n if (userPref && userPref.enabled && userPref.language && userPref.language === track.language && track.kind in modes) {\n // Always choose the track that matches both language and kind\n if (track.kind === userPref.kind) {\n preferredTrack = track; // or choose the first track that matches language\n } else if (!preferredTrack) {\n preferredTrack = track;\n } // clear everything if offTextTrackMenuItem was clicked\n\n } else if (userPref && !userPref.enabled) {\n preferredTrack = null;\n firstDesc = null;\n firstCaptions = null;\n } else if (track[\"default\"]) {\n if (track.kind === 'descriptions' && !firstDesc) {\n firstDesc = track;\n } else if (track.kind in modes && !firstCaptions) {\n firstCaptions = track;\n }\n }\n } // The preferredTrack matches the user preference and takes\n // precedence over all the other tracks.\n // So, display the preferredTrack before the first default track\n // and the subtitles/captions track before the descriptions track\n\n\n if (preferredTrack) {\n preferredTrack.mode = 'showing';\n } else if (firstCaptions) {\n firstCaptions.mode = 'showing';\n } else if (firstDesc) {\n firstDesc.mode = 'showing';\n }\n }\n /**\n * Turn display of {@link TextTrack}'s from the current state into the other state.\n * There are only two states:\n * - 'shown'\n * - 'hidden'\n *\n * @listens Player#loadstart\n */\n ;\n\n _proto.toggleDisplay = function toggleDisplay() {\n if (this.player_.tech_ && this.player_.tech_.featuresNativeTextTracks) {\n this.hide();\n } else {\n this.show();\n }\n }\n /**\n * Create the {@link Component}'s DOM element.\n *\n * @return {Element}\n * The element that was created.\n */\n ;\n\n _proto.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-text-track-display'\n }, {\n 'aria-live': 'off',\n 'aria-atomic': 'true'\n });\n }\n /**\n * Clear all displayed {@link TextTrack}s.\n */\n ;\n\n _proto.clearDisplay = function clearDisplay() {\n if (typeof window$1.WebVTT === 'function') {\n window$1.WebVTT.processCues(window$1, [], this.el_);\n }\n }\n /**\n * Update the displayed TextTrack when a either a {@link Player#texttrackchange} or\n * a {@link Player#fullscreenchange} is fired.\n *\n * @listens Player#texttrackchange\n * @listens Player#fullscreenchange\n */\n ;\n\n _proto.updateDisplay = function updateDisplay() {\n var tracks = this.player_.textTracks();\n var allowMultipleShowingTracks = this.options_.allowMultipleShowingTracks;\n this.clearDisplay();\n\n if (allowMultipleShowingTracks) {\n var showingTracks = [];\n\n for (var _i = 0; _i < tracks.length; ++_i) {\n var track = tracks[_i];\n\n if (track.mode !== 'showing') {\n continue;\n }\n\n showingTracks.push(track);\n }\n\n this.updateForTrack(showingTracks);\n return;\n } // Track display prioritization model: if multiple tracks are 'showing',\n // display the first 'subtitles' or 'captions' track which is 'showing',\n // otherwise display the first 'descriptions' track which is 'showing'\n\n\n var descriptionsTrack = null;\n var captionsSubtitlesTrack = null;\n var i = tracks.length;\n\n while (i--) {\n var _track = tracks[i];\n\n if (_track.mode === 'showing') {\n if (_track.kind === 'descriptions') {\n descriptionsTrack = _track;\n } else {\n captionsSubtitlesTrack = _track;\n }\n }\n }\n\n if (captionsSubtitlesTrack) {\n if (this.getAttribute('aria-live') !== 'off') {\n this.setAttribute('aria-live', 'off');\n }\n\n this.updateForTrack(captionsSubtitlesTrack);\n } else if (descriptionsTrack) {\n if (this.getAttribute('aria-live') !== 'assertive') {\n this.setAttribute('aria-live', 'assertive');\n }\n\n this.updateForTrack(descriptionsTrack);\n }\n }\n /**\n * Style {@Link TextTrack} activeCues according to {@Link TextTrackSettings}.\n *\n * @param {TextTrack} track\n * Text track object containing active cues to style.\n */\n ;\n\n _proto.updateDisplayState = function updateDisplayState(track) {\n var overrides = this.player_.textTrackSettings.getValues();\n var cues = track.activeCues;\n var i = cues.length;\n\n while (i--) {\n var cue = cues[i];\n\n if (!cue) {\n continue;\n }\n\n var cueDiv = cue.displayState;\n\n if (overrides.color) {\n cueDiv.firstChild.style.color = overrides.color;\n }\n\n if (overrides.textOpacity) {\n tryUpdateStyle(cueDiv.firstChild, 'color', constructColor(overrides.color || '#fff', overrides.textOpacity));\n }\n\n if (overrides.backgroundColor) {\n cueDiv.firstChild.style.backgroundColor = overrides.backgroundColor;\n }\n\n if (overrides.backgroundOpacity) {\n tryUpdateStyle(cueDiv.firstChild, 'backgroundColor', constructColor(overrides.backgroundColor || '#000', overrides.backgroundOpacity));\n }\n\n if (overrides.windowColor) {\n if (overrides.windowOpacity) {\n tryUpdateStyle(cueDiv, 'backgroundColor', constructColor(overrides.windowColor, overrides.windowOpacity));\n } else {\n cueDiv.style.backgroundColor = overrides.windowColor;\n }\n }\n\n if (overrides.edgeStyle) {\n if (overrides.edgeStyle === 'dropshadow') {\n cueDiv.firstChild.style.textShadow = \"2px 2px 3px \" + darkGray + \", 2px 2px 4px \" + darkGray + \", 2px 2px 5px \" + darkGray;\n } else if (overrides.edgeStyle === 'raised') {\n cueDiv.firstChild.style.textShadow = \"1px 1px \" + darkGray + \", 2px 2px \" + darkGray + \", 3px 3px \" + darkGray;\n } else if (overrides.edgeStyle === 'depressed') {\n cueDiv.firstChild.style.textShadow = \"1px 1px \" + lightGray + \", 0 1px \" + lightGray + \", -1px -1px \" + darkGray + \", 0 -1px \" + darkGray;\n } else if (overrides.edgeStyle === 'uniform') {\n cueDiv.firstChild.style.textShadow = \"0 0 4px \" + darkGray + \", 0 0 4px \" + darkGray + \", 0 0 4px \" + darkGray + \", 0 0 4px \" + darkGray;\n }\n }\n\n if (overrides.fontPercent && overrides.fontPercent !== 1) {\n var fontSize = window$1.parseFloat(cueDiv.style.fontSize);\n cueDiv.style.fontSize = fontSize * overrides.fontPercent + 'px';\n cueDiv.style.height = 'auto';\n cueDiv.style.top = 'auto';\n cueDiv.style.bottom = '2px';\n }\n\n if (overrides.fontFamily && overrides.fontFamily !== 'default') {\n if (overrides.fontFamily === 'small-caps') {\n cueDiv.firstChild.style.fontVariant = 'small-caps';\n } else {\n cueDiv.firstChild.style.fontFamily = fontMap[overrides.fontFamily];\n }\n }\n }\n }\n /**\n * Add an {@link TextTrack} to to the {@link Tech}s {@link TextTrackList}.\n *\n * @param {TextTrack|TextTrack[]} tracks\n * Text track object or text track array to be added to the list.\n */\n ;\n\n _proto.updateForTrack = function updateForTrack(tracks) {\n if (!Array.isArray(tracks)) {\n tracks = [tracks];\n }\n\n if (typeof window$1.WebVTT !== 'function' || tracks.every(function (track) {\n return !track.activeCues;\n })) {\n return;\n }\n\n var cues = []; // push all active track cues\n\n for (var i = 0; i < tracks.length; ++i) {\n var track = tracks[i];\n\n for (var j = 0; j < track.activeCues.length; ++j) {\n cues.push(track.activeCues[j]);\n }\n } // removes all cues before it processes new ones\n\n\n window$1.WebVTT.processCues(window$1, cues, this.el_); // add unique class to each language text track & add settings styling if necessary\n\n for (var _i2 = 0; _i2 < tracks.length; ++_i2) {\n var _track2 = tracks[_i2];\n\n for (var _j = 0; _j < _track2.activeCues.length; ++_j) {\n var cueEl = _track2.activeCues[_j].displayState;\n addClass(cueEl, 'vjs-text-track-cue');\n addClass(cueEl, 'vjs-text-track-cue-' + (_track2.language ? _track2.language : _i2));\n }\n\n if (this.player_.textTrackSettings) {\n this.updateDisplayState(_track2);\n }\n }\n };\n\n return TextTrackDisplay;\n}(Component);\n\nComponent.registerComponent('TextTrackDisplay', TextTrackDisplay);\n/**\n * A loading spinner for use during waiting/loading events.\n *\n * @extends Component\n */\n\nvar LoadingSpinner =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(LoadingSpinner, _Component);\n\n function LoadingSpinner() {\n return _Component.apply(this, arguments) || this;\n }\n\n var _proto = LoadingSpinner.prototype;\n /**\n * Create the `LoadingSpinner`s DOM element.\n *\n * @return {Element}\n * The dom element that gets created.\n */\n\n _proto.createEl = function createEl$1() {\n var isAudio = this.player_.isAudio();\n var playerType = this.localize(isAudio ? 'Audio Player' : 'Video Player');\n var controlText = createEl('span', {\n className: 'vjs-control-text',\n innerHTML: this.localize('{1} is loading.', [playerType])\n });\n\n var el = _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-loading-spinner',\n dir: 'ltr'\n });\n\n el.appendChild(controlText);\n return el;\n };\n\n return LoadingSpinner;\n}(Component);\n\nComponent.registerComponent('LoadingSpinner', LoadingSpinner);\n/**\n * Base class for all buttons.\n *\n * @extends ClickableComponent\n */\n\nvar Button =\n/*#__PURE__*/\nfunction (_ClickableComponent) {\n _inheritsLoose(Button, _ClickableComponent);\n\n function Button() {\n return _ClickableComponent.apply(this, arguments) || this;\n }\n\n var _proto = Button.prototype;\n /**\n * Create the `Button`s DOM element.\n *\n * @param {string} [tag=\"button\"]\n * The element's node type. This argument is IGNORED: no matter what\n * is passed, it will always create a `button` element.\n *\n * @param {Object} [props={}]\n * An object of properties that should be set on the element.\n *\n * @param {Object} [attributes={}]\n * An object of attributes that should be set on the element.\n *\n * @return {Element}\n * The element that gets created.\n */\n\n _proto.createEl = function createEl(tag, props, attributes) {\n if (props === void 0) {\n props = {};\n }\n\n if (attributes === void 0) {\n attributes = {};\n }\n\n tag = 'button';\n props = assign({\n innerHTML: '<span aria-hidden=\"true\" class=\"vjs-icon-placeholder\"></span>',\n className: this.buildCSSClass()\n }, props); // Add attributes for button element\n\n attributes = assign({\n // Necessary since the default button type is \"submit\"\n type: 'button'\n }, attributes);\n var el = Component.prototype.createEl.call(this, tag, props, attributes);\n this.createControlTextEl(el);\n return el;\n }\n /**\n * Add a child `Component` inside of this `Button`.\n *\n * @param {string|Component} child\n * The name or instance of a child to add.\n *\n * @param {Object} [options={}]\n * The key/value store of options that will get passed to children of\n * the child.\n *\n * @return {Component}\n * The `Component` that gets added as a child. When using a string the\n * `Component` will get created by this process.\n *\n * @deprecated since version 5\n */\n ;\n\n _proto.addChild = function addChild(child, options) {\n if (options === void 0) {\n options = {};\n }\n\n var className = this.constructor.name;\n log.warn(\"Adding an actionable (user controllable) child to a Button (\" + className + \") is not supported; use a ClickableComponent instead.\"); // Avoid the error message generated by ClickableComponent's addChild method\n\n return Component.prototype.addChild.call(this, child, options);\n }\n /**\n * Enable the `Button` element so that it can be activated or clicked. Use this with\n * {@link Button#disable}.\n */\n ;\n\n _proto.enable = function enable() {\n _ClickableComponent.prototype.enable.call(this);\n\n this.el_.removeAttribute('disabled');\n }\n /**\n * Disable the `Button` element so that it cannot be activated or clicked. Use this with\n * {@link Button#enable}.\n */\n ;\n\n _proto.disable = function disable() {\n _ClickableComponent.prototype.disable.call(this);\n\n this.el_.setAttribute('disabled', 'disabled');\n }\n /**\n * This gets called when a `Button` has focus and `keydown` is triggered via a key\n * press.\n *\n * @param {EventTarget~Event} event\n * The event that caused this function to get called.\n *\n * @listens keydown\n */\n ;\n\n _proto.handleKeyDown = function handleKeyDown(event) {\n // Ignore Space or Enter key operation, which is handled by the browser for\n // a button - though not for its super class, ClickableComponent. Also,\n // prevent the event from propagating through the DOM and triggering Player\n // hotkeys. We do not preventDefault here because we _want_ the browser to\n // handle it.\n if (keycode.isEventKey(event, 'Space') || keycode.isEventKey(event, 'Enter')) {\n event.stopPropagation();\n return;\n } // Pass keypress handling up for unsupported keys\n\n\n _ClickableComponent.prototype.handleKeyDown.call(this, event);\n };\n\n return Button;\n}(ClickableComponent);\n\nComponent.registerComponent('Button', Button);\n/**\n * The initial play button that shows before the video has played. The hiding of the\n * `BigPlayButton` get done via CSS and `Player` states.\n *\n * @extends Button\n */\n\nvar BigPlayButton =\n/*#__PURE__*/\nfunction (_Button) {\n _inheritsLoose(BigPlayButton, _Button);\n\n function BigPlayButton(player, options) {\n var _this;\n\n _this = _Button.call(this, player, options) || this;\n _this.mouseused_ = false;\n\n _this.on('mousedown', _this.handleMouseDown);\n\n return _this;\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object. Always returns 'vjs-big-play-button'.\n */\n\n\n var _proto = BigPlayButton.prototype;\n\n _proto.buildCSSClass = function buildCSSClass() {\n return 'vjs-big-play-button';\n }\n /**\n * This gets called when a `BigPlayButton` \"clicked\". See {@link ClickableComponent}\n * for more detailed information on what a click can be.\n *\n * @param {EventTarget~Event} event\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n ;\n\n _proto.handleClick = function handleClick(event) {\n var playPromise = this.player_.play(); // exit early if clicked via the mouse\n\n if (this.mouseused_ && event.clientX && event.clientY) {\n silencePromise(playPromise);\n\n if (this.player_.tech(true)) {\n this.player_.tech(true).focus();\n }\n\n return;\n }\n\n var cb = this.player_.getChild('controlBar');\n var playToggle = cb && cb.getChild('playToggle');\n\n if (!playToggle) {\n this.player_.tech(true).focus();\n return;\n }\n\n var playFocus = function playFocus() {\n return playToggle.focus();\n };\n\n if (isPromise(playPromise)) {\n playPromise.then(playFocus, function () {});\n } else {\n this.setTimeout(playFocus, 1);\n }\n };\n\n _proto.handleKeyDown = function handleKeyDown(event) {\n this.mouseused_ = false;\n\n _Button.prototype.handleKeyDown.call(this, event);\n };\n\n _proto.handleMouseDown = function handleMouseDown(event) {\n this.mouseused_ = true;\n };\n\n return BigPlayButton;\n}(Button);\n/**\n * The text that should display over the `BigPlayButton`s controls. Added to for localization.\n *\n * @type {string}\n * @private\n */\n\n\nBigPlayButton.prototype.controlText_ = 'Play Video';\nComponent.registerComponent('BigPlayButton', BigPlayButton);\n/**\n * The `CloseButton` is a `{@link Button}` that fires a `close` event when\n * it gets clicked.\n *\n * @extends Button\n */\n\nvar CloseButton =\n/*#__PURE__*/\nfunction (_Button) {\n _inheritsLoose(CloseButton, _Button);\n /**\n * Creates an instance of the this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function CloseButton(player, options) {\n var _this;\n\n _this = _Button.call(this, player, options) || this;\n\n _this.controlText(options && options.controlText || _this.localize('Close'));\n\n return _this;\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n\n\n var _proto = CloseButton.prototype;\n\n _proto.buildCSSClass = function buildCSSClass() {\n return \"vjs-close-button \" + _Button.prototype.buildCSSClass.call(this);\n }\n /**\n * This gets called when a `CloseButton` gets clicked. See\n * {@link ClickableComponent#handleClick} for more information on when\n * this will be triggered\n *\n * @param {EventTarget~Event} event\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n * @fires CloseButton#close\n */\n ;\n\n _proto.handleClick = function handleClick(event) {\n /**\n * Triggered when the a `CloseButton` is clicked.\n *\n * @event CloseButton#close\n * @type {EventTarget~Event}\n *\n * @property {boolean} [bubbles=false]\n * set to false so that the close event does not\n * bubble up to parents if there is no listener\n */\n this.trigger({\n type: 'close',\n bubbles: false\n });\n }\n /**\n * Event handler that is called when a `CloseButton` receives a\n * `keydown` event.\n *\n * By default, if the key is Esc, it will trigger a `click` event.\n *\n * @param {EventTarget~Event} event\n * The `keydown` event that caused this function to be called.\n *\n * @listens keydown\n */\n ;\n\n _proto.handleKeyDown = function handleKeyDown(event) {\n // Esc button will trigger `click` event\n if (keycode.isEventKey(event, 'Esc')) {\n event.preventDefault();\n event.stopPropagation();\n this.trigger('click');\n } else {\n // Pass keypress handling up for unsupported keys\n _Button.prototype.handleKeyDown.call(this, event);\n }\n };\n\n return CloseButton;\n}(Button);\n\nComponent.registerComponent('CloseButton', CloseButton);\n/**\n * Button to toggle between play and pause.\n *\n * @extends Button\n */\n\nvar PlayToggle =\n/*#__PURE__*/\nfunction (_Button) {\n _inheritsLoose(PlayToggle, _Button);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options={}]\n * The key/value store of player options.\n */\n\n\n function PlayToggle(player, options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _Button.call(this, player, options) || this; // show or hide replay icon\n\n options.replay = options.replay === undefined || options.replay;\n\n _this.on(player, 'play', _this.handlePlay);\n\n _this.on(player, 'pause', _this.handlePause);\n\n if (options.replay) {\n _this.on(player, 'ended', _this.handleEnded);\n }\n\n return _this;\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n\n\n var _proto = PlayToggle.prototype;\n\n _proto.buildCSSClass = function buildCSSClass() {\n return \"vjs-play-control \" + _Button.prototype.buildCSSClass.call(this);\n }\n /**\n * This gets called when an `PlayToggle` is \"clicked\". See\n * {@link ClickableComponent} for more detailed information on what a click can be.\n *\n * @param {EventTarget~Event} [event]\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n ;\n\n _proto.handleClick = function handleClick(event) {\n if (this.player_.paused()) {\n this.player_.play();\n } else {\n this.player_.pause();\n }\n }\n /**\n * This gets called once after the video has ended and the user seeks so that\n * we can change the replay button back to a play button.\n *\n * @param {EventTarget~Event} [event]\n * The event that caused this function to run.\n *\n * @listens Player#seeked\n */\n ;\n\n _proto.handleSeeked = function handleSeeked(event) {\n this.removeClass('vjs-ended');\n\n if (this.player_.paused()) {\n this.handlePause(event);\n } else {\n this.handlePlay(event);\n }\n }\n /**\n * Add the vjs-playing class to the element so it can change appearance.\n *\n * @param {EventTarget~Event} [event]\n * The event that caused this function to run.\n *\n * @listens Player#play\n */\n ;\n\n _proto.handlePlay = function handlePlay(event) {\n this.removeClass('vjs-ended');\n this.removeClass('vjs-paused');\n this.addClass('vjs-playing'); // change the button text to \"Pause\"\n\n this.controlText('Pause');\n }\n /**\n * Add the vjs-paused class to the element so it can change appearance.\n *\n * @param {EventTarget~Event} [event]\n * The event that caused this function to run.\n *\n * @listens Player#pause\n */\n ;\n\n _proto.handlePause = function handlePause(event) {\n this.removeClass('vjs-playing');\n this.addClass('vjs-paused'); // change the button text to \"Play\"\n\n this.controlText('Play');\n }\n /**\n * Add the vjs-ended class to the element so it can change appearance\n *\n * @param {EventTarget~Event} [event]\n * The event that caused this function to run.\n *\n * @listens Player#ended\n */\n ;\n\n _proto.handleEnded = function handleEnded(event) {\n this.removeClass('vjs-playing');\n this.addClass('vjs-ended'); // change the button text to \"Replay\"\n\n this.controlText('Replay'); // on the next seek remove the replay button\n\n this.one(this.player_, 'seeked', this.handleSeeked);\n };\n\n return PlayToggle;\n}(Button);\n/**\n * The text that should display over the `PlayToggle`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\n\nPlayToggle.prototype.controlText_ = 'Play';\nComponent.registerComponent('PlayToggle', PlayToggle);\n/**\n * @file format-time.js\n * @module format-time\n */\n\n/**\n * Format seconds as a time string, H:MM:SS or M:SS. Supplying a guide (in\n * seconds) will force a number of leading zeros to cover the length of the\n * guide.\n *\n * @private\n * @param {number} seconds\n * Number of seconds to be turned into a string\n *\n * @param {number} guide\n * Number (in seconds) to model the string after\n *\n * @return {string}\n * Time formatted as H:MM:SS or M:SS\n */\n\nvar defaultImplementation = function defaultImplementation(seconds, guide) {\n seconds = seconds < 0 ? 0 : seconds;\n var s = Math.floor(seconds % 60);\n var m = Math.floor(seconds / 60 % 60);\n var h = Math.floor(seconds / 3600);\n var gm = Math.floor(guide / 60 % 60);\n var gh = Math.floor(guide / 3600); // handle invalid times\n\n if (isNaN(seconds) || seconds === Infinity) {\n // '-' is false for all relational operators (e.g. <, >=) so this setting\n // will add the minimum number of fields specified by the guide\n h = m = s = '-';\n } // Check if we need to show hours\n\n\n h = h > 0 || gh > 0 ? h + ':' : ''; // If hours are showing, we may need to add a leading zero.\n // Always show at least one digit of minutes.\n\n m = ((h || gm >= 10) && m < 10 ? '0' + m : m) + ':'; // Check if leading zero is need for seconds\n\n s = s < 10 ? '0' + s : s;\n return h + m + s;\n}; // Internal pointer to the current implementation.\n\n\nvar implementation = defaultImplementation;\n/**\n * Replaces the default formatTime implementation with a custom implementation.\n *\n * @param {Function} customImplementation\n * A function which will be used in place of the default formatTime\n * implementation. Will receive the current time in seconds and the\n * guide (in seconds) as arguments.\n */\n\nfunction setFormatTime(customImplementation) {\n implementation = customImplementation;\n}\n/**\n * Resets formatTime to the default implementation.\n */\n\n\nfunction resetFormatTime() {\n implementation = defaultImplementation;\n}\n/**\n * Delegates to either the default time formatting function or a custom\n * function supplied via `setFormatTime`.\n *\n * Formats seconds as a time string (H:MM:SS or M:SS). Supplying a\n * guide (in seconds) will force a number of leading zeros to cover the\n * length of the guide.\n *\n * @static\n * @example formatTime(125, 600) === \"02:05\"\n * @param {number} seconds\n * Number of seconds to be turned into a string\n *\n * @param {number} guide\n * Number (in seconds) to model the string after\n *\n * @return {string}\n * Time formatted as H:MM:SS or M:SS\n */\n\n\nfunction formatTime(seconds, guide) {\n if (guide === void 0) {\n guide = seconds;\n }\n\n return implementation(seconds, guide);\n}\n/**\n * Displays time information about the video\n *\n * @extends Component\n */\n\n\nvar TimeDisplay =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(TimeDisplay, _Component);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function TimeDisplay(player, options) {\n var _this;\n\n _this = _Component.call(this, player, options) || this;\n _this.throttledUpdateContent = throttle(bind(_assertThisInitialized(_this), _this.updateContent), UPDATE_REFRESH_INTERVAL);\n\n _this.on(player, 'timeupdate', _this.throttledUpdateContent);\n\n return _this;\n }\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n\n\n var _proto = TimeDisplay.prototype;\n\n _proto.createEl = function createEl$1() {\n var className = this.buildCSSClass();\n\n var el = _Component.prototype.createEl.call(this, 'div', {\n className: className + \" vjs-time-control vjs-control\",\n innerHTML: \"<span class=\\\"vjs-control-text\\\" role=\\\"presentation\\\">\" + this.localize(this.labelText_) + \"\\xA0</span>\"\n });\n\n this.contentEl_ = createEl('span', {\n className: className + \"-display\"\n }, {\n // tell screen readers not to automatically read the time as it changes\n 'aria-live': 'off',\n // span elements have no implicit role, but some screen readers (notably VoiceOver)\n // treat them as a break between items in the DOM when using arrow keys\n // (or left-to-right swipes on iOS) to read contents of a page. Using\n // role='presentation' causes VoiceOver to NOT treat this span as a break.\n 'role': 'presentation'\n });\n this.updateTextNode_();\n el.appendChild(this.contentEl_);\n return el;\n };\n\n _proto.dispose = function dispose() {\n this.contentEl_ = null;\n this.textNode_ = null;\n\n _Component.prototype.dispose.call(this);\n }\n /**\n * Updates the \"remaining time\" text node with new content using the\n * contents of the `formattedTime_` property.\n *\n * @private\n */\n ;\n\n _proto.updateTextNode_ = function updateTextNode_() {\n if (!this.contentEl_) {\n return;\n }\n\n while (this.contentEl_.firstChild) {\n this.contentEl_.removeChild(this.contentEl_.firstChild);\n }\n\n this.textNode_ = document.createTextNode(this.formattedTime_ || this.formatTime_(0));\n this.contentEl_.appendChild(this.textNode_);\n }\n /**\n * Generates a formatted time for this component to use in display.\n *\n * @param {number} time\n * A numeric time, in seconds.\n *\n * @return {string}\n * A formatted time\n *\n * @private\n */\n ;\n\n _proto.formatTime_ = function formatTime_(time) {\n return formatTime(time);\n }\n /**\n * Updates the time display text node if it has what was passed in changed\n * the formatted time.\n *\n * @param {number} time\n * The time to update to\n *\n * @private\n */\n ;\n\n _proto.updateFormattedTime_ = function updateFormattedTime_(time) {\n var formattedTime = this.formatTime_(time);\n\n if (formattedTime === this.formattedTime_) {\n return;\n }\n\n this.formattedTime_ = formattedTime;\n this.requestAnimationFrame(this.updateTextNode_);\n }\n /**\n * To be filled out in the child class, should update the displayed time\n * in accordance with the fact that the current time has changed.\n *\n * @param {EventTarget~Event} [event]\n * The `timeupdate` event that caused this to run.\n *\n * @listens Player#timeupdate\n */\n ;\n\n _proto.updateContent = function updateContent(event) {};\n\n return TimeDisplay;\n}(Component);\n/**\n * The text that is added to the `TimeDisplay` for screen reader users.\n *\n * @type {string}\n * @private\n */\n\n\nTimeDisplay.prototype.labelText_ = 'Time';\n/**\n * The text that should display over the `TimeDisplay`s controls. Added to for localization.\n *\n * @type {string}\n * @private\n *\n * @deprecated in v7; controlText_ is not used in non-active display Components\n */\n\nTimeDisplay.prototype.controlText_ = 'Time';\nComponent.registerComponent('TimeDisplay', TimeDisplay);\n/**\n * Displays the current time\n *\n * @extends Component\n */\n\nvar CurrentTimeDisplay =\n/*#__PURE__*/\nfunction (_TimeDisplay) {\n _inheritsLoose(CurrentTimeDisplay, _TimeDisplay);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function CurrentTimeDisplay(player, options) {\n var _this;\n\n _this = _TimeDisplay.call(this, player, options) || this;\n\n _this.on(player, 'ended', _this.handleEnded);\n\n return _this;\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n\n\n var _proto = CurrentTimeDisplay.prototype;\n\n _proto.buildCSSClass = function buildCSSClass() {\n return 'vjs-current-time';\n }\n /**\n * Update current time display\n *\n * @param {EventTarget~Event} [event]\n * The `timeupdate` event that caused this function to run.\n *\n * @listens Player#timeupdate\n */\n ;\n\n _proto.updateContent = function updateContent(event) {\n // Allows for smooth scrubbing, when player can't keep up.\n var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\n this.updateFormattedTime_(time);\n }\n /**\n * When the player fires ended there should be no time left. Sadly\n * this is not always the case, lets make it seem like that is the case\n * for users.\n *\n * @param {EventTarget~Event} [event]\n * The `ended` event that caused this to run.\n *\n * @listens Player#ended\n */\n ;\n\n _proto.handleEnded = function handleEnded(event) {\n if (!this.player_.duration()) {\n return;\n }\n\n this.updateFormattedTime_(this.player_.duration());\n };\n\n return CurrentTimeDisplay;\n}(TimeDisplay);\n/**\n * The text that is added to the `CurrentTimeDisplay` for screen reader users.\n *\n * @type {string}\n * @private\n */\n\n\nCurrentTimeDisplay.prototype.labelText_ = 'Current Time';\n/**\n * The text that should display over the `CurrentTimeDisplay`s controls. Added to for localization.\n *\n * @type {string}\n * @private\n *\n * @deprecated in v7; controlText_ is not used in non-active display Components\n */\n\nCurrentTimeDisplay.prototype.controlText_ = 'Current Time';\nComponent.registerComponent('CurrentTimeDisplay', CurrentTimeDisplay);\n/**\n * Displays the duration\n *\n * @extends Component\n */\n\nvar DurationDisplay =\n/*#__PURE__*/\nfunction (_TimeDisplay) {\n _inheritsLoose(DurationDisplay, _TimeDisplay);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function DurationDisplay(player, options) {\n var _this;\n\n _this = _TimeDisplay.call(this, player, options) || this; // we do not want to/need to throttle duration changes,\n // as they should always display the changed duration as\n // it has changed\n\n _this.on(player, 'durationchange', _this.updateContent); // Listen to loadstart because the player duration is reset when a new media element is loaded,\n // but the durationchange on the user agent will not fire.\n // @see [Spec]{@link https://www.w3.org/TR/2011/WD-html5-20110113/video.html#media-element-load-algorithm}\n\n\n _this.on(player, 'loadstart', _this.updateContent); // Also listen for timeupdate (in the parent) and loadedmetadata because removing those\n // listeners could have broken dependent applications/libraries. These\n // can likely be removed for 7.0.\n\n\n _this.on(player, 'loadedmetadata', _this.throttledUpdateContent);\n\n return _this;\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n\n\n var _proto = DurationDisplay.prototype;\n\n _proto.buildCSSClass = function buildCSSClass() {\n return 'vjs-duration';\n }\n /**\n * Update duration time display.\n *\n * @param {EventTarget~Event} [event]\n * The `durationchange`, `timeupdate`, or `loadedmetadata` event that caused\n * this function to be called.\n *\n * @listens Player#durationchange\n * @listens Player#timeupdate\n * @listens Player#loadedmetadata\n */\n ;\n\n _proto.updateContent = function updateContent(event) {\n var duration = this.player_.duration();\n\n if (this.duration_ !== duration) {\n this.duration_ = duration;\n this.updateFormattedTime_(duration);\n }\n };\n\n return DurationDisplay;\n}(TimeDisplay);\n/**\n * The text that is added to the `DurationDisplay` for screen reader users.\n *\n * @type {string}\n * @private\n */\n\n\nDurationDisplay.prototype.labelText_ = 'Duration';\n/**\n * The text that should display over the `DurationDisplay`s controls. Added to for localization.\n *\n * @type {string}\n * @private\n *\n * @deprecated in v7; controlText_ is not used in non-active display Components\n */\n\nDurationDisplay.prototype.controlText_ = 'Duration';\nComponent.registerComponent('DurationDisplay', DurationDisplay);\n/**\n * The separator between the current time and duration.\n * Can be hidden if it's not needed in the design.\n *\n * @extends Component\n */\n\nvar TimeDivider =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(TimeDivider, _Component);\n\n function TimeDivider() {\n return _Component.apply(this, arguments) || this;\n }\n\n var _proto = TimeDivider.prototype;\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n\n _proto.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-time-control vjs-time-divider',\n innerHTML: '<div><span>/</span></div>'\n }, {\n // this element and its contents can be hidden from assistive techs since\n // it is made extraneous by the announcement of the control text\n // for the current time and duration displays\n 'aria-hidden': true\n });\n };\n\n return TimeDivider;\n}(Component);\n\nComponent.registerComponent('TimeDivider', TimeDivider);\n/**\n * Displays the time left in the video\n *\n * @extends Component\n */\n\nvar RemainingTimeDisplay =\n/*#__PURE__*/\nfunction (_TimeDisplay) {\n _inheritsLoose(RemainingTimeDisplay, _TimeDisplay);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function RemainingTimeDisplay(player, options) {\n var _this;\n\n _this = _TimeDisplay.call(this, player, options) || this;\n\n _this.on(player, 'durationchange', _this.throttledUpdateContent);\n\n _this.on(player, 'ended', _this.handleEnded);\n\n return _this;\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n\n\n var _proto = RemainingTimeDisplay.prototype;\n\n _proto.buildCSSClass = function buildCSSClass() {\n return 'vjs-remaining-time';\n }\n /**\n * Create the `Component`'s DOM element with the \"minus\" characted prepend to the time\n *\n * @return {Element}\n * The element that was created.\n */\n ;\n\n _proto.createEl = function createEl$1() {\n var el = _TimeDisplay.prototype.createEl.call(this);\n\n el.insertBefore(createEl('span', {}, {\n 'aria-hidden': true\n }, '-'), this.contentEl_);\n return el;\n }\n /**\n * Update remaining time display.\n *\n * @param {EventTarget~Event} [event]\n * The `timeupdate` or `durationchange` event that caused this to run.\n *\n * @listens Player#timeupdate\n * @listens Player#durationchange\n */\n ;\n\n _proto.updateContent = function updateContent(event) {\n if (typeof this.player_.duration() !== 'number') {\n return;\n } // @deprecated We should only use remainingTimeDisplay\n // as of video.js 7\n\n\n if (this.player_.remainingTimeDisplay) {\n this.updateFormattedTime_(this.player_.remainingTimeDisplay());\n } else {\n this.updateFormattedTime_(this.player_.remainingTime());\n }\n }\n /**\n * When the player fires ended there should be no time left. Sadly\n * this is not always the case, lets make it seem like that is the case\n * for users.\n *\n * @param {EventTarget~Event} [event]\n * The `ended` event that caused this to run.\n *\n * @listens Player#ended\n */\n ;\n\n _proto.handleEnded = function handleEnded(event) {\n if (!this.player_.duration()) {\n return;\n }\n\n this.updateFormattedTime_(0);\n };\n\n return RemainingTimeDisplay;\n}(TimeDisplay);\n/**\n * The text that is added to the `RemainingTimeDisplay` for screen reader users.\n *\n * @type {string}\n * @private\n */\n\n\nRemainingTimeDisplay.prototype.labelText_ = 'Remaining Time';\n/**\n * The text that should display over the `RemainingTimeDisplay`s controls. Added to for localization.\n *\n * @type {string}\n * @private\n *\n * @deprecated in v7; controlText_ is not used in non-active display Components\n */\n\nRemainingTimeDisplay.prototype.controlText_ = 'Remaining Time';\nComponent.registerComponent('RemainingTimeDisplay', RemainingTimeDisplay);\n/**\n * Displays the live indicator when duration is Infinity.\n *\n * @extends Component\n */\n\nvar LiveDisplay =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(LiveDisplay, _Component);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function LiveDisplay(player, options) {\n var _this;\n\n _this = _Component.call(this, player, options) || this;\n\n _this.updateShowing();\n\n _this.on(_this.player(), 'durationchange', _this.updateShowing);\n\n return _this;\n }\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n\n\n var _proto = LiveDisplay.prototype;\n\n _proto.createEl = function createEl$1() {\n var el = _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-live-control vjs-control'\n });\n\n this.contentEl_ = createEl('div', {\n className: 'vjs-live-display',\n innerHTML: \"<span class=\\\"vjs-control-text\\\">\" + this.localize('Stream Type') + \"\\xA0</span>\" + this.localize('LIVE')\n }, {\n 'aria-live': 'off'\n });\n el.appendChild(this.contentEl_);\n return el;\n };\n\n _proto.dispose = function dispose() {\n this.contentEl_ = null;\n\n _Component.prototype.dispose.call(this);\n }\n /**\n * Check the duration to see if the LiveDisplay should be showing or not. Then show/hide\n * it accordingly\n *\n * @param {EventTarget~Event} [event]\n * The {@link Player#durationchange} event that caused this function to run.\n *\n * @listens Player#durationchange\n */\n ;\n\n _proto.updateShowing = function updateShowing(event) {\n if (this.player().duration() === Infinity) {\n this.show();\n } else {\n this.hide();\n }\n };\n\n return LiveDisplay;\n}(Component);\n\nComponent.registerComponent('LiveDisplay', LiveDisplay);\n/**\n * Displays the live indicator when duration is Infinity.\n *\n * @extends Component\n */\n\nvar SeekToLive =\n/*#__PURE__*/\nfunction (_Button) {\n _inheritsLoose(SeekToLive, _Button);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function SeekToLive(player, options) {\n var _this;\n\n _this = _Button.call(this, player, options) || this;\n\n _this.updateLiveEdgeStatus();\n\n if (_this.player_.liveTracker) {\n _this.on(_this.player_.liveTracker, 'liveedgechange', _this.updateLiveEdgeStatus);\n }\n\n return _this;\n }\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n\n\n var _proto = SeekToLive.prototype;\n\n _proto.createEl = function createEl$1() {\n var el = _Button.prototype.createEl.call(this, 'button', {\n className: 'vjs-seek-to-live-control vjs-control'\n });\n\n this.textEl_ = createEl('span', {\n className: 'vjs-seek-to-live-text',\n innerHTML: this.localize('LIVE')\n }, {\n 'aria-hidden': 'true'\n });\n el.appendChild(this.textEl_);\n return el;\n }\n /**\n * Update the state of this button if we are at the live edge\n * or not\n */\n ;\n\n _proto.updateLiveEdgeStatus = function updateLiveEdgeStatus(e) {\n // default to live edge\n if (!this.player_.liveTracker || this.player_.liveTracker.atLiveEdge()) {\n this.setAttribute('aria-disabled', true);\n this.addClass('vjs-at-live-edge');\n this.controlText('Seek to live, currently playing live');\n } else {\n this.setAttribute('aria-disabled', false);\n this.removeClass('vjs-at-live-edge');\n this.controlText('Seek to live, currently behind live');\n }\n }\n /**\n * On click bring us as near to the live point as possible.\n * This requires that we wait for the next `live-seekable-change`\n * event which will happen every segment length seconds.\n */\n ;\n\n _proto.handleClick = function handleClick() {\n this.player_.liveTracker.seekToLiveEdge();\n }\n /**\n * Dispose of the element and stop tracking\n */\n ;\n\n _proto.dispose = function dispose() {\n if (this.player_.liveTracker) {\n this.off(this.player_.liveTracker, 'liveedgechange', this.updateLiveEdgeStatus);\n }\n\n this.textEl_ = null;\n\n _Button.prototype.dispose.call(this);\n };\n\n return SeekToLive;\n}(Button);\n\nSeekToLive.prototype.controlText_ = 'Seek to live, currently playing live';\nComponent.registerComponent('SeekToLive', SeekToLive);\n/**\n * The base functionality for a slider. Can be vertical or horizontal.\n * For instance the volume bar or the seek bar on a video is a slider.\n *\n * @extends Component\n */\n\nvar Slider =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(Slider, _Component);\n /**\n * Create an instance of this class\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function Slider(player, options) {\n var _this;\n\n _this = _Component.call(this, player, options) || this; // Set property names to bar to match with the child Slider class is looking for\n\n _this.bar = _this.getChild(_this.options_.barName); // Set a horizontal or vertical class on the slider depending on the slider type\n\n _this.vertical(!!_this.options_.vertical);\n\n _this.enable();\n\n return _this;\n }\n /**\n * Are controls are currently enabled for this slider or not.\n *\n * @return {boolean}\n * true if controls are enabled, false otherwise\n */\n\n\n var _proto = Slider.prototype;\n\n _proto.enabled = function enabled() {\n return this.enabled_;\n }\n /**\n * Enable controls for this slider if they are disabled\n */\n ;\n\n _proto.enable = function enable() {\n if (this.enabled()) {\n return;\n }\n\n this.on('mousedown', this.handleMouseDown);\n this.on('touchstart', this.handleMouseDown);\n this.on('keydown', this.handleKeyDown);\n this.on('click', this.handleClick); // TODO: deprecated, controlsvisible does not seem to be fired\n\n this.on(this.player_, 'controlsvisible', this.update);\n\n if (this.playerEvent) {\n this.on(this.player_, this.playerEvent, this.update);\n }\n\n this.removeClass('disabled');\n this.setAttribute('tabindex', 0);\n this.enabled_ = true;\n }\n /**\n * Disable controls for this slider if they are enabled\n */\n ;\n\n _proto.disable = function disable() {\n if (!this.enabled()) {\n return;\n }\n\n var doc = this.bar.el_.ownerDocument;\n this.off('mousedown', this.handleMouseDown);\n this.off('touchstart', this.handleMouseDown);\n this.off('keydown', this.handleKeyDown);\n this.off('click', this.handleClick);\n this.off(this.player_, 'controlsvisible', this.update);\n this.off(doc, 'mousemove', this.handleMouseMove);\n this.off(doc, 'mouseup', this.handleMouseUp);\n this.off(doc, 'touchmove', this.handleMouseMove);\n this.off(doc, 'touchend', this.handleMouseUp);\n this.removeAttribute('tabindex');\n this.addClass('disabled');\n\n if (this.playerEvent) {\n this.off(this.player_, this.playerEvent, this.update);\n }\n\n this.enabled_ = false;\n }\n /**\n * Create the `Slider`s DOM element.\n *\n * @param {string} type\n * Type of element to create.\n *\n * @param {Object} [props={}]\n * List of properties in Object form.\n *\n * @param {Object} [attributes={}]\n * list of attributes in Object form.\n *\n * @return {Element}\n * The element that gets created.\n */\n ;\n\n _proto.createEl = function createEl(type, props, attributes) {\n if (props === void 0) {\n props = {};\n }\n\n if (attributes === void 0) {\n attributes = {};\n } // Add the slider element class to all sub classes\n\n\n props.className = props.className + ' vjs-slider';\n props = assign({\n tabIndex: 0\n }, props);\n attributes = assign({\n 'role': 'slider',\n 'aria-valuenow': 0,\n 'aria-valuemin': 0,\n 'aria-valuemax': 100,\n 'tabIndex': 0\n }, attributes);\n return _Component.prototype.createEl.call(this, type, props, attributes);\n }\n /**\n * Handle `mousedown` or `touchstart` events on the `Slider`.\n *\n * @param {EventTarget~Event} event\n * `mousedown` or `touchstart` event that triggered this function\n *\n * @listens mousedown\n * @listens touchstart\n * @fires Slider#slideractive\n */\n ;\n\n _proto.handleMouseDown = function handleMouseDown(event) {\n var doc = this.bar.el_.ownerDocument;\n\n if (event.type === 'mousedown') {\n event.preventDefault();\n } // Do not call preventDefault() on touchstart in Chrome\n // to avoid console warnings. Use a 'touch-action: none' style\n // instead to prevent unintented scrolling.\n // https://developers.google.com/web/updates/2017/01/scrolling-intervention\n\n\n if (event.type === 'touchstart' && !IS_CHROME) {\n event.preventDefault();\n }\n\n blockTextSelection();\n this.addClass('vjs-sliding');\n /**\n * Triggered when the slider is in an active state\n *\n * @event Slider#slideractive\n * @type {EventTarget~Event}\n */\n\n this.trigger('slideractive');\n this.on(doc, 'mousemove', this.handleMouseMove);\n this.on(doc, 'mouseup', this.handleMouseUp);\n this.on(doc, 'touchmove', this.handleMouseMove);\n this.on(doc, 'touchend', this.handleMouseUp);\n this.handleMouseMove(event);\n }\n /**\n * Handle the `mousemove`, `touchmove`, and `mousedown` events on this `Slider`.\n * The `mousemove` and `touchmove` events will only only trigger this function during\n * `mousedown` and `touchstart`. This is due to {@link Slider#handleMouseDown} and\n * {@link Slider#handleMouseUp}.\n *\n * @param {EventTarget~Event} event\n * `mousedown`, `mousemove`, `touchstart`, or `touchmove` event that triggered\n * this function\n *\n * @listens mousemove\n * @listens touchmove\n */\n ;\n\n _proto.handleMouseMove = function handleMouseMove(event) {}\n /**\n * Handle `mouseup` or `touchend` events on the `Slider`.\n *\n * @param {EventTarget~Event} event\n * `mouseup` or `touchend` event that triggered this function.\n *\n * @listens touchend\n * @listens mouseup\n * @fires Slider#sliderinactive\n */\n ;\n\n _proto.handleMouseUp = function handleMouseUp() {\n var doc = this.bar.el_.ownerDocument;\n unblockTextSelection();\n this.removeClass('vjs-sliding');\n /**\n * Triggered when the slider is no longer in an active state.\n *\n * @event Slider#sliderinactive\n * @type {EventTarget~Event}\n */\n\n this.trigger('sliderinactive');\n this.off(doc, 'mousemove', this.handleMouseMove);\n this.off(doc, 'mouseup', this.handleMouseUp);\n this.off(doc, 'touchmove', this.handleMouseMove);\n this.off(doc, 'touchend', this.handleMouseUp);\n this.update();\n }\n /**\n * Update the progress bar of the `Slider`.\n *\n * @return {number}\n * The percentage of progress the progress bar represents as a\n * number from 0 to 1.\n */\n ;\n\n _proto.update = function update() {\n // In VolumeBar init we have a setTimeout for update that pops and update\n // to the end of the execution stack. The player is destroyed before then\n // update will cause an error\n if (!this.el_) {\n return;\n } // If scrubbing, we could use a cached value to make the handle keep up\n // with the user's mouse. On HTML5 browsers scrubbing is really smooth, but\n // some flash players are slow, so we might want to utilize this later.\n // var progress = (this.player_.scrubbing()) ? this.player_.getCache().currentTime / this.player_.duration() : this.player_.currentTime() / this.player_.duration();\n\n\n var progress = this.getPercent();\n var bar = this.bar; // If there's no bar...\n\n if (!bar) {\n return;\n } // Protect against no duration and other division issues\n\n\n if (typeof progress !== 'number' || progress !== progress || progress < 0 || progress === Infinity) {\n progress = 0;\n } // Convert to a percentage for setting\n\n\n var percentage = (progress * 100).toFixed(2) + '%';\n var style = bar.el().style; // Set the new bar width or height\n\n var sizeKey = this.vertical() ? 'height' : 'width';\n\n if (style[sizeKey] !== percentage) {\n style[sizeKey] = percentage;\n }\n\n return progress;\n }\n /**\n * Calculate distance for slider\n *\n * @param {EventTarget~Event} event\n * The event that caused this function to run.\n *\n * @return {number}\n * The current position of the Slider.\n * - position.x for vertical `Slider`s\n * - position.y for horizontal `Slider`s\n */\n ;\n\n _proto.calculateDistance = function calculateDistance(event) {\n var position = getPointerPosition(this.el_, event);\n\n if (this.vertical()) {\n return position.y;\n }\n\n return position.x;\n }\n /**\n * Handle a `keydown` event on the `Slider`. Watches for left, rigth, up, and down\n * arrow keys. This function will only be called when the slider has focus. See\n * {@link Slider#handleFocus} and {@link Slider#handleBlur}.\n *\n * @param {EventTarget~Event} event\n * the `keydown` event that caused this function to run.\n *\n * @listens keydown\n */\n ;\n\n _proto.handleKeyDown = function handleKeyDown(event) {\n // Left and Down Arrows\n if (keycode.isEventKey(event, 'Left') || keycode.isEventKey(event, 'Down')) {\n event.preventDefault();\n event.stopPropagation();\n this.stepBack(); // Up and Right Arrows\n } else if (keycode.isEventKey(event, 'Right') || keycode.isEventKey(event, 'Up')) {\n event.preventDefault();\n event.stopPropagation();\n this.stepForward();\n } else {\n // Pass keydown handling up for unsupported keys\n _Component.prototype.handleKeyDown.call(this, event);\n }\n }\n /**\n * Listener for click events on slider, used to prevent clicks\n * from bubbling up to parent elements like button menus.\n *\n * @param {Object} event\n * Event that caused this object to run\n */\n ;\n\n _proto.handleClick = function handleClick(event) {\n event.stopPropagation();\n event.preventDefault();\n }\n /**\n * Get/set if slider is horizontal for vertical\n *\n * @param {boolean} [bool]\n * - true if slider is vertical,\n * - false is horizontal\n *\n * @return {boolean}\n * - true if slider is vertical, and getting\n * - false if the slider is horizontal, and getting\n */\n ;\n\n _proto.vertical = function vertical(bool) {\n if (bool === undefined) {\n return this.vertical_ || false;\n }\n\n this.vertical_ = !!bool;\n\n if (this.vertical_) {\n this.addClass('vjs-slider-vertical');\n } else {\n this.addClass('vjs-slider-horizontal');\n }\n };\n\n return Slider;\n}(Component);\n\nComponent.registerComponent('Slider', Slider);\n/**\n * Shows loading progress\n *\n * @extends Component\n */\n\nvar LoadProgressBar =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(LoadProgressBar, _Component);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function LoadProgressBar(player, options) {\n var _this;\n\n _this = _Component.call(this, player, options) || this;\n _this.partEls_ = [];\n\n _this.on(player, 'progress', _this.update);\n\n return _this;\n }\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n\n\n var _proto = LoadProgressBar.prototype;\n\n _proto.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-load-progress',\n innerHTML: \"<span class=\\\"vjs-control-text\\\"><span>\" + this.localize('Loaded') + \"</span>: <span class=\\\"vjs-control-text-loaded-percentage\\\">0%</span></span>\"\n });\n };\n\n _proto.dispose = function dispose() {\n this.partEls_ = null;\n\n _Component.prototype.dispose.call(this);\n }\n /**\n * Update progress bar\n *\n * @param {EventTarget~Event} [event]\n * The `progress` event that caused this function to run.\n *\n * @listens Player#progress\n */\n ;\n\n _proto.update = function update(event) {\n var liveTracker = this.player_.liveTracker;\n var buffered = this.player_.buffered();\n var duration = liveTracker && liveTracker.isLive() ? liveTracker.seekableEnd() : this.player_.duration();\n var bufferedEnd = this.player_.bufferedEnd();\n var children = this.partEls_;\n var controlTextPercentage = this.$('.vjs-control-text-loaded-percentage'); // get the percent width of a time compared to the total end\n\n var percentify = function percentify(time, end, rounded) {\n // no NaN\n var percent = time / end || 0;\n percent = (percent >= 1 ? 1 : percent) * 100;\n\n if (rounded) {\n percent = percent.toFixed(2);\n }\n\n return percent + '%';\n }; // update the width of the progress bar\n\n\n this.el_.style.width = percentify(bufferedEnd, duration); // update the control-text\n\n textContent(controlTextPercentage, percentify(bufferedEnd, duration, true)); // add child elements to represent the individual buffered time ranges\n\n for (var i = 0; i < buffered.length; i++) {\n var start = buffered.start(i);\n var end = buffered.end(i);\n var part = children[i];\n\n if (!part) {\n part = this.el_.appendChild(createEl());\n children[i] = part;\n } // set the percent based on the width of the progress bar (bufferedEnd)\n\n\n part.style.left = percentify(start, bufferedEnd);\n part.style.width = percentify(end - start, bufferedEnd);\n } // remove unused buffered range elements\n\n\n for (var _i = children.length; _i > buffered.length; _i--) {\n this.el_.removeChild(children[_i - 1]);\n }\n\n children.length = buffered.length;\n };\n\n return LoadProgressBar;\n}(Component);\n\nComponent.registerComponent('LoadProgressBar', LoadProgressBar);\n/**\n * Time tooltips display a time above the progress bar.\n *\n * @extends Component\n */\n\nvar TimeTooltip =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(TimeTooltip, _Component);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The {@link Player} that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function TimeTooltip(player, options) {\n var _this;\n\n _this = _Component.call(this, player, options) || this;\n _this.update = throttle(bind(_assertThisInitialized(_this), _this.update), UPDATE_REFRESH_INTERVAL);\n return _this;\n }\n /**\n * Create the time tooltip DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n\n\n var _proto = TimeTooltip.prototype;\n\n _proto.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-time-tooltip'\n }, {\n 'aria-hidden': 'true'\n });\n }\n /**\n * Updates the position of the time tooltip relative to the `SeekBar`.\n *\n * @param {Object} seekBarRect\n * The `ClientRect` for the {@link SeekBar} element.\n *\n * @param {number} seekBarPoint\n * A number from 0 to 1, representing a horizontal reference point\n * from the left edge of the {@link SeekBar}\n */\n ;\n\n _proto.update = function update(seekBarRect, seekBarPoint, content) {\n var tooltipRect = getBoundingClientRect(this.el_);\n var playerRect = getBoundingClientRect(this.player_.el());\n var seekBarPointPx = seekBarRect.width * seekBarPoint; // do nothing if either rect isn't available\n // for example, if the player isn't in the DOM for testing\n\n if (!playerRect || !tooltipRect) {\n return;\n } // This is the space left of the `seekBarPoint` available within the bounds\n // of the player. We calculate any gap between the left edge of the player\n // and the left edge of the `SeekBar` and add the number of pixels in the\n // `SeekBar` before hitting the `seekBarPoint`\n\n\n var spaceLeftOfPoint = seekBarRect.left - playerRect.left + seekBarPointPx; // This is the space right of the `seekBarPoint` available within the bounds\n // of the player. We calculate the number of pixels from the `seekBarPoint`\n // to the right edge of the `SeekBar` and add to that any gap between the\n // right edge of the `SeekBar` and the player.\n\n var spaceRightOfPoint = seekBarRect.width - seekBarPointPx + (playerRect.right - seekBarRect.right); // This is the number of pixels by which the tooltip will need to be pulled\n // further to the right to center it over the `seekBarPoint`.\n\n var pullTooltipBy = tooltipRect.width / 2; // Adjust the `pullTooltipBy` distance to the left or right depending on\n // the results of the space calculations above.\n\n if (spaceLeftOfPoint < pullTooltipBy) {\n pullTooltipBy += pullTooltipBy - spaceLeftOfPoint;\n } else if (spaceRightOfPoint < pullTooltipBy) {\n pullTooltipBy = spaceRightOfPoint;\n } // Due to the imprecision of decimal/ratio based calculations and varying\n // rounding behaviors, there are cases where the spacing adjustment is off\n // by a pixel or two. This adds insurance to these calculations.\n\n\n if (pullTooltipBy < 0) {\n pullTooltipBy = 0;\n } else if (pullTooltipBy > tooltipRect.width) {\n pullTooltipBy = tooltipRect.width;\n }\n\n this.el_.style.right = \"-\" + pullTooltipBy + \"px\";\n this.write(content);\n }\n /**\n * Write the time to the tooltip DOM element.\n *\n * @param {string} content\n * The formatted time for the tooltip.\n */\n ;\n\n _proto.write = function write(content) {\n textContent(this.el_, content);\n }\n /**\n * Updates the position of the time tooltip relative to the `SeekBar`.\n *\n * @param {Object} seekBarRect\n * The `ClientRect` for the {@link SeekBar} element.\n *\n * @param {number} seekBarPoint\n * A number from 0 to 1, representing a horizontal reference point\n * from the left edge of the {@link SeekBar}\n *\n * @param {number} time\n * The time to update the tooltip to, not used during live playback\n *\n * @param {Function} cb\n * A function that will be called during the request animation frame\n * for tooltips that need to do additional animations from the default\n */\n ;\n\n _proto.updateTime = function updateTime(seekBarRect, seekBarPoint, time, cb) {\n var _this2 = this; // If there is an existing rAF ID, cancel it so we don't over-queue.\n\n\n if (this.rafId_) {\n this.cancelAnimationFrame(this.rafId_);\n }\n\n this.rafId_ = this.requestAnimationFrame(function () {\n var content;\n\n var duration = _this2.player_.duration();\n\n if (_this2.player_.liveTracker && _this2.player_.liveTracker.isLive()) {\n var liveWindow = _this2.player_.liveTracker.liveWindow();\n\n var secondsBehind = liveWindow - seekBarPoint * liveWindow;\n content = (secondsBehind < 1 ? '' : '-') + formatTime(secondsBehind, liveWindow);\n } else {\n content = formatTime(time, duration);\n }\n\n _this2.update(seekBarRect, seekBarPoint, content);\n\n if (cb) {\n cb();\n }\n });\n };\n\n return TimeTooltip;\n}(Component);\n\nComponent.registerComponent('TimeTooltip', TimeTooltip);\n/**\n * Used by {@link SeekBar} to display media playback progress as part of the\n * {@link ProgressControl}.\n *\n * @extends Component\n */\n\nvar PlayProgressBar =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(PlayProgressBar, _Component);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The {@link Player} that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function PlayProgressBar(player, options) {\n var _this;\n\n _this = _Component.call(this, player, options) || this;\n _this.update = throttle(bind(_assertThisInitialized(_this), _this.update), UPDATE_REFRESH_INTERVAL);\n return _this;\n }\n /**\n * Create the the DOM element for this class.\n *\n * @return {Element}\n * The element that was created.\n */\n\n\n var _proto = PlayProgressBar.prototype;\n\n _proto.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-play-progress vjs-slider-bar'\n }, {\n 'aria-hidden': 'true'\n });\n }\n /**\n * Enqueues updates to its own DOM as well as the DOM of its\n * {@link TimeTooltip} child.\n *\n * @param {Object} seekBarRect\n * The `ClientRect` for the {@link SeekBar} element.\n *\n * @param {number} seekBarPoint\n * A number from 0 to 1, representing a horizontal reference point\n * from the left edge of the {@link SeekBar}\n */\n ;\n\n _proto.update = function update(seekBarRect, seekBarPoint) {\n var timeTooltip = this.getChild('timeTooltip');\n\n if (!timeTooltip) {\n return;\n }\n\n var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\n timeTooltip.updateTime(seekBarRect, seekBarPoint, time);\n };\n\n return PlayProgressBar;\n}(Component);\n/**\n * Default options for {@link PlayProgressBar}.\n *\n * @type {Object}\n * @private\n */\n\n\nPlayProgressBar.prototype.options_ = {\n children: []\n}; // Time tooltips should not be added to a player on mobile devices\n\nif (!IS_IOS && !IS_ANDROID) {\n PlayProgressBar.prototype.options_.children.push('timeTooltip');\n}\n\nComponent.registerComponent('PlayProgressBar', PlayProgressBar);\n/**\n * The {@link MouseTimeDisplay} component tracks mouse movement over the\n * {@link ProgressControl}. It displays an indicator and a {@link TimeTooltip}\n * indicating the time which is represented by a given point in the\n * {@link ProgressControl}.\n *\n * @extends Component\n */\n\nvar MouseTimeDisplay =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(MouseTimeDisplay, _Component);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The {@link Player} that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function MouseTimeDisplay(player, options) {\n var _this;\n\n _this = _Component.call(this, player, options) || this;\n _this.update = throttle(bind(_assertThisInitialized(_this), _this.update), UPDATE_REFRESH_INTERVAL);\n return _this;\n }\n /**\n * Create the DOM element for this class.\n *\n * @return {Element}\n * The element that was created.\n */\n\n\n var _proto = MouseTimeDisplay.prototype;\n\n _proto.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-mouse-display'\n });\n }\n /**\n * Enqueues updates to its own DOM as well as the DOM of its\n * {@link TimeTooltip} child.\n *\n * @param {Object} seekBarRect\n * The `ClientRect` for the {@link SeekBar} element.\n *\n * @param {number} seekBarPoint\n * A number from 0 to 1, representing a horizontal reference point\n * from the left edge of the {@link SeekBar}\n */\n ;\n\n _proto.update = function update(seekBarRect, seekBarPoint) {\n var _this2 = this;\n\n var time = seekBarPoint * this.player_.duration();\n this.getChild('timeTooltip').updateTime(seekBarRect, seekBarPoint, time, function () {\n _this2.el_.style.left = seekBarRect.width * seekBarPoint + \"px\";\n });\n };\n\n return MouseTimeDisplay;\n}(Component);\n/**\n * Default options for `MouseTimeDisplay`\n *\n * @type {Object}\n * @private\n */\n\n\nMouseTimeDisplay.prototype.options_ = {\n children: ['timeTooltip']\n};\nComponent.registerComponent('MouseTimeDisplay', MouseTimeDisplay);\nvar STEP_SECONDS = 5; // The multiplier of STEP_SECONDS that PgUp/PgDown move the timeline.\n\nvar PAGE_KEY_MULTIPLIER = 12; // The interval at which the bar should update as it progresses.\n\nvar UPDATE_REFRESH_INTERVAL$1 = 30;\n/**\n * Seek bar and container for the progress bars. Uses {@link PlayProgressBar}\n * as its `bar`.\n *\n * @extends Slider\n */\n\nvar SeekBar =\n/*#__PURE__*/\nfunction (_Slider) {\n _inheritsLoose(SeekBar, _Slider);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function SeekBar(player, options) {\n var _this;\n\n _this = _Slider.call(this, player, options) || this;\n\n _this.setEventHandlers_();\n\n return _this;\n }\n /**\n * Sets the event handlers\n *\n * @private\n */\n\n\n var _proto = SeekBar.prototype;\n\n _proto.setEventHandlers_ = function setEventHandlers_() {\n this.update = throttle(bind(this, this.update), UPDATE_REFRESH_INTERVAL$1);\n this.on(this.player_, 'timeupdate', this.update);\n this.on(this.player_, 'ended', this.handleEnded);\n this.on(this.player_, 'durationchange', this.update);\n\n if (this.player_.liveTracker) {\n this.on(this.player_.liveTracker, 'liveedgechange', this.update);\n } // when playing, let's ensure we smoothly update the play progress bar\n // via an interval\n\n\n this.updateInterval = null;\n this.on(this.player_, ['playing'], this.enableInterval_);\n this.on(this.player_, ['ended', 'pause', 'waiting'], this.disableInterval_); // we don't need to update the play progress if the document is hidden,\n // also, this causes the CPU to spike and eventually crash the page on IE11.\n\n if ('hidden' in document && 'visibilityState' in document) {\n this.on(document, 'visibilitychange', this.toggleVisibility_);\n }\n };\n\n _proto.toggleVisibility_ = function toggleVisibility_(e) {\n if (document.hidden) {\n this.disableInterval_(e);\n } else {\n this.enableInterval_(); // we just switched back to the page and someone may be looking, so, update ASAP\n\n this.requestAnimationFrame(this.update);\n }\n };\n\n _proto.enableInterval_ = function enableInterval_() {\n var _this2 = this;\n\n this.clearInterval(this.updateInterval);\n this.updateInterval = this.setInterval(function () {\n _this2.requestAnimationFrame(_this2.update);\n }, UPDATE_REFRESH_INTERVAL$1);\n };\n\n _proto.disableInterval_ = function disableInterval_(e) {\n if (this.player_.liveTracker && this.player_.liveTracker.isLive() && e.type !== 'ended') {\n return;\n }\n\n this.clearInterval(this.updateInterval);\n }\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n ;\n\n _proto.createEl = function createEl() {\n return _Slider.prototype.createEl.call(this, 'div', {\n className: 'vjs-progress-holder'\n }, {\n 'aria-label': this.localize('Progress Bar')\n });\n }\n /**\n * This function updates the play progress bar and accessibility\n * attributes to whatever is passed in.\n *\n * @param {number} currentTime\n * The currentTime value that should be used for accessibility\n *\n * @param {number} percent\n * The percentage as a decimal that the bar should be filled from 0-1.\n *\n * @private\n */\n ;\n\n _proto.update_ = function update_(currentTime, percent) {\n var liveTracker = this.player_.liveTracker;\n var duration = this.player_.duration();\n\n if (liveTracker && liveTracker.isLive()) {\n duration = this.player_.liveTracker.liveCurrentTime();\n } // machine readable value of progress bar (percentage complete)\n\n\n this.el_.setAttribute('aria-valuenow', (percent * 100).toFixed(2)); // human readable value of progress bar (time complete)\n\n this.el_.setAttribute('aria-valuetext', this.localize('progress bar timing: currentTime={1} duration={2}', [formatTime(currentTime, duration), formatTime(duration, duration)], '{1} of {2}')); // Update the `PlayProgressBar`.\n\n if (this.bar) {\n this.bar.update(getBoundingClientRect(this.el_), percent);\n }\n }\n /**\n * Update the seek bar's UI.\n *\n * @param {EventTarget~Event} [event]\n * The `timeupdate` or `ended` event that caused this to run.\n *\n * @listens Player#timeupdate\n *\n * @return {number}\n * The current percent at a number from 0-1\n */\n ;\n\n _proto.update = function update(event) {\n // if the offsetParent is null, then this element is hidden, in which case\n // we don't need to update it.\n if (this.el().offsetParent === null) {\n return;\n }\n\n var percent = _Slider.prototype.update.call(this);\n\n this.update_(this.getCurrentTime_(), percent);\n return percent;\n }\n /**\n * Get the value of current time but allows for smooth scrubbing,\n * when player can't keep up.\n *\n * @return {number}\n * The current time value to display\n *\n * @private\n */\n ;\n\n _proto.getCurrentTime_ = function getCurrentTime_() {\n return this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\n }\n /**\n * We want the seek bar to be full on ended\n * no matter what the actual internal values are. so we force it.\n *\n * @param {EventTarget~Event} [event]\n * The `timeupdate` or `ended` event that caused this to run.\n *\n * @listens Player#ended\n */\n ;\n\n _proto.handleEnded = function handleEnded(event) {\n this.update_(this.player_.duration(), 1);\n }\n /**\n * Get the percentage of media played so far.\n *\n * @return {number}\n * The percentage of media played so far (0 to 1).\n */\n ;\n\n _proto.getPercent = function getPercent() {\n var currentTime = this.getCurrentTime_();\n var percent;\n var liveTracker = this.player_.liveTracker;\n\n if (liveTracker && liveTracker.isLive()) {\n percent = (currentTime - liveTracker.seekableStart()) / liveTracker.liveWindow(); // prevent the percent from changing at the live edge\n\n if (liveTracker.atLiveEdge()) {\n percent = 1;\n }\n } else {\n percent = currentTime / this.player_.duration();\n }\n\n return percent >= 1 ? 1 : percent || 0;\n }\n /**\n * Handle mouse down on seek bar\n *\n * @param {EventTarget~Event} event\n * The `mousedown` event that caused this to run.\n *\n * @listens mousedown\n */\n ;\n\n _proto.handleMouseDown = function handleMouseDown(event) {\n if (!isSingleLeftClick(event)) {\n return;\n } // Stop event propagation to prevent double fire in progress-control.js\n\n\n event.stopPropagation();\n this.player_.scrubbing(true);\n this.videoWasPlaying = !this.player_.paused();\n this.player_.pause();\n\n _Slider.prototype.handleMouseDown.call(this, event);\n }\n /**\n * Handle mouse move on seek bar\n *\n * @param {EventTarget~Event} event\n * The `mousemove` event that caused this to run.\n *\n * @listens mousemove\n */\n ;\n\n _proto.handleMouseMove = function handleMouseMove(event) {\n if (!isSingleLeftClick(event)) {\n return;\n }\n\n var newTime;\n var distance = this.calculateDistance(event);\n var liveTracker = this.player_.liveTracker;\n\n if (!liveTracker || !liveTracker.isLive()) {\n newTime = distance * this.player_.duration(); // Don't let video end while scrubbing.\n\n if (newTime === this.player_.duration()) {\n newTime = newTime - 0.1;\n }\n } else {\n var seekableStart = liveTracker.seekableStart();\n var seekableEnd = liveTracker.liveCurrentTime();\n newTime = seekableStart + distance * liveTracker.liveWindow(); // Don't let video end while scrubbing.\n\n if (newTime >= seekableEnd) {\n newTime = seekableEnd;\n } // Compensate for precision differences so that currentTime is not less\n // than seekable start\n\n\n if (newTime <= seekableStart) {\n newTime = seekableStart + 0.1;\n } // On android seekableEnd can be Infinity sometimes,\n // this will cause newTime to be Infinity, which is\n // not a valid currentTime.\n\n\n if (newTime === Infinity) {\n return;\n }\n } // Set new time (tell player to seek to new time)\n\n\n this.player_.currentTime(newTime);\n };\n\n _proto.enable = function enable() {\n _Slider.prototype.enable.call(this);\n\n var mouseTimeDisplay = this.getChild('mouseTimeDisplay');\n\n if (!mouseTimeDisplay) {\n return;\n }\n\n mouseTimeDisplay.show();\n };\n\n _proto.disable = function disable() {\n _Slider.prototype.disable.call(this);\n\n var mouseTimeDisplay = this.getChild('mouseTimeDisplay');\n\n if (!mouseTimeDisplay) {\n return;\n }\n\n mouseTimeDisplay.hide();\n }\n /**\n * Handle mouse up on seek bar\n *\n * @param {EventTarget~Event} event\n * The `mouseup` event that caused this to run.\n *\n * @listens mouseup\n */\n ;\n\n _proto.handleMouseUp = function handleMouseUp(event) {\n _Slider.prototype.handleMouseUp.call(this, event); // Stop event propagation to prevent double fire in progress-control.js\n\n\n if (event) {\n event.stopPropagation();\n }\n\n this.player_.scrubbing(false);\n /**\n * Trigger timeupdate because we're done seeking and the time has changed.\n * This is particularly useful for if the player is paused to time the time displays.\n *\n * @event Tech#timeupdate\n * @type {EventTarget~Event}\n */\n\n this.player_.trigger({\n type: 'timeupdate',\n target: this,\n manuallyTriggered: true\n });\n\n if (this.videoWasPlaying) {\n silencePromise(this.player_.play());\n }\n }\n /**\n * Move more quickly fast forward for keyboard-only users\n */\n ;\n\n _proto.stepForward = function stepForward() {\n this.player_.currentTime(this.player_.currentTime() + STEP_SECONDS);\n }\n /**\n * Move more quickly rewind for keyboard-only users\n */\n ;\n\n _proto.stepBack = function stepBack() {\n this.player_.currentTime(this.player_.currentTime() - STEP_SECONDS);\n }\n /**\n * Toggles the playback state of the player\n * This gets called when enter or space is used on the seekbar\n *\n * @param {EventTarget~Event} event\n * The `keydown` event that caused this function to be called\n *\n */\n ;\n\n _proto.handleAction = function handleAction(event) {\n if (this.player_.paused()) {\n this.player_.play();\n } else {\n this.player_.pause();\n }\n }\n /**\n * Called when this SeekBar has focus and a key gets pressed down.\n * Supports the following keys:\n *\n * Space or Enter key fire a click event\n * Home key moves to start of the timeline\n * End key moves to end of the timeline\n * Digit \"0\" through \"9\" keys move to 0%, 10% ... 80%, 90% of the timeline\n * PageDown key moves back a larger step than ArrowDown\n * PageUp key moves forward a large step\n *\n * @param {EventTarget~Event} event\n * The `keydown` event that caused this function to be called.\n *\n * @listens keydown\n */\n ;\n\n _proto.handleKeyDown = function handleKeyDown(event) {\n if (keycode.isEventKey(event, 'Space') || keycode.isEventKey(event, 'Enter')) {\n event.preventDefault();\n event.stopPropagation();\n this.handleAction(event);\n } else if (keycode.isEventKey(event, 'Home')) {\n event.preventDefault();\n event.stopPropagation();\n this.player_.currentTime(0);\n } else if (keycode.isEventKey(event, 'End')) {\n event.preventDefault();\n event.stopPropagation();\n this.player_.currentTime(this.player_.duration());\n } else if (/^[0-9]$/.test(keycode(event))) {\n event.preventDefault();\n event.stopPropagation();\n var gotoFraction = (keycode.codes[keycode(event)] - keycode.codes['0']) * 10.0 / 100.0;\n this.player_.currentTime(this.player_.duration() * gotoFraction);\n } else if (keycode.isEventKey(event, 'PgDn')) {\n event.preventDefault();\n event.stopPropagation();\n this.player_.currentTime(this.player_.currentTime() - STEP_SECONDS * PAGE_KEY_MULTIPLIER);\n } else if (keycode.isEventKey(event, 'PgUp')) {\n event.preventDefault();\n event.stopPropagation();\n this.player_.currentTime(this.player_.currentTime() + STEP_SECONDS * PAGE_KEY_MULTIPLIER);\n } else {\n // Pass keydown handling up for unsupported keys\n _Slider.prototype.handleKeyDown.call(this, event);\n }\n };\n\n return SeekBar;\n}(Slider);\n/**\n * Default options for the `SeekBar`\n *\n * @type {Object}\n * @private\n */\n\n\nSeekBar.prototype.options_ = {\n children: ['loadProgressBar', 'playProgressBar'],\n barName: 'playProgressBar'\n}; // MouseTimeDisplay tooltips should not be added to a player on mobile devices\n\nif (!IS_IOS && !IS_ANDROID) {\n SeekBar.prototype.options_.children.splice(1, 0, 'mouseTimeDisplay');\n}\n\nComponent.registerComponent('SeekBar', SeekBar);\n/**\n * The Progress Control component contains the seek bar, load progress,\n * and play progress.\n *\n * @extends Component\n */\n\nvar ProgressControl =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(ProgressControl, _Component);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function ProgressControl(player, options) {\n var _this;\n\n _this = _Component.call(this, player, options) || this;\n _this.handleMouseMove = throttle(bind(_assertThisInitialized(_this), _this.handleMouseMove), UPDATE_REFRESH_INTERVAL);\n _this.throttledHandleMouseSeek = throttle(bind(_assertThisInitialized(_this), _this.handleMouseSeek), UPDATE_REFRESH_INTERVAL);\n\n _this.enable();\n\n return _this;\n }\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n\n\n var _proto = ProgressControl.prototype;\n\n _proto.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-progress-control vjs-control'\n });\n }\n /**\n * When the mouse moves over the `ProgressControl`, the pointer position\n * gets passed down to the `MouseTimeDisplay` component.\n *\n * @param {EventTarget~Event} event\n * The `mousemove` event that caused this function to run.\n *\n * @listen mousemove\n */\n ;\n\n _proto.handleMouseMove = function handleMouseMove(event) {\n var seekBar = this.getChild('seekBar');\n\n if (seekBar) {\n var mouseTimeDisplay = seekBar.getChild('mouseTimeDisplay');\n var seekBarEl = seekBar.el();\n var seekBarRect = getBoundingClientRect(seekBarEl);\n var seekBarPoint = getPointerPosition(seekBarEl, event).x; // The default skin has a gap on either side of the `SeekBar`. This means\n // that it's possible to trigger this behavior outside the boundaries of\n // the `SeekBar`. This ensures we stay within it at all times.\n\n if (seekBarPoint > 1) {\n seekBarPoint = 1;\n } else if (seekBarPoint < 0) {\n seekBarPoint = 0;\n }\n\n if (mouseTimeDisplay) {\n mouseTimeDisplay.update(seekBarRect, seekBarPoint);\n }\n }\n }\n /**\n * A throttled version of the {@link ProgressControl#handleMouseSeek} listener.\n *\n * @method ProgressControl#throttledHandleMouseSeek\n * @param {EventTarget~Event} event\n * The `mousemove` event that caused this function to run.\n *\n * @listen mousemove\n * @listen touchmove\n */\n\n /**\n * Handle `mousemove` or `touchmove` events on the `ProgressControl`.\n *\n * @param {EventTarget~Event} event\n * `mousedown` or `touchstart` event that triggered this function\n *\n * @listens mousemove\n * @listens touchmove\n */\n ;\n\n _proto.handleMouseSeek = function handleMouseSeek(event) {\n var seekBar = this.getChild('seekBar');\n\n if (seekBar) {\n seekBar.handleMouseMove(event);\n }\n }\n /**\n * Are controls are currently enabled for this progress control.\n *\n * @return {boolean}\n * true if controls are enabled, false otherwise\n */\n ;\n\n _proto.enabled = function enabled() {\n return this.enabled_;\n }\n /**\n * Disable all controls on the progress control and its children\n */\n ;\n\n _proto.disable = function disable() {\n this.children().forEach(function (child) {\n return child.disable && child.disable();\n });\n\n if (!this.enabled()) {\n return;\n }\n\n this.off(['mousedown', 'touchstart'], this.handleMouseDown);\n this.off(this.el_, 'mousemove', this.handleMouseMove);\n this.handleMouseUp();\n this.addClass('disabled');\n this.enabled_ = false;\n }\n /**\n * Enable all controls on the progress control and its children\n */\n ;\n\n _proto.enable = function enable() {\n this.children().forEach(function (child) {\n return child.enable && child.enable();\n });\n\n if (this.enabled()) {\n return;\n }\n\n this.on(['mousedown', 'touchstart'], this.handleMouseDown);\n this.on(this.el_, 'mousemove', this.handleMouseMove);\n this.removeClass('disabled');\n this.enabled_ = true;\n }\n /**\n * Handle `mousedown` or `touchstart` events on the `ProgressControl`.\n *\n * @param {EventTarget~Event} event\n * `mousedown` or `touchstart` event that triggered this function\n *\n * @listens mousedown\n * @listens touchstart\n */\n ;\n\n _proto.handleMouseDown = function handleMouseDown(event) {\n var doc = this.el_.ownerDocument;\n var seekBar = this.getChild('seekBar');\n\n if (seekBar) {\n seekBar.handleMouseDown(event);\n }\n\n this.on(doc, 'mousemove', this.throttledHandleMouseSeek);\n this.on(doc, 'touchmove', this.throttledHandleMouseSeek);\n this.on(doc, 'mouseup', this.handleMouseUp);\n this.on(doc, 'touchend', this.handleMouseUp);\n }\n /**\n * Handle `mouseup` or `touchend` events on the `ProgressControl`.\n *\n * @param {EventTarget~Event} event\n * `mouseup` or `touchend` event that triggered this function.\n *\n * @listens touchend\n * @listens mouseup\n */\n ;\n\n _proto.handleMouseUp = function handleMouseUp(event) {\n var doc = this.el_.ownerDocument;\n var seekBar = this.getChild('seekBar');\n\n if (seekBar) {\n seekBar.handleMouseUp(event);\n }\n\n this.off(doc, 'mousemove', this.throttledHandleMouseSeek);\n this.off(doc, 'touchmove', this.throttledHandleMouseSeek);\n this.off(doc, 'mouseup', this.handleMouseUp);\n this.off(doc, 'touchend', this.handleMouseUp);\n };\n\n return ProgressControl;\n}(Component);\n/**\n * Default options for `ProgressControl`\n *\n * @type {Object}\n * @private\n */\n\n\nProgressControl.prototype.options_ = {\n children: ['seekBar']\n};\nComponent.registerComponent('ProgressControl', ProgressControl);\n/**\n * Toggle Picture-in-Picture mode\n *\n * @extends Button\n */\n\nvar PictureInPictureToggle =\n/*#__PURE__*/\nfunction (_Button) {\n _inheritsLoose(PictureInPictureToggle, _Button);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @listens Player#enterpictureinpicture\n * @listens Player#leavepictureinpicture\n */\n\n\n function PictureInPictureToggle(player, options) {\n var _this;\n\n _this = _Button.call(this, player, options) || this;\n\n _this.on(player, ['enterpictureinpicture', 'leavepictureinpicture'], _this.handlePictureInPictureChange); // TODO: Activate button on player loadedmetadata event.\n // TODO: Deactivate button on player emptied event.\n // TODO: Deactivate button if disablepictureinpicture attribute is present.\n\n\n if (!document.pictureInPictureEnabled) {\n _this.disable();\n }\n\n return _this;\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n\n\n var _proto = PictureInPictureToggle.prototype;\n\n _proto.buildCSSClass = function buildCSSClass() {\n return \"vjs-picture-in-picture-control \" + _Button.prototype.buildCSSClass.call(this);\n }\n /**\n * Handles enterpictureinpicture and leavepictureinpicture on the player and change control text accordingly.\n *\n * @param {EventTarget~Event} [event]\n * The {@link Player#enterpictureinpicture} or {@link Player#leavepictureinpicture} event that caused this function to be\n * called.\n *\n * @listens Player#enterpictureinpicture\n * @listens Player#leavepictureinpicture\n */\n ;\n\n _proto.handlePictureInPictureChange = function handlePictureInPictureChange(event) {\n if (this.player_.isInPictureInPicture()) {\n this.controlText('Exit Picture-in-Picture');\n } else {\n this.controlText('Picture-in-Picture');\n }\n }\n /**\n * This gets called when an `PictureInPictureToggle` is \"clicked\". See\n * {@link ClickableComponent} for more detailed information on what a click can be.\n *\n * @param {EventTarget~Event} [event]\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n ;\n\n _proto.handleClick = function handleClick(event) {\n if (!this.player_.isInPictureInPicture()) {\n this.player_.requestPictureInPicture();\n } else {\n this.player_.exitPictureInPicture();\n }\n };\n\n return PictureInPictureToggle;\n}(Button);\n/**\n * The text that should display over the `PictureInPictureToggle`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\n\nPictureInPictureToggle.prototype.controlText_ = 'Picture-in-Picture';\nComponent.registerComponent('PictureInPictureToggle', PictureInPictureToggle);\n/**\n * Toggle fullscreen video\n *\n * @extends Button\n */\n\nvar FullscreenToggle =\n/*#__PURE__*/\nfunction (_Button) {\n _inheritsLoose(FullscreenToggle, _Button);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function FullscreenToggle(player, options) {\n var _this;\n\n _this = _Button.call(this, player, options) || this;\n\n _this.on(player, 'fullscreenchange', _this.handleFullscreenChange);\n\n if (document[player.fsApi_.fullscreenEnabled] === false) {\n _this.disable();\n }\n\n return _this;\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n\n\n var _proto = FullscreenToggle.prototype;\n\n _proto.buildCSSClass = function buildCSSClass() {\n return \"vjs-fullscreen-control \" + _Button.prototype.buildCSSClass.call(this);\n }\n /**\n * Handles fullscreenchange on the player and change control text accordingly.\n *\n * @param {EventTarget~Event} [event]\n * The {@link Player#fullscreenchange} event that caused this function to be\n * called.\n *\n * @listens Player#fullscreenchange\n */\n ;\n\n _proto.handleFullscreenChange = function handleFullscreenChange(event) {\n if (this.player_.isFullscreen()) {\n this.controlText('Non-Fullscreen');\n } else {\n this.controlText('Fullscreen');\n }\n }\n /**\n * This gets called when an `FullscreenToggle` is \"clicked\". See\n * {@link ClickableComponent} for more detailed information on what a click can be.\n *\n * @param {EventTarget~Event} [event]\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n ;\n\n _proto.handleClick = function handleClick(event) {\n if (!this.player_.isFullscreen()) {\n this.player_.requestFullscreen();\n } else {\n this.player_.exitFullscreen();\n }\n };\n\n return FullscreenToggle;\n}(Button);\n/**\n * The text that should display over the `FullscreenToggle`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\n\nFullscreenToggle.prototype.controlText_ = 'Fullscreen';\nComponent.registerComponent('FullscreenToggle', FullscreenToggle);\n/**\n * Check if volume control is supported and if it isn't hide the\n * `Component` that was passed using the `vjs-hidden` class.\n *\n * @param {Component} self\n * The component that should be hidden if volume is unsupported\n *\n * @param {Player} player\n * A reference to the player\n *\n * @private\n */\n\nvar checkVolumeSupport = function checkVolumeSupport(self, player) {\n // hide volume controls when they're not supported by the current tech\n if (player.tech_ && !player.tech_.featuresVolumeControl) {\n self.addClass('vjs-hidden');\n }\n\n self.on(player, 'loadstart', function () {\n if (!player.tech_.featuresVolumeControl) {\n self.addClass('vjs-hidden');\n } else {\n self.removeClass('vjs-hidden');\n }\n });\n};\n/**\n * Shows volume level\n *\n * @extends Component\n */\n\n\nvar VolumeLevel =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(VolumeLevel, _Component);\n\n function VolumeLevel() {\n return _Component.apply(this, arguments) || this;\n }\n\n var _proto = VolumeLevel.prototype;\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n\n _proto.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-volume-level',\n innerHTML: '<span class=\"vjs-control-text\"></span>'\n });\n };\n\n return VolumeLevel;\n}(Component);\n\nComponent.registerComponent('VolumeLevel', VolumeLevel);\n/**\n * The bar that contains the volume level and can be clicked on to adjust the level\n *\n * @extends Slider\n */\n\nvar VolumeBar =\n/*#__PURE__*/\nfunction (_Slider) {\n _inheritsLoose(VolumeBar, _Slider);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function VolumeBar(player, options) {\n var _this;\n\n _this = _Slider.call(this, player, options) || this;\n\n _this.on('slideractive', _this.updateLastVolume_);\n\n _this.on(player, 'volumechange', _this.updateARIAAttributes);\n\n player.ready(function () {\n return _this.updateARIAAttributes();\n });\n return _this;\n }\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n\n\n var _proto = VolumeBar.prototype;\n\n _proto.createEl = function createEl() {\n return _Slider.prototype.createEl.call(this, 'div', {\n className: 'vjs-volume-bar vjs-slider-bar'\n }, {\n 'aria-label': this.localize('Volume Level'),\n 'aria-live': 'polite'\n });\n }\n /**\n * Handle mouse down on volume bar\n *\n * @param {EventTarget~Event} event\n * The `mousedown` event that caused this to run.\n *\n * @listens mousedown\n */\n ;\n\n _proto.handleMouseDown = function handleMouseDown(event) {\n if (!isSingleLeftClick(event)) {\n return;\n }\n\n _Slider.prototype.handleMouseDown.call(this, event);\n }\n /**\n * Handle movement events on the {@link VolumeMenuButton}.\n *\n * @param {EventTarget~Event} event\n * The event that caused this function to run.\n *\n * @listens mousemove\n */\n ;\n\n _proto.handleMouseMove = function handleMouseMove(event) {\n if (!isSingleLeftClick(event)) {\n return;\n }\n\n this.checkMuted();\n this.player_.volume(this.calculateDistance(event));\n }\n /**\n * If the player is muted unmute it.\n */\n ;\n\n _proto.checkMuted = function checkMuted() {\n if (this.player_.muted()) {\n this.player_.muted(false);\n }\n }\n /**\n * Get percent of volume level\n *\n * @return {number}\n * Volume level percent as a decimal number.\n */\n ;\n\n _proto.getPercent = function getPercent() {\n if (this.player_.muted()) {\n return 0;\n }\n\n return this.player_.volume();\n }\n /**\n * Increase volume level for keyboard users\n */\n ;\n\n _proto.stepForward = function stepForward() {\n this.checkMuted();\n this.player_.volume(this.player_.volume() + 0.1);\n }\n /**\n * Decrease volume level for keyboard users\n */\n ;\n\n _proto.stepBack = function stepBack() {\n this.checkMuted();\n this.player_.volume(this.player_.volume() - 0.1);\n }\n /**\n * Update ARIA accessibility attributes\n *\n * @param {EventTarget~Event} [event]\n * The `volumechange` event that caused this function to run.\n *\n * @listens Player#volumechange\n */\n ;\n\n _proto.updateARIAAttributes = function updateARIAAttributes(event) {\n var ariaValue = this.player_.muted() ? 0 : this.volumeAsPercentage_();\n this.el_.setAttribute('aria-valuenow', ariaValue);\n this.el_.setAttribute('aria-valuetext', ariaValue + '%');\n }\n /**\n * Returns the current value of the player volume as a percentage\n *\n * @private\n */\n ;\n\n _proto.volumeAsPercentage_ = function volumeAsPercentage_() {\n return Math.round(this.player_.volume() * 100);\n }\n /**\n * When user starts dragging the VolumeBar, store the volume and listen for\n * the end of the drag. When the drag ends, if the volume was set to zero,\n * set lastVolume to the stored volume.\n *\n * @listens slideractive\n * @private\n */\n ;\n\n _proto.updateLastVolume_ = function updateLastVolume_() {\n var _this2 = this;\n\n var volumeBeforeDrag = this.player_.volume();\n this.one('sliderinactive', function () {\n if (_this2.player_.volume() === 0) {\n _this2.player_.lastVolume_(volumeBeforeDrag);\n }\n });\n };\n\n return VolumeBar;\n}(Slider);\n/**\n * Default options for the `VolumeBar`\n *\n * @type {Object}\n * @private\n */\n\n\nVolumeBar.prototype.options_ = {\n children: ['volumeLevel'],\n barName: 'volumeLevel'\n};\n/**\n * Call the update event for this Slider when this event happens on the player.\n *\n * @type {string}\n */\n\nVolumeBar.prototype.playerEvent = 'volumechange';\nComponent.registerComponent('VolumeBar', VolumeBar);\n/**\n * The component for controlling the volume level\n *\n * @extends Component\n */\n\nvar VolumeControl =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(VolumeControl, _Component);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options={}]\n * The key/value store of player options.\n */\n\n\n function VolumeControl(player, options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n options.vertical = options.vertical || false; // Pass the vertical option down to the VolumeBar if\n // the VolumeBar is turned on.\n\n if (typeof options.volumeBar === 'undefined' || isPlain(options.volumeBar)) {\n options.volumeBar = options.volumeBar || {};\n options.volumeBar.vertical = options.vertical;\n }\n\n _this = _Component.call(this, player, options) || this; // hide this control if volume support is missing\n\n checkVolumeSupport(_assertThisInitialized(_this), player);\n _this.throttledHandleMouseMove = throttle(bind(_assertThisInitialized(_this), _this.handleMouseMove), UPDATE_REFRESH_INTERVAL);\n\n _this.on('mousedown', _this.handleMouseDown);\n\n _this.on('touchstart', _this.handleMouseDown); // while the slider is active (the mouse has been pressed down and\n // is dragging) or in focus we do not want to hide the VolumeBar\n\n\n _this.on(_this.volumeBar, ['focus', 'slideractive'], function () {\n _this.volumeBar.addClass('vjs-slider-active');\n\n _this.addClass('vjs-slider-active');\n\n _this.trigger('slideractive');\n });\n\n _this.on(_this.volumeBar, ['blur', 'sliderinactive'], function () {\n _this.volumeBar.removeClass('vjs-slider-active');\n\n _this.removeClass('vjs-slider-active');\n\n _this.trigger('sliderinactive');\n });\n\n return _this;\n }\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n\n\n var _proto = VolumeControl.prototype;\n\n _proto.createEl = function createEl() {\n var orientationClass = 'vjs-volume-horizontal';\n\n if (this.options_.vertical) {\n orientationClass = 'vjs-volume-vertical';\n }\n\n return _Component.prototype.createEl.call(this, 'div', {\n className: \"vjs-volume-control vjs-control \" + orientationClass\n });\n }\n /**\n * Handle `mousedown` or `touchstart` events on the `VolumeControl`.\n *\n * @param {EventTarget~Event} event\n * `mousedown` or `touchstart` event that triggered this function\n *\n * @listens mousedown\n * @listens touchstart\n */\n ;\n\n _proto.handleMouseDown = function handleMouseDown(event) {\n var doc = this.el_.ownerDocument;\n this.on(doc, 'mousemove', this.throttledHandleMouseMove);\n this.on(doc, 'touchmove', this.throttledHandleMouseMove);\n this.on(doc, 'mouseup', this.handleMouseUp);\n this.on(doc, 'touchend', this.handleMouseUp);\n }\n /**\n * Handle `mouseup` or `touchend` events on the `VolumeControl`.\n *\n * @param {EventTarget~Event} event\n * `mouseup` or `touchend` event that triggered this function.\n *\n * @listens touchend\n * @listens mouseup\n */\n ;\n\n _proto.handleMouseUp = function handleMouseUp(event) {\n var doc = this.el_.ownerDocument;\n this.off(doc, 'mousemove', this.throttledHandleMouseMove);\n this.off(doc, 'touchmove', this.throttledHandleMouseMove);\n this.off(doc, 'mouseup', this.handleMouseUp);\n this.off(doc, 'touchend', this.handleMouseUp);\n }\n /**\n * Handle `mousedown` or `touchstart` events on the `VolumeControl`.\n *\n * @param {EventTarget~Event} event\n * `mousedown` or `touchstart` event that triggered this function\n *\n * @listens mousedown\n * @listens touchstart\n */\n ;\n\n _proto.handleMouseMove = function handleMouseMove(event) {\n this.volumeBar.handleMouseMove(event);\n };\n\n return VolumeControl;\n}(Component);\n/**\n * Default options for the `VolumeControl`\n *\n * @type {Object}\n * @private\n */\n\n\nVolumeControl.prototype.options_ = {\n children: ['volumeBar']\n};\nComponent.registerComponent('VolumeControl', VolumeControl);\n/**\n * Check if muting volume is supported and if it isn't hide the mute toggle\n * button.\n *\n * @param {Component} self\n * A reference to the mute toggle button\n *\n * @param {Player} player\n * A reference to the player\n *\n * @private\n */\n\nvar checkMuteSupport = function checkMuteSupport(self, player) {\n // hide mute toggle button if it's not supported by the current tech\n if (player.tech_ && !player.tech_.featuresMuteControl) {\n self.addClass('vjs-hidden');\n }\n\n self.on(player, 'loadstart', function () {\n if (!player.tech_.featuresMuteControl) {\n self.addClass('vjs-hidden');\n } else {\n self.removeClass('vjs-hidden');\n }\n });\n};\n/**\n * A button component for muting the audio.\n *\n * @extends Button\n */\n\n\nvar MuteToggle =\n/*#__PURE__*/\nfunction (_Button) {\n _inheritsLoose(MuteToggle, _Button);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function MuteToggle(player, options) {\n var _this;\n\n _this = _Button.call(this, player, options) || this; // hide this control if volume support is missing\n\n checkMuteSupport(_assertThisInitialized(_this), player);\n\n _this.on(player, ['loadstart', 'volumechange'], _this.update);\n\n return _this;\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n\n\n var _proto = MuteToggle.prototype;\n\n _proto.buildCSSClass = function buildCSSClass() {\n return \"vjs-mute-control \" + _Button.prototype.buildCSSClass.call(this);\n }\n /**\n * This gets called when an `MuteToggle` is \"clicked\". See\n * {@link ClickableComponent} for more detailed information on what a click can be.\n *\n * @param {EventTarget~Event} [event]\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n ;\n\n _proto.handleClick = function handleClick(event) {\n var vol = this.player_.volume();\n var lastVolume = this.player_.lastVolume_();\n\n if (vol === 0) {\n var volumeToSet = lastVolume < 0.1 ? 0.1 : lastVolume;\n this.player_.volume(volumeToSet);\n this.player_.muted(false);\n } else {\n this.player_.muted(this.player_.muted() ? false : true);\n }\n }\n /**\n * Update the `MuteToggle` button based on the state of `volume` and `muted`\n * on the player.\n *\n * @param {EventTarget~Event} [event]\n * The {@link Player#loadstart} event if this function was called\n * through an event.\n *\n * @listens Player#loadstart\n * @listens Player#volumechange\n */\n ;\n\n _proto.update = function update(event) {\n this.updateIcon_();\n this.updateControlText_();\n }\n /**\n * Update the appearance of the `MuteToggle` icon.\n *\n * Possible states (given `level` variable below):\n * - 0: crossed out\n * - 1: zero bars of volume\n * - 2: one bar of volume\n * - 3: two bars of volume\n *\n * @private\n */\n ;\n\n _proto.updateIcon_ = function updateIcon_() {\n var vol = this.player_.volume();\n var level = 3; // in iOS when a player is loaded with muted attribute\n // and volume is changed with a native mute button\n // we want to make sure muted state is updated\n\n if (IS_IOS && this.player_.tech_ && this.player_.tech_.el_) {\n this.player_.muted(this.player_.tech_.el_.muted);\n }\n\n if (vol === 0 || this.player_.muted()) {\n level = 0;\n } else if (vol < 0.33) {\n level = 1;\n } else if (vol < 0.67) {\n level = 2;\n } // TODO improve muted icon classes\n\n\n for (var i = 0; i < 4; i++) {\n removeClass(this.el_, \"vjs-vol-\" + i);\n }\n\n addClass(this.el_, \"vjs-vol-\" + level);\n }\n /**\n * If `muted` has changed on the player, update the control text\n * (`title` attribute on `vjs-mute-control` element and content of\n * `vjs-control-text` element).\n *\n * @private\n */\n ;\n\n _proto.updateControlText_ = function updateControlText_() {\n var soundOff = this.player_.muted() || this.player_.volume() === 0;\n var text = soundOff ? 'Unmute' : 'Mute';\n\n if (this.controlText() !== text) {\n this.controlText(text);\n }\n };\n\n return MuteToggle;\n}(Button);\n/**\n * The text that should display over the `MuteToggle`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\n\nMuteToggle.prototype.controlText_ = 'Mute';\nComponent.registerComponent('MuteToggle', MuteToggle);\n/**\n * A Component to contain the MuteToggle and VolumeControl so that\n * they can work together.\n *\n * @extends Component\n */\n\nvar VolumePanel =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(VolumePanel, _Component);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options={}]\n * The key/value store of player options.\n */\n\n\n function VolumePanel(player, options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options.inline !== 'undefined') {\n options.inline = options.inline;\n } else {\n options.inline = true;\n } // pass the inline option down to the VolumeControl as vertical if\n // the VolumeControl is on.\n\n\n if (typeof options.volumeControl === 'undefined' || isPlain(options.volumeControl)) {\n options.volumeControl = options.volumeControl || {};\n options.volumeControl.vertical = !options.inline;\n }\n\n _this = _Component.call(this, player, options) || this;\n\n _this.on(player, ['loadstart'], _this.volumePanelState_);\n\n _this.on(_this.muteToggle, 'keyup', _this.handleKeyPress);\n\n _this.on(_this.volumeControl, 'keyup', _this.handleVolumeControlKeyUp);\n\n _this.on('keydown', _this.handleKeyPress);\n\n _this.on('mouseover', _this.handleMouseOver);\n\n _this.on('mouseout', _this.handleMouseOut); // while the slider is active (the mouse has been pressed down and\n // is dragging) we do not want to hide the VolumeBar\n\n\n _this.on(_this.volumeControl, ['slideractive'], _this.sliderActive_);\n\n _this.on(_this.volumeControl, ['sliderinactive'], _this.sliderInactive_);\n\n return _this;\n }\n /**\n * Add vjs-slider-active class to the VolumePanel\n *\n * @listens VolumeControl#slideractive\n * @private\n */\n\n\n var _proto = VolumePanel.prototype;\n\n _proto.sliderActive_ = function sliderActive_() {\n this.addClass('vjs-slider-active');\n }\n /**\n * Removes vjs-slider-active class to the VolumePanel\n *\n * @listens VolumeControl#sliderinactive\n * @private\n */\n ;\n\n _proto.sliderInactive_ = function sliderInactive_() {\n this.removeClass('vjs-slider-active');\n }\n /**\n * Adds vjs-hidden or vjs-mute-toggle-only to the VolumePanel\n * depending on MuteToggle and VolumeControl state\n *\n * @listens Player#loadstart\n * @private\n */\n ;\n\n _proto.volumePanelState_ = function volumePanelState_() {\n // hide volume panel if neither volume control or mute toggle\n // are displayed\n if (this.volumeControl.hasClass('vjs-hidden') && this.muteToggle.hasClass('vjs-hidden')) {\n this.addClass('vjs-hidden');\n } // if only mute toggle is visible we don't want\n // volume panel expanding when hovered or active\n\n\n if (this.volumeControl.hasClass('vjs-hidden') && !this.muteToggle.hasClass('vjs-hidden')) {\n this.addClass('vjs-mute-toggle-only');\n }\n }\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n ;\n\n _proto.createEl = function createEl() {\n var orientationClass = 'vjs-volume-panel-horizontal';\n\n if (!this.options_.inline) {\n orientationClass = 'vjs-volume-panel-vertical';\n }\n\n return _Component.prototype.createEl.call(this, 'div', {\n className: \"vjs-volume-panel vjs-control \" + orientationClass\n });\n }\n /**\n * Dispose of the `volume-panel` and all child components.\n */\n ;\n\n _proto.dispose = function dispose() {\n this.handleMouseOut();\n\n _Component.prototype.dispose.call(this);\n }\n /**\n * Handles `keyup` events on the `VolumeControl`, looking for ESC, which closes\n * the volume panel and sets focus on `MuteToggle`.\n *\n * @param {EventTarget~Event} event\n * The `keyup` event that caused this function to be called.\n *\n * @listens keyup\n */\n ;\n\n _proto.handleVolumeControlKeyUp = function handleVolumeControlKeyUp(event) {\n if (keycode.isEventKey(event, 'Esc')) {\n this.muteToggle.focus();\n }\n }\n /**\n * This gets called when a `VolumePanel` gains hover via a `mouseover` event.\n * Turns on listening for `mouseover` event. When they happen it\n * calls `this.handleMouseOver`.\n *\n * @param {EventTarget~Event} event\n * The `mouseover` event that caused this function to be called.\n *\n * @listens mouseover\n */\n ;\n\n _proto.handleMouseOver = function handleMouseOver(event) {\n this.addClass('vjs-hover');\n on(document, 'keyup', bind(this, this.handleKeyPress));\n }\n /**\n * This gets called when a `VolumePanel` gains hover via a `mouseout` event.\n * Turns on listening for `mouseout` event. When they happen it\n * calls `this.handleMouseOut`.\n *\n * @param {EventTarget~Event} event\n * The `mouseout` event that caused this function to be called.\n *\n * @listens mouseout\n */\n ;\n\n _proto.handleMouseOut = function handleMouseOut(event) {\n this.removeClass('vjs-hover');\n off(document, 'keyup', bind(this, this.handleKeyPress));\n }\n /**\n * Handles `keyup` event on the document or `keydown` event on the `VolumePanel`,\n * looking for ESC, which hides the `VolumeControl`.\n *\n * @param {EventTarget~Event} event\n * The keypress that triggered this event.\n *\n * @listens keydown | keyup\n */\n ;\n\n _proto.handleKeyPress = function handleKeyPress(event) {\n if (keycode.isEventKey(event, 'Esc')) {\n this.handleMouseOut();\n }\n };\n\n return VolumePanel;\n}(Component);\n/**\n * Default options for the `VolumeControl`\n *\n * @type {Object}\n * @private\n */\n\n\nVolumePanel.prototype.options_ = {\n children: ['muteToggle', 'volumeControl']\n};\nComponent.registerComponent('VolumePanel', VolumePanel);\n/**\n * The Menu component is used to build popup menus, including subtitle and\n * captions selection menus.\n *\n * @extends Component\n */\n\nvar Menu =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(Menu, _Component);\n /**\n * Create an instance of this class.\n *\n * @param {Player} player\n * the player that this component should attach to\n *\n * @param {Object} [options]\n * Object of option names and values\n *\n */\n\n\n function Menu(player, options) {\n var _this;\n\n _this = _Component.call(this, player, options) || this;\n\n if (options) {\n _this.menuButton_ = options.menuButton;\n }\n\n _this.focusedChild_ = -1;\n\n _this.on('keydown', _this.handleKeyDown); // All the menu item instances share the same blur handler provided by the menu container.\n\n\n _this.boundHandleBlur_ = bind(_assertThisInitialized(_this), _this.handleBlur);\n _this.boundHandleTapClick_ = bind(_assertThisInitialized(_this), _this.handleTapClick);\n return _this;\n }\n /**\n * Add event listeners to the {@link MenuItem}.\n *\n * @param {Object} component\n * The instance of the `MenuItem` to add listeners to.\n *\n */\n\n\n var _proto = Menu.prototype;\n\n _proto.addEventListenerForItem = function addEventListenerForItem(component) {\n if (!(component instanceof Component)) {\n return;\n }\n\n this.on(component, 'blur', this.boundHandleBlur_);\n this.on(component, ['tap', 'click'], this.boundHandleTapClick_);\n }\n /**\n * Remove event listeners from the {@link MenuItem}.\n *\n * @param {Object} component\n * The instance of the `MenuItem` to remove listeners.\n *\n */\n ;\n\n _proto.removeEventListenerForItem = function removeEventListenerForItem(component) {\n if (!(component instanceof Component)) {\n return;\n }\n\n this.off(component, 'blur', this.boundHandleBlur_);\n this.off(component, ['tap', 'click'], this.boundHandleTapClick_);\n }\n /**\n * This method will be called indirectly when the component has been added\n * before the component adds to the new menu instance by `addItem`.\n * In this case, the original menu instance will remove the component\n * by calling `removeChild`.\n *\n * @param {Object} component\n * The instance of the `MenuItem`\n */\n ;\n\n _proto.removeChild = function removeChild(component) {\n if (typeof component === 'string') {\n component = this.getChild(component);\n }\n\n this.removeEventListenerForItem(component);\n\n _Component.prototype.removeChild.call(this, component);\n }\n /**\n * Add a {@link MenuItem} to the menu.\n *\n * @param {Object|string} component\n * The name or instance of the `MenuItem` to add.\n *\n */\n ;\n\n _proto.addItem = function addItem(component) {\n var childComponent = this.addChild(component);\n\n if (childComponent) {\n this.addEventListenerForItem(childComponent);\n }\n }\n /**\n * Create the `Menu`s DOM element.\n *\n * @return {Element}\n * the element that was created\n */\n ;\n\n _proto.createEl = function createEl$1() {\n var contentElType = this.options_.contentElType || 'ul';\n this.contentEl_ = createEl(contentElType, {\n className: 'vjs-menu-content'\n });\n this.contentEl_.setAttribute('role', 'menu');\n\n var el = _Component.prototype.createEl.call(this, 'div', {\n append: this.contentEl_,\n className: 'vjs-menu'\n });\n\n el.appendChild(this.contentEl_); // Prevent clicks from bubbling up. Needed for Menu Buttons,\n // where a click on the parent is significant\n\n on(el, 'click', function (event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n });\n return el;\n };\n\n _proto.dispose = function dispose() {\n this.contentEl_ = null;\n this.boundHandleBlur_ = null;\n this.boundHandleTapClick_ = null;\n\n _Component.prototype.dispose.call(this);\n }\n /**\n * Called when a `MenuItem` loses focus.\n *\n * @param {EventTarget~Event} event\n * The `blur` event that caused this function to be called.\n *\n * @listens blur\n */\n ;\n\n _proto.handleBlur = function handleBlur(event) {\n var relatedTarget = event.relatedTarget || document.activeElement; // Close menu popup when a user clicks outside the menu\n\n if (!this.children().some(function (element) {\n return element.el() === relatedTarget;\n })) {\n var btn = this.menuButton_;\n\n if (btn && btn.buttonPressed_ && relatedTarget !== btn.el().firstChild) {\n btn.unpressButton();\n }\n }\n }\n /**\n * Called when a `MenuItem` gets clicked or tapped.\n *\n * @param {EventTarget~Event} event\n * The `click` or `tap` event that caused this function to be called.\n *\n * @listens click,tap\n */\n ;\n\n _proto.handleTapClick = function handleTapClick(event) {\n // Unpress the associated MenuButton, and move focus back to it\n if (this.menuButton_) {\n this.menuButton_.unpressButton();\n var childComponents = this.children();\n\n if (!Array.isArray(childComponents)) {\n return;\n }\n\n var foundComponent = childComponents.filter(function (component) {\n return component.el() === event.target;\n })[0];\n\n if (!foundComponent) {\n return;\n } // don't focus menu button if item is a caption settings item\n // because focus will move elsewhere\n\n\n if (foundComponent.name() !== 'CaptionSettingsMenuItem') {\n this.menuButton_.focus();\n }\n }\n }\n /**\n * Handle a `keydown` event on this menu. This listener is added in the constructor.\n *\n * @param {EventTarget~Event} event\n * A `keydown` event that happened on the menu.\n *\n * @listens keydown\n */\n ;\n\n _proto.handleKeyDown = function handleKeyDown(event) {\n // Left and Down Arrows\n if (keycode.isEventKey(event, 'Left') || keycode.isEventKey(event, 'Down')) {\n event.preventDefault();\n event.stopPropagation();\n this.stepForward(); // Up and Right Arrows\n } else if (keycode.isEventKey(event, 'Right') || keycode.isEventKey(event, 'Up')) {\n event.preventDefault();\n event.stopPropagation();\n this.stepBack();\n }\n }\n /**\n * Move to next (lower) menu item for keyboard users.\n */\n ;\n\n _proto.stepForward = function stepForward() {\n var stepChild = 0;\n\n if (this.focusedChild_ !== undefined) {\n stepChild = this.focusedChild_ + 1;\n }\n\n this.focus(stepChild);\n }\n /**\n * Move to previous (higher) menu item for keyboard users.\n */\n ;\n\n _proto.stepBack = function stepBack() {\n var stepChild = 0;\n\n if (this.focusedChild_ !== undefined) {\n stepChild = this.focusedChild_ - 1;\n }\n\n this.focus(stepChild);\n }\n /**\n * Set focus on a {@link MenuItem} in the `Menu`.\n *\n * @param {Object|string} [item=0]\n * Index of child item set focus on.\n */\n ;\n\n _proto.focus = function focus(item) {\n if (item === void 0) {\n item = 0;\n }\n\n var children = this.children().slice();\n var haveTitle = children.length && children[0].className && /vjs-menu-title/.test(children[0].className);\n\n if (haveTitle) {\n children.shift();\n }\n\n if (children.length > 0) {\n if (item < 0) {\n item = 0;\n } else if (item >= children.length) {\n item = children.length - 1;\n }\n\n this.focusedChild_ = item;\n children[item].el_.focus();\n }\n };\n\n return Menu;\n}(Component);\n\nComponent.registerComponent('Menu', Menu);\n/**\n * A `MenuButton` class for any popup {@link Menu}.\n *\n * @extends Component\n */\n\nvar MenuButton =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(MenuButton, _Component);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options={}]\n * The key/value store of player options.\n */\n\n\n function MenuButton(player, options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _Component.call(this, player, options) || this;\n _this.menuButton_ = new Button(player, options);\n\n _this.menuButton_.controlText(_this.controlText_);\n\n _this.menuButton_.el_.setAttribute('aria-haspopup', 'true'); // Add buildCSSClass values to the button, not the wrapper\n\n\n var buttonClass = Button.prototype.buildCSSClass();\n _this.menuButton_.el_.className = _this.buildCSSClass() + ' ' + buttonClass;\n\n _this.menuButton_.removeClass('vjs-control');\n\n _this.addChild(_this.menuButton_);\n\n _this.update();\n\n _this.enabled_ = true;\n\n _this.on(_this.menuButton_, 'tap', _this.handleClick);\n\n _this.on(_this.menuButton_, 'click', _this.handleClick);\n\n _this.on(_this.menuButton_, 'keydown', _this.handleKeyDown);\n\n _this.on(_this.menuButton_, 'mouseenter', function () {\n _this.addClass('vjs-hover');\n\n _this.menu.show();\n\n on(document, 'keyup', bind(_assertThisInitialized(_this), _this.handleMenuKeyUp));\n });\n\n _this.on('mouseleave', _this.handleMouseLeave);\n\n _this.on('keydown', _this.handleSubmenuKeyDown);\n\n return _this;\n }\n /**\n * Update the menu based on the current state of its items.\n */\n\n\n var _proto = MenuButton.prototype;\n\n _proto.update = function update() {\n var menu = this.createMenu();\n\n if (this.menu) {\n this.menu.dispose();\n this.removeChild(this.menu);\n }\n\n this.menu = menu;\n this.addChild(menu);\n /**\n * Track the state of the menu button\n *\n * @type {Boolean}\n * @private\n */\n\n this.buttonPressed_ = false;\n this.menuButton_.el_.setAttribute('aria-expanded', 'false');\n\n if (this.items && this.items.length <= this.hideThreshold_) {\n this.hide();\n } else {\n this.show();\n }\n }\n /**\n * Create the menu and add all items to it.\n *\n * @return {Menu}\n * The constructed menu\n */\n ;\n\n _proto.createMenu = function createMenu() {\n var menu = new Menu(this.player_, {\n menuButton: this\n });\n /**\n * Hide the menu if the number of items is less than or equal to this threshold. This defaults\n * to 0 and whenever we add items which can be hidden to the menu we'll increment it. We list\n * it here because every time we run `createMenu` we need to reset the value.\n *\n * @protected\n * @type {Number}\n */\n\n this.hideThreshold_ = 0; // Add a title list item to the top\n\n if (this.options_.title) {\n var titleEl = createEl('li', {\n className: 'vjs-menu-title',\n innerHTML: toTitleCase(this.options_.title),\n tabIndex: -1\n });\n this.hideThreshold_ += 1;\n var titleComponent = new Component(this.player_, {\n el: titleEl\n });\n menu.addItem(titleComponent);\n }\n\n this.items = this.createItems();\n\n if (this.items) {\n // Add menu items to the menu\n for (var i = 0; i < this.items.length; i++) {\n menu.addItem(this.items[i]);\n }\n }\n\n return menu;\n }\n /**\n * Create the list of menu items. Specific to each subclass.\n *\n * @abstract\n */\n ;\n\n _proto.createItems = function createItems() {}\n /**\n * Create the `MenuButtons`s DOM element.\n *\n * @return {Element}\n * The element that gets created.\n */\n ;\n\n _proto.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: this.buildWrapperCSSClass()\n }, {});\n }\n /**\n * Allow sub components to stack CSS class names for the wrapper element\n *\n * @return {string}\n * The constructed wrapper DOM `className`\n */\n ;\n\n _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\n var menuButtonClass = 'vjs-menu-button'; // If the inline option is passed, we want to use different styles altogether.\n\n if (this.options_.inline === true) {\n menuButtonClass += '-inline';\n } else {\n menuButtonClass += '-popup';\n } // TODO: Fix the CSS so that this isn't necessary\n\n\n var buttonClass = Button.prototype.buildCSSClass();\n return \"vjs-menu-button \" + menuButtonClass + \" \" + buttonClass + \" \" + _Component.prototype.buildCSSClass.call(this);\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n ;\n\n _proto.buildCSSClass = function buildCSSClass() {\n var menuButtonClass = 'vjs-menu-button'; // If the inline option is passed, we want to use different styles altogether.\n\n if (this.options_.inline === true) {\n menuButtonClass += '-inline';\n } else {\n menuButtonClass += '-popup';\n }\n\n return \"vjs-menu-button \" + menuButtonClass + \" \" + _Component.prototype.buildCSSClass.call(this);\n }\n /**\n * Get or set the localized control text that will be used for accessibility.\n *\n * > NOTE: This will come from the internal `menuButton_` element.\n *\n * @param {string} [text]\n * Control text for element.\n *\n * @param {Element} [el=this.menuButton_.el()]\n * Element to set the title on.\n *\n * @return {string}\n * - The control text when getting\n */\n ;\n\n _proto.controlText = function controlText(text, el) {\n if (el === void 0) {\n el = this.menuButton_.el();\n }\n\n return this.menuButton_.controlText(text, el);\n }\n /**\n * Dispose of the `menu-button` and all child components.\n */\n ;\n\n _proto.dispose = function dispose() {\n this.handleMouseLeave();\n\n _Component.prototype.dispose.call(this);\n }\n /**\n * Handle a click on a `MenuButton`.\n * See {@link ClickableComponent#handleClick} for instances where this is called.\n *\n * @param {EventTarget~Event} event\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n ;\n\n _proto.handleClick = function handleClick(event) {\n if (this.buttonPressed_) {\n this.unpressButton();\n } else {\n this.pressButton();\n }\n }\n /**\n * Handle `mouseleave` for `MenuButton`.\n *\n * @param {EventTarget~Event} event\n * The `mouseleave` event that caused this function to be called.\n *\n * @listens mouseleave\n */\n ;\n\n _proto.handleMouseLeave = function handleMouseLeave(event) {\n this.removeClass('vjs-hover');\n off(document, 'keyup', bind(this, this.handleMenuKeyUp));\n }\n /**\n * Set the focus to the actual button, not to this element\n */\n ;\n\n _proto.focus = function focus() {\n this.menuButton_.focus();\n }\n /**\n * Remove the focus from the actual button, not this element\n */\n ;\n\n _proto.blur = function blur() {\n this.menuButton_.blur();\n }\n /**\n * Handle tab, escape, down arrow, and up arrow keys for `MenuButton`. See\n * {@link ClickableComponent#handleKeyDown} for instances where this is called.\n *\n * @param {EventTarget~Event} event\n * The `keydown` event that caused this function to be called.\n *\n * @listens keydown\n */\n ;\n\n _proto.handleKeyDown = function handleKeyDown(event) {\n // Escape or Tab unpress the 'button'\n if (keycode.isEventKey(event, 'Esc') || keycode.isEventKey(event, 'Tab')) {\n if (this.buttonPressed_) {\n this.unpressButton();\n } // Don't preventDefault for Tab key - we still want to lose focus\n\n\n if (!keycode.isEventKey(event, 'Tab')) {\n event.preventDefault(); // Set focus back to the menu button's button\n\n this.menuButton_.focus();\n } // Up Arrow or Down Arrow also 'press' the button to open the menu\n\n } else if (keycode.isEventKey(event, 'Up') || keycode.isEventKey(event, 'Down')) {\n if (!this.buttonPressed_) {\n event.preventDefault();\n this.pressButton();\n }\n }\n }\n /**\n * Handle a `keyup` event on a `MenuButton`. The listener for this is added in\n * the constructor.\n *\n * @param {EventTarget~Event} event\n * Key press event\n *\n * @listens keyup\n */\n ;\n\n _proto.handleMenuKeyUp = function handleMenuKeyUp(event) {\n // Escape hides popup menu\n if (keycode.isEventKey(event, 'Esc') || keycode.isEventKey(event, 'Tab')) {\n this.removeClass('vjs-hover');\n }\n }\n /**\n * This method name now delegates to `handleSubmenuKeyDown`. This means\n * anyone calling `handleSubmenuKeyPress` will not see their method calls\n * stop working.\n *\n * @param {EventTarget~Event} event\n * The event that caused this function to be called.\n */\n ;\n\n _proto.handleSubmenuKeyPress = function handleSubmenuKeyPress(event) {\n this.handleSubmenuKeyDown(event);\n }\n /**\n * Handle a `keydown` event on a sub-menu. The listener for this is added in\n * the constructor.\n *\n * @param {EventTarget~Event} event\n * Key press event\n *\n * @listens keydown\n */\n ;\n\n _proto.handleSubmenuKeyDown = function handleSubmenuKeyDown(event) {\n // Escape or Tab unpress the 'button'\n if (keycode.isEventKey(event, 'Esc') || keycode.isEventKey(event, 'Tab')) {\n if (this.buttonPressed_) {\n this.unpressButton();\n } // Don't preventDefault for Tab key - we still want to lose focus\n\n\n if (!keycode.isEventKey(event, 'Tab')) {\n event.preventDefault(); // Set focus back to the menu button's button\n\n this.menuButton_.focus();\n }\n }\n }\n /**\n * Put the current `MenuButton` into a pressed state.\n */\n ;\n\n _proto.pressButton = function pressButton() {\n if (this.enabled_) {\n this.buttonPressed_ = true;\n this.menu.show();\n this.menu.lockShowing();\n this.menuButton_.el_.setAttribute('aria-expanded', 'true'); // set the focus into the submenu, except on iOS where it is resulting in\n // undesired scrolling behavior when the player is in an iframe\n\n if (IS_IOS && isInFrame()) {\n // Return early so that the menu isn't focused\n return;\n }\n\n this.menu.focus();\n }\n }\n /**\n * Take the current `MenuButton` out of a pressed state.\n */\n ;\n\n _proto.unpressButton = function unpressButton() {\n if (this.enabled_) {\n this.buttonPressed_ = false;\n this.menu.unlockShowing();\n this.menu.hide();\n this.menuButton_.el_.setAttribute('aria-expanded', 'false');\n }\n }\n /**\n * Disable the `MenuButton`. Don't allow it to be clicked.\n */\n ;\n\n _proto.disable = function disable() {\n this.unpressButton();\n this.enabled_ = false;\n this.addClass('vjs-disabled');\n this.menuButton_.disable();\n }\n /**\n * Enable the `MenuButton`. Allow it to be clicked.\n */\n ;\n\n _proto.enable = function enable() {\n this.enabled_ = true;\n this.removeClass('vjs-disabled');\n this.menuButton_.enable();\n };\n\n return MenuButton;\n}(Component);\n\nComponent.registerComponent('MenuButton', MenuButton);\n/**\n * The base class for buttons that toggle specific track types (e.g. subtitles).\n *\n * @extends MenuButton\n */\n\nvar TrackButton =\n/*#__PURE__*/\nfunction (_MenuButton) {\n _inheritsLoose(TrackButton, _MenuButton);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function TrackButton(player, options) {\n var _this;\n\n var tracks = options.tracks;\n _this = _MenuButton.call(this, player, options) || this;\n\n if (_this.items.length <= 1) {\n _this.hide();\n }\n\n if (!tracks) {\n return _assertThisInitialized(_this);\n }\n\n var updateHandler = bind(_assertThisInitialized(_this), _this.update);\n tracks.addEventListener('removetrack', updateHandler);\n tracks.addEventListener('addtrack', updateHandler);\n\n _this.player_.on('ready', updateHandler);\n\n _this.player_.on('dispose', function () {\n tracks.removeEventListener('removetrack', updateHandler);\n tracks.removeEventListener('addtrack', updateHandler);\n });\n\n return _this;\n }\n\n return TrackButton;\n}(MenuButton);\n\nComponent.registerComponent('TrackButton', TrackButton);\n/**\n * @file menu-keys.js\n */\n\n/**\n * All keys used for operation of a menu (`MenuButton`, `Menu`, and `MenuItem`)\n * Note that 'Enter' and 'Space' are not included here (otherwise they would\n * prevent the `MenuButton` and `MenuItem` from being keyboard-clickable)\n * @typedef MenuKeys\n * @array\n */\n\nvar MenuKeys = ['Tab', 'Esc', 'Up', 'Down', 'Right', 'Left'];\n/**\n * The component for a menu item. `<li>`\n *\n * @extends ClickableComponent\n */\n\nvar MenuItem =\n/*#__PURE__*/\nfunction (_ClickableComponent) {\n _inheritsLoose(MenuItem, _ClickableComponent);\n /**\n * Creates an instance of the this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options={}]\n * The key/value store of player options.\n *\n */\n\n\n function MenuItem(player, options) {\n var _this;\n\n _this = _ClickableComponent.call(this, player, options) || this;\n _this.selectable = options.selectable;\n _this.isSelected_ = options.selected || false;\n _this.multiSelectable = options.multiSelectable;\n\n _this.selected(_this.isSelected_);\n\n if (_this.selectable) {\n if (_this.multiSelectable) {\n _this.el_.setAttribute('role', 'menuitemcheckbox');\n } else {\n _this.el_.setAttribute('role', 'menuitemradio');\n }\n } else {\n _this.el_.setAttribute('role', 'menuitem');\n }\n\n return _this;\n }\n /**\n * Create the `MenuItem's DOM element\n *\n * @param {string} [type=li]\n * Element's node type, not actually used, always set to `li`.\n *\n * @param {Object} [props={}]\n * An object of properties that should be set on the element\n *\n * @param {Object} [attrs={}]\n * An object of attributes that should be set on the element\n *\n * @return {Element}\n * The element that gets created.\n */\n\n\n var _proto = MenuItem.prototype;\n\n _proto.createEl = function createEl(type, props, attrs) {\n // The control is textual, not just an icon\n this.nonIconControl = true;\n return _ClickableComponent.prototype.createEl.call(this, 'li', assign({\n className: 'vjs-menu-item',\n innerHTML: \"<span class=\\\"vjs-menu-item-text\\\">\" + this.localize(this.options_.label) + \"</span>\",\n tabIndex: -1\n }, props), attrs);\n }\n /**\n * Ignore keys which are used by the menu, but pass any other ones up. See\n * {@link ClickableComponent#handleKeyDown} for instances where this is called.\n *\n * @param {EventTarget~Event} event\n * The `keydown` event that caused this function to be called.\n *\n * @listens keydown\n */\n ;\n\n _proto.handleKeyDown = function handleKeyDown(event) {\n if (!MenuKeys.some(function (key) {\n return keycode.isEventKey(event, key);\n })) {\n // Pass keydown handling up for unused keys\n _ClickableComponent.prototype.handleKeyDown.call(this, event);\n }\n }\n /**\n * Any click on a `MenuItem` puts it into the selected state.\n * See {@link ClickableComponent#handleClick} for instances where this is called.\n *\n * @param {EventTarget~Event} event\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n ;\n\n _proto.handleClick = function handleClick(event) {\n this.selected(true);\n }\n /**\n * Set the state for this menu item as selected or not.\n *\n * @param {boolean} selected\n * if the menu item is selected or not\n */\n ;\n\n _proto.selected = function selected(_selected) {\n if (this.selectable) {\n if (_selected) {\n this.addClass('vjs-selected');\n this.el_.setAttribute('aria-checked', 'true'); // aria-checked isn't fully supported by browsers/screen readers,\n // so indicate selected state to screen reader in the control text.\n\n this.controlText(', selected');\n this.isSelected_ = true;\n } else {\n this.removeClass('vjs-selected');\n this.el_.setAttribute('aria-checked', 'false'); // Indicate un-selected state to screen reader\n\n this.controlText('');\n this.isSelected_ = false;\n }\n }\n };\n\n return MenuItem;\n}(ClickableComponent);\n\nComponent.registerComponent('MenuItem', MenuItem);\n/**\n * The specific menu item type for selecting a language within a text track kind\n *\n * @extends MenuItem\n */\n\nvar TextTrackMenuItem =\n/*#__PURE__*/\nfunction (_MenuItem) {\n _inheritsLoose(TextTrackMenuItem, _MenuItem);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function TextTrackMenuItem(player, options) {\n var _this;\n\n var track = options.track;\n var tracks = player.textTracks(); // Modify options for parent MenuItem class's init.\n\n options.label = track.label || track.language || 'Unknown';\n options.selected = track.mode === 'showing';\n _this = _MenuItem.call(this, player, options) || this;\n _this.track = track; // Determine the relevant kind(s) of tracks for this component and filter\n // out empty kinds.\n\n _this.kinds = (options.kinds || [options.kind || _this.track.kind]).filter(Boolean);\n\n var changeHandler = function changeHandler() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this.handleTracksChange.apply(_assertThisInitialized(_this), args);\n };\n\n var selectedLanguageChangeHandler = function selectedLanguageChangeHandler() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n _this.handleSelectedLanguageChange.apply(_assertThisInitialized(_this), args);\n };\n\n player.on(['loadstart', 'texttrackchange'], changeHandler);\n tracks.addEventListener('change', changeHandler);\n tracks.addEventListener('selectedlanguagechange', selectedLanguageChangeHandler);\n\n _this.on('dispose', function () {\n player.off(['loadstart', 'texttrackchange'], changeHandler);\n tracks.removeEventListener('change', changeHandler);\n tracks.removeEventListener('selectedlanguagechange', selectedLanguageChangeHandler);\n }); // iOS7 doesn't dispatch change events to TextTrackLists when an\n // associated track's mode changes. Without something like\n // Object.observe() (also not present on iOS7), it's not\n // possible to detect changes to the mode attribute and polyfill\n // the change event. As a poor substitute, we manually dispatch\n // change events whenever the controls modify the mode.\n\n\n if (tracks.onchange === undefined) {\n var event;\n\n _this.on(['tap', 'click'], function () {\n if (typeof window$1.Event !== 'object') {\n // Android 2.3 throws an Illegal Constructor error for window.Event\n try {\n event = new window$1.Event('change');\n } catch (err) {// continue regardless of error\n }\n }\n\n if (!event) {\n event = document.createEvent('Event');\n event.initEvent('change', true, true);\n }\n\n tracks.dispatchEvent(event);\n });\n } // set the default state based on current tracks\n\n\n _this.handleTracksChange();\n\n return _this;\n }\n /**\n * This gets called when an `TextTrackMenuItem` is \"clicked\". See\n * {@link ClickableComponent} for more detailed information on what a click can be.\n *\n * @param {EventTarget~Event} event\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n\n\n var _proto = TextTrackMenuItem.prototype;\n\n _proto.handleClick = function handleClick(event) {\n var referenceTrack = this.track;\n var tracks = this.player_.textTracks();\n\n _MenuItem.prototype.handleClick.call(this, event);\n\n if (!tracks) {\n return;\n }\n\n for (var i = 0; i < tracks.length; i++) {\n var track = tracks[i]; // If the track from the text tracks list is not of the right kind,\n // skip it. We do not want to affect tracks of incompatible kind(s).\n\n if (this.kinds.indexOf(track.kind) === -1) {\n continue;\n } // If this text track is the component's track and it is not showing,\n // set it to showing.\n\n\n if (track === referenceTrack) {\n if (track.mode !== 'showing') {\n track.mode = 'showing';\n } // If this text track is not the component's track and it is not\n // disabled, set it to disabled.\n\n } else if (track.mode !== 'disabled') {\n track.mode = 'disabled';\n }\n }\n }\n /**\n * Handle text track list change\n *\n * @param {EventTarget~Event} event\n * The `change` event that caused this function to be called.\n *\n * @listens TextTrackList#change\n */\n ;\n\n _proto.handleTracksChange = function handleTracksChange(event) {\n var shouldBeSelected = this.track.mode === 'showing'; // Prevent redundant selected() calls because they may cause\n // screen readers to read the appended control text unnecessarily\n\n if (shouldBeSelected !== this.isSelected_) {\n this.selected(shouldBeSelected);\n }\n };\n\n _proto.handleSelectedLanguageChange = function handleSelectedLanguageChange(event) {\n if (this.track.mode === 'showing') {\n var selectedLanguage = this.player_.cache_.selectedLanguage; // Don't replace the kind of track across the same language\n\n if (selectedLanguage && selectedLanguage.enabled && selectedLanguage.language === this.track.language && selectedLanguage.kind !== this.track.kind) {\n return;\n }\n\n this.player_.cache_.selectedLanguage = {\n enabled: true,\n language: this.track.language,\n kind: this.track.kind\n };\n }\n };\n\n _proto.dispose = function dispose() {\n // remove reference to track object on dispose\n this.track = null;\n\n _MenuItem.prototype.dispose.call(this);\n };\n\n return TextTrackMenuItem;\n}(MenuItem);\n\nComponent.registerComponent('TextTrackMenuItem', TextTrackMenuItem);\n/**\n * A special menu item for turning of a specific type of text track\n *\n * @extends TextTrackMenuItem\n */\n\nvar OffTextTrackMenuItem =\n/*#__PURE__*/\nfunction (_TextTrackMenuItem) {\n _inheritsLoose(OffTextTrackMenuItem, _TextTrackMenuItem);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function OffTextTrackMenuItem(player, options) {\n // Create pseudo track info\n // Requires options['kind']\n options.track = {\n player: player,\n // it is no longer necessary to store `kind` or `kinds` on the track itself\n // since they are now stored in the `kinds` property of all instances of\n // TextTrackMenuItem, but this will remain for backwards compatibility\n kind: options.kind,\n kinds: options.kinds,\n \"default\": false,\n mode: 'disabled'\n };\n\n if (!options.kinds) {\n options.kinds = [options.kind];\n }\n\n if (options.label) {\n options.track.label = options.label;\n } else {\n options.track.label = options.kinds.join(' and ') + ' off';\n } // MenuItem is selectable\n\n\n options.selectable = true; // MenuItem is NOT multiSelectable (i.e. only one can be marked \"selected\" at a time)\n\n options.multiSelectable = false;\n return _TextTrackMenuItem.call(this, player, options) || this;\n }\n /**\n * Handle text track change\n *\n * @param {EventTarget~Event} event\n * The event that caused this function to run\n */\n\n\n var _proto = OffTextTrackMenuItem.prototype;\n\n _proto.handleTracksChange = function handleTracksChange(event) {\n var tracks = this.player().textTracks();\n var shouldBeSelected = true;\n\n for (var i = 0, l = tracks.length; i < l; i++) {\n var track = tracks[i];\n\n if (this.options_.kinds.indexOf(track.kind) > -1 && track.mode === 'showing') {\n shouldBeSelected = false;\n break;\n }\n } // Prevent redundant selected() calls because they may cause\n // screen readers to read the appended control text unnecessarily\n\n\n if (shouldBeSelected !== this.isSelected_) {\n this.selected(shouldBeSelected);\n }\n };\n\n _proto.handleSelectedLanguageChange = function handleSelectedLanguageChange(event) {\n var tracks = this.player().textTracks();\n var allHidden = true;\n\n for (var i = 0, l = tracks.length; i < l; i++) {\n var track = tracks[i];\n\n if (['captions', 'descriptions', 'subtitles'].indexOf(track.kind) > -1 && track.mode === 'showing') {\n allHidden = false;\n break;\n }\n }\n\n if (allHidden) {\n this.player_.cache_.selectedLanguage = {\n enabled: false\n };\n }\n };\n\n return OffTextTrackMenuItem;\n}(TextTrackMenuItem);\n\nComponent.registerComponent('OffTextTrackMenuItem', OffTextTrackMenuItem);\n/**\n * The base class for buttons that toggle specific text track types (e.g. subtitles)\n *\n * @extends MenuButton\n */\n\nvar TextTrackButton =\n/*#__PURE__*/\nfunction (_TrackButton) {\n _inheritsLoose(TextTrackButton, _TrackButton);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options={}]\n * The key/value store of player options.\n */\n\n\n function TextTrackButton(player, options) {\n if (options === void 0) {\n options = {};\n }\n\n options.tracks = player.textTracks();\n return _TrackButton.call(this, player, options) || this;\n }\n /**\n * Create a menu item for each text track\n *\n * @param {TextTrackMenuItem[]} [items=[]]\n * Existing array of items to use during creation\n *\n * @return {TextTrackMenuItem[]}\n * Array of menu items that were created\n */\n\n\n var _proto = TextTrackButton.prototype;\n\n _proto.createItems = function createItems(items, TrackMenuItem) {\n if (items === void 0) {\n items = [];\n }\n\n if (TrackMenuItem === void 0) {\n TrackMenuItem = TextTrackMenuItem;\n } // Label is an override for the [track] off label\n // USed to localise captions/subtitles\n\n\n var label;\n\n if (this.label_) {\n label = this.label_ + \" off\";\n } // Add an OFF menu item to turn all tracks off\n\n\n items.push(new OffTextTrackMenuItem(this.player_, {\n kinds: this.kinds_,\n kind: this.kind_,\n label: label\n }));\n this.hideThreshold_ += 1;\n var tracks = this.player_.textTracks();\n\n if (!Array.isArray(this.kinds_)) {\n this.kinds_ = [this.kind_];\n }\n\n for (var i = 0; i < tracks.length; i++) {\n var track = tracks[i]; // only add tracks that are of an appropriate kind and have a label\n\n if (this.kinds_.indexOf(track.kind) > -1) {\n var item = new TrackMenuItem(this.player_, {\n track: track,\n kinds: this.kinds_,\n kind: this.kind_,\n // MenuItem is selectable\n selectable: true,\n // MenuItem is NOT multiSelectable (i.e. only one can be marked \"selected\" at a time)\n multiSelectable: false\n });\n item.addClass(\"vjs-\" + track.kind + \"-menu-item\");\n items.push(item);\n }\n }\n\n return items;\n };\n\n return TextTrackButton;\n}(TrackButton);\n\nComponent.registerComponent('TextTrackButton', TextTrackButton);\n/**\n * The chapter track menu item\n *\n * @extends MenuItem\n */\n\nvar ChaptersTrackMenuItem =\n/*#__PURE__*/\nfunction (_MenuItem) {\n _inheritsLoose(ChaptersTrackMenuItem, _MenuItem);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function ChaptersTrackMenuItem(player, options) {\n var _this;\n\n var track = options.track;\n var cue = options.cue;\n var currentTime = player.currentTime(); // Modify options for parent MenuItem class's init.\n\n options.selectable = true;\n options.multiSelectable = false;\n options.label = cue.text;\n options.selected = cue.startTime <= currentTime && currentTime < cue.endTime;\n _this = _MenuItem.call(this, player, options) || this;\n _this.track = track;\n _this.cue = cue;\n track.addEventListener('cuechange', bind(_assertThisInitialized(_this), _this.update));\n return _this;\n }\n /**\n * This gets called when an `ChaptersTrackMenuItem` is \"clicked\". See\n * {@link ClickableComponent} for more detailed information on what a click can be.\n *\n * @param {EventTarget~Event} [event]\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n\n\n var _proto = ChaptersTrackMenuItem.prototype;\n\n _proto.handleClick = function handleClick(event) {\n _MenuItem.prototype.handleClick.call(this);\n\n this.player_.currentTime(this.cue.startTime);\n this.update(this.cue.startTime);\n }\n /**\n * Update chapter menu item\n *\n * @param {EventTarget~Event} [event]\n * The `cuechange` event that caused this function to run.\n *\n * @listens TextTrack#cuechange\n */\n ;\n\n _proto.update = function update(event) {\n var cue = this.cue;\n var currentTime = this.player_.currentTime(); // vjs.log(currentTime, cue.startTime);\n\n this.selected(cue.startTime <= currentTime && currentTime < cue.endTime);\n };\n\n return ChaptersTrackMenuItem;\n}(MenuItem);\n\nComponent.registerComponent('ChaptersTrackMenuItem', ChaptersTrackMenuItem);\n/**\n * The button component for toggling and selecting chapters\n * Chapters act much differently than other text tracks\n * Cues are navigation vs. other tracks of alternative languages\n *\n * @extends TextTrackButton\n */\n\nvar ChaptersButton =\n/*#__PURE__*/\nfunction (_TextTrackButton) {\n _inheritsLoose(ChaptersButton, _TextTrackButton);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {Component~ReadyCallback} [ready]\n * The function to call when this function is ready.\n */\n\n\n function ChaptersButton(player, options, ready) {\n return _TextTrackButton.call(this, player, options, ready) || this;\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n\n\n var _proto = ChaptersButton.prototype;\n\n _proto.buildCSSClass = function buildCSSClass() {\n return \"vjs-chapters-button \" + _TextTrackButton.prototype.buildCSSClass.call(this);\n };\n\n _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\n return \"vjs-chapters-button \" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\n }\n /**\n * Update the menu based on the current state of its items.\n *\n * @param {EventTarget~Event} [event]\n * An event that triggered this function to run.\n *\n * @listens TextTrackList#addtrack\n * @listens TextTrackList#removetrack\n * @listens TextTrackList#change\n */\n ;\n\n _proto.update = function update(event) {\n if (!this.track_ || event && (event.type === 'addtrack' || event.type === 'removetrack')) {\n this.setTrack(this.findChaptersTrack());\n }\n\n _TextTrackButton.prototype.update.call(this);\n }\n /**\n * Set the currently selected track for the chapters button.\n *\n * @param {TextTrack} track\n * The new track to select. Nothing will change if this is the currently selected\n * track.\n */\n ;\n\n _proto.setTrack = function setTrack(track) {\n if (this.track_ === track) {\n return;\n }\n\n if (!this.updateHandler_) {\n this.updateHandler_ = this.update.bind(this);\n } // here this.track_ refers to the old track instance\n\n\n if (this.track_) {\n var remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);\n\n if (remoteTextTrackEl) {\n remoteTextTrackEl.removeEventListener('load', this.updateHandler_);\n }\n\n this.track_ = null;\n }\n\n this.track_ = track; // here this.track_ refers to the new track instance\n\n if (this.track_) {\n this.track_.mode = 'hidden';\n\n var _remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);\n\n if (_remoteTextTrackEl) {\n _remoteTextTrackEl.addEventListener('load', this.updateHandler_);\n }\n }\n }\n /**\n * Find the track object that is currently in use by this ChaptersButton\n *\n * @return {TextTrack|undefined}\n * The current track or undefined if none was found.\n */\n ;\n\n _proto.findChaptersTrack = function findChaptersTrack() {\n var tracks = this.player_.textTracks() || [];\n\n for (var i = tracks.length - 1; i >= 0; i--) {\n // We will always choose the last track as our chaptersTrack\n var track = tracks[i];\n\n if (track.kind === this.kind_) {\n return track;\n }\n }\n }\n /**\n * Get the caption for the ChaptersButton based on the track label. This will also\n * use the current tracks localized kind as a fallback if a label does not exist.\n *\n * @return {string}\n * The tracks current label or the localized track kind.\n */\n ;\n\n _proto.getMenuCaption = function getMenuCaption() {\n if (this.track_ && this.track_.label) {\n return this.track_.label;\n }\n\n return this.localize(toTitleCase(this.kind_));\n }\n /**\n * Create menu from chapter track\n *\n * @return {Menu}\n * New menu for the chapter buttons\n */\n ;\n\n _proto.createMenu = function createMenu() {\n this.options_.title = this.getMenuCaption();\n return _TextTrackButton.prototype.createMenu.call(this);\n }\n /**\n * Create a menu item for each text track\n *\n * @return {TextTrackMenuItem[]}\n * Array of menu items\n */\n ;\n\n _proto.createItems = function createItems() {\n var items = [];\n\n if (!this.track_) {\n return items;\n }\n\n var cues = this.track_.cues;\n\n if (!cues) {\n return items;\n }\n\n for (var i = 0, l = cues.length; i < l; i++) {\n var cue = cues[i];\n var mi = new ChaptersTrackMenuItem(this.player_, {\n track: this.track_,\n cue: cue\n });\n items.push(mi);\n }\n\n return items;\n };\n\n return ChaptersButton;\n}(TextTrackButton);\n/**\n * `kind` of TextTrack to look for to associate it with this menu.\n *\n * @type {string}\n * @private\n */\n\n\nChaptersButton.prototype.kind_ = 'chapters';\n/**\n * The text that should display over the `ChaptersButton`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\nChaptersButton.prototype.controlText_ = 'Chapters';\nComponent.registerComponent('ChaptersButton', ChaptersButton);\n/**\n * The button component for toggling and selecting descriptions\n *\n * @extends TextTrackButton\n */\n\nvar DescriptionsButton =\n/*#__PURE__*/\nfunction (_TextTrackButton) {\n _inheritsLoose(DescriptionsButton, _TextTrackButton);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {Component~ReadyCallback} [ready]\n * The function to call when this component is ready.\n */\n\n\n function DescriptionsButton(player, options, ready) {\n var _this;\n\n _this = _TextTrackButton.call(this, player, options, ready) || this;\n var tracks = player.textTracks();\n var changeHandler = bind(_assertThisInitialized(_this), _this.handleTracksChange);\n tracks.addEventListener('change', changeHandler);\n\n _this.on('dispose', function () {\n tracks.removeEventListener('change', changeHandler);\n });\n\n return _this;\n }\n /**\n * Handle text track change\n *\n * @param {EventTarget~Event} event\n * The event that caused this function to run\n *\n * @listens TextTrackList#change\n */\n\n\n var _proto = DescriptionsButton.prototype;\n\n _proto.handleTracksChange = function handleTracksChange(event) {\n var tracks = this.player().textTracks();\n var disabled = false; // Check whether a track of a different kind is showing\n\n for (var i = 0, l = tracks.length; i < l; i++) {\n var track = tracks[i];\n\n if (track.kind !== this.kind_ && track.mode === 'showing') {\n disabled = true;\n break;\n }\n } // If another track is showing, disable this menu button\n\n\n if (disabled) {\n this.disable();\n } else {\n this.enable();\n }\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n ;\n\n _proto.buildCSSClass = function buildCSSClass() {\n return \"vjs-descriptions-button \" + _TextTrackButton.prototype.buildCSSClass.call(this);\n };\n\n _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\n return \"vjs-descriptions-button \" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\n };\n\n return DescriptionsButton;\n}(TextTrackButton);\n/**\n * `kind` of TextTrack to look for to associate it with this menu.\n *\n * @type {string}\n * @private\n */\n\n\nDescriptionsButton.prototype.kind_ = 'descriptions';\n/**\n * The text that should display over the `DescriptionsButton`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\nDescriptionsButton.prototype.controlText_ = 'Descriptions';\nComponent.registerComponent('DescriptionsButton', DescriptionsButton);\n/**\n * The button component for toggling and selecting subtitles\n *\n * @extends TextTrackButton\n */\n\nvar SubtitlesButton =\n/*#__PURE__*/\nfunction (_TextTrackButton) {\n _inheritsLoose(SubtitlesButton, _TextTrackButton);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {Component~ReadyCallback} [ready]\n * The function to call when this component is ready.\n */\n\n\n function SubtitlesButton(player, options, ready) {\n return _TextTrackButton.call(this, player, options, ready) || this;\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n\n\n var _proto = SubtitlesButton.prototype;\n\n _proto.buildCSSClass = function buildCSSClass() {\n return \"vjs-subtitles-button \" + _TextTrackButton.prototype.buildCSSClass.call(this);\n };\n\n _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\n return \"vjs-subtitles-button \" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\n };\n\n return SubtitlesButton;\n}(TextTrackButton);\n/**\n * `kind` of TextTrack to look for to associate it with this menu.\n *\n * @type {string}\n * @private\n */\n\n\nSubtitlesButton.prototype.kind_ = 'subtitles';\n/**\n * The text that should display over the `SubtitlesButton`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\nSubtitlesButton.prototype.controlText_ = 'Subtitles';\nComponent.registerComponent('SubtitlesButton', SubtitlesButton);\n/**\n * The menu item for caption track settings menu\n *\n * @extends TextTrackMenuItem\n */\n\nvar CaptionSettingsMenuItem =\n/*#__PURE__*/\nfunction (_TextTrackMenuItem) {\n _inheritsLoose(CaptionSettingsMenuItem, _TextTrackMenuItem);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function CaptionSettingsMenuItem(player, options) {\n var _this;\n\n options.track = {\n player: player,\n kind: options.kind,\n label: options.kind + ' settings',\n selectable: false,\n \"default\": false,\n mode: 'disabled'\n }; // CaptionSettingsMenuItem has no concept of 'selected'\n\n options.selectable = false;\n options.name = 'CaptionSettingsMenuItem';\n _this = _TextTrackMenuItem.call(this, player, options) || this;\n\n _this.addClass('vjs-texttrack-settings');\n\n _this.controlText(', opens ' + options.kind + ' settings dialog');\n\n return _this;\n }\n /**\n * This gets called when an `CaptionSettingsMenuItem` is \"clicked\". See\n * {@link ClickableComponent} for more detailed information on what a click can be.\n *\n * @param {EventTarget~Event} [event]\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n\n\n var _proto = CaptionSettingsMenuItem.prototype;\n\n _proto.handleClick = function handleClick(event) {\n this.player().getChild('textTrackSettings').open();\n };\n\n return CaptionSettingsMenuItem;\n}(TextTrackMenuItem);\n\nComponent.registerComponent('CaptionSettingsMenuItem', CaptionSettingsMenuItem);\n/**\n * The button component for toggling and selecting captions\n *\n * @extends TextTrackButton\n */\n\nvar CaptionsButton =\n/*#__PURE__*/\nfunction (_TextTrackButton) {\n _inheritsLoose(CaptionsButton, _TextTrackButton);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {Component~ReadyCallback} [ready]\n * The function to call when this component is ready.\n */\n\n\n function CaptionsButton(player, options, ready) {\n return _TextTrackButton.call(this, player, options, ready) || this;\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n\n\n var _proto = CaptionsButton.prototype;\n\n _proto.buildCSSClass = function buildCSSClass() {\n return \"vjs-captions-button \" + _TextTrackButton.prototype.buildCSSClass.call(this);\n };\n\n _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\n return \"vjs-captions-button \" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\n }\n /**\n * Create caption menu items\n *\n * @return {CaptionSettingsMenuItem[]}\n * The array of current menu items.\n */\n ;\n\n _proto.createItems = function createItems() {\n var items = [];\n\n if (!(this.player().tech_ && this.player().tech_.featuresNativeTextTracks) && this.player().getChild('textTrackSettings')) {\n items.push(new CaptionSettingsMenuItem(this.player_, {\n kind: this.kind_\n }));\n this.hideThreshold_ += 1;\n }\n\n return _TextTrackButton.prototype.createItems.call(this, items);\n };\n\n return CaptionsButton;\n}(TextTrackButton);\n/**\n * `kind` of TextTrack to look for to associate it with this menu.\n *\n * @type {string}\n * @private\n */\n\n\nCaptionsButton.prototype.kind_ = 'captions';\n/**\n * The text that should display over the `CaptionsButton`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\nCaptionsButton.prototype.controlText_ = 'Captions';\nComponent.registerComponent('CaptionsButton', CaptionsButton);\n/**\n * SubsCapsMenuItem has an [cc] icon to distinguish captions from subtitles\n * in the SubsCapsMenu.\n *\n * @extends TextTrackMenuItem\n */\n\nvar SubsCapsMenuItem =\n/*#__PURE__*/\nfunction (_TextTrackMenuItem) {\n _inheritsLoose(SubsCapsMenuItem, _TextTrackMenuItem);\n\n function SubsCapsMenuItem() {\n return _TextTrackMenuItem.apply(this, arguments) || this;\n }\n\n var _proto = SubsCapsMenuItem.prototype;\n\n _proto.createEl = function createEl(type, props, attrs) {\n var innerHTML = \"<span class=\\\"vjs-menu-item-text\\\">\" + this.localize(this.options_.label);\n\n if (this.options_.track.kind === 'captions') {\n innerHTML += \"\\n <span aria-hidden=\\\"true\\\" class=\\\"vjs-icon-placeholder\\\"></span>\\n <span class=\\\"vjs-control-text\\\"> \" + this.localize('Captions') + \"</span>\\n \";\n }\n\n innerHTML += '</span>';\n\n var el = _TextTrackMenuItem.prototype.createEl.call(this, type, assign({\n innerHTML: innerHTML\n }, props), attrs);\n\n return el;\n };\n\n return SubsCapsMenuItem;\n}(TextTrackMenuItem);\n\nComponent.registerComponent('SubsCapsMenuItem', SubsCapsMenuItem);\n/**\n * The button component for toggling and selecting captions and/or subtitles\n *\n * @extends TextTrackButton\n */\n\nvar SubsCapsButton =\n/*#__PURE__*/\nfunction (_TextTrackButton) {\n _inheritsLoose(SubsCapsButton, _TextTrackButton);\n\n function SubsCapsButton(player, options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _TextTrackButton.call(this, player, options) || this; // Although North America uses \"captions\" in most cases for\n // \"captions and subtitles\" other locales use \"subtitles\"\n\n _this.label_ = 'subtitles';\n\n if (['en', 'en-us', 'en-ca', 'fr-ca'].indexOf(_this.player_.language_) > -1) {\n _this.label_ = 'captions';\n }\n\n _this.menuButton_.controlText(toTitleCase(_this.label_));\n\n return _this;\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n\n\n var _proto = SubsCapsButton.prototype;\n\n _proto.buildCSSClass = function buildCSSClass() {\n return \"vjs-subs-caps-button \" + _TextTrackButton.prototype.buildCSSClass.call(this);\n };\n\n _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\n return \"vjs-subs-caps-button \" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\n }\n /**\n * Create caption/subtitles menu items\n *\n * @return {CaptionSettingsMenuItem[]}\n * The array of current menu items.\n */\n ;\n\n _proto.createItems = function createItems() {\n var items = [];\n\n if (!(this.player().tech_ && this.player().tech_.featuresNativeTextTracks) && this.player().getChild('textTrackSettings')) {\n items.push(new CaptionSettingsMenuItem(this.player_, {\n kind: this.label_\n }));\n this.hideThreshold_ += 1;\n }\n\n items = _TextTrackButton.prototype.createItems.call(this, items, SubsCapsMenuItem);\n return items;\n };\n\n return SubsCapsButton;\n}(TextTrackButton);\n/**\n * `kind`s of TextTrack to look for to associate it with this menu.\n *\n * @type {array}\n * @private\n */\n\n\nSubsCapsButton.prototype.kinds_ = ['captions', 'subtitles'];\n/**\n * The text that should display over the `SubsCapsButton`s controls.\n *\n *\n * @type {string}\n * @private\n */\n\nSubsCapsButton.prototype.controlText_ = 'Subtitles';\nComponent.registerComponent('SubsCapsButton', SubsCapsButton);\n/**\n * An {@link AudioTrack} {@link MenuItem}\n *\n * @extends MenuItem\n */\n\nvar AudioTrackMenuItem =\n/*#__PURE__*/\nfunction (_MenuItem) {\n _inheritsLoose(AudioTrackMenuItem, _MenuItem);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function AudioTrackMenuItem(player, options) {\n var _this;\n\n var track = options.track;\n var tracks = player.audioTracks(); // Modify options for parent MenuItem class's init.\n\n options.label = track.label || track.language || 'Unknown';\n options.selected = track.enabled;\n _this = _MenuItem.call(this, player, options) || this;\n _this.track = track;\n\n _this.addClass(\"vjs-\" + track.kind + \"-menu-item\");\n\n var changeHandler = function changeHandler() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this.handleTracksChange.apply(_assertThisInitialized(_this), args);\n };\n\n tracks.addEventListener('change', changeHandler);\n\n _this.on('dispose', function () {\n tracks.removeEventListener('change', changeHandler);\n });\n\n return _this;\n }\n\n var _proto = AudioTrackMenuItem.prototype;\n\n _proto.createEl = function createEl(type, props, attrs) {\n var innerHTML = \"<span class=\\\"vjs-menu-item-text\\\">\" + this.localize(this.options_.label);\n\n if (this.options_.track.kind === 'main-desc') {\n innerHTML += \"\\n <span aria-hidden=\\\"true\\\" class=\\\"vjs-icon-placeholder\\\"></span>\\n <span class=\\\"vjs-control-text\\\"> \" + this.localize('Descriptions') + \"</span>\\n \";\n }\n\n innerHTML += '</span>';\n\n var el = _MenuItem.prototype.createEl.call(this, type, assign({\n innerHTML: innerHTML\n }, props), attrs);\n\n return el;\n }\n /**\n * This gets called when an `AudioTrackMenuItem is \"clicked\". See {@link ClickableComponent}\n * for more detailed information on what a click can be.\n *\n * @param {EventTarget~Event} [event]\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n ;\n\n _proto.handleClick = function handleClick(event) {\n var tracks = this.player_.audioTracks();\n\n _MenuItem.prototype.handleClick.call(this, event);\n\n for (var i = 0; i < tracks.length; i++) {\n var track = tracks[i];\n track.enabled = track === this.track;\n }\n }\n /**\n * Handle any {@link AudioTrack} change.\n *\n * @param {EventTarget~Event} [event]\n * The {@link AudioTrackList#change} event that caused this to run.\n *\n * @listens AudioTrackList#change\n */\n ;\n\n _proto.handleTracksChange = function handleTracksChange(event) {\n this.selected(this.track.enabled);\n };\n\n return AudioTrackMenuItem;\n}(MenuItem);\n\nComponent.registerComponent('AudioTrackMenuItem', AudioTrackMenuItem);\n/**\n * The base class for buttons that toggle specific {@link AudioTrack} types.\n *\n * @extends TrackButton\n */\n\nvar AudioTrackButton =\n/*#__PURE__*/\nfunction (_TrackButton) {\n _inheritsLoose(AudioTrackButton, _TrackButton);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options={}]\n * The key/value store of player options.\n */\n\n\n function AudioTrackButton(player, options) {\n if (options === void 0) {\n options = {};\n }\n\n options.tracks = player.audioTracks();\n return _TrackButton.call(this, player, options) || this;\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n\n\n var _proto = AudioTrackButton.prototype;\n\n _proto.buildCSSClass = function buildCSSClass() {\n return \"vjs-audio-button \" + _TrackButton.prototype.buildCSSClass.call(this);\n };\n\n _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\n return \"vjs-audio-button \" + _TrackButton.prototype.buildWrapperCSSClass.call(this);\n }\n /**\n * Create a menu item for each audio track\n *\n * @param {AudioTrackMenuItem[]} [items=[]]\n * An array of existing menu items to use.\n *\n * @return {AudioTrackMenuItem[]}\n * An array of menu items\n */\n ;\n\n _proto.createItems = function createItems(items) {\n if (items === void 0) {\n items = [];\n } // if there's only one audio track, there no point in showing it\n\n\n this.hideThreshold_ = 1;\n var tracks = this.player_.audioTracks();\n\n for (var i = 0; i < tracks.length; i++) {\n var track = tracks[i];\n items.push(new AudioTrackMenuItem(this.player_, {\n track: track,\n // MenuItem is selectable\n selectable: true,\n // MenuItem is NOT multiSelectable (i.e. only one can be marked \"selected\" at a time)\n multiSelectable: false\n }));\n }\n\n return items;\n };\n\n return AudioTrackButton;\n}(TrackButton);\n/**\n * The text that should display over the `AudioTrackButton`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\n\nAudioTrackButton.prototype.controlText_ = 'Audio Track';\nComponent.registerComponent('AudioTrackButton', AudioTrackButton);\n/**\n * The specific menu item type for selecting a playback rate.\n *\n * @extends MenuItem\n */\n\nvar PlaybackRateMenuItem =\n/*#__PURE__*/\nfunction (_MenuItem) {\n _inheritsLoose(PlaybackRateMenuItem, _MenuItem);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function PlaybackRateMenuItem(player, options) {\n var _this;\n\n var label = options.rate;\n var rate = parseFloat(label, 10); // Modify options for parent MenuItem class's init.\n\n options.label = label;\n options.selected = rate === 1;\n options.selectable = true;\n options.multiSelectable = false;\n _this = _MenuItem.call(this, player, options) || this;\n _this.label = label;\n _this.rate = rate;\n\n _this.on(player, 'ratechange', _this.update);\n\n return _this;\n }\n /**\n * This gets called when an `PlaybackRateMenuItem` is \"clicked\". See\n * {@link ClickableComponent} for more detailed information on what a click can be.\n *\n * @param {EventTarget~Event} [event]\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n\n\n var _proto = PlaybackRateMenuItem.prototype;\n\n _proto.handleClick = function handleClick(event) {\n _MenuItem.prototype.handleClick.call(this);\n\n this.player().playbackRate(this.rate);\n }\n /**\n * Update the PlaybackRateMenuItem when the playbackrate changes.\n *\n * @param {EventTarget~Event} [event]\n * The `ratechange` event that caused this function to run.\n *\n * @listens Player#ratechange\n */\n ;\n\n _proto.update = function update(event) {\n this.selected(this.player().playbackRate() === this.rate);\n };\n\n return PlaybackRateMenuItem;\n}(MenuItem);\n/**\n * The text that should display over the `PlaybackRateMenuItem`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\n\nPlaybackRateMenuItem.prototype.contentElType = 'button';\nComponent.registerComponent('PlaybackRateMenuItem', PlaybackRateMenuItem);\n/**\n * The component for controlling the playback rate.\n *\n * @extends MenuButton\n */\n\nvar PlaybackRateMenuButton =\n/*#__PURE__*/\nfunction (_MenuButton) {\n _inheritsLoose(PlaybackRateMenuButton, _MenuButton);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function PlaybackRateMenuButton(player, options) {\n var _this;\n\n _this = _MenuButton.call(this, player, options) || this;\n\n _this.updateVisibility();\n\n _this.updateLabel();\n\n _this.on(player, 'loadstart', _this.updateVisibility);\n\n _this.on(player, 'ratechange', _this.updateLabel);\n\n return _this;\n }\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n\n\n var _proto = PlaybackRateMenuButton.prototype;\n\n _proto.createEl = function createEl$1() {\n var el = _MenuButton.prototype.createEl.call(this);\n\n this.labelEl_ = createEl('div', {\n className: 'vjs-playback-rate-value',\n innerHTML: '1x'\n });\n el.appendChild(this.labelEl_);\n return el;\n };\n\n _proto.dispose = function dispose() {\n this.labelEl_ = null;\n\n _MenuButton.prototype.dispose.call(this);\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n ;\n\n _proto.buildCSSClass = function buildCSSClass() {\n return \"vjs-playback-rate \" + _MenuButton.prototype.buildCSSClass.call(this);\n };\n\n _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\n return \"vjs-playback-rate \" + _MenuButton.prototype.buildWrapperCSSClass.call(this);\n }\n /**\n * Create the playback rate menu\n *\n * @return {Menu}\n * Menu object populated with {@link PlaybackRateMenuItem}s\n */\n ;\n\n _proto.createMenu = function createMenu() {\n var menu = new Menu(this.player());\n var rates = this.playbackRates();\n\n if (rates) {\n for (var i = rates.length - 1; i >= 0; i--) {\n menu.addChild(new PlaybackRateMenuItem(this.player(), {\n rate: rates[i] + 'x'\n }));\n }\n }\n\n return menu;\n }\n /**\n * Updates ARIA accessibility attributes\n */\n ;\n\n _proto.updateARIAAttributes = function updateARIAAttributes() {\n // Current playback rate\n this.el().setAttribute('aria-valuenow', this.player().playbackRate());\n }\n /**\n * This gets called when an `PlaybackRateMenuButton` is \"clicked\". See\n * {@link ClickableComponent} for more detailed information on what a click can be.\n *\n * @param {EventTarget~Event} [event]\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n ;\n\n _proto.handleClick = function handleClick(event) {\n // select next rate option\n var currentRate = this.player().playbackRate();\n var rates = this.playbackRates(); // this will select first one if the last one currently selected\n\n var newRate = rates[0];\n\n for (var i = 0; i < rates.length; i++) {\n if (rates[i] > currentRate) {\n newRate = rates[i];\n break;\n }\n }\n\n this.player().playbackRate(newRate);\n }\n /**\n * Get possible playback rates\n *\n * @return {Array}\n * All possible playback rates\n */\n ;\n\n _proto.playbackRates = function playbackRates() {\n return this.options_.playbackRates || this.options_.playerOptions && this.options_.playerOptions.playbackRates;\n }\n /**\n * Get whether playback rates is supported by the tech\n * and an array of playback rates exists\n *\n * @return {boolean}\n * Whether changing playback rate is supported\n */\n ;\n\n _proto.playbackRateSupported = function playbackRateSupported() {\n return this.player().tech_ && this.player().tech_.featuresPlaybackRate && this.playbackRates() && this.playbackRates().length > 0;\n }\n /**\n * Hide playback rate controls when they're no playback rate options to select\n *\n * @param {EventTarget~Event} [event]\n * The event that caused this function to run.\n *\n * @listens Player#loadstart\n */\n ;\n\n _proto.updateVisibility = function updateVisibility(event) {\n if (this.playbackRateSupported()) {\n this.removeClass('vjs-hidden');\n } else {\n this.addClass('vjs-hidden');\n }\n }\n /**\n * Update button label when rate changed\n *\n * @param {EventTarget~Event} [event]\n * The event that caused this function to run.\n *\n * @listens Player#ratechange\n */\n ;\n\n _proto.updateLabel = function updateLabel(event) {\n if (this.playbackRateSupported()) {\n this.labelEl_.innerHTML = this.player().playbackRate() + 'x';\n }\n };\n\n return PlaybackRateMenuButton;\n}(MenuButton);\n/**\n * The text that should display over the `FullscreenToggle`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\n\nPlaybackRateMenuButton.prototype.controlText_ = 'Playback Rate';\nComponent.registerComponent('PlaybackRateMenuButton', PlaybackRateMenuButton);\n/**\n * Just an empty spacer element that can be used as an append point for plugins, etc.\n * Also can be used to create space between elements when necessary.\n *\n * @extends Component\n */\n\nvar Spacer =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(Spacer, _Component);\n\n function Spacer() {\n return _Component.apply(this, arguments) || this;\n }\n\n var _proto = Spacer.prototype;\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n\n _proto.buildCSSClass = function buildCSSClass() {\n return \"vjs-spacer \" + _Component.prototype.buildCSSClass.call(this);\n }\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n ;\n\n _proto.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: this.buildCSSClass()\n });\n };\n\n return Spacer;\n}(Component);\n\nComponent.registerComponent('Spacer', Spacer);\n/**\n * Spacer specifically meant to be used as an insertion point for new plugins, etc.\n *\n * @extends Spacer\n */\n\nvar CustomControlSpacer =\n/*#__PURE__*/\nfunction (_Spacer) {\n _inheritsLoose(CustomControlSpacer, _Spacer);\n\n function CustomControlSpacer() {\n return _Spacer.apply(this, arguments) || this;\n }\n\n var _proto = CustomControlSpacer.prototype;\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n\n _proto.buildCSSClass = function buildCSSClass() {\n return \"vjs-custom-control-spacer \" + _Spacer.prototype.buildCSSClass.call(this);\n }\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n ;\n\n _proto.createEl = function createEl() {\n var el = _Spacer.prototype.createEl.call(this, {\n className: this.buildCSSClass()\n }); // No-flex/table-cell mode requires there be some content\n // in the cell to fill the remaining space of the table.\n\n\n el.innerHTML = \"\\xA0\";\n return el;\n };\n\n return CustomControlSpacer;\n}(Spacer);\n\nComponent.registerComponent('CustomControlSpacer', CustomControlSpacer);\n/**\n * Container of main controls.\n *\n * @extends Component\n */\n\nvar ControlBar =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(ControlBar, _Component);\n\n function ControlBar() {\n return _Component.apply(this, arguments) || this;\n }\n\n var _proto = ControlBar.prototype;\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n\n _proto.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-control-bar',\n dir: 'ltr'\n });\n };\n\n return ControlBar;\n}(Component);\n/**\n * Default options for `ControlBar`\n *\n * @type {Object}\n * @private\n */\n\n\nControlBar.prototype.options_ = {\n children: ['playToggle', 'volumePanel', 'currentTimeDisplay', 'timeDivider', 'durationDisplay', 'progressControl', 'liveDisplay', 'seekToLive', 'remainingTimeDisplay', 'customControlSpacer', 'playbackRateMenuButton', 'chaptersButton', 'descriptionsButton', 'subsCapsButton', 'audioTrackButton', 'fullscreenToggle']\n};\n\nif ('exitPictureInPicture' in document) {\n ControlBar.prototype.options_.children.splice(ControlBar.prototype.options_.children.length - 1, 0, 'pictureInPictureToggle');\n}\n\nComponent.registerComponent('ControlBar', ControlBar);\n/**\n * A display that indicates an error has occurred. This means that the video\n * is unplayable.\n *\n * @extends ModalDialog\n */\n\nvar ErrorDisplay =\n/*#__PURE__*/\nfunction (_ModalDialog) {\n _inheritsLoose(ErrorDisplay, _ModalDialog);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function ErrorDisplay(player, options) {\n var _this;\n\n _this = _ModalDialog.call(this, player, options) || this;\n\n _this.on(player, 'error', _this.open);\n\n return _this;\n }\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n *\n * @deprecated Since version 5.\n */\n\n\n var _proto = ErrorDisplay.prototype;\n\n _proto.buildCSSClass = function buildCSSClass() {\n return \"vjs-error-display \" + _ModalDialog.prototype.buildCSSClass.call(this);\n }\n /**\n * Gets the localized error message based on the `Player`s error.\n *\n * @return {string}\n * The `Player`s error message localized or an empty string.\n */\n ;\n\n _proto.content = function content() {\n var error = this.player().error();\n return error ? this.localize(error.message) : '';\n };\n\n return ErrorDisplay;\n}(ModalDialog);\n/**\n * The default options for an `ErrorDisplay`.\n *\n * @private\n */\n\n\nErrorDisplay.prototype.options_ = mergeOptions(ModalDialog.prototype.options_, {\n pauseOnOpen: false,\n fillAlways: true,\n temporary: false,\n uncloseable: true\n});\nComponent.registerComponent('ErrorDisplay', ErrorDisplay);\nvar LOCAL_STORAGE_KEY = 'vjs-text-track-settings';\nvar COLOR_BLACK = ['#000', 'Black'];\nvar COLOR_BLUE = ['#00F', 'Blue'];\nvar COLOR_CYAN = ['#0FF', 'Cyan'];\nvar COLOR_GREEN = ['#0F0', 'Green'];\nvar COLOR_MAGENTA = ['#F0F', 'Magenta'];\nvar COLOR_RED = ['#F00', 'Red'];\nvar COLOR_WHITE = ['#FFF', 'White'];\nvar COLOR_YELLOW = ['#FF0', 'Yellow'];\nvar OPACITY_OPAQUE = ['1', 'Opaque'];\nvar OPACITY_SEMI = ['0.5', 'Semi-Transparent'];\nvar OPACITY_TRANS = ['0', 'Transparent']; // Configuration for the various <select> elements in the DOM of this component.\n//\n// Possible keys include:\n//\n// `default`:\n// The default option index. Only needs to be provided if not zero.\n// `parser`:\n// A function which is used to parse the value from the selected option in\n// a customized way.\n// `selector`:\n// The selector used to find the associated <select> element.\n\nvar selectConfigs = {\n backgroundColor: {\n selector: '.vjs-bg-color > select',\n id: 'captions-background-color-%s',\n label: 'Color',\n options: [COLOR_BLACK, COLOR_WHITE, COLOR_RED, COLOR_GREEN, COLOR_BLUE, COLOR_YELLOW, COLOR_MAGENTA, COLOR_CYAN]\n },\n backgroundOpacity: {\n selector: '.vjs-bg-opacity > select',\n id: 'captions-background-opacity-%s',\n label: 'Transparency',\n options: [OPACITY_OPAQUE, OPACITY_SEMI, OPACITY_TRANS]\n },\n color: {\n selector: '.vjs-fg-color > select',\n id: 'captions-foreground-color-%s',\n label: 'Color',\n options: [COLOR_WHITE, COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_BLUE, COLOR_YELLOW, COLOR_MAGENTA, COLOR_CYAN]\n },\n edgeStyle: {\n selector: '.vjs-edge-style > select',\n id: '%s',\n label: 'Text Edge Style',\n options: [['none', 'None'], ['raised', 'Raised'], ['depressed', 'Depressed'], ['uniform', 'Uniform'], ['dropshadow', 'Dropshadow']]\n },\n fontFamily: {\n selector: '.vjs-font-family > select',\n id: 'captions-font-family-%s',\n label: 'Font Family',\n options: [['proportionalSansSerif', 'Proportional Sans-Serif'], ['monospaceSansSerif', 'Monospace Sans-Serif'], ['proportionalSerif', 'Proportional Serif'], ['monospaceSerif', 'Monospace Serif'], ['casual', 'Casual'], ['script', 'Script'], ['small-caps', 'Small Caps']]\n },\n fontPercent: {\n selector: '.vjs-font-percent > select',\n id: 'captions-font-size-%s',\n label: 'Font Size',\n 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%']],\n \"default\": 2,\n parser: function parser(v) {\n return v === '1.00' ? null : Number(v);\n }\n },\n textOpacity: {\n selector: '.vjs-text-opacity > select',\n id: 'captions-foreground-opacity-%s',\n label: 'Transparency',\n options: [OPACITY_OPAQUE, OPACITY_SEMI]\n },\n // Options for this object are defined below.\n windowColor: {\n selector: '.vjs-window-color > select',\n id: 'captions-window-color-%s',\n label: 'Color'\n },\n // Options for this object are defined below.\n windowOpacity: {\n selector: '.vjs-window-opacity > select',\n id: 'captions-window-opacity-%s',\n label: 'Transparency',\n options: [OPACITY_TRANS, OPACITY_SEMI, OPACITY_OPAQUE]\n }\n};\nselectConfigs.windowColor.options = selectConfigs.backgroundColor.options;\n/**\n * Get the actual value of an option.\n *\n * @param {string} value\n * The value to get\n *\n * @param {Function} [parser]\n * Optional function to adjust the value.\n *\n * @return {Mixed}\n * - Will be `undefined` if no value exists\n * - Will be `undefined` if the given value is \"none\".\n * - Will be the actual value otherwise.\n *\n * @private\n */\n\nfunction parseOptionValue(value, parser) {\n if (parser) {\n value = parser(value);\n }\n\n if (value && value !== 'none') {\n return value;\n }\n}\n/**\n * Gets the value of the selected <option> element within a <select> element.\n *\n * @param {Element} el\n * the element to look in\n *\n * @param {Function} [parser]\n * Optional function to adjust the value.\n *\n * @return {Mixed}\n * - Will be `undefined` if no value exists\n * - Will be `undefined` if the given value is \"none\".\n * - Will be the actual value otherwise.\n *\n * @private\n */\n\n\nfunction getSelectedOptionValue(el, parser) {\n var value = el.options[el.options.selectedIndex].value;\n return parseOptionValue(value, parser);\n}\n/**\n * Sets the selected <option> element within a <select> element based on a\n * given value.\n *\n * @param {Element} el\n * The element to look in.\n *\n * @param {string} value\n * the property to look on.\n *\n * @param {Function} [parser]\n * Optional function to adjust the value before comparing.\n *\n * @private\n */\n\n\nfunction setSelectedOption(el, value, parser) {\n if (!value) {\n return;\n }\n\n for (var i = 0; i < el.options.length; i++) {\n if (parseOptionValue(el.options[i].value, parser) === value) {\n el.selectedIndex = i;\n break;\n }\n }\n}\n/**\n * Manipulate Text Tracks settings.\n *\n * @extends ModalDialog\n */\n\n\nvar TextTrackSettings =\n/*#__PURE__*/\nfunction (_ModalDialog) {\n _inheritsLoose(TextTrackSettings, _ModalDialog);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n\n\n function TextTrackSettings(player, options) {\n var _this;\n\n options.temporary = false;\n _this = _ModalDialog.call(this, player, options) || this;\n _this.updateDisplay = bind(_assertThisInitialized(_this), _this.updateDisplay); // fill the modal and pretend we have opened it\n\n _this.fill();\n\n _this.hasBeenOpened_ = _this.hasBeenFilled_ = true;\n _this.endDialog = createEl('p', {\n className: 'vjs-control-text',\n textContent: _this.localize('End of dialog window.')\n });\n\n _this.el().appendChild(_this.endDialog);\n\n _this.setDefaults(); // Grab `persistTextTrackSettings` from the player options if not passed in child options\n\n\n if (options.persistTextTrackSettings === undefined) {\n _this.options_.persistTextTrackSettings = _this.options_.playerOptions.persistTextTrackSettings;\n }\n\n _this.on(_this.$('.vjs-done-button'), 'click', function () {\n _this.saveSettings();\n\n _this.close();\n });\n\n _this.on(_this.$('.vjs-default-button'), 'click', function () {\n _this.setDefaults();\n\n _this.updateDisplay();\n });\n\n each(selectConfigs, function (config) {\n _this.on(_this.$(config.selector), 'change', _this.updateDisplay);\n });\n\n if (_this.options_.persistTextTrackSettings) {\n _this.restoreSettings();\n }\n\n return _this;\n }\n\n var _proto = TextTrackSettings.prototype;\n\n _proto.dispose = function dispose() {\n this.endDialog = null;\n\n _ModalDialog.prototype.dispose.call(this);\n }\n /**\n * Create a <select> element with configured options.\n *\n * @param {string} key\n * Configuration key to use during creation.\n *\n * @return {string}\n * An HTML string.\n *\n * @private\n */\n ;\n\n _proto.createElSelect_ = function createElSelect_(key, legendId, type) {\n var _this2 = this;\n\n if (legendId === void 0) {\n legendId = '';\n }\n\n if (type === void 0) {\n type = 'label';\n }\n\n var config = selectConfigs[key];\n var id = config.id.replace('%s', this.id_);\n var selectLabelledbyIds = [legendId, id].join(' ').trim();\n return [\"<\" + type + \" id=\\\"\" + id + \"\\\" class=\\\"\" + (type === 'label' ? 'vjs-label' : '') + \"\\\">\", this.localize(config.label), \"</\" + type + \">\", \"<select aria-labelledby=\\\"\" + selectLabelledbyIds + \"\\\">\"].concat(config.options.map(function (o) {\n var optionId = id + '-' + o[1].replace(/\\W+/g, '');\n return [\"<option id=\\\"\" + optionId + \"\\\" value=\\\"\" + o[0] + \"\\\" \", \"aria-labelledby=\\\"\" + selectLabelledbyIds + \" \" + optionId + \"\\\">\", _this2.localize(o[1]), '</option>'].join('');\n })).concat('</select>').join('');\n }\n /**\n * Create foreground color element for the component\n *\n * @return {string}\n * An HTML string.\n *\n * @private\n */\n ;\n\n _proto.createElFgColor_ = function createElFgColor_() {\n var legendId = \"captions-text-legend-\" + this.id_;\n return ['<fieldset class=\"vjs-fg-color vjs-track-setting\">', \"<legend id=\\\"\" + legendId + \"\\\">\", this.localize('Text'), '</legend>', this.createElSelect_('color', legendId), '<span class=\"vjs-text-opacity vjs-opacity\">', this.createElSelect_('textOpacity', legendId), '</span>', '</fieldset>'].join('');\n }\n /**\n * Create background color element for the component\n *\n * @return {string}\n * An HTML string.\n *\n * @private\n */\n ;\n\n _proto.createElBgColor_ = function createElBgColor_() {\n var legendId = \"captions-background-\" + this.id_;\n return ['<fieldset class=\"vjs-bg-color vjs-track-setting\">', \"<legend id=\\\"\" + legendId + \"\\\">\", this.localize('Background'), '</legend>', this.createElSelect_('backgroundColor', legendId), '<span class=\"vjs-bg-opacity vjs-opacity\">', this.createElSelect_('backgroundOpacity', legendId), '</span>', '</fieldset>'].join('');\n }\n /**\n * Create window color element for the component\n *\n * @return {string}\n * An HTML string.\n *\n * @private\n */\n ;\n\n _proto.createElWinColor_ = function createElWinColor_() {\n var legendId = \"captions-window-\" + this.id_;\n return ['<fieldset class=\"vjs-window-color vjs-track-setting\">', \"<legend id=\\\"\" + legendId + \"\\\">\", this.localize('Window'), '</legend>', this.createElSelect_('windowColor', legendId), '<span class=\"vjs-window-opacity vjs-opacity\">', this.createElSelect_('windowOpacity', legendId), '</span>', '</fieldset>'].join('');\n }\n /**\n * Create color elements for the component\n *\n * @return {Element}\n * The element that was created\n *\n * @private\n */\n ;\n\n _proto.createElColors_ = function createElColors_() {\n return createEl('div', {\n className: 'vjs-track-settings-colors',\n innerHTML: [this.createElFgColor_(), this.createElBgColor_(), this.createElWinColor_()].join('')\n });\n }\n /**\n * Create font elements for the component\n *\n * @return {Element}\n * The element that was created.\n *\n * @private\n */\n ;\n\n _proto.createElFont_ = function createElFont_() {\n return createEl('div', {\n className: 'vjs-track-settings-font',\n innerHTML: ['<fieldset class=\"vjs-font-percent vjs-track-setting\">', this.createElSelect_('fontPercent', '', 'legend'), '</fieldset>', '<fieldset class=\"vjs-edge-style vjs-track-setting\">', this.createElSelect_('edgeStyle', '', 'legend'), '</fieldset>', '<fieldset class=\"vjs-font-family vjs-track-setting\">', this.createElSelect_('fontFamily', '', 'legend'), '</fieldset>'].join('')\n });\n }\n /**\n * Create controls for the component\n *\n * @return {Element}\n * The element that was created.\n *\n * @private\n */\n ;\n\n _proto.createElControls_ = function createElControls_() {\n var defaultsDescription = this.localize('restore all settings to the default values');\n return createEl('div', {\n className: 'vjs-track-settings-controls',\n innerHTML: [\"<button type=\\\"button\\\" class=\\\"vjs-default-button\\\" title=\\\"\" + defaultsDescription + \"\\\">\", this.localize('Reset'), \"<span class=\\\"vjs-control-text\\\"> \" + defaultsDescription + \"</span>\", '</button>', \"<button type=\\\"button\\\" class=\\\"vjs-done-button\\\">\" + this.localize('Done') + \"</button>\"].join('')\n });\n };\n\n _proto.content = function content() {\n return [this.createElColors_(), this.createElFont_(), this.createElControls_()];\n };\n\n _proto.label = function label() {\n return this.localize('Caption Settings Dialog');\n };\n\n _proto.description = function description() {\n return this.localize('Beginning of dialog window. Escape will cancel and close the window.');\n };\n\n _proto.buildCSSClass = function buildCSSClass() {\n return _ModalDialog.prototype.buildCSSClass.call(this) + ' vjs-text-track-settings';\n }\n /**\n * Gets an object of text track settings (or null).\n *\n * @return {Object}\n * An object with config values parsed from the DOM or localStorage.\n */\n ;\n\n _proto.getValues = function getValues() {\n var _this3 = this;\n\n return reduce(selectConfigs, function (accum, config, key) {\n var value = getSelectedOptionValue(_this3.$(config.selector), config.parser);\n\n if (value !== undefined) {\n accum[key] = value;\n }\n\n return accum;\n }, {});\n }\n /**\n * Sets text track settings from an object of values.\n *\n * @param {Object} values\n * An object with config values parsed from the DOM or localStorage.\n */\n ;\n\n _proto.setValues = function setValues(values) {\n var _this4 = this;\n\n each(selectConfigs, function (config, key) {\n setSelectedOption(_this4.$(config.selector), values[key], config.parser);\n });\n }\n /**\n * Sets all `<select>` elements to their default values.\n */\n ;\n\n _proto.setDefaults = function setDefaults() {\n var _this5 = this;\n\n each(selectConfigs, function (config) {\n var index = config.hasOwnProperty('default') ? config[\"default\"] : 0;\n _this5.$(config.selector).selectedIndex = index;\n });\n }\n /**\n * Restore texttrack settings from localStorage\n */\n ;\n\n _proto.restoreSettings = function restoreSettings() {\n var values;\n\n try {\n values = JSON.parse(window$1.localStorage.getItem(LOCAL_STORAGE_KEY));\n } catch (err) {\n log.warn(err);\n }\n\n if (values) {\n this.setValues(values);\n }\n }\n /**\n * Save text track settings to localStorage\n */\n ;\n\n _proto.saveSettings = function saveSettings() {\n if (!this.options_.persistTextTrackSettings) {\n return;\n }\n\n var values = this.getValues();\n\n try {\n if (Object.keys(values).length) {\n window$1.localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(values));\n } else {\n window$1.localStorage.removeItem(LOCAL_STORAGE_KEY);\n }\n } catch (err) {\n log.warn(err);\n }\n }\n /**\n * Update display of text track settings\n */\n ;\n\n _proto.updateDisplay = function updateDisplay() {\n var ttDisplay = this.player_.getChild('textTrackDisplay');\n\n if (ttDisplay) {\n ttDisplay.updateDisplay();\n }\n }\n /**\n * conditionally blur the element and refocus the captions button\n *\n * @private\n */\n ;\n\n _proto.conditionalBlur_ = function conditionalBlur_() {\n this.previouslyActiveEl_ = null;\n var cb = this.player_.controlBar;\n var subsCapsBtn = cb && cb.subsCapsButton;\n var ccBtn = cb && cb.captionsButton;\n\n if (subsCapsBtn) {\n subsCapsBtn.focus();\n } else if (ccBtn) {\n ccBtn.focus();\n }\n };\n\n return TextTrackSettings;\n}(ModalDialog);\n\nComponent.registerComponent('TextTrackSettings', TextTrackSettings);\n/**\n * A Resize Manager. It is in charge of triggering `playerresize` on the player in the right conditions.\n *\n * It'll either create an iframe and use a debounced resize handler on it or use the new {@link https://wicg.github.io/ResizeObserver/|ResizeObserver}.\n *\n * If the ResizeObserver is available natively, it will be used. A polyfill can be passed in as an option.\n * If a `playerresize` event is not needed, the ResizeManager component can be removed from the player, see the example below.\n * @example <caption>How to disable the resize manager</caption>\n * const player = videojs('#vid', {\n * resizeManager: false\n * });\n *\n * @see {@link https://wicg.github.io/ResizeObserver/|ResizeObserver specification}\n *\n * @extends Component\n */\n\nvar ResizeManager =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(ResizeManager, _Component);\n /**\n * Create the ResizeManager.\n *\n * @param {Object} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of ResizeManager options.\n *\n * @param {Object} [options.ResizeObserver]\n * A polyfill for ResizeObserver can be passed in here.\n * If this is set to null it will ignore the native ResizeObserver and fall back to the iframe fallback.\n */\n\n\n function ResizeManager(player, options) {\n var _this;\n\n var RESIZE_OBSERVER_AVAILABLE = options.ResizeObserver || window$1.ResizeObserver; // if `null` was passed, we want to disable the ResizeObserver\n\n if (options.ResizeObserver === null) {\n RESIZE_OBSERVER_AVAILABLE = false;\n } // Only create an element when ResizeObserver isn't available\n\n\n var options_ = mergeOptions({\n createEl: !RESIZE_OBSERVER_AVAILABLE,\n reportTouchActivity: false\n }, options);\n _this = _Component.call(this, player, options_) || this;\n _this.ResizeObserver = options.ResizeObserver || window$1.ResizeObserver;\n _this.loadListener_ = null;\n _this.resizeObserver_ = null;\n _this.debouncedHandler_ = debounce(function () {\n _this.resizeHandler();\n }, 100, false, _assertThisInitialized(_this));\n\n if (RESIZE_OBSERVER_AVAILABLE) {\n _this.resizeObserver_ = new _this.ResizeObserver(_this.debouncedHandler_);\n\n _this.resizeObserver_.observe(player.el());\n } else {\n _this.loadListener_ = function () {\n if (!_this.el_ || !_this.el_.contentWindow) {\n return;\n }\n\n var debouncedHandler_ = _this.debouncedHandler_;\n\n var unloadListener_ = _this.unloadListener_ = function () {\n off(this, 'resize', debouncedHandler_);\n off(this, 'unload', unloadListener_);\n unloadListener_ = null;\n }; // safari and edge can unload the iframe before resizemanager dispose\n // we have to dispose of event handlers correctly before that happens\n\n\n on(_this.el_.contentWindow, 'unload', unloadListener_);\n on(_this.el_.contentWindow, 'resize', debouncedHandler_);\n };\n\n _this.one('load', _this.loadListener_);\n }\n\n return _this;\n }\n\n var _proto = ResizeManager.prototype;\n\n _proto.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'iframe', {\n className: 'vjs-resize-manager',\n tabIndex: -1\n }, {\n 'aria-hidden': 'true'\n });\n }\n /**\n * Called when a resize is triggered on the iframe or a resize is observed via the ResizeObserver\n *\n * @fires Player#playerresize\n */\n ;\n\n _proto.resizeHandler = function resizeHandler() {\n /**\n * Called when the player size has changed\n *\n * @event Player#playerresize\n * @type {EventTarget~Event}\n */\n // make sure player is still around to trigger\n // prevents this from causing an error after dispose\n if (!this.player_ || !this.player_.trigger) {\n return;\n }\n\n this.player_.trigger('playerresize');\n };\n\n _proto.dispose = function dispose() {\n if (this.debouncedHandler_) {\n this.debouncedHandler_.cancel();\n }\n\n if (this.resizeObserver_) {\n if (this.player_.el()) {\n this.resizeObserver_.unobserve(this.player_.el());\n }\n\n this.resizeObserver_.disconnect();\n }\n\n if (this.loadListener_) {\n this.off('load', this.loadListener_);\n }\n\n if (this.el_ && this.el_.contentWindow && this.unloadListener_) {\n this.unloadListener_.call(this.el_.contentWindow);\n }\n\n this.ResizeObserver = null;\n this.resizeObserver = null;\n this.debouncedHandler_ = null;\n this.loadListener_ = null;\n\n _Component.prototype.dispose.call(this);\n };\n\n return ResizeManager;\n}(Component);\n\nComponent.registerComponent('ResizeManager', ResizeManager);\n/**\n * Computes the median of an array.\n *\n * @param {number[]} arr\n * Input array of numbers.\n *\n * @return {number}\n * Median value.\n */\n\nvar median = function median(arr) {\n var mid = Math.floor(arr.length / 2);\n var sortedList = [].concat(arr).sort(function (a, b) {\n return a - b;\n });\n return arr.length % 2 !== 0 ? sortedList[mid] : (sortedList[mid - 1] + sortedList[mid]) / 2;\n};\n/* track when we are at the live edge, and other helpers for live playback */\n\n\nvar LiveTracker =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(LiveTracker, _Component);\n\n function LiveTracker(player, options) {\n var _this; // LiveTracker does not need an element\n\n\n var options_ = mergeOptions({\n createEl: false\n }, options);\n _this = _Component.call(this, player, options_) || this;\n\n _this.reset_();\n\n _this.on(_this.player_, 'durationchange', _this.handleDurationchange); // we don't need to track live playback if the document is hidden,\n // also, tracking when the document is hidden can\n // cause the CPU to spike and eventually crash the page on IE11.\n\n\n if (IE_VERSION && 'hidden' in document && 'visibilityState' in document) {\n _this.on(document, 'visibilitychange', _this.handleVisibilityChange);\n }\n\n return _this;\n }\n\n var _proto = LiveTracker.prototype;\n\n _proto.handleVisibilityChange = function handleVisibilityChange() {\n if (this.player_.duration() !== Infinity) {\n return;\n }\n\n if (document.hidden) {\n this.stopTracking();\n } else {\n this.startTracking();\n }\n };\n\n _proto.isBehind_ = function isBehind_() {\n // don't report that we are behind until a timeupdate has been seen\n if (!this.timeupdateSeen_) {\n return false;\n }\n\n var liveCurrentTime = this.liveCurrentTime();\n var currentTime = this.player_.currentTime(); // the live edge window is the amount of seconds away from live\n // that a player can be, but still be considered live.\n // we add 0.07 because the live tracking happens every 30ms\n // and we want some wiggle room for short segment live playback\n\n var liveEdgeWindow = this.seekableIncrement_ * 2 + 0.07; // on Android liveCurrentTime can bee Infinity, because seekableEnd\n // can be Infinity, so we handle that case.\n\n return liveCurrentTime !== Infinity && liveCurrentTime - liveEdgeWindow >= currentTime;\n } // all the functionality for tracking when seek end changes\n // and for tracking how far past seek end we should be\n ;\n\n _proto.trackLive_ = function trackLive_() {\n this.pastSeekEnd_ = this.pastSeekEnd_;\n var seekable = this.player_.seekable(); // skip undefined seekable\n\n if (!seekable || !seekable.length) {\n return;\n }\n\n var newSeekEnd = this.seekableEnd(); // we can only tell if we are behind live, when seekable changes\n // once we detect that seekable has changed we check the new seek\n // end against current time, with a fudge value of half a second.\n\n if (newSeekEnd !== this.lastSeekEnd_) {\n if (this.lastSeekEnd_) {\n // we try to get the best fit value for the seeking increment\n // variable from the last 12 values.\n this.seekableIncrementList_ = this.seekableIncrementList_.slice(-11);\n this.seekableIncrementList_.push(Math.abs(newSeekEnd - this.lastSeekEnd_));\n\n if (this.seekableIncrementList_.length > 3) {\n this.seekableIncrement_ = median(this.seekableIncrementList_);\n }\n }\n\n this.pastSeekEnd_ = 0;\n this.lastSeekEnd_ = newSeekEnd;\n this.trigger('seekableendchange');\n }\n\n this.pastSeekEnd_ = this.pastSeekEnd() + 0.03;\n\n if (this.isBehind_() !== this.behindLiveEdge()) {\n this.behindLiveEdge_ = this.isBehind_();\n this.trigger('liveedgechange');\n }\n }\n /**\n * handle a durationchange event on the player\n * and start/stop tracking accordingly.\n */\n ;\n\n _proto.handleDurationchange = function handleDurationchange() {\n if (this.player_.duration() === Infinity) {\n this.startTracking();\n } else {\n this.stopTracking();\n }\n }\n /**\n * start tracking live playback\n */\n ;\n\n _proto.startTracking = function startTracking() {\n var _this2 = this;\n\n if (this.isTracking()) {\n return;\n } // If we haven't seen a timeupdate, we need to check whether playback\n // began before this component started tracking. This can happen commonly\n // when using autoplay.\n\n\n if (!this.timeupdateSeen_) {\n this.timeupdateSeen_ = this.player_.hasStarted();\n }\n\n this.trackingInterval_ = this.setInterval(this.trackLive_, 30);\n this.trackLive_();\n this.on(this.player_, 'play', this.trackLive_);\n this.on(this.player_, 'pause', this.trackLive_); // this is to prevent showing that we are not live\n // before a video starts to play\n\n if (!this.timeupdateSeen_) {\n this.one(this.player_, 'play', this.handlePlay);\n\n this.handleTimeupdate = function () {\n _this2.timeupdateSeen_ = true;\n _this2.handleTimeupdate = null;\n };\n\n this.one(this.player_, 'timeupdate', this.handleTimeupdate);\n }\n };\n\n _proto.handlePlay = function handlePlay() {\n this.one(this.player_, 'timeupdate', this.seekToLiveEdge);\n }\n /**\n * Stop tracking, and set all internal variables to\n * their initial value.\n */\n ;\n\n _proto.reset_ = function reset_() {\n this.pastSeekEnd_ = 0;\n this.lastSeekEnd_ = null;\n this.behindLiveEdge_ = null;\n this.timeupdateSeen_ = false;\n this.clearInterval(this.trackingInterval_);\n this.trackingInterval_ = null;\n this.seekableIncrement_ = 12;\n this.seekableIncrementList_ = [];\n this.off(this.player_, 'play', this.trackLive_);\n this.off(this.player_, 'pause', this.trackLive_);\n this.off(this.player_, 'play', this.handlePlay);\n this.off(this.player_, 'timeupdate', this.seekToLiveEdge);\n\n if (this.handleTimeupdate) {\n this.off(this.player_, 'timeupdate', this.handleTimeupdate);\n this.handleTimeupdate = null;\n }\n }\n /**\n * stop tracking live playback\n */\n ;\n\n _proto.stopTracking = function stopTracking() {\n if (!this.isTracking()) {\n return;\n }\n\n this.reset_();\n }\n /**\n * A helper to get the player seekable end\n * so that we don't have to null check everywhere\n */\n ;\n\n _proto.seekableEnd = function seekableEnd() {\n var seekable = this.player_.seekable();\n var seekableEnds = [];\n var i = seekable ? seekable.length : 0;\n\n while (i--) {\n seekableEnds.push(seekable.end(i));\n } // grab the furthest seekable end after sorting, or if there are none\n // default to Infinity\n\n\n return seekableEnds.length ? seekableEnds.sort()[seekableEnds.length - 1] : Infinity;\n }\n /**\n * A helper to get the player seekable start\n * so that we don't have to null check everywhere\n */\n ;\n\n _proto.seekableStart = function seekableStart() {\n var seekable = this.player_.seekable();\n var seekableStarts = [];\n var i = seekable ? seekable.length : 0;\n\n while (i--) {\n seekableStarts.push(seekable.start(i));\n } // grab the first seekable start after sorting, or if there are none\n // default to 0\n\n\n return seekableStarts.length ? seekableStarts.sort()[0] : 0;\n }\n /**\n * Get the live time window\n */\n ;\n\n _proto.liveWindow = function liveWindow() {\n var liveCurrentTime = this.liveCurrentTime();\n\n if (liveCurrentTime === Infinity) {\n return Infinity;\n }\n\n return liveCurrentTime - this.seekableStart();\n }\n /**\n * Determines if the player is live, only checks if this component\n * is tracking live playback or not\n */\n ;\n\n _proto.isLive = function isLive() {\n return this.isTracking();\n }\n /**\n * Determines if currentTime is at the live edge and won't fall behind\n * on each seekableendchange\n */\n ;\n\n _proto.atLiveEdge = function atLiveEdge() {\n return !this.behindLiveEdge();\n }\n /**\n * get what we expect the live current time to be\n */\n ;\n\n _proto.liveCurrentTime = function liveCurrentTime() {\n return this.pastSeekEnd() + this.seekableEnd();\n }\n /**\n * Returns how far past seek end we expect current time to be\n */\n ;\n\n _proto.pastSeekEnd = function pastSeekEnd() {\n return this.pastSeekEnd_;\n }\n /**\n * If we are currently behind the live edge, aka currentTime will be\n * behind on a seekableendchange\n */\n ;\n\n _proto.behindLiveEdge = function behindLiveEdge() {\n return this.behindLiveEdge_;\n };\n\n _proto.isTracking = function isTracking() {\n return typeof this.trackingInterval_ === 'number';\n }\n /**\n * Seek to the live edge if we are behind the live edge\n */\n ;\n\n _proto.seekToLiveEdge = function seekToLiveEdge() {\n if (this.atLiveEdge()) {\n return;\n }\n\n this.player_.currentTime(this.liveCurrentTime());\n\n if (this.player_.paused()) {\n this.player_.play();\n }\n };\n\n _proto.dispose = function dispose() {\n this.stopTracking();\n\n _Component.prototype.dispose.call(this);\n };\n\n return LiveTracker;\n}(Component);\n\nComponent.registerComponent('LiveTracker', LiveTracker);\n/**\n * This function is used to fire a sourceset when there is something\n * similar to `mediaEl.load()` being called. It will try to find the source via\n * the `src` attribute and then the `<source>` elements. It will then fire `sourceset`\n * with the source that was found or empty string if we cannot know. If it cannot\n * find a source then `sourceset` will not be fired.\n *\n * @param {Html5} tech\n * The tech object that sourceset was setup on\n *\n * @return {boolean}\n * returns false if the sourceset was not fired and true otherwise.\n */\n\nvar sourcesetLoad = function sourcesetLoad(tech) {\n var el = tech.el(); // if `el.src` is set, that source will be loaded.\n\n if (el.hasAttribute('src')) {\n tech.triggerSourceset(el.src);\n return true;\n }\n /**\n * Since there isn't a src property on the media element, source elements will be used for\n * implementing the source selection algorithm. This happens asynchronously and\n * for most cases were there is more than one source we cannot tell what source will\n * be loaded, without re-implementing the source selection algorithm. At this time we are not\n * going to do that. There are three special cases that we do handle here though:\n *\n * 1. If there are no sources, do not fire `sourceset`.\n * 2. If there is only one `<source>` with a `src` property/attribute that is our `src`\n * 3. If there is more than one `<source>` but all of them have the same `src` url.\n * That will be our src.\n */\n\n\n var sources = tech.$$('source');\n var srcUrls = [];\n var src = ''; // if there are no sources, do not fire sourceset\n\n if (!sources.length) {\n return false;\n } // only count valid/non-duplicate source elements\n\n\n for (var i = 0; i < sources.length; i++) {\n var url = sources[i].src;\n\n if (url && srcUrls.indexOf(url) === -1) {\n srcUrls.push(url);\n }\n } // there were no valid sources\n\n\n if (!srcUrls.length) {\n return false;\n } // there is only one valid source element url\n // use that\n\n\n if (srcUrls.length === 1) {\n src = srcUrls[0];\n }\n\n tech.triggerSourceset(src);\n return true;\n};\n/**\n * our implementation of an `innerHTML` descriptor for browsers\n * that do not have one.\n */\n\n\nvar innerHTMLDescriptorPolyfill = Object.defineProperty({}, 'innerHTML', {\n get: function get() {\n return this.cloneNode(true).innerHTML;\n },\n set: function set(v) {\n // make a dummy node to use innerHTML on\n var dummy = document.createElement(this.nodeName.toLowerCase()); // set innerHTML to the value provided\n\n dummy.innerHTML = v; // make a document fragment to hold the nodes from dummy\n\n var docFrag = document.createDocumentFragment(); // copy all of the nodes created by the innerHTML on dummy\n // to the document fragment\n\n while (dummy.childNodes.length) {\n docFrag.appendChild(dummy.childNodes[0]);\n } // remove content\n\n\n this.innerText = ''; // now we add all of that html in one by appending the\n // document fragment. This is how innerHTML does it.\n\n window$1.Element.prototype.appendChild.call(this, docFrag); // then return the result that innerHTML's setter would\n\n return this.innerHTML;\n }\n});\n/**\n * Get a property descriptor given a list of priorities and the\n * property to get.\n */\n\nvar getDescriptor = function getDescriptor(priority, prop) {\n var descriptor = {};\n\n for (var i = 0; i < priority.length; i++) {\n descriptor = Object.getOwnPropertyDescriptor(priority[i], prop);\n\n if (descriptor && descriptor.set && descriptor.get) {\n break;\n }\n }\n\n descriptor.enumerable = true;\n descriptor.configurable = true;\n return descriptor;\n};\n\nvar getInnerHTMLDescriptor = function getInnerHTMLDescriptor(tech) {\n return getDescriptor([tech.el(), window$1.HTMLMediaElement.prototype, window$1.Element.prototype, innerHTMLDescriptorPolyfill], 'innerHTML');\n};\n/**\n * Patches browser internal functions so that we can tell synchronously\n * if a `<source>` was appended to the media element. For some reason this\n * causes a `sourceset` if the the media element is ready and has no source.\n * This happens when:\n * - The page has just loaded and the media element does not have a source.\n * - The media element was emptied of all sources, then `load()` was called.\n *\n * It does this by patching the following functions/properties when they are supported:\n *\n * - `append()` - can be used to add a `<source>` element to the media element\n * - `appendChild()` - can be used to add a `<source>` element to the media element\n * - `insertAdjacentHTML()` - can be used to add a `<source>` element to the media element\n * - `innerHTML` - can be used to add a `<source>` element to the media element\n *\n * @param {Html5} tech\n * The tech object that sourceset is being setup on.\n */\n\n\nvar firstSourceWatch = function firstSourceWatch(tech) {\n var el = tech.el(); // make sure firstSourceWatch isn't setup twice.\n\n if (el.resetSourceWatch_) {\n return;\n }\n\n var old = {};\n var innerDescriptor = getInnerHTMLDescriptor(tech);\n\n var appendWrapper = function appendWrapper(appendFn) {\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var retval = appendFn.apply(el, args);\n sourcesetLoad(tech);\n return retval;\n };\n };\n\n ['append', 'appendChild', 'insertAdjacentHTML'].forEach(function (k) {\n if (!el[k]) {\n return;\n } // store the old function\n\n\n old[k] = el[k]; // call the old function with a sourceset if a source\n // was loaded\n\n el[k] = appendWrapper(old[k]);\n });\n Object.defineProperty(el, 'innerHTML', mergeOptions(innerDescriptor, {\n set: appendWrapper(innerDescriptor.set)\n }));\n\n el.resetSourceWatch_ = function () {\n el.resetSourceWatch_ = null;\n Object.keys(old).forEach(function (k) {\n el[k] = old[k];\n });\n Object.defineProperty(el, 'innerHTML', innerDescriptor);\n }; // on the first sourceset, we need to revert our changes\n\n\n tech.one('sourceset', el.resetSourceWatch_);\n};\n/**\n * our implementation of a `src` descriptor for browsers\n * that do not have one.\n */\n\n\nvar srcDescriptorPolyfill = Object.defineProperty({}, 'src', {\n get: function get() {\n if (this.hasAttribute('src')) {\n return getAbsoluteURL(window$1.Element.prototype.getAttribute.call(this, 'src'));\n }\n\n return '';\n },\n set: function set(v) {\n window$1.Element.prototype.setAttribute.call(this, 'src', v);\n return v;\n }\n});\n\nvar getSrcDescriptor = function getSrcDescriptor(tech) {\n return getDescriptor([tech.el(), window$1.HTMLMediaElement.prototype, srcDescriptorPolyfill], 'src');\n};\n/**\n * setup `sourceset` handling on the `Html5` tech. This function\n * patches the following element properties/functions:\n *\n * - `src` - to determine when `src` is set\n * - `setAttribute()` - to determine when `src` is set\n * - `load()` - this re-triggers the source selection algorithm, and can\n * cause a sourceset.\n *\n * If there is no source when we are adding `sourceset` support or during a `load()`\n * we also patch the functions listed in `firstSourceWatch`.\n *\n * @param {Html5} tech\n * The tech to patch\n */\n\n\nvar setupSourceset = function setupSourceset(tech) {\n if (!tech.featuresSourceset) {\n return;\n }\n\n var el = tech.el(); // make sure sourceset isn't setup twice.\n\n if (el.resetSourceset_) {\n return;\n }\n\n var srcDescriptor = getSrcDescriptor(tech);\n var oldSetAttribute = el.setAttribute;\n var oldLoad = el.load;\n Object.defineProperty(el, 'src', mergeOptions(srcDescriptor, {\n set: function set(v) {\n var retval = srcDescriptor.set.call(el, v); // we use the getter here to get the actual value set on src\n\n tech.triggerSourceset(el.src);\n return retval;\n }\n }));\n\n el.setAttribute = function (n, v) {\n var retval = oldSetAttribute.call(el, n, v);\n\n if (/src/i.test(n)) {\n tech.triggerSourceset(el.src);\n }\n\n return retval;\n };\n\n el.load = function () {\n var retval = oldLoad.call(el); // if load was called, but there was no source to fire\n // sourceset on. We have to watch for a source append\n // as that can trigger a `sourceset` when the media element\n // has no source\n\n if (!sourcesetLoad(tech)) {\n tech.triggerSourceset('');\n firstSourceWatch(tech);\n }\n\n return retval;\n };\n\n if (el.currentSrc) {\n tech.triggerSourceset(el.currentSrc);\n } else if (!sourcesetLoad(tech)) {\n firstSourceWatch(tech);\n }\n\n el.resetSourceset_ = function () {\n el.resetSourceset_ = null;\n el.load = oldLoad;\n el.setAttribute = oldSetAttribute;\n Object.defineProperty(el, 'src', srcDescriptor);\n\n if (el.resetSourceWatch_) {\n el.resetSourceWatch_();\n }\n };\n};\n/**\n * HTML5 Media Controller - Wrapper for HTML5 Media API\n *\n * @mixes Tech~SourceHandlerAdditions\n * @extends Tech\n */\n\n\nvar Html5 =\n/*#__PURE__*/\nfunction (_Tech) {\n _inheritsLoose(Html5, _Tech);\n /**\n * Create an instance of this Tech.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {Component~ReadyCallback} ready\n * Callback function to call when the `HTML5` Tech is ready.\n */\n\n\n function Html5(options, ready) {\n var _this;\n\n _this = _Tech.call(this, options, ready) || this;\n var source = options.source;\n var crossoriginTracks = false; // Set the source if one is provided\n // 1) Check if the source is new (if not, we want to keep the original so playback isn't interrupted)\n // 2) Check to see if the network state of the tag was failed at init, and if so, reset the source\n // anyway so the error gets fired.\n\n if (source && (_this.el_.currentSrc !== source.src || options.tag && options.tag.initNetworkState_ === 3)) {\n _this.setSource(source);\n } else {\n _this.handleLateInit_(_this.el_);\n } // setup sourceset after late sourceset/init\n\n\n if (options.enableSourceset) {\n _this.setupSourcesetHandling_();\n }\n\n if (_this.el_.hasChildNodes()) {\n var nodes = _this.el_.childNodes;\n var nodesLength = nodes.length;\n var removeNodes = [];\n\n while (nodesLength--) {\n var node = nodes[nodesLength];\n var nodeName = node.nodeName.toLowerCase();\n\n if (nodeName === 'track') {\n if (!_this.featuresNativeTextTracks) {\n // Empty video tag tracks so the built-in player doesn't use them also.\n // This may not be fast enough to stop HTML5 browsers from reading the tags\n // so we'll need to turn off any default tracks if we're manually doing\n // captions and subtitles. videoElement.textTracks\n removeNodes.push(node);\n } else {\n // store HTMLTrackElement and TextTrack to remote list\n _this.remoteTextTrackEls().addTrackElement_(node);\n\n _this.remoteTextTracks().addTrack(node.track);\n\n _this.textTracks().addTrack(node.track);\n\n if (!crossoriginTracks && !_this.el_.hasAttribute('crossorigin') && isCrossOrigin(node.src)) {\n crossoriginTracks = true;\n }\n }\n }\n }\n\n for (var i = 0; i < removeNodes.length; i++) {\n _this.el_.removeChild(removeNodes[i]);\n }\n }\n\n _this.proxyNativeTracks_();\n\n if (_this.featuresNativeTextTracks && crossoriginTracks) {\n log.warn('Text Tracks are being loaded from another origin but the crossorigin attribute isn\\'t used.\\n' + 'This may prevent text tracks from loading.');\n } // prevent iOS Safari from disabling metadata text tracks during native playback\n\n\n _this.restoreMetadataTracksInIOSNativePlayer_(); // Determine if native controls should be used\n // Our goal should be to get the custom controls on mobile solid everywhere\n // so we can remove this all together. Right now this will block custom\n // controls on touch enabled laptops like the Chrome Pixel\n\n\n if ((TOUCH_ENABLED || IS_IPHONE || IS_NATIVE_ANDROID) && options.nativeControlsForTouch === true) {\n _this.setControls(true);\n } // on iOS, we want to proxy `webkitbeginfullscreen` and `webkitendfullscreen`\n // into a `fullscreenchange` event\n\n\n _this.proxyWebkitFullscreen_();\n\n _this.triggerReady();\n\n return _this;\n }\n /**\n * Dispose of `HTML5` media element and remove all tracks.\n */\n\n\n var _proto = Html5.prototype;\n\n _proto.dispose = function dispose() {\n if (this.el_ && this.el_.resetSourceset_) {\n this.el_.resetSourceset_();\n }\n\n Html5.disposeMediaElement(this.el_);\n this.options_ = null; // tech will handle clearing of the emulated track list\n\n _Tech.prototype.dispose.call(this);\n }\n /**\n * Modify the media element so that we can detect when\n * the source is changed. Fires `sourceset` just after the source has changed\n */\n ;\n\n _proto.setupSourcesetHandling_ = function setupSourcesetHandling_() {\n setupSourceset(this);\n }\n /**\n * When a captions track is enabled in the iOS Safari native player, all other\n * tracks are disabled (including metadata tracks), which nulls all of their\n * associated cue points. This will restore metadata tracks to their pre-fullscreen\n * state in those cases so that cue points are not needlessly lost.\n *\n * @private\n */\n ;\n\n _proto.restoreMetadataTracksInIOSNativePlayer_ = function restoreMetadataTracksInIOSNativePlayer_() {\n var textTracks = this.textTracks();\n var metadataTracksPreFullscreenState; // captures a snapshot of every metadata track's current state\n\n var takeMetadataTrackSnapshot = function takeMetadataTrackSnapshot() {\n metadataTracksPreFullscreenState = [];\n\n for (var i = 0; i < textTracks.length; i++) {\n var track = textTracks[i];\n\n if (track.kind === 'metadata') {\n metadataTracksPreFullscreenState.push({\n track: track,\n storedMode: track.mode\n });\n }\n }\n }; // snapshot each metadata track's initial state, and update the snapshot\n // each time there is a track 'change' event\n\n\n takeMetadataTrackSnapshot();\n textTracks.addEventListener('change', takeMetadataTrackSnapshot);\n this.on('dispose', function () {\n return textTracks.removeEventListener('change', takeMetadataTrackSnapshot);\n });\n\n var restoreTrackMode = function restoreTrackMode() {\n for (var i = 0; i < metadataTracksPreFullscreenState.length; i++) {\n var storedTrack = metadataTracksPreFullscreenState[i];\n\n if (storedTrack.track.mode === 'disabled' && storedTrack.track.mode !== storedTrack.storedMode) {\n storedTrack.track.mode = storedTrack.storedMode;\n }\n } // we only want this handler to be executed on the first 'change' event\n\n\n textTracks.removeEventListener('change', restoreTrackMode);\n }; // when we enter fullscreen playback, stop updating the snapshot and\n // restore all track modes to their pre-fullscreen state\n\n\n this.on('webkitbeginfullscreen', function () {\n textTracks.removeEventListener('change', takeMetadataTrackSnapshot); // remove the listener before adding it just in case it wasn't previously removed\n\n textTracks.removeEventListener('change', restoreTrackMode);\n textTracks.addEventListener('change', restoreTrackMode);\n }); // start updating the snapshot again after leaving fullscreen\n\n this.on('webkitendfullscreen', function () {\n // remove the listener before adding it just in case it wasn't previously removed\n textTracks.removeEventListener('change', takeMetadataTrackSnapshot);\n textTracks.addEventListener('change', takeMetadataTrackSnapshot); // remove the restoreTrackMode handler in case it wasn't triggered during fullscreen playback\n\n textTracks.removeEventListener('change', restoreTrackMode);\n });\n }\n /**\n * Attempt to force override of tracks for the given type\n *\n * @param {string} type - Track type to override, possible values include 'Audio',\n * 'Video', and 'Text'.\n * @param {boolean} override - If set to true native audio/video will be overridden,\n * otherwise native audio/video will potentially be used.\n * @private\n */\n ;\n\n _proto.overrideNative_ = function overrideNative_(type, override) {\n var _this2 = this; // If there is no behavioral change don't add/remove listeners\n\n\n if (override !== this[\"featuresNative\" + type + \"Tracks\"]) {\n return;\n }\n\n var lowerCaseType = type.toLowerCase();\n\n if (this[lowerCaseType + \"TracksListeners_\"]) {\n Object.keys(this[lowerCaseType + \"TracksListeners_\"]).forEach(function (eventName) {\n var elTracks = _this2.el()[lowerCaseType + \"Tracks\"];\n\n elTracks.removeEventListener(eventName, _this2[lowerCaseType + \"TracksListeners_\"][eventName]);\n });\n }\n\n this[\"featuresNative\" + type + \"Tracks\"] = !override;\n this[lowerCaseType + \"TracksListeners_\"] = null;\n this.proxyNativeTracksForType_(lowerCaseType);\n }\n /**\n * Attempt to force override of native audio tracks.\n *\n * @param {boolean} override - If set to true native audio will be overridden,\n * otherwise native audio will potentially be used.\n */\n ;\n\n _proto.overrideNativeAudioTracks = function overrideNativeAudioTracks(override) {\n this.overrideNative_('Audio', override);\n }\n /**\n * Attempt to force override of native video tracks.\n *\n * @param {boolean} override - If set to true native video will be overridden,\n * otherwise native video will potentially be used.\n */\n ;\n\n _proto.overrideNativeVideoTracks = function overrideNativeVideoTracks(override) {\n this.overrideNative_('Video', override);\n }\n /**\n * Proxy native track list events for the given type to our track\n * lists if the browser we are playing in supports that type of track list.\n *\n * @param {string} name - Track type; values include 'audio', 'video', and 'text'\n * @private\n */\n ;\n\n _proto.proxyNativeTracksForType_ = function proxyNativeTracksForType_(name) {\n var _this3 = this;\n\n var props = NORMAL[name];\n var elTracks = this.el()[props.getterName];\n var techTracks = this[props.getterName]();\n\n if (!this[\"featuresNative\" + props.capitalName + \"Tracks\"] || !elTracks || !elTracks.addEventListener) {\n return;\n }\n\n var listeners = {\n change: function change(e) {\n techTracks.trigger({\n type: 'change',\n target: techTracks,\n currentTarget: techTracks,\n srcElement: techTracks\n });\n },\n addtrack: function addtrack(e) {\n techTracks.addTrack(e.track);\n },\n removetrack: function removetrack(e) {\n techTracks.removeTrack(e.track);\n }\n };\n\n var removeOldTracks = function removeOldTracks() {\n var removeTracks = [];\n\n for (var i = 0; i < techTracks.length; i++) {\n var found = false;\n\n for (var j = 0; j < elTracks.length; j++) {\n if (elTracks[j] === techTracks[i]) {\n found = true;\n break;\n }\n }\n\n if (!found) {\n removeTracks.push(techTracks[i]);\n }\n }\n\n while (removeTracks.length) {\n techTracks.removeTrack(removeTracks.shift());\n }\n };\n\n this[props.getterName + 'Listeners_'] = listeners;\n Object.keys(listeners).forEach(function (eventName) {\n var listener = listeners[eventName];\n elTracks.addEventListener(eventName, listener);\n\n _this3.on('dispose', function (e) {\n return elTracks.removeEventListener(eventName, listener);\n });\n }); // Remove (native) tracks that are not used anymore\n\n this.on('loadstart', removeOldTracks);\n this.on('dispose', function (e) {\n return _this3.off('loadstart', removeOldTracks);\n });\n }\n /**\n * Proxy all native track list events to our track lists if the browser we are playing\n * in supports that type of track list.\n *\n * @private\n */\n ;\n\n _proto.proxyNativeTracks_ = function proxyNativeTracks_() {\n var _this4 = this;\n\n NORMAL.names.forEach(function (name) {\n _this4.proxyNativeTracksForType_(name);\n });\n }\n /**\n * Create the `Html5` Tech's DOM element.\n *\n * @return {Element}\n * The element that gets created.\n */\n ;\n\n _proto.createEl = function createEl() {\n var el = this.options_.tag; // Check if this browser supports moving the element into the box.\n // On the iPhone video will break if you move the element,\n // So we have to create a brand new element.\n // If we ingested the player div, we do not need to move the media element.\n\n if (!el || !(this.options_.playerElIngest || this.movingMediaElementInDOM)) {\n // If the original tag is still there, clone and remove it.\n if (el) {\n var clone = el.cloneNode(true);\n\n if (el.parentNode) {\n el.parentNode.insertBefore(clone, el);\n }\n\n Html5.disposeMediaElement(el);\n el = clone;\n } else {\n el = document.createElement('video'); // determine if native controls should be used\n\n var tagAttributes = this.options_.tag && getAttributes(this.options_.tag);\n var attributes = mergeOptions({}, tagAttributes);\n\n if (!TOUCH_ENABLED || this.options_.nativeControlsForTouch !== true) {\n delete attributes.controls;\n }\n\n setAttributes(el, assign(attributes, {\n id: this.options_.techId,\n \"class\": 'vjs-tech'\n }));\n }\n\n el.playerId = this.options_.playerId;\n }\n\n if (typeof this.options_.preload !== 'undefined') {\n setAttribute(el, 'preload', this.options_.preload);\n } // Update specific tag settings, in case they were overridden\n // `autoplay` has to be *last* so that `muted` and `playsinline` are present\n // when iOS/Safari or other browsers attempt to autoplay.\n\n\n var settingsAttrs = ['loop', 'muted', 'playsinline', 'autoplay'];\n\n for (var i = 0; i < settingsAttrs.length; i++) {\n var attr = settingsAttrs[i];\n var value = this.options_[attr];\n\n if (typeof value !== 'undefined') {\n if (value) {\n setAttribute(el, attr, attr);\n } else {\n removeAttribute(el, attr);\n }\n\n el[attr] = value;\n }\n }\n\n return el;\n }\n /**\n * This will be triggered if the loadstart event has already fired, before videojs was\n * ready. Two known examples of when this can happen are:\n * 1. If we're loading the playback object after it has started loading\n * 2. The media is already playing the (often with autoplay on) then\n *\n * This function will fire another loadstart so that videojs can catchup.\n *\n * @fires Tech#loadstart\n *\n * @return {undefined}\n * returns nothing.\n */\n ;\n\n _proto.handleLateInit_ = function handleLateInit_(el) {\n if (el.networkState === 0 || el.networkState === 3) {\n // The video element hasn't started loading the source yet\n // or didn't find a source\n return;\n }\n\n if (el.readyState === 0) {\n // NetworkState is set synchronously BUT loadstart is fired at the\n // end of the current stack, usually before setInterval(fn, 0).\n // So at this point we know loadstart may have already fired or is\n // about to fire, and either way the player hasn't seen it yet.\n // We don't want to fire loadstart prematurely here and cause a\n // double loadstart so we'll wait and see if it happens between now\n // and the next loop, and fire it if not.\n // HOWEVER, we also want to make sure it fires before loadedmetadata\n // which could also happen between now and the next loop, so we'll\n // watch for that also.\n var loadstartFired = false;\n\n var setLoadstartFired = function setLoadstartFired() {\n loadstartFired = true;\n };\n\n this.on('loadstart', setLoadstartFired);\n\n var triggerLoadstart = function triggerLoadstart() {\n // We did miss the original loadstart. Make sure the player\n // sees loadstart before loadedmetadata\n if (!loadstartFired) {\n this.trigger('loadstart');\n }\n };\n\n this.on('loadedmetadata', triggerLoadstart);\n this.ready(function () {\n this.off('loadstart', setLoadstartFired);\n this.off('loadedmetadata', triggerLoadstart);\n\n if (!loadstartFired) {\n // We did miss the original native loadstart. Fire it now.\n this.trigger('loadstart');\n }\n });\n return;\n } // From here on we know that loadstart already fired and we missed it.\n // The other readyState events aren't as much of a problem if we double\n // them, so not going to go to as much trouble as loadstart to prevent\n // that unless we find reason to.\n\n\n var eventsToTrigger = ['loadstart']; // loadedmetadata: newly equal to HAVE_METADATA (1) or greater\n\n eventsToTrigger.push('loadedmetadata'); // loadeddata: newly increased to HAVE_CURRENT_DATA (2) or greater\n\n if (el.readyState >= 2) {\n eventsToTrigger.push('loadeddata');\n } // canplay: newly increased to HAVE_FUTURE_DATA (3) or greater\n\n\n if (el.readyState >= 3) {\n eventsToTrigger.push('canplay');\n } // canplaythrough: newly equal to HAVE_ENOUGH_DATA (4)\n\n\n if (el.readyState >= 4) {\n eventsToTrigger.push('canplaythrough');\n } // We still need to give the player time to add event listeners\n\n\n this.ready(function () {\n eventsToTrigger.forEach(function (type) {\n this.trigger(type);\n }, this);\n });\n }\n /**\n * Set current time for the `HTML5` tech.\n *\n * @param {number} seconds\n * Set the current time of the media to this.\n */\n ;\n\n _proto.setCurrentTime = function setCurrentTime(seconds) {\n try {\n this.el_.currentTime = seconds;\n } catch (e) {\n log(e, 'Video is not ready. (Video.js)'); // this.warning(VideoJS.warnings.videoNotReady);\n }\n }\n /**\n * Get the current duration of the HTML5 media element.\n *\n * @return {number}\n * The duration of the media or 0 if there is no duration.\n */\n ;\n\n _proto.duration = function duration() {\n var _this5 = this; // Android Chrome will report duration as Infinity for VOD HLS until after\n // playback has started, which triggers the live display erroneously.\n // Return NaN if playback has not started and trigger a durationupdate once\n // the duration can be reliably known.\n\n\n if (this.el_.duration === Infinity && IS_ANDROID && IS_CHROME && this.el_.currentTime === 0) {\n // Wait for the first `timeupdate` with currentTime > 0 - there may be\n // several with 0\n var checkProgress = function checkProgress() {\n if (_this5.el_.currentTime > 0) {\n // Trigger durationchange for genuinely live video\n if (_this5.el_.duration === Infinity) {\n _this5.trigger('durationchange');\n }\n\n _this5.off('timeupdate', checkProgress);\n }\n };\n\n this.on('timeupdate', checkProgress);\n return NaN;\n }\n\n return this.el_.duration || NaN;\n }\n /**\n * Get the current width of the HTML5 media element.\n *\n * @return {number}\n * The width of the HTML5 media element.\n */\n ;\n\n _proto.width = function width() {\n return this.el_.offsetWidth;\n }\n /**\n * Get the current height of the HTML5 media element.\n *\n * @return {number}\n * The height of the HTML5 media element.\n */\n ;\n\n _proto.height = function height() {\n return this.el_.offsetHeight;\n }\n /**\n * Proxy iOS `webkitbeginfullscreen` and `webkitendfullscreen` into\n * `fullscreenchange` event.\n *\n * @private\n * @fires fullscreenchange\n * @listens webkitendfullscreen\n * @listens webkitbeginfullscreen\n * @listens webkitbeginfullscreen\n */\n ;\n\n _proto.proxyWebkitFullscreen_ = function proxyWebkitFullscreen_() {\n var _this6 = this;\n\n if (!('webkitDisplayingFullscreen' in this.el_)) {\n return;\n }\n\n var endFn = function endFn() {\n this.trigger('fullscreenchange', {\n isFullscreen: false\n });\n };\n\n var beginFn = function beginFn() {\n if ('webkitPresentationMode' in this.el_ && this.el_.webkitPresentationMode !== 'picture-in-picture') {\n this.one('webkitendfullscreen', endFn);\n this.trigger('fullscreenchange', {\n isFullscreen: true\n });\n }\n };\n\n this.on('webkitbeginfullscreen', beginFn);\n this.on('dispose', function () {\n _this6.off('webkitbeginfullscreen', beginFn);\n\n _this6.off('webkitendfullscreen', endFn);\n });\n }\n /**\n * Check if fullscreen is supported on the current playback device.\n *\n * @return {boolean}\n * - True if fullscreen is supported.\n * - False if fullscreen is not supported.\n */\n ;\n\n _proto.supportsFullScreen = function supportsFullScreen() {\n if (typeof this.el_.webkitEnterFullScreen === 'function') {\n var userAgent = window$1.navigator && window$1.navigator.userAgent || ''; // Seems to be broken in Chromium/Chrome && Safari in Leopard\n\n if (/Android/.test(userAgent) || !/Chrome|Mac OS X 10.5/.test(userAgent)) {\n return true;\n }\n }\n\n return false;\n }\n /**\n * Request that the `HTML5` Tech enter fullscreen.\n */\n ;\n\n _proto.enterFullScreen = function enterFullScreen() {\n var video = this.el_;\n\n if (video.paused && video.networkState <= video.HAVE_METADATA) {\n // attempt to prime the video element for programmatic access\n // this isn't necessary on the desktop but shouldn't hurt\n this.el_.play(); // playing and pausing synchronously during the transition to fullscreen\n // can get iOS ~6.1 devices into a play/pause loop\n\n this.setTimeout(function () {\n video.pause();\n video.webkitEnterFullScreen();\n }, 0);\n } else {\n video.webkitEnterFullScreen();\n }\n }\n /**\n * Request that the `HTML5` Tech exit fullscreen.\n */\n ;\n\n _proto.exitFullScreen = function exitFullScreen() {\n this.el_.webkitExitFullScreen();\n }\n /**\n * Create a floating video window always on top of other windows so that users may\n * continue consuming media while they interact with other content sites, or\n * applications on their device.\n *\n * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\n *\n * @return {Promise}\n * A promise with a Picture-in-Picture window.\n */\n ;\n\n _proto.requestPictureInPicture = function requestPictureInPicture() {\n return this.el_.requestPictureInPicture();\n }\n /**\n * A getter/setter for the `Html5` Tech's source object.\n * > Note: Please use {@link Html5#setSource}\n *\n * @param {Tech~SourceObject} [src]\n * The source object you want to set on the `HTML5` techs element.\n *\n * @return {Tech~SourceObject|undefined}\n * - The current source object when a source is not passed in.\n * - undefined when setting\n *\n * @deprecated Since version 5.\n */\n ;\n\n _proto.src = function src(_src) {\n if (_src === undefined) {\n return this.el_.src;\n } // Setting src through `src` instead of `setSrc` will be deprecated\n\n\n this.setSrc(_src);\n }\n /**\n * Reset the tech by removing all sources and then calling\n * {@link Html5.resetMediaElement}.\n */\n ;\n\n _proto.reset = function reset() {\n Html5.resetMediaElement(this.el_);\n }\n /**\n * Get the current source on the `HTML5` Tech. Falls back to returning the source from\n * the HTML5 media element.\n *\n * @return {Tech~SourceObject}\n * The current source object from the HTML5 tech. With a fallback to the\n * elements source.\n */\n ;\n\n _proto.currentSrc = function currentSrc() {\n if (this.currentSource_) {\n return this.currentSource_.src;\n }\n\n return this.el_.currentSrc;\n }\n /**\n * Set controls attribute for the HTML5 media Element.\n *\n * @param {string} val\n * Value to set the controls attribute to\n */\n ;\n\n _proto.setControls = function setControls(val) {\n this.el_.controls = !!val;\n }\n /**\n * Create and returns a remote {@link TextTrack} object.\n *\n * @param {string} kind\n * `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\n *\n * @param {string} [label]\n * Label to identify the text track\n *\n * @param {string} [language]\n * Two letter language abbreviation\n *\n * @return {TextTrack}\n * The TextTrack that gets created.\n */\n ;\n\n _proto.addTextTrack = function addTextTrack(kind, label, language) {\n if (!this.featuresNativeTextTracks) {\n return _Tech.prototype.addTextTrack.call(this, kind, label, language);\n }\n\n return this.el_.addTextTrack(kind, label, language);\n }\n /**\n * Creates either native TextTrack or an emulated TextTrack depending\n * on the value of `featuresNativeTextTracks`\n *\n * @param {Object} options\n * The object should contain the options to initialize the TextTrack with.\n *\n * @param {string} [options.kind]\n * `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata).\n *\n * @param {string} [options.label]\n * Label to identify the text track\n *\n * @param {string} [options.language]\n * Two letter language abbreviation.\n *\n * @param {boolean} [options.default]\n * Default this track to on.\n *\n * @param {string} [options.id]\n * The internal id to assign this track.\n *\n * @param {string} [options.src]\n * A source url for the track.\n *\n * @return {HTMLTrackElement}\n * The track element that gets created.\n */\n ;\n\n _proto.createRemoteTextTrack = function createRemoteTextTrack(options) {\n if (!this.featuresNativeTextTracks) {\n return _Tech.prototype.createRemoteTextTrack.call(this, options);\n }\n\n var htmlTrackElement = document.createElement('track');\n\n if (options.kind) {\n htmlTrackElement.kind = options.kind;\n }\n\n if (options.label) {\n htmlTrackElement.label = options.label;\n }\n\n if (options.language || options.srclang) {\n htmlTrackElement.srclang = options.language || options.srclang;\n }\n\n if (options[\"default\"]) {\n htmlTrackElement[\"default\"] = options[\"default\"];\n }\n\n if (options.id) {\n htmlTrackElement.id = options.id;\n }\n\n if (options.src) {\n htmlTrackElement.src = options.src;\n }\n\n return htmlTrackElement;\n }\n /**\n * Creates a remote text track object and returns an html track element.\n *\n * @param {Object} options The object should contain values for\n * kind, language, label, and src (location of the WebVTT file)\n * @param {boolean} [manualCleanup=true] if set to false, the TextTrack will be\n * automatically removed from the video element whenever the source changes\n * @return {HTMLTrackElement} An Html Track Element.\n * This can be an emulated {@link HTMLTrackElement} or a native one.\n * @deprecated The default value of the \"manualCleanup\" parameter will default\n * to \"false\" in upcoming versions of Video.js\n */\n ;\n\n _proto.addRemoteTextTrack = function addRemoteTextTrack(options, manualCleanup) {\n var htmlTrackElement = _Tech.prototype.addRemoteTextTrack.call(this, options, manualCleanup);\n\n if (this.featuresNativeTextTracks) {\n this.el().appendChild(htmlTrackElement);\n }\n\n return htmlTrackElement;\n }\n /**\n * Remove remote `TextTrack` from `TextTrackList` object\n *\n * @param {TextTrack} track\n * `TextTrack` object to remove\n */\n ;\n\n _proto.removeRemoteTextTrack = function removeRemoteTextTrack(track) {\n _Tech.prototype.removeRemoteTextTrack.call(this, track);\n\n if (this.featuresNativeTextTracks) {\n var tracks = this.$$('track');\n var i = tracks.length;\n\n while (i--) {\n if (track === tracks[i] || track === tracks[i].track) {\n this.el().removeChild(tracks[i]);\n }\n }\n }\n }\n /**\n * Gets available media playback quality metrics as specified by the W3C's Media\n * Playback Quality API.\n *\n * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\n *\n * @return {Object}\n * An object with supported media playback quality metrics\n */\n ;\n\n _proto.getVideoPlaybackQuality = function getVideoPlaybackQuality() {\n if (typeof this.el().getVideoPlaybackQuality === 'function') {\n return this.el().getVideoPlaybackQuality();\n }\n\n var videoPlaybackQuality = {};\n\n if (typeof this.el().webkitDroppedFrameCount !== 'undefined' && typeof this.el().webkitDecodedFrameCount !== 'undefined') {\n videoPlaybackQuality.droppedVideoFrames = this.el().webkitDroppedFrameCount;\n videoPlaybackQuality.totalVideoFrames = this.el().webkitDecodedFrameCount;\n }\n\n if (window$1.performance && typeof window$1.performance.now === 'function') {\n videoPlaybackQuality.creationTime = window$1.performance.now();\n } else if (window$1.performance && window$1.performance.timing && typeof window$1.performance.timing.navigationStart === 'number') {\n videoPlaybackQuality.creationTime = window$1.Date.now() - window$1.performance.timing.navigationStart;\n }\n\n return videoPlaybackQuality;\n };\n\n return Html5;\n}(Tech);\n/* HTML5 Support Testing ---------------------------------------------------- */\n\n\nif (isReal()) {\n /**\n * Element for testing browser HTML5 media capabilities\n *\n * @type {Element}\n * @constant\n * @private\n */\n Html5.TEST_VID = document.createElement('video');\n var track = document.createElement('track');\n track.kind = 'captions';\n track.srclang = 'en';\n track.label = 'English';\n Html5.TEST_VID.appendChild(track);\n}\n/**\n * Check if HTML5 media is supported by this browser/device.\n *\n * @return {boolean}\n * - True if HTML5 media is supported.\n * - False if HTML5 media is not supported.\n */\n\n\nHtml5.isSupported = function () {\n // IE with no Media Player is a LIAR! (#984)\n try {\n Html5.TEST_VID.volume = 0.5;\n } catch (e) {\n return false;\n }\n\n return !!(Html5.TEST_VID && Html5.TEST_VID.canPlayType);\n};\n/**\n * Check if the tech can support the given type\n *\n * @param {string} type\n * The mimetype to check\n * @return {string} 'probably', 'maybe', or '' (empty string)\n */\n\n\nHtml5.canPlayType = function (type) {\n return Html5.TEST_VID.canPlayType(type);\n};\n/**\n * Check if the tech can support the given source\n *\n * @param {Object} srcObj\n * The source object\n * @param {Object} options\n * The options passed to the tech\n * @return {string} 'probably', 'maybe', or '' (empty string)\n */\n\n\nHtml5.canPlaySource = function (srcObj, options) {\n return Html5.canPlayType(srcObj.type);\n};\n/**\n * Check if the volume can be changed in this browser/device.\n * Volume cannot be changed in a lot of mobile devices.\n * Specifically, it can't be changed from 1 on iOS.\n *\n * @return {boolean}\n * - True if volume can be controlled\n * - False otherwise\n */\n\n\nHtml5.canControlVolume = function () {\n // IE will error if Windows Media Player not installed #3315\n try {\n var volume = Html5.TEST_VID.volume;\n Html5.TEST_VID.volume = volume / 2 + 0.1;\n return volume !== Html5.TEST_VID.volume;\n } catch (e) {\n return false;\n }\n};\n/**\n * Check if the volume can be muted in this browser/device.\n * Some devices, e.g. iOS, don't allow changing volume\n * but permits muting/unmuting.\n *\n * @return {bolean}\n * - True if volume can be muted\n * - False otherwise\n */\n\n\nHtml5.canMuteVolume = function () {\n try {\n var muted = Html5.TEST_VID.muted; // in some versions of iOS muted property doesn't always\n // work, so we want to set both property and attribute\n\n Html5.TEST_VID.muted = !muted;\n\n if (Html5.TEST_VID.muted) {\n setAttribute(Html5.TEST_VID, 'muted', 'muted');\n } else {\n removeAttribute(Html5.TEST_VID, 'muted', 'muted');\n }\n\n return muted !== Html5.TEST_VID.muted;\n } catch (e) {\n return false;\n }\n};\n/**\n * Check if the playback rate can be changed in this browser/device.\n *\n * @return {boolean}\n * - True if playback rate can be controlled\n * - False otherwise\n */\n\n\nHtml5.canControlPlaybackRate = function () {\n // Playback rate API is implemented in Android Chrome, but doesn't do anything\n // https://github.com/videojs/video.js/issues/3180\n if (IS_ANDROID && IS_CHROME && CHROME_VERSION < 58) {\n return false;\n } // IE will error if Windows Media Player not installed #3315\n\n\n try {\n var playbackRate = Html5.TEST_VID.playbackRate;\n Html5.TEST_VID.playbackRate = playbackRate / 2 + 0.1;\n return playbackRate !== Html5.TEST_VID.playbackRate;\n } catch (e) {\n return false;\n }\n};\n/**\n * Check if we can override a video/audio elements attributes, with\n * Object.defineProperty.\n *\n * @return {boolean}\n * - True if builtin attributes can be overridden\n * - False otherwise\n */\n\n\nHtml5.canOverrideAttributes = function () {\n // if we cannot overwrite the src/innerHTML property, there is no support\n // iOS 7 safari for instance cannot do this.\n try {\n var noop = function noop() {};\n\n Object.defineProperty(document.createElement('video'), 'src', {\n get: noop,\n set: noop\n });\n Object.defineProperty(document.createElement('audio'), 'src', {\n get: noop,\n set: noop\n });\n Object.defineProperty(document.createElement('video'), 'innerHTML', {\n get: noop,\n set: noop\n });\n Object.defineProperty(document.createElement('audio'), 'innerHTML', {\n get: noop,\n set: noop\n });\n } catch (e) {\n return false;\n }\n\n return true;\n};\n/**\n * Check to see if native `TextTrack`s are supported by this browser/device.\n *\n * @return {boolean}\n * - True if native `TextTrack`s are supported.\n * - False otherwise\n */\n\n\nHtml5.supportsNativeTextTracks = function () {\n return IS_ANY_SAFARI || IS_IOS && IS_CHROME;\n};\n/**\n * Check to see if native `VideoTrack`s are supported by this browser/device\n *\n * @return {boolean}\n * - True if native `VideoTrack`s are supported.\n * - False otherwise\n */\n\n\nHtml5.supportsNativeVideoTracks = function () {\n return !!(Html5.TEST_VID && Html5.TEST_VID.videoTracks);\n};\n/**\n * Check to see if native `AudioTrack`s are supported by this browser/device\n *\n * @return {boolean}\n * - True if native `AudioTrack`s are supported.\n * - False otherwise\n */\n\n\nHtml5.supportsNativeAudioTracks = function () {\n return !!(Html5.TEST_VID && Html5.TEST_VID.audioTracks);\n};\n/**\n * An array of events available on the Html5 tech.\n *\n * @private\n * @type {Array}\n */\n\n\nHtml5.Events = ['loadstart', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'loadedmetadata', 'loadeddata', 'canplay', 'canplaythrough', 'playing', 'waiting', 'seeking', 'seeked', 'ended', 'durationchange', 'timeupdate', 'progress', 'play', 'pause', 'ratechange', 'resize', 'volumechange'];\n/**\n * Boolean indicating whether the `Tech` supports volume control.\n *\n * @type {boolean}\n * @default {@link Html5.canControlVolume}\n */\n\nHtml5.prototype.featuresVolumeControl = Html5.canControlVolume();\n/**\n * Boolean indicating whether the `Tech` supports muting volume.\n *\n * @type {bolean}\n * @default {@link Html5.canMuteVolume}\n */\n\nHtml5.prototype.featuresMuteControl = Html5.canMuteVolume();\n/**\n * Boolean indicating whether the `Tech` supports changing the speed at which the media\n * plays. Examples:\n * - Set player to play 2x (twice) as fast\n * - Set player to play 0.5x (half) as fast\n *\n * @type {boolean}\n * @default {@link Html5.canControlPlaybackRate}\n */\n\nHtml5.prototype.featuresPlaybackRate = Html5.canControlPlaybackRate();\n/**\n * Boolean indicating whether the `Tech` supports the `sourceset` event.\n *\n * @type {boolean}\n * @default\n */\n\nHtml5.prototype.featuresSourceset = Html5.canOverrideAttributes();\n/**\n * Boolean indicating whether the `HTML5` tech currently supports the media element\n * moving in the DOM. iOS breaks if you move the media element, so this is set this to\n * false there. Everywhere else this should be true.\n *\n * @type {boolean}\n * @default\n */\n\nHtml5.prototype.movingMediaElementInDOM = !IS_IOS; // TODO: Previous comment: No longer appears to be used. Can probably be removed.\n// Is this true?\n\n/**\n * Boolean indicating whether the `HTML5` tech currently supports automatic media resize\n * when going into fullscreen.\n *\n * @type {boolean}\n * @default\n */\n\nHtml5.prototype.featuresFullscreenResize = true;\n/**\n * Boolean indicating whether the `HTML5` tech currently supports the progress event.\n * If this is false, manual `progress` events will be triggered instead.\n *\n * @type {boolean}\n * @default\n */\n\nHtml5.prototype.featuresProgressEvents = true;\n/**\n * Boolean indicating whether the `HTML5` tech currently supports the timeupdate event.\n * If this is false, manual `timeupdate` events will be triggered instead.\n *\n * @default\n */\n\nHtml5.prototype.featuresTimeupdateEvents = true;\n/**\n * Boolean indicating whether the `HTML5` tech currently supports native `TextTrack`s.\n *\n * @type {boolean}\n * @default {@link Html5.supportsNativeTextTracks}\n */\n\nHtml5.prototype.featuresNativeTextTracks = Html5.supportsNativeTextTracks();\n/**\n * Boolean indicating whether the `HTML5` tech currently supports native `VideoTrack`s.\n *\n * @type {boolean}\n * @default {@link Html5.supportsNativeVideoTracks}\n */\n\nHtml5.prototype.featuresNativeVideoTracks = Html5.supportsNativeVideoTracks();\n/**\n * Boolean indicating whether the `HTML5` tech currently supports native `AudioTrack`s.\n *\n * @type {boolean}\n * @default {@link Html5.supportsNativeAudioTracks}\n */\n\nHtml5.prototype.featuresNativeAudioTracks = Html5.supportsNativeAudioTracks(); // HTML5 Feature detection and Device Fixes --------------------------------- //\n\nvar canPlayType = Html5.TEST_VID && Html5.TEST_VID.constructor.prototype.canPlayType;\nvar mpegurlRE = /^application\\/(?:x-|vnd\\.apple\\.)mpegurl/i;\n\nHtml5.patchCanPlayType = function () {\n // Android 4.0 and above can play HLS to some extent but it reports being unable to do so\n // Firefox and Chrome report correctly\n if (ANDROID_VERSION >= 4.0 && !IS_FIREFOX && !IS_CHROME) {\n Html5.TEST_VID.constructor.prototype.canPlayType = function (type) {\n if (type && mpegurlRE.test(type)) {\n return 'maybe';\n }\n\n return canPlayType.call(this, type);\n };\n }\n};\n\nHtml5.unpatchCanPlayType = function () {\n var r = Html5.TEST_VID.constructor.prototype.canPlayType;\n Html5.TEST_VID.constructor.prototype.canPlayType = canPlayType;\n return r;\n}; // by default, patch the media element\n\n\nHtml5.patchCanPlayType();\n\nHtml5.disposeMediaElement = function (el) {\n if (!el) {\n return;\n }\n\n if (el.parentNode) {\n el.parentNode.removeChild(el);\n } // remove any child track or source nodes to prevent their loading\n\n\n while (el.hasChildNodes()) {\n el.removeChild(el.firstChild);\n } // remove any src reference. not setting `src=''` because that causes a warning\n // in firefox\n\n\n el.removeAttribute('src'); // force the media element to update its loading state by calling load()\n // however IE on Windows 7N has a bug that throws an error so need a try/catch (#793)\n\n if (typeof el.load === 'function') {\n // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n (function () {\n try {\n el.load();\n } catch (e) {// not supported\n }\n })();\n }\n};\n\nHtml5.resetMediaElement = function (el) {\n if (!el) {\n return;\n }\n\n var sources = el.querySelectorAll('source');\n var i = sources.length;\n\n while (i--) {\n el.removeChild(sources[i]);\n } // remove any src reference.\n // not setting `src=''` because that throws an error\n\n\n el.removeAttribute('src');\n\n if (typeof el.load === 'function') {\n // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n (function () {\n try {\n el.load();\n } catch (e) {// satisfy linter\n }\n })();\n }\n};\n/* Native HTML5 element property wrapping ----------------------------------- */\n// Wrap native boolean attributes with getters that check both property and attribute\n// The list is as followed:\n// muted, defaultMuted, autoplay, controls, loop, playsinline\n\n\n[\n/**\n * Get the value of `muted` from the media element. `muted` indicates\n * that the volume for the media should be set to silent. This does not actually change\n * the `volume` attribute.\n *\n * @method Html5#muted\n * @return {boolean}\n * - True if the value of `volume` should be ignored and the audio set to silent.\n * - False if the value of `volume` should be used.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-muted}\n */\n'muted',\n/**\n * Get the value of `defaultMuted` from the media element. `defaultMuted` indicates\n * whether the media should start muted or not. Only changes the default state of the\n * media. `muted` and `defaultMuted` can have different values. {@link Html5#muted} indicates the\n * current state.\n *\n * @method Html5#defaultMuted\n * @return {boolean}\n * - The value of `defaultMuted` from the media element.\n * - True indicates that the media should start muted.\n * - False indicates that the media should not start muted\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultmuted}\n */\n'defaultMuted',\n/**\n * Get the value of `autoplay` from the media element. `autoplay` indicates\n * that the media should start to play as soon as the page is ready.\n *\n * @method Html5#autoplay\n * @return {boolean}\n * - The value of `autoplay` from the media element.\n * - True indicates that the media should start as soon as the page loads.\n * - False indicates that the media should not start as soon as the page loads.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-autoplay}\n */\n'autoplay',\n/**\n * Get the value of `controls` from the media element. `controls` indicates\n * whether the native media controls should be shown or hidden.\n *\n * @method Html5#controls\n * @return {boolean}\n * - The value of `controls` from the media element.\n * - True indicates that native controls should be showing.\n * - False indicates that native controls should be hidden.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-controls}\n */\n'controls',\n/**\n * Get the value of `loop` from the media element. `loop` indicates\n * that the media should return to the start of the media and continue playing once\n * it reaches the end.\n *\n * @method Html5#loop\n * @return {boolean}\n * - The value of `loop` from the media element.\n * - True indicates that playback should seek back to start once\n * the end of a media is reached.\n * - False indicates that playback should not loop back to the start when the\n * end of the media is reached.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-loop}\n */\n'loop',\n/**\n * Get the value of `playsinline` from the media element. `playsinline` indicates\n * to the browser that non-fullscreen playback is preferred when fullscreen\n * playback is the native default, such as in iOS Safari.\n *\n * @method Html5#playsinline\n * @return {boolean}\n * - The value of `playsinline` from the media element.\n * - True indicates that the media should play inline.\n * - False indicates that the media should not play inline.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\n */\n'playsinline'].forEach(function (prop) {\n Html5.prototype[prop] = function () {\n return this.el_[prop] || this.el_.hasAttribute(prop);\n };\n}); // Wrap native boolean attributes with setters that set both property and attribute\n// The list is as followed:\n// setMuted, setDefaultMuted, setAutoplay, setLoop, setPlaysinline\n// setControls is special-cased above\n\n[\n/**\n * Set the value of `muted` on the media element. `muted` indicates that the current\n * audio level should be silent.\n *\n * @method Html5#setMuted\n * @param {boolean} muted\n * - True if the audio should be set to silent\n * - False otherwise\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-muted}\n */\n'muted',\n/**\n * Set the value of `defaultMuted` on the media element. `defaultMuted` indicates that the current\n * audio level should be silent, but will only effect the muted level on intial playback..\n *\n * @method Html5.prototype.setDefaultMuted\n * @param {boolean} defaultMuted\n * - True if the audio should be set to silent\n * - False otherwise\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultmuted}\n */\n'defaultMuted',\n/**\n * Set the value of `autoplay` on the media element. `autoplay` indicates\n * that the media should start to play as soon as the page is ready.\n *\n * @method Html5#setAutoplay\n * @param {boolean} autoplay\n * - True indicates that the media should start as soon as the page loads.\n * - False indicates that the media should not start as soon as the page loads.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-autoplay}\n */\n'autoplay',\n/**\n * Set the value of `loop` on the media element. `loop` indicates\n * that the media should return to the start of the media and continue playing once\n * it reaches the end.\n *\n * @method Html5#setLoop\n * @param {boolean} loop\n * - True indicates that playback should seek back to start once\n * the end of a media is reached.\n * - False indicates that playback should not loop back to the start when the\n * end of the media is reached.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-loop}\n */\n'loop',\n/**\n * Set the value of `playsinline` from the media element. `playsinline` indicates\n * to the browser that non-fullscreen playback is preferred when fullscreen\n * playback is the native default, such as in iOS Safari.\n *\n * @method Html5#setPlaysinline\n * @param {boolean} playsinline\n * - True indicates that the media should play inline.\n * - False indicates that the media should not play inline.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\n */\n'playsinline'].forEach(function (prop) {\n Html5.prototype['set' + toTitleCase(prop)] = function (v) {\n this.el_[prop] = v;\n\n if (v) {\n this.el_.setAttribute(prop, prop);\n } else {\n this.el_.removeAttribute(prop);\n }\n };\n}); // Wrap native properties with a getter\n// The list is as followed\n// paused, currentTime, buffered, volume, poster, preload, error, seeking\n// seekable, ended, playbackRate, defaultPlaybackRate, played, networkState\n// readyState, videoWidth, videoHeight\n\n[\n/**\n * Get the value of `paused` from the media element. `paused` indicates whether the media element\n * is currently paused or not.\n *\n * @method Html5#paused\n * @return {boolean}\n * The value of `paused` from the media element.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-paused}\n */\n'paused',\n/**\n * Get the value of `currentTime` from the media element. `currentTime` indicates\n * the current second that the media is at in playback.\n *\n * @method Html5#currentTime\n * @return {number}\n * The value of `currentTime` from the media element.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-currenttime}\n */\n'currentTime',\n/**\n * Get the value of `buffered` from the media element. `buffered` is a `TimeRange`\n * object that represents the parts of the media that are already downloaded and\n * available for playback.\n *\n * @method Html5#buffered\n * @return {TimeRange}\n * The value of `buffered` from the media element.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-buffered}\n */\n'buffered',\n/**\n * Get the value of `volume` from the media element. `volume` indicates\n * the current playback volume of audio for a media. `volume` will be a value from 0\n * (silent) to 1 (loudest and default).\n *\n * @method Html5#volume\n * @return {number}\n * The value of `volume` from the media element. Value will be between 0-1.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-a-volume}\n */\n'volume',\n/**\n * Get the value of `poster` from the media element. `poster` indicates\n * that the url of an image file that can/will be shown when no media data is available.\n *\n * @method Html5#poster\n * @return {string}\n * The value of `poster` from the media element. Value will be a url to an\n * image.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-video-poster}\n */\n'poster',\n/**\n * Get the value of `preload` from the media element. `preload` indicates\n * what should download before the media is interacted with. It can have the following\n * values:\n * - none: nothing should be downloaded\n * - metadata: poster and the first few frames of the media may be downloaded to get\n * media dimensions and other metadata\n * - auto: allow the media and metadata for the media to be downloaded before\n * interaction\n *\n * @method Html5#preload\n * @return {string}\n * The value of `preload` from the media element. Will be 'none', 'metadata',\n * or 'auto'.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-preload}\n */\n'preload',\n/**\n * Get the value of the `error` from the media element. `error` indicates any\n * MediaError that may have occurred during playback. If error returns null there is no\n * current error.\n *\n * @method Html5#error\n * @return {MediaError|null}\n * The value of `error` from the media element. Will be `MediaError` if there\n * is a current error and null otherwise.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-error}\n */\n'error',\n/**\n * Get the value of `seeking` from the media element. `seeking` indicates whether the\n * media is currently seeking to a new position or not.\n *\n * @method Html5#seeking\n * @return {boolean}\n * - The value of `seeking` from the media element.\n * - True indicates that the media is currently seeking to a new position.\n * - False indicates that the media is not seeking to a new position at this time.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seeking}\n */\n'seeking',\n/**\n * Get the value of `seekable` from the media element. `seekable` returns a\n * `TimeRange` object indicating ranges of time that can currently be `seeked` to.\n *\n * @method Html5#seekable\n * @return {TimeRange}\n * The value of `seekable` from the media element. A `TimeRange` object\n * indicating the current ranges of time that can be seeked to.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seekable}\n */\n'seekable',\n/**\n * Get the value of `ended` from the media element. `ended` indicates whether\n * the media has reached the end or not.\n *\n * @method Html5#ended\n * @return {boolean}\n * - The value of `ended` from the media element.\n * - True indicates that the media has ended.\n * - False indicates that the media has not ended.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-ended}\n */\n'ended',\n/**\n * Get the value of `playbackRate` from the media element. `playbackRate` indicates\n * the rate at which the media is currently playing back. Examples:\n * - if playbackRate is set to 2, media will play twice as fast.\n * - if playbackRate is set to 0.5, media will play half as fast.\n *\n * @method Html5#playbackRate\n * @return {number}\n * The value of `playbackRate` from the media element. A number indicating\n * the current playback speed of the media, where 1 is normal speed.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\n */\n'playbackRate',\n/**\n * Get the value of `defaultPlaybackRate` from the media element. `defaultPlaybackRate` indicates\n * the rate at which the media is currently playing back. This value will not indicate the current\n * `playbackRate` after playback has started, use {@link Html5#playbackRate} for that.\n *\n * Examples:\n * - if defaultPlaybackRate is set to 2, media will play twice as fast.\n * - if defaultPlaybackRate is set to 0.5, media will play half as fast.\n *\n * @method Html5.prototype.defaultPlaybackRate\n * @return {number}\n * The value of `defaultPlaybackRate` from the media element. A number indicating\n * the current playback speed of the media, where 1 is normal speed.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\n */\n'defaultPlaybackRate',\n/**\n * Get the value of `played` from the media element. `played` returns a `TimeRange`\n * object representing points in the media timeline that have been played.\n *\n * @method Html5#played\n * @return {TimeRange}\n * The value of `played` from the media element. A `TimeRange` object indicating\n * the ranges of time that have been played.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-played}\n */\n'played',\n/**\n * Get the value of `networkState` from the media element. `networkState` indicates\n * the current network state. It returns an enumeration from the following list:\n * - 0: NETWORK_EMPTY\n * - 1: NETWORK_IDLE\n * - 2: NETWORK_LOADING\n * - 3: NETWORK_NO_SOURCE\n *\n * @method Html5#networkState\n * @return {number}\n * The value of `networkState` from the media element. This will be a number\n * from the list in the description.\n *\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-networkstate}\n */\n'networkState',\n/**\n * Get the value of `readyState` from the media element. `readyState` indicates\n * the current state of the media element. It returns an enumeration from the\n * following list:\n * - 0: HAVE_NOTHING\n * - 1: HAVE_METADATA\n * - 2: HAVE_CURRENT_DATA\n * - 3: HAVE_FUTURE_DATA\n * - 4: HAVE_ENOUGH_DATA\n *\n * @method Html5#readyState\n * @return {number}\n * The value of `readyState` from the media element. This will be a number\n * from the list in the description.\n *\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#ready-states}\n */\n'readyState',\n/**\n * Get the value of `videoWidth` from the video element. `videoWidth` indicates\n * the current width of the video in css pixels.\n *\n * @method Html5#videoWidth\n * @return {number}\n * The value of `videoWidth` from the video element. This will be a number\n * in css pixels.\n *\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth}\n */\n'videoWidth',\n/**\n * Get the value of `videoHeight` from the video element. `videoHeight` indicates\n * the current height of the video in css pixels.\n *\n * @method Html5#videoHeight\n * @return {number}\n * The value of `videoHeight` from the video element. This will be a number\n * in css pixels.\n *\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth}\n */\n'videoHeight'].forEach(function (prop) {\n Html5.prototype[prop] = function () {\n return this.el_[prop];\n };\n}); // Wrap native properties with a setter in this format:\n// set + toTitleCase(name)\n// The list is as follows:\n// setVolume, setSrc, setPoster, setPreload, setPlaybackRate, setDefaultPlaybackRate\n\n[\n/**\n * Set the value of `volume` on the media element. `volume` indicates the current\n * audio level as a percentage in decimal form. This means that 1 is 100%, 0.5 is 50%, and\n * so on.\n *\n * @method Html5#setVolume\n * @param {number} percentAsDecimal\n * The volume percent as a decimal. Valid range is from 0-1.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-a-volume}\n */\n'volume',\n/**\n * Set the value of `src` on the media element. `src` indicates the current\n * {@link Tech~SourceObject} for the media.\n *\n * @method Html5#setSrc\n * @param {Tech~SourceObject} src\n * The source object to set as the current source.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-src}\n */\n'src',\n/**\n * Set the value of `poster` on the media element. `poster` is the url to\n * an image file that can/will be shown when no media data is available.\n *\n * @method Html5#setPoster\n * @param {string} poster\n * The url to an image that should be used as the `poster` for the media\n * element.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-poster}\n */\n'poster',\n/**\n * Set the value of `preload` on the media element. `preload` indicates\n * what should download before the media is interacted with. It can have the following\n * values:\n * - none: nothing should be downloaded\n * - metadata: poster and the first few frames of the media may be downloaded to get\n * media dimensions and other metadata\n * - auto: allow the media and metadata for the media to be downloaded before\n * interaction\n *\n * @method Html5#setPreload\n * @param {string} preload\n * The value of `preload` to set on the media element. Must be 'none', 'metadata',\n * or 'auto'.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-preload}\n */\n'preload',\n/**\n * Set the value of `playbackRate` on the media element. `playbackRate` indicates\n * the rate at which the media should play back. Examples:\n * - if playbackRate is set to 2, media will play twice as fast.\n * - if playbackRate is set to 0.5, media will play half as fast.\n *\n * @method Html5#setPlaybackRate\n * @return {number}\n * The value of `playbackRate` from the media element. A number indicating\n * the current playback speed of the media, where 1 is normal speed.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\n */\n'playbackRate',\n/**\n * Set the value of `defaultPlaybackRate` on the media element. `defaultPlaybackRate` indicates\n * the rate at which the media should play back upon initial startup. Changing this value\n * after a video has started will do nothing. Instead you should used {@link Html5#setPlaybackRate}.\n *\n * Example Values:\n * - if playbackRate is set to 2, media will play twice as fast.\n * - if playbackRate is set to 0.5, media will play half as fast.\n *\n * @method Html5.prototype.setDefaultPlaybackRate\n * @return {number}\n * The value of `defaultPlaybackRate` from the media element. A number indicating\n * the current playback speed of the media, where 1 is normal speed.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultplaybackrate}\n */\n'defaultPlaybackRate'].forEach(function (prop) {\n Html5.prototype['set' + toTitleCase(prop)] = function (v) {\n this.el_[prop] = v;\n };\n}); // wrap native functions with a function\n// The list is as follows:\n// pause, load, play\n\n[\n/**\n * A wrapper around the media elements `pause` function. This will call the `HTML5`\n * media elements `pause` function.\n *\n * @method Html5#pause\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-pause}\n */\n'pause',\n/**\n * A wrapper around the media elements `load` function. This will call the `HTML5`s\n * media element `load` function.\n *\n * @method Html5#load\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-load}\n */\n'load',\n/**\n * A wrapper around the media elements `play` function. This will call the `HTML5`s\n * media element `play` function.\n *\n * @method Html5#play\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-play}\n */\n'play'].forEach(function (prop) {\n Html5.prototype[prop] = function () {\n return this.el_[prop]();\n };\n});\nTech.withSourceHandlers(Html5);\n/**\n * Native source handler for Html5, simply passes the source to the media element.\n *\n * @property {Tech~SourceObject} source\n * The source object\n *\n * @property {Html5} tech\n * The instance of the HTML5 tech.\n */\n\nHtml5.nativeSourceHandler = {};\n/**\n * Check if the media element can play the given mime type.\n *\n * @param {string} type\n * The mimetype to check\n *\n * @return {string}\n * 'probably', 'maybe', or '' (empty string)\n */\n\nHtml5.nativeSourceHandler.canPlayType = function (type) {\n // IE without MediaPlayer throws an error (#519)\n try {\n return Html5.TEST_VID.canPlayType(type);\n } catch (e) {\n return '';\n }\n};\n/**\n * Check if the media element can handle a source natively.\n *\n * @param {Tech~SourceObject} source\n * The source object\n *\n * @param {Object} [options]\n * Options to be passed to the tech.\n *\n * @return {string}\n * 'probably', 'maybe', or '' (empty string).\n */\n\n\nHtml5.nativeSourceHandler.canHandleSource = function (source, options) {\n // If a type was provided we should rely on that\n if (source.type) {\n return Html5.nativeSourceHandler.canPlayType(source.type); // If no type, fall back to checking 'video/[EXTENSION]'\n } else if (source.src) {\n var ext = getFileExtension(source.src);\n return Html5.nativeSourceHandler.canPlayType(\"video/\" + ext);\n }\n\n return '';\n};\n/**\n * Pass the source to the native media element.\n *\n * @param {Tech~SourceObject} source\n * The source object\n *\n * @param {Html5} tech\n * The instance of the Html5 tech\n *\n * @param {Object} [options]\n * The options to pass to the source\n */\n\n\nHtml5.nativeSourceHandler.handleSource = function (source, tech, options) {\n tech.setSrc(source.src);\n};\n/**\n * A noop for the native dispose function, as cleanup is not needed.\n */\n\n\nHtml5.nativeSourceHandler.dispose = function () {}; // Register the native source handler\n\n\nHtml5.registerSourceHandler(Html5.nativeSourceHandler);\nTech.registerTech('Html5', Html5); // on the player when they happen\n\nvar TECH_EVENTS_RETRIGGER = [\n/**\n * Fired while the user agent is downloading media data.\n *\n * @event Player#progress\n * @type {EventTarget~Event}\n */\n\n/**\n * Retrigger the `progress` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechProgress_\n * @fires Player#progress\n * @listens Tech#progress\n */\n'progress',\n/**\n * Fires when the loading of an audio/video is aborted.\n *\n * @event Player#abort\n * @type {EventTarget~Event}\n */\n\n/**\n * Retrigger the `abort` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechAbort_\n * @fires Player#abort\n * @listens Tech#abort\n */\n'abort',\n/**\n * Fires when the browser is intentionally not getting media data.\n *\n * @event Player#suspend\n * @type {EventTarget~Event}\n */\n\n/**\n * Retrigger the `suspend` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechSuspend_\n * @fires Player#suspend\n * @listens Tech#suspend\n */\n'suspend',\n/**\n * Fires when the current playlist is empty.\n *\n * @event Player#emptied\n * @type {EventTarget~Event}\n */\n\n/**\n * Retrigger the `emptied` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechEmptied_\n * @fires Player#emptied\n * @listens Tech#emptied\n */\n'emptied',\n/**\n * Fires when the browser is trying to get media data, but data is not available.\n *\n * @event Player#stalled\n * @type {EventTarget~Event}\n */\n\n/**\n * Retrigger the `stalled` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechStalled_\n * @fires Player#stalled\n * @listens Tech#stalled\n */\n'stalled',\n/**\n * Fires when the browser has loaded meta data for the audio/video.\n *\n * @event Player#loadedmetadata\n * @type {EventTarget~Event}\n */\n\n/**\n * Retrigger the `stalled` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechLoadedmetadata_\n * @fires Player#loadedmetadata\n * @listens Tech#loadedmetadata\n */\n'loadedmetadata',\n/**\n * Fires when the browser has loaded the current frame of the audio/video.\n *\n * @event Player#loadeddata\n * @type {event}\n */\n\n/**\n * Retrigger the `loadeddata` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechLoaddeddata_\n * @fires Player#loadeddata\n * @listens Tech#loadeddata\n */\n'loadeddata',\n/**\n * Fires when the current playback position has changed.\n *\n * @event Player#timeupdate\n * @type {event}\n */\n\n/**\n * Retrigger the `timeupdate` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechTimeUpdate_\n * @fires Player#timeupdate\n * @listens Tech#timeupdate\n */\n'timeupdate',\n/**\n * Fires when the video's intrinsic dimensions change\n *\n * @event Player#resize\n * @type {event}\n */\n\n/**\n * Retrigger the `resize` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechResize_\n * @fires Player#resize\n * @listens Tech#resize\n */\n'resize',\n/**\n * Fires when the volume has been changed\n *\n * @event Player#volumechange\n * @type {event}\n */\n\n/**\n * Retrigger the `volumechange` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechVolumechange_\n * @fires Player#volumechange\n * @listens Tech#volumechange\n */\n'volumechange',\n/**\n * Fires when the text track has been changed\n *\n * @event Player#texttrackchange\n * @type {event}\n */\n\n/**\n * Retrigger the `texttrackchange` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechTexttrackchange_\n * @fires Player#texttrackchange\n * @listens Tech#texttrackchange\n */\n'texttrackchange']; // events to queue when playback rate is zero\n// this is a hash for the sole purpose of mapping non-camel-cased event names\n// to camel-cased function names\n\nvar TECH_EVENTS_QUEUE = {\n canplay: 'CanPlay',\n canplaythrough: 'CanPlayThrough',\n playing: 'Playing',\n seeked: 'Seeked'\n};\nvar BREAKPOINT_ORDER = ['tiny', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'huge'];\nvar BREAKPOINT_CLASSES = {}; // grep: vjs-layout-tiny\n// grep: vjs-layout-x-small\n// grep: vjs-layout-small\n// grep: vjs-layout-medium\n// grep: vjs-layout-large\n// grep: vjs-layout-x-large\n// grep: vjs-layout-huge\n\nBREAKPOINT_ORDER.forEach(function (k) {\n var v = k.charAt(0) === 'x' ? \"x-\" + k.substring(1) : k;\n BREAKPOINT_CLASSES[k] = \"vjs-layout-\" + v;\n});\nvar DEFAULT_BREAKPOINTS = {\n tiny: 210,\n xsmall: 320,\n small: 425,\n medium: 768,\n large: 1440,\n xlarge: 2560,\n huge: Infinity\n};\n/**\n * An instance of the `Player` class is created when any of the Video.js setup methods\n * are used to initialize a video.\n *\n * After an instance has been created it can be accessed globally in two ways:\n * 1. By calling `videojs('example_video_1');`\n * 2. By using it directly via `videojs.players.example_video_1;`\n *\n * @extends Component\n */\n\nvar Player =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(Player, _Component);\n /**\n * Create an instance of this class.\n *\n * @param {Element} tag\n * The original video DOM element used for configuring options.\n *\n * @param {Object} [options]\n * Object of option names and values.\n *\n * @param {Component~ReadyCallback} [ready]\n * Ready callback function.\n */\n\n\n function Player(tag, options, ready) {\n var _this; // Make sure tag ID exists\n\n\n tag.id = tag.id || options.id || \"vjs_video_\" + newGUID(); // Set Options\n // The options argument overrides options set in the video tag\n // which overrides globally set options.\n // This latter part coincides with the load order\n // (tag must exist before Player)\n\n options = assign(Player.getTagSettings(tag), options); // Delay the initialization of children because we need to set up\n // player properties first, and can't use `this` before `super()`\n\n options.initChildren = false; // Same with creating the element\n\n options.createEl = false; // don't auto mixin the evented mixin\n\n options.evented = false; // we don't want the player to report touch activity on itself\n // see enableTouchActivity in Component\n\n options.reportTouchActivity = false; // If language is not set, get the closest lang attribute\n\n if (!options.language) {\n if (typeof tag.closest === 'function') {\n var closest = tag.closest('[lang]');\n\n if (closest && closest.getAttribute) {\n options.language = closest.getAttribute('lang');\n }\n } else {\n var element = tag;\n\n while (element && element.nodeType === 1) {\n if (getAttributes(element).hasOwnProperty('lang')) {\n options.language = element.getAttribute('lang');\n break;\n }\n\n element = element.parentNode;\n }\n }\n } // Run base component initializing with new options\n\n\n _this = _Component.call(this, null, options, ready) || this; // Create bound methods for document listeners.\n\n _this.boundDocumentFullscreenChange_ = bind(_assertThisInitialized(_this), _this.documentFullscreenChange_);\n _this.boundFullWindowOnEscKey_ = bind(_assertThisInitialized(_this), _this.fullWindowOnEscKey); // create logger\n\n _this.log = createLogger$1(_this.id_); // Hold our own reference to fullscreen api so it can be mocked in tests\n\n _this.fsApi_ = FullscreenApi; // Tracks when a tech changes the poster\n\n _this.isPosterFromTech_ = false; // Holds callback info that gets queued when playback rate is zero\n // and a seek is happening\n\n _this.queuedCallbacks_ = []; // Turn off API access because we're loading a new tech that might load asynchronously\n\n _this.isReady_ = false; // Init state hasStarted_\n\n _this.hasStarted_ = false; // Init state userActive_\n\n _this.userActive_ = false; // if the global option object was accidentally blown away by\n // someone, bail early with an informative error\n\n if (!_this.options_ || !_this.options_.techOrder || !_this.options_.techOrder.length) {\n throw new Error('No techOrder specified. Did you overwrite ' + 'videojs.options instead of just changing the ' + 'properties you want to override?');\n } // Store the original tag used to set options\n\n\n _this.tag = tag; // Store the tag attributes used to restore html5 element\n\n _this.tagAttributes = tag && getAttributes(tag); // Update current language\n\n _this.language(_this.options_.language); // Update Supported Languages\n\n\n if (options.languages) {\n // Normalise player option languages to lowercase\n var languagesToLower = {};\n Object.getOwnPropertyNames(options.languages).forEach(function (name) {\n languagesToLower[name.toLowerCase()] = options.languages[name];\n });\n _this.languages_ = languagesToLower;\n } else {\n _this.languages_ = Player.prototype.options_.languages;\n }\n\n _this.resetCache_(); // Set poster\n\n\n _this.poster_ = options.poster || ''; // Set controls\n\n _this.controls_ = !!options.controls; // Original tag settings stored in options\n // now remove immediately so native controls don't flash.\n // May be turned back on by HTML5 tech if nativeControlsForTouch is true\n\n tag.controls = false;\n tag.removeAttribute('controls');\n _this.changingSrc_ = false;\n _this.playCallbacks_ = [];\n _this.playTerminatedQueue_ = []; // the attribute overrides the option\n\n if (tag.hasAttribute('autoplay')) {\n _this.autoplay(true);\n } else {\n // otherwise use the setter to validate and\n // set the correct value.\n _this.autoplay(_this.options_.autoplay);\n } // check plugins\n\n\n if (options.plugins) {\n Object.keys(options.plugins).forEach(function (name) {\n if (typeof _this[name] !== 'function') {\n throw new Error(\"plugin \\\"\" + name + \"\\\" does not exist\");\n }\n });\n }\n /*\n * Store the internal state of scrubbing\n *\n * @private\n * @return {Boolean} True if the user is scrubbing\n */\n\n\n _this.scrubbing_ = false;\n _this.el_ = _this.createEl(); // Make this an evented object and use `el_` as its event bus.\n\n evented(_assertThisInitialized(_this), {\n eventBusKey: 'el_'\n });\n\n if (_this.fluid_) {\n _this.on('playerreset', _this.updateStyleEl_);\n } // We also want to pass the original player options to each component and plugin\n // as well so they don't need to reach back into the player for options later.\n // We also need to do another copy of this.options_ so we don't end up with\n // an infinite loop.\n\n\n var playerOptionsCopy = mergeOptions(_this.options_); // Load plugins\n\n if (options.plugins) {\n Object.keys(options.plugins).forEach(function (name) {\n _this[name](options.plugins[name]);\n });\n }\n\n _this.options_.playerOptions = playerOptionsCopy;\n _this.middleware_ = [];\n\n _this.initChildren(); // Set isAudio based on whether or not an audio tag was used\n\n\n _this.isAudio(tag.nodeName.toLowerCase() === 'audio'); // Update controls className. Can't do this when the controls are initially\n // set because the element doesn't exist yet.\n\n\n if (_this.controls()) {\n _this.addClass('vjs-controls-enabled');\n } else {\n _this.addClass('vjs-controls-disabled');\n } // Set ARIA label and region role depending on player type\n\n\n _this.el_.setAttribute('role', 'region');\n\n if (_this.isAudio()) {\n _this.el_.setAttribute('aria-label', _this.localize('Audio Player'));\n } else {\n _this.el_.setAttribute('aria-label', _this.localize('Video Player'));\n }\n\n if (_this.isAudio()) {\n _this.addClass('vjs-audio');\n }\n\n if (_this.flexNotSupported_()) {\n _this.addClass('vjs-no-flex');\n } // TODO: Make this smarter. Toggle user state between touching/mousing\n // using events, since devices can have both touch and mouse events.\n // TODO: Make this check be performed again when the window switches between monitors\n // (See https://github.com/videojs/video.js/issues/5683)\n\n\n if (TOUCH_ENABLED) {\n _this.addClass('vjs-touch-enabled');\n } // iOS Safari has broken hover handling\n\n\n if (!IS_IOS) {\n _this.addClass('vjs-workinghover');\n } // Make player easily findable by ID\n\n\n Player.players[_this.id_] = _assertThisInitialized(_this); // Add a major version class to aid css in plugins\n\n var majorVersion = version.split('.')[0];\n\n _this.addClass(\"vjs-v\" + majorVersion); // When the player is first initialized, trigger activity so components\n // like the control bar show themselves if needed\n\n\n _this.userActive(true);\n\n _this.reportUserActivity();\n\n _this.one('play', _this.listenForUserActivity_);\n\n _this.on('stageclick', _this.handleStageClick_);\n\n _this.on('keydown', _this.handleKeyDown);\n\n _this.breakpoints(_this.options_.breakpoints);\n\n _this.responsive(_this.options_.responsive);\n\n return _this;\n }\n /**\n * Destroys the video player and does any necessary cleanup.\n *\n * This is especially helpful if you are dynamically adding and removing videos\n * to/from the DOM.\n *\n * @fires Player#dispose\n */\n\n\n var _proto = Player.prototype;\n\n _proto.dispose = function dispose() {\n var _this2 = this;\n /**\n * Called when the player is being disposed of.\n *\n * @event Player#dispose\n * @type {EventTarget~Event}\n */\n\n\n this.trigger('dispose'); // prevent dispose from being called twice\n\n this.off('dispose'); // Make sure all player-specific document listeners are unbound. This is\n\n off(document, this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_);\n off(document, 'keydown', this.boundFullWindowOnEscKey_);\n\n if (this.styleEl_ && this.styleEl_.parentNode) {\n this.styleEl_.parentNode.removeChild(this.styleEl_);\n this.styleEl_ = null;\n } // Kill reference to this player\n\n\n Player.players[this.id_] = null;\n\n if (this.tag && this.tag.player) {\n this.tag.player = null;\n }\n\n if (this.el_ && this.el_.player) {\n this.el_.player = null;\n }\n\n if (this.tech_) {\n this.tech_.dispose();\n this.isPosterFromTech_ = false;\n this.poster_ = '';\n }\n\n if (this.playerElIngest_) {\n this.playerElIngest_ = null;\n }\n\n if (this.tag) {\n this.tag = null;\n }\n\n clearCacheForPlayer(this); // remove all event handlers for track lists\n // all tracks and track listeners are removed on\n // tech dispose\n\n ALL.names.forEach(function (name) {\n var props = ALL[name];\n\n var list = _this2[props.getterName](); // if it is not a native list\n // we have to manually remove event listeners\n\n\n if (list && list.off) {\n list.off();\n }\n }); // the actual .el_ is removed here\n\n _Component.prototype.dispose.call(this);\n }\n /**\n * Create the `Player`'s DOM element.\n *\n * @return {Element}\n * The DOM element that gets created.\n */\n ;\n\n _proto.createEl = function createEl() {\n var tag = this.tag;\n var el;\n var playerElIngest = this.playerElIngest_ = tag.parentNode && tag.parentNode.hasAttribute && tag.parentNode.hasAttribute('data-vjs-player');\n var divEmbed = this.tag.tagName.toLowerCase() === 'video-js';\n\n if (playerElIngest) {\n el = this.el_ = tag.parentNode;\n } else if (!divEmbed) {\n el = this.el_ = _Component.prototype.createEl.call(this, 'div');\n } // Copy over all the attributes from the tag, including ID and class\n // ID will now reference player box, not the video tag\n\n\n var attrs = getAttributes(tag);\n\n if (divEmbed) {\n el = this.el_ = tag;\n tag = this.tag = document.createElement('video');\n\n while (el.children.length) {\n tag.appendChild(el.firstChild);\n }\n\n if (!hasClass(el, 'video-js')) {\n addClass(el, 'video-js');\n }\n\n el.appendChild(tag);\n playerElIngest = this.playerElIngest_ = el; // move properties over from our custom `video-js` element\n // to our new `video` element. This will move things like\n // `src` or `controls` that were set via js before the player\n // was initialized.\n\n Object.keys(el).forEach(function (k) {\n tag[k] = el[k];\n });\n } // set tabindex to -1 to remove the video element from the focus order\n\n\n tag.setAttribute('tabindex', '-1');\n attrs.tabindex = '-1'; // Workaround for #4583 (JAWS+IE doesn't announce BPB or play button), and\n // for the same issue with Chrome (on Windows) with JAWS.\n // See https://github.com/FreedomScientific/VFO-standards-support/issues/78\n // Note that we can't detect if JAWS is being used, but this ARIA attribute\n // doesn't change behavior of IE11 or Chrome if JAWS is not being used\n\n if (IE_VERSION || IS_CHROME && IS_WINDOWS) {\n tag.setAttribute('role', 'application');\n attrs.role = 'application';\n } // Remove width/height attrs from tag so CSS can make it 100% width/height\n\n\n tag.removeAttribute('width');\n tag.removeAttribute('height');\n\n if ('width' in attrs) {\n delete attrs.width;\n }\n\n if ('height' in attrs) {\n delete attrs.height;\n }\n\n Object.getOwnPropertyNames(attrs).forEach(function (attr) {\n // don't copy over the class attribute to the player element when we're in a div embed\n // the class is already set up properly in the divEmbed case\n // and we want to make sure that the `video-js` class doesn't get lost\n if (!(divEmbed && attr === 'class')) {\n el.setAttribute(attr, attrs[attr]);\n }\n\n if (divEmbed) {\n tag.setAttribute(attr, attrs[attr]);\n }\n }); // Update tag id/class for use as HTML5 playback tech\n // Might think we should do this after embedding in container so .vjs-tech class\n // doesn't flash 100% width/height, but class only applies with .video-js parent\n\n tag.playerId = tag.id;\n tag.id += '_html5_api';\n tag.className = 'vjs-tech'; // Make player findable on elements\n\n tag.player = el.player = this; // Default state of video is paused\n\n this.addClass('vjs-paused'); // Add a style element in the player that we'll use to set the width/height\n // of the player in a way that's still overrideable by CSS, just like the\n // video element\n\n if (window$1.VIDEOJS_NO_DYNAMIC_STYLE !== true) {\n this.styleEl_ = createStyleElement('vjs-styles-dimensions');\n var defaultsStyleEl = $('.vjs-styles-defaults');\n var head = $('head');\n head.insertBefore(this.styleEl_, defaultsStyleEl ? defaultsStyleEl.nextSibling : head.firstChild);\n }\n\n this.fill_ = false;\n this.fluid_ = false; // Pass in the width/height/aspectRatio options which will update the style el\n\n this.width(this.options_.width);\n this.height(this.options_.height);\n this.fill(this.options_.fill);\n this.fluid(this.options_.fluid);\n this.aspectRatio(this.options_.aspectRatio); // Hide any links within the video/audio tag,\n // because IE doesn't hide them completely from screen readers.\n\n var links = tag.getElementsByTagName('a');\n\n for (var i = 0; i < links.length; i++) {\n var linkEl = links.item(i);\n addClass(linkEl, 'vjs-hidden');\n linkEl.setAttribute('hidden', 'hidden');\n } // insertElFirst seems to cause the networkState to flicker from 3 to 2, so\n // keep track of the original for later so we can know if the source originally failed\n\n\n tag.initNetworkState_ = tag.networkState; // Wrap video tag in div (el/box) container\n\n if (tag.parentNode && !playerElIngest) {\n tag.parentNode.insertBefore(el, tag);\n } // insert the tag as the first child of the player element\n // then manually add it to the children array so that this.addChild\n // will work properly for other components\n //\n // Breaks iPhone, fixed in HTML5 setup.\n\n\n prependTo(tag, el);\n this.children_.unshift(tag); // Set lang attr on player to ensure CSS :lang() in consistent with player\n // if it's been set to something different to the doc\n\n this.el_.setAttribute('lang', this.language_);\n this.el_ = el;\n return el;\n }\n /**\n * A getter/setter for the `Player`'s width. Returns the player's configured value.\n * To get the current width use `currentWidth()`.\n *\n * @param {number} [value]\n * The value to set the `Player`'s width to.\n *\n * @return {number}\n * The current width of the `Player` when getting.\n */\n ;\n\n _proto.width = function width(value) {\n return this.dimension('width', value);\n }\n /**\n * A getter/setter for the `Player`'s height. Returns the player's configured value.\n * To get the current height use `currentheight()`.\n *\n * @param {number} [value]\n * The value to set the `Player`'s heigth to.\n *\n * @return {number}\n * The current height of the `Player` when getting.\n */\n ;\n\n _proto.height = function height(value) {\n return this.dimension('height', value);\n }\n /**\n * A getter/setter for the `Player`'s width & height.\n *\n * @param {string} dimension\n * This string can be:\n * - 'width'\n * - 'height'\n *\n * @param {number} [value]\n * Value for dimension specified in the first argument.\n *\n * @return {number}\n * The dimension arguments value when getting (width/height).\n */\n ;\n\n _proto.dimension = function dimension(_dimension, value) {\n var privDimension = _dimension + '_';\n\n if (value === undefined) {\n return this[privDimension] || 0;\n }\n\n if (value === '') {\n // If an empty string is given, reset the dimension to be automatic\n this[privDimension] = undefined;\n this.updateStyleEl_();\n return;\n }\n\n var parsedVal = parseFloat(value);\n\n if (isNaN(parsedVal)) {\n log.error(\"Improper value \\\"\" + value + \"\\\" supplied for for \" + _dimension);\n return;\n }\n\n this[privDimension] = parsedVal;\n this.updateStyleEl_();\n }\n /**\n * A getter/setter/toggler for the vjs-fluid `className` on the `Player`.\n *\n * Turning this on will turn off fill mode.\n *\n * @param {boolean} [bool]\n * - A value of true adds the class.\n * - A value of false removes the class.\n * - No value will be a getter.\n *\n * @return {boolean|undefined}\n * - The value of fluid when getting.\n * - `undefined` when setting.\n */\n ;\n\n _proto.fluid = function fluid(bool) {\n if (bool === undefined) {\n return !!this.fluid_;\n }\n\n this.fluid_ = !!bool;\n\n if (isEvented(this)) {\n this.off('playerreset', this.updateStyleEl_);\n }\n\n if (bool) {\n this.addClass('vjs-fluid');\n this.fill(false);\n addEventedCallback(function () {\n this.on('playerreset', this.updateStyleEl_);\n });\n } else {\n this.removeClass('vjs-fluid');\n }\n\n this.updateStyleEl_();\n }\n /**\n * A getter/setter/toggler for the vjs-fill `className` on the `Player`.\n *\n * Turning this on will turn off fluid mode.\n *\n * @param {boolean} [bool]\n * - A value of true adds the class.\n * - A value of false removes the class.\n * - No value will be a getter.\n *\n * @return {boolean|undefined}\n * - The value of fluid when getting.\n * - `undefined` when setting.\n */\n ;\n\n _proto.fill = function fill(bool) {\n if (bool === undefined) {\n return !!this.fill_;\n }\n\n this.fill_ = !!bool;\n\n if (bool) {\n this.addClass('vjs-fill');\n this.fluid(false);\n } else {\n this.removeClass('vjs-fill');\n }\n }\n /**\n * Get/Set the aspect ratio\n *\n * @param {string} [ratio]\n * Aspect ratio for player\n *\n * @return {string|undefined}\n * returns the current aspect ratio when getting\n */\n\n /**\n * A getter/setter for the `Player`'s aspect ratio.\n *\n * @param {string} [ratio]\n * The value to set the `Player's aspect ratio to.\n *\n * @return {string|undefined}\n * - The current aspect ratio of the `Player` when getting.\n * - undefined when setting\n */\n ;\n\n _proto.aspectRatio = function aspectRatio(ratio) {\n if (ratio === undefined) {\n return this.aspectRatio_;\n } // Check for width:height format\n\n\n if (!/^\\d+\\:\\d+$/.test(ratio)) {\n throw new Error('Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.');\n }\n\n this.aspectRatio_ = ratio; // We're assuming if you set an aspect ratio you want fluid mode,\n // because in fixed mode you could calculate width and height yourself.\n\n this.fluid(true);\n this.updateStyleEl_();\n }\n /**\n * Update styles of the `Player` element (height, width and aspect ratio).\n *\n * @private\n * @listens Tech#loadedmetadata\n */\n ;\n\n _proto.updateStyleEl_ = function updateStyleEl_() {\n if (window$1.VIDEOJS_NO_DYNAMIC_STYLE === true) {\n var _width = typeof this.width_ === 'number' ? this.width_ : this.options_.width;\n\n var _height = typeof this.height_ === 'number' ? this.height_ : this.options_.height;\n\n var techEl = this.tech_ && this.tech_.el();\n\n if (techEl) {\n if (_width >= 0) {\n techEl.width = _width;\n }\n\n if (_height >= 0) {\n techEl.height = _height;\n }\n }\n\n return;\n }\n\n var width;\n var height;\n var aspectRatio;\n var idClass; // The aspect ratio is either used directly or to calculate width and height.\n\n if (this.aspectRatio_ !== undefined && this.aspectRatio_ !== 'auto') {\n // Use any aspectRatio that's been specifically set\n aspectRatio = this.aspectRatio_;\n } else if (this.videoWidth() > 0) {\n // Otherwise try to get the aspect ratio from the video metadata\n aspectRatio = this.videoWidth() + ':' + this.videoHeight();\n } else {\n // Or use a default. The video element's is 2:1, but 16:9 is more common.\n aspectRatio = '16:9';\n } // Get the ratio as a decimal we can use to calculate dimensions\n\n\n var ratioParts = aspectRatio.split(':');\n var ratioMultiplier = ratioParts[1] / ratioParts[0];\n\n if (this.width_ !== undefined) {\n // Use any width that's been specifically set\n width = this.width_;\n } else if (this.height_ !== undefined) {\n // Or calulate the width from the aspect ratio if a height has been set\n width = this.height_ / ratioMultiplier;\n } else {\n // Or use the video's metadata, or use the video el's default of 300\n width = this.videoWidth() || 300;\n }\n\n if (this.height_ !== undefined) {\n // Use any height that's been specifically set\n height = this.height_;\n } else {\n // Otherwise calculate the height from the ratio and the width\n height = width * ratioMultiplier;\n } // Ensure the CSS class is valid by starting with an alpha character\n\n\n if (/^[^a-zA-Z]/.test(this.id())) {\n idClass = 'dimensions-' + this.id();\n } else {\n idClass = this.id() + '-dimensions';\n } // Ensure the right class is still on the player for the style element\n\n\n this.addClass(idClass);\n setTextContent(this.styleEl_, \"\\n .\" + idClass + \" {\\n width: \" + width + \"px;\\n height: \" + height + \"px;\\n }\\n\\n .\" + idClass + \".vjs-fluid {\\n padding-top: \" + ratioMultiplier * 100 + \"%;\\n }\\n \");\n }\n /**\n * Load/Create an instance of playback {@link Tech} including element\n * and API methods. Then append the `Tech` element in `Player` as a child.\n *\n * @param {string} techName\n * name of the playback technology\n *\n * @param {string} source\n * video source\n *\n * @private\n */\n ;\n\n _proto.loadTech_ = function loadTech_(techName, source) {\n var _this3 = this; // Pause and remove current playback technology\n\n\n if (this.tech_) {\n this.unloadTech_();\n }\n\n var titleTechName = toTitleCase(techName);\n var camelTechName = techName.charAt(0).toLowerCase() + techName.slice(1); // get rid of the HTML5 video tag as soon as we are using another tech\n\n if (titleTechName !== 'Html5' && this.tag) {\n Tech.getTech('Html5').disposeMediaElement(this.tag);\n this.tag.player = null;\n this.tag = null;\n }\n\n this.techName_ = titleTechName; // Turn off API access because we're loading a new tech that might load asynchronously\n\n this.isReady_ = false; // if autoplay is a string we pass false to the tech\n // because the player is going to handle autoplay on `loadstart`\n\n var autoplay = typeof this.autoplay() === 'string' ? false : this.autoplay(); // Grab tech-specific options from player options and add source and parent element to use.\n\n var techOptions = {\n source: source,\n autoplay: autoplay,\n 'nativeControlsForTouch': this.options_.nativeControlsForTouch,\n 'playerId': this.id(),\n 'techId': this.id() + \"_\" + camelTechName + \"_api\",\n 'playsinline': this.options_.playsinline,\n 'preload': this.options_.preload,\n 'loop': this.options_.loop,\n 'muted': this.options_.muted,\n 'poster': this.poster(),\n 'language': this.language(),\n 'playerElIngest': this.playerElIngest_ || false,\n 'vtt.js': this.options_['vtt.js'],\n 'canOverridePoster': !!this.options_.techCanOverridePoster,\n 'enableSourceset': this.options_.enableSourceset,\n 'Promise': this.options_.Promise\n };\n ALL.names.forEach(function (name) {\n var props = ALL[name];\n techOptions[props.getterName] = _this3[props.privateName];\n });\n assign(techOptions, this.options_[titleTechName]);\n assign(techOptions, this.options_[camelTechName]);\n assign(techOptions, this.options_[techName.toLowerCase()]);\n\n if (this.tag) {\n techOptions.tag = this.tag;\n }\n\n if (source && source.src === this.cache_.src && this.cache_.currentTime > 0) {\n techOptions.startTime = this.cache_.currentTime;\n } // Initialize tech instance\n\n\n var TechClass = Tech.getTech(techName);\n\n if (!TechClass) {\n throw new Error(\"No Tech named '\" + titleTechName + \"' exists! '\" + titleTechName + \"' should be registered using videojs.registerTech()'\");\n }\n\n this.tech_ = new TechClass(techOptions); // player.triggerReady is always async, so don't need this to be async\n\n this.tech_.ready(bind(this, this.handleTechReady_), true);\n textTrackConverter.jsonToTextTracks(this.textTracksJson_ || [], this.tech_); // Listen to all HTML5-defined events and trigger them on the player\n\n TECH_EVENTS_RETRIGGER.forEach(function (event) {\n _this3.on(_this3.tech_, event, _this3[\"handleTech\" + toTitleCase(event) + \"_\"]);\n });\n Object.keys(TECH_EVENTS_QUEUE).forEach(function (event) {\n _this3.on(_this3.tech_, event, function (eventObj) {\n if (_this3.tech_.playbackRate() === 0 && _this3.tech_.seeking()) {\n _this3.queuedCallbacks_.push({\n callback: _this3[\"handleTech\" + TECH_EVENTS_QUEUE[event] + \"_\"].bind(_this3),\n event: eventObj\n });\n\n return;\n }\n\n _this3[\"handleTech\" + TECH_EVENTS_QUEUE[event] + \"_\"](eventObj);\n });\n });\n this.on(this.tech_, 'loadstart', this.handleTechLoadStart_);\n this.on(this.tech_, 'sourceset', this.handleTechSourceset_);\n this.on(this.tech_, 'waiting', this.handleTechWaiting_);\n this.on(this.tech_, 'ended', this.handleTechEnded_);\n this.on(this.tech_, 'seeking', this.handleTechSeeking_);\n this.on(this.tech_, 'play', this.handleTechPlay_);\n this.on(this.tech_, 'firstplay', this.handleTechFirstPlay_);\n this.on(this.tech_, 'pause', this.handleTechPause_);\n this.on(this.tech_, 'durationchange', this.handleTechDurationChange_);\n this.on(this.tech_, 'fullscreenchange', this.handleTechFullscreenChange_);\n this.on(this.tech_, 'enterpictureinpicture', this.handleTechEnterPictureInPicture_);\n this.on(this.tech_, 'leavepictureinpicture', this.handleTechLeavePictureInPicture_);\n this.on(this.tech_, 'error', this.handleTechError_);\n this.on(this.tech_, 'loadedmetadata', this.updateStyleEl_);\n this.on(this.tech_, 'posterchange', this.handleTechPosterChange_);\n this.on(this.tech_, 'textdata', this.handleTechTextData_);\n this.on(this.tech_, 'ratechange', this.handleTechRateChange_);\n this.usingNativeControls(this.techGet_('controls'));\n\n if (this.controls() && !this.usingNativeControls()) {\n this.addTechControlsListeners_();\n } // Add the tech element in the DOM if it was not already there\n // Make sure to not insert the original video element if using Html5\n\n\n if (this.tech_.el().parentNode !== this.el() && (titleTechName !== 'Html5' || !this.tag)) {\n prependTo(this.tech_.el(), this.el());\n } // Get rid of the original video tag reference after the first tech is loaded\n\n\n if (this.tag) {\n this.tag.player = null;\n this.tag = null;\n }\n }\n /**\n * Unload and dispose of the current playback {@link Tech}.\n *\n * @private\n */\n ;\n\n _proto.unloadTech_ = function unloadTech_() {\n var _this4 = this; // Save the current text tracks so that we can reuse the same text tracks with the next tech\n\n\n ALL.names.forEach(function (name) {\n var props = ALL[name];\n _this4[props.privateName] = _this4[props.getterName]();\n });\n this.textTracksJson_ = textTrackConverter.textTracksToJson(this.tech_);\n this.isReady_ = false;\n this.tech_.dispose();\n this.tech_ = false;\n\n if (this.isPosterFromTech_) {\n this.poster_ = '';\n this.trigger('posterchange');\n }\n\n this.isPosterFromTech_ = false;\n }\n /**\n * Return a reference to the current {@link Tech}.\n * It will print a warning by default about the danger of using the tech directly\n * but any argument that is passed in will silence the warning.\n *\n * @param {*} [safety]\n * Anything passed in to silence the warning\n *\n * @return {Tech}\n * The Tech\n */\n ;\n\n _proto.tech = function tech(safety) {\n if (safety === undefined) {\n log.warn('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 }\n\n return this.tech_;\n }\n /**\n * Set up click and touch listeners for the playback element\n *\n * - On desktops: a click on the video itself will toggle playback\n * - On mobile devices: a click on the video toggles controls\n * which is done by toggling the user state between active and\n * inactive\n * - A tap can signal that a user has become active or has become inactive\n * e.g. a quick tap on an iPhone movie should reveal the controls. Another\n * quick tap should hide them again (signaling the user is in an inactive\n * viewing state)\n * - In addition to this, we still want the user to be considered inactive after\n * a few seconds of inactivity.\n *\n * > Note: the only part of iOS interaction we can't mimic with this setup\n * is a touch and hold on the video element counting as activity in order to\n * keep the controls showing, but that shouldn't be an issue. A touch and hold\n * on any controls will still keep the user active\n *\n * @private\n */\n ;\n\n _proto.addTechControlsListeners_ = function addTechControlsListeners_() {\n // Make sure to remove all the previous listeners in case we are called multiple times.\n this.removeTechControlsListeners_(); // Some browsers (Chrome & IE) don't trigger a click on a flash swf, but do\n // trigger mousedown/up.\n // http://stackoverflow.com/questions/1444562/javascript-onclick-event-over-flash-object\n // Any touch events are set to block the mousedown event from happening\n\n this.on(this.tech_, 'mouseup', this.handleTechClick_);\n this.on(this.tech_, 'dblclick', this.handleTechDoubleClick_); // If the controls were hidden we don't want that to change without a tap event\n // so we'll check if the controls were already showing before reporting user\n // activity\n\n this.on(this.tech_, 'touchstart', this.handleTechTouchStart_);\n this.on(this.tech_, 'touchmove', this.handleTechTouchMove_);\n this.on(this.tech_, 'touchend', this.handleTechTouchEnd_); // The tap listener needs to come after the touchend listener because the tap\n // listener cancels out any reportedUserActivity when setting userActive(false)\n\n this.on(this.tech_, 'tap', this.handleTechTap_);\n }\n /**\n * Remove the listeners used for click and tap controls. This is needed for\n * toggling to controls disabled, where a tap/touch should do nothing.\n *\n * @private\n */\n ;\n\n _proto.removeTechControlsListeners_ = function removeTechControlsListeners_() {\n // We don't want to just use `this.off()` because there might be other needed\n // listeners added by techs that extend this.\n this.off(this.tech_, 'tap', this.handleTechTap_);\n this.off(this.tech_, 'touchstart', this.handleTechTouchStart_);\n this.off(this.tech_, 'touchmove', this.handleTechTouchMove_);\n this.off(this.tech_, 'touchend', this.handleTechTouchEnd_);\n this.off(this.tech_, 'mouseup', this.handleTechClick_);\n this.off(this.tech_, 'dblclick', this.handleTechDoubleClick_);\n }\n /**\n * Player waits for the tech to be ready\n *\n * @private\n */\n ;\n\n _proto.handleTechReady_ = function handleTechReady_() {\n this.triggerReady(); // Keep the same volume as before\n\n if (this.cache_.volume) {\n this.techCall_('setVolume', this.cache_.volume);\n } // Look if the tech found a higher resolution poster while loading\n\n\n this.handleTechPosterChange_(); // Update the duration if available\n\n this.handleTechDurationChange_();\n }\n /**\n * Retrigger the `loadstart` event that was triggered by the {@link Tech}. This\n * function will also trigger {@link Player#firstplay} if it is the first loadstart\n * for a video.\n *\n * @fires Player#loadstart\n * @fires Player#firstplay\n * @listens Tech#loadstart\n * @private\n */\n ;\n\n _proto.handleTechLoadStart_ = function handleTechLoadStart_() {\n // TODO: Update to use `emptied` event instead. See #1277.\n this.removeClass('vjs-ended');\n this.removeClass('vjs-seeking'); // reset the error state\n\n this.error(null); // Update the duration\n\n this.handleTechDurationChange_(); // If it's already playing we want to trigger a firstplay event now.\n // The firstplay event relies on both the play and loadstart events\n // which can happen in any order for a new source\n\n if (!this.paused()) {\n /**\n * Fired when the user agent begins looking for media data\n *\n * @event Player#loadstart\n * @type {EventTarget~Event}\n */\n this.trigger('loadstart');\n this.trigger('firstplay');\n } else {\n // reset the hasStarted state\n this.hasStarted(false);\n this.trigger('loadstart');\n } // autoplay happens after loadstart for the browser,\n // so we mimic that behavior\n\n\n this.manualAutoplay_(this.autoplay());\n }\n /**\n * Handle autoplay string values, rather than the typical boolean\n * values that should be handled by the tech. Note that this is not\n * part of any specification. Valid values and what they do can be\n * found on the autoplay getter at Player#autoplay()\n */\n ;\n\n _proto.manualAutoplay_ = function manualAutoplay_(type) {\n var _this5 = this;\n\n if (!this.tech_ || typeof type !== 'string') {\n return;\n }\n\n var muted = function muted() {\n var previouslyMuted = _this5.muted();\n\n _this5.muted(true);\n\n var restoreMuted = function restoreMuted() {\n _this5.muted(previouslyMuted);\n }; // restore muted on play terminatation\n\n\n _this5.playTerminatedQueue_.push(restoreMuted);\n\n var mutedPromise = _this5.play();\n\n if (!isPromise(mutedPromise)) {\n return;\n }\n\n return mutedPromise[\"catch\"](restoreMuted);\n };\n\n var promise; // if muted defaults to true\n // the only thing we can do is call play\n\n if (type === 'any' && this.muted() !== true) {\n promise = this.play();\n\n if (isPromise(promise)) {\n promise = promise[\"catch\"](muted);\n }\n } else if (type === 'muted' && this.muted() !== true) {\n promise = muted();\n } else {\n promise = this.play();\n }\n\n if (!isPromise(promise)) {\n return;\n }\n\n return promise.then(function () {\n _this5.trigger({\n type: 'autoplay-success',\n autoplay: type\n });\n })[\"catch\"](function (e) {\n _this5.trigger({\n type: 'autoplay-failure',\n autoplay: type\n });\n });\n }\n /**\n * Update the internal source caches so that we return the correct source from\n * `src()`, `currentSource()`, and `currentSources()`.\n *\n * > Note: `currentSources` will not be updated if the source that is passed in exists\n * in the current `currentSources` cache.\n *\n *\n * @param {Tech~SourceObject} srcObj\n * A string or object source to update our caches to.\n */\n ;\n\n _proto.updateSourceCaches_ = function updateSourceCaches_(srcObj) {\n if (srcObj === void 0) {\n srcObj = '';\n }\n\n var src = srcObj;\n var type = '';\n\n if (typeof src !== 'string') {\n src = srcObj.src;\n type = srcObj.type;\n } // make sure all the caches are set to default values\n // to prevent null checking\n\n\n this.cache_.source = this.cache_.source || {};\n this.cache_.sources = this.cache_.sources || []; // try to get the type of the src that was passed in\n\n if (src && !type) {\n type = findMimetype(this, src);\n } // update `currentSource` cache always\n\n\n this.cache_.source = mergeOptions({}, srcObj, {\n src: src,\n type: type\n });\n var matchingSources = this.cache_.sources.filter(function (s) {\n return s.src && s.src === src;\n });\n var sourceElSources = [];\n var sourceEls = this.$$('source');\n var matchingSourceEls = [];\n\n for (var i = 0; i < sourceEls.length; i++) {\n var sourceObj = getAttributes(sourceEls[i]);\n sourceElSources.push(sourceObj);\n\n if (sourceObj.src && sourceObj.src === src) {\n matchingSourceEls.push(sourceObj.src);\n }\n } // if we have matching source els but not matching sources\n // the current source cache is not up to date\n\n\n if (matchingSourceEls.length && !matchingSources.length) {\n this.cache_.sources = sourceElSources; // if we don't have matching source or source els set the\n // sources cache to the `currentSource` cache\n } else if (!matchingSources.length) {\n this.cache_.sources = [this.cache_.source];\n } // update the tech `src` cache\n\n\n this.cache_.src = src;\n }\n /**\n * *EXPERIMENTAL* Fired when the source is set or changed on the {@link Tech}\n * causing the media element to reload.\n *\n * It will fire for the initial source and each subsequent source.\n * This event is a custom event from Video.js and is triggered by the {@link Tech}.\n *\n * The event object for this event contains a `src` property that will contain the source\n * that was available when the event was triggered. This is generally only necessary if Video.js\n * is switching techs while the source was being changed.\n *\n * It is also fired when `load` is called on the player (or media element)\n * because the {@link https://html.spec.whatwg.org/multipage/media.html#dom-media-load|specification for `load`}\n * says that the resource selection algorithm needs to be aborted and restarted.\n * In this case, it is very likely that the `src` property will be set to the\n * empty string `\"\"` to indicate we do not know what the source will be but\n * that it is changing.\n *\n * *This event is currently still experimental and may change in minor releases.*\n * __To use this, pass `enableSourceset` option to the player.__\n *\n * @event Player#sourceset\n * @type {EventTarget~Event}\n * @prop {string} src\n * The source url available when the `sourceset` was triggered.\n * It will be an empty string if we cannot know what the source is\n * but know that the source will change.\n */\n\n /**\n * Retrigger the `sourceset` event that was triggered by the {@link Tech}.\n *\n * @fires Player#sourceset\n * @listens Tech#sourceset\n * @private\n */\n ;\n\n _proto.handleTechSourceset_ = function handleTechSourceset_(event) {\n var _this6 = this; // only update the source cache when the source\n // was not updated using the player api\n\n\n if (!this.changingSrc_) {\n var updateSourceCaches = function updateSourceCaches(src) {\n return _this6.updateSourceCaches_(src);\n };\n\n var playerSrc = this.currentSource().src;\n var eventSrc = event.src; // if we have a playerSrc that is not a blob, and a tech src that is a blob\n\n if (playerSrc && !/^blob:/.test(playerSrc) && /^blob:/.test(eventSrc)) {\n // if both the tech source and the player source were updated we assume\n // something like @videojs/http-streaming did the sourceset and skip updating the source cache.\n if (!this.lastSource_ || this.lastSource_.tech !== eventSrc && this.lastSource_.player !== playerSrc) {\n updateSourceCaches = function updateSourceCaches() {};\n }\n } // update the source to the intial source right away\n // in some cases this will be empty string\n\n\n updateSourceCaches(eventSrc); // if the `sourceset` `src` was an empty string\n // wait for a `loadstart` to update the cache to `currentSrc`.\n // If a sourceset happens before a `loadstart`, we reset the state\n\n if (!event.src) {\n this.tech_.any(['sourceset', 'loadstart'], function (e) {\n // if a sourceset happens before a `loadstart` there\n // is nothing to do as this `handleTechSourceset_`\n // will be called again and this will be handled there.\n if (e.type === 'sourceset') {\n return;\n }\n\n var techSrc = _this6.techGet('currentSrc');\n\n _this6.lastSource_.tech = techSrc;\n\n _this6.updateSourceCaches_(techSrc);\n });\n }\n }\n\n this.lastSource_ = {\n player: this.currentSource().src,\n tech: event.src\n };\n this.trigger({\n src: event.src,\n type: 'sourceset'\n });\n }\n /**\n * Add/remove the vjs-has-started class\n *\n * @fires Player#firstplay\n *\n * @param {boolean} request\n * - true: adds the class\n * - false: remove the class\n *\n * @return {boolean}\n * the boolean value of hasStarted_\n */\n ;\n\n _proto.hasStarted = function hasStarted(request) {\n if (request === undefined) {\n // act as getter, if we have no request to change\n return this.hasStarted_;\n }\n\n if (request === this.hasStarted_) {\n return;\n }\n\n this.hasStarted_ = request;\n\n if (this.hasStarted_) {\n this.addClass('vjs-has-started');\n this.trigger('firstplay');\n } else {\n this.removeClass('vjs-has-started');\n }\n }\n /**\n * Fired whenever the media begins or resumes playback\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-play}\n * @fires Player#play\n * @listens Tech#play\n * @private\n */\n ;\n\n _proto.handleTechPlay_ = function handleTechPlay_() {\n this.removeClass('vjs-ended');\n this.removeClass('vjs-paused');\n this.addClass('vjs-playing'); // hide the poster when the user hits play\n\n this.hasStarted(true);\n /**\n * Triggered whenever an {@link Tech#play} event happens. Indicates that\n * playback has started or resumed.\n *\n * @event Player#play\n * @type {EventTarget~Event}\n */\n\n this.trigger('play');\n }\n /**\n * Retrigger the `ratechange` event that was triggered by the {@link Tech}.\n *\n * If there were any events queued while the playback rate was zero, fire\n * those events now.\n *\n * @private\n * @method Player#handleTechRateChange_\n * @fires Player#ratechange\n * @listens Tech#ratechange\n */\n ;\n\n _proto.handleTechRateChange_ = function handleTechRateChange_() {\n if (this.tech_.playbackRate() > 0 && this.cache_.lastPlaybackRate === 0) {\n this.queuedCallbacks_.forEach(function (queued) {\n return queued.callback(queued.event);\n });\n this.queuedCallbacks_ = [];\n }\n\n this.cache_.lastPlaybackRate = this.tech_.playbackRate();\n /**\n * Fires when the playing speed of the audio/video is changed\n *\n * @event Player#ratechange\n * @type {event}\n */\n\n this.trigger('ratechange');\n }\n /**\n * Retrigger the `waiting` event that was triggered by the {@link Tech}.\n *\n * @fires Player#waiting\n * @listens Tech#waiting\n * @private\n */\n ;\n\n _proto.handleTechWaiting_ = function handleTechWaiting_() {\n var _this7 = this;\n\n this.addClass('vjs-waiting');\n /**\n * A readyState change on the DOM element has caused playback to stop.\n *\n * @event Player#waiting\n * @type {EventTarget~Event}\n */\n\n this.trigger('waiting'); // Browsers may emit a timeupdate event after a waiting event. In order to prevent\n // premature removal of the waiting class, wait for the time to change.\n\n var timeWhenWaiting = this.currentTime();\n\n var timeUpdateListener = function timeUpdateListener() {\n if (timeWhenWaiting !== _this7.currentTime()) {\n _this7.removeClass('vjs-waiting');\n\n _this7.off('timeupdate', timeUpdateListener);\n }\n };\n\n this.on('timeupdate', timeUpdateListener);\n }\n /**\n * Retrigger the `canplay` event that was triggered by the {@link Tech}.\n * > Note: This is not consistent between browsers. See #1351\n *\n * @fires Player#canplay\n * @listens Tech#canplay\n * @private\n */\n ;\n\n _proto.handleTechCanPlay_ = function handleTechCanPlay_() {\n this.removeClass('vjs-waiting');\n /**\n * The media has a readyState of HAVE_FUTURE_DATA or greater.\n *\n * @event Player#canplay\n * @type {EventTarget~Event}\n */\n\n this.trigger('canplay');\n }\n /**\n * Retrigger the `canplaythrough` event that was triggered by the {@link Tech}.\n *\n * @fires Player#canplaythrough\n * @listens Tech#canplaythrough\n * @private\n */\n ;\n\n _proto.handleTechCanPlayThrough_ = function handleTechCanPlayThrough_() {\n this.removeClass('vjs-waiting');\n /**\n * The media has a readyState of HAVE_ENOUGH_DATA or greater. This means that the\n * entire media file can be played without buffering.\n *\n * @event Player#canplaythrough\n * @type {EventTarget~Event}\n */\n\n this.trigger('canplaythrough');\n }\n /**\n * Retrigger the `playing` event that was triggered by the {@link Tech}.\n *\n * @fires Player#playing\n * @listens Tech#playing\n * @private\n */\n ;\n\n _proto.handleTechPlaying_ = function handleTechPlaying_() {\n this.removeClass('vjs-waiting');\n /**\n * The media is no longer blocked from playback, and has started playing.\n *\n * @event Player#playing\n * @type {EventTarget~Event}\n */\n\n this.trigger('playing');\n }\n /**\n * Retrigger the `seeking` event that was triggered by the {@link Tech}.\n *\n * @fires Player#seeking\n * @listens Tech#seeking\n * @private\n */\n ;\n\n _proto.handleTechSeeking_ = function handleTechSeeking_() {\n this.addClass('vjs-seeking');\n /**\n * Fired whenever the player is jumping to a new time\n *\n * @event Player#seeking\n * @type {EventTarget~Event}\n */\n\n this.trigger('seeking');\n }\n /**\n * Retrigger the `seeked` event that was triggered by the {@link Tech}.\n *\n * @fires Player#seeked\n * @listens Tech#seeked\n * @private\n */\n ;\n\n _proto.handleTechSeeked_ = function handleTechSeeked_() {\n this.removeClass('vjs-seeking');\n this.removeClass('vjs-ended');\n /**\n * Fired when the player has finished jumping to a new time\n *\n * @event Player#seeked\n * @type {EventTarget~Event}\n */\n\n this.trigger('seeked');\n }\n /**\n * Retrigger the `firstplay` event that was triggered by the {@link Tech}.\n *\n * @fires Player#firstplay\n * @listens Tech#firstplay\n * @deprecated As of 6.0 firstplay event is deprecated.\n * As of 6.0 passing the `starttime` option to the player and the firstplay event are deprecated.\n * @private\n */\n ;\n\n _proto.handleTechFirstPlay_ = function handleTechFirstPlay_() {\n // If the first starttime attribute is specified\n // then we will start at the given offset in seconds\n if (this.options_.starttime) {\n log.warn('Passing the `starttime` option to the player will be deprecated in 6.0');\n this.currentTime(this.options_.starttime);\n }\n\n this.addClass('vjs-has-started');\n /**\n * Fired the first time a video is played. Not part of the HLS spec, and this is\n * probably not the best implementation yet, so use sparingly. If you don't have a\n * reason to prevent playback, use `myPlayer.one('play');` instead.\n *\n * @event Player#firstplay\n * @deprecated As of 6.0 firstplay event is deprecated.\n * @type {EventTarget~Event}\n */\n\n this.trigger('firstplay');\n }\n /**\n * Retrigger the `pause` event that was triggered by the {@link Tech}.\n *\n * @fires Player#pause\n * @listens Tech#pause\n * @private\n */\n ;\n\n _proto.handleTechPause_ = function handleTechPause_() {\n this.removeClass('vjs-playing');\n this.addClass('vjs-paused');\n /**\n * Fired whenever the media has been paused\n *\n * @event Player#pause\n * @type {EventTarget~Event}\n */\n\n this.trigger('pause');\n }\n /**\n * Retrigger the `ended` event that was triggered by the {@link Tech}.\n *\n * @fires Player#ended\n * @listens Tech#ended\n * @private\n */\n ;\n\n _proto.handleTechEnded_ = function handleTechEnded_() {\n this.addClass('vjs-ended');\n\n if (this.options_.loop) {\n this.currentTime(0);\n this.play();\n } else if (!this.paused()) {\n this.pause();\n }\n /**\n * Fired when the end of the media resource is reached (currentTime == duration)\n *\n * @event Player#ended\n * @type {EventTarget~Event}\n */\n\n\n this.trigger('ended');\n }\n /**\n * Fired when the duration of the media resource is first known or changed\n *\n * @listens Tech#durationchange\n * @private\n */\n ;\n\n _proto.handleTechDurationChange_ = function handleTechDurationChange_() {\n this.duration(this.techGet_('duration'));\n }\n /**\n * Handle a click on the media element to play/pause\n *\n * @param {EventTarget~Event} event\n * the event that caused this function to trigger\n *\n * @listens Tech#mouseup\n * @private\n */\n ;\n\n _proto.handleTechClick_ = function handleTechClick_(event) {\n if (!isSingleLeftClick(event)) {\n return;\n } // When controls are disabled a click should not toggle playback because\n // the click is considered a control\n\n\n if (!this.controls_) {\n return;\n }\n\n if (this.paused()) {\n silencePromise(this.play());\n } else {\n this.pause();\n }\n }\n /**\n * Handle a double-click on the media element to enter/exit fullscreen\n *\n * @param {EventTarget~Event} event\n * the event that caused this function to trigger\n *\n * @listens Tech#dblclick\n * @private\n */\n ;\n\n _proto.handleTechDoubleClick_ = function handleTechDoubleClick_(event) {\n if (!this.controls_) {\n return;\n } // we do not want to toggle fullscreen state\n // when double-clicking inside a control bar or a modal\n\n\n var inAllowedEls = Array.prototype.some.call(this.$$('.vjs-control-bar, .vjs-modal-dialog'), function (el) {\n return el.contains(event.target);\n });\n\n if (!inAllowedEls) {\n /*\n * options.userActions.doubleClick\n *\n * If `undefined` or `true`, double-click toggles fullscreen if controls are present\n * Set to `false` to disable double-click handling\n * Set to a function to substitute an external double-click handler\n */\n if (this.options_ === undefined || this.options_.userActions === undefined || this.options_.userActions.doubleClick === undefined || this.options_.userActions.doubleClick !== false) {\n if (this.options_ !== undefined && this.options_.userActions !== undefined && typeof this.options_.userActions.doubleClick === 'function') {\n this.options_.userActions.doubleClick.call(this, event);\n } else if (this.isFullscreen()) {\n this.exitFullscreen();\n } else {\n this.requestFullscreen();\n }\n }\n }\n }\n /**\n * Handle a tap on the media element. It will toggle the user\n * activity state, which hides and shows the controls.\n *\n * @listens Tech#tap\n * @private\n */\n ;\n\n _proto.handleTechTap_ = function handleTechTap_() {\n this.userActive(!this.userActive());\n }\n /**\n * Handle touch to start\n *\n * @listens Tech#touchstart\n * @private\n */\n ;\n\n _proto.handleTechTouchStart_ = function handleTechTouchStart_() {\n this.userWasActive = this.userActive();\n }\n /**\n * Handle touch to move\n *\n * @listens Tech#touchmove\n * @private\n */\n ;\n\n _proto.handleTechTouchMove_ = function handleTechTouchMove_() {\n if (this.userWasActive) {\n this.reportUserActivity();\n }\n }\n /**\n * Handle touch to end\n *\n * @param {EventTarget~Event} event\n * the touchend event that triggered\n * this function\n *\n * @listens Tech#touchend\n * @private\n */\n ;\n\n _proto.handleTechTouchEnd_ = function handleTechTouchEnd_(event) {\n // Stop the mouse events from also happening\n event.preventDefault();\n }\n /**\n * native click events on the SWF aren't triggered on IE11, Win8.1RT\n * use stageclick events triggered from inside the SWF instead\n *\n * @private\n * @listens stageclick\n */\n ;\n\n _proto.handleStageClick_ = function handleStageClick_() {\n this.reportUserActivity();\n }\n /**\n * @private\n */\n ;\n\n _proto.toggleFullscreenClass_ = function toggleFullscreenClass_() {\n if (this.isFullscreen()) {\n this.addClass('vjs-fullscreen');\n } else {\n this.removeClass('vjs-fullscreen');\n }\n }\n /**\n * when the document fschange event triggers it calls this\n */\n ;\n\n _proto.documentFullscreenChange_ = function documentFullscreenChange_(e) {\n var el = this.el();\n var isFs = document[this.fsApi_.fullscreenElement] === el;\n\n if (!isFs && el.matches) {\n isFs = el.matches(':' + this.fsApi_.fullscreen);\n } else if (!isFs && el.msMatchesSelector) {\n isFs = el.msMatchesSelector(':' + this.fsApi_.fullscreen);\n }\n\n this.isFullscreen(isFs); // If cancelling fullscreen, remove event listener.\n\n if (this.isFullscreen() === false) {\n off(document, this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_);\n }\n\n if (this.fsApi_.prefixed) {\n /**\n * @event Player#fullscreenchange\n * @type {EventTarget~Event}\n */\n this.trigger('fullscreenchange');\n }\n }\n /**\n * Handle Tech Fullscreen Change\n *\n * @param {EventTarget~Event} event\n * the fullscreenchange event that triggered this function\n *\n * @param {Object} data\n * the data that was sent with the event\n *\n * @private\n * @listens Tech#fullscreenchange\n * @fires Player#fullscreenchange\n */\n ;\n\n _proto.handleTechFullscreenChange_ = function handleTechFullscreenChange_(event, data) {\n if (data) {\n this.isFullscreen(data.isFullscreen);\n }\n /**\n * Fired when going in and out of fullscreen.\n *\n * @event Player#fullscreenchange\n * @type {EventTarget~Event}\n */\n\n\n this.trigger('fullscreenchange');\n }\n /**\n * @private\n */\n ;\n\n _proto.togglePictureInPictureClass_ = function togglePictureInPictureClass_() {\n if (this.isInPictureInPicture()) {\n this.addClass('vjs-picture-in-picture');\n } else {\n this.removeClass('vjs-picture-in-picture');\n }\n }\n /**\n * Handle Tech Enter Picture-in-Picture.\n *\n * @param {EventTarget~Event} event\n * the enterpictureinpicture event that triggered this function\n *\n * @private\n * @listens Tech#enterpictureinpicture\n */\n ;\n\n _proto.handleTechEnterPictureInPicture_ = function handleTechEnterPictureInPicture_(event) {\n this.isInPictureInPicture(true);\n }\n /**\n * Handle Tech Leave Picture-in-Picture.\n *\n * @param {EventTarget~Event} event\n * the leavepictureinpicture event that triggered this function\n *\n * @private\n * @listens Tech#leavepictureinpicture\n */\n ;\n\n _proto.handleTechLeavePictureInPicture_ = function handleTechLeavePictureInPicture_(event) {\n this.isInPictureInPicture(false);\n }\n /**\n * Fires when an error occurred during the loading of an audio/video.\n *\n * @private\n * @listens Tech#error\n */\n ;\n\n _proto.handleTechError_ = function handleTechError_() {\n var error = this.tech_.error();\n this.error(error);\n }\n /**\n * Retrigger the `textdata` event that was triggered by the {@link Tech}.\n *\n * @fires Player#textdata\n * @listens Tech#textdata\n * @private\n */\n ;\n\n _proto.handleTechTextData_ = function handleTechTextData_() {\n var data = null;\n\n if (arguments.length > 1) {\n data = arguments[1];\n }\n /**\n * Fires when we get a textdata event from tech\n *\n * @event Player#textdata\n * @type {EventTarget~Event}\n */\n\n\n this.trigger('textdata', data);\n }\n /**\n * Get object for cached values.\n *\n * @return {Object}\n * get the current object cache\n */\n ;\n\n _proto.getCache = function getCache() {\n return this.cache_;\n }\n /**\n * Resets the internal cache object.\n *\n * Using this function outside the player constructor or reset method may\n * have unintended side-effects.\n *\n * @private\n */\n ;\n\n _proto.resetCache_ = function resetCache_() {\n this.cache_ = {\n // Right now, the currentTime is not _really_ cached because it is always\n // retrieved from the tech (see: currentTime). However, for completeness,\n // we set it to zero here to ensure that if we do start actually caching\n // it, we reset it along with everything else.\n currentTime: 0,\n inactivityTimeout: this.options_.inactivityTimeout,\n duration: NaN,\n lastVolume: 1,\n lastPlaybackRate: this.defaultPlaybackRate(),\n media: null,\n src: '',\n source: {},\n sources: [],\n volume: 1\n };\n }\n /**\n * Pass values to the playback tech\n *\n * @param {string} [method]\n * the method to call\n *\n * @param {Object} arg\n * the argument to pass\n *\n * @private\n */\n ;\n\n _proto.techCall_ = function techCall_(method, arg) {\n // If it's not ready yet, call method when it is\n this.ready(function () {\n if (method in allowedSetters) {\n return set(this.middleware_, this.tech_, method, arg);\n } else if (method in allowedMediators) {\n return mediate(this.middleware_, this.tech_, method, arg);\n }\n\n try {\n if (this.tech_) {\n this.tech_[method](arg);\n }\n } catch (e) {\n log(e);\n throw e;\n }\n }, true);\n }\n /**\n * Get calls can't wait for the tech, and sometimes don't need to.\n *\n * @param {string} method\n * Tech method\n *\n * @return {Function|undefined}\n * the method or undefined\n *\n * @private\n */\n ;\n\n _proto.techGet_ = function techGet_(method) {\n if (!this.tech_ || !this.tech_.isReady_) {\n return;\n }\n\n if (method in allowedGetters) {\n return get(this.middleware_, this.tech_, method);\n } else if (method in allowedMediators) {\n return mediate(this.middleware_, this.tech_, method);\n } // Flash likes to die and reload when you hide or reposition it.\n // In these cases the object methods go away and we get errors.\n // When that happens we'll catch the errors and inform tech that it's not ready any more.\n\n\n try {\n return this.tech_[method]();\n } catch (e) {\n // When building additional tech libs, an expected method may not be defined yet\n if (this.tech_[method] === undefined) {\n log(\"Video.js: \" + method + \" method not defined for \" + this.techName_ + \" playback technology.\", e);\n throw e;\n } // When a method isn't available on the object it throws a TypeError\n\n\n if (e.name === 'TypeError') {\n log(\"Video.js: \" + method + \" unavailable on \" + this.techName_ + \" playback technology element.\", e);\n this.tech_.isReady_ = false;\n throw e;\n } // If error unknown, just log and throw\n\n\n log(e);\n throw e;\n }\n }\n /**\n * Attempt to begin playback at the first opportunity.\n *\n * @return {Promise|undefined}\n * Returns a promise if the browser supports Promises (or one\n * was passed in as an option). This promise will be resolved on\n * the return value of play. If this is undefined it will fulfill the\n * promise chain otherwise the promise chain will be fulfilled when\n * the promise from play is fulfilled.\n */\n ;\n\n _proto.play = function play() {\n var _this8 = this;\n\n var PromiseClass = this.options_.Promise || window$1.Promise;\n\n if (PromiseClass) {\n return new PromiseClass(function (resolve) {\n _this8.play_(resolve);\n });\n }\n\n return this.play_();\n }\n /**\n * The actual logic for play, takes a callback that will be resolved on the\n * return value of play. This allows us to resolve to the play promise if there\n * is one on modern browsers.\n *\n * @private\n * @param {Function} [callback]\n * The callback that should be called when the techs play is actually called\n */\n ;\n\n _proto.play_ = function play_(callback) {\n var _this9 = this;\n\n if (callback === void 0) {\n callback = silencePromise;\n }\n\n this.playCallbacks_.push(callback);\n var isSrcReady = Boolean(!this.changingSrc_ && (this.src() || this.currentSrc())); // treat calls to play_ somewhat like the `one` event function\n\n if (this.waitToPlay_) {\n this.off(['ready', 'loadstart'], this.waitToPlay_);\n this.waitToPlay_ = null;\n } // if the player/tech is not ready or the src itself is not ready\n // queue up a call to play on `ready` or `loadstart`\n\n\n if (!this.isReady_ || !isSrcReady) {\n this.waitToPlay_ = function (e) {\n _this9.play_();\n };\n\n this.one(['ready', 'loadstart'], this.waitToPlay_); // if we are in Safari, there is a high chance that loadstart will trigger after the gesture timeperiod\n // in that case, we need to prime the video element by calling load so it'll be ready in time\n\n if (!isSrcReady && (IS_ANY_SAFARI || IS_IOS)) {\n this.load();\n }\n\n return;\n } // If the player/tech is ready and we have a source, we can attempt playback.\n\n\n var val = this.techGet_('play'); // play was terminated if the returned value is null\n\n if (val === null) {\n this.runPlayTerminatedQueue_();\n } else {\n this.runPlayCallbacks_(val);\n }\n }\n /**\n * These functions will be run when if play is terminated. If play\n * runPlayCallbacks_ is run these function will not be run. This allows us\n * to differenciate between a terminated play and an actual call to play.\n */\n ;\n\n _proto.runPlayTerminatedQueue_ = function runPlayTerminatedQueue_() {\n var queue = this.playTerminatedQueue_.slice(0);\n this.playTerminatedQueue_ = [];\n queue.forEach(function (q) {\n q();\n });\n }\n /**\n * When a callback to play is delayed we have to run these\n * callbacks when play is actually called on the tech. This function\n * runs the callbacks that were delayed and accepts the return value\n * from the tech.\n *\n * @param {undefined|Promise} val\n * The return value from the tech.\n */\n ;\n\n _proto.runPlayCallbacks_ = function runPlayCallbacks_(val) {\n var callbacks = this.playCallbacks_.slice(0);\n this.playCallbacks_ = []; // clear play terminatedQueue since we finished a real play\n\n this.playTerminatedQueue_ = [];\n callbacks.forEach(function (cb) {\n cb(val);\n });\n }\n /**\n * Pause the video playback\n *\n * @return {Player}\n * A reference to the player object this function was called on\n */\n ;\n\n _proto.pause = function pause() {\n this.techCall_('pause');\n }\n /**\n * Check if the player is paused or has yet to play\n *\n * @return {boolean}\n * - false: if the media is currently playing\n * - true: if media is not currently playing\n */\n ;\n\n _proto.paused = function paused() {\n // The initial state of paused should be true (in Safari it's actually false)\n return this.techGet_('paused') === false ? false : true;\n }\n /**\n * Get a TimeRange object representing the current ranges of time that the user\n * has played.\n *\n * @return {TimeRange}\n * A time range object that represents all the increments of time that have\n * been played.\n */\n ;\n\n _proto.played = function played() {\n return this.techGet_('played') || createTimeRanges(0, 0);\n }\n /**\n * Returns whether or not the user is \"scrubbing\". Scrubbing is\n * when the user has clicked the progress bar handle and is\n * dragging it along the progress bar.\n *\n * @param {boolean} [isScrubbing]\n * whether the user is or is not scrubbing\n *\n * @return {boolean}\n * The value of scrubbing when getting\n */\n ;\n\n _proto.scrubbing = function scrubbing(isScrubbing) {\n if (typeof isScrubbing === 'undefined') {\n return this.scrubbing_;\n }\n\n this.scrubbing_ = !!isScrubbing;\n\n if (isScrubbing) {\n this.addClass('vjs-scrubbing');\n } else {\n this.removeClass('vjs-scrubbing');\n }\n }\n /**\n * Get or set the current time (in seconds)\n *\n * @param {number|string} [seconds]\n * The time to seek to in seconds\n *\n * @return {number}\n * - the current time in seconds when getting\n */\n ;\n\n _proto.currentTime = function currentTime(seconds) {\n if (typeof seconds !== 'undefined') {\n if (seconds < 0) {\n seconds = 0;\n }\n\n this.techCall_('setCurrentTime', seconds);\n return;\n } // cache last currentTime and return. default to 0 seconds\n //\n // Caching the currentTime is meant to prevent a massive amount of reads on the tech's\n // currentTime when scrubbing, but may not provide much performance benefit afterall.\n // Should be tested. Also something has to read the actual current time or the cache will\n // never get updated.\n\n\n this.cache_.currentTime = this.techGet_('currentTime') || 0;\n return this.cache_.currentTime;\n }\n /**\n * Normally gets the length in time of the video in seconds;\n * in all but the rarest use cases an argument will NOT be passed to the method\n *\n * > **NOTE**: The video must have started loading before the duration can be\n * known, and in the case of Flash, may not be known until the video starts\n * playing.\n *\n * @fires Player#durationchange\n *\n * @param {number} [seconds]\n * The duration of the video to set in seconds\n *\n * @return {number}\n * - The duration of the video in seconds when getting\n */\n ;\n\n _proto.duration = function duration(seconds) {\n if (seconds === undefined) {\n // return NaN if the duration is not known\n return this.cache_.duration !== undefined ? this.cache_.duration : NaN;\n }\n\n seconds = parseFloat(seconds); // Standardize on Infinity for signaling video is live\n\n if (seconds < 0) {\n seconds = Infinity;\n }\n\n if (seconds !== this.cache_.duration) {\n // Cache the last set value for optimized scrubbing (esp. Flash)\n this.cache_.duration = seconds;\n\n if (seconds === Infinity) {\n this.addClass('vjs-live');\n\n if (this.options_.liveui && this.player_.liveTracker) {\n this.addClass('vjs-liveui');\n }\n } else {\n this.removeClass('vjs-live');\n this.removeClass('vjs-liveui');\n }\n\n if (!isNaN(seconds)) {\n // Do not fire durationchange unless the duration value is known.\n // @see [Spec]{@link https://www.w3.org/TR/2011/WD-html5-20110113/video.html#media-element-load-algorithm}\n\n /**\n * @event Player#durationchange\n * @type {EventTarget~Event}\n */\n this.trigger('durationchange');\n }\n }\n }\n /**\n * Calculates how much time is left in the video. Not part\n * of the native video API.\n *\n * @return {number}\n * The time remaining in seconds\n */\n ;\n\n _proto.remainingTime = function remainingTime() {\n return this.duration() - this.currentTime();\n }\n /**\n * A remaining time function that is intented to be used when\n * the time is to be displayed directly to the user.\n *\n * @return {number}\n * The rounded time remaining in seconds\n */\n ;\n\n _proto.remainingTimeDisplay = function remainingTimeDisplay() {\n return Math.floor(this.duration()) - Math.floor(this.currentTime());\n } //\n // Kind of like an array of portions of the video that have been downloaded.\n\n /**\n * Get a TimeRange object with an array of the times of the video\n * that have been downloaded. If you just want the percent of the\n * video that's been downloaded, use bufferedPercent.\n *\n * @see [Buffered Spec]{@link http://dev.w3.org/html5/spec/video.html#dom-media-buffered}\n *\n * @return {TimeRange}\n * A mock TimeRange object (following HTML spec)\n */\n ;\n\n _proto.buffered = function buffered() {\n var buffered = this.techGet_('buffered');\n\n if (!buffered || !buffered.length) {\n buffered = createTimeRanges(0, 0);\n }\n\n return buffered;\n }\n /**\n * Get the percent (as a decimal) of the video that's been downloaded.\n * This method is not a part of the native HTML video API.\n *\n * @return {number}\n * A decimal between 0 and 1 representing the percent\n * that is buffered 0 being 0% and 1 being 100%\n */\n ;\n\n _proto.bufferedPercent = function bufferedPercent$1() {\n return bufferedPercent(this.buffered(), this.duration());\n }\n /**\n * Get the ending time of the last buffered time range\n * This is used in the progress bar to encapsulate all time ranges.\n *\n * @return {number}\n * The end of the last buffered time range\n */\n ;\n\n _proto.bufferedEnd = function bufferedEnd() {\n var buffered = this.buffered();\n var duration = this.duration();\n var end = buffered.end(buffered.length - 1);\n\n if (end > duration) {\n end = duration;\n }\n\n return end;\n }\n /**\n * Get or set the current volume of the media\n *\n * @param {number} [percentAsDecimal]\n * The new volume as a decimal percent:\n * - 0 is muted/0%/off\n * - 1.0 is 100%/full\n * - 0.5 is half volume or 50%\n *\n * @return {number}\n * The current volume as a percent when getting\n */\n ;\n\n _proto.volume = function volume(percentAsDecimal) {\n var vol;\n\n if (percentAsDecimal !== undefined) {\n // Force value to between 0 and 1\n vol = Math.max(0, Math.min(1, parseFloat(percentAsDecimal)));\n this.cache_.volume = vol;\n this.techCall_('setVolume', vol);\n\n if (vol > 0) {\n this.lastVolume_(vol);\n }\n\n return;\n } // Default to 1 when returning current volume.\n\n\n vol = parseFloat(this.techGet_('volume'));\n return isNaN(vol) ? 1 : vol;\n }\n /**\n * Get the current muted state, or turn mute on or off\n *\n * @param {boolean} [muted]\n * - true to mute\n * - false to unmute\n *\n * @return {boolean}\n * - true if mute is on and getting\n * - false if mute is off and getting\n */\n ;\n\n _proto.muted = function muted(_muted) {\n if (_muted !== undefined) {\n this.techCall_('setMuted', _muted);\n return;\n }\n\n return this.techGet_('muted') || false;\n }\n /**\n * Get the current defaultMuted state, or turn defaultMuted on or off. defaultMuted\n * indicates the state of muted on initial playback.\n *\n * ```js\n * var myPlayer = videojs('some-player-id');\n *\n * myPlayer.src(\"http://www.example.com/path/to/video.mp4\");\n *\n * // get, should be false\n * console.log(myPlayer.defaultMuted());\n * // set to true\n * myPlayer.defaultMuted(true);\n * // get should be true\n * console.log(myPlayer.defaultMuted());\n * ```\n *\n * @param {boolean} [defaultMuted]\n * - true to mute\n * - false to unmute\n *\n * @return {boolean|Player}\n * - true if defaultMuted is on and getting\n * - false if defaultMuted is off and getting\n * - A reference to the current player when setting\n */\n ;\n\n _proto.defaultMuted = function defaultMuted(_defaultMuted) {\n if (_defaultMuted !== undefined) {\n return this.techCall_('setDefaultMuted', _defaultMuted);\n }\n\n return this.techGet_('defaultMuted') || false;\n }\n /**\n * Get the last volume, or set it\n *\n * @param {number} [percentAsDecimal]\n * The new last volume as a decimal percent:\n * - 0 is muted/0%/off\n * - 1.0 is 100%/full\n * - 0.5 is half volume or 50%\n *\n * @return {number}\n * the current value of lastVolume as a percent when getting\n *\n * @private\n */\n ;\n\n _proto.lastVolume_ = function lastVolume_(percentAsDecimal) {\n if (percentAsDecimal !== undefined && percentAsDecimal !== 0) {\n this.cache_.lastVolume = percentAsDecimal;\n return;\n }\n\n return this.cache_.lastVolume;\n }\n /**\n * Check if current tech can support native fullscreen\n * (e.g. with built in controls like iOS, so not our flash swf)\n *\n * @return {boolean}\n * if native fullscreen is supported\n */\n ;\n\n _proto.supportsFullScreen = function supportsFullScreen() {\n return this.techGet_('supportsFullScreen') || false;\n }\n /**\n * Check if the player is in fullscreen mode or tell the player that it\n * is or is not in fullscreen mode.\n *\n * > NOTE: As of the latest HTML5 spec, isFullscreen is no longer an official\n * property and instead document.fullscreenElement is used. But isFullscreen is\n * still a valuable property for internal player workings.\n *\n * @param {boolean} [isFS]\n * Set the players current fullscreen state\n *\n * @return {boolean}\n * - true if fullscreen is on and getting\n * - false if fullscreen is off and getting\n */\n ;\n\n _proto.isFullscreen = function isFullscreen(isFS) {\n if (isFS !== undefined) {\n this.isFullscreen_ = !!isFS;\n this.toggleFullscreenClass_();\n return;\n }\n\n return !!this.isFullscreen_;\n }\n /**\n * Increase the size of the video to full screen\n * In some browsers, full screen is not supported natively, so it enters\n * \"full window mode\", where the video fills the browser window.\n * In browsers and devices that support native full screen, sometimes the\n * browser's default controls will be shown, and not the Video.js custom skin.\n * This includes most mobile devices (iOS, Android) and older versions of\n * Safari.\n *\n * @param {Object} [fullscreenOptions]\n * Override the player fullscreen options\n *\n * @fires Player#fullscreenchange\n */\n ;\n\n _proto.requestFullscreen = function requestFullscreen(fullscreenOptions) {\n var fsOptions;\n this.isFullscreen(true);\n\n if (this.fsApi_.requestFullscreen) {\n // the browser supports going fullscreen at the element level so we can\n // take the controls fullscreen as well as the video\n // Trigger fullscreenchange event after change\n // We have to specifically add this each time, and remove\n // when canceling fullscreen. Otherwise if there's multiple\n // players on a page, they would all be reacting to the same fullscreen\n // events\n on(document, this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_); // only pass FullscreenOptions to requestFullscreen if it isn't prefixed\n\n if (!this.fsApi_.prefixed) {\n fsOptions = this.options_.fullscreen && this.options_.fullscreen.options || {};\n\n if (fullscreenOptions !== undefined) {\n fsOptions = fullscreenOptions;\n }\n }\n\n silencePromise(this.el_[this.fsApi_.requestFullscreen](fsOptions));\n } else if (this.tech_.supportsFullScreen()) {\n // we can't take the video.js controls fullscreen but we can go fullscreen\n // with native controls\n this.techCall_('enterFullScreen');\n } else {\n // fullscreen isn't supported so we'll just stretch the video element to\n // fill the viewport\n this.enterFullWindow();\n /**\n * @event Player#fullscreenchange\n * @type {EventTarget~Event}\n */\n\n this.trigger('fullscreenchange');\n }\n }\n /**\n * Return the video to its normal size after having been in full screen mode\n *\n * @fires Player#fullscreenchange\n */\n ;\n\n _proto.exitFullscreen = function exitFullscreen() {\n this.isFullscreen(false); // Check for browser element fullscreen support\n\n if (this.fsApi_.requestFullscreen) {\n silencePromise(document[this.fsApi_.exitFullscreen]());\n } else if (this.tech_.supportsFullScreen()) {\n this.techCall_('exitFullScreen');\n } else {\n this.exitFullWindow();\n /**\n * @event Player#fullscreenchange\n * @type {EventTarget~Event}\n */\n\n this.trigger('fullscreenchange');\n }\n }\n /**\n * When fullscreen isn't supported we can stretch the\n * video container to as wide as the browser will let us.\n *\n * @fires Player#enterFullWindow\n */\n ;\n\n _proto.enterFullWindow = function enterFullWindow() {\n this.isFullWindow = true; // Storing original doc overflow value to return to when fullscreen is off\n\n this.docOrigOverflow = document.documentElement.style.overflow; // Add listener for esc key to exit fullscreen\n\n on(document, 'keydown', this.boundFullWindowOnEscKey_); // Hide any scroll bars\n\n document.documentElement.style.overflow = 'hidden'; // Apply fullscreen styles\n\n addClass(document.body, 'vjs-full-window');\n /**\n * @event Player#enterFullWindow\n * @type {EventTarget~Event}\n */\n\n this.trigger('enterFullWindow');\n }\n /**\n * Check for call to either exit full window or\n * full screen on ESC key\n *\n * @param {string} event\n * Event to check for key press\n */\n ;\n\n _proto.fullWindowOnEscKey = function fullWindowOnEscKey(event) {\n if (keycode.isEventKey(event, 'Esc')) {\n if (this.isFullscreen() === true) {\n this.exitFullscreen();\n } else {\n this.exitFullWindow();\n }\n }\n }\n /**\n * Exit full window\n *\n * @fires Player#exitFullWindow\n */\n ;\n\n _proto.exitFullWindow = function exitFullWindow() {\n this.isFullWindow = false;\n off(document, 'keydown', this.boundFullWindowOnEscKey_); // Unhide scroll bars.\n\n document.documentElement.style.overflow = this.docOrigOverflow; // Remove fullscreen styles\n\n removeClass(document.body, 'vjs-full-window'); // Resize the box, controller, and poster to original sizes\n // this.positionAll();\n\n /**\n * @event Player#exitFullWindow\n * @type {EventTarget~Event}\n */\n\n this.trigger('exitFullWindow');\n }\n /**\n * Check if the player is in Picture-in-Picture mode or tell the player that it\n * is or is not in Picture-in-Picture mode.\n *\n * @param {boolean} [isPiP]\n * Set the players current Picture-in-Picture state\n *\n * @return {boolean}\n * - true if Picture-in-Picture is on and getting\n * - false if Picture-in-Picture is off and getting\n */\n ;\n\n _proto.isInPictureInPicture = function isInPictureInPicture(isPiP) {\n if (isPiP !== undefined) {\n this.isInPictureInPicture_ = !!isPiP;\n this.togglePictureInPictureClass_();\n return;\n }\n\n return !!this.isInPictureInPicture_;\n }\n /**\n * Create a floating video window always on top of other windows so that users may\n * continue consuming media while they interact with other content sites, or\n * applications on their device.\n *\n * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\n *\n * @fires Player#enterpictureinpicture\n *\n * @return {Promise}\n * A promise with a Picture-in-Picture window.\n */\n ;\n\n _proto.requestPictureInPicture = function requestPictureInPicture() {\n if ('pictureInPictureEnabled' in document) {\n /**\n * This event fires when the player enters picture in picture mode\n *\n * @event Player#enterpictureinpicture\n * @type {EventTarget~Event}\n */\n return this.techGet_('requestPictureInPicture');\n }\n }\n /**\n * Exit Picture-in-Picture mode.\n *\n * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\n *\n * @fires Player#leavepictureinpicture\n *\n * @return {Promise}\n * A promise.\n */\n ;\n\n _proto.exitPictureInPicture = function exitPictureInPicture() {\n if ('pictureInPictureEnabled' in document) {\n /**\n * This event fires when the player leaves picture in picture mode\n *\n * @event Player#leavepictureinpicture\n * @type {EventTarget~Event}\n */\n return document.exitPictureInPicture();\n }\n }\n /**\n * Called when this Player has focus and a key gets pressed down, or when\n * any Component of this player receives a key press that it doesn't handle.\n * This allows player-wide hotkeys (either as defined below, or optionally\n * by an external function).\n *\n * @param {EventTarget~Event} event\n * The `keydown` event that caused this function to be called.\n *\n * @listens keydown\n */\n ;\n\n _proto.handleKeyDown = function handleKeyDown(event) {\n var userActions = this.options_.userActions; // Bail out if hotkeys are not configured.\n\n if (!userActions || !userActions.hotkeys) {\n return;\n } // Function that determines whether or not to exclude an element from\n // hotkeys handling.\n\n\n var excludeElement = function excludeElement(el) {\n var tagName = el.tagName.toLowerCase(); // The first and easiest test is for `contenteditable` elements.\n\n if (el.isContentEditable) {\n return true;\n } // Inputs matching these types will still trigger hotkey handling as\n // they are not text inputs.\n\n\n var allowedInputTypes = ['button', 'checkbox', 'hidden', 'radio', 'reset', 'submit'];\n\n if (tagName === 'input') {\n return allowedInputTypes.indexOf(el.type) === -1;\n } // The final test is by tag name. These tags will be excluded entirely.\n\n\n var excludedTags = ['textarea'];\n return excludedTags.indexOf(tagName) !== -1;\n }; // Bail out if the user is focused on an interactive form element.\n\n\n if (excludeElement(this.el_.ownerDocument.activeElement)) {\n return;\n }\n\n if (typeof userActions.hotkeys === 'function') {\n userActions.hotkeys.call(this, event);\n } else {\n this.handleHotkeys(event);\n }\n }\n /**\n * Called when this Player receives a hotkey keydown event.\n * Supported player-wide hotkeys are:\n *\n * f - toggle fullscreen\n * m - toggle mute\n * k or Space - toggle play/pause\n *\n * @param {EventTarget~Event} event\n * The `keydown` event that caused this function to be called.\n */\n ;\n\n _proto.handleHotkeys = function handleHotkeys(event) {\n var hotkeys = this.options_.userActions ? this.options_.userActions.hotkeys : {}; // set fullscreenKey, muteKey, playPauseKey from `hotkeys`, use defaults if not set\n\n var _hotkeys$fullscreenKe = hotkeys.fullscreenKey,\n fullscreenKey = _hotkeys$fullscreenKe === void 0 ? function (keydownEvent) {\n return keycode.isEventKey(keydownEvent, 'f');\n } : _hotkeys$fullscreenKe,\n _hotkeys$muteKey = hotkeys.muteKey,\n muteKey = _hotkeys$muteKey === void 0 ? function (keydownEvent) {\n return keycode.isEventKey(keydownEvent, 'm');\n } : _hotkeys$muteKey,\n _hotkeys$playPauseKey = hotkeys.playPauseKey,\n playPauseKey = _hotkeys$playPauseKey === void 0 ? function (keydownEvent) {\n return keycode.isEventKey(keydownEvent, 'k') || keycode.isEventKey(keydownEvent, 'Space');\n } : _hotkeys$playPauseKey;\n\n if (fullscreenKey.call(this, event)) {\n event.preventDefault();\n event.stopPropagation();\n var FSToggle = Component.getComponent('FullscreenToggle');\n\n if (document[this.fsApi_.fullscreenEnabled] !== false) {\n FSToggle.prototype.handleClick.call(this, event);\n }\n } else if (muteKey.call(this, event)) {\n event.preventDefault();\n event.stopPropagation();\n var MuteToggle = Component.getComponent('MuteToggle');\n MuteToggle.prototype.handleClick.call(this, event);\n } else if (playPauseKey.call(this, event)) {\n event.preventDefault();\n event.stopPropagation();\n var PlayToggle = Component.getComponent('PlayToggle');\n PlayToggle.prototype.handleClick.call(this, event);\n }\n }\n /**\n * Check whether the player can play a given mimetype\n *\n * @see https://www.w3.org/TR/2011/WD-html5-20110113/video.html#dom-navigator-canplaytype\n *\n * @param {string} type\n * The mimetype to check\n *\n * @return {string}\n * 'probably', 'maybe', or '' (empty string)\n */\n ;\n\n _proto.canPlayType = function canPlayType(type) {\n var can; // Loop through each playback technology in the options order\n\n for (var i = 0, j = this.options_.techOrder; i < j.length; i++) {\n var techName = j[i];\n var tech = Tech.getTech(techName); // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n\n if (!tech) {\n tech = Component.getComponent(techName);\n } // Check if the current tech is defined before continuing\n\n\n if (!tech) {\n log.error(\"The \\\"\" + techName + \"\\\" tech is undefined. Skipped browser support check for that tech.\");\n continue;\n } // Check if the browser supports this technology\n\n\n if (tech.isSupported()) {\n can = tech.canPlayType(type);\n\n if (can) {\n return can;\n }\n }\n }\n\n return '';\n }\n /**\n * Select source based on tech-order or source-order\n * Uses source-order selection if `options.sourceOrder` is truthy. Otherwise,\n * defaults to tech-order selection\n *\n * @param {Array} sources\n * The sources for a media asset\n *\n * @return {Object|boolean}\n * Object of source and tech order or false\n */\n ;\n\n _proto.selectSource = function selectSource(sources) {\n var _this10 = this; // Get only the techs specified in `techOrder` that exist and are supported by the\n // current platform\n\n\n var techs = this.options_.techOrder.map(function (techName) {\n return [techName, Tech.getTech(techName)];\n }).filter(function (_ref) {\n var techName = _ref[0],\n tech = _ref[1]; // Check if the current tech is defined before continuing\n\n if (tech) {\n // Check if the browser supports this technology\n return tech.isSupported();\n }\n\n log.error(\"The \\\"\" + techName + \"\\\" tech is undefined. Skipped browser support check for that tech.\");\n return false;\n }); // Iterate over each `innerArray` element once per `outerArray` element and execute\n // `tester` with both. If `tester` returns a non-falsy value, exit early and return\n // that value.\n\n var findFirstPassingTechSourcePair = function findFirstPassingTechSourcePair(outerArray, innerArray, tester) {\n var found;\n outerArray.some(function (outerChoice) {\n return innerArray.some(function (innerChoice) {\n found = tester(outerChoice, innerChoice);\n\n if (found) {\n return true;\n }\n });\n });\n return found;\n };\n\n var foundSourceAndTech;\n\n var flip = function flip(fn) {\n return function (a, b) {\n return fn(b, a);\n };\n };\n\n var finder = function finder(_ref2, source) {\n var techName = _ref2[0],\n tech = _ref2[1];\n\n if (tech.canPlaySource(source, _this10.options_[techName.toLowerCase()])) {\n return {\n source: source,\n tech: techName\n };\n }\n }; // Depending on the truthiness of `options.sourceOrder`, we swap the order of techs and sources\n // to select from them based on their priority.\n\n\n if (this.options_.sourceOrder) {\n // Source-first ordering\n foundSourceAndTech = findFirstPassingTechSourcePair(sources, techs, flip(finder));\n } else {\n // Tech-first ordering\n foundSourceAndTech = findFirstPassingTechSourcePair(techs, sources, finder);\n }\n\n return foundSourceAndTech || false;\n }\n /**\n * Get or set the video source.\n *\n * @param {Tech~SourceObject|Tech~SourceObject[]|string} [source]\n * A SourceObject, an array of SourceObjects, or a string referencing\n * a URL to a media source. It is _highly recommended_ that an object\n * or array of objects is used here, so that source selection\n * algorithms can take the `type` into account.\n *\n * If not provided, this method acts as a getter.\n *\n * @return {string|undefined}\n * If the `source` argument is missing, returns the current source\n * URL. Otherwise, returns nothing/undefined.\n */\n ;\n\n _proto.src = function src(source) {\n var _this11 = this; // getter usage\n\n\n if (typeof source === 'undefined') {\n return this.cache_.src || '';\n } // filter out invalid sources and turn our source into\n // an array of source objects\n\n\n var sources = filterSource(source); // if a source was passed in then it is invalid because\n // it was filtered to a zero length Array. So we have to\n // show an error\n\n if (!sources.length) {\n this.setTimeout(function () {\n this.error({\n code: 4,\n message: this.localize(this.options_.notSupportedMessage)\n });\n }, 0);\n return;\n } // intial sources\n\n\n this.changingSrc_ = true;\n this.cache_.sources = sources;\n this.updateSourceCaches_(sources[0]); // middlewareSource is the source after it has been changed by middleware\n\n setSource(this, sources[0], function (middlewareSource, mws) {\n _this11.middleware_ = mws; // since sourceSet is async we have to update the cache again after we select a source since\n // the source that is selected could be out of order from the cache update above this callback.\n\n _this11.cache_.sources = sources;\n\n _this11.updateSourceCaches_(middlewareSource);\n\n var err = _this11.src_(middlewareSource);\n\n if (err) {\n if (sources.length > 1) {\n return _this11.src(sources.slice(1));\n }\n\n _this11.changingSrc_ = false; // We need to wrap this in a timeout to give folks a chance to add error event handlers\n\n _this11.setTimeout(function () {\n this.error({\n code: 4,\n message: this.localize(this.options_.notSupportedMessage)\n });\n }, 0); // we could not find an appropriate tech, but let's still notify the delegate that this is it\n // this needs a better comment about why this is needed\n\n\n _this11.triggerReady();\n\n return;\n }\n\n setTech(mws, _this11.tech_);\n });\n }\n /**\n * Set the source object on the tech, returns a boolean that indicates whether\n * there is a tech that can play the source or not\n *\n * @param {Tech~SourceObject} source\n * The source object to set on the Tech\n *\n * @return {boolean}\n * - True if there is no Tech to playback this source\n * - False otherwise\n *\n * @private\n */\n ;\n\n _proto.src_ = function src_(source) {\n var _this12 = this;\n\n var sourceTech = this.selectSource([source]);\n\n if (!sourceTech) {\n return true;\n }\n\n if (!titleCaseEquals(sourceTech.tech, this.techName_)) {\n this.changingSrc_ = true; // load this technology with the chosen source\n\n this.loadTech_(sourceTech.tech, sourceTech.source);\n this.tech_.ready(function () {\n _this12.changingSrc_ = false;\n });\n return false;\n } // wait until the tech is ready to set the source\n // and set it synchronously if possible (#2326)\n\n\n this.ready(function () {\n // The setSource tech method was added with source handlers\n // so older techs won't support it\n // We need to check the direct prototype for the case where subclasses\n // of the tech do not support source handlers\n if (this.tech_.constructor.prototype.hasOwnProperty('setSource')) {\n this.techCall_('setSource', source);\n } else {\n this.techCall_('src', source.src);\n }\n\n this.changingSrc_ = false;\n }, true);\n return false;\n }\n /**\n * Begin loading the src data.\n */\n ;\n\n _proto.load = function load() {\n this.techCall_('load');\n }\n /**\n * Reset the player. Loads the first tech in the techOrder,\n * removes all the text tracks in the existing `tech`,\n * and calls `reset` on the `tech`.\n */\n ;\n\n _proto.reset = function reset() {\n var _this13 = this;\n\n var PromiseClass = this.options_.Promise || window$1.Promise;\n\n if (this.paused() || !PromiseClass) {\n this.doReset_();\n } else {\n var playPromise = this.play();\n silencePromise(playPromise.then(function () {\n return _this13.doReset_();\n }));\n }\n };\n\n _proto.doReset_ = function doReset_() {\n if (this.tech_) {\n this.tech_.clearTracks('text');\n }\n\n this.resetCache_();\n this.poster('');\n this.loadTech_(this.options_.techOrder[0], null);\n this.techCall_('reset');\n this.resetControlBarUI_();\n\n if (isEvented(this)) {\n this.trigger('playerreset');\n }\n }\n /**\n * Reset Control Bar's UI by calling sub-methods that reset\n * all of Control Bar's components\n */\n ;\n\n _proto.resetControlBarUI_ = function resetControlBarUI_() {\n this.resetProgressBar_();\n this.resetPlaybackRate_();\n this.resetVolumeBar_();\n }\n /**\n * Reset tech's progress so progress bar is reset in the UI\n */\n ;\n\n _proto.resetProgressBar_ = function resetProgressBar_() {\n this.currentTime(0);\n var _this$controlBar = this.controlBar,\n durationDisplay = _this$controlBar.durationDisplay,\n remainingTimeDisplay = _this$controlBar.remainingTimeDisplay;\n\n if (durationDisplay) {\n durationDisplay.updateContent();\n }\n\n if (remainingTimeDisplay) {\n remainingTimeDisplay.updateContent();\n }\n }\n /**\n * Reset Playback ratio\n */\n ;\n\n _proto.resetPlaybackRate_ = function resetPlaybackRate_() {\n this.playbackRate(this.defaultPlaybackRate());\n this.handleTechRateChange_();\n }\n /**\n * Reset Volume bar\n */\n ;\n\n _proto.resetVolumeBar_ = function resetVolumeBar_() {\n this.volume(1.0);\n this.trigger('volumechange');\n }\n /**\n * Returns all of the current source objects.\n *\n * @return {Tech~SourceObject[]}\n * The current source objects\n */\n ;\n\n _proto.currentSources = function currentSources() {\n var source = this.currentSource();\n var sources = []; // assume `{}` or `{ src }`\n\n if (Object.keys(source).length !== 0) {\n sources.push(source);\n }\n\n return this.cache_.sources || sources;\n }\n /**\n * Returns the current source object.\n *\n * @return {Tech~SourceObject}\n * The current source object\n */\n ;\n\n _proto.currentSource = function currentSource() {\n return this.cache_.source || {};\n }\n /**\n * Returns the fully qualified URL of the current source value e.g. http://mysite.com/video.mp4\n * Can be used in conjunction with `currentType` to assist in rebuilding the current source object.\n *\n * @return {string}\n * The current source\n */\n ;\n\n _proto.currentSrc = function currentSrc() {\n return this.currentSource() && this.currentSource().src || '';\n }\n /**\n * Get the current source type e.g. video/mp4\n * This can allow you rebuild the current source object so that you could load the same\n * source and tech later\n *\n * @return {string}\n * The source MIME type\n */\n ;\n\n _proto.currentType = function currentType() {\n return this.currentSource() && this.currentSource().type || '';\n }\n /**\n * Get or set the preload attribute\n *\n * @param {boolean} [value]\n * - true means that we should preload\n * - false means that we should not preload\n *\n * @return {string}\n * The preload attribute value when getting\n */\n ;\n\n _proto.preload = function preload(value) {\n if (value !== undefined) {\n this.techCall_('setPreload', value);\n this.options_.preload = value;\n return;\n }\n\n return this.techGet_('preload');\n }\n /**\n * Get or set the autoplay option. When this is a boolean it will\n * modify the attribute on the tech. When this is a string the attribute on\n * the tech will be removed and `Player` will handle autoplay on loadstarts.\n *\n * @param {boolean|string} [value]\n * - true: autoplay using the browser behavior\n * - false: do not autoplay\n * - 'play': call play() on every loadstart\n * - 'muted': call muted() then play() on every loadstart\n * - 'any': call play() on every loadstart. if that fails call muted() then play().\n * - *: values other than those listed here will be set `autoplay` to true\n *\n * @return {boolean|string}\n * The current value of autoplay when getting\n */\n ;\n\n _proto.autoplay = function autoplay(value) {\n // getter usage\n if (value === undefined) {\n return this.options_.autoplay || false;\n }\n\n var techAutoplay; // if the value is a valid string set it to that\n\n if (typeof value === 'string' && /(any|play|muted)/.test(value)) {\n this.options_.autoplay = value;\n this.manualAutoplay_(value);\n techAutoplay = false; // any falsy value sets autoplay to false in the browser,\n // lets do the same\n } else if (!value) {\n this.options_.autoplay = false; // any other value (ie truthy) sets autoplay to true\n } else {\n this.options_.autoplay = true;\n }\n\n techAutoplay = typeof techAutoplay === 'undefined' ? this.options_.autoplay : techAutoplay; // if we don't have a tech then we do not queue up\n // a setAutoplay call on tech ready. We do this because the\n // autoplay option will be passed in the constructor and we\n // do not need to set it twice\n\n if (this.tech_) {\n this.techCall_('setAutoplay', techAutoplay);\n }\n }\n /**\n * Set or unset the playsinline attribute.\n * Playsinline tells the browser that non-fullscreen playback is preferred.\n *\n * @param {boolean} [value]\n * - true means that we should try to play inline by default\n * - false means that we should use the browser's default playback mode,\n * which in most cases is inline. iOS Safari is a notable exception\n * and plays fullscreen by default.\n *\n * @return {string|Player}\n * - the current value of playsinline\n * - the player when setting\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\n */\n ;\n\n _proto.playsinline = function playsinline(value) {\n if (value !== undefined) {\n this.techCall_('setPlaysinline', value);\n this.options_.playsinline = value;\n return this;\n }\n\n return this.techGet_('playsinline');\n }\n /**\n * Get or set the loop attribute on the video element.\n *\n * @param {boolean} [value]\n * - true means that we should loop the video\n * - false means that we should not loop the video\n *\n * @return {boolean}\n * The current value of loop when getting\n */\n ;\n\n _proto.loop = function loop(value) {\n if (value !== undefined) {\n this.techCall_('setLoop', value);\n this.options_.loop = value;\n return;\n }\n\n return this.techGet_('loop');\n }\n /**\n * Get or set the poster image source url\n *\n * @fires Player#posterchange\n *\n * @param {string} [src]\n * Poster image source URL\n *\n * @return {string}\n * The current value of poster when getting\n */\n ;\n\n _proto.poster = function poster(src) {\n if (src === undefined) {\n return this.poster_;\n } // The correct way to remove a poster is to set as an empty string\n // other falsey values will throw errors\n\n\n if (!src) {\n src = '';\n }\n\n if (src === this.poster_) {\n return;\n } // update the internal poster variable\n\n\n this.poster_ = src; // update the tech's poster\n\n this.techCall_('setPoster', src);\n this.isPosterFromTech_ = false; // alert components that the poster has been set\n\n /**\n * This event fires when the poster image is changed on the player.\n *\n * @event Player#posterchange\n * @type {EventTarget~Event}\n */\n\n this.trigger('posterchange');\n }\n /**\n * Some techs (e.g. YouTube) can provide a poster source in an\n * asynchronous way. We want the poster component to use this\n * poster source so that it covers up the tech's controls.\n * (YouTube's play button). However we only want to use this\n * source if the player user hasn't set a poster through\n * the normal APIs.\n *\n * @fires Player#posterchange\n * @listens Tech#posterchange\n * @private\n */\n ;\n\n _proto.handleTechPosterChange_ = function handleTechPosterChange_() {\n if ((!this.poster_ || this.options_.techCanOverridePoster) && this.tech_ && this.tech_.poster) {\n var newPoster = this.tech_.poster() || '';\n\n if (newPoster !== this.poster_) {\n this.poster_ = newPoster;\n this.isPosterFromTech_ = true; // Let components know the poster has changed\n\n this.trigger('posterchange');\n }\n }\n }\n /**\n * Get or set whether or not the controls are showing.\n *\n * @fires Player#controlsenabled\n *\n * @param {boolean} [bool]\n * - true to turn controls on\n * - false to turn controls off\n *\n * @return {boolean}\n * The current value of controls when getting\n */\n ;\n\n _proto.controls = function controls(bool) {\n if (bool === undefined) {\n return !!this.controls_;\n }\n\n bool = !!bool; // Don't trigger a change event unless it actually changed\n\n if (this.controls_ === bool) {\n return;\n }\n\n this.controls_ = bool;\n\n if (this.usingNativeControls()) {\n this.techCall_('setControls', bool);\n }\n\n if (this.controls_) {\n this.removeClass('vjs-controls-disabled');\n this.addClass('vjs-controls-enabled');\n /**\n * @event Player#controlsenabled\n * @type {EventTarget~Event}\n */\n\n this.trigger('controlsenabled');\n\n if (!this.usingNativeControls()) {\n this.addTechControlsListeners_();\n }\n } else {\n this.removeClass('vjs-controls-enabled');\n this.addClass('vjs-controls-disabled');\n /**\n * @event Player#controlsdisabled\n * @type {EventTarget~Event}\n */\n\n this.trigger('controlsdisabled');\n\n if (!this.usingNativeControls()) {\n this.removeTechControlsListeners_();\n }\n }\n }\n /**\n * Toggle native controls on/off. Native controls are the controls built into\n * devices (e.g. default iPhone controls), Flash, or other techs\n * (e.g. Vimeo Controls)\n * **This should only be set by the current tech, because only the tech knows\n * if it can support native controls**\n *\n * @fires Player#usingnativecontrols\n * @fires Player#usingcustomcontrols\n *\n * @param {boolean} [bool]\n * - true to turn native controls on\n * - false to turn native controls off\n *\n * @return {boolean}\n * The current value of native controls when getting\n */\n ;\n\n _proto.usingNativeControls = function usingNativeControls(bool) {\n if (bool === undefined) {\n return !!this.usingNativeControls_;\n }\n\n bool = !!bool; // Don't trigger a change event unless it actually changed\n\n if (this.usingNativeControls_ === bool) {\n return;\n }\n\n this.usingNativeControls_ = bool;\n\n if (this.usingNativeControls_) {\n this.addClass('vjs-using-native-controls');\n /**\n * player is using the native device controls\n *\n * @event Player#usingnativecontrols\n * @type {EventTarget~Event}\n */\n\n this.trigger('usingnativecontrols');\n } else {\n this.removeClass('vjs-using-native-controls');\n /**\n * player is using the custom HTML controls\n *\n * @event Player#usingcustomcontrols\n * @type {EventTarget~Event}\n */\n\n this.trigger('usingcustomcontrols');\n }\n }\n /**\n * Set or get the current MediaError\n *\n * @fires Player#error\n *\n * @param {MediaError|string|number} [err]\n * A MediaError or a string/number to be turned\n * into a MediaError\n *\n * @return {MediaError|null}\n * The current MediaError when getting (or null)\n */\n ;\n\n _proto.error = function error(err) {\n if (err === undefined) {\n return this.error_ || null;\n } // Suppress the first error message for no compatible source until\n // user interaction\n\n\n if (this.options_.suppressNotSupportedError && err && err.message && err.message === this.localize(this.options_.notSupportedMessage)) {\n var triggerSuppressedError = function triggerSuppressedError() {\n this.error(err);\n };\n\n this.options_.suppressNotSupportedError = false;\n this.any(['click', 'touchstart'], triggerSuppressedError);\n this.one('loadstart', function () {\n this.off(['click', 'touchstart'], triggerSuppressedError);\n });\n return;\n } // restoring to default\n\n\n if (err === null) {\n this.error_ = err;\n this.removeClass('vjs-error');\n\n if (this.errorDisplay) {\n this.errorDisplay.close();\n }\n\n return;\n }\n\n this.error_ = new MediaError(err); // add the vjs-error classname to the player\n\n this.addClass('vjs-error'); // log the name of the error type and any message\n // IE11 logs \"[object object]\" and required you to expand message to see error object\n\n log.error(\"(CODE:\" + this.error_.code + \" \" + MediaError.errorTypes[this.error_.code] + \")\", this.error_.message, this.error_);\n /**\n * @event Player#error\n * @type {EventTarget~Event}\n */\n\n this.trigger('error');\n return;\n }\n /**\n * Report user activity\n *\n * @param {Object} event\n * Event object\n */\n ;\n\n _proto.reportUserActivity = function reportUserActivity(event) {\n this.userActivity_ = true;\n }\n /**\n * Get/set if user is active\n *\n * @fires Player#useractive\n * @fires Player#userinactive\n *\n * @param {boolean} [bool]\n * - true if the user is active\n * - false if the user is inactive\n *\n * @return {boolean}\n * The current value of userActive when getting\n */\n ;\n\n _proto.userActive = function userActive(bool) {\n if (bool === undefined) {\n return this.userActive_;\n }\n\n bool = !!bool;\n\n if (bool === this.userActive_) {\n return;\n }\n\n this.userActive_ = bool;\n\n if (this.userActive_) {\n this.userActivity_ = true;\n this.removeClass('vjs-user-inactive');\n this.addClass('vjs-user-active');\n /**\n * @event Player#useractive\n * @type {EventTarget~Event}\n */\n\n this.trigger('useractive');\n return;\n } // Chrome/Safari/IE have bugs where when you change the cursor it can\n // trigger a mousemove event. This causes an issue when you're hiding\n // the cursor when the user is inactive, and a mousemove signals user\n // activity. Making it impossible to go into inactive mode. Specifically\n // this happens in fullscreen when we really need to hide the cursor.\n //\n // When this gets resolved in ALL browsers it can be removed\n // https://code.google.com/p/chromium/issues/detail?id=103041\n\n\n if (this.tech_) {\n this.tech_.one('mousemove', function (e) {\n e.stopPropagation();\n e.preventDefault();\n });\n }\n\n this.userActivity_ = false;\n this.removeClass('vjs-user-active');\n this.addClass('vjs-user-inactive');\n /**\n * @event Player#userinactive\n * @type {EventTarget~Event}\n */\n\n this.trigger('userinactive');\n }\n /**\n * Listen for user activity based on timeout value\n *\n * @private\n */\n ;\n\n _proto.listenForUserActivity_ = function listenForUserActivity_() {\n var mouseInProgress;\n var lastMoveX;\n var lastMoveY;\n var handleActivity = bind(this, this.reportUserActivity);\n\n var handleMouseMove = function handleMouseMove(e) {\n // #1068 - Prevent mousemove spamming\n // Chrome Bug: https://code.google.com/p/chromium/issues/detail?id=366970\n if (e.screenX !== lastMoveX || e.screenY !== lastMoveY) {\n lastMoveX = e.screenX;\n lastMoveY = e.screenY;\n handleActivity();\n }\n };\n\n var handleMouseDown = function handleMouseDown() {\n handleActivity(); // For as long as the they are touching the device or have their mouse down,\n // we consider them active even if they're not moving their finger or mouse.\n // So we want to continue to update that they are active\n\n this.clearInterval(mouseInProgress); // Setting userActivity=true now and setting the interval to the same time\n // as the activityCheck interval (250) should ensure we never miss the\n // next activityCheck\n\n mouseInProgress = this.setInterval(handleActivity, 250);\n };\n\n var handleMouseUp = function handleMouseUp(event) {\n handleActivity(); // Stop the interval that maintains activity if the mouse/touch is down\n\n this.clearInterval(mouseInProgress);\n }; // Any mouse movement will be considered user activity\n\n\n this.on('mousedown', handleMouseDown);\n this.on('mousemove', handleMouseMove);\n this.on('mouseup', handleMouseUp);\n var controlBar = this.getChild('controlBar'); // Fixes bug on Android & iOS where when tapping progressBar (when control bar is displayed)\n // controlBar would no longer be hidden by default timeout.\n\n if (controlBar && !IS_IOS && !IS_ANDROID) {\n controlBar.on('mouseenter', function (event) {\n this.player().cache_.inactivityTimeout = this.player().options_.inactivityTimeout;\n this.player().options_.inactivityTimeout = 0;\n });\n controlBar.on('mouseleave', function (event) {\n this.player().options_.inactivityTimeout = this.player().cache_.inactivityTimeout;\n });\n } // Listen for keyboard navigation\n // Shouldn't need to use inProgress interval because of key repeat\n\n\n this.on('keydown', handleActivity);\n this.on('keyup', handleActivity); // Run an interval every 250 milliseconds instead of stuffing everything into\n // the mousemove/touchmove function itself, to prevent performance degradation.\n // `this.reportUserActivity` simply sets this.userActivity_ to true, which\n // then gets picked up by this loop\n // http://ejohn.org/blog/learning-from-twitter/\n\n var inactivityTimeout;\n this.setInterval(function () {\n // Check to see if mouse/touch activity has happened\n if (!this.userActivity_) {\n return;\n } // Reset the activity tracker\n\n\n this.userActivity_ = false; // If the user state was inactive, set the state to active\n\n this.userActive(true); // Clear any existing inactivity timeout to start the timer over\n\n this.clearTimeout(inactivityTimeout);\n var timeout = this.options_.inactivityTimeout;\n\n if (timeout <= 0) {\n return;\n } // In <timeout> milliseconds, if no more activity has occurred the\n // user will be considered inactive\n\n\n inactivityTimeout = this.setTimeout(function () {\n // Protect against the case where the inactivityTimeout can trigger just\n // before the next user activity is picked up by the activity check loop\n // causing a flicker\n if (!this.userActivity_) {\n this.userActive(false);\n }\n }, timeout);\n }, 250);\n }\n /**\n * Gets or sets the current playback rate. A playback rate of\n * 1.0 represents normal speed and 0.5 would indicate half-speed\n * playback, for instance.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-playbackrate\n *\n * @param {number} [rate]\n * New playback rate to set.\n *\n * @return {number}\n * The current playback rate when getting or 1.0\n */\n ;\n\n _proto.playbackRate = function playbackRate(rate) {\n if (rate !== undefined) {\n // NOTE: this.cache_.lastPlaybackRate is set from the tech handler\n // that is registered above\n this.techCall_('setPlaybackRate', rate);\n return;\n }\n\n if (this.tech_ && this.tech_.featuresPlaybackRate) {\n return this.cache_.lastPlaybackRate || this.techGet_('playbackRate');\n }\n\n return 1.0;\n }\n /**\n * Gets or sets the current default playback rate. A default playback rate of\n * 1.0 represents normal speed and 0.5 would indicate half-speed playback, for instance.\n * defaultPlaybackRate will only represent what the initial playbackRate of a video was, not\n * not the current playbackRate.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-defaultplaybackrate\n *\n * @param {number} [rate]\n * New default playback rate to set.\n *\n * @return {number|Player}\n * - The default playback rate when getting or 1.0\n * - the player when setting\n */\n ;\n\n _proto.defaultPlaybackRate = function defaultPlaybackRate(rate) {\n if (rate !== undefined) {\n return this.techCall_('setDefaultPlaybackRate', rate);\n }\n\n if (this.tech_ && this.tech_.featuresPlaybackRate) {\n return this.techGet_('defaultPlaybackRate');\n }\n\n return 1.0;\n }\n /**\n * Gets or sets the audio flag\n *\n * @param {boolean} bool\n * - true signals that this is an audio player\n * - false signals that this is not an audio player\n *\n * @return {boolean}\n * The current value of isAudio when getting\n */\n ;\n\n _proto.isAudio = function isAudio(bool) {\n if (bool !== undefined) {\n this.isAudio_ = !!bool;\n return;\n }\n\n return !!this.isAudio_;\n }\n /**\n * A helper method for adding a {@link TextTrack} to our\n * {@link TextTrackList}.\n *\n * In addition to the W3C settings we allow adding additional info through options.\n *\n * @see http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-addtexttrack\n *\n * @param {string} [kind]\n * the kind of TextTrack you are adding\n *\n * @param {string} [label]\n * the label to give the TextTrack label\n *\n * @param {string} [language]\n * the language to set on the TextTrack\n *\n * @return {TextTrack|undefined}\n * the TextTrack that was added or undefined\n * if there is no tech\n */\n ;\n\n _proto.addTextTrack = function addTextTrack(kind, label, language) {\n if (this.tech_) {\n return this.tech_.addTextTrack(kind, label, language);\n }\n }\n /**\n * Create a remote {@link TextTrack} and an {@link HTMLTrackElement}. It will\n * automatically removed from the video element whenever the source changes, unless\n * manualCleanup is set to false.\n *\n * @param {Object} options\n * Options to pass to {@link HTMLTrackElement} during creation. See\n * {@link HTMLTrackElement} for object properties that you should use.\n *\n * @param {boolean} [manualCleanup=true] if set to false, the TextTrack will be\n *\n * @return {HtmlTrackElement}\n * the HTMLTrackElement that was created and added\n * to the HtmlTrackElementList and the remote\n * TextTrackList\n *\n * @deprecated The default value of the \"manualCleanup\" parameter will default\n * to \"false\" in upcoming versions of Video.js\n */\n ;\n\n _proto.addRemoteTextTrack = function addRemoteTextTrack(options, manualCleanup) {\n if (this.tech_) {\n return this.tech_.addRemoteTextTrack(options, manualCleanup);\n }\n }\n /**\n * Remove a remote {@link TextTrack} from the respective\n * {@link TextTrackList} and {@link HtmlTrackElementList}.\n *\n * @param {Object} track\n * Remote {@link TextTrack} to remove\n *\n * @return {undefined}\n * does not return anything\n */\n ;\n\n _proto.removeRemoteTextTrack = function removeRemoteTextTrack(obj) {\n if (obj === void 0) {\n obj = {};\n }\n\n var _obj = obj,\n track = _obj.track;\n\n if (!track) {\n track = obj;\n } // destructure the input into an object with a track argument, defaulting to arguments[0]\n // default the whole argument to an empty object if nothing was passed in\n\n\n if (this.tech_) {\n return this.tech_.removeRemoteTextTrack(track);\n }\n }\n /**\n * Gets available media playback quality metrics as specified by the W3C's Media\n * Playback Quality API.\n *\n * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\n *\n * @return {Object|undefined}\n * An object with supported media playback quality metrics or undefined if there\n * is no tech or the tech does not support it.\n */\n ;\n\n _proto.getVideoPlaybackQuality = function getVideoPlaybackQuality() {\n return this.techGet_('getVideoPlaybackQuality');\n }\n /**\n * Get video width\n *\n * @return {number}\n * current video width\n */\n ;\n\n _proto.videoWidth = function videoWidth() {\n return this.tech_ && this.tech_.videoWidth && this.tech_.videoWidth() || 0;\n }\n /**\n * Get video height\n *\n * @return {number}\n * current video height\n */\n ;\n\n _proto.videoHeight = function videoHeight() {\n return this.tech_ && this.tech_.videoHeight && this.tech_.videoHeight() || 0;\n }\n /**\n * The player's language code\n * NOTE: The language should be set in the player options if you want the\n * the controls to be built with a specific language. Changing the language\n * later will not update controls text.\n *\n * @param {string} [code]\n * the language code to set the player to\n *\n * @return {string}\n * The current language code when getting\n */\n ;\n\n _proto.language = function language(code) {\n if (code === undefined) {\n return this.language_;\n }\n\n this.language_ = String(code).toLowerCase();\n }\n /**\n * Get the player's language dictionary\n * Merge every time, because a newly added plugin might call videojs.addLanguage() at any time\n * Languages specified directly in the player options have precedence\n *\n * @return {Array}\n * An array of of supported languages\n */\n ;\n\n _proto.languages = function languages() {\n return mergeOptions(Player.prototype.options_.languages, this.languages_);\n }\n /**\n * returns a JavaScript object reperesenting the current track\n * information. **DOES not return it as JSON**\n *\n * @return {Object}\n * Object representing the current of track info\n */\n ;\n\n _proto.toJSON = function toJSON() {\n var options = mergeOptions(this.options_);\n var tracks = options.tracks;\n options.tracks = [];\n\n for (var i = 0; i < tracks.length; i++) {\n var track = tracks[i]; // deep merge tracks and null out player so no circular references\n\n track = mergeOptions(track);\n track.player = undefined;\n options.tracks[i] = track;\n }\n\n return options;\n }\n /**\n * Creates a simple modal dialog (an instance of the {@link ModalDialog}\n * component) that immediately overlays the player with arbitrary\n * content and removes itself when closed.\n *\n * @param {string|Function|Element|Array|null} content\n * Same as {@link ModalDialog#content}'s param of the same name.\n * The most straight-forward usage is to provide a string or DOM\n * element.\n *\n * @param {Object} [options]\n * Extra options which will be passed on to the {@link ModalDialog}.\n *\n * @return {ModalDialog}\n * the {@link ModalDialog} that was created\n */\n ;\n\n _proto.createModal = function createModal(content, options) {\n var _this14 = this;\n\n options = options || {};\n options.content = content || '';\n var modal = new ModalDialog(this, options);\n this.addChild(modal);\n modal.on('dispose', function () {\n _this14.removeChild(modal);\n });\n modal.open();\n return modal;\n }\n /**\n * Change breakpoint classes when the player resizes.\n *\n * @private\n */\n ;\n\n _proto.updateCurrentBreakpoint_ = function updateCurrentBreakpoint_() {\n if (!this.responsive()) {\n return;\n }\n\n var currentBreakpoint = this.currentBreakpoint();\n var currentWidth = this.currentWidth();\n\n for (var i = 0; i < BREAKPOINT_ORDER.length; i++) {\n var candidateBreakpoint = BREAKPOINT_ORDER[i];\n var maxWidth = this.breakpoints_[candidateBreakpoint];\n\n if (currentWidth <= maxWidth) {\n // The current breakpoint did not change, nothing to do.\n if (currentBreakpoint === candidateBreakpoint) {\n return;\n } // Only remove a class if there is a current breakpoint.\n\n\n if (currentBreakpoint) {\n this.removeClass(BREAKPOINT_CLASSES[currentBreakpoint]);\n }\n\n this.addClass(BREAKPOINT_CLASSES[candidateBreakpoint]);\n this.breakpoint_ = candidateBreakpoint;\n break;\n }\n }\n }\n /**\n * Removes the current breakpoint.\n *\n * @private\n */\n ;\n\n _proto.removeCurrentBreakpoint_ = function removeCurrentBreakpoint_() {\n var className = this.currentBreakpointClass();\n this.breakpoint_ = '';\n\n if (className) {\n this.removeClass(className);\n }\n }\n /**\n * Get or set breakpoints on the player.\n *\n * Calling this method with an object or `true` will remove any previous\n * custom breakpoints and start from the defaults again.\n *\n * @param {Object|boolean} [breakpoints]\n * If an object is given, it can be used to provide custom\n * breakpoints. If `true` is given, will set default breakpoints.\n * If this argument is not given, will simply return the current\n * breakpoints.\n *\n * @param {number} [breakpoints.tiny]\n * The maximum width for the \"vjs-layout-tiny\" class.\n *\n * @param {number} [breakpoints.xsmall]\n * The maximum width for the \"vjs-layout-x-small\" class.\n *\n * @param {number} [breakpoints.small]\n * The maximum width for the \"vjs-layout-small\" class.\n *\n * @param {number} [breakpoints.medium]\n * The maximum width for the \"vjs-layout-medium\" class.\n *\n * @param {number} [breakpoints.large]\n * The maximum width for the \"vjs-layout-large\" class.\n *\n * @param {number} [breakpoints.xlarge]\n * The maximum width for the \"vjs-layout-x-large\" class.\n *\n * @param {number} [breakpoints.huge]\n * The maximum width for the \"vjs-layout-huge\" class.\n *\n * @return {Object}\n * An object mapping breakpoint names to maximum width values.\n */\n ;\n\n _proto.breakpoints = function breakpoints(_breakpoints) {\n // Used as a getter.\n if (_breakpoints === undefined) {\n return assign(this.breakpoints_);\n }\n\n this.breakpoint_ = '';\n this.breakpoints_ = assign({}, DEFAULT_BREAKPOINTS, _breakpoints); // When breakpoint definitions change, we need to update the currently\n // selected breakpoint.\n\n this.updateCurrentBreakpoint_(); // Clone the breakpoints before returning.\n\n return assign(this.breakpoints_);\n }\n /**\n * Get or set a flag indicating whether or not this player should adjust\n * its UI based on its dimensions.\n *\n * @param {boolean} value\n * Should be `true` if the player should adjust its UI based on its\n * dimensions; otherwise, should be `false`.\n *\n * @return {boolean}\n * Will be `true` if this player should adjust its UI based on its\n * dimensions; otherwise, will be `false`.\n */\n ;\n\n _proto.responsive = function responsive(value) {\n // Used as a getter.\n if (value === undefined) {\n return this.responsive_;\n }\n\n value = Boolean(value);\n var current = this.responsive_; // Nothing changed.\n\n if (value === current) {\n return;\n } // The value actually changed, set it.\n\n\n this.responsive_ = value; // Start listening for breakpoints and set the initial breakpoint if the\n // player is now responsive.\n\n if (value) {\n this.on('playerresize', this.updateCurrentBreakpoint_);\n this.updateCurrentBreakpoint_(); // Stop listening for breakpoints if the player is no longer responsive.\n } else {\n this.off('playerresize', this.updateCurrentBreakpoint_);\n this.removeCurrentBreakpoint_();\n }\n\n return value;\n }\n /**\n * Get current breakpoint name, if any.\n *\n * @return {string}\n * If there is currently a breakpoint set, returns a the key from the\n * breakpoints object matching it. Otherwise, returns an empty string.\n */\n ;\n\n _proto.currentBreakpoint = function currentBreakpoint() {\n return this.breakpoint_;\n }\n /**\n * Get the current breakpoint class name.\n *\n * @return {string}\n * The matching class name (e.g. `\"vjs-layout-tiny\"` or\n * `\"vjs-layout-large\"`) for the current breakpoint. Empty string if\n * there is no current breakpoint.\n */\n ;\n\n _proto.currentBreakpointClass = function currentBreakpointClass() {\n return BREAKPOINT_CLASSES[this.breakpoint_] || '';\n }\n /**\n * An object that describes a single piece of media.\n *\n * Properties that are not part of this type description will be retained; so,\n * this can be viewed as a generic metadata storage mechanism as well.\n *\n * @see {@link https://wicg.github.io/mediasession/#the-mediametadata-interface}\n * @typedef {Object} Player~MediaObject\n *\n * @property {string} [album]\n * Unused, except if this object is passed to the `MediaSession`\n * API.\n *\n * @property {string} [artist]\n * Unused, except if this object is passed to the `MediaSession`\n * API.\n *\n * @property {Object[]} [artwork]\n * Unused, except if this object is passed to the `MediaSession`\n * API. If not specified, will be populated via the `poster`, if\n * available.\n *\n * @property {string} [poster]\n * URL to an image that will display before playback.\n *\n * @property {Tech~SourceObject|Tech~SourceObject[]|string} [src]\n * A single source object, an array of source objects, or a string\n * referencing a URL to a media source. It is _highly recommended_\n * that an object or array of objects is used here, so that source\n * selection algorithms can take the `type` into account.\n *\n * @property {string} [title]\n * Unused, except if this object is passed to the `MediaSession`\n * API.\n *\n * @property {Object[]} [textTracks]\n * An array of objects to be used to create text tracks, following\n * the {@link https://www.w3.org/TR/html50/embedded-content-0.html#the-track-element|native track element format}.\n * For ease of removal, these will be created as \"remote\" text\n * tracks and set to automatically clean up on source changes.\n *\n * These objects may have properties like `src`, `kind`, `label`,\n * and `language`, see {@link Tech#createRemoteTextTrack}.\n */\n\n /**\n * Populate the player using a {@link Player~MediaObject|MediaObject}.\n *\n * @param {Player~MediaObject} media\n * A media object.\n *\n * @param {Function} ready\n * A callback to be called when the player is ready.\n */\n ;\n\n _proto.loadMedia = function loadMedia(media, ready) {\n var _this15 = this;\n\n if (!media || typeof media !== 'object') {\n return;\n }\n\n this.reset(); // Clone the media object so it cannot be mutated from outside.\n\n this.cache_.media = mergeOptions(media);\n var _this$cache_$media = this.cache_.media,\n artwork = _this$cache_$media.artwork,\n poster = _this$cache_$media.poster,\n src = _this$cache_$media.src,\n textTracks = _this$cache_$media.textTracks; // If `artwork` is not given, create it using `poster`.\n\n if (!artwork && poster) {\n this.cache_.media.artwork = [{\n src: poster,\n type: getMimetype(poster)\n }];\n }\n\n if (src) {\n this.src(src);\n }\n\n if (poster) {\n this.poster(poster);\n }\n\n if (Array.isArray(textTracks)) {\n textTracks.forEach(function (tt) {\n return _this15.addRemoteTextTrack(tt, false);\n });\n }\n\n this.ready(ready);\n }\n /**\n * Get a clone of the current {@link Player~MediaObject} for this player.\n *\n * If the `loadMedia` method has not been used, will attempt to return a\n * {@link Player~MediaObject} based on the current state of the player.\n *\n * @return {Player~MediaObject}\n */\n ;\n\n _proto.getMedia = function getMedia() {\n if (!this.cache_.media) {\n var poster = this.poster();\n var src = this.currentSources();\n var textTracks = Array.prototype.map.call(this.remoteTextTracks(), function (tt) {\n return {\n kind: tt.kind,\n label: tt.label,\n language: tt.language,\n src: tt.src\n };\n });\n var media = {\n src: src,\n textTracks: textTracks\n };\n\n if (poster) {\n media.poster = poster;\n media.artwork = [{\n src: media.poster,\n type: getMimetype(media.poster)\n }];\n }\n\n return media;\n }\n\n return mergeOptions(this.cache_.media);\n }\n /**\n * Gets tag settings\n *\n * @param {Element} tag\n * The player tag\n *\n * @return {Object}\n * An object containing all of the settings\n * for a player tag\n */\n ;\n\n Player.getTagSettings = function getTagSettings(tag) {\n var baseOptions = {\n sources: [],\n tracks: []\n };\n var tagOptions = getAttributes(tag);\n var dataSetup = tagOptions['data-setup'];\n\n if (hasClass(tag, 'vjs-fill')) {\n tagOptions.fill = true;\n }\n\n if (hasClass(tag, 'vjs-fluid')) {\n tagOptions.fluid = true;\n } // Check if data-setup attr exists.\n\n\n if (dataSetup !== null) {\n // Parse options JSON\n // If empty string, make it a parsable json object.\n var _safeParseTuple = safeParseTuple(dataSetup || '{}'),\n err = _safeParseTuple[0],\n data = _safeParseTuple[1];\n\n if (err) {\n log.error(err);\n }\n\n assign(tagOptions, data);\n }\n\n assign(baseOptions, tagOptions); // Get tag children settings\n\n if (tag.hasChildNodes()) {\n var children = tag.childNodes;\n\n for (var i = 0, j = children.length; i < j; i++) {\n var child = children[i]; // Change case needed: http://ejohn.org/blog/nodename-case-sensitivity/\n\n var childName = child.nodeName.toLowerCase();\n\n if (childName === 'source') {\n baseOptions.sources.push(getAttributes(child));\n } else if (childName === 'track') {\n baseOptions.tracks.push(getAttributes(child));\n }\n }\n }\n\n return baseOptions;\n }\n /**\n * Determine whether or not flexbox is supported\n *\n * @return {boolean}\n * - true if flexbox is supported\n * - false if flexbox is not supported\n */\n ;\n\n _proto.flexNotSupported_ = function flexNotSupported_() {\n var elem = document.createElement('i'); // Note: We don't actually use flexBasis (or flexOrder), but it's one of the more\n // common flex features that we can rely on when checking for flex support.\n\n return !('flexBasis' in elem.style || 'webkitFlexBasis' in elem.style || 'mozFlexBasis' in elem.style || 'msFlexBasis' in elem.style || // IE10-specific (2012 flex spec), available for completeness\n 'msFlexOrder' in elem.style);\n };\n\n return Player;\n}(Component);\n/**\n * Get the {@link VideoTrackList}\n * @link https://html.spec.whatwg.org/multipage/embedded-content.html#videotracklist\n *\n * @return {VideoTrackList}\n * the current video track list\n *\n * @method Player.prototype.videoTracks\n */\n\n/**\n * Get the {@link AudioTrackList}\n * @link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotracklist\n *\n * @return {AudioTrackList}\n * the current audio track list\n *\n * @method Player.prototype.audioTracks\n */\n\n/**\n * Get the {@link TextTrackList}\n *\n * @link http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks\n *\n * @return {TextTrackList}\n * the current text track list\n *\n * @method Player.prototype.textTracks\n */\n\n/**\n * Get the remote {@link TextTrackList}\n *\n * @return {TextTrackList}\n * The current remote text track list\n *\n * @method Player.prototype.remoteTextTracks\n */\n\n/**\n * Get the remote {@link HtmlTrackElementList} tracks.\n *\n * @return {HtmlTrackElementList}\n * The current remote text track element list\n *\n * @method Player.prototype.remoteTextTrackEls\n */\n\n\nALL.names.forEach(function (name) {\n var props = ALL[name];\n\n Player.prototype[props.getterName] = function () {\n if (this.tech_) {\n return this.tech_[props.getterName]();\n } // if we have not yet loadTech_, we create {video,audio,text}Tracks_\n // these will be passed to the tech during loading\n\n\n this[props.privateName] = this[props.privateName] || new props.ListClass();\n return this[props.privateName];\n };\n});\n/**\n * Global enumeration of players.\n *\n * The keys are the player IDs and the values are either the {@link Player}\n * instance or `null` for disposed players.\n *\n * @type {Object}\n */\n\nPlayer.players = {};\nvar navigator = window$1.navigator;\n/*\n * Player instance options, surfaced using options\n * options = Player.prototype.options_\n * Make changes in options, not here.\n *\n * @type {Object}\n * @private\n */\n\nPlayer.prototype.options_ = {\n // Default order of fallback technology\n techOrder: Tech.defaultTechOrder_,\n html5: {},\n flash: {},\n // default inactivity timeout\n inactivityTimeout: 2000,\n // default playback rates\n playbackRates: [],\n // Add playback rate selection by adding rates\n // 'playbackRates': [0.5, 1, 1.5, 2],\n liveui: false,\n // Included control sets\n children: ['mediaLoader', 'posterImage', 'textTrackDisplay', 'loadingSpinner', 'bigPlayButton', 'liveTracker', 'controlBar', 'errorDisplay', 'textTrackSettings', 'resizeManager'],\n language: navigator && (navigator.languages && navigator.languages[0] || navigator.userLanguage || navigator.language) || 'en',\n // locales and their language translations\n languages: {},\n // Default message to show when a video cannot be played.\n notSupportedMessage: 'No compatible source was found for this media.',\n fullscreen: {\n options: {\n navigationUI: 'hide'\n }\n },\n breakpoints: {},\n responsive: false\n};\n[\n/**\n * Returns whether or not the player is in the \"ended\" state.\n *\n * @return {Boolean} True if the player is in the ended state, false if not.\n * @method Player#ended\n */\n'ended',\n/**\n * Returns whether or not the player is in the \"seeking\" state.\n *\n * @return {Boolean} True if the player is in the seeking state, false if not.\n * @method Player#seeking\n */\n'seeking',\n/**\n * Returns the TimeRanges of the media that are currently available\n * for seeking to.\n *\n * @return {TimeRanges} the seekable intervals of the media timeline\n * @method Player#seekable\n */\n'seekable',\n/**\n * Returns the current state of network activity for the element, from\n * the codes in the list below.\n * - NETWORK_EMPTY (numeric value 0)\n * The element has not yet been initialised. All attributes are in\n * their initial states.\n * - NETWORK_IDLE (numeric value 1)\n * The element's resource selection algorithm is active and has\n * selected a resource, but it is not actually using the network at\n * this time.\n * - NETWORK_LOADING (numeric value 2)\n * The user agent is actively trying to download data.\n * - NETWORK_NO_SOURCE (numeric value 3)\n * The element's resource selection algorithm is active, but it has\n * not yet found a resource to use.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states\n * @return {number} the current network activity state\n * @method Player#networkState\n */\n'networkState',\n/**\n * Returns a value that expresses the current state of the element\n * with respect to rendering the current playback position, from the\n * codes in the list below.\n * - HAVE_NOTHING (numeric value 0)\n * No information regarding the media resource is available.\n * - HAVE_METADATA (numeric value 1)\n * Enough of the resource has been obtained that the duration of the\n * resource is available.\n * - HAVE_CURRENT_DATA (numeric value 2)\n * Data for the immediate current playback position is available.\n * - HAVE_FUTURE_DATA (numeric value 3)\n * Data for the immediate current playback position is available, as\n * well as enough data for the user agent to advance the current\n * playback position in the direction of playback.\n * - HAVE_ENOUGH_DATA (numeric value 4)\n * The user agent estimates that enough data is available for\n * playback to proceed uninterrupted.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate\n * @return {number} the current playback rendering state\n * @method Player#readyState\n */\n'readyState'].forEach(function (fn) {\n Player.prototype[fn] = function () {\n return this.techGet_(fn);\n };\n});\nTECH_EVENTS_RETRIGGER.forEach(function (event) {\n Player.prototype[\"handleTech\" + toTitleCase(event) + \"_\"] = function () {\n return this.trigger(event);\n };\n});\n/**\n * Fired when the player has initial duration and dimension information\n *\n * @event Player#loadedmetadata\n * @type {EventTarget~Event}\n */\n\n/**\n * Fired when the player has downloaded data at the current playback position\n *\n * @event Player#loadeddata\n * @type {EventTarget~Event}\n */\n\n/**\n * Fired when the current playback position has changed *\n * During playback this is fired every 15-250 milliseconds, depending on the\n * playback technology in use.\n *\n * @event Player#timeupdate\n * @type {EventTarget~Event}\n */\n\n/**\n * Fired when the volume changes\n *\n * @event Player#volumechange\n * @type {EventTarget~Event}\n */\n\n/**\n * Reports whether or not a player has a plugin available.\n *\n * This does not report whether or not the plugin has ever been initialized\n * on this player. For that, [usingPlugin]{@link Player#usingPlugin}.\n *\n * @method Player#hasPlugin\n * @param {string} name\n * The name of a plugin.\n *\n * @return {boolean}\n * Whether or not this player has the requested plugin available.\n */\n\n/**\n * Reports whether or not a player is using a plugin by name.\n *\n * For basic plugins, this only reports whether the plugin has _ever_ been\n * initialized on this player.\n *\n * @method Player#usingPlugin\n * @param {string} name\n * The name of a plugin.\n *\n * @return {boolean}\n * Whether or not this player is using the requested plugin.\n */\n\nComponent.registerComponent('Player', Player);\n/**\n * The base plugin name.\n *\n * @private\n * @constant\n * @type {string}\n */\n\nvar BASE_PLUGIN_NAME = 'plugin';\n/**\n * The key on which a player's active plugins cache is stored.\n *\n * @private\n * @constant\n * @type {string}\n */\n\nvar PLUGIN_CACHE_KEY = 'activePlugins_';\n/**\n * Stores registered plugins in a private space.\n *\n * @private\n * @type {Object}\n */\n\nvar pluginStorage = {};\n/**\n * Reports whether or not a plugin has been registered.\n *\n * @private\n * @param {string} name\n * The name of a plugin.\n *\n * @return {boolean}\n * Whether or not the plugin has been registered.\n */\n\nvar pluginExists = function pluginExists(name) {\n return pluginStorage.hasOwnProperty(name);\n};\n/**\n * Get a single registered plugin by name.\n *\n * @private\n * @param {string} name\n * The name of a plugin.\n *\n * @return {Function|undefined}\n * The plugin (or undefined).\n */\n\n\nvar getPlugin = function getPlugin(name) {\n return pluginExists(name) ? pluginStorage[name] : undefined;\n};\n/**\n * Marks a plugin as \"active\" on a player.\n *\n * Also, ensures that the player has an object for tracking active plugins.\n *\n * @private\n * @param {Player} player\n * A Video.js player instance.\n *\n * @param {string} name\n * The name of a plugin.\n */\n\n\nvar markPluginAsActive = function markPluginAsActive(player, name) {\n player[PLUGIN_CACHE_KEY] = player[PLUGIN_CACHE_KEY] || {};\n player[PLUGIN_CACHE_KEY][name] = true;\n};\n/**\n * Triggers a pair of plugin setup events.\n *\n * @private\n * @param {Player} player\n * A Video.js player instance.\n *\n * @param {Plugin~PluginEventHash} hash\n * A plugin event hash.\n *\n * @param {boolean} [before]\n * If true, prefixes the event name with \"before\". In other words,\n * use this to trigger \"beforepluginsetup\" instead of \"pluginsetup\".\n */\n\n\nvar triggerSetupEvent = function triggerSetupEvent(player, hash, before) {\n var eventName = (before ? 'before' : '') + 'pluginsetup';\n player.trigger(eventName, hash);\n player.trigger(eventName + ':' + hash.name, hash);\n};\n/**\n * Takes a basic plugin function and returns a wrapper function which marks\n * on the player that the plugin has been activated.\n *\n * @private\n * @param {string} name\n * The name of the plugin.\n *\n * @param {Function} plugin\n * The basic plugin.\n *\n * @return {Function}\n * A wrapper function for the given plugin.\n */\n\n\nvar createBasicPlugin = function createBasicPlugin(name, plugin) {\n var basicPluginWrapper = function basicPluginWrapper() {\n // We trigger the \"beforepluginsetup\" and \"pluginsetup\" events on the player\n // regardless, but we want the hash to be consistent with the hash provided\n // for advanced plugins.\n //\n // The only potentially counter-intuitive thing here is the `instance` in\n // the \"pluginsetup\" event is the value returned by the `plugin` function.\n triggerSetupEvent(this, {\n name: name,\n plugin: plugin,\n instance: null\n }, true);\n var instance = plugin.apply(this, arguments);\n markPluginAsActive(this, name);\n triggerSetupEvent(this, {\n name: name,\n plugin: plugin,\n instance: instance\n });\n return instance;\n };\n\n Object.keys(plugin).forEach(function (prop) {\n basicPluginWrapper[prop] = plugin[prop];\n });\n return basicPluginWrapper;\n};\n/**\n * Takes a plugin sub-class and returns a factory function for generating\n * instances of it.\n *\n * This factory function will replace itself with an instance of the requested\n * sub-class of Plugin.\n *\n * @private\n * @param {string} name\n * The name of the plugin.\n *\n * @param {Plugin} PluginSubClass\n * The advanced plugin.\n *\n * @return {Function}\n */\n\n\nvar createPluginFactory = function createPluginFactory(name, PluginSubClass) {\n // Add a `name` property to the plugin prototype so that each plugin can\n // refer to itself by name.\n PluginSubClass.prototype.name = name;\n return function () {\n triggerSetupEvent(this, {\n name: name,\n plugin: PluginSubClass,\n instance: null\n }, true);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var instance = _construct(PluginSubClass, [this].concat(args)); // The plugin is replaced by a function that returns the current instance.\n\n\n this[name] = function () {\n return instance;\n };\n\n triggerSetupEvent(this, instance.getEventHash());\n return instance;\n };\n};\n/**\n * Parent class for all advanced plugins.\n *\n * @mixes module:evented~EventedMixin\n * @mixes module:stateful~StatefulMixin\n * @fires Player#beforepluginsetup\n * @fires Player#beforepluginsetup:$name\n * @fires Player#pluginsetup\n * @fires Player#pluginsetup:$name\n * @listens Player#dispose\n * @throws {Error}\n * If attempting to instantiate the base {@link Plugin} class\n * directly instead of via a sub-class.\n */\n\n\nvar Plugin =\n/*#__PURE__*/\nfunction () {\n /**\n * Creates an instance of this class.\n *\n * Sub-classes should call `super` to ensure plugins are properly initialized.\n *\n * @param {Player} player\n * A Video.js player instance.\n */\n function Plugin(player) {\n if (this.constructor === Plugin) {\n throw new Error('Plugin must be sub-classed; not directly instantiated.');\n }\n\n this.player = player; // Make this object evented, but remove the added `trigger` method so we\n // use the prototype version instead.\n\n evented(this);\n delete this.trigger;\n stateful(this, this.constructor.defaultState);\n markPluginAsActive(player, this.name); // Auto-bind the dispose method so we can use it as a listener and unbind\n // it later easily.\n\n this.dispose = bind(this, this.dispose); // If the player is disposed, dispose the plugin.\n\n player.on('dispose', this.dispose);\n }\n /**\n * Get the version of the plugin that was set on <pluginName>.VERSION\n */\n\n\n var _proto = Plugin.prototype;\n\n _proto.version = function version() {\n return this.constructor.VERSION;\n }\n /**\n * Each event triggered by plugins includes a hash of additional data with\n * conventional properties.\n *\n * This returns that object or mutates an existing hash.\n *\n * @param {Object} [hash={}]\n * An object to be used as event an event hash.\n *\n * @return {Plugin~PluginEventHash}\n * An event hash object with provided properties mixed-in.\n */\n ;\n\n _proto.getEventHash = function getEventHash(hash) {\n if (hash === void 0) {\n hash = {};\n }\n\n hash.name = this.name;\n hash.plugin = this.constructor;\n hash.instance = this;\n return hash;\n }\n /**\n * Triggers an event on the plugin object and overrides\n * {@link module:evented~EventedMixin.trigger|EventedMixin.trigger}.\n *\n * @param {string|Object} event\n * An event type or an object with a type property.\n *\n * @param {Object} [hash={}]\n * Additional data hash to merge with a\n * {@link Plugin~PluginEventHash|PluginEventHash}.\n *\n * @return {boolean}\n * Whether or not default was prevented.\n */\n ;\n\n _proto.trigger = function trigger$1(event, hash) {\n if (hash === void 0) {\n hash = {};\n }\n\n return trigger(this.eventBusEl_, event, this.getEventHash(hash));\n }\n /**\n * Handles \"statechanged\" events on the plugin. No-op by default, override by\n * subclassing.\n *\n * @abstract\n * @param {Event} e\n * An event object provided by a \"statechanged\" event.\n *\n * @param {Object} e.changes\n * An object describing changes that occurred with the \"statechanged\"\n * event.\n */\n ;\n\n _proto.handleStateChanged = function handleStateChanged(e) {}\n /**\n * Disposes a plugin.\n *\n * Subclasses can override this if they want, but for the sake of safety,\n * it's probably best to subscribe the \"dispose\" event.\n *\n * @fires Plugin#dispose\n */\n ;\n\n _proto.dispose = function dispose() {\n var name = this.name,\n player = this.player;\n /**\n * Signals that a advanced plugin is about to be disposed.\n *\n * @event Plugin#dispose\n * @type {EventTarget~Event}\n */\n\n this.trigger('dispose');\n this.off();\n player.off('dispose', this.dispose); // Eliminate any possible sources of leaking memory by clearing up\n // references between the player and the plugin instance and nulling out\n // the plugin's state and replacing methods with a function that throws.\n\n player[PLUGIN_CACHE_KEY][name] = false;\n this.player = this.state = null; // Finally, replace the plugin name on the player with a new factory\n // function, so that the plugin is ready to be set up again.\n\n player[name] = createPluginFactory(name, pluginStorage[name]);\n }\n /**\n * Determines if a plugin is a basic plugin (i.e. not a sub-class of `Plugin`).\n *\n * @param {string|Function} plugin\n * If a string, matches the name of a plugin. If a function, will be\n * tested directly.\n *\n * @return {boolean}\n * Whether or not a plugin is a basic plugin.\n */\n ;\n\n Plugin.isBasic = function isBasic(plugin) {\n var p = typeof plugin === 'string' ? getPlugin(plugin) : plugin;\n return typeof p === 'function' && !Plugin.prototype.isPrototypeOf(p.prototype);\n }\n /**\n * Register a Video.js plugin.\n *\n * @param {string} name\n * The name of the plugin to be registered. Must be a string and\n * must not match an existing plugin or a method on the `Player`\n * prototype.\n *\n * @param {Function} plugin\n * A sub-class of `Plugin` or a function for basic plugins.\n *\n * @return {Function}\n * For advanced plugins, a factory function for that plugin. For\n * basic plugins, a wrapper function that initializes the plugin.\n */\n ;\n\n Plugin.registerPlugin = function registerPlugin(name, plugin) {\n if (typeof name !== 'string') {\n throw new Error(\"Illegal plugin name, \\\"\" + name + \"\\\", must be a string, was \" + typeof name + \".\");\n }\n\n if (pluginExists(name)) {\n log.warn(\"A plugin named \\\"\" + name + \"\\\" already exists. You may want to avoid re-registering plugins!\");\n } else if (Player.prototype.hasOwnProperty(name)) {\n throw new Error(\"Illegal plugin name, \\\"\" + name + \"\\\", cannot share a name with an existing player method!\");\n }\n\n if (typeof plugin !== 'function') {\n throw new Error(\"Illegal plugin for \\\"\" + name + \"\\\", must be a function, was \" + typeof plugin + \".\");\n }\n\n pluginStorage[name] = plugin; // Add a player prototype method for all sub-classed plugins (but not for\n // the base Plugin class).\n\n if (name !== BASE_PLUGIN_NAME) {\n if (Plugin.isBasic(plugin)) {\n Player.prototype[name] = createBasicPlugin(name, plugin);\n } else {\n Player.prototype[name] = createPluginFactory(name, plugin);\n }\n }\n\n return plugin;\n }\n /**\n * De-register a Video.js plugin.\n *\n * @param {string} name\n * The name of the plugin to be de-registered. Must be a string that\n * matches an existing plugin.\n *\n * @throws {Error}\n * If an attempt is made to de-register the base plugin.\n */\n ;\n\n Plugin.deregisterPlugin = function deregisterPlugin(name) {\n if (name === BASE_PLUGIN_NAME) {\n throw new Error('Cannot de-register base plugin.');\n }\n\n if (pluginExists(name)) {\n delete pluginStorage[name];\n delete Player.prototype[name];\n }\n }\n /**\n * Gets an object containing multiple Video.js plugins.\n *\n * @param {Array} [names]\n * If provided, should be an array of plugin names. Defaults to _all_\n * plugin names.\n *\n * @return {Object|undefined}\n * An object containing plugin(s) associated with their name(s) or\n * `undefined` if no matching plugins exist).\n */\n ;\n\n Plugin.getPlugins = function getPlugins(names) {\n if (names === void 0) {\n names = Object.keys(pluginStorage);\n }\n\n var result;\n names.forEach(function (name) {\n var plugin = getPlugin(name);\n\n if (plugin) {\n result = result || {};\n result[name] = plugin;\n }\n });\n return result;\n }\n /**\n * Gets a plugin's version, if available\n *\n * @param {string} name\n * The name of a plugin.\n *\n * @return {string}\n * The plugin's version or an empty string.\n */\n ;\n\n Plugin.getPluginVersion = function getPluginVersion(name) {\n var plugin = getPlugin(name);\n return plugin && plugin.VERSION || '';\n };\n\n return Plugin;\n}();\n/**\n * Gets a plugin by name if it exists.\n *\n * @static\n * @method getPlugin\n * @memberOf Plugin\n * @param {string} name\n * The name of a plugin.\n *\n * @returns {Function|undefined}\n * The plugin (or `undefined`).\n */\n\n\nPlugin.getPlugin = getPlugin;\n/**\n * The name of the base plugin class as it is registered.\n *\n * @type {string}\n */\n\nPlugin.BASE_PLUGIN_NAME = BASE_PLUGIN_NAME;\nPlugin.registerPlugin(BASE_PLUGIN_NAME, Plugin);\n/**\n * Documented in player.js\n *\n * @ignore\n */\n\nPlayer.prototype.usingPlugin = function (name) {\n return !!this[PLUGIN_CACHE_KEY] && this[PLUGIN_CACHE_KEY][name] === true;\n};\n/**\n * Documented in player.js\n *\n * @ignore\n */\n\n\nPlayer.prototype.hasPlugin = function (name) {\n return !!pluginExists(name);\n};\n/**\n * Signals that a plugin is about to be set up on a player.\n *\n * @event Player#beforepluginsetup\n * @type {Plugin~PluginEventHash}\n */\n\n/**\n * Signals that a plugin is about to be set up on a player - by name. The name\n * is the name of the plugin.\n *\n * @event Player#beforepluginsetup:$name\n * @type {Plugin~PluginEventHash}\n */\n\n/**\n * Signals that a plugin has just been set up on a player.\n *\n * @event Player#pluginsetup\n * @type {Plugin~PluginEventHash}\n */\n\n/**\n * Signals that a plugin has just been set up on a player - by name. The name\n * is the name of the plugin.\n *\n * @event Player#pluginsetup:$name\n * @type {Plugin~PluginEventHash}\n */\n\n/**\n * @typedef {Object} Plugin~PluginEventHash\n *\n * @property {string} instance\n * For basic plugins, the return value of the plugin function. For\n * advanced plugins, the plugin instance on which the event is fired.\n *\n * @property {string} name\n * The name of the plugin.\n *\n * @property {string} plugin\n * For basic plugins, the plugin function. For advanced plugins, the\n * plugin class/constructor.\n */\n\n/**\n * @file extend.js\n * @module extend\n */\n\n/**\n * A combination of node inherits and babel's inherits (after transpile).\n * Both work the same but node adds `super_` to the subClass\n * and Bable adds the superClass as __proto__. Both seem useful.\n *\n * @param {Object} subClass\n * The class to inherit to\n *\n * @param {Object} superClass\n * The class to inherit from\n *\n * @private\n */\n\n\nvar _inherits = function _inherits(subClass, superClass) {\n if (typeof superClass !== 'function' && superClass !== null) {\n throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n\n if (superClass) {\n // node\n subClass.super_ = superClass;\n }\n};\n/**\n * Used to subclass an existing class by emulating ES subclassing using the\n * `extends` keyword.\n *\n * @function\n * @example\n * var MyComponent = videojs.extend(videojs.getComponent('Component'), {\n * myCustomMethod: function() {\n * // Do things in my method.\n * }\n * });\n *\n * @param {Function} superClass\n * The class to inherit from\n *\n * @param {Object} [subClassMethods={}]\n * Methods of the new class\n *\n * @return {Function}\n * The new class with subClassMethods that inherited superClass.\n */\n\n\nvar extend = function extend(superClass, subClassMethods) {\n if (subClassMethods === void 0) {\n subClassMethods = {};\n }\n\n var subClass = function subClass() {\n superClass.apply(this, arguments);\n };\n\n var methods = {};\n\n if (typeof subClassMethods === 'object') {\n if (subClassMethods.constructor !== Object.prototype.constructor) {\n subClass = subClassMethods.constructor;\n }\n\n methods = subClassMethods;\n } else if (typeof subClassMethods === 'function') {\n subClass = subClassMethods;\n }\n\n _inherits(subClass, superClass); // Extend subObj's prototype with functions and other properties from props\n\n\n for (var name in methods) {\n if (methods.hasOwnProperty(name)) {\n subClass.prototype[name] = methods[name];\n }\n }\n\n return subClass;\n};\n/**\n * @file video.js\n * @module videojs\n */\n\n/**\n * Normalize an `id` value by trimming off a leading `#`\n *\n * @private\n * @param {string} id\n * A string, maybe with a leading `#`.\n *\n * @return {string}\n * The string, without any leading `#`.\n */\n\n\nvar normalizeId = function normalizeId(id) {\n return id.indexOf('#') === 0 ? id.slice(1) : id;\n};\n/**\n * The `videojs()` function doubles as the main function for users to create a\n * {@link Player} instance as well as the main library namespace.\n *\n * It can also be used as a getter for a pre-existing {@link Player} instance.\n * However, we _strongly_ recommend using `videojs.getPlayer()` for this\n * purpose because it avoids any potential for unintended initialization.\n *\n * Due to [limitations](https://github.com/jsdoc3/jsdoc/issues/955#issuecomment-313829149)\n * of our JSDoc template, we cannot properly document this as both a function\n * and a namespace, so its function signature is documented here.\n *\n * #### Arguments\n * ##### id\n * string|Element, **required**\n *\n * Video element or video element ID.\n *\n * ##### options\n * Object, optional\n *\n * Options object for providing settings.\n * See: [Options Guide](https://docs.videojs.com/tutorial-options.html).\n *\n * ##### ready\n * {@link Component~ReadyCallback}, optional\n *\n * A function to be called when the {@link Player} and {@link Tech} are ready.\n *\n * #### Return Value\n *\n * The `videojs()` function returns a {@link Player} instance.\n *\n * @namespace\n *\n * @borrows AudioTrack as AudioTrack\n * @borrows Component.getComponent as getComponent\n * @borrows module:computed-style~computedStyle as computedStyle\n * @borrows module:events.on as on\n * @borrows module:events.one as one\n * @borrows module:events.off as off\n * @borrows module:events.trigger as trigger\n * @borrows EventTarget as EventTarget\n * @borrows module:extend~extend as extend\n * @borrows module:fn.bind as bind\n * @borrows module:format-time.formatTime as formatTime\n * @borrows module:format-time.resetFormatTime as resetFormatTime\n * @borrows module:format-time.setFormatTime as setFormatTime\n * @borrows module:merge-options.mergeOptions as mergeOptions\n * @borrows module:middleware.use as use\n * @borrows Player.players as players\n * @borrows Plugin.registerPlugin as registerPlugin\n * @borrows Plugin.deregisterPlugin as deregisterPlugin\n * @borrows Plugin.getPlugins as getPlugins\n * @borrows Plugin.getPlugin as getPlugin\n * @borrows Plugin.getPluginVersion as getPluginVersion\n * @borrows Tech.getTech as getTech\n * @borrows Tech.registerTech as registerTech\n * @borrows TextTrack as TextTrack\n * @borrows module:time-ranges.createTimeRanges as createTimeRange\n * @borrows module:time-ranges.createTimeRanges as createTimeRanges\n * @borrows module:url.isCrossOrigin as isCrossOrigin\n * @borrows module:url.parseUrl as parseUrl\n * @borrows VideoTrack as VideoTrack\n *\n * @param {string|Element} id\n * Video element or video element ID.\n *\n * @param {Object} [options]\n * Options object for providing settings.\n * See: [Options Guide](https://docs.videojs.com/tutorial-options.html).\n *\n * @param {Component~ReadyCallback} [ready]\n * A function to be called when the {@link Player} and {@link Tech} are\n * ready.\n *\n * @return {Player}\n * The `videojs()` function returns a {@link Player|Player} instance.\n */\n\n\nfunction videojs$1(id, options, ready) {\n var player = videojs$1.getPlayer(id);\n\n if (player) {\n if (options) {\n log.warn(\"Player \\\"\" + id + \"\\\" is already initialised. Options will not be applied.\");\n }\n\n if (ready) {\n player.ready(ready);\n }\n\n return player;\n }\n\n var el = typeof id === 'string' ? $('#' + normalizeId(id)) : id;\n\n if (!isEl(el)) {\n throw new TypeError('The element or ID supplied is not valid. (videojs)');\n } // document.body.contains(el) will only check if el is contained within that one document.\n // This causes problems for elements in iframes.\n // Instead, use the element's ownerDocument instead of the global document.\n // This will make sure that the element is indeed in the dom of that document.\n // Additionally, check that the document in question has a default view.\n // If the document is no longer attached to the dom, the defaultView of the document will be null.\n\n\n if (!el.ownerDocument.defaultView || !el.ownerDocument.body.contains(el)) {\n log.warn('The element supplied is not included in the DOM');\n }\n\n options = options || {};\n videojs$1.hooks('beforesetup').forEach(function (hookFunction) {\n var opts = hookFunction(el, mergeOptions(options));\n\n if (!isObject(opts) || Array.isArray(opts)) {\n log.error('please return an object in beforesetup hooks');\n return;\n }\n\n options = mergeOptions(options, opts);\n }); // We get the current \"Player\" component here in case an integration has\n // replaced it with a custom player.\n\n var PlayerComponent = Component.getComponent('Player');\n player = new PlayerComponent(el, options, ready);\n videojs$1.hooks('setup').forEach(function (hookFunction) {\n return hookFunction(player);\n });\n return player;\n}\n/**\n * An Object that contains lifecycle hooks as keys which point to an array\n * of functions that are run when a lifecycle is triggered\n *\n * @private\n */\n\n\nvideojs$1.hooks_ = {};\n/**\n * Get a list of hooks for a specific lifecycle\n *\n * @param {string} type\n * the lifecyle to get hooks from\n *\n * @param {Function|Function[]} [fn]\n * Optionally add a hook (or hooks) to the lifecycle that your are getting.\n *\n * @return {Array}\n * an array of hooks, or an empty array if there are none.\n */\n\nvideojs$1.hooks = function (type, fn) {\n videojs$1.hooks_[type] = videojs$1.hooks_[type] || [];\n\n if (fn) {\n videojs$1.hooks_[type] = videojs$1.hooks_[type].concat(fn);\n }\n\n return videojs$1.hooks_[type];\n};\n/**\n * Add a function hook to a specific videojs lifecycle.\n *\n * @param {string} type\n * the lifecycle to hook the function to.\n *\n * @param {Function|Function[]}\n * The function or array of functions to attach.\n */\n\n\nvideojs$1.hook = function (type, fn) {\n videojs$1.hooks(type, fn);\n};\n/**\n * Add a function hook that will only run once to a specific videojs lifecycle.\n *\n * @param {string} type\n * the lifecycle to hook the function to.\n *\n * @param {Function|Function[]}\n * The function or array of functions to attach.\n */\n\n\nvideojs$1.hookOnce = function (type, fn) {\n videojs$1.hooks(type, [].concat(fn).map(function (original) {\n var wrapper = function wrapper() {\n videojs$1.removeHook(type, wrapper);\n return original.apply(void 0, arguments);\n };\n\n return wrapper;\n }));\n};\n/**\n * Remove a hook from a specific videojs lifecycle.\n *\n * @param {string} type\n * the lifecycle that the function hooked to\n *\n * @param {Function} fn\n * The hooked function to remove\n *\n * @return {boolean}\n * The function that was removed or undef\n */\n\n\nvideojs$1.removeHook = function (type, fn) {\n var index = videojs$1.hooks(type).indexOf(fn);\n\n if (index <= -1) {\n return false;\n }\n\n videojs$1.hooks_[type] = videojs$1.hooks_[type].slice();\n videojs$1.hooks_[type].splice(index, 1);\n return true;\n}; // Add default styles\n\n\nif (window$1.VIDEOJS_NO_DYNAMIC_STYLE !== true && isReal()) {\n var style = $('.vjs-styles-defaults');\n\n if (!style) {\n style = createStyleElement('vjs-styles-defaults');\n var head = $('head');\n\n if (head) {\n head.insertBefore(style, head.firstChild);\n }\n\n setTextContent(style, \"\\n .video-js {\\n width: 300px;\\n height: 150px;\\n }\\n\\n .vjs-fluid {\\n padding-top: 56.25%\\n }\\n \");\n }\n} // Run Auto-load players\n// You have to wait at least once in case this script is loaded after your\n// video in the DOM (weird behavior only with minified version)\n\n\nautoSetupTimeout(1, videojs$1);\n/**\n * Current Video.js version. Follows [semantic versioning](https://semver.org/).\n *\n * @type {string}\n */\n\nvideojs$1.VERSION = version;\n/**\n * The global options object. These are the settings that take effect\n * if no overrides are specified when the player is created.\n *\n * @type {Object}\n */\n\nvideojs$1.options = Player.prototype.options_;\n/**\n * Get an object with the currently created players, keyed by player ID\n *\n * @return {Object}\n * The created players\n */\n\nvideojs$1.getPlayers = function () {\n return Player.players;\n};\n/**\n * Get a single player based on an ID or DOM element.\n *\n * This is useful if you want to check if an element or ID has an associated\n * Video.js player, but not create one if it doesn't.\n *\n * @param {string|Element} id\n * An HTML element - `<video>`, `<audio>`, or `<video-js>` -\n * or a string matching the `id` of such an element.\n *\n * @return {Player|undefined}\n * A player instance or `undefined` if there is no player instance\n * matching the argument.\n */\n\n\nvideojs$1.getPlayer = function (id) {\n var players = Player.players;\n var tag;\n\n if (typeof id === 'string') {\n var nId = normalizeId(id);\n var player = players[nId];\n\n if (player) {\n return player;\n }\n\n tag = $('#' + nId);\n } else {\n tag = id;\n }\n\n if (isEl(tag)) {\n var _tag = tag,\n _player = _tag.player,\n playerId = _tag.playerId; // Element may have a `player` property referring to an already created\n // player instance. If so, return that.\n\n if (_player || players[playerId]) {\n return _player || players[playerId];\n }\n }\n};\n/**\n * Returns an array of all current players.\n *\n * @return {Array}\n * An array of all players. The array will be in the order that\n * `Object.keys` provides, which could potentially vary between\n * JavaScript engines.\n *\n */\n\n\nvideojs$1.getAllPlayers = function () {\n return (// Disposed players leave a key with a `null` value, so we need to make sure\n // we filter those out.\n Object.keys(Player.players).map(function (k) {\n return Player.players[k];\n }).filter(Boolean)\n );\n};\n\nvideojs$1.players = Player.players;\nvideojs$1.getComponent = Component.getComponent;\n/**\n * Register a component so it can referred to by name. Used when adding to other\n * components, either through addChild `component.addChild('myComponent')` or through\n * default children options `{ children: ['myComponent'] }`.\n *\n * > NOTE: You could also just initialize the component before adding.\n * `component.addChild(new MyComponent());`\n *\n * @param {string} name\n * The class name of the component\n *\n * @param {Component} comp\n * The component class\n *\n * @return {Component}\n * The newly registered component\n */\n\nvideojs$1.registerComponent = function (name, comp) {\n if (Tech.isTech(comp)) {\n log.warn(\"The \" + name + \" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)\");\n }\n\n Component.registerComponent.call(Component, name, comp);\n};\n\nvideojs$1.getTech = Tech.getTech;\nvideojs$1.registerTech = Tech.registerTech;\nvideojs$1.use = use;\n/**\n * An object that can be returned by a middleware to signify\n * that the middleware is being terminated.\n *\n * @type {object}\n * @property {object} middleware.TERMINATOR\n */\n\nObject.defineProperty(videojs$1, 'middleware', {\n value: {},\n writeable: false,\n enumerable: true\n});\nObject.defineProperty(videojs$1.middleware, 'TERMINATOR', {\n value: TERMINATOR,\n writeable: false,\n enumerable: true\n});\n/**\n * A reference to the {@link module:browser|browser utility module} as an object.\n *\n * @type {Object}\n * @see {@link module:browser|browser}\n */\n\nvideojs$1.browser = browser;\n/**\n * Use {@link module:browser.TOUCH_ENABLED|browser.TOUCH_ENABLED} instead; only\n * included for backward-compatibility with 4.x.\n *\n * @deprecated Since version 5.0, use {@link module:browser.TOUCH_ENABLED|browser.TOUCH_ENABLED instead.\n * @type {boolean}\n */\n\nvideojs$1.TOUCH_ENABLED = TOUCH_ENABLED;\nvideojs$1.extend = extend;\nvideojs$1.mergeOptions = mergeOptions;\nvideojs$1.bind = bind;\nvideojs$1.registerPlugin = Plugin.registerPlugin;\nvideojs$1.deregisterPlugin = Plugin.deregisterPlugin;\n/**\n * Deprecated method to register a plugin with Video.js\n *\n * @deprecated videojs.plugin() is deprecated; use videojs.registerPlugin() instead\n *\n * @param {string} name\n * The plugin name\n *\n * @param {Plugin|Function} plugin\n * The plugin sub-class or function\n */\n\nvideojs$1.plugin = function (name, plugin) {\n log.warn('videojs.plugin() is deprecated; use videojs.registerPlugin() instead');\n return Plugin.registerPlugin(name, plugin);\n};\n\nvideojs$1.getPlugins = Plugin.getPlugins;\nvideojs$1.getPlugin = Plugin.getPlugin;\nvideojs$1.getPluginVersion = Plugin.getPluginVersion;\n/**\n * Adding languages so that they're available to all players.\n * Example: `videojs.addLanguage('es', { 'Hello': 'Hola' });`\n *\n * @param {string} code\n * The language code or dictionary property\n *\n * @param {Object} data\n * The data values to be translated\n *\n * @return {Object}\n * The resulting language dictionary object\n */\n\nvideojs$1.addLanguage = function (code, data) {\n var _mergeOptions;\n\n code = ('' + code).toLowerCase();\n videojs$1.options.languages = mergeOptions(videojs$1.options.languages, (_mergeOptions = {}, _mergeOptions[code] = data, _mergeOptions));\n return videojs$1.options.languages[code];\n};\n/**\n * A reference to the {@link module:log|log utility module} as an object.\n *\n * @type {Function}\n * @see {@link module:log|log}\n */\n\n\nvideojs$1.log = log;\nvideojs$1.createLogger = createLogger$1;\nvideojs$1.createTimeRange = videojs$1.createTimeRanges = createTimeRanges;\nvideojs$1.formatTime = formatTime;\nvideojs$1.setFormatTime = setFormatTime;\nvideojs$1.resetFormatTime = resetFormatTime;\nvideojs$1.parseUrl = parseUrl;\nvideojs$1.isCrossOrigin = isCrossOrigin;\nvideojs$1.EventTarget = EventTarget;\nvideojs$1.on = on;\nvideojs$1.one = one;\nvideojs$1.off = off;\nvideojs$1.trigger = trigger;\n/**\n * A cross-browser XMLHttpRequest wrapper.\n *\n * @function\n * @param {Object} options\n * Settings for the request.\n *\n * @return {XMLHttpRequest|XDomainRequest}\n * The request object.\n *\n * @see https://github.com/Raynos/xhr\n */\n\nvideojs$1.xhr = XHR;\nvideojs$1.TextTrack = TextTrack;\nvideojs$1.AudioTrack = AudioTrack;\nvideojs$1.VideoTrack = VideoTrack;\n['isEl', 'isTextNode', 'createEl', 'hasClass', 'addClass', 'removeClass', 'toggleClass', 'setAttributes', 'getAttributes', 'emptyEl', 'appendContent', 'insertContent'].forEach(function (k) {\n videojs$1[k] = function () {\n log.warn(\"videojs.\" + k + \"() is deprecated; use videojs.dom.\" + k + \"() instead\");\n return Dom[k].apply(null, arguments);\n };\n});\nvideojs$1.computedStyle = computedStyle;\n/**\n * A reference to the {@link module:dom|DOM utility module} as an object.\n *\n * @type {Object}\n * @see {@link module:dom|dom}\n */\n\nvideojs$1.dom = Dom;\n/**\n * A reference to the {@link module:url|URL utility module} as an object.\n *\n * @type {Object}\n * @see {@link module:url|url}\n */\n\nvideojs$1.url = Url;\n/**\n * @videojs/http-streaming\n * @version 1.10.6\n * @copyright 2019 Brightcove, Inc\n * @license Apache-2.0\n */\n\n/**\n * @file resolve-url.js - Handling how URLs are resolved and manipulated\n */\n\nvar resolveUrl = function resolveUrl(baseURL, relativeURL) {\n // return early if we don't need to resolve\n if (/^[a-z]+:/i.test(relativeURL)) {\n return relativeURL;\n } // if the base URL is relative then combine with the current location\n\n\n if (!/\\/\\//i.test(baseURL)) {\n baseURL = URLToolkit.buildAbsoluteURL(window$1.location.href, baseURL);\n }\n\n return URLToolkit.buildAbsoluteURL(baseURL, relativeURL);\n};\n/**\n * Checks whether xhr request was redirected and returns correct url depending\n * on `handleManifestRedirects` option\n *\n * @api private\n *\n * @param {String} url - an url being requested\n * @param {XMLHttpRequest} req - xhr request result\n *\n * @return {String}\n */\n\n\nvar resolveManifestRedirect = function resolveManifestRedirect(handleManifestRedirect, url, req) {\n // To understand how the responseURL below is set and generated:\n // - https://fetch.spec.whatwg.org/#concept-response-url\n // - https://fetch.spec.whatwg.org/#atomic-http-redirect-handling\n if (handleManifestRedirect && req.responseURL && url !== req.responseURL) {\n return req.responseURL;\n }\n\n return url;\n};\n\nvar classCallCheck = function classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar get$1 = function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if (\"value\" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n};\n\nvar inherits = function inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nvar possibleConstructorReturn = function possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\nvar slicedToArray = function () {\n function sliceIterator(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n}();\n/**\n * @file playlist-loader.js\n *\n * A state machine that manages the loading, caching, and updating of\n * M3U8 playlists.\n *\n */\n\n\nvar mergeOptions$1 = videojs$1.mergeOptions,\n EventTarget$1 = videojs$1.EventTarget,\n log$1 = videojs$1.log;\n/**\n * Loops through all supported media groups in master and calls the provided\n * callback for each group\n *\n * @param {Object} master\n * The parsed master manifest object\n * @param {Function} callback\n * Callback to call for each media group\n */\n\nvar forEachMediaGroup = function forEachMediaGroup(master, callback) {\n ['AUDIO', 'SUBTITLES'].forEach(function (mediaType) {\n for (var groupKey in master.mediaGroups[mediaType]) {\n for (var labelKey in master.mediaGroups[mediaType][groupKey]) {\n var mediaProperties = master.mediaGroups[mediaType][groupKey][labelKey];\n callback(mediaProperties, mediaType, groupKey, labelKey);\n }\n }\n });\n};\n/**\n * Returns a new array of segments that is the result of merging\n * properties from an older list of segments onto an updated\n * list. No properties on the updated playlist will be overridden.\n *\n * @param {Array} original the outdated list of segments\n * @param {Array} update the updated list of segments\n * @param {Number=} offset the index of the first update\n * segment in the original segment list. For non-live playlists,\n * this should always be zero and does not need to be\n * specified. For live playlists, it should be the difference\n * between the media sequence numbers in the original and updated\n * playlists.\n * @return a list of merged segment objects\n */\n\n\nvar updateSegments = function updateSegments(original, update, offset) {\n var result = update.slice();\n offset = offset || 0;\n var length = Math.min(original.length, update.length + offset);\n\n for (var i = offset; i < length; i++) {\n result[i - offset] = mergeOptions$1(original[i], result[i - offset]);\n }\n\n return result;\n};\n\nvar resolveSegmentUris = function resolveSegmentUris(segment, baseUri) {\n if (!segment.resolvedUri) {\n segment.resolvedUri = resolveUrl(baseUri, segment.uri);\n }\n\n if (segment.key && !segment.key.resolvedUri) {\n segment.key.resolvedUri = resolveUrl(baseUri, segment.key.uri);\n }\n\n if (segment.map && !segment.map.resolvedUri) {\n segment.map.resolvedUri = resolveUrl(baseUri, segment.map.uri);\n }\n};\n/**\n * Returns a new master playlist that is the result of merging an\n * updated media playlist into the original version. If the\n * updated media playlist does not match any of the playlist\n * entries in the original master playlist, null is returned.\n *\n * @param {Object} master a parsed master M3U8 object\n * @param {Object} media a parsed media M3U8 object\n * @return {Object} a new object that represents the original\n * master playlist with the updated media playlist merged in, or\n * null if the merge produced no change.\n */\n\n\nvar updateMaster = function updateMaster(master, media) {\n var result = mergeOptions$1(master, {});\n var playlist = result.playlists[media.uri];\n\n if (!playlist) {\n return null;\n } // consider the playlist unchanged if the number of segments is equal, the media\n // sequence number is unchanged, and this playlist hasn't become the end of the playlist\n\n\n if (playlist.segments && media.segments && playlist.segments.length === media.segments.length && playlist.endList === media.endList && playlist.mediaSequence === media.mediaSequence) {\n return null;\n }\n\n var mergedPlaylist = mergeOptions$1(playlist, media); // if the update could overlap existing segment information, merge the two segment lists\n\n if (playlist.segments) {\n mergedPlaylist.segments = updateSegments(playlist.segments, media.segments, media.mediaSequence - playlist.mediaSequence);\n } // resolve any segment URIs to prevent us from having to do it later\n\n\n mergedPlaylist.segments.forEach(function (segment) {\n resolveSegmentUris(segment, mergedPlaylist.resolvedUri);\n }); // TODO Right now in the playlists array there are two references to each playlist, one\n // that is referenced by index, and one by URI. The index reference may no longer be\n // necessary.\n\n for (var i = 0; i < result.playlists.length; i++) {\n if (result.playlists[i].uri === media.uri) {\n result.playlists[i] = mergedPlaylist;\n }\n }\n\n result.playlists[media.uri] = mergedPlaylist;\n return result;\n};\n\nvar setupMediaPlaylists = function setupMediaPlaylists(master) {\n // setup by-URI lookups and resolve media playlist URIs\n var i = master.playlists.length;\n\n while (i--) {\n var playlist = master.playlists[i];\n master.playlists[playlist.uri] = playlist;\n playlist.resolvedUri = resolveUrl(master.uri, playlist.uri);\n playlist.id = i;\n\n if (!playlist.attributes) {\n // Although the spec states an #EXT-X-STREAM-INF tag MUST have a\n // BANDWIDTH attribute, we can play the stream without it. This means a poorly\n // formatted master playlist may not have an attribute list. An attributes\n // property is added here to prevent undefined references when we encounter\n // this scenario.\n playlist.attributes = {};\n log$1.warn('Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.');\n }\n }\n};\n\nvar resolveMediaGroupUris = function resolveMediaGroupUris(master) {\n forEachMediaGroup(master, function (properties) {\n if (properties.uri) {\n properties.resolvedUri = resolveUrl(master.uri, properties.uri);\n }\n });\n};\n/**\n * Calculates the time to wait before refreshing a live playlist\n *\n * @param {Object} media\n * The current media\n * @param {Boolean} update\n * True if there were any updates from the last refresh, false otherwise\n * @return {Number}\n * The time in ms to wait before refreshing the live playlist\n */\n\n\nvar refreshDelay = function refreshDelay(media, update) {\n var lastSegment = media.segments[media.segments.length - 1];\n var delay = void 0;\n\n if (update && lastSegment && lastSegment.duration) {\n delay = lastSegment.duration * 1000;\n } else {\n // if the playlist is unchanged since the last reload or last segment duration\n // cannot be determined, try again after half the target duration\n delay = (media.targetDuration || 10) * 500;\n }\n\n return delay;\n};\n/**\n * Load a playlist from a remote location\n *\n * @class PlaylistLoader\n * @extends Stream\n * @param {String} srcUrl the url to start with\n * @param {Boolean} withCredentials the withCredentials xhr option\n * @constructor\n */\n\n\nvar PlaylistLoader = function (_EventTarget) {\n inherits(PlaylistLoader, _EventTarget);\n\n function PlaylistLoader(srcUrl, hls) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n classCallCheck(this, PlaylistLoader);\n\n var _this = possibleConstructorReturn(this, (PlaylistLoader.__proto__ || Object.getPrototypeOf(PlaylistLoader)).call(this));\n\n var _options$withCredenti = options.withCredentials,\n withCredentials = _options$withCredenti === undefined ? false : _options$withCredenti,\n _options$handleManife = options.handleManifestRedirects,\n handleManifestRedirects = _options$handleManife === undefined ? false : _options$handleManife;\n _this.srcUrl = srcUrl;\n _this.hls_ = hls;\n _this.withCredentials = withCredentials;\n _this.handleManifestRedirects = handleManifestRedirects;\n var hlsOptions = hls.options_;\n _this.customTagParsers = hlsOptions && hlsOptions.customTagParsers || [];\n _this.customTagMappers = hlsOptions && hlsOptions.customTagMappers || [];\n\n if (!_this.srcUrl) {\n throw new Error('A non-empty playlist URL is required');\n } // initialize the loader state\n\n\n _this.state = 'HAVE_NOTHING'; // live playlist staleness timeout\n\n _this.on('mediaupdatetimeout', function () {\n if (_this.state !== 'HAVE_METADATA') {\n // only refresh the media playlist if no other activity is going on\n return;\n }\n\n _this.state = 'HAVE_CURRENT_METADATA';\n _this.request = _this.hls_.xhr({\n uri: resolveUrl(_this.master.uri, _this.media().uri),\n withCredentials: _this.withCredentials\n }, function (error, req) {\n // disposed\n if (!_this.request) {\n return;\n }\n\n if (error) {\n return _this.playlistRequestError(_this.request, _this.media().uri, 'HAVE_METADATA');\n }\n\n _this.haveMetadata(_this.request, _this.media().uri);\n });\n });\n\n return _this;\n }\n\n createClass(PlaylistLoader, [{\n key: 'playlistRequestError',\n value: function playlistRequestError(xhr, url, startingState) {\n // any in-flight request is now finished\n this.request = null;\n\n if (startingState) {\n this.state = startingState;\n }\n\n this.error = {\n playlist: this.master.playlists[url],\n status: xhr.status,\n message: 'HLS playlist request error at URL: ' + url + '.',\n responseText: xhr.responseText,\n code: xhr.status >= 500 ? 4 : 2\n };\n this.trigger('error');\n } // update the playlist loader's state in response to a new or\n // updated playlist.\n\n }, {\n key: 'haveMetadata',\n value: function haveMetadata(xhr, url) {\n var _this2 = this; // any in-flight request is now finished\n\n\n this.request = null;\n this.state = 'HAVE_METADATA';\n var parser = new Parser(); // adding custom tag parsers\n\n this.customTagParsers.forEach(function (customParser) {\n return parser.addParser(customParser);\n }); // adding custom tag mappers\n\n this.customTagMappers.forEach(function (mapper) {\n return parser.addTagMapper(mapper);\n });\n parser.push(xhr.responseText);\n parser.end();\n parser.manifest.uri = url; // m3u8-parser does not attach an attributes property to media playlists so make\n // sure that the property is attached to avoid undefined reference errors\n\n parser.manifest.attributes = parser.manifest.attributes || {}; // merge this playlist into the master\n\n var update = updateMaster(this.master, parser.manifest);\n this.targetDuration = parser.manifest.targetDuration;\n\n if (update) {\n this.master = update;\n this.media_ = this.master.playlists[parser.manifest.uri];\n } else {\n this.trigger('playlistunchanged');\n } // refresh live playlists after a target duration passes\n\n\n if (!this.media().endList) {\n window$1.clearTimeout(this.mediaUpdateTimeout);\n this.mediaUpdateTimeout = window$1.setTimeout(function () {\n _this2.trigger('mediaupdatetimeout');\n }, refreshDelay(this.media(), !!update));\n }\n\n this.trigger('loadedplaylist');\n }\n /**\n * Abort any outstanding work and clean up.\n */\n\n }, {\n key: 'dispose',\n value: function dispose() {\n this.stopRequest();\n window$1.clearTimeout(this.mediaUpdateTimeout);\n window$1.clearTimeout(this.finalRenditionTimeout);\n }\n }, {\n key: 'stopRequest',\n value: function stopRequest() {\n if (this.request) {\n var oldRequest = this.request;\n this.request = null;\n oldRequest.onreadystatechange = null;\n oldRequest.abort();\n }\n }\n /**\n * When called without any arguments, returns the currently\n * active media playlist. When called with a single argument,\n * triggers the playlist loader to asynchronously switch to the\n * specified media playlist. Calling this method while the\n * loader is in the HAVE_NOTHING causes an error to be emitted\n * but otherwise has no effect.\n *\n * @param {Object=} playlist the parsed media playlist\n * object to switch to\n * @param {Boolean=} is this the last available playlist\n *\n * @return {Playlist} the current loaded media\n */\n\n }, {\n key: 'media',\n value: function media(playlist, isFinalRendition) {\n var _this3 = this; // getter\n\n\n if (!playlist) {\n return this.media_;\n } // setter\n\n\n if (this.state === 'HAVE_NOTHING') {\n throw new Error('Cannot switch media playlist from ' + this.state);\n } // find the playlist object if the target playlist has been\n // specified by URI\n\n\n if (typeof playlist === 'string') {\n if (!this.master.playlists[playlist]) {\n throw new Error('Unknown playlist URI: ' + playlist);\n }\n\n playlist = this.master.playlists[playlist];\n }\n\n window$1.clearTimeout(this.finalRenditionTimeout);\n\n if (isFinalRendition) {\n var delay = playlist.targetDuration / 2 * 1000 || 5 * 1000;\n this.finalRenditionTimeout = window$1.setTimeout(this.media.bind(this, playlist, false), delay);\n return;\n }\n\n var startingState = this.state;\n var mediaChange = !this.media_ || playlist.uri !== this.media_.uri; // switch to fully loaded playlists immediately\n\n if (this.master.playlists[playlist.uri].endList) {\n // abort outstanding playlist requests\n if (this.request) {\n this.request.onreadystatechange = null;\n this.request.abort();\n this.request = null;\n }\n\n this.state = 'HAVE_METADATA';\n this.media_ = playlist; // trigger media change if the active media has been updated\n\n if (mediaChange) {\n this.trigger('mediachanging');\n this.trigger('mediachange');\n }\n\n return;\n } // switching to the active playlist is a no-op\n\n\n if (!mediaChange) {\n return;\n }\n\n this.state = 'SWITCHING_MEDIA'; // there is already an outstanding playlist request\n\n if (this.request) {\n if (playlist.resolvedUri === this.request.url) {\n // requesting to switch to the same playlist multiple times\n // has no effect after the first\n return;\n }\n\n this.request.onreadystatechange = null;\n this.request.abort();\n this.request = null;\n } // request the new playlist\n\n\n if (this.media_) {\n this.trigger('mediachanging');\n }\n\n this.request = this.hls_.xhr({\n uri: playlist.resolvedUri,\n withCredentials: this.withCredentials\n }, function (error, req) {\n // disposed\n if (!_this3.request) {\n return;\n }\n\n playlist.resolvedUri = resolveManifestRedirect(_this3.handleManifestRedirects, playlist.resolvedUri, req);\n\n if (error) {\n return _this3.playlistRequestError(_this3.request, playlist.uri, startingState);\n }\n\n _this3.haveMetadata(req, playlist.uri); // fire loadedmetadata the first time a media playlist is loaded\n\n\n if (startingState === 'HAVE_MASTER') {\n _this3.trigger('loadedmetadata');\n } else {\n _this3.trigger('mediachange');\n }\n });\n }\n /**\n * pause loading of the playlist\n */\n\n }, {\n key: 'pause',\n value: function pause() {\n this.stopRequest();\n window$1.clearTimeout(this.mediaUpdateTimeout);\n\n if (this.state === 'HAVE_NOTHING') {\n // If we pause the loader before any data has been retrieved, its as if we never\n // started, so reset to an unstarted state.\n this.started = false;\n } // Need to restore state now that no activity is happening\n\n\n if (this.state === 'SWITCHING_MEDIA') {\n // if the loader was in the process of switching media, it should either return to\n // HAVE_MASTER or HAVE_METADATA depending on if the loader has loaded a media\n // playlist yet. This is determined by the existence of loader.media_\n if (this.media_) {\n this.state = 'HAVE_METADATA';\n } else {\n this.state = 'HAVE_MASTER';\n }\n } else if (this.state === 'HAVE_CURRENT_METADATA') {\n this.state = 'HAVE_METADATA';\n }\n }\n /**\n * start loading of the playlist\n */\n\n }, {\n key: 'load',\n value: function load(isFinalRendition) {\n var _this4 = this;\n\n window$1.clearTimeout(this.mediaUpdateTimeout);\n var media = this.media();\n\n if (isFinalRendition) {\n var delay = media ? media.targetDuration / 2 * 1000 : 5 * 1000;\n this.mediaUpdateTimeout = window$1.setTimeout(function () {\n return _this4.load();\n }, delay);\n return;\n }\n\n if (!this.started) {\n this.start();\n return;\n }\n\n if (media && !media.endList) {\n this.trigger('mediaupdatetimeout');\n } else {\n this.trigger('loadedplaylist');\n }\n }\n /**\n * start loading of the playlist\n */\n\n }, {\n key: 'start',\n value: function start() {\n var _this5 = this;\n\n this.started = true; // request the specified URL\n\n this.request = this.hls_.xhr({\n uri: this.srcUrl,\n withCredentials: this.withCredentials\n }, function (error, req) {\n // disposed\n if (!_this5.request) {\n return;\n } // clear the loader's request reference\n\n\n _this5.request = null;\n\n if (error) {\n _this5.error = {\n status: req.status,\n message: 'HLS playlist request error at URL: ' + _this5.srcUrl + '.',\n responseText: req.responseText,\n // MEDIA_ERR_NETWORK\n code: 2\n };\n\n if (_this5.state === 'HAVE_NOTHING') {\n _this5.started = false;\n }\n\n return _this5.trigger('error');\n }\n\n var parser = new Parser(); // adding custom tag parsers\n\n _this5.customTagParsers.forEach(function (customParser) {\n return parser.addParser(customParser);\n }); // adding custom tag mappers\n\n\n _this5.customTagMappers.forEach(function (mapper) {\n return parser.addTagMapper(mapper);\n });\n\n parser.push(req.responseText);\n parser.end();\n _this5.state = 'HAVE_MASTER';\n _this5.srcUrl = resolveManifestRedirect(_this5.handleManifestRedirects, _this5.srcUrl, req);\n parser.manifest.uri = _this5.srcUrl; // loaded a master playlist\n\n if (parser.manifest.playlists) {\n _this5.master = parser.manifest;\n setupMediaPlaylists(_this5.master);\n resolveMediaGroupUris(_this5.master);\n\n _this5.trigger('loadedplaylist');\n\n if (!_this5.request) {\n // no media playlist was specifically selected so start\n // from the first listed one\n _this5.media(parser.manifest.playlists[0]);\n }\n\n return;\n } // loaded a media playlist\n // infer a master playlist if none was previously requested\n\n\n _this5.master = {\n mediaGroups: {\n 'AUDIO': {},\n 'VIDEO': {},\n 'CLOSED-CAPTIONS': {},\n 'SUBTITLES': {}\n },\n uri: window$1.location.href,\n playlists: [{\n uri: _this5.srcUrl,\n id: 0,\n resolvedUri: _this5.srcUrl,\n // m3u8-parser does not attach an attributes property to media playlists so make\n // sure that the property is attached to avoid undefined reference errors\n attributes: {}\n }]\n };\n _this5.master.playlists[_this5.srcUrl] = _this5.master.playlists[0];\n\n _this5.haveMetadata(req, _this5.srcUrl);\n\n return _this5.trigger('loadedmetadata');\n });\n }\n }]);\n return PlaylistLoader;\n}(EventTarget$1);\n/**\n * @file playlist.js\n *\n * Playlist related utilities.\n */\n\n\nvar createTimeRange = videojs$1.createTimeRange;\n/**\n * walk backward until we find a duration we can use\n * or return a failure\n *\n * @param {Playlist} playlist the playlist to walk through\n * @param {Number} endSequence the mediaSequence to stop walking on\n */\n\nvar backwardDuration = function backwardDuration(playlist, endSequence) {\n var result = 0;\n var i = endSequence - playlist.mediaSequence; // if a start time is available for segment immediately following\n // the interval, use it\n\n var segment = playlist.segments[i]; // Walk backward until we find the latest segment with timeline\n // information that is earlier than endSequence\n\n if (segment) {\n if (typeof segment.start !== 'undefined') {\n return {\n result: segment.start,\n precise: true\n };\n }\n\n if (typeof segment.end !== 'undefined') {\n return {\n result: segment.end - segment.duration,\n precise: true\n };\n }\n }\n\n while (i--) {\n segment = playlist.segments[i];\n\n if (typeof segment.end !== 'undefined') {\n return {\n result: result + segment.end,\n precise: true\n };\n }\n\n result += segment.duration;\n\n if (typeof segment.start !== 'undefined') {\n return {\n result: result + segment.start,\n precise: true\n };\n }\n }\n\n return {\n result: result,\n precise: false\n };\n};\n/**\n * walk forward until we find a duration we can use\n * or return a failure\n *\n * @param {Playlist} playlist the playlist to walk through\n * @param {Number} endSequence the mediaSequence to stop walking on\n */\n\n\nvar forwardDuration = function forwardDuration(playlist, endSequence) {\n var result = 0;\n var segment = void 0;\n var i = endSequence - playlist.mediaSequence; // Walk forward until we find the earliest segment with timeline\n // information\n\n for (; i < playlist.segments.length; i++) {\n segment = playlist.segments[i];\n\n if (typeof segment.start !== 'undefined') {\n return {\n result: segment.start - result,\n precise: true\n };\n }\n\n result += segment.duration;\n\n if (typeof segment.end !== 'undefined') {\n return {\n result: segment.end - result,\n precise: true\n };\n }\n } // indicate we didn't find a useful duration estimate\n\n\n return {\n result: -1,\n precise: false\n };\n};\n/**\n * Calculate the media duration from the segments associated with a\n * playlist. The duration of a subinterval of the available segments\n * may be calculated by specifying an end index.\n *\n * @param {Object} playlist a media playlist object\n * @param {Number=} endSequence an exclusive upper boundary\n * for the playlist. Defaults to playlist length.\n * @param {Number} expired the amount of time that has dropped\n * off the front of the playlist in a live scenario\n * @return {Number} the duration between the first available segment\n * and end index.\n */\n\n\nvar intervalDuration = function intervalDuration(playlist, endSequence, expired) {\n var backward = void 0;\n var forward = void 0;\n\n if (typeof endSequence === 'undefined') {\n endSequence = playlist.mediaSequence + playlist.segments.length;\n }\n\n if (endSequence < playlist.mediaSequence) {\n return 0;\n } // do a backward walk to estimate the duration\n\n\n backward = backwardDuration(playlist, endSequence);\n\n if (backward.precise) {\n // if we were able to base our duration estimate on timing\n // information provided directly from the Media Source, return\n // it\n return backward.result;\n } // walk forward to see if a precise duration estimate can be made\n // that way\n\n\n forward = forwardDuration(playlist, endSequence);\n\n if (forward.precise) {\n // we found a segment that has been buffered and so it's\n // position is known precisely\n return forward.result;\n } // return the less-precise, playlist-based duration estimate\n\n\n return backward.result + expired;\n};\n/**\n * Calculates the duration of a playlist. If a start and end index\n * are specified, the duration will be for the subset of the media\n * timeline between those two indices. The total duration for live\n * playlists is always Infinity.\n *\n * @param {Object} playlist a media playlist object\n * @param {Number=} endSequence an exclusive upper\n * boundary for the playlist. Defaults to the playlist media\n * sequence number plus its length.\n * @param {Number=} expired the amount of time that has\n * dropped off the front of the playlist in a live scenario\n * @return {Number} the duration between the start index and end\n * index.\n */\n\n\nvar duration = function duration(playlist, endSequence, expired) {\n if (!playlist) {\n return 0;\n }\n\n if (typeof expired !== 'number') {\n expired = 0;\n } // if a slice of the total duration is not requested, use\n // playlist-level duration indicators when they're present\n\n\n if (typeof endSequence === 'undefined') {\n // if present, use the duration specified in the playlist\n if (playlist.totalDuration) {\n return playlist.totalDuration;\n } // duration should be Infinity for live playlists\n\n\n if (!playlist.endList) {\n return window$1.Infinity;\n }\n } // calculate the total duration based on the segment durations\n\n\n return intervalDuration(playlist, endSequence, expired);\n};\n/**\n * Calculate the time between two indexes in the current playlist\n * neight the start- nor the end-index need to be within the current\n * playlist in which case, the targetDuration of the playlist is used\n * to approximate the durations of the segments\n *\n * @param {Object} playlist a media playlist object\n * @param {Number} startIndex\n * @param {Number} endIndex\n * @return {Number} the number of seconds between startIndex and endIndex\n */\n\n\nvar sumDurations = function sumDurations(playlist, startIndex, endIndex) {\n var durations = 0;\n\n if (startIndex > endIndex) {\n var _ref = [endIndex, startIndex];\n startIndex = _ref[0];\n endIndex = _ref[1];\n }\n\n if (startIndex < 0) {\n for (var i = startIndex; i < Math.min(0, endIndex); i++) {\n durations += playlist.targetDuration;\n }\n\n startIndex = 0;\n }\n\n for (var _i = startIndex; _i < endIndex; _i++) {\n durations += playlist.segments[_i].duration;\n }\n\n return durations;\n};\n/**\n * Determines the media index of the segment corresponding to the safe edge of the live\n * window which is the duration of the last segment plus 2 target durations from the end\n * of the playlist.\n *\n * @param {Object} playlist\n * a media playlist object\n * @return {Number}\n * The media index of the segment at the safe live point. 0 if there is no \"safe\"\n * point.\n * @function safeLiveIndex\n */\n\n\nvar safeLiveIndex = function safeLiveIndex(playlist) {\n if (!playlist.segments.length) {\n return 0;\n }\n\n var i = playlist.segments.length - 1;\n var distanceFromEnd = playlist.segments[i].duration || playlist.targetDuration;\n var safeDistance = distanceFromEnd + playlist.targetDuration * 2;\n\n while (i--) {\n distanceFromEnd += playlist.segments[i].duration;\n\n if (distanceFromEnd >= safeDistance) {\n break;\n }\n }\n\n return Math.max(0, i);\n};\n/**\n * Calculates the playlist end time\n *\n * @param {Object} playlist a media playlist object\n * @param {Number=} expired the amount of time that has\n * dropped off the front of the playlist in a live scenario\n * @param {Boolean|false} useSafeLiveEnd a boolean value indicating whether or not the\n * playlist end calculation should consider the safe live end\n * (truncate the playlist end by three segments). This is normally\n * used for calculating the end of the playlist's seekable range.\n * @returns {Number} the end time of playlist\n * @function playlistEnd\n */\n\n\nvar playlistEnd = function playlistEnd(playlist, expired, useSafeLiveEnd) {\n if (!playlist || !playlist.segments) {\n return null;\n }\n\n if (playlist.endList) {\n return duration(playlist);\n }\n\n if (expired === null) {\n return null;\n }\n\n expired = expired || 0;\n var endSequence = useSafeLiveEnd ? safeLiveIndex(playlist) : playlist.segments.length;\n return intervalDuration(playlist, playlist.mediaSequence + endSequence, expired);\n};\n/**\n * Calculates the interval of time that is currently seekable in a\n * playlist. The returned time ranges are relative to the earliest\n * moment in the specified playlist that is still available. A full\n * seekable implementation for live streams would need to offset\n * these values by the duration of content that has expired from the\n * stream.\n *\n * @param {Object} playlist a media playlist object\n * dropped off the front of the playlist in a live scenario\n * @param {Number=} expired the amount of time that has\n * dropped off the front of the playlist in a live scenario\n * @return {TimeRanges} the periods of time that are valid targets\n * for seeking\n */\n\n\nvar seekable = function seekable(playlist, expired) {\n var useSafeLiveEnd = true;\n var seekableStart = expired || 0;\n var seekableEnd = playlistEnd(playlist, expired, useSafeLiveEnd);\n\n if (seekableEnd === null) {\n return createTimeRange();\n }\n\n return createTimeRange(seekableStart, seekableEnd);\n};\n\nvar isWholeNumber = function isWholeNumber(num) {\n return num - Math.floor(num) === 0;\n};\n\nvar roundSignificantDigit = function roundSignificantDigit(increment, num) {\n // If we have a whole number, just add 1 to it\n if (isWholeNumber(num)) {\n return num + increment * 0.1;\n }\n\n var numDecimalDigits = num.toString().split('.')[1].length;\n\n for (var i = 1; i <= numDecimalDigits; i++) {\n var scale = Math.pow(10, i);\n var temp = num * scale;\n\n if (isWholeNumber(temp) || i === numDecimalDigits) {\n return (temp + increment) / scale;\n }\n }\n};\n\nvar ceilLeastSignificantDigit = roundSignificantDigit.bind(null, 1);\nvar floorLeastSignificantDigit = roundSignificantDigit.bind(null, -1);\n/**\n * Determine the index and estimated starting time of the segment that\n * contains a specified playback position in a media playlist.\n *\n * @param {Object} playlist the media playlist to query\n * @param {Number} currentTime The number of seconds since the earliest\n * possible position to determine the containing segment for\n * @param {Number} startIndex\n * @param {Number} startTime\n * @return {Object}\n */\n\nvar getMediaInfoForTime = function getMediaInfoForTime(playlist, currentTime, startIndex, startTime) {\n var i = void 0;\n var segment = void 0;\n var numSegments = playlist.segments.length;\n var time = currentTime - startTime;\n\n if (time < 0) {\n // Walk backward from startIndex in the playlist, adding durations\n // until we find a segment that contains `time` and return it\n if (startIndex > 0) {\n for (i = startIndex - 1; i >= 0; i--) {\n segment = playlist.segments[i];\n time += floorLeastSignificantDigit(segment.duration);\n\n if (time > 0) {\n return {\n mediaIndex: i,\n startTime: startTime - sumDurations(playlist, startIndex, i)\n };\n }\n }\n } // We were unable to find a good segment within the playlist\n // so select the first segment\n\n\n return {\n mediaIndex: 0,\n startTime: currentTime\n };\n } // When startIndex is negative, we first walk forward to first segment\n // adding target durations. If we \"run out of time\" before getting to\n // the first segment, return the first segment\n\n\n if (startIndex < 0) {\n for (i = startIndex; i < 0; i++) {\n time -= playlist.targetDuration;\n\n if (time < 0) {\n return {\n mediaIndex: 0,\n startTime: currentTime\n };\n }\n }\n\n startIndex = 0;\n } // Walk forward from startIndex in the playlist, subtracting durations\n // until we find a segment that contains `time` and return it\n\n\n for (i = startIndex; i < numSegments; i++) {\n segment = playlist.segments[i];\n time -= ceilLeastSignificantDigit(segment.duration);\n\n if (time < 0) {\n return {\n mediaIndex: i,\n startTime: startTime + sumDurations(playlist, startIndex, i)\n };\n }\n } // We are out of possible candidates so load the last one...\n\n\n return {\n mediaIndex: numSegments - 1,\n startTime: currentTime\n };\n};\n/**\n * Check whether the playlist is blacklisted or not.\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist is blacklisted or not\n * @function isBlacklisted\n */\n\n\nvar isBlacklisted = function isBlacklisted(playlist) {\n return playlist.excludeUntil && playlist.excludeUntil > Date.now();\n};\n/**\n * Check whether the playlist is compatible with current playback configuration or has\n * been blacklisted permanently for being incompatible.\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist is incompatible or not\n * @function isIncompatible\n */\n\n\nvar isIncompatible = function isIncompatible(playlist) {\n return playlist.excludeUntil && playlist.excludeUntil === Infinity;\n};\n/**\n * Check whether the playlist is enabled or not.\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist is enabled or not\n * @function isEnabled\n */\n\n\nvar isEnabled = function isEnabled(playlist) {\n var blacklisted = isBlacklisted(playlist);\n return !playlist.disabled && !blacklisted;\n};\n/**\n * Check whether the playlist has been manually disabled through the representations api.\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist is disabled manually or not\n * @function isDisabled\n */\n\n\nvar isDisabled = function isDisabled(playlist) {\n return playlist.disabled;\n};\n/**\n * Returns whether the current playlist is an AES encrypted HLS stream\n *\n * @return {Boolean} true if it's an AES encrypted HLS stream\n */\n\n\nvar isAes = function isAes(media) {\n for (var i = 0; i < media.segments.length; i++) {\n if (media.segments[i].key) {\n return true;\n }\n }\n\n return false;\n};\n/**\n * Returns whether the current playlist contains fMP4\n *\n * @return {Boolean} true if the playlist contains fMP4\n */\n\n\nvar isFmp4 = function isFmp4(media) {\n for (var i = 0; i < media.segments.length; i++) {\n if (media.segments[i].map) {\n return true;\n }\n }\n\n return false;\n};\n/**\n * Checks if the playlist has a value for the specified attribute\n *\n * @param {String} attr\n * Attribute to check for\n * @param {Object} playlist\n * The media playlist object\n * @return {Boolean}\n * Whether the playlist contains a value for the attribute or not\n * @function hasAttribute\n */\n\n\nvar hasAttribute = function hasAttribute(attr, playlist) {\n return playlist.attributes && playlist.attributes[attr];\n};\n/**\n * Estimates the time required to complete a segment download from the specified playlist\n *\n * @param {Number} segmentDuration\n * Duration of requested segment\n * @param {Number} bandwidth\n * Current measured bandwidth of the player\n * @param {Object} playlist\n * The media playlist object\n * @param {Number=} bytesReceived\n * Number of bytes already received for the request. Defaults to 0\n * @return {Number|NaN}\n * The estimated time to request the segment. NaN if bandwidth information for\n * the given playlist is unavailable\n * @function estimateSegmentRequestTime\n */\n\n\nvar estimateSegmentRequestTime = function estimateSegmentRequestTime(segmentDuration, bandwidth, playlist) {\n var bytesReceived = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n\n if (!hasAttribute('BANDWIDTH', playlist)) {\n return NaN;\n }\n\n var size = segmentDuration * playlist.attributes.BANDWIDTH;\n return (size - bytesReceived * 8) / bandwidth;\n};\n/*\n * Returns whether the current playlist is the lowest rendition\n *\n * @return {Boolean} true if on lowest rendition\n */\n\n\nvar isLowestEnabledRendition = function isLowestEnabledRendition(master, media) {\n if (master.playlists.length === 1) {\n return true;\n }\n\n var currentBandwidth = media.attributes.BANDWIDTH || Number.MAX_VALUE;\n return master.playlists.filter(function (playlist) {\n if (!isEnabled(playlist)) {\n return false;\n }\n\n return (playlist.attributes.BANDWIDTH || 0) < currentBandwidth;\n }).length === 0;\n}; // exports\n\n\nvar Playlist = {\n duration: duration,\n seekable: seekable,\n safeLiveIndex: safeLiveIndex,\n getMediaInfoForTime: getMediaInfoForTime,\n isEnabled: isEnabled,\n isDisabled: isDisabled,\n isBlacklisted: isBlacklisted,\n isIncompatible: isIncompatible,\n playlistEnd: playlistEnd,\n isAes: isAes,\n isFmp4: isFmp4,\n hasAttribute: hasAttribute,\n estimateSegmentRequestTime: estimateSegmentRequestTime,\n isLowestEnabledRendition: isLowestEnabledRendition\n};\n/**\n * @file xhr.js\n */\n\nvar videojsXHR = videojs$1.xhr,\n mergeOptions$1$1 = videojs$1.mergeOptions;\n\nvar xhrFactory = function xhrFactory() {\n var xhr = function XhrFunction(options, callback) {\n // Add a default timeout for all hls requests\n options = mergeOptions$1$1({\n timeout: 45e3\n }, options); // Allow an optional user-specified function to modify the option\n // object before we construct the xhr request\n\n var beforeRequest = XhrFunction.beforeRequest || videojs$1.Hls.xhr.beforeRequest;\n\n if (beforeRequest && typeof beforeRequest === 'function') {\n var newOptions = beforeRequest(options);\n\n if (newOptions) {\n options = newOptions;\n }\n }\n\n var request = videojsXHR(options, function (error, response) {\n var reqResponse = request.response;\n\n if (!error && reqResponse) {\n request.responseTime = Date.now();\n request.roundTripTime = request.responseTime - request.requestTime;\n request.bytesReceived = reqResponse.byteLength || reqResponse.length;\n\n if (!request.bandwidth) {\n request.bandwidth = Math.floor(request.bytesReceived / request.roundTripTime * 8 * 1000);\n }\n }\n\n if (response.headers) {\n request.responseHeaders = response.headers;\n } // videojs.xhr now uses a specific code on the error\n // object to signal that a request has timed out instead\n // of setting a boolean on the request object\n\n\n if (error && error.code === 'ETIMEDOUT') {\n request.timedout = true;\n } // videojs.xhr no longer considers status codes outside of 200 and 0\n // (for file uris) to be errors, but the old XHR did, so emulate that\n // behavior. Status 206 may be used in response to byterange requests.\n\n\n if (!error && !request.aborted && response.statusCode !== 200 && response.statusCode !== 206 && response.statusCode !== 0) {\n error = new Error('XHR Failed with a response of: ' + (request && (reqResponse || request.responseText)));\n }\n\n callback(error, request);\n });\n var originalAbort = request.abort;\n\n request.abort = function () {\n request.aborted = true;\n return originalAbort.apply(request, arguments);\n };\n\n request.uri = options.uri;\n request.requestTime = Date.now();\n return request;\n };\n\n return xhr;\n};\n/**\n * Turns segment byterange into a string suitable for use in\n * HTTP Range requests\n *\n * @param {Object} byterange - an object with two values defining the start and end\n * of a byte-range\n */\n\n\nvar byterangeStr = function byterangeStr(byterange) {\n var byterangeStart = void 0;\n var byterangeEnd = void 0; // `byterangeEnd` is one less than `offset + length` because the HTTP range\n // header uses inclusive ranges\n\n byterangeEnd = byterange.offset + byterange.length - 1;\n byterangeStart = byterange.offset;\n return 'bytes=' + byterangeStart + '-' + byterangeEnd;\n};\n/**\n * Defines headers for use in the xhr request for a particular segment.\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n */\n\n\nvar segmentXhrHeaders = function segmentXhrHeaders(segment) {\n var headers = {};\n\n if (segment.byterange) {\n headers.Range = byterangeStr(segment.byterange);\n }\n\n return headers;\n};\n/**\n * @file bin-utils.js\n */\n\n/**\n * convert a TimeRange to text\n *\n * @param {TimeRange} range the timerange to use for conversion\n * @param {Number} i the iterator on the range to convert\n */\n\n\nvar textRange = function textRange(range, i) {\n return range.start(i) + '-' + range.end(i);\n};\n/**\n * format a number as hex string\n *\n * @param {Number} e The number\n * @param {Number} i the iterator\n */\n\n\nvar formatHexString = function formatHexString(e, i) {\n var value = e.toString(16);\n return '00'.substring(0, 2 - value.length) + value + (i % 2 ? ' ' : '');\n};\n\nvar formatAsciiString = function formatAsciiString(e) {\n if (e >= 0x20 && e < 0x7e) {\n return String.fromCharCode(e);\n }\n\n return '.';\n};\n/**\n * Creates an object for sending to a web worker modifying properties that are TypedArrays\n * into a new object with seperated properties for the buffer, byteOffset, and byteLength.\n *\n * @param {Object} message\n * Object of properties and values to send to the web worker\n * @return {Object}\n * Modified message with TypedArray values expanded\n * @function createTransferableMessage\n */\n\n\nvar createTransferableMessage = function createTransferableMessage(message) {\n var transferable = {};\n Object.keys(message).forEach(function (key) {\n var value = message[key];\n\n if (ArrayBuffer.isView(value)) {\n transferable[key] = {\n bytes: value.buffer,\n byteOffset: value.byteOffset,\n byteLength: value.byteLength\n };\n } else {\n transferable[key] = value;\n }\n });\n return transferable;\n};\n/**\n * Returns a unique string identifier for a media initialization\n * segment.\n */\n\n\nvar initSegmentId = function initSegmentId(initSegment) {\n var byterange = initSegment.byterange || {\n length: Infinity,\n offset: 0\n };\n return [byterange.length, byterange.offset, initSegment.resolvedUri].join(',');\n};\n/**\n * Returns a unique string identifier for a media segment key.\n */\n\n\nvar segmentKeyId = function segmentKeyId(key) {\n return key.resolvedUri;\n};\n/**\n * utils to help dump binary data to the console\n */\n\n\nvar hexDump = function hexDump(data) {\n var bytes = Array.prototype.slice.call(data);\n var step = 16;\n var result = '';\n var hex = void 0;\n var ascii = void 0;\n\n for (var j = 0; j < bytes.length / step; j++) {\n hex = bytes.slice(j * step, j * step + step).map(formatHexString).join('');\n ascii = bytes.slice(j * step, j * step + step).map(formatAsciiString).join('');\n result += hex + ' ' + ascii + '\\n';\n }\n\n return result;\n};\n\nvar tagDump = function tagDump(_ref) {\n var bytes = _ref.bytes;\n return hexDump(bytes);\n};\n\nvar textRanges = function textRanges(ranges) {\n var result = '';\n var i = void 0;\n\n for (i = 0; i < ranges.length; i++) {\n result += textRange(ranges, i) + ' ';\n }\n\n return result;\n};\n\nvar utils =\n/*#__PURE__*/\nObject.freeze({\n createTransferableMessage: createTransferableMessage,\n initSegmentId: initSegmentId,\n segmentKeyId: segmentKeyId,\n hexDump: hexDump,\n tagDump: tagDump,\n textRanges: textRanges\n}); // TODO handle fmp4 case where the timing info is accurate and doesn't involve transmux\n// Add 25% to the segment duration to account for small discrepencies in segment timing.\n// 25% was arbitrarily chosen, and may need to be refined over time.\n\nvar SEGMENT_END_FUDGE_PERCENT = 0.25;\n/**\n * Converts a player time (any time that can be gotten/set from player.currentTime(),\n * e.g., any time within player.seekable().start(0) to player.seekable().end(0)) to a\n * program time (any time referencing the real world (e.g., EXT-X-PROGRAM-DATE-TIME)).\n *\n * The containing segment is required as the EXT-X-PROGRAM-DATE-TIME serves as an \"anchor\n * point\" (a point where we have a mapping from program time to player time, with player\n * time being the post transmux start of the segment).\n *\n * For more details, see [this doc](../../docs/program-time-from-player-time.md).\n *\n * @param {Number} playerTime the player time\n * @param {Object} segment the segment which contains the player time\n * @return {Date} program time\n */\n\nvar playerTimeToProgramTime = function playerTimeToProgramTime(playerTime, segment) {\n if (!segment.dateTimeObject) {\n // Can't convert without an \"anchor point\" for the program time (i.e., a time that can\n // be used to map the start of a segment with a real world time).\n return null;\n }\n\n var transmuxerPrependedSeconds = segment.videoTimingInfo.transmuxerPrependedSeconds;\n var transmuxedStart = segment.videoTimingInfo.transmuxedPresentationStart; // get the start of the content from before old content is prepended\n\n var startOfSegment = transmuxedStart + transmuxerPrependedSeconds;\n var offsetFromSegmentStart = playerTime - startOfSegment;\n return new Date(segment.dateTimeObject.getTime() + offsetFromSegmentStart * 1000);\n};\n\nvar originalSegmentVideoDuration = function originalSegmentVideoDuration(videoTimingInfo) {\n return videoTimingInfo.transmuxedPresentationEnd - videoTimingInfo.transmuxedPresentationStart - videoTimingInfo.transmuxerPrependedSeconds;\n};\n/**\n * Finds a segment that contains the time requested given as an ISO-8601 string. The\n * returned segment might be an estimate or an accurate match.\n *\n * @param {String} programTime The ISO-8601 programTime to find a match for\n * @param {Object} playlist A playlist object to search within\n */\n\n\nvar findSegmentForProgramTime = function findSegmentForProgramTime(programTime, playlist) {\n // Assumptions:\n // - verifyProgramDateTimeTags has already been run\n // - live streams have been started\n var dateTimeObject = void 0;\n\n try {\n dateTimeObject = new Date(programTime);\n } catch (e) {\n return null;\n }\n\n if (!playlist || !playlist.segments || playlist.segments.length === 0) {\n return null;\n }\n\n var segment = playlist.segments[0];\n\n if (dateTimeObject < segment.dateTimeObject) {\n // Requested time is before stream start.\n return null;\n }\n\n for (var i = 0; i < playlist.segments.length - 1; i++) {\n segment = playlist.segments[i];\n var nextSegmentStart = playlist.segments[i + 1].dateTimeObject;\n\n if (dateTimeObject < nextSegmentStart) {\n break;\n }\n }\n\n var lastSegment = playlist.segments[playlist.segments.length - 1];\n var lastSegmentStart = lastSegment.dateTimeObject;\n var lastSegmentDuration = lastSegment.videoTimingInfo ? originalSegmentVideoDuration(lastSegment.videoTimingInfo) : lastSegment.duration + lastSegment.duration * SEGMENT_END_FUDGE_PERCENT;\n var lastSegmentEnd = new Date(lastSegmentStart.getTime() + lastSegmentDuration * 1000);\n\n if (dateTimeObject > lastSegmentEnd) {\n // Beyond the end of the stream, or our best guess of the end of the stream.\n return null;\n }\n\n if (dateTimeObject > lastSegmentStart) {\n segment = lastSegment;\n }\n\n return {\n segment: segment,\n estimatedStart: segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationStart : Playlist.duration(playlist, playlist.mediaSequence + playlist.segments.indexOf(segment)),\n // Although, given that all segments have accurate date time objects, the segment\n // selected should be accurate, unless the video has been transmuxed at some point\n // (determined by the presence of the videoTimingInfo object), the segment's \"player\n // time\" (the start time in the player) can't be considered accurate.\n type: segment.videoTimingInfo ? 'accurate' : 'estimate'\n };\n};\n/**\n * Finds a segment that contains the given player time(in seconds).\n *\n * @param {Number} time The player time to find a match for\n * @param {Object} playlist A playlist object to search within\n */\n\n\nvar findSegmentForPlayerTime = function findSegmentForPlayerTime(time, playlist) {\n // Assumptions:\n // - there will always be a segment.duration\n // - we can start from zero\n // - segments are in time order\n if (!playlist || !playlist.segments || playlist.segments.length === 0) {\n return null;\n }\n\n var segmentEnd = 0;\n var segment = void 0;\n\n for (var i = 0; i < playlist.segments.length; i++) {\n segment = playlist.segments[i]; // videoTimingInfo is set after the segment is downloaded and transmuxed, and\n // should contain the most accurate values we have for the segment's player times.\n //\n // Use the accurate transmuxedPresentationEnd value if it is available, otherwise fall\n // back to an estimate based on the manifest derived (inaccurate) segment.duration, to\n // calculate an end value.\n\n segmentEnd = segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationEnd : segmentEnd + segment.duration;\n\n if (time <= segmentEnd) {\n break;\n }\n }\n\n var lastSegment = playlist.segments[playlist.segments.length - 1];\n\n if (lastSegment.videoTimingInfo && lastSegment.videoTimingInfo.transmuxedPresentationEnd < time) {\n // The time requested is beyond the stream end.\n return null;\n }\n\n if (time > segmentEnd) {\n // The time is within or beyond the last segment.\n //\n // Check to see if the time is beyond a reasonable guess of the end of the stream.\n if (time > segmentEnd + lastSegment.duration * SEGMENT_END_FUDGE_PERCENT) {\n // Technically, because the duration value is only an estimate, the time may still\n // exist in the last segment, however, there isn't enough information to make even\n // a reasonable estimate.\n return null;\n }\n\n segment = lastSegment;\n }\n\n return {\n segment: segment,\n estimatedStart: segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationStart : segmentEnd - segment.duration,\n // Because videoTimingInfo is only set after transmux, it is the only way to get\n // accurate timing values.\n type: segment.videoTimingInfo ? 'accurate' : 'estimate'\n };\n};\n/**\n * Gives the offset of the comparisonTimestamp from the programTime timestamp in seconds.\n * If the offset returned is positive, the programTime occurs after the\n * comparisonTimestamp.\n * If the offset is negative, the programTime occurs before the comparisonTimestamp.\n *\n * @param {String} comparisonTimeStamp An ISO-8601 timestamp to compare against\n * @param {String} programTime The programTime as an ISO-8601 string\n * @return {Number} offset\n */\n\n\nvar getOffsetFromTimestamp = function getOffsetFromTimestamp(comparisonTimeStamp, programTime) {\n var segmentDateTime = void 0;\n var programDateTime = void 0;\n\n try {\n segmentDateTime = new Date(comparisonTimeStamp);\n programDateTime = new Date(programTime);\n } catch (e) {// TODO handle error\n }\n\n var segmentTimeEpoch = segmentDateTime.getTime();\n var programTimeEpoch = programDateTime.getTime();\n return (programTimeEpoch - segmentTimeEpoch) / 1000;\n};\n/**\n * Checks that all segments in this playlist have programDateTime tags.\n *\n * @param {Object} playlist A playlist object\n */\n\n\nvar verifyProgramDateTimeTags = function verifyProgramDateTimeTags(playlist) {\n if (!playlist.segments || playlist.segments.length === 0) {\n return false;\n }\n\n for (var i = 0; i < playlist.segments.length; i++) {\n var segment = playlist.segments[i];\n\n if (!segment.dateTimeObject) {\n return false;\n }\n }\n\n return true;\n};\n/**\n * Returns the programTime of the media given a playlist and a playerTime.\n * The playlist must have programDateTime tags for a programDateTime tag to be returned.\n * If the segments containing the time requested have not been buffered yet, an estimate\n * may be returned to the callback.\n *\n * @param {Object} args\n * @param {Object} args.playlist A playlist object to search within\n * @param {Number} time A playerTime in seconds\n * @param {Function} callback(err, programTime)\n * @returns {String} err.message A detailed error message\n * @returns {Object} programTime\n * @returns {Number} programTime.mediaSeconds The streamTime in seconds\n * @returns {String} programTime.programDateTime The programTime as an ISO-8601 String\n */\n\n\nvar getProgramTime = function getProgramTime(_ref) {\n var playlist = _ref.playlist,\n _ref$time = _ref.time,\n time = _ref$time === undefined ? undefined : _ref$time,\n callback = _ref.callback;\n\n if (!callback) {\n throw new Error('getProgramTime: callback must be provided');\n }\n\n if (!playlist || time === undefined) {\n return callback({\n message: 'getProgramTime: playlist and time must be provided'\n });\n }\n\n var matchedSegment = findSegmentForPlayerTime(time, playlist);\n\n if (!matchedSegment) {\n return callback({\n message: 'valid programTime was not found'\n });\n }\n\n if (matchedSegment.type === 'estimate') {\n return callback({\n message: 'Accurate programTime could not be determined.' + ' Please seek to e.seekTime and try again',\n seekTime: matchedSegment.estimatedStart\n });\n }\n\n var programTimeObject = {\n mediaSeconds: time\n };\n var programTime = playerTimeToProgramTime(time, matchedSegment.segment);\n\n if (programTime) {\n programTimeObject.programDateTime = programTime.toISOString();\n }\n\n return callback(null, programTimeObject);\n};\n/**\n * Seeks in the player to a time that matches the given programTime ISO-8601 string.\n *\n * @param {Object} args\n * @param {String} args.programTime A programTime to seek to as an ISO-8601 String\n * @param {Object} args.playlist A playlist to look within\n * @param {Number} args.retryCount The number of times to try for an accurate seek. Default is 2.\n * @param {Function} args.seekTo A method to perform a seek\n * @param {Boolean} args.pauseAfterSeek Whether to end in a paused state after seeking. Default is true.\n * @param {Object} args.tech The tech to seek on\n * @param {Function} args.callback(err, newTime) A callback to return the new time to\n * @returns {String} err.message A detailed error message\n * @returns {Number} newTime The exact time that was seeked to in seconds\n */\n\n\nvar seekToProgramTime = function seekToProgramTime(_ref2) {\n var programTime = _ref2.programTime,\n playlist = _ref2.playlist,\n _ref2$retryCount = _ref2.retryCount,\n retryCount = _ref2$retryCount === undefined ? 2 : _ref2$retryCount,\n seekTo = _ref2.seekTo,\n _ref2$pauseAfterSeek = _ref2.pauseAfterSeek,\n pauseAfterSeek = _ref2$pauseAfterSeek === undefined ? true : _ref2$pauseAfterSeek,\n tech = _ref2.tech,\n callback = _ref2.callback;\n\n if (!callback) {\n throw new Error('seekToProgramTime: callback must be provided');\n }\n\n if (typeof programTime === 'undefined' || !playlist || !seekTo) {\n return callback({\n message: 'seekToProgramTime: programTime, seekTo and playlist must be provided'\n });\n }\n\n if (!playlist.endList && !tech.hasStarted_) {\n return callback({\n message: 'player must be playing a live stream to start buffering'\n });\n }\n\n if (!verifyProgramDateTimeTags(playlist)) {\n return callback({\n message: 'programDateTime tags must be provided in the manifest ' + playlist.resolvedUri\n });\n }\n\n var matchedSegment = findSegmentForProgramTime(programTime, playlist); // no match\n\n if (!matchedSegment) {\n return callback({\n message: programTime + ' was not found in the stream'\n });\n }\n\n var segment = matchedSegment.segment;\n var mediaOffset = getOffsetFromTimestamp(segment.dateTimeObject, programTime);\n\n if (matchedSegment.type === 'estimate') {\n // we've run out of retries\n if (retryCount === 0) {\n return callback({\n message: programTime + ' is not buffered yet. Try again'\n });\n }\n\n seekTo(matchedSegment.estimatedStart + mediaOffset);\n tech.one('seeked', function () {\n seekToProgramTime({\n programTime: programTime,\n playlist: playlist,\n retryCount: retryCount - 1,\n seekTo: seekTo,\n pauseAfterSeek: pauseAfterSeek,\n tech: tech,\n callback: callback\n });\n });\n return;\n } // Since the segment.start value is determined from the buffered end or ending time\n // of the prior segment, the seekToTime doesn't need to account for any transmuxer\n // modifications.\n\n\n var seekToTime = segment.start + mediaOffset;\n\n var seekedCallback = function seekedCallback() {\n return callback(null, tech.currentTime());\n }; // listen for seeked event\n\n\n tech.one('seeked', seekedCallback); // pause before seeking as video.js will restore this state\n\n if (pauseAfterSeek) {\n tech.pause();\n }\n\n seekTo(seekToTime);\n};\n/**\n * ranges\n *\n * Utilities for working with TimeRanges.\n *\n */\n// Fudge factor to account for TimeRanges rounding\n\n\nvar TIME_FUDGE_FACTOR = 1 / 30; // Comparisons between time values such as current time and the end of the buffered range\n// can be misleading because of precision differences or when the current media has poorly\n// aligned audio and video, which can cause values to be slightly off from what you would\n// expect. This value is what we consider to be safe to use in such comparisons to account\n// for these scenarios.\n\nvar SAFE_TIME_DELTA = TIME_FUDGE_FACTOR * 3;\n\nvar filterRanges = function filterRanges(timeRanges, predicate) {\n var results = [];\n var i = void 0;\n\n if (timeRanges && timeRanges.length) {\n // Search for ranges that match the predicate\n for (i = 0; i < timeRanges.length; i++) {\n if (predicate(timeRanges.start(i), timeRanges.end(i))) {\n results.push([timeRanges.start(i), timeRanges.end(i)]);\n }\n }\n }\n\n return videojs$1.createTimeRanges(results);\n};\n/**\n * Attempts to find the buffered TimeRange that contains the specified\n * time.\n * @param {TimeRanges} buffered - the TimeRanges object to query\n * @param {number} time - the time to filter on.\n * @returns {TimeRanges} a new TimeRanges object\n */\n\n\nvar findRange = function findRange(buffered, time) {\n return filterRanges(buffered, function (start, end) {\n return start - SAFE_TIME_DELTA <= time && end + SAFE_TIME_DELTA >= time;\n });\n};\n/**\n * Returns the TimeRanges that begin later than the specified time.\n * @param {TimeRanges} timeRanges - the TimeRanges object to query\n * @param {number} time - the time to filter on.\n * @returns {TimeRanges} a new TimeRanges object.\n */\n\n\nvar findNextRange = function findNextRange(timeRanges, time) {\n return filterRanges(timeRanges, function (start) {\n return start - TIME_FUDGE_FACTOR >= time;\n });\n};\n/**\n * Returns gaps within a list of TimeRanges\n * @param {TimeRanges} buffered - the TimeRanges object\n * @return {TimeRanges} a TimeRanges object of gaps\n */\n\n\nvar findGaps = function findGaps(buffered) {\n if (buffered.length < 2) {\n return videojs$1.createTimeRanges();\n }\n\n var ranges = [];\n\n for (var i = 1; i < buffered.length; i++) {\n var start = buffered.end(i - 1);\n var end = buffered.start(i);\n ranges.push([start, end]);\n }\n\n return videojs$1.createTimeRanges(ranges);\n};\n/**\n * Gets a human readable string for a TimeRange\n *\n * @param {TimeRange} range\n * @returns {String} a human readable string\n */\n\n\nvar printableRange = function printableRange(range) {\n var strArr = [];\n\n if (!range || !range.length) {\n return '';\n }\n\n for (var i = 0; i < range.length; i++) {\n strArr.push(range.start(i) + ' => ' + range.end(i));\n }\n\n return strArr.join(', ');\n};\n/**\n * Calculates the amount of time left in seconds until the player hits the end of the\n * buffer and causes a rebuffer\n *\n * @param {TimeRange} buffered\n * The state of the buffer\n * @param {Numnber} currentTime\n * The current time of the player\n * @param {Number} playbackRate\n * The current playback rate of the player. Defaults to 1.\n * @return {Number}\n * Time until the player has to start rebuffering in seconds.\n * @function timeUntilRebuffer\n */\n\n\nvar timeUntilRebuffer = function timeUntilRebuffer(buffered, currentTime) {\n var playbackRate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var bufferedEnd = buffered.length ? buffered.end(buffered.length - 1) : 0;\n return (bufferedEnd - currentTime) / playbackRate;\n};\n/**\n * Converts a TimeRanges object into an array representation\n * @param {TimeRanges} timeRanges\n * @returns {Array}\n */\n\n\nvar timeRangesToArray = function timeRangesToArray(timeRanges) {\n var timeRangesList = [];\n\n for (var i = 0; i < timeRanges.length; i++) {\n timeRangesList.push({\n start: timeRanges.start(i),\n end: timeRanges.end(i)\n });\n }\n\n return timeRangesList;\n};\n/**\n * @file create-text-tracks-if-necessary.js\n */\n\n/**\n * Create text tracks on video.js if they exist on a segment.\n *\n * @param {Object} sourceBuffer the VSB or FSB\n * @param {Object} mediaSource the HTML media source\n * @param {Object} segment the segment that may contain the text track\n * @private\n */\n\n\nvar createTextTracksIfNecessary = function createTextTracksIfNecessary(sourceBuffer, mediaSource, segment) {\n var player = mediaSource.player_; // create an in-band caption track if one is present in the segment\n\n if (segment.captions && segment.captions.length) {\n if (!sourceBuffer.inbandTextTracks_) {\n sourceBuffer.inbandTextTracks_ = {};\n }\n\n for (var trackId in segment.captionStreams) {\n if (!sourceBuffer.inbandTextTracks_[trackId]) {\n player.tech_.trigger({\n type: 'usage',\n name: 'hls-608'\n });\n var track = player.textTracks().getTrackById(trackId);\n\n if (track) {\n // Resuse an existing track with a CC# id because this was\n // very likely created by videojs-contrib-hls from information\n // in the m3u8 for us to use\n sourceBuffer.inbandTextTracks_[trackId] = track;\n } else {\n // Otherwise, create a track with the default `CC#` label and\n // without a language\n sourceBuffer.inbandTextTracks_[trackId] = player.addRemoteTextTrack({\n kind: 'captions',\n id: trackId,\n label: trackId\n }, false).track;\n }\n }\n }\n }\n\n if (segment.metadata && segment.metadata.length && !sourceBuffer.metadataTrack_) {\n sourceBuffer.metadataTrack_ = player.addRemoteTextTrack({\n kind: 'metadata',\n label: 'Timed Metadata'\n }, false).track;\n sourceBuffer.metadataTrack_.inBandMetadataTrackDispatchType = segment.metadata.dispatchType;\n }\n};\n/**\n * @file remove-cues-from-track.js\n */\n\n/**\n * Remove cues from a track on video.js.\n *\n * @param {Double} start start of where we should remove the cue\n * @param {Double} end end of where the we should remove the cue\n * @param {Object} track the text track to remove the cues from\n * @private\n */\n\n\nvar removeCuesFromTrack = function removeCuesFromTrack(start, end, track) {\n var i = void 0;\n var cue = void 0;\n\n if (!track) {\n return;\n }\n\n if (!track.cues) {\n return;\n }\n\n i = track.cues.length;\n\n while (i--) {\n cue = track.cues[i]; // Remove any overlapping cue\n\n if (cue.startTime <= end && cue.endTime >= start) {\n track.removeCue(cue);\n }\n }\n};\n/**\n * @file add-text-track-data.js\n */\n\n/**\n * Define properties on a cue for backwards compatability,\n * but warn the user that the way that they are using it\n * is depricated and will be removed at a later date.\n *\n * @param {Cue} cue the cue to add the properties on\n * @private\n */\n\n\nvar deprecateOldCue = function deprecateOldCue(cue) {\n Object.defineProperties(cue.frame, {\n id: {\n get: function get() {\n videojs$1.log.warn('cue.frame.id is deprecated. Use cue.value.key instead.');\n return cue.value.key;\n }\n },\n value: {\n get: function get() {\n videojs$1.log.warn('cue.frame.value is deprecated. Use cue.value.data instead.');\n return cue.value.data;\n }\n },\n privateData: {\n get: function get() {\n videojs$1.log.warn('cue.frame.privateData is deprecated. Use cue.value.data instead.');\n return cue.value.data;\n }\n }\n });\n};\n\nvar durationOfVideo = function durationOfVideo(duration) {\n var dur = void 0;\n\n if (isNaN(duration) || Math.abs(duration) === Infinity) {\n dur = Number.MAX_VALUE;\n } else {\n dur = duration;\n }\n\n return dur;\n};\n/**\n * Add text track data to a source handler given the captions and\n * metadata from the buffer.\n *\n * @param {Object} sourceHandler the virtual source buffer\n * @param {Array} captionArray an array of caption data\n * @param {Array} metadataArray an array of meta data\n * @private\n */\n\n\nvar addTextTrackData = function addTextTrackData(sourceHandler, captionArray, metadataArray) {\n var Cue = window$1.WebKitDataCue || window$1.VTTCue;\n\n if (captionArray) {\n captionArray.forEach(function (caption) {\n var track = caption.stream;\n this.inbandTextTracks_[track].addCue(new Cue(caption.startTime + this.timestampOffset, caption.endTime + this.timestampOffset, caption.text));\n }, sourceHandler);\n }\n\n if (metadataArray) {\n var videoDuration = durationOfVideo(sourceHandler.mediaSource_.duration);\n metadataArray.forEach(function (metadata) {\n var time = metadata.cueTime + this.timestampOffset; // if time isn't a finite number between 0 and Infinity, like NaN,\n // ignore this bit of metadata.\n // This likely occurs when you have an non-timed ID3 tag like TIT2,\n // which is the \"Title/Songname/Content description\" frame\n\n if (typeof time !== 'number' || window$1.isNaN(time) || time < 0 || !(time < Infinity)) {\n return;\n }\n\n metadata.frames.forEach(function (frame) {\n var cue = new Cue(time, time, frame.value || frame.url || frame.data || '');\n cue.frame = frame;\n cue.value = frame;\n deprecateOldCue(cue);\n this.metadataTrack_.addCue(cue);\n }, this);\n }, sourceHandler); // Updating the metadeta cues so that\n // the endTime of each cue is the startTime of the next cue\n // the endTime of last cue is the duration of the video\n\n if (sourceHandler.metadataTrack_ && sourceHandler.metadataTrack_.cues && sourceHandler.metadataTrack_.cues.length) {\n var cues = sourceHandler.metadataTrack_.cues;\n var cuesArray = []; // Create a copy of the TextTrackCueList...\n // ...disregarding cues with a falsey value\n\n for (var i = 0; i < cues.length; i++) {\n if (cues[i]) {\n cuesArray.push(cues[i]);\n }\n } // Group cues by their startTime value\n\n\n var cuesGroupedByStartTime = cuesArray.reduce(function (obj, cue) {\n var timeSlot = obj[cue.startTime] || [];\n timeSlot.push(cue);\n obj[cue.startTime] = timeSlot;\n return obj;\n }, {}); // Sort startTimes by ascending order\n\n var sortedStartTimes = Object.keys(cuesGroupedByStartTime).sort(function (a, b) {\n return Number(a) - Number(b);\n }); // Map each cue group's endTime to the next group's startTime\n\n sortedStartTimes.forEach(function (startTime, idx) {\n var cueGroup = cuesGroupedByStartTime[startTime];\n var nextTime = Number(sortedStartTimes[idx + 1]) || videoDuration; // Map each cue's endTime the next group's startTime\n\n cueGroup.forEach(function (cue) {\n cue.endTime = nextTime;\n });\n });\n }\n }\n};\n\nvar win = typeof window !== 'undefined' ? window : {},\n TARGET = typeof Symbol === 'undefined' ? '__target' : Symbol(),\n SCRIPT_TYPE = 'application/javascript',\n BlobBuilder = win.BlobBuilder || win.WebKitBlobBuilder || win.MozBlobBuilder || win.MSBlobBuilder,\n URL = win.URL || win.webkitURL || URL && URL.msURL,\n Worker = win.Worker;\n/**\n * Returns a wrapper around Web Worker code that is constructible.\n *\n * @function shimWorker\n *\n * @param { String } filename The name of the file\n * @param { Function } fn Function wrapping the code of the worker\n */\n\nfunction shimWorker(filename, fn) {\n return function ShimWorker(forceFallback) {\n var o = this;\n\n if (!fn) {\n return new Worker(filename);\n } else if (Worker && !forceFallback) {\n // Convert the function's inner code to a string to construct the worker\n var source = fn.toString().replace(/^function.+?{/, '').slice(0, -1),\n objURL = createSourceObject(source);\n this[TARGET] = new Worker(objURL);\n wrapTerminate(this[TARGET], objURL);\n return this[TARGET];\n } else {\n var selfShim = {\n postMessage: function postMessage(m) {\n if (o.onmessage) {\n setTimeout(function () {\n o.onmessage({\n data: m,\n target: selfShim\n });\n });\n }\n }\n };\n fn.call(selfShim);\n\n this.postMessage = function (m) {\n setTimeout(function () {\n selfShim.onmessage({\n data: m,\n target: o\n });\n });\n };\n\n this.isThisThread = true;\n }\n };\n} // Test Worker capabilities\n\n\nif (Worker) {\n var testWorker,\n objURL = createSourceObject('self.onmessage = function () {}'),\n testArray = new Uint8Array(1);\n\n try {\n testWorker = new Worker(objURL); // Native browser on some Samsung devices throws for transferables, let's detect it\n\n testWorker.postMessage(testArray, [testArray.buffer]);\n } catch (e) {\n Worker = null;\n } finally {\n URL.revokeObjectURL(objURL);\n\n if (testWorker) {\n testWorker.terminate();\n }\n }\n}\n\nfunction createSourceObject(str) {\n try {\n return URL.createObjectURL(new Blob([str], {\n type: SCRIPT_TYPE\n }));\n } catch (e) {\n var blob = new BlobBuilder();\n blob.append(str);\n return URL.createObjectURL(blob.getBlob(type));\n }\n}\n\nfunction wrapTerminate(worker, objURL) {\n if (!worker || !objURL) return;\n var term = worker.terminate;\n worker.objURL = objURL;\n\n worker.terminate = function () {\n if (worker.objURL) URL.revokeObjectURL(worker.objURL);\n term.call(worker);\n };\n}\n\nvar TransmuxWorker = new shimWorker(\"./transmuxer-worker.worker.js\", function (window, document$$1) {\n var self = this;\n\n var transmuxerWorker = function () {\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * A lightweight readable stream implemention that handles event dispatching.\n * Objects that inherit from streams should call init in their constructors.\n */\n var Stream = function Stream() {\n this.init = function () {\n var listeners = {};\n /**\n * Add a listener for a specified event type.\n * @param type {string} the event name\n * @param listener {function} the callback to be invoked when an event of\n * the specified type occurs\n */\n\n this.on = function (type, listener) {\n if (!listeners[type]) {\n listeners[type] = [];\n }\n\n listeners[type] = listeners[type].concat(listener);\n };\n /**\n * Remove a listener for a specified event type.\n * @param type {string} the event name\n * @param listener {function} a function previously registered for this\n * type of event through `on`\n */\n\n\n this.off = function (type, listener) {\n var index;\n\n if (!listeners[type]) {\n return false;\n }\n\n index = listeners[type].indexOf(listener);\n listeners[type] = listeners[type].slice();\n listeners[type].splice(index, 1);\n return index > -1;\n };\n /**\n * Trigger an event of the specified type on this stream. Any additional\n * arguments to this function are passed as parameters to event listeners.\n * @param type {string} the event name\n */\n\n\n this.trigger = function (type) {\n var callbacks, i, length, args;\n callbacks = listeners[type];\n\n if (!callbacks) {\n return;\n } // Slicing the arguments on every invocation of this method\n // can add a significant amount of overhead. Avoid the\n // intermediate object creation for the common case of a\n // single callback argument\n\n\n if (arguments.length === 2) {\n length = callbacks.length;\n\n for (i = 0; i < length; ++i) {\n callbacks[i].call(this, arguments[1]);\n }\n } else {\n args = [];\n i = arguments.length;\n\n for (i = 1; i < arguments.length; ++i) {\n args.push(arguments[i]);\n }\n\n length = callbacks.length;\n\n for (i = 0; i < length; ++i) {\n callbacks[i].apply(this, args);\n }\n }\n };\n /**\n * Destroys the stream and cleans up.\n */\n\n\n this.dispose = function () {\n listeners = {};\n };\n };\n };\n /**\n * Forwards all `data` events on this stream to the destination stream. The\n * destination stream should provide a method `push` to receive the data\n * events as they arrive.\n * @param destination {stream} the stream that will receive all `data` events\n * @param autoFlush {boolean} if false, we will not call `flush` on the destination\n * when the current stream emits a 'done' event\n * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n */\n\n\n Stream.prototype.pipe = function (destination) {\n this.on('data', function (data) {\n destination.push(data);\n });\n this.on('done', function (flushSource) {\n destination.flush(flushSource);\n });\n this.on('partialdone', function (flushSource) {\n destination.partialFlush(flushSource);\n });\n this.on('endedtimeline', function (flushSource) {\n destination.endTimeline(flushSource);\n });\n this.on('reset', function (flushSource) {\n destination.reset(flushSource);\n });\n return destination;\n }; // Default stream functions that are expected to be overridden to perform\n // actual work. These are provided by the prototype as a sort of no-op\n // implementation so that we don't have to check for their existence in the\n // `pipe` function above.\n\n\n Stream.prototype.push = function (data) {\n this.trigger('data', data);\n };\n\n Stream.prototype.flush = function (flushSource) {\n this.trigger('done', flushSource);\n };\n\n Stream.prototype.partialFlush = function (flushSource) {\n this.trigger('partialdone', flushSource);\n };\n\n Stream.prototype.endTimeline = function (flushSource) {\n this.trigger('endedtimeline', flushSource);\n };\n\n Stream.prototype.reset = function (flushSource) {\n this.trigger('reset', flushSource);\n };\n\n var stream = Stream;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Functions that generate fragmented MP4s suitable for use with Media\n * Source Extensions.\n */\n\n var UINT32_MAX = Math.pow(2, 32) - 1;\n var box, dinf, esds, ftyp, mdat, mfhd, minf, moof, moov, mvex, mvhd, trak, tkhd, mdia, mdhd, hdlr, sdtp, stbl, stsd, traf, trex, trun, types, MAJOR_BRAND, MINOR_VERSION, AVC1_BRAND, VIDEO_HDLR, AUDIO_HDLR, HDLR_TYPES, VMHD, SMHD, DREF, STCO, STSC, STSZ, STTS; // pre-calculate constants\n\n (function () {\n var i;\n types = {\n avc1: [],\n // codingname\n avcC: [],\n btrt: [],\n dinf: [],\n dref: [],\n esds: [],\n ftyp: [],\n hdlr: [],\n mdat: [],\n mdhd: [],\n mdia: [],\n mfhd: [],\n minf: [],\n moof: [],\n moov: [],\n mp4a: [],\n // codingname\n mvex: [],\n mvhd: [],\n pasp: [],\n sdtp: [],\n smhd: [],\n stbl: [],\n stco: [],\n stsc: [],\n stsd: [],\n stsz: [],\n stts: [],\n styp: [],\n tfdt: [],\n tfhd: [],\n traf: [],\n trak: [],\n trun: [],\n trex: [],\n tkhd: [],\n vmhd: []\n }; // In environments where Uint8Array is undefined (e.g., IE8), skip set up so that we\n // don't throw an error\n\n if (typeof Uint8Array === 'undefined') {\n return;\n }\n\n for (i in types) {\n if (types.hasOwnProperty(i)) {\n types[i] = [i.charCodeAt(0), i.charCodeAt(1), i.charCodeAt(2), i.charCodeAt(3)];\n }\n }\n\n MAJOR_BRAND = new Uint8Array(['i'.charCodeAt(0), 's'.charCodeAt(0), 'o'.charCodeAt(0), 'm'.charCodeAt(0)]);\n AVC1_BRAND = new Uint8Array(['a'.charCodeAt(0), 'v'.charCodeAt(0), 'c'.charCodeAt(0), '1'.charCodeAt(0)]);\n MINOR_VERSION = new Uint8Array([0, 0, 0, 1]);\n VIDEO_HDLR = new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0x76, 0x69, 0x64, 0x65, // handler_type: 'vide'\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x56, 0x69, 0x64, 0x65, 0x6f, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler'\n ]);\n AUDIO_HDLR = new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0x73, 0x6f, 0x75, 0x6e, // handler_type: 'soun'\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x53, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'SoundHandler'\n ]);\n HDLR_TYPES = {\n video: VIDEO_HDLR,\n audio: AUDIO_HDLR\n };\n DREF = new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x01, // entry_count\n 0x00, 0x00, 0x00, 0x0c, // entry_size\n 0x75, 0x72, 0x6c, 0x20, // 'url' type\n 0x00, // version 0\n 0x00, 0x00, 0x01 // entry_flags\n ]);\n SMHD = new Uint8Array([0x00, // version\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, // balance, 0 means centered\n 0x00, 0x00 // reserved\n ]);\n STCO = new Uint8Array([0x00, // version\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00 // entry_count\n ]);\n STSC = STCO;\n STSZ = new Uint8Array([0x00, // version\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, // sample_size\n 0x00, 0x00, 0x00, 0x00 // sample_count\n ]);\n STTS = STCO;\n VMHD = new Uint8Array([0x00, // version\n 0x00, 0x00, 0x01, // flags\n 0x00, 0x00, // graphicsmode\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // opcolor\n ]);\n })();\n\n box = function box(type) {\n var payload = [],\n size = 0,\n i,\n result,\n view;\n\n for (i = 1; i < arguments.length; i++) {\n payload.push(arguments[i]);\n }\n\n i = payload.length; // calculate the total size we need to allocate\n\n while (i--) {\n size += payload[i].byteLength;\n }\n\n result = new Uint8Array(size + 8);\n view = new DataView(result.buffer, result.byteOffset, result.byteLength);\n view.setUint32(0, result.byteLength);\n result.set(type, 4); // copy the payload into the result\n\n for (i = 0, size = 8; i < payload.length; i++) {\n result.set(payload[i], size);\n size += payload[i].byteLength;\n }\n\n return result;\n };\n\n dinf = function dinf() {\n return box(types.dinf, box(types.dref, DREF));\n };\n\n esds = function esds(track) {\n return box(types.esds, new Uint8Array([0x00, // version\n 0x00, 0x00, 0x00, // flags\n // ES_Descriptor\n 0x03, // tag, ES_DescrTag\n 0x19, // length\n 0x00, 0x00, // ES_ID\n 0x00, // streamDependenceFlag, URL_flag, reserved, streamPriority\n // DecoderConfigDescriptor\n 0x04, // tag, DecoderConfigDescrTag\n 0x11, // length\n 0x40, // object type\n 0x15, // streamType\n 0x00, 0x06, 0x00, // bufferSizeDB\n 0x00, 0x00, 0xda, 0xc0, // maxBitrate\n 0x00, 0x00, 0xda, 0xc0, // avgBitrate\n // DecoderSpecificInfo\n 0x05, // tag, DecoderSpecificInfoTag\n 0x02, // length\n // ISO/IEC 14496-3, AudioSpecificConfig\n // for samplingFrequencyIndex see ISO/IEC 13818-7:2006, 8.1.3.2.2, Table 35\n track.audioobjecttype << 3 | track.samplingfrequencyindex >>> 1, track.samplingfrequencyindex << 7 | track.channelcount << 3, 0x06, 0x01, 0x02 // GASpecificConfig\n ]));\n };\n\n ftyp = function ftyp() {\n return box(types.ftyp, MAJOR_BRAND, MINOR_VERSION, MAJOR_BRAND, AVC1_BRAND);\n };\n\n hdlr = function hdlr(type) {\n return box(types.hdlr, HDLR_TYPES[type]);\n };\n\n mdat = function mdat(data) {\n return box(types.mdat, data);\n };\n\n mdhd = function mdhd(track) {\n var result = new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x02, // creation_time\n 0x00, 0x00, 0x00, 0x03, // modification_time\n 0x00, 0x01, 0x5f, 0x90, // timescale, 90,000 \"ticks\" per second\n track.duration >>> 24 & 0xFF, track.duration >>> 16 & 0xFF, track.duration >>> 8 & 0xFF, track.duration & 0xFF, // duration\n 0x55, 0xc4, // 'und' language (undetermined)\n 0x00, 0x00]); // Use the sample rate from the track metadata, when it is\n // defined. The sample rate can be parsed out of an ADTS header, for\n // instance.\n\n if (track.samplerate) {\n result[12] = track.samplerate >>> 24 & 0xFF;\n result[13] = track.samplerate >>> 16 & 0xFF;\n result[14] = track.samplerate >>> 8 & 0xFF;\n result[15] = track.samplerate & 0xFF;\n }\n\n return box(types.mdhd, result);\n };\n\n mdia = function mdia(track) {\n return box(types.mdia, mdhd(track), hdlr(track.type), minf(track));\n };\n\n mfhd = function mfhd(sequenceNumber) {\n return box(types.mfhd, new Uint8Array([0x00, 0x00, 0x00, 0x00, // flags\n (sequenceNumber & 0xFF000000) >> 24, (sequenceNumber & 0xFF0000) >> 16, (sequenceNumber & 0xFF00) >> 8, sequenceNumber & 0xFF // sequence_number\n ]));\n };\n\n minf = function minf(track) {\n return box(types.minf, track.type === 'video' ? box(types.vmhd, VMHD) : box(types.smhd, SMHD), dinf(), stbl(track));\n };\n\n moof = function moof(sequenceNumber, tracks) {\n var trackFragments = [],\n i = tracks.length; // build traf boxes for each track fragment\n\n while (i--) {\n trackFragments[i] = traf(tracks[i]);\n }\n\n return box.apply(null, [types.moof, mfhd(sequenceNumber)].concat(trackFragments));\n };\n /**\n * Returns a movie box.\n * @param tracks {array} the tracks associated with this movie\n * @see ISO/IEC 14496-12:2012(E), section 8.2.1\n */\n\n\n moov = function moov(tracks) {\n var i = tracks.length,\n boxes = [];\n\n while (i--) {\n boxes[i] = trak(tracks[i]);\n }\n\n return box.apply(null, [types.moov, mvhd(0xffffffff)].concat(boxes).concat(mvex(tracks)));\n };\n\n mvex = function mvex(tracks) {\n var i = tracks.length,\n boxes = [];\n\n while (i--) {\n boxes[i] = trex(tracks[i]);\n }\n\n return box.apply(null, [types.mvex].concat(boxes));\n };\n\n mvhd = function mvhd(duration) {\n var bytes = new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x01, // creation_time\n 0x00, 0x00, 0x00, 0x02, // modification_time\n 0x00, 0x01, 0x5f, 0x90, // timescale, 90,000 \"ticks\" per second\n (duration & 0xFF000000) >> 24, (duration & 0xFF0000) >> 16, (duration & 0xFF00) >> 8, duration & 0xFF, // duration\n 0x00, 0x01, 0x00, 0x00, // 1.0 rate\n 0x01, 0x00, // 1.0 volume\n 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0xff, 0xff, 0xff, 0xff // next_track_ID\n ]);\n return box(types.mvhd, bytes);\n };\n\n sdtp = function sdtp(track) {\n var samples = track.samples || [],\n bytes = new Uint8Array(4 + samples.length),\n flags,\n i; // leave the full box header (4 bytes) all zero\n // write the sample table\n\n for (i = 0; i < samples.length; i++) {\n flags = samples[i].flags;\n bytes[i + 4] = flags.dependsOn << 4 | flags.isDependedOn << 2 | flags.hasRedundancy;\n }\n\n return box(types.sdtp, bytes);\n };\n\n stbl = function stbl(track) {\n return box(types.stbl, stsd(track), box(types.stts, STTS), box(types.stsc, STSC), box(types.stsz, STSZ), box(types.stco, STCO));\n };\n\n (function () {\n var videoSample, audioSample;\n\n stsd = function stsd(track) {\n return box(types.stsd, new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x01]), track.type === 'video' ? videoSample(track) : audioSample(track));\n };\n\n videoSample = function videoSample(track) {\n var sps = track.sps || [],\n pps = track.pps || [],\n sequenceParameterSets = [],\n pictureParameterSets = [],\n i,\n avc1Box; // assemble the SPSs\n\n for (i = 0; i < sps.length; i++) {\n sequenceParameterSets.push((sps[i].byteLength & 0xFF00) >>> 8);\n sequenceParameterSets.push(sps[i].byteLength & 0xFF); // sequenceParameterSetLength\n\n sequenceParameterSets = sequenceParameterSets.concat(Array.prototype.slice.call(sps[i])); // SPS\n } // assemble the PPSs\n\n\n for (i = 0; i < pps.length; i++) {\n pictureParameterSets.push((pps[i].byteLength & 0xFF00) >>> 8);\n pictureParameterSets.push(pps[i].byteLength & 0xFF);\n pictureParameterSets = pictureParameterSets.concat(Array.prototype.slice.call(pps[i]));\n }\n\n avc1Box = [types.avc1, new Uint8Array([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, // data_reference_index\n 0x00, 0x00, // pre_defined\n 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // pre_defined\n (track.width & 0xff00) >> 8, track.width & 0xff, // width\n (track.height & 0xff00) >> 8, track.height & 0xff, // height\n 0x00, 0x48, 0x00, 0x00, // horizresolution\n 0x00, 0x48, 0x00, 0x00, // vertresolution\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, // frame_count\n 0x13, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x6a, 0x73, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x2d, 0x68, 0x6c, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // compressorname\n 0x00, 0x18, // depth = 24\n 0x11, 0x11 // pre_defined = -1\n ]), box(types.avcC, new Uint8Array([0x01, // configurationVersion\n track.profileIdc, // AVCProfileIndication\n track.profileCompatibility, // profile_compatibility\n track.levelIdc, // AVCLevelIndication\n 0xff // lengthSizeMinusOne, hard-coded to 4 bytes\n ].concat([sps.length], // numOfSequenceParameterSets\n sequenceParameterSets, // \"SPS\"\n [pps.length], // numOfPictureParameterSets\n pictureParameterSets // \"PPS\"\n ))), box(types.btrt, new Uint8Array([0x00, 0x1c, 0x9c, 0x80, // bufferSizeDB\n 0x00, 0x2d, 0xc6, 0xc0, // maxBitrate\n 0x00, 0x2d, 0xc6, 0xc0 // avgBitrate\n ]))];\n\n if (track.sarRatio) {\n var hSpacing = track.sarRatio[0],\n vSpacing = track.sarRatio[1];\n avc1Box.push(box(types.pasp, new Uint8Array([(hSpacing & 0xFF000000) >> 24, (hSpacing & 0xFF0000) >> 16, (hSpacing & 0xFF00) >> 8, hSpacing & 0xFF, (vSpacing & 0xFF000000) >> 24, (vSpacing & 0xFF0000) >> 16, (vSpacing & 0xFF00) >> 8, vSpacing & 0xFF])));\n }\n\n return box.apply(null, avc1Box);\n };\n\n audioSample = function audioSample(track) {\n return box(types.mp4a, new Uint8Array([// SampleEntry, ISO/IEC 14496-12\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, // data_reference_index\n // AudioSampleEntry, ISO/IEC 14496-12\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n (track.channelcount & 0xff00) >> 8, track.channelcount & 0xff, // channelcount\n (track.samplesize & 0xff00) >> 8, track.samplesize & 0xff, // samplesize\n 0x00, 0x00, // pre_defined\n 0x00, 0x00, // reserved\n (track.samplerate & 0xff00) >> 8, track.samplerate & 0xff, 0x00, 0x00 // samplerate, 16.16\n // MP4AudioSampleEntry, ISO/IEC 14496-14\n ]), esds(track));\n };\n })();\n\n tkhd = function tkhd(track) {\n var result = new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x07, // flags\n 0x00, 0x00, 0x00, 0x00, // creation_time\n 0x00, 0x00, 0x00, 0x00, // modification_time\n (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF, // track_ID\n 0x00, 0x00, 0x00, 0x00, // reserved\n (track.duration & 0xFF000000) >> 24, (track.duration & 0xFF0000) >> 16, (track.duration & 0xFF00) >> 8, track.duration & 0xFF, // duration\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, // layer\n 0x00, 0x00, // alternate_group\n 0x01, 0x00, // non-audio track volume\n 0x00, 0x00, // reserved\n 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\n (track.width & 0xFF00) >> 8, track.width & 0xFF, 0x00, 0x00, // width\n (track.height & 0xFF00) >> 8, track.height & 0xFF, 0x00, 0x00 // height\n ]);\n return box(types.tkhd, result);\n };\n /**\n * Generate a track fragment (traf) box. A traf box collects metadata\n * about tracks in a movie fragment (moof) box.\n */\n\n\n traf = function traf(track) {\n var trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun, sampleDependencyTable, dataOffset, upperWordBaseMediaDecodeTime, lowerWordBaseMediaDecodeTime;\n trackFragmentHeader = box(types.tfhd, new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x3a, // flags\n (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF, // track_ID\n 0x00, 0x00, 0x00, 0x01, // sample_description_index\n 0x00, 0x00, 0x00, 0x00, // default_sample_duration\n 0x00, 0x00, 0x00, 0x00, // default_sample_size\n 0x00, 0x00, 0x00, 0x00 // default_sample_flags\n ]));\n upperWordBaseMediaDecodeTime = Math.floor(track.baseMediaDecodeTime / (UINT32_MAX + 1));\n lowerWordBaseMediaDecodeTime = Math.floor(track.baseMediaDecodeTime % (UINT32_MAX + 1));\n trackFragmentDecodeTime = box(types.tfdt, new Uint8Array([0x01, // version 1\n 0x00, 0x00, 0x00, // flags\n // baseMediaDecodeTime\n upperWordBaseMediaDecodeTime >>> 24 & 0xFF, upperWordBaseMediaDecodeTime >>> 16 & 0xFF, upperWordBaseMediaDecodeTime >>> 8 & 0xFF, upperWordBaseMediaDecodeTime & 0xFF, lowerWordBaseMediaDecodeTime >>> 24 & 0xFF, lowerWordBaseMediaDecodeTime >>> 16 & 0xFF, lowerWordBaseMediaDecodeTime >>> 8 & 0xFF, lowerWordBaseMediaDecodeTime & 0xFF])); // the data offset specifies the number of bytes from the start of\n // the containing moof to the first payload byte of the associated\n // mdat\n\n dataOffset = 32 + // tfhd\n 20 + // tfdt\n 8 + // traf header\n 16 + // mfhd\n 8 + // moof header\n 8; // mdat header\n // audio tracks require less metadata\n\n if (track.type === 'audio') {\n trackFragmentRun = trun(track, dataOffset);\n return box(types.traf, trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun);\n } // video tracks should contain an independent and disposable samples\n // box (sdtp)\n // generate one and adjust offsets to match\n\n\n sampleDependencyTable = sdtp(track);\n trackFragmentRun = trun(track, sampleDependencyTable.length + dataOffset);\n return box(types.traf, trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun, sampleDependencyTable);\n };\n /**\n * Generate a track box.\n * @param track {object} a track definition\n * @return {Uint8Array} the track box\n */\n\n\n trak = function trak(track) {\n track.duration = track.duration || 0xffffffff;\n return box(types.trak, tkhd(track), mdia(track));\n };\n\n trex = function trex(track) {\n var result = new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF, // track_ID\n 0x00, 0x00, 0x00, 0x01, // default_sample_description_index\n 0x00, 0x00, 0x00, 0x00, // default_sample_duration\n 0x00, 0x00, 0x00, 0x00, // default_sample_size\n 0x00, 0x01, 0x00, 0x01 // default_sample_flags\n ]); // the last two bytes of default_sample_flags is the sample\n // degradation priority, a hint about the importance of this sample\n // relative to others. Lower the degradation priority for all sample\n // types other than video.\n\n if (track.type !== 'video') {\n result[result.length - 1] = 0x00;\n }\n\n return box(types.trex, result);\n };\n\n (function () {\n var audioTrun, videoTrun, trunHeader; // This method assumes all samples are uniform. That is, if a\n // duration is present for the first sample, it will be present for\n // all subsequent samples.\n // see ISO/IEC 14496-12:2012, Section 8.8.8.1\n\n trunHeader = function trunHeader(samples, offset) {\n var durationPresent = 0,\n sizePresent = 0,\n flagsPresent = 0,\n compositionTimeOffset = 0; // trun flag constants\n\n if (samples.length) {\n if (samples[0].duration !== undefined) {\n durationPresent = 0x1;\n }\n\n if (samples[0].size !== undefined) {\n sizePresent = 0x2;\n }\n\n if (samples[0].flags !== undefined) {\n flagsPresent = 0x4;\n }\n\n if (samples[0].compositionTimeOffset !== undefined) {\n compositionTimeOffset = 0x8;\n }\n }\n\n return [0x00, // version 0\n 0x00, durationPresent | sizePresent | flagsPresent | compositionTimeOffset, 0x01, // flags\n (samples.length & 0xFF000000) >>> 24, (samples.length & 0xFF0000) >>> 16, (samples.length & 0xFF00) >>> 8, samples.length & 0xFF, // sample_count\n (offset & 0xFF000000) >>> 24, (offset & 0xFF0000) >>> 16, (offset & 0xFF00) >>> 8, offset & 0xFF // data_offset\n ];\n };\n\n videoTrun = function videoTrun(track, offset) {\n var bytes, samples, sample, i;\n samples = track.samples || [];\n offset += 8 + 12 + 16 * samples.length;\n bytes = trunHeader(samples, offset);\n\n for (i = 0; i < samples.length; i++) {\n sample = samples[i];\n bytes = bytes.concat([(sample.duration & 0xFF000000) >>> 24, (sample.duration & 0xFF0000) >>> 16, (sample.duration & 0xFF00) >>> 8, sample.duration & 0xFF, // sample_duration\n (sample.size & 0xFF000000) >>> 24, (sample.size & 0xFF0000) >>> 16, (sample.size & 0xFF00) >>> 8, sample.size & 0xFF, // sample_size\n sample.flags.isLeading << 2 | sample.flags.dependsOn, sample.flags.isDependedOn << 6 | sample.flags.hasRedundancy << 4 | sample.flags.paddingValue << 1 | sample.flags.isNonSyncSample, sample.flags.degradationPriority & 0xF0 << 8, sample.flags.degradationPriority & 0x0F, // sample_flags\n (sample.compositionTimeOffset & 0xFF000000) >>> 24, (sample.compositionTimeOffset & 0xFF0000) >>> 16, (sample.compositionTimeOffset & 0xFF00) >>> 8, sample.compositionTimeOffset & 0xFF // sample_composition_time_offset\n ]);\n }\n\n return box(types.trun, new Uint8Array(bytes));\n };\n\n audioTrun = function audioTrun(track, offset) {\n var bytes, samples, sample, i;\n samples = track.samples || [];\n offset += 8 + 12 + 8 * samples.length;\n bytes = trunHeader(samples, offset);\n\n for (i = 0; i < samples.length; i++) {\n sample = samples[i];\n bytes = bytes.concat([(sample.duration & 0xFF000000) >>> 24, (sample.duration & 0xFF0000) >>> 16, (sample.duration & 0xFF00) >>> 8, sample.duration & 0xFF, // sample_duration\n (sample.size & 0xFF000000) >>> 24, (sample.size & 0xFF0000) >>> 16, (sample.size & 0xFF00) >>> 8, sample.size & 0xFF]); // sample_size\n }\n\n return box(types.trun, new Uint8Array(bytes));\n };\n\n trun = function trun(track, offset) {\n if (track.type === 'audio') {\n return audioTrun(track, offset);\n }\n\n return videoTrun(track, offset);\n };\n })();\n\n var mp4Generator = {\n ftyp: ftyp,\n mdat: mdat,\n moof: moof,\n moov: moov,\n initSegment: function initSegment(tracks) {\n var fileType = ftyp(),\n movie = moov(tracks),\n result;\n result = new Uint8Array(fileType.byteLength + movie.byteLength);\n result.set(fileType);\n result.set(movie, fileType.byteLength);\n return result;\n }\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n // Convert an array of nal units into an array of frames with each frame being\n // composed of the nal units that make up that frame\n // Also keep track of cummulative data about the frame from the nal units such\n // as the frame duration, starting pts, etc.\n\n var groupNalsIntoFrames = function groupNalsIntoFrames(nalUnits) {\n var i,\n currentNal,\n currentFrame = [],\n frames = []; // TODO added for LHLS, make sure this is OK\n\n frames.byteLength = 0;\n frames.nalCount = 0;\n frames.duration = 0;\n currentFrame.byteLength = 0;\n\n for (i = 0; i < nalUnits.length; i++) {\n currentNal = nalUnits[i]; // Split on 'aud'-type nal units\n\n if (currentNal.nalUnitType === 'access_unit_delimiter_rbsp') {\n // Since the very first nal unit is expected to be an AUD\n // only push to the frames array when currentFrame is not empty\n if (currentFrame.length) {\n currentFrame.duration = currentNal.dts - currentFrame.dts; // TODO added for LHLS, make sure this is OK\n\n frames.byteLength += currentFrame.byteLength;\n frames.nalCount += currentFrame.length;\n frames.duration += currentFrame.duration;\n frames.push(currentFrame);\n }\n\n currentFrame = [currentNal];\n currentFrame.byteLength = currentNal.data.byteLength;\n currentFrame.pts = currentNal.pts;\n currentFrame.dts = currentNal.dts;\n } else {\n // Specifically flag key frames for ease of use later\n if (currentNal.nalUnitType === 'slice_layer_without_partitioning_rbsp_idr') {\n currentFrame.keyFrame = true;\n }\n\n currentFrame.duration = currentNal.dts - currentFrame.dts;\n currentFrame.byteLength += currentNal.data.byteLength;\n currentFrame.push(currentNal);\n }\n } // For the last frame, use the duration of the previous frame if we\n // have nothing better to go on\n\n\n if (frames.length && (!currentFrame.duration || currentFrame.duration <= 0)) {\n currentFrame.duration = frames[frames.length - 1].duration;\n } // Push the final frame\n // TODO added for LHLS, make sure this is OK\n\n\n frames.byteLength += currentFrame.byteLength;\n frames.nalCount += currentFrame.length;\n frames.duration += currentFrame.duration;\n frames.push(currentFrame);\n return frames;\n }; // Convert an array of frames into an array of Gop with each Gop being composed\n // of the frames that make up that Gop\n // Also keep track of cummulative data about the Gop from the frames such as the\n // Gop duration, starting pts, etc.\n\n\n var groupFramesIntoGops = function groupFramesIntoGops(frames) {\n var i,\n currentFrame,\n currentGop = [],\n gops = []; // We must pre-set some of the values on the Gop since we\n // keep running totals of these values\n\n currentGop.byteLength = 0;\n currentGop.nalCount = 0;\n currentGop.duration = 0;\n currentGop.pts = frames[0].pts;\n currentGop.dts = frames[0].dts; // store some metadata about all the Gops\n\n gops.byteLength = 0;\n gops.nalCount = 0;\n gops.duration = 0;\n gops.pts = frames[0].pts;\n gops.dts = frames[0].dts;\n\n for (i = 0; i < frames.length; i++) {\n currentFrame = frames[i];\n\n if (currentFrame.keyFrame) {\n // Since the very first frame is expected to be an keyframe\n // only push to the gops array when currentGop is not empty\n if (currentGop.length) {\n gops.push(currentGop);\n gops.byteLength += currentGop.byteLength;\n gops.nalCount += currentGop.nalCount;\n gops.duration += currentGop.duration;\n }\n\n currentGop = [currentFrame];\n currentGop.nalCount = currentFrame.length;\n currentGop.byteLength = currentFrame.byteLength;\n currentGop.pts = currentFrame.pts;\n currentGop.dts = currentFrame.dts;\n currentGop.duration = currentFrame.duration;\n } else {\n currentGop.duration += currentFrame.duration;\n currentGop.nalCount += currentFrame.length;\n currentGop.byteLength += currentFrame.byteLength;\n currentGop.push(currentFrame);\n }\n }\n\n if (gops.length && currentGop.duration <= 0) {\n currentGop.duration = gops[gops.length - 1].duration;\n }\n\n gops.byteLength += currentGop.byteLength;\n gops.nalCount += currentGop.nalCount;\n gops.duration += currentGop.duration; // push the final Gop\n\n gops.push(currentGop);\n return gops;\n };\n /*\n * Search for the first keyframe in the GOPs and throw away all frames\n * until that keyframe. Then extend the duration of the pulled keyframe\n * and pull the PTS and DTS of the keyframe so that it covers the time\n * range of the frames that were disposed.\n *\n * @param {Array} gops video GOPs\n * @returns {Array} modified video GOPs\n */\n\n\n var extendFirstKeyFrame = function extendFirstKeyFrame(gops) {\n var currentGop;\n\n if (!gops[0][0].keyFrame && gops.length > 1) {\n // Remove the first GOP\n currentGop = gops.shift();\n gops.byteLength -= currentGop.byteLength;\n gops.nalCount -= currentGop.nalCount; // Extend the first frame of what is now the\n // first gop to cover the time period of the\n // frames we just removed\n\n gops[0][0].dts = currentGop.dts;\n gops[0][0].pts = currentGop.pts;\n gops[0][0].duration += currentGop.duration;\n }\n\n return gops;\n };\n /**\n * Default sample object\n * see ISO/IEC 14496-12:2012, section 8.6.4.3\n */\n\n\n var createDefaultSample = function createDefaultSample() {\n return {\n size: 0,\n flags: {\n isLeading: 0,\n dependsOn: 1,\n isDependedOn: 0,\n hasRedundancy: 0,\n degradationPriority: 0,\n isNonSyncSample: 1\n }\n };\n };\n /*\n * Collates information from a video frame into an object for eventual\n * entry into an MP4 sample table.\n *\n * @param {Object} frame the video frame\n * @param {Number} dataOffset the byte offset to position the sample\n * @return {Object} object containing sample table info for a frame\n */\n\n\n var sampleForFrame = function sampleForFrame(frame, dataOffset) {\n var sample = createDefaultSample();\n sample.dataOffset = dataOffset;\n sample.compositionTimeOffset = frame.pts - frame.dts;\n sample.duration = frame.duration;\n sample.size = 4 * frame.length; // Space for nal unit size\n\n sample.size += frame.byteLength;\n\n if (frame.keyFrame) {\n sample.flags.dependsOn = 2;\n sample.flags.isNonSyncSample = 0;\n }\n\n return sample;\n }; // generate the track's sample table from an array of gops\n\n\n var generateSampleTable = function generateSampleTable(gops, baseDataOffset) {\n var h,\n i,\n sample,\n currentGop,\n currentFrame,\n dataOffset = baseDataOffset || 0,\n samples = [];\n\n for (h = 0; h < gops.length; h++) {\n currentGop = gops[h];\n\n for (i = 0; i < currentGop.length; i++) {\n currentFrame = currentGop[i];\n sample = sampleForFrame(currentFrame, dataOffset);\n dataOffset += sample.size;\n samples.push(sample);\n }\n }\n\n return samples;\n }; // generate the track's raw mdat data from an array of gops\n\n\n var concatenateNalData = function concatenateNalData(gops) {\n var h,\n i,\n j,\n currentGop,\n currentFrame,\n currentNal,\n dataOffset = 0,\n nalsByteLength = gops.byteLength,\n numberOfNals = gops.nalCount,\n totalByteLength = nalsByteLength + 4 * numberOfNals,\n data = new Uint8Array(totalByteLength),\n view = new DataView(data.buffer); // For each Gop..\n\n for (h = 0; h < gops.length; h++) {\n currentGop = gops[h]; // For each Frame..\n\n for (i = 0; i < currentGop.length; i++) {\n currentFrame = currentGop[i]; // For each NAL..\n\n for (j = 0; j < currentFrame.length; j++) {\n currentNal = currentFrame[j];\n view.setUint32(dataOffset, currentNal.data.byteLength);\n dataOffset += 4;\n data.set(currentNal.data, dataOffset);\n dataOffset += currentNal.data.byteLength;\n }\n }\n }\n\n return data;\n }; // generate the track's sample table from a frame\n\n\n var generateSampleTableForFrame = function generateSampleTableForFrame(frame, baseDataOffset) {\n var sample,\n dataOffset = baseDataOffset || 0,\n samples = [];\n sample = sampleForFrame(frame, dataOffset);\n samples.push(sample);\n return samples;\n }; // generate the track's raw mdat data from a frame\n\n\n var concatenateNalDataForFrame = function concatenateNalDataForFrame(frame) {\n var i,\n currentNal,\n dataOffset = 0,\n nalsByteLength = frame.byteLength,\n numberOfNals = frame.length,\n totalByteLength = nalsByteLength + 4 * numberOfNals,\n data = new Uint8Array(totalByteLength),\n view = new DataView(data.buffer); // For each NAL..\n\n for (i = 0; i < frame.length; i++) {\n currentNal = frame[i];\n view.setUint32(dataOffset, currentNal.data.byteLength);\n dataOffset += 4;\n data.set(currentNal.data, dataOffset);\n dataOffset += currentNal.data.byteLength;\n }\n\n return data;\n };\n\n var frameUtils = {\n groupNalsIntoFrames: groupNalsIntoFrames,\n groupFramesIntoGops: groupFramesIntoGops,\n extendFirstKeyFrame: extendFirstKeyFrame,\n generateSampleTable: generateSampleTable,\n concatenateNalData: concatenateNalData,\n generateSampleTableForFrame: generateSampleTableForFrame,\n concatenateNalDataForFrame: concatenateNalDataForFrame\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var highPrefix = [33, 16, 5, 32, 164, 27];\n var lowPrefix = [33, 65, 108, 84, 1, 2, 4, 8, 168, 2, 4, 8, 17, 191, 252];\n\n var zeroFill = function zeroFill(count) {\n var a = [];\n\n while (count--) {\n a.push(0);\n }\n\n return a;\n };\n\n var makeTable = function makeTable(metaTable) {\n return Object.keys(metaTable).reduce(function (obj, key) {\n obj[key] = new Uint8Array(metaTable[key].reduce(function (arr, part) {\n return arr.concat(part);\n }, []));\n return obj;\n }, {});\n }; // Frames-of-silence to use for filling in missing AAC frames\n\n\n var coneOfSilence = {\n 96000: [highPrefix, [227, 64], zeroFill(154), [56]],\n 88200: [highPrefix, [231], zeroFill(170), [56]],\n 64000: [highPrefix, [248, 192], zeroFill(240), [56]],\n 48000: [highPrefix, [255, 192], zeroFill(268), [55, 148, 128], zeroFill(54), [112]],\n 44100: [highPrefix, [255, 192], zeroFill(268), [55, 163, 128], zeroFill(84), [112]],\n 32000: [highPrefix, [255, 192], zeroFill(268), [55, 234], zeroFill(226), [112]],\n 24000: [highPrefix, [255, 192], zeroFill(268), [55, 255, 128], zeroFill(268), [111, 112], zeroFill(126), [224]],\n 16000: [highPrefix, [255, 192], zeroFill(268), [55, 255, 128], zeroFill(268), [111, 255], zeroFill(269), [223, 108], zeroFill(195), [1, 192]],\n 12000: [lowPrefix, zeroFill(268), [3, 127, 248], zeroFill(268), [6, 255, 240], zeroFill(268), [13, 255, 224], zeroFill(268), [27, 253, 128], zeroFill(259), [56]],\n 11025: [lowPrefix, zeroFill(268), [3, 127, 248], zeroFill(268), [6, 255, 240], zeroFill(268), [13, 255, 224], zeroFill(268), [27, 255, 192], zeroFill(268), [55, 175, 128], zeroFill(108), [112]],\n 8000: [lowPrefix, zeroFill(268), [3, 121, 16], zeroFill(47), [7]]\n };\n var silence = makeTable(coneOfSilence);\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var ONE_SECOND_IN_TS = 90000,\n // 90kHz clock\n secondsToVideoTs,\n secondsToAudioTs,\n videoTsToSeconds,\n audioTsToSeconds,\n audioTsToVideoTs,\n videoTsToAudioTs,\n metadataTsToSeconds;\n\n secondsToVideoTs = function secondsToVideoTs(seconds) {\n return seconds * ONE_SECOND_IN_TS;\n };\n\n secondsToAudioTs = function secondsToAudioTs(seconds, sampleRate) {\n return seconds * sampleRate;\n };\n\n videoTsToSeconds = function videoTsToSeconds(timestamp) {\n return timestamp / ONE_SECOND_IN_TS;\n };\n\n audioTsToSeconds = function audioTsToSeconds(timestamp, sampleRate) {\n return timestamp / sampleRate;\n };\n\n audioTsToVideoTs = function audioTsToVideoTs(timestamp, sampleRate) {\n return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate));\n };\n\n videoTsToAudioTs = function videoTsToAudioTs(timestamp, sampleRate) {\n return secondsToAudioTs(videoTsToSeconds(timestamp), sampleRate);\n };\n /**\n * Adjust ID3 tag or caption timing information by the timeline pts values\n * (if keepOriginalTimestamps is false) and convert to seconds\n */\n\n\n metadataTsToSeconds = function metadataTsToSeconds(timestamp, timelineStartPts, keepOriginalTimestamps) {\n return videoTsToSeconds(keepOriginalTimestamps ? timestamp : timestamp - timelineStartPts);\n };\n\n var clock = {\n ONE_SECOND_IN_TS: ONE_SECOND_IN_TS,\n secondsToVideoTs: secondsToVideoTs,\n secondsToAudioTs: secondsToAudioTs,\n videoTsToSeconds: videoTsToSeconds,\n audioTsToSeconds: audioTsToSeconds,\n audioTsToVideoTs: audioTsToVideoTs,\n videoTsToAudioTs: videoTsToAudioTs,\n metadataTsToSeconds: metadataTsToSeconds\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n /**\n * Sum the `byteLength` properties of the data in each AAC frame\n */\n\n var sumFrameByteLengths = function sumFrameByteLengths(array) {\n var i,\n currentObj,\n sum = 0; // sum the byteLength's all each nal unit in the frame\n\n for (i = 0; i < array.length; i++) {\n currentObj = array[i];\n sum += currentObj.data.byteLength;\n }\n\n return sum;\n }; // Possibly pad (prefix) the audio track with silence if appending this track\n // would lead to the introduction of a gap in the audio buffer\n\n\n var prefixWithSilence = function prefixWithSilence(track, frames, audioAppendStartTs, videoBaseMediaDecodeTime) {\n var baseMediaDecodeTimeTs,\n frameDuration = 0,\n audioGapDuration = 0,\n audioFillFrameCount = 0,\n audioFillDuration = 0,\n silentFrame,\n i,\n firstFrame;\n\n if (!frames.length) {\n return;\n }\n\n baseMediaDecodeTimeTs = clock.audioTsToVideoTs(track.baseMediaDecodeTime, track.samplerate); // determine frame clock duration based on sample rate, round up to avoid overfills\n\n frameDuration = Math.ceil(clock.ONE_SECOND_IN_TS / (track.samplerate / 1024));\n\n if (audioAppendStartTs && videoBaseMediaDecodeTime) {\n // insert the shortest possible amount (audio gap or audio to video gap)\n audioGapDuration = baseMediaDecodeTimeTs - Math.max(audioAppendStartTs, videoBaseMediaDecodeTime); // number of full frames in the audio gap\n\n audioFillFrameCount = Math.floor(audioGapDuration / frameDuration);\n audioFillDuration = audioFillFrameCount * frameDuration;\n } // don't attempt to fill gaps smaller than a single frame or larger\n // than a half second\n\n\n if (audioFillFrameCount < 1 || audioFillDuration > clock.ONE_SECOND_IN_TS / 2) {\n return;\n }\n\n silentFrame = silence[track.samplerate];\n\n if (!silentFrame) {\n // we don't have a silent frame pregenerated for the sample rate, so use a frame\n // from the content instead\n silentFrame = frames[0].data;\n }\n\n for (i = 0; i < audioFillFrameCount; i++) {\n firstFrame = frames[0];\n frames.splice(0, 0, {\n data: silentFrame,\n dts: firstFrame.dts - frameDuration,\n pts: firstFrame.pts - frameDuration\n });\n }\n\n track.baseMediaDecodeTime -= Math.floor(clock.videoTsToAudioTs(audioFillDuration, track.samplerate));\n }; // If the audio segment extends before the earliest allowed dts\n // value, remove AAC frames until starts at or after the earliest\n // allowed DTS so that we don't end up with a negative baseMedia-\n // DecodeTime for the audio track\n\n\n var trimAdtsFramesByEarliestDts = function trimAdtsFramesByEarliestDts(adtsFrames, track, earliestAllowedDts) {\n if (track.minSegmentDts >= earliestAllowedDts) {\n return adtsFrames;\n } // We will need to recalculate the earliest segment Dts\n\n\n track.minSegmentDts = Infinity;\n return adtsFrames.filter(function (currentFrame) {\n // If this is an allowed frame, keep it and record it's Dts\n if (currentFrame.dts >= earliestAllowedDts) {\n track.minSegmentDts = Math.min(track.minSegmentDts, currentFrame.dts);\n track.minSegmentPts = track.minSegmentDts;\n return true;\n } // Otherwise, discard it\n\n\n return false;\n });\n }; // generate the track's raw mdat data from an array of frames\n\n\n var generateSampleTable$1 = function generateSampleTable(frames) {\n var i,\n currentFrame,\n samples = [];\n\n for (i = 0; i < frames.length; i++) {\n currentFrame = frames[i];\n samples.push({\n size: currentFrame.data.byteLength,\n duration: 1024 // For AAC audio, all samples contain 1024 samples\n\n });\n }\n\n return samples;\n }; // generate the track's sample table from an array of frames\n\n\n var concatenateFrameData = function concatenateFrameData(frames) {\n var i,\n currentFrame,\n dataOffset = 0,\n data = new Uint8Array(sumFrameByteLengths(frames));\n\n for (i = 0; i < frames.length; i++) {\n currentFrame = frames[i];\n data.set(currentFrame.data, dataOffset);\n dataOffset += currentFrame.data.byteLength;\n }\n\n return data;\n };\n\n var audioFrameUtils = {\n prefixWithSilence: prefixWithSilence,\n trimAdtsFramesByEarliestDts: trimAdtsFramesByEarliestDts,\n generateSampleTable: generateSampleTable$1,\n concatenateFrameData: concatenateFrameData\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var ONE_SECOND_IN_TS$1 = clock.ONE_SECOND_IN_TS;\n /**\n * Store information about the start and end of the track and the\n * duration for each frame/sample we process in order to calculate\n * the baseMediaDecodeTime\n */\n\n var collectDtsInfo = function collectDtsInfo(track, data) {\n if (typeof data.pts === 'number') {\n if (track.timelineStartInfo.pts === undefined) {\n track.timelineStartInfo.pts = data.pts;\n }\n\n if (track.minSegmentPts === undefined) {\n track.minSegmentPts = data.pts;\n } else {\n track.minSegmentPts = Math.min(track.minSegmentPts, data.pts);\n }\n\n if (track.maxSegmentPts === undefined) {\n track.maxSegmentPts = data.pts;\n } else {\n track.maxSegmentPts = Math.max(track.maxSegmentPts, data.pts);\n }\n }\n\n if (typeof data.dts === 'number') {\n if (track.timelineStartInfo.dts === undefined) {\n track.timelineStartInfo.dts = data.dts;\n }\n\n if (track.minSegmentDts === undefined) {\n track.minSegmentDts = data.dts;\n } else {\n track.minSegmentDts = Math.min(track.minSegmentDts, data.dts);\n }\n\n if (track.maxSegmentDts === undefined) {\n track.maxSegmentDts = data.dts;\n } else {\n track.maxSegmentDts = Math.max(track.maxSegmentDts, data.dts);\n }\n }\n };\n /**\n * Clear values used to calculate the baseMediaDecodeTime between\n * tracks\n */\n\n\n var clearDtsInfo = function clearDtsInfo(track) {\n delete track.minSegmentDts;\n delete track.maxSegmentDts;\n delete track.minSegmentPts;\n delete track.maxSegmentPts;\n };\n /**\n * Calculate the track's baseMediaDecodeTime based on the earliest\n * DTS the transmuxer has ever seen and the minimum DTS for the\n * current track\n * @param track {object} track metadata configuration\n * @param keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at 0.\n */\n\n\n var calculateTrackBaseMediaDecodeTime = function calculateTrackBaseMediaDecodeTime(track, keepOriginalTimestamps) {\n var baseMediaDecodeTime,\n scale,\n minSegmentDts = track.minSegmentDts; // Optionally adjust the time so the first segment starts at zero.\n\n if (!keepOriginalTimestamps) {\n minSegmentDts -= track.timelineStartInfo.dts;\n } // track.timelineStartInfo.baseMediaDecodeTime is the location, in time, where\n // we want the start of the first segment to be placed\n\n\n baseMediaDecodeTime = track.timelineStartInfo.baseMediaDecodeTime; // Add to that the distance this segment is from the very first\n\n baseMediaDecodeTime += minSegmentDts; // baseMediaDecodeTime must not become negative\n\n baseMediaDecodeTime = Math.max(0, baseMediaDecodeTime);\n\n if (track.type === 'audio') {\n // Audio has a different clock equal to the sampling_rate so we need to\n // scale the PTS values into the clock rate of the track\n scale = track.samplerate / ONE_SECOND_IN_TS$1;\n baseMediaDecodeTime *= scale;\n baseMediaDecodeTime = Math.floor(baseMediaDecodeTime);\n }\n\n return baseMediaDecodeTime;\n };\n\n var trackDecodeInfo = {\n clearDtsInfo: clearDtsInfo,\n calculateTrackBaseMediaDecodeTime: calculateTrackBaseMediaDecodeTime,\n collectDtsInfo: collectDtsInfo\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Reads in-band caption information from a video elementary\n * stream. Captions must follow the CEA-708 standard for injection\n * into an MPEG-2 transport streams.\n * @see https://en.wikipedia.org/wiki/CEA-708\n * @see https://www.gpo.gov/fdsys/pkg/CFR-2007-title47-vol1/pdf/CFR-2007-title47-vol1-sec15-119.pdf\n */\n // Supplemental enhancement information (SEI) NAL units have a\n // payload type field to indicate how they are to be\n // interpreted. CEAS-708 caption content is always transmitted with\n // payload type 0x04.\n\n var USER_DATA_REGISTERED_ITU_T_T35 = 4,\n RBSP_TRAILING_BITS = 128;\n /**\n * Parse a supplemental enhancement information (SEI) NAL unit.\n * Stops parsing once a message of type ITU T T35 has been found.\n *\n * @param bytes {Uint8Array} the bytes of a SEI NAL unit\n * @return {object} the parsed SEI payload\n * @see Rec. ITU-T H.264, 7.3.2.3.1\n */\n\n var parseSei = function parseSei(bytes) {\n var i = 0,\n result = {\n payloadType: -1,\n payloadSize: 0\n },\n payloadType = 0,\n payloadSize = 0; // go through the sei_rbsp parsing each each individual sei_message\n\n while (i < bytes.byteLength) {\n // stop once we have hit the end of the sei_rbsp\n if (bytes[i] === RBSP_TRAILING_BITS) {\n break;\n } // Parse payload type\n\n\n while (bytes[i] === 0xFF) {\n payloadType += 255;\n i++;\n }\n\n payloadType += bytes[i++]; // Parse payload size\n\n while (bytes[i] === 0xFF) {\n payloadSize += 255;\n i++;\n }\n\n payloadSize += bytes[i++]; // this sei_message is a 608/708 caption so save it and break\n // there can only ever be one caption message in a frame's sei\n\n if (!result.payload && payloadType === USER_DATA_REGISTERED_ITU_T_T35) {\n result.payloadType = payloadType;\n result.payloadSize = payloadSize;\n result.payload = bytes.subarray(i, i + payloadSize);\n break;\n } // skip the payload and parse the next message\n\n\n i += payloadSize;\n payloadType = 0;\n payloadSize = 0;\n }\n\n return result;\n }; // see ANSI/SCTE 128-1 (2013), section 8.1\n\n\n var parseUserData = function parseUserData(sei) {\n // itu_t_t35_contry_code must be 181 (United States) for\n // captions\n if (sei.payload[0] !== 181) {\n return null;\n } // itu_t_t35_provider_code should be 49 (ATSC) for captions\n\n\n if ((sei.payload[1] << 8 | sei.payload[2]) !== 49) {\n return null;\n } // the user_identifier should be \"GA94\" to indicate ATSC1 data\n\n\n if (String.fromCharCode(sei.payload[3], sei.payload[4], sei.payload[5], sei.payload[6]) !== 'GA94') {\n return null;\n } // finally, user_data_type_code should be 0x03 for caption data\n\n\n if (sei.payload[7] !== 0x03) {\n return null;\n } // return the user_data_type_structure and strip the trailing\n // marker bits\n\n\n return sei.payload.subarray(8, sei.payload.length - 1);\n }; // see CEA-708-D, section 4.4\n\n\n var parseCaptionPackets = function parseCaptionPackets(pts, userData) {\n var results = [],\n i,\n count,\n offset,\n data; // if this is just filler, return immediately\n\n if (!(userData[0] & 0x40)) {\n return results;\n } // parse out the cc_data_1 and cc_data_2 fields\n\n\n count = userData[0] & 0x1f;\n\n for (i = 0; i < count; i++) {\n offset = i * 3;\n data = {\n type: userData[offset + 2] & 0x03,\n pts: pts\n }; // capture cc data when cc_valid is 1\n\n if (userData[offset + 2] & 0x04) {\n data.ccData = userData[offset + 3] << 8 | userData[offset + 4];\n results.push(data);\n }\n }\n\n return results;\n };\n\n var discardEmulationPreventionBytes = function discardEmulationPreventionBytes(data) {\n var length = data.byteLength,\n emulationPreventionBytesPositions = [],\n i = 1,\n newLength,\n newData; // Find all `Emulation Prevention Bytes`\n\n while (i < length - 2) {\n if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\n emulationPreventionBytesPositions.push(i + 2);\n i += 2;\n } else {\n i++;\n }\n } // If no Emulation Prevention Bytes were found just return the original\n // array\n\n\n if (emulationPreventionBytesPositions.length === 0) {\n return data;\n } // Create a new array to hold the NAL unit data\n\n\n newLength = length - emulationPreventionBytesPositions.length;\n newData = new Uint8Array(newLength);\n var sourceIndex = 0;\n\n for (i = 0; i < newLength; sourceIndex++, i++) {\n if (sourceIndex === emulationPreventionBytesPositions[0]) {\n // Skip this byte\n sourceIndex++; // Remove this position index\n\n emulationPreventionBytesPositions.shift();\n }\n\n newData[i] = data[sourceIndex];\n }\n\n return newData;\n }; // exports\n\n\n var captionPacketParser = {\n parseSei: parseSei,\n parseUserData: parseUserData,\n parseCaptionPackets: parseCaptionPackets,\n discardEmulationPreventionBytes: discardEmulationPreventionBytes,\n USER_DATA_REGISTERED_ITU_T_T35: USER_DATA_REGISTERED_ITU_T_T35\n }; // -----------------\n // Link To Transport\n // -----------------\n\n var CaptionStream = function CaptionStream() {\n CaptionStream.prototype.init.call(this);\n this.captionPackets_ = [];\n this.ccStreams_ = [new Cea608Stream(0, 0), // eslint-disable-line no-use-before-define\n new Cea608Stream(0, 1), // eslint-disable-line no-use-before-define\n new Cea608Stream(1, 0), // eslint-disable-line no-use-before-define\n new Cea608Stream(1, 1) // eslint-disable-line no-use-before-define\n ];\n this.reset(); // forward data and done events from CCs to this CaptionStream\n\n this.ccStreams_.forEach(function (cc) {\n cc.on('data', this.trigger.bind(this, 'data'));\n cc.on('partialdone', this.trigger.bind(this, 'partialdone'));\n cc.on('done', this.trigger.bind(this, 'done'));\n }, this);\n };\n\n CaptionStream.prototype = new stream();\n\n CaptionStream.prototype.push = function (event) {\n var sei, userData, newCaptionPackets; // only examine SEI NALs\n\n if (event.nalUnitType !== 'sei_rbsp') {\n return;\n } // parse the sei\n\n\n sei = captionPacketParser.parseSei(event.escapedRBSP); // ignore everything but user_data_registered_itu_t_t35\n\n if (sei.payloadType !== captionPacketParser.USER_DATA_REGISTERED_ITU_T_T35) {\n return;\n } // parse out the user data payload\n\n\n userData = captionPacketParser.parseUserData(sei); // ignore unrecognized userData\n\n if (!userData) {\n return;\n } // Sometimes, the same segment # will be downloaded twice. To stop the\n // caption data from being processed twice, we track the latest dts we've\n // received and ignore everything with a dts before that. However, since\n // data for a specific dts can be split across packets on either side of\n // a segment boundary, we need to make sure we *don't* ignore the packets\n // from the *next* segment that have dts === this.latestDts_. By constantly\n // tracking the number of packets received with dts === this.latestDts_, we\n // know how many should be ignored once we start receiving duplicates.\n\n\n if (event.dts < this.latestDts_) {\n // We've started getting older data, so set the flag.\n this.ignoreNextEqualDts_ = true;\n return;\n } else if (event.dts === this.latestDts_ && this.ignoreNextEqualDts_) {\n this.numSameDts_--;\n\n if (!this.numSameDts_) {\n // We've received the last duplicate packet, time to start processing again\n this.ignoreNextEqualDts_ = false;\n }\n\n return;\n } // parse out CC data packets and save them for later\n\n\n newCaptionPackets = captionPacketParser.parseCaptionPackets(event.pts, userData);\n this.captionPackets_ = this.captionPackets_.concat(newCaptionPackets);\n\n if (this.latestDts_ !== event.dts) {\n this.numSameDts_ = 0;\n }\n\n this.numSameDts_++;\n this.latestDts_ = event.dts;\n };\n\n CaptionStream.prototype.flushCCStreams = function (flushType) {\n this.ccStreams_.forEach(function (cc) {\n return flushType === 'flush' ? cc.flush() : cc.partialFlush();\n }, this);\n };\n\n CaptionStream.prototype.flushStream = function (flushType) {\n // make sure we actually parsed captions before proceeding\n if (!this.captionPackets_.length) {\n this.flushCCStreams(flushType);\n return;\n } // In Chrome, the Array#sort function is not stable so add a\n // presortIndex that we can use to ensure we get a stable-sort\n\n\n this.captionPackets_.forEach(function (elem, idx) {\n elem.presortIndex = idx;\n }); // sort caption byte-pairs based on their PTS values\n\n this.captionPackets_.sort(function (a, b) {\n if (a.pts === b.pts) {\n return a.presortIndex - b.presortIndex;\n }\n\n return a.pts - b.pts;\n });\n this.captionPackets_.forEach(function (packet) {\n if (packet.type < 2) {\n // Dispatch packet to the right Cea608Stream\n this.dispatchCea608Packet(packet);\n } // this is where an 'else' would go for a dispatching packets\n // to a theoretical Cea708Stream that handles SERVICEn data\n\n }, this);\n this.captionPackets_.length = 0;\n this.flushCCStreams(flushType);\n };\n\n CaptionStream.prototype.flush = function () {\n return this.flushStream('flush');\n }; // Only called if handling partial data\n\n\n CaptionStream.prototype.partialFlush = function () {\n return this.flushStream('partialFlush');\n };\n\n CaptionStream.prototype.reset = function () {\n this.latestDts_ = null;\n this.ignoreNextEqualDts_ = false;\n this.numSameDts_ = 0;\n this.activeCea608Channel_ = [null, null];\n this.ccStreams_.forEach(function (ccStream) {\n ccStream.reset();\n });\n }; // From the CEA-608 spec:\n\n /*\n * When XDS sub-packets are interleaved with other services, the end of each sub-packet shall be followed\n * by a control pair to change to a different service. When any of the control codes from 0x10 to 0x1F is\n * used to begin a control code pair, it indicates the return to captioning or Text data. The control code pair\n * and subsequent data should then be processed according to the FCC rules. It may be necessary for the\n * line 21 data encoder to automatically insert a control code pair (i.e. RCL, RU2, RU3, RU4, RDC, or RTD)\n * to switch to captioning or Text.\n */\n // With that in mind, we ignore any data between an XDS control code and a\n // subsequent closed-captioning control code.\n\n\n CaptionStream.prototype.dispatchCea608Packet = function (packet) {\n // NOTE: packet.type is the CEA608 field\n if (this.setsTextOrXDSActive(packet)) {\n this.activeCea608Channel_[packet.type] = null;\n } else if (this.setsChannel1Active(packet)) {\n this.activeCea608Channel_[packet.type] = 0;\n } else if (this.setsChannel2Active(packet)) {\n this.activeCea608Channel_[packet.type] = 1;\n }\n\n if (this.activeCea608Channel_[packet.type] === null) {\n // If we haven't received anything to set the active channel, or the\n // packets are Text/XDS data, discard the data; we don't want jumbled\n // captions\n return;\n }\n\n this.ccStreams_[(packet.type << 1) + this.activeCea608Channel_[packet.type]].push(packet);\n };\n\n CaptionStream.prototype.setsChannel1Active = function (packet) {\n return (packet.ccData & 0x7800) === 0x1000;\n };\n\n CaptionStream.prototype.setsChannel2Active = function (packet) {\n return (packet.ccData & 0x7800) === 0x1800;\n };\n\n CaptionStream.prototype.setsTextOrXDSActive = function (packet) {\n return (packet.ccData & 0x7100) === 0x0100 || (packet.ccData & 0x78fe) === 0x102a || (packet.ccData & 0x78fe) === 0x182a;\n }; // ----------------------\n // Session to Application\n // ----------------------\n // This hash maps non-ASCII, special, and extended character codes to their\n // proper Unicode equivalent. The first keys that are only a single byte\n // are the non-standard ASCII characters, which simply map the CEA608 byte\n // to the standard ASCII/Unicode. The two-byte keys that follow are the CEA608\n // character codes, but have their MSB bitmasked with 0x03 so that a lookup\n // can be performed regardless of the field and data channel on which the\n // character code was received.\n\n\n var CHARACTER_TRANSLATION = {\n 0x2a: 0xe1,\n // á\n 0x5c: 0xe9,\n // é\n 0x5e: 0xed,\n // í\n 0x5f: 0xf3,\n // ó\n 0x60: 0xfa,\n // ú\n 0x7b: 0xe7,\n // ç\n 0x7c: 0xf7,\n // ÷\n 0x7d: 0xd1,\n // Ñ\n 0x7e: 0xf1,\n // ñ\n 0x7f: 0x2588,\n // █\n 0x0130: 0xae,\n // ®\n 0x0131: 0xb0,\n // °\n 0x0132: 0xbd,\n // ½\n 0x0133: 0xbf,\n // ¿\n 0x0134: 0x2122,\n // ™\n 0x0135: 0xa2,\n // ¢\n 0x0136: 0xa3,\n // £\n 0x0137: 0x266a,\n // ♪\n 0x0138: 0xe0,\n // à\n 0x0139: 0xa0,\n //\n 0x013a: 0xe8,\n // è\n 0x013b: 0xe2,\n // â\n 0x013c: 0xea,\n // ê\n 0x013d: 0xee,\n // î\n 0x013e: 0xf4,\n // ô\n 0x013f: 0xfb,\n // û\n 0x0220: 0xc1,\n // Á\n 0x0221: 0xc9,\n // É\n 0x0222: 0xd3,\n // Ó\n 0x0223: 0xda,\n // Ú\n 0x0224: 0xdc,\n // Ü\n 0x0225: 0xfc,\n // ü\n 0x0226: 0x2018,\n // ‘\n 0x0227: 0xa1,\n // ¡\n 0x0228: 0x2a,\n // *\n 0x0229: 0x27,\n // '\n 0x022a: 0x2014,\n // —\n 0x022b: 0xa9,\n // ©\n 0x022c: 0x2120,\n // ℠\n 0x022d: 0x2022,\n // •\n 0x022e: 0x201c,\n // “\n 0x022f: 0x201d,\n // ”\n 0x0230: 0xc0,\n // À\n 0x0231: 0xc2,\n // Â\n 0x0232: 0xc7,\n // Ç\n 0x0233: 0xc8,\n // È\n 0x0234: 0xca,\n // Ê\n 0x0235: 0xcb,\n // Ë\n 0x0236: 0xeb,\n // ë\n 0x0237: 0xce,\n // Î\n 0x0238: 0xcf,\n // Ï\n 0x0239: 0xef,\n // ï\n 0x023a: 0xd4,\n // Ô\n 0x023b: 0xd9,\n // Ù\n 0x023c: 0xf9,\n // ù\n 0x023d: 0xdb,\n // Û\n 0x023e: 0xab,\n // «\n 0x023f: 0xbb,\n // »\n 0x0320: 0xc3,\n // Ã\n 0x0321: 0xe3,\n // ã\n 0x0322: 0xcd,\n // Í\n 0x0323: 0xcc,\n // Ì\n 0x0324: 0xec,\n // ì\n 0x0325: 0xd2,\n // Ò\n 0x0326: 0xf2,\n // ò\n 0x0327: 0xd5,\n // Õ\n 0x0328: 0xf5,\n // õ\n 0x0329: 0x7b,\n // {\n 0x032a: 0x7d,\n // }\n 0x032b: 0x5c,\n // \\\n 0x032c: 0x5e,\n // ^\n 0x032d: 0x5f,\n // _\n 0x032e: 0x7c,\n // |\n 0x032f: 0x7e,\n // ~\n 0x0330: 0xc4,\n // Ä\n 0x0331: 0xe4,\n // ä\n 0x0332: 0xd6,\n // Ö\n 0x0333: 0xf6,\n // ö\n 0x0334: 0xdf,\n // ß\n 0x0335: 0xa5,\n // ¥\n 0x0336: 0xa4,\n // ¤\n 0x0337: 0x2502,\n // │\n 0x0338: 0xc5,\n // Å\n 0x0339: 0xe5,\n // å\n 0x033a: 0xd8,\n // Ø\n 0x033b: 0xf8,\n // ø\n 0x033c: 0x250c,\n // ┌\n 0x033d: 0x2510,\n // ┐\n 0x033e: 0x2514,\n // └\n 0x033f: 0x2518 // ┘\n\n };\n\n var getCharFromCode = function getCharFromCode(code) {\n if (code === null) {\n return '';\n }\n\n code = CHARACTER_TRANSLATION[code] || code;\n return String.fromCharCode(code);\n }; // the index of the last row in a CEA-608 display buffer\n\n\n var BOTTOM_ROW = 14; // This array is used for mapping PACs -> row #, since there's no way of\n // getting it through bit logic.\n\n var ROWS = [0x1100, 0x1120, 0x1200, 0x1220, 0x1500, 0x1520, 0x1600, 0x1620, 0x1700, 0x1720, 0x1000, 0x1300, 0x1320, 0x1400, 0x1420]; // CEA-608 captions are rendered onto a 34x15 matrix of character\n // cells. The \"bottom\" row is the last element in the outer array.\n\n var createDisplayBuffer = function createDisplayBuffer() {\n var result = [],\n i = BOTTOM_ROW + 1;\n\n while (i--) {\n result.push('');\n }\n\n return result;\n };\n\n var Cea608Stream = function Cea608Stream(field, dataChannel) {\n Cea608Stream.prototype.init.call(this);\n this.field_ = field || 0;\n this.dataChannel_ = dataChannel || 0;\n this.name_ = 'CC' + ((this.field_ << 1 | this.dataChannel_) + 1);\n this.setConstants();\n this.reset();\n\n this.push = function (packet) {\n var data, swap, char0, char1, text; // remove the parity bits\n\n data = packet.ccData & 0x7f7f; // ignore duplicate control codes; the spec demands they're sent twice\n\n if (data === this.lastControlCode_) {\n this.lastControlCode_ = null;\n return;\n } // Store control codes\n\n\n if ((data & 0xf000) === 0x1000) {\n this.lastControlCode_ = data;\n } else if (data !== this.PADDING_) {\n this.lastControlCode_ = null;\n }\n\n char0 = data >>> 8;\n char1 = data & 0xff;\n\n if (data === this.PADDING_) {\n return;\n } else if (data === this.RESUME_CAPTION_LOADING_) {\n this.mode_ = 'popOn';\n } else if (data === this.END_OF_CAPTION_) {\n // If an EOC is received while in paint-on mode, the displayed caption\n // text should be swapped to non-displayed memory as if it was a pop-on\n // caption. Because of that, we should explicitly switch back to pop-on\n // mode\n this.mode_ = 'popOn';\n this.clearFormatting(packet.pts); // if a caption was being displayed, it's gone now\n\n this.flushDisplayed(packet.pts); // flip memory\n\n swap = this.displayed_;\n this.displayed_ = this.nonDisplayed_;\n this.nonDisplayed_ = swap; // start measuring the time to display the caption\n\n this.startPts_ = packet.pts;\n } else if (data === this.ROLL_UP_2_ROWS_) {\n this.rollUpRows_ = 2;\n this.setRollUp(packet.pts);\n } else if (data === this.ROLL_UP_3_ROWS_) {\n this.rollUpRows_ = 3;\n this.setRollUp(packet.pts);\n } else if (data === this.ROLL_UP_4_ROWS_) {\n this.rollUpRows_ = 4;\n this.setRollUp(packet.pts);\n } else if (data === this.CARRIAGE_RETURN_) {\n this.clearFormatting(packet.pts);\n this.flushDisplayed(packet.pts);\n this.shiftRowsUp_();\n this.startPts_ = packet.pts;\n } else if (data === this.BACKSPACE_) {\n if (this.mode_ === 'popOn') {\n this.nonDisplayed_[this.row_] = this.nonDisplayed_[this.row_].slice(0, -1);\n } else {\n this.displayed_[this.row_] = this.displayed_[this.row_].slice(0, -1);\n }\n } else if (data === this.ERASE_DISPLAYED_MEMORY_) {\n this.flushDisplayed(packet.pts);\n this.displayed_ = createDisplayBuffer();\n } else if (data === this.ERASE_NON_DISPLAYED_MEMORY_) {\n this.nonDisplayed_ = createDisplayBuffer();\n } else if (data === this.RESUME_DIRECT_CAPTIONING_) {\n if (this.mode_ !== 'paintOn') {\n // NOTE: This should be removed when proper caption positioning is\n // implemented\n this.flushDisplayed(packet.pts);\n this.displayed_ = createDisplayBuffer();\n }\n\n this.mode_ = 'paintOn';\n this.startPts_ = packet.pts; // Append special characters to caption text\n } else if (this.isSpecialCharacter(char0, char1)) {\n // Bitmask char0 so that we can apply character transformations\n // regardless of field and data channel.\n // Then byte-shift to the left and OR with char1 so we can pass the\n // entire character code to `getCharFromCode`.\n char0 = (char0 & 0x03) << 8;\n text = getCharFromCode(char0 | char1);\n this[this.mode_](packet.pts, text);\n this.column_++; // Append extended characters to caption text\n } else if (this.isExtCharacter(char0, char1)) {\n // Extended characters always follow their \"non-extended\" equivalents.\n // IE if a \"è\" is desired, you'll always receive \"eè\"; non-compliant\n // decoders are supposed to drop the \"è\", while compliant decoders\n // backspace the \"e\" and insert \"è\".\n // Delete the previous character\n if (this.mode_ === 'popOn') {\n this.nonDisplayed_[this.row_] = this.nonDisplayed_[this.row_].slice(0, -1);\n } else {\n this.displayed_[this.row_] = this.displayed_[this.row_].slice(0, -1);\n } // Bitmask char0 so that we can apply character transformations\n // regardless of field and data channel.\n // Then byte-shift to the left and OR with char1 so we can pass the\n // entire character code to `getCharFromCode`.\n\n\n char0 = (char0 & 0x03) << 8;\n text = getCharFromCode(char0 | char1);\n this[this.mode_](packet.pts, text);\n this.column_++; // Process mid-row codes\n } else if (this.isMidRowCode(char0, char1)) {\n // Attributes are not additive, so clear all formatting\n this.clearFormatting(packet.pts); // According to the standard, mid-row codes\n // should be replaced with spaces, so add one now\n\n this[this.mode_](packet.pts, ' ');\n this.column_++;\n\n if ((char1 & 0xe) === 0xe) {\n this.addFormatting(packet.pts, ['i']);\n }\n\n if ((char1 & 0x1) === 0x1) {\n this.addFormatting(packet.pts, ['u']);\n } // Detect offset control codes and adjust cursor\n\n } else if (this.isOffsetControlCode(char0, char1)) {\n // Cursor position is set by indent PAC (see below) in 4-column\n // increments, with an additional offset code of 1-3 to reach any\n // of the 32 columns specified by CEA-608. So all we need to do\n // here is increment the column cursor by the given offset.\n this.column_ += char1 & 0x03; // Detect PACs (Preamble Address Codes)\n } else if (this.isPAC(char0, char1)) {\n // There's no logic for PAC -> row mapping, so we have to just\n // find the row code in an array and use its index :(\n var row = ROWS.indexOf(data & 0x1f20); // Configure the caption window if we're in roll-up mode\n\n if (this.mode_ === 'rollUp') {\n // This implies that the base row is incorrectly set.\n // As per the recommendation in CEA-608(Base Row Implementation), defer to the number\n // of roll-up rows set.\n if (row - this.rollUpRows_ + 1 < 0) {\n row = this.rollUpRows_ - 1;\n }\n\n this.setRollUp(packet.pts, row);\n }\n\n if (row !== this.row_) {\n // formatting is only persistent for current row\n this.clearFormatting(packet.pts);\n this.row_ = row;\n } // All PACs can apply underline, so detect and apply\n // (All odd-numbered second bytes set underline)\n\n\n if (char1 & 0x1 && this.formatting_.indexOf('u') === -1) {\n this.addFormatting(packet.pts, ['u']);\n }\n\n if ((data & 0x10) === 0x10) {\n // We've got an indent level code. Each successive even number\n // increments the column cursor by 4, so we can get the desired\n // column position by bit-shifting to the right (to get n/2)\n // and multiplying by 4.\n this.column_ = ((data & 0xe) >> 1) * 4;\n }\n\n if (this.isColorPAC(char1)) {\n // it's a color code, though we only support white, which\n // can be either normal or italicized. white italics can be\n // either 0x4e or 0x6e depending on the row, so we just\n // bitwise-and with 0xe to see if italics should be turned on\n if ((char1 & 0xe) === 0xe) {\n this.addFormatting(packet.pts, ['i']);\n }\n } // We have a normal character in char0, and possibly one in char1\n\n } else if (this.isNormalChar(char0)) {\n if (char1 === 0x00) {\n char1 = null;\n }\n\n text = getCharFromCode(char0);\n text += getCharFromCode(char1);\n this[this.mode_](packet.pts, text);\n this.column_ += text.length;\n } // finish data processing\n\n };\n };\n\n Cea608Stream.prototype = new stream(); // Trigger a cue point that captures the current state of the\n // display buffer\n\n Cea608Stream.prototype.flushDisplayed = function (pts) {\n var content = this.displayed_ // remove spaces from the start and end of the string\n .map(function (row) {\n try {\n return row.trim();\n } catch (e) {\n // Ordinarily, this shouldn't happen. However, caption\n // parsing errors should not throw exceptions and\n // break playback.\n // eslint-disable-next-line no-console\n console.error('Skipping malformed caption.');\n return '';\n }\n }) // combine all text rows to display in one cue\n .join('\\n') // and remove blank rows from the start and end, but not the middle\n .replace(/^\\n+|\\n+$/g, '');\n\n if (content.length) {\n this.trigger('data', {\n startPts: this.startPts_,\n endPts: pts,\n text: content,\n stream: this.name_\n });\n }\n };\n /**\n * Zero out the data, used for startup and on seek\n */\n\n\n Cea608Stream.prototype.reset = function () {\n this.mode_ = 'popOn'; // When in roll-up mode, the index of the last row that will\n // actually display captions. If a caption is shifted to a row\n // with a lower index than this, it is cleared from the display\n // buffer\n\n this.topRow_ = 0;\n this.startPts_ = 0;\n this.displayed_ = createDisplayBuffer();\n this.nonDisplayed_ = createDisplayBuffer();\n this.lastControlCode_ = null; // Track row and column for proper line-breaking and spacing\n\n this.column_ = 0;\n this.row_ = BOTTOM_ROW;\n this.rollUpRows_ = 2; // This variable holds currently-applied formatting\n\n this.formatting_ = [];\n };\n /**\n * Sets up control code and related constants for this instance\n */\n\n\n Cea608Stream.prototype.setConstants = function () {\n // The following attributes have these uses:\n // ext_ : char0 for mid-row codes, and the base for extended\n // chars (ext_+0, ext_+1, and ext_+2 are char0s for\n // extended codes)\n // control_: char0 for control codes, except byte-shifted to the\n // left so that we can do this.control_ | CONTROL_CODE\n // offset_: char0 for tab offset codes\n //\n // It's also worth noting that control codes, and _only_ control codes,\n // differ between field 1 and field2. Field 2 control codes are always\n // their field 1 value plus 1. That's why there's the \"| field\" on the\n // control value.\n if (this.dataChannel_ === 0) {\n this.BASE_ = 0x10;\n this.EXT_ = 0x11;\n this.CONTROL_ = (0x14 | this.field_) << 8;\n this.OFFSET_ = 0x17;\n } else if (this.dataChannel_ === 1) {\n this.BASE_ = 0x18;\n this.EXT_ = 0x19;\n this.CONTROL_ = (0x1c | this.field_) << 8;\n this.OFFSET_ = 0x1f;\n } // Constants for the LSByte command codes recognized by Cea608Stream. This\n // list is not exhaustive. For a more comprehensive listing and semantics see\n // http://www.gpo.gov/fdsys/pkg/CFR-2010-title47-vol1/pdf/CFR-2010-title47-vol1-sec15-119.pdf\n // Padding\n\n\n this.PADDING_ = 0x0000; // Pop-on Mode\n\n this.RESUME_CAPTION_LOADING_ = this.CONTROL_ | 0x20;\n this.END_OF_CAPTION_ = this.CONTROL_ | 0x2f; // Roll-up Mode\n\n this.ROLL_UP_2_ROWS_ = this.CONTROL_ | 0x25;\n this.ROLL_UP_3_ROWS_ = this.CONTROL_ | 0x26;\n this.ROLL_UP_4_ROWS_ = this.CONTROL_ | 0x27;\n this.CARRIAGE_RETURN_ = this.CONTROL_ | 0x2d; // paint-on mode\n\n this.RESUME_DIRECT_CAPTIONING_ = this.CONTROL_ | 0x29; // Erasure\n\n this.BACKSPACE_ = this.CONTROL_ | 0x21;\n this.ERASE_DISPLAYED_MEMORY_ = this.CONTROL_ | 0x2c;\n this.ERASE_NON_DISPLAYED_MEMORY_ = this.CONTROL_ | 0x2e;\n };\n /**\n * Detects if the 2-byte packet data is a special character\n *\n * Special characters have a second byte in the range 0x30 to 0x3f,\n * with the first byte being 0x11 (for data channel 1) or 0x19 (for\n * data channel 2).\n *\n * @param {Integer} char0 The first byte\n * @param {Integer} char1 The second byte\n * @return {Boolean} Whether the 2 bytes are an special character\n */\n\n\n Cea608Stream.prototype.isSpecialCharacter = function (char0, char1) {\n return char0 === this.EXT_ && char1 >= 0x30 && char1 <= 0x3f;\n };\n /**\n * Detects if the 2-byte packet data is an extended character\n *\n * Extended characters have a second byte in the range 0x20 to 0x3f,\n * with the first byte being 0x12 or 0x13 (for data channel 1) or\n * 0x1a or 0x1b (for data channel 2).\n *\n * @param {Integer} char0 The first byte\n * @param {Integer} char1 The second byte\n * @return {Boolean} Whether the 2 bytes are an extended character\n */\n\n\n Cea608Stream.prototype.isExtCharacter = function (char0, char1) {\n return (char0 === this.EXT_ + 1 || char0 === this.EXT_ + 2) && char1 >= 0x20 && char1 <= 0x3f;\n };\n /**\n * Detects if the 2-byte packet is a mid-row code\n *\n * Mid-row codes have a second byte in the range 0x20 to 0x2f, with\n * the first byte being 0x11 (for data channel 1) or 0x19 (for data\n * channel 2).\n *\n * @param {Integer} char0 The first byte\n * @param {Integer} char1 The second byte\n * @return {Boolean} Whether the 2 bytes are a mid-row code\n */\n\n\n Cea608Stream.prototype.isMidRowCode = function (char0, char1) {\n return char0 === this.EXT_ && char1 >= 0x20 && char1 <= 0x2f;\n };\n /**\n * Detects if the 2-byte packet is an offset control code\n *\n * Offset control codes have a second byte in the range 0x21 to 0x23,\n * with the first byte being 0x17 (for data channel 1) or 0x1f (for\n * data channel 2).\n *\n * @param {Integer} char0 The first byte\n * @param {Integer} char1 The second byte\n * @return {Boolean} Whether the 2 bytes are an offset control code\n */\n\n\n Cea608Stream.prototype.isOffsetControlCode = function (char0, char1) {\n return char0 === this.OFFSET_ && char1 >= 0x21 && char1 <= 0x23;\n };\n /**\n * Detects if the 2-byte packet is a Preamble Address Code\n *\n * PACs have a first byte in the range 0x10 to 0x17 (for data channel 1)\n * or 0x18 to 0x1f (for data channel 2), with the second byte in the\n * range 0x40 to 0x7f.\n *\n * @param {Integer} char0 The first byte\n * @param {Integer} char1 The second byte\n * @return {Boolean} Whether the 2 bytes are a PAC\n */\n\n\n Cea608Stream.prototype.isPAC = function (char0, char1) {\n return char0 >= this.BASE_ && char0 < this.BASE_ + 8 && char1 >= 0x40 && char1 <= 0x7f;\n };\n /**\n * Detects if a packet's second byte is in the range of a PAC color code\n *\n * PAC color codes have the second byte be in the range 0x40 to 0x4f, or\n * 0x60 to 0x6f.\n *\n * @param {Integer} char1 The second byte\n * @return {Boolean} Whether the byte is a color PAC\n */\n\n\n Cea608Stream.prototype.isColorPAC = function (char1) {\n return char1 >= 0x40 && char1 <= 0x4f || char1 >= 0x60 && char1 <= 0x7f;\n };\n /**\n * Detects if a single byte is in the range of a normal character\n *\n * Normal text bytes are in the range 0x20 to 0x7f.\n *\n * @param {Integer} char The byte\n * @return {Boolean} Whether the byte is a normal character\n */\n\n\n Cea608Stream.prototype.isNormalChar = function (_char) {\n return _char >= 0x20 && _char <= 0x7f;\n };\n /**\n * Configures roll-up\n *\n * @param {Integer} pts Current PTS\n * @param {Integer} newBaseRow Used by PACs to slide the current window to\n * a new position\n */\n\n\n Cea608Stream.prototype.setRollUp = function (pts, newBaseRow) {\n // Reset the base row to the bottom row when switching modes\n if (this.mode_ !== 'rollUp') {\n this.row_ = BOTTOM_ROW;\n this.mode_ = 'rollUp'; // Spec says to wipe memories when switching to roll-up\n\n this.flushDisplayed(pts);\n this.nonDisplayed_ = createDisplayBuffer();\n this.displayed_ = createDisplayBuffer();\n }\n\n if (newBaseRow !== undefined && newBaseRow !== this.row_) {\n // move currently displayed captions (up or down) to the new base row\n for (var i = 0; i < this.rollUpRows_; i++) {\n this.displayed_[newBaseRow - i] = this.displayed_[this.row_ - i];\n this.displayed_[this.row_ - i] = '';\n }\n }\n\n if (newBaseRow === undefined) {\n newBaseRow = this.row_;\n }\n\n this.topRow_ = newBaseRow - this.rollUpRows_ + 1;\n }; // Adds the opening HTML tag for the passed character to the caption text,\n // and keeps track of it for later closing\n\n\n Cea608Stream.prototype.addFormatting = function (pts, format) {\n this.formatting_ = this.formatting_.concat(format);\n var text = format.reduce(function (text, format) {\n return text + '<' + format + '>';\n }, '');\n this[this.mode_](pts, text);\n }; // Adds HTML closing tags for current formatting to caption text and\n // clears remembered formatting\n\n\n Cea608Stream.prototype.clearFormatting = function (pts) {\n if (!this.formatting_.length) {\n return;\n }\n\n var text = this.formatting_.reverse().reduce(function (text, format) {\n return text + '</' + format + '>';\n }, '');\n this.formatting_ = [];\n this[this.mode_](pts, text);\n }; // Mode Implementations\n\n\n Cea608Stream.prototype.popOn = function (pts, text) {\n var baseRow = this.nonDisplayed_[this.row_]; // buffer characters\n\n baseRow += text;\n this.nonDisplayed_[this.row_] = baseRow;\n };\n\n Cea608Stream.prototype.rollUp = function (pts, text) {\n var baseRow = this.displayed_[this.row_];\n baseRow += text;\n this.displayed_[this.row_] = baseRow;\n };\n\n Cea608Stream.prototype.shiftRowsUp_ = function () {\n var i; // clear out inactive rows\n\n for (i = 0; i < this.topRow_; i++) {\n this.displayed_[i] = '';\n }\n\n for (i = this.row_ + 1; i < BOTTOM_ROW + 1; i++) {\n this.displayed_[i] = '';\n } // shift displayed rows up\n\n\n for (i = this.topRow_; i < this.row_; i++) {\n this.displayed_[i] = this.displayed_[i + 1];\n } // clear out the bottom row\n\n\n this.displayed_[this.row_] = '';\n };\n\n Cea608Stream.prototype.paintOn = function (pts, text) {\n var baseRow = this.displayed_[this.row_];\n baseRow += text;\n this.displayed_[this.row_] = baseRow;\n }; // exports\n\n\n var captionStream = {\n CaptionStream: CaptionStream,\n Cea608Stream: Cea608Stream\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var streamTypes = {\n H264_STREAM_TYPE: 0x1B,\n ADTS_STREAM_TYPE: 0x0F,\n METADATA_STREAM_TYPE: 0x15\n };\n var MAX_TS = 8589934592;\n var RO_THRESH = 4294967296;\n var TYPE_SHARED = 'shared';\n\n var handleRollover = function handleRollover(value, reference) {\n var direction = 1;\n\n if (value > reference) {\n // If the current timestamp value is greater than our reference timestamp and we detect a\n // timestamp rollover, this means the roll over is happening in the opposite direction.\n // Example scenario: Enter a long stream/video just after a rollover occurred. The reference\n // point will be set to a small number, e.g. 1. The user then seeks backwards over the\n // rollover point. In loading this segment, the timestamp values will be very large,\n // e.g. 2^33 - 1. Since this comes before the data we loaded previously, we want to adjust\n // the time stamp to be `value - 2^33`.\n direction = -1;\n } // Note: A seek forwards or back that is greater than the RO_THRESH (2^32, ~13 hours) will\n // cause an incorrect adjustment.\n\n\n while (Math.abs(reference - value) > RO_THRESH) {\n value += direction * MAX_TS;\n }\n\n return value;\n };\n\n var TimestampRolloverStream = function TimestampRolloverStream(type) {\n var lastDTS, referenceDTS;\n TimestampRolloverStream.prototype.init.call(this); // The \"shared\" type is used in cases where a stream will contain muxed\n // video and audio. We could use `undefined` here, but having a string\n // makes debugging a little clearer.\n\n this.type_ = type || TYPE_SHARED;\n\n this.push = function (data) {\n // Any \"shared\" rollover streams will accept _all_ data. Otherwise,\n // streams will only accept data that matches their type.\n if (this.type_ !== TYPE_SHARED && data.type !== this.type_) {\n return;\n }\n\n if (referenceDTS === undefined) {\n referenceDTS = data.dts;\n }\n\n data.dts = handleRollover(data.dts, referenceDTS);\n data.pts = handleRollover(data.pts, referenceDTS);\n lastDTS = data.dts;\n this.trigger('data', data);\n };\n\n this.flush = function () {\n referenceDTS = lastDTS;\n this.trigger('done');\n };\n\n this.endTimeline = function () {\n this.flush();\n this.trigger('endedtimeline');\n };\n\n this.discontinuity = function () {\n referenceDTS = void 0;\n lastDTS = void 0;\n };\n\n this.reset = function () {\n this.discontinuity();\n this.trigger('reset');\n };\n };\n\n TimestampRolloverStream.prototype = new stream();\n var timestampRolloverStream = {\n TimestampRolloverStream: TimestampRolloverStream,\n handleRollover: handleRollover\n };\n\n var percentEncode = function percentEncode(bytes, start, end) {\n var i,\n result = '';\n\n for (i = start; i < end; i++) {\n result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\n }\n\n return result;\n },\n // return the string representation of the specified byte range,\n // interpreted as UTf-8.\n parseUtf8 = function parseUtf8(bytes, start, end) {\n return decodeURIComponent(percentEncode(bytes, start, end));\n },\n // return the string representation of the specified byte range,\n // interpreted as ISO-8859-1.\n parseIso88591 = function parseIso88591(bytes, start, end) {\n return unescape(percentEncode(bytes, start, end)); // jshint ignore:line\n },\n parseSyncSafeInteger = function parseSyncSafeInteger(data) {\n return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\n },\n tagParsers = {\n TXXX: function TXXX(tag) {\n var i;\n\n if (tag.data[0] !== 3) {\n // ignore frames with unrecognized character encodings\n return;\n }\n\n for (i = 1; i < tag.data.length; i++) {\n if (tag.data[i] === 0) {\n // parse the text fields\n tag.description = parseUtf8(tag.data, 1, i); // do not include the null terminator in the tag value\n\n tag.value = parseUtf8(tag.data, i + 1, tag.data.length).replace(/\\0*$/, '');\n break;\n }\n }\n\n tag.data = tag.value;\n },\n WXXX: function WXXX(tag) {\n var i;\n\n if (tag.data[0] !== 3) {\n // ignore frames with unrecognized character encodings\n return;\n }\n\n for (i = 1; i < tag.data.length; i++) {\n if (tag.data[i] === 0) {\n // parse the description and URL fields\n tag.description = parseUtf8(tag.data, 1, i);\n tag.url = parseUtf8(tag.data, i + 1, tag.data.length);\n break;\n }\n }\n },\n PRIV: function PRIV(tag) {\n var i;\n\n for (i = 0; i < tag.data.length; i++) {\n if (tag.data[i] === 0) {\n // parse the description and URL fields\n tag.owner = parseIso88591(tag.data, 0, i);\n break;\n }\n }\n\n tag.privateData = tag.data.subarray(i + 1);\n tag.data = tag.privateData;\n }\n },\n _MetadataStream;\n\n _MetadataStream = function MetadataStream(options) {\n var settings = {\n debug: !!(options && options.debug),\n // the bytes of the program-level descriptor field in MP2T\n // see ISO/IEC 13818-1:2013 (E), section 2.6 \"Program and\n // program element descriptors\"\n descriptor: options && options.descriptor\n },\n // the total size in bytes of the ID3 tag being parsed\n tagSize = 0,\n // tag data that is not complete enough to be parsed\n buffer = [],\n // the total number of bytes currently in the buffer\n bufferSize = 0,\n i;\n\n _MetadataStream.prototype.init.call(this); // calculate the text track in-band metadata track dispatch type\n // https://html.spec.whatwg.org/multipage/embedded-content.html#steps-to-expose-a-media-resource-specific-text-track\n\n\n this.dispatchType = streamTypes.METADATA_STREAM_TYPE.toString(16);\n\n if (settings.descriptor) {\n for (i = 0; i < settings.descriptor.length; i++) {\n this.dispatchType += ('00' + settings.descriptor[i].toString(16)).slice(-2);\n }\n }\n\n this.push = function (chunk) {\n var tag, frameStart, frameSize, frame, i, frameHeader;\n\n if (chunk.type !== 'timed-metadata') {\n return;\n } // if data_alignment_indicator is set in the PES header,\n // we must have the start of a new ID3 tag. Assume anything\n // remaining in the buffer was malformed and throw it out\n\n\n if (chunk.dataAlignmentIndicator) {\n bufferSize = 0;\n buffer.length = 0;\n } // ignore events that don't look like ID3 data\n\n\n if (buffer.length === 0 && (chunk.data.length < 10 || chunk.data[0] !== 'I'.charCodeAt(0) || chunk.data[1] !== 'D'.charCodeAt(0) || chunk.data[2] !== '3'.charCodeAt(0))) {\n if (settings.debug) {\n // eslint-disable-next-line no-console\n console.log('Skipping unrecognized metadata packet');\n }\n\n return;\n } // add this chunk to the data we've collected so far\n\n\n buffer.push(chunk);\n bufferSize += chunk.data.byteLength; // grab the size of the entire frame from the ID3 header\n\n if (buffer.length === 1) {\n // the frame size is transmitted as a 28-bit integer in the\n // last four bytes of the ID3 header.\n // The most significant bit of each byte is dropped and the\n // results concatenated to recover the actual value.\n tagSize = parseSyncSafeInteger(chunk.data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more\n // convenient for our comparisons to include it\n\n tagSize += 10;\n } // if the entire frame has not arrived, wait for more data\n\n\n if (bufferSize < tagSize) {\n return;\n } // collect the entire frame so it can be parsed\n\n\n tag = {\n data: new Uint8Array(tagSize),\n frames: [],\n pts: buffer[0].pts,\n dts: buffer[0].dts\n };\n\n for (i = 0; i < tagSize;) {\n tag.data.set(buffer[0].data.subarray(0, tagSize - i), i);\n i += buffer[0].data.byteLength;\n bufferSize -= buffer[0].data.byteLength;\n buffer.shift();\n } // find the start of the first frame and the end of the tag\n\n\n frameStart = 10;\n\n if (tag.data[5] & 0x40) {\n // advance the frame start past the extended header\n frameStart += 4; // header size field\n\n frameStart += parseSyncSafeInteger(tag.data.subarray(10, 14)); // clip any padding off the end\n\n tagSize -= parseSyncSafeInteger(tag.data.subarray(16, 20));\n } // parse one or more ID3 frames\n // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n\n do {\n // determine the number of bytes in this frame\n frameSize = parseSyncSafeInteger(tag.data.subarray(frameStart + 4, frameStart + 8));\n\n if (frameSize < 1) {\n // eslint-disable-next-line no-console\n return console.log('Malformed ID3 frame encountered. Skipping metadata parsing.');\n }\n\n frameHeader = String.fromCharCode(tag.data[frameStart], tag.data[frameStart + 1], tag.data[frameStart + 2], tag.data[frameStart + 3]);\n frame = {\n id: frameHeader,\n data: tag.data.subarray(frameStart + 10, frameStart + frameSize + 10)\n };\n frame.key = frame.id;\n\n if (tagParsers[frame.id]) {\n tagParsers[frame.id](frame); // handle the special PRIV frame used to indicate the start\n // time for raw AAC data\n\n if (frame.owner === 'com.apple.streaming.transportStreamTimestamp') {\n var d = frame.data,\n size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\n size *= 4;\n size += d[7] & 0x03;\n frame.timeStamp = size; // in raw AAC, all subsequent data will be timestamped based\n // on the value of this frame\n // we couldn't have known the appropriate pts and dts before\n // parsing this ID3 tag so set those values now\n\n if (tag.pts === undefined && tag.dts === undefined) {\n tag.pts = frame.timeStamp;\n tag.dts = frame.timeStamp;\n }\n\n this.trigger('timestamp', frame);\n }\n }\n\n tag.frames.push(frame);\n frameStart += 10; // advance past the frame header\n\n frameStart += frameSize; // advance past the frame body\n } while (frameStart < tagSize);\n\n this.trigger('data', tag);\n };\n };\n\n _MetadataStream.prototype = new stream();\n var metadataStream = _MetadataStream;\n var TimestampRolloverStream$1 = timestampRolloverStream.TimestampRolloverStream; // object types\n\n var _TransportPacketStream, _TransportParseStream, _ElementaryStream; // constants\n\n\n var MP2T_PACKET_LENGTH = 188,\n // bytes\n SYNC_BYTE = 0x47;\n /**\n * Splits an incoming stream of binary data into MPEG-2 Transport\n * Stream packets.\n */\n\n _TransportPacketStream = function TransportPacketStream() {\n var buffer = new Uint8Array(MP2T_PACKET_LENGTH),\n bytesInBuffer = 0;\n\n _TransportPacketStream.prototype.init.call(this); // Deliver new bytes to the stream.\n\n /**\n * Split a stream of data into M2TS packets\n **/\n\n\n this.push = function (bytes) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n everything; // If there are bytes remaining from the last segment, prepend them to the\n // bytes that were pushed in\n\n if (bytesInBuffer) {\n everything = new Uint8Array(bytes.byteLength + bytesInBuffer);\n everything.set(buffer.subarray(0, bytesInBuffer));\n everything.set(bytes, bytesInBuffer);\n bytesInBuffer = 0;\n } else {\n everything = bytes;\n } // While we have enough data for a packet\n\n\n while (endIndex < everything.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (everything[startIndex] === SYNC_BYTE && everything[endIndex] === SYNC_BYTE) {\n // We found a packet so emit it and jump one whole packet forward in\n // the stream\n this.trigger('data', everything.subarray(startIndex, endIndex));\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n\n startIndex++;\n endIndex++;\n } // If there was some data left over at the end of the segment that couldn't\n // possibly be a whole packet, keep it because it might be the start of a packet\n // that continues in the next segment\n\n\n if (startIndex < everything.byteLength) {\n buffer.set(everything.subarray(startIndex), 0);\n bytesInBuffer = everything.byteLength - startIndex;\n }\n };\n /**\n * Passes identified M2TS packets to the TransportParseStream to be parsed\n **/\n\n\n this.flush = function () {\n // If the buffer contains a whole packet when we are being flushed, emit it\n // and empty the buffer. Otherwise hold onto the data because it may be\n // important for decoding the next segment\n if (bytesInBuffer === MP2T_PACKET_LENGTH && buffer[0] === SYNC_BYTE) {\n this.trigger('data', buffer);\n bytesInBuffer = 0;\n }\n\n this.trigger('done');\n };\n\n this.endTimeline = function () {\n this.flush();\n this.trigger('endedtimeline');\n };\n\n this.reset = function () {\n bytesInBuffer = 0;\n this.trigger('reset');\n };\n };\n\n _TransportPacketStream.prototype = new stream();\n /**\n * Accepts an MP2T TransportPacketStream and emits data events with parsed\n * forms of the individual transport stream packets.\n */\n\n _TransportParseStream = function TransportParseStream() {\n var parsePsi, parsePat, parsePmt, self;\n\n _TransportParseStream.prototype.init.call(this);\n\n self = this;\n this.packetsWaitingForPmt = [];\n this.programMapTable = undefined;\n\n parsePsi = function parsePsi(payload, psi) {\n var offset = 0; // PSI packets may be split into multiple sections and those\n // sections may be split into multiple packets. If a PSI\n // section starts in this packet, the payload_unit_start_indicator\n // will be true and the first byte of the payload will indicate\n // the offset from the current position to the start of the\n // section.\n\n if (psi.payloadUnitStartIndicator) {\n offset += payload[offset] + 1;\n }\n\n if (psi.type === 'pat') {\n parsePat(payload.subarray(offset), psi);\n } else {\n parsePmt(payload.subarray(offset), psi);\n }\n };\n\n parsePat = function parsePat(payload, pat) {\n pat.section_number = payload[7]; // eslint-disable-line camelcase\n\n pat.last_section_number = payload[8]; // eslint-disable-line camelcase\n // skip the PSI header and parse the first PMT entry\n\n self.pmtPid = (payload[10] & 0x1F) << 8 | payload[11];\n pat.pmtPid = self.pmtPid;\n };\n /**\n * Parse out the relevant fields of a Program Map Table (PMT).\n * @param payload {Uint8Array} the PMT-specific portion of an MP2T\n * packet. The first byte in this array should be the table_id\n * field.\n * @param pmt {object} the object that should be decorated with\n * fields parsed from the PMT.\n */\n\n\n parsePmt = function parsePmt(payload, pmt) {\n var sectionLength, tableEnd, programInfoLength, offset; // PMTs can be sent ahead of the time when they should actually\n // take effect. We don't believe this should ever be the case\n // for HLS but we'll ignore \"forward\" PMT declarations if we see\n // them. Future PMT declarations have the current_next_indicator\n // set to zero.\n\n if (!(payload[5] & 0x01)) {\n return;\n } // overwrite any existing program map table\n\n\n self.programMapTable = {\n video: null,\n audio: null,\n 'timed-metadata': {}\n }; // the mapping table ends at the end of the current section\n\n sectionLength = (payload[1] & 0x0f) << 8 | payload[2];\n tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\n // long the program info descriptors are\n\n programInfoLength = (payload[10] & 0x0f) << 8 | payload[11]; // advance the offset to the first entry in the mapping table\n\n offset = 12 + programInfoLength;\n\n while (offset < tableEnd) {\n var streamType = payload[offset];\n var pid = (payload[offset + 1] & 0x1F) << 8 | payload[offset + 2]; // only map a single elementary_pid for audio and video stream types\n // TODO: should this be done for metadata too? for now maintain behavior of\n // multiple metadata streams\n\n if (streamType === streamTypes.H264_STREAM_TYPE && self.programMapTable.video === null) {\n self.programMapTable.video = pid;\n } else if (streamType === streamTypes.ADTS_STREAM_TYPE && self.programMapTable.audio === null) {\n self.programMapTable.audio = pid;\n } else if (streamType === streamTypes.METADATA_STREAM_TYPE) {\n // map pid to stream type for metadata streams\n self.programMapTable['timed-metadata'][pid] = streamType;\n } // move to the next table entry\n // skip past the elementary stream descriptors, if present\n\n\n offset += ((payload[offset + 3] & 0x0F) << 8 | payload[offset + 4]) + 5;\n } // record the map on the packet as well\n\n\n pmt.programMapTable = self.programMapTable;\n };\n /**\n * Deliver a new MP2T packet to the next stream in the pipeline.\n */\n\n\n this.push = function (packet) {\n var result = {},\n offset = 4;\n result.payloadUnitStartIndicator = !!(packet[1] & 0x40); // pid is a 13-bit field starting at the last bit of packet[1]\n\n result.pid = packet[1] & 0x1f;\n result.pid <<= 8;\n result.pid |= packet[2]; // if an adaption field is present, its length is specified by the\n // fifth byte of the TS packet header. The adaptation field is\n // used to add stuffing to PES packets that don't fill a complete\n // TS packet, and to specify some forms of timing and control data\n // that we do not currently use.\n\n if ((packet[3] & 0x30) >>> 4 > 0x01) {\n offset += packet[offset] + 1;\n } // parse the rest of the packet based on the type\n\n\n if (result.pid === 0) {\n result.type = 'pat';\n parsePsi(packet.subarray(offset), result);\n this.trigger('data', result);\n } else if (result.pid === this.pmtPid) {\n result.type = 'pmt';\n parsePsi(packet.subarray(offset), result);\n this.trigger('data', result); // if there are any packets waiting for a PMT to be found, process them now\n\n while (this.packetsWaitingForPmt.length) {\n this.processPes_.apply(this, this.packetsWaitingForPmt.shift());\n }\n } else if (this.programMapTable === undefined) {\n // When we have not seen a PMT yet, defer further processing of\n // PES packets until one has been parsed\n this.packetsWaitingForPmt.push([packet, offset, result]);\n } else {\n this.processPes_(packet, offset, result);\n }\n };\n\n this.processPes_ = function (packet, offset, result) {\n // set the appropriate stream type\n if (result.pid === this.programMapTable.video) {\n result.streamType = streamTypes.H264_STREAM_TYPE;\n } else if (result.pid === this.programMapTable.audio) {\n result.streamType = streamTypes.ADTS_STREAM_TYPE;\n } else {\n // if not video or audio, it is timed-metadata or unknown\n // if unknown, streamType will be undefined\n result.streamType = this.programMapTable['timed-metadata'][result.pid];\n }\n\n result.type = 'pes';\n result.data = packet.subarray(offset);\n this.trigger('data', result);\n };\n };\n\n _TransportParseStream.prototype = new stream();\n _TransportParseStream.STREAM_TYPES = {\n h264: 0x1b,\n adts: 0x0f\n };\n /**\n * Reconsistutes program elementary stream (PES) packets from parsed\n * transport stream packets. That is, if you pipe an\n * mp2t.TransportParseStream into a mp2t.ElementaryStream, the output\n * events will be events which capture the bytes for individual PES\n * packets plus relevant metadata that has been extracted from the\n * container.\n */\n\n _ElementaryStream = function ElementaryStream() {\n var self = this,\n // PES packet fragments\n video = {\n data: [],\n size: 0\n },\n audio = {\n data: [],\n size: 0\n },\n timedMetadata = {\n data: [],\n size: 0\n },\n programMapTable,\n parsePes = function parsePes(payload, pes) {\n var ptsDtsFlags; // get the packet length, this will be 0 for video\n\n pes.packetLength = 6 + (payload[4] << 8 | payload[5]); // find out if this packets starts a new keyframe\n\n pes.dataAlignmentIndicator = (payload[6] & 0x04) !== 0; // PES packets may be annotated with a PTS value, or a PTS value\n // and a DTS value. Determine what combination of values is\n // available to work with.\n\n ptsDtsFlags = payload[7]; // PTS and DTS are normally stored as a 33-bit number. Javascript\n // performs all bitwise operations on 32-bit integers but javascript\n // supports a much greater range (52-bits) of integer using standard\n // mathematical operations.\n // We construct a 31-bit value using bitwise operators over the 31\n // most significant bits and then multiply by 4 (equal to a left-shift\n // of 2) before we add the final 2 least significant bits of the\n // timestamp (equal to an OR.)\n\n if (ptsDtsFlags & 0xC0) {\n // the PTS and DTS are not written out directly. For information\n // on how they are encoded, see\n // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n pes.pts = (payload[9] & 0x0E) << 27 | (payload[10] & 0xFF) << 20 | (payload[11] & 0xFE) << 12 | (payload[12] & 0xFF) << 5 | (payload[13] & 0xFE) >>> 3;\n pes.pts *= 4; // Left shift by 2\n\n pes.pts += (payload[13] & 0x06) >>> 1; // OR by the two LSBs\n\n pes.dts = pes.pts;\n\n if (ptsDtsFlags & 0x40) {\n pes.dts = (payload[14] & 0x0E) << 27 | (payload[15] & 0xFF) << 20 | (payload[16] & 0xFE) << 12 | (payload[17] & 0xFF) << 5 | (payload[18] & 0xFE) >>> 3;\n pes.dts *= 4; // Left shift by 2\n\n pes.dts += (payload[18] & 0x06) >>> 1; // OR by the two LSBs\n }\n } // the data section starts immediately after the PES header.\n // pes_header_data_length specifies the number of header bytes\n // that follow the last byte of the field.\n\n\n pes.data = payload.subarray(9 + payload[8]);\n },\n\n /**\n * Pass completely parsed PES packets to the next stream in the pipeline\n **/\n flushStream = function flushStream(stream$$1, type, forceFlush) {\n var packetData = new Uint8Array(stream$$1.size),\n event = {\n type: type\n },\n i = 0,\n offset = 0,\n packetFlushable = false,\n fragment; // do nothing if there is not enough buffered data for a complete\n // PES header\n\n if (!stream$$1.data.length || stream$$1.size < 9) {\n return;\n }\n\n event.trackId = stream$$1.data[0].pid; // reassemble the packet\n\n for (i = 0; i < stream$$1.data.length; i++) {\n fragment = stream$$1.data[i];\n packetData.set(fragment.data, offset);\n offset += fragment.data.byteLength;\n } // parse assembled packet's PES header\n\n\n parsePes(packetData, event); // non-video PES packets MUST have a non-zero PES_packet_length\n // check that there is enough stream data to fill the packet\n\n packetFlushable = type === 'video' || event.packetLength <= stream$$1.size; // flush pending packets if the conditions are right\n\n if (forceFlush || packetFlushable) {\n stream$$1.size = 0;\n stream$$1.data.length = 0;\n } // only emit packets that are complete. this is to avoid assembling\n // incomplete PES packets due to poor segmentation\n\n\n if (packetFlushable) {\n self.trigger('data', event);\n }\n };\n\n _ElementaryStream.prototype.init.call(this);\n /**\n * Identifies M2TS packet types and parses PES packets using metadata\n * parsed from the PMT\n **/\n\n\n this.push = function (data) {\n ({\n pat: function pat() {// we have to wait for the PMT to arrive as well before we\n // have any meaningful metadata\n },\n pes: function pes() {\n var stream$$1, streamType;\n\n switch (data.streamType) {\n case streamTypes.H264_STREAM_TYPE:\n case streamTypes.H264_STREAM_TYPE:\n stream$$1 = video;\n streamType = 'video';\n break;\n\n case streamTypes.ADTS_STREAM_TYPE:\n stream$$1 = audio;\n streamType = 'audio';\n break;\n\n case streamTypes.METADATA_STREAM_TYPE:\n stream$$1 = timedMetadata;\n streamType = 'timed-metadata';\n break;\n\n default:\n // ignore unknown stream types\n return;\n } // if a new packet is starting, we can flush the completed\n // packet\n\n\n if (data.payloadUnitStartIndicator) {\n flushStream(stream$$1, streamType, true);\n } // buffer this fragment until we are sure we've received the\n // complete payload\n\n\n stream$$1.data.push(data);\n stream$$1.size += data.data.byteLength;\n },\n pmt: function pmt() {\n var event = {\n type: 'metadata',\n tracks: []\n };\n programMapTable = data.programMapTable; // translate audio and video streams to tracks\n\n if (programMapTable.video !== null) {\n event.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.video,\n codec: 'avc',\n type: 'video'\n });\n }\n\n if (programMapTable.audio !== null) {\n event.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.audio,\n codec: 'adts',\n type: 'audio'\n });\n }\n\n self.trigger('data', event);\n }\n })[data.type]();\n };\n\n this.reset = function () {\n video.size = 0;\n video.data.length = 0;\n audio.size = 0;\n audio.data.length = 0;\n this.trigger('reset');\n };\n /**\n * Flush any remaining input. Video PES packets may be of variable\n * length. Normally, the start of a new video packet can trigger the\n * finalization of the previous packet. That is not possible if no\n * more video is forthcoming, however. In that case, some other\n * mechanism (like the end of the file) has to be employed. When it is\n * clear that no additional data is forthcoming, calling this method\n * will flush the buffered packets.\n */\n\n\n this.flushStreams_ = function () {\n // !!THIS ORDER IS IMPORTANT!!\n // video first then audio\n flushStream(video, 'video');\n flushStream(audio, 'audio');\n flushStream(timedMetadata, 'timed-metadata');\n };\n\n this.flush = function () {\n this.flushStreams_();\n this.trigger('done');\n };\n };\n\n _ElementaryStream.prototype = new stream();\n var m2ts = {\n PAT_PID: 0x0000,\n MP2T_PACKET_LENGTH: MP2T_PACKET_LENGTH,\n TransportPacketStream: _TransportPacketStream,\n TransportParseStream: _TransportParseStream,\n ElementaryStream: _ElementaryStream,\n TimestampRolloverStream: TimestampRolloverStream$1,\n CaptionStream: captionStream.CaptionStream,\n Cea608Stream: captionStream.Cea608Stream,\n MetadataStream: metadataStream\n };\n\n for (var type in streamTypes) {\n if (streamTypes.hasOwnProperty(type)) {\n m2ts[type] = streamTypes[type];\n }\n }\n\n var m2ts_1 = m2ts;\n var ONE_SECOND_IN_TS$2 = clock.ONE_SECOND_IN_TS;\n\n var _AdtsStream;\n\n var ADTS_SAMPLING_FREQUENCIES = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n /*\n * Accepts a ElementaryStream and emits data events with parsed\n * AAC Audio Frames of the individual packets. Input audio in ADTS\n * format is unpacked and re-emitted as AAC frames.\n *\n * @see http://wiki.multimedia.cx/index.php?title=ADTS\n * @see http://wiki.multimedia.cx/?title=Understanding_AAC\n */\n\n _AdtsStream = function AdtsStream(handlePartialSegments) {\n var buffer,\n frameNum = 0;\n\n _AdtsStream.prototype.init.call(this);\n\n this.push = function (packet) {\n var i = 0,\n frameLength,\n protectionSkipBytes,\n frameEnd,\n oldBuffer,\n sampleCount,\n adtsFrameDuration;\n\n if (!handlePartialSegments) {\n frameNum = 0;\n }\n\n if (packet.type !== 'audio') {\n // ignore non-audio data\n return;\n } // Prepend any data in the buffer to the input data so that we can parse\n // aac frames the cross a PES packet boundary\n\n\n if (buffer) {\n oldBuffer = buffer;\n buffer = new Uint8Array(oldBuffer.byteLength + packet.data.byteLength);\n buffer.set(oldBuffer);\n buffer.set(packet.data, oldBuffer.byteLength);\n } else {\n buffer = packet.data;\n } // unpack any ADTS frames which have been fully received\n // for details on the ADTS header, see http://wiki.multimedia.cx/index.php?title=ADTS\n\n\n while (i + 5 < buffer.length) {\n // Look for the start of an ADTS header..\n if (buffer[i] !== 0xFF || (buffer[i + 1] & 0xF6) !== 0xF0) {\n // If a valid header was not found, jump one forward and attempt to\n // find a valid ADTS header starting at the next byte\n i++;\n continue;\n } // The protection skip bit tells us if we have 2 bytes of CRC data at the\n // end of the ADTS header\n\n\n protectionSkipBytes = (~buffer[i + 1] & 0x01) * 2; // Frame length is a 13 bit integer starting 16 bits from the\n // end of the sync sequence\n\n frameLength = (buffer[i + 3] & 0x03) << 11 | buffer[i + 4] << 3 | (buffer[i + 5] & 0xe0) >> 5;\n sampleCount = ((buffer[i + 6] & 0x03) + 1) * 1024;\n adtsFrameDuration = sampleCount * ONE_SECOND_IN_TS$2 / ADTS_SAMPLING_FREQUENCIES[(buffer[i + 2] & 0x3c) >>> 2];\n frameEnd = i + frameLength; // If we don't have enough data to actually finish this ADTS frame, return\n // and wait for more data\n\n if (buffer.byteLength < frameEnd) {\n return;\n } // Otherwise, deliver the complete AAC frame\n\n\n this.trigger('data', {\n pts: packet.pts + frameNum * adtsFrameDuration,\n dts: packet.dts + frameNum * adtsFrameDuration,\n sampleCount: sampleCount,\n audioobjecttype: (buffer[i + 2] >>> 6 & 0x03) + 1,\n channelcount: (buffer[i + 2] & 1) << 2 | (buffer[i + 3] & 0xc0) >>> 6,\n samplerate: ADTS_SAMPLING_FREQUENCIES[(buffer[i + 2] & 0x3c) >>> 2],\n samplingfrequencyindex: (buffer[i + 2] & 0x3c) >>> 2,\n // assume ISO/IEC 14496-12 AudioSampleEntry default of 16\n samplesize: 16,\n data: buffer.subarray(i + 7 + protectionSkipBytes, frameEnd)\n });\n frameNum++; // If the buffer is empty, clear it and return\n\n if (buffer.byteLength === frameEnd) {\n buffer = undefined;\n return;\n } // Remove the finished frame from the buffer and start the process again\n\n\n buffer = buffer.subarray(frameEnd);\n }\n };\n\n this.flush = function () {\n frameNum = 0;\n this.trigger('done');\n };\n\n this.reset = function () {\n buffer = void 0;\n this.trigger('reset');\n };\n\n this.endTimeline = function () {\n buffer = void 0;\n this.trigger('endedtimeline');\n };\n };\n\n _AdtsStream.prototype = new stream();\n var adts = _AdtsStream;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var ExpGolomb;\n /**\n * Parser for exponential Golomb codes, a variable-bitwidth number encoding\n * scheme used by h264.\n */\n\n ExpGolomb = function ExpGolomb(workingData) {\n var // the number of bytes left to examine in workingData\n workingBytesAvailable = workingData.byteLength,\n // the current word being examined\n workingWord = 0,\n // :uint\n // the number of bits left to examine in the current word\n workingBitsAvailable = 0; // :uint;\n // ():uint\n\n this.length = function () {\n return 8 * workingBytesAvailable;\n }; // ():uint\n\n\n this.bitsAvailable = function () {\n return 8 * workingBytesAvailable + workingBitsAvailable;\n }; // ():void\n\n\n this.loadWord = function () {\n var position = workingData.byteLength - workingBytesAvailable,\n workingBytes = new Uint8Array(4),\n availableBytes = Math.min(4, workingBytesAvailable);\n\n if (availableBytes === 0) {\n throw new Error('no bytes available');\n }\n\n workingBytes.set(workingData.subarray(position, position + availableBytes));\n workingWord = new DataView(workingBytes.buffer).getUint32(0); // track the amount of workingData that has been processed\n\n workingBitsAvailable = availableBytes * 8;\n workingBytesAvailable -= availableBytes;\n }; // (count:int):void\n\n\n this.skipBits = function (count) {\n var skipBytes; // :int\n\n if (workingBitsAvailable > count) {\n workingWord <<= count;\n workingBitsAvailable -= count;\n } else {\n count -= workingBitsAvailable;\n skipBytes = Math.floor(count / 8);\n count -= skipBytes * 8;\n workingBytesAvailable -= skipBytes;\n this.loadWord();\n workingWord <<= count;\n workingBitsAvailable -= count;\n }\n }; // (size:int):uint\n\n\n this.readBits = function (size) {\n var bits = Math.min(workingBitsAvailable, size),\n // :uint\n valu = workingWord >>> 32 - bits; // :uint\n // if size > 31, handle error\n\n workingBitsAvailable -= bits;\n\n if (workingBitsAvailable > 0) {\n workingWord <<= bits;\n } else if (workingBytesAvailable > 0) {\n this.loadWord();\n }\n\n bits = size - bits;\n\n if (bits > 0) {\n return valu << bits | this.readBits(bits);\n }\n\n return valu;\n }; // ():uint\n\n\n this.skipLeadingZeros = function () {\n var leadingZeroCount; // :uint\n\n for (leadingZeroCount = 0; leadingZeroCount < workingBitsAvailable; ++leadingZeroCount) {\n if ((workingWord & 0x80000000 >>> leadingZeroCount) !== 0) {\n // the first bit of working word is 1\n workingWord <<= leadingZeroCount;\n workingBitsAvailable -= leadingZeroCount;\n return leadingZeroCount;\n }\n } // we exhausted workingWord and still have not found a 1\n\n\n this.loadWord();\n return leadingZeroCount + this.skipLeadingZeros();\n }; // ():void\n\n\n this.skipUnsignedExpGolomb = function () {\n this.skipBits(1 + this.skipLeadingZeros());\n }; // ():void\n\n\n this.skipExpGolomb = function () {\n this.skipBits(1 + this.skipLeadingZeros());\n }; // ():uint\n\n\n this.readUnsignedExpGolomb = function () {\n var clz = this.skipLeadingZeros(); // :uint\n\n return this.readBits(clz + 1) - 1;\n }; // ():int\n\n\n this.readExpGolomb = function () {\n var valu = this.readUnsignedExpGolomb(); // :int\n\n if (0x01 & valu) {\n // the number is odd if the low order bit is set\n return 1 + valu >>> 1; // add 1 to make it even, and divide by 2\n }\n\n return -1 * (valu >>> 1); // divide by two then make it negative\n }; // Some convenience functions\n // :Boolean\n\n\n this.readBoolean = function () {\n return this.readBits(1) === 1;\n }; // ():int\n\n\n this.readUnsignedByte = function () {\n return this.readBits(8);\n };\n\n this.loadWord();\n };\n\n var expGolomb = ExpGolomb;\n\n var _H264Stream, _NalByteStream;\n\n var PROFILES_WITH_OPTIONAL_SPS_DATA;\n /**\n * Accepts a NAL unit byte stream and unpacks the embedded NAL units.\n */\n\n _NalByteStream = function NalByteStream() {\n var syncPoint = 0,\n i,\n buffer;\n\n _NalByteStream.prototype.init.call(this);\n /*\n * Scans a byte stream and triggers a data event with the NAL units found.\n * @param {Object} data Event received from H264Stream\n * @param {Uint8Array} data.data The h264 byte stream to be scanned\n *\n * @see H264Stream.push\n */\n\n\n this.push = function (data) {\n var swapBuffer;\n\n if (!buffer) {\n buffer = data.data;\n } else {\n swapBuffer = new Uint8Array(buffer.byteLength + data.data.byteLength);\n swapBuffer.set(buffer);\n swapBuffer.set(data.data, buffer.byteLength);\n buffer = swapBuffer;\n }\n\n var len = buffer.byteLength; // Rec. ITU-T H.264, Annex B\n // scan for NAL unit boundaries\n // a match looks like this:\n // 0 0 1 .. NAL .. 0 0 1\n // ^ sync point ^ i\n // or this:\n // 0 0 1 .. NAL .. 0 0 0\n // ^ sync point ^ i\n // advance the sync point to a NAL start, if necessary\n\n for (; syncPoint < len - 3; syncPoint++) {\n if (buffer[syncPoint + 2] === 1) {\n // the sync point is properly aligned\n i = syncPoint + 5;\n break;\n }\n }\n\n while (i < len) {\n // look at the current byte to determine if we've hit the end of\n // a NAL unit boundary\n switch (buffer[i]) {\n case 0:\n // skip past non-sync sequences\n if (buffer[i - 1] !== 0) {\n i += 2;\n break;\n } else if (buffer[i - 2] !== 0) {\n i++;\n break;\n } // deliver the NAL unit if it isn't empty\n\n\n if (syncPoint + 3 !== i - 2) {\n this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n } // drop trailing zeroes\n\n\n do {\n i++;\n } while (buffer[i] !== 1 && i < len);\n\n syncPoint = i - 2;\n i += 3;\n break;\n\n case 1:\n // skip past non-sync sequences\n if (buffer[i - 1] !== 0 || buffer[i - 2] !== 0) {\n i += 3;\n break;\n } // deliver the NAL unit\n\n\n this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n syncPoint = i - 2;\n i += 3;\n break;\n\n default:\n // the current byte isn't a one or zero, so it cannot be part\n // of a sync sequence\n i += 3;\n break;\n }\n } // filter out the NAL units that were delivered\n\n\n buffer = buffer.subarray(syncPoint);\n i -= syncPoint;\n syncPoint = 0;\n };\n\n this.reset = function () {\n buffer = null;\n syncPoint = 0;\n this.trigger('reset');\n };\n\n this.flush = function () {\n // deliver the last buffered NAL unit\n if (buffer && buffer.byteLength > 3) {\n this.trigger('data', buffer.subarray(syncPoint + 3));\n } // reset the stream state\n\n\n buffer = null;\n syncPoint = 0;\n this.trigger('done');\n };\n\n this.endTimeline = function () {\n this.flush();\n this.trigger('endedtimeline');\n };\n };\n\n _NalByteStream.prototype = new stream(); // values of profile_idc that indicate additional fields are included in the SPS\n // see Recommendation ITU-T H.264 (4/2013),\n // 7.3.2.1.1 Sequence parameter set data syntax\n\n PROFILES_WITH_OPTIONAL_SPS_DATA = {\n 100: true,\n 110: true,\n 122: true,\n 244: true,\n 44: true,\n 83: true,\n 86: true,\n 118: true,\n 128: true,\n 138: true,\n 139: true,\n 134: true\n };\n /**\n * Accepts input from a ElementaryStream and produces H.264 NAL unit data\n * events.\n */\n\n _H264Stream = function H264Stream() {\n var nalByteStream = new _NalByteStream(),\n self,\n trackId,\n currentPts,\n currentDts,\n discardEmulationPreventionBytes,\n readSequenceParameterSet,\n skipScalingList;\n\n _H264Stream.prototype.init.call(this);\n\n self = this;\n /*\n * Pushes a packet from a stream onto the NalByteStream\n *\n * @param {Object} packet - A packet received from a stream\n * @param {Uint8Array} packet.data - The raw bytes of the packet\n * @param {Number} packet.dts - Decode timestamp of the packet\n * @param {Number} packet.pts - Presentation timestamp of the packet\n * @param {Number} packet.trackId - The id of the h264 track this packet came from\n * @param {('video'|'audio')} packet.type - The type of packet\n *\n */\n\n this.push = function (packet) {\n if (packet.type !== 'video') {\n return;\n }\n\n trackId = packet.trackId;\n currentPts = packet.pts;\n currentDts = packet.dts;\n nalByteStream.push(packet);\n };\n /*\n * Identify NAL unit types and pass on the NALU, trackId, presentation and decode timestamps\n * for the NALUs to the next stream component.\n * Also, preprocess caption and sequence parameter NALUs.\n *\n * @param {Uint8Array} data - A NAL unit identified by `NalByteStream.push`\n * @see NalByteStream.push\n */\n\n\n nalByteStream.on('data', function (data) {\n var event = {\n trackId: trackId,\n pts: currentPts,\n dts: currentDts,\n data: data\n };\n\n switch (data[0] & 0x1f) {\n case 0x05:\n event.nalUnitType = 'slice_layer_without_partitioning_rbsp_idr';\n break;\n\n case 0x06:\n event.nalUnitType = 'sei_rbsp';\n event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n break;\n\n case 0x07:\n event.nalUnitType = 'seq_parameter_set_rbsp';\n event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n event.config = readSequenceParameterSet(event.escapedRBSP);\n break;\n\n case 0x08:\n event.nalUnitType = 'pic_parameter_set_rbsp';\n break;\n\n case 0x09:\n event.nalUnitType = 'access_unit_delimiter_rbsp';\n break;\n\n default:\n break;\n } // This triggers data on the H264Stream\n\n\n self.trigger('data', event);\n });\n nalByteStream.on('done', function () {\n self.trigger('done');\n });\n nalByteStream.on('partialdone', function () {\n self.trigger('partialdone');\n });\n nalByteStream.on('reset', function () {\n self.trigger('reset');\n });\n nalByteStream.on('endedtimeline', function () {\n self.trigger('endedtimeline');\n });\n\n this.flush = function () {\n nalByteStream.flush();\n };\n\n this.partialFlush = function () {\n nalByteStream.partialFlush();\n };\n\n this.reset = function () {\n nalByteStream.reset();\n };\n\n this.endTimeline = function () {\n nalByteStream.endTimeline();\n };\n /**\n * Advance the ExpGolomb decoder past a scaling list. The scaling\n * list is optionally transmitted as part of a sequence parameter\n * set and is not relevant to transmuxing.\n * @param count {number} the number of entries in this scaling list\n * @param expGolombDecoder {object} an ExpGolomb pointed to the\n * start of a scaling list\n * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1\n */\n\n\n skipScalingList = function skipScalingList(count, expGolombDecoder) {\n var lastScale = 8,\n nextScale = 8,\n j,\n deltaScale;\n\n for (j = 0; j < count; j++) {\n if (nextScale !== 0) {\n deltaScale = expGolombDecoder.readExpGolomb();\n nextScale = (lastScale + deltaScale + 256) % 256;\n }\n\n lastScale = nextScale === 0 ? lastScale : nextScale;\n }\n };\n /**\n * Expunge any \"Emulation Prevention\" bytes from a \"Raw Byte\n * Sequence Payload\"\n * @param data {Uint8Array} the bytes of a RBSP from a NAL\n * unit\n * @return {Uint8Array} the RBSP without any Emulation\n * Prevention Bytes\n */\n\n\n discardEmulationPreventionBytes = function discardEmulationPreventionBytes(data) {\n var length = data.byteLength,\n emulationPreventionBytesPositions = [],\n i = 1,\n newLength,\n newData; // Find all `Emulation Prevention Bytes`\n\n while (i < length - 2) {\n if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\n emulationPreventionBytesPositions.push(i + 2);\n i += 2;\n } else {\n i++;\n }\n } // If no Emulation Prevention Bytes were found just return the original\n // array\n\n\n if (emulationPreventionBytesPositions.length === 0) {\n return data;\n } // Create a new array to hold the NAL unit data\n\n\n newLength = length - emulationPreventionBytesPositions.length;\n newData = new Uint8Array(newLength);\n var sourceIndex = 0;\n\n for (i = 0; i < newLength; sourceIndex++, i++) {\n if (sourceIndex === emulationPreventionBytesPositions[0]) {\n // Skip this byte\n sourceIndex++; // Remove this position index\n\n emulationPreventionBytesPositions.shift();\n }\n\n newData[i] = data[sourceIndex];\n }\n\n return newData;\n };\n /**\n * Read a sequence parameter set and return some interesting video\n * properties. A sequence parameter set is the H264 metadata that\n * describes the properties of upcoming video frames.\n * @param data {Uint8Array} the bytes of a sequence parameter set\n * @return {object} an object with configuration parsed from the\n * sequence parameter set, including the dimensions of the\n * associated video frames.\n */\n\n\n readSequenceParameterSet = function readSequenceParameterSet(data) {\n var frameCropLeftOffset = 0,\n frameCropRightOffset = 0,\n frameCropTopOffset = 0,\n frameCropBottomOffset = 0,\n sarScale = 1,\n expGolombDecoder,\n profileIdc,\n levelIdc,\n profileCompatibility,\n chromaFormatIdc,\n picOrderCntType,\n numRefFramesInPicOrderCntCycle,\n picWidthInMbsMinus1,\n picHeightInMapUnitsMinus1,\n frameMbsOnlyFlag,\n scalingListCount,\n sarRatio,\n aspectRatioIdc,\n i;\n expGolombDecoder = new expGolomb(data);\n profileIdc = expGolombDecoder.readUnsignedByte(); // profile_idc\n\n profileCompatibility = expGolombDecoder.readUnsignedByte(); // constraint_set[0-5]_flag\n\n levelIdc = expGolombDecoder.readUnsignedByte(); // level_idc u(8)\n\n expGolombDecoder.skipUnsignedExpGolomb(); // seq_parameter_set_id\n // some profiles have more optional data we don't need\n\n if (PROFILES_WITH_OPTIONAL_SPS_DATA[profileIdc]) {\n chromaFormatIdc = expGolombDecoder.readUnsignedExpGolomb();\n\n if (chromaFormatIdc === 3) {\n expGolombDecoder.skipBits(1); // separate_colour_plane_flag\n }\n\n expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_luma_minus8\n\n expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_chroma_minus8\n\n expGolombDecoder.skipBits(1); // qpprime_y_zero_transform_bypass_flag\n\n if (expGolombDecoder.readBoolean()) {\n // seq_scaling_matrix_present_flag\n scalingListCount = chromaFormatIdc !== 3 ? 8 : 12;\n\n for (i = 0; i < scalingListCount; i++) {\n if (expGolombDecoder.readBoolean()) {\n // seq_scaling_list_present_flag[ i ]\n if (i < 6) {\n skipScalingList(16, expGolombDecoder);\n } else {\n skipScalingList(64, expGolombDecoder);\n }\n }\n }\n }\n }\n\n expGolombDecoder.skipUnsignedExpGolomb(); // log2_max_frame_num_minus4\n\n picOrderCntType = expGolombDecoder.readUnsignedExpGolomb();\n\n if (picOrderCntType === 0) {\n expGolombDecoder.readUnsignedExpGolomb(); // log2_max_pic_order_cnt_lsb_minus4\n } else if (picOrderCntType === 1) {\n expGolombDecoder.skipBits(1); // delta_pic_order_always_zero_flag\n\n expGolombDecoder.skipExpGolomb(); // offset_for_non_ref_pic\n\n expGolombDecoder.skipExpGolomb(); // offset_for_top_to_bottom_field\n\n numRefFramesInPicOrderCntCycle = expGolombDecoder.readUnsignedExpGolomb();\n\n for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) {\n expGolombDecoder.skipExpGolomb(); // offset_for_ref_frame[ i ]\n }\n }\n\n expGolombDecoder.skipUnsignedExpGolomb(); // max_num_ref_frames\n\n expGolombDecoder.skipBits(1); // gaps_in_frame_num_value_allowed_flag\n\n picWidthInMbsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n picHeightInMapUnitsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n frameMbsOnlyFlag = expGolombDecoder.readBits(1);\n\n if (frameMbsOnlyFlag === 0) {\n expGolombDecoder.skipBits(1); // mb_adaptive_frame_field_flag\n }\n\n expGolombDecoder.skipBits(1); // direct_8x8_inference_flag\n\n if (expGolombDecoder.readBoolean()) {\n // frame_cropping_flag\n frameCropLeftOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropRightOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropTopOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropBottomOffset = expGolombDecoder.readUnsignedExpGolomb();\n }\n\n if (expGolombDecoder.readBoolean()) {\n // vui_parameters_present_flag\n if (expGolombDecoder.readBoolean()) {\n // aspect_ratio_info_present_flag\n aspectRatioIdc = expGolombDecoder.readUnsignedByte();\n\n switch (aspectRatioIdc) {\n case 1:\n sarRatio = [1, 1];\n break;\n\n case 2:\n sarRatio = [12, 11];\n break;\n\n case 3:\n sarRatio = [10, 11];\n break;\n\n case 4:\n sarRatio = [16, 11];\n break;\n\n case 5:\n sarRatio = [40, 33];\n break;\n\n case 6:\n sarRatio = [24, 11];\n break;\n\n case 7:\n sarRatio = [20, 11];\n break;\n\n case 8:\n sarRatio = [32, 11];\n break;\n\n case 9:\n sarRatio = [80, 33];\n break;\n\n case 10:\n sarRatio = [18, 11];\n break;\n\n case 11:\n sarRatio = [15, 11];\n break;\n\n case 12:\n sarRatio = [64, 33];\n break;\n\n case 13:\n sarRatio = [160, 99];\n break;\n\n case 14:\n sarRatio = [4, 3];\n break;\n\n case 15:\n sarRatio = [3, 2];\n break;\n\n case 16:\n sarRatio = [2, 1];\n break;\n\n case 255:\n {\n sarRatio = [expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte(), expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte()];\n break;\n }\n }\n\n if (sarRatio) {\n sarScale = sarRatio[0] / sarRatio[1];\n }\n }\n }\n\n return {\n profileIdc: profileIdc,\n levelIdc: levelIdc,\n profileCompatibility: profileCompatibility,\n width: Math.ceil(((picWidthInMbsMinus1 + 1) * 16 - frameCropLeftOffset * 2 - frameCropRightOffset * 2) * sarScale),\n height: (2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16 - frameCropTopOffset * 2 - frameCropBottomOffset * 2,\n sarRatio: sarRatio\n };\n };\n };\n\n _H264Stream.prototype = new stream();\n var h264 = {\n H264Stream: _H264Stream,\n NalByteStream: _NalByteStream\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Utilities to detect basic properties and metadata about Aac data.\n */\n\n var ADTS_SAMPLING_FREQUENCIES$1 = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n\n var isLikelyAacData = function isLikelyAacData(data) {\n if (data[0] === 'I'.charCodeAt(0) && data[1] === 'D'.charCodeAt(0) && data[2] === '3'.charCodeAt(0)) {\n return true;\n }\n\n return false;\n };\n\n var parseSyncSafeInteger$1 = function parseSyncSafeInteger(data) {\n return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\n }; // return a percent-encoded representation of the specified byte range\n // @see http://en.wikipedia.org/wiki/Percent-encoding\n\n\n var percentEncode$1 = function percentEncode(bytes, start, end) {\n var i,\n result = '';\n\n for (i = start; i < end; i++) {\n result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\n }\n\n return result;\n }; // return the string representation of the specified byte range,\n // interpreted as ISO-8859-1.\n\n\n var parseIso88591$1 = function parseIso88591(bytes, start, end) {\n return unescape(percentEncode$1(bytes, start, end)); // jshint ignore:line\n };\n\n var parseId3TagSize = function parseId3TagSize(header, byteIndex) {\n var returnSize = header[byteIndex + 6] << 21 | header[byteIndex + 7] << 14 | header[byteIndex + 8] << 7 | header[byteIndex + 9],\n flags = header[byteIndex + 5],\n footerPresent = (flags & 16) >> 4;\n\n if (footerPresent) {\n return returnSize + 20;\n }\n\n return returnSize + 10;\n };\n\n var parseAdtsSize = function parseAdtsSize(header, byteIndex) {\n var lowThree = (header[byteIndex + 5] & 0xE0) >> 5,\n middle = header[byteIndex + 4] << 3,\n highTwo = header[byteIndex + 3] & 0x3 << 11;\n return highTwo | middle | lowThree;\n };\n\n var parseType = function parseType(header, byteIndex) {\n if (header[byteIndex] === 'I'.charCodeAt(0) && header[byteIndex + 1] === 'D'.charCodeAt(0) && header[byteIndex + 2] === '3'.charCodeAt(0)) {\n return 'timed-metadata';\n } else if (header[byteIndex] & 0xff === 0xff && (header[byteIndex + 1] & 0xf0) === 0xf0) {\n return 'audio';\n }\n\n return null;\n };\n\n var parseSampleRate = function parseSampleRate(packet) {\n var i = 0;\n\n while (i + 5 < packet.length) {\n if (packet[i] !== 0xFF || (packet[i + 1] & 0xF6) !== 0xF0) {\n // If a valid header was not found, jump one forward and attempt to\n // find a valid ADTS header starting at the next byte\n i++;\n continue;\n }\n\n return ADTS_SAMPLING_FREQUENCIES$1[(packet[i + 2] & 0x3c) >>> 2];\n }\n\n return null;\n };\n\n var parseAacTimestamp = function parseAacTimestamp(packet) {\n var frameStart, frameSize, frame, frameHeader; // find the start of the first frame and the end of the tag\n\n frameStart = 10;\n\n if (packet[5] & 0x40) {\n // advance the frame start past the extended header\n frameStart += 4; // header size field\n\n frameStart += parseSyncSafeInteger$1(packet.subarray(10, 14));\n } // parse one or more ID3 frames\n // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n\n do {\n // determine the number of bytes in this frame\n frameSize = parseSyncSafeInteger$1(packet.subarray(frameStart + 4, frameStart + 8));\n\n if (frameSize < 1) {\n return null;\n }\n\n frameHeader = String.fromCharCode(packet[frameStart], packet[frameStart + 1], packet[frameStart + 2], packet[frameStart + 3]);\n\n if (frameHeader === 'PRIV') {\n frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10);\n\n for (var i = 0; i < frame.byteLength; i++) {\n if (frame[i] === 0) {\n var owner = parseIso88591$1(frame, 0, i);\n\n if (owner === 'com.apple.streaming.transportStreamTimestamp') {\n var d = frame.subarray(i + 1);\n var size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\n size *= 4;\n size += d[7] & 0x03;\n return size;\n }\n\n break;\n }\n }\n }\n\n frameStart += 10; // advance past the frame header\n\n frameStart += frameSize; // advance past the frame body\n } while (frameStart < packet.byteLength);\n\n return null;\n };\n\n var utils = {\n isLikelyAacData: isLikelyAacData,\n parseId3TagSize: parseId3TagSize,\n parseAdtsSize: parseAdtsSize,\n parseType: parseType,\n parseSampleRate: parseSampleRate,\n parseAacTimestamp: parseAacTimestamp\n }; // Constants\n\n var _AacStream;\n /**\n * Splits an incoming stream of binary data into ADTS and ID3 Frames.\n */\n\n\n _AacStream = function AacStream() {\n var everything = new Uint8Array(),\n timeStamp = 0;\n\n _AacStream.prototype.init.call(this);\n\n this.setTimestamp = function (timestamp) {\n timeStamp = timestamp;\n };\n\n this.push = function (bytes) {\n var frameSize = 0,\n byteIndex = 0,\n bytesLeft,\n chunk,\n packet,\n tempLength; // If there are bytes remaining from the last segment, prepend them to the\n // bytes that were pushed in\n\n if (everything.length) {\n tempLength = everything.length;\n everything = new Uint8Array(bytes.byteLength + tempLength);\n everything.set(everything.subarray(0, tempLength));\n everything.set(bytes, tempLength);\n } else {\n everything = bytes;\n }\n\n while (everything.length - byteIndex >= 3) {\n if (everything[byteIndex] === 'I'.charCodeAt(0) && everything[byteIndex + 1] === 'D'.charCodeAt(0) && everything[byteIndex + 2] === '3'.charCodeAt(0)) {\n // Exit early because we don't have enough to parse\n // the ID3 tag header\n if (everything.length - byteIndex < 10) {\n break;\n } // check framesize\n\n\n frameSize = utils.parseId3TagSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n // Add to byteIndex to support multiple ID3 tags in sequence\n\n if (byteIndex + frameSize > everything.length) {\n break;\n }\n\n chunk = {\n type: 'timed-metadata',\n data: everything.subarray(byteIndex, byteIndex + frameSize)\n };\n this.trigger('data', chunk);\n byteIndex += frameSize;\n continue;\n } else if ((everything[byteIndex] & 0xff) === 0xff && (everything[byteIndex + 1] & 0xf0) === 0xf0) {\n // Exit early because we don't have enough to parse\n // the ADTS frame header\n if (everything.length - byteIndex < 7) {\n break;\n }\n\n frameSize = utils.parseAdtsSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n\n if (byteIndex + frameSize > everything.length) {\n break;\n }\n\n packet = {\n type: 'audio',\n data: everything.subarray(byteIndex, byteIndex + frameSize),\n pts: timeStamp,\n dts: timeStamp\n };\n this.trigger('data', packet);\n byteIndex += frameSize;\n continue;\n }\n\n byteIndex++;\n }\n\n bytesLeft = everything.length - byteIndex;\n\n if (bytesLeft > 0) {\n everything = everything.subarray(byteIndex);\n } else {\n everything = new Uint8Array();\n }\n };\n\n this.reset = function () {\n everything = new Uint8Array();\n this.trigger('reset');\n };\n\n this.endTimeline = function () {\n everything = new Uint8Array();\n this.trigger('endedtimeline');\n };\n };\n\n _AacStream.prototype = new stream();\n var aac = _AacStream;\n var H264Stream = h264.H264Stream;\n var isLikelyAacData$1 = utils.isLikelyAacData;\n var ONE_SECOND_IN_TS$3 = clock.ONE_SECOND_IN_TS; // constants\n\n var AUDIO_PROPERTIES = ['audioobjecttype', 'channelcount', 'samplerate', 'samplingfrequencyindex', 'samplesize'];\n var VIDEO_PROPERTIES = ['width', 'height', 'profileIdc', 'levelIdc', 'profileCompatibility', 'sarRatio']; // object types\n\n var _VideoSegmentStream, _AudioSegmentStream, _Transmuxer, _CoalesceStream;\n /**\n * Compare two arrays (even typed) for same-ness\n */\n\n\n var arrayEquals = function arrayEquals(a, b) {\n var i;\n\n if (a.length !== b.length) {\n return false;\n } // compare the value of each element in the array\n\n\n for (i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n\n return true;\n };\n\n var generateVideoSegmentTimingInfo = function generateVideoSegmentTimingInfo(baseMediaDecodeTime, startDts, startPts, endDts, endPts, prependedContentDuration) {\n var ptsOffsetFromDts = startPts - startDts,\n decodeDuration = endDts - startDts,\n presentationDuration = endPts - startPts; // The PTS and DTS values are based on the actual stream times from the segment,\n // however, the player time values will reflect a start from the baseMediaDecodeTime.\n // In order to provide relevant values for the player times, base timing info on the\n // baseMediaDecodeTime and the DTS and PTS durations of the segment.\n\n return {\n start: {\n dts: baseMediaDecodeTime,\n pts: baseMediaDecodeTime + ptsOffsetFromDts\n },\n end: {\n dts: baseMediaDecodeTime + decodeDuration,\n pts: baseMediaDecodeTime + presentationDuration\n },\n prependedContentDuration: prependedContentDuration,\n baseMediaDecodeTime: baseMediaDecodeTime\n };\n };\n /**\n * Constructs a single-track, ISO BMFF media segment from AAC data\n * events. The output of this stream can be fed to a SourceBuffer\n * configured with a suitable initialization segment.\n * @param track {object} track metadata configuration\n * @param options {object} transmuxer options object\n * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at 0.\n */\n\n\n _AudioSegmentStream = function AudioSegmentStream(track, options) {\n var adtsFrames = [],\n sequenceNumber = 0,\n earliestAllowedDts = 0,\n audioAppendStartTs = 0,\n videoBaseMediaDecodeTime = Infinity;\n options = options || {};\n\n _AudioSegmentStream.prototype.init.call(this);\n\n this.push = function (data) {\n trackDecodeInfo.collectDtsInfo(track, data);\n\n if (track) {\n AUDIO_PROPERTIES.forEach(function (prop) {\n track[prop] = data[prop];\n });\n } // buffer audio data until end() is called\n\n\n adtsFrames.push(data);\n };\n\n this.setEarliestDts = function (earliestDts) {\n earliestAllowedDts = earliestDts - track.timelineStartInfo.baseMediaDecodeTime;\n };\n\n this.setVideoBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n videoBaseMediaDecodeTime = baseMediaDecodeTime;\n };\n\n this.setAudioAppendStart = function (timestamp) {\n audioAppendStartTs = timestamp;\n };\n\n this.flush = function () {\n var frames, moof, mdat, boxes, frameDuration; // return early if no audio data has been observed\n\n if (adtsFrames.length === 0) {\n this.trigger('done', 'AudioSegmentStream');\n return;\n }\n\n frames = audioFrameUtils.trimAdtsFramesByEarliestDts(adtsFrames, track, earliestAllowedDts);\n track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps);\n audioFrameUtils.prefixWithSilence(track, frames, audioAppendStartTs, videoBaseMediaDecodeTime); // we have to build the index from byte locations to\n // samples (that is, adts frames) in the audio data\n\n track.samples = audioFrameUtils.generateSampleTable(frames); // concatenate the audio data to constuct the mdat\n\n mdat = mp4Generator.mdat(audioFrameUtils.concatenateFrameData(frames));\n adtsFrames = [];\n moof = mp4Generator.moof(sequenceNumber, [track]);\n boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // bump the sequence number for next time\n\n sequenceNumber++;\n boxes.set(moof);\n boxes.set(mdat, moof.byteLength);\n trackDecodeInfo.clearDtsInfo(track);\n frameDuration = Math.ceil(ONE_SECOND_IN_TS$3 * 1024 / track.samplerate); // TODO this check was added to maintain backwards compatibility (particularly with\n // tests) on adding the timingInfo event. However, it seems unlikely that there's a\n // valid use-case where an init segment/data should be triggered without associated\n // frames. Leaving for now, but should be looked into.\n\n if (frames.length) {\n this.trigger('timingInfo', {\n start: frames[0].dts,\n end: frames[0].dts + frames.length * frameDuration\n });\n }\n\n this.trigger('data', {\n track: track,\n boxes: boxes\n });\n this.trigger('done', 'AudioSegmentStream');\n };\n\n this.reset = function () {\n trackDecodeInfo.clearDtsInfo(track);\n adtsFrames = [];\n this.trigger('reset');\n };\n };\n\n _AudioSegmentStream.prototype = new stream();\n /**\n * Constructs a single-track, ISO BMFF media segment from H264 data\n * events. The output of this stream can be fed to a SourceBuffer\n * configured with a suitable initialization segment.\n * @param track {object} track metadata configuration\n * @param options {object} transmuxer options object\n * @param options.alignGopsAtEnd {boolean} If true, start from the end of the\n * gopsToAlignWith list when attempting to align gop pts\n * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at 0.\n */\n\n _VideoSegmentStream = function VideoSegmentStream(track, options) {\n var sequenceNumber = 0,\n nalUnits = [],\n gopsToAlignWith = [],\n config,\n pps;\n options = options || {};\n\n _VideoSegmentStream.prototype.init.call(this);\n\n delete track.minPTS;\n this.gopCache_ = [];\n /**\n * Constructs a ISO BMFF segment given H264 nalUnits\n * @param {Object} nalUnit A data event representing a nalUnit\n * @param {String} nalUnit.nalUnitType\n * @param {Object} nalUnit.config Properties for a mp4 track\n * @param {Uint8Array} nalUnit.data The nalUnit bytes\n * @see lib/codecs/h264.js\n **/\n\n this.push = function (nalUnit) {\n trackDecodeInfo.collectDtsInfo(track, nalUnit); // record the track config\n\n if (nalUnit.nalUnitType === 'seq_parameter_set_rbsp' && !config) {\n config = nalUnit.config;\n track.sps = [nalUnit.data];\n VIDEO_PROPERTIES.forEach(function (prop) {\n track[prop] = config[prop];\n }, this);\n }\n\n if (nalUnit.nalUnitType === 'pic_parameter_set_rbsp' && !pps) {\n pps = nalUnit.data;\n track.pps = [nalUnit.data];\n } // buffer video until flush() is called\n\n\n nalUnits.push(nalUnit);\n };\n /**\n * Pass constructed ISO BMFF track and boxes on to the\n * next stream in the pipeline\n **/\n\n\n this.flush = function () {\n var frames,\n gopForFusion,\n gops,\n moof,\n mdat,\n boxes,\n prependedContentDuration = 0,\n firstGop,\n lastGop; // Throw away nalUnits at the start of the byte stream until\n // we find the first AUD\n\n while (nalUnits.length) {\n if (nalUnits[0].nalUnitType === 'access_unit_delimiter_rbsp') {\n break;\n }\n\n nalUnits.shift();\n } // Return early if no video data has been observed\n\n\n if (nalUnits.length === 0) {\n this.resetStream_();\n this.trigger('done', 'VideoSegmentStream');\n return;\n } // Organize the raw nal-units into arrays that represent\n // higher-level constructs such as frames and gops\n // (group-of-pictures)\n\n\n frames = frameUtils.groupNalsIntoFrames(nalUnits);\n gops = frameUtils.groupFramesIntoGops(frames); // If the first frame of this fragment is not a keyframe we have\n // a problem since MSE (on Chrome) requires a leading keyframe.\n //\n // We have two approaches to repairing this situation:\n // 1) GOP-FUSION:\n // This is where we keep track of the GOPS (group-of-pictures)\n // from previous fragments and attempt to find one that we can\n // prepend to the current fragment in order to create a valid\n // fragment.\n // 2) KEYFRAME-PULLING:\n // Here we search for the first keyframe in the fragment and\n // throw away all the frames between the start of the fragment\n // and that keyframe. We then extend the duration and pull the\n // PTS of the keyframe forward so that it covers the time range\n // of the frames that were disposed of.\n //\n // #1 is far prefereable over #2 which can cause \"stuttering\" but\n // requires more things to be just right.\n\n if (!gops[0][0].keyFrame) {\n // Search for a gop for fusion from our gopCache\n gopForFusion = this.getGopForFusion_(nalUnits[0], track);\n\n if (gopForFusion) {\n // in order to provide more accurate timing information about the segment, save\n // the number of seconds prepended to the original segment due to GOP fusion\n prependedContentDuration = gopForFusion.duration;\n gops.unshift(gopForFusion); // Adjust Gops' metadata to account for the inclusion of the\n // new gop at the beginning\n\n gops.byteLength += gopForFusion.byteLength;\n gops.nalCount += gopForFusion.nalCount;\n gops.pts = gopForFusion.pts;\n gops.dts = gopForFusion.dts;\n gops.duration += gopForFusion.duration;\n } else {\n // If we didn't find a candidate gop fall back to keyframe-pulling\n gops = frameUtils.extendFirstKeyFrame(gops);\n }\n } // Trim gops to align with gopsToAlignWith\n\n\n if (gopsToAlignWith.length) {\n var alignedGops;\n\n if (options.alignGopsAtEnd) {\n alignedGops = this.alignGopsAtEnd_(gops);\n } else {\n alignedGops = this.alignGopsAtStart_(gops);\n }\n\n if (!alignedGops) {\n // save all the nals in the last GOP into the gop cache\n this.gopCache_.unshift({\n gop: gops.pop(),\n pps: track.pps,\n sps: track.sps\n }); // Keep a maximum of 6 GOPs in the cache\n\n this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\n\n nalUnits = []; // return early no gops can be aligned with desired gopsToAlignWith\n\n this.resetStream_();\n this.trigger('done', 'VideoSegmentStream');\n return;\n } // Some gops were trimmed. clear dts info so minSegmentDts and pts are correct\n // when recalculated before sending off to CoalesceStream\n\n\n trackDecodeInfo.clearDtsInfo(track);\n gops = alignedGops;\n }\n\n trackDecodeInfo.collectDtsInfo(track, gops); // First, we have to build the index from byte locations to\n // samples (that is, frames) in the video data\n\n track.samples = frameUtils.generateSampleTable(gops); // Concatenate the video data and construct the mdat\n\n mdat = mp4Generator.mdat(frameUtils.concatenateNalData(gops));\n track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps);\n this.trigger('processedGopsInfo', gops.map(function (gop) {\n return {\n pts: gop.pts,\n dts: gop.dts,\n byteLength: gop.byteLength\n };\n }));\n firstGop = gops[0];\n lastGop = gops[gops.length - 1];\n this.trigger('segmentTimingInfo', generateVideoSegmentTimingInfo(track.baseMediaDecodeTime, firstGop.dts, firstGop.pts, lastGop.dts + lastGop.duration, lastGop.pts + lastGop.duration, prependedContentDuration));\n this.trigger('timingInfo', {\n start: gops[0].dts,\n end: gops[gops.length - 1].dts + gops[gops.length - 1].duration\n }); // save all the nals in the last GOP into the gop cache\n\n this.gopCache_.unshift({\n gop: gops.pop(),\n pps: track.pps,\n sps: track.sps\n }); // Keep a maximum of 6 GOPs in the cache\n\n this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\n\n nalUnits = [];\n this.trigger('baseMediaDecodeTime', track.baseMediaDecodeTime);\n this.trigger('timelineStartInfo', track.timelineStartInfo);\n moof = mp4Generator.moof(sequenceNumber, [track]); // it would be great to allocate this array up front instead of\n // throwing away hundreds of media segment fragments\n\n boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // Bump the sequence number for next time\n\n sequenceNumber++;\n boxes.set(moof);\n boxes.set(mdat, moof.byteLength);\n this.trigger('data', {\n track: track,\n boxes: boxes\n });\n this.resetStream_(); // Continue with the flush process now\n\n this.trigger('done', 'VideoSegmentStream');\n };\n\n this.reset = function () {\n this.resetStream_();\n nalUnits = [];\n this.gopCache_.length = 0;\n gopsToAlignWith.length = 0;\n this.trigger('reset');\n };\n\n this.resetStream_ = function () {\n trackDecodeInfo.clearDtsInfo(track); // reset config and pps because they may differ across segments\n // for instance, when we are rendition switching\n\n config = undefined;\n pps = undefined;\n }; // Search for a candidate Gop for gop-fusion from the gop cache and\n // return it or return null if no good candidate was found\n\n\n this.getGopForFusion_ = function (nalUnit) {\n var halfSecond = 45000,\n // Half-a-second in a 90khz clock\n allowableOverlap = 10000,\n // About 3 frames @ 30fps\n nearestDistance = Infinity,\n dtsDistance,\n nearestGopObj,\n currentGop,\n currentGopObj,\n i; // Search for the GOP nearest to the beginning of this nal unit\n\n for (i = 0; i < this.gopCache_.length; i++) {\n currentGopObj = this.gopCache_[i];\n currentGop = currentGopObj.gop; // Reject Gops with different SPS or PPS\n\n if (!(track.pps && arrayEquals(track.pps[0], currentGopObj.pps[0])) || !(track.sps && arrayEquals(track.sps[0], currentGopObj.sps[0]))) {\n continue;\n } // Reject Gops that would require a negative baseMediaDecodeTime\n\n\n if (currentGop.dts < track.timelineStartInfo.dts) {\n continue;\n } // The distance between the end of the gop and the start of the nalUnit\n\n\n dtsDistance = nalUnit.dts - currentGop.dts - currentGop.duration; // Only consider GOPS that start before the nal unit and end within\n // a half-second of the nal unit\n\n if (dtsDistance >= -allowableOverlap && dtsDistance <= halfSecond) {\n // Always use the closest GOP we found if there is more than\n // one candidate\n if (!nearestGopObj || nearestDistance > dtsDistance) {\n nearestGopObj = currentGopObj;\n nearestDistance = dtsDistance;\n }\n }\n }\n\n if (nearestGopObj) {\n return nearestGopObj.gop;\n }\n\n return null;\n }; // trim gop list to the first gop found that has a matching pts with a gop in the list\n // of gopsToAlignWith starting from the START of the list\n\n\n this.alignGopsAtStart_ = function (gops) {\n var alignIndex, gopIndex, align, gop, byteLength, nalCount, duration, alignedGops;\n byteLength = gops.byteLength;\n nalCount = gops.nalCount;\n duration = gops.duration;\n alignIndex = gopIndex = 0;\n\n while (alignIndex < gopsToAlignWith.length && gopIndex < gops.length) {\n align = gopsToAlignWith[alignIndex];\n gop = gops[gopIndex];\n\n if (align.pts === gop.pts) {\n break;\n }\n\n if (gop.pts > align.pts) {\n // this current gop starts after the current gop we want to align on, so increment\n // align index\n alignIndex++;\n continue;\n } // current gop starts before the current gop we want to align on. so increment gop\n // index\n\n\n gopIndex++;\n byteLength -= gop.byteLength;\n nalCount -= gop.nalCount;\n duration -= gop.duration;\n }\n\n if (gopIndex === 0) {\n // no gops to trim\n return gops;\n }\n\n if (gopIndex === gops.length) {\n // all gops trimmed, skip appending all gops\n return null;\n }\n\n alignedGops = gops.slice(gopIndex);\n alignedGops.byteLength = byteLength;\n alignedGops.duration = duration;\n alignedGops.nalCount = nalCount;\n alignedGops.pts = alignedGops[0].pts;\n alignedGops.dts = alignedGops[0].dts;\n return alignedGops;\n }; // trim gop list to the first gop found that has a matching pts with a gop in the list\n // of gopsToAlignWith starting from the END of the list\n\n\n this.alignGopsAtEnd_ = function (gops) {\n var alignIndex, gopIndex, align, gop, alignEndIndex, matchFound;\n alignIndex = gopsToAlignWith.length - 1;\n gopIndex = gops.length - 1;\n alignEndIndex = null;\n matchFound = false;\n\n while (alignIndex >= 0 && gopIndex >= 0) {\n align = gopsToAlignWith[alignIndex];\n gop = gops[gopIndex];\n\n if (align.pts === gop.pts) {\n matchFound = true;\n break;\n }\n\n if (align.pts > gop.pts) {\n alignIndex--;\n continue;\n }\n\n if (alignIndex === gopsToAlignWith.length - 1) {\n // gop.pts is greater than the last alignment candidate. If no match is found\n // by the end of this loop, we still want to append gops that come after this\n // point\n alignEndIndex = gopIndex;\n }\n\n gopIndex--;\n }\n\n if (!matchFound && alignEndIndex === null) {\n return null;\n }\n\n var trimIndex;\n\n if (matchFound) {\n trimIndex = gopIndex;\n } else {\n trimIndex = alignEndIndex;\n }\n\n if (trimIndex === 0) {\n return gops;\n }\n\n var alignedGops = gops.slice(trimIndex);\n var metadata = alignedGops.reduce(function (total, gop) {\n total.byteLength += gop.byteLength;\n total.duration += gop.duration;\n total.nalCount += gop.nalCount;\n return total;\n }, {\n byteLength: 0,\n duration: 0,\n nalCount: 0\n });\n alignedGops.byteLength = metadata.byteLength;\n alignedGops.duration = metadata.duration;\n alignedGops.nalCount = metadata.nalCount;\n alignedGops.pts = alignedGops[0].pts;\n alignedGops.dts = alignedGops[0].dts;\n return alignedGops;\n };\n\n this.alignGopsWith = function (newGopsToAlignWith) {\n gopsToAlignWith = newGopsToAlignWith;\n };\n };\n\n _VideoSegmentStream.prototype = new stream();\n /**\n * A Stream that can combine multiple streams (ie. audio & video)\n * into a single output segment for MSE. Also supports audio-only\n * and video-only streams.\n * @param options {object} transmuxer options object\n * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at media timeline start.\n */\n\n _CoalesceStream = function CoalesceStream(options, metadataStream) {\n // Number of Tracks per output segment\n // If greater than 1, we combine multiple\n // tracks into a single segment\n this.numberOfTracks = 0;\n this.metadataStream = metadataStream;\n options = options || {};\n\n if (typeof options.remux !== 'undefined') {\n this.remuxTracks = !!options.remux;\n } else {\n this.remuxTracks = true;\n }\n\n if (typeof options.keepOriginalTimestamps === 'boolean') {\n this.keepOriginalTimestamps = options.keepOriginalTimestamps;\n } else {\n this.keepOriginalTimestamps = false;\n }\n\n this.pendingTracks = [];\n this.videoTrack = null;\n this.pendingBoxes = [];\n this.pendingCaptions = [];\n this.pendingMetadata = [];\n this.pendingBytes = 0;\n this.emittedTracks = 0;\n\n _CoalesceStream.prototype.init.call(this); // Take output from multiple\n\n\n this.push = function (output) {\n // buffer incoming captions until the associated video segment\n // finishes\n if (output.text) {\n return this.pendingCaptions.push(output);\n } // buffer incoming id3 tags until the final flush\n\n\n if (output.frames) {\n return this.pendingMetadata.push(output);\n } // Add this track to the list of pending tracks and store\n // important information required for the construction of\n // the final segment\n\n\n this.pendingTracks.push(output.track);\n this.pendingBytes += output.boxes.byteLength; // TODO: is there an issue for this against chrome?\n // We unshift audio and push video because\n // as of Chrome 75 when switching from\n // one init segment to another if the video\n // mdat does not appear after the audio mdat\n // only audio will play for the duration of our transmux.\n\n if (output.track.type === 'video') {\n this.videoTrack = output.track;\n this.pendingBoxes.push(output.boxes);\n }\n\n if (output.track.type === 'audio') {\n this.audioTrack = output.track;\n this.pendingBoxes.unshift(output.boxes);\n }\n };\n };\n\n _CoalesceStream.prototype = new stream();\n\n _CoalesceStream.prototype.flush = function (flushSource) {\n var offset = 0,\n event = {\n captions: [],\n captionStreams: {},\n metadata: [],\n info: {}\n },\n caption,\n id3,\n initSegment,\n timelineStartPts = 0,\n i;\n\n if (this.pendingTracks.length < this.numberOfTracks) {\n if (flushSource !== 'VideoSegmentStream' && flushSource !== 'AudioSegmentStream') {\n // Return because we haven't received a flush from a data-generating\n // portion of the segment (meaning that we have only recieved meta-data\n // or captions.)\n return;\n } else if (this.remuxTracks) {\n // Return until we have enough tracks from the pipeline to remux (if we\n // are remuxing audio and video into a single MP4)\n return;\n } else if (this.pendingTracks.length === 0) {\n // In the case where we receive a flush without any data having been\n // received we consider it an emitted track for the purposes of coalescing\n // `done` events.\n // We do this for the case where there is an audio and video track in the\n // segment but no audio data. (seen in several playlists with alternate\n // audio tracks and no audio present in the main TS segments.)\n this.emittedTracks++;\n\n if (this.emittedTracks >= this.numberOfTracks) {\n this.trigger('done');\n this.emittedTracks = 0;\n }\n\n return;\n }\n }\n\n if (this.videoTrack) {\n timelineStartPts = this.videoTrack.timelineStartInfo.pts;\n VIDEO_PROPERTIES.forEach(function (prop) {\n event.info[prop] = this.videoTrack[prop];\n }, this);\n } else if (this.audioTrack) {\n timelineStartPts = this.audioTrack.timelineStartInfo.pts;\n AUDIO_PROPERTIES.forEach(function (prop) {\n event.info[prop] = this.audioTrack[prop];\n }, this);\n }\n\n if (this.videoTrack || this.audioTrack) {\n if (this.pendingTracks.length === 1) {\n event.type = this.pendingTracks[0].type;\n } else {\n event.type = 'combined';\n }\n\n this.emittedTracks += this.pendingTracks.length;\n initSegment = mp4Generator.initSegment(this.pendingTracks); // Create a new typed array to hold the init segment\n\n event.initSegment = new Uint8Array(initSegment.byteLength); // Create an init segment containing a moov\n // and track definitions\n\n event.initSegment.set(initSegment); // Create a new typed array to hold the moof+mdats\n\n event.data = new Uint8Array(this.pendingBytes); // Append each moof+mdat (one per track) together\n\n for (i = 0; i < this.pendingBoxes.length; i++) {\n event.data.set(this.pendingBoxes[i], offset);\n offset += this.pendingBoxes[i].byteLength;\n } // Translate caption PTS times into second offsets to match the\n // video timeline for the segment, and add track info\n\n\n for (i = 0; i < this.pendingCaptions.length; i++) {\n caption = this.pendingCaptions[i];\n caption.startTime = clock.metadataTsToSeconds(caption.startPts, timelineStartPts, this.keepOriginalTimestamps);\n caption.endTime = clock.metadataTsToSeconds(caption.endPts, timelineStartPts, this.keepOriginalTimestamps);\n event.captionStreams[caption.stream] = true;\n event.captions.push(caption);\n } // Translate ID3 frame PTS times into second offsets to match the\n // video timeline for the segment\n\n\n for (i = 0; i < this.pendingMetadata.length; i++) {\n id3 = this.pendingMetadata[i];\n id3.cueTime = clock.metadataTsToSeconds(id3.pts, timelineStartPts, this.keepOriginalTimestamps);\n event.metadata.push(id3);\n } // We add this to every single emitted segment even though we only need\n // it for the first\n\n\n event.metadata.dispatchType = this.metadataStream.dispatchType; // Reset stream state\n\n this.pendingTracks.length = 0;\n this.videoTrack = null;\n this.pendingBoxes.length = 0;\n this.pendingCaptions.length = 0;\n this.pendingBytes = 0;\n this.pendingMetadata.length = 0; // Emit the built segment\n // We include captions and ID3 tags for backwards compatibility,\n // ideally we should send only video and audio in the data event\n\n this.trigger('data', event); // Emit each caption to the outside world\n // Ideally, this would happen immediately on parsing captions,\n // but we need to ensure that video data is sent back first\n // so that caption timing can be adjusted to match video timing\n\n for (i = 0; i < event.captions.length; i++) {\n caption = event.captions[i];\n this.trigger('caption', caption);\n } // Emit each id3 tag to the outside world\n // Ideally, this would happen immediately on parsing the tag,\n // but we need to ensure that video data is sent back first\n // so that ID3 frame timing can be adjusted to match video timing\n\n\n for (i = 0; i < event.metadata.length; i++) {\n id3 = event.metadata[i];\n this.trigger('id3Frame', id3);\n }\n } // Only emit `done` if all tracks have been flushed and emitted\n\n\n if (this.emittedTracks >= this.numberOfTracks) {\n this.trigger('done');\n this.emittedTracks = 0;\n }\n };\n\n _CoalesceStream.prototype.setRemux = function (val) {\n this.remuxTracks = val;\n };\n /**\n * A Stream that expects MP2T binary data as input and produces\n * corresponding media segments, suitable for use with Media Source\n * Extension (MSE) implementations that support the ISO BMFF byte\n * stream format, like Chrome.\n */\n\n\n _Transmuxer = function Transmuxer(options) {\n var self = this,\n hasFlushed = true,\n videoTrack,\n audioTrack;\n\n _Transmuxer.prototype.init.call(this);\n\n options = options || {};\n this.baseMediaDecodeTime = options.baseMediaDecodeTime || 0;\n this.transmuxPipeline_ = {};\n\n this.setupAacPipeline = function () {\n var pipeline = {};\n this.transmuxPipeline_ = pipeline;\n pipeline.type = 'aac';\n pipeline.metadataStream = new m2ts_1.MetadataStream(); // set up the parsing pipeline\n\n pipeline.aacStream = new aac();\n pipeline.audioTimestampRolloverStream = new m2ts_1.TimestampRolloverStream('audio');\n pipeline.timedMetadataTimestampRolloverStream = new m2ts_1.TimestampRolloverStream('timed-metadata');\n pipeline.adtsStream = new adts();\n pipeline.coalesceStream = new _CoalesceStream(options, pipeline.metadataStream);\n pipeline.headOfPipeline = pipeline.aacStream;\n pipeline.aacStream.pipe(pipeline.audioTimestampRolloverStream).pipe(pipeline.adtsStream);\n pipeline.aacStream.pipe(pipeline.timedMetadataTimestampRolloverStream).pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream);\n pipeline.metadataStream.on('timestamp', function (frame) {\n pipeline.aacStream.setTimestamp(frame.timeStamp);\n });\n pipeline.aacStream.on('data', function (data) {\n if (data.type === 'timed-metadata' && !pipeline.audioSegmentStream) {\n audioTrack = audioTrack || {\n timelineStartInfo: {\n baseMediaDecodeTime: self.baseMediaDecodeTime\n },\n codec: 'adts',\n type: 'audio'\n }; // hook up the audio segment stream to the first track with aac data\n\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.audioSegmentStream = new _AudioSegmentStream(audioTrack, options);\n pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo')); // Set up the final part of the audio pipeline\n\n pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream);\n } // emit pmt info\n\n\n self.trigger('trackinfo', {\n hasAudio: !!audioTrack,\n hasVideo: !!videoTrack\n });\n }); // Re-emit any data coming from the coalesce stream to the outside world\n\n pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data')); // Let the consumer know we have finished flushing the entire pipeline\n\n pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n };\n\n this.setupTsPipeline = function () {\n var pipeline = {};\n this.transmuxPipeline_ = pipeline;\n pipeline.type = 'ts';\n pipeline.metadataStream = new m2ts_1.MetadataStream(); // set up the parsing pipeline\n\n pipeline.packetStream = new m2ts_1.TransportPacketStream();\n pipeline.parseStream = new m2ts_1.TransportParseStream();\n pipeline.elementaryStream = new m2ts_1.ElementaryStream();\n pipeline.timestampRolloverStream = new m2ts_1.TimestampRolloverStream();\n pipeline.adtsStream = new adts();\n pipeline.h264Stream = new H264Stream();\n pipeline.captionStream = new m2ts_1.CaptionStream();\n pipeline.coalesceStream = new _CoalesceStream(options, pipeline.metadataStream);\n pipeline.headOfPipeline = pipeline.packetStream; // disassemble MPEG2-TS packets into elementary streams\n\n pipeline.packetStream.pipe(pipeline.parseStream).pipe(pipeline.elementaryStream).pipe(pipeline.timestampRolloverStream); // !!THIS ORDER IS IMPORTANT!!\n // demux the streams\n\n pipeline.timestampRolloverStream.pipe(pipeline.h264Stream);\n pipeline.timestampRolloverStream.pipe(pipeline.adtsStream);\n pipeline.timestampRolloverStream.pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream); // Hook up CEA-608/708 caption stream\n\n pipeline.h264Stream.pipe(pipeline.captionStream).pipe(pipeline.coalesceStream);\n pipeline.elementaryStream.on('data', function (data) {\n var i;\n\n if (data.type === 'metadata') {\n i = data.tracks.length; // scan the tracks listed in the metadata\n\n while (i--) {\n if (!videoTrack && data.tracks[i].type === 'video') {\n videoTrack = data.tracks[i];\n videoTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n } else if (!audioTrack && data.tracks[i].type === 'audio') {\n audioTrack = data.tracks[i];\n audioTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n }\n } // hook up the video segment stream to the first track with h264 data\n\n\n if (videoTrack && !pipeline.videoSegmentStream) {\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.videoSegmentStream = new _VideoSegmentStream(videoTrack, options);\n pipeline.videoSegmentStream.on('timelineStartInfo', function (timelineStartInfo) {\n // When video emits timelineStartInfo data after a flush, we forward that\n // info to the AudioSegmentStream, if it exists, because video timeline\n // data takes precedence.\n if (audioTrack) {\n audioTrack.timelineStartInfo = timelineStartInfo; // On the first segment we trim AAC frames that exist before the\n // very earliest DTS we have seen in video because Chrome will\n // interpret any video track with a baseMediaDecodeTime that is\n // non-zero as a gap.\n\n pipeline.audioSegmentStream.setEarliestDts(timelineStartInfo.dts);\n }\n });\n pipeline.videoSegmentStream.on('processedGopsInfo', self.trigger.bind(self, 'gopInfo'));\n pipeline.videoSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'videoSegmentTimingInfo'));\n pipeline.videoSegmentStream.on('baseMediaDecodeTime', function (baseMediaDecodeTime) {\n if (audioTrack) {\n pipeline.audioSegmentStream.setVideoBaseMediaDecodeTime(baseMediaDecodeTime);\n }\n });\n pipeline.videoSegmentStream.on('timingInfo', self.trigger.bind(self, 'videoTimingInfo')); // Set up the final part of the video pipeline\n\n pipeline.h264Stream.pipe(pipeline.videoSegmentStream).pipe(pipeline.coalesceStream);\n }\n\n if (audioTrack && !pipeline.audioSegmentStream) {\n // hook up the audio segment stream to the first track with aac data\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.audioSegmentStream = new _AudioSegmentStream(audioTrack, options);\n pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo')); // Set up the final part of the audio pipeline\n\n pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream);\n } // emit pmt info\n\n\n self.trigger('trackinfo', {\n hasAudio: !!audioTrack,\n hasVideo: !!videoTrack\n });\n }\n }); // Re-emit any data coming from the coalesce stream to the outside world\n\n pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data'));\n pipeline.coalesceStream.on('id3Frame', function (id3Frame) {\n id3Frame.dispatchType = pipeline.metadataStream.dispatchType;\n self.trigger('id3Frame', id3Frame);\n });\n pipeline.coalesceStream.on('caption', this.trigger.bind(this, 'caption')); // Let the consumer know we have finished flushing the entire pipeline\n\n pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n }; // hook up the segment streams once track metadata is delivered\n\n\n this.setBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n var pipeline = this.transmuxPipeline_;\n\n if (!options.keepOriginalTimestamps) {\n this.baseMediaDecodeTime = baseMediaDecodeTime;\n }\n\n if (audioTrack) {\n audioTrack.timelineStartInfo.dts = undefined;\n audioTrack.timelineStartInfo.pts = undefined;\n trackDecodeInfo.clearDtsInfo(audioTrack);\n\n if (!options.keepOriginalTimestamps) {\n audioTrack.timelineStartInfo.baseMediaDecodeTime = baseMediaDecodeTime;\n }\n\n if (pipeline.audioTimestampRolloverStream) {\n pipeline.audioTimestampRolloverStream.discontinuity();\n }\n }\n\n if (videoTrack) {\n if (pipeline.videoSegmentStream) {\n pipeline.videoSegmentStream.gopCache_ = [];\n }\n\n videoTrack.timelineStartInfo.dts = undefined;\n videoTrack.timelineStartInfo.pts = undefined;\n trackDecodeInfo.clearDtsInfo(videoTrack);\n pipeline.captionStream.reset();\n\n if (!options.keepOriginalTimestamps) {\n videoTrack.timelineStartInfo.baseMediaDecodeTime = baseMediaDecodeTime;\n }\n }\n\n if (pipeline.timestampRolloverStream) {\n pipeline.timestampRolloverStream.discontinuity();\n }\n };\n\n this.setAudioAppendStart = function (timestamp) {\n if (audioTrack) {\n this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(timestamp);\n }\n };\n\n this.setRemux = function (val) {\n var pipeline = this.transmuxPipeline_;\n options.remux = val;\n\n if (pipeline && pipeline.coalesceStream) {\n pipeline.coalesceStream.setRemux(val);\n }\n };\n\n this.alignGopsWith = function (gopsToAlignWith) {\n if (videoTrack && this.transmuxPipeline_.videoSegmentStream) {\n this.transmuxPipeline_.videoSegmentStream.alignGopsWith(gopsToAlignWith);\n }\n }; // feed incoming data to the front of the parsing pipeline\n\n\n this.push = function (data) {\n if (hasFlushed) {\n var isAac = isLikelyAacData$1(data);\n\n if (isAac && this.transmuxPipeline_.type !== 'aac') {\n this.setupAacPipeline();\n } else if (!isAac && this.transmuxPipeline_.type !== 'ts') {\n this.setupTsPipeline();\n }\n\n hasFlushed = false;\n }\n\n this.transmuxPipeline_.headOfPipeline.push(data);\n }; // flush any buffered data\n\n\n this.flush = function () {\n hasFlushed = true; // Start at the top of the pipeline and flush all pending work\n\n this.transmuxPipeline_.headOfPipeline.flush();\n };\n\n this.endTimeline = function () {\n this.transmuxPipeline_.headOfPipeline.endTimeline();\n };\n\n this.reset = function () {\n if (this.transmuxPipeline_.headOfPipeline) {\n this.transmuxPipeline_.headOfPipeline.reset();\n }\n }; // Caption data has to be reset when seeking outside buffered range\n\n\n this.resetCaptions = function () {\n if (this.transmuxPipeline_.captionStream) {\n this.transmuxPipeline_.captionStream.reset();\n }\n };\n };\n\n _Transmuxer.prototype = new stream();\n var transmuxer = {\n Transmuxer: _Transmuxer,\n VideoSegmentStream: _VideoSegmentStream,\n AudioSegmentStream: _AudioSegmentStream,\n AUDIO_PROPERTIES: AUDIO_PROPERTIES,\n VIDEO_PROPERTIES: VIDEO_PROPERTIES,\n // exported for testing\n generateVideoSegmentTimingInfo: generateVideoSegmentTimingInfo\n };\n\n var classCallCheck = function classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n };\n\n var createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n /**\n * @file transmuxer-worker.js\n */\n\n /**\n * Re-emits transmuxer events by converting them into messages to the\n * world outside the worker.\n *\n * @param {Object} transmuxer the transmuxer to wire events on\n * @private\n */\n\n\n var wireTransmuxerEvents = function wireTransmuxerEvents(self, transmuxer$$1) {\n transmuxer$$1.on('data', function (segment) {\n // transfer ownership of the underlying ArrayBuffer\n // instead of doing a copy to save memory\n // ArrayBuffers are transferable but generic TypedArrays are not\n // @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Passing_data_by_transferring_ownership_(transferable_objects)\n var initArray = segment.initSegment;\n segment.initSegment = {\n data: initArray.buffer,\n byteOffset: initArray.byteOffset,\n byteLength: initArray.byteLength\n };\n var typedArray = segment.data;\n segment.data = typedArray.buffer;\n self.postMessage({\n action: 'data',\n segment: segment,\n byteOffset: typedArray.byteOffset,\n byteLength: typedArray.byteLength\n }, [segment.data]);\n });\n\n if (transmuxer$$1.captionStream) {\n transmuxer$$1.captionStream.on('data', function (caption) {\n self.postMessage({\n action: 'caption',\n data: caption\n });\n });\n }\n\n transmuxer$$1.on('done', function (data) {\n self.postMessage({\n action: 'done'\n });\n });\n transmuxer$$1.on('gopInfo', function (gopInfo) {\n self.postMessage({\n action: 'gopInfo',\n gopInfo: gopInfo\n });\n });\n transmuxer$$1.on('videoSegmentTimingInfo', function (videoSegmentTimingInfo) {\n self.postMessage({\n action: 'videoSegmentTimingInfo',\n videoSegmentTimingInfo: videoSegmentTimingInfo\n });\n });\n };\n /**\n * All incoming messages route through this hash. If no function exists\n * to handle an incoming message, then we ignore the message.\n *\n * @class MessageHandlers\n * @param {Object} options the options to initialize with\n */\n\n\n var MessageHandlers = function () {\n function MessageHandlers(self, options) {\n classCallCheck(this, MessageHandlers);\n this.options = options || {};\n this.self = self;\n this.init();\n }\n /**\n * initialize our web worker and wire all the events.\n */\n\n\n createClass(MessageHandlers, [{\n key: 'init',\n value: function init() {\n if (this.transmuxer) {\n this.transmuxer.dispose();\n }\n\n this.transmuxer = new transmuxer.Transmuxer(this.options);\n wireTransmuxerEvents(this.self, this.transmuxer);\n }\n /**\n * Adds data (a ts segment) to the start of the transmuxer pipeline for\n * processing.\n *\n * @param {ArrayBuffer} data data to push into the muxer\n */\n\n }, {\n key: 'push',\n value: function push(data) {\n // Cast array buffer to correct type for transmuxer\n var segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n this.transmuxer.push(segment);\n }\n /**\n * Recreate the transmuxer so that the next segment added via `push`\n * start with a fresh transmuxer.\n */\n\n }, {\n key: 'reset',\n value: function reset() {\n this.init();\n }\n /**\n * Set the value that will be used as the `baseMediaDecodeTime` time for the\n * next segment pushed in. Subsequent segments will have their `baseMediaDecodeTime`\n * set relative to the first based on the PTS values.\n *\n * @param {Object} data used to set the timestamp offset in the muxer\n */\n\n }, {\n key: 'setTimestampOffset',\n value: function setTimestampOffset(data) {\n var timestampOffset = data.timestampOffset || 0;\n this.transmuxer.setBaseMediaDecodeTime(Math.round(timestampOffset * 90000));\n }\n }, {\n key: 'setAudioAppendStart',\n value: function setAudioAppendStart(data) {\n this.transmuxer.setAudioAppendStart(Math.ceil(data.appendStart * 90000));\n }\n /**\n * Forces the pipeline to finish processing the last segment and emit it's\n * results.\n *\n * @param {Object} data event data, not really used\n */\n\n }, {\n key: 'flush',\n value: function flush(data) {\n this.transmuxer.flush();\n }\n }, {\n key: 'resetCaptions',\n value: function resetCaptions() {\n this.transmuxer.resetCaptions();\n }\n }, {\n key: 'alignGopsWith',\n value: function alignGopsWith(data) {\n this.transmuxer.alignGopsWith(data.gopsToAlignWith.slice());\n }\n }]);\n return MessageHandlers;\n }();\n /**\n * Our web wroker interface so that things can talk to mux.js\n * that will be running in a web worker. the scope is passed to this by\n * webworkify.\n *\n * @param {Object} self the scope for the web worker\n */\n\n\n var TransmuxerWorker = function TransmuxerWorker(self) {\n self.onmessage = function (event) {\n if (event.data.action === 'init' && event.data.options) {\n this.messageHandlers = new MessageHandlers(self, event.data.options);\n return;\n }\n\n if (!this.messageHandlers) {\n this.messageHandlers = new MessageHandlers(self);\n }\n\n if (event.data && event.data.action && event.data.action !== 'init') {\n if (this.messageHandlers[event.data.action]) {\n this.messageHandlers[event.data.action](event.data);\n }\n }\n };\n };\n\n var transmuxerWorker = new TransmuxerWorker(self);\n return transmuxerWorker;\n }();\n});\n/**\n * @file - codecs.js - Handles tasks regarding codec strings such as translating them to\n * codec strings, or translating codec strings into objects that can be examined.\n */\n// Default codec parameters if none were provided for video and/or audio\n\nvar defaultCodecs = {\n videoCodec: 'avc1',\n videoObjectTypeIndicator: '.4d400d',\n // AAC-LC\n audioProfile: '2'\n};\n/**\n * Replace the old apple-style `avc1.<dd>.<dd>` codec string with the standard\n * `avc1.<hhhhhh>`\n *\n * @param {Array} codecs an array of codec strings to fix\n * @return {Array} the translated codec array\n * @private\n */\n\nvar translateLegacyCodecs = function translateLegacyCodecs(codecs) {\n return codecs.map(function (codec) {\n return codec.replace(/avc1\\.(\\d+)\\.(\\d+)/i, function (orig, profile, avcLevel) {\n var profileHex = ('00' + Number(profile).toString(16)).slice(-2);\n var avcLevelHex = ('00' + Number(avcLevel).toString(16)).slice(-2);\n return 'avc1.' + profileHex + '00' + avcLevelHex;\n });\n });\n};\n/**\n * Parses a codec string to retrieve the number of codecs specified,\n * the video codec and object type indicator, and the audio profile.\n */\n\n\nvar parseCodecs = function parseCodecs() {\n var codecs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var result = {\n codecCount: 0\n };\n var parsed = void 0;\n result.codecCount = codecs.split(',').length;\n result.codecCount = result.codecCount || 2; // parse the video codec\n\n parsed = /(^|\\s|,)+(avc[13])([^ ,]*)/i.exec(codecs);\n\n if (parsed) {\n result.videoCodec = parsed[2];\n result.videoObjectTypeIndicator = parsed[3];\n } // parse the last field of the audio codec\n\n\n result.audioProfile = /(^|\\s|,)+mp4a.[0-9A-Fa-f]+\\.([0-9A-Fa-f]+)/i.exec(codecs);\n result.audioProfile = result.audioProfile && result.audioProfile[2];\n return result;\n};\n/**\n * Replace codecs in the codec string with the old apple-style `avc1.<dd>.<dd>` to the\n * standard `avc1.<hhhhhh>`.\n *\n * @param codecString {String} the codec string\n * @return {String} the codec string with old apple-style codecs replaced\n *\n * @private\n */\n\n\nvar mapLegacyAvcCodecs = function mapLegacyAvcCodecs(codecString) {\n return codecString.replace(/avc1\\.(\\d+)\\.(\\d+)/i, function (match) {\n return translateLegacyCodecs([match])[0];\n });\n};\n/**\n * Build a media mime-type string from a set of parameters\n * @param {String} type either 'audio' or 'video'\n * @param {String} container either 'mp2t' or 'mp4'\n * @param {Array} codecs an array of codec strings to add\n * @return {String} a valid media mime-type\n */\n\n\nvar makeMimeTypeString = function makeMimeTypeString(type, container, codecs) {\n // The codecs array is filtered so that falsey values are\n // dropped and don't cause Array#join to create spurious\n // commas\n return type + '/' + container + '; codecs=\"' + codecs.filter(function (c) {\n return !!c;\n }).join(', ') + '\"';\n};\n/**\n * Returns the type container based on information in the playlist\n * @param {Playlist} media the current media playlist\n * @return {String} a valid media container type\n */\n\n\nvar getContainerType = function getContainerType(media) {\n // An initialization segment means the media playlist is an iframe\n // playlist or is using the mp4 container. We don't currently\n // support iframe playlists, so assume this is signalling mp4\n // fragments.\n if (media.segments && media.segments.length && media.segments[0].map) {\n return 'mp4';\n }\n\n return 'mp2t';\n};\n/**\n * Returns a set of codec strings parsed from the playlist or the default\n * codec strings if no codecs were specified in the playlist\n * @param {Playlist} media the current media playlist\n * @return {Object} an object with the video and audio codecs\n */\n\n\nvar getCodecs = function getCodecs(media) {\n // if the codecs were explicitly specified, use them instead of the\n // defaults\n var mediaAttributes = media.attributes || {};\n\n if (mediaAttributes.CODECS) {\n return parseCodecs(mediaAttributes.CODECS);\n }\n\n return defaultCodecs;\n};\n\nvar audioProfileFromDefault = function audioProfileFromDefault(master, audioGroupId) {\n if (!master.mediaGroups.AUDIO || !audioGroupId) {\n return null;\n }\n\n var audioGroup = master.mediaGroups.AUDIO[audioGroupId];\n\n if (!audioGroup) {\n return null;\n }\n\n for (var name in audioGroup) {\n var audioType = audioGroup[name];\n\n if (audioType[\"default\"] && audioType.playlists) {\n // codec should be the same for all playlists within the audio type\n return parseCodecs(audioType.playlists[0].attributes.CODECS).audioProfile;\n }\n }\n\n return null;\n};\n/**\n * Calculates the MIME type strings for a working configuration of\n * SourceBuffers to play variant streams in a master playlist. If\n * there is no possible working configuration, an empty array will be\n * returned.\n *\n * @param master {Object} the m3u8 object for the master playlist\n * @param media {Object} the m3u8 object for the variant playlist\n * @return {Array} the MIME type strings. If the array has more than\n * one entry, the first element should be applied to the video\n * SourceBuffer and the second to the audio SourceBuffer.\n *\n * @private\n */\n\n\nvar mimeTypesForPlaylist = function mimeTypesForPlaylist(master, media) {\n var containerType = getContainerType(media);\n var codecInfo = getCodecs(media);\n var mediaAttributes = media.attributes || {}; // Default condition for a traditional HLS (no demuxed audio/video)\n\n var isMuxed = true;\n var isMaat = false;\n\n if (!media) {\n // Not enough information\n return [];\n }\n\n if (master.mediaGroups.AUDIO && mediaAttributes.AUDIO) {\n var audioGroup = master.mediaGroups.AUDIO[mediaAttributes.AUDIO]; // Handle the case where we are in a multiple-audio track scenario\n\n if (audioGroup) {\n isMaat = true; // Start with the everything demuxed then...\n\n isMuxed = false; // ...check to see if any audio group tracks are muxed (ie. lacking a uri)\n\n for (var groupId in audioGroup) {\n // either a uri is present (if the case of HLS and an external playlist), or\n // playlists is present (in the case of DASH where we don't have external audio\n // playlists)\n if (!audioGroup[groupId].uri && !audioGroup[groupId].playlists) {\n isMuxed = true;\n break;\n }\n }\n }\n } // HLS with multiple-audio tracks must always get an audio codec.\n // Put another way, there is no way to have a video-only multiple-audio HLS!\n\n\n if (isMaat && !codecInfo.audioProfile) {\n if (!isMuxed) {\n // It is possible for codecs to be specified on the audio media group playlist but\n // not on the rendition playlist. This is mostly the case for DASH, where audio and\n // video are always separate (and separately specified).\n codecInfo.audioProfile = audioProfileFromDefault(master, mediaAttributes.AUDIO);\n }\n\n if (!codecInfo.audioProfile) {\n videojs$1.log.warn('Multiple audio tracks present but no audio codec string is specified. ' + 'Attempting to use the default audio codec (mp4a.40.2)');\n codecInfo.audioProfile = defaultCodecs.audioProfile;\n }\n } // Generate the final codec strings from the codec object generated above\n\n\n var codecStrings = {};\n\n if (codecInfo.videoCodec) {\n codecStrings.video = '' + codecInfo.videoCodec + codecInfo.videoObjectTypeIndicator;\n }\n\n if (codecInfo.audioProfile) {\n codecStrings.audio = 'mp4a.40.' + codecInfo.audioProfile;\n } // Finally, make and return an array with proper mime-types depending on\n // the configuration\n\n\n var justAudio = makeMimeTypeString('audio', containerType, [codecStrings.audio]);\n var justVideo = makeMimeTypeString('video', containerType, [codecStrings.video]);\n var bothVideoAudio = makeMimeTypeString('video', containerType, [codecStrings.video, codecStrings.audio]);\n\n if (isMaat) {\n if (!isMuxed && codecStrings.video) {\n return [justVideo, justAudio];\n }\n\n if (!isMuxed && !codecStrings.video) {\n // There is no muxed content and no video codec string, so this is an audio only\n // stream with alternate audio.\n return [justAudio, justAudio];\n } // There exists the possiblity that this will return a `video/container`\n // mime-type for the first entry in the array even when there is only audio.\n // This doesn't appear to be a problem and simplifies the code.\n\n\n return [bothVideoAudio, justAudio];\n } // If there is no video codec at all, always just return a single\n // audio/<container> mime-type\n\n\n if (!codecStrings.video) {\n return [justAudio];\n } // When not using separate audio media groups, audio and video is\n // *always* muxed\n\n\n return [bothVideoAudio];\n};\n/**\n * Parse a content type header into a type and parameters\n * object\n *\n * @param {String} type the content type header\n * @return {Object} the parsed content-type\n * @private\n */\n\n\nvar parseContentType = function parseContentType(type) {\n var object = {\n type: '',\n parameters: {}\n };\n var parameters = type.trim().split(';'); // first parameter should always be content-type\n\n object.type = parameters.shift().trim();\n parameters.forEach(function (parameter) {\n var pair = parameter.trim().split('=');\n\n if (pair.length > 1) {\n var name = pair[0].replace(/\"/g, '').trim();\n var value = pair[1].replace(/\"/g, '').trim();\n object.parameters[name] = value;\n }\n });\n return object;\n};\n/**\n * Check if a codec string refers to an audio codec.\n *\n * @param {String} codec codec string to check\n * @return {Boolean} if this is an audio codec\n * @private\n */\n\n\nvar isAudioCodec = function isAudioCodec(codec) {\n return /mp4a\\.\\d+.\\d+/i.test(codec);\n};\n/**\n * Check if a codec string refers to a video codec.\n *\n * @param {String} codec codec string to check\n * @return {Boolean} if this is a video codec\n * @private\n */\n\n\nvar isVideoCodec = function isVideoCodec(codec) {\n return /avc1\\.[\\da-f]+/i.test(codec);\n};\n/**\n * Returns a list of gops in the buffer that have a pts value of 3 seconds or more in\n * front of current time.\n *\n * @param {Array} buffer\n * The current buffer of gop information\n * @param {Number} currentTime\n * The current time\n * @param {Double} mapping\n * Offset to map display time to stream presentation time\n * @return {Array}\n * List of gops considered safe to append over\n */\n\n\nvar gopsSafeToAlignWith = function gopsSafeToAlignWith(buffer, currentTime, mapping) {\n if (typeof currentTime === 'undefined' || currentTime === null || !buffer.length) {\n return [];\n } // pts value for current time + 3 seconds to give a bit more wiggle room\n\n\n var currentTimePts = Math.ceil((currentTime - mapping + 3) * 90000);\n var i = void 0;\n\n for (i = 0; i < buffer.length; i++) {\n if (buffer[i].pts > currentTimePts) {\n break;\n }\n }\n\n return buffer.slice(i);\n};\n/**\n * Appends gop information (timing and byteLength) received by the transmuxer for the\n * gops appended in the last call to appendBuffer\n *\n * @param {Array} buffer\n * The current buffer of gop information\n * @param {Array} gops\n * List of new gop information\n * @param {boolean} replace\n * If true, replace the buffer with the new gop information. If false, append the\n * new gop information to the buffer in the right location of time.\n * @return {Array}\n * Updated list of gop information\n */\n\n\nvar updateGopBuffer = function updateGopBuffer(buffer, gops, replace) {\n if (!gops.length) {\n return buffer;\n }\n\n if (replace) {\n // If we are in safe append mode, then completely overwrite the gop buffer\n // with the most recent appeneded data. This will make sure that when appending\n // future segments, we only try to align with gops that are both ahead of current\n // time and in the last segment appended.\n return gops.slice();\n }\n\n var start = gops[0].pts;\n var i = 0;\n\n for (i; i < buffer.length; i++) {\n if (buffer[i].pts >= start) {\n break;\n }\n }\n\n return buffer.slice(0, i).concat(gops);\n};\n/**\n * Removes gop information in buffer that overlaps with provided start and end\n *\n * @param {Array} buffer\n * The current buffer of gop information\n * @param {Double} start\n * position to start the remove at\n * @param {Double} end\n * position to end the remove at\n * @param {Double} mapping\n * Offset to map display time to stream presentation time\n */\n\n\nvar removeGopBuffer = function removeGopBuffer(buffer, start, end, mapping) {\n var startPts = Math.ceil((start - mapping) * 90000);\n var endPts = Math.ceil((end - mapping) * 90000);\n var updatedBuffer = buffer.slice();\n var i = buffer.length;\n\n while (i--) {\n if (buffer[i].pts <= endPts) {\n break;\n }\n }\n\n if (i === -1) {\n // no removal because end of remove range is before start of buffer\n return updatedBuffer;\n }\n\n var j = i + 1;\n\n while (j--) {\n if (buffer[j].pts <= startPts) {\n break;\n }\n } // clamp remove range start to 0 index\n\n\n j = Math.max(j, 0);\n updatedBuffer.splice(j, i - j + 1);\n return updatedBuffer;\n};\n\nvar buffered = function buffered(videoBuffer, audioBuffer, audioDisabled) {\n var start = null;\n var end = null;\n var arity = 0;\n var extents = [];\n var ranges = []; // neither buffer has been created yet\n\n if (!videoBuffer && !audioBuffer) {\n return videojs$1.createTimeRange();\n } // only one buffer is configured\n\n\n if (!videoBuffer) {\n return audioBuffer.buffered;\n }\n\n if (!audioBuffer) {\n return videoBuffer.buffered;\n } // both buffers are configured\n\n\n if (audioDisabled) {\n return videoBuffer.buffered;\n } // both buffers are empty\n\n\n if (videoBuffer.buffered.length === 0 && audioBuffer.buffered.length === 0) {\n return videojs$1.createTimeRange();\n } // Handle the case where we have both buffers and create an\n // intersection of the two\n\n\n var videoBuffered = videoBuffer.buffered;\n var audioBuffered = audioBuffer.buffered;\n var count = videoBuffered.length; // A) Gather up all start and end times\n\n while (count--) {\n extents.push({\n time: videoBuffered.start(count),\n type: 'start'\n });\n extents.push({\n time: videoBuffered.end(count),\n type: 'end'\n });\n }\n\n count = audioBuffered.length;\n\n while (count--) {\n extents.push({\n time: audioBuffered.start(count),\n type: 'start'\n });\n extents.push({\n time: audioBuffered.end(count),\n type: 'end'\n });\n } // B) Sort them by time\n\n\n extents.sort(function (a, b) {\n return a.time - b.time;\n }); // C) Go along one by one incrementing arity for start and decrementing\n // arity for ends\n\n for (count = 0; count < extents.length; count++) {\n if (extents[count].type === 'start') {\n arity++; // D) If arity is ever incremented to 2 we are entering an\n // overlapping range\n\n if (arity === 2) {\n start = extents[count].time;\n }\n } else if (extents[count].type === 'end') {\n arity--; // E) If arity is ever decremented to 1 we leaving an\n // overlapping range\n\n if (arity === 1) {\n end = extents[count].time;\n }\n } // F) Record overlapping ranges\n\n\n if (start !== null && end !== null) {\n ranges.push([start, end]);\n start = null;\n end = null;\n }\n }\n\n return videojs$1.createTimeRanges(ranges);\n};\n/**\n * @file virtual-source-buffer.js\n */\n\n\nvar ONE_SECOND_IN_TS = 90000; // We create a wrapper around the SourceBuffer so that we can manage the\n// state of the `updating` property manually. We have to do this because\n// Firefox changes `updating` to false long before triggering `updateend`\n// events and that was causing strange problems in videojs-contrib-hls\n\nvar makeWrappedSourceBuffer = function makeWrappedSourceBuffer(mediaSource, mimeType) {\n var sourceBuffer = mediaSource.addSourceBuffer(mimeType);\n var wrapper = Object.create(null);\n wrapper.updating = false;\n wrapper.realBuffer_ = sourceBuffer;\n\n var _loop = function _loop(key) {\n if (typeof sourceBuffer[key] === 'function') {\n wrapper[key] = function () {\n return sourceBuffer[key].apply(sourceBuffer, arguments);\n };\n } else if (typeof wrapper[key] === 'undefined') {\n Object.defineProperty(wrapper, key, {\n get: function get$$1() {\n return sourceBuffer[key];\n },\n set: function set$$1(v) {\n return sourceBuffer[key] = v;\n }\n });\n }\n };\n\n for (var key in sourceBuffer) {\n _loop(key);\n }\n\n return wrapper;\n};\n/**\n * VirtualSourceBuffers exist so that we can transmux non native formats\n * into a native format, but keep the same api as a native source buffer.\n * It creates a transmuxer, that works in its own thread (a web worker) and\n * that transmuxer muxes the data into a native format. VirtualSourceBuffer will\n * then send all of that data to the naive sourcebuffer so that it is\n * indestinguishable from a natively supported format.\n *\n * @param {HtmlMediaSource} mediaSource the parent mediaSource\n * @param {Array} codecs array of codecs that we will be dealing with\n * @class VirtualSourceBuffer\n * @extends video.js.EventTarget\n */\n\n\nvar VirtualSourceBuffer = function (_videojs$EventTarget) {\n inherits(VirtualSourceBuffer, _videojs$EventTarget);\n\n function VirtualSourceBuffer(mediaSource, codecs) {\n classCallCheck(this, VirtualSourceBuffer);\n\n var _this = possibleConstructorReturn(this, (VirtualSourceBuffer.__proto__ || Object.getPrototypeOf(VirtualSourceBuffer)).call(this, videojs$1.EventTarget));\n\n _this.timestampOffset_ = 0;\n _this.pendingBuffers_ = [];\n _this.bufferUpdating_ = false;\n _this.mediaSource_ = mediaSource;\n _this.codecs_ = codecs;\n _this.audioCodec_ = null;\n _this.videoCodec_ = null;\n _this.audioDisabled_ = false;\n _this.appendAudioInitSegment_ = true;\n _this.gopBuffer_ = [];\n _this.timeMapping_ = 0;\n _this.safeAppend_ = videojs$1.browser.IE_VERSION >= 11;\n var options = {\n remux: false,\n alignGopsAtEnd: _this.safeAppend_\n };\n\n _this.codecs_.forEach(function (codec) {\n if (isAudioCodec(codec)) {\n _this.audioCodec_ = codec;\n } else if (isVideoCodec(codec)) {\n _this.videoCodec_ = codec;\n }\n }); // append muxed segments to their respective native buffers as\n // soon as they are available\n\n\n _this.transmuxer_ = new TransmuxWorker();\n\n _this.transmuxer_.postMessage({\n action: 'init',\n options: options\n });\n\n _this.transmuxer_.onmessage = function (event) {\n if (event.data.action === 'data') {\n return _this.data_(event);\n }\n\n if (event.data.action === 'done') {\n return _this.done_(event);\n }\n\n if (event.data.action === 'gopInfo') {\n return _this.appendGopInfo_(event);\n }\n\n if (event.data.action === 'videoSegmentTimingInfo') {\n return _this.videoSegmentTimingInfo_(event.data.videoSegmentTimingInfo);\n }\n }; // this timestampOffset is a property with the side-effect of resetting\n // baseMediaDecodeTime in the transmuxer on the setter\n\n\n Object.defineProperty(_this, 'timestampOffset', {\n get: function get$$1() {\n return this.timestampOffset_;\n },\n set: function set$$1(val) {\n if (typeof val === 'number' && val >= 0) {\n this.timestampOffset_ = val;\n this.appendAudioInitSegment_ = true; // reset gop buffer on timestampoffset as this signals a change in timeline\n\n this.gopBuffer_.length = 0;\n this.timeMapping_ = 0; // We have to tell the transmuxer to set the baseMediaDecodeTime to\n // the desired timestampOffset for the next segment\n\n this.transmuxer_.postMessage({\n action: 'setTimestampOffset',\n timestampOffset: val\n });\n }\n }\n }); // setting the append window affects both source buffers\n\n Object.defineProperty(_this, 'appendWindowStart', {\n get: function get$$1() {\n return (this.videoBuffer_ || this.audioBuffer_).appendWindowStart;\n },\n set: function set$$1(start) {\n if (this.videoBuffer_) {\n this.videoBuffer_.appendWindowStart = start;\n }\n\n if (this.audioBuffer_) {\n this.audioBuffer_.appendWindowStart = start;\n }\n }\n }); // this buffer is \"updating\" if either of its native buffers are\n\n Object.defineProperty(_this, 'updating', {\n get: function get$$1() {\n return !!(this.bufferUpdating_ || !this.audioDisabled_ && this.audioBuffer_ && this.audioBuffer_.updating || this.videoBuffer_ && this.videoBuffer_.updating);\n }\n }); // the buffered property is the intersection of the buffered\n // ranges of the native source buffers\n\n Object.defineProperty(_this, 'buffered', {\n get: function get$$1() {\n return buffered(this.videoBuffer_, this.audioBuffer_, this.audioDisabled_);\n }\n });\n return _this;\n }\n /**\n * When we get a data event from the transmuxer\n * we call this function and handle the data that\n * was sent to us\n *\n * @private\n * @param {Event} event the data event from the transmuxer\n */\n\n\n createClass(VirtualSourceBuffer, [{\n key: 'data_',\n value: function data_(event) {\n var segment = event.data.segment; // Cast ArrayBuffer to TypedArray\n\n segment.data = new Uint8Array(segment.data, event.data.byteOffset, event.data.byteLength);\n segment.initSegment = new Uint8Array(segment.initSegment.data, segment.initSegment.byteOffset, segment.initSegment.byteLength);\n createTextTracksIfNecessary(this, this.mediaSource_, segment); // Add the segments to the pendingBuffers array\n\n this.pendingBuffers_.push(segment);\n return;\n }\n /**\n * When we get a done event from the transmuxer\n * we call this function and we process all\n * of the pending data that we have been saving in the\n * data_ function\n *\n * @private\n * @param {Event} event the done event from the transmuxer\n */\n\n }, {\n key: 'done_',\n value: function done_(event) {\n // Don't process and append data if the mediaSource is closed\n if (this.mediaSource_.readyState === 'closed') {\n this.pendingBuffers_.length = 0;\n return;\n } // All buffers should have been flushed from the muxer\n // start processing anything we have received\n\n\n this.processPendingSegments_();\n return;\n }\n }, {\n key: 'videoSegmentTimingInfo_',\n value: function videoSegmentTimingInfo_(timingInfo) {\n var timingInfoInSeconds = {\n start: {\n decode: timingInfo.start.dts / ONE_SECOND_IN_TS,\n presentation: timingInfo.start.pts / ONE_SECOND_IN_TS\n },\n end: {\n decode: timingInfo.end.dts / ONE_SECOND_IN_TS,\n presentation: timingInfo.end.pts / ONE_SECOND_IN_TS\n },\n baseMediaDecodeTime: timingInfo.baseMediaDecodeTime / ONE_SECOND_IN_TS\n };\n\n if (timingInfo.prependedContentDuration) {\n timingInfoInSeconds.prependedContentDuration = timingInfo.prependedContentDuration / ONE_SECOND_IN_TS;\n }\n\n this.trigger({\n type: 'videoSegmentTimingInfo',\n videoSegmentTimingInfo: timingInfoInSeconds\n });\n }\n /**\n * Create our internal native audio/video source buffers and add\n * event handlers to them with the following conditions:\n * 1. they do not already exist on the mediaSource\n * 2. this VSB has a codec for them\n *\n * @private\n */\n\n }, {\n key: 'createRealSourceBuffers_',\n value: function createRealSourceBuffers_() {\n var _this2 = this;\n\n var types = ['audio', 'video'];\n types.forEach(function (type) {\n // Don't create a SourceBuffer of this type if we don't have a\n // codec for it\n if (!_this2[type + 'Codec_']) {\n return;\n } // Do nothing if a SourceBuffer of this type already exists\n\n\n if (_this2[type + 'Buffer_']) {\n return;\n }\n\n var buffer = null; // If the mediasource already has a SourceBuffer for the codec\n // use that\n\n if (_this2.mediaSource_[type + 'Buffer_']) {\n buffer = _this2.mediaSource_[type + 'Buffer_']; // In multiple audio track cases, the audio source buffer is disabled\n // on the main VirtualSourceBuffer by the HTMLMediaSource much earlier\n // than createRealSourceBuffers_ is called to create the second\n // VirtualSourceBuffer because that happens as a side-effect of\n // videojs-contrib-hls starting the audioSegmentLoader. As a result,\n // the audioBuffer is essentially \"ownerless\" and no one will toggle\n // the `updating` state back to false once the `updateend` event is received\n //\n // Setting `updating` to false manually will work around this\n // situation and allow work to continue\n\n buffer.updating = false;\n } else {\n var codecProperty = type + 'Codec_';\n var mimeType = type + '/mp4;codecs=\"' + _this2[codecProperty] + '\"';\n buffer = makeWrappedSourceBuffer(_this2.mediaSource_.nativeMediaSource_, mimeType);\n _this2.mediaSource_[type + 'Buffer_'] = buffer;\n }\n\n _this2[type + 'Buffer_'] = buffer; // Wire up the events to the SourceBuffer\n\n ['update', 'updatestart', 'updateend'].forEach(function (event) {\n buffer.addEventListener(event, function () {\n // if audio is disabled\n if (type === 'audio' && _this2.audioDisabled_) {\n return;\n }\n\n if (event === 'updateend') {\n _this2[type + 'Buffer_'].updating = false;\n }\n\n var shouldTrigger = types.every(function (t) {\n // skip checking audio's updating status if audio\n // is not enabled\n if (t === 'audio' && _this2.audioDisabled_) {\n return true;\n } // if the other type is updating we don't trigger\n\n\n if (type !== t && _this2[t + 'Buffer_'] && _this2[t + 'Buffer_'].updating) {\n return false;\n }\n\n return true;\n });\n\n if (shouldTrigger) {\n return _this2.trigger(event);\n }\n });\n });\n });\n }\n /**\n * Emulate the native mediasource function, but our function will\n * send all of the proposed segments to the transmuxer so that we\n * can transmux them before we append them to our internal\n * native source buffers in the correct format.\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/appendBuffer\n * @param {Uint8Array} segment the segment to append to the buffer\n */\n\n }, {\n key: 'appendBuffer',\n value: function appendBuffer(segment) {\n // Start the internal \"updating\" state\n this.bufferUpdating_ = true;\n\n if (this.audioBuffer_ && this.audioBuffer_.buffered.length) {\n var audioBuffered = this.audioBuffer_.buffered;\n this.transmuxer_.postMessage({\n action: 'setAudioAppendStart',\n appendStart: audioBuffered.end(audioBuffered.length - 1)\n });\n }\n\n if (this.videoBuffer_) {\n this.transmuxer_.postMessage({\n action: 'alignGopsWith',\n gopsToAlignWith: gopsSafeToAlignWith(this.gopBuffer_, this.mediaSource_.player_ ? this.mediaSource_.player_.currentTime() : null, this.timeMapping_)\n });\n }\n\n this.transmuxer_.postMessage({\n action: 'push',\n // Send the typed-array of data as an ArrayBuffer so that\n // it can be sent as a \"Transferable\" and avoid the costly\n // memory copy\n data: segment.buffer,\n // To recreate the original typed-array, we need information\n // about what portion of the ArrayBuffer it was a view into\n byteOffset: segment.byteOffset,\n byteLength: segment.byteLength\n }, [segment.buffer]);\n this.transmuxer_.postMessage({\n action: 'flush'\n });\n }\n /**\n * Appends gop information (timing and byteLength) received by the transmuxer for the\n * gops appended in the last call to appendBuffer\n *\n * @param {Event} event\n * The gopInfo event from the transmuxer\n * @param {Array} event.data.gopInfo\n * List of gop info to append\n */\n\n }, {\n key: 'appendGopInfo_',\n value: function appendGopInfo_(event) {\n this.gopBuffer_ = updateGopBuffer(this.gopBuffer_, event.data.gopInfo, this.safeAppend_);\n }\n /**\n * Emulate the native mediasource function and remove parts\n * of the buffer from any of our internal buffers that exist\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/remove\n * @param {Double} start position to start the remove at\n * @param {Double} end position to end the remove at\n */\n\n }, {\n key: 'remove',\n value: function remove(start, end) {\n if (this.videoBuffer_) {\n this.videoBuffer_.updating = true;\n this.videoBuffer_.remove(start, end);\n this.gopBuffer_ = removeGopBuffer(this.gopBuffer_, start, end, this.timeMapping_);\n }\n\n if (!this.audioDisabled_ && this.audioBuffer_) {\n this.audioBuffer_.updating = true;\n this.audioBuffer_.remove(start, end);\n } // Remove Metadata Cues (id3)\n\n\n removeCuesFromTrack(start, end, this.metadataTrack_); // Remove Any Captions\n\n if (this.inbandTextTracks_) {\n for (var track in this.inbandTextTracks_) {\n removeCuesFromTrack(start, end, this.inbandTextTracks_[track]);\n }\n }\n }\n /**\n * Process any segments that the muxer has output\n * Concatenate segments together based on type and append them into\n * their respective sourceBuffers\n *\n * @private\n */\n\n }, {\n key: 'processPendingSegments_',\n value: function processPendingSegments_() {\n var sortedSegments = {\n video: {\n segments: [],\n bytes: 0\n },\n audio: {\n segments: [],\n bytes: 0\n },\n captions: [],\n metadata: []\n };\n\n if (!this.pendingBuffers_.length) {\n // We are no longer in the internal \"updating\" state\n this.trigger('updateend');\n this.bufferUpdating_ = false;\n return;\n } // Sort segments into separate video/audio arrays and\n // keep track of their total byte lengths\n\n\n sortedSegments = this.pendingBuffers_.reduce(function (segmentObj, segment) {\n var type = segment.type;\n var data = segment.data;\n var initSegment = segment.initSegment;\n segmentObj[type].segments.push(data);\n segmentObj[type].bytes += data.byteLength;\n segmentObj[type].initSegment = initSegment; // Gather any captions into a single array\n\n if (segment.captions) {\n segmentObj.captions = segmentObj.captions.concat(segment.captions);\n }\n\n if (segment.info) {\n segmentObj[type].info = segment.info;\n } // Gather any metadata into a single array\n\n\n if (segment.metadata) {\n segmentObj.metadata = segmentObj.metadata.concat(segment.metadata);\n }\n\n return segmentObj;\n }, sortedSegments); // Create the real source buffers if they don't exist by now since we\n // finally are sure what tracks are contained in the source\n\n if (!this.videoBuffer_ && !this.audioBuffer_) {\n // Remove any codecs that may have been specified by default but\n // are no longer applicable now\n if (sortedSegments.video.bytes === 0) {\n this.videoCodec_ = null;\n }\n\n if (sortedSegments.audio.bytes === 0) {\n this.audioCodec_ = null;\n }\n\n this.createRealSourceBuffers_();\n }\n\n if (sortedSegments.audio.info) {\n this.mediaSource_.trigger({\n type: 'audioinfo',\n info: sortedSegments.audio.info\n });\n }\n\n if (sortedSegments.video.info) {\n this.mediaSource_.trigger({\n type: 'videoinfo',\n info: sortedSegments.video.info\n });\n }\n\n if (this.appendAudioInitSegment_) {\n if (!this.audioDisabled_ && this.audioBuffer_) {\n sortedSegments.audio.segments.unshift(sortedSegments.audio.initSegment);\n sortedSegments.audio.bytes += sortedSegments.audio.initSegment.byteLength;\n }\n\n this.appendAudioInitSegment_ = false;\n }\n\n var triggerUpdateend = false; // Merge multiple video and audio segments into one and append\n\n if (this.videoBuffer_ && sortedSegments.video.bytes) {\n sortedSegments.video.segments.unshift(sortedSegments.video.initSegment);\n sortedSegments.video.bytes += sortedSegments.video.initSegment.byteLength;\n this.concatAndAppendSegments_(sortedSegments.video, this.videoBuffer_);\n } else if (this.videoBuffer_ && (this.audioDisabled_ || !this.audioBuffer_)) {\n // The transmuxer did not return any bytes of video, meaning it was all trimmed\n // for gop alignment. Since we have a video buffer and audio is disabled, updateend\n // will never be triggered by this source buffer, which will cause contrib-hls\n // to be stuck forever waiting for updateend. If audio is not disabled, updateend\n // will be triggered by the audio buffer, which will be sent upwards since the video\n // buffer will not be in an updating state.\n triggerUpdateend = true;\n } // Add text-track data for all\n\n\n addTextTrackData(this, sortedSegments.captions, sortedSegments.metadata);\n\n if (!this.audioDisabled_ && this.audioBuffer_) {\n this.concatAndAppendSegments_(sortedSegments.audio, this.audioBuffer_);\n }\n\n this.pendingBuffers_.length = 0;\n\n if (triggerUpdateend) {\n this.trigger('updateend');\n } // We are no longer in the internal \"updating\" state\n\n\n this.bufferUpdating_ = false;\n }\n /**\n * Combine all segments into a single Uint8Array and then append them\n * to the destination buffer\n *\n * @param {Object} segmentObj\n * @param {SourceBuffer} destinationBuffer native source buffer to append data to\n * @private\n */\n\n }, {\n key: 'concatAndAppendSegments_',\n value: function concatAndAppendSegments_(segmentObj, destinationBuffer) {\n var offset = 0;\n var tempBuffer = void 0;\n\n if (segmentObj.bytes) {\n tempBuffer = new Uint8Array(segmentObj.bytes); // Combine the individual segments into one large typed-array\n\n segmentObj.segments.forEach(function (segment) {\n tempBuffer.set(segment, offset);\n offset += segment.byteLength;\n });\n\n try {\n destinationBuffer.updating = true;\n destinationBuffer.appendBuffer(tempBuffer);\n } catch (error) {\n if (this.mediaSource_.player_) {\n this.mediaSource_.player_.error({\n code: -3,\n type: 'APPEND_BUFFER_ERR',\n message: error.message,\n originalError: error\n });\n }\n }\n }\n }\n /**\n * Emulate the native mediasource function. abort any soureBuffer\n * actions and throw out any un-appended data.\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/abort\n */\n\n }, {\n key: 'abort',\n value: function abort() {\n if (this.videoBuffer_) {\n this.videoBuffer_.abort();\n }\n\n if (!this.audioDisabled_ && this.audioBuffer_) {\n this.audioBuffer_.abort();\n }\n\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'reset'\n });\n }\n\n this.pendingBuffers_.length = 0;\n this.bufferUpdating_ = false;\n }\n }]);\n return VirtualSourceBuffer;\n}(videojs$1.EventTarget);\n/**\n * @file html-media-source.js\n */\n\n/**\n * Our MediaSource implementation in HTML, mimics native\n * MediaSource where/if possible.\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/MediaSource\n * @class HtmlMediaSource\n * @extends videojs.EventTarget\n */\n\n\nvar HtmlMediaSource = function (_videojs$EventTarget) {\n inherits(HtmlMediaSource, _videojs$EventTarget);\n\n function HtmlMediaSource() {\n classCallCheck(this, HtmlMediaSource);\n\n var _this = possibleConstructorReturn(this, (HtmlMediaSource.__proto__ || Object.getPrototypeOf(HtmlMediaSource)).call(this));\n\n var property = void 0;\n _this.nativeMediaSource_ = new window$1.MediaSource(); // delegate to the native MediaSource's methods by default\n\n for (property in _this.nativeMediaSource_) {\n if (!(property in HtmlMediaSource.prototype) && typeof _this.nativeMediaSource_[property] === 'function') {\n _this[property] = _this.nativeMediaSource_[property].bind(_this.nativeMediaSource_);\n }\n } // emulate `duration` and `seekable` until seeking can be\n // handled uniformly for live streams\n // see https://github.com/w3c/media-source/issues/5\n\n\n _this.duration_ = NaN;\n Object.defineProperty(_this, 'duration', {\n get: function get$$1() {\n if (this.duration_ === Infinity) {\n return this.duration_;\n }\n\n return this.nativeMediaSource_.duration;\n },\n set: function set$$1(duration) {\n this.duration_ = duration;\n\n if (duration !== Infinity) {\n this.nativeMediaSource_.duration = duration;\n return;\n }\n }\n });\n Object.defineProperty(_this, 'seekable', {\n get: function get$$1() {\n if (this.duration_ === Infinity) {\n return videojs$1.createTimeRanges([[0, this.nativeMediaSource_.duration]]);\n }\n\n return this.nativeMediaSource_.seekable;\n }\n });\n Object.defineProperty(_this, 'readyState', {\n get: function get$$1() {\n return this.nativeMediaSource_.readyState;\n }\n });\n Object.defineProperty(_this, 'activeSourceBuffers', {\n get: function get$$1() {\n return this.activeSourceBuffers_;\n }\n }); // the list of virtual and native SourceBuffers created by this\n // MediaSource\n\n _this.sourceBuffers = [];\n _this.activeSourceBuffers_ = [];\n /**\n * update the list of active source buffers based upon various\n * imformation from HLS and video.js\n *\n * @private\n */\n\n _this.updateActiveSourceBuffers_ = function () {\n // Retain the reference but empty the array\n _this.activeSourceBuffers_.length = 0; // If there is only one source buffer, then it will always be active and audio will\n // be disabled based on the codec of the source buffer\n\n if (_this.sourceBuffers.length === 1) {\n var sourceBuffer = _this.sourceBuffers[0];\n sourceBuffer.appendAudioInitSegment_ = true;\n sourceBuffer.audioDisabled_ = !sourceBuffer.audioCodec_;\n\n _this.activeSourceBuffers_.push(sourceBuffer);\n\n return;\n } // There are 2 source buffers, a combined (possibly video only) source buffer and\n // and an audio only source buffer.\n // By default, the audio in the combined virtual source buffer is enabled\n // and the audio-only source buffer (if it exists) is disabled.\n\n\n var disableCombined = false;\n var disableAudioOnly = true; // TODO: maybe we can store the sourcebuffers on the track objects?\n // safari may do something like this\n\n for (var i = 0; i < _this.player_.audioTracks().length; i++) {\n var track = _this.player_.audioTracks()[i];\n\n if (track.enabled && track.kind !== 'main') {\n // The enabled track is an alternate audio track so disable the audio in\n // the combined source buffer and enable the audio-only source buffer.\n disableCombined = true;\n disableAudioOnly = false;\n break;\n }\n }\n\n _this.sourceBuffers.forEach(function (sourceBuffer, index) {\n /* eslinst-disable */\n // TODO once codecs are required, we can switch to using the codecs to determine\n // what stream is the video stream, rather than relying on videoTracks\n\n /* eslinst-enable */\n sourceBuffer.appendAudioInitSegment_ = true;\n\n if (sourceBuffer.videoCodec_ && sourceBuffer.audioCodec_) {\n // combined\n sourceBuffer.audioDisabled_ = disableCombined;\n } else if (sourceBuffer.videoCodec_ && !sourceBuffer.audioCodec_) {\n // If the \"combined\" source buffer is video only, then we do not want\n // disable the audio-only source buffer (this is mostly for demuxed\n // audio and video hls)\n sourceBuffer.audioDisabled_ = true;\n disableAudioOnly = false;\n } else if (!sourceBuffer.videoCodec_ && sourceBuffer.audioCodec_) {\n // audio only\n // In the case of audio only with alternate audio and disableAudioOnly is true\n // this means we want to disable the audio on the alternate audio sourcebuffer\n // but not the main \"combined\" source buffer. The \"combined\" source buffer is\n // always at index 0, so this ensures audio won't be disabled in both source\n // buffers.\n sourceBuffer.audioDisabled_ = index ? disableAudioOnly : !disableAudioOnly;\n\n if (sourceBuffer.audioDisabled_) {\n return;\n }\n }\n\n _this.activeSourceBuffers_.push(sourceBuffer);\n });\n };\n\n _this.onPlayerMediachange_ = function () {\n _this.sourceBuffers.forEach(function (sourceBuffer) {\n sourceBuffer.appendAudioInitSegment_ = true;\n });\n };\n\n _this.onHlsReset_ = function () {\n _this.sourceBuffers.forEach(function (sourceBuffer) {\n if (sourceBuffer.transmuxer_) {\n sourceBuffer.transmuxer_.postMessage({\n action: 'resetCaptions'\n });\n }\n });\n };\n\n _this.onHlsSegmentTimeMapping_ = function (event) {\n _this.sourceBuffers.forEach(function (buffer) {\n return buffer.timeMapping_ = event.mapping;\n });\n }; // Re-emit MediaSource events on the polyfill\n\n\n ['sourceopen', 'sourceclose', 'sourceended'].forEach(function (eventName) {\n this.nativeMediaSource_.addEventListener(eventName, this.trigger.bind(this));\n }, _this); // capture the associated player when the MediaSource is\n // successfully attached\n\n _this.on('sourceopen', function (event) {\n // Get the player this MediaSource is attached to\n var video = document.querySelector('[src=\"' + _this.url_ + '\"]');\n\n if (!video) {\n return;\n }\n\n _this.player_ = videojs$1(video.parentNode);\n\n if (!_this.player_) {\n return;\n } // hls-reset is fired by videojs.Hls on to the tech after the main SegmentLoader\n // resets its state and flushes the buffer\n\n\n _this.player_.tech_.on('hls-reset', _this.onHlsReset_); // hls-segment-time-mapping is fired by videojs.Hls on to the tech after the main\n // SegmentLoader inspects an MTS segment and has an accurate stream to display\n // time mapping\n\n\n _this.player_.tech_.on('hls-segment-time-mapping', _this.onHlsSegmentTimeMapping_);\n\n if (_this.player_.audioTracks && _this.player_.audioTracks()) {\n _this.player_.audioTracks().on('change', _this.updateActiveSourceBuffers_);\n\n _this.player_.audioTracks().on('addtrack', _this.updateActiveSourceBuffers_);\n\n _this.player_.audioTracks().on('removetrack', _this.updateActiveSourceBuffers_);\n }\n\n _this.player_.on('mediachange', _this.onPlayerMediachange_);\n });\n\n _this.on('sourceended', function (event) {\n var duration = durationOfVideo(_this.duration);\n\n for (var i = 0; i < _this.sourceBuffers.length; i++) {\n var sourcebuffer = _this.sourceBuffers[i];\n var cues = sourcebuffer.metadataTrack_ && sourcebuffer.metadataTrack_.cues;\n\n if (cues && cues.length) {\n cues[cues.length - 1].endTime = duration;\n }\n }\n }); // explicitly terminate any WebWorkers that were created\n // by SourceHandlers\n\n\n _this.on('sourceclose', function (event) {\n this.sourceBuffers.forEach(function (sourceBuffer) {\n if (sourceBuffer.transmuxer_) {\n sourceBuffer.transmuxer_.terminate();\n }\n });\n this.sourceBuffers.length = 0;\n\n if (!this.player_) {\n return;\n }\n\n if (this.player_.audioTracks && this.player_.audioTracks()) {\n this.player_.audioTracks().off('change', this.updateActiveSourceBuffers_);\n this.player_.audioTracks().off('addtrack', this.updateActiveSourceBuffers_);\n this.player_.audioTracks().off('removetrack', this.updateActiveSourceBuffers_);\n } // We can only change this if the player hasn't been disposed of yet\n // because `off` eventually tries to use the el_ property. If it has\n // been disposed of, then don't worry about it because there are no\n // event handlers left to unbind anyway\n\n\n if (this.player_.el_) {\n this.player_.off('mediachange', this.onPlayerMediachange_);\n }\n\n if (this.player_.tech_ && this.player_.tech_.el_) {\n this.player_.tech_.off('hls-reset', this.onHlsReset_);\n this.player_.tech_.off('hls-segment-time-mapping', this.onHlsSegmentTimeMapping_);\n }\n });\n\n return _this;\n }\n /**\n * Add a range that that can now be seeked to.\n *\n * @param {Double} start where to start the addition\n * @param {Double} end where to end the addition\n * @private\n */\n\n\n createClass(HtmlMediaSource, [{\n key: 'addSeekableRange_',\n value: function addSeekableRange_(start, end) {\n var error = void 0;\n\n if (this.duration !== Infinity) {\n error = new Error('MediaSource.addSeekableRange() can only be invoked ' + 'when the duration is Infinity');\n error.name = 'InvalidStateError';\n error.code = 11;\n throw error;\n }\n\n if (end > this.nativeMediaSource_.duration || isNaN(this.nativeMediaSource_.duration)) {\n this.nativeMediaSource_.duration = end;\n }\n }\n /**\n * Add a source buffer to the media source.\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/addSourceBuffer\n * @param {String} type the content-type of the content\n * @return {Object} the created source buffer\n */\n\n }, {\n key: 'addSourceBuffer',\n value: function addSourceBuffer(type) {\n var buffer = void 0;\n var parsedType = parseContentType(type); // Create a VirtualSourceBuffer to transmux MPEG-2 transport\n // stream segments into fragmented MP4s\n\n if (/^(video|audio)\\/mp2t$/i.test(parsedType.type)) {\n var codecs = [];\n\n if (parsedType.parameters && parsedType.parameters.codecs) {\n codecs = parsedType.parameters.codecs.split(',');\n codecs = translateLegacyCodecs(codecs);\n codecs = codecs.filter(function (codec) {\n return isAudioCodec(codec) || isVideoCodec(codec);\n });\n }\n\n if (codecs.length === 0) {\n codecs = ['avc1.4d400d', 'mp4a.40.2'];\n }\n\n buffer = new VirtualSourceBuffer(this, codecs);\n\n if (this.sourceBuffers.length !== 0) {\n // If another VirtualSourceBuffer already exists, then we are creating a\n // SourceBuffer for an alternate audio track and therefore we know that\n // the source has both an audio and video track.\n // That means we should trigger the manual creation of the real\n // SourceBuffers instead of waiting for the transmuxer to return data\n this.sourceBuffers[0].createRealSourceBuffers_();\n buffer.createRealSourceBuffers_(); // Automatically disable the audio on the first source buffer if\n // a second source buffer is ever created\n\n this.sourceBuffers[0].audioDisabled_ = true;\n }\n } else {\n // delegate to the native implementation\n buffer = this.nativeMediaSource_.addSourceBuffer(type);\n }\n\n this.sourceBuffers.push(buffer);\n return buffer;\n }\n }]);\n return HtmlMediaSource;\n}(videojs$1.EventTarget);\n/**\n * @file videojs-contrib-media-sources.js\n */\n\n\nvar urlCount = 0; // ------------\n// Media Source\n// ------------\n// store references to the media sources so they can be connected\n// to a video element (a swf object)\n// TODO: can we store this somewhere local to this module?\n\nvideojs$1.mediaSources = {};\n/**\n * Provide a method for a swf object to notify JS that a\n * media source is now open.\n *\n * @param {String} msObjectURL string referencing the MSE Object URL\n * @param {String} swfId the swf id\n */\n\nvar open = function open(msObjectURL, swfId) {\n var mediaSource = videojs$1.mediaSources[msObjectURL];\n\n if (mediaSource) {\n mediaSource.trigger({\n type: 'sourceopen',\n swfId: swfId\n });\n } else {\n throw new Error('Media Source not found (Video.js)');\n }\n};\n/**\n * Check to see if the native MediaSource object exists and supports\n * an MP4 container with both H.264 video and AAC-LC audio.\n *\n * @return {Boolean} if native media sources are supported\n */\n\n\nvar supportsNativeMediaSources = function supportsNativeMediaSources() {\n return !!window$1.MediaSource && !!window$1.MediaSource.isTypeSupported && window$1.MediaSource.isTypeSupported('video/mp4;codecs=\"avc1.4d400d,mp4a.40.2\"');\n};\n/**\n * An emulation of the MediaSource API so that we can support\n * native and non-native functionality. returns an instance of\n * HtmlMediaSource.\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/MediaSource\n */\n\n\nvar MediaSource = function MediaSource() {\n this.MediaSource = {\n open: open,\n supportsNativeMediaSources: supportsNativeMediaSources\n };\n\n if (supportsNativeMediaSources()) {\n return new HtmlMediaSource();\n }\n\n throw new Error('Cannot use create a virtual MediaSource for this video');\n};\n\nMediaSource.open = open;\nMediaSource.supportsNativeMediaSources = supportsNativeMediaSources;\n/**\n * A wrapper around the native URL for our MSE object\n * implementation, this object is exposed under videojs.URL\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/URL/URL\n */\n\nvar URL$1 = {\n /**\n * A wrapper around the native createObjectURL for our objects.\n * This function maps a native or emulated mediaSource to a blob\n * url so that it can be loaded into video.js\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL\n * @param {MediaSource} object the object to create a blob url to\n */\n createObjectURL: function createObjectURL(object) {\n var objectUrlPrefix = 'blob:vjs-media-source/';\n var url = void 0; // use the native MediaSource to generate an object URL\n\n if (object instanceof HtmlMediaSource) {\n url = window$1.URL.createObjectURL(object.nativeMediaSource_);\n object.url_ = url;\n return url;\n } // if the object isn't an emulated MediaSource, delegate to the\n // native implementation\n\n\n if (!(object instanceof HtmlMediaSource)) {\n url = window$1.URL.createObjectURL(object);\n object.url_ = url;\n return url;\n } // build a URL that can be used to map back to the emulated\n // MediaSource\n\n\n url = objectUrlPrefix + urlCount;\n urlCount++; // setup the mapping back to object\n\n videojs$1.mediaSources[url] = object;\n return url;\n }\n};\nvideojs$1.MediaSource = MediaSource;\nvideojs$1.URL = URL$1;\nvar EventTarget$1$1 = videojs$1.EventTarget,\n mergeOptions$2 = videojs$1.mergeOptions;\n/**\n * Returns a new master manifest that is the result of merging an updated master manifest\n * into the original version.\n *\n * @param {Object} oldMaster\n * The old parsed mpd object\n * @param {Object} newMaster\n * The updated parsed mpd object\n * @return {Object}\n * A new object representing the original master manifest with the updated media\n * playlists merged in\n */\n\nvar updateMaster$1 = function updateMaster$$1(oldMaster, newMaster) {\n var noChanges = void 0;\n var update = mergeOptions$2(oldMaster, {\n // These are top level properties that can be updated\n duration: newMaster.duration,\n minimumUpdatePeriod: newMaster.minimumUpdatePeriod\n }); // First update the playlists in playlist list\n\n for (var i = 0; i < newMaster.playlists.length; i++) {\n var playlistUpdate = updateMaster(update, newMaster.playlists[i]);\n\n if (playlistUpdate) {\n update = playlistUpdate;\n } else {\n noChanges = true;\n }\n } // Then update media group playlists\n\n\n forEachMediaGroup(newMaster, function (properties, type, group, label) {\n if (properties.playlists && properties.playlists.length) {\n var uri = properties.playlists[0].uri;\n\n var _playlistUpdate = updateMaster(update, properties.playlists[0]);\n\n if (_playlistUpdate) {\n update = _playlistUpdate; // update the playlist reference within media groups\n\n update.mediaGroups[type][group][label].playlists[0] = update.playlists[uri];\n noChanges = false;\n }\n }\n });\n\n if (noChanges) {\n return null;\n }\n\n return update;\n};\n\nvar generateSidxKey = function generateSidxKey(sidxInfo) {\n // should be non-inclusive\n var sidxByteRangeEnd = sidxInfo.byterange.offset + sidxInfo.byterange.length - 1;\n return sidxInfo.uri + '-' + sidxInfo.byterange.offset + '-' + sidxByteRangeEnd;\n}; // SIDX should be equivalent if the URI and byteranges of the SIDX match.\n// If the SIDXs have maps, the two maps should match,\n// both `a` and `b` missing SIDXs is considered matching.\n// If `a` or `b` but not both have a map, they aren't matching.\n\n\nvar equivalentSidx = function equivalentSidx(a, b) {\n var neitherMap = Boolean(!a.map && !b.map);\n var equivalentMap = neitherMap || Boolean(a.map && b.map && a.map.byterange.offset === b.map.byterange.offset && a.map.byterange.length === b.map.byterange.length);\n return equivalentMap && a.uri === b.uri && a.byterange.offset === b.byterange.offset && a.byterange.length === b.byterange.length;\n}; // exported for testing\n\n\nvar compareSidxEntry = function compareSidxEntry(playlists, oldSidxMapping) {\n var newSidxMapping = {};\n\n for (var uri in playlists) {\n var playlist = playlists[uri];\n var currentSidxInfo = playlist.sidx;\n\n if (currentSidxInfo) {\n var key = generateSidxKey(currentSidxInfo);\n\n if (!oldSidxMapping[key]) {\n break;\n }\n\n var savedSidxInfo = oldSidxMapping[key].sidxInfo;\n\n if (equivalentSidx(savedSidxInfo, currentSidxInfo)) {\n newSidxMapping[key] = oldSidxMapping[key];\n }\n }\n }\n\n return newSidxMapping;\n};\n/**\n * A function that filters out changed items as they need to be requested separately.\n *\n * The method is exported for testing\n *\n * @param {Object} masterXml the mpd XML\n * @param {string} srcUrl the mpd url\n * @param {Date} clientOffset a time difference between server and client (passed through and not used)\n * @param {Object} oldSidxMapping the SIDX to compare against\n */\n\n\nvar filterChangedSidxMappings = function filterChangedSidxMappings(masterXml, srcUrl, clientOffset, oldSidxMapping) {\n // Don't pass current sidx mapping\n var master = parse(masterXml, {\n manifestUri: srcUrl,\n clientOffset: clientOffset\n });\n var videoSidx = compareSidxEntry(master.playlists, oldSidxMapping);\n var mediaGroupSidx = videoSidx;\n forEachMediaGroup(master, function (properties, mediaType, groupKey, labelKey) {\n if (properties.playlists && properties.playlists.length) {\n var playlists = properties.playlists;\n mediaGroupSidx = mergeOptions$2(mediaGroupSidx, compareSidxEntry(playlists, oldSidxMapping));\n }\n });\n return mediaGroupSidx;\n}; // exported for testing\n\n\nvar requestSidx_ = function requestSidx_(sidxRange, playlist, xhr, options, finishProcessingFn) {\n var sidxInfo = {\n // resolve the segment URL relative to the playlist\n uri: resolveManifestRedirect(options.handleManifestRedirects, sidxRange.resolvedUri),\n // resolvedUri: sidxRange.resolvedUri,\n byterange: sidxRange.byterange,\n // the segment's playlist\n playlist: playlist\n };\n var sidxRequestOptions = videojs$1.mergeOptions(sidxInfo, {\n responseType: 'arraybuffer',\n headers: segmentXhrHeaders(sidxInfo)\n });\n return xhr(sidxRequestOptions, finishProcessingFn);\n};\n\nvar DashPlaylistLoader = function (_EventTarget) {\n inherits(DashPlaylistLoader, _EventTarget); // DashPlaylistLoader must accept either a src url or a playlist because subsequent\n // playlist loader setups from media groups will expect to be able to pass a playlist\n // (since there aren't external URLs to media playlists with DASH)\n\n function DashPlaylistLoader(srcUrlOrPlaylist, hls) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var masterPlaylistLoader = arguments[3];\n classCallCheck(this, DashPlaylistLoader);\n\n var _this = possibleConstructorReturn(this, (DashPlaylistLoader.__proto__ || Object.getPrototypeOf(DashPlaylistLoader)).call(this));\n\n var _options$withCredenti = options.withCredentials,\n withCredentials = _options$withCredenti === undefined ? false : _options$withCredenti,\n _options$handleManife = options.handleManifestRedirects,\n handleManifestRedirects = _options$handleManife === undefined ? false : _options$handleManife;\n _this.hls_ = hls;\n _this.withCredentials = withCredentials;\n _this.handleManifestRedirects = handleManifestRedirects;\n\n if (!srcUrlOrPlaylist) {\n throw new Error('A non-empty playlist URL or playlist is required');\n } // event naming?\n\n\n _this.on('minimumUpdatePeriod', function () {\n _this.refreshXml_();\n }); // live playlist staleness timeout\n\n\n _this.on('mediaupdatetimeout', function () {\n _this.refreshMedia_(_this.media().uri);\n });\n\n _this.state = 'HAVE_NOTHING';\n _this.loadedPlaylists_ = {}; // initialize the loader state\n // The masterPlaylistLoader will be created with a string\n\n if (typeof srcUrlOrPlaylist === 'string') {\n _this.srcUrl = srcUrlOrPlaylist; // TODO: reset sidxMapping between period changes\n // once multi-period is refactored\n\n _this.sidxMapping_ = {};\n return possibleConstructorReturn(_this);\n }\n\n _this.setupChildLoader(masterPlaylistLoader, srcUrlOrPlaylist);\n\n return _this;\n }\n\n createClass(DashPlaylistLoader, [{\n key: 'setupChildLoader',\n value: function setupChildLoader(masterPlaylistLoader, playlist) {\n this.masterPlaylistLoader_ = masterPlaylistLoader;\n this.childPlaylist_ = playlist;\n }\n }, {\n key: 'dispose',\n value: function dispose() {\n this.stopRequest();\n this.loadedPlaylists_ = {};\n window$1.clearTimeout(this.minimumUpdatePeriodTimeout_);\n window$1.clearTimeout(this.mediaRequest_);\n window$1.clearTimeout(this.mediaUpdateTimeout);\n }\n }, {\n key: 'hasPendingRequest',\n value: function hasPendingRequest() {\n return this.request || this.mediaRequest_;\n }\n }, {\n key: 'stopRequest',\n value: function stopRequest() {\n if (this.request) {\n var oldRequest = this.request;\n this.request = null;\n oldRequest.onreadystatechange = null;\n oldRequest.abort();\n }\n }\n }, {\n key: 'sidxRequestFinished_',\n value: function sidxRequestFinished_(playlist, master, startingState, doneFn) {\n var _this2 = this;\n\n return function (err, request) {\n // disposed\n if (!_this2.request) {\n return;\n } // pending request is cleared\n\n\n _this2.request = null;\n\n if (err) {\n _this2.error = {\n status: request.status,\n message: 'DASH playlist request error at URL: ' + playlist.uri,\n response: request.response,\n // MEDIA_ERR_NETWORK\n code: 2\n };\n\n if (startingState) {\n _this2.state = startingState;\n }\n\n _this2.trigger('error');\n\n return doneFn(master, null);\n }\n\n var bytes = new Uint8Array(request.response);\n var sidx = mp4Inspector.parseSidx(bytes.subarray(8));\n return doneFn(master, sidx);\n };\n }\n }, {\n key: 'media',\n value: function media(playlist) {\n var _this3 = this; // getter\n\n\n if (!playlist) {\n return this.media_;\n } // setter\n\n\n if (this.state === 'HAVE_NOTHING') {\n throw new Error('Cannot switch media playlist from ' + this.state);\n }\n\n var startingState = this.state; // find the playlist object if the target playlist has been specified by URI\n\n if (typeof playlist === 'string') {\n if (!this.master.playlists[playlist]) {\n throw new Error('Unknown playlist URI: ' + playlist);\n }\n\n playlist = this.master.playlists[playlist];\n }\n\n var mediaChange = !this.media_ || playlist.uri !== this.media_.uri; // switch to previously loaded playlists immediately\n\n if (mediaChange && this.loadedPlaylists_[playlist.uri] && this.loadedPlaylists_[playlist.uri].endList) {\n this.state = 'HAVE_METADATA';\n this.media_ = playlist; // trigger media change if the active media has been updated\n\n if (mediaChange) {\n this.trigger('mediachanging');\n this.trigger('mediachange');\n }\n\n return;\n } // switching to the active playlist is a no-op\n\n\n if (!mediaChange) {\n return;\n } // switching from an already loaded playlist\n\n\n if (this.media_) {\n this.trigger('mediachanging');\n }\n\n if (!playlist.sidx) {\n // Continue asynchronously if there is no sidx\n // wait one tick to allow haveMaster to run first on a child loader\n this.mediaRequest_ = window$1.setTimeout(this.haveMetadata.bind(this, {\n startingState: startingState,\n playlist: playlist\n }), 0); // exit early and don't do sidx work\n\n return;\n } // we have sidx mappings\n\n\n var oldMaster = void 0;\n var sidxMapping = void 0; // sidxMapping is used when parsing the masterXml, so store\n // it on the masterPlaylistLoader\n\n if (this.masterPlaylistLoader_) {\n oldMaster = this.masterPlaylistLoader_.master;\n sidxMapping = this.masterPlaylistLoader_.sidxMapping_;\n } else {\n oldMaster = this.master;\n sidxMapping = this.sidxMapping_;\n }\n\n var sidxKey = generateSidxKey(playlist.sidx);\n sidxMapping[sidxKey] = {\n sidxInfo: playlist.sidx\n };\n this.request = requestSidx_(playlist.sidx, playlist, this.hls_.xhr, {\n handleManifestRedirects: this.handleManifestRedirects\n }, this.sidxRequestFinished_(playlist, oldMaster, startingState, function (newMaster, sidx) {\n if (!newMaster || !sidx) {\n throw new Error('failed to request sidx');\n } // update loader's sidxMapping with parsed sidx box\n\n\n sidxMapping[sidxKey].sidx = sidx; // everything is ready just continue to haveMetadata\n\n _this3.haveMetadata({\n startingState: startingState,\n playlist: newMaster.playlists[playlist.uri]\n });\n }));\n }\n }, {\n key: 'haveMetadata',\n value: function haveMetadata(_ref) {\n var startingState = _ref.startingState,\n playlist = _ref.playlist;\n this.state = 'HAVE_METADATA';\n this.loadedPlaylists_[playlist.uri] = playlist;\n this.mediaRequest_ = null; // This will trigger loadedplaylist\n\n this.refreshMedia_(playlist.uri); // fire loadedmetadata the first time a media playlist is loaded\n // to resolve setup of media groups\n\n if (startingState === 'HAVE_MASTER') {\n this.trigger('loadedmetadata');\n } else {\n // trigger media change if the active media has been updated\n this.trigger('mediachange');\n }\n }\n }, {\n key: 'pause',\n value: function pause() {\n this.stopRequest();\n window$1.clearTimeout(this.mediaUpdateTimeout);\n window$1.clearTimeout(this.minimumUpdatePeriodTimeout_);\n\n if (this.state === 'HAVE_NOTHING') {\n // If we pause the loader before any data has been retrieved, its as if we never\n // started, so reset to an unstarted state.\n this.started = false;\n }\n }\n }, {\n key: 'load',\n value: function load(isFinalRendition) {\n var _this4 = this;\n\n window$1.clearTimeout(this.mediaUpdateTimeout);\n window$1.clearTimeout(this.minimumUpdatePeriodTimeout_);\n var media = this.media();\n\n if (isFinalRendition) {\n var delay = media ? media.targetDuration / 2 * 1000 : 5 * 1000;\n this.mediaUpdateTimeout = window$1.setTimeout(function () {\n return _this4.load();\n }, delay);\n return;\n } // because the playlists are internal to the manifest, load should either load the\n // main manifest, or do nothing but trigger an event\n\n\n if (!this.started) {\n this.start();\n return;\n }\n\n this.trigger('loadedplaylist');\n }\n /**\n * Parses the master xml string and updates playlist uri references\n *\n * @return {Object}\n * The parsed mpd manifest object\n */\n\n }, {\n key: 'parseMasterXml',\n value: function parseMasterXml() {\n var master = parse(this.masterXml_, {\n manifestUri: this.srcUrl,\n clientOffset: this.clientOffset_,\n sidxMapping: this.sidxMapping_\n });\n master.uri = this.srcUrl; // Set up phony URIs for the playlists since we won't have external URIs for DASH\n // but reference playlists by their URI throughout the project\n // TODO: Should we create the dummy uris in mpd-parser as well (leaning towards yes).\n\n for (var i = 0; i < master.playlists.length; i++) {\n var phonyUri = 'placeholder-uri-' + i;\n master.playlists[i].uri = phonyUri; // set up by URI references\n\n master.playlists[phonyUri] = master.playlists[i];\n } // set up phony URIs for the media group playlists since we won't have external\n // URIs for DASH but reference playlists by their URI throughout the project\n\n\n forEachMediaGroup(master, function (properties, mediaType, groupKey, labelKey) {\n if (properties.playlists && properties.playlists.length) {\n var _phonyUri = 'placeholder-uri-' + mediaType + '-' + groupKey + '-' + labelKey;\n\n properties.playlists[0].uri = _phonyUri; // setup URI references\n\n master.playlists[_phonyUri] = properties.playlists[0];\n }\n });\n setupMediaPlaylists(master);\n resolveMediaGroupUris(master);\n return master;\n }\n }, {\n key: 'start',\n value: function start() {\n var _this5 = this;\n\n this.started = true; // We don't need to request the master manifest again\n // Call this asynchronously to match the xhr request behavior below\n\n if (this.masterPlaylistLoader_) {\n this.mediaRequest_ = window$1.setTimeout(this.haveMaster_.bind(this), 0);\n return;\n } // request the specified URL\n\n\n this.request = this.hls_.xhr({\n uri: this.srcUrl,\n withCredentials: this.withCredentials\n }, function (error, req) {\n // disposed\n if (!_this5.request) {\n return;\n } // clear the loader's request reference\n\n\n _this5.request = null;\n\n if (error) {\n _this5.error = {\n status: req.status,\n message: 'DASH playlist request error at URL: ' + _this5.srcUrl,\n responseText: req.responseText,\n // MEDIA_ERR_NETWORK\n code: 2\n };\n\n if (_this5.state === 'HAVE_NOTHING') {\n _this5.started = false;\n }\n\n return _this5.trigger('error');\n }\n\n _this5.masterXml_ = req.responseText;\n\n if (req.responseHeaders && req.responseHeaders.date) {\n _this5.masterLoaded_ = Date.parse(req.responseHeaders.date);\n } else {\n _this5.masterLoaded_ = Date.now();\n }\n\n _this5.srcUrl = resolveManifestRedirect(_this5.handleManifestRedirects, _this5.srcUrl, req);\n\n _this5.syncClientServerClock_(_this5.onClientServerClockSync_.bind(_this5));\n });\n }\n /**\n * Parses the master xml for UTCTiming node to sync the client clock to the server\n * clock. If the UTCTiming node requires a HEAD or GET request, that request is made.\n *\n * @param {Function} done\n * Function to call when clock sync has completed\n */\n\n }, {\n key: 'syncClientServerClock_',\n value: function syncClientServerClock_(done) {\n var _this6 = this;\n\n var utcTiming = parseUTCTiming(this.masterXml_); // No UTCTiming element found in the mpd. Use Date header from mpd request as the\n // server clock\n\n if (utcTiming === null) {\n this.clientOffset_ = this.masterLoaded_ - Date.now();\n return done();\n }\n\n if (utcTiming.method === 'DIRECT') {\n this.clientOffset_ = utcTiming.value - Date.now();\n return done();\n }\n\n this.request = this.hls_.xhr({\n uri: resolveUrl(this.srcUrl, utcTiming.value),\n method: utcTiming.method,\n withCredentials: this.withCredentials\n }, function (error, req) {\n // disposed\n if (!_this6.request) {\n return;\n }\n\n if (error) {\n // sync request failed, fall back to using date header from mpd\n // TODO: log warning\n _this6.clientOffset_ = _this6.masterLoaded_ - Date.now();\n return done();\n }\n\n var serverTime = void 0;\n\n if (utcTiming.method === 'HEAD') {\n if (!req.responseHeaders || !req.responseHeaders.date) {\n // expected date header not preset, fall back to using date header from mpd\n // TODO: log warning\n serverTime = _this6.masterLoaded_;\n } else {\n serverTime = Date.parse(req.responseHeaders.date);\n }\n } else {\n serverTime = Date.parse(req.responseText);\n }\n\n _this6.clientOffset_ = serverTime - Date.now();\n done();\n });\n }\n }, {\n key: 'haveMaster_',\n value: function haveMaster_() {\n this.state = 'HAVE_MASTER'; // clear media request\n\n this.mediaRequest_ = null;\n\n if (!this.masterPlaylistLoader_) {\n this.master = this.parseMasterXml(); // We have the master playlist at this point, so\n // trigger this to allow MasterPlaylistController\n // to make an initial playlist selection\n\n this.trigger('loadedplaylist');\n } else if (!this.media_) {\n // no media playlist was specifically selected so select\n // the one the child playlist loader was created with\n this.media(this.childPlaylist_);\n }\n }\n /**\n * Handler for after client/server clock synchronization has happened. Sets up\n * xml refresh timer if specificed by the manifest.\n */\n\n }, {\n key: 'onClientServerClockSync_',\n value: function onClientServerClockSync_() {\n var _this7 = this;\n\n this.haveMaster_();\n\n if (!this.hasPendingRequest() && !this.media_) {\n this.media(this.master.playlists[0]);\n } // TODO: minimumUpdatePeriod can have a value of 0. Currently the manifest will not\n // be refreshed when this is the case. The inter-op guide says that when the\n // minimumUpdatePeriod is 0, the manifest should outline all currently available\n // segments, but future segments may require an update. I think a good solution\n // would be to update the manifest at the same rate that the media playlists\n // are \"refreshed\", i.e. every targetDuration.\n\n\n if (this.master && this.master.minimumUpdatePeriod) {\n this.minimumUpdatePeriodTimeout_ = window$1.setTimeout(function () {\n _this7.trigger('minimumUpdatePeriod');\n }, this.master.minimumUpdatePeriod);\n }\n }\n /**\n * Sends request to refresh the master xml and updates the parsed master manifest\n * TODO: Does the client offset need to be recalculated when the xml is refreshed?\n */\n\n }, {\n key: 'refreshXml_',\n value: function refreshXml_() {\n var _this8 = this; // The srcUrl here *may* need to pass through handleManifestsRedirects when\n // sidx is implemented\n\n\n this.request = this.hls_.xhr({\n uri: this.srcUrl,\n withCredentials: this.withCredentials\n }, function (error, req) {\n // disposed\n if (!_this8.request) {\n return;\n } // clear the loader's request reference\n\n\n _this8.request = null;\n\n if (error) {\n _this8.error = {\n status: req.status,\n message: 'DASH playlist request error at URL: ' + _this8.srcUrl,\n responseText: req.responseText,\n // MEDIA_ERR_NETWORK\n code: 2\n };\n\n if (_this8.state === 'HAVE_NOTHING') {\n _this8.started = false;\n }\n\n return _this8.trigger('error');\n }\n\n _this8.masterXml_ = req.responseText; // This will filter out updated sidx info from the mapping\n\n _this8.sidxMapping_ = filterChangedSidxMappings(_this8.masterXml_, _this8.srcUrl, _this8.clientOffset_, _this8.sidxMapping_);\n\n var master = _this8.parseMasterXml();\n\n var updatedMaster = updateMaster$1(_this8.master, master);\n\n var currentSidxInfo = _this8.media().sidx;\n\n if (updatedMaster) {\n if (currentSidxInfo) {\n var sidxKey = generateSidxKey(currentSidxInfo); // the sidx was updated, so the previous mapping was removed\n\n if (!_this8.sidxMapping_[sidxKey]) {\n var playlist = _this8.media();\n\n _this8.request = requestSidx_(playlist.sidx, playlist, _this8.hls_.xhr, {\n handleManifestRedirects: _this8.handleManifestRedirects\n }, _this8.sidxRequestFinished_(playlist, master, _this8.state, function (newMaster, sidx) {\n if (!newMaster || !sidx) {\n throw new Error('failed to request sidx on minimumUpdatePeriod');\n } // update loader's sidxMapping with parsed sidx box\n\n\n _this8.sidxMapping_[sidxKey].sidx = sidx;\n _this8.minimumUpdatePeriodTimeout_ = window$1.setTimeout(function () {\n _this8.trigger('minimumUpdatePeriod');\n }, _this8.master.minimumUpdatePeriod); // TODO: do we need to reload the current playlist?\n\n _this8.refreshMedia_(_this8.media().uri);\n\n return;\n }));\n }\n } else {\n _this8.master = updatedMaster;\n }\n }\n\n _this8.minimumUpdatePeriodTimeout_ = window$1.setTimeout(function () {\n _this8.trigger('minimumUpdatePeriod');\n }, _this8.master.minimumUpdatePeriod);\n });\n }\n /**\n * Refreshes the media playlist by re-parsing the master xml and updating playlist\n * references. If this is an alternate loader, the updated parsed manifest is retrieved\n * from the master loader.\n */\n\n }, {\n key: 'refreshMedia_',\n value: function refreshMedia_(mediaUri) {\n var _this9 = this;\n\n if (!mediaUri) {\n throw new Error('refreshMedia_ must take a media uri');\n }\n\n var oldMaster = void 0;\n var newMaster = void 0;\n\n if (this.masterPlaylistLoader_) {\n oldMaster = this.masterPlaylistLoader_.master;\n newMaster = this.masterPlaylistLoader_.parseMasterXml();\n } else {\n oldMaster = this.master;\n newMaster = this.parseMasterXml();\n }\n\n var updatedMaster = updateMaster$1(oldMaster, newMaster);\n\n if (updatedMaster) {\n if (this.masterPlaylistLoader_) {\n this.masterPlaylistLoader_.master = updatedMaster;\n } else {\n this.master = updatedMaster;\n }\n\n this.media_ = updatedMaster.playlists[mediaUri];\n } else {\n this.media_ = newMaster.playlists[mediaUri];\n this.trigger('playlistunchanged');\n }\n\n if (!this.media().endList) {\n this.mediaUpdateTimeout = window$1.setTimeout(function () {\n _this9.trigger('mediaupdatetimeout');\n }, refreshDelay(this.media(), !!updatedMaster));\n }\n\n this.trigger('loadedplaylist');\n }\n }]);\n return DashPlaylistLoader;\n}(EventTarget$1$1);\n\nvar logger = function logger(source) {\n if (videojs$1.log.debug) {\n return videojs$1.log.debug.bind(videojs$1, 'VHS:', source + ' >');\n }\n\n return function () {};\n};\n\nfunction noop() {}\n/**\n * @file source-updater.js\n */\n\n/**\n * A queue of callbacks to be serialized and applied when a\n * MediaSource and its associated SourceBuffers are not in the\n * updating state. It is used by the segment loader to update the\n * underlying SourceBuffers when new data is loaded, for instance.\n *\n * @class SourceUpdater\n * @param {MediaSource} mediaSource the MediaSource to create the\n * SourceBuffer from\n * @param {String} mimeType the desired MIME type of the underlying\n * SourceBuffer\n * @param {Object} sourceBufferEmitter an event emitter that fires when a source buffer is\n * added to the media source\n */\n\n\nvar SourceUpdater = function () {\n function SourceUpdater(mediaSource, mimeType, type, sourceBufferEmitter) {\n classCallCheck(this, SourceUpdater);\n this.callbacks_ = [];\n this.pendingCallback_ = null;\n this.timestampOffset_ = 0;\n this.mediaSource = mediaSource;\n this.processedAppend_ = false;\n this.type_ = type;\n this.mimeType_ = mimeType;\n this.logger_ = logger('SourceUpdater[' + type + '][' + mimeType + ']');\n\n if (mediaSource.readyState === 'closed') {\n mediaSource.addEventListener('sourceopen', this.createSourceBuffer_.bind(this, mimeType, sourceBufferEmitter));\n } else {\n this.createSourceBuffer_(mimeType, sourceBufferEmitter);\n }\n }\n\n createClass(SourceUpdater, [{\n key: 'createSourceBuffer_',\n value: function createSourceBuffer_(mimeType, sourceBufferEmitter) {\n var _this = this;\n\n this.sourceBuffer_ = this.mediaSource.addSourceBuffer(mimeType);\n this.logger_('created SourceBuffer');\n\n if (sourceBufferEmitter) {\n sourceBufferEmitter.trigger('sourcebufferadded');\n\n if (this.mediaSource.sourceBuffers.length < 2) {\n // There's another source buffer we must wait for before we can start updating\n // our own (or else we can get into a bad state, i.e., appending video/audio data\n // before the other video/audio source buffer is available and leading to a video\n // or audio only buffer).\n sourceBufferEmitter.on('sourcebufferadded', function () {\n _this.start_();\n });\n return;\n }\n }\n\n this.start_();\n }\n }, {\n key: 'start_',\n value: function start_() {\n var _this2 = this;\n\n this.started_ = true; // run completion handlers and process callbacks as updateend\n // events fire\n\n this.onUpdateendCallback_ = function () {\n var pendingCallback = _this2.pendingCallback_;\n _this2.pendingCallback_ = null;\n _this2.sourceBuffer_.removing = false;\n\n _this2.logger_('buffered [' + printableRange(_this2.buffered()) + ']');\n\n if (pendingCallback) {\n pendingCallback();\n }\n\n _this2.runCallback_();\n };\n\n this.sourceBuffer_.addEventListener('updateend', this.onUpdateendCallback_);\n this.runCallback_();\n }\n /**\n * Aborts the current segment and resets the segment parser.\n *\n * @param {Function} done function to call when done\n * @see http://w3c.github.io/media-source/#widl-SourceBuffer-abort-void\n */\n\n }, {\n key: 'abort',\n value: function abort(done) {\n var _this3 = this;\n\n if (this.processedAppend_) {\n this.queueCallback_(function () {\n _this3.sourceBuffer_.abort();\n }, done);\n }\n }\n /**\n * Queue an update to append an ArrayBuffer.\n *\n * @param {ArrayBuffer} bytes\n * @param {Function} done the function to call when done\n * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-appendBuffer-void-ArrayBuffer-data\n */\n\n }, {\n key: 'appendBuffer',\n value: function appendBuffer(config, done) {\n var _this4 = this;\n\n this.processedAppend_ = true;\n this.queueCallback_(function () {\n if (config.videoSegmentTimingInfoCallback) {\n _this4.sourceBuffer_.addEventListener('videoSegmentTimingInfo', config.videoSegmentTimingInfoCallback);\n }\n\n _this4.sourceBuffer_.appendBuffer(config.bytes);\n }, function () {\n if (config.videoSegmentTimingInfoCallback) {\n _this4.sourceBuffer_.removeEventListener('videoSegmentTimingInfo', config.videoSegmentTimingInfoCallback);\n }\n\n done();\n });\n }\n /**\n * Indicates what TimeRanges are buffered in the managed SourceBuffer.\n *\n * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-buffered\n */\n\n }, {\n key: 'buffered',\n value: function buffered() {\n if (!this.sourceBuffer_) {\n return videojs$1.createTimeRanges();\n }\n\n return this.sourceBuffer_.buffered;\n }\n /**\n * Queue an update to remove a time range from the buffer.\n *\n * @param {Number} start where to start the removal\n * @param {Number} end where to end the removal\n * @param {Function} [done=noop] optional callback to be executed when the remove\n * operation is complete\n * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end\n */\n\n }, {\n key: 'remove',\n value: function remove(start, end) {\n var _this5 = this;\n\n var done = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop;\n\n if (this.processedAppend_) {\n this.queueCallback_(function () {\n _this5.logger_('remove [' + start + ' => ' + end + ']');\n\n _this5.sourceBuffer_.removing = true;\n\n _this5.sourceBuffer_.remove(start, end);\n }, done);\n }\n }\n /**\n * Whether the underlying sourceBuffer is updating or not\n *\n * @return {Boolean} the updating status of the SourceBuffer\n */\n\n }, {\n key: 'updating',\n value: function updating() {\n // we are updating if the sourcebuffer is updating or\n return !this.sourceBuffer_ || this.sourceBuffer_.updating || // if we have a pending callback that is not our internal noop\n !!this.pendingCallback_ && this.pendingCallback_ !== noop;\n }\n /**\n * Set/get the timestampoffset on the SourceBuffer\n *\n * @return {Number} the timestamp offset\n */\n\n }, {\n key: 'timestampOffset',\n value: function timestampOffset(offset) {\n var _this6 = this;\n\n if (typeof offset !== 'undefined') {\n this.queueCallback_(function () {\n _this6.sourceBuffer_.timestampOffset = offset;\n\n _this6.runCallback_();\n });\n this.timestampOffset_ = offset;\n }\n\n return this.timestampOffset_;\n }\n /**\n * Queue a callback to run\n */\n\n }, {\n key: 'queueCallback_',\n value: function queueCallback_(callback, done) {\n this.callbacks_.push([callback.bind(this), done]);\n this.runCallback_();\n }\n /**\n * Run a queued callback\n */\n\n }, {\n key: 'runCallback_',\n value: function runCallback_() {\n var callbacks = void 0;\n\n if (!this.updating() && this.callbacks_.length && this.started_) {\n callbacks = this.callbacks_.shift();\n this.pendingCallback_ = callbacks[1];\n callbacks[0]();\n }\n }\n /**\n * dispose of the source updater and the underlying sourceBuffer\n */\n\n }, {\n key: 'dispose',\n value: function dispose() {\n var _this7 = this;\n\n var disposeFn = function disposeFn() {\n if (_this7.sourceBuffer_ && _this7.mediaSource.readyState === 'open') {\n _this7.sourceBuffer_.abort();\n }\n\n _this7.sourceBuffer_.removeEventListener('updateend', disposeFn);\n };\n\n this.sourceBuffer_.removeEventListener('updateend', this.onUpdateendCallback_);\n\n if (this.sourceBuffer_.removing) {\n this.sourceBuffer_.addEventListener('updateend', disposeFn);\n } else {\n disposeFn();\n }\n }\n }]);\n return SourceUpdater;\n}();\n\nvar Config = {\n GOAL_BUFFER_LENGTH: 30,\n MAX_GOAL_BUFFER_LENGTH: 60,\n GOAL_BUFFER_LENGTH_RATE: 1,\n // 0.5 MB/s\n INITIAL_BANDWIDTH: 4194304,\n // A fudge factor to apply to advertised playlist bitrates to account for\n // temporary flucations in client bandwidth\n BANDWIDTH_VARIANCE: 1.2,\n // How much of the buffer must be filled before we consider upswitching\n BUFFER_LOW_WATER_LINE: 0,\n MAX_BUFFER_LOW_WATER_LINE: 30,\n BUFFER_LOW_WATER_LINE_RATE: 1\n};\nvar REQUEST_ERRORS = {\n FAILURE: 2,\n TIMEOUT: -101,\n ABORTED: -102\n};\n/**\n * Abort all requests\n *\n * @param {Object} activeXhrs - an object that tracks all XHR requests\n */\n\nvar abortAll = function abortAll(activeXhrs) {\n activeXhrs.forEach(function (xhr) {\n xhr.abort();\n });\n};\n/**\n * Gather important bandwidth stats once a request has completed\n *\n * @param {Object} request - the XHR request from which to gather stats\n */\n\n\nvar getRequestStats = function getRequestStats(request) {\n return {\n bandwidth: request.bandwidth,\n bytesReceived: request.bytesReceived || 0,\n roundTripTime: request.roundTripTime || 0\n };\n};\n/**\n * If possible gather bandwidth stats as a request is in\n * progress\n *\n * @param {Event} progressEvent - an event object from an XHR's progress event\n */\n\n\nvar getProgressStats = function getProgressStats(progressEvent) {\n var request = progressEvent.target;\n var roundTripTime = Date.now() - request.requestTime;\n var stats = {\n bandwidth: Infinity,\n bytesReceived: 0,\n roundTripTime: roundTripTime || 0\n };\n stats.bytesReceived = progressEvent.loaded; // This can result in Infinity if stats.roundTripTime is 0 but that is ok\n // because we should only use bandwidth stats on progress to determine when\n // abort a request early due to insufficient bandwidth\n\n stats.bandwidth = Math.floor(stats.bytesReceived / stats.roundTripTime * 8 * 1000);\n return stats;\n};\n/**\n * Handle all error conditions in one place and return an object\n * with all the information\n *\n * @param {Error|null} error - if non-null signals an error occured with the XHR\n * @param {Object} request - the XHR request that possibly generated the error\n */\n\n\nvar handleErrors = function handleErrors(error, request) {\n if (request.timedout) {\n return {\n status: request.status,\n message: 'HLS request timed-out at URL: ' + request.uri,\n code: REQUEST_ERRORS.TIMEOUT,\n xhr: request\n };\n }\n\n if (request.aborted) {\n return {\n status: request.status,\n message: 'HLS request aborted at URL: ' + request.uri,\n code: REQUEST_ERRORS.ABORTED,\n xhr: request\n };\n }\n\n if (error) {\n return {\n status: request.status,\n message: 'HLS request errored at URL: ' + request.uri,\n code: REQUEST_ERRORS.FAILURE,\n xhr: request\n };\n }\n\n return null;\n};\n/**\n * Handle responses for key data and convert the key data to the correct format\n * for the decryption step later\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n * this request\n */\n\n\nvar handleKeyResponse = function handleKeyResponse(segment, finishProcessingFn) {\n return function (error, request) {\n var response = request.response;\n var errorObj = handleErrors(error, request);\n\n if (errorObj) {\n return finishProcessingFn(errorObj, segment);\n }\n\n if (response.byteLength !== 16) {\n return finishProcessingFn({\n status: request.status,\n message: 'Invalid HLS key at URL: ' + request.uri,\n code: REQUEST_ERRORS.FAILURE,\n xhr: request\n }, segment);\n }\n\n var view = new DataView(response);\n segment.key.bytes = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);\n return finishProcessingFn(null, segment);\n };\n};\n/**\n * Handle init-segment responses\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n * this request\n */\n\n\nvar handleInitSegmentResponse = function handleInitSegmentResponse(segment, captionParser, finishProcessingFn) {\n return function (error, request) {\n var response = request.response;\n var errorObj = handleErrors(error, request);\n\n if (errorObj) {\n return finishProcessingFn(errorObj, segment);\n } // stop processing if received empty content\n\n\n if (response.byteLength === 0) {\n return finishProcessingFn({\n status: request.status,\n message: 'Empty HLS segment content at URL: ' + request.uri,\n code: REQUEST_ERRORS.FAILURE,\n xhr: request\n }, segment);\n }\n\n segment.map.bytes = new Uint8Array(request.response); // Initialize CaptionParser if it hasn't been yet\n\n if (captionParser && !captionParser.isInitialized()) {\n captionParser.init();\n }\n\n segment.map.timescales = mp4probe.timescale(segment.map.bytes);\n segment.map.videoTrackIds = mp4probe.videoTrackIds(segment.map.bytes);\n return finishProcessingFn(null, segment);\n };\n};\n/**\n * Response handler for segment-requests being sure to set the correct\n * property depending on whether the segment is encryped or not\n * Also records and keeps track of stats that are used for ABR purposes\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n * this request\n */\n\n\nvar handleSegmentResponse = function handleSegmentResponse(segment, captionParser, finishProcessingFn) {\n return function (error, request) {\n var response = request.response;\n var errorObj = handleErrors(error, request);\n var parsed = void 0;\n\n if (errorObj) {\n return finishProcessingFn(errorObj, segment);\n } // stop processing if received empty content\n\n\n if (response.byteLength === 0) {\n return finishProcessingFn({\n status: request.status,\n message: 'Empty HLS segment content at URL: ' + request.uri,\n code: REQUEST_ERRORS.FAILURE,\n xhr: request\n }, segment);\n }\n\n segment.stats = getRequestStats(request);\n\n if (segment.key) {\n segment.encryptedBytes = new Uint8Array(request.response);\n } else {\n segment.bytes = new Uint8Array(request.response);\n } // This is likely an FMP4 and has the init segment.\n // Run through the CaptionParser in case there are captions.\n\n\n if (captionParser && segment.map && segment.map.bytes) {\n // Initialize CaptionParser if it hasn't been yet\n if (!captionParser.isInitialized()) {\n captionParser.init();\n }\n\n parsed = captionParser.parse(segment.bytes, segment.map.videoTrackIds, segment.map.timescales);\n\n if (parsed && parsed.captions) {\n segment.captionStreams = parsed.captionStreams;\n segment.fmp4Captions = parsed.captions;\n }\n }\n\n return finishProcessingFn(null, segment);\n };\n};\n/**\n * Decrypt the segment via the decryption web worker\n *\n * @param {WebWorker} decrypter - a WebWorker interface to AES-128 decryption routines\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} doneFn - a callback that is executed after decryption has completed\n */\n\n\nvar decryptSegment = function decryptSegment(decrypter, segment, doneFn) {\n var decryptionHandler = function decryptionHandler(event) {\n if (event.data.source === segment.requestId) {\n decrypter.removeEventListener('message', decryptionHandler);\n var decrypted = event.data.decrypted;\n segment.bytes = new Uint8Array(decrypted.bytes, decrypted.byteOffset, decrypted.byteLength);\n return doneFn(null, segment);\n }\n };\n\n decrypter.addEventListener('message', decryptionHandler);\n var keyBytes = void 0;\n\n if (segment.key.bytes.slice) {\n keyBytes = segment.key.bytes.slice();\n } else {\n keyBytes = new Uint32Array(Array.prototype.slice.call(segment.key.bytes));\n } // this is an encrypted segment\n // incrementally decrypt the segment\n\n\n decrypter.postMessage(createTransferableMessage({\n source: segment.requestId,\n encrypted: segment.encryptedBytes,\n key: keyBytes,\n iv: segment.key.iv\n }), [segment.encryptedBytes.buffer, keyBytes.buffer]);\n};\n/**\n * This function waits for all XHRs to finish (with either success or failure)\n * before continueing processing via it's callback. The function gathers errors\n * from each request into a single errors array so that the error status for\n * each request can be examined later.\n *\n * @param {Object} activeXhrs - an object that tracks all XHR requests\n * @param {WebWorker} decrypter - a WebWorker interface to AES-128 decryption routines\n * @param {Function} doneFn - a callback that is executed after all resources have been\n * downloaded and any decryption completed\n */\n\n\nvar waitForCompletion = function waitForCompletion(activeXhrs, decrypter, doneFn) {\n var count = 0;\n var didError = false;\n return function (error, segment) {\n if (didError) {\n return;\n }\n\n if (error) {\n didError = true; // If there are errors, we have to abort any outstanding requests\n\n abortAll(activeXhrs); // Even though the requests above are aborted, and in theory we could wait until we\n // handle the aborted events from those requests, there are some cases where we may\n // never get an aborted event. For instance, if the network connection is lost and\n // there were two requests, the first may have triggered an error immediately, while\n // the second request remains unsent. In that case, the aborted algorithm will not\n // trigger an abort: see https://xhr.spec.whatwg.org/#the-abort()-method\n //\n // We also can't rely on the ready state of the XHR, since the request that\n // triggered the connection error may also show as a ready state of 0 (unsent).\n // Therefore, we have to finish this group of requests immediately after the first\n // seen error.\n\n return doneFn(error, segment);\n }\n\n count += 1;\n\n if (count === activeXhrs.length) {\n // Keep track of when *all* of the requests have completed\n segment.endOfAllRequests = Date.now();\n\n if (segment.encryptedBytes) {\n return decryptSegment(decrypter, segment, doneFn);\n } // Otherwise, everything is ready just continue\n\n\n return doneFn(null, segment);\n }\n };\n};\n/**\n * Simple progress event callback handler that gathers some stats before\n * executing a provided callback with the `segment` object\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} progressFn - a callback that is executed each time a progress event\n * is received\n * @param {Event} event - the progress event object from XMLHttpRequest\n */\n\n\nvar handleProgress = function handleProgress(segment, progressFn) {\n return function (event) {\n segment.stats = videojs$1.mergeOptions(segment.stats, getProgressStats(event)); // record the time that we receive the first byte of data\n\n if (!segment.stats.firstBytesReceivedAt && segment.stats.bytesReceived) {\n segment.stats.firstBytesReceivedAt = Date.now();\n }\n\n return progressFn(event, segment);\n };\n};\n/**\n * Load all resources and does any processing necessary for a media-segment\n *\n * Features:\n * decrypts the media-segment if it has a key uri and an iv\n * aborts *all* requests if *any* one request fails\n *\n * The segment object, at minimum, has the following format:\n * {\n * resolvedUri: String,\n * [byterange]: {\n * offset: Number,\n * length: Number\n * },\n * [key]: {\n * resolvedUri: String\n * [byterange]: {\n * offset: Number,\n * length: Number\n * },\n * iv: {\n * bytes: Uint32Array\n * }\n * },\n * [map]: {\n * resolvedUri: String,\n * [byterange]: {\n * offset: Number,\n * length: Number\n * },\n * [bytes]: Uint8Array\n * }\n * }\n * ...where [name] denotes optional properties\n *\n * @param {Function} xhr - an instance of the xhr wrapper in xhr.js\n * @param {Object} xhrOptions - the base options to provide to all xhr requests\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128\n * decryption routines\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} progressFn - a callback that receives progress events from the main\n * segment's xhr request\n * @param {Function} doneFn - a callback that is executed only once all requests have\n * succeeded or failed\n * @returns {Function} a function that, when invoked, immediately aborts all\n * outstanding requests\n */\n\n\nvar mediaSegmentRequest = function mediaSegmentRequest(xhr, xhrOptions, decryptionWorker, captionParser, segment, progressFn, doneFn) {\n var activeXhrs = [];\n var finishProcessingFn = waitForCompletion(activeXhrs, decryptionWorker, doneFn); // optionally, request the decryption key\n\n if (segment.key && !segment.key.bytes) {\n var keyRequestOptions = videojs$1.mergeOptions(xhrOptions, {\n uri: segment.key.resolvedUri,\n responseType: 'arraybuffer'\n });\n var keyRequestCallback = handleKeyResponse(segment, finishProcessingFn);\n var keyXhr = xhr(keyRequestOptions, keyRequestCallback);\n activeXhrs.push(keyXhr);\n } // optionally, request the associated media init segment\n\n\n if (segment.map && !segment.map.bytes) {\n var initSegmentOptions = videojs$1.mergeOptions(xhrOptions, {\n uri: segment.map.resolvedUri,\n responseType: 'arraybuffer',\n headers: segmentXhrHeaders(segment.map)\n });\n var initSegmentRequestCallback = handleInitSegmentResponse(segment, captionParser, finishProcessingFn);\n var initSegmentXhr = xhr(initSegmentOptions, initSegmentRequestCallback);\n activeXhrs.push(initSegmentXhr);\n }\n\n var segmentRequestOptions = videojs$1.mergeOptions(xhrOptions, {\n uri: segment.resolvedUri,\n responseType: 'arraybuffer',\n headers: segmentXhrHeaders(segment)\n });\n var segmentRequestCallback = handleSegmentResponse(segment, captionParser, finishProcessingFn);\n var segmentXhr = xhr(segmentRequestOptions, segmentRequestCallback);\n segmentXhr.addEventListener('progress', handleProgress(segment, progressFn));\n activeXhrs.push(segmentXhr);\n return function () {\n return abortAll(activeXhrs);\n };\n}; // Utilities\n\n/**\n * Returns the CSS value for the specified property on an element\n * using `getComputedStyle`. Firefox has a long-standing issue where\n * getComputedStyle() may return null when running in an iframe with\n * `display: none`.\n *\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n * @param {HTMLElement} el the htmlelement to work on\n * @param {string} the proprety to get the style for\n */\n\n\nvar safeGetComputedStyle = function safeGetComputedStyle(el, property) {\n var result = void 0;\n\n if (!el) {\n return '';\n }\n\n result = window$1.getComputedStyle(el);\n\n if (!result) {\n return '';\n }\n\n return result[property];\n};\n/**\n * Resuable stable sort function\n *\n * @param {Playlists} array\n * @param {Function} sortFn Different comparators\n * @function stableSort\n */\n\n\nvar stableSort = function stableSort(array, sortFn) {\n var newArray = array.slice();\n array.sort(function (left, right) {\n var cmp = sortFn(left, right);\n\n if (cmp === 0) {\n return newArray.indexOf(left) - newArray.indexOf(right);\n }\n\n return cmp;\n });\n};\n/**\n * A comparator function to sort two playlist object by bandwidth.\n *\n * @param {Object} left a media playlist object\n * @param {Object} right a media playlist object\n * @return {Number} Greater than zero if the bandwidth attribute of\n * left is greater than the corresponding attribute of right. Less\n * than zero if the bandwidth of right is greater than left and\n * exactly zero if the two are equal.\n */\n\n\nvar comparePlaylistBandwidth = function comparePlaylistBandwidth(left, right) {\n var leftBandwidth = void 0;\n var rightBandwidth = void 0;\n\n if (left.attributes.BANDWIDTH) {\n leftBandwidth = left.attributes.BANDWIDTH;\n }\n\n leftBandwidth = leftBandwidth || window$1.Number.MAX_VALUE;\n\n if (right.attributes.BANDWIDTH) {\n rightBandwidth = right.attributes.BANDWIDTH;\n }\n\n rightBandwidth = rightBandwidth || window$1.Number.MAX_VALUE;\n return leftBandwidth - rightBandwidth;\n};\n/**\n * A comparator function to sort two playlist object by resolution (width).\n * @param {Object} left a media playlist object\n * @param {Object} right a media playlist object\n * @return {Number} Greater than zero if the resolution.width attribute of\n * left is greater than the corresponding attribute of right. Less\n * than zero if the resolution.width of right is greater than left and\n * exactly zero if the two are equal.\n */\n\n\nvar comparePlaylistResolution = function comparePlaylistResolution(left, right) {\n var leftWidth = void 0;\n var rightWidth = void 0;\n\n if (left.attributes.RESOLUTION && left.attributes.RESOLUTION.width) {\n leftWidth = left.attributes.RESOLUTION.width;\n }\n\n leftWidth = leftWidth || window$1.Number.MAX_VALUE;\n\n if (right.attributes.RESOLUTION && right.attributes.RESOLUTION.width) {\n rightWidth = right.attributes.RESOLUTION.width;\n }\n\n rightWidth = rightWidth || window$1.Number.MAX_VALUE; // NOTE - Fallback to bandwidth sort as appropriate in cases where multiple renditions\n // have the same media dimensions/ resolution\n\n if (leftWidth === rightWidth && left.attributes.BANDWIDTH && right.attributes.BANDWIDTH) {\n return left.attributes.BANDWIDTH - right.attributes.BANDWIDTH;\n }\n\n return leftWidth - rightWidth;\n};\n/**\n * Chooses the appropriate media playlist based on bandwidth and player size\n *\n * @param {Object} master\n * Object representation of the master manifest\n * @param {Number} playerBandwidth\n * Current calculated bandwidth of the player\n * @param {Number} playerWidth\n * Current width of the player element\n * @param {Number} playerHeight\n * Current height of the player element\n * @param {Boolean} limitRenditionByPlayerDimensions\n * True if the player width and height should be used during the selection, false otherwise\n * @return {Playlist} the highest bitrate playlist less than the\n * currently detected bandwidth, accounting for some amount of\n * bandwidth variance\n */\n\n\nvar simpleSelector = function simpleSelector(master, playerBandwidth, playerWidth, playerHeight, limitRenditionByPlayerDimensions) {\n // convert the playlists to an intermediary representation to make comparisons easier\n var sortedPlaylistReps = master.playlists.map(function (playlist) {\n var width = void 0;\n var height = void 0;\n var bandwidth = void 0;\n width = playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.width;\n height = playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height;\n bandwidth = playlist.attributes.BANDWIDTH;\n bandwidth = bandwidth || window$1.Number.MAX_VALUE;\n return {\n bandwidth: bandwidth,\n width: width,\n height: height,\n playlist: playlist\n };\n });\n stableSort(sortedPlaylistReps, function (left, right) {\n return left.bandwidth - right.bandwidth;\n }); // filter out any playlists that have been excluded due to\n // incompatible configurations\n\n sortedPlaylistReps = sortedPlaylistReps.filter(function (rep) {\n return !Playlist.isIncompatible(rep.playlist);\n }); // filter out any playlists that have been disabled manually through the representations\n // api or blacklisted temporarily due to playback errors.\n\n var enabledPlaylistReps = sortedPlaylistReps.filter(function (rep) {\n return Playlist.isEnabled(rep.playlist);\n });\n\n if (!enabledPlaylistReps.length) {\n // if there are no enabled playlists, then they have all been blacklisted or disabled\n // by the user through the representations api. In this case, ignore blacklisting and\n // fallback to what the user wants by using playlists the user has not disabled.\n enabledPlaylistReps = sortedPlaylistReps.filter(function (rep) {\n return !Playlist.isDisabled(rep.playlist);\n });\n } // filter out any variant that has greater effective bitrate\n // than the current estimated bandwidth\n\n\n var bandwidthPlaylistReps = enabledPlaylistReps.filter(function (rep) {\n return rep.bandwidth * Config.BANDWIDTH_VARIANCE < playerBandwidth;\n });\n var highestRemainingBandwidthRep = bandwidthPlaylistReps[bandwidthPlaylistReps.length - 1]; // get all of the renditions with the same (highest) bandwidth\n // and then taking the very first element\n\n var bandwidthBestRep = bandwidthPlaylistReps.filter(function (rep) {\n return rep.bandwidth === highestRemainingBandwidthRep.bandwidth;\n })[0]; // if we're not going to limit renditions by player size, make an early decision.\n\n if (limitRenditionByPlayerDimensions === false) {\n var _chosenRep = bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n\n return _chosenRep ? _chosenRep.playlist : null;\n } // filter out playlists without resolution information\n\n\n var haveResolution = bandwidthPlaylistReps.filter(function (rep) {\n return rep.width && rep.height;\n }); // sort variants by resolution\n\n stableSort(haveResolution, function (left, right) {\n return left.width - right.width;\n }); // if we have the exact resolution as the player use it\n\n var resolutionBestRepList = haveResolution.filter(function (rep) {\n return rep.width === playerWidth && rep.height === playerHeight;\n });\n highestRemainingBandwidthRep = resolutionBestRepList[resolutionBestRepList.length - 1]; // ensure that we pick the highest bandwidth variant that have exact resolution\n\n var resolutionBestRep = resolutionBestRepList.filter(function (rep) {\n return rep.bandwidth === highestRemainingBandwidthRep.bandwidth;\n })[0];\n var resolutionPlusOneList = void 0;\n var resolutionPlusOneSmallest = void 0;\n var resolutionPlusOneRep = void 0; // find the smallest variant that is larger than the player\n // if there is no match of exact resolution\n\n if (!resolutionBestRep) {\n resolutionPlusOneList = haveResolution.filter(function (rep) {\n return rep.width > playerWidth || rep.height > playerHeight;\n }); // find all the variants have the same smallest resolution\n\n resolutionPlusOneSmallest = resolutionPlusOneList.filter(function (rep) {\n return rep.width === resolutionPlusOneList[0].width && rep.height === resolutionPlusOneList[0].height;\n }); // ensure that we also pick the highest bandwidth variant that\n // is just-larger-than the video player\n\n highestRemainingBandwidthRep = resolutionPlusOneSmallest[resolutionPlusOneSmallest.length - 1];\n resolutionPlusOneRep = resolutionPlusOneSmallest.filter(function (rep) {\n return rep.bandwidth === highestRemainingBandwidthRep.bandwidth;\n })[0];\n } // fallback chain of variants\n\n\n var chosenRep = resolutionPlusOneRep || resolutionBestRep || bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n return chosenRep ? chosenRep.playlist : null;\n}; // Playlist Selectors\n\n/**\n * Chooses the appropriate media playlist based on the most recent\n * bandwidth estimate and the player size.\n *\n * Expects to be called within the context of an instance of HlsHandler\n *\n * @return {Playlist} the highest bitrate playlist less than the\n * currently detected bandwidth, accounting for some amount of\n * bandwidth variance\n */\n\n\nvar lastBandwidthSelector = function lastBandwidthSelector() {\n return simpleSelector(this.playlists.master, this.systemBandwidth, parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10), parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10), this.limitRenditionByPlayerDimensions);\n};\n/**\n * Chooses the appropriate media playlist based on the potential to rebuffer\n *\n * @param {Object} settings\n * Object of information required to use this selector\n * @param {Object} settings.master\n * Object representation of the master manifest\n * @param {Number} settings.currentTime\n * The current time of the player\n * @param {Number} settings.bandwidth\n * Current measured bandwidth\n * @param {Number} settings.duration\n * Duration of the media\n * @param {Number} settings.segmentDuration\n * Segment duration to be used in round trip time calculations\n * @param {Number} settings.timeUntilRebuffer\n * Time left in seconds until the player has to rebuffer\n * @param {Number} settings.currentTimeline\n * The current timeline segments are being loaded from\n * @param {SyncController} settings.syncController\n * SyncController for determining if we have a sync point for a given playlist\n * @return {Object|null}\n * {Object} return.playlist\n * The highest bandwidth playlist with the least amount of rebuffering\n * {Number} return.rebufferingImpact\n * The amount of time in seconds switching to this playlist will rebuffer. A\n * negative value means that switching will cause zero rebuffering.\n */\n\n\nvar minRebufferMaxBandwidthSelector = function minRebufferMaxBandwidthSelector(settings) {\n var master = settings.master,\n currentTime = settings.currentTime,\n bandwidth = settings.bandwidth,\n duration$$1 = settings.duration,\n segmentDuration = settings.segmentDuration,\n timeUntilRebuffer = settings.timeUntilRebuffer,\n currentTimeline = settings.currentTimeline,\n syncController = settings.syncController; // filter out any playlists that have been excluded due to\n // incompatible configurations\n\n var compatiblePlaylists = master.playlists.filter(function (playlist) {\n return !Playlist.isIncompatible(playlist);\n }); // filter out any playlists that have been disabled manually through the representations\n // api or blacklisted temporarily due to playback errors.\n\n var enabledPlaylists = compatiblePlaylists.filter(Playlist.isEnabled);\n\n if (!enabledPlaylists.length) {\n // if there are no enabled playlists, then they have all been blacklisted or disabled\n // by the user through the representations api. In this case, ignore blacklisting and\n // fallback to what the user wants by using playlists the user has not disabled.\n enabledPlaylists = compatiblePlaylists.filter(function (playlist) {\n return !Playlist.isDisabled(playlist);\n });\n }\n\n var bandwidthPlaylists = enabledPlaylists.filter(Playlist.hasAttribute.bind(null, 'BANDWIDTH'));\n var rebufferingEstimates = bandwidthPlaylists.map(function (playlist) {\n var syncPoint = syncController.getSyncPoint(playlist, duration$$1, currentTimeline, currentTime); // If there is no sync point for this playlist, switching to it will require a\n // sync request first. This will double the request time\n\n var numRequests = syncPoint ? 1 : 2;\n var requestTimeEstimate = Playlist.estimateSegmentRequestTime(segmentDuration, bandwidth, playlist);\n var rebufferingImpact = requestTimeEstimate * numRequests - timeUntilRebuffer;\n return {\n playlist: playlist,\n rebufferingImpact: rebufferingImpact\n };\n });\n var noRebufferingPlaylists = rebufferingEstimates.filter(function (estimate) {\n return estimate.rebufferingImpact <= 0;\n }); // Sort by bandwidth DESC\n\n stableSort(noRebufferingPlaylists, function (a, b) {\n return comparePlaylistBandwidth(b.playlist, a.playlist);\n });\n\n if (noRebufferingPlaylists.length) {\n return noRebufferingPlaylists[0];\n }\n\n stableSort(rebufferingEstimates, function (a, b) {\n return a.rebufferingImpact - b.rebufferingImpact;\n });\n return rebufferingEstimates[0] || null;\n};\n/**\n * Chooses the appropriate media playlist, which in this case is the lowest bitrate\n * one with video. If no renditions with video exist, return the lowest audio rendition.\n *\n * Expects to be called within the context of an instance of HlsHandler\n *\n * @return {Object|null}\n * {Object} return.playlist\n * The lowest bitrate playlist that contains a video codec. If no such rendition\n * exists pick the lowest audio rendition.\n */\n\n\nvar lowestBitrateCompatibleVariantSelector = function lowestBitrateCompatibleVariantSelector() {\n // filter out any playlists that have been excluded due to\n // incompatible configurations or playback errors\n var playlists = this.playlists.master.playlists.filter(Playlist.isEnabled); // Sort ascending by bitrate\n\n stableSort(playlists, function (a, b) {\n return comparePlaylistBandwidth(a, b);\n }); // Parse and assume that playlists with no video codec have no video\n // (this is not necessarily true, although it is generally true).\n //\n // If an entire manifest has no valid videos everything will get filtered\n // out.\n\n var playlistsWithVideo = playlists.filter(function (playlist) {\n return parseCodecs(playlist.attributes.CODECS).videoCodec;\n });\n return playlistsWithVideo[0] || null;\n};\n/**\n * Create captions text tracks on video.js if they do not exist\n *\n * @param {Object} inbandTextTracks a reference to current inbandTextTracks\n * @param {Object} tech the video.js tech\n * @param {Object} captionStreams the caption streams to create\n * @private\n */\n\n\nvar createCaptionsTrackIfNotExists = function createCaptionsTrackIfNotExists(inbandTextTracks, tech, captionStreams) {\n for (var trackId in captionStreams) {\n if (!inbandTextTracks[trackId]) {\n tech.trigger({\n type: 'usage',\n name: 'hls-608'\n });\n var track = tech.textTracks().getTrackById(trackId);\n\n if (track) {\n // Resuse an existing track with a CC# id because this was\n // very likely created by videojs-contrib-hls from information\n // in the m3u8 for us to use\n inbandTextTracks[trackId] = track;\n } else {\n // Otherwise, create a track with the default `CC#` label and\n // without a language\n inbandTextTracks[trackId] = tech.addRemoteTextTrack({\n kind: 'captions',\n id: trackId,\n label: trackId\n }, false).track;\n }\n }\n }\n};\n\nvar addCaptionData = function addCaptionData(_ref) {\n var inbandTextTracks = _ref.inbandTextTracks,\n captionArray = _ref.captionArray,\n timestampOffset = _ref.timestampOffset;\n\n if (!captionArray) {\n return;\n }\n\n var Cue = window.WebKitDataCue || window.VTTCue;\n captionArray.forEach(function (caption) {\n var track = caption.stream;\n var startTime = caption.startTime;\n var endTime = caption.endTime;\n\n if (!inbandTextTracks[track]) {\n return;\n }\n\n startTime += timestampOffset;\n endTime += timestampOffset;\n inbandTextTracks[track].addCue(new Cue(startTime, endTime, caption.text));\n });\n};\n/**\n * @file segment-loader.js\n */\n// in ms\n\n\nvar CHECK_BUFFER_DELAY = 500;\n/**\n * Determines if we should call endOfStream on the media source based\n * on the state of the buffer or if appened segment was the final\n * segment in the playlist.\n *\n * @param {Object} playlist a media playlist object\n * @param {Object} mediaSource the MediaSource object\n * @param {Number} segmentIndex the index of segment we last appended\n * @returns {Boolean} do we need to call endOfStream on the MediaSource\n */\n\nvar detectEndOfStream = function detectEndOfStream(playlist, mediaSource, segmentIndex) {\n if (!playlist || !mediaSource) {\n return false;\n }\n\n var segments = playlist.segments; // determine a few boolean values to help make the branch below easier\n // to read\n\n var appendedLastSegment = segmentIndex === segments.length; // if we've buffered to the end of the video, we need to call endOfStream\n // so that MediaSources can trigger the `ended` event when it runs out of\n // buffered data instead of waiting for me\n\n return playlist.endList && mediaSource.readyState === 'open' && appendedLastSegment;\n};\n\nvar finite = function finite(num) {\n return typeof num === 'number' && isFinite(num);\n};\n\nvar illegalMediaSwitch = function illegalMediaSwitch(loaderType, startingMedia, newSegmentMedia) {\n // Although these checks should most likely cover non 'main' types, for now it narrows\n // the scope of our checks.\n if (loaderType !== 'main' || !startingMedia || !newSegmentMedia) {\n return null;\n }\n\n if (!newSegmentMedia.containsAudio && !newSegmentMedia.containsVideo) {\n return 'Neither audio nor video found in segment.';\n }\n\n if (startingMedia.containsVideo && !newSegmentMedia.containsVideo) {\n 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.';\n }\n\n if (!startingMedia.containsVideo && newSegmentMedia.containsVideo) {\n 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.';\n }\n\n return null;\n};\n/**\n * Calculates a time value that is safe to remove from the back buffer without interupting\n * playback.\n *\n * @param {TimeRange} seekable\n * The current seekable range\n * @param {Number} currentTime\n * The current time of the player\n * @param {Number} targetDuration\n * The target duration of the current playlist\n * @return {Number}\n * Time that is safe to remove from the back buffer without interupting playback\n */\n\n\nvar safeBackBufferTrimTime = function safeBackBufferTrimTime(seekable$$1, currentTime, targetDuration) {\n var removeToTime = void 0;\n\n if (seekable$$1.length && seekable$$1.start(0) > 0 && seekable$$1.start(0) < currentTime) {\n // If we have a seekable range use that as the limit for what can be removed safely\n removeToTime = seekable$$1.start(0);\n } else {\n // otherwise remove anything older than 30 seconds before the current play head\n removeToTime = currentTime - 30;\n } // Don't allow removing from the buffer within target duration of current time\n // to avoid the possibility of removing the GOP currently being played which could\n // cause playback stalls.\n\n\n return Math.min(removeToTime, currentTime - targetDuration);\n};\n\nvar segmentInfoString = function segmentInfoString(segmentInfo) {\n var _segmentInfo$segment = segmentInfo.segment,\n start = _segmentInfo$segment.start,\n end = _segmentInfo$segment.end,\n _segmentInfo$playlist = segmentInfo.playlist,\n seq = _segmentInfo$playlist.mediaSequence,\n id = _segmentInfo$playlist.id,\n _segmentInfo$playlist2 = _segmentInfo$playlist.segments,\n segments = _segmentInfo$playlist2 === undefined ? [] : _segmentInfo$playlist2,\n index = segmentInfo.mediaIndex,\n timeline = segmentInfo.timeline;\n return ['appending [' + index + '] of [' + seq + ', ' + (seq + segments.length) + '] from playlist [' + id + ']', '[' + start + ' => ' + end + '] in timeline [' + timeline + ']'].join(' ');\n};\n/**\n * An object that manages segment loading and appending.\n *\n * @class SegmentLoader\n * @param {Object} options required and optional options\n * @extends videojs.EventTarget\n */\n\n\nvar SegmentLoader = function (_videojs$EventTarget) {\n inherits(SegmentLoader, _videojs$EventTarget);\n\n function SegmentLoader(settings) {\n classCallCheck(this, SegmentLoader); // check pre-conditions\n\n var _this = possibleConstructorReturn(this, (SegmentLoader.__proto__ || Object.getPrototypeOf(SegmentLoader)).call(this));\n\n if (!settings) {\n throw new TypeError('Initialization settings are required');\n }\n\n if (typeof settings.currentTime !== 'function') {\n throw new TypeError('No currentTime getter specified');\n }\n\n if (!settings.mediaSource) {\n throw new TypeError('No MediaSource specified');\n } // public properties\n\n\n _this.bandwidth = settings.bandwidth;\n _this.throughput = {\n rate: 0,\n count: 0\n };\n _this.roundTrip = NaN;\n\n _this.resetStats_();\n\n _this.mediaIndex = null; // private settings\n\n _this.hasPlayed_ = settings.hasPlayed;\n _this.currentTime_ = settings.currentTime;\n _this.seekable_ = settings.seekable;\n _this.seeking_ = settings.seeking;\n _this.duration_ = settings.duration;\n _this.mediaSource_ = settings.mediaSource;\n _this.hls_ = settings.hls;\n _this.loaderType_ = settings.loaderType;\n _this.startingMedia_ = void 0;\n _this.segmentMetadataTrack_ = settings.segmentMetadataTrack;\n _this.goalBufferLength_ = settings.goalBufferLength;\n _this.sourceType_ = settings.sourceType;\n _this.inbandTextTracks_ = settings.inbandTextTracks;\n _this.state_ = 'INIT'; // private instance variables\n\n _this.checkBufferTimeout_ = null;\n _this.error_ = void 0;\n _this.currentTimeline_ = -1;\n _this.pendingSegment_ = null;\n _this.mimeType_ = null;\n _this.sourceUpdater_ = null;\n _this.xhrOptions_ = null; // Fragmented mp4 playback\n\n _this.activeInitSegmentId_ = null;\n _this.initSegments_ = {}; // HLSe playback\n\n _this.cacheEncryptionKeys_ = settings.cacheEncryptionKeys;\n _this.keyCache_ = {}; // Fmp4 CaptionParser\n\n if (_this.loaderType_ === 'main') {\n _this.captionParser_ = new CaptionParser();\n } else {\n _this.captionParser_ = null;\n }\n\n _this.decrypter_ = settings.decrypter; // Manages the tracking and generation of sync-points, mappings\n // between a time in the display time and a segment index within\n // a playlist\n\n _this.syncController_ = settings.syncController;\n _this.syncPoint_ = {\n segmentIndex: 0,\n time: 0\n };\n\n _this.syncController_.on('syncinfoupdate', function () {\n return _this.trigger('syncinfoupdate');\n });\n\n _this.mediaSource_.addEventListener('sourceopen', function () {\n return _this.ended_ = false;\n }); // ...for determining the fetch location\n\n\n _this.fetchAtBuffer_ = false;\n _this.logger_ = logger('SegmentLoader[' + _this.loaderType_ + ']');\n Object.defineProperty(_this, 'state', {\n get: function get$$1() {\n return this.state_;\n },\n set: function set$$1(newState) {\n if (newState !== this.state_) {\n this.logger_(this.state_ + ' -> ' + newState);\n this.state_ = newState;\n }\n }\n });\n return _this;\n }\n /**\n * reset all of our media stats\n *\n * @private\n */\n\n\n createClass(SegmentLoader, [{\n key: 'resetStats_',\n value: function resetStats_() {\n this.mediaBytesTransferred = 0;\n this.mediaRequests = 0;\n this.mediaRequestsAborted = 0;\n this.mediaRequestsTimedout = 0;\n this.mediaRequestsErrored = 0;\n this.mediaTransferDuration = 0;\n this.mediaSecondsLoaded = 0;\n }\n /**\n * dispose of the SegmentLoader and reset to the default state\n */\n\n }, {\n key: 'dispose',\n value: function dispose() {\n this.state = 'DISPOSED';\n this.pause();\n this.abort_();\n\n if (this.sourceUpdater_) {\n this.sourceUpdater_.dispose();\n }\n\n this.resetStats_();\n\n if (this.captionParser_) {\n this.captionParser_.reset();\n }\n }\n /**\n * abort anything that is currently doing on with the SegmentLoader\n * and reset to a default state\n */\n\n }, {\n key: 'abort',\n value: function abort() {\n if (this.state !== 'WAITING') {\n if (this.pendingSegment_) {\n this.pendingSegment_ = null;\n }\n\n return;\n }\n\n this.abort_(); // We aborted the requests we were waiting on, so reset the loader's state to READY\n // since we are no longer \"waiting\" on any requests. XHR callback is not always run\n // when the request is aborted. This will prevent the loader from being stuck in the\n // WAITING state indefinitely.\n\n this.state = 'READY'; // don't wait for buffer check timeouts to begin fetching the\n // next segment\n\n if (!this.paused()) {\n this.monitorBuffer_();\n }\n }\n /**\n * abort all pending xhr requests and null any pending segements\n *\n * @private\n */\n\n }, {\n key: 'abort_',\n value: function abort_() {\n if (this.pendingSegment_) {\n this.pendingSegment_.abortRequests();\n } // clear out the segment being processed\n\n\n this.pendingSegment_ = null;\n }\n /**\n * set an error on the segment loader and null out any pending segements\n *\n * @param {Error} error the error to set on the SegmentLoader\n * @return {Error} the error that was set or that is currently set\n */\n\n }, {\n key: 'error',\n value: function error(_error) {\n if (typeof _error !== 'undefined') {\n this.error_ = _error;\n }\n\n this.pendingSegment_ = null;\n return this.error_;\n }\n }, {\n key: 'endOfStream',\n value: function endOfStream() {\n this.ended_ = true;\n this.pause();\n this.trigger('ended');\n }\n /**\n * Indicates which time ranges are buffered\n *\n * @return {TimeRange}\n * TimeRange object representing the current buffered ranges\n */\n\n }, {\n key: 'buffered_',\n value: function buffered_() {\n if (!this.sourceUpdater_) {\n return videojs$1.createTimeRanges();\n }\n\n return this.sourceUpdater_.buffered();\n }\n /**\n * Gets and sets init segment for the provided map\n *\n * @param {Object} map\n * The map object representing the init segment to get or set\n * @param {Boolean=} set\n * If true, the init segment for the provided map should be saved\n * @return {Object}\n * map object for desired init segment\n */\n\n }, {\n key: 'initSegment',\n value: function initSegment(map) {\n var set$$1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!map) {\n return null;\n }\n\n var id = initSegmentId(map);\n var storedMap = this.initSegments_[id];\n\n if (set$$1 && !storedMap && map.bytes) {\n this.initSegments_[id] = storedMap = {\n resolvedUri: map.resolvedUri,\n byterange: map.byterange,\n bytes: map.bytes,\n timescales: map.timescales,\n videoTrackIds: map.videoTrackIds\n };\n }\n\n return storedMap || map;\n }\n /**\n * Gets and sets key for the provided key\n *\n * @param {Object} key\n * The key object representing the key to get or set\n * @param {Boolean=} set\n * If true, the key for the provided key should be saved\n * @return {Object}\n * Key object for desired key\n */\n\n }, {\n key: 'segmentKey',\n value: function segmentKey(key) {\n var set$$1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!key) {\n return null;\n }\n\n var id = segmentKeyId(key);\n var storedKey = this.keyCache_[id]; // TODO: We should use the HTTP Expires header to invalidate our cache per\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-6.2.3\n\n if (this.cacheEncryptionKeys_ && set$$1 && !storedKey && key.bytes) {\n this.keyCache_[id] = storedKey = {\n resolvedUri: key.resolvedUri,\n bytes: key.bytes\n };\n }\n\n var result = {\n resolvedUri: (storedKey || key).resolvedUri\n };\n\n if (storedKey) {\n result.bytes = storedKey.bytes;\n }\n\n return result;\n }\n /**\n * Returns true if all configuration required for loading is present, otherwise false.\n *\n * @return {Boolean} True if the all configuration is ready for loading\n * @private\n */\n\n }, {\n key: 'couldBeginLoading_',\n value: function couldBeginLoading_() {\n return this.playlist_ && ( // the source updater is created when init_ is called, so either having a\n // source updater or being in the INIT state with a mimeType is enough\n // to say we have all the needed configuration to start loading.\n this.sourceUpdater_ || this.mimeType_ && this.state === 'INIT') && !this.paused();\n }\n /**\n * load a playlist and start to fill the buffer\n */\n\n }, {\n key: 'load',\n value: function load() {\n // un-pause\n this.monitorBuffer_(); // if we don't have a playlist yet, keep waiting for one to be\n // specified\n\n if (!this.playlist_) {\n return;\n } // not sure if this is the best place for this\n\n\n this.syncController_.setDateTimeMapping(this.playlist_); // if all the configuration is ready, initialize and begin loading\n\n if (this.state === 'INIT' && this.couldBeginLoading_()) {\n return this.init_();\n } // if we're in the middle of processing a segment already, don't\n // kick off an additional segment request\n\n\n if (!this.couldBeginLoading_() || this.state !== 'READY' && this.state !== 'INIT') {\n return;\n }\n\n this.state = 'READY';\n }\n /**\n * Once all the starting parameters have been specified, begin\n * operation. This method should only be invoked from the INIT\n * state.\n *\n * @private\n */\n\n }, {\n key: 'init_',\n value: function init_() {\n this.state = 'READY';\n this.sourceUpdater_ = new SourceUpdater(this.mediaSource_, this.mimeType_, this.loaderType_, this.sourceBufferEmitter_);\n this.resetEverything();\n return this.monitorBuffer_();\n }\n /**\n * set a playlist on the segment loader\n *\n * @param {PlaylistLoader} media the playlist to set on the segment loader\n */\n\n }, {\n key: 'playlist',\n value: function playlist(newPlaylist) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!newPlaylist) {\n return;\n }\n\n var oldPlaylist = this.playlist_;\n var segmentInfo = this.pendingSegment_;\n this.playlist_ = newPlaylist;\n this.xhrOptions_ = options; // when we haven't started playing yet, the start of a live playlist\n // is always our zero-time so force a sync update each time the playlist\n // is refreshed from the server\n\n if (!this.hasPlayed_()) {\n newPlaylist.syncInfo = {\n mediaSequence: newPlaylist.mediaSequence,\n time: 0\n };\n }\n\n var oldId = null;\n\n if (oldPlaylist) {\n if (oldPlaylist.id) {\n oldId = oldPlaylist.id;\n } else if (oldPlaylist.uri) {\n oldId = oldPlaylist.uri;\n }\n }\n\n this.logger_('playlist update [' + oldId + ' => ' + (newPlaylist.id || newPlaylist.uri) + ']'); // in VOD, this is always a rendition switch (or we updated our syncInfo above)\n // in LIVE, we always want to update with new playlists (including refreshes)\n\n this.trigger('syncinfoupdate'); // if we were unpaused but waiting for a playlist, start\n // buffering now\n\n if (this.state === 'INIT' && this.couldBeginLoading_()) {\n return this.init_();\n }\n\n if (!oldPlaylist || oldPlaylist.uri !== newPlaylist.uri) {\n if (this.mediaIndex !== null) {\n // we must \"resync\" the segment loader when we switch renditions and\n // the segment loader is already synced to the previous rendition\n this.resyncLoader();\n } // the rest of this function depends on `oldPlaylist` being defined\n\n\n return;\n } // we reloaded the same playlist so we are in a live scenario\n // and we will likely need to adjust the mediaIndex\n\n\n var mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence;\n this.logger_('live window shift [' + mediaSequenceDiff + ']'); // update the mediaIndex on the SegmentLoader\n // this is important because we can abort a request and this value must be\n // equal to the last appended mediaIndex\n\n if (this.mediaIndex !== null) {\n this.mediaIndex -= mediaSequenceDiff;\n } // update the mediaIndex on the SegmentInfo object\n // this is important because we will update this.mediaIndex with this value\n // in `handleUpdateEnd_` after the segment has been successfully appended\n\n\n if (segmentInfo) {\n segmentInfo.mediaIndex -= mediaSequenceDiff; // we need to update the referenced segment so that timing information is\n // saved for the new playlist's segment, however, if the segment fell off the\n // playlist, we can leave the old reference and just lose the timing info\n\n if (segmentInfo.mediaIndex >= 0) {\n segmentInfo.segment = newPlaylist.segments[segmentInfo.mediaIndex];\n }\n }\n\n this.syncController_.saveExpiredSegmentInfo(oldPlaylist, newPlaylist);\n }\n /**\n * Prevent the loader from fetching additional segments. If there\n * is a segment request outstanding, it will finish processing\n * before the loader halts. A segment loader can be unpaused by\n * calling load().\n */\n\n }, {\n key: 'pause',\n value: function pause() {\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n this.checkBufferTimeout_ = null;\n }\n }\n /**\n * Returns whether the segment loader is fetching additional\n * segments when given the opportunity. This property can be\n * modified through calls to pause() and load().\n */\n\n }, {\n key: 'paused',\n value: function paused() {\n return this.checkBufferTimeout_ === null;\n }\n /**\n * create/set the following mimetype on the SourceBuffer through a\n * SourceUpdater\n *\n * @param {String} mimeType the mime type string to use\n * @param {Object} sourceBufferEmitter an event emitter that fires when a source buffer\n * is added to the media source\n */\n\n }, {\n key: 'mimeType',\n value: function mimeType(_mimeType, sourceBufferEmitter) {\n if (this.mimeType_) {\n return;\n }\n\n this.mimeType_ = _mimeType;\n this.sourceBufferEmitter_ = sourceBufferEmitter; // if we were unpaused but waiting for a sourceUpdater, start\n // buffering now\n\n if (this.state === 'INIT' && this.couldBeginLoading_()) {\n this.init_();\n }\n }\n /**\n * Delete all the buffered data and reset the SegmentLoader\n * @param {Function} [done] an optional callback to be executed when the remove\n * operation is complete\n */\n\n }, {\n key: 'resetEverything',\n value: function resetEverything(done) {\n this.ended_ = false;\n this.resetLoader();\n this.remove(0, this.duration_(), done); // clears fmp4 captions\n\n if (this.captionParser_) {\n this.captionParser_.clearAllCaptions();\n }\n\n this.trigger('reseteverything');\n }\n /**\n * Force the SegmentLoader to resync and start loading around the currentTime instead\n * of starting at the end of the buffer\n *\n * Useful for fast quality changes\n */\n\n }, {\n key: 'resetLoader',\n value: function resetLoader() {\n this.fetchAtBuffer_ = false;\n this.resyncLoader();\n }\n /**\n * Force the SegmentLoader to restart synchronization and make a conservative guess\n * before returning to the simple walk-forward method\n */\n\n }, {\n key: 'resyncLoader',\n value: function resyncLoader() {\n this.mediaIndex = null;\n this.syncPoint_ = null;\n this.abort();\n }\n /**\n * Remove any data in the source buffer between start and end times\n * @param {Number} start - the start time of the region to remove from the buffer\n * @param {Number} end - the end time of the region to remove from the buffer\n * @param {Function} [done] - an optional callback to be executed when the remove\n * operation is complete\n */\n\n }, {\n key: 'remove',\n value: function remove(start, end, done) {\n if (this.sourceUpdater_) {\n this.sourceUpdater_.remove(start, end, done);\n }\n\n removeCuesFromTrack(start, end, this.segmentMetadataTrack_);\n\n if (this.inbandTextTracks_) {\n for (var id in this.inbandTextTracks_) {\n removeCuesFromTrack(start, end, this.inbandTextTracks_[id]);\n }\n }\n }\n /**\n * (re-)schedule monitorBufferTick_ to run as soon as possible\n *\n * @private\n */\n\n }, {\n key: 'monitorBuffer_',\n value: function monitorBuffer_() {\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n }\n\n this.checkBufferTimeout_ = window$1.setTimeout(this.monitorBufferTick_.bind(this), 1);\n }\n /**\n * As long as the SegmentLoader is in the READY state, periodically\n * invoke fillBuffer_().\n *\n * @private\n */\n\n }, {\n key: 'monitorBufferTick_',\n value: function monitorBufferTick_() {\n if (this.state === 'READY') {\n this.fillBuffer_();\n }\n\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n }\n\n this.checkBufferTimeout_ = window$1.setTimeout(this.monitorBufferTick_.bind(this), CHECK_BUFFER_DELAY);\n }\n /**\n * fill the buffer with segements unless the sourceBuffers are\n * currently updating\n *\n * Note: this function should only ever be called by monitorBuffer_\n * and never directly\n *\n * @private\n */\n\n }, {\n key: 'fillBuffer_',\n value: function fillBuffer_() {\n if (this.sourceUpdater_.updating()) {\n return;\n }\n\n if (!this.syncPoint_) {\n this.syncPoint_ = this.syncController_.getSyncPoint(this.playlist_, this.duration_(), this.currentTimeline_, this.currentTime_());\n } // see if we need to begin loading immediately\n\n\n var segmentInfo = this.checkBuffer_(this.buffered_(), this.playlist_, this.mediaIndex, this.hasPlayed_(), this.currentTime_(), this.syncPoint_);\n\n if (!segmentInfo) {\n return;\n }\n\n if (this.isEndOfStream_(segmentInfo.mediaIndex)) {\n this.endOfStream();\n return;\n }\n\n if (segmentInfo.mediaIndex === this.playlist_.segments.length - 1 && this.mediaSource_.readyState === 'ended' && !this.seeking_()) {\n return;\n } // We will need to change timestampOffset of the sourceBuffer if:\n // - The segment.timeline !== this.currentTimeline\n // (we are crossing a discontinuity somehow)\n // - The \"timestampOffset\" for the start of this segment is less than\n // the currently set timestampOffset\n // Also, clear captions if we are crossing a discontinuity boundary\n // Previously, we changed the timestampOffset if the start of this segment\n // is less than the currently set timestampOffset but this isn't wanted\n // as it can produce bad behavior, especially around long running\n // live streams\n\n\n if (segmentInfo.timeline !== this.currentTimeline_) {\n this.syncController_.reset();\n segmentInfo.timestampOffset = segmentInfo.startOfSegment;\n\n if (this.captionParser_) {\n this.captionParser_.clearAllCaptions();\n }\n }\n\n this.loadSegment_(segmentInfo);\n }\n /**\n * Determines if this segment loader is at the end of it's stream.\n *\n * @param {Number} mediaIndex the index of segment we last appended\n * @param {Object} [playlist=this.playlist_] a media playlist object\n * @returns {Boolean} true if at end of stream, false otherwise.\n */\n\n }, {\n key: 'isEndOfStream_',\n value: function isEndOfStream_(mediaIndex) {\n var playlist = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.playlist_;\n return detectEndOfStream(playlist, this.mediaSource_, mediaIndex) && !this.sourceUpdater_.updating();\n }\n /**\n * Determines what segment request should be made, given current playback\n * state.\n *\n * @param {TimeRanges} buffered - the state of the buffer\n * @param {Object} playlist - the playlist object to fetch segments from\n * @param {Number} mediaIndex - the previous mediaIndex fetched or null\n * @param {Boolean} hasPlayed - a flag indicating whether we have played or not\n * @param {Number} currentTime - the playback position in seconds\n * @param {Object} syncPoint - a segment info object that describes the\n * @returns {Object} a segment request object that describes the segment to load\n */\n\n }, {\n key: 'checkBuffer_',\n value: function checkBuffer_(buffered, playlist, mediaIndex, hasPlayed, currentTime, syncPoint) {\n var lastBufferedEnd = 0;\n var startOfSegment = void 0;\n\n if (buffered.length) {\n lastBufferedEnd = buffered.end(buffered.length - 1);\n }\n\n var bufferedTime = Math.max(0, lastBufferedEnd - currentTime);\n\n if (!playlist.segments.length) {\n return null;\n } // if there is plenty of content buffered, and the video has\n // been played before relax for awhile\n\n\n if (bufferedTime >= this.goalBufferLength_()) {\n return null;\n } // if the video has not yet played once, and we already have\n // one segment downloaded do nothing\n\n\n if (!hasPlayed && bufferedTime >= 1) {\n return null;\n } // When the syncPoint is null, there is no way of determining a good\n // conservative segment index to fetch from\n // The best thing to do here is to get the kind of sync-point data by\n // making a request\n\n\n if (syncPoint === null) {\n mediaIndex = this.getSyncSegmentCandidate_(playlist);\n return this.generateSegmentInfo_(playlist, mediaIndex, null, true);\n } // Under normal playback conditions fetching is a simple walk forward\n\n\n if (mediaIndex !== null) {\n var segment = playlist.segments[mediaIndex];\n startOfSegment = lastBufferedEnd;\n return this.generateSegmentInfo_(playlist, mediaIndex + 1, startOfSegment, false);\n } // There is a sync-point but the lack of a mediaIndex indicates that\n // we need to make a good conservative guess about which segment to\n // fetch\n\n\n if (this.fetchAtBuffer_) {\n // Find the segment containing the end of the buffer\n var mediaSourceInfo = Playlist.getMediaInfoForTime(playlist, lastBufferedEnd, syncPoint.segmentIndex, syncPoint.time);\n mediaIndex = mediaSourceInfo.mediaIndex;\n startOfSegment = mediaSourceInfo.startTime;\n } else {\n // Find the segment containing currentTime\n var _mediaSourceInfo = Playlist.getMediaInfoForTime(playlist, currentTime, syncPoint.segmentIndex, syncPoint.time);\n\n mediaIndex = _mediaSourceInfo.mediaIndex;\n startOfSegment = _mediaSourceInfo.startTime;\n }\n\n return this.generateSegmentInfo_(playlist, mediaIndex, startOfSegment, false);\n }\n /**\n * The segment loader has no recourse except to fetch a segment in the\n * current playlist and use the internal timestamps in that segment to\n * generate a syncPoint. This function returns a good candidate index\n * for that process.\n *\n * @param {Object} playlist - the playlist object to look for a\n * @returns {Number} An index of a segment from the playlist to load\n */\n\n }, {\n key: 'getSyncSegmentCandidate_',\n value: function getSyncSegmentCandidate_(playlist) {\n var _this2 = this;\n\n if (this.currentTimeline_ === -1) {\n return 0;\n }\n\n var segmentIndexArray = playlist.segments.map(function (s, i) {\n return {\n timeline: s.timeline,\n segmentIndex: i\n };\n }).filter(function (s) {\n return s.timeline === _this2.currentTimeline_;\n });\n\n if (segmentIndexArray.length) {\n return segmentIndexArray[Math.min(segmentIndexArray.length - 1, 1)].segmentIndex;\n }\n\n return Math.max(playlist.segments.length - 1, 0);\n }\n }, {\n key: 'generateSegmentInfo_',\n value: function generateSegmentInfo_(playlist, mediaIndex, startOfSegment, isSyncRequest) {\n if (mediaIndex < 0 || mediaIndex >= playlist.segments.length) {\n return null;\n }\n\n var segment = playlist.segments[mediaIndex];\n return {\n requestId: 'segment-loader-' + Math.random(),\n // resolve the segment URL relative to the playlist\n uri: segment.resolvedUri,\n // the segment's mediaIndex at the time it was requested\n mediaIndex: mediaIndex,\n // whether or not to update the SegmentLoader's state with this\n // segment's mediaIndex\n isSyncRequest: isSyncRequest,\n startOfSegment: startOfSegment,\n // the segment's playlist\n playlist: playlist,\n // unencrypted bytes of the segment\n bytes: null,\n // when a key is defined for this segment, the encrypted bytes\n encryptedBytes: null,\n // The target timestampOffset for this segment when we append it\n // to the source buffer\n timestampOffset: null,\n // The timeline that the segment is in\n timeline: segment.timeline,\n // The expected duration of the segment in seconds\n duration: segment.duration,\n // retain the segment in case the playlist updates while doing an async process\n segment: segment\n };\n }\n /**\n * Determines if the network has enough bandwidth to complete the current segment\n * request in a timely manner. If not, the request will be aborted early and bandwidth\n * updated to trigger a playlist switch.\n *\n * @param {Object} stats\n * Object containing stats about the request timing and size\n * @return {Boolean} True if the request was aborted, false otherwise\n * @private\n */\n\n }, {\n key: 'abortRequestEarly_',\n value: function abortRequestEarly_(stats) {\n if (this.hls_.tech_.paused() || // Don't abort if the current playlist is on the lowestEnabledRendition\n // TODO: Replace using timeout with a boolean indicating whether this playlist is\n // the lowestEnabledRendition.\n !this.xhrOptions_.timeout || // Don't abort if we have no bandwidth information to estimate segment sizes\n !this.playlist_.attributes.BANDWIDTH) {\n return false;\n } // Wait at least 1 second since the first byte of data has been received before\n // using the calculated bandwidth from the progress event to allow the bitrate\n // to stabilize\n\n\n if (Date.now() - (stats.firstBytesReceivedAt || Date.now()) < 1000) {\n return false;\n }\n\n var currentTime = this.currentTime_();\n var measuredBandwidth = stats.bandwidth;\n var segmentDuration = this.pendingSegment_.duration;\n var requestTimeRemaining = Playlist.estimateSegmentRequestTime(segmentDuration, measuredBandwidth, this.playlist_, stats.bytesReceived); // Subtract 1 from the timeUntilRebuffer so we still consider an early abort\n // if we are only left with less than 1 second when the request completes.\n // A negative timeUntilRebuffering indicates we are already rebuffering\n\n var timeUntilRebuffer$$1 = timeUntilRebuffer(this.buffered_(), currentTime, this.hls_.tech_.playbackRate()) - 1; // Only consider aborting early if the estimated time to finish the download\n // is larger than the estimated time until the player runs out of forward buffer\n\n if (requestTimeRemaining <= timeUntilRebuffer$$1) {\n return false;\n }\n\n var switchCandidate = minRebufferMaxBandwidthSelector({\n master: this.hls_.playlists.master,\n currentTime: currentTime,\n bandwidth: measuredBandwidth,\n duration: this.duration_(),\n segmentDuration: segmentDuration,\n timeUntilRebuffer: timeUntilRebuffer$$1,\n currentTimeline: this.currentTimeline_,\n syncController: this.syncController_\n });\n\n if (!switchCandidate) {\n return;\n }\n\n var rebufferingImpact = requestTimeRemaining - timeUntilRebuffer$$1;\n var timeSavedBySwitching = rebufferingImpact - switchCandidate.rebufferingImpact;\n var minimumTimeSaving = 0.5; // If we are already rebuffering, increase the amount of variance we add to the\n // potential round trip time of the new request so that we are not too aggressive\n // with switching to a playlist that might save us a fraction of a second.\n\n if (timeUntilRebuffer$$1 <= TIME_FUDGE_FACTOR) {\n minimumTimeSaving = 1;\n }\n\n if (!switchCandidate.playlist || switchCandidate.playlist.uri === this.playlist_.uri || timeSavedBySwitching < minimumTimeSaving) {\n return false;\n } // set the bandwidth to that of the desired playlist being sure to scale by\n // BANDWIDTH_VARIANCE and add one so the playlist selector does not exclude it\n // don't trigger a bandwidthupdate as the bandwidth is artifial\n\n\n this.bandwidth = switchCandidate.playlist.attributes.BANDWIDTH * Config.BANDWIDTH_VARIANCE + 1;\n this.abort();\n this.trigger('earlyabort');\n return true;\n }\n /**\n * XHR `progress` event handler\n *\n * @param {Event}\n * The XHR `progress` event\n * @param {Object} simpleSegment\n * A simplified segment object copy\n * @private\n */\n\n }, {\n key: 'handleProgress_',\n value: function handleProgress_(event, simpleSegment) {\n if (!this.pendingSegment_ || simpleSegment.requestId !== this.pendingSegment_.requestId || this.abortRequestEarly_(simpleSegment.stats)) {\n return;\n }\n\n this.trigger('progress');\n }\n /**\n * load a specific segment from a request into the buffer\n *\n * @private\n */\n\n }, {\n key: 'loadSegment_',\n value: function loadSegment_(segmentInfo) {\n this.state = 'WAITING';\n this.pendingSegment_ = segmentInfo;\n this.trimBackBuffer_(segmentInfo);\n segmentInfo.abortRequests = mediaSegmentRequest(this.hls_.xhr, this.xhrOptions_, this.decrypter_, this.captionParser_, this.createSimplifiedSegmentObj_(segmentInfo), // progress callback\n this.handleProgress_.bind(this), this.segmentRequestFinished_.bind(this));\n }\n /**\n * trim the back buffer so that we don't have too much data\n * in the source buffer\n *\n * @private\n *\n * @param {Object} segmentInfo - the current segment\n */\n\n }, {\n key: 'trimBackBuffer_',\n value: function trimBackBuffer_(segmentInfo) {\n var removeToTime = safeBackBufferTrimTime(this.seekable_(), this.currentTime_(), this.playlist_.targetDuration || 10); // Chrome has a hard limit of 150MB of\n // buffer and a very conservative \"garbage collector\"\n // We manually clear out the old buffer to ensure\n // we don't trigger the QuotaExceeded error\n // on the source buffer during subsequent appends\n\n if (removeToTime > 0) {\n this.remove(0, removeToTime);\n }\n }\n /**\n * created a simplified copy of the segment object with just the\n * information necessary to perform the XHR and decryption\n *\n * @private\n *\n * @param {Object} segmentInfo - the current segment\n * @returns {Object} a simplified segment object copy\n */\n\n }, {\n key: 'createSimplifiedSegmentObj_',\n value: function createSimplifiedSegmentObj_(segmentInfo) {\n var segment = segmentInfo.segment;\n var simpleSegment = {\n resolvedUri: segment.resolvedUri,\n byterange: segment.byterange,\n requestId: segmentInfo.requestId\n };\n\n if (segment.key) {\n // if the media sequence is greater than 2^32, the IV will be incorrect\n // assuming 10s segments, that would be about 1300 years\n var iv = segment.key.iv || new Uint32Array([0, 0, 0, segmentInfo.mediaIndex + segmentInfo.playlist.mediaSequence]);\n simpleSegment.key = this.segmentKey(segment.key);\n simpleSegment.key.iv = iv;\n }\n\n if (segment.map) {\n simpleSegment.map = this.initSegment(segment.map);\n }\n\n return simpleSegment;\n }\n /**\n * Handle the callback from the segmentRequest function and set the\n * associated SegmentLoader state and errors if necessary\n *\n * @private\n */\n\n }, {\n key: 'segmentRequestFinished_',\n value: function segmentRequestFinished_(error, simpleSegment) {\n // every request counts as a media request even if it has been aborted\n // or canceled due to a timeout\n this.mediaRequests += 1;\n\n if (simpleSegment.stats) {\n this.mediaBytesTransferred += simpleSegment.stats.bytesReceived;\n this.mediaTransferDuration += simpleSegment.stats.roundTripTime;\n } // The request was aborted and the SegmentLoader has already been reset\n\n\n if (!this.pendingSegment_) {\n this.mediaRequestsAborted += 1;\n return;\n } // the request was aborted and the SegmentLoader has already started\n // another request. this can happen when the timeout for an aborted\n // request triggers due to a limitation in the XHR library\n // do not count this as any sort of request or we risk double-counting\n\n\n if (simpleSegment.requestId !== this.pendingSegment_.requestId) {\n return;\n } // an error occurred from the active pendingSegment_ so reset everything\n\n\n if (error) {\n this.pendingSegment_ = null;\n this.state = 'READY'; // the requests were aborted just record the aborted stat and exit\n // this is not a true error condition and nothing corrective needs\n // to be done\n\n if (error.code === REQUEST_ERRORS.ABORTED) {\n this.mediaRequestsAborted += 1;\n return;\n }\n\n this.pause(); // the error is really just that at least one of the requests timed-out\n // set the bandwidth to a very low value and trigger an ABR switch to\n // take emergency action\n\n if (error.code === REQUEST_ERRORS.TIMEOUT) {\n this.mediaRequestsTimedout += 1;\n this.bandwidth = 1;\n this.roundTrip = NaN;\n this.trigger('bandwidthupdate');\n return;\n } // if control-flow has arrived here, then the error is real\n // emit an error event to blacklist the current playlist\n\n\n this.mediaRequestsErrored += 1;\n this.error(error);\n this.trigger('error');\n return;\n } // the response was a success so set any bandwidth stats the request\n // generated for ABR purposes\n\n\n this.bandwidth = simpleSegment.stats.bandwidth;\n this.roundTrip = simpleSegment.stats.roundTripTime; // if this request included an initialization segment, save that data\n // to the initSegment cache\n\n if (simpleSegment.map) {\n simpleSegment.map = this.initSegment(simpleSegment.map, true);\n } // if this request included a segment key, save that data in the cache\n\n\n if (simpleSegment.key) {\n this.segmentKey(simpleSegment.key, true);\n }\n\n this.processSegmentResponse_(simpleSegment);\n }\n /**\n * Move any important data from the simplified segment object\n * back to the real segment object for future phases\n *\n * @private\n */\n\n }, {\n key: 'processSegmentResponse_',\n value: function processSegmentResponse_(simpleSegment) {\n var segmentInfo = this.pendingSegment_;\n segmentInfo.bytes = simpleSegment.bytes;\n\n if (simpleSegment.map) {\n segmentInfo.segment.map.bytes = simpleSegment.map.bytes;\n }\n\n segmentInfo.endOfAllRequests = simpleSegment.endOfAllRequests; // This has fmp4 captions, add them to text tracks\n\n if (simpleSegment.fmp4Captions) {\n createCaptionsTrackIfNotExists(this.inbandTextTracks_, this.hls_.tech_, simpleSegment.captionStreams);\n addCaptionData({\n inbandTextTracks: this.inbandTextTracks_,\n captionArray: simpleSegment.fmp4Captions,\n // fmp4s will not have a timestamp offset\n timestampOffset: 0\n }); // Reset stored captions since we added parsed\n // captions to a text track at this point\n\n if (this.captionParser_) {\n this.captionParser_.clearParsedCaptions();\n }\n }\n\n this.handleSegment_();\n }\n /**\n * append a decrypted segement to the SourceBuffer through a SourceUpdater\n *\n * @private\n */\n\n }, {\n key: 'handleSegment_',\n value: function handleSegment_() {\n var _this3 = this;\n\n if (!this.pendingSegment_) {\n this.state = 'READY';\n return;\n }\n\n var segmentInfo = this.pendingSegment_;\n var segment = segmentInfo.segment;\n var timingInfo = this.syncController_.probeSegmentInfo(segmentInfo); // When we have our first timing info, determine what media types this loader is\n // dealing with. Although we're maintaining extra state, it helps to preserve the\n // separation of segment loader from the actual source buffers.\n\n if (typeof this.startingMedia_ === 'undefined' && timingInfo && ( // Guard against cases where we're not getting timing info at all until we are\n // certain that all streams will provide it.\n timingInfo.containsAudio || timingInfo.containsVideo)) {\n this.startingMedia_ = {\n containsAudio: timingInfo.containsAudio,\n containsVideo: timingInfo.containsVideo\n };\n }\n\n var illegalMediaSwitchError = illegalMediaSwitch(this.loaderType_, this.startingMedia_, timingInfo);\n\n if (illegalMediaSwitchError) {\n this.error({\n message: illegalMediaSwitchError,\n blacklistDuration: Infinity\n });\n this.trigger('error');\n return;\n }\n\n if (segmentInfo.isSyncRequest) {\n this.trigger('syncinfoupdate');\n this.pendingSegment_ = null;\n this.state = 'READY';\n return;\n }\n\n if (segmentInfo.timestampOffset !== null && segmentInfo.timestampOffset !== this.sourceUpdater_.timestampOffset()) {\n // Subtract any difference between the PTS and DTS times of the first frame\n // from the timeStampOffset (which currently equals the buffered.end) to prevent\n // creating any gaps in the buffer\n if (timingInfo && timingInfo.segmentTimestampInfo) {\n var ptsStartTime = timingInfo.segmentTimestampInfo[0].ptsTime;\n var dtsStartTime = timingInfo.segmentTimestampInfo[0].dtsTime;\n segmentInfo.timestampOffset -= ptsStartTime - dtsStartTime;\n }\n\n this.sourceUpdater_.timestampOffset(segmentInfo.timestampOffset); // fired when a timestamp offset is set in HLS (can also identify discontinuities)\n\n this.trigger('timestampoffset');\n }\n\n var timelineMapping = this.syncController_.mappingForTimeline(segmentInfo.timeline);\n\n if (timelineMapping !== null) {\n this.trigger({\n type: 'segmenttimemapping',\n mapping: timelineMapping\n });\n }\n\n this.state = 'APPENDING'; // if the media initialization segment is changing, append it\n // before the content segment\n\n if (segment.map) {\n var initId = initSegmentId(segment.map);\n\n if (!this.activeInitSegmentId_ || this.activeInitSegmentId_ !== initId) {\n var initSegment = this.initSegment(segment.map);\n this.sourceUpdater_.appendBuffer({\n bytes: initSegment.bytes\n }, function () {\n _this3.activeInitSegmentId_ = initId;\n });\n }\n }\n\n segmentInfo.byteLength = segmentInfo.bytes.byteLength;\n\n if (typeof segment.start === 'number' && typeof segment.end === 'number') {\n this.mediaSecondsLoaded += segment.end - segment.start;\n } else {\n this.mediaSecondsLoaded += segment.duration;\n }\n\n this.logger_(segmentInfoString(segmentInfo));\n this.sourceUpdater_.appendBuffer({\n bytes: segmentInfo.bytes,\n videoSegmentTimingInfoCallback: this.handleVideoSegmentTimingInfo_.bind(this, segmentInfo.requestId)\n }, this.handleUpdateEnd_.bind(this));\n }\n }, {\n key: 'handleVideoSegmentTimingInfo_',\n value: function handleVideoSegmentTimingInfo_(requestId, event) {\n if (!this.pendingSegment_ || requestId !== this.pendingSegment_.requestId) {\n return;\n }\n\n var segment = this.pendingSegment_.segment;\n\n if (!segment.videoTimingInfo) {\n segment.videoTimingInfo = {};\n }\n\n segment.videoTimingInfo.transmuxerPrependedSeconds = event.videoSegmentTimingInfo.prependedContentDuration || 0;\n segment.videoTimingInfo.transmuxedPresentationStart = event.videoSegmentTimingInfo.start.presentation;\n segment.videoTimingInfo.transmuxedPresentationEnd = event.videoSegmentTimingInfo.end.presentation; // mainly used as a reference for debugging\n\n segment.videoTimingInfo.baseMediaDecodeTime = event.videoSegmentTimingInfo.baseMediaDecodeTime;\n }\n /**\n * callback to run when appendBuffer is finished. detects if we are\n * in a good state to do things with the data we got, or if we need\n * to wait for more\n *\n * @private\n */\n\n }, {\n key: 'handleUpdateEnd_',\n value: function handleUpdateEnd_() {\n if (!this.pendingSegment_) {\n this.state = 'READY';\n\n if (!this.paused()) {\n this.monitorBuffer_();\n }\n\n return;\n }\n\n var segmentInfo = this.pendingSegment_;\n var segment = segmentInfo.segment;\n var isWalkingForward = this.mediaIndex !== null;\n this.pendingSegment_ = null;\n this.recordThroughput_(segmentInfo);\n this.addSegmentMetadataCue_(segmentInfo);\n this.state = 'READY';\n this.mediaIndex = segmentInfo.mediaIndex;\n this.fetchAtBuffer_ = true;\n this.currentTimeline_ = segmentInfo.timeline; // We must update the syncinfo to recalculate the seekable range before\n // the following conditional otherwise it may consider this a bad \"guess\"\n // and attempt to resync when the post-update seekable window and live\n // point would mean that this was the perfect segment to fetch\n\n this.trigger('syncinfoupdate'); // If we previously appended a segment that ends more than 3 targetDurations before\n // the currentTime_ that means that our conservative guess was too conservative.\n // In that case, reset the loader state so that we try to use any information gained\n // from the previous request to create a new, more accurate, sync-point.\n\n if (segment.end && this.currentTime_() - segment.end > segmentInfo.playlist.targetDuration * 3) {\n this.resetEverything();\n return;\n } // Don't do a rendition switch unless we have enough time to get a sync segment\n // and conservatively guess\n\n\n if (isWalkingForward) {\n this.trigger('bandwidthupdate');\n }\n\n this.trigger('progress'); // any time an update finishes and the last segment is in the\n // buffer, end the stream. this ensures the \"ended\" event will\n // fire if playback reaches that point.\n\n if (this.isEndOfStream_(segmentInfo.mediaIndex + 1, segmentInfo.playlist)) {\n this.endOfStream();\n }\n\n if (!this.paused()) {\n this.monitorBuffer_();\n }\n }\n /**\n * Records the current throughput of the decrypt, transmux, and append\n * portion of the semgment pipeline. `throughput.rate` is a the cumulative\n * moving average of the throughput. `throughput.count` is the number of\n * data points in the average.\n *\n * @private\n * @param {Object} segmentInfo the object returned by loadSegment\n */\n\n }, {\n key: 'recordThroughput_',\n value: function recordThroughput_(segmentInfo) {\n var rate = this.throughput.rate; // Add one to the time to ensure that we don't accidentally attempt to divide\n // by zero in the case where the throughput is ridiculously high\n\n var segmentProcessingTime = Date.now() - segmentInfo.endOfAllRequests + 1; // Multiply by 8000 to convert from bytes/millisecond to bits/second\n\n var segmentProcessingThroughput = Math.floor(segmentInfo.byteLength / segmentProcessingTime * 8 * 1000); // This is just a cumulative moving average calculation:\n // newAvg = oldAvg + (sample - oldAvg) / (sampleCount + 1)\n\n this.throughput.rate += (segmentProcessingThroughput - rate) / ++this.throughput.count;\n }\n /**\n * Adds a cue to the segment-metadata track with some metadata information about the\n * segment\n *\n * @private\n * @param {Object} segmentInfo\n * the object returned by loadSegment\n * @method addSegmentMetadataCue_\n */\n\n }, {\n key: 'addSegmentMetadataCue_',\n value: function addSegmentMetadataCue_(segmentInfo) {\n if (!this.segmentMetadataTrack_) {\n return;\n }\n\n var segment = segmentInfo.segment;\n var start = segment.start;\n var end = segment.end; // Do not try adding the cue if the start and end times are invalid.\n\n if (!finite(start) || !finite(end)) {\n return;\n }\n\n removeCuesFromTrack(start, end, this.segmentMetadataTrack_);\n var Cue = window$1.WebKitDataCue || window$1.VTTCue;\n var value = {\n custom: segment.custom,\n dateTimeObject: segment.dateTimeObject,\n dateTimeString: segment.dateTimeString,\n bandwidth: segmentInfo.playlist.attributes.BANDWIDTH,\n resolution: segmentInfo.playlist.attributes.RESOLUTION,\n codecs: segmentInfo.playlist.attributes.CODECS,\n byteLength: segmentInfo.byteLength,\n uri: segmentInfo.uri,\n timeline: segmentInfo.timeline,\n playlist: segmentInfo.playlist.uri,\n start: start,\n end: end\n };\n var data = JSON.stringify(value);\n var cue = new Cue(start, end, data); // Attach the metadata to the value property of the cue to keep consistency between\n // the differences of WebKitDataCue in safari and VTTCue in other browsers\n\n cue.value = value;\n this.segmentMetadataTrack_.addCue(cue);\n }\n }]);\n return SegmentLoader;\n}(videojs$1.EventTarget);\n\nvar uint8ToUtf8 = function uint8ToUtf8(uintArray) {\n return decodeURIComponent(escape(String.fromCharCode.apply(null, uintArray)));\n};\n/**\n * @file vtt-segment-loader.js\n */\n\n\nvar VTT_LINE_TERMINATORS = new Uint8Array('\\n\\n'.split('').map(function (_char2) {\n return _char2.charCodeAt(0);\n}));\n/**\n * An object that manages segment loading and appending.\n *\n * @class VTTSegmentLoader\n * @param {Object} options required and optional options\n * @extends videojs.EventTarget\n */\n\nvar VTTSegmentLoader = function (_SegmentLoader) {\n inherits(VTTSegmentLoader, _SegmentLoader);\n\n function VTTSegmentLoader(settings) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n classCallCheck(this, VTTSegmentLoader); // SegmentLoader requires a MediaSource be specified or it will throw an error;\n // however, VTTSegmentLoader has no need of a media source, so delete the reference\n\n var _this = possibleConstructorReturn(this, (VTTSegmentLoader.__proto__ || Object.getPrototypeOf(VTTSegmentLoader)).call(this, settings, options));\n\n _this.mediaSource_ = null;\n _this.subtitlesTrack_ = null;\n return _this;\n }\n /**\n * Indicates which time ranges are buffered\n *\n * @return {TimeRange}\n * TimeRange object representing the current buffered ranges\n */\n\n\n createClass(VTTSegmentLoader, [{\n key: 'buffered_',\n value: function buffered_() {\n if (!this.subtitlesTrack_ || !this.subtitlesTrack_.cues.length) {\n return videojs$1.createTimeRanges();\n }\n\n var cues = this.subtitlesTrack_.cues;\n var start = cues[0].startTime;\n var end = cues[cues.length - 1].startTime;\n return videojs$1.createTimeRanges([[start, end]]);\n }\n /**\n * Gets and sets init segment for the provided map\n *\n * @param {Object} map\n * The map object representing the init segment to get or set\n * @param {Boolean=} set\n * If true, the init segment for the provided map should be saved\n * @return {Object}\n * map object for desired init segment\n */\n\n }, {\n key: 'initSegment',\n value: function initSegment(map) {\n var set$$1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!map) {\n return null;\n }\n\n var id = initSegmentId(map);\n var storedMap = this.initSegments_[id];\n\n if (set$$1 && !storedMap && map.bytes) {\n // append WebVTT line terminators to the media initialization segment if it exists\n // to follow the WebVTT spec (https://w3c.github.io/webvtt/#file-structure) that\n // requires two or more WebVTT line terminators between the WebVTT header and the\n // rest of the file\n var combinedByteLength = VTT_LINE_TERMINATORS.byteLength + map.bytes.byteLength;\n var combinedSegment = new Uint8Array(combinedByteLength);\n combinedSegment.set(map.bytes);\n combinedSegment.set(VTT_LINE_TERMINATORS, map.bytes.byteLength);\n this.initSegments_[id] = storedMap = {\n resolvedUri: map.resolvedUri,\n byterange: map.byterange,\n bytes: combinedSegment\n };\n }\n\n return storedMap || map;\n }\n /**\n * Returns true if all configuration required for loading is present, otherwise false.\n *\n * @return {Boolean} True if the all configuration is ready for loading\n * @private\n */\n\n }, {\n key: 'couldBeginLoading_',\n value: function couldBeginLoading_() {\n return this.playlist_ && this.subtitlesTrack_ && !this.paused();\n }\n /**\n * Once all the starting parameters have been specified, begin\n * operation. This method should only be invoked from the INIT\n * state.\n *\n * @private\n */\n\n }, {\n key: 'init_',\n value: function init_() {\n this.state = 'READY';\n this.resetEverything();\n return this.monitorBuffer_();\n }\n /**\n * Set a subtitle track on the segment loader to add subtitles to\n *\n * @param {TextTrack=} track\n * The text track to add loaded subtitles to\n * @return {TextTrack}\n * Returns the subtitles track\n */\n\n }, {\n key: 'track',\n value: function track(_track) {\n if (typeof _track === 'undefined') {\n return this.subtitlesTrack_;\n }\n\n this.subtitlesTrack_ = _track; // if we were unpaused but waiting for a sourceUpdater, start\n // buffering now\n\n if (this.state === 'INIT' && this.couldBeginLoading_()) {\n this.init_();\n }\n\n return this.subtitlesTrack_;\n }\n /**\n * Remove any data in the source buffer between start and end times\n * @param {Number} start - the start time of the region to remove from the buffer\n * @param {Number} end - the end time of the region to remove from the buffer\n */\n\n }, {\n key: 'remove',\n value: function remove(start, end) {\n removeCuesFromTrack(start, end, this.subtitlesTrack_);\n }\n /**\n * fill the buffer with segements unless the sourceBuffers are\n * currently updating\n *\n * Note: this function should only ever be called by monitorBuffer_\n * and never directly\n *\n * @private\n */\n\n }, {\n key: 'fillBuffer_',\n value: function fillBuffer_() {\n var _this2 = this;\n\n if (!this.syncPoint_) {\n this.syncPoint_ = this.syncController_.getSyncPoint(this.playlist_, this.duration_(), this.currentTimeline_, this.currentTime_());\n } // see if we need to begin loading immediately\n\n\n var segmentInfo = this.checkBuffer_(this.buffered_(), this.playlist_, this.mediaIndex, this.hasPlayed_(), this.currentTime_(), this.syncPoint_);\n segmentInfo = this.skipEmptySegments_(segmentInfo);\n\n if (!segmentInfo) {\n return;\n }\n\n if (this.syncController_.timestampOffsetForTimeline(segmentInfo.timeline) === null) {\n // We don't have the timestamp offset that we need to sync subtitles.\n // Rerun on a timestamp offset or user interaction.\n var checkTimestampOffset = function checkTimestampOffset() {\n _this2.state = 'READY';\n\n if (!_this2.paused()) {\n // if not paused, queue a buffer check as soon as possible\n _this2.monitorBuffer_();\n }\n };\n\n this.syncController_.one('timestampoffset', checkTimestampOffset);\n this.state = 'WAITING_ON_TIMELINE';\n return;\n }\n\n this.loadSegment_(segmentInfo);\n }\n /**\n * Prevents the segment loader from requesting segments we know contain no subtitles\n * by walking forward until we find the next segment that we don't know whether it is\n * empty or not.\n *\n * @param {Object} segmentInfo\n * a segment info object that describes the current segment\n * @return {Object}\n * a segment info object that describes the current segment\n */\n\n }, {\n key: 'skipEmptySegments_',\n value: function skipEmptySegments_(segmentInfo) {\n while (segmentInfo && segmentInfo.segment.empty) {\n segmentInfo = this.generateSegmentInfo_(segmentInfo.playlist, segmentInfo.mediaIndex + 1, segmentInfo.startOfSegment + segmentInfo.duration, segmentInfo.isSyncRequest);\n }\n\n return segmentInfo;\n }\n /**\n * append a decrypted segement to the SourceBuffer through a SourceUpdater\n *\n * @private\n */\n\n }, {\n key: 'handleSegment_',\n value: function handleSegment_() {\n var _this3 = this;\n\n if (!this.pendingSegment_ || !this.subtitlesTrack_) {\n this.state = 'READY';\n return;\n }\n\n this.state = 'APPENDING';\n var segmentInfo = this.pendingSegment_;\n var segment = segmentInfo.segment; // Make sure that vttjs has loaded, otherwise, wait till it finished loading\n\n if (typeof window$1.WebVTT !== 'function' && this.subtitlesTrack_ && this.subtitlesTrack_.tech_) {\n var loadHandler = void 0;\n\n var errorHandler = function errorHandler() {\n _this3.subtitlesTrack_.tech_.off('vttjsloaded', loadHandler);\n\n _this3.error({\n message: 'Error loading vtt.js'\n });\n\n _this3.state = 'READY';\n\n _this3.pause();\n\n _this3.trigger('error');\n };\n\n loadHandler = function loadHandler() {\n _this3.subtitlesTrack_.tech_.off('vttjserror', errorHandler);\n\n _this3.handleSegment_();\n };\n\n this.state = 'WAITING_ON_VTTJS';\n this.subtitlesTrack_.tech_.one('vttjsloaded', loadHandler);\n this.subtitlesTrack_.tech_.one('vttjserror', errorHandler);\n return;\n }\n\n segment.requested = true;\n\n try {\n this.parseVTTCues_(segmentInfo);\n } catch (e) {\n this.error({\n message: e.message\n });\n this.state = 'READY';\n this.pause();\n return this.trigger('error');\n }\n\n this.updateTimeMapping_(segmentInfo, this.syncController_.timelines[segmentInfo.timeline], this.playlist_);\n\n if (segmentInfo.isSyncRequest) {\n this.trigger('syncinfoupdate');\n this.pendingSegment_ = null;\n this.state = 'READY';\n return;\n }\n\n segmentInfo.byteLength = segmentInfo.bytes.byteLength;\n this.mediaSecondsLoaded += segment.duration;\n\n if (segmentInfo.cues.length) {\n // remove any overlapping cues to prevent doubling\n this.remove(segmentInfo.cues[0].endTime, segmentInfo.cues[segmentInfo.cues.length - 1].endTime);\n }\n\n segmentInfo.cues.forEach(function (cue) {\n _this3.subtitlesTrack_.addCue(cue);\n });\n this.handleUpdateEnd_();\n }\n /**\n * Uses the WebVTT parser to parse the segment response\n *\n * @param {Object} segmentInfo\n * a segment info object that describes the current segment\n * @private\n */\n\n }, {\n key: 'parseVTTCues_',\n value: function parseVTTCues_(segmentInfo) {\n var decoder = void 0;\n var decodeBytesToString = false;\n\n if (typeof window$1.TextDecoder === 'function') {\n decoder = new window$1.TextDecoder('utf8');\n } else {\n decoder = window$1.WebVTT.StringDecoder();\n decodeBytesToString = true;\n }\n\n var parser = new window$1.WebVTT.Parser(window$1, window$1.vttjs, decoder);\n segmentInfo.cues = [];\n segmentInfo.timestampmap = {\n MPEGTS: 0,\n LOCAL: 0\n };\n parser.oncue = segmentInfo.cues.push.bind(segmentInfo.cues);\n\n parser.ontimestampmap = function (map) {\n return segmentInfo.timestampmap = map;\n };\n\n parser.onparsingerror = function (error) {\n videojs$1.log.warn('Error encountered when parsing cues: ' + error.message);\n };\n\n if (segmentInfo.segment.map) {\n var mapData = segmentInfo.segment.map.bytes;\n\n if (decodeBytesToString) {\n mapData = uint8ToUtf8(mapData);\n }\n\n parser.parse(mapData);\n }\n\n var segmentData = segmentInfo.bytes;\n\n if (decodeBytesToString) {\n segmentData = uint8ToUtf8(segmentData);\n }\n\n parser.parse(segmentData);\n parser.flush();\n }\n /**\n * Updates the start and end times of any cues parsed by the WebVTT parser using\n * the information parsed from the X-TIMESTAMP-MAP header and a TS to media time mapping\n * from the SyncController\n *\n * @param {Object} segmentInfo\n * a segment info object that describes the current segment\n * @param {Object} mappingObj\n * object containing a mapping from TS to media time\n * @param {Object} playlist\n * the playlist object containing the segment\n * @private\n */\n\n }, {\n key: 'updateTimeMapping_',\n value: function updateTimeMapping_(segmentInfo, mappingObj, playlist) {\n var segment = segmentInfo.segment;\n\n if (!mappingObj) {\n // If the sync controller does not have a mapping of TS to Media Time for the\n // timeline, then we don't have enough information to update the cue\n // start/end times\n return;\n }\n\n if (!segmentInfo.cues.length) {\n // If there are no cues, we also do not have enough information to figure out\n // segment timing. Mark that the segment contains no cues so we don't re-request\n // an empty segment.\n segment.empty = true;\n return;\n }\n\n var timestampmap = segmentInfo.timestampmap;\n var diff = timestampmap.MPEGTS / 90000 - timestampmap.LOCAL + mappingObj.mapping;\n segmentInfo.cues.forEach(function (cue) {\n // First convert cue time to TS time using the timestamp-map provided within the vtt\n cue.startTime += diff;\n cue.endTime += diff;\n });\n\n if (!playlist.syncInfo) {\n var firstStart = segmentInfo.cues[0].startTime;\n var lastStart = segmentInfo.cues[segmentInfo.cues.length - 1].startTime;\n playlist.syncInfo = {\n mediaSequence: playlist.mediaSequence + segmentInfo.mediaIndex,\n time: Math.min(firstStart, lastStart - segment.duration)\n };\n }\n }\n }]);\n return VTTSegmentLoader;\n}(SegmentLoader);\n/**\n * @file ad-cue-tags.js\n */\n\n/**\n * Searches for an ad cue that overlaps with the given mediaTime\n */\n\n\nvar findAdCue = function findAdCue(track, mediaTime) {\n var cues = track.cues;\n\n for (var i = 0; i < cues.length; i++) {\n var cue = cues[i];\n\n if (mediaTime >= cue.adStartTime && mediaTime <= cue.adEndTime) {\n return cue;\n }\n }\n\n return null;\n};\n\nvar updateAdCues = function updateAdCues(media, track) {\n var offset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n\n if (!media.segments) {\n return;\n }\n\n var mediaTime = offset;\n var cue = void 0;\n\n for (var i = 0; i < media.segments.length; i++) {\n var segment = media.segments[i];\n\n if (!cue) {\n // Since the cues will span for at least the segment duration, adding a fudge\n // factor of half segment duration will prevent duplicate cues from being\n // created when timing info is not exact (e.g. cue start time initialized\n // at 10.006677, but next call mediaTime is 10.003332 )\n cue = findAdCue(track, mediaTime + segment.duration / 2);\n }\n\n if (cue) {\n if ('cueIn' in segment) {\n // Found a CUE-IN so end the cue\n cue.endTime = mediaTime;\n cue.adEndTime = mediaTime;\n mediaTime += segment.duration;\n cue = null;\n continue;\n }\n\n if (mediaTime < cue.endTime) {\n // Already processed this mediaTime for this cue\n mediaTime += segment.duration;\n continue;\n } // otherwise extend cue until a CUE-IN is found\n\n\n cue.endTime += segment.duration;\n } else {\n if ('cueOut' in segment) {\n cue = new window$1.VTTCue(mediaTime, mediaTime + segment.duration, segment.cueOut);\n cue.adStartTime = mediaTime; // Assumes tag format to be\n // #EXT-X-CUE-OUT:30\n\n cue.adEndTime = mediaTime + parseFloat(segment.cueOut);\n track.addCue(cue);\n }\n\n if ('cueOutCont' in segment) {\n // Entered into the middle of an ad cue\n var adOffset = void 0;\n var adTotal = void 0; // Assumes tag formate to be\n // #EXT-X-CUE-OUT-CONT:10/30\n\n var _segment$cueOutCont$s = segment.cueOutCont.split('/').map(parseFloat);\n\n var _segment$cueOutCont$s2 = slicedToArray(_segment$cueOutCont$s, 2);\n\n adOffset = _segment$cueOutCont$s2[0];\n adTotal = _segment$cueOutCont$s2[1];\n cue = new window$1.VTTCue(mediaTime, mediaTime + segment.duration, '');\n cue.adStartTime = mediaTime - adOffset;\n cue.adEndTime = cue.adStartTime + adTotal;\n track.addCue(cue);\n }\n }\n\n mediaTime += segment.duration;\n }\n};\n/**\n * @file sync-controller.js\n */\n\n\nvar tsprobe = tsInspector.inspect;\nvar syncPointStrategies = [// Stategy \"VOD\": Handle the VOD-case where the sync-point is *always*\n// the equivalence display-time 0 === segment-index 0\n{\n name: 'VOD',\n run: function run(syncController, playlist, duration$$1, currentTimeline, currentTime) {\n if (duration$$1 !== Infinity) {\n var syncPoint = {\n time: 0,\n segmentIndex: 0\n };\n return syncPoint;\n }\n\n return null;\n }\n}, // Stategy \"ProgramDateTime\": We have a program-date-time tag in this playlist\n{\n name: 'ProgramDateTime',\n run: function run(syncController, playlist, duration$$1, currentTimeline, currentTime) {\n if (!syncController.datetimeToDisplayTime) {\n return null;\n }\n\n var segments = playlist.segments || [];\n var syncPoint = null;\n var lastDistance = null;\n currentTime = currentTime || 0;\n\n for (var i = 0; i < segments.length; i++) {\n var segment = segments[i];\n\n if (segment.dateTimeObject) {\n var segmentTime = segment.dateTimeObject.getTime() / 1000;\n var segmentStart = segmentTime + syncController.datetimeToDisplayTime;\n var distance = Math.abs(currentTime - segmentStart); // Once the distance begins to increase, or if distance is 0, we have passed\n // currentTime and can stop looking for better candidates\n\n if (lastDistance !== null && (distance === 0 || lastDistance < distance)) {\n break;\n }\n\n lastDistance = distance;\n syncPoint = {\n time: segmentStart,\n segmentIndex: i\n };\n }\n }\n\n return syncPoint;\n }\n}, // Stategy \"Segment\": We have a known time mapping for a timeline and a\n// segment in the current timeline with timing data\n{\n name: 'Segment',\n run: function run(syncController, playlist, duration$$1, currentTimeline, currentTime) {\n var segments = playlist.segments || [];\n var syncPoint = null;\n var lastDistance = null;\n currentTime = currentTime || 0;\n\n for (var i = 0; i < segments.length; i++) {\n var segment = segments[i];\n\n if (segment.timeline === currentTimeline && typeof segment.start !== 'undefined') {\n var distance = Math.abs(currentTime - segment.start); // Once the distance begins to increase, we have passed\n // currentTime and can stop looking for better candidates\n\n if (lastDistance !== null && lastDistance < distance) {\n break;\n }\n\n if (!syncPoint || lastDistance === null || lastDistance >= distance) {\n lastDistance = distance;\n syncPoint = {\n time: segment.start,\n segmentIndex: i\n };\n }\n }\n }\n\n return syncPoint;\n }\n}, // Stategy \"Discontinuity\": We have a discontinuity with a known\n// display-time\n{\n name: 'Discontinuity',\n run: function run(syncController, playlist, duration$$1, currentTimeline, currentTime) {\n var syncPoint = null;\n currentTime = currentTime || 0;\n\n if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n var lastDistance = null;\n\n for (var i = 0; i < playlist.discontinuityStarts.length; i++) {\n var segmentIndex = playlist.discontinuityStarts[i];\n var discontinuity = playlist.discontinuitySequence + i + 1;\n var discontinuitySync = syncController.discontinuities[discontinuity];\n\n if (discontinuitySync) {\n var distance = Math.abs(currentTime - discontinuitySync.time); // Once the distance begins to increase, we have passed\n // currentTime and can stop looking for better candidates\n\n if (lastDistance !== null && lastDistance < distance) {\n break;\n }\n\n if (!syncPoint || lastDistance === null || lastDistance >= distance) {\n lastDistance = distance;\n syncPoint = {\n time: discontinuitySync.time,\n segmentIndex: segmentIndex\n };\n }\n }\n }\n }\n\n return syncPoint;\n }\n}, // Stategy \"Playlist\": We have a playlist with a known mapping of\n// segment index to display time\n{\n name: 'Playlist',\n run: function run(syncController, playlist, duration$$1, currentTimeline, currentTime) {\n if (playlist.syncInfo) {\n var syncPoint = {\n time: playlist.syncInfo.time,\n segmentIndex: playlist.syncInfo.mediaSequence - playlist.mediaSequence\n };\n return syncPoint;\n }\n\n return null;\n }\n}];\n\nvar SyncController = function (_videojs$EventTarget) {\n inherits(SyncController, _videojs$EventTarget);\n\n function SyncController() {\n classCallCheck(this, SyncController); // Segment Loader state variables...\n // ...for synching across variants\n\n var _this = possibleConstructorReturn(this, (SyncController.__proto__ || Object.getPrototypeOf(SyncController)).call(this));\n\n _this.inspectCache_ = undefined; // ...for synching across variants\n\n _this.timelines = [];\n _this.discontinuities = [];\n _this.datetimeToDisplayTime = null;\n _this.logger_ = logger('SyncController');\n return _this;\n }\n /**\n * Find a sync-point for the playlist specified\n *\n * A sync-point is defined as a known mapping from display-time to\n * a segment-index in the current playlist.\n *\n * @param {Playlist} playlist\n * The playlist that needs a sync-point\n * @param {Number} duration\n * Duration of the MediaSource (Infinite if playing a live source)\n * @param {Number} currentTimeline\n * The last timeline from which a segment was loaded\n * @returns {Object}\n * A sync-point object\n */\n\n\n createClass(SyncController, [{\n key: 'getSyncPoint',\n value: function getSyncPoint(playlist, duration$$1, currentTimeline, currentTime) {\n var syncPoints = this.runStrategies_(playlist, duration$$1, currentTimeline, currentTime);\n\n if (!syncPoints.length) {\n // Signal that we need to attempt to get a sync-point manually\n // by fetching a segment in the playlist and constructing\n // a sync-point from that information\n return null;\n } // Now find the sync-point that is closest to the currentTime because\n // that should result in the most accurate guess about which segment\n // to fetch\n\n\n return this.selectSyncPoint_(syncPoints, {\n key: 'time',\n value: currentTime\n });\n }\n /**\n * Calculate the amount of time that has expired off the playlist during playback\n *\n * @param {Playlist} playlist\n * Playlist object to calculate expired from\n * @param {Number} duration\n * Duration of the MediaSource (Infinity if playling a live source)\n * @returns {Number|null}\n * The amount of time that has expired off the playlist during playback. Null\n * if no sync-points for the playlist can be found.\n */\n\n }, {\n key: 'getExpiredTime',\n value: function getExpiredTime(playlist, duration$$1) {\n if (!playlist || !playlist.segments) {\n return null;\n }\n\n var syncPoints = this.runStrategies_(playlist, duration$$1, playlist.discontinuitySequence, 0); // Without sync-points, there is not enough information to determine the expired time\n\n if (!syncPoints.length) {\n return null;\n }\n\n var syncPoint = this.selectSyncPoint_(syncPoints, {\n key: 'segmentIndex',\n value: 0\n }); // If the sync-point is beyond the start of the playlist, we want to subtract the\n // duration from index 0 to syncPoint.segmentIndex instead of adding.\n\n if (syncPoint.segmentIndex > 0) {\n syncPoint.time *= -1;\n }\n\n return Math.abs(syncPoint.time + sumDurations(playlist, syncPoint.segmentIndex, 0));\n }\n /**\n * Runs each sync-point strategy and returns a list of sync-points returned by the\n * strategies\n *\n * @private\n * @param {Playlist} playlist\n * The playlist that needs a sync-point\n * @param {Number} duration\n * Duration of the MediaSource (Infinity if playing a live source)\n * @param {Number} currentTimeline\n * The last timeline from which a segment was loaded\n * @returns {Array}\n * A list of sync-point objects\n */\n\n }, {\n key: 'runStrategies_',\n value: function runStrategies_(playlist, duration$$1, currentTimeline, currentTime) {\n var syncPoints = []; // Try to find a sync-point in by utilizing various strategies...\n\n for (var i = 0; i < syncPointStrategies.length; i++) {\n var strategy = syncPointStrategies[i];\n var syncPoint = strategy.run(this, playlist, duration$$1, currentTimeline, currentTime);\n\n if (syncPoint) {\n syncPoint.strategy = strategy.name;\n syncPoints.push({\n strategy: strategy.name,\n syncPoint: syncPoint\n });\n }\n }\n\n return syncPoints;\n }\n /**\n * Selects the sync-point nearest the specified target\n *\n * @private\n * @param {Array} syncPoints\n * List of sync-points to select from\n * @param {Object} target\n * Object specifying the property and value we are targeting\n * @param {String} target.key\n * Specifies the property to target. Must be either 'time' or 'segmentIndex'\n * @param {Number} target.value\n * The value to target for the specified key.\n * @returns {Object}\n * The sync-point nearest the target\n */\n\n }, {\n key: 'selectSyncPoint_',\n value: function selectSyncPoint_(syncPoints, target) {\n var bestSyncPoint = syncPoints[0].syncPoint;\n var bestDistance = Math.abs(syncPoints[0].syncPoint[target.key] - target.value);\n var bestStrategy = syncPoints[0].strategy;\n\n for (var i = 1; i < syncPoints.length; i++) {\n var newDistance = Math.abs(syncPoints[i].syncPoint[target.key] - target.value);\n\n if (newDistance < bestDistance) {\n bestDistance = newDistance;\n bestSyncPoint = syncPoints[i].syncPoint;\n bestStrategy = syncPoints[i].strategy;\n }\n }\n\n this.logger_('syncPoint for [' + target.key + ': ' + target.value + '] chosen with strategy' + (' [' + bestStrategy + ']: [time:' + bestSyncPoint.time + ',') + (' segmentIndex:' + bestSyncPoint.segmentIndex + ']'));\n return bestSyncPoint;\n }\n /**\n * Save any meta-data present on the segments when segments leave\n * the live window to the playlist to allow for synchronization at the\n * playlist level later.\n *\n * @param {Playlist} oldPlaylist - The previous active playlist\n * @param {Playlist} newPlaylist - The updated and most current playlist\n */\n\n }, {\n key: 'saveExpiredSegmentInfo',\n value: function saveExpiredSegmentInfo(oldPlaylist, newPlaylist) {\n var mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence; // When a segment expires from the playlist and it has a start time\n // save that information as a possible sync-point reference in future\n\n for (var i = mediaSequenceDiff - 1; i >= 0; i--) {\n var lastRemovedSegment = oldPlaylist.segments[i];\n\n if (lastRemovedSegment && typeof lastRemovedSegment.start !== 'undefined') {\n newPlaylist.syncInfo = {\n mediaSequence: oldPlaylist.mediaSequence + i,\n time: lastRemovedSegment.start\n };\n this.logger_('playlist refresh sync: [time:' + newPlaylist.syncInfo.time + ',' + (' mediaSequence: ' + newPlaylist.syncInfo.mediaSequence + ']'));\n this.trigger('syncinfoupdate');\n break;\n }\n }\n }\n /**\n * Save the mapping from playlist's ProgramDateTime to display. This should\n * only ever happen once at the start of playback.\n *\n * @param {Playlist} playlist - The currently active playlist\n */\n\n }, {\n key: 'setDateTimeMapping',\n value: function setDateTimeMapping(playlist) {\n if (!this.datetimeToDisplayTime && playlist.segments && playlist.segments.length && playlist.segments[0].dateTimeObject) {\n var playlistTimestamp = playlist.segments[0].dateTimeObject.getTime() / 1000;\n this.datetimeToDisplayTime = -playlistTimestamp;\n }\n }\n /**\n * Reset the state of the inspection cache when we do a rendition\n * switch\n */\n\n }, {\n key: 'reset',\n value: function reset() {\n this.inspectCache_ = undefined;\n }\n /**\n * Probe or inspect a fmp4 or an mpeg2-ts segment to determine the start\n * and end of the segment in it's internal \"media time\". Used to generate\n * mappings from that internal \"media time\" to the display time that is\n * shown on the player.\n *\n * @param {SegmentInfo} segmentInfo - The current active request information\n */\n\n }, {\n key: 'probeSegmentInfo',\n value: function probeSegmentInfo(segmentInfo) {\n var segment = segmentInfo.segment;\n var playlist = segmentInfo.playlist;\n var timingInfo = void 0;\n\n if (segment.map) {\n timingInfo = this.probeMp4Segment_(segmentInfo);\n } else {\n timingInfo = this.probeTsSegment_(segmentInfo);\n }\n\n if (timingInfo) {\n if (this.calculateSegmentTimeMapping_(segmentInfo, timingInfo)) {\n this.saveDiscontinuitySyncInfo_(segmentInfo); // If the playlist does not have sync information yet, record that information\n // now with segment timing information\n\n if (!playlist.syncInfo) {\n playlist.syncInfo = {\n mediaSequence: playlist.mediaSequence + segmentInfo.mediaIndex,\n time: segment.start\n };\n }\n }\n }\n\n return timingInfo;\n }\n /**\n * Probe an fmp4 or an mpeg2-ts segment to determine the start of the segment\n * in it's internal \"media time\".\n *\n * @private\n * @param {SegmentInfo} segmentInfo - The current active request information\n * @return {object} The start and end time of the current segment in \"media time\"\n */\n\n }, {\n key: 'probeMp4Segment_',\n value: function probeMp4Segment_(segmentInfo) {\n var segment = segmentInfo.segment;\n var timescales = mp4probe.timescale(segment.map.bytes);\n var startTime = mp4probe.startTime(timescales, segmentInfo.bytes);\n\n if (segmentInfo.timestampOffset !== null) {\n segmentInfo.timestampOffset -= startTime;\n }\n\n return {\n start: startTime,\n end: startTime + segment.duration\n };\n }\n /**\n * Probe an mpeg2-ts segment to determine the start and end of the segment\n * in it's internal \"media time\".\n *\n * @private\n * @param {SegmentInfo} segmentInfo - The current active request information\n * @return {object} The start and end time of the current segment in \"media time\"\n */\n\n }, {\n key: 'probeTsSegment_',\n value: function probeTsSegment_(segmentInfo) {\n var timeInfo = tsprobe(segmentInfo.bytes, this.inspectCache_);\n var segmentStartTime = void 0;\n var segmentEndTime = void 0;\n var segmentTimestampInfo = void 0;\n\n if (!timeInfo) {\n return null;\n }\n\n if (timeInfo.video && timeInfo.video.length === 2) {\n this.inspectCache_ = timeInfo.video[1].dts;\n segmentStartTime = timeInfo.video[0].dtsTime;\n segmentEndTime = timeInfo.video[1].dtsTime;\n segmentTimestampInfo = timeInfo.video;\n } else if (timeInfo.audio && timeInfo.audio.length === 2) {\n this.inspectCache_ = timeInfo.audio[1].dts;\n segmentStartTime = timeInfo.audio[0].dtsTime;\n segmentEndTime = timeInfo.audio[1].dtsTime;\n segmentTimestampInfo = timeInfo.audio;\n }\n\n var probedInfo = {\n segmentTimestampInfo: segmentTimestampInfo,\n start: segmentStartTime,\n end: segmentEndTime,\n containsVideo: timeInfo.video && timeInfo.video.length === 2,\n containsAudio: timeInfo.audio && timeInfo.audio.length === 2\n };\n return probedInfo;\n }\n }, {\n key: 'timestampOffsetForTimeline',\n value: function timestampOffsetForTimeline(timeline) {\n if (typeof this.timelines[timeline] === 'undefined') {\n return null;\n }\n\n return this.timelines[timeline].time;\n }\n }, {\n key: 'mappingForTimeline',\n value: function mappingForTimeline(timeline) {\n if (typeof this.timelines[timeline] === 'undefined') {\n return null;\n }\n\n return this.timelines[timeline].mapping;\n }\n /**\n * Use the \"media time\" for a segment to generate a mapping to \"display time\" and\n * save that display time to the segment.\n *\n * @private\n * @param {SegmentInfo} segmentInfo\n * The current active request information\n * @param {object} timingInfo\n * The start and end time of the current segment in \"media time\"\n * @returns {Boolean}\n * Returns false if segment time mapping could not be calculated\n */\n\n }, {\n key: 'calculateSegmentTimeMapping_',\n value: function calculateSegmentTimeMapping_(segmentInfo, timingInfo) {\n var segment = segmentInfo.segment;\n var mappingObj = this.timelines[segmentInfo.timeline];\n\n if (segmentInfo.timestampOffset !== null) {\n mappingObj = {\n time: segmentInfo.startOfSegment,\n mapping: segmentInfo.startOfSegment - timingInfo.start\n };\n this.timelines[segmentInfo.timeline] = mappingObj;\n this.trigger('timestampoffset');\n this.logger_('time mapping for timeline ' + segmentInfo.timeline + ': ' + ('[time: ' + mappingObj.time + '] [mapping: ' + mappingObj.mapping + ']'));\n segment.start = segmentInfo.startOfSegment;\n segment.end = timingInfo.end + mappingObj.mapping;\n } else if (mappingObj) {\n segment.start = timingInfo.start + mappingObj.mapping;\n segment.end = timingInfo.end + mappingObj.mapping;\n } else {\n return false;\n }\n\n return true;\n }\n /**\n * Each time we have discontinuity in the playlist, attempt to calculate the location\n * in display of the start of the discontinuity and save that. We also save an accuracy\n * value so that we save values with the most accuracy (closest to 0.)\n *\n * @private\n * @param {SegmentInfo} segmentInfo - The current active request information\n */\n\n }, {\n key: 'saveDiscontinuitySyncInfo_',\n value: function saveDiscontinuitySyncInfo_(segmentInfo) {\n var playlist = segmentInfo.playlist;\n var segment = segmentInfo.segment; // If the current segment is a discontinuity then we know exactly where\n // the start of the range and it's accuracy is 0 (greater accuracy values\n // mean more approximation)\n\n if (segment.discontinuity) {\n this.discontinuities[segment.timeline] = {\n time: segment.start,\n accuracy: 0\n };\n } else if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n // Search for future discontinuities that we can provide better timing\n // information for and save that information for sync purposes\n for (var i = 0; i < playlist.discontinuityStarts.length; i++) {\n var segmentIndex = playlist.discontinuityStarts[i];\n var discontinuity = playlist.discontinuitySequence + i + 1;\n var mediaIndexDiff = segmentIndex - segmentInfo.mediaIndex;\n var accuracy = Math.abs(mediaIndexDiff);\n\n if (!this.discontinuities[discontinuity] || this.discontinuities[discontinuity].accuracy > accuracy) {\n var time = void 0;\n\n if (mediaIndexDiff < 0) {\n time = segment.start - sumDurations(playlist, segmentInfo.mediaIndex, segmentIndex);\n } else {\n time = segment.end + sumDurations(playlist, segmentInfo.mediaIndex + 1, segmentIndex);\n }\n\n this.discontinuities[discontinuity] = {\n time: time,\n accuracy: accuracy\n };\n }\n }\n }\n }\n }]);\n return SyncController;\n}(videojs$1.EventTarget);\n\nvar Decrypter$1 = new shimWorker(\"./decrypter-worker.worker.js\", function (window, document$$1) {\n var self = this;\n\n var decrypterWorker = function () {\n /*\n * pkcs7.pad\n * https://github.com/brightcove/pkcs7\n *\n * Copyright (c) 2014 Brightcove\n * Licensed under the apache2 license.\n */\n\n /**\n * Returns the subarray of a Uint8Array without PKCS#7 padding.\n * @param padded {Uint8Array} unencrypted bytes that have been padded\n * @return {Uint8Array} the unpadded bytes\n * @see http://tools.ietf.org/html/rfc5652\n */\n function unpad(padded) {\n return padded.subarray(0, padded.byteLength - padded[padded.byteLength - 1]);\n }\n\n var classCallCheck = function classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n };\n\n var createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n var inherits = function inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n };\n\n var possibleConstructorReturn = function possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n };\n /**\n * @file aes.js\n *\n * This file contains an adaptation of the AES decryption algorithm\n * from the Standford Javascript Cryptography Library. That work is\n * covered by the following copyright and permissions notice:\n *\n * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\n * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation\n * are those of the authors and should not be interpreted as representing\n * official policies, either expressed or implied, of the authors.\n */\n\n /**\n * Expand the S-box tables.\n *\n * @private\n */\n\n\n var precompute = function precompute() {\n var tables = [[[], [], [], [], []], [[], [], [], [], []]];\n var encTable = tables[0];\n var decTable = tables[1];\n var sbox = encTable[4];\n var sboxInv = decTable[4];\n var i = void 0;\n var x = void 0;\n var xInv = void 0;\n var d = [];\n var th = [];\n var x2 = void 0;\n var x4 = void 0;\n var x8 = void 0;\n var s = void 0;\n var tEnc = void 0;\n var tDec = void 0; // Compute double and third tables\n\n for (i = 0; i < 256; i++) {\n th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n }\n\n for (x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n // Compute sbox\n s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n s = s >> 8 ^ s & 255 ^ 99;\n sbox[x] = s;\n sboxInv[s] = x; // Compute MixColumns\n\n x8 = d[x4 = d[x2 = d[x]]];\n tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n for (i = 0; i < 4; i++) {\n encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n }\n } // Compactify. Considerable speedup on Firefox.\n\n\n for (i = 0; i < 5; i++) {\n encTable[i] = encTable[i].slice(0);\n decTable[i] = decTable[i].slice(0);\n }\n\n return tables;\n };\n\n var aesTables = null;\n /**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @class AES\n * @param key {Array} The key as an array of 4, 6 or 8 words.\n */\n\n var AES = function () {\n function AES(key) {\n classCallCheck(this, AES);\n /**\n * The expanded S-box and inverse S-box tables. These will be computed\n * on the client so that we don't have to send them down the wire.\n *\n * There are two tables, _tables[0] is for encryption and\n * _tables[1] is for decryption.\n *\n * The first 4 sub-tables are the expanded S-box with MixColumns. The\n * last (_tables[01][4]) is the S-box itself.\n *\n * @private\n */\n // if we have yet to precompute the S-box tables\n // do so now\n\n if (!aesTables) {\n aesTables = precompute();\n } // then make a copy of that object for use\n\n\n this._tables = [[aesTables[0][0].slice(), aesTables[0][1].slice(), aesTables[0][2].slice(), aesTables[0][3].slice(), aesTables[0][4].slice()], [aesTables[1][0].slice(), aesTables[1][1].slice(), aesTables[1][2].slice(), aesTables[1][3].slice(), aesTables[1][4].slice()]];\n var i = void 0;\n var j = void 0;\n var tmp = void 0;\n var encKey = void 0;\n var decKey = void 0;\n var sbox = this._tables[0][4];\n var decTable = this._tables[1];\n var keyLen = key.length;\n var rcon = 1;\n\n if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n throw new Error('Invalid aes key size');\n }\n\n encKey = key.slice(0);\n decKey = [];\n this._key = [encKey, decKey]; // schedule encryption keys\n\n for (i = keyLen; i < 4 * keyLen + 28; i++) {\n tmp = encKey[i - 1]; // apply sbox\n\n if (i % keyLen === 0 || keyLen === 8 && i % keyLen === 4) {\n tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255]; // shift rows and add rcon\n\n if (i % keyLen === 0) {\n tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n rcon = rcon << 1 ^ (rcon >> 7) * 283;\n }\n }\n\n encKey[i] = encKey[i - keyLen] ^ tmp;\n } // schedule decryption keys\n\n\n for (j = 0; i; j++, i--) {\n tmp = encKey[j & 3 ? i : i - 4];\n\n if (i <= 4 || j < 4) {\n decKey[j] = tmp;\n } else {\n decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ decTable[1][sbox[tmp >> 16 & 255]] ^ decTable[2][sbox[tmp >> 8 & 255]] ^ decTable[3][sbox[tmp & 255]];\n }\n }\n }\n /**\n * Decrypt 16 bytes, specified as four 32-bit words.\n *\n * @param {Number} encrypted0 the first word to decrypt\n * @param {Number} encrypted1 the second word to decrypt\n * @param {Number} encrypted2 the third word to decrypt\n * @param {Number} encrypted3 the fourth word to decrypt\n * @param {Int32Array} out the array to write the decrypted words\n * into\n * @param {Number} offset the offset into the output array to start\n * writing results\n * @return {Array} The plaintext.\n */\n\n\n AES.prototype.decrypt = function decrypt$$1(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\n var key = this._key[1]; // state variables a,b,c,d are loaded with pre-whitened data\n\n var a = encrypted0 ^ key[0];\n var b = encrypted3 ^ key[1];\n var c = encrypted2 ^ key[2];\n var d = encrypted1 ^ key[3];\n var a2 = void 0;\n var b2 = void 0;\n var c2 = void 0; // key.length === 2 ?\n\n var nInnerRounds = key.length / 4 - 2;\n var i = void 0;\n var kIndex = 4;\n var table = this._tables[1]; // load up the tables\n\n var table0 = table[0];\n var table1 = table[1];\n var table2 = table[2];\n var table3 = table[3];\n var sbox = table[4]; // Inner rounds. Cribbed from OpenSSL.\n\n for (i = 0; i < nInnerRounds; i++) {\n a2 = table0[a >>> 24] ^ table1[b >> 16 & 255] ^ table2[c >> 8 & 255] ^ table3[d & 255] ^ key[kIndex];\n b2 = table0[b >>> 24] ^ table1[c >> 16 & 255] ^ table2[d >> 8 & 255] ^ table3[a & 255] ^ key[kIndex + 1];\n c2 = table0[c >>> 24] ^ table1[d >> 16 & 255] ^ table2[a >> 8 & 255] ^ table3[b & 255] ^ key[kIndex + 2];\n d = table0[d >>> 24] ^ table1[a >> 16 & 255] ^ table2[b >> 8 & 255] ^ table3[c & 255] ^ key[kIndex + 3];\n kIndex += 4;\n a = a2;\n b = b2;\n c = c2;\n } // Last round.\n\n\n for (i = 0; i < 4; i++) {\n out[(3 & -i) + offset] = sbox[a >>> 24] << 24 ^ sbox[b >> 16 & 255] << 16 ^ sbox[c >> 8 & 255] << 8 ^ sbox[d & 255] ^ key[kIndex++];\n a2 = a;\n a = b;\n b = c;\n c = d;\n d = a2;\n }\n };\n\n return AES;\n }();\n /**\n * @file stream.js\n */\n\n /**\n * A lightweight readable stream implemention that handles event dispatching.\n *\n * @class Stream\n */\n\n\n var Stream = function () {\n function Stream() {\n classCallCheck(this, Stream);\n this.listeners = {};\n }\n /**\n * Add a listener for a specified event type.\n *\n * @param {String} type the event name\n * @param {Function} listener the callback to be invoked when an event of\n * the specified type occurs\n */\n\n\n Stream.prototype.on = function on(type, listener) {\n if (!this.listeners[type]) {\n this.listeners[type] = [];\n }\n\n this.listeners[type].push(listener);\n };\n /**\n * Remove a listener for a specified event type.\n *\n * @param {String} type the event name\n * @param {Function} listener a function previously registered for this\n * type of event through `on`\n * @return {Boolean} if we could turn it off or not\n */\n\n\n Stream.prototype.off = function off(type, listener) {\n if (!this.listeners[type]) {\n return false;\n }\n\n var index = this.listeners[type].indexOf(listener);\n this.listeners[type].splice(index, 1);\n return index > -1;\n };\n /**\n * Trigger an event of the specified type on this stream. Any additional\n * arguments to this function are passed as parameters to event listeners.\n *\n * @param {String} type the event name\n */\n\n\n Stream.prototype.trigger = function trigger(type) {\n var callbacks = this.listeners[type];\n\n if (!callbacks) {\n return;\n } // Slicing the arguments on every invocation of this method\n // can add a significant amount of overhead. Avoid the\n // intermediate object creation for the common case of a\n // single callback argument\n\n\n if (arguments.length === 2) {\n var length = callbacks.length;\n\n for (var i = 0; i < length; ++i) {\n callbacks[i].call(this, arguments[1]);\n }\n } else {\n var args = Array.prototype.slice.call(arguments, 1);\n var _length = callbacks.length;\n\n for (var _i = 0; _i < _length; ++_i) {\n callbacks[_i].apply(this, args);\n }\n }\n };\n /**\n * Destroys the stream and cleans up.\n */\n\n\n Stream.prototype.dispose = function dispose() {\n this.listeners = {};\n };\n /**\n * Forwards all `data` events on this stream to the destination stream. The\n * destination stream should provide a method `push` to receive the data\n * events as they arrive.\n *\n * @param {Stream} destination the stream that will receive all `data` events\n * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n */\n\n\n Stream.prototype.pipe = function pipe(destination) {\n this.on('data', function (data) {\n destination.push(data);\n });\n };\n\n return Stream;\n }();\n /**\n * @file async-stream.js\n */\n\n /**\n * A wrapper around the Stream class to use setTiemout\n * and run stream \"jobs\" Asynchronously\n *\n * @class AsyncStream\n * @extends Stream\n */\n\n\n var AsyncStream$$1 = function (_Stream) {\n inherits(AsyncStream$$1, _Stream);\n\n function AsyncStream$$1() {\n classCallCheck(this, AsyncStream$$1);\n\n var _this = possibleConstructorReturn(this, _Stream.call(this, Stream));\n\n _this.jobs = [];\n _this.delay = 1;\n _this.timeout_ = null;\n return _this;\n }\n /**\n * process an async job\n *\n * @private\n */\n\n\n AsyncStream$$1.prototype.processJob_ = function processJob_() {\n this.jobs.shift()();\n\n if (this.jobs.length) {\n this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n } else {\n this.timeout_ = null;\n }\n };\n /**\n * push a job into the stream\n *\n * @param {Function} job the job to push into the stream\n */\n\n\n AsyncStream$$1.prototype.push = function push(job) {\n this.jobs.push(job);\n\n if (!this.timeout_) {\n this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n }\n };\n\n return AsyncStream$$1;\n }(Stream);\n /**\n * @file decrypter.js\n *\n * An asynchronous implementation of AES-128 CBC decryption with\n * PKCS#7 padding.\n */\n\n /**\n * Convert network-order (big-endian) bytes into their little-endian\n * representation.\n */\n\n\n var ntoh = function ntoh(word) {\n return word << 24 | (word & 0xff00) << 8 | (word & 0xff0000) >> 8 | word >>> 24;\n };\n /**\n * Decrypt bytes using AES-128 with CBC and PKCS#7 padding.\n *\n * @param {Uint8Array} encrypted the encrypted bytes\n * @param {Uint32Array} key the bytes of the decryption key\n * @param {Uint32Array} initVector the initialization vector (IV) to\n * use for the first round of CBC.\n * @return {Uint8Array} the decrypted bytes\n *\n * @see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard\n * @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29\n * @see https://tools.ietf.org/html/rfc2315\n */\n\n\n var decrypt$$1 = function decrypt$$1(encrypted, key, initVector) {\n // word-level access to the encrypted bytes\n var encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2);\n var decipher = new AES(Array.prototype.slice.call(key)); // byte and word-level access for the decrypted output\n\n var decrypted = new Uint8Array(encrypted.byteLength);\n var decrypted32 = new Int32Array(decrypted.buffer); // temporary variables for working with the IV, encrypted, and\n // decrypted data\n\n var init0 = void 0;\n var init1 = void 0;\n var init2 = void 0;\n var init3 = void 0;\n var encrypted0 = void 0;\n var encrypted1 = void 0;\n var encrypted2 = void 0;\n var encrypted3 = void 0; // iteration variable\n\n var wordIx = void 0; // pull out the words of the IV to ensure we don't modify the\n // passed-in reference and easier access\n\n init0 = initVector[0];\n init1 = initVector[1];\n init2 = initVector[2];\n init3 = initVector[3]; // decrypt four word sequences, applying cipher-block chaining (CBC)\n // to each decrypted block\n\n for (wordIx = 0; wordIx < encrypted32.length; wordIx += 4) {\n // convert big-endian (network order) words into little-endian\n // (javascript order)\n encrypted0 = ntoh(encrypted32[wordIx]);\n encrypted1 = ntoh(encrypted32[wordIx + 1]);\n encrypted2 = ntoh(encrypted32[wordIx + 2]);\n encrypted3 = ntoh(encrypted32[wordIx + 3]); // decrypt the block\n\n decipher.decrypt(encrypted0, encrypted1, encrypted2, encrypted3, decrypted32, wordIx); // XOR with the IV, and restore network byte-order to obtain the\n // plaintext\n\n decrypted32[wordIx] = ntoh(decrypted32[wordIx] ^ init0);\n decrypted32[wordIx + 1] = ntoh(decrypted32[wordIx + 1] ^ init1);\n decrypted32[wordIx + 2] = ntoh(decrypted32[wordIx + 2] ^ init2);\n decrypted32[wordIx + 3] = ntoh(decrypted32[wordIx + 3] ^ init3); // setup the IV for the next round\n\n init0 = encrypted0;\n init1 = encrypted1;\n init2 = encrypted2;\n init3 = encrypted3;\n }\n\n return decrypted;\n };\n /**\n * The `Decrypter` class that manages decryption of AES\n * data through `AsyncStream` objects and the `decrypt`\n * function\n *\n * @param {Uint8Array} encrypted the encrypted bytes\n * @param {Uint32Array} key the bytes of the decryption key\n * @param {Uint32Array} initVector the initialization vector (IV) to\n * @param {Function} done the function to run when done\n * @class Decrypter\n */\n\n\n var Decrypter$$1 = function () {\n function Decrypter$$1(encrypted, key, initVector, done) {\n classCallCheck(this, Decrypter$$1);\n var step = Decrypter$$1.STEP;\n var encrypted32 = new Int32Array(encrypted.buffer);\n var decrypted = new Uint8Array(encrypted.byteLength);\n var i = 0;\n this.asyncStream_ = new AsyncStream$$1(); // split up the encryption job and do the individual chunks asynchronously\n\n this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n\n for (i = step; i < encrypted32.length; i += step) {\n initVector = new Uint32Array([ntoh(encrypted32[i - 4]), ntoh(encrypted32[i - 3]), ntoh(encrypted32[i - 2]), ntoh(encrypted32[i - 1])]);\n this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n } // invoke the done() callback when everything is finished\n\n\n this.asyncStream_.push(function () {\n // remove pkcs#7 padding from the decrypted bytes\n done(null, unpad(decrypted));\n });\n }\n /**\n * a getter for step the maximum number of bytes to process at one time\n *\n * @return {Number} the value of step 32000\n */\n\n /**\n * @private\n */\n\n\n Decrypter$$1.prototype.decryptChunk_ = function decryptChunk_(encrypted, key, initVector, decrypted) {\n return function () {\n var bytes = decrypt$$1(encrypted, key, initVector);\n decrypted.set(bytes, encrypted.byteOffset);\n };\n };\n\n createClass(Decrypter$$1, null, [{\n key: 'STEP',\n get: function get$$1() {\n // 4 * 8000;\n return 32000;\n }\n }]);\n return Decrypter$$1;\n }();\n /**\n * @file bin-utils.js\n */\n\n /**\n * Creates an object for sending to a web worker modifying properties that are TypedArrays\n * into a new object with seperated properties for the buffer, byteOffset, and byteLength.\n *\n * @param {Object} message\n * Object of properties and values to send to the web worker\n * @return {Object}\n * Modified message with TypedArray values expanded\n * @function createTransferableMessage\n */\n\n\n var createTransferableMessage = function createTransferableMessage(message) {\n var transferable = {};\n Object.keys(message).forEach(function (key) {\n var value = message[key];\n\n if (ArrayBuffer.isView(value)) {\n transferable[key] = {\n bytes: value.buffer,\n byteOffset: value.byteOffset,\n byteLength: value.byteLength\n };\n } else {\n transferable[key] = value;\n }\n });\n return transferable;\n };\n /**\n * Our web worker interface so that things can talk to aes-decrypter\n * that will be running in a web worker. the scope is passed to this by\n * webworkify.\n *\n * @param {Object} self\n * the scope for the web worker\n */\n\n\n var DecrypterWorker = function DecrypterWorker(self) {\n self.onmessage = function (event) {\n var data = event.data;\n var encrypted = new Uint8Array(data.encrypted.bytes, data.encrypted.byteOffset, data.encrypted.byteLength);\n var key = new Uint32Array(data.key.bytes, data.key.byteOffset, data.key.byteLength / 4);\n var iv = new Uint32Array(data.iv.bytes, data.iv.byteOffset, data.iv.byteLength / 4);\n /* eslint-disable no-new, handle-callback-err */\n\n new Decrypter$$1(encrypted, key, iv, function (err, bytes) {\n self.postMessage(createTransferableMessage({\n source: data.source,\n decrypted: bytes\n }), [bytes.buffer]);\n });\n /* eslint-enable */\n };\n };\n\n var decrypterWorker = new DecrypterWorker(self);\n return decrypterWorker;\n }();\n});\n/**\n * Convert the properties of an HLS track into an audioTrackKind.\n *\n * @private\n */\n\nvar audioTrackKind_ = function audioTrackKind_(properties) {\n var kind = properties[\"default\"] ? 'main' : 'alternative';\n\n if (properties.characteristics && properties.characteristics.indexOf('public.accessibility.describes-video') >= 0) {\n kind = 'main-desc';\n }\n\n return kind;\n};\n/**\n * Pause provided segment loader and playlist loader if active\n *\n * @param {SegmentLoader} segmentLoader\n * SegmentLoader to pause\n * @param {Object} mediaType\n * Active media type\n * @function stopLoaders\n */\n\n\nvar stopLoaders = function stopLoaders(segmentLoader, mediaType) {\n segmentLoader.abort();\n segmentLoader.pause();\n\n if (mediaType && mediaType.activePlaylistLoader) {\n mediaType.activePlaylistLoader.pause();\n mediaType.activePlaylistLoader = null;\n }\n};\n/**\n * Start loading provided segment loader and playlist loader\n *\n * @param {PlaylistLoader} playlistLoader\n * PlaylistLoader to start loading\n * @param {Object} mediaType\n * Active media type\n * @function startLoaders\n */\n\n\nvar startLoaders = function startLoaders(playlistLoader, mediaType) {\n // Segment loader will be started after `loadedmetadata` or `loadedplaylist` from the\n // playlist loader\n mediaType.activePlaylistLoader = playlistLoader;\n playlistLoader.load();\n};\n/**\n * Returns a function to be called when the media group changes. It performs a\n * non-destructive (preserve the buffer) resync of the SegmentLoader. This is because a\n * change of group is merely a rendition switch of the same content at another encoding,\n * rather than a change of content, such as switching audio from English to Spanish.\n *\n * @param {String} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Handler for a non-destructive resync of SegmentLoader when the active media\n * group changes.\n * @function onGroupChanged\n */\n\n\nvar onGroupChanged = function onGroupChanged(type, settings) {\n return function () {\n var _settings$segmentLoad = settings.segmentLoaders,\n segmentLoader = _settings$segmentLoad[type],\n mainSegmentLoader = _settings$segmentLoad.main,\n mediaType = settings.mediaTypes[type];\n var activeTrack = mediaType.activeTrack();\n var activeGroup = mediaType.activeGroup(activeTrack);\n var previousActiveLoader = mediaType.activePlaylistLoader;\n stopLoaders(segmentLoader, mediaType);\n\n if (!activeGroup) {\n // there is no group active\n return;\n }\n\n if (!activeGroup.playlistLoader) {\n if (previousActiveLoader) {\n // The previous group had a playlist loader but the new active group does not\n // this means we are switching from demuxed to muxed audio. In this case we want to\n // do a destructive reset of the main segment loader and not restart the audio\n // loaders.\n mainSegmentLoader.resetEverything();\n }\n\n return;\n } // Non-destructive resync\n\n\n segmentLoader.resyncLoader();\n startLoaders(activeGroup.playlistLoader, mediaType);\n };\n};\n/**\n * Returns a function to be called when the media track changes. It performs a\n * destructive reset of the SegmentLoader to ensure we start loading as close to\n * currentTime as possible.\n *\n * @param {String} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Handler for a destructive reset of SegmentLoader when the active media\n * track changes.\n * @function onTrackChanged\n */\n\n\nvar onTrackChanged = function onTrackChanged(type, settings) {\n return function () {\n var _settings$segmentLoad2 = settings.segmentLoaders,\n segmentLoader = _settings$segmentLoad2[type],\n mainSegmentLoader = _settings$segmentLoad2.main,\n mediaType = settings.mediaTypes[type];\n var activeTrack = mediaType.activeTrack();\n var activeGroup = mediaType.activeGroup(activeTrack);\n var previousActiveLoader = mediaType.activePlaylistLoader;\n stopLoaders(segmentLoader, mediaType);\n\n if (!activeGroup) {\n // there is no group active so we do not want to restart loaders\n return;\n }\n\n if (!activeGroup.playlistLoader) {\n // when switching from demuxed audio/video to muxed audio/video (noted by no playlist\n // loader for the audio group), we want to do a destructive reset of the main segment\n // loader and not restart the audio loaders\n mainSegmentLoader.resetEverything();\n return;\n }\n\n if (previousActiveLoader === activeGroup.playlistLoader) {\n // Nothing has actually changed. This can happen because track change events can fire\n // multiple times for a \"single\" change. One for enabling the new active track, and\n // one for disabling the track that was active\n startLoaders(activeGroup.playlistLoader, mediaType);\n return;\n }\n\n if (segmentLoader.track) {\n // For WebVTT, set the new text track in the segmentloader\n segmentLoader.track(activeTrack);\n } // destructive reset\n\n\n segmentLoader.resetEverything();\n startLoaders(activeGroup.playlistLoader, mediaType);\n };\n};\n\nvar onError = {\n /**\n * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\n * an error.\n *\n * @param {String} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Error handler. Logs warning (or error if the playlist is blacklisted) to\n * console and switches back to default audio track.\n * @function onError.AUDIO\n */\n AUDIO: function AUDIO(type, settings) {\n return function () {\n var segmentLoader = settings.segmentLoaders[type],\n mediaType = settings.mediaTypes[type],\n blacklistCurrentPlaylist = settings.blacklistCurrentPlaylist;\n stopLoaders(segmentLoader, mediaType); // switch back to default audio track\n\n var activeTrack = mediaType.activeTrack();\n var activeGroup = mediaType.activeGroup();\n var id = (activeGroup.filter(function (group) {\n return group[\"default\"];\n })[0] || activeGroup[0]).id;\n var defaultTrack = mediaType.tracks[id];\n\n if (activeTrack === defaultTrack) {\n // Default track encountered an error. All we can do now is blacklist the current\n // rendition and hope another will switch audio groups\n blacklistCurrentPlaylist({\n message: 'Problem encountered loading the default audio track.'\n });\n return;\n }\n\n videojs$1.log.warn('Problem encountered loading the alternate audio track.' + 'Switching back to default.');\n\n for (var trackId in mediaType.tracks) {\n mediaType.tracks[trackId].enabled = mediaType.tracks[trackId] === defaultTrack;\n }\n\n mediaType.onTrackChanged();\n };\n },\n\n /**\n * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\n * an error.\n *\n * @param {String} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Error handler. Logs warning to console and disables the active subtitle track\n * @function onError.SUBTITLES\n */\n SUBTITLES: function SUBTITLES(type, settings) {\n return function () {\n var segmentLoader = settings.segmentLoaders[type],\n mediaType = settings.mediaTypes[type];\n videojs$1.log.warn('Problem encountered loading the subtitle track.' + 'Disabling subtitle track.');\n stopLoaders(segmentLoader, mediaType);\n var track = mediaType.activeTrack();\n\n if (track) {\n track.mode = 'disabled';\n }\n\n mediaType.onTrackChanged();\n };\n }\n};\nvar setupListeners = {\n /**\n * Setup event listeners for audio playlist loader\n *\n * @param {String} type\n * MediaGroup type\n * @param {PlaylistLoader|null} playlistLoader\n * PlaylistLoader to register listeners on\n * @param {Object} settings\n * Object containing required information for media groups\n * @function setupListeners.AUDIO\n */\n AUDIO: function AUDIO(type, playlistLoader, settings) {\n if (!playlistLoader) {\n // no playlist loader means audio will be muxed with the video\n return;\n }\n\n var tech = settings.tech,\n requestOptions = settings.requestOptions,\n segmentLoader = settings.segmentLoaders[type];\n playlistLoader.on('loadedmetadata', function () {\n var media = playlistLoader.media();\n segmentLoader.playlist(media, requestOptions); // if the video is already playing, or if this isn't a live video and preload\n // permits, start downloading segments\n\n if (!tech.paused() || media.endList && tech.preload() !== 'none') {\n segmentLoader.load();\n }\n });\n playlistLoader.on('loadedplaylist', function () {\n segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\n\n if (!tech.paused()) {\n segmentLoader.load();\n }\n });\n playlistLoader.on('error', onError[type](type, settings));\n },\n\n /**\n * Setup event listeners for subtitle playlist loader\n *\n * @param {String} type\n * MediaGroup type\n * @param {PlaylistLoader|null} playlistLoader\n * PlaylistLoader to register listeners on\n * @param {Object} settings\n * Object containing required information for media groups\n * @function setupListeners.SUBTITLES\n */\n SUBTITLES: function SUBTITLES(type, playlistLoader, settings) {\n var tech = settings.tech,\n requestOptions = settings.requestOptions,\n segmentLoader = settings.segmentLoaders[type],\n mediaType = settings.mediaTypes[type];\n playlistLoader.on('loadedmetadata', function () {\n var media = playlistLoader.media();\n segmentLoader.playlist(media, requestOptions);\n segmentLoader.track(mediaType.activeTrack()); // if the video is already playing, or if this isn't a live video and preload\n // permits, start downloading segments\n\n if (!tech.paused() || media.endList && tech.preload() !== 'none') {\n segmentLoader.load();\n }\n });\n playlistLoader.on('loadedplaylist', function () {\n segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\n\n if (!tech.paused()) {\n segmentLoader.load();\n }\n });\n playlistLoader.on('error', onError[type](type, settings));\n }\n};\nvar initialize = {\n /**\n * Setup PlaylistLoaders and AudioTracks for the audio groups\n *\n * @param {String} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @function initialize.AUDIO\n */\n 'AUDIO': function AUDIO(type, settings) {\n var hls = settings.hls,\n sourceType = settings.sourceType,\n segmentLoader = settings.segmentLoaders[type],\n requestOptions = settings.requestOptions,\n mediaGroups = settings.master.mediaGroups,\n _settings$mediaTypes$ = settings.mediaTypes[type],\n groups = _settings$mediaTypes$.groups,\n tracks = _settings$mediaTypes$.tracks,\n masterPlaylistLoader = settings.masterPlaylistLoader; // force a default if we have none\n\n if (!mediaGroups[type] || Object.keys(mediaGroups[type]).length === 0) {\n mediaGroups[type] = {\n main: {\n \"default\": {\n \"default\": true\n }\n }\n };\n }\n\n for (var groupId in mediaGroups[type]) {\n if (!groups[groupId]) {\n groups[groupId] = [];\n } // List of playlists that have an AUDIO attribute value matching the current\n // group ID\n\n\n for (var variantLabel in mediaGroups[type][groupId]) {\n var properties = mediaGroups[type][groupId][variantLabel];\n var playlistLoader = void 0;\n\n if (properties.resolvedUri) {\n playlistLoader = new PlaylistLoader(properties.resolvedUri, hls, requestOptions);\n } else if (properties.playlists && sourceType === 'dash') {\n playlistLoader = new DashPlaylistLoader(properties.playlists[0], hls, requestOptions, masterPlaylistLoader);\n } else {\n // no resolvedUri means the audio is muxed with the video when using this\n // audio track\n playlistLoader = null;\n }\n\n properties = videojs$1.mergeOptions({\n id: variantLabel,\n playlistLoader: playlistLoader\n }, properties);\n setupListeners[type](type, properties.playlistLoader, settings);\n groups[groupId].push(properties);\n\n if (typeof tracks[variantLabel] === 'undefined') {\n var track = new videojs$1.AudioTrack({\n id: variantLabel,\n kind: audioTrackKind_(properties),\n enabled: false,\n language: properties.language,\n \"default\": properties[\"default\"],\n label: variantLabel\n });\n tracks[variantLabel] = track;\n }\n }\n } // setup single error event handler for the segment loader\n\n\n segmentLoader.on('error', onError[type](type, settings));\n },\n\n /**\n * Setup PlaylistLoaders and TextTracks for the subtitle groups\n *\n * @param {String} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @function initialize.SUBTITLES\n */\n 'SUBTITLES': function SUBTITLES(type, settings) {\n var tech = settings.tech,\n hls = settings.hls,\n sourceType = settings.sourceType,\n segmentLoader = settings.segmentLoaders[type],\n requestOptions = settings.requestOptions,\n mediaGroups = settings.master.mediaGroups,\n _settings$mediaTypes$2 = settings.mediaTypes[type],\n groups = _settings$mediaTypes$2.groups,\n tracks = _settings$mediaTypes$2.tracks,\n masterPlaylistLoader = settings.masterPlaylistLoader;\n\n for (var groupId in mediaGroups[type]) {\n if (!groups[groupId]) {\n groups[groupId] = [];\n }\n\n for (var variantLabel in mediaGroups[type][groupId]) {\n if (mediaGroups[type][groupId][variantLabel].forced) {\n // Subtitle playlists with the forced attribute are not selectable in Safari.\n // According to Apple's HLS Authoring Specification:\n // If content has forced subtitles and regular subtitles in a given language,\n // the regular subtitles track in that language MUST contain both the forced\n // subtitles and the regular subtitles for that language.\n // Because of this requirement and that Safari does not add forced subtitles,\n // forced subtitles are skipped here to maintain consistent experience across\n // all platforms\n continue;\n }\n\n var properties = mediaGroups[type][groupId][variantLabel];\n var playlistLoader = void 0;\n\n if (sourceType === 'hls') {\n playlistLoader = new PlaylistLoader(properties.resolvedUri, hls, requestOptions);\n } else if (sourceType === 'dash') {\n playlistLoader = new DashPlaylistLoader(properties.playlists[0], hls, requestOptions, masterPlaylistLoader);\n }\n\n properties = videojs$1.mergeOptions({\n id: variantLabel,\n playlistLoader: playlistLoader\n }, properties);\n setupListeners[type](type, properties.playlistLoader, settings);\n groups[groupId].push(properties);\n\n if (typeof tracks[variantLabel] === 'undefined') {\n var track = tech.addRemoteTextTrack({\n id: variantLabel,\n kind: 'subtitles',\n \"default\": properties[\"default\"] && properties.autoselect,\n language: properties.language,\n label: variantLabel\n }, false).track;\n tracks[variantLabel] = track;\n }\n }\n } // setup single error event handler for the segment loader\n\n\n segmentLoader.on('error', onError[type](type, settings));\n },\n\n /**\n * Setup TextTracks for the closed-caption groups\n *\n * @param {String} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @function initialize['CLOSED-CAPTIONS']\n */\n 'CLOSED-CAPTIONS': function CLOSEDCAPTIONS(type, settings) {\n var tech = settings.tech,\n mediaGroups = settings.master.mediaGroups,\n _settings$mediaTypes$3 = settings.mediaTypes[type],\n groups = _settings$mediaTypes$3.groups,\n tracks = _settings$mediaTypes$3.tracks;\n\n for (var groupId in mediaGroups[type]) {\n if (!groups[groupId]) {\n groups[groupId] = [];\n }\n\n for (var variantLabel in mediaGroups[type][groupId]) {\n var properties = mediaGroups[type][groupId][variantLabel]; // We only support CEA608 captions for now, so ignore anything that\n // doesn't use a CCx INSTREAM-ID\n\n if (!properties.instreamId.match(/CC\\d/)) {\n continue;\n } // No PlaylistLoader is required for Closed-Captions because the captions are\n // embedded within the video stream\n\n\n groups[groupId].push(videojs$1.mergeOptions({\n id: variantLabel\n }, properties));\n\n if (typeof tracks[variantLabel] === 'undefined') {\n var track = tech.addRemoteTextTrack({\n id: properties.instreamId,\n kind: 'captions',\n \"default\": properties[\"default\"] && properties.autoselect,\n language: properties.language,\n label: variantLabel\n }, false).track;\n tracks[variantLabel] = track;\n }\n }\n }\n }\n};\n/**\n * Returns a function used to get the active group of the provided type\n *\n * @param {String} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Function that returns the active media group for the provided type. Takes an\n * optional parameter {TextTrack} track. If no track is provided, a list of all\n * variants in the group, otherwise the variant corresponding to the provided\n * track is returned.\n * @function activeGroup\n */\n\nvar activeGroup = function activeGroup(type, settings) {\n return function (track) {\n var masterPlaylistLoader = settings.masterPlaylistLoader,\n groups = settings.mediaTypes[type].groups;\n var media = masterPlaylistLoader.media();\n\n if (!media) {\n return null;\n }\n\n var variants = null;\n\n if (media.attributes[type]) {\n variants = groups[media.attributes[type]];\n }\n\n variants = variants || groups.main;\n\n if (typeof track === 'undefined') {\n return variants;\n }\n\n if (track === null) {\n // An active track was specified so a corresponding group is expected. track === null\n // means no track is currently active so there is no corresponding group\n return null;\n }\n\n return variants.filter(function (props) {\n return props.id === track.id;\n })[0] || null;\n };\n};\n\nvar activeTrack = {\n /**\n * Returns a function used to get the active track of type provided\n *\n * @param {String} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Function that returns the active media track for the provided type. Returns\n * null if no track is active\n * @function activeTrack.AUDIO\n */\n AUDIO: function AUDIO(type, settings) {\n return function () {\n var tracks = settings.mediaTypes[type].tracks;\n\n for (var id in tracks) {\n if (tracks[id].enabled) {\n return tracks[id];\n }\n }\n\n return null;\n };\n },\n\n /**\n * Returns a function used to get the active track of type provided\n *\n * @param {String} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Function that returns the active media track for the provided type. Returns\n * null if no track is active\n * @function activeTrack.SUBTITLES\n */\n SUBTITLES: function SUBTITLES(type, settings) {\n return function () {\n var tracks = settings.mediaTypes[type].tracks;\n\n for (var id in tracks) {\n if (tracks[id].mode === 'showing') {\n return tracks[id];\n }\n }\n\n return null;\n };\n }\n};\n/**\n * Setup PlaylistLoaders and Tracks for media groups (Audio, Subtitles,\n * Closed-Captions) specified in the master manifest.\n *\n * @param {Object} settings\n * Object containing required information for setting up the media groups\n * @param {SegmentLoader} settings.segmentLoaders.AUDIO\n * Audio segment loader\n * @param {SegmentLoader} settings.segmentLoaders.SUBTITLES\n * Subtitle segment loader\n * @param {SegmentLoader} settings.segmentLoaders.main\n * Main segment loader\n * @param {Tech} settings.tech\n * The tech of the player\n * @param {Object} settings.requestOptions\n * XHR request options used by the segment loaders\n * @param {PlaylistLoader} settings.masterPlaylistLoader\n * PlaylistLoader for the master source\n * @param {HlsHandler} settings.hls\n * HLS SourceHandler\n * @param {Object} settings.master\n * The parsed master manifest\n * @param {Object} settings.mediaTypes\n * Object to store the loaders, tracks, and utility methods for each media type\n * @param {Function} settings.blacklistCurrentPlaylist\n * Blacklists the current rendition and forces a rendition switch.\n * @function setupMediaGroups\n */\n\nvar setupMediaGroups = function setupMediaGroups(settings) {\n ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(function (type) {\n initialize[type](type, settings);\n });\n var mediaTypes = settings.mediaTypes,\n masterPlaylistLoader = settings.masterPlaylistLoader,\n tech = settings.tech,\n hls = settings.hls; // setup active group and track getters and change event handlers\n\n ['AUDIO', 'SUBTITLES'].forEach(function (type) {\n mediaTypes[type].activeGroup = activeGroup(type, settings);\n mediaTypes[type].activeTrack = activeTrack[type](type, settings);\n mediaTypes[type].onGroupChanged = onGroupChanged(type, settings);\n mediaTypes[type].onTrackChanged = onTrackChanged(type, settings);\n }); // DO NOT enable the default subtitle or caption track.\n // DO enable the default audio track\n\n var audioGroup = mediaTypes.AUDIO.activeGroup();\n var groupId = (audioGroup.filter(function (group) {\n return group[\"default\"];\n })[0] || audioGroup[0]).id;\n mediaTypes.AUDIO.tracks[groupId].enabled = true;\n mediaTypes.AUDIO.onTrackChanged();\n masterPlaylistLoader.on('mediachange', function () {\n ['AUDIO', 'SUBTITLES'].forEach(function (type) {\n return mediaTypes[type].onGroupChanged();\n });\n }); // custom audio track change event handler for usage event\n\n var onAudioTrackChanged = function onAudioTrackChanged() {\n mediaTypes.AUDIO.onTrackChanged();\n tech.trigger({\n type: 'usage',\n name: 'hls-audio-change'\n });\n };\n\n tech.audioTracks().addEventListener('change', onAudioTrackChanged);\n tech.remoteTextTracks().addEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\n hls.on('dispose', function () {\n tech.audioTracks().removeEventListener('change', onAudioTrackChanged);\n tech.remoteTextTracks().removeEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\n }); // clear existing audio tracks and add the ones we just created\n\n tech.clearTracks('audio');\n\n for (var id in mediaTypes.AUDIO.tracks) {\n tech.audioTracks().addTrack(mediaTypes.AUDIO.tracks[id]);\n }\n};\n/**\n * Creates skeleton object used to store the loaders, tracks, and utility methods for each\n * media type\n *\n * @return {Object}\n * Object to store the loaders, tracks, and utility methods for each media type\n * @function createMediaTypes\n */\n\n\nvar createMediaTypes = function createMediaTypes() {\n var mediaTypes = {};\n ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(function (type) {\n mediaTypes[type] = {\n groups: {},\n tracks: {},\n activePlaylistLoader: null,\n activeGroup: noop,\n activeTrack: noop,\n onGroupChanged: noop,\n onTrackChanged: noop\n };\n });\n return mediaTypes;\n};\n/**\n * @file master-playlist-controller.js\n */\n\n\nvar ABORT_EARLY_BLACKLIST_SECONDS = 60 * 2;\nvar Hls = void 0; // SegmentLoader stats that need to have each loader's\n// values summed to calculate the final value\n\nvar loaderStats = ['mediaRequests', 'mediaRequestsAborted', 'mediaRequestsTimedout', 'mediaRequestsErrored', 'mediaTransferDuration', 'mediaBytesTransferred'];\n\nvar sumLoaderStat = function sumLoaderStat(stat) {\n return this.audioSegmentLoader_[stat] + this.mainSegmentLoader_[stat];\n};\n/**\n * the master playlist controller controller all interactons\n * between playlists and segmentloaders. At this time this mainly\n * involves a master playlist and a series of audio playlists\n * if they are available\n *\n * @class MasterPlaylistController\n * @extends videojs.EventTarget\n */\n\n\nvar MasterPlaylistController = function (_videojs$EventTarget) {\n inherits(MasterPlaylistController, _videojs$EventTarget);\n\n function MasterPlaylistController(options) {\n classCallCheck(this, MasterPlaylistController);\n\n var _this = possibleConstructorReturn(this, (MasterPlaylistController.__proto__ || Object.getPrototypeOf(MasterPlaylistController)).call(this));\n\n var url = options.url,\n handleManifestRedirects = options.handleManifestRedirects,\n withCredentials = options.withCredentials,\n tech = options.tech,\n bandwidth = options.bandwidth,\n externHls = options.externHls,\n useCueTags = options.useCueTags,\n blacklistDuration = options.blacklistDuration,\n enableLowInitialPlaylist = options.enableLowInitialPlaylist,\n sourceType = options.sourceType,\n seekTo = options.seekTo,\n cacheEncryptionKeys = options.cacheEncryptionKeys;\n\n if (!url) {\n throw new Error('A non-empty playlist URL is required');\n }\n\n Hls = externHls;\n _this.withCredentials = withCredentials;\n _this.tech_ = tech;\n _this.hls_ = tech.hls;\n _this.seekTo_ = seekTo;\n _this.sourceType_ = sourceType;\n _this.useCueTags_ = useCueTags;\n _this.blacklistDuration = blacklistDuration;\n _this.enableLowInitialPlaylist = enableLowInitialPlaylist;\n\n if (_this.useCueTags_) {\n _this.cueTagsTrack_ = _this.tech_.addTextTrack('metadata', 'ad-cues');\n _this.cueTagsTrack_.inBandMetadataTrackDispatchType = '';\n }\n\n _this.requestOptions_ = {\n withCredentials: withCredentials,\n handleManifestRedirects: handleManifestRedirects,\n timeout: null\n };\n _this.mediaTypes_ = createMediaTypes();\n _this.mediaSource = new videojs$1.MediaSource(); // load the media source into the player\n\n _this.mediaSource.addEventListener('sourceopen', _this.handleSourceOpen_.bind(_this));\n\n _this.seekable_ = videojs$1.createTimeRanges();\n\n _this.hasPlayed_ = function () {\n return false;\n };\n\n _this.syncController_ = new SyncController(options);\n _this.segmentMetadataTrack_ = tech.addRemoteTextTrack({\n kind: 'metadata',\n label: 'segment-metadata'\n }, false).track;\n _this.decrypter_ = new Decrypter$1();\n _this.inbandTextTracks_ = {};\n var segmentLoaderSettings = {\n hls: _this.hls_,\n mediaSource: _this.mediaSource,\n currentTime: _this.tech_.currentTime.bind(_this.tech_),\n seekable: function seekable$$1() {\n return _this.seekable();\n },\n seeking: function seeking() {\n return _this.tech_.seeking();\n },\n duration: function duration$$1() {\n return _this.mediaSource.duration;\n },\n hasPlayed: function hasPlayed() {\n return _this.hasPlayed_();\n },\n goalBufferLength: function goalBufferLength() {\n return _this.goalBufferLength();\n },\n bandwidth: bandwidth,\n syncController: _this.syncController_,\n decrypter: _this.decrypter_,\n sourceType: _this.sourceType_,\n inbandTextTracks: _this.inbandTextTracks_,\n cacheEncryptionKeys: cacheEncryptionKeys\n };\n _this.masterPlaylistLoader_ = _this.sourceType_ === 'dash' ? new DashPlaylistLoader(url, _this.hls_, _this.requestOptions_) : new PlaylistLoader(url, _this.hls_, _this.requestOptions_);\n\n _this.setupMasterPlaylistLoaderListeners_(); // setup segment loaders\n // combined audio/video or just video when alternate audio track is selected\n\n\n _this.mainSegmentLoader_ = new SegmentLoader(videojs$1.mergeOptions(segmentLoaderSettings, {\n segmentMetadataTrack: _this.segmentMetadataTrack_,\n loaderType: 'main'\n }), options); // alternate audio track\n\n _this.audioSegmentLoader_ = new SegmentLoader(videojs$1.mergeOptions(segmentLoaderSettings, {\n loaderType: 'audio'\n }), options);\n _this.subtitleSegmentLoader_ = new VTTSegmentLoader(videojs$1.mergeOptions(segmentLoaderSettings, {\n loaderType: 'vtt'\n }), options);\n\n _this.setupSegmentLoaderListeners_(); // Create SegmentLoader stat-getters\n\n\n loaderStats.forEach(function (stat) {\n _this[stat + '_'] = sumLoaderStat.bind(_this, stat);\n });\n _this.logger_ = logger('MPC');\n\n _this.masterPlaylistLoader_.load();\n\n return _this;\n }\n /**\n * Register event handlers on the master playlist loader. A helper\n * function for construction time.\n *\n * @private\n */\n\n\n createClass(MasterPlaylistController, [{\n key: 'setupMasterPlaylistLoaderListeners_',\n value: function setupMasterPlaylistLoaderListeners_() {\n var _this2 = this;\n\n this.masterPlaylistLoader_.on('loadedmetadata', function () {\n var media = _this2.masterPlaylistLoader_.media();\n\n var requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\n // timeout the request.\n\n if (isLowestEnabledRendition(_this2.masterPlaylistLoader_.master, _this2.masterPlaylistLoader_.media())) {\n _this2.requestOptions_.timeout = 0;\n } else {\n _this2.requestOptions_.timeout = requestTimeout;\n } // if this isn't a live video and preload permits, start\n // downloading segments\n\n\n if (media.endList && _this2.tech_.preload() !== 'none') {\n _this2.mainSegmentLoader_.playlist(media, _this2.requestOptions_);\n\n _this2.mainSegmentLoader_.load();\n }\n\n setupMediaGroups({\n sourceType: _this2.sourceType_,\n segmentLoaders: {\n AUDIO: _this2.audioSegmentLoader_,\n SUBTITLES: _this2.subtitleSegmentLoader_,\n main: _this2.mainSegmentLoader_\n },\n tech: _this2.tech_,\n requestOptions: _this2.requestOptions_,\n masterPlaylistLoader: _this2.masterPlaylistLoader_,\n hls: _this2.hls_,\n master: _this2.master(),\n mediaTypes: _this2.mediaTypes_,\n blacklistCurrentPlaylist: _this2.blacklistCurrentPlaylist.bind(_this2)\n });\n\n _this2.triggerPresenceUsage_(_this2.master(), media);\n\n try {\n _this2.setupSourceBuffers_();\n } catch (e) {\n videojs$1.log.warn('Failed to create SourceBuffers', e);\n return _this2.mediaSource.endOfStream('decode');\n }\n\n _this2.setupFirstPlay();\n\n if (!_this2.mediaTypes_.AUDIO.activePlaylistLoader || _this2.mediaTypes_.AUDIO.activePlaylistLoader.media()) {\n _this2.trigger('selectedinitialmedia');\n } else {\n // We must wait for the active audio playlist loader to\n // finish setting up before triggering this event so the\n // representations API and EME setup is correct\n _this2.mediaTypes_.AUDIO.activePlaylistLoader.one('loadedmetadata', function () {\n _this2.trigger('selectedinitialmedia');\n });\n }\n });\n this.masterPlaylistLoader_.on('loadedplaylist', function () {\n var updatedPlaylist = _this2.masterPlaylistLoader_.media();\n\n if (!updatedPlaylist) {\n // blacklist any variants that are not supported by the browser before selecting\n // an initial media as the playlist selectors do not consider browser support\n _this2.excludeUnsupportedVariants_();\n\n var selectedMedia = void 0;\n\n if (_this2.enableLowInitialPlaylist) {\n selectedMedia = _this2.selectInitialPlaylist();\n }\n\n if (!selectedMedia) {\n selectedMedia = _this2.selectPlaylist();\n }\n\n _this2.initialMedia_ = selectedMedia;\n\n _this2.masterPlaylistLoader_.media(_this2.initialMedia_);\n\n return;\n }\n\n if (_this2.useCueTags_) {\n _this2.updateAdCues_(updatedPlaylist);\n } // TODO: Create a new event on the PlaylistLoader that signals\n // that the segments have changed in some way and use that to\n // update the SegmentLoader instead of doing it twice here and\n // on `mediachange`\n\n\n _this2.mainSegmentLoader_.playlist(updatedPlaylist, _this2.requestOptions_);\n\n _this2.updateDuration(); // If the player isn't paused, ensure that the segment loader is running,\n // as it is possible that it was temporarily stopped while waiting for\n // a playlist (e.g., in case the playlist errored and we re-requested it).\n\n\n if (!_this2.tech_.paused()) {\n _this2.mainSegmentLoader_.load();\n\n if (_this2.audioSegmentLoader_) {\n _this2.audioSegmentLoader_.load();\n }\n }\n\n if (!updatedPlaylist.endList) {\n var addSeekableRange = function addSeekableRange() {\n var seekable$$1 = _this2.seekable();\n\n if (seekable$$1.length !== 0) {\n _this2.mediaSource.addSeekableRange_(seekable$$1.start(0), seekable$$1.end(0));\n }\n };\n\n if (_this2.duration() !== Infinity) {\n var onDurationchange = function onDurationchange() {\n if (_this2.duration() === Infinity) {\n addSeekableRange();\n } else {\n _this2.tech_.one('durationchange', onDurationchange);\n }\n };\n\n _this2.tech_.one('durationchange', onDurationchange);\n } else {\n addSeekableRange();\n }\n }\n });\n this.masterPlaylistLoader_.on('error', function () {\n _this2.blacklistCurrentPlaylist(_this2.masterPlaylistLoader_.error);\n });\n this.masterPlaylistLoader_.on('mediachanging', function () {\n _this2.mainSegmentLoader_.abort();\n\n _this2.mainSegmentLoader_.pause();\n });\n this.masterPlaylistLoader_.on('mediachange', function () {\n var media = _this2.masterPlaylistLoader_.media();\n\n var requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\n // timeout the request.\n\n if (isLowestEnabledRendition(_this2.masterPlaylistLoader_.master, _this2.masterPlaylistLoader_.media())) {\n _this2.requestOptions_.timeout = 0;\n } else {\n _this2.requestOptions_.timeout = requestTimeout;\n } // TODO: Create a new event on the PlaylistLoader that signals\n // that the segments have changed in some way and use that to\n // update the SegmentLoader instead of doing it twice here and\n // on `loadedplaylist`\n\n\n _this2.mainSegmentLoader_.playlist(media, _this2.requestOptions_);\n\n _this2.mainSegmentLoader_.load();\n\n _this2.tech_.trigger({\n type: 'mediachange',\n bubbles: true\n });\n });\n this.masterPlaylistLoader_.on('playlistunchanged', function () {\n var updatedPlaylist = _this2.masterPlaylistLoader_.media();\n\n var playlistOutdated = _this2.stuckAtPlaylistEnd_(updatedPlaylist);\n\n if (playlistOutdated) {\n // Playlist has stopped updating and we're stuck at its end. Try to\n // blacklist it and switch to another playlist in the hope that that\n // one is updating (and give the player a chance to re-adjust to the\n // safe live point).\n _this2.blacklistCurrentPlaylist({\n message: 'Playlist no longer updating.'\n }); // useful for monitoring QoS\n\n\n _this2.tech_.trigger('playliststuck');\n }\n });\n this.masterPlaylistLoader_.on('renditiondisabled', function () {\n _this2.tech_.trigger({\n type: 'usage',\n name: 'hls-rendition-disabled'\n });\n });\n this.masterPlaylistLoader_.on('renditionenabled', function () {\n _this2.tech_.trigger({\n type: 'usage',\n name: 'hls-rendition-enabled'\n });\n });\n }\n /**\n * A helper function for triggerring presence usage events once per source\n *\n * @private\n */\n\n }, {\n key: 'triggerPresenceUsage_',\n value: function triggerPresenceUsage_(master, media) {\n var mediaGroups = master.mediaGroups || {};\n var defaultDemuxed = true;\n var audioGroupKeys = Object.keys(mediaGroups.AUDIO);\n\n for (var mediaGroup in mediaGroups.AUDIO) {\n for (var label in mediaGroups.AUDIO[mediaGroup]) {\n var properties = mediaGroups.AUDIO[mediaGroup][label];\n\n if (!properties.uri) {\n defaultDemuxed = false;\n }\n }\n }\n\n if (defaultDemuxed) {\n this.tech_.trigger({\n type: 'usage',\n name: 'hls-demuxed'\n });\n }\n\n if (Object.keys(mediaGroups.SUBTITLES).length) {\n this.tech_.trigger({\n type: 'usage',\n name: 'hls-webvtt'\n });\n }\n\n if (Hls.Playlist.isAes(media)) {\n this.tech_.trigger({\n type: 'usage',\n name: 'hls-aes'\n });\n }\n\n if (Hls.Playlist.isFmp4(media)) {\n this.tech_.trigger({\n type: 'usage',\n name: 'hls-fmp4'\n });\n }\n\n if (audioGroupKeys.length && Object.keys(mediaGroups.AUDIO[audioGroupKeys[0]]).length > 1) {\n this.tech_.trigger({\n type: 'usage',\n name: 'hls-alternate-audio'\n });\n }\n\n if (this.useCueTags_) {\n this.tech_.trigger({\n type: 'usage',\n name: 'hls-playlist-cue-tags'\n });\n }\n }\n /**\n * Register event handlers on the segment loaders. A helper function\n * for construction time.\n *\n * @private\n */\n\n }, {\n key: 'setupSegmentLoaderListeners_',\n value: function setupSegmentLoaderListeners_() {\n var _this3 = this;\n\n this.mainSegmentLoader_.on('bandwidthupdate', function () {\n var nextPlaylist = _this3.selectPlaylist();\n\n var currentPlaylist = _this3.masterPlaylistLoader_.media();\n\n var buffered = _this3.tech_.buffered();\n\n var forwardBuffer = buffered.length ? buffered.end(buffered.length - 1) - _this3.tech_.currentTime() : 0;\n\n var bufferLowWaterLine = _this3.bufferLowWaterLine(); // If the playlist is live, then we want to not take low water line into account.\n // This is because in LIVE, the player plays 3 segments from the end of the\n // playlist, and if `BUFFER_LOW_WATER_LINE` is greater than the duration availble\n // in those segments, a viewer will never experience a rendition upswitch.\n\n\n if (!currentPlaylist.endList || // For the same reason as LIVE, we ignore the low water line when the VOD\n // duration is below the max potential low water line\n _this3.duration() < Config.MAX_BUFFER_LOW_WATER_LINE || // we want to switch down to lower resolutions quickly to continue playback, but\n nextPlaylist.attributes.BANDWIDTH < currentPlaylist.attributes.BANDWIDTH || // ensure we have some buffer before we switch up to prevent us running out of\n // buffer while loading a higher rendition.\n forwardBuffer >= bufferLowWaterLine) {\n _this3.masterPlaylistLoader_.media(nextPlaylist);\n }\n\n _this3.tech_.trigger('bandwidthupdate');\n });\n this.mainSegmentLoader_.on('progress', function () {\n _this3.trigger('progress');\n });\n this.mainSegmentLoader_.on('error', function () {\n _this3.blacklistCurrentPlaylist(_this3.mainSegmentLoader_.error());\n });\n this.mainSegmentLoader_.on('syncinfoupdate', function () {\n _this3.onSyncInfoUpdate_();\n });\n this.mainSegmentLoader_.on('timestampoffset', function () {\n _this3.tech_.trigger({\n type: 'usage',\n name: 'hls-timestamp-offset'\n });\n });\n this.audioSegmentLoader_.on('syncinfoupdate', function () {\n _this3.onSyncInfoUpdate_();\n });\n this.mainSegmentLoader_.on('ended', function () {\n _this3.onEndOfStream();\n });\n this.mainSegmentLoader_.on('earlyabort', function () {\n _this3.blacklistCurrentPlaylist({\n message: 'Aborted early because there isn\\'t enough bandwidth to complete the ' + 'request without rebuffering.'\n }, ABORT_EARLY_BLACKLIST_SECONDS);\n });\n this.mainSegmentLoader_.on('reseteverything', function () {\n // If playing an MTS stream, a videojs.MediaSource is listening for\n // hls-reset to reset caption parsing state in the transmuxer\n _this3.tech_.trigger('hls-reset');\n });\n this.mainSegmentLoader_.on('segmenttimemapping', function (event) {\n // If playing an MTS stream in html, a videojs.MediaSource is listening for\n // hls-segment-time-mapping update its internal mapping of stream to display time\n _this3.tech_.trigger({\n type: 'hls-segment-time-mapping',\n mapping: event.mapping\n });\n });\n this.audioSegmentLoader_.on('ended', function () {\n _this3.onEndOfStream();\n });\n }\n }, {\n key: 'mediaSecondsLoaded_',\n value: function mediaSecondsLoaded_() {\n return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded + this.mainSegmentLoader_.mediaSecondsLoaded);\n }\n /**\n * Call load on our SegmentLoaders\n */\n\n }, {\n key: 'load',\n value: function load() {\n this.mainSegmentLoader_.load();\n\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n this.audioSegmentLoader_.load();\n }\n\n if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n this.subtitleSegmentLoader_.load();\n }\n }\n /**\n * Re-tune playback quality level for the current player\n * conditions without performing destructive actions, like\n * removing already buffered content\n *\n * @private\n */\n\n }, {\n key: 'smoothQualityChange_',\n value: function smoothQualityChange_() {\n var media = this.selectPlaylist();\n\n if (media !== this.masterPlaylistLoader_.media()) {\n this.masterPlaylistLoader_.media(media);\n this.mainSegmentLoader_.resetLoader(); // don't need to reset audio as it is reset when media changes\n }\n }\n /**\n * Re-tune playback quality level for the current player\n * conditions. This method will perform destructive actions like removing\n * already buffered content in order to readjust the currently active\n * playlist quickly. This is good for manual quality changes\n *\n * @private\n */\n\n }, {\n key: 'fastQualityChange_',\n value: function fastQualityChange_() {\n var _this4 = this;\n\n var media = this.selectPlaylist();\n\n if (media === this.masterPlaylistLoader_.media()) {\n return;\n }\n\n this.masterPlaylistLoader_.media(media); // Delete all buffered data to allow an immediate quality switch, then seek to give\n // the browser a kick to remove any cached frames from the previous rendtion (.04 seconds\n // ahead is roughly the minimum that will accomplish this across a variety of content\n // in IE and Edge, but seeking in place is sufficient on all other browsers)\n // Edge/IE bug: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/14600375/\n // Chrome bug: https://bugs.chromium.org/p/chromium/issues/detail?id=651904\n\n this.mainSegmentLoader_.resetEverything(function () {\n // Since this is not a typical seek, we avoid the seekTo method which can cause segments\n // from the previously enabled rendition to load before the new playlist has finished loading\n if (videojs$1.browser.IE_VERSION || videojs$1.browser.IS_EDGE) {\n _this4.tech_.setCurrentTime(_this4.tech_.currentTime() + 0.04);\n } else {\n _this4.tech_.setCurrentTime(_this4.tech_.currentTime());\n }\n }); // don't need to reset audio as it is reset when media changes\n }\n /**\n * Begin playback.\n */\n\n }, {\n key: 'play',\n value: function play() {\n if (this.setupFirstPlay()) {\n return;\n }\n\n if (this.tech_.ended()) {\n this.seekTo_(0);\n }\n\n if (this.hasPlayed_()) {\n this.load();\n }\n\n var seekable$$1 = this.tech_.seekable(); // if the viewer has paused and we fell out of the live window,\n // seek forward to the live point\n\n if (this.tech_.duration() === Infinity) {\n if (this.tech_.currentTime() < seekable$$1.start(0)) {\n return this.seekTo_(seekable$$1.end(seekable$$1.length - 1));\n }\n }\n }\n /**\n * Seek to the latest media position if this is a live video and the\n * player and video are loaded and initialized.\n */\n\n }, {\n key: 'setupFirstPlay',\n value: function setupFirstPlay() {\n var _this5 = this;\n\n var media = this.masterPlaylistLoader_.media(); // Check that everything is ready to begin buffering for the first call to play\n // If 1) there is no active media\n // 2) the player is paused\n // 3) the first play has already been setup\n // then exit early\n\n if (!media || this.tech_.paused() || this.hasPlayed_()) {\n return false;\n } // when the video is a live stream\n\n\n if (!media.endList) {\n var seekable$$1 = this.seekable();\n\n if (!seekable$$1.length) {\n // without a seekable range, the player cannot seek to begin buffering at the live\n // point\n return false;\n }\n\n if (videojs$1.browser.IE_VERSION && this.tech_.readyState() === 0) {\n // IE11 throws an InvalidStateError if you try to set currentTime while the\n // readyState is 0, so it must be delayed until the tech fires loadedmetadata.\n this.tech_.one('loadedmetadata', function () {\n _this5.trigger('firstplay');\n\n _this5.seekTo_(seekable$$1.end(0));\n\n _this5.hasPlayed_ = function () {\n return true;\n };\n });\n return false;\n } // trigger firstplay to inform the source handler to ignore the next seek event\n\n\n this.trigger('firstplay'); // seek to the live point\n\n this.seekTo_(seekable$$1.end(0));\n }\n\n this.hasPlayed_ = function () {\n return true;\n }; // we can begin loading now that everything is ready\n\n\n this.load();\n return true;\n }\n /**\n * handle the sourceopen event on the MediaSource\n *\n * @private\n */\n\n }, {\n key: 'handleSourceOpen_',\n value: function handleSourceOpen_() {\n // Only attempt to create the source buffer if none already exist.\n // handleSourceOpen is also called when we are \"re-opening\" a source buffer\n // after `endOfStream` has been called (in response to a seek for instance)\n try {\n this.setupSourceBuffers_();\n } catch (e) {\n videojs$1.log.warn('Failed to create Source Buffers', e);\n return this.mediaSource.endOfStream('decode');\n } // if autoplay is enabled, begin playback. This is duplicative of\n // code in video.js but is required because play() must be invoked\n // *after* the media source has opened.\n\n\n if (this.tech_.autoplay()) {\n var playPromise = this.tech_.play(); // Catch/silence error when a pause interrupts a play request\n // on browsers which return a promise\n\n if (typeof playPromise !== 'undefined' && typeof playPromise.then === 'function') {\n playPromise.then(null, function (e) {});\n }\n }\n\n this.trigger('sourceopen');\n }\n /**\n * Calls endOfStream on the media source when all active stream types have called\n * endOfStream\n *\n * @param {string} streamType\n * Stream type of the segment loader that called endOfStream\n * @private\n */\n\n }, {\n key: 'onEndOfStream',\n value: function onEndOfStream() {\n var isEndOfStream = this.mainSegmentLoader_.ended_;\n\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n // if the audio playlist loader exists, then alternate audio is active\n if (!this.mainSegmentLoader_.startingMedia_ || this.mainSegmentLoader_.startingMedia_.containsVideo) {\n // if we do not know if the main segment loader contains video yet or if we\n // definitively know the main segment loader contains video, then we need to wait\n // for both main and audio segment loaders to call endOfStream\n isEndOfStream = isEndOfStream && this.audioSegmentLoader_.ended_;\n } else {\n // otherwise just rely on the audio loader\n isEndOfStream = this.audioSegmentLoader_.ended_;\n }\n }\n\n if (!isEndOfStream) {\n return;\n }\n\n this.logger_('calling mediaSource.endOfStream()'); // on chrome calling endOfStream can sometimes cause an exception,\n // even when the media source is in a valid state.\n\n try {\n this.mediaSource.endOfStream();\n } catch (e) {\n videojs$1.log.warn('Failed to call media source endOfStream', e);\n }\n }\n /**\n * Check if a playlist has stopped being updated\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist has stopped being updated or not\n */\n\n }, {\n key: 'stuckAtPlaylistEnd_',\n value: function stuckAtPlaylistEnd_(playlist) {\n var seekable$$1 = this.seekable();\n\n if (!seekable$$1.length) {\n // playlist doesn't have enough information to determine whether we are stuck\n return false;\n }\n\n var expired = this.syncController_.getExpiredTime(playlist, this.mediaSource.duration);\n\n if (expired === null) {\n return false;\n } // does not use the safe live end to calculate playlist end, since we\n // don't want to say we are stuck while there is still content\n\n\n var absolutePlaylistEnd = Hls.Playlist.playlistEnd(playlist, expired);\n var currentTime = this.tech_.currentTime();\n var buffered = this.tech_.buffered();\n\n if (!buffered.length) {\n // return true if the playhead reached the absolute end of the playlist\n return absolutePlaylistEnd - currentTime <= SAFE_TIME_DELTA;\n }\n\n var bufferedEnd = buffered.end(buffered.length - 1); // return true if there is too little buffer left and buffer has reached absolute\n // end of playlist\n\n return bufferedEnd - currentTime <= SAFE_TIME_DELTA && absolutePlaylistEnd - bufferedEnd <= SAFE_TIME_DELTA;\n }\n /**\n * Blacklists a playlist when an error occurs for a set amount of time\n * making it unavailable for selection by the rendition selection algorithm\n * and then forces a new playlist (rendition) selection.\n *\n * @param {Object=} error an optional error that may include the playlist\n * to blacklist\n * @param {Number=} blacklistDuration an optional number of seconds to blacklist the\n * playlist\n */\n\n }, {\n key: 'blacklistCurrentPlaylist',\n value: function blacklistCurrentPlaylist() {\n var error = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var blacklistDuration = arguments[1];\n var currentPlaylist = void 0;\n var nextPlaylist = void 0; // If the `error` was generated by the playlist loader, it will contain\n // the playlist we were trying to load (but failed) and that should be\n // blacklisted instead of the currently selected playlist which is likely\n // out-of-date in this scenario\n\n currentPlaylist = error.playlist || this.masterPlaylistLoader_.media();\n blacklistDuration = blacklistDuration || error.blacklistDuration || this.blacklistDuration; // If there is no current playlist, then an error occurred while we were\n // trying to load the master OR while we were disposing of the tech\n\n if (!currentPlaylist) {\n this.error = error;\n\n try {\n return this.mediaSource.endOfStream('network');\n } catch (e) {\n return this.trigger('error');\n }\n }\n\n var isFinalRendition = this.masterPlaylistLoader_.master.playlists.filter(isEnabled).length === 1;\n var playlists = this.masterPlaylistLoader_.master.playlists;\n\n if (playlists.length === 1) {\n // Never blacklisting this playlist because it's the only playlist\n videojs$1.log.warn('Problem encountered with the current ' + 'HLS playlist. Trying again since it is the only playlist.');\n this.tech_.trigger('retryplaylist');\n return this.masterPlaylistLoader_.load(isFinalRendition);\n }\n\n if (isFinalRendition) {\n // Since we're on the final non-blacklisted playlist, and we're about to blacklist\n // it, instead of erring the player or retrying this playlist, clear out the current\n // blacklist. This allows other playlists to be attempted in case any have been\n // fixed.\n videojs$1.log.warn('Removing all playlists from the blacklist because the last ' + 'rendition is about to be blacklisted.');\n playlists.forEach(function (playlist) {\n if (playlist.excludeUntil !== Infinity) {\n delete playlist.excludeUntil;\n }\n }); // Technically we are retrying a playlist, in that we are simply retrying a previous\n // playlist. This is needed for users relying on the retryplaylist event to catch a\n // case where the player might be stuck and looping through \"dead\" playlists.\n\n this.tech_.trigger('retryplaylist');\n } // Blacklist this playlist\n\n\n currentPlaylist.excludeUntil = Date.now() + blacklistDuration * 1000;\n this.tech_.trigger('blacklistplaylist');\n this.tech_.trigger({\n type: 'usage',\n name: 'hls-rendition-blacklisted'\n }); // Select a new playlist\n\n nextPlaylist = this.selectPlaylist();\n videojs$1.log.warn('Problem encountered with the current HLS playlist.' + (error.message ? ' ' + error.message : '') + ' Switching to another playlist.');\n return this.masterPlaylistLoader_.media(nextPlaylist, isFinalRendition);\n }\n /**\n * Pause all segment loaders\n */\n\n }, {\n key: 'pauseLoading',\n value: function pauseLoading() {\n this.mainSegmentLoader_.pause();\n\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n this.audioSegmentLoader_.pause();\n }\n\n if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n this.subtitleSegmentLoader_.pause();\n }\n }\n /**\n * set the current time on all segment loaders\n *\n * @param {TimeRange} currentTime the current time to set\n * @return {TimeRange} the current time\n */\n\n }, {\n key: 'setCurrentTime',\n value: function setCurrentTime(currentTime) {\n var buffered = findRange(this.tech_.buffered(), currentTime);\n\n if (!(this.masterPlaylistLoader_ && this.masterPlaylistLoader_.media())) {\n // return immediately if the metadata is not ready yet\n return 0;\n } // it's clearly an edge-case but don't thrown an error if asked to\n // seek within an empty playlist\n\n\n if (!this.masterPlaylistLoader_.media().segments) {\n return 0;\n } // In flash playback, the segment loaders should be reset on every seek, even\n // in buffer seeks. If the seek location is already buffered, continue buffering as\n // usual\n // TODO: redo this comment\n\n\n if (buffered && buffered.length) {\n return currentTime;\n } // cancel outstanding requests so we begin buffering at the new\n // location\n\n\n this.mainSegmentLoader_.resetEverything();\n this.mainSegmentLoader_.abort();\n\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n this.audioSegmentLoader_.resetEverything();\n this.audioSegmentLoader_.abort();\n }\n\n if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n this.subtitleSegmentLoader_.resetEverything();\n this.subtitleSegmentLoader_.abort();\n } // start segment loader loading in case they are paused\n\n\n this.load();\n }\n /**\n * get the current duration\n *\n * @return {TimeRange} the duration\n */\n\n }, {\n key: 'duration',\n value: function duration$$1() {\n if (!this.masterPlaylistLoader_) {\n return 0;\n }\n\n if (this.mediaSource) {\n return this.mediaSource.duration;\n }\n\n return Hls.Playlist.duration(this.masterPlaylistLoader_.media());\n }\n /**\n * check the seekable range\n *\n * @return {TimeRange} the seekable range\n */\n\n }, {\n key: 'seekable',\n value: function seekable$$1() {\n return this.seekable_;\n }\n }, {\n key: 'onSyncInfoUpdate_',\n value: function onSyncInfoUpdate_() {\n var mainSeekable = void 0;\n var audioSeekable = void 0;\n\n if (!this.masterPlaylistLoader_) {\n return;\n }\n\n var media = this.masterPlaylistLoader_.media();\n\n if (!media) {\n return;\n }\n\n var expired = this.syncController_.getExpiredTime(media, this.mediaSource.duration);\n\n if (expired === null) {\n // not enough information to update seekable\n return;\n }\n\n mainSeekable = Hls.Playlist.seekable(media, expired);\n\n if (mainSeekable.length === 0) {\n return;\n }\n\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n media = this.mediaTypes_.AUDIO.activePlaylistLoader.media();\n expired = this.syncController_.getExpiredTime(media, this.mediaSource.duration);\n\n if (expired === null) {\n return;\n }\n\n audioSeekable = Hls.Playlist.seekable(media, expired);\n\n if (audioSeekable.length === 0) {\n return;\n }\n }\n\n var oldEnd = void 0;\n var oldStart = void 0;\n\n if (this.seekable_ && this.seekable_.length) {\n oldEnd = this.seekable_.end(0);\n oldStart = this.seekable_.start(0);\n }\n\n if (!audioSeekable) {\n // seekable has been calculated based on buffering video data so it\n // can be returned directly\n this.seekable_ = mainSeekable;\n } else if (audioSeekable.start(0) > mainSeekable.end(0) || mainSeekable.start(0) > audioSeekable.end(0)) {\n // seekables are pretty far off, rely on main\n this.seekable_ = mainSeekable;\n } else {\n this.seekable_ = videojs$1.createTimeRanges([[audioSeekable.start(0) > mainSeekable.start(0) ? audioSeekable.start(0) : mainSeekable.start(0), audioSeekable.end(0) < mainSeekable.end(0) ? audioSeekable.end(0) : mainSeekable.end(0)]]);\n } // seekable is the same as last time\n\n\n if (this.seekable_ && this.seekable_.length) {\n if (this.seekable_.end(0) === oldEnd && this.seekable_.start(0) === oldStart) {\n return;\n }\n }\n\n this.logger_('seekable updated [' + printableRange(this.seekable_) + ']');\n this.tech_.trigger('seekablechanged');\n }\n /**\n * Update the player duration\n */\n\n }, {\n key: 'updateDuration',\n value: function updateDuration() {\n var _this6 = this;\n\n var oldDuration = this.mediaSource.duration;\n var newDuration = Hls.Playlist.duration(this.masterPlaylistLoader_.media());\n var buffered = this.tech_.buffered();\n\n var setDuration = function setDuration() {\n // on firefox setting the duration may sometimes cause an exception\n // even if the media source is open and source buffers are not\n // updating, something about the media source being in an invalid state.\n _this6.logger_('Setting duration from ' + _this6.mediaSource.duration + ' => ' + newDuration);\n\n try {\n _this6.mediaSource.duration = newDuration;\n } catch (e) {\n videojs$1.log.warn('Failed to set media source duration', e);\n }\n\n _this6.tech_.trigger('durationchange');\n\n _this6.mediaSource.removeEventListener('sourceopen', setDuration);\n };\n\n if (buffered.length > 0) {\n newDuration = Math.max(newDuration, buffered.end(buffered.length - 1));\n } // if the duration has changed, invalidate the cached value\n\n\n if (oldDuration !== newDuration) {\n // update the duration\n if (this.mediaSource.readyState !== 'open') {\n this.mediaSource.addEventListener('sourceopen', setDuration);\n } else {\n setDuration();\n }\n }\n }\n /**\n * dispose of the MasterPlaylistController and everything\n * that it controls\n */\n\n }, {\n key: 'dispose',\n value: function dispose() {\n var _this7 = this;\n\n this.decrypter_.terminate();\n this.masterPlaylistLoader_.dispose();\n this.mainSegmentLoader_.dispose();\n ['AUDIO', 'SUBTITLES'].forEach(function (type) {\n var groups = _this7.mediaTypes_[type].groups;\n\n for (var id in groups) {\n groups[id].forEach(function (group) {\n if (group.playlistLoader) {\n group.playlistLoader.dispose();\n }\n });\n }\n });\n this.audioSegmentLoader_.dispose();\n this.subtitleSegmentLoader_.dispose();\n }\n /**\n * return the master playlist object if we have one\n *\n * @return {Object} the master playlist object that we parsed\n */\n\n }, {\n key: 'master',\n value: function master() {\n return this.masterPlaylistLoader_.master;\n }\n /**\n * return the currently selected playlist\n *\n * @return {Object} the currently selected playlist object that we parsed\n */\n\n }, {\n key: 'media',\n value: function media() {\n // playlist loader will not return media if it has not been fully loaded\n return this.masterPlaylistLoader_.media() || this.initialMedia_;\n }\n /**\n * setup our internal source buffers on our segment Loaders\n *\n * @private\n */\n\n }, {\n key: 'setupSourceBuffers_',\n value: function setupSourceBuffers_() {\n var media = this.masterPlaylistLoader_.media();\n var mimeTypes = void 0; // wait until a media playlist is available and the Media Source is\n // attached\n\n if (!media || this.mediaSource.readyState !== 'open') {\n return;\n }\n\n mimeTypes = mimeTypesForPlaylist(this.masterPlaylistLoader_.master, media);\n\n if (mimeTypes.length < 1) {\n this.error = 'No compatible SourceBuffer configuration for the variant stream:' + media.resolvedUri;\n return this.mediaSource.endOfStream('decode');\n }\n\n this.configureLoaderMimeTypes_(mimeTypes); // exclude any incompatible variant streams from future playlist\n // selection\n\n this.excludeIncompatibleVariants_(media);\n }\n }, {\n key: 'configureLoaderMimeTypes_',\n value: function configureLoaderMimeTypes_(mimeTypes) {\n // If the content is demuxed, we can't start appending segments to a source buffer\n // until both source buffers are set up, or else the browser may not let us add the\n // second source buffer (it will assume we are playing either audio only or video\n // only).\n var sourceBufferEmitter = // If there is more than one mime type\n mimeTypes.length > 1 && // and the first mime type does not have muxed video and audio\n mimeTypes[0].indexOf(',') === -1 && // and the two mime types are different (they can be the same in the case of audio\n // only with alternate audio)\n mimeTypes[0] !== mimeTypes[1] ? // then we want to wait on the second source buffer\n new videojs$1.EventTarget() : // otherwise there is no need to wait as the content is either audio only,\n // video only, or muxed content.\n null;\n this.mainSegmentLoader_.mimeType(mimeTypes[0], sourceBufferEmitter);\n\n if (mimeTypes[1]) {\n this.audioSegmentLoader_.mimeType(mimeTypes[1], sourceBufferEmitter);\n }\n }\n /**\n * Blacklists playlists with codecs that are unsupported by the browser.\n */\n\n }, {\n key: 'excludeUnsupportedVariants_',\n value: function excludeUnsupportedVariants_() {\n this.master().playlists.forEach(function (variant) {\n if (variant.attributes.CODECS && window$1.MediaSource && window$1.MediaSource.isTypeSupported && !window$1.MediaSource.isTypeSupported('video/mp4; codecs=\"' + mapLegacyAvcCodecs(variant.attributes.CODECS) + '\"')) {\n variant.excludeUntil = Infinity;\n }\n });\n }\n /**\n * Blacklist playlists that are known to be codec or\n * stream-incompatible with the SourceBuffer configuration. For\n * instance, Media Source Extensions would cause the video element to\n * stall waiting for video data if you switched from a variant with\n * video and audio to an audio-only one.\n *\n * @param {Object} media a media playlist compatible with the current\n * set of SourceBuffers. Variants in the current master playlist that\n * do not appear to have compatible codec or stream configurations\n * will be excluded from the default playlist selection algorithm\n * indefinitely.\n * @private\n */\n\n }, {\n key: 'excludeIncompatibleVariants_',\n value: function excludeIncompatibleVariants_(media) {\n var codecCount = 2;\n var videoCodec = null;\n var codecs = void 0;\n\n if (media.attributes.CODECS) {\n codecs = parseCodecs(media.attributes.CODECS);\n videoCodec = codecs.videoCodec;\n codecCount = codecs.codecCount;\n }\n\n this.master().playlists.forEach(function (variant) {\n var variantCodecs = {\n codecCount: 2,\n videoCodec: null\n };\n\n if (variant.attributes.CODECS) {\n variantCodecs = parseCodecs(variant.attributes.CODECS);\n } // if the streams differ in the presence or absence of audio or\n // video, they are incompatible\n\n\n if (variantCodecs.codecCount !== codecCount) {\n variant.excludeUntil = Infinity;\n } // if h.264 is specified on the current playlist, some flavor of\n // it must be specified on all compatible variants\n\n\n if (variantCodecs.videoCodec !== videoCodec) {\n variant.excludeUntil = Infinity;\n }\n });\n }\n }, {\n key: 'updateAdCues_',\n value: function updateAdCues_(media) {\n var offset = 0;\n var seekable$$1 = this.seekable();\n\n if (seekable$$1.length) {\n offset = seekable$$1.start(0);\n }\n\n updateAdCues(media, this.cueTagsTrack_, offset);\n }\n /**\n * Calculates the desired forward buffer length based on current time\n *\n * @return {Number} Desired forward buffer length in seconds\n */\n\n }, {\n key: 'goalBufferLength',\n value: function goalBufferLength() {\n var currentTime = this.tech_.currentTime();\n var initial = Config.GOAL_BUFFER_LENGTH;\n var rate = Config.GOAL_BUFFER_LENGTH_RATE;\n var max = Math.max(initial, Config.MAX_GOAL_BUFFER_LENGTH);\n return Math.min(initial + currentTime * rate, max);\n }\n /**\n * Calculates the desired buffer low water line based on current time\n *\n * @return {Number} Desired buffer low water line in seconds\n */\n\n }, {\n key: 'bufferLowWaterLine',\n value: function bufferLowWaterLine() {\n var currentTime = this.tech_.currentTime();\n var initial = Config.BUFFER_LOW_WATER_LINE;\n var rate = Config.BUFFER_LOW_WATER_LINE_RATE;\n var max = Math.max(initial, Config.MAX_BUFFER_LOW_WATER_LINE);\n return Math.min(initial + currentTime * rate, max);\n }\n }]);\n return MasterPlaylistController;\n}(videojs$1.EventTarget);\n/**\n * Returns a function that acts as the Enable/disable playlist function.\n *\n * @param {PlaylistLoader} loader - The master playlist loader\n * @param {String} playlistUri - uri of the playlist\n * @param {Function} changePlaylistFn - A function to be called after a\n * playlist's enabled-state has been changed. Will NOT be called if a\n * playlist's enabled-state is unchanged\n * @param {Boolean=} enable - Value to set the playlist enabled-state to\n * or if undefined returns the current enabled-state for the playlist\n * @return {Function} Function for setting/getting enabled\n */\n\n\nvar enableFunction = function enableFunction(loader, playlistUri, changePlaylistFn) {\n return function (enable) {\n var playlist = loader.master.playlists[playlistUri];\n var incompatible = isIncompatible(playlist);\n var currentlyEnabled = isEnabled(playlist);\n\n if (typeof enable === 'undefined') {\n return currentlyEnabled;\n }\n\n if (enable) {\n delete playlist.disabled;\n } else {\n playlist.disabled = true;\n }\n\n if (enable !== currentlyEnabled && !incompatible) {\n // Ensure the outside world knows about our changes\n changePlaylistFn();\n\n if (enable) {\n loader.trigger('renditionenabled');\n } else {\n loader.trigger('renditiondisabled');\n }\n }\n\n return enable;\n };\n};\n/**\n * The representation object encapsulates the publicly visible information\n * in a media playlist along with a setter/getter-type function (enabled)\n * for changing the enabled-state of a particular playlist entry\n *\n * @class Representation\n */\n\n\nvar Representation = function Representation(hlsHandler, playlist, id) {\n classCallCheck(this, Representation);\n var mpc = hlsHandler.masterPlaylistController_,\n smoothQualityChange = hlsHandler.options_.smoothQualityChange; // Get a reference to a bound version of the quality change function\n\n var changeType = smoothQualityChange ? 'smooth' : 'fast';\n var qualityChangeFunction = mpc[changeType + 'QualityChange_'].bind(mpc); // some playlist attributes are optional\n\n if (playlist.attributes.RESOLUTION) {\n var resolution = playlist.attributes.RESOLUTION;\n this.width = resolution.width;\n this.height = resolution.height;\n }\n\n this.bandwidth = playlist.attributes.BANDWIDTH; // The id is simply the ordinality of the media playlist\n // within the master playlist\n\n this.id = id; // Partially-apply the enableFunction to create a playlist-\n // specific variant\n\n this.enabled = enableFunction(hlsHandler.playlists, playlist.uri, qualityChangeFunction);\n};\n/**\n * A mixin function that adds the `representations` api to an instance\n * of the HlsHandler class\n * @param {HlsHandler} hlsHandler - An instance of HlsHandler to add the\n * representation API into\n */\n\n\nvar renditionSelectionMixin = function renditionSelectionMixin(hlsHandler) {\n var playlists = hlsHandler.playlists; // Add a single API-specific function to the HlsHandler instance\n\n hlsHandler.representations = function () {\n return playlists.master.playlists.filter(function (media) {\n return !isIncompatible(media);\n }).map(function (e, i) {\n return new Representation(hlsHandler, e, e.uri);\n });\n };\n};\n/**\n * @file playback-watcher.js\n *\n * Playback starts, and now my watch begins. It shall not end until my death. I shall\n * take no wait, hold no uncleared timeouts, father no bad seeks. I shall wear no crowns\n * and win no glory. I shall live and die at my post. I am the corrector of the underflow.\n * I am the watcher of gaps. I am the shield that guards the realms of seekable. I pledge\n * my life and honor to the Playback Watch, for this Player and all the Players to come.\n */\n// Set of events that reset the playback-watcher time check logic and clear the timeout\n\n\nvar timerCancelEvents = ['seeking', 'seeked', 'pause', 'playing', 'error'];\n/**\n * @class PlaybackWatcher\n */\n\nvar PlaybackWatcher = function () {\n /**\n * Represents an PlaybackWatcher object.\n * @constructor\n * @param {object} options an object that includes the tech and settings\n */\n function PlaybackWatcher(options) {\n var _this = this;\n\n classCallCheck(this, PlaybackWatcher);\n this.tech_ = options.tech;\n this.seekable = options.seekable;\n this.seekTo = options.seekTo;\n this.allowSeeksWithinUnsafeLiveWindow = options.allowSeeksWithinUnsafeLiveWindow;\n this.media = options.media;\n this.consecutiveUpdates = 0;\n this.lastRecordedTime = null;\n this.timer_ = null;\n this.checkCurrentTimeTimeout_ = null;\n this.logger_ = logger('PlaybackWatcher');\n this.logger_('initialize');\n\n var canPlayHandler = function canPlayHandler() {\n return _this.monitorCurrentTime_();\n };\n\n var waitingHandler = function waitingHandler() {\n return _this.techWaiting_();\n };\n\n var cancelTimerHandler = function cancelTimerHandler() {\n return _this.cancelTimer_();\n };\n\n var fixesBadSeeksHandler = function fixesBadSeeksHandler() {\n return _this.fixesBadSeeks_();\n };\n\n this.tech_.on('seekablechanged', fixesBadSeeksHandler);\n this.tech_.on('waiting', waitingHandler);\n this.tech_.on(timerCancelEvents, cancelTimerHandler);\n this.tech_.on('canplay', canPlayHandler); // Define the dispose function to clean up our events\n\n this.dispose = function () {\n _this.logger_('dispose');\n\n _this.tech_.off('seekablechanged', fixesBadSeeksHandler);\n\n _this.tech_.off('waiting', waitingHandler);\n\n _this.tech_.off(timerCancelEvents, cancelTimerHandler);\n\n _this.tech_.off('canplay', canPlayHandler);\n\n if (_this.checkCurrentTimeTimeout_) {\n window$1.clearTimeout(_this.checkCurrentTimeTimeout_);\n }\n\n _this.cancelTimer_();\n };\n }\n /**\n * Periodically check current time to see if playback stopped\n *\n * @private\n */\n\n\n createClass(PlaybackWatcher, [{\n key: 'monitorCurrentTime_',\n value: function monitorCurrentTime_() {\n this.checkCurrentTime_();\n\n if (this.checkCurrentTimeTimeout_) {\n window$1.clearTimeout(this.checkCurrentTimeTimeout_);\n } // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\n\n\n this.checkCurrentTimeTimeout_ = window$1.setTimeout(this.monitorCurrentTime_.bind(this), 250);\n }\n /**\n * The purpose of this function is to emulate the \"waiting\" event on\n * browsers that do not emit it when they are waiting for more\n * data to continue playback\n *\n * @private\n */\n\n }, {\n key: 'checkCurrentTime_',\n value: function checkCurrentTime_() {\n if (this.tech_.seeking() && this.fixesBadSeeks_()) {\n this.consecutiveUpdates = 0;\n this.lastRecordedTime = this.tech_.currentTime();\n return;\n }\n\n if (this.tech_.paused() || this.tech_.seeking()) {\n return;\n }\n\n var currentTime = this.tech_.currentTime();\n var buffered = this.tech_.buffered();\n\n if (this.lastRecordedTime === currentTime && (!buffered.length || currentTime + SAFE_TIME_DELTA >= buffered.end(buffered.length - 1))) {\n // If current time is at the end of the final buffered region, then any playback\n // stall is most likely caused by buffering in a low bandwidth environment. The tech\n // should fire a `waiting` event in this scenario, but due to browser and tech\n // inconsistencies. Calling `techWaiting_` here allows us to simulate\n // responding to a native `waiting` event when the tech fails to emit one.\n return this.techWaiting_();\n }\n\n if (this.consecutiveUpdates >= 5 && currentTime === this.lastRecordedTime) {\n this.consecutiveUpdates++;\n this.waiting_();\n } else if (currentTime === this.lastRecordedTime) {\n this.consecutiveUpdates++;\n } else {\n this.consecutiveUpdates = 0;\n this.lastRecordedTime = currentTime;\n }\n }\n /**\n * Cancels any pending timers and resets the 'timeupdate' mechanism\n * designed to detect that we are stalled\n *\n * @private\n */\n\n }, {\n key: 'cancelTimer_',\n value: function cancelTimer_() {\n this.consecutiveUpdates = 0;\n\n if (this.timer_) {\n this.logger_('cancelTimer_');\n clearTimeout(this.timer_);\n }\n\n this.timer_ = null;\n }\n /**\n * Fixes situations where there's a bad seek\n *\n * @return {Boolean} whether an action was taken to fix the seek\n * @private\n */\n\n }, {\n key: 'fixesBadSeeks_',\n value: function fixesBadSeeks_() {\n var seeking = this.tech_.seeking();\n\n if (!seeking) {\n return false;\n }\n\n var seekable = this.seekable();\n var currentTime = this.tech_.currentTime();\n var isAfterSeekableRange = this.afterSeekableWindow_(seekable, currentTime, this.media(), this.allowSeeksWithinUnsafeLiveWindow);\n var seekTo = void 0;\n\n if (isAfterSeekableRange) {\n var seekableEnd = seekable.end(seekable.length - 1); // sync to live point (if VOD, our seekable was updated and we're simply adjusting)\n\n seekTo = seekableEnd;\n }\n\n if (this.beforeSeekableWindow_(seekable, currentTime)) {\n var seekableStart = seekable.start(0); // sync to the beginning of the live window\n // provide a buffer of .1 seconds to handle rounding/imprecise numbers\n\n seekTo = seekableStart + SAFE_TIME_DELTA;\n }\n\n if (typeof seekTo !== 'undefined') {\n this.logger_('Trying to seek outside of seekable at time ' + currentTime + ' with ' + ('seekable range ' + printableRange(seekable) + '. Seeking to ') + (seekTo + '.'));\n this.seekTo(seekTo);\n return true;\n }\n\n return false;\n }\n /**\n * Handler for situations when we determine the player is waiting.\n *\n * @private\n */\n\n }, {\n key: 'waiting_',\n value: function waiting_() {\n if (this.techWaiting_()) {\n return;\n } // All tech waiting checks failed. Use last resort correction\n\n\n var currentTime = this.tech_.currentTime();\n var buffered = this.tech_.buffered();\n var currentRange = findRange(buffered, currentTime); // Sometimes the player can stall for unknown reasons within a contiguous buffered\n // region with no indication that anything is amiss (seen in Firefox). Seeking to\n // currentTime is usually enough to kickstart the player. This checks that the player\n // is currently within a buffered region before attempting a corrective seek.\n // Chrome does not appear to continue `timeupdate` events after a `waiting` event\n // until there is ~ 3 seconds of forward buffer available. PlaybackWatcher should also\n // make sure there is ~3 seconds of forward buffer before taking any corrective action\n // to avoid triggering an `unknownwaiting` event when the network is slow.\n\n if (currentRange.length && currentTime + 3 <= currentRange.end(0)) {\n this.cancelTimer_();\n this.seekTo(currentTime);\n this.logger_('Stopped at ' + currentTime + ' while inside a buffered region ' + ('[' + currentRange.start(0) + ' -> ' + currentRange.end(0) + ']. Attempting to resume ') + 'playback by seeking to the current time.'); // unknown waiting corrections may be useful for monitoring QoS\n\n this.tech_.trigger({\n type: 'usage',\n name: 'hls-unknown-waiting'\n });\n return;\n }\n }\n /**\n * Handler for situations when the tech fires a `waiting` event\n *\n * @return {Boolean}\n * True if an action (or none) was needed to correct the waiting. False if no\n * checks passed\n * @private\n */\n\n }, {\n key: 'techWaiting_',\n value: function techWaiting_() {\n var seekable = this.seekable();\n var currentTime = this.tech_.currentTime();\n\n if (this.tech_.seeking() && this.fixesBadSeeks_()) {\n // Tech is seeking or bad seek fixed, no action needed\n return true;\n }\n\n if (this.tech_.seeking() || this.timer_ !== null) {\n // Tech is seeking or already waiting on another action, no action needed\n return true;\n }\n\n if (this.beforeSeekableWindow_(seekable, currentTime)) {\n var livePoint = seekable.end(seekable.length - 1);\n this.logger_('Fell out of live window at time ' + currentTime + '. Seeking to ' + ('live point (seekable end) ' + livePoint));\n this.cancelTimer_();\n this.seekTo(livePoint); // live window resyncs may be useful for monitoring QoS\n\n this.tech_.trigger({\n type: 'usage',\n name: 'hls-live-resync'\n });\n return true;\n }\n\n var buffered = this.tech_.buffered();\n var nextRange = findNextRange(buffered, currentTime);\n\n if (this.videoUnderflow_(nextRange, buffered, currentTime)) {\n // Even though the video underflowed and was stuck in a gap, the audio overplayed\n // the gap, leading currentTime into a buffered range. Seeking to currentTime\n // allows the video to catch up to the audio position without losing any audio\n // (only suffering ~3 seconds of frozen video and a pause in audio playback).\n this.cancelTimer_();\n this.seekTo(currentTime); // video underflow may be useful for monitoring QoS\n\n this.tech_.trigger({\n type: 'usage',\n name: 'hls-video-underflow'\n });\n return true;\n } // check for gap\n\n\n if (nextRange.length > 0) {\n var difference = nextRange.start(0) - currentTime;\n this.logger_('Stopped at ' + currentTime + ', setting timer for ' + difference + ', seeking ' + ('to ' + nextRange.start(0)));\n this.timer_ = setTimeout(this.skipTheGap_.bind(this), difference * 1000, currentTime);\n return true;\n } // All checks failed. Returning false to indicate failure to correct waiting\n\n\n return false;\n }\n }, {\n key: 'afterSeekableWindow_',\n value: function afterSeekableWindow_(seekable, currentTime, playlist) {\n var allowSeeksWithinUnsafeLiveWindow = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n if (!seekable.length) {\n // we can't make a solid case if there's no seekable, default to false\n return false;\n }\n\n var allowedEnd = seekable.end(seekable.length - 1) + SAFE_TIME_DELTA;\n var isLive = !playlist.endList;\n\n if (isLive && allowSeeksWithinUnsafeLiveWindow) {\n allowedEnd = seekable.end(seekable.length - 1) + playlist.targetDuration * 3;\n }\n\n if (currentTime > allowedEnd) {\n return true;\n }\n\n return false;\n }\n }, {\n key: 'beforeSeekableWindow_',\n value: function beforeSeekableWindow_(seekable, currentTime) {\n if (seekable.length && // can't fall before 0 and 0 seekable start identifies VOD stream\n seekable.start(0) > 0 && currentTime < seekable.start(0) - SAFE_TIME_DELTA) {\n return true;\n }\n\n return false;\n }\n }, {\n key: 'videoUnderflow_',\n value: function videoUnderflow_(nextRange, buffered, currentTime) {\n if (nextRange.length === 0) {\n // Even if there is no available next range, there is still a possibility we are\n // stuck in a gap due to video underflow.\n var gap = this.gapFromVideoUnderflow_(buffered, currentTime);\n\n if (gap) {\n this.logger_('Encountered a gap in video from ' + gap.start + ' to ' + gap.end + '. ' + ('Seeking to current time ' + currentTime));\n return true;\n }\n }\n\n return false;\n }\n /**\n * Timer callback. If playback still has not proceeded, then we seek\n * to the start of the next buffered region.\n *\n * @private\n */\n\n }, {\n key: 'skipTheGap_',\n value: function skipTheGap_(scheduledCurrentTime) {\n var buffered = this.tech_.buffered();\n var currentTime = this.tech_.currentTime();\n var nextRange = findNextRange(buffered, currentTime);\n this.cancelTimer_();\n\n if (nextRange.length === 0 || currentTime !== scheduledCurrentTime) {\n return;\n }\n\n this.logger_('skipTheGap_:', 'currentTime:', currentTime, 'scheduled currentTime:', scheduledCurrentTime, 'nextRange start:', nextRange.start(0)); // only seek if we still have not played\n\n this.seekTo(nextRange.start(0) + TIME_FUDGE_FACTOR);\n this.tech_.trigger({\n type: 'usage',\n name: 'hls-gap-skip'\n });\n }\n }, {\n key: 'gapFromVideoUnderflow_',\n value: function gapFromVideoUnderflow_(buffered, currentTime) {\n // At least in Chrome, if there is a gap in the video buffer, the audio will continue\n // playing for ~3 seconds after the video gap starts. This is done to account for\n // video buffer underflow/underrun (note that this is not done when there is audio\n // buffer underflow/underrun -- in that case the video will stop as soon as it\n // encounters the gap, as audio stalls are more noticeable/jarring to a user than\n // video stalls). The player's time will reflect the playthrough of audio, so the\n // time will appear as if we are in a buffered region, even if we are stuck in a\n // \"gap.\"\n //\n // Example:\n // video buffer: 0 => 10.1, 10.2 => 20\n // audio buffer: 0 => 20\n // overall buffer: 0 => 10.1, 10.2 => 20\n // current time: 13\n //\n // Chrome's video froze at 10 seconds, where the video buffer encountered the gap,\n // however, the audio continued playing until it reached ~3 seconds past the gap\n // (13 seconds), at which point it stops as well. Since current time is past the\n // gap, findNextRange will return no ranges.\n //\n // To check for this issue, we see if there is a gap that starts somewhere within\n // a 3 second range (3 seconds +/- 1 second) back from our current time.\n var gaps = findGaps(buffered);\n\n for (var i = 0; i < gaps.length; i++) {\n var start = gaps.start(i);\n var end = gaps.end(i); // gap is starts no more than 4 seconds back\n\n if (currentTime - start < 4 && currentTime - start > 2) {\n return {\n start: start,\n end: end\n };\n }\n }\n\n return null;\n }\n }]);\n return PlaybackWatcher;\n}();\n\nvar defaultOptions = {\n errorInterval: 30,\n getSource: function getSource(next) {\n var tech = this.tech({\n IWillNotUseThisInPlugins: true\n });\n var sourceObj = tech.currentSource_;\n return next(sourceObj);\n }\n};\n/**\n * Main entry point for the plugin\n *\n * @param {Player} player a reference to a videojs Player instance\n * @param {Object} [options] an object with plugin options\n * @private\n */\n\nvar initPlugin = function initPlugin(player, options) {\n var lastCalled = 0;\n var seekTo = 0;\n var localOptions = videojs$1.mergeOptions(defaultOptions, options);\n player.ready(function () {\n player.trigger({\n type: 'usage',\n name: 'hls-error-reload-initialized'\n });\n });\n /**\n * Player modifications to perform that must wait until `loadedmetadata`\n * has been triggered\n *\n * @private\n */\n\n var loadedMetadataHandler = function loadedMetadataHandler() {\n if (seekTo) {\n player.currentTime(seekTo);\n }\n };\n /**\n * Set the source on the player element, play, and seek if necessary\n *\n * @param {Object} sourceObj An object specifying the source url and mime-type to play\n * @private\n */\n\n\n var setSource = function setSource(sourceObj) {\n if (sourceObj === null || sourceObj === undefined) {\n return;\n }\n\n seekTo = player.duration() !== Infinity && player.currentTime() || 0;\n player.one('loadedmetadata', loadedMetadataHandler);\n player.src(sourceObj);\n player.trigger({\n type: 'usage',\n name: 'hls-error-reload'\n });\n player.play();\n };\n /**\n * Attempt to get a source from either the built-in getSource function\n * or a custom function provided via the options\n *\n * @private\n */\n\n\n var errorHandler = function errorHandler() {\n // Do not attempt to reload the source if a source-reload occurred before\n // 'errorInterval' time has elapsed since the last source-reload\n if (Date.now() - lastCalled < localOptions.errorInterval * 1000) {\n player.trigger({\n type: 'usage',\n name: 'hls-error-reload-canceled'\n });\n return;\n }\n\n if (!localOptions.getSource || typeof localOptions.getSource !== 'function') {\n videojs$1.log.error('ERROR: reloadSourceOnError - The option getSource must be a function!');\n return;\n }\n\n lastCalled = Date.now();\n return localOptions.getSource.call(player, setSource);\n };\n /**\n * Unbind any event handlers that were bound by the plugin\n *\n * @private\n */\n\n\n var cleanupEvents = function cleanupEvents() {\n player.off('loadedmetadata', loadedMetadataHandler);\n player.off('error', errorHandler);\n player.off('dispose', cleanupEvents);\n };\n /**\n * Cleanup before re-initializing the plugin\n *\n * @param {Object} [newOptions] an object with plugin options\n * @private\n */\n\n\n var reinitPlugin = function reinitPlugin(newOptions) {\n cleanupEvents();\n initPlugin(player, newOptions);\n };\n\n player.on('error', errorHandler);\n player.on('dispose', cleanupEvents); // Overwrite the plugin function so that we can correctly cleanup before\n // initializing the plugin\n\n player.reloadSourceOnError = reinitPlugin;\n};\n/**\n * Reload the source when an error is detected as long as there\n * wasn't an error previously within the last 30 seconds\n *\n * @param {Object} [options] an object with plugin options\n */\n\n\nvar reloadSourceOnError = function reloadSourceOnError(options) {\n initPlugin(this, options);\n};\n\nvar version$1 = \"1.10.6\"; // since VHS handles HLS and DASH (and in the future, more types), use * to capture all\n\nvideojs$1.use('*', function (player) {\n return {\n setSource: function setSource(srcObj, next) {\n // pass null as the first argument to indicate that the source is not rejected\n next(null, srcObj);\n },\n // VHS needs to know when seeks happen. For external seeks (generated at the player\n // level), this middleware will capture the action. For internal seeks (generated at\n // the tech level), we use a wrapped function so that we can handle it on our own\n // (specified elsewhere).\n setCurrentTime: function setCurrentTime(time) {\n if (player.vhs && player.currentSource().src === player.vhs.source_.src) {\n player.vhs.setCurrentTime(time);\n }\n\n return time;\n },\n // Sync VHS after play requests.\n // This specifically handles replay where the order of actions is\n // play, video element will seek to 0 (skipping the setCurrentTime middleware)\n // then triggers a play event.\n play: function play() {\n if (player.vhs && player.currentSource().src === player.vhs.source_.src) {\n player.vhs.setCurrentTime(player.tech_.currentTime());\n }\n }\n };\n});\n/**\n * @file videojs-http-streaming.js\n *\n * The main file for the HLS project.\n * License: https://github.com/videojs/videojs-http-streaming/blob/master/LICENSE\n */\n\nvar Hls$1 = {\n PlaylistLoader: PlaylistLoader,\n Playlist: Playlist,\n Decrypter: Decrypter,\n AsyncStream: AsyncStream,\n decrypt: decrypt,\n utils: utils,\n STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector,\n INITIAL_PLAYLIST_SELECTOR: lowestBitrateCompatibleVariantSelector,\n comparePlaylistBandwidth: comparePlaylistBandwidth,\n comparePlaylistResolution: comparePlaylistResolution,\n xhr: xhrFactory()\n}; // Define getter/setters for config properites\n\n['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 (prop) {\n Object.defineProperty(Hls$1, prop, {\n get: function get$$1() {\n videojs$1.log.warn('using Hls.' + prop + ' is UNSAFE be sure you know what you are doing');\n return Config[prop];\n },\n set: function set$$1(value) {\n videojs$1.log.warn('using Hls.' + prop + ' is UNSAFE be sure you know what you are doing');\n\n if (typeof value !== 'number' || value < 0) {\n videojs$1.log.warn('value of Hls.' + prop + ' must be greater than or equal to 0');\n return;\n }\n\n Config[prop] = value;\n }\n });\n});\nvar LOCAL_STORAGE_KEY$1 = 'videojs-vhs';\n\nvar simpleTypeFromSourceType = function simpleTypeFromSourceType(type) {\n var mpegurlRE = /^(audio|video|application)\\/(x-|vnd\\.apple\\.)?mpegurl/i;\n\n if (mpegurlRE.test(type)) {\n return 'hls';\n }\n\n var dashRE = /^application\\/dash\\+xml/i;\n\n if (dashRE.test(type)) {\n return 'dash';\n }\n\n return null;\n};\n/**\n * Updates the selectedIndex of the QualityLevelList when a mediachange happens in hls.\n *\n * @param {QualityLevelList} qualityLevels The QualityLevelList to update.\n * @param {PlaylistLoader} playlistLoader PlaylistLoader containing the new media info.\n * @function handleHlsMediaChange\n */\n\n\nvar handleHlsMediaChange = function handleHlsMediaChange(qualityLevels, playlistLoader) {\n var newPlaylist = playlistLoader.media();\n var selectedIndex = -1;\n\n for (var i = 0; i < qualityLevels.length; i++) {\n if (qualityLevels[i].id === newPlaylist.uri) {\n selectedIndex = i;\n break;\n }\n }\n\n qualityLevels.selectedIndex_ = selectedIndex;\n qualityLevels.trigger({\n selectedIndex: selectedIndex,\n type: 'change'\n });\n};\n/**\n * Adds quality levels to list once playlist metadata is available\n *\n * @param {QualityLevelList} qualityLevels The QualityLevelList to attach events to.\n * @param {Object} hls Hls object to listen to for media events.\n * @function handleHlsLoadedMetadata\n */\n\n\nvar handleHlsLoadedMetadata = function handleHlsLoadedMetadata(qualityLevels, hls) {\n hls.representations().forEach(function (rep) {\n qualityLevels.addQualityLevel(rep);\n });\n handleHlsMediaChange(qualityLevels, hls.playlists);\n}; // HLS is a source handler, not a tech. Make sure attempts to use it\n// as one do not cause exceptions.\n\n\nHls$1.canPlaySource = function () {\n return videojs$1.log.warn('HLS is no longer a tech. Please remove it from ' + 'your player\\'s techOrder.');\n};\n\nvar emeKeySystems = function emeKeySystems(keySystemOptions, videoPlaylist, audioPlaylist) {\n if (!keySystemOptions) {\n return keySystemOptions;\n } // upsert the content types based on the selected playlist\n\n\n var keySystemContentTypes = {};\n\n for (var keySystem in keySystemOptions) {\n keySystemContentTypes[keySystem] = {\n audioContentType: 'audio/mp4; codecs=\"' + audioPlaylist.attributes.CODECS + '\"',\n videoContentType: 'video/mp4; codecs=\"' + videoPlaylist.attributes.CODECS + '\"'\n };\n\n if (videoPlaylist.contentProtection && videoPlaylist.contentProtection[keySystem] && videoPlaylist.contentProtection[keySystem].pssh) {\n keySystemContentTypes[keySystem].pssh = videoPlaylist.contentProtection[keySystem].pssh;\n } // videojs-contrib-eme accepts the option of specifying: 'com.some.cdm': 'url'\n // so we need to prevent overwriting the URL entirely\n\n\n if (typeof keySystemOptions[keySystem] === 'string') {\n keySystemContentTypes[keySystem].url = keySystemOptions[keySystem];\n }\n }\n\n return videojs$1.mergeOptions(keySystemOptions, keySystemContentTypes);\n};\n\nvar setupEmeOptions = function setupEmeOptions(hlsHandler) {\n if (hlsHandler.options_.sourceType !== 'dash') {\n return;\n }\n\n var player = videojs$1.players[hlsHandler.tech_.options_.playerId];\n\n if (player.eme) {\n var sourceOptions = emeKeySystems(hlsHandler.source_.keySystems, hlsHandler.playlists.media(), hlsHandler.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader.media());\n\n if (sourceOptions) {\n player.currentSource().keySystems = sourceOptions; // works around https://bugs.chromium.org/p/chromium/issues/detail?id=895449\n\n if (player.eme.initializeMediaKeys) {\n player.eme.initializeMediaKeys();\n }\n }\n }\n};\n\nvar getVhsLocalStorage = function getVhsLocalStorage() {\n if (!window.localStorage) {\n return null;\n }\n\n var storedObject = window.localStorage.getItem(LOCAL_STORAGE_KEY$1);\n\n if (!storedObject) {\n return null;\n }\n\n try {\n return JSON.parse(storedObject);\n } catch (e) {\n // someone may have tampered with the value\n return null;\n }\n};\n\nvar updateVhsLocalStorage = function updateVhsLocalStorage(options) {\n if (!window.localStorage) {\n return false;\n }\n\n var objectToStore = getVhsLocalStorage();\n objectToStore = objectToStore ? videojs$1.mergeOptions(objectToStore, options) : options;\n\n try {\n window.localStorage.setItem(LOCAL_STORAGE_KEY$1, JSON.stringify(objectToStore));\n } catch (e) {\n // Throws if storage is full (e.g., always on iOS 5+ Safari private mode, where\n // storage is set to 0).\n // https://developer.mozilla.org/en-US/docs/Web/API/Storage/setItem#Exceptions\n // No need to perform any operation.\n return false;\n }\n\n return objectToStore;\n};\n/**\n * Whether the browser has built-in HLS support.\n */\n\n\nHls$1.supportsNativeHls = function () {\n var video = document.createElement('video'); // native HLS is definitely not supported if HTML5 video isn't\n\n if (!videojs$1.getTech('Html5').isSupported()) {\n return false;\n } // HLS manifests can go by many mime-types\n\n\n var canPlay = [// Apple santioned\n 'application/vnd.apple.mpegurl', // Apple sanctioned for backwards compatibility\n 'audio/mpegurl', // Very common\n 'audio/x-mpegurl', // Very common\n 'application/x-mpegurl', // Included for completeness\n 'video/x-mpegurl', 'video/mpegurl', 'application/mpegurl'];\n return canPlay.some(function (canItPlay) {\n return /maybe|probably/i.test(video.canPlayType(canItPlay));\n });\n}();\n\nHls$1.supportsNativeDash = function () {\n if (!videojs$1.getTech('Html5').isSupported()) {\n return false;\n }\n\n return /maybe|probably/i.test(document.createElement('video').canPlayType('application/dash+xml'));\n}();\n\nHls$1.supportsTypeNatively = function (type) {\n if (type === 'hls') {\n return Hls$1.supportsNativeHls;\n }\n\n if (type === 'dash') {\n return Hls$1.supportsNativeDash;\n }\n\n return false;\n};\n/**\n * HLS is a source handler, not a tech. Make sure attempts to use it\n * as one do not cause exceptions.\n */\n\n\nHls$1.isSupported = function () {\n return videojs$1.log.warn('HLS is no longer a tech. Please remove it from ' + 'your player\\'s techOrder.');\n};\n\nvar Component$1 = videojs$1.getComponent('Component');\n/**\n * The Hls Handler object, where we orchestrate all of the parts\n * of HLS to interact with video.js\n *\n * @class HlsHandler\n * @extends videojs.Component\n * @param {Object} source the soruce object\n * @param {Tech} tech the parent tech object\n * @param {Object} options optional and required options\n */\n\nvar HlsHandler = function (_Component) {\n inherits(HlsHandler, _Component);\n\n function HlsHandler(source, tech, options) {\n classCallCheck(this, HlsHandler); // tech.player() is deprecated but setup a reference to HLS for\n // backwards-compatibility\n\n var _this = possibleConstructorReturn(this, (HlsHandler.__proto__ || Object.getPrototypeOf(HlsHandler)).call(this, tech, options.hls));\n\n if (tech.options_ && tech.options_.playerId) {\n var _player = videojs$1(tech.options_.playerId);\n\n if (!_player.hasOwnProperty('hls')) {\n Object.defineProperty(_player, 'hls', {\n get: function get$$1() {\n videojs$1.log.warn('player.hls is deprecated. Use player.tech().hls instead.');\n tech.trigger({\n type: 'usage',\n name: 'hls-player-access'\n });\n return _this;\n },\n configurable: true\n });\n } // Set up a reference to the HlsHandler from player.vhs. This allows users to start\n // migrating from player.tech_.hls... to player.vhs... for API access. Although this\n // isn't the most appropriate form of reference for video.js (since all APIs should\n // be provided through core video.js), it is a common pattern for plugins, and vhs\n // will act accordingly.\n\n\n _player.vhs = _this; // deprecated, for backwards compatibility\n\n _player.dash = _this;\n _this.player_ = _player;\n }\n\n _this.tech_ = tech;\n _this.source_ = source;\n _this.stats = {};\n\n _this.setOptions_();\n\n if (_this.options_.overrideNative && tech.overrideNativeAudioTracks && tech.overrideNativeVideoTracks) {\n tech.overrideNativeAudioTracks(true);\n tech.overrideNativeVideoTracks(true);\n } else if (_this.options_.overrideNative && (tech.featuresNativeVideoTracks || tech.featuresNativeAudioTracks)) {\n // overriding native HLS only works if audio tracks have been emulated\n // error early if we're misconfigured\n throw new Error('Overriding native HLS requires emulated tracks. ' + 'See https://git.io/vMpjB');\n } // listen for fullscreenchange events for this player so that we\n // can adjust our quality selection quickly\n\n\n _this.on(document, ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'], function (event) {\n var fullscreenElement = document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;\n\n if (fullscreenElement && fullscreenElement.contains(_this.tech_.el())) {\n _this.masterPlaylistController_.smoothQualityChange_();\n }\n }); // Handle seeking when looping - middleware doesn't handle this seek event from the tech\n\n\n _this.on(_this.tech_, 'seeking', function () {\n if (this.tech_.currentTime() === 0 && this.tech_.player_.loop()) {\n this.setCurrentTime(0);\n }\n });\n\n _this.on(_this.tech_, 'error', function () {\n if (this.masterPlaylistController_) {\n this.masterPlaylistController_.pauseLoading();\n }\n });\n\n _this.on(_this.tech_, 'play', _this.play);\n\n return _this;\n }\n\n createClass(HlsHandler, [{\n key: 'setOptions_',\n value: function setOptions_() {\n var _this2 = this; // defaults\n\n\n this.options_.withCredentials = this.options_.withCredentials || false;\n this.options_.handleManifestRedirects = this.options_.handleManifestRedirects || false;\n this.options_.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions === false ? false : true;\n this.options_.smoothQualityChange = this.options_.smoothQualityChange || false;\n this.options_.useBandwidthFromLocalStorage = typeof this.source_.useBandwidthFromLocalStorage !== 'undefined' ? this.source_.useBandwidthFromLocalStorage : this.options_.useBandwidthFromLocalStorage || false;\n this.options_.customTagParsers = this.options_.customTagParsers || [];\n this.options_.customTagMappers = this.options_.customTagMappers || [];\n this.options_.cacheEncryptionKeys = this.options_.cacheEncryptionKeys || false;\n\n if (typeof this.options_.blacklistDuration !== 'number') {\n this.options_.blacklistDuration = 5 * 60;\n }\n\n if (typeof this.options_.bandwidth !== 'number') {\n if (this.options_.useBandwidthFromLocalStorage) {\n var storedObject = getVhsLocalStorage();\n\n if (storedObject && storedObject.bandwidth) {\n this.options_.bandwidth = storedObject.bandwidth;\n this.tech_.trigger({\n type: 'usage',\n name: 'hls-bandwidth-from-local-storage'\n });\n }\n\n if (storedObject && storedObject.throughput) {\n this.options_.throughput = storedObject.throughput;\n this.tech_.trigger({\n type: 'usage',\n name: 'hls-throughput-from-local-storage'\n });\n }\n }\n } // if bandwidth was not set by options or pulled from local storage, start playlist\n // selection at a reasonable bandwidth\n\n\n if (typeof this.options_.bandwidth !== 'number') {\n this.options_.bandwidth = Config.INITIAL_BANDWIDTH;\n } // If the bandwidth number is unchanged from the initial setting\n // then this takes precedence over the enableLowInitialPlaylist option\n\n\n this.options_.enableLowInitialPlaylist = this.options_.enableLowInitialPlaylist && this.options_.bandwidth === Config.INITIAL_BANDWIDTH; // grab options passed to player.src\n\n ['withCredentials', 'limitRenditionByPlayerDimensions', 'bandwidth', 'smoothQualityChange', 'customTagParsers', 'customTagMappers', 'handleManifestRedirects', 'cacheEncryptionKeys'].forEach(function (option) {\n if (typeof _this2.source_[option] !== 'undefined') {\n _this2.options_[option] = _this2.source_[option];\n }\n });\n this.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions;\n }\n /**\n * called when player.src gets called, handle a new source\n *\n * @param {Object} src the source object to handle\n */\n\n }, {\n key: 'src',\n value: function src(_src, type) {\n var _this3 = this; // do nothing if the src is falsey\n\n\n if (!_src) {\n return;\n }\n\n this.setOptions_(); // add master playlist controller options\n\n this.options_.url = this.source_.src;\n this.options_.tech = this.tech_;\n this.options_.externHls = Hls$1;\n this.options_.sourceType = simpleTypeFromSourceType(type); // Whenever we seek internally, we should update both the tech and call our own\n // setCurrentTime function. This is needed because \"seeking\" events aren't always\n // reliable. External seeks (via the player object) are handled via middleware.\n\n this.options_.seekTo = function (time) {\n _this3.tech_.setCurrentTime(time);\n\n _this3.setCurrentTime(time);\n };\n\n this.masterPlaylistController_ = new MasterPlaylistController(this.options_);\n this.playbackWatcher_ = new PlaybackWatcher(videojs$1.mergeOptions(this.options_, {\n seekable: function seekable$$1() {\n return _this3.seekable();\n },\n media: function media() {\n return _this3.masterPlaylistController_.media();\n }\n }));\n this.masterPlaylistController_.on('error', function () {\n var player = videojs$1.players[_this3.tech_.options_.playerId];\n player.error(_this3.masterPlaylistController_.error);\n }); // `this` in selectPlaylist should be the HlsHandler for backwards\n // compatibility with < v2\n\n this.masterPlaylistController_.selectPlaylist = this.selectPlaylist ? this.selectPlaylist.bind(this) : Hls$1.STANDARD_PLAYLIST_SELECTOR.bind(this);\n this.masterPlaylistController_.selectInitialPlaylist = Hls$1.INITIAL_PLAYLIST_SELECTOR.bind(this); // re-expose some internal objects for backwards compatibility with < v2\n\n this.playlists = this.masterPlaylistController_.masterPlaylistLoader_;\n this.mediaSource = this.masterPlaylistController_.mediaSource; // Proxy assignment of some properties to the master playlist\n // controller. Using a custom property for backwards compatibility\n // with < v2\n\n Object.defineProperties(this, {\n selectPlaylist: {\n get: function get$$1() {\n return this.masterPlaylistController_.selectPlaylist;\n },\n set: function set$$1(selectPlaylist) {\n this.masterPlaylistController_.selectPlaylist = selectPlaylist.bind(this);\n }\n },\n throughput: {\n get: function get$$1() {\n return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate;\n },\n set: function set$$1(throughput) {\n this.masterPlaylistController_.mainSegmentLoader_.throughput.rate = throughput; // By setting `count` to 1 the throughput value becomes the starting value\n // for the cumulative average\n\n this.masterPlaylistController_.mainSegmentLoader_.throughput.count = 1;\n }\n },\n bandwidth: {\n get: function get$$1() {\n return this.masterPlaylistController_.mainSegmentLoader_.bandwidth;\n },\n set: function set$$1(bandwidth) {\n this.masterPlaylistController_.mainSegmentLoader_.bandwidth = bandwidth; // setting the bandwidth manually resets the throughput counter\n // `count` is set to zero that current value of `rate` isn't included\n // in the cumulative average\n\n this.masterPlaylistController_.mainSegmentLoader_.throughput = {\n rate: 0,\n count: 0\n };\n }\n },\n\n /**\n * `systemBandwidth` is a combination of two serial processes bit-rates. The first\n * is the network bitrate provided by `bandwidth` and the second is the bitrate of\n * the entire process after that - decryption, transmuxing, and appending - provided\n * by `throughput`.\n *\n * Since the two process are serial, the overall system bandwidth is given by:\n * sysBandwidth = 1 / (1 / bandwidth + 1 / throughput)\n */\n systemBandwidth: {\n get: function get$$1() {\n var invBandwidth = 1 / (this.bandwidth || 1);\n var invThroughput = void 0;\n\n if (this.throughput > 0) {\n invThroughput = 1 / this.throughput;\n } else {\n invThroughput = 0;\n }\n\n var systemBitrate = Math.floor(1 / (invBandwidth + invThroughput));\n return systemBitrate;\n },\n set: function set$$1() {\n videojs$1.log.error('The \"systemBandwidth\" property is read-only');\n }\n }\n });\n\n if (this.options_.bandwidth) {\n this.bandwidth = this.options_.bandwidth;\n }\n\n if (this.options_.throughput) {\n this.throughput = this.options_.throughput;\n }\n\n Object.defineProperties(this.stats, {\n bandwidth: {\n get: function get$$1() {\n return _this3.bandwidth || 0;\n },\n enumerable: true\n },\n mediaRequests: {\n get: function get$$1() {\n return _this3.masterPlaylistController_.mediaRequests_() || 0;\n },\n enumerable: true\n },\n mediaRequestsAborted: {\n get: function get$$1() {\n return _this3.masterPlaylistController_.mediaRequestsAborted_() || 0;\n },\n enumerable: true\n },\n mediaRequestsTimedout: {\n get: function get$$1() {\n return _this3.masterPlaylistController_.mediaRequestsTimedout_() || 0;\n },\n enumerable: true\n },\n mediaRequestsErrored: {\n get: function get$$1() {\n return _this3.masterPlaylistController_.mediaRequestsErrored_() || 0;\n },\n enumerable: true\n },\n mediaTransferDuration: {\n get: function get$$1() {\n return _this3.masterPlaylistController_.mediaTransferDuration_() || 0;\n },\n enumerable: true\n },\n mediaBytesTransferred: {\n get: function get$$1() {\n return _this3.masterPlaylistController_.mediaBytesTransferred_() || 0;\n },\n enumerable: true\n },\n mediaSecondsLoaded: {\n get: function get$$1() {\n return _this3.masterPlaylistController_.mediaSecondsLoaded_() || 0;\n },\n enumerable: true\n },\n buffered: {\n get: function get$$1() {\n return timeRangesToArray(_this3.tech_.buffered());\n },\n enumerable: true\n },\n currentTime: {\n get: function get$$1() {\n return _this3.tech_.currentTime();\n },\n enumerable: true\n },\n currentSource: {\n get: function get$$1() {\n return _this3.tech_.currentSource_;\n },\n enumerable: true\n },\n currentTech: {\n get: function get$$1() {\n return _this3.tech_.name_;\n },\n enumerable: true\n },\n duration: {\n get: function get$$1() {\n return _this3.tech_.duration();\n },\n enumerable: true\n },\n master: {\n get: function get$$1() {\n return _this3.playlists.master;\n },\n enumerable: true\n },\n playerDimensions: {\n get: function get$$1() {\n return _this3.tech_.currentDimensions();\n },\n enumerable: true\n },\n seekable: {\n get: function get$$1() {\n return timeRangesToArray(_this3.tech_.seekable());\n },\n enumerable: true\n },\n timestamp: {\n get: function get$$1() {\n return Date.now();\n },\n enumerable: true\n },\n videoPlaybackQuality: {\n get: function get$$1() {\n return _this3.tech_.getVideoPlaybackQuality();\n },\n enumerable: true\n }\n });\n this.tech_.one('canplay', this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_));\n this.tech_.on('bandwidthupdate', function () {\n if (_this3.options_.useBandwidthFromLocalStorage) {\n updateVhsLocalStorage({\n bandwidth: _this3.bandwidth,\n throughput: Math.round(_this3.throughput)\n });\n }\n });\n this.masterPlaylistController_.on('selectedinitialmedia', function () {\n // Add the manual rendition mix-in to HlsHandler\n renditionSelectionMixin(_this3);\n setupEmeOptions(_this3);\n }); // the bandwidth of the primary segment loader is our best\n // estimate of overall bandwidth\n\n this.on(this.masterPlaylistController_, 'progress', function () {\n this.tech_.trigger('progress');\n });\n this.tech_.ready(function () {\n return _this3.setupQualityLevels_();\n }); // do nothing if the tech has been disposed already\n // this can occur if someone sets the src in player.ready(), for instance\n\n if (!this.tech_.el()) {\n return;\n }\n\n this.tech_.src(videojs$1.URL.createObjectURL(this.masterPlaylistController_.mediaSource));\n }\n /**\n * Initializes the quality levels and sets listeners to update them.\n *\n * @method setupQualityLevels_\n * @private\n */\n\n }, {\n key: 'setupQualityLevels_',\n value: function setupQualityLevels_() {\n var _this4 = this;\n\n var player = videojs$1.players[this.tech_.options_.playerId];\n\n if (player && player.qualityLevels) {\n this.qualityLevels_ = player.qualityLevels();\n this.masterPlaylistController_.on('selectedinitialmedia', function () {\n handleHlsLoadedMetadata(_this4.qualityLevels_, _this4);\n });\n this.playlists.on('mediachange', function () {\n handleHlsMediaChange(_this4.qualityLevels_, _this4.playlists);\n });\n }\n }\n /**\n * Begin playing the video.\n */\n\n }, {\n key: 'play',\n value: function play() {\n this.masterPlaylistController_.play();\n }\n /**\n * a wrapper around the function in MasterPlaylistController\n */\n\n }, {\n key: 'setCurrentTime',\n value: function setCurrentTime(currentTime) {\n this.masterPlaylistController_.setCurrentTime(currentTime);\n }\n /**\n * a wrapper around the function in MasterPlaylistController\n */\n\n }, {\n key: 'duration',\n value: function duration$$1() {\n return this.masterPlaylistController_.duration();\n }\n /**\n * a wrapper around the function in MasterPlaylistController\n */\n\n }, {\n key: 'seekable',\n value: function seekable$$1() {\n return this.masterPlaylistController_.seekable();\n }\n /**\n * Abort all outstanding work and cleanup.\n */\n\n }, {\n key: 'dispose',\n value: function dispose() {\n if (this.playbackWatcher_) {\n this.playbackWatcher_.dispose();\n }\n\n if (this.masterPlaylistController_) {\n this.masterPlaylistController_.dispose();\n }\n\n if (this.qualityLevels_) {\n this.qualityLevels_.dispose();\n }\n\n if (this.player_) {\n delete this.player_.vhs;\n delete this.player_.dash;\n delete this.player_.hls;\n }\n\n if (this.tech_ && this.tech_.hls) {\n delete this.tech_.hls;\n }\n\n get$1(HlsHandler.prototype.__proto__ || Object.getPrototypeOf(HlsHandler.prototype), 'dispose', this).call(this);\n }\n }, {\n key: 'convertToProgramTime',\n value: function convertToProgramTime(time, callback) {\n return getProgramTime({\n playlist: this.masterPlaylistController_.media(),\n time: time,\n callback: callback\n });\n } // the player must be playing before calling this\n\n }, {\n key: 'seekToProgramTime',\n value: function seekToProgramTime$$1(programTime, callback) {\n var pauseAfterSeek = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var retryCount = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 2;\n return seekToProgramTime({\n programTime: programTime,\n playlist: this.masterPlaylistController_.media(),\n retryCount: retryCount,\n pauseAfterSeek: pauseAfterSeek,\n seekTo: this.options_.seekTo,\n tech: this.options_.tech,\n callback: callback\n });\n }\n }]);\n return HlsHandler;\n}(Component$1);\n/**\n * The Source Handler object, which informs video.js what additional\n * MIME types are supported and sets up playback. It is registered\n * automatically to the appropriate tech based on the capabilities of\n * the browser it is running in. It is not necessary to use or modify\n * this object in normal usage.\n */\n\n\nvar HlsSourceHandler = {\n name: 'videojs-http-streaming',\n VERSION: version$1,\n canHandleSource: function canHandleSource(srcObj) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var localOptions = videojs$1.mergeOptions(videojs$1.options, options);\n return HlsSourceHandler.canPlayType(srcObj.type, localOptions);\n },\n handleSource: function handleSource(source, tech) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var localOptions = videojs$1.mergeOptions(videojs$1.options, options);\n tech.hls = new HlsHandler(source, tech, localOptions);\n tech.hls.xhr = xhrFactory();\n tech.hls.src(source.src, source.type);\n return tech.hls;\n },\n canPlayType: function canPlayType(type) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var _videojs$mergeOptions = videojs$1.mergeOptions(videojs$1.options, options),\n overrideNative = _videojs$mergeOptions.hls.overrideNative;\n\n var supportedType = simpleTypeFromSourceType(type);\n var canUseMsePlayback = supportedType && (!Hls$1.supportsTypeNatively(supportedType) || overrideNative);\n return canUseMsePlayback ? 'maybe' : '';\n }\n};\n\nif (typeof videojs$1.MediaSource === 'undefined' || typeof videojs$1.URL === 'undefined') {\n videojs$1.MediaSource = MediaSource;\n videojs$1.URL = URL$1;\n} // register source handlers with the appropriate techs\n\n\nif (MediaSource.supportsNativeMediaSources()) {\n videojs$1.getTech('Html5').registerSourceHandler(HlsSourceHandler, 0);\n}\n\nvideojs$1.HlsHandler = HlsHandler;\nvideojs$1.HlsSourceHandler = HlsSourceHandler;\nvideojs$1.Hls = Hls$1;\n\nif (!videojs$1.use) {\n videojs$1.registerComponent('Hls', Hls$1);\n}\n\nvideojs$1.options.hls = videojs$1.options.hls || {};\n\nif (videojs$1.registerPlugin) {\n videojs$1.registerPlugin('reloadSourceOnError', reloadSourceOnError);\n} else {\n videojs$1.plugin('reloadSourceOnError', reloadSourceOnError);\n}\n\nexport default videojs$1;","var topLevel = typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : {};\n\nvar minDoc = require('min-document');\n\nvar doccy;\n\nif (typeof document !== 'undefined') {\n doccy = document;\n} else {\n doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\n\n if (!doccy) {\n doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\n }\n}\n\nmodule.exports = doccy;","module.exports = SafeParseTuple;\n\nfunction SafeParseTuple(obj, reviver) {\n var json;\n var error = null;\n\n try {\n json = JSON.parse(obj, reviver);\n } catch (err) {\n error = err;\n }\n\n return [error, json];\n}","// Source: http://jsfiddle.net/vWx8V/\n// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes\n\n/**\n * Conenience method returns corresponding value for given keyName or keyCode.\n *\n * @param {Mixed} keyCode {Number} or keyName {String}\n * @return {Mixed}\n * @api public\n */\nfunction keyCode(searchInput) {\n // Keyboard Events\n if (searchInput && 'object' === typeof searchInput) {\n var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode;\n if (hasKeyCode) searchInput = hasKeyCode;\n } // Numbers\n\n\n if ('number' === typeof searchInput) return names[searchInput]; // Everything else (cast to string)\n\n var search = String(searchInput); // check codes\n\n var foundNamedKey = codes[search.toLowerCase()];\n if (foundNamedKey) return foundNamedKey; // check aliases\n\n var foundNamedKey = aliases[search.toLowerCase()];\n if (foundNamedKey) return foundNamedKey; // weird character?\n\n if (search.length === 1) return search.charCodeAt(0);\n return undefined;\n}\n/**\n * Compares a keyboard event with a given keyCode or keyName.\n *\n * @param {Event} event Keyboard event that should be tested\n * @param {Mixed} keyCode {Number} or keyName {String}\n * @return {Boolean}\n * @api public\n */\n\n\nkeyCode.isEventKey = function isEventKey(event, nameOrCode) {\n if (event && 'object' === typeof event) {\n var keyCode = event.which || event.keyCode || event.charCode;\n\n if (keyCode === null || keyCode === undefined) {\n return false;\n }\n\n if (typeof nameOrCode === 'string') {\n // check codes\n var foundNamedKey = codes[nameOrCode.toLowerCase()];\n\n if (foundNamedKey) {\n return foundNamedKey === keyCode;\n } // check aliases\n\n\n var foundNamedKey = aliases[nameOrCode.toLowerCase()];\n\n if (foundNamedKey) {\n return foundNamedKey === keyCode;\n }\n } else if (typeof nameOrCode === 'number') {\n return nameOrCode === keyCode;\n }\n\n return false;\n }\n};\n\nexports = module.exports = keyCode;\n/**\n * Get by name\n *\n * exports.code['enter'] // => 13\n */\n\nvar codes = exports.code = exports.codes = {\n 'backspace': 8,\n 'tab': 9,\n 'enter': 13,\n 'shift': 16,\n 'ctrl': 17,\n 'alt': 18,\n 'pause/break': 19,\n 'caps lock': 20,\n 'esc': 27,\n 'space': 32,\n 'page up': 33,\n 'page down': 34,\n 'end': 35,\n 'home': 36,\n 'left': 37,\n 'up': 38,\n 'right': 39,\n 'down': 40,\n 'insert': 45,\n 'delete': 46,\n 'command': 91,\n 'left command': 91,\n 'right command': 93,\n 'numpad *': 106,\n 'numpad +': 107,\n 'numpad -': 109,\n 'numpad .': 110,\n 'numpad /': 111,\n 'num lock': 144,\n 'scroll lock': 145,\n 'my computer': 182,\n 'my calculator': 183,\n ';': 186,\n '=': 187,\n ',': 188,\n '-': 189,\n '.': 190,\n '/': 191,\n '`': 192,\n '[': 219,\n '\\\\': 220,\n ']': 221,\n \"'\": 222 // Helper aliases\n\n};\nvar aliases = exports.aliases = {\n 'windows': 91,\n '⇧': 16,\n '⌥': 18,\n '⌃': 17,\n '⌘': 91,\n 'ctl': 17,\n 'control': 17,\n 'option': 18,\n 'pause': 19,\n 'break': 19,\n 'caps': 20,\n 'return': 13,\n 'escape': 27,\n 'spc': 32,\n 'spacebar': 32,\n 'pgup': 33,\n 'pgdn': 34,\n 'ins': 45,\n 'del': 46,\n 'cmd': 91\n /*!\n * Programatically add the following\n */\n // lower case chars\n\n};\n\nfor (i = 97; i < 123; i++) {\n codes[String.fromCharCode(i)] = i - 32;\n} // numbers\n\n\nfor (var i = 48; i < 58; i++) {\n codes[i - 48] = i;\n} // function keys\n\n\nfor (i = 1; i < 13; i++) {\n codes['f' + i] = i + 111;\n} // numpad keys\n\n\nfor (i = 0; i < 10; i++) {\n codes['numpad ' + i] = i + 96;\n}\n/**\n * Get by code\n *\n * exports.name[13] // => 'Enter'\n */\n\n\nvar names = exports.names = exports.title = {}; // title for backward compat\n// Create reverse mapping\n\nfor (i in codes) {\n names[codes[i]] = i;\n} // Add aliases\n\n\nfor (var alias in aliases) {\n codes[alias] = aliases[alias];\n}","\"use strict\";\n\nvar window = require(\"global/window\");\n\nvar isFunction = require(\"is-function\");\n\nvar parseHeaders = require(\"parse-headers\");\n\nvar xtend = require(\"xtend\");\n\nmodule.exports = createXHR;\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop;\ncreateXHR.XDomainRequest = \"withCredentials\" in new createXHR.XMLHttpRequest() ? createXHR.XMLHttpRequest : window.XDomainRequest;\nforEachArray([\"get\", \"put\", \"post\", \"patch\", \"head\", \"delete\"], function (method) {\n createXHR[method === \"delete\" ? \"del\" : method] = function (uri, options, callback) {\n options = initParams(uri, options, callback);\n options.method = method.toUpperCase();\n return _createXHR(options);\n };\n});\n\nfunction forEachArray(array, iterator) {\n for (var i = 0; i < array.length; i++) {\n iterator(array[i]);\n }\n}\n\nfunction isEmpty(obj) {\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) return false;\n }\n\n return true;\n}\n\nfunction initParams(uri, options, callback) {\n var params = uri;\n\n if (isFunction(options)) {\n callback = options;\n\n if (typeof uri === \"string\") {\n params = {\n uri: uri\n };\n }\n } else {\n params = xtend(options, {\n uri: uri\n });\n }\n\n params.callback = callback;\n return params;\n}\n\nfunction createXHR(uri, options, callback) {\n options = initParams(uri, options, callback);\n return _createXHR(options);\n}\n\nfunction _createXHR(options) {\n if (typeof options.callback === \"undefined\") {\n throw new Error(\"callback argument missing\");\n }\n\n var called = false;\n\n var callback = function cbOnce(err, response, body) {\n if (!called) {\n called = true;\n options.callback(err, response, body);\n }\n };\n\n function readystatechange() {\n if (xhr.readyState === 4) {\n setTimeout(loadFunc, 0);\n }\n }\n\n function getBody() {\n // Chrome with requestType=blob throws errors arround when even testing access to responseText\n var body = undefined;\n\n if (xhr.response) {\n body = xhr.response;\n } else {\n body = xhr.responseText || getXml(xhr);\n }\n\n if (isJson) {\n try {\n body = JSON.parse(body);\n } catch (e) {}\n }\n\n return body;\n }\n\n function errorFunc(evt) {\n clearTimeout(timeoutTimer);\n\n if (!(evt instanceof Error)) {\n evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\"));\n }\n\n evt.statusCode = 0;\n return callback(evt, failureResponse);\n } // will load the data & process the response in a special response object\n\n\n function loadFunc() {\n if (aborted) return;\n var status;\n clearTimeout(timeoutTimer);\n\n if (options.useXDR && xhr.status === undefined) {\n //IE8 CORS GET successful response doesn't have a status field, but body is fine\n status = 200;\n } else {\n status = xhr.status === 1223 ? 204 : xhr.status;\n }\n\n var response = failureResponse;\n var err = null;\n\n if (status !== 0) {\n response = {\n body: getBody(),\n statusCode: status,\n method: method,\n headers: {},\n url: uri,\n rawRequest: xhr\n };\n\n if (xhr.getAllResponseHeaders) {\n //remember xhr can in fact be XDR for CORS in IE\n response.headers = parseHeaders(xhr.getAllResponseHeaders());\n }\n } else {\n err = new Error(\"Internal XMLHttpRequest Error\");\n }\n\n return callback(err, response, response.body);\n }\n\n var xhr = options.xhr || null;\n\n if (!xhr) {\n if (options.cors || options.useXDR) {\n xhr = new createXHR.XDomainRequest();\n } else {\n xhr = new createXHR.XMLHttpRequest();\n }\n }\n\n var key;\n var aborted;\n var uri = xhr.url = options.uri || options.url;\n var method = xhr.method = options.method || \"GET\";\n var body = options.body || options.data;\n var headers = xhr.headers = options.headers || {};\n var sync = !!options.sync;\n var isJson = false;\n var timeoutTimer;\n var failureResponse = {\n body: undefined,\n headers: {},\n statusCode: 0,\n method: method,\n url: uri,\n rawRequest: xhr\n };\n\n if (\"json\" in options && options.json !== false) {\n isJson = true;\n headers[\"accept\"] || headers[\"Accept\"] || (headers[\"Accept\"] = \"application/json\"); //Don't override existing accept header declared by user\n\n if (method !== \"GET\" && method !== \"HEAD\") {\n headers[\"content-type\"] || headers[\"Content-Type\"] || (headers[\"Content-Type\"] = \"application/json\"); //Don't override existing accept header declared by user\n\n body = JSON.stringify(options.json === true ? body : options.json);\n }\n }\n\n xhr.onreadystatechange = readystatechange;\n xhr.onload = loadFunc;\n xhr.onerror = errorFunc; // IE9 must have onprogress be set to a unique function.\n\n xhr.onprogress = function () {// IE must die\n };\n\n xhr.onabort = function () {\n aborted = true;\n };\n\n xhr.ontimeout = errorFunc;\n xhr.open(method, uri, !sync, options.username, options.password); //has to be after open\n\n if (!sync) {\n xhr.withCredentials = !!options.withCredentials;\n } // Cannot set timeout with sync request\n // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\n // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\n\n\n if (!sync && options.timeout > 0) {\n timeoutTimer = setTimeout(function () {\n if (aborted) return;\n aborted = true; //IE9 may still call readystatechange\n\n xhr.abort(\"timeout\");\n var e = new Error(\"XMLHttpRequest timeout\");\n e.code = \"ETIMEDOUT\";\n errorFunc(e);\n }, options.timeout);\n }\n\n if (xhr.setRequestHeader) {\n for (key in headers) {\n if (headers.hasOwnProperty(key)) {\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n } else if (options.headers && !isEmpty(options.headers)) {\n throw new Error(\"Headers cannot be set on an XDomainRequest object\");\n }\n\n if (\"responseType\" in options) {\n xhr.responseType = options.responseType;\n }\n\n if (\"beforeSend\" in options && typeof options.beforeSend === \"function\") {\n options.beforeSend(xhr);\n } // Microsoft Edge browser sends \"undefined\" when send is called with undefined value.\n // XMLHttpRequest spec says to pass null as body to indicate no body\n // See https://github.com/naugtur/xhr/issues/100.\n\n\n xhr.send(body || null);\n return xhr;\n}\n\nfunction getXml(xhr) {\n if (xhr.responseType === \"document\") {\n return xhr.responseXML;\n }\n\n var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === \"parsererror\";\n\n if (xhr.responseType === \"\" && !firefoxBugTakenEffect) {\n return xhr.responseXML;\n }\n\n return null;\n}\n\nfunction noop() {}","module.exports = isFunction;\nvar toString = Object.prototype.toString;\n\nfunction isFunction(fn) {\n var string = toString.call(fn);\n return string === '[object Function]' || typeof fn === 'function' && string !== '[object RegExp]' || typeof window !== 'undefined' && ( // IE8 and below\n fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt);\n}\n\n;","var trim = require('string.prototype.trim'),\n forEach = require('for-each'),\n isArray = function isArray(arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n};\n\nmodule.exports = function (headers) {\n if (!headers) return {};\n var result = {};\n forEach(trim(headers).split('\\n'), function (row) {\n var index = row.indexOf(':'),\n key = trim(row.slice(0, index)).toLowerCase(),\n value = trim(row.slice(index + 1));\n\n if (typeof result[key] === 'undefined') {\n result[key] = value;\n } else if (isArray(result[key])) {\n result[key].push(value);\n } else {\n result[key] = [result[key], value];\n }\n });\n return result;\n};","'use strict';\n\nvar bind = require('function-bind');\n\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\n\nvar getPolyfill = require('./polyfill');\n\nvar shim = require('./shim');\n\nvar boundTrim = bind.call(Function.call, getPolyfill());\ndefine(boundTrim, {\n getPolyfill: getPolyfill,\n implementation: implementation,\n shim: shim\n});\nmodule.exports = boundTrim;","'use strict';\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n\n var args = slice.call(arguments, 1);\n var bound;\n\n var binder = function binder() {\n if (this instanceof bound) {\n var result = target.apply(this, args.concat(slice.call(arguments)));\n\n if (Object(result) === result) {\n return result;\n }\n\n return this;\n } else {\n return target.apply(that, args.concat(slice.call(arguments)));\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};","'use strict';\n\nvar slice = Array.prototype.slice;\n\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) {\n return origKeys(o);\n} : require('./implementation');\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n if (Object.keys) {\n var keysWorksWithArguments = function () {\n // Safari 5.0 bug\n var args = Object.keys(arguments);\n return args && args.length === arguments.length;\n }(1, 2);\n\n if (!keysWorksWithArguments) {\n Object.keys = function keys(object) {\n // eslint-disable-line func-name-matching\n if (isArgs(object)) {\n return originalKeys(slice.call(object));\n }\n\n return originalKeys(object);\n };\n }\n } else {\n Object.keys = keysShim;\n }\n\n return Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;","'use strict';\n\nvar keysShim;\n\nif (!Object.keys) {\n // modified from https://github.com/es-shims/es5-shim\n var has = Object.prototype.hasOwnProperty;\n var toStr = Object.prototype.toString;\n\n var isArgs = require('./isArguments'); // eslint-disable-line global-require\n\n\n var isEnumerable = Object.prototype.propertyIsEnumerable;\n var hasDontEnumBug = !isEnumerable.call({\n toString: null\n }, 'toString');\n var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n var dontEnums = ['toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor'];\n\n var equalsConstructorPrototype = function equalsConstructorPrototype(o) {\n var ctor = o.constructor;\n return ctor && ctor.prototype === o;\n };\n\n var excludedKeys = {\n $applicationCache: true,\n $console: true,\n $external: true,\n $frame: true,\n $frameElement: true,\n $frames: true,\n $innerHeight: true,\n $innerWidth: true,\n $onmozfullscreenchange: true,\n $onmozfullscreenerror: true,\n $outerHeight: true,\n $outerWidth: true,\n $pageXOffset: true,\n $pageYOffset: true,\n $parent: true,\n $scrollLeft: true,\n $scrollTop: true,\n $scrollX: true,\n $scrollY: true,\n $self: true,\n $webkitIndexedDB: true,\n $webkitStorageInfo: true,\n $window: true\n };\n\n var hasAutomationEqualityBug = function () {\n /* global window */\n if (typeof window === 'undefined') {\n return false;\n }\n\n for (var k in window) {\n try {\n if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n try {\n equalsConstructorPrototype(window[k]);\n } catch (e) {\n return true;\n }\n }\n } catch (e) {\n return true;\n }\n }\n\n return false;\n }();\n\n var equalsConstructorPrototypeIfNotBuggy = function equalsConstructorPrototypeIfNotBuggy(o) {\n /* global window */\n if (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n return equalsConstructorPrototype(o);\n }\n\n try {\n return equalsConstructorPrototype(o);\n } catch (e) {\n return false;\n }\n };\n\n keysShim = function keys(object) {\n var isObject = object !== null && typeof object === 'object';\n var isFunction = toStr.call(object) === '[object Function]';\n var isArguments = isArgs(object);\n var isString = isObject && toStr.call(object) === '[object String]';\n var theKeys = [];\n\n if (!isObject && !isFunction && !isArguments) {\n throw new TypeError('Object.keys called on a non-object');\n }\n\n var skipProto = hasProtoEnumBug && isFunction;\n\n if (isString && object.length > 0 && !has.call(object, 0)) {\n for (var i = 0; i < object.length; ++i) {\n theKeys.push(String(i));\n }\n }\n\n if (isArguments && object.length > 0) {\n for (var j = 0; j < object.length; ++j) {\n theKeys.push(String(j));\n }\n } else {\n for (var name in object) {\n if (!(skipProto && name === 'prototype') && has.call(object, name)) {\n theKeys.push(String(name));\n }\n }\n }\n\n if (hasDontEnumBug) {\n var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n for (var k = 0; k < dontEnums.length; ++k) {\n if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n theKeys.push(dontEnums[k]);\n }\n }\n }\n\n return theKeys;\n };\n}\n\nmodule.exports = keysShim;","'use strict';\n\nvar GetIntrinsic = require('./GetIntrinsic');\n\nvar $Object = GetIntrinsic('%Object%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $String = GetIntrinsic('%String%');\n\nvar assertRecord = require('./helpers/assertRecord');\n\nvar $isNaN = require('./helpers/isNaN');\n\nvar $isFinite = require('./helpers/isFinite');\n\nvar sign = require('./helpers/sign');\n\nvar mod = require('./helpers/mod');\n\nvar IsCallable = require('is-callable');\n\nvar toPrimitive = require('es-to-primitive/es5');\n\nvar has = require('has'); // https://es5.github.io/#x9\n\n\nvar ES5 = {\n ToPrimitive: toPrimitive,\n ToBoolean: function ToBoolean(value) {\n return !!value;\n },\n ToNumber: function ToNumber(value) {\n return +value; // eslint-disable-line no-implicit-coercion\n },\n ToInteger: function ToInteger(value) {\n var number = this.ToNumber(value);\n\n if ($isNaN(number)) {\n return 0;\n }\n\n if (number === 0 || !$isFinite(number)) {\n return number;\n }\n\n return sign(number) * Math.floor(Math.abs(number));\n },\n ToInt32: function ToInt32(x) {\n return this.ToNumber(x) >> 0;\n },\n ToUint32: function ToUint32(x) {\n return this.ToNumber(x) >>> 0;\n },\n ToUint16: function ToUint16(value) {\n var number = this.ToNumber(value);\n\n if ($isNaN(number) || number === 0 || !$isFinite(number)) {\n return 0;\n }\n\n var posInt = sign(number) * Math.floor(Math.abs(number));\n return mod(posInt, 0x10000);\n },\n ToString: function ToString(value) {\n return $String(value);\n },\n ToObject: function ToObject(value) {\n this.CheckObjectCoercible(value);\n return $Object(value);\n },\n CheckObjectCoercible: function CheckObjectCoercible(value, optMessage) {\n /* jshint eqnull:true */\n if (value == null) {\n throw new $TypeError(optMessage || 'Cannot call method on ' + value);\n }\n\n return value;\n },\n IsCallable: IsCallable,\n SameValue: function SameValue(x, y) {\n if (x === y) {\n // 0 === -0, but they are not identical.\n if (x === 0) {\n return 1 / x === 1 / y;\n }\n\n return true;\n }\n\n return $isNaN(x) && $isNaN(y);\n },\n // https://www.ecma-international.org/ecma-262/5.1/#sec-8\n Type: function Type(x) {\n if (x === null) {\n return 'Null';\n }\n\n if (typeof x === 'undefined') {\n return 'Undefined';\n }\n\n if (typeof x === 'function' || typeof x === 'object') {\n return 'Object';\n }\n\n if (typeof x === 'number') {\n return 'Number';\n }\n\n if (typeof x === 'boolean') {\n return 'Boolean';\n }\n\n if (typeof x === 'string') {\n return 'String';\n }\n },\n // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type\n IsPropertyDescriptor: function IsPropertyDescriptor(Desc) {\n if (this.Type(Desc) !== 'Object') {\n return false;\n }\n\n var allowed = {\n '[[Configurable]]': true,\n '[[Enumerable]]': true,\n '[[Get]]': true,\n '[[Set]]': true,\n '[[Value]]': true,\n '[[Writable]]': true\n };\n\n for (var key in Desc) {\n // eslint-disable-line\n if (has(Desc, key) && !allowed[key]) {\n return false;\n }\n }\n\n var isData = has(Desc, '[[Value]]');\n var IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\n if (isData && IsAccessor) {\n throw new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n }\n\n return true;\n },\n // https://ecma-international.org/ecma-262/5.1/#sec-8.10.1\n IsAccessorDescriptor: function IsAccessorDescriptor(Desc) {\n if (typeof Desc === 'undefined') {\n return false;\n }\n\n assertRecord(this, 'Property Descriptor', 'Desc', Desc);\n\n if (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n return false;\n }\n\n return true;\n },\n // https://ecma-international.org/ecma-262/5.1/#sec-8.10.2\n IsDataDescriptor: function IsDataDescriptor(Desc) {\n if (typeof Desc === 'undefined') {\n return false;\n }\n\n assertRecord(this, 'Property Descriptor', 'Desc', Desc);\n\n if (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n return false;\n }\n\n return true;\n },\n // https://ecma-international.org/ecma-262/5.1/#sec-8.10.3\n IsGenericDescriptor: function IsGenericDescriptor(Desc) {\n if (typeof Desc === 'undefined') {\n return false;\n }\n\n assertRecord(this, 'Property Descriptor', 'Desc', Desc);\n\n if (!this.IsAccessorDescriptor(Desc) && !this.IsDataDescriptor(Desc)) {\n return true;\n }\n\n return false;\n },\n // https://ecma-international.org/ecma-262/5.1/#sec-8.10.4\n FromPropertyDescriptor: function FromPropertyDescriptor(Desc) {\n if (typeof Desc === 'undefined') {\n return Desc;\n }\n\n assertRecord(this, 'Property Descriptor', 'Desc', Desc);\n\n if (this.IsDataDescriptor(Desc)) {\n return {\n value: Desc['[[Value]]'],\n writable: !!Desc['[[Writable]]'],\n enumerable: !!Desc['[[Enumerable]]'],\n configurable: !!Desc['[[Configurable]]']\n };\n } else if (this.IsAccessorDescriptor(Desc)) {\n return {\n get: Desc['[[Get]]'],\n set: Desc['[[Set]]'],\n enumerable: !!Desc['[[Enumerable]]'],\n configurable: !!Desc['[[Configurable]]']\n };\n } else {\n throw new $TypeError('FromPropertyDescriptor must be called with a fully populated Property Descriptor');\n }\n },\n // https://ecma-international.org/ecma-262/5.1/#sec-8.10.5\n ToPropertyDescriptor: function ToPropertyDescriptor(Obj) {\n if (this.Type(Obj) !== 'Object') {\n throw new $TypeError('ToPropertyDescriptor requires an object');\n }\n\n var desc = {};\n\n if (has(Obj, 'enumerable')) {\n desc['[[Enumerable]]'] = this.ToBoolean(Obj.enumerable);\n }\n\n if (has(Obj, 'configurable')) {\n desc['[[Configurable]]'] = this.ToBoolean(Obj.configurable);\n }\n\n if (has(Obj, 'value')) {\n desc['[[Value]]'] = Obj.value;\n }\n\n if (has(Obj, 'writable')) {\n desc['[[Writable]]'] = this.ToBoolean(Obj.writable);\n }\n\n if (has(Obj, 'get')) {\n var getter = Obj.get;\n\n if (typeof getter !== 'undefined' && !this.IsCallable(getter)) {\n throw new TypeError('getter must be a function');\n }\n\n desc['[[Get]]'] = getter;\n }\n\n if (has(Obj, 'set')) {\n var setter = Obj.set;\n\n if (typeof setter !== 'undefined' && !this.IsCallable(setter)) {\n throw new $TypeError('setter must be a function');\n }\n\n desc['[[Set]]'] = setter;\n }\n\n if ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n }\n\n return desc;\n }\n};\nmodule.exports = ES5;","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\n\nvar predicates = {\n // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type\n 'Property Descriptor': function isPropertyDescriptor(ES, Desc) {\n if (ES.Type(Desc) !== 'Object') {\n return false;\n }\n\n var allowed = {\n '[[Configurable]]': true,\n '[[Enumerable]]': true,\n '[[Get]]': true,\n '[[Set]]': true,\n '[[Value]]': true,\n '[[Writable]]': true\n };\n\n for (var key in Desc) {\n // eslint-disable-line\n if (has(Desc, key) && !allowed[key]) {\n return false;\n }\n }\n\n var isData = has(Desc, '[[Value]]');\n var IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\n if (isData && IsAccessor) {\n throw new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n }\n\n return true;\n }\n};\n\nmodule.exports = function assertRecord(ES, recordType, argumentName, value) {\n var predicate = predicates[recordType];\n\n if (typeof predicate !== 'function') {\n throw new $SyntaxError('unknown record type: ' + recordType);\n }\n\n if (!predicate(ES, value)) {\n throw new $TypeError(argumentName + ' must be a ' + recordType);\n }\n\n console.log(predicate(ES, value), value);\n};","module.exports = Number.isNaN || function isNaN(a) {\n return a !== a;\n};","var $isNaN = Number.isNaN || function (a) {\n return a !== a;\n};\n\nmodule.exports = Number.isFinite || function (x) {\n return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity;\n};","module.exports = function sign(number) {\n return number >= 0 ? 1 : -1;\n};","module.exports = function mod(number, modulo) {\n var remain = number % modulo;\n return Math.floor(remain >= 0 ? remain : remain + modulo);\n};","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nvar isPrimitive = require('./helpers/isPrimitive');\n\nvar isCallable = require('is-callable'); // http://ecma-international.org/ecma-262/5.1/#sec-8.12.8\n\n\nvar ES5internalSlots = {\n '[[DefaultValue]]': function DefaultValue(O) {\n var actualHint;\n\n if (arguments.length > 1) {\n actualHint = arguments[1];\n } else {\n actualHint = toStr.call(O) === '[object Date]' ? String : Number;\n }\n\n if (actualHint === String || actualHint === Number) {\n var methods = actualHint === String ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n var value, i;\n\n for (i = 0; i < methods.length; ++i) {\n if (isCallable(O[methods[i]])) {\n value = O[methods[i]]();\n\n if (isPrimitive(value)) {\n return value;\n }\n }\n }\n\n throw new TypeError('No default value');\n }\n\n throw new TypeError('invalid [[DefaultValue]] hint supplied');\n }\n}; // http://ecma-international.org/ecma-262/5.1/#sec-9.1\n\nmodule.exports = function ToPrimitive(input) {\n if (isPrimitive(input)) {\n return input;\n }\n\n if (arguments.length > 1) {\n return ES5internalSlots['[[DefaultValue]]'](input, arguments[1]);\n }\n\n return ES5internalSlots['[[DefaultValue]]'](input);\n};","module.exports = function isPrimitive(value) {\n return value === null || typeof value !== 'function' && typeof value !== 'object';\n};","'use strict';\n\nvar define = require('define-properties');\n\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n var polyfill = getPolyfill();\n define(String.prototype, {\n trim: polyfill\n }, {\n trim: function testTrim() {\n return String.prototype.trim !== polyfill;\n }\n });\n return polyfill;\n};","'use strict';\n\nvar isCallable = require('is-callable');\n\nvar toStr = Object.prototype.toString;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar forEachArray = function forEachArray(array, iterator, receiver) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n if (receiver == null) {\n iterator(array[i], i, array);\n } else {\n iterator.call(receiver, array[i], i, array);\n }\n }\n }\n};\n\nvar forEachString = function forEachString(string, iterator, receiver) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n if (receiver == null) {\n iterator(string.charAt(i), i, string);\n } else {\n iterator.call(receiver, string.charAt(i), i, string);\n }\n }\n};\n\nvar forEachObject = function forEachObject(object, iterator, receiver) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n if (receiver == null) {\n iterator(object[k], k, object);\n } else {\n iterator.call(receiver, object[k], k, object);\n }\n }\n }\n};\n\nvar forEach = function forEach(list, iterator, thisArg) {\n if (!isCallable(iterator)) {\n throw new TypeError('iterator must be a function');\n }\n\n var receiver;\n\n if (arguments.length >= 3) {\n receiver = thisArg;\n }\n\n if (toStr.call(list) === '[object Array]') {\n forEachArray(list, iterator, receiver);\n } else if (typeof list === 'string') {\n forEachString(list, iterator, receiver);\n } else {\n forEachObject(list, iterator, receiver);\n }\n};\n\nmodule.exports = forEach;","module.exports = extend;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {};\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n}","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Default exports for Node. Export the extended versions of VTTCue and\n// VTTRegion in Node since we likely want the capability to convert back and\n// forth between JSON. If we don't then it's not that big of a deal since we're\n// off browser.\nvar window = require('global/window');\n\nvar vttjs = module.exports = {\n WebVTT: require(\"./vtt.js\"),\n VTTCue: require(\"./vttcue.js\"),\n VTTRegion: require(\"./vttregion.js\")\n};\nwindow.vttjs = vttjs;\nwindow.WebVTT = vttjs.WebVTT;\nvar cueShim = vttjs.VTTCue;\nvar regionShim = vttjs.VTTRegion;\nvar nativeVTTCue = window.VTTCue;\nvar nativeVTTRegion = window.VTTRegion;\n\nvttjs.shim = function () {\n window.VTTCue = cueShim;\n window.VTTRegion = regionShim;\n};\n\nvttjs.restore = function () {\n window.VTTCue = nativeVTTCue;\n window.VTTRegion = nativeVTTRegion;\n};\n\nif (!window.VTTCue) {\n vttjs.shim();\n}","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */\n\n/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\nvar _objCreate = Object.create || function () {\n function F() {}\n\n return function (o) {\n if (arguments.length !== 1) {\n throw new Error('Object.create shim only accepts one parameter.');\n }\n\n F.prototype = o;\n return new F();\n };\n}(); // Creates a new ParserError object from an errorData object. The errorData\n// object should have default code and message properties. The default message\n// property can be overriden by passing in a message parameter.\n// See ParsingError.Errors below for acceptable errors.\n\n\nfunction ParsingError(errorData, message) {\n this.name = \"ParsingError\";\n this.code = errorData.code;\n this.message = message || errorData.message;\n}\n\nParsingError.prototype = _objCreate(Error.prototype);\nParsingError.prototype.constructor = ParsingError; // ParsingError metadata for acceptable ParsingErrors.\n\nParsingError.Errors = {\n BadSignature: {\n code: 0,\n message: \"Malformed WebVTT signature.\"\n },\n BadTimeStamp: {\n code: 1,\n message: \"Malformed time stamp.\"\n }\n}; // Try to parse input as a time stamp.\n\nfunction parseTimeStamp(input) {\n function computeSeconds(h, m, s, f) {\n return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000;\n }\n\n var m = input.match(/^(\\d+):(\\d{2})(:\\d{2})?\\.(\\d{3})/);\n\n if (!m) {\n return null;\n }\n\n if (m[3]) {\n // Timestamp takes the form of [hours]:[minutes]:[seconds].[milliseconds]\n return computeSeconds(m[1], m[2], m[3].replace(\":\", \"\"), m[4]);\n } else if (m[1] > 59) {\n // Timestamp takes the form of [hours]:[minutes].[milliseconds]\n // First position is hours as it's over 59.\n return computeSeconds(m[1], m[2], 0, m[4]);\n } else {\n // Timestamp takes the form of [minutes]:[seconds].[milliseconds]\n return computeSeconds(0, m[1], m[2], m[4]);\n }\n} // A settings object holds key/value pairs and will ignore anything but the first\n// assignment to a specific key.\n\n\nfunction Settings() {\n this.values = _objCreate(null);\n}\n\nSettings.prototype = {\n // Only accept the first assignment to any key.\n set: function set(k, v) {\n if (!this.get(k) && v !== \"\") {\n this.values[k] = v;\n }\n },\n // Return the value for a key, or a default value.\n // If 'defaultKey' is passed then 'dflt' is assumed to be an object with\n // a number of possible default values as properties where 'defaultKey' is\n // the key of the property that will be chosen; otherwise it's assumed to be\n // a single value.\n get: function get(k, dflt, defaultKey) {\n if (defaultKey) {\n return this.has(k) ? this.values[k] : dflt[defaultKey];\n }\n\n return this.has(k) ? this.values[k] : dflt;\n },\n // Check whether we have a value for a key.\n has: function has(k) {\n return k in this.values;\n },\n // Accept a setting if its one of the given alternatives.\n alt: function alt(k, v, a) {\n for (var n = 0; n < a.length; ++n) {\n if (v === a[n]) {\n this.set(k, v);\n break;\n }\n }\n },\n // Accept a setting if its a valid (signed) integer.\n integer: function integer(k, v) {\n if (/^-?\\d+$/.test(v)) {\n // integer\n this.set(k, parseInt(v, 10));\n }\n },\n // Accept a setting if its a valid percentage.\n percent: function percent(k, v) {\n var m;\n\n if (m = v.match(/^([\\d]{1,3})(\\.[\\d]*)?%$/)) {\n v = parseFloat(v);\n\n if (v >= 0 && v <= 100) {\n this.set(k, v);\n return true;\n }\n }\n\n return false;\n }\n}; // Helper function to parse input into groups separated by 'groupDelim', and\n// interprete each group as a key/value pair separated by 'keyValueDelim'.\n\nfunction parseOptions(input, callback, keyValueDelim, groupDelim) {\n var groups = groupDelim ? input.split(groupDelim) : [input];\n\n for (var i in groups) {\n if (typeof groups[i] !== \"string\") {\n continue;\n }\n\n var kv = groups[i].split(keyValueDelim);\n\n if (kv.length !== 2) {\n continue;\n }\n\n var k = kv[0];\n var v = kv[1];\n callback(k, v);\n }\n}\n\nfunction parseCue(input, cue, regionList) {\n // Remember the original input if we need to throw an error.\n var oInput = input; // 4.1 WebVTT timestamp\n\n function consumeTimeStamp() {\n var ts = parseTimeStamp(input);\n\n if (ts === null) {\n throw new ParsingError(ParsingError.Errors.BadTimeStamp, \"Malformed timestamp: \" + oInput);\n } // Remove time stamp from input.\n\n\n input = input.replace(/^[^\\sa-zA-Z-]+/, \"\");\n return ts;\n } // 4.4.2 WebVTT cue settings\n\n\n function consumeCueSettings(input, cue) {\n var settings = new Settings();\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"region\":\n // Find the last region we parsed with the same region id.\n for (var i = regionList.length - 1; i >= 0; i--) {\n if (regionList[i].id === v) {\n settings.set(k, regionList[i].region);\n break;\n }\n }\n\n break;\n\n case \"vertical\":\n settings.alt(k, v, [\"rl\", \"lr\"]);\n break;\n\n case \"line\":\n var vals = v.split(\",\"),\n vals0 = vals[0];\n settings.integer(k, vals0);\n settings.percent(k, vals0) ? settings.set(\"snapToLines\", false) : null;\n settings.alt(k, vals0, [\"auto\"]);\n\n if (vals.length === 2) {\n settings.alt(\"lineAlign\", vals[1], [\"start\", \"middle\", \"end\"]);\n }\n\n break;\n\n case \"position\":\n vals = v.split(\",\");\n settings.percent(k, vals[0]);\n\n if (vals.length === 2) {\n settings.alt(\"positionAlign\", vals[1], [\"start\", \"middle\", \"end\"]);\n }\n\n break;\n\n case \"size\":\n settings.percent(k, v);\n break;\n\n case \"align\":\n settings.alt(k, v, [\"start\", \"middle\", \"end\", \"left\", \"right\"]);\n break;\n }\n }, /:/, /\\s/); // Apply default values for any missing fields.\n\n cue.region = settings.get(\"region\", null);\n cue.vertical = settings.get(\"vertical\", \"\");\n cue.line = settings.get(\"line\", \"auto\");\n cue.lineAlign = settings.get(\"lineAlign\", \"start\");\n cue.snapToLines = settings.get(\"snapToLines\", true);\n cue.size = settings.get(\"size\", 100);\n cue.align = settings.get(\"align\", \"middle\");\n cue.position = settings.get(\"position\", {\n start: 0,\n left: 0,\n middle: 50,\n end: 100,\n right: 100\n }, cue.align);\n cue.positionAlign = settings.get(\"positionAlign\", {\n start: \"start\",\n left: \"start\",\n middle: \"middle\",\n end: \"end\",\n right: \"end\"\n }, cue.align);\n }\n\n function skipWhitespace() {\n input = input.replace(/^\\s+/, \"\");\n } // 4.1 WebVTT cue timings.\n\n\n skipWhitespace();\n cue.startTime = consumeTimeStamp(); // (1) collect cue start time\n\n skipWhitespace();\n\n if (input.substr(0, 3) !== \"-->\") {\n // (3) next characters must match \"-->\"\n throw new ParsingError(ParsingError.Errors.BadTimeStamp, \"Malformed time stamp (time stamps must be separated by '-->'): \" + oInput);\n }\n\n input = input.substr(3);\n skipWhitespace();\n cue.endTime = consumeTimeStamp(); // (5) collect cue end time\n // 4.1 WebVTT cue settings list.\n\n skipWhitespace();\n consumeCueSettings(input, cue);\n}\n\nvar ESCAPE = {\n \"&\": \"&\",\n \"<\": \"<\",\n \">\": \">\",\n \"‎\": \"\\u200E\",\n \"‏\": \"\\u200F\",\n \" \": \"\\xA0\"\n};\nvar TAG_NAME = {\n c: \"span\",\n i: \"i\",\n b: \"b\",\n u: \"u\",\n ruby: \"ruby\",\n rt: \"rt\",\n v: \"span\",\n lang: \"span\"\n};\nvar TAG_ANNOTATION = {\n v: \"title\",\n lang: \"lang\"\n};\nvar NEEDS_PARENT = {\n rt: \"ruby\"\n}; // Parse content into a document fragment.\n\nfunction parseContent(window, input) {\n function nextToken() {\n // Check for end-of-string.\n if (!input) {\n return null;\n } // Consume 'n' characters from the input.\n\n\n function consume(result) {\n input = input.substr(result.length);\n return result;\n }\n\n var m = input.match(/^([^<]*)(<[^>]*>?)?/); // If there is some text before the next tag, return it, otherwise return\n // the tag.\n\n return consume(m[1] ? m[1] : m[2]);\n } // Unescape a string 's'.\n\n\n function unescape1(e) {\n return ESCAPE[e];\n }\n\n function unescape(s) {\n while (m = s.match(/&(amp|lt|gt|lrm|rlm|nbsp);/)) {\n s = s.replace(m[0], unescape1);\n }\n\n return s;\n }\n\n function shouldAdd(current, element) {\n return !NEEDS_PARENT[element.localName] || NEEDS_PARENT[element.localName] === current.localName;\n } // Create an element for this tag.\n\n\n function createElement(type, annotation) {\n var tagName = TAG_NAME[type];\n\n if (!tagName) {\n return null;\n }\n\n var element = window.document.createElement(tagName);\n element.localName = tagName;\n var name = TAG_ANNOTATION[type];\n\n if (name && annotation) {\n element[name] = annotation.trim();\n }\n\n return element;\n }\n\n var rootDiv = window.document.createElement(\"div\"),\n current = rootDiv,\n t,\n tagStack = [];\n\n while ((t = nextToken()) !== null) {\n if (t[0] === '<') {\n if (t[1] === \"/\") {\n // If the closing tag matches, move back up to the parent node.\n if (tagStack.length && tagStack[tagStack.length - 1] === t.substr(2).replace(\">\", \"\")) {\n tagStack.pop();\n current = current.parentNode;\n } // Otherwise just ignore the end tag.\n\n\n continue;\n }\n\n var ts = parseTimeStamp(t.substr(1, t.length - 2));\n var node;\n\n if (ts) {\n // Timestamps are lead nodes as well.\n node = window.document.createProcessingInstruction(\"timestamp\", ts);\n current.appendChild(node);\n continue;\n }\n\n var m = t.match(/^<([^.\\s/0-9>]+)(\\.[^\\s\\\\>]+)?([^>\\\\]+)?(\\\\?)>?$/); // If we can't parse the tag, skip to the next tag.\n\n if (!m) {\n continue;\n } // Try to construct an element, and ignore the tag if we couldn't.\n\n\n node = createElement(m[1], m[3]);\n\n if (!node) {\n continue;\n } // Determine if the tag should be added based on the context of where it\n // is placed in the cuetext.\n\n\n if (!shouldAdd(current, node)) {\n continue;\n } // Set the class list (as a list of classes, separated by space).\n\n\n if (m[2]) {\n node.className = m[2].substr(1).replace('.', ' ');\n } // Append the node to the current node, and enter the scope of the new\n // node.\n\n\n tagStack.push(m[1]);\n current.appendChild(node);\n current = node;\n continue;\n } // Text nodes are leaf nodes.\n\n\n current.appendChild(window.document.createTextNode(unescape(t)));\n }\n\n return rootDiv;\n} // This is a list of all the Unicode characters that have a strong\n// right-to-left category. What this means is that these characters are\n// written right-to-left for sure. It was generated by pulling all the strong\n// right-to-left characters out of the Unicode data table. That table can\n// found at: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt\n\n\nvar strongRTLRanges = [[0x5be, 0x5be], [0x5c0, 0x5c0], [0x5c3, 0x5c3], [0x5c6, 0x5c6], [0x5d0, 0x5ea], [0x5f0, 0x5f4], [0x608, 0x608], [0x60b, 0x60b], [0x60d, 0x60d], [0x61b, 0x61b], [0x61e, 0x64a], [0x66d, 0x66f], [0x671, 0x6d5], [0x6e5, 0x6e6], [0x6ee, 0x6ef], [0x6fa, 0x70d], [0x70f, 0x710], [0x712, 0x72f], [0x74d, 0x7a5], [0x7b1, 0x7b1], [0x7c0, 0x7ea], [0x7f4, 0x7f5], [0x7fa, 0x7fa], [0x800, 0x815], [0x81a, 0x81a], [0x824, 0x824], [0x828, 0x828], [0x830, 0x83e], [0x840, 0x858], [0x85e, 0x85e], [0x8a0, 0x8a0], [0x8a2, 0x8ac], [0x200f, 0x200f], [0xfb1d, 0xfb1d], [0xfb1f, 0xfb28], [0xfb2a, 0xfb36], [0xfb38, 0xfb3c], [0xfb3e, 0xfb3e], [0xfb40, 0xfb41], [0xfb43, 0xfb44], [0xfb46, 0xfbc1], [0xfbd3, 0xfd3d], [0xfd50, 0xfd8f], [0xfd92, 0xfdc7], [0xfdf0, 0xfdfc], [0xfe70, 0xfe74], [0xfe76, 0xfefc], [0x10800, 0x10805], [0x10808, 0x10808], [0x1080a, 0x10835], [0x10837, 0x10838], [0x1083c, 0x1083c], [0x1083f, 0x10855], [0x10857, 0x1085f], [0x10900, 0x1091b], [0x10920, 0x10939], [0x1093f, 0x1093f], [0x10980, 0x109b7], [0x109be, 0x109bf], [0x10a00, 0x10a00], [0x10a10, 0x10a13], [0x10a15, 0x10a17], [0x10a19, 0x10a33], [0x10a40, 0x10a47], [0x10a50, 0x10a58], [0x10a60, 0x10a7f], [0x10b00, 0x10b35], [0x10b40, 0x10b55], [0x10b58, 0x10b72], [0x10b78, 0x10b7f], [0x10c00, 0x10c48], [0x1ee00, 0x1ee03], [0x1ee05, 0x1ee1f], [0x1ee21, 0x1ee22], [0x1ee24, 0x1ee24], [0x1ee27, 0x1ee27], [0x1ee29, 0x1ee32], [0x1ee34, 0x1ee37], [0x1ee39, 0x1ee39], [0x1ee3b, 0x1ee3b], [0x1ee42, 0x1ee42], [0x1ee47, 0x1ee47], [0x1ee49, 0x1ee49], [0x1ee4b, 0x1ee4b], [0x1ee4d, 0x1ee4f], [0x1ee51, 0x1ee52], [0x1ee54, 0x1ee54], [0x1ee57, 0x1ee57], [0x1ee59, 0x1ee59], [0x1ee5b, 0x1ee5b], [0x1ee5d, 0x1ee5d], [0x1ee5f, 0x1ee5f], [0x1ee61, 0x1ee62], [0x1ee64, 0x1ee64], [0x1ee67, 0x1ee6a], [0x1ee6c, 0x1ee72], [0x1ee74, 0x1ee77], [0x1ee79, 0x1ee7c], [0x1ee7e, 0x1ee7e], [0x1ee80, 0x1ee89], [0x1ee8b, 0x1ee9b], [0x1eea1, 0x1eea3], [0x1eea5, 0x1eea9], [0x1eeab, 0x1eebb], [0x10fffd, 0x10fffd]];\n\nfunction isStrongRTLChar(charCode) {\n for (var i = 0; i < strongRTLRanges.length; i++) {\n var currentRange = strongRTLRanges[i];\n\n if (charCode >= currentRange[0] && charCode <= currentRange[1]) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction determineBidi(cueDiv) {\n var nodeStack = [],\n text = \"\",\n charCode;\n\n if (!cueDiv || !cueDiv.childNodes) {\n return \"ltr\";\n }\n\n function pushNodes(nodeStack, node) {\n for (var i = node.childNodes.length - 1; i >= 0; i--) {\n nodeStack.push(node.childNodes[i]);\n }\n }\n\n function nextTextNode(nodeStack) {\n if (!nodeStack || !nodeStack.length) {\n return null;\n }\n\n var node = nodeStack.pop(),\n text = node.textContent || node.innerText;\n\n if (text) {\n // TODO: This should match all unicode type B characters (paragraph\n // separator characters). See issue #115.\n var m = text.match(/^.*(\\n|\\r)/);\n\n if (m) {\n nodeStack.length = 0;\n return m[0];\n }\n\n return text;\n }\n\n if (node.tagName === \"ruby\") {\n return nextTextNode(nodeStack);\n }\n\n if (node.childNodes) {\n pushNodes(nodeStack, node);\n return nextTextNode(nodeStack);\n }\n }\n\n pushNodes(nodeStack, cueDiv);\n\n while (text = nextTextNode(nodeStack)) {\n for (var i = 0; i < text.length; i++) {\n charCode = text.charCodeAt(i);\n\n if (isStrongRTLChar(charCode)) {\n return \"rtl\";\n }\n }\n }\n\n return \"ltr\";\n}\n\nfunction computeLinePos(cue) {\n if (typeof cue.line === \"number\" && (cue.snapToLines || cue.line >= 0 && cue.line <= 100)) {\n return cue.line;\n }\n\n if (!cue.track || !cue.track.textTrackList || !cue.track.textTrackList.mediaElement) {\n return -1;\n }\n\n var track = cue.track,\n trackList = track.textTrackList,\n count = 0;\n\n for (var i = 0; i < trackList.length && trackList[i] !== track; i++) {\n if (trackList[i].mode === \"showing\") {\n count++;\n }\n }\n\n return ++count * -1;\n}\n\nfunction StyleBox() {} // Apply styles to a div. If there is no div passed then it defaults to the\n// div on 'this'.\n\n\nStyleBox.prototype.applyStyles = function (styles, div) {\n div = div || this.div;\n\n for (var prop in styles) {\n if (styles.hasOwnProperty(prop)) {\n div.style[prop] = styles[prop];\n }\n }\n};\n\nStyleBox.prototype.formatStyle = function (val, unit) {\n return val === 0 ? 0 : val + unit;\n}; // Constructs the computed display state of the cue (a div). Places the div\n// into the overlay which should be a block level element (usually a div).\n\n\nfunction CueStyleBox(window, cue, styleOptions) {\n StyleBox.call(this);\n this.cue = cue; // Parse our cue's text into a DOM tree rooted at 'cueDiv'. This div will\n // have inline positioning and will function as the cue background box.\n\n this.cueDiv = parseContent(window, cue.text);\n var styles = {\n color: \"rgba(255, 255, 255, 1)\",\n backgroundColor: \"rgba(0, 0, 0, 0.8)\",\n position: \"relative\",\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n display: \"inline\",\n writingMode: cue.vertical === \"\" ? \"horizontal-tb\" : cue.vertical === \"lr\" ? \"vertical-lr\" : \"vertical-rl\",\n unicodeBidi: \"plaintext\"\n };\n this.applyStyles(styles, this.cueDiv); // Create an absolutely positioned div that will be used to position the cue\n // div. Note, all WebVTT cue-setting alignments are equivalent to the CSS\n // mirrors of them except \"middle\" which is \"center\" in CSS.\n\n this.div = window.document.createElement(\"div\");\n styles = {\n direction: determineBidi(this.cueDiv),\n writingMode: cue.vertical === \"\" ? \"horizontal-tb\" : cue.vertical === \"lr\" ? \"vertical-lr\" : \"vertical-rl\",\n unicodeBidi: \"plaintext\",\n textAlign: cue.align === \"middle\" ? \"center\" : cue.align,\n font: styleOptions.font,\n whiteSpace: \"pre-line\",\n position: \"absolute\"\n };\n this.applyStyles(styles);\n this.div.appendChild(this.cueDiv); // Calculate the distance from the reference edge of the viewport to the text\n // position of the cue box. The reference edge will be resolved later when\n // the box orientation styles are applied.\n\n var textPos = 0;\n\n switch (cue.positionAlign) {\n case \"start\":\n textPos = cue.position;\n break;\n\n case \"middle\":\n textPos = cue.position - cue.size / 2;\n break;\n\n case \"end\":\n textPos = cue.position - cue.size;\n break;\n } // Horizontal box orientation; textPos is the distance from the left edge of the\n // area to the left edge of the box and cue.size is the distance extending to\n // the right from there.\n\n\n if (cue.vertical === \"\") {\n this.applyStyles({\n left: this.formatStyle(textPos, \"%\"),\n width: this.formatStyle(cue.size, \"%\")\n }); // Vertical box orientation; textPos is the distance from the top edge of the\n // area to the top edge of the box and cue.size is the height extending\n // downwards from there.\n } else {\n this.applyStyles({\n top: this.formatStyle(textPos, \"%\"),\n height: this.formatStyle(cue.size, \"%\")\n });\n }\n\n this.move = function (box) {\n this.applyStyles({\n top: this.formatStyle(box.top, \"px\"),\n bottom: this.formatStyle(box.bottom, \"px\"),\n left: this.formatStyle(box.left, \"px\"),\n right: this.formatStyle(box.right, \"px\"),\n height: this.formatStyle(box.height, \"px\"),\n width: this.formatStyle(box.width, \"px\")\n });\n };\n}\n\nCueStyleBox.prototype = _objCreate(StyleBox.prototype);\nCueStyleBox.prototype.constructor = CueStyleBox; // Represents the co-ordinates of an Element in a way that we can easily\n// compute things with such as if it overlaps or intersects with another Element.\n// Can initialize it with either a StyleBox or another BoxPosition.\n\nfunction BoxPosition(obj) {\n // Either a BoxPosition was passed in and we need to copy it, or a StyleBox\n // was passed in and we need to copy the results of 'getBoundingClientRect'\n // as the object returned is readonly. All co-ordinate values are in reference\n // to the viewport origin (top left).\n var lh, height, width, top;\n\n if (obj.div) {\n height = obj.div.offsetHeight;\n width = obj.div.offsetWidth;\n top = obj.div.offsetTop;\n var rects = (rects = obj.div.childNodes) && (rects = rects[0]) && rects.getClientRects && rects.getClientRects();\n obj = obj.div.getBoundingClientRect(); // In certain cases the outter div will be slightly larger then the sum of\n // the inner div's lines. This could be due to bold text, etc, on some platforms.\n // In this case we should get the average line height and use that. This will\n // result in the desired behaviour.\n\n lh = rects ? Math.max(rects[0] && rects[0].height || 0, obj.height / rects.length) : 0;\n }\n\n this.left = obj.left;\n this.right = obj.right;\n this.top = obj.top || top;\n this.height = obj.height || height;\n this.bottom = obj.bottom || top + (obj.height || height);\n this.width = obj.width || width;\n this.lineHeight = lh !== undefined ? lh : obj.lineHeight;\n} // Move the box along a particular axis. Optionally pass in an amount to move\n// the box. If no amount is passed then the default is the line height of the\n// box.\n\n\nBoxPosition.prototype.move = function (axis, toMove) {\n toMove = toMove !== undefined ? toMove : this.lineHeight;\n\n switch (axis) {\n case \"+x\":\n this.left += toMove;\n this.right += toMove;\n break;\n\n case \"-x\":\n this.left -= toMove;\n this.right -= toMove;\n break;\n\n case \"+y\":\n this.top += toMove;\n this.bottom += toMove;\n break;\n\n case \"-y\":\n this.top -= toMove;\n this.bottom -= toMove;\n break;\n }\n}; // Check if this box overlaps another box, b2.\n\n\nBoxPosition.prototype.overlaps = function (b2) {\n return this.left < b2.right && this.right > b2.left && this.top < b2.bottom && this.bottom > b2.top;\n}; // Check if this box overlaps any other boxes in boxes.\n\n\nBoxPosition.prototype.overlapsAny = function (boxes) {\n for (var i = 0; i < boxes.length; i++) {\n if (this.overlaps(boxes[i])) {\n return true;\n }\n }\n\n return false;\n}; // Check if this box is within another box.\n\n\nBoxPosition.prototype.within = function (container) {\n return this.top >= container.top && this.bottom <= container.bottom && this.left >= container.left && this.right <= container.right;\n}; // Check if this box is entirely within the container or it is overlapping\n// on the edge opposite of the axis direction passed. For example, if \"+x\" is\n// passed and the box is overlapping on the left edge of the container, then\n// return true.\n\n\nBoxPosition.prototype.overlapsOppositeAxis = function (container, axis) {\n switch (axis) {\n case \"+x\":\n return this.left < container.left;\n\n case \"-x\":\n return this.right > container.right;\n\n case \"+y\":\n return this.top < container.top;\n\n case \"-y\":\n return this.bottom > container.bottom;\n }\n}; // Find the percentage of the area that this box is overlapping with another\n// box.\n\n\nBoxPosition.prototype.intersectPercentage = function (b2) {\n var x = Math.max(0, Math.min(this.right, b2.right) - Math.max(this.left, b2.left)),\n y = Math.max(0, Math.min(this.bottom, b2.bottom) - Math.max(this.top, b2.top)),\n intersectArea = x * y;\n return intersectArea / (this.height * this.width);\n}; // Convert the positions from this box to CSS compatible positions using\n// the reference container's positions. This has to be done because this\n// box's positions are in reference to the viewport origin, whereas, CSS\n// values are in referecne to their respective edges.\n\n\nBoxPosition.prototype.toCSSCompatValues = function (reference) {\n return {\n top: this.top - reference.top,\n bottom: reference.bottom - this.bottom,\n left: this.left - reference.left,\n right: reference.right - this.right,\n height: this.height,\n width: this.width\n };\n}; // Get an object that represents the box's position without anything extra.\n// Can pass a StyleBox, HTMLElement, or another BoxPositon.\n\n\nBoxPosition.getSimpleBoxPosition = function (obj) {\n var height = obj.div ? obj.div.offsetHeight : obj.tagName ? obj.offsetHeight : 0;\n var width = obj.div ? obj.div.offsetWidth : obj.tagName ? obj.offsetWidth : 0;\n var top = obj.div ? obj.div.offsetTop : obj.tagName ? obj.offsetTop : 0;\n obj = obj.div ? obj.div.getBoundingClientRect() : obj.tagName ? obj.getBoundingClientRect() : obj;\n var ret = {\n left: obj.left,\n right: obj.right,\n top: obj.top || top,\n height: obj.height || height,\n bottom: obj.bottom || top + (obj.height || height),\n width: obj.width || width\n };\n return ret;\n}; // Move a StyleBox to its specified, or next best, position. The containerBox\n// is the box that contains the StyleBox, such as a div. boxPositions are\n// a list of other boxes that the styleBox can't overlap with.\n\n\nfunction moveBoxToLinePosition(window, styleBox, containerBox, boxPositions) {\n // Find the best position for a cue box, b, on the video. The axis parameter\n // is a list of axis, the order of which, it will move the box along. For example:\n // Passing [\"+x\", \"-x\"] will move the box first along the x axis in the positive\n // direction. If it doesn't find a good position for it there it will then move\n // it along the x axis in the negative direction.\n function findBestPosition(b, axis) {\n var bestPosition,\n specifiedPosition = new BoxPosition(b),\n percentage = 1; // Highest possible so the first thing we get is better.\n\n for (var i = 0; i < axis.length; i++) {\n while (b.overlapsOppositeAxis(containerBox, axis[i]) || b.within(containerBox) && b.overlapsAny(boxPositions)) {\n b.move(axis[i]);\n } // We found a spot where we aren't overlapping anything. This is our\n // best position.\n\n\n if (b.within(containerBox)) {\n return b;\n }\n\n var p = b.intersectPercentage(containerBox); // If we're outside the container box less then we were on our last try\n // then remember this position as the best position.\n\n if (percentage > p) {\n bestPosition = new BoxPosition(b);\n percentage = p;\n } // Reset the box position to the specified position.\n\n\n b = new BoxPosition(specifiedPosition);\n }\n\n return bestPosition || specifiedPosition;\n }\n\n var boxPosition = new BoxPosition(styleBox),\n cue = styleBox.cue,\n linePos = computeLinePos(cue),\n axis = []; // If we have a line number to align the cue to.\n\n if (cue.snapToLines) {\n var size;\n\n switch (cue.vertical) {\n case \"\":\n axis = [\"+y\", \"-y\"];\n size = \"height\";\n break;\n\n case \"rl\":\n axis = [\"+x\", \"-x\"];\n size = \"width\";\n break;\n\n case \"lr\":\n axis = [\"-x\", \"+x\"];\n size = \"width\";\n break;\n }\n\n var step = boxPosition.lineHeight,\n position = step * Math.round(linePos),\n maxPosition = containerBox[size] + step,\n initialAxis = axis[0]; // If the specified intial position is greater then the max position then\n // clamp the box to the amount of steps it would take for the box to\n // reach the max position.\n\n if (Math.abs(position) > maxPosition) {\n position = position < 0 ? -1 : 1;\n position *= Math.ceil(maxPosition / step) * step;\n } // If computed line position returns negative then line numbers are\n // relative to the bottom of the video instead of the top. Therefore, we\n // need to increase our initial position by the length or width of the\n // video, depending on the writing direction, and reverse our axis directions.\n\n\n if (linePos < 0) {\n position += cue.vertical === \"\" ? containerBox.height : containerBox.width;\n axis = axis.reverse();\n } // Move the box to the specified position. This may not be its best\n // position.\n\n\n boxPosition.move(initialAxis, position);\n } else {\n // If we have a percentage line value for the cue.\n var calculatedPercentage = boxPosition.lineHeight / containerBox.height * 100;\n\n switch (cue.lineAlign) {\n case \"middle\":\n linePos -= calculatedPercentage / 2;\n break;\n\n case \"end\":\n linePos -= calculatedPercentage;\n break;\n } // Apply initial line position to the cue box.\n\n\n switch (cue.vertical) {\n case \"\":\n styleBox.applyStyles({\n top: styleBox.formatStyle(linePos, \"%\")\n });\n break;\n\n case \"rl\":\n styleBox.applyStyles({\n left: styleBox.formatStyle(linePos, \"%\")\n });\n break;\n\n case \"lr\":\n styleBox.applyStyles({\n right: styleBox.formatStyle(linePos, \"%\")\n });\n break;\n }\n\n axis = [\"+y\", \"-x\", \"+x\", \"-y\"]; // Get the box position again after we've applied the specified positioning\n // to it.\n\n boxPosition = new BoxPosition(styleBox);\n }\n\n var bestPosition = findBestPosition(boxPosition, axis);\n styleBox.move(bestPosition.toCSSCompatValues(containerBox));\n}\n\nfunction WebVTT() {} // Nothing\n// Helper to allow strings to be decoded instead of the default binary utf8 data.\n\n\nWebVTT.StringDecoder = function () {\n return {\n decode: function decode(data) {\n if (!data) {\n return \"\";\n }\n\n if (typeof data !== \"string\") {\n throw new Error(\"Error - expected string data.\");\n }\n\n return decodeURIComponent(encodeURIComponent(data));\n }\n };\n};\n\nWebVTT.convertCueToDOMTree = function (window, cuetext) {\n if (!window || !cuetext) {\n return null;\n }\n\n return parseContent(window, cuetext);\n};\n\nvar FONT_SIZE_PERCENT = 0.05;\nvar FONT_STYLE = \"sans-serif\";\nvar CUE_BACKGROUND_PADDING = \"1.5%\"; // Runs the processing model over the cues and regions passed to it.\n// @param overlay A block level element (usually a div) that the computed cues\n// and regions will be placed into.\n\nWebVTT.processCues = function (window, cues, overlay) {\n if (!window || !cues || !overlay) {\n return null;\n } // Remove all previous children.\n\n\n while (overlay.firstChild) {\n overlay.removeChild(overlay.firstChild);\n }\n\n var paddedOverlay = window.document.createElement(\"div\");\n paddedOverlay.style.position = \"absolute\";\n paddedOverlay.style.left = \"0\";\n paddedOverlay.style.right = \"0\";\n paddedOverlay.style.top = \"0\";\n paddedOverlay.style.bottom = \"0\";\n paddedOverlay.style.margin = CUE_BACKGROUND_PADDING;\n overlay.appendChild(paddedOverlay); // Determine if we need to compute the display states of the cues. This could\n // be the case if a cue's state has been changed since the last computation or\n // if it has not been computed yet.\n\n function shouldCompute(cues) {\n for (var i = 0; i < cues.length; i++) {\n if (cues[i].hasBeenReset || !cues[i].displayState) {\n return true;\n }\n }\n\n return false;\n } // We don't need to recompute the cues' display states. Just reuse them.\n\n\n if (!shouldCompute(cues)) {\n for (var i = 0; i < cues.length; i++) {\n paddedOverlay.appendChild(cues[i].displayState);\n }\n\n return;\n }\n\n var boxPositions = [],\n containerBox = BoxPosition.getSimpleBoxPosition(paddedOverlay),\n fontSize = Math.round(containerBox.height * FONT_SIZE_PERCENT * 100) / 100;\n var styleOptions = {\n font: fontSize + \"px \" + FONT_STYLE\n };\n\n (function () {\n var styleBox, cue;\n\n for (var i = 0; i < cues.length; i++) {\n cue = cues[i]; // Compute the intial position and styles of the cue div.\n\n styleBox = new CueStyleBox(window, cue, styleOptions);\n paddedOverlay.appendChild(styleBox.div); // Move the cue div to it's correct line position.\n\n moveBoxToLinePosition(window, styleBox, containerBox, boxPositions); // Remember the computed div so that we don't have to recompute it later\n // if we don't have too.\n\n cue.displayState = styleBox.div;\n boxPositions.push(BoxPosition.getSimpleBoxPosition(styleBox));\n }\n })();\n};\n\nWebVTT.Parser = function (window, vttjs, decoder) {\n if (!decoder) {\n decoder = vttjs;\n vttjs = {};\n }\n\n if (!vttjs) {\n vttjs = {};\n }\n\n this.window = window;\n this.vttjs = vttjs;\n this.state = \"INITIAL\";\n this.buffer = \"\";\n this.decoder = decoder || new TextDecoder(\"utf8\");\n this.regionList = [];\n};\n\nWebVTT.Parser.prototype = {\n // If the error is a ParsingError then report it to the consumer if\n // possible. If it's not a ParsingError then throw it like normal.\n reportOrThrowError: function reportOrThrowError(e) {\n if (e instanceof ParsingError) {\n this.onparsingerror && this.onparsingerror(e);\n } else {\n throw e;\n }\n },\n parse: function parse(data) {\n var self = this; // If there is no data then we won't decode it, but will just try to parse\n // whatever is in buffer already. This may occur in circumstances, for\n // example when flush() is called.\n\n if (data) {\n // Try to decode the data that we received.\n self.buffer += self.decoder.decode(data, {\n stream: true\n });\n }\n\n function collectNextLine() {\n var buffer = self.buffer;\n var pos = 0;\n\n while (pos < buffer.length && buffer[pos] !== '\\r' && buffer[pos] !== '\\n') {\n ++pos;\n }\n\n var line = buffer.substr(0, pos); // Advance the buffer early in case we fail below.\n\n if (buffer[pos] === '\\r') {\n ++pos;\n }\n\n if (buffer[pos] === '\\n') {\n ++pos;\n }\n\n self.buffer = buffer.substr(pos);\n return line;\n } // 3.4 WebVTT region and WebVTT region settings syntax\n\n\n function parseRegion(input) {\n var settings = new Settings();\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"id\":\n settings.set(k, v);\n break;\n\n case \"width\":\n settings.percent(k, v);\n break;\n\n case \"lines\":\n settings.integer(k, v);\n break;\n\n case \"regionanchor\":\n case \"viewportanchor\":\n var xy = v.split(',');\n\n if (xy.length !== 2) {\n break;\n } // We have to make sure both x and y parse, so use a temporary\n // settings object here.\n\n\n var anchor = new Settings();\n anchor.percent(\"x\", xy[0]);\n anchor.percent(\"y\", xy[1]);\n\n if (!anchor.has(\"x\") || !anchor.has(\"y\")) {\n break;\n }\n\n settings.set(k + \"X\", anchor.get(\"x\"));\n settings.set(k + \"Y\", anchor.get(\"y\"));\n break;\n\n case \"scroll\":\n settings.alt(k, v, [\"up\"]);\n break;\n }\n }, /=/, /\\s/); // Create the region, using default values for any values that were not\n // specified.\n\n if (settings.has(\"id\")) {\n var region = new (self.vttjs.VTTRegion || self.window.VTTRegion)();\n region.width = settings.get(\"width\", 100);\n region.lines = settings.get(\"lines\", 3);\n region.regionAnchorX = settings.get(\"regionanchorX\", 0);\n region.regionAnchorY = settings.get(\"regionanchorY\", 100);\n region.viewportAnchorX = settings.get(\"viewportanchorX\", 0);\n region.viewportAnchorY = settings.get(\"viewportanchorY\", 100);\n region.scroll = settings.get(\"scroll\", \"\"); // Register the region.\n\n self.onregion && self.onregion(region); // Remember the VTTRegion for later in case we parse any VTTCues that\n // reference it.\n\n self.regionList.push({\n id: settings.get(\"id\"),\n region: region\n });\n }\n } // draft-pantos-http-live-streaming-20\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-20#section-3.5\n // 3.5 WebVTT\n\n\n function parseTimestampMap(input) {\n var settings = new Settings();\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"MPEGT\":\n settings.integer(k + 'S', v);\n break;\n\n case \"LOCA\":\n settings.set(k + 'L', parseTimeStamp(v));\n break;\n }\n }, /[^\\d]:/, /,/);\n self.ontimestampmap && self.ontimestampmap({\n \"MPEGTS\": settings.get(\"MPEGTS\"),\n \"LOCAL\": settings.get(\"LOCAL\")\n });\n } // 3.2 WebVTT metadata header syntax\n\n\n function parseHeader(input) {\n if (input.match(/X-TIMESTAMP-MAP/)) {\n // This line contains HLS X-TIMESTAMP-MAP metadata\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"X-TIMESTAMP-MAP\":\n parseTimestampMap(v);\n break;\n }\n }, /=/);\n } else {\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"Region\":\n // 3.3 WebVTT region metadata header syntax\n parseRegion(v);\n break;\n }\n }, /:/);\n }\n } // 5.1 WebVTT file parsing.\n\n\n try {\n var line;\n\n if (self.state === \"INITIAL\") {\n // We can't start parsing until we have the first line.\n if (!/\\r\\n|\\n/.test(self.buffer)) {\n return this;\n }\n\n line = collectNextLine();\n var m = line.match(/^WEBVTT([ \\t].*)?$/);\n\n if (!m || !m[0]) {\n throw new ParsingError(ParsingError.Errors.BadSignature);\n }\n\n self.state = \"HEADER\";\n }\n\n var alreadyCollectedLine = false;\n\n while (self.buffer) {\n // We can't parse a line until we have the full line.\n if (!/\\r\\n|\\n/.test(self.buffer)) {\n return this;\n }\n\n if (!alreadyCollectedLine) {\n line = collectNextLine();\n } else {\n alreadyCollectedLine = false;\n }\n\n switch (self.state) {\n case \"HEADER\":\n // 13-18 - Allow a header (metadata) under the WEBVTT line.\n if (/:/.test(line)) {\n parseHeader(line);\n } else if (!line) {\n // An empty line terminates the header and starts the body (cues).\n self.state = \"ID\";\n }\n\n continue;\n\n case \"NOTE\":\n // Ignore NOTE blocks.\n if (!line) {\n self.state = \"ID\";\n }\n\n continue;\n\n case \"ID\":\n // Check for the start of NOTE blocks.\n if (/^NOTE($|[ \\t])/.test(line)) {\n self.state = \"NOTE\";\n break;\n } // 19-29 - Allow any number of line terminators, then initialize new cue values.\n\n\n if (!line) {\n continue;\n }\n\n self.cue = new (self.vttjs.VTTCue || self.window.VTTCue)(0, 0, \"\");\n self.state = \"CUE\"; // 30-39 - Check if self line contains an optional identifier or timing data.\n\n if (line.indexOf(\"-->\") === -1) {\n self.cue.id = line;\n continue;\n }\n\n // Process line as start of a cue.\n\n /*falls through*/\n\n case \"CUE\":\n // 40 - Collect cue timings and settings.\n try {\n parseCue(line, self.cue, self.regionList);\n } catch (e) {\n self.reportOrThrowError(e); // In case of an error ignore rest of the cue.\n\n self.cue = null;\n self.state = \"BADCUE\";\n continue;\n }\n\n self.state = \"CUETEXT\";\n continue;\n\n case \"CUETEXT\":\n var hasSubstring = line.indexOf(\"-->\") !== -1; // 34 - If we have an empty line then report the cue.\n // 35 - If we have the special substring '-->' then report the cue,\n // but do not collect the line as we need to process the current\n // one as a new cue.\n\n if (!line || hasSubstring && (alreadyCollectedLine = true)) {\n // We are done parsing self cue.\n self.oncue && self.oncue(self.cue);\n self.cue = null;\n self.state = \"ID\";\n continue;\n }\n\n if (self.cue.text) {\n self.cue.text += \"\\n\";\n }\n\n self.cue.text += line;\n continue;\n\n case \"BADCUE\":\n // BADCUE\n // 54-62 - Collect and discard the remaining cue.\n if (!line) {\n self.state = \"ID\";\n }\n\n continue;\n }\n }\n } catch (e) {\n self.reportOrThrowError(e); // If we are currently parsing a cue, report what we have.\n\n if (self.state === \"CUETEXT\" && self.cue && self.oncue) {\n self.oncue(self.cue);\n }\n\n self.cue = null; // Enter BADWEBVTT state if header was not parsed correctly otherwise\n // another exception occurred so enter BADCUE state.\n\n self.state = self.state === \"INITIAL\" ? \"BADWEBVTT\" : \"BADCUE\";\n }\n\n return this;\n },\n flush: function flush() {\n var self = this;\n\n try {\n // Finish decoding the stream.\n self.buffer += self.decoder.decode(); // Synthesize the end of the current cue or region.\n\n if (self.cue || self.state === \"HEADER\") {\n self.buffer += \"\\n\\n\";\n self.parse();\n } // If we've flushed, parsed, and we're still on the INITIAL state then\n // that means we don't have enough of the stream to parse the first\n // line.\n\n\n if (self.state === \"INITIAL\") {\n throw new ParsingError(ParsingError.Errors.BadSignature);\n }\n } catch (e) {\n self.reportOrThrowError(e);\n }\n\n self.onflush && self.onflush();\n return this;\n }\n};\nmodule.exports = WebVTT;","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar autoKeyword = \"auto\";\nvar directionSetting = {\n \"\": 1,\n \"lr\": 1,\n \"rl\": 1\n};\nvar alignSetting = {\n \"start\": 1,\n \"middle\": 1,\n \"end\": 1,\n \"left\": 1,\n \"right\": 1\n};\n\nfunction findDirectionSetting(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n\n var dir = directionSetting[value.toLowerCase()];\n return dir ? value.toLowerCase() : false;\n}\n\nfunction findAlignSetting(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n\n var align = alignSetting[value.toLowerCase()];\n return align ? value.toLowerCase() : false;\n}\n\nfunction VTTCue(startTime, endTime, text) {\n /**\n * Shim implementation specific properties. These properties are not in\n * the spec.\n */\n // Lets us know when the VTTCue's data has changed in such a way that we need\n // to recompute its display state. This lets us compute its display state\n // lazily.\n this.hasBeenReset = false;\n /**\n * VTTCue and TextTrackCue properties\n * http://dev.w3.org/html5/webvtt/#vttcue-interface\n */\n\n var _id = \"\";\n var _pauseOnExit = false;\n var _startTime = startTime;\n var _endTime = endTime;\n var _text = text;\n var _region = null;\n var _vertical = \"\";\n var _snapToLines = true;\n var _line = \"auto\";\n var _lineAlign = \"start\";\n var _position = 50;\n var _positionAlign = \"middle\";\n var _size = 50;\n var _align = \"middle\";\n Object.defineProperties(this, {\n \"id\": {\n enumerable: true,\n get: function get() {\n return _id;\n },\n set: function set(value) {\n _id = \"\" + value;\n }\n },\n \"pauseOnExit\": {\n enumerable: true,\n get: function get() {\n return _pauseOnExit;\n },\n set: function set(value) {\n _pauseOnExit = !!value;\n }\n },\n \"startTime\": {\n enumerable: true,\n get: function get() {\n return _startTime;\n },\n set: function set(value) {\n if (typeof value !== \"number\") {\n throw new TypeError(\"Start time must be set to a number.\");\n }\n\n _startTime = value;\n this.hasBeenReset = true;\n }\n },\n \"endTime\": {\n enumerable: true,\n get: function get() {\n return _endTime;\n },\n set: function set(value) {\n if (typeof value !== \"number\") {\n throw new TypeError(\"End time must be set to a number.\");\n }\n\n _endTime = value;\n this.hasBeenReset = true;\n }\n },\n \"text\": {\n enumerable: true,\n get: function get() {\n return _text;\n },\n set: function set(value) {\n _text = \"\" + value;\n this.hasBeenReset = true;\n }\n },\n \"region\": {\n enumerable: true,\n get: function get() {\n return _region;\n },\n set: function set(value) {\n _region = value;\n this.hasBeenReset = true;\n }\n },\n \"vertical\": {\n enumerable: true,\n get: function get() {\n return _vertical;\n },\n set: function set(value) {\n var setting = findDirectionSetting(value); // Have to check for false because the setting an be an empty string.\n\n if (setting === false) {\n throw new SyntaxError(\"An invalid or illegal string was specified.\");\n }\n\n _vertical = setting;\n this.hasBeenReset = true;\n }\n },\n \"snapToLines\": {\n enumerable: true,\n get: function get() {\n return _snapToLines;\n },\n set: function set(value) {\n _snapToLines = !!value;\n this.hasBeenReset = true;\n }\n },\n \"line\": {\n enumerable: true,\n get: function get() {\n return _line;\n },\n set: function set(value) {\n if (typeof value !== \"number\" && value !== autoKeyword) {\n throw new SyntaxError(\"An invalid number or illegal string was specified.\");\n }\n\n _line = value;\n this.hasBeenReset = true;\n }\n },\n \"lineAlign\": {\n enumerable: true,\n get: function get() {\n return _lineAlign;\n },\n set: function set(value) {\n var setting = findAlignSetting(value);\n\n if (!setting) {\n throw new SyntaxError(\"An invalid or illegal string was specified.\");\n }\n\n _lineAlign = setting;\n this.hasBeenReset = true;\n }\n },\n \"position\": {\n enumerable: true,\n get: function get() {\n return _position;\n },\n set: function set(value) {\n if (value < 0 || value > 100) {\n throw new Error(\"Position must be between 0 and 100.\");\n }\n\n _position = value;\n this.hasBeenReset = true;\n }\n },\n \"positionAlign\": {\n enumerable: true,\n get: function get() {\n return _positionAlign;\n },\n set: function set(value) {\n var setting = findAlignSetting(value);\n\n if (!setting) {\n throw new SyntaxError(\"An invalid or illegal string was specified.\");\n }\n\n _positionAlign = setting;\n this.hasBeenReset = true;\n }\n },\n \"size\": {\n enumerable: true,\n get: function get() {\n return _size;\n },\n set: function set(value) {\n if (value < 0 || value > 100) {\n throw new Error(\"Size must be between 0 and 100.\");\n }\n\n _size = value;\n this.hasBeenReset = true;\n }\n },\n \"align\": {\n enumerable: true,\n get: function get() {\n return _align;\n },\n set: function set(value) {\n var setting = findAlignSetting(value);\n\n if (!setting) {\n throw new SyntaxError(\"An invalid or illegal string was specified.\");\n }\n\n _align = setting;\n this.hasBeenReset = true;\n }\n }\n });\n /**\n * Other <track> spec defined properties\n */\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#text-track-cue-display-state\n\n this.displayState = undefined;\n}\n/**\n * VTTCue methods\n */\n\n\nVTTCue.prototype.getCueAsHTML = function () {\n // Assume WebVTT.convertCueToDOMTree is on the global.\n return WebVTT.convertCueToDOMTree(window, this.text);\n};\n\nmodule.exports = VTTCue;","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar scrollSetting = {\n \"\": true,\n \"up\": true\n};\n\nfunction findScrollSetting(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n\n var scroll = scrollSetting[value.toLowerCase()];\n return scroll ? value.toLowerCase() : false;\n}\n\nfunction isValidPercentValue(value) {\n return typeof value === \"number\" && value >= 0 && value <= 100;\n} // VTTRegion shim http://dev.w3.org/html5/webvtt/#vttregion-interface\n\n\nfunction VTTRegion() {\n var _width = 100;\n var _lines = 3;\n var _regionAnchorX = 0;\n var _regionAnchorY = 100;\n var _viewportAnchorX = 0;\n var _viewportAnchorY = 100;\n var _scroll = \"\";\n Object.defineProperties(this, {\n \"width\": {\n enumerable: true,\n get: function get() {\n return _width;\n },\n set: function set(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"Width must be between 0 and 100.\");\n }\n\n _width = value;\n }\n },\n \"lines\": {\n enumerable: true,\n get: function get() {\n return _lines;\n },\n set: function set(value) {\n if (typeof value !== \"number\") {\n throw new TypeError(\"Lines must be set to a number.\");\n }\n\n _lines = value;\n }\n },\n \"regionAnchorY\": {\n enumerable: true,\n get: function get() {\n return _regionAnchorY;\n },\n set: function set(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"RegionAnchorX must be between 0 and 100.\");\n }\n\n _regionAnchorY = value;\n }\n },\n \"regionAnchorX\": {\n enumerable: true,\n get: function get() {\n return _regionAnchorX;\n },\n set: function set(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"RegionAnchorY must be between 0 and 100.\");\n }\n\n _regionAnchorX = value;\n }\n },\n \"viewportAnchorY\": {\n enumerable: true,\n get: function get() {\n return _viewportAnchorY;\n },\n set: function set(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"ViewportAnchorY must be between 0 and 100.\");\n }\n\n _viewportAnchorY = value;\n }\n },\n \"viewportAnchorX\": {\n enumerable: true,\n get: function get() {\n return _viewportAnchorX;\n },\n set: function set(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"ViewportAnchorX must be between 0 and 100.\");\n }\n\n _viewportAnchorX = value;\n }\n },\n \"scroll\": {\n enumerable: true,\n get: function get() {\n return _scroll;\n },\n set: function set(value) {\n var setting = findScrollSetting(value); // Have to check for false as an empty string is a legal value.\n\n if (setting === false) {\n throw new SyntaxError(\"An invalid or illegal string was specified.\");\n }\n\n _scroll = setting;\n }\n }\n });\n}\n\nmodule.exports = VTTRegion;","// see https://tools.ietf.org/html/rfc1808\n\n/* jshint ignore:start */\n(function (root) {\n /* jshint ignore:end */\n var URL_REGEX = /^((?:[a-zA-Z0-9+\\-.]+:)?)(\\/\\/[^\\/?#]*)?((?:[^\\/\\?#]*\\/)*.*?)??(;.*?)?(\\?.*?)?(#.*?)?$/;\n var FIRST_SEGMENT_REGEX = /^([^\\/?#]*)(.*)$/;\n var SLASH_DOT_REGEX = /(?:\\/|^)\\.(?=\\/)/g;\n var SLASH_DOT_DOT_REGEX = /(?:\\/|^)\\.\\.\\/(?!\\.\\.\\/).*?(?=\\/)/g;\n var URLToolkit = {\n // jshint ignore:line\n // If opts.alwaysNormalize is true then the path will always be normalized even when it starts with / or //\n // E.g\n // With opts.alwaysNormalize = false (default, spec compliant)\n // http://a.com/b/cd + /e/f/../g => http://a.com/e/f/../g\n // With opts.alwaysNormalize = true (not spec compliant)\n // http://a.com/b/cd + /e/f/../g => http://a.com/e/g\n buildAbsoluteURL: function buildAbsoluteURL(baseURL, relativeURL, opts) {\n opts = opts || {}; // remove any remaining space and CRLF\n\n baseURL = baseURL.trim();\n relativeURL = relativeURL.trim();\n\n if (!relativeURL) {\n // 2a) If the embedded URL is entirely empty, it inherits the\n // entire base URL (i.e., is set equal to the base URL)\n // and we are done.\n if (!opts.alwaysNormalize) {\n return baseURL;\n }\n\n var basePartsForNormalise = URLToolkit.parseURL(baseURL);\n\n if (!basePartsForNormalise) {\n throw new Error('Error trying to parse base URL.');\n }\n\n basePartsForNormalise.path = URLToolkit.normalizePath(basePartsForNormalise.path);\n return URLToolkit.buildURLFromParts(basePartsForNormalise);\n }\n\n var relativeParts = URLToolkit.parseURL(relativeURL);\n\n if (!relativeParts) {\n throw new Error('Error trying to parse relative URL.');\n }\n\n if (relativeParts.scheme) {\n // 2b) If the embedded URL starts with a scheme name, it is\n // interpreted as an absolute URL and we are done.\n if (!opts.alwaysNormalize) {\n return relativeURL;\n }\n\n relativeParts.path = URLToolkit.normalizePath(relativeParts.path);\n return URLToolkit.buildURLFromParts(relativeParts);\n }\n\n var baseParts = URLToolkit.parseURL(baseURL);\n\n if (!baseParts) {\n throw new Error('Error trying to parse base URL.');\n }\n\n if (!baseParts.netLoc && baseParts.path && baseParts.path[0] !== '/') {\n // If netLoc missing and path doesn't start with '/', assume everthing before the first '/' is the netLoc\n // This causes 'example.com/a' to be handled as '//example.com/a' instead of '/example.com/a'\n var pathParts = FIRST_SEGMENT_REGEX.exec(baseParts.path);\n baseParts.netLoc = pathParts[1];\n baseParts.path = pathParts[2];\n }\n\n if (baseParts.netLoc && !baseParts.path) {\n baseParts.path = '/';\n }\n\n var builtParts = {\n // 2c) Otherwise, the embedded URL inherits the scheme of\n // the base URL.\n scheme: baseParts.scheme,\n netLoc: relativeParts.netLoc,\n path: null,\n params: relativeParts.params,\n query: relativeParts.query,\n fragment: relativeParts.fragment\n };\n\n if (!relativeParts.netLoc) {\n // 3) If the embedded URL's <net_loc> is non-empty, we skip to\n // Step 7. Otherwise, the embedded URL inherits the <net_loc>\n // (if any) of the base URL.\n builtParts.netLoc = baseParts.netLoc; // 4) If the embedded URL path is preceded by a slash \"/\", the\n // path is not relative and we skip to Step 7.\n\n if (relativeParts.path[0] !== '/') {\n if (!relativeParts.path) {\n // 5) If the embedded URL path is empty (and not preceded by a\n // slash), then the embedded URL inherits the base URL path\n builtParts.path = baseParts.path; // 5a) if the embedded URL's <params> is non-empty, we skip to\n // step 7; otherwise, it inherits the <params> of the base\n // URL (if any) and\n\n if (!relativeParts.params) {\n builtParts.params = baseParts.params; // 5b) if the embedded URL's <query> is non-empty, we skip to\n // step 7; otherwise, it inherits the <query> of the base\n // URL (if any) and we skip to step 7.\n\n if (!relativeParts.query) {\n builtParts.query = baseParts.query;\n }\n }\n } else {\n // 6) The last segment of the base URL's path (anything\n // following the rightmost slash \"/\", or the entire path if no\n // slash is present) is removed and the embedded URL's path is\n // appended in its place.\n var baseURLPath = baseParts.path;\n var newPath = baseURLPath.substring(0, baseURLPath.lastIndexOf('/') + 1) + relativeParts.path;\n builtParts.path = URLToolkit.normalizePath(newPath);\n }\n }\n }\n\n if (builtParts.path === null) {\n builtParts.path = opts.alwaysNormalize ? URLToolkit.normalizePath(relativeParts.path) : relativeParts.path;\n }\n\n return URLToolkit.buildURLFromParts(builtParts);\n },\n parseURL: function parseURL(url) {\n var parts = URL_REGEX.exec(url);\n\n if (!parts) {\n return null;\n }\n\n return {\n scheme: parts[1] || '',\n netLoc: parts[2] || '',\n path: parts[3] || '',\n params: parts[4] || '',\n query: parts[5] || '',\n fragment: parts[6] || ''\n };\n },\n normalizePath: function normalizePath(path) {\n // The following operations are\n // then applied, in order, to the new path:\n // 6a) All occurrences of \"./\", where \".\" is a complete path\n // segment, are removed.\n // 6b) If the path ends with \".\" as a complete path segment,\n // that \".\" is removed.\n path = path.split('').reverse().join('').replace(SLASH_DOT_REGEX, ''); // 6c) All occurrences of \"<segment>/../\", where <segment> is a\n // complete path segment not equal to \"..\", are removed.\n // Removal of these path segments is performed iteratively,\n // removing the leftmost matching pattern on each iteration,\n // until no matching pattern remains.\n // 6d) If the path ends with \"<segment>/..\", where <segment> is a\n // complete path segment not equal to \"..\", that\n // \"<segment>/..\" is removed.\n\n while (path.length !== (path = path.replace(SLASH_DOT_DOT_REGEX, '')).length) {} // jshint ignore:line\n\n\n return path.split('').reverse().join('');\n },\n buildURLFromParts: function buildURLFromParts(parts) {\n return parts.scheme + parts.netLoc + parts.path + parts.params + parts.query + parts.fragment;\n }\n };\n /* jshint ignore:start */\n\n if (typeof exports === 'object' && typeof module === 'object') module.exports = URLToolkit;else if (typeof define === 'function' && define.amd) define([], function () {\n return URLToolkit;\n });else if (typeof exports === 'object') exports[\"URLToolkit\"] = URLToolkit;else root[\"URLToolkit\"] = URLToolkit;\n})(this);\n/* jshint ignore:end */","/*! @name mpd-parser @version 0.8.1 @license Apache-2.0 */\nimport window$1 from 'global/window';\nvar version = \"0.8.1\";\n\nvar isObject = function isObject(obj) {\n return !!obj && typeof obj === 'object';\n};\n\nvar merge = function merge() {\n for (var _len = arguments.length, objects = new Array(_len), _key = 0; _key < _len; _key++) {\n objects[_key] = arguments[_key];\n }\n\n return objects.reduce(function (result, source) {\n Object.keys(source).forEach(function (key) {\n if (Array.isArray(result[key]) && Array.isArray(source[key])) {\n result[key] = result[key].concat(source[key]);\n } else if (isObject(result[key]) && isObject(source[key])) {\n result[key] = merge(result[key], source[key]);\n } else {\n result[key] = source[key];\n }\n });\n return result;\n }, {});\n};\n\nvar values = function values(o) {\n return Object.keys(o).map(function (k) {\n return o[k];\n });\n};\n\nvar range = function range(start, end) {\n var result = [];\n\n for (var i = start; i < end; i++) {\n result.push(i);\n }\n\n return result;\n};\n\nvar flatten = function flatten(lists) {\n return lists.reduce(function (x, y) {\n return x.concat(y);\n }, []);\n};\n\nvar from = function from(list) {\n if (!list.length) {\n return [];\n }\n\n var result = [];\n\n for (var i = 0; i < list.length; i++) {\n result.push(list[i]);\n }\n\n return result;\n};\n\nvar findIndexes = function findIndexes(l, key) {\n return l.reduce(function (a, e, i) {\n if (e[key]) {\n a.push(i);\n }\n\n return a;\n }, []);\n};\n\nvar errors = {\n INVALID_NUMBER_OF_PERIOD: 'INVALID_NUMBER_OF_PERIOD',\n DASH_EMPTY_MANIFEST: 'DASH_EMPTY_MANIFEST',\n DASH_INVALID_XML: 'DASH_INVALID_XML',\n NO_BASE_URL: 'NO_BASE_URL',\n MISSING_SEGMENT_INFORMATION: 'MISSING_SEGMENT_INFORMATION',\n SEGMENT_TIME_UNSPECIFIED: 'SEGMENT_TIME_UNSPECIFIED',\n UNSUPPORTED_UTC_TIMING_SCHEME: 'UNSUPPORTED_UTC_TIMING_SCHEME'\n};\nvar commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction createCommonjsModule(fn, module) {\n return module = {\n exports: {}\n }, fn(module, module.exports), module.exports;\n}\n\nvar urlToolkit = createCommonjsModule(function (module, exports) {\n // see https://tools.ietf.org/html/rfc1808\n\n /* jshint ignore:start */\n (function (root) {\n /* jshint ignore:end */\n var URL_REGEX = /^((?:[a-zA-Z0-9+\\-.]+:)?)(\\/\\/[^\\/?#]*)?((?:[^\\/\\?#]*\\/)*.*?)??(;.*?)?(\\?.*?)?(#.*?)?$/;\n var FIRST_SEGMENT_REGEX = /^([^\\/?#]*)(.*)$/;\n var SLASH_DOT_REGEX = /(?:\\/|^)\\.(?=\\/)/g;\n var SLASH_DOT_DOT_REGEX = /(?:\\/|^)\\.\\.\\/(?!\\.\\.\\/).*?(?=\\/)/g;\n var URLToolkit = {\n // jshint ignore:line\n // If opts.alwaysNormalize is true then the path will always be normalized even when it starts with / or //\n // E.g\n // With opts.alwaysNormalize = false (default, spec compliant)\n // http://a.com/b/cd + /e/f/../g => http://a.com/e/f/../g\n // With opts.alwaysNormalize = true (not spec compliant)\n // http://a.com/b/cd + /e/f/../g => http://a.com/e/g\n buildAbsoluteURL: function buildAbsoluteURL(baseURL, relativeURL, opts) {\n opts = opts || {}; // remove any remaining space and CRLF\n\n baseURL = baseURL.trim();\n relativeURL = relativeURL.trim();\n\n if (!relativeURL) {\n // 2a) If the embedded URL is entirely empty, it inherits the\n // entire base URL (i.e., is set equal to the base URL)\n // and we are done.\n if (!opts.alwaysNormalize) {\n return baseURL;\n }\n\n var basePartsForNormalise = URLToolkit.parseURL(baseURL);\n\n if (!basePartsForNormalise) {\n throw new Error('Error trying to parse base URL.');\n }\n\n basePartsForNormalise.path = URLToolkit.normalizePath(basePartsForNormalise.path);\n return URLToolkit.buildURLFromParts(basePartsForNormalise);\n }\n\n var relativeParts = URLToolkit.parseURL(relativeURL);\n\n if (!relativeParts) {\n throw new Error('Error trying to parse relative URL.');\n }\n\n if (relativeParts.scheme) {\n // 2b) If the embedded URL starts with a scheme name, it is\n // interpreted as an absolute URL and we are done.\n if (!opts.alwaysNormalize) {\n return relativeURL;\n }\n\n relativeParts.path = URLToolkit.normalizePath(relativeParts.path);\n return URLToolkit.buildURLFromParts(relativeParts);\n }\n\n var baseParts = URLToolkit.parseURL(baseURL);\n\n if (!baseParts) {\n throw new Error('Error trying to parse base URL.');\n }\n\n if (!baseParts.netLoc && baseParts.path && baseParts.path[0] !== '/') {\n // If netLoc missing and path doesn't start with '/', assume everthing before the first '/' is the netLoc\n // This causes 'example.com/a' to be handled as '//example.com/a' instead of '/example.com/a'\n var pathParts = FIRST_SEGMENT_REGEX.exec(baseParts.path);\n baseParts.netLoc = pathParts[1];\n baseParts.path = pathParts[2];\n }\n\n if (baseParts.netLoc && !baseParts.path) {\n baseParts.path = '/';\n }\n\n var builtParts = {\n // 2c) Otherwise, the embedded URL inherits the scheme of\n // the base URL.\n scheme: baseParts.scheme,\n netLoc: relativeParts.netLoc,\n path: null,\n params: relativeParts.params,\n query: relativeParts.query,\n fragment: relativeParts.fragment\n };\n\n if (!relativeParts.netLoc) {\n // 3) If the embedded URL's <net_loc> is non-empty, we skip to\n // Step 7. Otherwise, the embedded URL inherits the <net_loc>\n // (if any) of the base URL.\n builtParts.netLoc = baseParts.netLoc; // 4) If the embedded URL path is preceded by a slash \"/\", the\n // path is not relative and we skip to Step 7.\n\n if (relativeParts.path[0] !== '/') {\n if (!relativeParts.path) {\n // 5) If the embedded URL path is empty (and not preceded by a\n // slash), then the embedded URL inherits the base URL path\n builtParts.path = baseParts.path; // 5a) if the embedded URL's <params> is non-empty, we skip to\n // step 7; otherwise, it inherits the <params> of the base\n // URL (if any) and\n\n if (!relativeParts.params) {\n builtParts.params = baseParts.params; // 5b) if the embedded URL's <query> is non-empty, we skip to\n // step 7; otherwise, it inherits the <query> of the base\n // URL (if any) and we skip to step 7.\n\n if (!relativeParts.query) {\n builtParts.query = baseParts.query;\n }\n }\n } else {\n // 6) The last segment of the base URL's path (anything\n // following the rightmost slash \"/\", or the entire path if no\n // slash is present) is removed and the embedded URL's path is\n // appended in its place.\n var baseURLPath = baseParts.path;\n var newPath = baseURLPath.substring(0, baseURLPath.lastIndexOf('/') + 1) + relativeParts.path;\n builtParts.path = URLToolkit.normalizePath(newPath);\n }\n }\n }\n\n if (builtParts.path === null) {\n builtParts.path = opts.alwaysNormalize ? URLToolkit.normalizePath(relativeParts.path) : relativeParts.path;\n }\n\n return URLToolkit.buildURLFromParts(builtParts);\n },\n parseURL: function parseURL(url) {\n var parts = URL_REGEX.exec(url);\n\n if (!parts) {\n return null;\n }\n\n return {\n scheme: parts[1] || '',\n netLoc: parts[2] || '',\n path: parts[3] || '',\n params: parts[4] || '',\n query: parts[5] || '',\n fragment: parts[6] || ''\n };\n },\n normalizePath: function normalizePath(path) {\n // The following operations are\n // then applied, in order, to the new path:\n // 6a) All occurrences of \"./\", where \".\" is a complete path\n // segment, are removed.\n // 6b) If the path ends with \".\" as a complete path segment,\n // that \".\" is removed.\n path = path.split('').reverse().join('').replace(SLASH_DOT_REGEX, ''); // 6c) All occurrences of \"<segment>/../\", where <segment> is a\n // complete path segment not equal to \"..\", are removed.\n // Removal of these path segments is performed iteratively,\n // removing the leftmost matching pattern on each iteration,\n // until no matching pattern remains.\n // 6d) If the path ends with \"<segment>/..\", where <segment> is a\n // complete path segment not equal to \"..\", that\n // \"<segment>/..\" is removed.\n\n while (path.length !== (path = path.replace(SLASH_DOT_DOT_REGEX, '')).length) {} // jshint ignore:line\n\n\n return path.split('').reverse().join('');\n },\n buildURLFromParts: function buildURLFromParts(parts) {\n return parts.scheme + parts.netLoc + parts.path + parts.params + parts.query + parts.fragment;\n }\n };\n /* jshint ignore:start */\n\n module.exports = URLToolkit;\n })(commonjsGlobal);\n /* jshint ignore:end */\n\n});\n\nvar resolveUrl = function resolveUrl(baseUrl, relativeUrl) {\n // return early if we don't need to resolve\n if (/^[a-z]+:/i.test(relativeUrl)) {\n return relativeUrl;\n } // if the base URL is relative then combine with the current location\n\n\n if (!/\\/\\//i.test(baseUrl)) {\n baseUrl = urlToolkit.buildAbsoluteURL(window$1.location.href, baseUrl);\n }\n\n return urlToolkit.buildAbsoluteURL(baseUrl, relativeUrl);\n};\n/**\n * @typedef {Object} SingleUri\n * @property {string} uri - relative location of segment\n * @property {string} resolvedUri - resolved location of segment\n * @property {Object} byterange - Object containing information on how to make byte range\n * requests following byte-range-spec per RFC2616.\n * @property {String} byterange.length - length of range request\n * @property {String} byterange.offset - byte offset of range request\n *\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1\n */\n\n/**\n * Converts a URLType node (5.3.9.2.3 Table 13) to a segment object\n * that conforms to how m3u8-parser is structured\n *\n * @see https://github.com/videojs/m3u8-parser\n *\n * @param {string} baseUrl - baseUrl provided by <BaseUrl> nodes\n * @param {string} source - source url for segment\n * @param {string} range - optional range used for range calls,\n * follows RFC 2616, Clause 14.35.1\n * @return {SingleUri} full segment information transformed into a format similar\n * to m3u8-parser\n */\n\n\nvar urlTypeToSegment = function urlTypeToSegment(_ref) {\n var _ref$baseUrl = _ref.baseUrl,\n baseUrl = _ref$baseUrl === void 0 ? '' : _ref$baseUrl,\n _ref$source = _ref.source,\n source = _ref$source === void 0 ? '' : _ref$source,\n _ref$range = _ref.range,\n range = _ref$range === void 0 ? '' : _ref$range,\n _ref$indexRange = _ref.indexRange,\n indexRange = _ref$indexRange === void 0 ? '' : _ref$indexRange;\n var segment = {\n uri: source,\n resolvedUri: resolveUrl(baseUrl || '', source)\n };\n\n if (range || indexRange) {\n var rangeStr = range ? range : indexRange;\n var ranges = rangeStr.split('-');\n var startRange = parseInt(ranges[0], 10);\n var endRange = parseInt(ranges[1], 10); // byterange should be inclusive according to\n // RFC 2616, Clause 14.35.1\n\n segment.byterange = {\n length: endRange - startRange + 1,\n offset: startRange\n };\n }\n\n return segment;\n};\n\nvar byteRangeToString = function byteRangeToString(byterange) {\n // `endRange` is one less than `offset + length` because the HTTP range\n // header uses inclusive ranges\n var endRange = byterange.offset + byterange.length - 1;\n return byterange.offset + \"-\" + endRange;\n};\n/**\n * Functions for calculating the range of available segments in static and dynamic\n * manifests.\n */\n\n\nvar segmentRange = {\n /**\n * Returns the entire range of available segments for a static MPD\n *\n * @param {Object} attributes\n * Inheritied MPD attributes\n * @return {{ start: number, end: number }}\n * The start and end numbers for available segments\n */\n static: function _static(attributes) {\n var duration = attributes.duration,\n _attributes$timescale = attributes.timescale,\n timescale = _attributes$timescale === void 0 ? 1 : _attributes$timescale,\n sourceDuration = attributes.sourceDuration;\n return {\n start: 0,\n end: Math.ceil(sourceDuration / (duration / timescale))\n };\n },\n\n /**\n * Returns the current live window range of available segments for a dynamic MPD\n *\n * @param {Object} attributes\n * Inheritied MPD attributes\n * @return {{ start: number, end: number }}\n * The start and end numbers for available segments\n */\n dynamic: function dynamic(attributes) {\n var NOW = attributes.NOW,\n clientOffset = attributes.clientOffset,\n availabilityStartTime = attributes.availabilityStartTime,\n _attributes$timescale2 = attributes.timescale,\n timescale = _attributes$timescale2 === void 0 ? 1 : _attributes$timescale2,\n duration = attributes.duration,\n _attributes$start = attributes.start,\n start = _attributes$start === void 0 ? 0 : _attributes$start,\n _attributes$minimumUp = attributes.minimumUpdatePeriod,\n minimumUpdatePeriod = _attributes$minimumUp === void 0 ? 0 : _attributes$minimumUp,\n _attributes$timeShift = attributes.timeShiftBufferDepth,\n timeShiftBufferDepth = _attributes$timeShift === void 0 ? Infinity : _attributes$timeShift;\n var now = (NOW + clientOffset) / 1000;\n var periodStartWC = availabilityStartTime + start;\n var periodEndWC = now + minimumUpdatePeriod;\n var periodDuration = periodEndWC - periodStartWC;\n var segmentCount = Math.ceil(periodDuration * timescale / duration);\n var availableStart = Math.floor((now - periodStartWC - timeShiftBufferDepth) * timescale / duration);\n var availableEnd = Math.floor((now - periodStartWC) * timescale / duration);\n return {\n start: Math.max(0, availableStart),\n end: Math.min(segmentCount, availableEnd)\n };\n }\n};\n/**\n * Maps a range of numbers to objects with information needed to build the corresponding\n * segment list\n *\n * @name toSegmentsCallback\n * @function\n * @param {number} number\n * Number of the segment\n * @param {number} index\n * Index of the number in the range list\n * @return {{ number: Number, duration: Number, timeline: Number, time: Number }}\n * Object with segment timing and duration info\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping a range of numbers to\n * information needed to build the segment list.\n *\n * @param {Object} attributes\n * Inherited MPD attributes\n * @return {toSegmentsCallback}\n * Callback map function\n */\n\nvar toSegments = function toSegments(attributes) {\n return function (number, index) {\n var duration = attributes.duration,\n _attributes$timescale3 = attributes.timescale,\n timescale = _attributes$timescale3 === void 0 ? 1 : _attributes$timescale3,\n periodIndex = attributes.periodIndex,\n _attributes$startNumb = attributes.startNumber,\n startNumber = _attributes$startNumb === void 0 ? 1 : _attributes$startNumb;\n return {\n number: startNumber + number,\n duration: duration / timescale,\n timeline: periodIndex,\n time: index * duration\n };\n };\n};\n/**\n * Returns a list of objects containing segment timing and duration info used for\n * building the list of segments. This uses the @duration attribute specified\n * in the MPD manifest to derive the range of segments.\n *\n * @param {Object} attributes\n * Inherited MPD attributes\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n * List of Objects with segment timing and duration info\n */\n\n\nvar parseByDuration = function parseByDuration(attributes) {\n var _attributes$type = attributes.type,\n type = _attributes$type === void 0 ? 'static' : _attributes$type,\n duration = attributes.duration,\n _attributes$timescale4 = attributes.timescale,\n timescale = _attributes$timescale4 === void 0 ? 1 : _attributes$timescale4,\n sourceDuration = attributes.sourceDuration;\n\n var _segmentRange$type = segmentRange[type](attributes),\n start = _segmentRange$type.start,\n end = _segmentRange$type.end;\n\n var segments = range(start, end).map(toSegments(attributes));\n\n if (type === 'static') {\n var index = segments.length - 1; // final segment may be less than full segment duration\n\n segments[index].duration = sourceDuration - duration / timescale * index;\n }\n\n return segments;\n};\n/**\n * Translates SegmentBase into a set of segments.\n * (DASH SPEC Section 5.3.9.3.2) contains a set of <SegmentURL> nodes. Each\n * node should be translated into segment.\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @return {Object.<Array>} list of segments\n */\n\n\nvar segmentsFromBase = function segmentsFromBase(attributes) {\n var baseUrl = attributes.baseUrl,\n _attributes$initializ = attributes.initialization,\n initialization = _attributes$initializ === void 0 ? {} : _attributes$initializ,\n sourceDuration = attributes.sourceDuration,\n _attributes$timescale = attributes.timescale,\n timescale = _attributes$timescale === void 0 ? 1 : _attributes$timescale,\n _attributes$indexRang = attributes.indexRange,\n indexRange = _attributes$indexRang === void 0 ? '' : _attributes$indexRang,\n duration = attributes.duration; // base url is required for SegmentBase to work, per spec (Section 5.3.9.2.1)\n\n if (!baseUrl) {\n throw new Error(errors.NO_BASE_URL);\n }\n\n var initSegment = urlTypeToSegment({\n baseUrl: baseUrl,\n source: initialization.sourceURL,\n range: initialization.range\n });\n var segment = urlTypeToSegment({\n baseUrl: baseUrl,\n source: baseUrl,\n indexRange: indexRange\n });\n segment.map = initSegment; // If there is a duration, use it, otherwise use the given duration of the source\n // (since SegmentBase is only for one total segment)\n\n if (duration) {\n var segmentTimeInfo = parseByDuration(attributes);\n\n if (segmentTimeInfo.length) {\n segment.duration = segmentTimeInfo[0].duration;\n segment.timeline = segmentTimeInfo[0].timeline;\n }\n } else if (sourceDuration) {\n segment.duration = sourceDuration / timescale;\n segment.timeline = 0;\n } // This is used for mediaSequence\n\n\n segment.number = 0;\n return [segment];\n};\n/**\n * Given a playlist, a sidx box, and a baseUrl, update the segment list of the playlist\n * according to the sidx information given.\n *\n * playlist.sidx has metadadata about the sidx where-as the sidx param\n * is the parsed sidx box itself.\n *\n * @param {Object} playlist the playlist to update the sidx information for\n * @param {Object} sidx the parsed sidx box\n * @return {Object} the playlist object with the updated sidx information\n */\n\n\nvar addSegmentsToPlaylist = function addSegmentsToPlaylist(playlist, sidx, baseUrl) {\n // Retain init segment information\n var initSegment = playlist.sidx.map ? playlist.sidx.map : null; // Retain source duration from initial master manifest parsing\n\n var sourceDuration = playlist.sidx.duration; // Retain source timeline\n\n var timeline = playlist.timeline || 0;\n var sidxByteRange = playlist.sidx.byterange;\n var sidxEnd = sidxByteRange.offset + sidxByteRange.length; // Retain timescale of the parsed sidx\n\n var timescale = sidx.timescale; // referenceType 1 refers to other sidx boxes\n\n var mediaReferences = sidx.references.filter(function (r) {\n return r.referenceType !== 1;\n });\n var segments = []; // firstOffset is the offset from the end of the sidx box\n\n var startIndex = sidxEnd + sidx.firstOffset;\n\n for (var i = 0; i < mediaReferences.length; i++) {\n var reference = sidx.references[i]; // size of the referenced (sub)segment\n\n var size = reference.referencedSize; // duration of the referenced (sub)segment, in the timescale\n // this will be converted to seconds when generating segments\n\n var duration = reference.subsegmentDuration; // should be an inclusive range\n\n var endIndex = startIndex + size - 1;\n var indexRange = startIndex + \"-\" + endIndex;\n var attributes = {\n baseUrl: baseUrl,\n timescale: timescale,\n timeline: timeline,\n // this is used in parseByDuration\n periodIndex: timeline,\n duration: duration,\n sourceDuration: sourceDuration,\n indexRange: indexRange\n };\n var segment = segmentsFromBase(attributes)[0];\n\n if (initSegment) {\n segment.map = initSegment;\n }\n\n segments.push(segment);\n startIndex += size;\n }\n\n playlist.segments = segments;\n return playlist;\n};\n\nvar mergeDiscontiguousPlaylists = function mergeDiscontiguousPlaylists(playlists) {\n var mergedPlaylists = values(playlists.reduce(function (acc, playlist) {\n // assuming playlist IDs are the same across periods\n // TODO: handle multiperiod where representation sets are not the same\n // across periods\n var name = playlist.attributes.id + (playlist.attributes.lang || ''); // Periods after first\n\n if (acc[name]) {\n var _acc$name$segments; // first segment of subsequent periods signal a discontinuity\n\n\n if (playlist.segments[0]) {\n playlist.segments[0].discontinuity = true;\n }\n\n (_acc$name$segments = acc[name].segments).push.apply(_acc$name$segments, playlist.segments); // bubble up contentProtection, this assumes all DRM content\n // has the same contentProtection\n\n\n if (playlist.attributes.contentProtection) {\n acc[name].attributes.contentProtection = playlist.attributes.contentProtection;\n }\n } else {\n // first Period\n acc[name] = playlist;\n }\n\n return acc;\n }, {}));\n return mergedPlaylists.map(function (playlist) {\n playlist.discontinuityStarts = findIndexes(playlist.segments, 'discontinuity');\n return playlist;\n });\n};\n\nvar addSegmentInfoFromSidx = function addSegmentInfoFromSidx(playlists, sidxMapping) {\n if (sidxMapping === void 0) {\n sidxMapping = {};\n }\n\n if (!Object.keys(sidxMapping).length) {\n return playlists;\n }\n\n for (var i in playlists) {\n var playlist = playlists[i];\n\n if (!playlist.sidx) {\n continue;\n }\n\n var sidxKey = playlist.sidx.uri + '-' + byteRangeToString(playlist.sidx.byterange);\n var sidxMatch = sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx;\n\n if (playlist.sidx && sidxMatch) {\n addSegmentsToPlaylist(playlist, sidxMatch, playlist.sidx.resolvedUri);\n }\n }\n\n return playlists;\n};\n\nvar formatAudioPlaylist = function formatAudioPlaylist(_ref) {\n var _attributes;\n\n var attributes = _ref.attributes,\n segments = _ref.segments,\n sidx = _ref.sidx;\n var playlist = {\n attributes: (_attributes = {\n NAME: attributes.id,\n BANDWIDTH: attributes.bandwidth,\n CODECS: attributes.codecs\n }, _attributes['PROGRAM-ID'] = 1, _attributes),\n uri: '',\n endList: (attributes.type || 'static') === 'static',\n timeline: attributes.periodIndex,\n resolvedUri: '',\n targetDuration: attributes.duration,\n segments: segments,\n mediaSequence: segments.length ? segments[0].number : 1\n };\n\n if (attributes.contentProtection) {\n playlist.contentProtection = attributes.contentProtection;\n }\n\n if (sidx) {\n playlist.sidx = sidx;\n }\n\n return playlist;\n};\n\nvar formatVttPlaylist = function formatVttPlaylist(_ref2) {\n var _attributes2;\n\n var attributes = _ref2.attributes,\n segments = _ref2.segments;\n\n if (typeof segments === 'undefined') {\n // vtt tracks may use single file in BaseURL\n segments = [{\n uri: attributes.baseUrl,\n timeline: attributes.periodIndex,\n resolvedUri: attributes.baseUrl || '',\n duration: attributes.sourceDuration,\n number: 0\n }]; // targetDuration should be the same duration as the only segment\n\n attributes.duration = attributes.sourceDuration;\n }\n\n return {\n attributes: (_attributes2 = {\n NAME: attributes.id,\n BANDWIDTH: attributes.bandwidth\n }, _attributes2['PROGRAM-ID'] = 1, _attributes2),\n uri: '',\n endList: (attributes.type || 'static') === 'static',\n timeline: attributes.periodIndex,\n resolvedUri: attributes.baseUrl || '',\n targetDuration: attributes.duration,\n segments: segments,\n mediaSequence: segments.length ? segments[0].number : 1\n };\n};\n\nvar organizeAudioPlaylists = function organizeAudioPlaylists(playlists, sidxMapping) {\n if (sidxMapping === void 0) {\n sidxMapping = {};\n }\n\n var mainPlaylist;\n var formattedPlaylists = playlists.reduce(function (a, playlist) {\n var role = playlist.attributes.role && playlist.attributes.role.value || '';\n var language = playlist.attributes.lang || '';\n var label = 'main';\n\n if (language) {\n var roleLabel = role ? \" (\" + role + \")\" : '';\n label = \"\" + playlist.attributes.lang + roleLabel;\n } // skip if we already have the highest quality audio for a language\n\n\n if (a[label] && a[label].playlists[0].attributes.BANDWIDTH > playlist.attributes.bandwidth) {\n return a;\n }\n\n a[label] = {\n language: language,\n autoselect: true,\n default: role === 'main',\n playlists: addSegmentInfoFromSidx([formatAudioPlaylist(playlist)], sidxMapping),\n uri: ''\n };\n\n if (typeof mainPlaylist === 'undefined' && role === 'main') {\n mainPlaylist = playlist;\n mainPlaylist.default = true;\n }\n\n return a;\n }, {}); // if no playlists have role \"main\", mark the first as main\n\n if (!mainPlaylist) {\n var firstLabel = Object.keys(formattedPlaylists)[0];\n formattedPlaylists[firstLabel].default = true;\n }\n\n return formattedPlaylists;\n};\n\nvar organizeVttPlaylists = function organizeVttPlaylists(playlists, sidxMapping) {\n if (sidxMapping === void 0) {\n sidxMapping = {};\n }\n\n return playlists.reduce(function (a, playlist) {\n var label = playlist.attributes.lang || 'text'; // skip if we already have subtitles\n\n if (a[label]) {\n return a;\n }\n\n a[label] = {\n language: label,\n default: false,\n autoselect: false,\n playlists: addSegmentInfoFromSidx([formatVttPlaylist(playlist)], sidxMapping),\n uri: ''\n };\n return a;\n }, {});\n};\n\nvar formatVideoPlaylist = function formatVideoPlaylist(_ref3) {\n var _attributes3;\n\n var attributes = _ref3.attributes,\n segments = _ref3.segments,\n sidx = _ref3.sidx;\n var playlist = {\n attributes: (_attributes3 = {\n NAME: attributes.id,\n AUDIO: 'audio',\n SUBTITLES: 'subs',\n RESOLUTION: {\n width: attributes.width,\n height: attributes.height\n },\n CODECS: attributes.codecs,\n BANDWIDTH: attributes.bandwidth\n }, _attributes3['PROGRAM-ID'] = 1, _attributes3),\n uri: '',\n endList: (attributes.type || 'static') === 'static',\n timeline: attributes.periodIndex,\n resolvedUri: '',\n targetDuration: attributes.duration,\n segments: segments,\n mediaSequence: segments.length ? segments[0].number : 1\n };\n\n if (attributes.contentProtection) {\n playlist.contentProtection = attributes.contentProtection;\n }\n\n if (sidx) {\n playlist.sidx = sidx;\n }\n\n return playlist;\n};\n\nvar toM3u8 = function toM3u8(dashPlaylists, sidxMapping) {\n var _mediaGroups;\n\n if (sidxMapping === void 0) {\n sidxMapping = {};\n }\n\n if (!dashPlaylists.length) {\n return {};\n } // grab all master attributes\n\n\n var _dashPlaylists$0$attr = dashPlaylists[0].attributes,\n duration = _dashPlaylists$0$attr.sourceDuration,\n _dashPlaylists$0$attr2 = _dashPlaylists$0$attr.minimumUpdatePeriod,\n minimumUpdatePeriod = _dashPlaylists$0$attr2 === void 0 ? 0 : _dashPlaylists$0$attr2;\n\n var videoOnly = function videoOnly(_ref4) {\n var attributes = _ref4.attributes;\n return attributes.mimeType === 'video/mp4' || attributes.contentType === 'video';\n };\n\n var audioOnly = function audioOnly(_ref5) {\n var attributes = _ref5.attributes;\n return attributes.mimeType === 'audio/mp4' || attributes.contentType === 'audio';\n };\n\n var vttOnly = function vttOnly(_ref6) {\n var attributes = _ref6.attributes;\n return attributes.mimeType === 'text/vtt' || attributes.contentType === 'text';\n };\n\n var videoPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(videoOnly)).map(formatVideoPlaylist);\n var audioPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(audioOnly));\n var vttPlaylists = dashPlaylists.filter(vttOnly);\n var master = {\n allowCache: true,\n discontinuityStarts: [],\n segments: [],\n endList: true,\n mediaGroups: (_mediaGroups = {\n AUDIO: {},\n VIDEO: {}\n }, _mediaGroups['CLOSED-CAPTIONS'] = {}, _mediaGroups.SUBTITLES = {}, _mediaGroups),\n uri: '',\n duration: duration,\n playlists: addSegmentInfoFromSidx(videoPlaylists, sidxMapping),\n minimumUpdatePeriod: minimumUpdatePeriod * 1000\n };\n\n if (audioPlaylists.length) {\n master.mediaGroups.AUDIO.audio = organizeAudioPlaylists(audioPlaylists, sidxMapping);\n }\n\n if (vttPlaylists.length) {\n master.mediaGroups.SUBTITLES.subs = organizeVttPlaylists(vttPlaylists, sidxMapping);\n }\n\n return master;\n};\n/**\n * Calculates the R (repetition) value for a live stream (for the final segment\n * in a manifest where the r value is negative 1)\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {number} time\n * current time (typically the total time up until the final segment)\n * @param {number} duration\n * duration property for the given <S />\n *\n * @return {number}\n * R value to reach the end of the given period\n */\n\n\nvar getLiveRValue = function getLiveRValue(attributes, time, duration) {\n var NOW = attributes.NOW,\n clientOffset = attributes.clientOffset,\n availabilityStartTime = attributes.availabilityStartTime,\n _attributes$timescale = attributes.timescale,\n timescale = _attributes$timescale === void 0 ? 1 : _attributes$timescale,\n _attributes$start = attributes.start,\n start = _attributes$start === void 0 ? 0 : _attributes$start,\n _attributes$minimumUp = attributes.minimumUpdatePeriod,\n minimumUpdatePeriod = _attributes$minimumUp === void 0 ? 0 : _attributes$minimumUp;\n var now = (NOW + clientOffset) / 1000;\n var periodStartWC = availabilityStartTime + start;\n var periodEndWC = now + minimumUpdatePeriod;\n var periodDuration = periodEndWC - periodStartWC;\n return Math.ceil((periodDuration * timescale - time) / duration);\n};\n/**\n * Uses information provided by SegmentTemplate.SegmentTimeline to determine segment\n * timing and duration\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n *\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n * List of Objects with segment timing and duration info\n */\n\n\nvar parseByTimeline = function parseByTimeline(attributes, segmentTimeline) {\n var _attributes$type = attributes.type,\n type = _attributes$type === void 0 ? 'static' : _attributes$type,\n _attributes$minimumUp2 = attributes.minimumUpdatePeriod,\n minimumUpdatePeriod = _attributes$minimumUp2 === void 0 ? 0 : _attributes$minimumUp2,\n _attributes$media = attributes.media,\n media = _attributes$media === void 0 ? '' : _attributes$media,\n sourceDuration = attributes.sourceDuration,\n _attributes$timescale2 = attributes.timescale,\n timescale = _attributes$timescale2 === void 0 ? 1 : _attributes$timescale2,\n _attributes$startNumb = attributes.startNumber,\n startNumber = _attributes$startNumb === void 0 ? 1 : _attributes$startNumb,\n timeline = attributes.periodIndex;\n var segments = [];\n var time = -1;\n\n for (var sIndex = 0; sIndex < segmentTimeline.length; sIndex++) {\n var S = segmentTimeline[sIndex];\n var duration = S.d;\n var repeat = S.r || 0;\n var segmentTime = S.t || 0;\n\n if (time < 0) {\n // first segment\n time = segmentTime;\n }\n\n if (segmentTime && segmentTime > time) {\n // discontinuity\n // TODO: How to handle this type of discontinuity\n // timeline++ here would treat it like HLS discontuity and content would\n // get appended without gap\n // E.G.\n // <S t=\"0\" d=\"1\" />\n // <S d=\"1\" />\n // <S d=\"1\" />\n // <S t=\"5\" d=\"1\" />\n // would have $Time$ values of [0, 1, 2, 5]\n // should this be appened at time positions [0, 1, 2, 3],(#EXT-X-DISCONTINUITY)\n // or [0, 1, 2, gap, gap, 5]? (#EXT-X-GAP)\n // does the value of sourceDuration consider this when calculating arbitrary\n // negative @r repeat value?\n // E.G. Same elements as above with this added at the end\n // <S d=\"1\" r=\"-1\" />\n // with a sourceDuration of 10\n // Would the 2 gaps be included in the time duration calculations resulting in\n // 8 segments with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9] or 10 segments\n // with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9, 10, 11] ?\n time = segmentTime;\n }\n\n var count = void 0;\n\n if (repeat < 0) {\n var nextS = sIndex + 1;\n\n if (nextS === segmentTimeline.length) {\n // last segment\n if (type === 'dynamic' && minimumUpdatePeriod > 0 && media.indexOf('$Number$') > 0) {\n count = getLiveRValue(attributes, time, duration);\n } else {\n // TODO: This may be incorrect depending on conclusion of TODO above\n count = (sourceDuration * timescale - time) / duration;\n }\n } else {\n count = (segmentTimeline[nextS].t - time) / duration;\n }\n } else {\n count = repeat + 1;\n }\n\n var end = startNumber + segments.length + count;\n var number = startNumber + segments.length;\n\n while (number < end) {\n segments.push({\n number: number,\n duration: duration / timescale,\n time: time,\n timeline: timeline\n });\n time += duration;\n number++;\n }\n }\n\n return segments;\n};\n\nvar identifierPattern = /\\$([A-z]*)(?:(%0)([0-9]+)d)?\\$/g;\n/**\n * Replaces template identifiers with corresponding values. To be used as the callback\n * for String.prototype.replace\n *\n * @name replaceCallback\n * @function\n * @param {string} match\n * Entire match of identifier\n * @param {string} identifier\n * Name of matched identifier\n * @param {string} format\n * Format tag string. Its presence indicates that padding is expected\n * @param {string} width\n * Desired length of the replaced value. Values less than this width shall be left\n * zero padded\n * @return {string}\n * Replacement for the matched identifier\n */\n\n/**\n * Returns a function to be used as a callback for String.prototype.replace to replace\n * template identifiers\n *\n * @param {Obect} values\n * Object containing values that shall be used to replace known identifiers\n * @param {number} values.RepresentationID\n * Value of the Representation@id attribute\n * @param {number} values.Number\n * Number of the corresponding segment\n * @param {number} values.Bandwidth\n * Value of the Representation@bandwidth attribute.\n * @param {number} values.Time\n * Timestamp value of the corresponding segment\n * @return {replaceCallback}\n * Callback to be used with String.prototype.replace to replace identifiers\n */\n\nvar identifierReplacement = function identifierReplacement(values) {\n return function (match, identifier, format, width) {\n if (match === '$$') {\n // escape sequence\n return '$';\n }\n\n if (typeof values[identifier] === 'undefined') {\n return match;\n }\n\n var value = '' + values[identifier];\n\n if (identifier === 'RepresentationID') {\n // Format tag shall not be present with RepresentationID\n return value;\n }\n\n if (!format) {\n width = 1;\n } else {\n width = parseInt(width, 10);\n }\n\n if (value.length >= width) {\n return value;\n }\n\n return \"\" + new Array(width - value.length + 1).join('0') + value;\n };\n};\n/**\n * Constructs a segment url from a template string\n *\n * @param {string} url\n * Template string to construct url from\n * @param {Obect} values\n * Object containing values that shall be used to replace known identifiers\n * @param {number} values.RepresentationID\n * Value of the Representation@id attribute\n * @param {number} values.Number\n * Number of the corresponding segment\n * @param {number} values.Bandwidth\n * Value of the Representation@bandwidth attribute.\n * @param {number} values.Time\n * Timestamp value of the corresponding segment\n * @return {string}\n * Segment url with identifiers replaced\n */\n\n\nvar constructTemplateUrl = function constructTemplateUrl(url, values) {\n return url.replace(identifierPattern, identifierReplacement(values));\n};\n/**\n * Generates a list of objects containing timing and duration information about each\n * segment needed to generate segment uris and the complete segment object\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]|undefined} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n * the SegmentTimeline element\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n * List of Objects with segment timing and duration info\n */\n\n\nvar parseTemplateInfo = function parseTemplateInfo(attributes, segmentTimeline) {\n if (!attributes.duration && !segmentTimeline) {\n // if neither @duration or SegmentTimeline are present, then there shall be exactly\n // one media segment\n return [{\n number: attributes.startNumber || 1,\n duration: attributes.sourceDuration,\n time: 0,\n timeline: attributes.periodIndex\n }];\n }\n\n if (attributes.duration) {\n return parseByDuration(attributes);\n }\n\n return parseByTimeline(attributes, segmentTimeline);\n};\n/**\n * Generates a list of segments using information provided by the SegmentTemplate element\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]|undefined} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n * the SegmentTimeline element\n * @return {Object[]}\n * List of segment objects\n */\n\n\nvar segmentsFromTemplate = function segmentsFromTemplate(attributes, segmentTimeline) {\n var templateValues = {\n RepresentationID: attributes.id,\n Bandwidth: attributes.bandwidth || 0\n };\n var _attributes$initializ = attributes.initialization,\n initialization = _attributes$initializ === void 0 ? {\n sourceURL: '',\n range: ''\n } : _attributes$initializ;\n var mapSegment = urlTypeToSegment({\n baseUrl: attributes.baseUrl,\n source: constructTemplateUrl(initialization.sourceURL, templateValues),\n range: initialization.range\n });\n var segments = parseTemplateInfo(attributes, segmentTimeline);\n return segments.map(function (segment) {\n templateValues.Number = segment.number;\n templateValues.Time = segment.time;\n var uri = constructTemplateUrl(attributes.media || '', templateValues);\n return {\n uri: uri,\n timeline: segment.timeline,\n duration: segment.duration,\n resolvedUri: resolveUrl(attributes.baseUrl || '', uri),\n map: mapSegment,\n number: segment.number\n };\n });\n};\n/**\n * Converts a <SegmentUrl> (of type URLType from the DASH spec 5.3.9.2 Table 14)\n * to an object that matches the output of a segment in videojs/mpd-parser\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object} segmentUrl\n * <SegmentURL> node to translate into a segment object\n * @return {Object} translated segment object\n */\n\n\nvar SegmentURLToSegmentObject = function SegmentURLToSegmentObject(attributes, segmentUrl) {\n var baseUrl = attributes.baseUrl,\n _attributes$initializ = attributes.initialization,\n initialization = _attributes$initializ === void 0 ? {} : _attributes$initializ;\n var initSegment = urlTypeToSegment({\n baseUrl: baseUrl,\n source: initialization.sourceURL,\n range: initialization.range\n });\n var segment = urlTypeToSegment({\n baseUrl: baseUrl,\n source: segmentUrl.media,\n range: segmentUrl.mediaRange\n });\n segment.map = initSegment;\n return segment;\n};\n/**\n * Generates a list of segments using information provided by the SegmentList element\n * SegmentList (DASH SPEC Section 5.3.9.3.2) contains a set of <SegmentURL> nodes. Each\n * node should be translated into segment.\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]|undefined} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n * the SegmentTimeline element\n * @return {Object.<Array>} list of segments\n */\n\n\nvar segmentsFromList = function segmentsFromList(attributes, segmentTimeline) {\n var duration = attributes.duration,\n _attributes$segmentUr = attributes.segmentUrls,\n segmentUrls = _attributes$segmentUr === void 0 ? [] : _attributes$segmentUr; // Per spec (5.3.9.2.1) no way to determine segment duration OR\n // if both SegmentTimeline and @duration are defined, it is outside of spec.\n\n if (!duration && !segmentTimeline || duration && segmentTimeline) {\n throw new Error(errors.SEGMENT_TIME_UNSPECIFIED);\n }\n\n var segmentUrlMap = segmentUrls.map(function (segmentUrlObject) {\n return SegmentURLToSegmentObject(attributes, segmentUrlObject);\n });\n var segmentTimeInfo;\n\n if (duration) {\n segmentTimeInfo = parseByDuration(attributes);\n }\n\n if (segmentTimeline) {\n segmentTimeInfo = parseByTimeline(attributes, segmentTimeline);\n }\n\n var segments = segmentTimeInfo.map(function (segmentTime, index) {\n if (segmentUrlMap[index]) {\n var segment = segmentUrlMap[index];\n segment.timeline = segmentTime.timeline;\n segment.duration = segmentTime.duration;\n segment.number = segmentTime.number;\n return segment;\n } // Since we're mapping we should get rid of any blank segments (in case\n // the given SegmentTimeline is handling for more elements than we have\n // SegmentURLs for).\n\n }).filter(function (segment) {\n return segment;\n });\n return segments;\n};\n\nvar generateSegments = function generateSegments(_ref) {\n var attributes = _ref.attributes,\n segmentInfo = _ref.segmentInfo;\n var segmentAttributes;\n var segmentsFn;\n\n if (segmentInfo.template) {\n segmentsFn = segmentsFromTemplate;\n segmentAttributes = merge(attributes, segmentInfo.template);\n } else if (segmentInfo.base) {\n segmentsFn = segmentsFromBase;\n segmentAttributes = merge(attributes, segmentInfo.base);\n } else if (segmentInfo.list) {\n segmentsFn = segmentsFromList;\n segmentAttributes = merge(attributes, segmentInfo.list);\n }\n\n var segmentsInfo = {\n attributes: attributes\n };\n\n if (!segmentsFn) {\n return segmentsInfo;\n }\n\n var segments = segmentsFn(segmentAttributes, segmentInfo.timeline); // The @duration attribute will be used to determin the playlist's targetDuration which\n // must be in seconds. Since we've generated the segment list, we no longer need\n // @duration to be in @timescale units, so we can convert it here.\n\n if (segmentAttributes.duration) {\n var _segmentAttributes = segmentAttributes,\n duration = _segmentAttributes.duration,\n _segmentAttributes$ti = _segmentAttributes.timescale,\n timescale = _segmentAttributes$ti === void 0 ? 1 : _segmentAttributes$ti;\n segmentAttributes.duration = duration / timescale;\n } else if (segments.length) {\n // if there is no @duration attribute, use the largest segment duration as\n // as target duration\n segmentAttributes.duration = segments.reduce(function (max, segment) {\n return Math.max(max, Math.ceil(segment.duration));\n }, 0);\n } else {\n segmentAttributes.duration = 0;\n }\n\n segmentsInfo.attributes = segmentAttributes;\n segmentsInfo.segments = segments; // This is a sidx box without actual segment information\n\n if (segmentInfo.base && segmentAttributes.indexRange) {\n segmentsInfo.sidx = segments[0];\n segmentsInfo.segments = [];\n }\n\n return segmentsInfo;\n};\n\nvar toPlaylists = function toPlaylists(representations) {\n return representations.map(generateSegments);\n};\n\nvar findChildren = function findChildren(element, name) {\n return from(element.childNodes).filter(function (_ref) {\n var tagName = _ref.tagName;\n return tagName === name;\n });\n};\n\nvar getContent = function getContent(element) {\n return element.textContent.trim();\n};\n\nvar parseDuration = function parseDuration(str) {\n var SECONDS_IN_YEAR = 365 * 24 * 60 * 60;\n var SECONDS_IN_MONTH = 30 * 24 * 60 * 60;\n var SECONDS_IN_DAY = 24 * 60 * 60;\n var SECONDS_IN_HOUR = 60 * 60;\n var SECONDS_IN_MIN = 60; // P10Y10M10DT10H10M10.1S\n\n var durationRegex = /P(?:(\\d*)Y)?(?:(\\d*)M)?(?:(\\d*)D)?(?:T(?:(\\d*)H)?(?:(\\d*)M)?(?:([\\d.]*)S)?)?/;\n var match = durationRegex.exec(str);\n\n if (!match) {\n return 0;\n }\n\n var _match$slice = match.slice(1),\n year = _match$slice[0],\n month = _match$slice[1],\n day = _match$slice[2],\n hour = _match$slice[3],\n minute = _match$slice[4],\n second = _match$slice[5];\n\n return parseFloat(year || 0) * SECONDS_IN_YEAR + parseFloat(month || 0) * SECONDS_IN_MONTH + parseFloat(day || 0) * SECONDS_IN_DAY + parseFloat(hour || 0) * SECONDS_IN_HOUR + parseFloat(minute || 0) * SECONDS_IN_MIN + parseFloat(second || 0);\n};\n\nvar parseDate = function parseDate(str) {\n // Date format without timezone according to ISO 8601\n // YYY-MM-DDThh:mm:ss.ssssss\n var dateRegex = /^\\d+-\\d+-\\d+T\\d+:\\d+:\\d+(\\.\\d+)?$/; // If the date string does not specifiy a timezone, we must specifiy UTC. This is\n // expressed by ending with 'Z'\n\n if (dateRegex.test(str)) {\n str += 'Z';\n }\n\n return Date.parse(str);\n};\n\nvar parsers = {\n /**\n * Specifies the duration of the entire Media Presentation. Format is a duration string\n * as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n mediaPresentationDuration: function mediaPresentationDuration(value) {\n return parseDuration(value);\n },\n\n /**\n * Specifies the Segment availability start time for all Segments referred to in this\n * MPD. For a dynamic manifest, it specifies the anchor for the earliest availability\n * time. Format is a date string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The date as seconds from unix epoch\n */\n availabilityStartTime: function availabilityStartTime(value) {\n return parseDate(value) / 1000;\n },\n\n /**\n * Specifies the smallest period between potential changes to the MPD. Format is a\n * duration string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n minimumUpdatePeriod: function minimumUpdatePeriod(value) {\n return parseDuration(value);\n },\n\n /**\n * Specifies the duration of the smallest time shifting buffer for any Representation\n * in the MPD. Format is a duration string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n timeShiftBufferDepth: function timeShiftBufferDepth(value) {\n return parseDuration(value);\n },\n\n /**\n * Specifies the PeriodStart time of the Period relative to the availabilityStarttime.\n * Format is a duration string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n start: function start(value) {\n return parseDuration(value);\n },\n\n /**\n * Specifies the width of the visual presentation\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed width\n */\n width: function width(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the height of the visual presentation\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed height\n */\n height: function height(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the bitrate of the representation\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed bandwidth\n */\n bandwidth: function bandwidth(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the number of the first Media Segment in this Representation in the Period\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed number\n */\n startNumber: function startNumber(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the timescale in units per seconds\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The aprsed timescale\n */\n timescale: function timescale(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the constant approximate Segment duration\n * NOTE: The <Period> element also contains an @duration attribute. This duration\n * specifies the duration of the Period. This attribute is currently not\n * supported by the rest of the parser, however we still check for it to prevent\n * errors.\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed duration\n */\n duration: function duration(value) {\n var parsedValue = parseInt(value, 10);\n\n if (isNaN(parsedValue)) {\n return parseDuration(value);\n }\n\n return parsedValue;\n },\n\n /**\n * Specifies the Segment duration, in units of the value of the @timescale.\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed duration\n */\n d: function d(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the MPD start time, in @timescale units, the first Segment in the series\n * starts relative to the beginning of the Period\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed time\n */\n t: function t(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the repeat count of the number of following contiguous Segments with the\n * same duration expressed by the value of @d\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed number\n */\n r: function r(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Default parser for all other attributes. Acts as a no-op and just returns the value\n * as a string\n *\n * @param {string} value\n * value of attribute as a string\n * @return {string}\n * Unparsed value\n */\n DEFAULT: function DEFAULT(value) {\n return value;\n }\n};\n/**\n * Gets all the attributes and values of the provided node, parses attributes with known\n * types, and returns an object with attribute names mapped to values.\n *\n * @param {Node} el\n * The node to parse attributes from\n * @return {Object}\n * Object with all attributes of el parsed\n */\n\nvar parseAttributes = function parseAttributes(el) {\n if (!(el && el.attributes)) {\n return {};\n }\n\n return from(el.attributes).reduce(function (a, e) {\n var parseFn = parsers[e.name] || parsers.DEFAULT;\n a[e.name] = parseFn(e.value);\n return a;\n }, {});\n};\n\nfunction decodeB64ToUint8Array(b64Text) {\n var decodedString = window$1.atob(b64Text);\n var array = new Uint8Array(decodedString.length);\n\n for (var i = 0; i < decodedString.length; i++) {\n array[i] = decodedString.charCodeAt(i);\n }\n\n return array;\n}\n\nvar keySystemsMap = {\n 'urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b': 'org.w3.clearkey',\n 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed': 'com.widevine.alpha',\n 'urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95': 'com.microsoft.playready',\n 'urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb': 'com.adobe.primetime'\n};\n/**\n * Builds a list of urls that is the product of the reference urls and BaseURL values\n *\n * @param {string[]} referenceUrls\n * List of reference urls to resolve to\n * @param {Node[]} baseUrlElements\n * List of BaseURL nodes from the mpd\n * @return {string[]}\n * List of resolved urls\n */\n\nvar buildBaseUrls = function buildBaseUrls(referenceUrls, baseUrlElements) {\n if (!baseUrlElements.length) {\n return referenceUrls;\n }\n\n return flatten(referenceUrls.map(function (reference) {\n return baseUrlElements.map(function (baseUrlElement) {\n return resolveUrl(reference, getContent(baseUrlElement));\n });\n }));\n};\n/**\n * Contains all Segment information for its containing AdaptationSet\n *\n * @typedef {Object} SegmentInformation\n * @property {Object|undefined} template\n * Contains the attributes for the SegmentTemplate node\n * @property {Object[]|undefined} timeline\n * Contains a list of atrributes for each S node within the SegmentTimeline node\n * @property {Object|undefined} list\n * Contains the attributes for the SegmentList node\n * @property {Object|undefined} base\n * Contains the attributes for the SegmentBase node\n */\n\n/**\n * Returns all available Segment information contained within the AdaptationSet node\n *\n * @param {Node} adaptationSet\n * The AdaptationSet node to get Segment information from\n * @return {SegmentInformation}\n * The Segment information contained within the provided AdaptationSet\n */\n\n\nvar getSegmentInformation = function getSegmentInformation(adaptationSet) {\n var segmentTemplate = findChildren(adaptationSet, 'SegmentTemplate')[0];\n var segmentList = findChildren(adaptationSet, 'SegmentList')[0];\n var segmentUrls = segmentList && findChildren(segmentList, 'SegmentURL').map(function (s) {\n return merge({\n tag: 'SegmentURL'\n }, parseAttributes(s));\n });\n var segmentBase = findChildren(adaptationSet, 'SegmentBase')[0];\n var segmentTimelineParentNode = segmentList || segmentTemplate;\n var segmentTimeline = segmentTimelineParentNode && findChildren(segmentTimelineParentNode, 'SegmentTimeline')[0];\n var segmentInitializationParentNode = segmentList || segmentBase || segmentTemplate;\n var segmentInitialization = segmentInitializationParentNode && findChildren(segmentInitializationParentNode, 'Initialization')[0]; // SegmentTemplate is handled slightly differently, since it can have both\n // @initialization and an <Initialization> node. @initialization can be templated,\n // while the node can have a url and range specified. If the <SegmentTemplate> has\n // both @initialization and an <Initialization> subelement we opt to override with\n // the node, as this interaction is not defined in the spec.\n\n var template = segmentTemplate && parseAttributes(segmentTemplate);\n\n if (template && segmentInitialization) {\n template.initialization = segmentInitialization && parseAttributes(segmentInitialization);\n } else if (template && template.initialization) {\n // If it is @initialization we convert it to an object since this is the format that\n // later functions will rely on for the initialization segment. This is only valid\n // for <SegmentTemplate>\n template.initialization = {\n sourceURL: template.initialization\n };\n }\n\n var segmentInfo = {\n template: template,\n timeline: segmentTimeline && findChildren(segmentTimeline, 'S').map(function (s) {\n return parseAttributes(s);\n }),\n list: segmentList && merge(parseAttributes(segmentList), {\n segmentUrls: segmentUrls,\n initialization: parseAttributes(segmentInitialization)\n }),\n base: segmentBase && merge(parseAttributes(segmentBase), {\n initialization: parseAttributes(segmentInitialization)\n })\n };\n Object.keys(segmentInfo).forEach(function (key) {\n if (!segmentInfo[key]) {\n delete segmentInfo[key];\n }\n });\n return segmentInfo;\n};\n/**\n * Contains Segment information and attributes needed to construct a Playlist object\n * from a Representation\n *\n * @typedef {Object} RepresentationInformation\n * @property {SegmentInformation} segmentInfo\n * Segment information for this Representation\n * @property {Object} attributes\n * Inherited attributes for this Representation\n */\n\n/**\n * Maps a Representation node to an object containing Segment information and attributes\n *\n * @name inheritBaseUrlsCallback\n * @function\n * @param {Node} representation\n * Representation node from the mpd\n * @return {RepresentationInformation}\n * Representation information needed to construct a Playlist object\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping Representation nodes to\n * Segment information and attributes using inherited BaseURL nodes.\n *\n * @param {Object} adaptationSetAttributes\n * Contains attributes inherited by the AdaptationSet\n * @param {string[]} adaptationSetBaseUrls\n * Contains list of resolved base urls inherited by the AdaptationSet\n * @param {SegmentInformation} adaptationSetSegmentInfo\n * Contains Segment information for the AdaptationSet\n * @return {inheritBaseUrlsCallback}\n * Callback map function\n */\n\n\nvar inheritBaseUrls = function inheritBaseUrls(adaptationSetAttributes, adaptationSetBaseUrls, adaptationSetSegmentInfo) {\n return function (representation) {\n var repBaseUrlElements = findChildren(representation, 'BaseURL');\n var repBaseUrls = buildBaseUrls(adaptationSetBaseUrls, repBaseUrlElements);\n var attributes = merge(adaptationSetAttributes, parseAttributes(representation));\n var representationSegmentInfo = getSegmentInformation(representation);\n return repBaseUrls.map(function (baseUrl) {\n return {\n segmentInfo: merge(adaptationSetSegmentInfo, representationSegmentInfo),\n attributes: merge(attributes, {\n baseUrl: baseUrl\n })\n };\n });\n };\n};\n/**\n * Tranforms a series of content protection nodes to\n * an object containing pssh data by key system\n *\n * @param {Node[]} contentProtectionNodes\n * Content protection nodes\n * @return {Object}\n * Object containing pssh data by key system\n */\n\n\nvar generateKeySystemInformation = function generateKeySystemInformation(contentProtectionNodes) {\n return contentProtectionNodes.reduce(function (acc, node) {\n var attributes = parseAttributes(node);\n var keySystem = keySystemsMap[attributes.schemeIdUri];\n\n if (keySystem) {\n acc[keySystem] = {\n attributes: attributes\n };\n var psshNode = findChildren(node, 'cenc:pssh')[0];\n\n if (psshNode) {\n var pssh = getContent(psshNode);\n var psshBuffer = pssh && decodeB64ToUint8Array(pssh);\n acc[keySystem].pssh = psshBuffer;\n }\n }\n\n return acc;\n }, {});\n};\n/**\n * Maps an AdaptationSet node to a list of Representation information objects\n *\n * @name toRepresentationsCallback\n * @function\n * @param {Node} adaptationSet\n * AdaptationSet node from the mpd\n * @return {RepresentationInformation[]}\n * List of objects containing Representaion information\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping AdaptationSet nodes to a list of\n * Representation information objects\n *\n * @param {Object} periodAttributes\n * Contains attributes inherited by the Period\n * @param {string[]} periodBaseUrls\n * Contains list of resolved base urls inherited by the Period\n * @param {string[]} periodSegmentInfo\n * Contains Segment Information at the period level\n * @return {toRepresentationsCallback}\n * Callback map function\n */\n\n\nvar toRepresentations = function toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo) {\n return function (adaptationSet) {\n var adaptationSetAttributes = parseAttributes(adaptationSet);\n var adaptationSetBaseUrls = buildBaseUrls(periodBaseUrls, findChildren(adaptationSet, 'BaseURL'));\n var role = findChildren(adaptationSet, 'Role')[0];\n var roleAttributes = {\n role: parseAttributes(role)\n };\n var attrs = merge(periodAttributes, adaptationSetAttributes, roleAttributes);\n var contentProtection = generateKeySystemInformation(findChildren(adaptationSet, 'ContentProtection'));\n\n if (Object.keys(contentProtection).length) {\n attrs = merge(attrs, {\n contentProtection: contentProtection\n });\n }\n\n var segmentInfo = getSegmentInformation(adaptationSet);\n var representations = findChildren(adaptationSet, 'Representation');\n var adaptationSetSegmentInfo = merge(periodSegmentInfo, segmentInfo);\n return flatten(representations.map(inheritBaseUrls(attrs, adaptationSetBaseUrls, adaptationSetSegmentInfo)));\n };\n};\n/**\n * Maps an Period node to a list of Representation inforamtion objects for all\n * AdaptationSet nodes contained within the Period\n *\n * @name toAdaptationSetsCallback\n * @function\n * @param {Node} period\n * Period node from the mpd\n * @param {number} periodIndex\n * Index of the Period within the mpd\n * @return {RepresentationInformation[]}\n * List of objects containing Representaion information\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping Period nodes to a list of\n * Representation information objects\n *\n * @param {Object} mpdAttributes\n * Contains attributes inherited by the mpd\n * @param {string[]} mpdBaseUrls\n * Contains list of resolved base urls inherited by the mpd\n * @return {toAdaptationSetsCallback}\n * Callback map function\n */\n\n\nvar toAdaptationSets = function toAdaptationSets(mpdAttributes, mpdBaseUrls) {\n return function (period, index) {\n var periodBaseUrls = buildBaseUrls(mpdBaseUrls, findChildren(period, 'BaseURL'));\n var periodAtt = parseAttributes(period);\n var parsedPeriodId = parseInt(periodAtt.id, 10); // fallback to mapping index if Period@id is not a number\n\n var periodIndex = window$1.isNaN(parsedPeriodId) ? index : parsedPeriodId;\n var periodAttributes = merge(mpdAttributes, {\n periodIndex: periodIndex\n });\n var adaptationSets = findChildren(period, 'AdaptationSet');\n var periodSegmentInfo = getSegmentInformation(period);\n return flatten(adaptationSets.map(toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo)));\n };\n};\n/**\n * Traverses the mpd xml tree to generate a list of Representation information objects\n * that have inherited attributes from parent nodes\n *\n * @param {Node} mpd\n * The root node of the mpd\n * @param {Object} options\n * Available options for inheritAttributes\n * @param {string} options.manifestUri\n * The uri source of the mpd\n * @param {number} options.NOW\n * Current time per DASH IOP. Default is current time in ms since epoch\n * @param {number} options.clientOffset\n * Client time difference from NOW (in milliseconds)\n * @return {RepresentationInformation[]}\n * List of objects containing Representation information\n */\n\n\nvar inheritAttributes = function inheritAttributes(mpd, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$manifestUri = _options.manifestUri,\n manifestUri = _options$manifestUri === void 0 ? '' : _options$manifestUri,\n _options$NOW = _options.NOW,\n NOW = _options$NOW === void 0 ? Date.now() : _options$NOW,\n _options$clientOffset = _options.clientOffset,\n clientOffset = _options$clientOffset === void 0 ? 0 : _options$clientOffset;\n var periods = findChildren(mpd, 'Period');\n\n if (!periods.length) {\n throw new Error(errors.INVALID_NUMBER_OF_PERIOD);\n }\n\n var mpdAttributes = parseAttributes(mpd);\n var mpdBaseUrls = buildBaseUrls([manifestUri], findChildren(mpd, 'BaseURL'));\n mpdAttributes.sourceDuration = mpdAttributes.mediaPresentationDuration || 0;\n mpdAttributes.NOW = NOW;\n mpdAttributes.clientOffset = clientOffset;\n return flatten(periods.map(toAdaptationSets(mpdAttributes, mpdBaseUrls)));\n};\n\nvar stringToMpdXml = function stringToMpdXml(manifestString) {\n if (manifestString === '') {\n throw new Error(errors.DASH_EMPTY_MANIFEST);\n }\n\n var parser = new window$1.DOMParser();\n var xml = parser.parseFromString(manifestString, 'application/xml');\n var mpd = xml && xml.documentElement.tagName === 'MPD' ? xml.documentElement : null;\n\n if (!mpd || mpd && mpd.getElementsByTagName('parsererror').length > 0) {\n throw new Error(errors.DASH_INVALID_XML);\n }\n\n return mpd;\n};\n/**\n * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\n *\n * @param {string} mpd\n * XML string of the MPD manifest\n * @return {Object|null}\n * Attributes of UTCTiming node specified in the manifest. Null if none found\n */\n\n\nvar parseUTCTimingScheme = function parseUTCTimingScheme(mpd) {\n var UTCTimingNode = findChildren(mpd, 'UTCTiming')[0];\n\n if (!UTCTimingNode) {\n return null;\n }\n\n var attributes = parseAttributes(UTCTimingNode);\n\n switch (attributes.schemeIdUri) {\n case 'urn:mpeg:dash:utc:http-head:2014':\n case 'urn:mpeg:dash:utc:http-head:2012':\n attributes.method = 'HEAD';\n break;\n\n case 'urn:mpeg:dash:utc:http-xsdate:2014':\n case 'urn:mpeg:dash:utc:http-iso:2014':\n case 'urn:mpeg:dash:utc:http-xsdate:2012':\n case 'urn:mpeg:dash:utc:http-iso:2012':\n attributes.method = 'GET';\n break;\n\n case 'urn:mpeg:dash:utc:direct:2014':\n case 'urn:mpeg:dash:utc:direct:2012':\n attributes.method = 'DIRECT';\n attributes.value = Date.parse(attributes.value);\n break;\n\n case 'urn:mpeg:dash:utc:http-ntp:2014':\n case 'urn:mpeg:dash:utc:ntp:2014':\n case 'urn:mpeg:dash:utc:sntp:2014':\n default:\n throw new Error(errors.UNSUPPORTED_UTC_TIMING_SCHEME);\n }\n\n return attributes;\n};\n\nvar VERSION = version;\n\nvar parse = function parse(manifestString, options) {\n if (options === void 0) {\n options = {};\n }\n\n return toM3u8(toPlaylists(inheritAttributes(stringToMpdXml(manifestString), options)), options.sidxMapping);\n};\n/**\n * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\n *\n * @param {string} manifestString\n * XML string of the MPD manifest\n * @return {Object|null}\n * Attributes of UTCTiming node specified in the manifest. Null if none found\n */\n\n\nvar parseUTCTiming = function parseUTCTiming(manifestString) {\n return parseUTCTimingScheme(stringToMpdXml(manifestString));\n};\n\nexport { VERSION, parse, parseUTCTiming };","/**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Reads in-band CEA-708 captions out of FMP4 segments.\n * @see https://en.wikipedia.org/wiki/CEA-708\n */\n'use strict';\n\nvar discardEmulationPreventionBytes = require('../tools/caption-packet-parser').discardEmulationPreventionBytes;\n\nvar CaptionStream = require('../m2ts/caption-stream').CaptionStream;\n\nvar probe = require('./probe');\n\nvar inspect = require('../tools/mp4-inspector');\n/**\n * Maps an offset in the mdat to a sample based on the the size of the samples.\n * Assumes that `parseSamples` has been called first.\n *\n * @param {Number} offset - The offset into the mdat\n * @param {Object[]} samples - An array of samples, parsed using `parseSamples`\n * @return {?Object} The matching sample, or null if no match was found.\n *\n * @see ISO-BMFF-12/2015, Section 8.8.8\n **/\n\n\nvar mapToSample = function mapToSample(offset, samples) {\n var approximateOffset = offset;\n\n for (var i = 0; i < samples.length; i++) {\n var sample = samples[i];\n\n if (approximateOffset < sample.size) {\n return sample;\n }\n\n approximateOffset -= sample.size;\n }\n\n return null;\n};\n/**\n * Finds SEI nal units contained in a Media Data Box.\n * Assumes that `parseSamples` has been called first.\n *\n * @param {Uint8Array} avcStream - The bytes of the mdat\n * @param {Object[]} samples - The samples parsed out by `parseSamples`\n * @param {Number} trackId - The trackId of this video track\n * @return {Object[]} seiNals - the parsed SEI NALUs found.\n * The contents of the seiNal should match what is expected by\n * CaptionStream.push (nalUnitType, size, data, escapedRBSP, pts, dts)\n *\n * @see ISO-BMFF-12/2015, Section 8.1.1\n * @see Rec. ITU-T H.264, 7.3.2.3.1\n **/\n\n\nvar findSeiNals = function findSeiNals(avcStream, samples, trackId) {\n var avcView = new DataView(avcStream.buffer, avcStream.byteOffset, avcStream.byteLength),\n result = [],\n seiNal,\n i,\n length,\n lastMatchedSample;\n\n for (i = 0; i + 4 < avcStream.length; i += length) {\n length = avcView.getUint32(i);\n i += 4; // Bail if this doesn't appear to be an H264 stream\n\n if (length <= 0) {\n continue;\n }\n\n switch (avcStream[i] & 0x1F) {\n case 0x06:\n var data = avcStream.subarray(i + 1, i + 1 + length);\n var matchingSample = mapToSample(i, samples);\n seiNal = {\n nalUnitType: 'sei_rbsp',\n size: length,\n data: data,\n escapedRBSP: discardEmulationPreventionBytes(data),\n trackId: trackId\n };\n\n if (matchingSample) {\n seiNal.pts = matchingSample.pts;\n seiNal.dts = matchingSample.dts;\n lastMatchedSample = matchingSample;\n } else {\n // If a matching sample cannot be found, use the last\n // sample's values as they should be as close as possible\n seiNal.pts = lastMatchedSample.pts;\n seiNal.dts = lastMatchedSample.dts;\n }\n\n result.push(seiNal);\n break;\n\n default:\n break;\n }\n }\n\n return result;\n};\n/**\n * Parses sample information out of Track Run Boxes and calculates\n * the absolute presentation and decode timestamps of each sample.\n *\n * @param {Array<Uint8Array>} truns - The Trun Run boxes to be parsed\n * @param {Number} baseMediaDecodeTime - base media decode time from tfdt\n @see ISO-BMFF-12/2015, Section 8.8.12\n * @param {Object} tfhd - The parsed Track Fragment Header\n * @see inspect.parseTfhd\n * @return {Object[]} the parsed samples\n *\n * @see ISO-BMFF-12/2015, Section 8.8.8\n **/\n\n\nvar parseSamples = function parseSamples(truns, baseMediaDecodeTime, tfhd) {\n var currentDts = baseMediaDecodeTime;\n var defaultSampleDuration = tfhd.defaultSampleDuration || 0;\n var defaultSampleSize = tfhd.defaultSampleSize || 0;\n var trackId = tfhd.trackId;\n var allSamples = [];\n truns.forEach(function (trun) {\n // Note: We currently do not parse the sample table as well\n // as the trun. It's possible some sources will require this.\n // moov > trak > mdia > minf > stbl\n var trackRun = inspect.parseTrun(trun);\n var samples = trackRun.samples;\n samples.forEach(function (sample) {\n if (sample.duration === undefined) {\n sample.duration = defaultSampleDuration;\n }\n\n if (sample.size === undefined) {\n sample.size = defaultSampleSize;\n }\n\n sample.trackId = trackId;\n sample.dts = currentDts;\n\n if (sample.compositionTimeOffset === undefined) {\n sample.compositionTimeOffset = 0;\n }\n\n sample.pts = currentDts + sample.compositionTimeOffset;\n currentDts += sample.duration;\n });\n allSamples = allSamples.concat(samples);\n });\n return allSamples;\n};\n/**\n * Parses out caption nals from an FMP4 segment's video tracks.\n *\n * @param {Uint8Array} segment - The bytes of a single segment\n * @param {Number} videoTrackId - The trackId of a video track in the segment\n * @return {Object.<Number, Object[]>} A mapping of video trackId to\n * a list of seiNals found in that track\n **/\n\n\nvar parseCaptionNals = function parseCaptionNals(segment, videoTrackId) {\n // To get the samples\n var trafs = probe.findBox(segment, ['moof', 'traf']); // To get SEI NAL units\n\n var mdats = probe.findBox(segment, ['mdat']);\n var captionNals = {};\n var mdatTrafPairs = []; // Pair up each traf with a mdat as moofs and mdats are in pairs\n\n mdats.forEach(function (mdat, index) {\n var matchingTraf = trafs[index];\n mdatTrafPairs.push({\n mdat: mdat,\n traf: matchingTraf\n });\n });\n mdatTrafPairs.forEach(function (pair) {\n var mdat = pair.mdat;\n var traf = pair.traf;\n var tfhd = probe.findBox(traf, ['tfhd']); // Exactly 1 tfhd per traf\n\n var headerInfo = inspect.parseTfhd(tfhd[0]);\n var trackId = headerInfo.trackId;\n var tfdt = probe.findBox(traf, ['tfdt']); // Either 0 or 1 tfdt per traf\n\n var baseMediaDecodeTime = tfdt.length > 0 ? inspect.parseTfdt(tfdt[0]).baseMediaDecodeTime : 0;\n var truns = probe.findBox(traf, ['trun']);\n var samples;\n var seiNals; // Only parse video data for the chosen video track\n\n if (videoTrackId === trackId && truns.length > 0) {\n samples = parseSamples(truns, baseMediaDecodeTime, headerInfo);\n seiNals = findSeiNals(mdat, samples, trackId);\n\n if (!captionNals[trackId]) {\n captionNals[trackId] = [];\n }\n\n captionNals[trackId] = captionNals[trackId].concat(seiNals);\n }\n });\n return captionNals;\n};\n/**\n * Parses out inband captions from an MP4 container and returns\n * caption objects that can be used by WebVTT and the TextTrack API.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/VTTCue\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TextTrack\n * Assumes that `probe.getVideoTrackIds` and `probe.timescale` have been called first\n *\n * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\n * @param {Number} trackId - The id of the video track to parse\n * @param {Number} timescale - The timescale for the video track from the init segment\n *\n * @return {?Object[]} parsedCaptions - A list of captions or null if no video tracks\n * @return {Number} parsedCaptions[].startTime - The time to show the caption in seconds\n * @return {Number} parsedCaptions[].endTime - The time to stop showing the caption in seconds\n * @return {String} parsedCaptions[].text - The visible content of the caption\n **/\n\n\nvar parseEmbeddedCaptions = function parseEmbeddedCaptions(segment, trackId, timescale) {\n var seiNals; // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\n\n if (trackId === null) {\n return null;\n }\n\n seiNals = parseCaptionNals(segment, trackId);\n return {\n seiNals: seiNals[trackId],\n timescale: timescale\n };\n};\n/**\n * Converts SEI NALUs into captions that can be used by video.js\n **/\n\n\nvar CaptionParser = function CaptionParser() {\n var isInitialized = false;\n var captionStream; // Stores segments seen before trackId and timescale are set\n\n var segmentCache; // Stores video track ID of the track being parsed\n\n var trackId; // Stores the timescale of the track being parsed\n\n var timescale; // Stores captions parsed so far\n\n var parsedCaptions; // Stores whether we are receiving partial data or not\n\n var parsingPartial;\n /**\n * A method to indicate whether a CaptionParser has been initalized\n * @returns {Boolean}\n **/\n\n this.isInitialized = function () {\n return isInitialized;\n };\n /**\n * Initializes the underlying CaptionStream, SEI NAL parsing\n * and management, and caption collection\n **/\n\n\n this.init = function (options) {\n captionStream = new CaptionStream();\n isInitialized = true;\n parsingPartial = options ? options.isPartial : false; // Collect dispatched captions\n\n captionStream.on('data', function (event) {\n // Convert to seconds in the source's timescale\n event.startTime = event.startPts / timescale;\n event.endTime = event.endPts / timescale;\n parsedCaptions.captions.push(event);\n parsedCaptions.captionStreams[event.stream] = true;\n });\n };\n /**\n * Determines if a new video track will be selected\n * or if the timescale changed\n * @return {Boolean}\n **/\n\n\n this.isNewInit = function (videoTrackIds, timescales) {\n if (videoTrackIds && videoTrackIds.length === 0 || timescales && typeof timescales === 'object' && Object.keys(timescales).length === 0) {\n return false;\n }\n\n return trackId !== videoTrackIds[0] || timescale !== timescales[trackId];\n };\n /**\n * Parses out SEI captions and interacts with underlying\n * CaptionStream to return dispatched captions\n *\n * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\n * @param {Number[]} videoTrackIds - A list of video tracks found in the init segment\n * @param {Object.<Number, Number>} timescales - The timescales found in the init segment\n * @see parseEmbeddedCaptions\n * @see m2ts/caption-stream.js\n **/\n\n\n this.parse = function (segment, videoTrackIds, timescales) {\n var parsedData;\n\n if (!this.isInitialized()) {\n return null; // This is not likely to be a video segment\n } else if (!videoTrackIds || !timescales) {\n return null;\n } else if (this.isNewInit(videoTrackIds, timescales)) {\n // Use the first video track only as there is no\n // mechanism to switch to other video tracks\n trackId = videoTrackIds[0];\n timescale = timescales[trackId]; // If an init segment has not been seen yet, hold onto segment\n // data until we have one.\n // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\n } else if (trackId === null || !timescale) {\n segmentCache.push(segment);\n return null;\n } // Now that a timescale and trackId is set, parse cached segments\n\n\n while (segmentCache.length > 0) {\n var cachedSegment = segmentCache.shift();\n this.parse(cachedSegment, videoTrackIds, timescales);\n }\n\n parsedData = parseEmbeddedCaptions(segment, trackId, timescale);\n\n if (parsedData === null || !parsedData.seiNals) {\n return null;\n }\n\n this.pushNals(parsedData.seiNals); // Force the parsed captions to be dispatched\n\n this.flushStream();\n return parsedCaptions;\n };\n /**\n * Pushes SEI NALUs onto CaptionStream\n * @param {Object[]} nals - A list of SEI nals parsed using `parseCaptionNals`\n * Assumes that `parseCaptionNals` has been called first\n * @see m2ts/caption-stream.js\n **/\n\n\n this.pushNals = function (nals) {\n if (!this.isInitialized() || !nals || nals.length === 0) {\n return null;\n }\n\n nals.forEach(function (nal) {\n captionStream.push(nal);\n });\n };\n /**\n * Flushes underlying CaptionStream to dispatch processed, displayable captions\n * @see m2ts/caption-stream.js\n **/\n\n\n this.flushStream = function () {\n if (!this.isInitialized()) {\n return null;\n }\n\n if (!parsingPartial) {\n captionStream.flush();\n } else {\n captionStream.partialFlush();\n }\n };\n /**\n * Reset caption buckets for new data\n **/\n\n\n this.clearParsedCaptions = function () {\n parsedCaptions.captions = [];\n parsedCaptions.captionStreams = {};\n };\n /**\n * Resets underlying CaptionStream\n * @see m2ts/caption-stream.js\n **/\n\n\n this.resetCaptionStream = function () {\n if (!this.isInitialized()) {\n return null;\n }\n\n captionStream.reset();\n };\n /**\n * Convenience method to clear all captions flushed from the\n * CaptionStream and still being parsed\n * @see m2ts/caption-stream.js\n **/\n\n\n this.clearAllCaptions = function () {\n this.clearParsedCaptions();\n this.resetCaptionStream();\n };\n /**\n * Reset caption parser\n **/\n\n\n this.reset = function () {\n segmentCache = [];\n trackId = null;\n timescale = null;\n\n if (!parsedCaptions) {\n parsedCaptions = {\n captions: [],\n // CC1, CC2, CC3, CC4\n captionStreams: {}\n };\n } else {\n this.clearParsedCaptions();\n }\n\n this.resetCaptionStream();\n };\n\n this.reset();\n};\n\nmodule.exports = CaptionParser;","/**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Reads in-band caption information from a video elementary\n * stream. Captions must follow the CEA-708 standard for injection\n * into an MPEG-2 transport streams.\n * @see https://en.wikipedia.org/wiki/CEA-708\n * @see https://www.gpo.gov/fdsys/pkg/CFR-2007-title47-vol1/pdf/CFR-2007-title47-vol1-sec15-119.pdf\n */\n'use strict'; // -----------------\n// Link To Transport\n// -----------------\n\nvar Stream = require('../utils/stream');\n\nvar cea708Parser = require('../tools/caption-packet-parser');\n\nvar CaptionStream = function CaptionStream() {\n CaptionStream.prototype.init.call(this);\n this.captionPackets_ = [];\n this.ccStreams_ = [new Cea608Stream(0, 0), // eslint-disable-line no-use-before-define\n new Cea608Stream(0, 1), // eslint-disable-line no-use-before-define\n new Cea608Stream(1, 0), // eslint-disable-line no-use-before-define\n new Cea608Stream(1, 1) // eslint-disable-line no-use-before-define\n ];\n this.reset(); // forward data and done events from CCs to this CaptionStream\n\n this.ccStreams_.forEach(function (cc) {\n cc.on('data', this.trigger.bind(this, 'data'));\n cc.on('partialdone', this.trigger.bind(this, 'partialdone'));\n cc.on('done', this.trigger.bind(this, 'done'));\n }, this);\n};\n\nCaptionStream.prototype = new Stream();\n\nCaptionStream.prototype.push = function (event) {\n var sei, userData, newCaptionPackets; // only examine SEI NALs\n\n if (event.nalUnitType !== 'sei_rbsp') {\n return;\n } // parse the sei\n\n\n sei = cea708Parser.parseSei(event.escapedRBSP); // ignore everything but user_data_registered_itu_t_t35\n\n if (sei.payloadType !== cea708Parser.USER_DATA_REGISTERED_ITU_T_T35) {\n return;\n } // parse out the user data payload\n\n\n userData = cea708Parser.parseUserData(sei); // ignore unrecognized userData\n\n if (!userData) {\n return;\n } // Sometimes, the same segment # will be downloaded twice. To stop the\n // caption data from being processed twice, we track the latest dts we've\n // received and ignore everything with a dts before that. However, since\n // data for a specific dts can be split across packets on either side of\n // a segment boundary, we need to make sure we *don't* ignore the packets\n // from the *next* segment that have dts === this.latestDts_. By constantly\n // tracking the number of packets received with dts === this.latestDts_, we\n // know how many should be ignored once we start receiving duplicates.\n\n\n if (event.dts < this.latestDts_) {\n // We've started getting older data, so set the flag.\n this.ignoreNextEqualDts_ = true;\n return;\n } else if (event.dts === this.latestDts_ && this.ignoreNextEqualDts_) {\n this.numSameDts_--;\n\n if (!this.numSameDts_) {\n // We've received the last duplicate packet, time to start processing again\n this.ignoreNextEqualDts_ = false;\n }\n\n return;\n } // parse out CC data packets and save them for later\n\n\n newCaptionPackets = cea708Parser.parseCaptionPackets(event.pts, userData);\n this.captionPackets_ = this.captionPackets_.concat(newCaptionPackets);\n\n if (this.latestDts_ !== event.dts) {\n this.numSameDts_ = 0;\n }\n\n this.numSameDts_++;\n this.latestDts_ = event.dts;\n};\n\nCaptionStream.prototype.flushCCStreams = function (flushType) {\n this.ccStreams_.forEach(function (cc) {\n return flushType === 'flush' ? cc.flush() : cc.partialFlush();\n }, this);\n};\n\nCaptionStream.prototype.flushStream = function (flushType) {\n // make sure we actually parsed captions before proceeding\n if (!this.captionPackets_.length) {\n this.flushCCStreams(flushType);\n return;\n } // In Chrome, the Array#sort function is not stable so add a\n // presortIndex that we can use to ensure we get a stable-sort\n\n\n this.captionPackets_.forEach(function (elem, idx) {\n elem.presortIndex = idx;\n }); // sort caption byte-pairs based on their PTS values\n\n this.captionPackets_.sort(function (a, b) {\n if (a.pts === b.pts) {\n return a.presortIndex - b.presortIndex;\n }\n\n return a.pts - b.pts;\n });\n this.captionPackets_.forEach(function (packet) {\n if (packet.type < 2) {\n // Dispatch packet to the right Cea608Stream\n this.dispatchCea608Packet(packet);\n } // this is where an 'else' would go for a dispatching packets\n // to a theoretical Cea708Stream that handles SERVICEn data\n\n }, this);\n this.captionPackets_.length = 0;\n this.flushCCStreams(flushType);\n};\n\nCaptionStream.prototype.flush = function () {\n return this.flushStream('flush');\n}; // Only called if handling partial data\n\n\nCaptionStream.prototype.partialFlush = function () {\n return this.flushStream('partialFlush');\n};\n\nCaptionStream.prototype.reset = function () {\n this.latestDts_ = null;\n this.ignoreNextEqualDts_ = false;\n this.numSameDts_ = 0;\n this.activeCea608Channel_ = [null, null];\n this.ccStreams_.forEach(function (ccStream) {\n ccStream.reset();\n });\n}; // From the CEA-608 spec:\n\n/*\n * When XDS sub-packets are interleaved with other services, the end of each sub-packet shall be followed\n * by a control pair to change to a different service. When any of the control codes from 0x10 to 0x1F is\n * used to begin a control code pair, it indicates the return to captioning or Text data. The control code pair\n * and subsequent data should then be processed according to the FCC rules. It may be necessary for the\n * line 21 data encoder to automatically insert a control code pair (i.e. RCL, RU2, RU3, RU4, RDC, or RTD)\n * to switch to captioning or Text.\n*/\n// With that in mind, we ignore any data between an XDS control code and a\n// subsequent closed-captioning control code.\n\n\nCaptionStream.prototype.dispatchCea608Packet = function (packet) {\n // NOTE: packet.type is the CEA608 field\n if (this.setsTextOrXDSActive(packet)) {\n this.activeCea608Channel_[packet.type] = null;\n } else if (this.setsChannel1Active(packet)) {\n this.activeCea608Channel_[packet.type] = 0;\n } else if (this.setsChannel2Active(packet)) {\n this.activeCea608Channel_[packet.type] = 1;\n }\n\n if (this.activeCea608Channel_[packet.type] === null) {\n // If we haven't received anything to set the active channel, or the\n // packets are Text/XDS data, discard the data; we don't want jumbled\n // captions\n return;\n }\n\n this.ccStreams_[(packet.type << 1) + this.activeCea608Channel_[packet.type]].push(packet);\n};\n\nCaptionStream.prototype.setsChannel1Active = function (packet) {\n return (packet.ccData & 0x7800) === 0x1000;\n};\n\nCaptionStream.prototype.setsChannel2Active = function (packet) {\n return (packet.ccData & 0x7800) === 0x1800;\n};\n\nCaptionStream.prototype.setsTextOrXDSActive = function (packet) {\n return (packet.ccData & 0x7100) === 0x0100 || (packet.ccData & 0x78fe) === 0x102a || (packet.ccData & 0x78fe) === 0x182a;\n}; // ----------------------\n// Session to Application\n// ----------------------\n// This hash maps non-ASCII, special, and extended character codes to their\n// proper Unicode equivalent. The first keys that are only a single byte\n// are the non-standard ASCII characters, which simply map the CEA608 byte\n// to the standard ASCII/Unicode. The two-byte keys that follow are the CEA608\n// character codes, but have their MSB bitmasked with 0x03 so that a lookup\n// can be performed regardless of the field and data channel on which the\n// character code was received.\n\n\nvar CHARACTER_TRANSLATION = {\n 0x2a: 0xe1,\n // á\n 0x5c: 0xe9,\n // é\n 0x5e: 0xed,\n // í\n 0x5f: 0xf3,\n // ó\n 0x60: 0xfa,\n // ú\n 0x7b: 0xe7,\n // ç\n 0x7c: 0xf7,\n // ÷\n 0x7d: 0xd1,\n // Ñ\n 0x7e: 0xf1,\n // ñ\n 0x7f: 0x2588,\n // █\n 0x0130: 0xae,\n // ®\n 0x0131: 0xb0,\n // °\n 0x0132: 0xbd,\n // ½\n 0x0133: 0xbf,\n // ¿\n 0x0134: 0x2122,\n // ™\n 0x0135: 0xa2,\n // ¢\n 0x0136: 0xa3,\n // £\n 0x0137: 0x266a,\n // ♪\n 0x0138: 0xe0,\n // à\n 0x0139: 0xa0,\n //\n 0x013a: 0xe8,\n // è\n 0x013b: 0xe2,\n // â\n 0x013c: 0xea,\n // ê\n 0x013d: 0xee,\n // î\n 0x013e: 0xf4,\n // ô\n 0x013f: 0xfb,\n // û\n 0x0220: 0xc1,\n // Á\n 0x0221: 0xc9,\n // É\n 0x0222: 0xd3,\n // Ó\n 0x0223: 0xda,\n // Ú\n 0x0224: 0xdc,\n // Ü\n 0x0225: 0xfc,\n // ü\n 0x0226: 0x2018,\n // ‘\n 0x0227: 0xa1,\n // ¡\n 0x0228: 0x2a,\n // *\n 0x0229: 0x27,\n // '\n 0x022a: 0x2014,\n // —\n 0x022b: 0xa9,\n // ©\n 0x022c: 0x2120,\n // ℠\n 0x022d: 0x2022,\n // •\n 0x022e: 0x201c,\n // “\n 0x022f: 0x201d,\n // ”\n 0x0230: 0xc0,\n // À\n 0x0231: 0xc2,\n // Â\n 0x0232: 0xc7,\n // Ç\n 0x0233: 0xc8,\n // È\n 0x0234: 0xca,\n // Ê\n 0x0235: 0xcb,\n // Ë\n 0x0236: 0xeb,\n // ë\n 0x0237: 0xce,\n // Î\n 0x0238: 0xcf,\n // Ï\n 0x0239: 0xef,\n // ï\n 0x023a: 0xd4,\n // Ô\n 0x023b: 0xd9,\n // Ù\n 0x023c: 0xf9,\n // ù\n 0x023d: 0xdb,\n // Û\n 0x023e: 0xab,\n // «\n 0x023f: 0xbb,\n // »\n 0x0320: 0xc3,\n // Ã\n 0x0321: 0xe3,\n // ã\n 0x0322: 0xcd,\n // Í\n 0x0323: 0xcc,\n // Ì\n 0x0324: 0xec,\n // ì\n 0x0325: 0xd2,\n // Ò\n 0x0326: 0xf2,\n // ò\n 0x0327: 0xd5,\n // Õ\n 0x0328: 0xf5,\n // õ\n 0x0329: 0x7b,\n // {\n 0x032a: 0x7d,\n // }\n 0x032b: 0x5c,\n // \\\n 0x032c: 0x5e,\n // ^\n 0x032d: 0x5f,\n // _\n 0x032e: 0x7c,\n // |\n 0x032f: 0x7e,\n // ~\n 0x0330: 0xc4,\n // Ä\n 0x0331: 0xe4,\n // ä\n 0x0332: 0xd6,\n // Ö\n 0x0333: 0xf6,\n // ö\n 0x0334: 0xdf,\n // ß\n 0x0335: 0xa5,\n // ¥\n 0x0336: 0xa4,\n // ¤\n 0x0337: 0x2502,\n // │\n 0x0338: 0xc5,\n // Å\n 0x0339: 0xe5,\n // å\n 0x033a: 0xd8,\n // Ø\n 0x033b: 0xf8,\n // ø\n 0x033c: 0x250c,\n // ┌\n 0x033d: 0x2510,\n // ┐\n 0x033e: 0x2514,\n // └\n 0x033f: 0x2518 // ┘\n\n};\n\nvar getCharFromCode = function getCharFromCode(code) {\n if (code === null) {\n return '';\n }\n\n code = CHARACTER_TRANSLATION[code] || code;\n return String.fromCharCode(code);\n}; // the index of the last row in a CEA-608 display buffer\n\n\nvar BOTTOM_ROW = 14; // This array is used for mapping PACs -> row #, since there's no way of\n// getting it through bit logic.\n\nvar ROWS = [0x1100, 0x1120, 0x1200, 0x1220, 0x1500, 0x1520, 0x1600, 0x1620, 0x1700, 0x1720, 0x1000, 0x1300, 0x1320, 0x1400, 0x1420]; // CEA-608 captions are rendered onto a 34x15 matrix of character\n// cells. The \"bottom\" row is the last element in the outer array.\n\nvar createDisplayBuffer = function createDisplayBuffer() {\n var result = [],\n i = BOTTOM_ROW + 1;\n\n while (i--) {\n result.push('');\n }\n\n return result;\n};\n\nvar Cea608Stream = function Cea608Stream(field, dataChannel) {\n Cea608Stream.prototype.init.call(this);\n this.field_ = field || 0;\n this.dataChannel_ = dataChannel || 0;\n this.name_ = 'CC' + ((this.field_ << 1 | this.dataChannel_) + 1);\n this.setConstants();\n this.reset();\n\n this.push = function (packet) {\n var data, swap, char0, char1, text; // remove the parity bits\n\n data = packet.ccData & 0x7f7f; // ignore duplicate control codes; the spec demands they're sent twice\n\n if (data === this.lastControlCode_) {\n this.lastControlCode_ = null;\n return;\n } // Store control codes\n\n\n if ((data & 0xf000) === 0x1000) {\n this.lastControlCode_ = data;\n } else if (data !== this.PADDING_) {\n this.lastControlCode_ = null;\n }\n\n char0 = data >>> 8;\n char1 = data & 0xff;\n\n if (data === this.PADDING_) {\n return;\n } else if (data === this.RESUME_CAPTION_LOADING_) {\n this.mode_ = 'popOn';\n } else if (data === this.END_OF_CAPTION_) {\n // If an EOC is received while in paint-on mode, the displayed caption\n // text should be swapped to non-displayed memory as if it was a pop-on\n // caption. Because of that, we should explicitly switch back to pop-on\n // mode\n this.mode_ = 'popOn';\n this.clearFormatting(packet.pts); // if a caption was being displayed, it's gone now\n\n this.flushDisplayed(packet.pts); // flip memory\n\n swap = this.displayed_;\n this.displayed_ = this.nonDisplayed_;\n this.nonDisplayed_ = swap; // start measuring the time to display the caption\n\n this.startPts_ = packet.pts;\n } else if (data === this.ROLL_UP_2_ROWS_) {\n this.rollUpRows_ = 2;\n this.setRollUp(packet.pts);\n } else if (data === this.ROLL_UP_3_ROWS_) {\n this.rollUpRows_ = 3;\n this.setRollUp(packet.pts);\n } else if (data === this.ROLL_UP_4_ROWS_) {\n this.rollUpRows_ = 4;\n this.setRollUp(packet.pts);\n } else if (data === this.CARRIAGE_RETURN_) {\n this.clearFormatting(packet.pts);\n this.flushDisplayed(packet.pts);\n this.shiftRowsUp_();\n this.startPts_ = packet.pts;\n } else if (data === this.BACKSPACE_) {\n if (this.mode_ === 'popOn') {\n this.nonDisplayed_[this.row_] = this.nonDisplayed_[this.row_].slice(0, -1);\n } else {\n this.displayed_[this.row_] = this.displayed_[this.row_].slice(0, -1);\n }\n } else if (data === this.ERASE_DISPLAYED_MEMORY_) {\n this.flushDisplayed(packet.pts);\n this.displayed_ = createDisplayBuffer();\n } else if (data === this.ERASE_NON_DISPLAYED_MEMORY_) {\n this.nonDisplayed_ = createDisplayBuffer();\n } else if (data === this.RESUME_DIRECT_CAPTIONING_) {\n if (this.mode_ !== 'paintOn') {\n // NOTE: This should be removed when proper caption positioning is\n // implemented\n this.flushDisplayed(packet.pts);\n this.displayed_ = createDisplayBuffer();\n }\n\n this.mode_ = 'paintOn';\n this.startPts_ = packet.pts; // Append special characters to caption text\n } else if (this.isSpecialCharacter(char0, char1)) {\n // Bitmask char0 so that we can apply character transformations\n // regardless of field and data channel.\n // Then byte-shift to the left and OR with char1 so we can pass the\n // entire character code to `getCharFromCode`.\n char0 = (char0 & 0x03) << 8;\n text = getCharFromCode(char0 | char1);\n this[this.mode_](packet.pts, text);\n this.column_++; // Append extended characters to caption text\n } else if (this.isExtCharacter(char0, char1)) {\n // Extended characters always follow their \"non-extended\" equivalents.\n // IE if a \"è\" is desired, you'll always receive \"eè\"; non-compliant\n // decoders are supposed to drop the \"è\", while compliant decoders\n // backspace the \"e\" and insert \"è\".\n // Delete the previous character\n if (this.mode_ === 'popOn') {\n this.nonDisplayed_[this.row_] = this.nonDisplayed_[this.row_].slice(0, -1);\n } else {\n this.displayed_[this.row_] = this.displayed_[this.row_].slice(0, -1);\n } // Bitmask char0 so that we can apply character transformations\n // regardless of field and data channel.\n // Then byte-shift to the left and OR with char1 so we can pass the\n // entire character code to `getCharFromCode`.\n\n\n char0 = (char0 & 0x03) << 8;\n text = getCharFromCode(char0 | char1);\n this[this.mode_](packet.pts, text);\n this.column_++; // Process mid-row codes\n } else if (this.isMidRowCode(char0, char1)) {\n // Attributes are not additive, so clear all formatting\n this.clearFormatting(packet.pts); // According to the standard, mid-row codes\n // should be replaced with spaces, so add one now\n\n this[this.mode_](packet.pts, ' ');\n this.column_++;\n\n if ((char1 & 0xe) === 0xe) {\n this.addFormatting(packet.pts, ['i']);\n }\n\n if ((char1 & 0x1) === 0x1) {\n this.addFormatting(packet.pts, ['u']);\n } // Detect offset control codes and adjust cursor\n\n } else if (this.isOffsetControlCode(char0, char1)) {\n // Cursor position is set by indent PAC (see below) in 4-column\n // increments, with an additional offset code of 1-3 to reach any\n // of the 32 columns specified by CEA-608. So all we need to do\n // here is increment the column cursor by the given offset.\n this.column_ += char1 & 0x03; // Detect PACs (Preamble Address Codes)\n } else if (this.isPAC(char0, char1)) {\n // There's no logic for PAC -> row mapping, so we have to just\n // find the row code in an array and use its index :(\n var row = ROWS.indexOf(data & 0x1f20); // Configure the caption window if we're in roll-up mode\n\n if (this.mode_ === 'rollUp') {\n // This implies that the base row is incorrectly set.\n // As per the recommendation in CEA-608(Base Row Implementation), defer to the number\n // of roll-up rows set.\n if (row - this.rollUpRows_ + 1 < 0) {\n row = this.rollUpRows_ - 1;\n }\n\n this.setRollUp(packet.pts, row);\n }\n\n if (row !== this.row_) {\n // formatting is only persistent for current row\n this.clearFormatting(packet.pts);\n this.row_ = row;\n } // All PACs can apply underline, so detect and apply\n // (All odd-numbered second bytes set underline)\n\n\n if (char1 & 0x1 && this.formatting_.indexOf('u') === -1) {\n this.addFormatting(packet.pts, ['u']);\n }\n\n if ((data & 0x10) === 0x10) {\n // We've got an indent level code. Each successive even number\n // increments the column cursor by 4, so we can get the desired\n // column position by bit-shifting to the right (to get n/2)\n // and multiplying by 4.\n this.column_ = ((data & 0xe) >> 1) * 4;\n }\n\n if (this.isColorPAC(char1)) {\n // it's a color code, though we only support white, which\n // can be either normal or italicized. white italics can be\n // either 0x4e or 0x6e depending on the row, so we just\n // bitwise-and with 0xe to see if italics should be turned on\n if ((char1 & 0xe) === 0xe) {\n this.addFormatting(packet.pts, ['i']);\n }\n } // We have a normal character in char0, and possibly one in char1\n\n } else if (this.isNormalChar(char0)) {\n if (char1 === 0x00) {\n char1 = null;\n }\n\n text = getCharFromCode(char0);\n text += getCharFromCode(char1);\n this[this.mode_](packet.pts, text);\n this.column_ += text.length;\n } // finish data processing\n\n };\n};\n\nCea608Stream.prototype = new Stream(); // Trigger a cue point that captures the current state of the\n// display buffer\n\nCea608Stream.prototype.flushDisplayed = function (pts) {\n var content = this.displayed_ // remove spaces from the start and end of the string\n .map(function (row) {\n try {\n return row.trim();\n } catch (e) {\n // Ordinarily, this shouldn't happen. However, caption\n // parsing errors should not throw exceptions and\n // break playback.\n // eslint-disable-next-line no-console\n console.error('Skipping malformed caption.');\n return '';\n }\n }) // combine all text rows to display in one cue\n .join('\\n') // and remove blank rows from the start and end, but not the middle\n .replace(/^\\n+|\\n+$/g, '');\n\n if (content.length) {\n this.trigger('data', {\n startPts: this.startPts_,\n endPts: pts,\n text: content,\n stream: this.name_\n });\n }\n};\n/**\n * Zero out the data, used for startup and on seek\n */\n\n\nCea608Stream.prototype.reset = function () {\n this.mode_ = 'popOn'; // When in roll-up mode, the index of the last row that will\n // actually display captions. If a caption is shifted to a row\n // with a lower index than this, it is cleared from the display\n // buffer\n\n this.topRow_ = 0;\n this.startPts_ = 0;\n this.displayed_ = createDisplayBuffer();\n this.nonDisplayed_ = createDisplayBuffer();\n this.lastControlCode_ = null; // Track row and column for proper line-breaking and spacing\n\n this.column_ = 0;\n this.row_ = BOTTOM_ROW;\n this.rollUpRows_ = 2; // This variable holds currently-applied formatting\n\n this.formatting_ = [];\n};\n/**\n * Sets up control code and related constants for this instance\n */\n\n\nCea608Stream.prototype.setConstants = function () {\n // The following attributes have these uses:\n // ext_ : char0 for mid-row codes, and the base for extended\n // chars (ext_+0, ext_+1, and ext_+2 are char0s for\n // extended codes)\n // control_: char0 for control codes, except byte-shifted to the\n // left so that we can do this.control_ | CONTROL_CODE\n // offset_: char0 for tab offset codes\n //\n // It's also worth noting that control codes, and _only_ control codes,\n // differ between field 1 and field2. Field 2 control codes are always\n // their field 1 value plus 1. That's why there's the \"| field\" on the\n // control value.\n if (this.dataChannel_ === 0) {\n this.BASE_ = 0x10;\n this.EXT_ = 0x11;\n this.CONTROL_ = (0x14 | this.field_) << 8;\n this.OFFSET_ = 0x17;\n } else if (this.dataChannel_ === 1) {\n this.BASE_ = 0x18;\n this.EXT_ = 0x19;\n this.CONTROL_ = (0x1c | this.field_) << 8;\n this.OFFSET_ = 0x1f;\n } // Constants for the LSByte command codes recognized by Cea608Stream. This\n // list is not exhaustive. For a more comprehensive listing and semantics see\n // http://www.gpo.gov/fdsys/pkg/CFR-2010-title47-vol1/pdf/CFR-2010-title47-vol1-sec15-119.pdf\n // Padding\n\n\n this.PADDING_ = 0x0000; // Pop-on Mode\n\n this.RESUME_CAPTION_LOADING_ = this.CONTROL_ | 0x20;\n this.END_OF_CAPTION_ = this.CONTROL_ | 0x2f; // Roll-up Mode\n\n this.ROLL_UP_2_ROWS_ = this.CONTROL_ | 0x25;\n this.ROLL_UP_3_ROWS_ = this.CONTROL_ | 0x26;\n this.ROLL_UP_4_ROWS_ = this.CONTROL_ | 0x27;\n this.CARRIAGE_RETURN_ = this.CONTROL_ | 0x2d; // paint-on mode\n\n this.RESUME_DIRECT_CAPTIONING_ = this.CONTROL_ | 0x29; // Erasure\n\n this.BACKSPACE_ = this.CONTROL_ | 0x21;\n this.ERASE_DISPLAYED_MEMORY_ = this.CONTROL_ | 0x2c;\n this.ERASE_NON_DISPLAYED_MEMORY_ = this.CONTROL_ | 0x2e;\n};\n/**\n * Detects if the 2-byte packet data is a special character\n *\n * Special characters have a second byte in the range 0x30 to 0x3f,\n * with the first byte being 0x11 (for data channel 1) or 0x19 (for\n * data channel 2).\n *\n * @param {Integer} char0 The first byte\n * @param {Integer} char1 The second byte\n * @return {Boolean} Whether the 2 bytes are an special character\n */\n\n\nCea608Stream.prototype.isSpecialCharacter = function (char0, char1) {\n return char0 === this.EXT_ && char1 >= 0x30 && char1 <= 0x3f;\n};\n/**\n * Detects if the 2-byte packet data is an extended character\n *\n * Extended characters have a second byte in the range 0x20 to 0x3f,\n * with the first byte being 0x12 or 0x13 (for data channel 1) or\n * 0x1a or 0x1b (for data channel 2).\n *\n * @param {Integer} char0 The first byte\n * @param {Integer} char1 The second byte\n * @return {Boolean} Whether the 2 bytes are an extended character\n */\n\n\nCea608Stream.prototype.isExtCharacter = function (char0, char1) {\n return (char0 === this.EXT_ + 1 || char0 === this.EXT_ + 2) && char1 >= 0x20 && char1 <= 0x3f;\n};\n/**\n * Detects if the 2-byte packet is a mid-row code\n *\n * Mid-row codes have a second byte in the range 0x20 to 0x2f, with\n * the first byte being 0x11 (for data channel 1) or 0x19 (for data\n * channel 2).\n *\n * @param {Integer} char0 The first byte\n * @param {Integer} char1 The second byte\n * @return {Boolean} Whether the 2 bytes are a mid-row code\n */\n\n\nCea608Stream.prototype.isMidRowCode = function (char0, char1) {\n return char0 === this.EXT_ && char1 >= 0x20 && char1 <= 0x2f;\n};\n/**\n * Detects if the 2-byte packet is an offset control code\n *\n * Offset control codes have a second byte in the range 0x21 to 0x23,\n * with the first byte being 0x17 (for data channel 1) or 0x1f (for\n * data channel 2).\n *\n * @param {Integer} char0 The first byte\n * @param {Integer} char1 The second byte\n * @return {Boolean} Whether the 2 bytes are an offset control code\n */\n\n\nCea608Stream.prototype.isOffsetControlCode = function (char0, char1) {\n return char0 === this.OFFSET_ && char1 >= 0x21 && char1 <= 0x23;\n};\n/**\n * Detects if the 2-byte packet is a Preamble Address Code\n *\n * PACs have a first byte in the range 0x10 to 0x17 (for data channel 1)\n * or 0x18 to 0x1f (for data channel 2), with the second byte in the\n * range 0x40 to 0x7f.\n *\n * @param {Integer} char0 The first byte\n * @param {Integer} char1 The second byte\n * @return {Boolean} Whether the 2 bytes are a PAC\n */\n\n\nCea608Stream.prototype.isPAC = function (char0, char1) {\n return char0 >= this.BASE_ && char0 < this.BASE_ + 8 && char1 >= 0x40 && char1 <= 0x7f;\n};\n/**\n * Detects if a packet's second byte is in the range of a PAC color code\n *\n * PAC color codes have the second byte be in the range 0x40 to 0x4f, or\n * 0x60 to 0x6f.\n *\n * @param {Integer} char1 The second byte\n * @return {Boolean} Whether the byte is a color PAC\n */\n\n\nCea608Stream.prototype.isColorPAC = function (char1) {\n return char1 >= 0x40 && char1 <= 0x4f || char1 >= 0x60 && char1 <= 0x7f;\n};\n/**\n * Detects if a single byte is in the range of a normal character\n *\n * Normal text bytes are in the range 0x20 to 0x7f.\n *\n * @param {Integer} char The byte\n * @return {Boolean} Whether the byte is a normal character\n */\n\n\nCea608Stream.prototype.isNormalChar = function (char) {\n return char >= 0x20 && char <= 0x7f;\n};\n/**\n * Configures roll-up\n *\n * @param {Integer} pts Current PTS\n * @param {Integer} newBaseRow Used by PACs to slide the current window to\n * a new position\n */\n\n\nCea608Stream.prototype.setRollUp = function (pts, newBaseRow) {\n // Reset the base row to the bottom row when switching modes\n if (this.mode_ !== 'rollUp') {\n this.row_ = BOTTOM_ROW;\n this.mode_ = 'rollUp'; // Spec says to wipe memories when switching to roll-up\n\n this.flushDisplayed(pts);\n this.nonDisplayed_ = createDisplayBuffer();\n this.displayed_ = createDisplayBuffer();\n }\n\n if (newBaseRow !== undefined && newBaseRow !== this.row_) {\n // move currently displayed captions (up or down) to the new base row\n for (var i = 0; i < this.rollUpRows_; i++) {\n this.displayed_[newBaseRow - i] = this.displayed_[this.row_ - i];\n this.displayed_[this.row_ - i] = '';\n }\n }\n\n if (newBaseRow === undefined) {\n newBaseRow = this.row_;\n }\n\n this.topRow_ = newBaseRow - this.rollUpRows_ + 1;\n}; // Adds the opening HTML tag for the passed character to the caption text,\n// and keeps track of it for later closing\n\n\nCea608Stream.prototype.addFormatting = function (pts, format) {\n this.formatting_ = this.formatting_.concat(format);\n var text = format.reduce(function (text, format) {\n return text + '<' + format + '>';\n }, '');\n this[this.mode_](pts, text);\n}; // Adds HTML closing tags for current formatting to caption text and\n// clears remembered formatting\n\n\nCea608Stream.prototype.clearFormatting = function (pts) {\n if (!this.formatting_.length) {\n return;\n }\n\n var text = this.formatting_.reverse().reduce(function (text, format) {\n return text + '</' + format + '>';\n }, '');\n this.formatting_ = [];\n this[this.mode_](pts, text);\n}; // Mode Implementations\n\n\nCea608Stream.prototype.popOn = function (pts, text) {\n var baseRow = this.nonDisplayed_[this.row_]; // buffer characters\n\n baseRow += text;\n this.nonDisplayed_[this.row_] = baseRow;\n};\n\nCea608Stream.prototype.rollUp = function (pts, text) {\n var baseRow = this.displayed_[this.row_];\n baseRow += text;\n this.displayed_[this.row_] = baseRow;\n};\n\nCea608Stream.prototype.shiftRowsUp_ = function () {\n var i; // clear out inactive rows\n\n for (i = 0; i < this.topRow_; i++) {\n this.displayed_[i] = '';\n }\n\n for (i = this.row_ + 1; i < BOTTOM_ROW + 1; i++) {\n this.displayed_[i] = '';\n } // shift displayed rows up\n\n\n for (i = this.topRow_; i < this.row_; i++) {\n this.displayed_[i] = this.displayed_[i + 1];\n } // clear out the bottom row\n\n\n this.displayed_[this.row_] = '';\n};\n\nCea608Stream.prototype.paintOn = function (pts, text) {\n var baseRow = this.displayed_[this.row_];\n baseRow += text;\n this.displayed_[this.row_] = baseRow;\n}; // exports\n\n\nmodule.exports = {\n CaptionStream: CaptionStream,\n Cea608Stream: Cea608Stream\n};","/**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Parse mpeg2 transport stream packets to extract basic timing information\n */\n'use strict';\n\nvar StreamTypes = require('../m2ts/stream-types.js');\n\nvar handleRollover = require('../m2ts/timestamp-rollover-stream.js').handleRollover;\n\nvar probe = {};\nprobe.ts = require('../m2ts/probe.js');\nprobe.aac = require('../aac/utils.js');\n\nvar ONE_SECOND_IN_TS = require('../utils/clock').ONE_SECOND_IN_TS;\n\nvar MP2T_PACKET_LENGTH = 188,\n // bytes\nSYNC_BYTE = 0x47;\n/**\n * walks through segment data looking for pat and pmt packets to parse out\n * program map table information\n */\n\nvar parsePsi_ = function parsePsi_(bytes, pmt) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n packet,\n type;\n\n while (endIndex < bytes.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n\n switch (type) {\n case 'pat':\n if (!pmt.pid) {\n pmt.pid = probe.ts.parsePat(packet);\n }\n\n break;\n\n case 'pmt':\n if (!pmt.table) {\n pmt.table = probe.ts.parsePmt(packet);\n }\n\n break;\n\n default:\n break;\n } // Found the pat and pmt, we can stop walking the segment\n\n\n if (pmt.pid && pmt.table) {\n return;\n }\n\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n\n startIndex++;\n endIndex++;\n }\n};\n/**\n * walks through the segment data from the start and end to get timing information\n * for the first and last audio pes packets\n */\n\n\nvar parseAudioPes_ = function parseAudioPes_(bytes, pmt, result) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n packet,\n type,\n pesType,\n pusi,\n parsed;\n var endLoop = false; // Start walking from start of segment to get first audio packet\n\n while (endIndex <= bytes.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n\n if (pesType === 'audio' && pusi) {\n parsed = probe.ts.parsePesTime(packet);\n\n if (parsed) {\n parsed.type = 'audio';\n result.audio.push(parsed);\n endLoop = true;\n }\n }\n\n break;\n\n default:\n break;\n }\n\n if (endLoop) {\n break;\n }\n\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n\n startIndex++;\n endIndex++;\n } // Start walking from end of segment to get last audio packet\n\n\n endIndex = bytes.byteLength;\n startIndex = endIndex - MP2T_PACKET_LENGTH;\n endLoop = false;\n\n while (startIndex >= 0) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n\n if (pesType === 'audio' && pusi) {\n parsed = probe.ts.parsePesTime(packet);\n\n if (parsed) {\n parsed.type = 'audio';\n result.audio.push(parsed);\n endLoop = true;\n }\n }\n\n break;\n\n default:\n break;\n }\n\n if (endLoop) {\n break;\n }\n\n startIndex -= MP2T_PACKET_LENGTH;\n endIndex -= MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n\n startIndex--;\n endIndex--;\n }\n};\n/**\n * walks through the segment data from the start and end to get timing information\n * for the first and last video pes packets as well as timing information for the first\n * key frame.\n */\n\n\nvar parseVideoPes_ = function parseVideoPes_(bytes, pmt, result) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n packet,\n type,\n pesType,\n pusi,\n parsed,\n frame,\n i,\n pes;\n var endLoop = false;\n var currentFrame = {\n data: [],\n size: 0\n }; // Start walking from start of segment to get first video packet\n\n while (endIndex < bytes.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n\n if (pesType === 'video') {\n if (pusi && !endLoop) {\n parsed = probe.ts.parsePesTime(packet);\n\n if (parsed) {\n parsed.type = 'video';\n result.video.push(parsed);\n endLoop = true;\n }\n }\n\n if (!result.firstKeyFrame) {\n if (pusi) {\n if (currentFrame.size !== 0) {\n frame = new Uint8Array(currentFrame.size);\n i = 0;\n\n while (currentFrame.data.length) {\n pes = currentFrame.data.shift();\n frame.set(pes, i);\n i += pes.byteLength;\n }\n\n if (probe.ts.videoPacketContainsKeyFrame(frame)) {\n var firstKeyFrame = probe.ts.parsePesTime(frame); // PTS/DTS may not be available. Simply *not* setting\n // the keyframe seems to work fine with HLS playback\n // and definitely preferable to a crash with TypeError...\n\n if (firstKeyFrame) {\n result.firstKeyFrame = firstKeyFrame;\n result.firstKeyFrame.type = 'video';\n } else {\n // eslint-disable-next-line\n console.warn('Failed to extract PTS/DTS from PES at first keyframe. ' + 'This could be an unusual TS segment, or else mux.js did not ' + 'parse your TS segment correctly. If you know your TS ' + 'segments do contain PTS/DTS on keyframes please file a bug ' + 'report! You can try ffprobe to double check for yourself.');\n }\n }\n\n currentFrame.size = 0;\n }\n }\n\n currentFrame.data.push(packet);\n currentFrame.size += packet.byteLength;\n }\n }\n\n break;\n\n default:\n break;\n }\n\n if (endLoop && result.firstKeyFrame) {\n break;\n }\n\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n\n startIndex++;\n endIndex++;\n } // Start walking from end of segment to get last video packet\n\n\n endIndex = bytes.byteLength;\n startIndex = endIndex - MP2T_PACKET_LENGTH;\n endLoop = false;\n\n while (startIndex >= 0) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n\n if (pesType === 'video' && pusi) {\n parsed = probe.ts.parsePesTime(packet);\n\n if (parsed) {\n parsed.type = 'video';\n result.video.push(parsed);\n endLoop = true;\n }\n }\n\n break;\n\n default:\n break;\n }\n\n if (endLoop) {\n break;\n }\n\n startIndex -= MP2T_PACKET_LENGTH;\n endIndex -= MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n\n startIndex--;\n endIndex--;\n }\n};\n/**\n * Adjusts the timestamp information for the segment to account for\n * rollover and convert to seconds based on pes packet timescale (90khz clock)\n */\n\n\nvar adjustTimestamp_ = function adjustTimestamp_(segmentInfo, baseTimestamp) {\n if (segmentInfo.audio && segmentInfo.audio.length) {\n var audioBaseTimestamp = baseTimestamp;\n\n if (typeof audioBaseTimestamp === 'undefined') {\n audioBaseTimestamp = segmentInfo.audio[0].dts;\n }\n\n segmentInfo.audio.forEach(function (info) {\n info.dts = handleRollover(info.dts, audioBaseTimestamp);\n info.pts = handleRollover(info.pts, audioBaseTimestamp); // time in seconds\n\n info.dtsTime = info.dts / ONE_SECOND_IN_TS;\n info.ptsTime = info.pts / ONE_SECOND_IN_TS;\n });\n }\n\n if (segmentInfo.video && segmentInfo.video.length) {\n var videoBaseTimestamp = baseTimestamp;\n\n if (typeof videoBaseTimestamp === 'undefined') {\n videoBaseTimestamp = segmentInfo.video[0].dts;\n }\n\n segmentInfo.video.forEach(function (info) {\n info.dts = handleRollover(info.dts, videoBaseTimestamp);\n info.pts = handleRollover(info.pts, videoBaseTimestamp); // time in seconds\n\n info.dtsTime = info.dts / ONE_SECOND_IN_TS;\n info.ptsTime = info.pts / ONE_SECOND_IN_TS;\n });\n\n if (segmentInfo.firstKeyFrame) {\n var frame = segmentInfo.firstKeyFrame;\n frame.dts = handleRollover(frame.dts, videoBaseTimestamp);\n frame.pts = handleRollover(frame.pts, videoBaseTimestamp); // time in seconds\n\n frame.dtsTime = frame.dts / ONE_SECOND_IN_TS;\n frame.ptsTime = frame.dts / ONE_SECOND_IN_TS;\n }\n }\n};\n/**\n * inspects the aac data stream for start and end time information\n */\n\n\nvar inspectAac_ = function inspectAac_(bytes) {\n var endLoop = false,\n audioCount = 0,\n sampleRate = null,\n timestamp = null,\n frameSize = 0,\n byteIndex = 0,\n packet;\n\n while (bytes.length - byteIndex >= 3) {\n var type = probe.aac.parseType(bytes, byteIndex);\n\n switch (type) {\n case 'timed-metadata':\n // Exit early because we don't have enough to parse\n // the ID3 tag header\n if (bytes.length - byteIndex < 10) {\n endLoop = true;\n break;\n }\n\n frameSize = probe.aac.parseId3TagSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n\n if (frameSize > bytes.length) {\n endLoop = true;\n break;\n }\n\n if (timestamp === null) {\n packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n timestamp = probe.aac.parseAacTimestamp(packet);\n }\n\n byteIndex += frameSize;\n break;\n\n case 'audio':\n // Exit early because we don't have enough to parse\n // the ADTS frame header\n if (bytes.length - byteIndex < 7) {\n endLoop = true;\n break;\n }\n\n frameSize = probe.aac.parseAdtsSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n\n if (frameSize > bytes.length) {\n endLoop = true;\n break;\n }\n\n if (sampleRate === null) {\n packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n sampleRate = probe.aac.parseSampleRate(packet);\n }\n\n audioCount++;\n byteIndex += frameSize;\n break;\n\n default:\n byteIndex++;\n break;\n }\n\n if (endLoop) {\n return null;\n }\n }\n\n if (sampleRate === null || timestamp === null) {\n return null;\n }\n\n var audioTimescale = ONE_SECOND_IN_TS / sampleRate;\n var result = {\n audio: [{\n type: 'audio',\n dts: timestamp,\n pts: timestamp\n }, {\n type: 'audio',\n dts: timestamp + audioCount * 1024 * audioTimescale,\n pts: timestamp + audioCount * 1024 * audioTimescale\n }]\n };\n return result;\n};\n/**\n * inspects the transport stream segment data for start and end time information\n * of the audio and video tracks (when present) as well as the first key frame's\n * start time.\n */\n\n\nvar inspectTs_ = function inspectTs_(bytes) {\n var pmt = {\n pid: null,\n table: null\n };\n var result = {};\n parsePsi_(bytes, pmt);\n\n for (var pid in pmt.table) {\n if (pmt.table.hasOwnProperty(pid)) {\n var type = pmt.table[pid];\n\n switch (type) {\n case StreamTypes.H264_STREAM_TYPE:\n result.video = [];\n parseVideoPes_(bytes, pmt, result);\n\n if (result.video.length === 0) {\n delete result.video;\n }\n\n break;\n\n case StreamTypes.ADTS_STREAM_TYPE:\n result.audio = [];\n parseAudioPes_(bytes, pmt, result);\n\n if (result.audio.length === 0) {\n delete result.audio;\n }\n\n break;\n\n default:\n break;\n }\n }\n }\n\n return result;\n};\n/**\n * Inspects segment byte data and returns an object with start and end timing information\n *\n * @param {Uint8Array} bytes The segment byte data\n * @param {Number} baseTimestamp Relative reference timestamp used when adjusting frame\n * timestamps for rollover. This value must be in 90khz clock.\n * @return {Object} Object containing start and end frame timing info of segment.\n */\n\n\nvar inspect = function inspect(bytes, baseTimestamp) {\n var isAacData = probe.aac.isLikelyAacData(bytes);\n var result;\n\n if (isAacData) {\n result = inspectAac_(bytes);\n } else {\n result = inspectTs_(bytes);\n }\n\n if (!result || !result.audio && !result.video) {\n return null;\n }\n\n adjustTimestamp_(result, baseTimestamp);\n return result;\n};\n\nmodule.exports = {\n inspect: inspect,\n parseAudioPes_: parseAudioPes_\n};","/**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Accepts program elementary stream (PES) data events and corrects\n * decode and presentation time stamps to account for a rollover\n * of the 33 bit value.\n */\n'use strict';\n\nvar Stream = require('../utils/stream');\n\nvar MAX_TS = 8589934592;\nvar RO_THRESH = 4294967296;\nvar TYPE_SHARED = 'shared';\n\nvar handleRollover = function handleRollover(value, reference) {\n var direction = 1;\n\n if (value > reference) {\n // If the current timestamp value is greater than our reference timestamp and we detect a\n // timestamp rollover, this means the roll over is happening in the opposite direction.\n // Example scenario: Enter a long stream/video just after a rollover occurred. The reference\n // point will be set to a small number, e.g. 1. The user then seeks backwards over the\n // rollover point. In loading this segment, the timestamp values will be very large,\n // e.g. 2^33 - 1. Since this comes before the data we loaded previously, we want to adjust\n // the time stamp to be `value - 2^33`.\n direction = -1;\n } // Note: A seek forwards or back that is greater than the RO_THRESH (2^32, ~13 hours) will\n // cause an incorrect adjustment.\n\n\n while (Math.abs(reference - value) > RO_THRESH) {\n value += direction * MAX_TS;\n }\n\n return value;\n};\n\nvar TimestampRolloverStream = function TimestampRolloverStream(type) {\n var lastDTS, referenceDTS;\n TimestampRolloverStream.prototype.init.call(this); // The \"shared\" type is used in cases where a stream will contain muxed\n // video and audio. We could use `undefined` here, but having a string\n // makes debugging a little clearer.\n\n this.type_ = type || TYPE_SHARED;\n\n this.push = function (data) {\n // Any \"shared\" rollover streams will accept _all_ data. Otherwise,\n // streams will only accept data that matches their type.\n if (this.type_ !== TYPE_SHARED && data.type !== this.type_) {\n return;\n }\n\n if (referenceDTS === undefined) {\n referenceDTS = data.dts;\n }\n\n data.dts = handleRollover(data.dts, referenceDTS);\n data.pts = handleRollover(data.pts, referenceDTS);\n lastDTS = data.dts;\n this.trigger('data', data);\n };\n\n this.flush = function () {\n referenceDTS = lastDTS;\n this.trigger('done');\n };\n\n this.endTimeline = function () {\n this.flush();\n this.trigger('endedtimeline');\n };\n\n this.discontinuity = function () {\n referenceDTS = void 0;\n lastDTS = void 0;\n };\n\n this.reset = function () {\n this.discontinuity();\n this.trigger('reset');\n };\n};\n\nTimestampRolloverStream.prototype = new Stream();\nmodule.exports = {\n TimestampRolloverStream: TimestampRolloverStream,\n handleRollover: handleRollover\n};","/**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Utilities to detect basic properties and metadata about TS Segments.\n */\n'use strict';\n\nvar StreamTypes = require('./stream-types.js');\n\nvar parsePid = function parsePid(packet) {\n var pid = packet[1] & 0x1f;\n pid <<= 8;\n pid |= packet[2];\n return pid;\n};\n\nvar parsePayloadUnitStartIndicator = function parsePayloadUnitStartIndicator(packet) {\n return !!(packet[1] & 0x40);\n};\n\nvar parseAdaptionField = function parseAdaptionField(packet) {\n var offset = 0; // if an adaption field is present, its length is specified by the\n // fifth byte of the TS packet header. The adaptation field is\n // used to add stuffing to PES packets that don't fill a complete\n // TS packet, and to specify some forms of timing and control data\n // that we do not currently use.\n\n if ((packet[3] & 0x30) >>> 4 > 0x01) {\n offset += packet[4] + 1;\n }\n\n return offset;\n};\n\nvar parseType = function parseType(packet, pmtPid) {\n var pid = parsePid(packet);\n\n if (pid === 0) {\n return 'pat';\n } else if (pid === pmtPid) {\n return 'pmt';\n } else if (pmtPid) {\n return 'pes';\n }\n\n return null;\n};\n\nvar parsePat = function parsePat(packet) {\n var pusi = parsePayloadUnitStartIndicator(packet);\n var offset = 4 + parseAdaptionField(packet);\n\n if (pusi) {\n offset += packet[offset] + 1;\n }\n\n return (packet[offset + 10] & 0x1f) << 8 | packet[offset + 11];\n};\n\nvar parsePmt = function parsePmt(packet) {\n var programMapTable = {};\n var pusi = parsePayloadUnitStartIndicator(packet);\n var payloadOffset = 4 + parseAdaptionField(packet);\n\n if (pusi) {\n payloadOffset += packet[payloadOffset] + 1;\n } // PMTs can be sent ahead of the time when they should actually\n // take effect. We don't believe this should ever be the case\n // for HLS but we'll ignore \"forward\" PMT declarations if we see\n // them. Future PMT declarations have the current_next_indicator\n // set to zero.\n\n\n if (!(packet[payloadOffset + 5] & 0x01)) {\n return;\n }\n\n var sectionLength, tableEnd, programInfoLength; // the mapping table ends at the end of the current section\n\n sectionLength = (packet[payloadOffset + 1] & 0x0f) << 8 | packet[payloadOffset + 2];\n tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\n // long the program info descriptors are\n\n programInfoLength = (packet[payloadOffset + 10] & 0x0f) << 8 | packet[payloadOffset + 11]; // advance the offset to the first entry in the mapping table\n\n var offset = 12 + programInfoLength;\n\n while (offset < tableEnd) {\n var i = payloadOffset + offset; // add an entry that maps the elementary_pid to the stream_type\n\n programMapTable[(packet[i + 1] & 0x1F) << 8 | packet[i + 2]] = packet[i]; // move to the next table entry\n // skip past the elementary stream descriptors, if present\n\n offset += ((packet[i + 3] & 0x0F) << 8 | packet[i + 4]) + 5;\n }\n\n return programMapTable;\n};\n\nvar parsePesType = function parsePesType(packet, programMapTable) {\n var pid = parsePid(packet);\n var type = programMapTable[pid];\n\n switch (type) {\n case StreamTypes.H264_STREAM_TYPE:\n return 'video';\n\n case StreamTypes.ADTS_STREAM_TYPE:\n return 'audio';\n\n case StreamTypes.METADATA_STREAM_TYPE:\n return 'timed-metadata';\n\n default:\n return null;\n }\n};\n\nvar parsePesTime = function parsePesTime(packet) {\n var pusi = parsePayloadUnitStartIndicator(packet);\n\n if (!pusi) {\n return null;\n }\n\n var offset = 4 + parseAdaptionField(packet);\n\n if (offset >= packet.byteLength) {\n // From the H 222.0 MPEG-TS spec\n // \"For transport stream packets carrying PES packets, stuffing is needed when there\n // is insufficient PES packet data to completely fill the transport stream packet\n // payload bytes. Stuffing is accomplished by defining an adaptation field longer than\n // the sum of the lengths of the data elements in it, so that the payload bytes\n // remaining after the adaptation field exactly accommodates the available PES packet\n // data.\"\n //\n // If the offset is >= the length of the packet, then the packet contains no data\n // and instead is just adaption field stuffing bytes\n return null;\n }\n\n var pes = null;\n var ptsDtsFlags; // PES packets may be annotated with a PTS value, or a PTS value\n // and a DTS value. Determine what combination of values is\n // available to work with.\n\n ptsDtsFlags = packet[offset + 7]; // PTS and DTS are normally stored as a 33-bit number. Javascript\n // performs all bitwise operations on 32-bit integers but javascript\n // supports a much greater range (52-bits) of integer using standard\n // mathematical operations.\n // We construct a 31-bit value using bitwise operators over the 31\n // most significant bits and then multiply by 4 (equal to a left-shift\n // of 2) before we add the final 2 least significant bits of the\n // timestamp (equal to an OR.)\n\n if (ptsDtsFlags & 0xC0) {\n pes = {}; // the PTS and DTS are not written out directly. For information\n // on how they are encoded, see\n // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n\n pes.pts = (packet[offset + 9] & 0x0E) << 27 | (packet[offset + 10] & 0xFF) << 20 | (packet[offset + 11] & 0xFE) << 12 | (packet[offset + 12] & 0xFF) << 5 | (packet[offset + 13] & 0xFE) >>> 3;\n pes.pts *= 4; // Left shift by 2\n\n pes.pts += (packet[offset + 13] & 0x06) >>> 1; // OR by the two LSBs\n\n pes.dts = pes.pts;\n\n if (ptsDtsFlags & 0x40) {\n pes.dts = (packet[offset + 14] & 0x0E) << 27 | (packet[offset + 15] & 0xFF) << 20 | (packet[offset + 16] & 0xFE) << 12 | (packet[offset + 17] & 0xFF) << 5 | (packet[offset + 18] & 0xFE) >>> 3;\n pes.dts *= 4; // Left shift by 2\n\n pes.dts += (packet[offset + 18] & 0x06) >>> 1; // OR by the two LSBs\n }\n }\n\n return pes;\n};\n\nvar parseNalUnitType = function parseNalUnitType(type) {\n switch (type) {\n case 0x05:\n return 'slice_layer_without_partitioning_rbsp_idr';\n\n case 0x06:\n return 'sei_rbsp';\n\n case 0x07:\n return 'seq_parameter_set_rbsp';\n\n case 0x08:\n return 'pic_parameter_set_rbsp';\n\n case 0x09:\n return 'access_unit_delimiter_rbsp';\n\n default:\n return null;\n }\n};\n\nvar videoPacketContainsKeyFrame = function videoPacketContainsKeyFrame(packet) {\n var offset = 4 + parseAdaptionField(packet);\n var frameBuffer = packet.subarray(offset);\n var frameI = 0;\n var frameSyncPoint = 0;\n var foundKeyFrame = false;\n var nalType; // advance the sync point to a NAL start, if necessary\n\n for (; frameSyncPoint < frameBuffer.byteLength - 3; frameSyncPoint++) {\n if (frameBuffer[frameSyncPoint + 2] === 1) {\n // the sync point is properly aligned\n frameI = frameSyncPoint + 5;\n break;\n }\n }\n\n while (frameI < frameBuffer.byteLength) {\n // look at the current byte to determine if we've hit the end of\n // a NAL unit boundary\n switch (frameBuffer[frameI]) {\n case 0:\n // skip past non-sync sequences\n if (frameBuffer[frameI - 1] !== 0) {\n frameI += 2;\n break;\n } else if (frameBuffer[frameI - 2] !== 0) {\n frameI++;\n break;\n }\n\n if (frameSyncPoint + 3 !== frameI - 2) {\n nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n\n if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n foundKeyFrame = true;\n }\n } // drop trailing zeroes\n\n\n do {\n frameI++;\n } while (frameBuffer[frameI] !== 1 && frameI < frameBuffer.length);\n\n frameSyncPoint = frameI - 2;\n frameI += 3;\n break;\n\n case 1:\n // skip past non-sync sequences\n if (frameBuffer[frameI - 1] !== 0 || frameBuffer[frameI - 2] !== 0) {\n frameI += 3;\n break;\n }\n\n nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n\n if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n foundKeyFrame = true;\n }\n\n frameSyncPoint = frameI - 2;\n frameI += 3;\n break;\n\n default:\n // the current byte isn't a one or zero, so it cannot be part\n // of a sync sequence\n frameI += 3;\n break;\n }\n }\n\n frameBuffer = frameBuffer.subarray(frameSyncPoint);\n frameI -= frameSyncPoint;\n frameSyncPoint = 0; // parse the final nal\n\n if (frameBuffer && frameBuffer.byteLength > 3) {\n nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n\n if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n foundKeyFrame = true;\n }\n }\n\n return foundKeyFrame;\n};\n\nmodule.exports = {\n parseType: parseType,\n parsePat: parsePat,\n parsePmt: parsePmt,\n parsePayloadUnitStartIndicator: parsePayloadUnitStartIndicator,\n parsePesType: parsePesType,\n parsePesTime: parsePesTime,\n videoPacketContainsKeyFrame: videoPacketContainsKeyFrame\n};","/**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Utilities to detect basic properties and metadata about Aac data.\n */\n'use strict';\n\nvar ADTS_SAMPLING_FREQUENCIES = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n\nvar isLikelyAacData = function isLikelyAacData(data) {\n if (data[0] === 'I'.charCodeAt(0) && data[1] === 'D'.charCodeAt(0) && data[2] === '3'.charCodeAt(0)) {\n return true;\n }\n\n return false;\n};\n\nvar parseSyncSafeInteger = function parseSyncSafeInteger(data) {\n return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\n}; // return a percent-encoded representation of the specified byte range\n// @see http://en.wikipedia.org/wiki/Percent-encoding\n\n\nvar percentEncode = function percentEncode(bytes, start, end) {\n var i,\n result = '';\n\n for (i = start; i < end; i++) {\n result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\n }\n\n return result;\n}; // return the string representation of the specified byte range,\n// interpreted as ISO-8859-1.\n\n\nvar parseIso88591 = function parseIso88591(bytes, start, end) {\n return unescape(percentEncode(bytes, start, end)); // jshint ignore:line\n};\n\nvar parseId3TagSize = function parseId3TagSize(header, byteIndex) {\n var returnSize = header[byteIndex + 6] << 21 | header[byteIndex + 7] << 14 | header[byteIndex + 8] << 7 | header[byteIndex + 9],\n flags = header[byteIndex + 5],\n footerPresent = (flags & 16) >> 4;\n\n if (footerPresent) {\n return returnSize + 20;\n }\n\n return returnSize + 10;\n};\n\nvar parseAdtsSize = function parseAdtsSize(header, byteIndex) {\n var lowThree = (header[byteIndex + 5] & 0xE0) >> 5,\n middle = header[byteIndex + 4] << 3,\n highTwo = header[byteIndex + 3] & 0x3 << 11;\n return highTwo | middle | lowThree;\n};\n\nvar parseType = function parseType(header, byteIndex) {\n if (header[byteIndex] === 'I'.charCodeAt(0) && header[byteIndex + 1] === 'D'.charCodeAt(0) && header[byteIndex + 2] === '3'.charCodeAt(0)) {\n return 'timed-metadata';\n } else if (header[byteIndex] & 0xff === 0xff && (header[byteIndex + 1] & 0xf0) === 0xf0) {\n return 'audio';\n }\n\n return null;\n};\n\nvar parseSampleRate = function parseSampleRate(packet) {\n var i = 0;\n\n while (i + 5 < packet.length) {\n if (packet[i] !== 0xFF || (packet[i + 1] & 0xF6) !== 0xF0) {\n // If a valid header was not found, jump one forward and attempt to\n // find a valid ADTS header starting at the next byte\n i++;\n continue;\n }\n\n return ADTS_SAMPLING_FREQUENCIES[(packet[i + 2] & 0x3c) >>> 2];\n }\n\n return null;\n};\n\nvar parseAacTimestamp = function parseAacTimestamp(packet) {\n var frameStart, frameSize, frame, frameHeader; // find the start of the first frame and the end of the tag\n\n frameStart = 10;\n\n if (packet[5] & 0x40) {\n // advance the frame start past the extended header\n frameStart += 4; // header size field\n\n frameStart += parseSyncSafeInteger(packet.subarray(10, 14));\n } // parse one or more ID3 frames\n // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n\n do {\n // determine the number of bytes in this frame\n frameSize = parseSyncSafeInteger(packet.subarray(frameStart + 4, frameStart + 8));\n\n if (frameSize < 1) {\n return null;\n }\n\n frameHeader = String.fromCharCode(packet[frameStart], packet[frameStart + 1], packet[frameStart + 2], packet[frameStart + 3]);\n\n if (frameHeader === 'PRIV') {\n frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10);\n\n for (var i = 0; i < frame.byteLength; i++) {\n if (frame[i] === 0) {\n var owner = parseIso88591(frame, 0, i);\n\n if (owner === 'com.apple.streaming.transportStreamTimestamp') {\n var d = frame.subarray(i + 1);\n var size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\n size *= 4;\n size += d[7] & 0x03;\n return size;\n }\n\n break;\n }\n }\n }\n\n frameStart += 10; // advance past the frame header\n\n frameStart += frameSize; // advance past the frame body\n } while (frameStart < packet.byteLength);\n\n return null;\n};\n\nmodule.exports = {\n isLikelyAacData: isLikelyAacData,\n parseId3TagSize: parseId3TagSize,\n parseAdtsSize: parseAdtsSize,\n parseType: parseType,\n parseSampleRate: parseSampleRate,\n parseAacTimestamp: parseAacTimestamp\n};","/**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\nvar ONE_SECOND_IN_TS = 90000,\n // 90kHz clock\nsecondsToVideoTs,\n secondsToAudioTs,\n videoTsToSeconds,\n audioTsToSeconds,\n audioTsToVideoTs,\n videoTsToAudioTs,\n metadataTsToSeconds;\n\nsecondsToVideoTs = function secondsToVideoTs(seconds) {\n return seconds * ONE_SECOND_IN_TS;\n};\n\nsecondsToAudioTs = function secondsToAudioTs(seconds, sampleRate) {\n return seconds * sampleRate;\n};\n\nvideoTsToSeconds = function videoTsToSeconds(timestamp) {\n return timestamp / ONE_SECOND_IN_TS;\n};\n\naudioTsToSeconds = function audioTsToSeconds(timestamp, sampleRate) {\n return timestamp / sampleRate;\n};\n\naudioTsToVideoTs = function audioTsToVideoTs(timestamp, sampleRate) {\n return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate));\n};\n\nvideoTsToAudioTs = function videoTsToAudioTs(timestamp, sampleRate) {\n return secondsToAudioTs(videoTsToSeconds(timestamp), sampleRate);\n};\n/**\n * Adjust ID3 tag or caption timing information by the timeline pts values\n * (if keepOriginalTimestamps is false) and convert to seconds\n */\n\n\nmetadataTsToSeconds = function metadataTsToSeconds(timestamp, timelineStartPts, keepOriginalTimestamps) {\n return videoTsToSeconds(keepOriginalTimestamps ? timestamp : timestamp - timelineStartPts);\n};\n\nmodule.exports = {\n ONE_SECOND_IN_TS: ONE_SECOND_IN_TS,\n secondsToVideoTs: secondsToVideoTs,\n secondsToAudioTs: secondsToAudioTs,\n videoTsToSeconds: videoTsToSeconds,\n audioTsToSeconds: audioTsToSeconds,\n audioTsToVideoTs: audioTsToVideoTs,\n videoTsToAudioTs: videoTsToAudioTs,\n metadataTsToSeconds: metadataTsToSeconds\n};"],"sourceRoot":""}