{"version":3,"sources":["webpack://dashjs/webpack/universalModuleDefinition","webpack://dashjs/webpack/bootstrap","webpack://dashjs/./src/dash/constants/DashConstants.js","webpack://dashjs/./src/streaming/constants/Constants.js","webpack://dashjs/./src/core/events/Events.js","webpack://dashjs/./src/core/events/CoreEvents.js","webpack://dashjs/./src/core/FactoryMaker.js","webpack://dashjs/./src/streaming/MediaPlayerEvents.js","webpack://dashjs/./src/streaming/vo/metrics/HTTPRequest.js","webpack://dashjs/./src/core/Debug.js","webpack://dashjs/./src/core/EventBus.js","webpack://dashjs/./src/streaming/vo/DashJSError.js","webpack://dashjs/./src/core/errors/Errors.js","webpack://dashjs/./src/dash/utils/SegmentsUtils.js","webpack://dashjs/./src/streaming/utils/DefaultURLUtils.js","webpack://dashjs/./src/streaming/utils/URLUtils.js","webpack://dashjs/./src/streaming/vo/FragmentRequest.js","webpack://dashjs/./src/streaming/utils/SupervisorTools.js","webpack://dashjs/./src/core/Utils.js","webpack://dashjs/./src/core/Settings.js","webpack://dashjs/./src/streaming/metrics/MetricsReportingEvents.js","webpack://dashjs/./src/core/events/EventsBase.js","webpack://dashjs/./src/streaming/models/FragmentModel.js","webpack://dashjs/./src/streaming/net/URLLoader.js","webpack://dashjs/./src/streaming/vo/IsoBox.js","webpack://dashjs/./src/streaming/utils/IsoFile.js","webpack://dashjs/./src/streaming/vo/IsoBoxSearchInfo.js","webpack://dashjs/./src/streaming/utils/BoxParser.js","webpack://dashjs/(webpack)/buildin/global.js","webpack://dashjs/./node_modules/codem-isoboxer/dist/iso_boxer.js","webpack://dashjs/./src/streaming/utils/RequestModifier.js","webpack://dashjs/./src/core/errors/ErrorsBase.js","webpack://dashjs/./src/streaming/net/XHRLoader.js","webpack://dashjs/./node_modules/process/browser.js","webpack://dashjs/./src/dash/vo/Segment.js","webpack://dashjs/./src/dash/vo/Representation.js","webpack://dashjs/./src/dash/vo/AdaptationSet.js","webpack://dashjs/./src/dash/vo/Period.js","webpack://dashjs/./src/dash/vo/Mpd.js","webpack://dashjs/./src/dash/vo/EventStream.js","webpack://dashjs/./src/dash/models/DashManifestModel.js","webpack://dashjs/./src/streaming/vo/ThumbnailTrackInfo.js","webpack://dashjs/./src/streaming/thumbnail/ThumbnailTracks.js","webpack://dashjs/./node_modules/readable-stream/lib/_stream_duplex.js","webpack://dashjs/./src/dash/DashHandler.js","webpack://dashjs/./src/dash/utils/TimelineSegmentsGetter.js","webpack://dashjs/./src/dash/utils/TemplateSegmentsGetter.js","webpack://dashjs/./src/dash/utils/ListSegmentsGetter.js","webpack://dashjs/./src/dash/utils/SegmentBaseGetter.js","webpack://dashjs/./src/dash/controllers/SegmentsController.js","webpack://dashjs/./src/dash/vo/BaseURL.js","webpack://dashjs/./node_modules/inherits/inherits_browser.js","webpack://dashjs/./externals/cea608-parser.js","webpack://dashjs/./src/streaming/models/CmcdModel.js","webpack://dashjs/./src/dash/vo/UTCTiming.js","webpack://dashjs/./src/dash/vo/Event.js","webpack://dashjs/./src/streaming/utils/ObjectUtils.js","webpack://dashjs/./externals/xml2json.js","webpack://dashjs/./src/streaming/net/FetchLoader.js","webpack://dashjs/./src/streaming/models/LowLatencyThroughputModel.js","webpack://dashjs/./src/streaming/net/HTTPLoader.js","webpack://dashjs/./src/streaming/net/SchemeLoaderFactory.js","webpack://dashjs/./node_modules/core-util-is/lib/util.js","webpack://dashjs/./node_modules/path-browserify/index.js","webpack://dashjs/./node_modules/imsc/src/main/js/main.js","webpack://dashjs/./src/streaming/utils/CustomTimeRanges.js","webpack://dashjs/./src/streaming/utils/Capabilities.js","webpack://dashjs/./node_modules/imsc/src/main/js/names.js","webpack://dashjs/./node_modules/process-nextick-args/index.js","webpack://dashjs/./node_modules/safe-buffer/index.js","webpack://dashjs/./src/streaming/constants/MetricsConstants.js","webpack://dashjs/./src/streaming/controllers/PlaybackController.js","webpack://dashjs/./src/streaming/SourceBufferSink.js","webpack://dashjs/./src/streaming/utils/InitCache.js","webpack://dashjs/./src/streaming/controllers/BufferController.js","webpack://dashjs/./src/streaming/text/NotFragmentedTextBufferController.js","webpack://dashjs/./src/streaming/controllers/ScheduleController.js","webpack://dashjs/./src/streaming/vo/metrics/PlayList.js","webpack://dashjs/./src/streaming/StreamProcessor.js","webpack://dashjs/./src/streaming/controllers/FragmentController.js","webpack://dashjs/./src/streaming/vo/Thumbnail.js","webpack://dashjs/./src/streaming/vo/BitrateInfo.js","webpack://dashjs/./src/streaming/thumbnail/ThumbnailController.js","webpack://dashjs/./src/streaming/controllers/BlacklistController.js","webpack://dashjs/./src/streaming/Stream.js","webpack://dashjs/./src/streaming/ManifestUpdater.js","webpack://dashjs/./src/streaming/controllers/TimeSyncController.js","webpack://dashjs/./src/streaming/controllers/MediaSourceController.js","webpack://dashjs/./src/streaming/controllers/EventController.js","webpack://dashjs/./src/streaming/constants/ConformanceViolationConstants.js","webpack://dashjs/./src/streaming/controllers/StreamController.js","webpack://dashjs/./src/streaming/controllers/GapController.js","webpack://dashjs/./src/streaming/controllers/MediaController.js","webpack://dashjs/./src/streaming/models/BaseURLTreeModel.js","webpack://dashjs/./src/streaming/utils/baseUrlResolution/DVBSelector.js","webpack://dashjs/./src/streaming/utils/baseUrlResolution/BasicSelector.js","webpack://dashjs/./src/streaming/utils/BaseURLSelector.js","webpack://dashjs/./src/streaming/controllers/BaseURLController.js","webpack://dashjs/./src/streaming/vo/TextRequest.js","webpack://dashjs/./src/streaming/XlinkLoader.js","webpack://dashjs/./src/streaming/controllers/XlinkController.js","webpack://dashjs/./src/streaming/ManifestLoader.js","webpack://dashjs/./src/streaming/utils/ErrorHandler.js","webpack://dashjs/./src/streaming/utils/CapabilitiesFilter.js","webpack://dashjs/./src/streaming/vo/URIFragmentData.js","webpack://dashjs/./src/streaming/models/URIFragmentModel.js","webpack://dashjs/./src/streaming/models/ManifestModel.js","webpack://dashjs/./src/streaming/rules/SwitchRequest.js","webpack://dashjs/./src/streaming/rules/abr/ThroughputRule.js","webpack://dashjs/./src/streaming/rules/abr/InsufficientBufferRule.js","webpack://dashjs/./src/streaming/rules/abr/AbandonRequestsRule.js","webpack://dashjs/./src/streaming/rules/abr/DroppedFramesRule.js","webpack://dashjs/./src/streaming/rules/abr/SwitchHistoryRule.js","webpack://dashjs/./src/streaming/rules/abr/BolaRule.js","webpack://dashjs/./src/streaming/rules/abr/L2ARule.js","webpack://dashjs/./src/streaming/rules/abr/lolp/LearningAbrController.js","webpack://dashjs/./src/streaming/rules/abr/lolp/QoeInfo.js","webpack://dashjs/./src/streaming/rules/abr/lolp/LoLpQoEEvaluator.js","webpack://dashjs/./src/streaming/rules/abr/lolp/LoLpWeightSelector.js","webpack://dashjs/./src/streaming/rules/abr/lolp/LoLpRule.js","webpack://dashjs/./src/streaming/rules/abr/ABRRulesCollection.js","webpack://dashjs/./src/streaming/models/MediaPlayerModel.js","webpack://dashjs/./src/streaming/rules/RulesContext.js","webpack://dashjs/./src/streaming/rules/SwitchRequestHistory.js","webpack://dashjs/./src/streaming/rules/DroppedFramesHistory.js","webpack://dashjs/./src/streaming/rules/ThroughputHistory.js","webpack://dashjs/./src/streaming/controllers/AbrController.js","webpack://dashjs/./src/streaming/models/VideoModel.js","webpack://dashjs/./src/streaming/utils/DOMStorage.js","webpack://dashjs/./src/dash/SegmentBaseLoader.js","webpack://dashjs/./src/streaming/utils/EBMLParser.js","webpack://dashjs/./src/dash/WebmSegmentBaseLoader.js","webpack://dashjs/./src/dash/controllers/SegmentBaseController.js","webpack://dashjs/./src/dash/vo/RepresentationInfo.js","webpack://dashjs/./src/dash/vo/MediaInfo.js","webpack://dashjs/./src/dash/vo/StreamInfo.js","webpack://dashjs/./src/dash/vo/ManifestInfo.js","webpack://dashjs/./src/dash/vo/SimpleXPath.js","webpack://dashjs/./src/dash/vo/PatchOperation.js","webpack://dashjs/./src/dash/models/PatchManifestModel.js","webpack://dashjs/./src/dash/DashAdapter.js","webpack://dashjs/./src/dash/utils/Round10.js","webpack://dashjs/./src/streaming/vo/MetricsList.js","webpack://dashjs/./src/streaming/vo/metrics/RepresentationSwitch.js","webpack://dashjs/./src/streaming/vo/metrics/BufferLevel.js","webpack://dashjs/./src/streaming/vo/metrics/BufferState.js","webpack://dashjs/./src/streaming/vo/metrics/DVRInfo.js","webpack://dashjs/./src/streaming/vo/metrics/DroppedFrames.js","webpack://dashjs/./src/streaming/vo/metrics/ManifestUpdate.js","webpack://dashjs/./src/streaming/vo/metrics/SchedulingInfo.js","webpack://dashjs/./src/streaming/vo/metrics/RequestsQueue.js","webpack://dashjs/./src/streaming/models/MetricsModel.js","webpack://dashjs/./src/dash/DashMetrics.js","webpack://dashjs/./src/dash/utils/TimelineConverter.js","webpack://dashjs/./src/streaming/vo/TextTrackInfo.js","webpack://dashjs/./src/streaming/text/EmbeddedTextHtmlRender.js","webpack://dashjs/./src/streaming/text/TextSourceBuffer.js","webpack://dashjs/./src/streaming/text/TextTracks.js","webpack://dashjs/./src/streaming/utils/VTTParser.js","webpack://dashjs/./src/streaming/utils/TTMLParser.js","webpack://dashjs/./src/streaming/text/TextController.js","webpack://dashjs/./src/streaming/MediaPlayer.js","webpack://dashjs/./src/core/Version.js","webpack://dashjs/./externals/base64.js","webpack://dashjs/./src/dash/controllers/RepresentationController.js","webpack://dashjs/./src/streaming/vo/DataChunk.js","webpack://dashjs/./node_modules/fast-deep-equal/index.js","webpack://dashjs/./src/dash/parser/objectiron.js","webpack://dashjs/./src/dash/parser/matchers/BaseMatcher.js","webpack://dashjs/./src/dash/parser/matchers/StringMatcher.js","webpack://dashjs/./src/dash/parser/matchers/DurationMatcher.js","webpack://dashjs/./src/dash/parser/matchers/DateTimeMatcher.js","webpack://dashjs/./src/dash/parser/matchers/NumericMatcher.js","webpack://dashjs/./src/dash/parser/maps/CommonProperty.js","webpack://dashjs/./src/dash/parser/maps/MapNode.js","webpack://dashjs/./src/dash/parser/maps/RepresentationBaseValuesMap.js","webpack://dashjs/./src/dash/parser/maps/SegmentValuesMap.js","webpack://dashjs/./src/dash/parser/DashParser.js","webpack://dashjs/./src/streaming/vo/HeadRequest.js","webpack://dashjs/./src/streaming/FragmentLoader.js","webpack://dashjs/./node_modules/imsc/src/main/js/styles.js","webpack://dashjs/./node_modules/node-libs-browser/node_modules/buffer/index.js","webpack://dashjs/./node_modules/node-libs-browser/node_modules/events/events.js","webpack://dashjs/./node_modules/readable-stream/readable-browser.js","webpack://dashjs/./node_modules/readable-stream/lib/_stream_writable.js","webpack://dashjs/./node_modules/string_decoder/lib/string_decoder.js","webpack://dashjs/./node_modules/imsc/src/main/js/utils.js","webpack://dashjs/./node_modules/isarray/index.js","webpack://dashjs/./node_modules/readable-stream/lib/_stream_readable.js","webpack://dashjs/./node_modules/readable-stream/lib/internal/streams/stream-browser.js","webpack://dashjs/./node_modules/readable-stream/lib/internal/streams/destroy.js","webpack://dashjs/./node_modules/readable-stream/lib/_stream_transform.js","webpack://dashjs/./src/streaming/protection/CommonEncryption.js","webpack://dashjs/./src/streaming/protection/vo/MediaCapability.js","webpack://dashjs/./src/streaming/protection/vo/KeySystemConfiguration.js","webpack://dashjs/./src/streaming/protection/errors/ProtectionErrors.js","webpack://dashjs/./src/streaming/protection/vo/LicenseRequest.js","webpack://dashjs/./src/streaming/protection/vo/LicenseResponse.js","webpack://dashjs/./src/streaming/protection/controllers/ProtectionController.js","webpack://dashjs/./src/streaming/protection/vo/KeyPair.js","webpack://dashjs/./src/streaming/protection/vo/ClearKeyKeySet.js","webpack://dashjs/./src/streaming/constants/ProtectionConstants.js","webpack://dashjs/./src/streaming/protection/drm/KeySystemClearKey.js","webpack://dashjs/./src/streaming/protection/drm/KeySystemW3CClearKey.js","webpack://dashjs/./src/streaming/protection/drm/KeySystemWidevine.js","webpack://dashjs/./src/streaming/protection/drm/KeySystemPlayReady.js","webpack://dashjs/./src/streaming/protection/servers/DRMToday.js","webpack://dashjs/./src/streaming/protection/servers/PlayReady.js","webpack://dashjs/./src/streaming/protection/servers/Widevine.js","webpack://dashjs/./src/streaming/protection/servers/ClearKey.js","webpack://dashjs/./src/streaming/protection/controllers/ProtectionKeyController.js","webpack://dashjs/./src/streaming/protection/ProtectionEvents.js","webpack://dashjs/./src/streaming/protection/vo/NeedKey.js","webpack://dashjs/./src/streaming/protection/vo/KeyMessage.js","webpack://dashjs/./src/streaming/protection/vo/KeySystemAccess.js","webpack://dashjs/./src/streaming/protection/models/ProtectionModel_21Jan2015.js","webpack://dashjs/./src/streaming/protection/models/ProtectionModel_3Feb2014.js","webpack://dashjs/./src/streaming/protection/models/ProtectionModel_01b.js","webpack://dashjs/./src/streaming/protection/Protection.js","webpack://dashjs/./src/streaming/metrics/vo/DVBErrors.js","webpack://dashjs/./src/streaming/metrics/utils/DVBErrorsTranslator.js","webpack://dashjs/./src/streaming/metrics/controllers/RangeController.js","webpack://dashjs/./src/streaming/metrics/utils/MetricSerialiser.js","webpack://dashjs/./src/streaming/metrics/utils/RNG.js","webpack://dashjs/./src/streaming/metrics/reporting/reporters/DVBReporting.js","webpack://dashjs/./src/streaming/metrics/reporting/ReportingFactory.js","webpack://dashjs/./src/streaming/metrics/controllers/ReportingController.js","webpack://dashjs/./src/streaming/metrics/utils/HandlerHelpers.js","webpack://dashjs/./src/streaming/metrics/metrics/handlers/BufferLevelHandler.js","webpack://dashjs/./src/streaming/metrics/metrics/handlers/DVBErrorsHandler.js","webpack://dashjs/./src/streaming/metrics/metrics/handlers/HttpListHandler.js","webpack://dashjs/./src/streaming/metrics/metrics/handlers/GenericMetricHandler.js","webpack://dashjs/./src/streaming/metrics/metrics/MetricsHandlerFactory.js","webpack://dashjs/./src/streaming/metrics/controllers/MetricsHandlersController.js","webpack://dashjs/./src/streaming/metrics/controllers/MetricsController.js","webpack://dashjs/./src/streaming/metrics/vo/Metrics.js","webpack://dashjs/./src/streaming/metrics/vo/Range.js","webpack://dashjs/./src/streaming/metrics/vo/Reporting.js","webpack://dashjs/./src/streaming/metrics/utils/ManifestParsing.js","webpack://dashjs/./src/streaming/metrics/controllers/MetricsCollectionController.js","webpack://dashjs/./src/streaming/metrics/MetricsReporting.js","webpack://dashjs/./index_mediaplayerOnly.js","webpack://dashjs/./node_modules/imsc/src/main/js/isd.js","webpack://dashjs/./node_modules/imsc/src/main/js/doc.js","webpack://dashjs/./node_modules/sax/lib/sax.js","webpack://dashjs/./node_modules/base64-js/index.js","webpack://dashjs/./node_modules/ieee754/index.js","webpack://dashjs/./node_modules/stream-browserify/index.js","webpack://dashjs/./node_modules/readable-stream/lib/internal/streams/BufferList.js","webpack://dashjs/./node_modules/node-libs-browser/node_modules/timers-browserify/main.js","webpack://dashjs/./node_modules/setimmediate/setImmediate.js","webpack://dashjs/./node_modules/util-deprecate/browser.js","webpack://dashjs/./node_modules/readable-stream/lib/_stream_passthrough.js","webpack://dashjs/./node_modules/readable-stream/writable-browser.js","webpack://dashjs/./node_modules/readable-stream/duplex-browser.js","webpack://dashjs/./node_modules/readable-stream/transform.js","webpack://dashjs/./node_modules/readable-stream/passthrough.js","webpack://dashjs/./node_modules/imsc/src/main/js/html.js","webpack://dashjs/./node_modules/es6-promise/auto.js","webpack://dashjs/./node_modules/es6-promise/dist/es6-promise.js","webpack://dashjs/./src/streaming/MediaPlayerFactory.js","webpack://dashjs/./index.js"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","constants","this","init","BASE_URL","SEGMENT_BASE","SEGMENT_TEMPLATE","SEGMENT_LIST","SEGMENT_URL","SEGMENT_TIMELINE","SEGMENT_PROFILES","ADAPTATION_SET","REPRESENTATION","REPRESENTATION_INDEX","SUB_REPRESENTATION","INITIALIZATION","INITIALIZATION_MINUS","MPD","PERIOD","ASSET_IDENTIFIER","EVENT_STREAM","ID","PROFILES","SERVICE_LOCATION","RANGE","INDEX","MEDIA","BYTE_RANGE","INDEX_RANGE","MEDIA_RANGE","VALUE","CONTENT_TYPE","MIME_TYPE","BITSTREAM_SWITCHING","BITSTREAM_SWITCHING_MINUS","CODECS","DEPENDENCY_ID","MEDIA_STREAM_STRUCTURE_ID","METRICS","METRICS_MINUS","REPORTING","WIDTH","HEIGHT","SAR","FRAMERATE","AUDIO_SAMPLING_RATE","MAXIMUM_SAP_PERIOD","START_WITH_SAP","MAX_PLAYOUT_RATE","CODING_DEPENDENCY","SCAN_TYPE","FRAME_PACKING","AUDIO_CHANNEL_CONFIGURATION","CONTENT_PROTECTION","ESSENTIAL_PROPERTY","SUPPLEMENTAL_PROPERTY","INBAND_EVENT_STREAM","ACCESSIBILITY","ROLE","RATING","CONTENT_COMPONENT","SUBSET","LANG","VIEWPOINT","ROLE_ASARRAY","ACCESSIBILITY_ASARRAY","AUDIOCHANNELCONFIGURATION_ASARRAY","CONTENTPROTECTION_ASARRAY","MAIN","DYNAMIC","STATIC","MEDIA_PRESENTATION_DURATION","MINIMUM_UPDATE_PERIOD","CODEC_PRIVATE_DATA","BANDWITH","SOURCE_URL","TIMESCALE","DURATION","START_NUMBER","PRESENTATION_TIME_OFFSET","AVAILABILITY_START_TIME","AVAILABILITY_END_TIME","TIMESHIFT_BUFFER_DEPTH","MAX_SEGMENT_DURATION","PRESENTATION_TIME","MIN_BUFFER_TIME","MAX_SUBSEGMENT_DURATION","START","AVAILABILITY_TIME_OFFSET","AVAILABILITY_TIME_COMPLETE","CENC_DEFAULT_KID","DVB_PRIORITY","DVB_WEIGHT","SUGGESTED_PRESENTATION_DELAY","SERVICE_DESCRIPTION","SERVICE_DESCRIPTION_SCOPE","SERVICE_DESCRIPTION_LATENCY","SERVICE_DESCRIPTION_PLAYBACK_RATE","PATCH_LOCATION","PUBLISH_TIME","ORIGINAL_PUBLISH_TIME","ORIGINAL_MPD_ID","STREAM","VIDEO","AUDIO","TEXT","MUXED","IMAGE","STPP","TTML","VTT","WVTT","ABR_STRATEGY_DYNAMIC","ABR_STRATEGY_BOLA","ABR_STRATEGY_L2A","ABR_STRATEGY_LoLP","ABR_STRATEGY_THROUGHPUT","ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA","ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING","ABR_FETCH_THROUGHPUT_CALCULATION_AAST","LIVE_CATCHUP_MODE_DEFAULT","LIVE_CATCHUP_MODE_LOLP","MOVING_AVERAGE_SLIDING_WINDOW","MOVING_AVERAGE_EWMA","BAD_ARGUMENT_ERROR","MISSING_CONFIG_ERROR","TRACK_SWITCH_MODE_ALWAYS_REPLACE","TRACK_SWITCH_MODE_NEVER_REPLACE","TRACK_SELECTION_MODE_FIRST_TRACK","TRACK_SELECTION_MODE_HIGHEST_BITRATE","TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY","TRACK_SELECTION_MODE_WIDEST_RANGE","TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY","CMCD_MODE_QUERY","CMCD_MODE_HEADER","LOCATION","INITIALIZE","TEXT_SHOWING","TEXT_HIDDEN","CC1","CC3","UTF8","SCHEME_ID_URI","START_TIME","SERVICE_DESCRIPTION_LL_SCHEME","SUPPLEMENTAL_PROPERTY_LL_SCHEME","XML","ARRAY_BUFFER","DVB_REPORTING_URL","DVB_PROBABILITY","VIDEO_ELEMENT_READY_STATES","HAVE_NOTHING","HAVE_METADATA","HAVE_CURRENT_DATA","HAVE_FUTURE_DATA","HAVE_ENOUGH_DATA","events","ATTEMPT_BACKGROUND_SYNC","BUFFERING_COMPLETED","BUFFER_CLEARED","BYTES_APPENDED_END_FRAGMENT","BUFFER_REPLACEMENT_STARTED","CHECK_FOR_EXISTENCE_COMPLETED","CURRENT_TRACK_CHANGED","DATA_UPDATE_COMPLETED","INBAND_EVENTS","INITIAL_STREAM_SWITCH","INIT_FRAGMENT_LOADED","INIT_FRAGMENT_NEEDED","INTERNAL_MANIFEST_LOADED","ORIGINAL_MANIFEST_LOADED","LOADING_COMPLETED","LOADING_PROGRESS","LOADING_DATA_PROGRESS","LOADING_ABANDONED","MANIFEST_UPDATED","MEDIA_FRAGMENT_LOADED","MEDIA_FRAGMENT_NEEDED","QUOTA_EXCEEDED","SEGMENT_LOCATION_BLACKLIST_ADD","SEGMENT_LOCATION_BLACKLIST_CHANGED","SERVICE_LOCATION_BLACKLIST_ADD","SERVICE_LOCATION_BLACKLIST_CHANGED","SET_FRAGMENTED_TEXT_AFTER_DISABLED","SET_NON_FRAGMENTED_TEXT","SOURCE_BUFFER_ERROR","STREAMS_COMPOSED","STREAM_BUFFERING_COMPLETED","STREAM_REQUESTING_COMPLETED","TEXT_TRACKS_QUEUE_INITIALIZED","TIME_SYNCHRONIZATION_COMPLETED","UPDATE_TIME_SYNC_OFFSET","URL_RESOLUTION_FAILED","VIDEO_CHUNK_RECEIVED","WALLCLOCK_TIME_UPDATED","XLINK_ELEMENT_LOADED","XLINK_READY","SEEK_TARGET","EventsBase","FactoryMaker","instance","singletonContexts","singletonFactories","classFactories","getSingletonInstance","context","className","obj","getFactoryByName","factoriesArray","updateFactory","merge","classConstructor","args","classInstance","__dashjs_factory_name","extensionObject","extension","override","apply","prop","parent","getClassName","extend","childInstance","setSingletonInstance","push","deleteSingletonInstances","filter","x","getSingletonFactory","undefined","getInstance","arguments","getSingletonFactoryByName","updateSingletonFactory","getClassFactory","getClassFactoryByName","updateClassFactory","mediaPlayerEvents","AST_IN_FUTURE","BUFFER_EMPTY","BUFFER_LOADED","BUFFER_LEVEL_STATE_CHANGED","BUFFER_LEVEL_UPDATED","DYNAMIC_TO_STATIC","ERROR","FRAGMENT_LOADING_COMPLETED","FRAGMENT_LOADING_PROGRESS","FRAGMENT_LOADING_STARTED","FRAGMENT_LOADING_ABANDONED","LOG","MANIFEST_LOADED","METRICS_CHANGED","METRIC_CHANGED","METRIC_ADDED","METRIC_UPDATED","PERIOD_SWITCH_STARTED","PERIOD_SWITCH_COMPLETED","QUALITY_CHANGE_REQUESTED","QUALITY_CHANGE_RENDERED","TRACK_CHANGE_RENDERED","STREAM_INITIALIZING","STREAM_UPDATED","STREAM_ACTIVATED","STREAM_DEACTIVATED","STREAM_INITIALIZED","STREAM_TEARDOWN_COMPLETE","TEXT_TRACKS_ADDED","TEXT_TRACK_ADDED","TTML_PARSED","TTML_TO_PARSE","CAPTION_RENDERED","CAPTION_CONTAINER_RESIZE","CAN_PLAY","CAN_PLAY_THROUGH","PLAYBACK_ENDED","PLAYBACK_ERROR","PLAYBACK_NOT_ALLOWED","PLAYBACK_METADATA_LOADED","PLAYBACK_LOADED_DATA","PLAYBACK_PAUSED","PLAYBACK_PLAYING","PLAYBACK_PROGRESS","PLAYBACK_RATE_CHANGED","PLAYBACK_SEEKED","PLAYBACK_SEEKING","PLAYBACK_SEEK_ASKED","PLAYBACK_STALLED","PLAYBACK_STARTED","PLAYBACK_TIME_UPDATED","PLAYBACK_WAITING","MANIFEST_VALIDITY_CHANGED","EVENT_MODE_ON_START","EVENT_MODE_ON_RECEIVE","CONFORMANCE_VIOLATION","REPRESENTATION_SWITCH","HTTPRequest","tcpid","type","url","actualurl","range","trequest","tresponse","responsecode","interval","trace","_stream","_tfinish","_mediaduration","_quality","_responseHeaders","_serviceLocation","HTTPRequestTrace","b","GET","HEAD","MPD_TYPE","XLINK_EXPANSION_TYPE","INIT_SEGMENT_TYPE","INDEX_SEGMENT_TYPE","MEDIA_SEGMENT_TYPE","BITSTREAM_SWITCHING_SEGMENT_TYPE","MSS_FRAGMENT_INFO_SEGMENT_TYPE","LICENSE","OTHER_TYPE","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARNING","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG","Debug","config","showLogTimestamp","showCalleeName","startTime","eventBus","EventBus","settings","logFn","getLogFn","fn","console","log","fatal","params","doLog","error","warn","info","debug","level","_this","message","logTime","Date","getTime","getType","length","Array","forEach","item","logLevel","dispatchEvent","trigger","Events","getLogger","setLogTimestampVisible","setCalleeNameVisible","LOG_LEVEL_NONE","handlers","getHandlerIdx","listener","scope","idx","some","index","callback","on","options","Error","priority","handler","getStreamId","streamId","mediaType","inserted","splice","off","payload","filters","MediaPlayerEvents","reset","EVENT_PRIORITY_LOW","EVENT_PRIORITY_HIGH","DashJSError","code","data","errors","MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE","MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE","XLINK_LOADER_LOADING_FAILURE_ERROR_CODE","SEGMENT_BASE_LOADER_ERROR_CODE","TIME_SYNC_FAILED_ERROR_CODE","FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE","FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE","URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE","APPEND_ERROR_CODE","REMOVE_ERROR_CODE","DATA_UPDATE_FAILED_ERROR_CODE","CAPABILITY_MEDIASOURCE_ERROR_CODE","CAPABILITY_MEDIAKEYS_ERROR_CODE","DOWNLOAD_ERROR_ID_MANIFEST_CODE","DOWNLOAD_ERROR_ID_SIDX_CODE","DOWNLOAD_ERROR_ID_CONTENT_CODE","DOWNLOAD_ERROR_ID_INITIALIZATION_CODE","DOWNLOAD_ERROR_ID_XLINK_CODE","MANIFEST_ERROR_ID_PARSE_CODE","MANIFEST_ERROR_ID_NOSTREAMS_CODE","TIMED_TEXT_ERROR_ID_PARSE_CODE","MANIFEST_ERROR_ID_MULTIPLEXED_CODE","MEDIASOURCE_TYPE_UNSUPPORTED_CODE","MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE","MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE","XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE","SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE","SEGMENTS_UNAVAILABLE_ERROR_MESSAGE","SEGMENT_BASE_LOADER_ERROR_MESSAGE","TIME_SYNC_FAILED_ERROR_MESSAGE","FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE","URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE","APPEND_ERROR_MESSAGE","REMOVE_ERROR_MESSAGE","DATA_UPDATE_FAILED_ERROR_MESSAGE","CAPABILITY_MEDIASOURCE_ERROR_MESSAGE","CAPABILITY_MEDIAKEYS_ERROR_MESSAGE","TIMED_TEXT_ERROR_MESSAGE_PARSE","MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE","ErrorsBase","zeroPadToLength","numStr","minStrLength","unescapeDollarsInTemplate","split","join","replaceIDForTemplate","indexOf","v","toString","replaceTokenForTemplate","token","startPos","endPos","formatTagPos","specifier","width","paddedValue","tokenLen","formatTagLen","charAt","parseInt","substring","toUpperCase","getSegment","representation","duration","presentationStartTime","mediaStartTime","timelineConverter","presentationEndTime","isDynamic","segmentIndex","seg","Segment","availabilityStartTime","calcAvailabilityStartTimeFromPresentationTime","availabilityEndTime","calcAvailabilityEndTimeFromPresentationTime","wallStartTime","calcWallTimeForSegment","replacementNumber","startNumber","isSegmentAvailable","segment","voPeriod","adaptation","period","isFinite","start","availabilityTimeOffset","refTime","getClientReferenceTime","getIndexBasedSegment","segmentDuration","isNaN","parseFloat","toFixed","calcMediaTimeFromPresentationTime","getTimeBasedSegment","time","fTimescale","tManifest","scaledTime","scaledDuration","calcPresentationTimeFromMediaTime","replacementTime","media","mediaRange","DefaultURLUtils","resolveFunction","schemeRegex","httpUrlRegex","httpsUrlRegex","originRegex","nativeURLResolver","baseUrl","URL","e","dumbURLResolver","baseUrlParseFunc","parseBaseUrl","isRelative","isPathAbsolute","parseOrigin","isSchemeRelative","parseScheme","base","joinChar","slashIndex","lastSlashIndex","lastIndexOf","matches","match","test","setup","isHTTPURL","isHTTPS","removeHostname","exec","resolve","URLUtils","defaultURLUtils","regexUtils","internalCall","functionName","utils","regex","getUtils","registerUrlRegex","FragmentRequest","action","ACTION_DOWNLOAD","NaN","mediaInfo","timescale","serviceLocation","requestStartDate","firstByteDate","requestEndDate","quality","bytesLoaded","bytesTotal","delayLoadingTime","responseType","representationId","end","ACTION_COMPLETE","checkParameterType","parameter","Constants","checkInteger","Utils","dest","source","copy","empty","mixin","src","clone","modifiedUrl","param","searchParams","set","href","headerStr","headers","headerPairs","trim","ilen","headerPair","dt","replace","Math","random","floor","string","hash","charCodeAt","originalUrl","targetUrl","original","target","protocol","origin","relativePath","path","relative","pathname","substr","startIndexOffset","Settings","defaultSettings","streaming","abandonLoadTimeout","wallclockTimeUpdateInterval","lowLatencyEnabled","lowLatencyEnabledByManifest","manifestUpdateRetryInterval","cacheInitSegments","eventControllerRefreshDelay","capabilities","filterUnsupportedEssentialProperties","useMediaCapabilitiesApi","timeShiftBuffer","calcFromSegmentTimeline","fallbackToSegmentTimeline","metrics","maxListDepth","delay","liveDelayFragmentCount","liveDelay","useSuggestedPresentationDelay","applyServiceDescription","protection","keepProtectionMediaKeys","ignoreEmeEncryptedEvent","buffer","enableSeekDecorrelationFix","fastSwitchEnabled","flushBufferAtTrackSwitch","reuseExistingSourceBuffers","bufferPruningInterval","bufferToKeep","bufferTimeAtTopQuality","bufferTimeAtTopQualityLongForm","initialBufferLevel","stableBufferTime","longFormContentDurationThreshold","stallThreshold","useAppendWindow","setStallState","gaps","jumpGaps","jumpLargeGaps","smallGapLimit","threshold","enableSeekFix","utcSynchronization","enabled","useManifestDateHeaderTimeSource","backgroundAttempts","timeBetweenSyncAttempts","maximumTimeBetweenSyncAttempts","minimumTimeBetweenSyncAttempts","timeBetweenSyncAttemptsAdjustmentFactor","maximumAllowedDrift","enableBackgroundSyncAfterSegmentDownloadError","defaultTimingSource","scheme","scheduling","defaultTimeout","lowLatencyTimeout","scheduleWhilePaused","text","defaultEnabled","liveCatchup","minDrift","maxDrift","playbackRate","latencyThreshold","playbackBufferMin","lastBitrateCachingInfo","ttl","lastMediaSettingsCachingInfo","cacheLoadThresholds","video","audio","trackSwitchMode","selectionModeForInitialTrack","fragmentRequestTimeout","retryIntervals","retryAttempts","abr","movingAverageMethod","ABRStrategy","additionalAbrRules","insufficientBufferRule","switchHistoryRule","droppedFramesRule","abandonRequestsRule","bandwidthSafetyFactor","useDefaultABRRules","useDeadTimeLatency","limitBitrateByPortal","usePixelRatioInLimitBitrateByPortal","maxBitrate","minBitrate","maxRepresentationRatio","initialBitrate","initialRepresentationRatio","autoSwitchBitrate","fetchThroughputCalculationMode","cmcd","sid","cid","rtp","rtpSafetyFactor","recoverAttempts","mediaErrorDecode","update","settingsObj","mixinSettings","slice","metricsReportingEvents","METRICS_INITIALISATION_COMPLETE","BECAME_REPORTING_PLAYER","CMCD_DATA_GENERATED","publicOnly","evt","FragmentModel","logger","executedRequests","loadingRequests","dashMetrics","fragmentLoader","streamInfo","isFragmentLoaded","request","isLoaded","req","req1","req2","adaptationIndex","isEqualInit","isEqualComplete","getRequestThreshold","min","removeExecutedRequestsBeforeTime","removeExecutedRequestsInTimeRange","getRequestForTime","arr","addSchedulingInfoMetrics","state","addSchedulingInfo","addRequestsQueue","onLoadingCompleted","sender","response","id","onLoadingInProgress","onLoadingAborted","resetInitialSettings","getRequests","states","filteredRequests","requests","getRequestsForState","concat","filterRequests","isFragmentLoadedOrPending","removeExecutedRequestsAfterTime","syncExecutedRequestsWithBufferedRange","bufferedRanges","streamDuration","ln","abortRequests","abort","executeRequest","load","loadCurrentFragment","addExecutedRequest","FRAGMENT_MODEL_LOADING","FRAGMENT_MODEL_EXECUTED","FRAGMENT_MODEL_CANCELED","FRAGMENT_MODEL_FAILED","URLLoader","cfg","schemeLoaderFactory","loader","SchemeLoaderFactory","loaderFactory","getLoader","errHandler","mediaPlayerModel","requestModifier","boxParser","dashConstants","urlUtils","requestTimeout","IsoBox","boxData","offset","_offset","size","boxes","isComplete","earliest_presentation_time","first_offset","references","reference","reference_type","referenced_size","subsegment_duration","version","scheme_id_uri","presentation_time_delta","presentation_time","event_duration","message_data","sequence_number","entry_count","entries","base_data_offset","sample_description_index","default_sample_duration","default_sample_size","default_sample_flags","flags","baseMediaDecodeTime","sample_count","first_sample_flags","data_offset","samples","sample","sample_size","sample_duration","sample_composition_time_offset","IsoFile","parsedIsoFile","getBoxes","fetchAll","box","convertToDashIsoBox","_incomplete","getBox","fetch","setData","getLastBox","IsoBoxSearchInfo","lastCompletedOffset","found","BoxParser","parse","fileStart","parsedFile","ISOBoxer","parseBuffer","dashIsoFile","parseUint32","parseIsoBoxType","String","fromCharCode","findLastTopIsoBoxCompleted","types","byteLength","boxInfo","ArrayBuffer","Uint8Array","boxSize","boxType","getMediaTimescaleFromMoov","ab","isoFile","mdhdBox","getSamplesInfo","sampleList","lastSequenceNumber","totalDuration","numSequences","sampleDuration","sampleCount","sampleSize","sampleDts","j","k","dataOffset","moofBoxes","mfhdBoxes","subsIndex","nextSubsSample","moofBox","trafBoxes","getChildBoxes","trafBox","tfhdBox","getChildBox","tfdtBox","trunBoxes","subsBoxes","trunBox","sampleData","subsBox","sample_delta","subSizes","entry","subsample_count","subsamples","subsample_size","findInitRange","initRange","ftyp","moov","parsePayload","g","Function","arrayBuffer","ISOFile","parser","ISOBox","_boxProcessors","pos","newBox","append","createBox","dataViewToString","dataView","encoding","impliedEncoding","TextDecoder","decode","a","getUint8","utf8ToByteArray","u","TextEncoder","encode","appendBox","_cursor","_root","_raw","_parent","addBoxProcessor","createFile","createFullBox","Cursor","initialOffset","DataView","result","returnEarly","_sweep","write","getLength","bytes","_rawo","_parseBox","byteOffset","_boxContainers","_procField","_parsing","_readField","_writeField","_procFieldArray","_procFullBox","_procEntries","_procSubEntries","_procEntryField","_procSubBoxes","_readUint","_readInt","_readTemplate","_readTerminatedString","_readString","_readData","_readUTF8String","getInt8","getInt16","getInt32","s1","s2","pow","getUint16","getUint32","str","char","largesize","_parseContainerBox","_data","_parseFullBox","_writeData","_writeInt","setInt8","setInt16","setInt32","setUint32","_writeUint","setUint8","setUint16","_writeString","_writeTerminatedString","_writeTemplate","pre","post","_writeUTF8String","nbCompatibleBrands","language","DataSize","reference_count","sap","starts_with_SAP","SAP_type","SAP_delta_time","subsegment_count","subsegment","ranges_count","subsample","reserved","length_size_of_traf_num","length_size_of_trun_num","length_size_of_sample_num","number_of_entry","RequestModifier","modifyRequestURL","modifyRequestHeader","err","XHRLoader","httpRequest","requestStartTime","xhr","XMLHttpRequest","open","method","setRequestHeader","header","withCredentials","onload","onloadend","onend","onerror","onprogress","progress","onabort","ontimeout","timeout","send","cachedSetTimeout","cachedClearTimeout","process","defaultSetTimout","defaultClearTimeout","runTimeout","fun","setTimeout","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","len","run","marker","runClearTimeout","Item","array","noop","nextTick","title","browser","env","argv","versions","addListener","once","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","indexRange","Representation","segmentInfoType","initialization","codecs","mimeType","codecPrivateData","presentationTimeOffset","MSETimeOffset","mediaFinishedInformation","numberOfSegments","mediaTimeOfLastSignaledSegment","bandwidth","height","scanType","maxPlayoutRate","availabilityTimeComplete","DashConstants","AdaptationSet","Period","mpd","nextPeriodId","DEFAULT_ID","Mpd","manifest","suggestedPresentationDelay","Number","POSITIVE_INFINITY","timeShiftBufferDepth","maxSegmentDuration","publishTime","minimumUpdatePeriod","mediaPresentationDuration","EventStream","adaptionSet","schemeIdUri","DashManifestModel","BASE64","isInteger","getIsTypeOf","Representation_asArray","essentialProperties","getEssentialPropertiesForRepresentation","THUMBNAILS_SCHEME_ID_URIS","ContentComponent_asArray","contentType","mimeTypeRegEx","RegExp","getIsFragmented","getIsAudio","getIsVideo","getIsText","getIsImage","getRepresentationSortFunction","processAdaptation","realAdaptation","isArray","sort","getRealAdaptations","periodIndex","Period_asArray","AdaptationSet_asArray","getRealPeriods","getIsDynamic","realRepresentation","EssentialProperty_asArray","map","calcSegmentDuration","segmentTimeline","S_asArray","s0","getPeriodId","realPeriod","getEventStreams","inbandStreams","eventStreams","eventStream","getBaseURLsFromElement","node","baseUrls","BaseURL_asArray","baseUri","earlyReturn","BaseURL","__text","dvb_priority","dvb_weight","getLanguageForAdaptation","lang","getViewpointForAdaptation","Viewpoint","getRolesForAdaptation","Role_asArray","getAccessibilityForAdaptation","Accessibility_asArray","getAudioChannelConfigurationForAdaptation","AudioChannelConfiguration_asArray","getAudioChannelConfigurationForRepresentation","getAdaptationForIndex","realAdaptations","getIndexForAdaptation","ObjectUtils","areEqual","getAdaptationForId","getAdaptationsForType","adaptations","getRealPeriodForIndex","realPeriods","getCodec","addResolutionInfo","codec","getSelectionPriority","realAdaption","selectionPriority","getMimeType","getKID","getLabelsForAdaptation","Label_asArray","labelArray","getContentProtectionData","ContentProtection_asArray","getId","hasProfile","profile","has","profiles","getDuration","MAX_SAFE_INTEGER","MAX_VALUE","getBandwidth","getManifestUpdatePeriod","latencyOfLastUpdate","max","getPublishTime","getRepresentationCount","getBitrateListForAdaptation","processedRealAdaptation","getRepresentationFor","getRepresentationsForAdaptation","voAdaptation","segmentInfo","presentationOffset","voRepresentations","periodArray","getRealAdaptationFor","voRepresentation","SegmentBase","SegmentList","SegmentTemplate","Initialization","sourceURL","SegmentTimeline","periodStart","getAdaptationsForPeriod","voAdaptationSet","realAdaptationSet","voAdaptations","getRegularPeriods","voPeriods","realPreviousPeriod","voPreviousPeriod","checkConfig","periodEnd","Errors","getEndTimeForLastPeriod","getMpd","loadedTime","getEventsForPeriod","EventStream_asArray","Event_asArray","currentMpdEvent","event","Event","presentationTime","calculatedPresentationTime","Signal","Binary","messageData","decodeArray","__cdata","getEventStreamForAdaptationSet","adaptationArray","InbandEventStream_asArray","getEventStreamForRepresentation","representationArray","getUTCTimingSources","hasAST","utcTimingsArray","UTCTiming_asArray","utcTimingEntries","utcTiming","UTCTiming","getLocation","Location","Location_asArray","getPatchLocation","PatchLocation","PatchLocation_asArray","getSuggestedPresentationDelay","getAvailabilityStartTime","getServiceDescriptions","serviceDescriptions","ServiceDescription_asArray","sd","latency","getSupplementalProperties","supplementalProperties","SupplementalProperty_asArray","sp","setConfig","ThumbnailTrackInfo","bitrate","tilesHor","tilesVert","widthPerTile","heightPerTile","templateUrl","ThumbnailTracks","tracks","dashHandler","currentTrackIndex","segmentsController","adapter","baseURLController","_createTrack","useSegmentBase","track","vars","updateSegmentData","then","cache","segments","count","_normalizeSegments","readThumbnail","cached","el","ss","baseURL","blob","Blob","imageUrl","createObjectURL","_handleUpdatedSegmentData","buildTemplateUrl","getTracks","addTracks","getMediaInfoForType","voReps","getVoRepresentations","rep","setTrackByIndex","getCurrentTrack","getCurrentTrackIndex","getThumbnailRequestForTime","currentVoRep","getSegmentRequestForTime","SegmentsController","segmentBaseController","DashHandler","initialize","pna","objectKeys","keys","Duplex","util","inherits","Readable","Writable","readable","writable","allowHalfOpen","_writableState","ended","onEndNT","self","highWaterMark","_readableState","destroyed","_destroy","cb","lastSegment","isDynamicManifest","mediaHasFinished","_setRequestUrl","destination","_getRequestForSegment","getSegmentByTime","_onDynamicToStatic","getStreamInfo","getInitRequest","_generateInitRequest","getCurrentIndex","getNextSegmentRequest","indexToRequest","getSegmentByIndex","isLastSegmentRequested","bufferingTime","getNextSegmentRequestIdempotent","getValidSeekTimeCloseToTargetTime","targetThreshold","currentUpperTime","currentLowerTime","adjustedTime","targetRequest","upperRequest","lowerRequest","requestEndTime","TimelineSegmentsGetter","iterateSegments","iterFunc","fragments","frag","repeat","timeline","list","SegmentURL_asArray","relativeIdx","breakIterator","_calculateRepeatCountForNegativeR","nextFrag","repeatEndTime","availabilityEnd","dvrWindow","getCurrentDVRInfo","ceil","lastSegmentTime","requestedTime","requiredMediaTime","getMediaFinishedInformation","availableSegments","TemplateSegmentsGetter","template","round","periodTime","calcPeriodRelativeTimeFromMpdRelativeTime","ListSegmentsGetter","offsetToSubtract","relativeIndex","SegmentBaseGetter","epsilon","ft","fd","getIndexByTime","getters","getSegmentsGetter","updateInitData","hasInitialization","Promise","getSegmentBaseInitSegment","hasSegments","getSegmentList","weight","DEFAULT_DVB_PRIORITY","DEFAULT_DVB_WEIGHT","ctor","superCtor","super_","constructor","configurable","TempCtor","specialCea608CharsCodes","getCharForByte","byte","charCode","rowsLowCh1","rowsHighCh1","rowsLowCh2","rowsHighCh2","backgroundColors","verboseFilter","verboseLevel","setTime","newTime","severity","msg","minLevel","numArrayToHexArray","numArray","hexArray","PenState","foreground","underline","italics","background","flash","setStyles","styles","attribs","style","isDefault","equals","other","newPenState","StyledUnicodeChar","uchar","penState","setChar","setPenState","newChar","isEmpty","Row","chars","currPenState","equal","setCursor","absPos","moveCursor","relPos","newPos","backSpace","insertChar","clearFromPos","clear","clearToEndOfRow","getTextString","setPenStyles","CaptionScreen","rows","currRow","NR_ROWS","nrRollUpRows","setPen","setPAC","pacData","JSON","stringify","newRow","row","indent","prevPos","color","setBkgData","bkgData","setRollUpRows","nrRows","rollUp","getDisplayText","topRowIndex","topRow","asOneRow","displayText","rowNr","rowText","getTextAndFormat","Cea608Channel","channelNumber","outputFilter","chNr","verbose","displayedMemory","nonDisplayedMemory","lastOutputScreen","currRollUpRow","writeScreen","cueStartTime","modes","lastCueEndTime","getHandler","setHandler","newHandler","setMode","newMode","insertChars","screen","outputDataUpdate","cc_RCL","cc_BS","cc_AOF","cc_AON","cc_DER","cc_RU","cc_FON","cc_RDC","cc_TR","cc_RTD","cc_EDM","cc_CR","cc_ENM","cc_EOC","tmp","cc_TO","nrCols","cc_MIDROW","secondByte","colorIndex","updateData","newCue","cueSplitAtTime","Cea608Parser","field","out1","out2","outputs","channels","currChNr","lastCmdA","lastCmdB","bufferedData","lastTime","dataCounters","addData","byteList","cmdFound","charsFound","parseCmd","parseMidrow","parsePAC","parseBackgroundAttributes","parseChars","cmd","padding","channel","interpretPAC","pacIndex","channelNr","charCodes","charCode1","oneCode","hexCodes","findCea608Nalus","raw","nalSize","cursor","cea608NaluRanges","isCEA608SEI","payloadType","payloadSize","countryCode","providerCode","userIdentifier","userDataTypeCode","extractCea608DataFromRange","cea608Range","fieldData","ccCount","ccValid","ccType","ccData1","ccData2","OBJECT_TYPES","STREAMING_FORMATS","STREAM_TYPES","CmcdModel","dashManifestModel","internalData","abrController","playbackController","streamProcessors","_isStartup","_bufferLevelStarved","_initialMediaRequestsDone","_resetInitialSettings","pr","nor","st","sf","generateUuid","_updateStreamProcessors","_onPeriodSwitchComplete","streamController","getStreamController","getActiveStream","activeStream","getProcessors","_copyParameters","parameterNames","copiedData","_getCmcdData","_getGenericCmcdData","ot","_initForMediaType","encodedBitrate","bitrateList","_getBitrateByRequest","_getObjectDurationByRequest","mtp","getThroughputHistory","getSafeAverageThroughput","_getMeasuredThroughputByType","dl","bufferLevel","getCurrentBufferLevel","_getDeadlineByType","bl","_getBufferLevelByType","tb","getTopBitrateInfoFor","_getTopBitrateByType","nextRequest","streamProcessor","probeNextRequest","_probeNextRequest","getPlaybackRate","currentBufferLevel","minBandwidth","_calculateRtp","encodeURIComponent","getRelativeUrl","nrr","br","bs","su","_getCmcdDataForMediaSegment","_getCmcdDataForInitSegment","_getCmcdDataForOther","_getCmcdDataForLicense","_onPlaybackRateChanged","_onManifestLoaded","_onBufferLevelStateChanged","_onPlaybackSeeked","_buildFinalString","cmcdData","localeCompare","cmcdString","reduce","acc","getQueryParameter","finalPayloadString","MetricsReportingEvents","getHeaderParameters","cmcdObjectHeader","cmcdRequestHeader","cmcdStatusHeader","cmcdSessionHeader","presentationTimeDelta","obj1","obj2","deepEqual","X2JS","escapeMode","attributePrefix","arrayAccessForm","emptyNodeForm","enableToStringFunc","arrayAccessFormPaths","skipEmptyTextNodesForObj","stripWhitespaces","datetimeAccessFormPaths","useDoubleQuotes","xmlElementsFilter","jsonPropertiesFilter","keepCData","ignoreRoot","initConfigDefaults","DOMNodeTypes","getNodeLocalName","nodeLocalName","localName","baseName","nodeName","escapeXmlChars","checkInStdFiltersArrayForm","stdFiltersArrayForm","filterPath","toArrayAccessForm","childName","fromXmlDateTime","bits","secondBits","setHours","setMilliseconds","offsetMinutes","setMinutes","getMinutes","getTimezoneOffset","UTC","getFullYear","getMonth","getDate","getHours","getSeconds","getMilliseconds","checkXmlElementsFilter","childType","childPath","parseDOMChildren","nodeType","nodeChildren","childNodes","cidx","child","__cnt","children","__children","aidx","attributes","attr","value2","ml","matchers","matchobj","converter","nodePrefix","prefix","getNodePrefix","__prefix","fullPath","checkFromXmlDateTimePaths","nodeValue","startTag","jsonObj","element","attrList","closed","resultStr","attrName","attrVal","endTag","elementName","jsonXmlSpecialElem","jsonObjField","suffix","jsonXmlElemCount","elementsCnt","it","checkJsonObjPropertiesFilter","propertyName","jsonObjPath","parseJSONAttributes","ait","parseJSONTextObject","jsonTxtObj","parseJSONTextAttrs","getJsonPropertyPath","jsonPropName","parseJSONArray","jsonArrRoot","jsonArrObj","arIdx","parseJSONObject","subObj","toISOString","parseXmlString","xmlDocStr","xmlDoc","ActiveXObject","DOMParser","parseFromString","getElementsByTagNameNS","async","loadXML","asArray","toXmlDateTime","asDateTime","xml2json","xml_str2json","json2xml_str","json2xml","getVersion","FetchLoader","lowLatencyThroughputModel","read","processResult","reader","status","calculateDownloadedTime","downloadedData","bytesReceived","avgTimeDistance","ts","next","distance","abortController","Headers","AbortController","signal","reqOptions","credentials","calculationMode","requestTime","now","throughputCapacityDelayMS","getThroughputCapacityDelayMS","markBeforeFetch","statusText","responseURL","ok","responseHeaders","body","loaded","total","stream","measurement","totalBytes","signaledFirstByte","remaining","markA","markB","tee","forMeasure","forConsumer","getReader","processFetch","done","chunkDownloadDurationMS","chunkBytes","chunkDownloadTimeRelativeMS","kbps","fetchDuration","bytesAllChunks","prev","curr","addMeasurement","lengthComputable","getEstimatedDownloadDurationMS","startTimeData","endTimeData","lastChunkWasFinished","calculatedThroughput","datum","datumE","dataE","chunkThroughputs","shortDurationBytesReceived","shortDurationStartTime","chunkDownloadTime","cumulatedChunkDownloadTime","calculateThroughputByChunkData","throughput","concatTypedArray","performance","boxesInfo","subarray","noTrace","cancel","LowLatencyThroughputModel","measurements","createBufferLevelTrendFunction","chunkMeasurements","sumX","sumY","sumXY","sumXSq","N","isBufferSafeAndStable","lastMeasurements","lastBitrate","aveBufferLevelLastSegements","bufferLevelAtSegmentEnd","abs","bufferLevelAtSegmentStart","fetchDownloadDurationMS","requestTimeMS","bitrateEntry","find","repId","adjustedAvailabilityStartTimeMS","segDurationMS","chunksDurationMS","segmentBytes","getEstimatedBufferLevel","shift","currentBufferLevelMS","lastThreeMeasurements","lastMeasurement","pop","lastChunkRelativeTimeMS","isBufferStable","selectedOptimisticFactor","chunkAvailablePeriod","chunkBytesBBLE","chunkDownloadtimeMSBBLE","chunkCount","chunk","downloadThroughput","estimatedDownloadtimeMS","nextHigherBitrate","HTTPLoader","delayedRequests","retryRequests","downloadErrorToRequestTypeMap","cmcdModel","internalLoad","remainingAttempts","traces","firstProgress","needFailureReport","lastTraceTime","lastTraceReceivedCount","handleLoaded","success","checkExistenceOnly","responseUrl","responseStatus","getAllResponseHeaders","addHttpRequest","addManifestUpdate","getRetryAttemptsForType","retryRequest","getRetryIntervalsForType","complete","cmcdMode","additionalQueryParameter","cmcdQueryParameter","_getAdditionalQueryParameter","addAditionalQueryParameterToUrl","verb","getXHRWithCredentialsForType","currentTime","timeoutMessage","percentageComplete","delayedRequest","delayTimeout","schemeLoaderMap","unregisterAllLoader","startsWith","registerLoader","unregisterLoader","objectToString","arg","isBoolean","isNull","isNullOrUndefined","isNumber","isString","isSymbol","isUndefined","isRegExp","re","isObject","isDate","isError","isFunction","isPrimitive","isBuffer","Buffer","normalizeArray","parts","allowAboveRoot","up","last","unshift","xs","f","res","resolvedPath","resolvedAbsolute","TypeError","normalize","isAbsolute","trailingSlash","paths","from","to","fromParts","toParts","samePartsLength","outputParts","sep","delimiter","dirname","hasRoot","matchedSlash","basename","ext","extname","startDot","startPart","preDotState","generateISD","fromXML","renderHTML","render","CustomTimeRanges","customTimeRangeArray","add","mergeRanges","remove","rangeIndex1","rangeIndex2","range1","range2","codecCompatibilityTable","supportsMediaSource","hasWebKit","hasMediaSource","Capabilities","encryptedMediaSupported","supportsEncryptedMedia","supportsCodec","navigator","mediaCapabilities","decodingInfo","framerate","_canUseMediaCapabilitiesApi","configuration","supported","_checkCodecWithMediaCapabilities","MediaSource","isTypeSupported","WebKitMediaSource","_checkCodecWithMse","setEncryptedMediaSupported","supportsEssentialProperty","ep","codecRootCompatibleWithCodec","codec1","codec2","compatTableCodec","codecRoot","rootCompatible","compatibleCodecs","compatibleCodec","imscNames","ns_tt","ns_tts","ns_ttp","ns_xml","ns_itts","ns_ittp","ns_smpte","ns_ebutts","arg1","arg2","arg3","copyProps","dst","SafeBuffer","encodingOrOffset","alloc","allocUnsafe","allocUnsafeSlow","fill","buf","SlowBuffer","TCP_CONNECTION","HTTP_REQUEST","TRACK_SWITCH","BUFFER_LEVEL","ABANDON_LOAD","ALLOW_LOAD","BUFFER_STATE","DVR_INFO","DROPPED_FRAMES","SCHEDULING_INFO","REQUESTS_QUEUE","MANIFEST_UPDATE","MANIFEST_UPDATE_STREAM_INFO","MANIFEST_UPDATE_TRACK_INFO","PLAY_LIST","DVB_ERRORS","PlaybackController","videoModel","wallclockTimeIntervalId","playOnceInitialized","lastLivePlaybackTime","seekTarget","internalSeek","isLowLatencySeekingInProgress","playbackStalled","minPlaybackRateChange","manifestUpdateInProgress","getTimeToStreamEnd","sInfo","getStreamEndTime","refInfo","play","getElement","isPaused","pause","isSeeking","isStalled","seek","stickToBuffered","internal","setCurrentTime","getNormalizedTime","timeOffset","getEnded","getCurrentLiveLatency","getClientTimeOffset","_onDataUpdateCompleted","_onFragmentLoadProgress","_onManifestUpdated","_onStreamsComposed","_onPlaybackProgression","_onPlaybackEnded","_onStreamInitializing","_onRepresentationSwitch","setPlaybackRate","stopUpdatingWallclockTime","removeEventListener","_onCanPlay","_onCanPlayThrough","_onPlaybackStart","_onPlaybackWaiting","_onPlaybackPlaying","_onPlaybackPaused","_onPlaybackError","_onPlaybackSeeking","_onPlaybackTimeUpdated","_onPlaybackProgress","_onPlaybackMetaDataLoaded","_onPlaybackLoadedData","onPlaybackStalled","_onNativePlaybackEnded","getActualPresentationTime","mediatype","DVRMetrics","DVRWindow","startUpdatingWallclockTime","setInterval","addDVRMetric","updateCurrentTime","clearInterval","getReadyState","hasVideoTrack","actualTime","timeChanged","representationInfo","convertRepresentationToRepresentationInfo","currentRepresentation","playingTime","seekTime","timeToEnd","rate","getActiveStreamInfo","isLast","srcElement","_isCatchupEnabled","catchupMode","_getCatchupMode","currentLiveLatency","getLiveDelay","liveCatchupLatencyThreshold","getLiveCatchupLatencyThreshold","liveCatchUpMinDrift","currentBuffer","getBufferLevel","latencyDrift","_lolpNeedToCatchUpCustom","_defaultNeedToCatchUp","_needToCatchUp","results","currentPlaybackRate","liveCatchupPlaybackRate","liveCatchUpPlaybackRate","newRate","cpr","E","_calculateNewPlaybackRateLolP","deltaLatency","_calculateNewPlaybackRateDefault","startPlaybackCatchUp","stopPlaybackCatchUp","filterList","getActiveStreamProcessors","minDelay","MetricsConstants","activeStreamInfo","periodSwitch","addEventListener","manifestInfo","ua","userAgent","toLowerCase","isSafari","_initializeForFirstStream","getIsManifestUpdateInProgress","getPlayedRanges","computeAndSetLiveDelay","fragmentDuration","ret","adjustedFragmentDuration","llsd","_applyServiceDescription","minBufferTime","dvrWindowSize","targetDelayCapping","SourceBufferSink","intervalId","textController","callbacks","appendQueue","isAppendingInProgress","mediaSource","lastRequestAppended","changeType","_waitForUpdateEnd","_initializeForText","getTextSourceBuffer","_addEventListeners","_updateEndHandler","_errHandler","updateAppendWindow","appendWindowEnd","appendWindowStart","updateTimestampOffset","timestampOffset","_abortBeforeAppend","_appendNextInQueue","nextChunk","afterSuccess","segmentType","promise","appendBuffer","reject","_executeCallback","updating","eventType","getAllBufferRanges","buffered","getBuffer","unintended","readyState","setTextTrack","_removeEventListeners","removeSourceBuffer","initializeForStreamSwitch","mInfo","selectedRepresentation","oldSourceBufferSink","_copyPreviousSinkData","promises","all","initializeForFirstUse","addSourceBuffer","isFragmented","InitCache","save","extract","BufferController","isBufferingCompleted","criticalBufferLevel","maxAppendedIndex","maximumIndex","sourceBufferSink","bufferState","appendedBytesInfo","wallclockTicked","isPruningInProgress","isQuotaExceeded","initCache","pendingPruningRanges","replacingBuffer","fragmentModel","representationController","setMediaSource","_getRepresentationInfo","getRepresentationForQuality","_initializeSink","oldBufferSinks","requiredQuality","_onInitFragmentLoaded","_appendToBuffer","_onMediaFragmentLoaded","_onAppended","_triggerEvent","_showBufferRanges","ranges","getTotalBufferedTime","bufferAhead","_handleQuotaExceededError","hasEnoughSpaceToAppend","quotaExceededTime","clearBuffers","getClearRanges","_updateBufferLevel","endFragment","_checkIfBufferingCompleted","getRangeAt","getCurrentRepresentation","_adjustSeekTarget","pruneAllSafely","getAllRangesWithSafetyFactor","clearRanges","behindPruningRange","targetTime","bufferToKeepBehind","startOfBuffer","rangeEnd","currentTimeRequest","_getRangeBehindForPruning","aheadPruningRange","endOfBuffer","bufferToKeepAhead","rangeStart","_getRangeAheadForPruning","isTextEnabled","_onPlaybackStalled","checkIfSufficientBuffer","tolerance","firstStart","lastEnd","gap","toler","getBufferLength","isLastIdxAppended","periodBuffered","setIsBufferingCompleted","_notifyBufferStateChanged","startRangeToKeep","behindRange","_addClearRangeWithPromise","clearNextRange","sourceBuffer","_onRemoved","quotaExceeded","updateBufferTimestampOffset","_onWallclockTimeUpdated","totalBufferedTime","errored","keepBuffers","tmpSourceBufferSinkToReset","getBufferControllerType","createBufferSink","getQualityFor","getMediaSource","appendInitSegmentFromCache","getIsBufferingCompleted","getIsPruningInProgress","prepareForPlaybackSeek","prepareForReplacementTrackSwitch","prepareForNonReplacementTrackSwitch","prepareForReplacementQualitySwitch","getContinuousBufferTimeForTargetTime","setSeekTarget","segmentRequestingCompleted","NotFragmentedTextBufferController","initialized","ScheduleController","currentRepresentationInfo","timeToLoadDelay","scheduleTimeout","lastFragmentRequest","topQualityIndex","lastInitializedQuality","switchTrack","initSegmentRequired","checkPlaybackQuality","bufferController","startScheduleTimer","clearScheduleTimer","timeoutValue","schedule","getInitialPlayback","getAutoPlay","_shouldClearScheduleTimer","newTopQualityIndex","getMaxAllowedIndexFor","getBufferTarget","_shouldBuffer","_shouldScheduleNextRequest","qualityChange","bufferTarget","schedulingInfo","getCurrentSchedulingInfo","_getBufferTargetForFragmentedText","videoBufferLevel","_getBufferTargetForAudio","isPlayingAtTopQuality","getStableBufferTime","_getGenericBufferTarget","_completeQualityChange","oldMediaInfo","newMediaInfo","oldQuality","newQuality","_onBytesAppended","_onURLResolutionFailed","_onPlaybackStarted","updatePlayListTraceMetrics","playbackspeed","_hasVideoTrack","setCurrentRepresentation","setTimeToLoadDelay","getTimeToLoadDelay","setSwitchTrack","getSwitchStrack","getPlaybackController","setCheckPlaybackQuality","setInitSegmentRequired","PlayList","mstart","starttype","INITIAL_PLAYOUT_START_REASON","SEEK_START_REASON","RESUME_FROM_PAUSE_START_REASON","METRICS_COLLECTION_START_REASON","PlayListTrace","representationid","subreplevel","stopreason","REPRESENTATION_SWITCH_STOP_REASON","REBUFFERING_REASON","USER_REQUEST_STOP_REASON","END_OF_PERIOD_STOP_REASON","END_OF_CONTENT_STOP_REASON","METRICS_COLLECTION_STOP_REASON","FAILURE_STOP_REASON","StreamProcessor","mediaInfoArr","scheduleController","shouldUseExplicitTimeForRequest","qualityChangeInProgress","manifestModel","mediaController","segmentBlacklistController","getIsTextTrack","getData","_onInitFragmentNeeded","rescheduleIfNoRequest","_noValidRequest","_onMediaFragmentNeeded","_getFragmentRequest","_mediaRequestGenerated","_noMediaRequestGenerated","blacklistUrl","contains","_shouldIgnoreRequest","getRepresentationInfo","useTime","addBufferState","pushPlayListTraceMetrics","_onBufferCleared","setExplicitBufferingTime","_onSourceBufferError","_prepareForDefaultQualitySwitch","_bufferClearedForNonReplacement","_onFragmentLoadingAbandoned","isInitializationRequest","_onFragmentLoadingCompleted","_handleFragmentLoadingError","_onSetFragmentedTextAfterDisabled","getScheduleController","_onSetNonFragmentedText","currentTrackInfo","selectMediaInfo","_onQuotaExceeded","newRealAdaptation","getRealAdaptation","maxQuality","minIdx","getMinAllowedIndexFor","getAverageThroughput","getInitialBitrateFor","getQualityForBitrate","eventStreamMedia","getEventsFor","eventStreamTrack","mediaInbandEvents","trackInbandEvents","inbandEvents","eventBoxes","sidx","mediaAnchorTime","fragmentMediaStartTime","getEvent","_handleInbandEvents","_bufferClearedForReplacement","continuousBufferTime","_onSeekTarget","registerStreamType","RepresentationController","controller","_createBufferControllerForType","isUpdating","getBufferController","getFragmentModel","getRepresentationController","createBufferSinks","previousBufferSinks","updateStreamInfo","newStreamInfo","clearMediaInfoArray","addMediaInfo","prepareTrackSwitch","shouldReplace","prepareQualityChange","reason","forceReplace","abandonmentState","getAbandonmentStateFor","_prepareForFastQualitySwitch","createPlaylistTraceMetrics","getMediaInfo","finalisePlayList","prepareInnerPeriodPlaybackSeeking","prepareOuterPeriodPlaybackSeeking","unRegisterStreamType","FragmentController","fragmentModels","model","onFragmentLoadingCompleted","isInit","strInfo","DataChunk","createDataChunk","getModel","FragmentLoader","Thumbnail","y","BitrateInfo","qualityIndex","ThumbnailController","thumbnailTracks","provide","thumbIndex","thumbnail","seq","seqIdx","_buildUrlFromTemplate","getBitrateList","bitrateInfo","BlackListController","blacklist","updateEventName","addBlacklistEventName","onAddBlackList","query","MEDIA_TYPES","Stream","isInitialized","isActive","hasFinishedBuffering","hasAudioTrack","updateError","fragmentController","thumbnailController","preloaded","isEndedEventSignaled","trackChangedEvents","manifestUpdater","eventController","protectionController","_commonMediaInitialization","addInlineEvents","previousBuffersSinks","initialMediaInfo","allMediaForType","getAllMediaInfoForType","embeddedMediaInfos","isEmbedded","addEmbeddedTrack","_isMediaSupported","addTrack","setInitialMediaSettingsForType","setInitialSettings","getInitialSettings","addMediaInfosToBuffer","_createStreamProcessor","getCurrentTrackFor","updateTopQualityIndex","_initializeMediaForType","buffers","bufferSinks","sink","getValue","_checkIfInitializationCompleted","createTracks","contentProtection","deactivate","deactivateStream","setPreloaded","setIsEndedEventSignaled","getStartTime","onProtectionError","initializeForMedia","waitForReadyState","onBufferingCompleted","processors","onDataUpdateCompleted","onInbandEvents","addInbandEvents","getProcessorForMediaInfo","_getProcessorByType","processor","_compareProtectionConfig","newStream","currentStreamInfo","newAdaptation","getAdaptationForType","currentAdaptation","_isAdaptationDrmProtected","ContentProtection","compareCodecs","previousStream","sameMimeType","oldCodecs","newCodecs","codecMatch","newCodec","partialCodecMatch","oldCodec","getPreloaded","KEY_ERROR","SERVER_CERTIFICATE_UPDATED","LICENSE_REQUEST_COMPLETE","KEY_SYSTEM_SELECTED","KEY_SESSION_CREATED","KEY_STATUSES_CHANGED","initializeForStream","activate","_initializeMedia","getIsActive","getHasAudioTrack","getHasVideoTrack","startPreloading","previousBuffers","getThumbnailController","getBitrateListFor","updatedStreamInfo","currentMediaInfo","areMediaInfosEqual","trackChangedEvent","clearDataForStream","isMediaCodecCompatible","isProtectionCompatible","getIsEndedEventSignaled","getAdapter","getHasFinishedBuffering","startScheduleControllers","prepareTrackChange","setCurrentMediaInfo","refreshManifestOnSwitchTrack","getIsUpdating","refreshManifest","BlacklistController","ManifestUpdater","refreshDelay","refreshTimer","isStopped","manifestLoader","stopManifestRefreshTimer","startManifestRefreshTimer","onRefreshTimer","ignorePatch","patchLocation","location","getIsPatch","patch","isPatchValid","patchSuccessful","applyPatchToManifest","updatedPublishTime","setValue","date","onManifestLoaded","onPlaybackStarted","onPlaybackPaused","onStreamsComposed","setManifest","TimeSyncController","isSynchronizing","isBackgroundSynchronizing","backgroundSyncTimeOffsets","timingSources","timeOfLastSync","timeOfLastBackgroundSync","lastOffset","lastTimingSource","internalTimeBetweenSyncAttempts","_onAttemptBackgroundSync","_attemptBackgroundSync","attempts","_completeBackgroundTimeSyncSequence","deviceTimeBeforeSync","serverTime","deviceTimeAfterSync","_calculateOffset","_onComplete","failed","_checkForDateHeader","_completeTimeSyncSequence","_xsdatetimeDecoder","xsdatetimeStr","parsedDate","utcDate","timezoneOffset","_alternateXsdatetimeDecoder","_iso8601Decoder","isoStr","_rfc1123Decoder","dateStr","_notSupportedHandler","onSuccessCB","onFailureCB","_directHandler","_httpHandler","decoder","isHeadRequest","oncomplete","urls","getResponseHeader","_httpHeadHandler","dateHeaderValue","getLatestMPDRequestHeaderValueByID","dateHeaderTime","adjustedTimeBetweenSyncAttempts","isOffsetDriftWithinThreshold","_isOffsetDriftWithinThreshold","_adjustTimeBetweenSyncAttempts","shouldAttemptBackgroundSync","averageOffset","maxAllowedDrift","attemptSync","tSources","_shouldPerformSynchronization","_attemptRecursiveSync","sourceIndex","HTTP_TIMEOUT_MS","MediaSourceController","createMediaSource","attachMediaSource","objectURL","setSource","detachMediaSource","setDuration","sourceBuffers","isBufferUpdating","setSeekable","setLiveSeekableRange","clearLiveSeekableRange","signalEndOfStream","endOfStream","EventController","inlineEvents","eventInterval","lastEventTimerCall","eventHandlingInProgress","isStarted","EVENT_HANDLED_STATES","_stop","_triggerRemainingEvents","_onStopEventController","_addOrUpdateEvent","shouldOverwriteExistingEvents","eventState","indexOfExistingEvent","findIndex","_handleManifestReloadEvent","newDuration","validUntil","newManifestValidAfter","_onEventTimer","currentVideoTime","presentationTimeThreshold","_triggerEvents","_iterateAndTriggerCallback","_startEvent","calculatedPresentationTimeInSeconds","_eventHasExpired","periodEndTime","_eventIsInvalid","_removeEvent","periodDuration","schemeIdUris","eventId","_refreshManifest","_sendCallbackRequest","values","getInbandEvents","getInlineEvents","LEVELS","SUGGESTION","WARNING","EVENTS","NO_UTC_TIMING_ELEMENT","NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE","INVALID_DVR_WINDOW","StreamController","capabilitiesFilter","mediaSourceController","timeSyncController","uriFragmentModel","streams","protectionData","autoPlay","isStreamSwitchingInProgress","hasMediaError","hasInitialisationError","initialPlayback","playbackEndedTimerInterval","preloadingStreams","supportsChangeType","firstLicenseIsFetched","waitForPlaybackStartTimeout","errorInformation","_onTimeSyncCompleted","streamsInfo","getStreamsInfo","updateManifestUpdateInfo","getBufferRange","clientTimeOffset","shouldKeepStream","_filterOutdatedStreams","_initializeOrUpdateStream","addManifestUpdateStreamInfo","dvrRange","waitingTime","streamInfos","maxFragmentDuration","fragmentDurations","_getFragmentDurationForLiveDelayCalculation","dvrInfo","liveEdge","startTimeFromUri","_getStartTimeFromUriParameters","getStreams","_getInitialStartTime","initialStream","getStreamForTime","startStream","_switchStream","_checkIfPrebufferingCanStart","_composeStreams","_onKeySessionUpdated","getStreamById","fromStreamInfo","toStreamInfo","_canSourceBuffersBeReused","_openMediaSource","sourceUrl","_onMediaSourceOpen","revokeObjectURL","_setMediaDuration","_activateStream","_open","sinks","oldTime","seekToStream","_cancelPreloading","_handleOuterPeriodSeek","_flushPlaylistMetrics","_handleInnerPeriodSeek","_createPlaylistMetrics","_deactivateAllPreloadingStreams","_onCurrentTrackChanged","nextStream","_onStreamCanLoadNext","seamlessPeriodSwitch","calcTimeShiftBufferWindow","activeStreamProcessors","addDVRInfo","_onBufferLevelUpdated","getInitialBufferLevel","excludedStreamProcessors","addBufferLevel","_onQualityChanged","playbackQuality","getPlaybackQuality","addDroppedFrames","_onStreamBufferingCompleted","upcomingStreams","refStream","refStreamInfo","_getNextStreams","_stopPlaybackEndedTimerInterval","targetIndex","lastDiff","diff","_getNextStream","manifestDuration","fragData","getURIFragmentData","refStreamStartTime","posix","updatePeriods","manifestUTCTimingSources","ConformanceViolationConstants","allUTCTimingSources","getDefaultUtcTimingSource","filterUnsupportedFeatures","addPlayList","startReason","createPlaylistMetrics","counts","_handleMediaErrorDecode","msExtendedCode","_checkConfig","_onManifestValidityChanged","_onMetricAdded","KEY_SESSION_UPDATED","clearAllCurrentMetrics","PROTECTION_DESTROYED","metric","targetMediaType","autoPl","protData","PROTECTION_CREATED","setMediaElement","setProtectionData","registerEvents","getTimeRelativeToStreamId","baseStart","streamStart","streamDur","loadWithManifest","_checkInitialize","getIsStreamSwitchInProgress","switchToVideoElement","getHasMediaOrInitialisationError","GapController","lastPlaybackTime","gapHandlerInterval","lastGapJumpPosition","jumpTimeoutHandler","trackSwitchByMediaType","_onInitialStreamSwitch","_onBufferReplacementStarted","_onBufferReplacementEnded","_unregisterEvents","_shouldCheckForGaps","_jumpGap","_startGapHandler","checkSeekingState","trackSwitchInProgress","shouldIgnoreSeekingState","_shouldIgnoreSeekingState","streamEnd","_getNextRangeIndex","nextRangeIndex","seekToPosition","jumpToStreamEnd","timeToStreamEnd","timeUntilGapEnd","timeToWait","_registerEvents","MediaController","initialSettings","lastSelectedTracks","domStorage","customInitialTrackSelectionFunction","getTracksFor","current","setTrack","noSettingsSave","isTracksEqual","switchMode","extractSettings","storeLastSettings","roles","role","accessibility","audioChannelConfiguration","setSavedMediaSettings","t1","t2","sameId","sameViewpoint","viewpoint","sameLang","sameCodec","sameRoles","sameAccessibility","sameAudioChannelConfiguration","matchSettings","isTrackActive","matchLang","matchIndex","matchViewPoint","matchRole","matchAccessibility","matchAudioChannelConfiguration","getTracksWithHighestBitrate","trackArr","getTracksWithHighestEfficiency","Infinity","sum","resolution","getTracksWithWidestRange","representationCount","selectInitialTrack","tmpArr","_trackSelectionModeHighestSelectionPriority","_trackSelectionModeHighestBitrate","_trackSelectionModeFirstTrack","_trackSelectionModeHighestEfficiency","_trackSelectionModeWidestRange","tracksForType","getSavedMediaSettings","image","mediaTracks","isCurrentTrack","setCustomInitialTrackSelectionFunction","customFunc","saveTextSettingsDisabled","Node","_baseUrls","_selectedIdx","selectedIdx","BaseURLTreeModel","objectUtils","updateChildData","getBaseURLCollectionsFromManifest","pi","ai","ri","getForPath","nodes","invalidateSelectedIndexes","walk","DVBSelector","blacklistController","select","availableUrls","rn","totalWeight","cumulWeights","every","limit","selectByWeight","removedPriorities","BasicSelector","selectedBaseUrl","BaseURLSelector","serviceLocationBlacklistController","basicSelector","dvbSelector","selector","chooseSelector","isDVB","BaseURLController","baseURLTreeModel","baseURLSelector","onBlackListChanged","getIsDVB","TextRequest","XlinkLoader","urlLoader","resolveObject","report","content","resolveToZero","resolved","resolvedContent","XlinkController","iron","xlinkLoader","elements","resolveType","onXlinkAllElementsLoaded","originalContent","onXlinkElementLoaded","mergedContent","elementsToResolve","isResolvingFinished","resolvedElements","parentElement","mergeElementsBack","getElementsToResolve","xlinkObject","toResolve","createXlinkObject","resolveManifestOnLoad","setMatchers","setIron","ManifestLoader","xlinkController","mssHandler","onXlinkReady","textStatus","actualUrl","createMssParser","DashParser","createParser","getMatchers","getIron","originalManifest","errorText","ErrorHandler","CapabilitiesFilter","customCapabilitiesFilters","_filterUnsupportedCodecs","as","configurations","frameRate","_createVideoConfiguration","samplerate","audioSamplingRate","_createAudioConfiguration","_createConfiguration","_","_filterUnsupportedRepresentationsOfAdaptation","_filterUnsupportedAdaptationSetsOfPeriod","_filterUnsupportedEssentialProperties","customFilter","_applyCustomFilters","setCustomCapabilitiesFilters","customFilters","URIFragmentData","xywh","URIFragmentModel","URIFragmentDataVO","uri","hashIndex","fragment","equalIndex","ManifestModel","PRIORITY","DEFAULT","STRONG","WEAK","SwitchRequest","q","getPriority","NO_CHANGE","ThroughputRule","getMaxIndex","rulesContext","switchRequest","getMediaType","currentBufferState","getCurrentBufferState","getAbrController","throughputHistory","getAverageLatency","useBufferOccupancyABR","InsufficientBufferRule","bufferStateDict","ignoreCount","shouldIgnore","AbandonRequestsRule","fragmentDict","abandonDict","throughputArray","shouldAbandon","getCurrentRequest","fragmentInfo","firstByteTime","elapsedTime","storeLastRequestThroughputByType","totalSampledValue","measuredBandwidthInKbps","estimatedTimeOfDownload","bytesRemaining","minQuality","fragmentID","DroppedFramesRule","droppedFramesHistory","getDroppedFramesHistory","dfh","getFrameHistory","droppedFrames","totalFrames","maxIndex","droppedVideoFrames","totalVideoFrames","SwitchHistoryRule","switchRequestHistory","getSwitchHistory","switchRequests","getSwitchRequests","drops","noDrops","dropSize","BolaRule","bolaStateDict","calculateBolaParameters","bitrates","utilities","highestUtilityIndex","highestIndex","uIndex","bufferTime","gp","Vp","getInitialBolaState","initialState","utilitiesFromBitrates","lastQuality","clearBolaStateOnSeek","bolaState","placeholderBuffer","mostAdvancedSegmentStart","lastSegmentWasReplacement","lastSegmentStart","lastSegmentDurationS","lastSegmentRequestTimeMs","lastSegmentFinishTimeMs","checkBolaStateStableBufferTime","effectiveBufferLevel","maxBufferLevelForQuality","minBufferLevelForQuality","qBitrate","qUtility","iBitrate","iUtility","onBufferEmpty","onPlaybackSeeking","onMediaFragmentLoaded","checkNewSegment","onMetricAdded","bufferAtLastSegmentRequest","maxEffectiveBufferForLastSegment","maxPlaceholderBuffer","onQualityChangeRequested","abrQuality","onFragmentLoadingAbandoned","wantEffectiveBufferLevel","getBolaState","safeThroughput","nowMs","lastCallTimeMs","updatePlaceholderBuffer","bitrateCount","score","getQualityFromBufferLevel","qualityForThroughput","delayS","L2ARule","l2AStateDict","l2AParameterDict","_getInitialL2AState","w","prev_w","Q","segment_request_start_s","segment_download_finish_s","B_target","_initializeL2AParameters","_clearL2AStateOnSeek","l2AState","l2aState","l2AParameters","_checkNewSegment","L2AState","_onQualityChangeRequested","_dotmultiplication","arr1","arr2","sumdot","vl","alpha","sqrt","useL2AABR","getVideoModel","_getL2AState","l2AParameter","diff1","throughputMeasureTime","getCurrentHttpRequest","downloadBytes","lastthroughput","V","sign","bget","ii","tmpsum","tmax","euclideanProjection","temp","WEIGHT_SELECTION_MODES","LearningAbrController","somBitrateNeurons","bitrateNormalizationFactor","latencyNormalizationFactor","weights","sortedCenters","weightSelectionMode","_getMaxThroughput","maxThroughput","neuron","_getDistance","_getNeuronDistance","rebuffer","_updateNeurons","winnerNeuron","somElements","somNeuron","neuronDistance","_updateNeuronState","exp","neighbourHood","_dynamicWeightSelection","dynamicWeightsSelector","currentLatency","currentThroughput","weightVector","findWeightVector","getNextQuality","bufferSize","currentQualityIndex","bitrateVector","magnitude","switch","centers","randomDataSet","dataArray","_getRandomData","distanceWeights","nextPoint","maxDistance","currentPoint","minDistance","leastSimilarIndex","minIndex","_getInitialKmeansPlusPlusCenters","_getSomBitrateNeurons","throughputNormalized","currentNeuron","downloadTime","getSegmentDuration","getMinBuffer","maxSuitableBitrate","_getDownShiftNeuron","neuronCount","weightCount","W","upperBound","_getXavierWeights","_randomWeightSelection","somNeuronState","somData","nextBuffer","getNextBufferWithBitrate","isBufferLow","bitrateSwitch","QoeInfo","bitrateReward","bitrateSwitchPenalty","rebufferPenalty","latencyPenalty","playbackSpeedPenalty","bitrateWSum","bitrateSwitchWSum","rebufferWSum","latencyWSum","playbackSpeedWSum","totalQoe","LoLpQoeEvaluator","voPerSegmentQoeInfo","maxBitrateKbps","minBitrateKbps","_createQoeInfo","fragmentType","qoeInfo","penalty","_logMetricsInQoeInfo","rebufferTime","playbackSpeed","latencyRange","setupPerSegmentQoe","sDuration","maxBrKbps","minBrKbps","logSegmentMetrics","segmentBitrate","segmentRebufferTime","currentPlaybackSpeed","getPerSegmentQoe","calculateSingleUseQoe","singleUseQoeInfo","LoLpWeightSelector","weightOptions","previousLatency","targetLatency","bufferMin","qoeEvaluator","getNextBuffer","bitrateToDownload","neurons","currentRebuffer","maxQoE","winnerWeights","winnerBitrate","weightsObj","weightedRebuffer","weightedLatency","totalQoE","nextLatency","_checkConstraints","generate","perm","currLen","currPerm","val","LoLPRule","learningController","currentQuality","bufferStateVO","useLoLPABR","currentBitrateKbps","lastFragmentDownloadTime","ABRRulesCollection","qualitySwitchRules","abandonFragmentRules","_getRulesWithChange","srArray","sr","getMinSwitchRequest","newSwitchReq","getABRCustomRules","rule","rules","getMaxQuality","shouldAbandonFragment","getQualitySwitchRules","QUALITY_SWITCH_RULES","ABANDON_FRAGMENT_RULES","MediaPlayerModel","UTCTimingSources","xhrWithCredentials","customABRRule","findABRCustomRuleIndex","rulename","addUTCTimingSource","removeUTCTimingSource","vo","addABRCustomRule","removeABRCustomRule","lowLatencyMultiplyFactor","lowLatencyReductionFactor","liveCatchupMinDrift","maximumLiveDelay","clearDefaultUTCTimingSources","restoreDefaultUTCTimingSources","defaultUtcTimingSource","setXHRWithCredentialsForType","useCreds","default","RulesContext","switchHistory","currentRequest","bufferOccupancyABR","l2AABR","loLP","SwitchRequestHistory","srHistory","newValue","oldValue","indexDiff","drop","noDrop","srHistoryFirst","DroppedFramesHistory","lastDroppedFrames","lastTotalFrames","intervalDroppedFrames","intervalTotalFrames","clearForStream","ThroughputHistory","throughputDict","latencyDict","ewmaThroughputDict","ewmaLatencyDict","ewmaHalfLife","updateEwmaEstimate","ewmaObj","halfLife","fastAlpha","fast","fastEstimate","slowAlpha","slow","slowEstimate","getAverage","isThroughput","throughputHalfLife","latencyHalfLife","getAverageEwma","ratio","getSampleSize","elem","getAverageSlidingWindow","checkSettingsForMediaType","latencyTimeInMilliseconds","downloadTimeInMilliseconds","sumOfThroughputValues","latencyMs","downloadTimeMs","isCachedResponse","hasCachedEntries","clearSettingsForMediaType","average","AbrController","abrRulesCollection","topQualities","qualityDict","streamProcessorDict","abandonmentStateDict","abandonmentTimeout","windowResizeEventCalled","elementWidth","elementHeight","playbackIndex","switchHistoryDict","isUsingBufferOccupancyAbrDict","isUsingL2AAbrDict","isUsingLoLPAbrDict","confidence","setPlaybackQuality","_onQualityChangeRendered","switchOnThreshold","switchOffThreshold","useBufferABR","newUseBufferABR","_updateDynamicAbrStrategy","setElementSize","newIdx","_checkPortalSize","maxIdx","_checkMaxRepresentationRatio","_getMaxIndexBasedOnBitrateFor","_checkMaxBitrate","_getMinIndexBasedOnBitrateFor","topQualityIdx","_changeQuality","_getBitrateInfoForQuality","setSavedBitrateSettings","deadTimeRatio","infoList","pixelRatio","devicePixelRatio","getClientWidth","getClientHeight","audioQuality","videoQuality","savedBitrate","getSavedBitrateSettings","configBitrate","configRatio","currentValue","setWindowResizeEventCalled","strategy","_initializeAbrStrategy","QUALITY_DEFAULT","READY_STATES_TO_EVENT_NAMES","Map","VideoModel","TTMLRenderingDiv","stalledStreams","onPlaybackCanPlay","onPlaying","document","createEvent","initEvent","eventName","eventCallBack","getTextTrack","kind","label","isTTML","textTracks","targetReadyState","func","_listenOnce","closestTime","closestDistance","distanceToStart","distanceToEnd","stickTimeToBuffered","INVALID_STATE_ERR","autoplay","paused","seeking","ignoreReadyState","played","addStalledStream","removeStalledStream","stallStream","setElement","preload","removeAttribute","getSource","getTTMLRenderingDiv","setTTMLRenderingDiv","div","position","display","overflow","pointerEvents","top","left","getVideoPlaybackQuality","webkitDroppedFrameCount","webkitDecodedFrameCount","creationTime","clientWidth","clientHeight","getTextTracks","addTextTrack","appendChild","childElement","removeChild","getVideoWidth","videoWidth","getVideoHeight","videoHeight","getVideoRelativeOffsetTop","parentNode","host","getBoundingClientRect","getVideoRelativeOffsetLeft","legacyKeysAndReplacements","oldKey","newKey","DOMStorage","isSupported","storage","setItem","removeItem","getTimestamp","canStore","storageType","localStorage","getItem","isExpired","timestamp","mediaSettings","SegmentBaseLoader","onLoaded","getFragmentRequest","setInfo","loadInitialization","_loadInitializationRecursively","loadingInfo","searching","bytesToLoad","loadSegments","_loadSegmentsRecursively","hasRange","extraBytes","loadedLength","loadMultiSidx","ref","se","segs","tmpCallback","refs","getSegmentsForSidx","lastBox","EBMLParser","consumeTag","tag","bytesConsumed","required","getMatroskaCodedNum","retainMSB","bytesUsed","mask","num","ch","getPos","setPos","consumeTagAndSize","parseTag","skipOverElement","headerSize","getMatroskaFloat","outFloat","getFloat32","getFloat64","getMatroskaUint","moreData","WebmSegmentBaseLoader","WebM","parseSegments","segmentStart","segmentEnd","parsed","cue","cueTrack","cues","ebmlParser","Cues","CuePoint","CueTime","CueTracks","CueTrackPositions","cueTrackPositionSize","Track","CueTrack","ClusterPosition","CueClusterPosition","parseCues","theRange","EBML","Info","SeekHead","Tracks","Void","infoTag","infoElementSize","Duration","parseEbmlHeader","TimecodeScale","SegmentBaseController","segmentBaseLoader","webmSegmentBaseLoader","isWebM","RepresentationInfo","MediaInfo","labels","KID","StreamInfo","ManifestInfo","availableFrom","SimpleXPath","valid","component","qualifierPoint","qualifier","equalityPoint","attribute","findsAttribute","isSiblingOperation","leaf","elm","PatchOperation","xpath","getMpdTarget","PatchManifestModel","getOriginalPublishTime","getMpdId","getPatchOperations","nodeContainer","sel","isValid","groups","operation","DashAdapter","patchManifestModel","cea608parser","allMediaInfoForType","mInfoOne","mInfoTwo","_getAllMediaInfo","embeddedText","mediaArr","convertAdaptationToMediaInfo","accessibilityLength","convertVideoInfoToEmbeddedTextInfo","externalManifest","voLocalPeriods","selectedVoPeriod","getPeriodForStreamInfo","adaptationsForType","getManifest","getAdaptationForMediaInfo","voPeriodsArray","convertPeriodToStreamInfo","accessibilityValue","accessibilityData","search","embeddedCaptions","keyIds","cp","kid","keyId","isText","getPeriod","periodIdx","findRepresentation","returnIndex","adaptationSetArray","adaptationSetArrayIndex","representationArrayIndex","getBandwidthForRepresentation","getIndexForRepresentation","findRepresentationIndex","getMaxIndexForBufferType","bufferType","adaptationSet","findMaxBufferIndex","maxStreamsInfo","getRealPeriodByIndex","eventBox","newManifest","getPeriodById","periods","manifestId","patchManifestId","manifestPublishTime","patchPublishTime","originalManifestPublishTime","relativePosition","insertBefore","targetArray","insert","insertNodes","updatedNodes","Round10","_decimalAdjust","MetricsList","TcpList","HttpList","RepSwitchList","BufferLevel","BufferState","DroppedFrames","SchedulingInfo","DVRInfo","ManifestUpdate","RequestsQueue","DVBErrors","RepresentationSwitch","mt","lto","fetchTime","ManifestUpdateStreamInfo","ManifestUpdateRepresentationInfo","streamIndex","fragmentInfoType","MetricsModel","streamMetrics","metricsChanged","metricChanged","metricUpdated","metricType","metricAdded","getMetricsFor","readOnly","pushMetrics","pushAndNotify","metricObject","clearCurrentMetricsForType","tfinish","mediaduration","appendHttpTrace","addRepresentationSwitch","TrackSwitch","manifestUpdate","updatedFields","addManifestUpdateRepresentationInfo","addDVBErrors","DashMetrics","playListTraceMetricsClosed","playListTraceMetrics","playListMetrics","metricsModel","httpListLastIndex","httpList","currentHttpList","getHttpRequests","getCurrent","metricName","getCurrentRepresentationSwitch","round10","getCurrentDroppedFrames","getCurrentManifestUpdate","getLatestFragmentRequestHeaderValueByID","parseHttpHeaders","httpRequestList","manifestUpdateInfo","speed","traceToUpdate","endTime","TimelineConverter","timelineAnchorAvailabilityOffset","clientServerTimeShift","setClientTimeOffset","_calcAvailabilityTimeFromPresentationTime","calculateAvailabilityEndTime","availabilityTime","calcPresentationTimeFromWallTime","wallTime","mediaTime","_calcTimeShiftBufferWindowForDynamicTimelineManifest","periodRange","_calcRangeForTimeline","currentVoPeriod","adjustedEndTime","_adjustTimeBasedOnPeriodRanges","_adjustTimelineAnchorAvailabilityOffset","isEndOfDvrWindow","_onUpdateTimeSyncOffset","mpdRelativeTime","displayStartTime","_calcTimeshiftBufferForStaticManifest","timelineRefData","_calcTimeShiftBufferWindowForDynamicManifest","TextTrackInfo","captionData","defaultTrack","EmbeddedTextHtmlRender","captionId","checkIndent","line","getRegionProperties","region","y1","y2","createRGB","getStyle","videoElement","fontSize","ltrim","rtrim","createHTMLCaptionsFromScreen","captionScreen","currRegion","lastRowHasText","lastRowIndentL","currP","spans","currentStyle","seenRegions","styleStates","regions","prevPenState","rowIndent","contat","uc","currPenStateString","captionsArray","cueID","finalDiv","createElement","cueRegionProperties","cssText","bodyDiv","cueUniWrapper","ptag","lastSpanRow","span","brElement","sameRow","spanStyle","spanElement","textContent","cueHTMLElement","cellResolution","isFromCEA608","lineHeight","linePadding","TextSourceBuffer","mediaInfos","initializationSegmentReceived","fragmentedTracks","firstFragmentedSubtitleStart","currFragmentedTrackIdx","embeddedTracks","embeddedTimescale","embeddedLastSequenceNumber","embeddedCea608FieldParsers","embeddedTextHtmlRender","vttParser","ttmlParser","embeddedInitialized","_createTextTrackFromMediaInfo","textTrackInfo","getIsDefault","_checkTtml","trackKindMap","caption","subtitle","_getKind","_onVideoChunkReceived","setCurrentFragmentedTrackIdx","codecType","samplesInfo","cts","getParser","sampleStart","_getTimestampOffset","ccContent","images","subOffset","inData","offsetTime","ttmlTimeIsRelative","addCaptions","_appendFragmentedSttp","captionArray","sampleBoxes","box1","box2","cue_text","start_time","end_time","_appendFragmentedWebVtt","_appendFragmentedText","sequenceNumber","trackIdx","getTrackIdxForId","_makeCueAdderForIndex","_setupCeaParser","allCcData","splits","fields","cea608Ranges","lastSampleTime","ccData","_extractCea608Data","fieldNr","fieldParser","_appendEmbeddedText","getCurrentTrackIdx","_appendText","trackIndex","onVideoBufferCleared","deleteCuesFromTrackIdx","addMediaInfos","mInfos","fModel","currFragTrack","resetMediaInfos","resetEmbedded","deleteAllTextTracks","getConfig","TextTracks","Cue","textTrackQueue","nativeTrackElementArr","currentTrackIdx","actualVideoLeft","actualVideoTop","actualVideoWidth","actualVideoHeight","captionContainer","videoSizeCheckInterval","fullscreenAttribute","displayCCOnTop","previousISDState","topZIndex","resizeObserver","getVideoVisibleVideoSize","viewWidth","viewHeight","aspectRatio","use80Percent","videoPictureWidth","videoPictureHeight","videoPictureXAspect","videoPictureYAspect","videoPictureWidthAspect","videoPictureHeightAspect","h","checkVideoSize","forceDrawing","videoOffsetTop","videoOffsetLeft","realVideoSize","newVideoWidth","newVideoHeight","newVideoLeft","newVideoTop","containerStyle","zIndex","activeCues","scaleCue","activeCue","replaceValue","valueFontSize","valueLineHeight","cellUnit","elementsSpan","getElementsByClassName","isd","htmlCaptionDiv","getElementById","renderCaption","finalCue","imsc1ImgUrnTester","smpteImgUrnTester","imageId","btoa","embeddedImages","captionDiv","getTrackByIdx","currentItem","align","onenter","onexit","divs","cueInTrack","addCue","deleteTrackCues","setCurrentTrackIdx","setCueStyleOnTrack","renderingType","ResizeObserver","observe","clearCaptionContainer","setNativeCueStyle","removeNativeCueStyle","cueInRange","removeCue","styleElement","head","stylesheet","sheet","insertRule","classList","firstChild","VTTCue","TextTrackCue","fullscreenElement","webkitIsFullScreen","msFullscreenElement","mozFullScreen","textTrackInfoVO","defaultIndex","textTrack","onMetadataLoaded","videoTextTrack","trackId","getCurrentTrackInfo","setModeForTrackIdx","unobserve","deleteTextTrack","VTTParser","regExNewLine","regExToken","regExWhiteSpace","regExWhiteSpaceWordBoundary","convertCuePointTimes","timeArray","parseItemAttributes","vttCuePoints","cuePoints","getCaptionStyles","styleObject","getSublines","lineCount","subline","lineData","lastStartTime","TTMLParser","cueCounter","startTimeSegment","endTimeSegment","errorMsg","currentImageId","accumulated_image_data","metadataHandler","onOpenTag","attrs","onCloseTag","onText","contents","imsc1doc","ttmlString","ttmlDoc","mediaTimeEvents","getMediaTimeEvents","topLevelContents","TextController","streamData","textSourceBuffers","initialSettingsSet","allTracksAreDisabled","forceTextStreaming","textTracksAdded","disableTextBeforeTextTracksAdded","_onTextTracksAdded","lastEnabledIndex","oldTrackIdx","currentFragTrack","_setFragmentedTextTrack","_setNonFragmentedTextTrack","textSourceBuffer","getAllTracksAreDisabled","enableText","enable","enableForcedTextStreaming","MediaPlayer","mediaPlayerInitialized","streamingInitialized","playbackInitialized","metricsReportingController","offlineController","gapController","licenseRequestFilters","licenseResponseFilters","STREAMING_NOT_INITIALIZED_ERROR","PLAYBACK_NOT_INITIALIZED_ERROR","ELEMENT_NOT_ATTACHED_ERROR","attachSource","attachView","isReady","getVersionString","getDVRSeekOffset","getVideoElement","setAutoPlay","getDashMetrics","_detectProtection","MetricsReporting","dashjs","metricsReporting","createMetricsReporting","mediaElement","metricsConstants","_detectMetricsReporting","MssHandler","initSegmentType","_detectMss","_resetPlaybackControllers","_initializePlayback","unregisterFilter","urlOrManifest","stop","_createManifestLoader","Protection","createProtectionSystem","setLicenseRequestFilters","setLicenseResponseFilters","_detectOffline","OfflineController","_getAsUTC","valToConvert","resetRecords","view","AutoPlay","parentNameString","setMute","muted","isMuted","setVolume","volume","getVolume","timeAsUTC","durationAsUTC","getDVRWindowSize","convertToTimeCode","formatUTC","locales","hour12","withDate","toLocaleDateString","toLocaleTimeString","getDebug","setQualityFor","updatePortalSize","getBitrateInfoListFor","getStreamsFromManifest","getTracksForTypeFromManifest","setInitialMediaSettingsFor","getInitialMediaSettingsFor","setCurrentTrack","removeAllABRCustomRule","retrieveManifest","getProtectionController","attachProtectionController","registerLicenseRequestFilter","registerLicenseResponseFilter","unregisterLicenseRequestFilter","unregisterLicenseResponseFilter","registerCustomCapabilitiesFilter","unregisterCustomCapabilitiesFilter","resetCustomInitialTrackSelectionFunction","attachTTMLRenderingDiv","getCurrentTextTrackIndex","provideThumbnail","timeInPeriod","getDashAdapter","getOfflineController","getSettings","updateSettings","resetSettings","destroy","T","encodeArray","R","ASCII","encodeASCII","decodeASCII","voAvailableRepresentations","currentVoRepresentation","_updateRepresentation","currentRep","_onInitLoaded","_onSegmentsLoaded","repInfo","alreadyAdded","isAllRepresentationsUpdated","_addRepresentationSwitch","endDataUpdate","_onRepresentationUpdated","currentVideoTimeMs","numberOfRepresentations","_setCurrentVoRepresentation","onManifestValidityChanged","availableRepresentations","keyList","hasProp","arrA","arrB","dateA","dateB","regexpA","regexpB","ObjectIron","mappers","mergeValues","parentItem","childItem","mapProperties","properties","parentValue","childValue","mapItem","len2","childNode","periodMapper","adaptationSets","adaptationSetMapper","adaptationset","BaseMatcher","_test","_converter","StringMatcher","stringAttrsInElements","attrNames","durationRegex","DurationMatcher","attributeList","datetimeRegex","DateTimeMatcher","numericRegex","NumericMatcher","CommonProperty","_name","_merge","MapNode","_properties","_children","RepresentationBaseValuesMap","commonProperties","SegmentValuesMap","objectIron","jsonTime","Patch","add_asArray","operand","replace_asArray","ironedTime","toPrecision","HeadRequest","checkForExistenceOnly","checkForExistence","exists","headRequest","imscStyles","imscUtils","StylingAttributeDefinition","initialValue","appliesTo","isInherit","isAnimatable","parseFunc","computeFunc","qname","inherit","animatable","initial","applies","compute","parseColor","parseLength","doc","unit","pxDimensions","ffs","rslt","fs","styleAttrs","byName","lh","writingMode","out","extent","thickness","byQName","base64","ieee754","kMaxLength","TYPED_ARRAY_SUPPORT","createBuffer","that","RangeError","__proto__","fromArrayLike","fromArrayBuffer","isEncoding","actual","fromString","checked","fromObject","assertSize","isView","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","bidirectionalIndexOf","arrayIndexOf","indexSize","arrLength","valLength","readUInt16BE","foundIndex","hexWrite","strLen","utf8Write","blitBuffer","asciiWrite","byteArray","asciiToBytes","latin1Write","base64Write","ucs2Write","units","hi","lo","utf16leToBytes","fromByteArray","thirdByte","fourthByte","tempCodePoint","firstByte","codePoint","bytesPerSequence","codePoints","decodeCodePointsArray","INSPECT_MAX_BYTES","global","foo","typedArraySupport","poolSize","_augment","species","_isBuffer","compare","swap16","swap32","swap64","inspect","thisStart","thisEnd","thisCopy","targetCopy","includes","toJSON","_arr","toHex","checkOffset","checkInt","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","writeDouble","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","INVALID_BASE64_RE","leadSurrogate","toByteArray","stringtrim","base64clean","ReflectOwnKeys","Reflect","ReflectApply","receiver","ownKeys","getOwnPropertySymbols","getOwnPropertyNames","NumberIsNaN","EventEmitter","emitter","errorListener","resolver","eventTargetAgnosticAddListener","addErrorHandlerIfEventEmitter","_events","_eventsCount","_maxListeners","defaultMaxListeners","checkListener","_getMaxListeners","_addListener","prepend","existing","warning","newListener","warned","onceWrapper","fired","wrapFn","_onceWrap","wrapped","_listeners","unwrap","evlistener","unwrapListeners","arrayClone","listenerCount","wrapListener","getPrototypeOf","setMaxListeners","getMaxListeners","doError","er","originalListener","spliceOne","rawListeners","eventNames","Transform","PassThrough","CorkedRequest","finish","corkReq","pendingcb","corkedRequestsFree","onCorkedFinish","asyncWrite","setImmediate","WritableState","internalUtil","deprecate","OurUint8Array","realHasInstance","destroyImpl","nop","isDuplex","objectMode","writableObjectMode","hwm","writableHwm","writableHighWaterMark","defaultHwm","finalCalled","needDrain","ending","finished","noDecode","decodeStrings","defaultEncoding","writing","corked","sync","bufferProcessing","onwrite","writecb","writelen","onwriteStateUpdate","finishMaybe","errorEmitted","onwriteError","needFinish","bufferedRequest","clearBuffer","afterWrite","lastBufferedRequest","prefinished","bufferedRequestCount","_write","writev","_writev","final","_final","doWrite","onwriteDrain","holder","allBuffers","isBuf","callFinal","need","prefinish","hasInstance","pipe","_uint8ArrayToBuffer","writeAfterEnd","validChunk","newChunk","decodeChunk","writeOrBuffer","cork","uncork","setDefaultEncoding","endWritable","_undestroy","undestroy","StringDecoder","nb","enc","nenc","retried","_normalizeEncoding","normalizeEncoding","utf16Text","utf16End","fillLast","utf8FillLast","base64Text","base64End","simpleWrite","simpleEnd","lastNeed","lastTotal","lastChar","utf8CheckByte","utf8CheckExtraBytes","utf8CheckIncomplete","HEX_COLOR_RE","DEC_COLOR_RE","DEC_COLORA_RE","NAMED_COLOR","transparent","black","silver","gray","white","maroon","red","purple","fuchsia","magenta","green","lime","olive","yellow","navy","blue","teal","aqua","cyan","nc","LENGTH_RE","ReadableState","EElistenerCount","debugUtil","debuglog","BufferList","kProxyEvents","readableObjectMode","readableHwm","readableHighWaterMark","pipes","pipesCount","flowing","endEmitted","reading","needReadable","emittedReadable","readableListening","resumeScheduled","awaitDrain","readingMore","_read","readableAddChunk","addToFront","skipChunkCheck","emitReadable","onEofChunk","chunkInvalid","addChunk","maybeReadMore","needMoreData","setEncoding","howMuchToRead","computeNewHighWaterMark","emitReadable_","flow","maybeReadMore_","nReadingNextTick","resume_","fromList","hasStrings","tail","copyFromBufferString","copyFromBuffer","fromListPartial","endReadable","endReadableNT","nOrig","doRead","pipeOpts","endFn","stdout","stderr","unpipe","onunpipe","unpipeInfo","hasUnpiped","onclose","onfinish","ondrain","ondata","cleanedUp","pipeOnDrain","increasedAwaitDrain","resume","dests","ev","wrap","_fromList","emitErrorNT","readableDestroyed","writableDestroyed","afterTransform","_transformState","transforming","writechunk","rs","needTransform","writeencoding","transform","_transform","flush","_flush","_this2","err2","LICENSE_SERVER_MANIFEST_CONFIGURATIONS","prefixes","CommonEncryption","cpArray","retVal","pssh","keySystem","initData","psshList","parsePSSHList","uuid","cpData","dv","byteCursor","nextBox","systemID","boxStart","licenseServer","targetProtectionData","ckData","MediaCapability","robustness","KeySystemConfiguration","audioCapabilities","videoCapabilities","distinctiveIdentifier","persistentState","sessionTypes","initDataTypes","protectionErrors","MEDIA_KEYERR_CODE","MEDIA_KEYERR_UNKNOWN_CODE","MEDIA_KEYERR_CLIENT_CODE","MEDIA_KEYERR_SERVICE_CODE","MEDIA_KEYERR_OUTPUT_CODE","MEDIA_KEYERR_HARDWARECHANGE_CODE","MEDIA_KEYERR_DOMAIN_CODE","MEDIA_KEY_MESSAGE_ERROR_CODE","MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE","SERVER_CERTIFICATE_UPDATED_ERROR_CODE","KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE","MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE","KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE","KEY_SESSION_CREATED_ERROR_CODE","MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE","MEDIA_KEYERR_UNKNOWN_MESSAGE","MEDIA_KEYERR_CLIENT_MESSAGE","MEDIA_KEYERR_SERVICE_MESSAGE","MEDIA_KEYERR_OUTPUT_MESSAGE","MEDIA_KEYERR_HARDWARECHANGE_MESSAGE","MEDIA_KEYERR_DOMAIN_MESSAGE","MEDIA_KEY_MESSAGE_ERROR_MESSAGE","MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE","SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE","KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE","MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE","KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE","KEY_SESSION_CREATED_ERROR_MESSAGE","MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE","LicenseRequest","messageType","sessionId","LicenseResponse","ProtectionController","pendingKeySystemData","protDataSet","sessionType","robustnessLevel","selectedKeySystem","keySystemSelectionInProgress","protectionKeyController","protectionModel","needkeyRetries","_selectKeySystem","supportedKS","fromManifest","ksIdx","ks","_loadOrCreateKeySession","_initiateWithExistingKeySystem","keySystemAccess","requestedKeySystems","keySystemConfiguration","_getKeySystemConfiguration","configs","requestKeySystemAccess","selectedSystemString","mksa","systemString","selectKeySystem","_getProtDataForKeySystem","serverCertificate","setServerCertificate","ProtectionErrors","_selectInitialKeySystem","keySystemInfo","isClearKey","kids","clearkeys","loadKeySession","createKeySession","initDataForKS","getPSSHForKeySystem","sessions","getSessions","getKeyId","_isKeyIdDuplicate","_isInitDataDuplicate","keySystemString","currentInitData","getAllInitData","initDataEquals","NEED_KEY","_onNeedKey","keySystemData","audioRobustness","videoRobustness","ksSessionType","_onKeyStatusChanged","_onKeyMessage","keyMessage","KEY_MESSAGE","sessionToken","licenseServerModelInstance","getLicenseServerModelInstance","eventData","getSessionId","_sendLicenseRequestCompleteEvent","processClearKeyLicenseRequest","updateKeySession","licenseServerData","serverURL","laURL","getLicenseServerUrlFromMediaInfo","schemeIdURI","psshData","getPSSHData","getLicenseServerURLFromInitData","getServerURLFromMessage","_getLicenseServerUrl","reqHeaders","_updateHeaders","httpRequestHeaders","headersFromMessage","getRequestHeadersFromMessage","onLoad","licenseResponse","_applyFilters","licenseMessage","getLicenseMessage","_reportError","onAbort","onError","reqPayload","getLicenseRequestFromMessage","reqMethod","getHTTPMethod","getResponseType","httpTimeout","licenseRequest","_doLicenseRequest","retriesCount","cmcdParams","cmcdHeaders","_retryRequest","retryInterval","LICENSE_REQUEST_SENDING","_issueLicenseRequest","getErrorResponse","retry","initDataType","abInitData","getSupportedKeySystemsFromSegmentPssh","getSupportedKeySystemsFromContentProtection","ksA","ksB","removeKeySession","closeKeySession","setSessionType","setRobustnessLevel","cps","getKeySystems","setKeySystems","keySystems","INTERNAL_KEY_MESSAGE","INTERNAL_KEY_STATUS_CHANGED","retryTimeout","KeyPair","keyID","ClearKeyKeySet","keyPairs","numKeys","jwk","kty","alg","jwkString","bView","CLEARKEY_KEYSTEM_STRING","WIDEVINE_KEYSTEM_STRING","PLAYREADY_KEYSTEM_STRING","PLAYREADY_RECOMMENDATION_KEYSTEM_STRING","INITIALIZATION_DATA_TYPE_CENC","INITIALIZATION_DATA_TYPE_KEYIDS","INITIALIZATION_DATA_TYPE_WEBM","ProtectionConstants","KeySystemClearKey","getInitData","cencContentProtection","parseInitDataFromContentProtection","cencDefaultKid","cencDefaultKidToBase64Representation","getCDMData","getClearKeysFromProtectionData","clearkeySet","jsonMsg","clearkeyID","clearkey","KeySystemW3CClearKey","KeySystemWidevine","KeySystemPlayReady","messageFormat","PROSize","PSSHSize","PSSHBoxBuffer","PSSHBox","PSSHData","PSSHBoxType","playreadySystemID","uint8arraydecodedPROHeader","pro","prheader","dataview","Uint16Array","headerNameList","getElementsByTagName","headerValueList","Content","Challenge","numRecords","recordType","recordLength","recordData","record","laurl","luiurl","_cdmData","customData","cdmData","cdmDataBytes","setPlayReadyMessageFormat","format","DRMToday","license","keySystemStr","serverResponse","PlayReady","soap","uintToString","encodedString","decodeURIComponent","escape","parseServerResponse","stringResponse","envelope","parseErrorResponse","faultstring","statusCode","idStart","idEnd","fault","detail","exception","errorString","Widevine","ClearKey","keypair","keyid","ProtectionKeyController","clearkeyKeySystem","clearkeyW3CKeySystem","_getSessionId","_getSessionType","protectionDataSet","initData1","initData2","data1","data2","newKeySystems","getKeySystemBySystemString","cpIdx","findCencContentProtection","protectionEvents","KEY_ADDED","KEY_SESSION_CLOSED","KEY_SESSION_REMOVED","KEY_SYSTEM_ACCESS_COMPLETE","TEARDOWN_COMPLETE","VIDEO_ELEMENT_SELECTED","NeedKey","KeyMessage","defaultURL","KeySystemAccess","ksConfiguration","SYSTEM_STRING_PRIORITY","ProtectionModel_21Jan2015","mediaKeys","eventHandler","_closeKeySessionInternal","session","close","removeSession","parseKeyStatus","createSessionToken","ksInfo","handleEvent","keyStatuses","keyStatus","getSessionType","getExpirationTime","expiration","getKeyStatuses","getUsable","usable","ksConfigurations","_requestKeySystemAccessInternal","requestMediaKeySystemAccess","protDataSystemStringPriority","systemStringPriority","currentKeySystem","systemStringsToApply","_checkAccessForSystemStrings","mediaKeySystemAccess","_checkAccessForKeySystem","getConfiguration","createMediaKeys","mkeys","setMediaKeys","createSession","dataType","generateRequest","toJWK","numSessions","ProtectionModel_3Feb2014","api","needkey","ready","release","boundDoSetKeys","doSetKeys","supportedAudio","supportedVideo","configIdx","audios","videos","audioIdx","MediaKeys","videoIdx","ksConfig","errorMessage","ksAccess","keySession","destinationURL","ProtectionModel_01b","pendingSessions","moreSessionsAllowed","removeEventListeners","cancelKeyRequest","findSessionByID","sessionArray","keyerror","keymessage","keyadded","ve","canPlayType","newSession","generateKeyRequest","addKey","errorCode","systemCode","APIS_ProtectionModel_01b","APIS_ProtectionModel_3Feb2014","_getAPI","apis","onencrypted","_getProtectionModel","ProtectionEvents","mpdurl","errorcode","terror","ipaddress","servicelocation","SSL_CONNECTION_FAILED_PREFIX","DNS_RESOLUTION_FAILED","HOST_UNREACHABLE","CONNECTION_REFUSED","CONNECTION_ERROR","CORRUPT_MEDIA_ISOBMFF","CORRUPT_MEDIA_OTHER","BASE_URL_CHANGED","BECAME_REPORTER","DVBErrorsTranslator","onManifestUpdate","onServiceLocationChanged","onBecameReporter","onMetricEvent","onPlaybackError","MediaError","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","initialise","RangeController","useWallClockTime","starttime","_useWallClockTime","isEnabled","numRanges","MetricSerialiser","serialise","pairs","isBuiltIn","RNG","randomNumbers","crypto","msCrypto","ArrayType","Uint32Array","BYTES_PER_ELEMENT","getRandomValues","DVBReporting","metricSerialiser","randomNumberGenerator","reportingPlayerStatusDecided","isReportingPlayer","reportingUrl","rangeController","pendingRequests","vos","successCB","failureCB","reqIndex","doGetRequest","rc","probability","dvb_reportingUrl","dvb_probability","ReportingFactory","knownReportingSchemeIdUris","reporting","register","moduleName","unregister","ReportingController","reporters","reportingFactory","reporter","HandlerHelpers","reconstructFullMetricName","mn","validateN","n_ms","BufferLevelHandler","reportingController","lastReportedTime","handlerHelpers","storedVOs","intervalCallback","getLowestBufferLevelVO","handleNewMetric","onInitialisationComplete","unused","HttpListHandler","storedVos","requestType","GenericMetricHandler","MetricsHandlerFactory","keyRegex","knownFactoryProducts","listType","MetricsHandlersController","metricsHandlerFactory","handle","midx","ms","nextm","MetricsController","metricsHandlersController","metricsEntry","Range","Reporting","Metrics","ManifestParsing","getMetrics","Metrics_asArray","metricEntry","Range_asArray","rangeEntry","dynamic","reportingStartTime","getMetricsRangeStartTime","Reporting_asArray","reportingEntry","MetricsCollectionController","metricsControllers","controllersToRemove","resetMetricsControllers","getReportingFactory","getMetricsHandlerFactory","Version","imscISD","isdProcessContentElement","inherited_region_id","errorHandler","begin","associated_region_id","regionID","isd_element","ISDContentElement","sets","spec_attr","direction","wm","sa","textDecoration","ps","es","outs","ivs","z","cs","cstyle","reportError","qnameb","space","trimmedspan","elist","constructSpanList","br_pos","pruneEmptySpans","backgroundImage","showBackground","region_id","ISD","tt","ttelem","sname","layout","imscDoc","sax","resolveTiming","prev_sibling","isinseq","timeContainer","implicit_begin","explicit_begin","implicit_end","set_i","content_i","explicit_end","explicit_dur","_registerEvent","ForeignElement","TT","Head","styling","Styling","Style","styleRefs","Layout","ContentElement","IdentifiedElement","LayoutElement","StyledElement","AnimatedElement","ContainerElement","TimedElement","Body","Div","P","Span","AnonymousSpan","Br","Region","Set","elementGetXMLID","elementGetStyleRefs","elementGetStyles","local","reportWarning","findAttribute","parseTimeExpression","tickRate","effectiveFrameRate","mergeChainedStyles","sref","mergeStylesIfNotPresent","mergeReferencedStyles","stylerefs","styleattrs","from_styles","into_styles","reportFatal","searchval","cur","curval","xmlstring","xmlns","estack","xmllangstack","xmlspacestack","metadata_depth","onclosetag","ontext","initFromText","onopentag","xmlspace","xmllang","column","initFromNode","hasRegions","dr","createDefaultRegion","region_i","cr","extractCellResolution","frtr","fps_attr","fps","frm_attr","frm","efps","tr","trattr","extractFrameAndTickRate","ar","extractAspectRatio","extractExtent","b_i","e_i","getMediaTimeRange","elementGetRegionID","dur","processTiming","tc","elementGetTimeContainer","strict","opt","SAXParser","SAXStream","createStream","MAX_BUFFER_LENGTH","bufferCheckPosition","lowercase","lowercasetags","looseCase","tags","closedRoot","sawRoot","noscript","S","BEGIN","strictEntities","ENTITIES","XML_ENTITIES","attribList","rootNS","trackPosition","F","BEGIN_WHITESPACE","beginWhiteSpace","starti","textNode","not","whitespace","strictFail","TEXT_ENTITY","OPEN_WAKA","startTagPosition","SCRIPT","SCRIPT_ENDING","script","CLOSE_TAG","SGML_DECL","sgmlDecl","is","nameStart","OPEN_TAG","tagName","PROC_INST","procInstName","procInstBody","pad","emitNode","CDATA","cdata","COMMENT","comment","DOCTYPE","doctype","quote","SGML_DECL_QUOTED","DOCTYPE_DTD","DOCTYPE_QUOTED","DOCTYPE_DTD_QUOTED","COMMENT_ENDING","COMMENT_ENDED","textopts","CDATA_ENDING","CDATA_ENDING_2","PROC_INST_ENDING","PROC_INST_BODY","nameBody","newTag","openTag","OPEN_TAG_SLASH","ATTRIB","closeTag","attribName","attribValue","ATTRIB_NAME","ATTRIB_VALUE","attrib","ATTRIB_NAME_SAW_WHITE","ATTRIB_VALUE_QUOTED","ATTRIB_VALUE_UNQUOTED","ATTRIB_VALUE_ENTITY_Q","ATTRIB_VALUE_CLOSED","attribEnd","ATTRIB_VALUE_ENTITY_U","CLOSE_TAG_SAW_WHITE","returnState","parseEntity","entity","entityBody","entityStart","maxAllowed","maxActual","closeText","checkBufferLength","ex","streamWraps","_parser","me","_decoder","SD","number","letter","XML_NAMESPACE","xml","charClass","charclass","stringFromCharCode","fromCodePoint","STATE","COMMENT_STARTING","qualName","qn","selfClosing","nv","isSelfClosing","closeTo","entityLC","highSurrogate","lowSurrogate","MAX_SIZE","codeUnits","b64","lens","getLens","validLen","placeHoldersLen","Arr","_byteLength","curByte","revLookup","uint8","encodeChunk","lookup","output","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","rt","LN2","EE","_isStdio","didOnEnd","cleanup","Constructor","_classCallCheck","custom","Timeout","clearFn","_id","_clearFn","unref","enroll","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","active","_onTimeout","clearImmediate","registerImmediate","html","messagePrefix","onGlobalMessage","nextHandle","tasksByHandle","currentlyRunningATask","attachTo","runIfPresent","postMessage","importScripts","postMessageIsAsynchronous","oldOnMessage","onmessage","canUsePostMessage","MessageChannel","port1","port2","documentElement","onreadystatechange","attachEvent","task","imscHTML","processElement","dom_parent","margin","STYLING_MAP_DEFS","sm","proc_e","wdir","ipd","bpd","lp","padmeasure","paddingLeft","paddingRight","paddingTop","paddingBottom","mra","multiRowAlign","textAlign","fillLineGap","flg","cbuf","cc","linelist","constructLineList","lineList","lastnode","nextSibling","applyMultiRowAlign","start_elem","ee","end_elem","pospadpxlen","negpadpxlen","borderLeftColor","bgcolor","borderLeftStyle","borderLeftWidth","marginLeft","borderRightColor","borderRightStyle","borderRightWidth","marginRight","borderTopColor","borderTopStyle","borderTopWidth","marginTop","borderBottomColor","borderBottomStyle","borderBottomWidth","marginBottom","applyLinePadding","par_edges","rect2edges","par_before","par_after","frontier","before","after","backgroundColor","applyFillLineGap","enableRollUp","displayAlign","rb","RegionPBuffer","currentISDState","plist","body_elem","firstElementChild","bottom","transition","rect","edges","right","llist","before1","after1","before2","after2","curbgcolor","childElementCount","bpd_dir","ipd_dir","ELEMENT_NODE","HTMLStylingMapDefintion","qName","mapFunc","imgResolver","eheight","ewidth","displayForcedOnlyMode","twidth","rootcontainer","regionH","regionW","dom_element","flexDirection","justifyContent","hdelta","wdelta","fontFamily","fontStyle","fontWeight","opacity","ta","textShadow","ub","unicodeBidi","visibility","whiteSpace","img","STYLMAP_BY_QNAME","polyfill","vertxNext","customSchedulerFn","asap","scheduleFlush","browserWindow","browserGlobal","BrowserMutationObserver","MutationObserver","WebKitMutationObserver","isNode","isWorker","Uint8ClampedArray","useSetTimeout","globalSetTimeout","iterations","observer","onFulfillment","onRejection","PROMISE_ID","makePromise","_state","invokeCallback","_result","subscribe","resolve$1","createTextNode","characterData","vertx","require","runOnLoop","runOnContext","attemptVertx","handleMaybeThenable","maybeThenable","then$$1","thenable","fulfill","handleOwnThenable","sealed","fulfillmentHandler","rejectionHandler","tryThen","_label","handleForeignThenable","publishRejection","_onerror","publish","_subscribers","subscribers","settled","hasCallback","succeeded","Enumerator","input","_instanceConstructor","_remaining","_enumerate","_eachEntry","resolve$$1","_then","didError","_settledAt","Promise$1","_willSettleAt","enumerator","needsResolver","initializePromise","needsNew","catch","finally","race","_setScheduler","scheduleFn","_setAsap","asapFn","_asap","promiseToString","cast","loadInterval","_dashjs_player","player","videoID","querySelectorAll","findVideo","createAll","aPlayers","sources","MediaPlayerFactory","skipAutoCreate","loadHandler"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAgB,OAAID,IAEpBD,EAAa,OAAIC,IARnB,CASGK,QAAQ,WACX,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUP,QAGnC,IAAIC,EAASI,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHT,QAAS,IAUV,OANAU,EAAQH,GAAUI,KAAKV,EAAOD,QAASC,EAAQA,EAAOD,QAASM,GAG/DL,EAAOQ,GAAI,EAGJR,EAAOD,QA0Df,OArDAM,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASd,EAASe,EAAMC,GAC3CV,EAAoBW,EAAEjB,EAASe,IAClCG,OAAOC,eAAenB,EAASe,E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\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"dashjs\"] = factory();\n\telse\n\t\troot[\"dashjs\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 104);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n * Dash constants declaration\n * @class\n * @ignore\n */\nclass DashConstants {\n\n init() {\n this.BASE_URL = 'BaseURL';\n this.SEGMENT_BASE = 'SegmentBase';\n this.SEGMENT_TEMPLATE = 'SegmentTemplate';\n this.SEGMENT_LIST = 'SegmentList';\n this.SEGMENT_URL = 'SegmentURL';\n this.SEGMENT_TIMELINE = 'SegmentTimeline';\n this.SEGMENT_PROFILES = 'segmentProfiles';\n this.ADAPTATION_SET = 'AdaptationSet';\n this.REPRESENTATION = 'Representation';\n this.REPRESENTATION_INDEX = 'RepresentationIndex';\n this.SUB_REPRESENTATION = 'SubRepresentation';\n this.INITIALIZATION = 'Initialization';\n this.INITIALIZATION_MINUS = 'initialization';\n this.MPD = 'MPD';\n this.PERIOD = 'Period';\n this.ASSET_IDENTIFIER = 'AssetIdentifier';\n this.EVENT_STREAM = 'EventStream';\n this.ID = 'id';\n this.PROFILES = 'profiles';\n this.SERVICE_LOCATION = 'serviceLocation';\n this.RANGE = 'range';\n this.INDEX = 'index';\n this.MEDIA = 'media';\n this.BYTE_RANGE = 'byteRange';\n this.INDEX_RANGE = 'indexRange';\n this.MEDIA_RANGE = 'mediaRange';\n this.VALUE = 'value';\n this.CONTENT_TYPE = 'contentType';\n this.MIME_TYPE = 'mimeType';\n this.BITSTREAM_SWITCHING = 'BitstreamSwitching';\n this.BITSTREAM_SWITCHING_MINUS = 'bitstreamSwitching';\n this.CODECS = 'codecs';\n this.DEPENDENCY_ID = 'dependencyId';\n this.MEDIA_STREAM_STRUCTURE_ID = 'mediaStreamStructureId';\n this.METRICS = 'Metrics';\n this.METRICS_MINUS = 'metrics';\n this.REPORTING = 'Reporting';\n this.WIDTH = 'width';\n this.HEIGHT = 'height';\n this.SAR = 'sar';\n this.FRAMERATE = 'frameRate';\n this.AUDIO_SAMPLING_RATE = 'audioSamplingRate';\n this.MAXIMUM_SAP_PERIOD = 'maximumSAPPeriod';\n this.START_WITH_SAP = 'startWithSAP';\n this.MAX_PLAYOUT_RATE = 'maxPlayoutRate';\n this.CODING_DEPENDENCY = 'codingDependency';\n this.SCAN_TYPE = 'scanType';\n this.FRAME_PACKING = 'FramePacking';\n this.AUDIO_CHANNEL_CONFIGURATION = 'AudioChannelConfiguration';\n this.CONTENT_PROTECTION = 'ContentProtection';\n this.ESSENTIAL_PROPERTY = 'EssentialProperty';\n this.SUPPLEMENTAL_PROPERTY = 'SupplementalProperty';\n this.INBAND_EVENT_STREAM = 'InbandEventStream';\n this.ACCESSIBILITY = 'Accessibility';\n this.ROLE = 'Role';\n this.RATING = 'Rating';\n this.CONTENT_COMPONENT = 'ContentComponent';\n this.SUBSET = 'Subset';\n this.LANG = 'lang';\n this.VIEWPOINT = 'Viewpoint';\n this.ROLE_ASARRAY = 'Role_asArray';\n this.ACCESSIBILITY_ASARRAY = 'Accessibility_asArray';\n this.AUDIOCHANNELCONFIGURATION_ASARRAY = 'AudioChannelConfiguration_asArray';\n this.CONTENTPROTECTION_ASARRAY = 'ContentProtection_asArray';\n this.MAIN = 'main';\n this.DYNAMIC = 'dynamic';\n this.STATIC = 'static';\n this.MEDIA_PRESENTATION_DURATION = 'mediaPresentationDuration';\n this.MINIMUM_UPDATE_PERIOD = 'minimumUpdatePeriod';\n this.CODEC_PRIVATE_DATA = 'codecPrivateData';\n this.BANDWITH = 'bandwidth';\n this.SOURCE_URL = 'sourceURL';\n this.TIMESCALE = 'timescale';\n this.DURATION = 'duration';\n this.START_NUMBER = 'startNumber';\n this.PRESENTATION_TIME_OFFSET = 'presentationTimeOffset';\n this.AVAILABILITY_START_TIME = 'availabilityStartTime';\n this.AVAILABILITY_END_TIME = 'availabilityEndTime';\n this.TIMESHIFT_BUFFER_DEPTH = 'timeShiftBufferDepth';\n this.MAX_SEGMENT_DURATION = 'maxSegmentDuration';\n this.PRESENTATION_TIME = 'presentationTime';\n this.MIN_BUFFER_TIME = 'minBufferTime';\n this.MAX_SUBSEGMENT_DURATION = 'maxSubsegmentDuration';\n this.START = 'start';\n this.AVAILABILITY_TIME_OFFSET = 'availabilityTimeOffset';\n this.AVAILABILITY_TIME_COMPLETE = 'availabilityTimeComplete';\n this.CENC_DEFAULT_KID = 'cenc:default_KID';\n this.DVB_PRIORITY = 'dvb:priority';\n this.DVB_WEIGHT = 'dvb:weight';\n this.SUGGESTED_PRESENTATION_DELAY = 'suggestedPresentationDelay';\n this.SERVICE_DESCRIPTION = 'ServiceDescription';\n this.SERVICE_DESCRIPTION_SCOPE = 'Scope';\n this.SERVICE_DESCRIPTION_LATENCY = 'Latency';\n this.SERVICE_DESCRIPTION_PLAYBACK_RATE = 'PlaybackRate';\n this.PATCH_LOCATION = 'PatchLocation';\n this.PUBLISH_TIME = 'publishTime';\n this.ORIGINAL_PUBLISH_TIME = 'originalPublishTime';\n this.ORIGINAL_MPD_ID = 'mpdId';\n }\n\n constructor () {\n this.init();\n }\n}\n\nlet constants = new DashConstants();\nexport default constants;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n * Constants declaration\n * @class\n * @ignore\n * @hideconstructor\n */\nclass Constants {\n\n init() {\n /**\n * @constant {string} STREAM Stream media type. Mainly used to report metrics relative to the full stream\n * @memberof Constants#\n * @static\n */\n this.STREAM = 'stream';\n\n /**\n * @constant {string} VIDEO Video media type\n * @memberof Constants#\n * @static\n */\n this.VIDEO = 'video';\n\n /**\n * @constant {string} AUDIO Audio media type\n * @memberof Constants#\n * @static\n */\n this.AUDIO = 'audio';\n\n /**\n * @constant {string} TEXT Text media type\n * @memberof Constants#\n * @static\n */\n this.TEXT = 'text';\n\n /**\n * @constant {string} MUXED Muxed (video/audio in the same chunk) media type\n * @memberof Constants#\n * @static\n */\n this.MUXED = 'muxed';\n\n /**\n * @constant {string} IMAGE Image media type\n * @memberof Constants#\n * @static\n */\n this.IMAGE = 'image';\n\n /**\n * @constant {string} STPP STTP Subtitles format\n * @memberof Constants#\n * @static\n */\n this.STPP = 'stpp';\n\n /**\n * @constant {string} TTML STTP Subtitles format\n * @memberof Constants#\n * @static\n */\n this.TTML = 'ttml';\n\n /**\n * @constant {string} VTT STTP Subtitles format\n * @memberof Constants#\n * @static\n */\n this.VTT = 'vtt';\n\n /**\n * @constant {string} WVTT STTP Subtitles format\n * @memberof Constants#\n * @static\n */\n this.WVTT = 'wvtt';\n\n /**\n * @constant {string} ABR_STRATEGY_DYNAMIC Dynamic Adaptive bitrate algorithm\n * @memberof Constants#\n * @static\n */\n this.ABR_STRATEGY_DYNAMIC = 'abrDynamic';\n\n /**\n * @constant {string} ABR_STRATEGY_BOLA Adaptive bitrate algorithm based on Bola (buffer level)\n * @memberof Constants#\n * @static\n */\n this.ABR_STRATEGY_BOLA = 'abrBola';\n\n /**\n * @constant {string} ABR_STRATEGY_L2A Adaptive bitrate algorithm based on L2A (online learning)\n * @memberof Constants#\n * @static\n */\n this.ABR_STRATEGY_L2A = 'abrL2A';\n\n /**\n * @constant {string} ABR_STRATEGY_LoLP Adaptive bitrate algorithm based on LoL+\n * @memberof Constants#\n * @static\n */\n this.ABR_STRATEGY_LoLP = 'abrLoLP';\n\n /**\n * @constant {string} ABR_STRATEGY_THROUGHPUT Adaptive bitrate algorithm based on throughput\n * @memberof Constants#\n * @static\n */\n this.ABR_STRATEGY_THROUGHPUT = 'abrThroughput';\n\n /**\n * @constant {string} ABR_FETCH_THROUGHPUT_CALUCUALTION_DOWNLOADED_DATA Throughput calculation based on downloaded data array\n * @memberof Constants#\n * @static\n */\n this.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA = 'abrFetchThroughputCalculationDownloadedData';\n\n /**\n * @constant {string} ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING Throughput calculation based on moof parsing\n * @memberof Constants#\n * @static\n */\n this.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING = 'abrFetchThroughputCalculationMoofParsing';\n\n /**\n * @constant {string} ABR_FETCH_THROUGHPUT_CALCULATION_AAST Throughput calculation based on adjusted availability start time in low latency mode\n * @memberof Constants#\n * @static\n */\n this.ABR_FETCH_THROUGHPUT_CALCULATION_AAST = 'abrFetchThroughputCalculationAAST';\n\n /**\n * @constant {string} LIVE_CATCHUP_MODE_DEFAULT Throughput calculation based on moof parsing\n * @memberof Constants#\n * @static\n */\n this.LIVE_CATCHUP_MODE_DEFAULT = 'liveCatchupModeDefault';\n\n /**\n * @constant {string} LIVE_CATCHUP_MODE_LOLP Throughput calculation based on moof parsing\n * @memberof Constants#\n * @static\n */\n this.LIVE_CATCHUP_MODE_LOLP = 'liveCatchupModeLoLP';\n\n /**\n * @constant {string} MOVING_AVERAGE_SLIDING_WINDOW Moving average sliding window\n * @memberof Constants#\n * @static\n */\n this.MOVING_AVERAGE_SLIDING_WINDOW = 'slidingWindow';\n\n /**\n * @constant {string} EWMA Exponential moving average\n * @memberof Constants#\n * @static\n */\n this.MOVING_AVERAGE_EWMA = 'ewma';\n\n /**\n * @constant {string} BAD_ARGUMENT_ERROR Invalid Arguments type of error\n * @memberof Constants#\n * @static\n */\n this.BAD_ARGUMENT_ERROR = 'Invalid Arguments';\n\n /**\n * @constant {string} MISSING_CONFIG_ERROR Missing configuration parameters type of error\n * @memberof Constants#\n * @static\n */\n this.MISSING_CONFIG_ERROR = 'Missing config parameter(s)';\n\n /**\n * @constant {string} TRACK_SWITCH_MODE_ALWAYS_REPLACE used to clear the buffered data (prior to current playback position) after track switch. Default for audio\n * @memberof Constants#\n * @static\n */\n this.TRACK_SWITCH_MODE_ALWAYS_REPLACE = 'alwaysReplace';\n\n /**\n * @constant {string} TRACK_SWITCH_MODE_NEVER_REPLACE used to forbid clearing the buffered data (prior to current playback position) after track switch. Defers to fastSwitchEnabled for placement of new data. Default for video\n * @memberof Constants#\n * @static\n */\n this.TRACK_SWITCH_MODE_NEVER_REPLACE = 'neverReplace';\n\n /**\n * @constant {string} TRACK_SELECTION_MODE_FIRST_TRACK makes the player select the first track found in the manifest.\n * @memberof Constants#\n * @static\n */\n this.TRACK_SELECTION_MODE_FIRST_TRACK = 'firstTrack';\n\n /**\n * @constant {string} TRACK_SELECTION_MODE_HIGHEST_BITRATE makes the player select the track with a highest bitrate. This mode is a default mode.\n * @memberof Constants#\n * @static\n */\n this.TRACK_SELECTION_MODE_HIGHEST_BITRATE = 'highestBitrate';\n\n /**\n * @constant {string} TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY makes the player select the track with the lowest bitrate per pixel average.\n * @memberof Constants#\n * @static\n */\n this.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY = 'highestEfficiency';\n\n /**\n * @constant {string} TRACK_SELECTION_MODE_WIDEST_RANGE makes the player select the track with a widest range of bitrates.\n * @memberof Constants#\n * @static\n */\n this.TRACK_SELECTION_MODE_WIDEST_RANGE = 'widestRange';\n\n /**\n * @constant {string} TRACK_SELECTION_MODE_WIDEST_RANGE makes the player select the track with the highest selectionPriority as defined in the manifest\n * @memberof Constants#\n * @static\n */\n this.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY = 'highestSelectionPriority';\n\n /**\n * @constant {string} CMCD_MODE_QUERY specifies to attach CMCD metrics as query parameters.\n * @memberof Constants#\n * @static\n */\n this.CMCD_MODE_QUERY = 'query';\n\n /**\n * @constant {string} CMCD_MODE_HEADER specifies to attach CMCD metrics as HTTP headers.\n * @memberof Constants#\n * @static\n */\n this.CMCD_MODE_HEADER = 'header';\n\n\n this.LOCATION = 'Location';\n this.INITIALIZE = 'initialize';\n this.TEXT_SHOWING = 'showing';\n this.TEXT_HIDDEN = 'hidden';\n this.CC1 = 'CC1';\n this.CC3 = 'CC3';\n this.UTF8 = 'utf-8';\n this.SCHEME_ID_URI = 'schemeIdUri';\n this.START_TIME = 'starttime';\n this.SERVICE_DESCRIPTION_LL_SCHEME = 'urn:dvb:dash:lowlatency:scope:2019';\n this.SUPPLEMENTAL_PROPERTY_LL_SCHEME = 'urn:dvb:dash:lowlatency:critical:2019';\n this.XML = 'XML';\n this.ARRAY_BUFFER = 'ArrayBuffer';\n this.DVB_REPORTING_URL = 'dvb:reportingUrl';\n this.DVB_PROBABILITY = 'dvb:probability';\n this.VIDEO_ELEMENT_READY_STATES = {\n HAVE_NOTHING: 0,\n HAVE_METADATA: 1,\n HAVE_CURRENT_DATA: 2,\n HAVE_FUTURE_DATA: 3,\n HAVE_ENOUGH_DATA: 4\n };\n }\n\n constructor() {\n this.init();\n }\n}\n\nconst constants = new Constants();\nexport default constants;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\nimport CoreEvents from './CoreEvents';\nclass Events extends CoreEvents {\n}\nlet events = new Events();\nexport default events;","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport EventsBase from './EventsBase';\n\n/**\n * These are internal events that should not be needed at the player level.\n * If you find and event in here that you would like access to from MediaPlayer level\n * please add an issue at https://github.com/Dash-Industry-Forum/dash.js/issues/new\n * @class\n * @ignore\n */\nclass CoreEvents extends EventsBase {\n constructor () {\n super();\n this.ATTEMPT_BACKGROUND_SYNC = 'attemptBackgroundSync';\n this.BUFFERING_COMPLETED = 'bufferingCompleted';\n this.BUFFER_CLEARED = 'bufferCleared';\n this.BYTES_APPENDED_END_FRAGMENT = 'bytesAppendedEndFragment';\n this.BUFFER_REPLACEMENT_STARTED = 'bufferReplacementStarted';\n this.CHECK_FOR_EXISTENCE_COMPLETED = 'checkForExistenceCompleted';\n this.CURRENT_TRACK_CHANGED = 'currentTrackChanged';\n this.DATA_UPDATE_COMPLETED = 'dataUpdateCompleted';\n this.INBAND_EVENTS = 'inbandEvents';\n this.INITIAL_STREAM_SWITCH = 'initialStreamSwitch';\n this.INIT_FRAGMENT_LOADED = 'initFragmentLoaded';\n this.INIT_FRAGMENT_NEEDED = 'initFragmentNeeded';\n this.INTERNAL_MANIFEST_LOADED = 'internalManifestLoaded';\n this.ORIGINAL_MANIFEST_LOADED = 'originalManifestLoaded';\n this.LOADING_COMPLETED = 'loadingCompleted';\n this.LOADING_PROGRESS = 'loadingProgress';\n this.LOADING_DATA_PROGRESS = 'loadingDataProgress';\n this.LOADING_ABANDONED = 'loadingAborted';\n this.MANIFEST_UPDATED = 'manifestUpdated';\n this.MEDIA_FRAGMENT_LOADED = 'mediaFragmentLoaded';\n this.MEDIA_FRAGMENT_NEEDED = 'mediaFragmentNeeded';\n this.QUOTA_EXCEEDED = 'quotaExceeded';\n this.SEGMENT_LOCATION_BLACKLIST_ADD = 'segmentLocationBlacklistAdd';\n this.SEGMENT_LOCATION_BLACKLIST_CHANGED = 'segmentLocationBlacklistChanged';\n this.SERVICE_LOCATION_BLACKLIST_ADD = 'serviceLocationBlacklistAdd';\n this.SERVICE_LOCATION_BLACKLIST_CHANGED = 'serviceLocationBlacklistChanged';\n this.SET_FRAGMENTED_TEXT_AFTER_DISABLED = 'setFragmentedTextAfterDisabled';\n this.SET_NON_FRAGMENTED_TEXT = 'setNonFragmentedText';\n this.SOURCE_BUFFER_ERROR = 'sourceBufferError';\n this.STREAMS_COMPOSED = 'streamsComposed';\n this.STREAM_BUFFERING_COMPLETED = 'streamBufferingCompleted';\n this.STREAM_REQUESTING_COMPLETED = 'streamRequestingCompleted';\n this.TEXT_TRACKS_QUEUE_INITIALIZED = 'textTracksQueueInitialized';\n this.TIME_SYNCHRONIZATION_COMPLETED = 'timeSynchronizationComplete';\n this.UPDATE_TIME_SYNC_OFFSET = 'updateTimeSyncOffset';\n this.URL_RESOLUTION_FAILED = 'urlResolutionFailed';\n this.VIDEO_CHUNK_RECEIVED = 'videoChunkReceived';\n this.WALLCLOCK_TIME_UPDATED = 'wallclockTimeUpdated';\n this.XLINK_ELEMENT_LOADED = 'xlinkElementLoaded';\n this.XLINK_READY = 'xlinkReady';\n this.SEEK_TARGET = 'seekTarget';\n }\n}\n\nexport default CoreEvents;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @module FactoryMaker\n * @ignore\n */\nconst FactoryMaker = (function () {\n\n let instance;\n let singletonContexts = [];\n const singletonFactories = {};\n const classFactories = {};\n\n function extend(name, childInstance, override, context) {\n if (!context[name] && childInstance) {\n context[name] = {\n instance: childInstance,\n override: override\n };\n }\n }\n\n /**\n * Use this method from your extended object. this.factory is injected into your object.\n * this.factory.getSingletonInstance(this.context, 'VideoModel')\n * will return the video model for use in the extended object.\n *\n * @param {Object} context - injected into extended object as this.context\n * @param {string} className - string name found in all dash.js objects\n * with name __dashjs_factory_name Will be at the bottom. Will be the same as the object's name.\n * @returns {*} Context aware instance of specified singleton name.\n * @memberof module:FactoryMaker\n * @instance\n */\n function getSingletonInstance(context, className) {\n for (const i in singletonContexts) {\n const obj = singletonContexts[i];\n if (obj.context === context && obj.name === className) {\n return obj.instance;\n }\n }\n return null;\n }\n\n /**\n * Use this method to add an singleton instance to the system. Useful for unit testing to mock objects etc.\n *\n * @param {Object} context\n * @param {string} className\n * @param {Object} instance\n * @memberof module:FactoryMaker\n * @instance\n */\n function setSingletonInstance(context, className, instance) {\n for (const i in singletonContexts) {\n const obj = singletonContexts[i];\n if (obj.context === context && obj.name === className) {\n singletonContexts[i].instance = instance;\n return;\n }\n }\n singletonContexts.push({\n name: className,\n context: context,\n instance: instance\n });\n }\n\n /**\n * Use this method to remove all singleton instances associated with a particular context.\n *\n * @param {Object} context\n * @memberof module:FactoryMaker\n * @instance\n */\n function deleteSingletonInstances(context) {\n singletonContexts = singletonContexts.filter(x => x.context !== context);\n }\n\n /*------------------------------------------------------------------------------------------*/\n\n // Factories storage Management\n\n /*------------------------------------------------------------------------------------------*/\n\n function getFactoryByName(name, factoriesArray) {\n return factoriesArray[name];\n }\n\n function updateFactory(name, factory, factoriesArray) {\n if (name in factoriesArray) {\n factoriesArray[name] = factory;\n }\n }\n\n /*------------------------------------------------------------------------------------------*/\n\n // Class Factories Management\n\n /*------------------------------------------------------------------------------------------*/\n\n function updateClassFactory(name, factory) {\n updateFactory(name, factory, classFactories);\n }\n\n function getClassFactoryByName(name) {\n return getFactoryByName(name, classFactories);\n }\n\n function getClassFactory(classConstructor) {\n let factory = getFactoryByName(classConstructor.__dashjs_factory_name, classFactories);\n\n if (!factory) {\n factory = function (context) {\n if (context === undefined) {\n context = {};\n }\n return {\n create: function () {\n return merge(classConstructor, context, arguments);\n }\n };\n };\n\n classFactories[classConstructor.__dashjs_factory_name] = factory; // store factory\n }\n return factory;\n }\n\n /*------------------------------------------------------------------------------------------*/\n\n // Singleton Factory MAangement\n\n /*------------------------------------------------------------------------------------------*/\n\n function updateSingletonFactory(name, factory) {\n updateFactory(name, factory, singletonFactories);\n }\n\n function getSingletonFactoryByName(name) {\n return getFactoryByName(name, singletonFactories);\n }\n\n function getSingletonFactory(classConstructor) {\n let factory = getFactoryByName(classConstructor.__dashjs_factory_name, singletonFactories);\n if (!factory) {\n factory = function (context) {\n let instance;\n if (context === undefined) {\n context = {};\n }\n return {\n getInstance: function () {\n // If we don't have an instance yet check for one on the context\n if (!instance) {\n instance = getSingletonInstance(context, classConstructor.__dashjs_factory_name);\n }\n // If there's no instance on the context then create one\n if (!instance) {\n instance = merge(classConstructor, context, arguments);\n singletonContexts.push({\n name: classConstructor.__dashjs_factory_name,\n context: context,\n instance: instance\n });\n }\n return instance;\n }\n };\n };\n singletonFactories[classConstructor.__dashjs_factory_name] = factory; // store factory\n }\n\n return factory;\n }\n\n function merge(classConstructor, context, args) {\n\n let classInstance;\n const className = classConstructor.__dashjs_factory_name;\n const extensionObject = context[className];\n\n if (extensionObject) {\n\n let extension = extensionObject.instance;\n\n if (extensionObject.override) { //Override public methods in parent but keep parent.\n\n classInstance = classConstructor.apply({context}, args);\n extension = extension.apply({\n context,\n factory: instance,\n parent: classInstance\n }, args);\n\n for (const prop in extension) {\n if (classInstance.hasOwnProperty(prop)) {\n classInstance[prop] = extension[prop];\n }\n }\n\n } else { //replace parent object completely with new object. Same as dijon.\n\n return extension.apply({\n context,\n factory: instance\n }, args);\n\n }\n } else {\n // Create new instance of the class\n classInstance = classConstructor.apply({context}, args);\n }\n\n // Add getClassName function to class instance prototype (used by Debug)\n classInstance.getClassName = function () {return className;};\n\n return classInstance;\n }\n\n instance = {\n extend: extend,\n getSingletonInstance: getSingletonInstance,\n setSingletonInstance: setSingletonInstance,\n deleteSingletonInstances: deleteSingletonInstances,\n getSingletonFactory: getSingletonFactory,\n getSingletonFactoryByName: getSingletonFactoryByName,\n updateSingletonFactory: updateSingletonFactory,\n getClassFactory: getClassFactory,\n getClassFactoryByName: getClassFactoryByName,\n updateClassFactory: updateClassFactory\n };\n\n return instance;\n\n}());\n\nexport default FactoryMaker;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport EventsBase from '../core/events/EventsBase';\n\n/**\n * @class\n * @implements EventsBase\n */\nclass MediaPlayerEvents extends EventsBase {\n\n /**\n * @description Public facing external events to be used when developing a player that implements dash.js.\n */\n constructor() {\n super();\n /**\n * Triggered when playback will not start yet\n * as the MPD's availabilityStartTime is in the future.\n * Check delay property in payload to determine time before playback will start.\n * @event MediaPlayerEvents#AST_IN_FUTURE\n */\n this.AST_IN_FUTURE = 'astInFuture';\n\n /**\n * Triggered when the video element's buffer state changes to stalled.\n * Check mediaType in payload to determine type (Video, Audio, FragmentedText).\n * @event MediaPlayerEvents#BUFFER_EMPTY\n */\n this.BUFFER_EMPTY = 'bufferStalled';\n\n /**\n * Triggered when the video element's buffer state changes to loaded.\n * Check mediaType in payload to determine type (Video, Audio, FragmentedText).\n * @event MediaPlayerEvents#BUFFER_LOADED\n */\n this.BUFFER_LOADED = 'bufferLoaded';\n\n /**\n * Triggered when the video element's buffer state changes, either stalled or loaded. Check payload for state.\n * @event MediaPlayerEvents#BUFFER_LEVEL_STATE_CHANGED\n */\n this.BUFFER_LEVEL_STATE_CHANGED = 'bufferStateChanged';\n\n /**\n * Triggered when the buffer level of a media type has been updated\n * @event MediaPlayerEvents#BUFFER_LEVEL_UPDATED\n */\n this.BUFFER_LEVEL_UPDATED = 'bufferLevelUpdated';\n\n /**\n * Triggered when a dynamic stream changed to static (transition phase between Live and On-Demand).\n * @event MediaPlayerEvents#DYNAMIC_TO_STATIC\n */\n this.DYNAMIC_TO_STATIC = 'dynamicToStatic';\n\n /**\n * Triggered when there is an error from the element or MSE source buffer.\n * @event MediaPlayerEvents#ERROR\n */\n this.ERROR = 'error';\n /**\n * Triggered when a fragment download has completed.\n * @event MediaPlayerEvents#FRAGMENT_LOADING_COMPLETED\n */\n this.FRAGMENT_LOADING_COMPLETED = 'fragmentLoadingCompleted';\n\n /**\n * Triggered when a partial fragment download has completed.\n * @event MediaPlayerEvents#FRAGMENT_LOADING_PROGRESS\n */\n this.FRAGMENT_LOADING_PROGRESS = 'fragmentLoadingProgress';\n /**\n * Triggered when a fragment download has started.\n * @event MediaPlayerEvents#FRAGMENT_LOADING_STARTED\n */\n this.FRAGMENT_LOADING_STARTED = 'fragmentLoadingStarted';\n\n /**\n * Triggered when a fragment download is abandoned due to detection of slow download base on the ABR abandon rule..\n * @event MediaPlayerEvents#FRAGMENT_LOADING_ABANDONED\n */\n this.FRAGMENT_LOADING_ABANDONED = 'fragmentLoadingAbandoned';\n\n /**\n * Triggered when {@link module:Debug} logger methods are called.\n * @event MediaPlayerEvents#LOG\n */\n this.LOG = 'log';\n\n /**\n * Triggered when the manifest load is complete\n * @event MediaPlayerEvents#MANIFEST_LOADED\n */\n this.MANIFEST_LOADED = 'manifestLoaded';\n\n /**\n * Triggered anytime there is a change to the overall metrics.\n * @event MediaPlayerEvents#METRICS_CHANGED\n */\n this.METRICS_CHANGED = 'metricsChanged';\n\n /**\n * Triggered when an individual metric is added, updated or cleared.\n * @event MediaPlayerEvents#METRIC_CHANGED\n */\n this.METRIC_CHANGED = 'metricChanged';\n\n /**\n * Triggered every time a new metric is added.\n * @event MediaPlayerEvents#METRIC_ADDED\n */\n this.METRIC_ADDED = 'metricAdded';\n\n /**\n * Triggered every time a metric is updated.\n * @event MediaPlayerEvents#METRIC_UPDATED\n */\n this.METRIC_UPDATED = 'metricUpdated';\n\n /**\n * Triggered when a new stream (period) starts.\n * @event MediaPlayerEvents#PERIOD_SWITCH_STARTED\n */\n this.PERIOD_SWITCH_STARTED = 'periodSwitchStarted';\n\n /**\n * Triggered at the stream end of a period.\n * @event MediaPlayerEvents#PERIOD_SWITCH_COMPLETED\n */\n this.PERIOD_SWITCH_COMPLETED = 'periodSwitchCompleted';\n\n /**\n * Triggered when an ABR up /down switch is initiated; either by user in manual mode or auto mode via ABR rules.\n * @event MediaPlayerEvents#QUALITY_CHANGE_REQUESTED\n */\n this.QUALITY_CHANGE_REQUESTED = 'qualityChangeRequested';\n\n /**\n * Triggered when the new ABR quality is being rendered on-screen.\n * @event MediaPlayerEvents#QUALITY_CHANGE_RENDERED\n */\n this.QUALITY_CHANGE_RENDERED = 'qualityChangeRendered';\n\n /**\n * Triggered when the new track is being rendered.\n * @event MediaPlayerEvents#TRACK_CHANGE_RENDERED\n */\n this.TRACK_CHANGE_RENDERED = 'trackChangeRendered';\n\n /**\n * Triggered when a stream (period) is being loaded\n * @event MediaPlayerEvents#STREAM_INITIALIZING\n */\n this.STREAM_INITIALIZING = 'streamInitializing';\n\n /**\n * Triggered when a stream (period) is loaded\n * @event MediaPlayerEvents#STREAM_UPDATED\n */\n this.STREAM_UPDATED = 'streamUpdated';\n\n /**\n * Triggered when a stream (period) is activated\n * @event MediaPlayerEvents#STREAM_ACTIVATED\n */\n this.STREAM_ACTIVATED = 'streamActivated';\n\n /**\n * Triggered when a stream (period) is deactivated\n * @event MediaPlayerEvents#STREAM_DEACTIVATED\n */\n this.STREAM_DEACTIVATED = 'streamDeactivated';\n\n /**\n * Triggered when a stream (period) is activated\n * @event MediaPlayerEvents#STREAM_INITIALIZED\n */\n this.STREAM_INITIALIZED = 'streamInitialized';\n\n /**\n * Triggered when the player has been reset.\n * @event MediaPlayerEvents#STREAM_TEARDOWN_COMPLETE\n */\n this.STREAM_TEARDOWN_COMPLETE = 'streamTeardownComplete';\n\n /**\n * Triggered once all text tracks detected in the MPD are added to the video element.\n * @event MediaPlayerEvents#TEXT_TRACKS_ADDED\n */\n this.TEXT_TRACKS_ADDED = 'allTextTracksAdded';\n\n /**\n * Triggered when a text track is added to the video element's TextTrackList\n * @event MediaPlayerEvents#TEXT_TRACK_ADDED\n */\n this.TEXT_TRACK_ADDED = 'textTrackAdded';\n\n /**\n * Triggered when a ttml chunk is parsed.\n * @event MediaPlayerEvents#TTML_PARSED\n */\n this.TTML_PARSED = 'ttmlParsed';\n\n /**\n * Triggered when a ttml chunk has to be parsed.\n * @event MediaPlayerEvents#TTML_TO_PARSE\n */\n this.TTML_TO_PARSE = 'ttmlToParse';\n\n /**\n * Triggered when a caption is rendered.\n * @event MediaPlayerEvents#CAPTION_RENDERED\n */\n this.CAPTION_RENDERED = 'captionRendered';\n\n /**\n * Triggered when the caption container is resized.\n * @event MediaPlayerEvents#CAPTION_CONTAINER_RESIZE\n */\n this.CAPTION_CONTAINER_RESIZE = 'captionContainerResize';\n\n /**\n * Sent when enough data is available that the media can be played,\n * at least for a couple of frames. This corresponds to the\n * HAVE_ENOUGH_DATA readyState.\n * @event MediaPlayerEvents#CAN_PLAY\n */\n this.CAN_PLAY = 'canPlay';\n\n /**\n * This corresponds to the CAN_PLAY_THROUGH readyState.\n * @event MediaPlayerEvents#CAN_PLAY_THROUGH\n */\n this.CAN_PLAY_THROUGH = 'canPlayThrough';\n\n /**\n * Sent when playback completes.\n * @event MediaPlayerEvents#PLAYBACK_ENDED\n */\n this.PLAYBACK_ENDED = 'playbackEnded';\n\n /**\n * Sent when an error occurs. The element's error\n * attribute contains more information.\n * @event MediaPlayerEvents#PLAYBACK_ERROR\n */\n this.PLAYBACK_ERROR = 'playbackError';\n\n /**\n * Sent when playback is not allowed (for example if user gesture is needed).\n * @event MediaPlayerEvents#PLAYBACK_NOT_ALLOWED\n */\n this.PLAYBACK_NOT_ALLOWED = 'playbackNotAllowed';\n\n /**\n * The media's metadata has finished loading; all attributes now\n * contain as much useful information as they're going to.\n * @event MediaPlayerEvents#PLAYBACK_METADATA_LOADED\n */\n this.PLAYBACK_METADATA_LOADED = 'playbackMetaDataLoaded';\n\n /**\n * The media's metadata has finished loading; all attributes now\n * contain as much useful information as they're going to.\n * @event MediaPlayerEvents#PLAYBACK_METADATA_LOADED\n */\n this.PLAYBACK_LOADED_DATA = 'playbackLoadedData';\n\n /**\n * Sent when playback is paused.\n * @event MediaPlayerEvents#PLAYBACK_PAUSED\n */\n this.PLAYBACK_PAUSED = 'playbackPaused';\n\n /**\n * Sent when the media begins to play (either for the first time, after having been paused,\n * or after ending and then restarting).\n *\n * @event MediaPlayerEvents#PLAYBACK_PLAYING\n */\n this.PLAYBACK_PLAYING = 'playbackPlaying';\n\n /**\n * Sent periodically to inform interested parties of progress downloading\n * the media. Information about the current amount of the media that has\n * been downloaded is available in the media element's buffered attribute.\n * @event MediaPlayerEvents#PLAYBACK_PROGRESS\n */\n this.PLAYBACK_PROGRESS = 'playbackProgress';\n\n /**\n * Sent when the playback speed changes.\n * @event MediaPlayerEvents#PLAYBACK_RATE_CHANGED\n */\n this.PLAYBACK_RATE_CHANGED = 'playbackRateChanged';\n\n /**\n * Sent when a seek operation completes.\n * @event MediaPlayerEvents#PLAYBACK_SEEKED\n */\n this.PLAYBACK_SEEKED = 'playbackSeeked';\n\n /**\n * Sent when a seek operation begins.\n * @event MediaPlayerEvents#PLAYBACK_SEEKING\n */\n this.PLAYBACK_SEEKING = 'playbackSeeking';\n\n /**\n * Sent when a seek operation has been asked.\n * @event MediaPlayerEvents#PLAYBACK_SEEK_ASKED\n */\n this.PLAYBACK_SEEK_ASKED = 'playbackSeekAsked';\n\n /**\n * Sent when the video element reports stalled\n * @event MediaPlayerEvents#PLAYBACK_STALLED\n */\n this.PLAYBACK_STALLED = 'playbackStalled';\n\n /**\n * Sent when playback of the media starts after having been paused;\n * that is, when playback is resumed after a prior pause event.\n *\n * @event MediaPlayerEvents#PLAYBACK_STARTED\n */\n this.PLAYBACK_STARTED = 'playbackStarted';\n\n /**\n * The time indicated by the element's currentTime attribute has changed.\n * @event MediaPlayerEvents#PLAYBACK_TIME_UPDATED\n */\n this.PLAYBACK_TIME_UPDATED = 'playbackTimeUpdated';\n\n /**\n * Sent when the media playback has stopped because of a temporary lack of data.\n *\n * @event MediaPlayerEvents#PLAYBACK_WAITING\n */\n this.PLAYBACK_WAITING = 'playbackWaiting';\n\n /**\n * Manifest validity changed - As a result of an MPD validity expiration event.\n * @event MediaPlayerEvents#MANIFEST_VALIDITY_CHANGED\n */\n this.MANIFEST_VALIDITY_CHANGED = 'manifestValidityChanged';\n\n /**\n * Dash events are triggered at their respective start points on the timeline.\n * @event MediaPlayerEvents#EVENT_MODE_ON_START\n */\n this.EVENT_MODE_ON_START = 'eventModeOnStart';\n\n /**\n * Dash events are triggered as soon as they were parsed.\n * @event MediaPlayerEvents#EVENT_MODE_ON_RECEIVE\n */\n this.EVENT_MODE_ON_RECEIVE = 'eventModeOnReceive';\n\n /**\n * Event that is dispatched whenever the player encounters a potential conformance validation that might lead to unexpected/not optimal behavior\n * @event MediaPlayerEvents#CONFORMANCE_VIOLATION\n */\n this.CONFORMANCE_VIOLATION = 'conformanceViolation';\n\n /**\n * Event that is dispatched whenever the player switches to a different representation\n * @event MediaPlayerEvents#REPRESENTATION_SWITCH\n */\n this.REPRESENTATION_SWITCH = 'representationSwitch';\n }\n}\n\nlet mediaPlayerEvents = new MediaPlayerEvents();\nexport default mediaPlayerEvents;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @classdesc This Object holds reference to the HTTPRequest for manifest, fragment and xlink loading.\n * Members which are not defined in ISO23009-1 Annex D should be prefixed by a _ so that they are ignored\n * by Metrics Reporting code.\n * @ignore\n */\nclass HTTPRequest {\n /**\n * @class\n */\n constructor() {\n /**\n * Identifier of the TCP connection on which the HTTP request was sent.\n * @public\n */\n this.tcpid = null;\n /**\n * This is an optional parameter and should not be included in HTTP request/response transactions for progressive download.\n * The type of the request:\n * - MPD\n * - XLink expansion\n * - Initialization Fragment\n * - Index Fragment\n * - Media Fragment\n * - Bitstream Switching Fragment\n * - other\n * @public\n */\n this.type = null;\n /**\n * The original URL (before any redirects or failures)\n * @public\n */\n this.url = null;\n /**\n * The actual URL requested, if different from above\n * @public\n */\n this.actualurl = null;\n /**\n * The contents of the byte-range-spec part of the HTTP Range header.\n * @public\n */\n this.range = null;\n /**\n * Real-Time | The real time at which the request was sent.\n * @public\n */\n this.trequest = null;\n /**\n * Real-Time | The real time at which the first byte of the response was received.\n * @public\n */\n this.tresponse = null;\n /**\n * The HTTP response code.\n * @public\n */\n this.responsecode = null;\n /**\n * The duration of the throughput trace intervals (ms), for successful requests only.\n * @public\n */\n this.interval = null;\n /**\n * Throughput traces, for successful requests only.\n * @public\n */\n this.trace = [];\n\n /**\n * Type of stream (\"audio\" | \"video\" etc..)\n * @public\n */\n this._stream = null;\n /**\n * Real-Time | The real time at which the request finished.\n * @public\n */\n this._tfinish = null;\n /**\n * The duration of the media requests, if available, in seconds.\n * @public\n */\n this._mediaduration = null;\n /**\n * The media segment quality\n * @public\n */\n this._quality = null;\n /**\n * all the response headers from request.\n * @public\n */\n this._responseHeaders = null;\n /**\n * The selected service location for the request. string.\n * @public\n */\n this._serviceLocation = null;\n }\n}\n\n/**\n * @classdesc This Object holds reference to the progress of the HTTPRequest.\n * @ignore\n */\nclass HTTPRequestTrace {\n /**\n * @class\n */\n constructor() {\n /**\n * Real-Time | Measurement stream start.\n * @public\n */\n this.s = null;\n /**\n * Measurement stream duration (ms).\n * @public\n */\n this.d = null;\n /**\n * List of integers counting the bytes received in each trace interval within the measurement stream.\n * @public\n */\n this.b = [];\n /**\n * Measurement throughput in kbits/s\n * @public\n */\n this.t = null;\n }\n}\n\nHTTPRequest.GET = 'GET';\nHTTPRequest.HEAD = 'HEAD';\nHTTPRequest.MPD_TYPE = 'MPD';\nHTTPRequest.XLINK_EXPANSION_TYPE = 'XLinkExpansion';\nHTTPRequest.INIT_SEGMENT_TYPE = 'InitializationSegment';\nHTTPRequest.INDEX_SEGMENT_TYPE = 'IndexSegment';\nHTTPRequest.MEDIA_SEGMENT_TYPE = 'MediaSegment';\nHTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE = 'BitstreamSwitchingSegment';\nHTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE = 'FragmentInfoSegment';\nHTTPRequest.LICENSE = 'license';\nHTTPRequest.OTHER_TYPE = 'other';\n\nexport { HTTPRequest, HTTPRequestTrace };\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport EventBus from './EventBus';\nimport Events from './events/Events';\nimport FactoryMaker from './FactoryMaker';\n\nconst LOG_LEVEL_NONE = 0;\nconst LOG_LEVEL_FATAL = 1;\nconst LOG_LEVEL_ERROR = 2;\nconst LOG_LEVEL_WARNING = 3;\nconst LOG_LEVEL_INFO = 4;\nconst LOG_LEVEL_DEBUG = 5;\n\n/**\n * @module Debug\n * @param {object} config\n * @ignore\n */\nfunction Debug(config) {\n\n config = config || {};\n const context = this.context;\n const eventBus = EventBus(context).getInstance();\n const settings = config.settings;\n\n const logFn = [];\n\n let instance,\n showLogTimestamp,\n showCalleeName,\n startTime;\n\n function setup() {\n showLogTimestamp = true;\n showCalleeName = true;\n startTime = new Date().getTime();\n\n if (typeof window !== 'undefined' && window.console) {\n logFn[LOG_LEVEL_FATAL] = getLogFn(window.console.error);\n logFn[LOG_LEVEL_ERROR] = getLogFn(window.console.error);\n logFn[LOG_LEVEL_WARNING] = getLogFn(window.console.warn);\n logFn[LOG_LEVEL_INFO] = getLogFn(window.console.info);\n logFn[LOG_LEVEL_DEBUG] = getLogFn(window.console.debug);\n }\n }\n\n function getLogFn(fn) {\n if (fn && fn.bind) {\n return fn.bind(window.console);\n }\n // if not define, return the default function for reporting logs\n return window.console.log.bind(window.console);\n }\n\n /**\n * Retrieves a logger which can be used to write logging information in browser console.\n * @param {object} instance Object for which the logger is created. It is used\n * to include calle object information in log messages.\n * @memberof module:Debug\n * @returns {Logger}\n * @instance\n */\n function getLogger(instance) {\n return {\n fatal: fatal.bind(instance),\n error: error.bind(instance),\n warn: warn.bind(instance),\n info: info.bind(instance),\n debug: debug.bind(instance)\n };\n }\n\n /**\n * Prepends a timestamp in milliseconds to each log message.\n * @param {boolean} value Set to true if you want to see a timestamp in each log message.\n * @default LOG_LEVEL_WARNING\n * @memberof module:Debug\n * @instance\n */\n function setLogTimestampVisible(value) {\n showLogTimestamp = value;\n }\n\n /**\n * Prepends the callee object name, and media type if available, to each log message.\n * @param {boolean} value Set to true if you want to see the callee object name and media type in each log message.\n * @default true\n * @memberof module:Debug\n * @instance\n */\n function setCalleeNameVisible(value) {\n showCalleeName = value;\n }\n\n function fatal(...params) {\n doLog(LOG_LEVEL_FATAL, this, ...params);\n }\n\n function error(...params) {\n doLog(LOG_LEVEL_ERROR, this, ...params);\n }\n\n function warn(...params) {\n doLog(LOG_LEVEL_WARNING, this, ...params);\n }\n\n function info(...params) {\n doLog(LOG_LEVEL_INFO, this, ...params);\n }\n\n function debug(...params) {\n doLog(LOG_LEVEL_DEBUG, this, ...params);\n }\n\n function doLog(level, _this, ...params) {\n let message = '';\n let logTime = null;\n\n if (showLogTimestamp) {\n logTime = new Date().getTime();\n message += '[' + (logTime - startTime) + ']';\n }\n\n if (showCalleeName && _this && _this.getClassName) {\n message += '[' + _this.getClassName() + ']';\n if (_this.getType) {\n message += '[' + _this.getType() + ']';\n }\n }\n\n if (message.length > 0) {\n message += ' ';\n }\n\n Array.apply(null, params).forEach(function (item) {\n message += item + ' ';\n });\n\n // log to console if the log level is high enough\n if (logFn[level] && settings.get().debug.logLevel >= level) {\n logFn[level](message);\n }\n\n // send log event regardless of log level\n if (settings && settings.get().debug.dispatchEvent) {\n eventBus.trigger(Events.LOG, { message: message, level: level });\n }\n }\n\n instance = {\n getLogger: getLogger,\n setLogTimestampVisible: setLogTimestampVisible,\n setCalleeNameVisible: setCalleeNameVisible\n };\n\n setup();\n\n return instance;\n}\n\nDebug.__dashjs_factory_name = 'Debug';\n\nconst factory = FactoryMaker.getSingletonFactory(Debug);\nfactory.LOG_LEVEL_NONE = LOG_LEVEL_NONE;\nfactory.LOG_LEVEL_FATAL = LOG_LEVEL_FATAL;\nfactory.LOG_LEVEL_ERROR = LOG_LEVEL_ERROR;\nfactory.LOG_LEVEL_WARNING = LOG_LEVEL_WARNING;\nfactory.LOG_LEVEL_INFO = LOG_LEVEL_INFO;\nfactory.LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG;\nFactoryMaker.updateSingletonFactory(Debug.__dashjs_factory_name, factory);\nexport default factory;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport FactoryMaker from './FactoryMaker';\nimport MediaPlayerEvents from '../streaming/MediaPlayerEvents';\n\nconst EVENT_PRIORITY_LOW = 0;\nconst EVENT_PRIORITY_HIGH = 5000;\n\nfunction EventBus() {\n\n let handlers = {};\n\n function on(type, listener, scope, options = {}) {\n\n if (!type) {\n throw new Error('event type cannot be null or undefined');\n }\n if (!listener || typeof (listener) !== 'function') {\n throw new Error('listener must be a function: ' + listener);\n }\n\n let priority = options.priority || EVENT_PRIORITY_LOW;\n\n if (getHandlerIdx(type, listener, scope) >= 0) return;\n\n handlers[type] = handlers[type] || [];\n\n const handler = {\n callback: listener,\n scope,\n priority\n };\n\n if (scope && scope.getStreamId) {\n handler.streamId = scope.getStreamId();\n }\n if (scope && scope.getType) {\n handler.mediaType = scope.getType();\n }\n if (options && options.mode) {\n handler.mode = options.mode;\n }\n\n const inserted = handlers[type].some((item, idx) => {\n if (item && priority > item.priority) {\n handlers[type].splice(idx, 0, handler);\n return true;\n }\n });\n\n if (!inserted) {\n handlers[type].push(handler);\n }\n }\n\n function off(type, listener, scope) {\n if (!type || !listener || !handlers[type]) return;\n const idx = getHandlerIdx(type, listener, scope);\n if (idx < 0) return;\n handlers[type][idx] = null;\n }\n\n function trigger(type, payload = {}, filters = {}) {\n if (!type || !handlers[type]) return;\n\n payload = payload || {};\n\n if (payload.hasOwnProperty('type')) throw new Error('\\'type\\' is a reserved word for event dispatching');\n\n payload.type = type;\n\n if (filters.streamId) {\n payload.streamId = filters.streamId;\n }\n if (filters.mediaType) {\n payload.mediaType = filters.mediaType;\n }\n\n handlers[type]\n .filter((handler) => {\n if (!handler) {\n return false;\n }\n if (filters.streamId && handler.streamId && handler.streamId !== filters.streamId) {\n return false;\n }\n if (filters.mediaType && handler.mediaType && handler.mediaType !== filters.mediaType) {\n return false;\n }\n // This is used for dispatching DASH events. By default we use the onStart mode. Consequently we filter everything that has a non matching mode and the onReceive events for handlers that did not specify a mode.\n if ((filters.mode && handler.mode && handler.mode !== filters.mode) || (!handler.mode && filters.mode && filters.mode === MediaPlayerEvents.EVENT_MODE_ON_RECEIVE)) {\n return false;\n }\n return true;\n })\n .forEach(handler => handler && handler.callback.call(handler.scope, payload));\n }\n\n function getHandlerIdx(type, listener, scope) {\n\n let idx = -1;\n\n if (!handlers[type]) return idx;\n\n handlers[type].some((item, index) => {\n if (item && item.callback === listener && (!scope || scope === item.scope)) {\n idx = index;\n return true;\n }\n });\n return idx;\n }\n\n function reset() {\n handlers = {};\n }\n\n const instance = {\n on: on,\n off: off,\n trigger: trigger,\n reset: reset\n };\n\n return instance;\n}\n\nEventBus.__dashjs_factory_name = 'EventBus';\nconst factory = FactoryMaker.getSingletonFactory(EventBus);\nfactory.EVENT_PRIORITY_LOW = EVENT_PRIORITY_LOW;\nfactory.EVENT_PRIORITY_HIGH = EVENT_PRIORITY_HIGH;\nFactoryMaker.updateSingletonFactory(EventBus.__dashjs_factory_name, factory);\nexport default factory;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\nclass DashJSError {\n constructor(code, message, data) {\n this.code = code || null;\n this.message = message || null;\n this.data = data || null;\n }\n}\n\nexport default DashJSError;","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport ErrorsBase from './ErrorsBase';\n/**\n * Errors declaration\n * @class\n */\nclass Errors extends ErrorsBase {\n constructor () {\n super();\n\n /**\n * Error code returned when a manifest parsing error occurs\n */\n this.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE = 10;\n\n /**\n * Error code returned when a manifest loading error occurs\n */\n this.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE = 11;\n\n /**\n * Error code returned when a xlink loading error occurs\n */\n this.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE = 12;\n\n /**\n * Error code returned when no segment ranges could be determined from the sidx box\n */\n this.SEGMENT_BASE_LOADER_ERROR_CODE = 15;\n\n /**\n * Error code returned when the time synchronization failed\n */\n this.TIME_SYNC_FAILED_ERROR_CODE = 16;\n\n /**\n * Error code returned when loading a fragment failed\n */\n this.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE = 17;\n\n /**\n * Error code returned when the FragmentLoader did not receive a request object\n */\n this.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE = 18;\n\n /**\n * Error code returned when the BaseUrl resolution failed\n */\n this.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE = 19;\n\n /**\n * Error code returned when the append operation in the SourceBuffer failed\n */\n this.APPEND_ERROR_CODE = 20;\n\n /**\n * Error code returned when the remove operation in the SourceBuffer failed\n */\n this.REMOVE_ERROR_CODE = 21;\n\n /**\n * Error code returned when updating the internal objects after loading an MPD failed\n */\n this.DATA_UPDATE_FAILED_ERROR_CODE = 22;\n\n /**\n * Error code returned when MediaSource is not supported by the browser\n */\n this.CAPABILITY_MEDIASOURCE_ERROR_CODE = 23;\n\n /**\n * Error code returned when Protected contents are not supported\n */\n this.CAPABILITY_MEDIAKEYS_ERROR_CODE = 24;\n\n /**\n * Error code returned when loading the manifest failed\n */\n this.DOWNLOAD_ERROR_ID_MANIFEST_CODE = 25;\n\n /**\n * Error code returned when loading the sidx failed\n */\n this.DOWNLOAD_ERROR_ID_SIDX_CODE = 26;\n\n /**\n * Error code returned when loading the media content failed\n */\n this.DOWNLOAD_ERROR_ID_CONTENT_CODE = 27;\n\n /**\n * Error code returned when loading the init segment failed\n */\n this.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE = 28;\n\n /**\n * Error code returned when loading the XLink content failed\n */\n this.DOWNLOAD_ERROR_ID_XLINK_CODE = 29;\n\n /**\n * Error code returned when parsing the MPD resulted in a logical error\n */\n this.MANIFEST_ERROR_ID_PARSE_CODE = 31;\n\n /**\n * Error code returned when no stream (period) has been detected in the manifest\n */\n this.MANIFEST_ERROR_ID_NOSTREAMS_CODE = 32;\n\n /**\n * Error code returned when something wrong has happened during parsing and appending subtitles (TTML or VTT)\n */\n this.TIMED_TEXT_ERROR_ID_PARSE_CODE = 33;\n\n /**\n * Error code returned when a 'muxed' media type has been detected in the manifest. This type is not supported\n */\n\n this.MANIFEST_ERROR_ID_MULTIPLEXED_CODE = 34;\n\n /**\n * Error code returned when a media source type is not supported\n */\n this.MEDIASOURCE_TYPE_UNSUPPORTED_CODE = 35;\n\n this.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE = 'parsing failed for ';\n this.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE = 'Failed loading manifest: ';\n this.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE = 'Failed loading Xlink element: ';\n this.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE = 'Segments update failed';\n this.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE = 'no segments are available yet';\n this.SEGMENT_BASE_LOADER_ERROR_MESSAGE = 'error loading segment ranges from sidx';\n this.TIME_SYNC_FAILED_ERROR_MESSAGE = 'Failed to synchronize client and server time';\n this.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE = 'request is null';\n this.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE = 'Failed to resolve a valid URL';\n this.APPEND_ERROR_MESSAGE = 'chunk is not defined';\n this.REMOVE_ERROR_MESSAGE = 'Removing data from the SourceBuffer';\n this.DATA_UPDATE_FAILED_ERROR_MESSAGE = 'Data update failed';\n this.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE = 'mediasource is not supported';\n this.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE = 'mediakeys is not supported';\n this.TIMED_TEXT_ERROR_MESSAGE_PARSE = 'parsing error :';\n this.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE = 'Error creating source buffer of type : ';\n }\n}\n\nlet errors = new Errors();\nexport default errors;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport Segment from './../vo/Segment';\n\n\nfunction zeroPadToLength(numStr, minStrLength) {\n while (numStr.length < minStrLength) {\n numStr = '0' + numStr;\n }\n return numStr;\n}\n\nfunction getNumberForSegment(segment, segmentIndex) {\n return segment.representation.startNumber + segmentIndex;\n}\n\nexport function unescapeDollarsInTemplate(url) {\n return url ? url.split('$$').join('$') : url;\n}\n\nexport function replaceIDForTemplate(url, value) {\n if (!value || !url || url.indexOf('$RepresentationID$') === -1) {\n return url;\n }\n let v = value.toString();\n return url.split('$RepresentationID$').join(v);\n}\n\nexport function replaceTokenForTemplate(url, token, value) {\n const formatTag = '%0';\n\n let startPos,\n endPos,\n formatTagPos,\n specifier,\n width,\n paddedValue;\n\n const tokenLen = token.length;\n const formatTagLen = formatTag.length;\n\n if (!url) {\n return url;\n }\n\n // keep looping round until all instances of have been\n // replaced. once that has happened, startPos below will be -1\n // and the completed url will be returned.\n while (true) {\n\n // check if there is a valid $...$ identifier\n // if not, return the url as is.\n startPos = url.indexOf('$' + token);\n if (startPos < 0) {\n return url;\n }\n\n // the next '$' must be the end of the identifier\n // if there isn't one, return the url as is.\n endPos = url.indexOf('$', startPos + tokenLen);\n if (endPos < 0) {\n return url;\n }\n\n // now see if there is an additional format tag suffixed to\n // the identifier within the enclosing '$' characters\n formatTagPos = url.indexOf(formatTag, startPos + tokenLen);\n if (formatTagPos > startPos && formatTagPos < endPos) {\n\n specifier = url.charAt(endPos - 1);\n width = parseInt(url.substring(formatTagPos + formatTagLen, endPos - 1), 10);\n\n // support the minimum specifiers required by IEEE 1003.1\n // (d, i , o, u, x, and X) for completeness\n switch (specifier) {\n // treat all int types as uint,\n // hence deliberate fallthrough\n case 'd':\n case 'i':\n case 'u':\n paddedValue = zeroPadToLength(value.toString(), width);\n break;\n case 'x':\n paddedValue = zeroPadToLength(value.toString(16), width);\n break;\n case 'X':\n paddedValue = zeroPadToLength(value.toString(16), width).toUpperCase();\n break;\n case 'o':\n paddedValue = zeroPadToLength(value.toString(8), width);\n break;\n default:\n return url;\n }\n } else {\n paddedValue = value;\n }\n\n url = url.substring(0, startPos) + paddedValue + url.substring(endPos + 1);\n }\n}\n\nfunction getSegment(representation, duration, presentationStartTime, mediaStartTime,\n timelineConverter, presentationEndTime, isDynamic, index) {\n let seg = new Segment();\n\n seg.representation = representation;\n seg.duration = duration;\n seg.presentationStartTime = presentationStartTime;\n seg.mediaStartTime = mediaStartTime;\n seg.availabilityStartTime = timelineConverter.calcAvailabilityStartTimeFromPresentationTime(presentationEndTime, representation, isDynamic);\n seg.availabilityEndTime = timelineConverter.calcAvailabilityEndTimeFromPresentationTime(presentationEndTime + duration, representation, isDynamic);\n seg.wallStartTime = timelineConverter.calcWallTimeForSegment(seg, isDynamic);\n seg.replacementNumber = getNumberForSegment(seg, index);\n seg.index = index;\n\n return seg;\n}\n\nfunction isSegmentAvailable(timelineConverter, representation, segment, isDynamic) {\n const voPeriod = representation.adaptation.period;\n\n // Avoid requesting segments that overlap the period boundary\n if (isFinite(voPeriod.duration) && voPeriod.start + voPeriod.duration <= segment.presentationStartTime) {\n return false;\n }\n\n if (isDynamic) {\n\n if (representation.availabilityTimeOffset === 'INF') {\n return true;\n }\n\n // For dynamic manifests we check if the presentation start time + duration is included in the availability window\n // SAST = Period@start + seg@presentationStartTime + seg@duration\n // ASAST = SAST - ATO\n // SAET = SAST + TSBD + seg@duration\n // refTime serves as an anchor time to compare the availability time of the segments against.\n const refTime = timelineConverter.getClientReferenceTime();\n return segment.availabilityStartTime.getTime() <= refTime && (!isFinite(segment.availabilityEndTime) || segment.availabilityEndTime.getTime() >= refTime);\n }\n\n return true;\n}\n\nexport function getIndexBasedSegment(timelineConverter, isDynamic, representation, index) {\n let duration,\n presentationStartTime,\n presentationEndTime;\n\n\n duration = representation.segmentDuration;\n\n /*\n * From spec - If neither @duration attribute nor SegmentTimeline element is present, then the Representation\n * shall contain exactly one Media Segment. The MPD start time is 0 and the MPD duration is obtained\n * in the same way as for the last Media Segment in the Representation.\n */\n if (isNaN(duration)) {\n duration = representation.adaptation.period.duration;\n }\n\n presentationStartTime = parseFloat((representation.adaptation.period.start + (index * duration)).toFixed(5));\n presentationEndTime = parseFloat((presentationStartTime + duration).toFixed(5));\n\n const mediaTime = timelineConverter.calcMediaTimeFromPresentationTime(presentationStartTime, representation);\n\n const segment = getSegment(representation, duration, presentationStartTime, mediaTime,\n timelineConverter, presentationEndTime, isDynamic, index);\n\n if (!isSegmentAvailable(timelineConverter, representation, segment, isDynamic)) {\n return null;\n }\n\n return segment;\n}\n\nexport function getTimeBasedSegment(timelineConverter, isDynamic, representation, time, duration, fTimescale, url, range, index, tManifest) {\n const scaledTime = time / fTimescale;\n const scaledDuration = duration / fTimescale;\n\n let presentationStartTime,\n presentationEndTime,\n seg;\n\n presentationStartTime = timelineConverter.calcPresentationTimeFromMediaTime(scaledTime, representation);\n presentationEndTime = presentationStartTime + scaledDuration;\n\n seg = getSegment(representation, scaledDuration, presentationStartTime,\n scaledTime,\n timelineConverter, presentationEndTime, isDynamic, index);\n\n if (!isSegmentAvailable(timelineConverter, representation, seg, isDynamic)) {\n return null;\n }\n\n seg.replacementTime = tManifest ? tManifest : time;\n\n url = replaceTokenForTemplate(url, 'Number', seg.replacementNumber);\n url = replaceTokenForTemplate(url, 'Time', seg.replacementTime);\n seg.media = url;\n seg.mediaRange = range;\n\n return seg;\n}\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport FactoryMaker from '../../core/FactoryMaker';\n\n/**\n * @module DefaultURLUtils\n * @description Provides utility functions for operating on URLs.\n * Initially this is simply a method to determine the Base URL of a URL, but\n * should probably include other things provided all over the place such as\n * determining whether a URL is relative/absolute, resolving two paths etc.\n * @ignore\n */\nfunction DefaultURLUtils() {\n\n let resolveFunction;\n\n const schemeRegex = /^[a-z][a-z0-9+\\-_.]*:/i;\n const httpUrlRegex = /^https?:\\/\\//i;\n const httpsUrlRegex = /^https:\\/\\//i;\n const originRegex = /^([a-z][a-z0-9+\\-_.]*:\\/\\/[^\\/]+)\\/?/i;\n\n /**\n * Resolves a url given an optional base url\n * Uses window.URL to do the resolution.\n *\n * @param {string} url\n * @param {string} [baseUrl]\n * @return {string}\n * @memberof module:DefaultURLUtils\n * @instance\n * @private\n */\n const nativeURLResolver = (url, baseUrl) => {\n try {\n return new window.URL(url, baseUrl).toString();\n } catch (e) {\n return url;\n }\n };\n\n /**\n * Resolves a url given an optional base url\n * Does not resolve ./, ../ etc but will do enough to construct something\n * which will satisfy XHR etc when window.URL is not available ie\n * IE11/node etc.\n *\n * @param {string} url\n * @param {string} [baseUrl]\n * @return {string}\n * @memberof module:DefaultURLUtils\n * @instance\n * @private\n */\n const dumbURLResolver = (url, baseUrl) => {\n let baseUrlParseFunc = parseBaseUrl;\n\n if (!baseUrl) {\n return url;\n }\n\n if (!isRelative(url)) {\n return url;\n }\n\n if (isPathAbsolute(url)) {\n baseUrlParseFunc = parseOrigin;\n }\n\n if (isSchemeRelative(url)) {\n baseUrlParseFunc = parseScheme;\n }\n\n const base = baseUrlParseFunc(baseUrl);\n const joinChar =\n base.charAt(base.length - 1) !== '/' &&\n url.charAt(0) !== '/' ?\n '/' : '';\n\n return [base, url].join(joinChar);\n };\n\n function setup() {\n try {\n const u = new window.URL('x', 'http://y'); // eslint-disable-line\n resolveFunction = nativeURLResolver;\n } catch (e) {\n // must be IE11/Node etc\n } finally {\n resolveFunction = resolveFunction || dumbURLResolver;\n }\n }\n\n /**\n * Returns a string that contains the Base URL of a URL, if determinable.\n * @param {string} url - full url\n * @return {string}\n * @memberof module:DefaultURLUtils\n * @instance\n */\n function parseBaseUrl(url) {\n const slashIndex = url.indexOf('/');\n const lastSlashIndex = url.lastIndexOf('/');\n\n if (slashIndex !== -1) {\n // if there is only '//'\n if (lastSlashIndex === slashIndex + 1) {\n return url;\n }\n\n if (url.indexOf('?') !== -1) {\n url = url.substring(0, url.indexOf('?'));\n }\n\n return url.substring(0, lastSlashIndex + 1);\n }\n\n return '';\n }\n\n /**\n * Returns a string that contains the scheme and origin of a URL,\n * if determinable.\n * @param {string} url - full url\n * @return {string}\n * @memberof module:DefaultURLUtils\n * @instance\n */\n function parseOrigin(url) {\n const matches = url.match(originRegex);\n\n if (matches) {\n return matches[1];\n }\n\n return '';\n }\n\n /**\n * Returns a string that contains the fragment of a URL without scheme,\n * if determinable.\n * @param {string} url - full url\n * @return {string}\n * @memberof module:DefaultURLUtils\n * @instance\n */\n function removeHostname(url) {\n let urlParts = /^(?:\\w+\\:\\/\\/)?([^\\/]+)(.*)$/.exec(url); //[1] = host / [2] = path\n return urlParts[2].substring(1);\n }\n\n /**\n * Returns a string that contains the scheme of a URL, if determinable.\n * @param {string} url - full url\n * @return {string}\n * @memberof module:DefaultURLUtils\n * @instance\n */\n function parseScheme(url) {\n const matches = url.match(schemeRegex);\n\n if (matches) {\n return matches[0];\n }\n\n return '';\n }\n\n /**\n * Determines whether the url is relative.\n * @return {boolean}\n * @param {string} url\n * @memberof module:DefaultURLUtils\n * @instance\n */\n function isRelative(url) {\n return !schemeRegex.test(url);\n }\n\n /**\n * Determines whether the url is path-absolute.\n * @return {bool}\n * @param {string} url\n * @memberof module:DefaultURLUtils\n * @instance\n */\n function isPathAbsolute(url) {\n return isRelative(url) && url.charAt(0) === '/';\n }\n\n /**\n * Determines whether the url is scheme-relative.\n * @return {bool}\n * @param {string} url\n * @memberof module:DefaultURLUtils\n * @instance\n */\n function isSchemeRelative(url) {\n return url.indexOf('//') === 0;\n }\n\n /**\n * Determines whether the url is an HTTP-URL as defined in ISO/IEC\n * 23009-1:2014 3.1.15. ie URL with a fixed scheme of http or https\n * @return {bool}\n * @param {string} url\n * @memberof module:DefaultURLUtils\n * @instance\n */\n function isHTTPURL(url) {\n return httpUrlRegex.test(url);\n }\n\n /**\n * Determines whether the supplied url has https scheme\n * @return {bool}\n * @param {string} url\n * @memberof module:DefaultURLUtils\n * @instance\n */\n function isHTTPS(url) {\n return httpsUrlRegex.test(url);\n }\n\n /**\n * Resolves a url given an optional base url\n * @return {string}\n * @param {string} url\n * @param {string} [baseUrl]\n * @memberof module:DefaultURLUtils\n * @instance\n */\n function resolve(url, baseUrl) {\n return resolveFunction(url, baseUrl);\n }\n\n setup();\n\n const instance = {\n parseBaseUrl: parseBaseUrl,\n parseOrigin: parseOrigin,\n parseScheme: parseScheme,\n isRelative: isRelative,\n isPathAbsolute: isPathAbsolute,\n isSchemeRelative: isSchemeRelative,\n isHTTPURL: isHTTPURL,\n isHTTPS: isHTTPS,\n removeHostname: removeHostname,\n resolve: resolve\n };\n\n return instance;\n}\n\nDefaultURLUtils.__dashjs_factory_name = 'DefaultURLUtils';\nexport default FactoryMaker.getSingletonFactory(DefaultURLUtils);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport FactoryMaker from '../../core/FactoryMaker';\nimport DefaultURLUtils from './DefaultURLUtils';\n\n/**\n * @module URLUtils\n * @ignore\n * @description Provides utility functions for operating on URLs.\n * Initially this is simply a method to determine the Base URL of a URL, but\n * should probably include other things provided all over the place such as\n * determining whether a URL is relative/absolute, resolving two paths etc.\n */\nfunction URLUtils() {\n\n let instance;\n let defaultURLUtils;\n let regexUtils = [];\n const context = this.context;\n\n function getUtils(url) {\n let i;\n for (i = 0; i < regexUtils.length; i++) {\n let regex = regexUtils[i].regex;\n if (regex.test(url)) {\n return regexUtils[i].utils;\n }\n }\n return defaultURLUtils;\n }\n\n function setup() {\n defaultURLUtils = DefaultURLUtils(context).getInstance();\n }\n\n /**\n * Register a module to handle specific url.\n * @param {regex} regex - url regex\n * @param {object} utils - object that handles the regex\n * @memberof module:URLUtils\n * @instance\n */\n function registerUrlRegex(regex, utils) {\n regexUtils.push({regex: regex, utils: utils});\n }\n\n function internalCall(functionName, url, baseUrl) {\n let utils = getUtils(baseUrl || url);\n return utils && typeof (utils[functionName]) === 'function' ? utils[functionName](url, baseUrl) : defaultURLUtils[functionName](url, baseUrl);\n }\n\n /**\n * Returns a string that contains the Base URL of a URL, if determinable.\n * @param {string} url - full url\n * @return {string}\n * @memberof module:URLUtils\n * @instance\n */\n function parseBaseUrl(url) {\n return internalCall('parseBaseUrl', url);\n }\n\n /**\n * Returns a string that contains the scheme and origin of a URL,\n * if determinable.\n * @param {string} url - full url\n * @return {string}\n * @memberof module:URLUtils\n * @instance\n */\n function parseOrigin(url) {\n return internalCall('parseOrigin', url);\n }\n\n /**\n * Returns a string that contains the fragment of a URL without scheme,\n * if determinable.\n * @param {string} url - full url\n * @return {string}\n * @memberof module:URLUtils\n * @instance\n */\n function removeHostname(url) {\n return internalCall('removeHostname', url);\n }\n\n /**\n * Returns a string that contains the scheme of a URL, if determinable.\n * @param {string} url - full url\n * @return {string}\n * @memberof module:URLUtils\n * @instance\n */\n function parseScheme(url) {\n return internalCall('parseScheme', url);\n }\n\n /**\n * Determines whether the url is relative.\n * @return {boolean}\n * @param {string} url\n * @memberof module:URLUtils\n * @instance\n */\n function isRelative(url) {\n return internalCall('isRelative', url);\n }\n\n /**\n * Determines whether the url is path-absolute.\n * @return {bool}\n * @param {string} url\n * @memberof module:URLUtils\n * @instance\n */\n function isPathAbsolute(url) {\n return internalCall('isPathAbsolute', url);\n }\n\n /**\n * Determines whether the url is scheme-relative.\n * @return {bool}\n * @param {string} url\n * @memberof module:URLUtils\n * @instance\n */\n function isSchemeRelative(url) {\n return internalCall('isSchemeRelative', url);\n }\n\n /**\n * Determines whether the url is an HTTP-URL as defined in ISO/IEC\n * 23009-1:2014 3.1.15. ie URL with a fixed scheme of http or https\n * @return {bool}\n * @param {string} url\n * @memberof module:URLUtils\n * @instance\n */\n function isHTTPURL(url) {\n return internalCall('isHTTPURL', url);\n }\n\n /**\n * Determines whether the supplied url has https scheme\n * @return {bool}\n * @param {string} url\n * @memberof module:URLUtils\n * @instance\n */\n function isHTTPS(url) {\n return internalCall('isHTTPS', url);\n }\n\n /**\n * Resolves a url given an optional base url\n * @return {string}\n * @param {string} url\n * @param {string} [baseUrl]\n * @memberof module:URLUtils\n * @instance\n */\n function resolve(url, baseUrl) {\n return internalCall('resolve', url, baseUrl);\n }\n\n setup();\n instance = {\n registerUrlRegex: registerUrlRegex,\n parseBaseUrl: parseBaseUrl,\n parseOrigin: parseOrigin,\n parseScheme: parseScheme,\n isRelative: isRelative,\n isPathAbsolute: isPathAbsolute,\n isSchemeRelative: isSchemeRelative,\n isHTTPURL: isHTTPURL,\n isHTTPS: isHTTPS,\n removeHostname: removeHostname,\n resolve: resolve\n };\n\n return instance;\n}\n\nURLUtils.__dashjs_factory_name = 'URLUtils';\nconst factory = FactoryMaker.getSingletonFactory(URLUtils);\nexport default factory;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { HTTPRequest } from '../vo/metrics/HTTPRequest';\n\n/**\n * @class\n * @ignore\n */\nclass FragmentRequest {\n constructor(url) {\n this.action = FragmentRequest.ACTION_DOWNLOAD;\n this.startTime = NaN;\n this.mediaStartTime = NaN;\n this.mediaType = null;\n this.mediaInfo = null;\n this.type = null;\n this.duration = NaN;\n this.timescale = NaN;\n this.range = null;\n this.url = url || null;\n this.serviceLocation = null;\n this.requestStartDate = null;\n this.firstByteDate = null;\n this.requestEndDate = null;\n this.quality = NaN;\n this.index = NaN;\n this.availabilityStartTime = null;\n this.availabilityEndTime = null;\n this.wallStartTime = null;\n this.bytesLoaded = NaN;\n this.bytesTotal = NaN;\n this.delayLoadingTime = NaN;\n this.responseType = 'arraybuffer';\n this.representationId = null;\n }\n\n isInitializationRequest() {\n return (this.type && this.type === HTTPRequest.INIT_SEGMENT_TYPE);\n }\n\n setInfo(info) {\n this.type = info && info.init ? HTTPRequest.INIT_SEGMENT_TYPE : HTTPRequest.MEDIA_SEGMENT_TYPE;\n this.url = info && info.url ? info.url : null;\n this.range = info && info.range ? info.range.start + '-' + info.range.end : null;\n this.mediaType = info && info.mediaType ? info.mediaType : null;\n }\n}\n\nFragmentRequest.ACTION_DOWNLOAD = 'download';\nFragmentRequest.ACTION_COMPLETE = 'complete';\n\nexport default FragmentRequest;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport Constants from '../constants/Constants';\n\nexport function checkParameterType(parameter, type) {\n if (typeof parameter !== type) {\n throw Constants.BAD_ARGUMENT_ERROR;\n }\n}\n\nexport function checkInteger(parameter) {\n const isInt = parameter !== null && !isNaN(parameter) && (parameter % 1 === 0);\n\n if (!isInt) {\n throw Constants.BAD_ARGUMENT_ERROR + ' : argument is not an integer';\n }\n}\n\nexport function checkRange(parameter, min, max) {\n if (parameter < min || parameter > max) {\n throw Constants.BAD_ARGUMENT_ERROR + ' : argument out of range';\n }\n}\n\nexport function checkIsVideoOrAudioType(type) {\n if (typeof type !== 'string' || (type !== Constants.AUDIO && type !== Constants.VIDEO)) {\n throw Constants.BAD_ARGUMENT_ERROR;\n }\n}","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n * @class\n * @ignore\n */\n\nimport path from 'path-browserify'\n\nclass Utils {\n static mixin(dest, source, copy) {\n let s;\n let empty = {};\n if (dest) {\n for (let name in source) {\n if (source.hasOwnProperty(name)) {\n s = source[name];\n if (!(name in dest) || (dest[name] !== s && (!(name in empty) || empty[name] !== s))) {\n if (typeof dest[name] === 'object' && dest[name] !== null) {\n dest[name] = Utils.mixin(dest[name], s, copy);\n } else {\n dest[name] = copy(s);\n }\n }\n }\n }\n }\n return dest;\n }\n\n static clone(src) {\n if (!src || typeof src !== 'object') {\n return src; // anything\n }\n let r;\n if (src instanceof Array) {\n // array\n r = [];\n for (let i = 0, l = src.length; i < l; ++i) {\n if (i in src) {\n r.push(Utils.clone(src[i]));\n }\n }\n } else {\n r = {};\n }\n return Utils.mixin(r, src, Utils.clone);\n }\n\n static addAditionalQueryParameterToUrl(url, params) {\n try {\n if (!params || params.length === 0) {\n return url;\n }\n\n let modifiedUrl = new URL(url);\n\n params.forEach((param) => {\n if (param.key && param.value) {\n modifiedUrl.searchParams.set(param.key, param.value);\n }\n });\n\n return modifiedUrl.href;\n\n\n } catch (e) {\n return url;\n }\n }\n\n static parseHttpHeaders(headerStr) {\n let headers = {};\n if (!headerStr) {\n return headers;\n }\n\n // Trim headerStr to fix a MS Edge bug with xhr.getAllResponseHeaders method\n // which send a string starting with a \"\\n\" character\n let headerPairs = headerStr.trim().split('\\u000d\\u000a');\n for (let i = 0, ilen = headerPairs.length; i < ilen; i++) {\n let headerPair = headerPairs[i];\n let index = headerPair.indexOf('\\u003a\\u0020');\n if (index > 0) {\n headers[headerPair.substring(0, index)] = headerPair.substring(index + 2);\n }\n }\n return headers;\n }\n\n static generateUuid() {\n let dt = new Date().getTime();\n const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n const r = (dt + Math.random() * 16) % 16 | 0;\n dt = Math.floor(dt / 16);\n return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16);\n });\n return uuid;\n }\n\n static generateHashCode(string) {\n let hash = 0;\n\n if (string.length === 0) {\n return hash;\n }\n\n for (let i = 0; i < string.length; i++) {\n const chr = string.charCodeAt(i);\n hash = ((hash << 5) - hash) + chr;\n hash |= 0;\n }\n return hash;\n }\n\n /**\n * Compares both urls and returns a relative url (target relative to original)\n * @param {string} original\n * @param {string} target\n * @return {string|*}\n */\n static getRelativeUrl(originalUrl, targetUrl) {\n try {\n const original = new URL(originalUrl);\n const target = new URL(targetUrl);\n\n // Unify the protocol to compare the origins\n original.protocol = target.protocol;\n if (original.origin !== target.origin) {\n return targetUrl;\n }\n\n // Use the relative path implementation of the path library. We need to cut off the actual filename in the end to get the relative path\n let relativePath = path.relative(original.pathname.substr(0, original.pathname.lastIndexOf('/')), target.pathname.substr(0, target.pathname.lastIndexOf('/')));\n\n // In case the relative path is empty (both path are equal) return the filename only. Otherwise add a slash in front of the filename\n const startIndexOffset = relativePath.length === 0 ? 1 : 0;\n relativePath += target.pathname.substr(target.pathname.lastIndexOf('/') + startIndexOffset, target.pathname.length - 1);\n\n // Build the other candidate, e.g. the 'host relative' path that starts with \"/\", and return the shortest of the two candidates.\n if (target.pathname.length < relativePath.length) {\n return target.pathname;\n }\n return relativePath;\n } catch (e) {\n return targetUrl\n }\n }\n}\n\nexport default Utils;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport FactoryMaker from './FactoryMaker';\nimport Utils from './Utils.js';\nimport Debug from '../core/Debug';\nimport Constants from '../streaming/constants/Constants';\nimport {HTTPRequest} from '../streaming/vo/metrics/HTTPRequest';\n\n/** @module Settings\n * @description Define the configuration parameters of Dash.js MediaPlayer.\n * @see {@link module:Settings~PlayerSettings PlayerSettings} for further information about the supported configuration properties.\n */\n\n\n/**\n * @typedef {Object} PlayerSettings\n * @property {module:Settings~DebugSettings} [debug]\n * Debug related settings.\n * @property {module:Settings~ErrorSettings} [errors]\n * Error related settings\n * @property {module:Settings~StreamingSettings} [streaming]\n * Streaming related settings.\n * @example\n *\n * // Full settings object\n * settings = {\n * debug: {\n * logLevel: Debug.LOG_LEVEL_WARNING,\n * dispatchEvent: false\n * },\n * streaming: {\n * abandonLoadTimeout: 10000,\n * wallclockTimeUpdateInterval: 100,\n * lowLatencyEnabled: false,\n * lowLatencyEnabledByManifest: true,\n * manifestUpdateRetryInterval: 100,\n * cacheInitSegments: true,\n * eventControllerRefreshDelay: 100,\n * capabilities: {\n * filterUnsupportedEssentialProperties: true,\n * useMediaCapabilitiesApi: false\n * },\n * timeShiftBuffer: {\n * calcFromSegmentTimeline: false,\n * fallbackToSegmentTimeline: true\n * },\n * metrics: {\n * maxListDepth: 100\n * },\n * delay: {\n * liveDelayFragmentCount: NaN,\n * liveDelay: NaN,\n * useSuggestedPresentationDelay: true,\n * applyServiceDescription: true\n * },\n * protection: {\n * keepProtectionMediaKeys: false\n * },\n * buffer: {\n * enableSeekDecorrelationFix: true,\n * fastSwitchEnabled: true,\n * flushBufferAtTrackSwitch: false,\n * reuseExistingSourceBuffers: true,\n * bufferPruningInterval: 10,\n * bufferToKeep: 20,\n * bufferTimeAtTopQuality: 30,\n * bufferTimeAtTopQualityLongForm: 60,\n * initialBufferLevel: NaN,\n * stableBufferTime: 12,\n * longFormContentDurationThreshold: 600,\n * stallThreshold: 0.5,\n * useAppendWindow: true,\n * setStallState: false\n * },\n * gaps: {\n * jumpGaps: true,\n * jumpLargeGaps: true,\n * smallGapLimit: 1.5,\n * threshold: 0.3,\n * enableSeekFix: false\n * },\n * utcSynchronization: {\n * enabled: true,\n * useManifestDateHeaderTimeSource: true,\n * backgroundAttempts: 2,\n * timeBetweenSyncAttempts: 30,\n * maximumTimeBetweenSyncAttempts: 600,\n * minimumTimeBetweenSyncAttempts: 2,\n * timeBetweenSyncAttemptsAdjustmentFactor: 2,\n * maximumAllowedDrift: 100,\n * enableBackgroundSyncAfterSegmentDownloadError: true,\n * defaultTimingSource: {\n * scheme: 'urn:mpeg:dash:utc:http-xsdate:2014',\n * value: 'http://time.akamai.com/?iso&ms'\n * }\n * },\n * scheduling: {\n * defaultTimeout: 300,\n * lowLatencyTimeout: 100,\n * scheduleWhilePaused: true\n * },\n * text: {\n * defaultEnabled: true\n * },\n * liveCatchup: {\n * minDrift: 0.02,\n * maxDrift: 12,\n * playbackRate: 0.5,\n * latencyThreshold: 60,\n * playbackBufferMin: 0.5,\n * enabled: false,\n * mode: Constants.LIVE_CATCHUP_MODE_DEFAULT\n * },\n * lastBitrateCachingInfo: { enabled: true, ttl: 360000 },\n * lastMediaSettingsCachingInfo: { enabled: true, ttl: 360000 },\n * cacheLoadThresholds: { video: 50, audio: 5 },\n * trackSwitchMode: {\n * audio: Constants.TRACK_SWITCH_MODE_ALWAYS_REPLACE,\n * video: Constants.TRACK_SWITCH_MODE_NEVER_REPLACE\n * },\n * selectionModeForInitialTrack: Constants.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY,\n * fragmentRequestTimeout: 0,\n * retryIntervals: {\n * [HTTPRequest.MPD_TYPE]: 500,\n * [HTTPRequest.XLINK_EXPANSION_TYPE]: 500,\n * [HTTPRequest.MEDIA_SEGMENT_TYPE]: 1000,\n * [HTTPRequest.INIT_SEGMENT_TYPE]: 1000,\n * [HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE]: 1000,\n * [HTTPRequest.INDEX_SEGMENT_TYPE]: 1000,\n * [HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE]: 1000,\n * [HTTPRequest.LICENSE]: 1000,\n * [HTTPRequest.OTHER_TYPE]: 1000,\n * lowLatencyReductionFactor: 10\n * },\n * retryAttempts: {\n * [HTTPRequest.MPD_TYPE]: 3,\n * [HTTPRequest.XLINK_EXPANSION_TYPE]: 1,\n * [HTTPRequest.MEDIA_SEGMENT_TYPE]: 3,\n * [HTTPRequest.INIT_SEGMENT_TYPE]: 3,\n * [HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE]: 3,\n * [HTTPRequest.INDEX_SEGMENT_TYPE]: 3,\n * [HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE]: 3,\n * [HTTPRequest.LICENSE]: 3,\n * [HTTPRequest.OTHER_TYPE]: 3,\n * lowLatencyMultiplyFactor: 5\n * },\n * abr: {\n * movingAverageMethod: Constants.MOVING_AVERAGE_SLIDING_WINDOW,\n * ABRStrategy: Constants.ABR_STRATEGY_DYNAMIC,\n * additionalAbrRules: {\n * insufficientBufferRule: false,\n * switchHistoryRule: true,\n * droppedFramesRule: true,\n * abandonRequestsRule: false\n * },\n * bandwidthSafetyFactor: 0.9,\n * useDefaultABRRules: true,\n * useDeadTimeLatency: true,\n * limitBitrateByPortal: false,\n * usePixelRatioInLimitBitrateByPortal: false,\n * maxBitrate: { audio: -1, video: -1 },\n * minBitrate: { audio: -1, video: -1 },\n * maxRepresentationRatio: { audio: 1, video: 1 },\n * initialBitrate: { audio: -1, video: -1 },\n * initialRepresentationRatio: { audio: -1, video: -1 },\n * autoSwitchBitrate: { audio: true, video: true },\n * fetchThroughputCalculationMode: Constants.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA\n * },\n * cmcd: {\n * enabled: false,\n * sid: null,\n * cid: null,\n * rtp: null,\n * rtpSafetyFactor: 5,\n * mode: Constants.CMCD_MODE_QUERY\n * }\n * },\n * errors: {\n * recoverAttempts: {\n * mediaErrorDecode: 5\n * }\n * }\n * }\n */\n\n/**\n * @typedef {Object} TimeShiftBuffer\n * @property {boolean} [calcFromSegmentTimeline=false]\n * Enable calculation of the DVR window for SegmentTimeline manifests based on the entries in \\.\n * * @property {boolean} [fallbackToSegmentTimeline=true]\n * In case the MPD uses \\.\n */\n\n/**\n * @typedef {Object} LiveDelay\n * @property {number} [liveDelayFragmentCount=NaN]\n * Changing this value will lower or increase live stream latency.\n *\n * The detected segment duration will be multiplied by this value to define a time in seconds to delay a live stream from the live edge.\n *\n * Lowering this value will lower latency but may decrease the player's ability to build a stable buffer.\n * @property {number} [liveDelay]\n * Equivalent in seconds of setLiveDelayFragmentCount.\n *\n * Lowering this value will lower latency but may decrease the player's ability to build a stable buffer.\n *\n * This value should be less than the manifest duration by a couple of segment durations to avoid playback issues.\n *\n * If set, this parameter will take precedence over setLiveDelayFragmentCount and manifest info.\n * @property {boolean} [useSuggestedPresentationDelay=true]\n * Set to true if you would like to overwrite the default live delay and honor the SuggestedPresentationDelay attribute in by the manifest.\n * @property {boolean} [applyServiceDescription=true]\n * Set to true if dash.js should use latency targets defined in ServiceDescription elements\n */\n\n/**\n * @typedef {Object} Buffer\n * @property {boolean} [enableSeekDecorrelationFix=false]\n * Enables a workaround for playback start on some devices, e.g. WebOS 4.9.\n * It is necessary because some browsers do not support setting currentTime on video element to a value that is outside of current buffer.\n *\n * If you experience unexpected seeking triggered by BufferController, you can try setting this value to false.\n\n * @property {boolean} [fastSwitchEnabled=true]\n * When enabled, after an ABR up-switch in quality, instead of requesting and appending the next fragment at the end of the current buffer range it is requested and appended closer to the current time.\n *\n * When enabled, The maximum time to render a higher quality is current time + (1.5 * fragment duration).\n *\n * Note, When ABR down-switch is detected, we appended the lower quality at the end of the buffer range to preserve the\n * higher quality media for as long as possible.\n *\n * If enabled, it should be noted there are a few cases when the client will not replace inside buffer range but rather just append at the end.\n * 1. When the buffer level is less than one fragment duration.\n * 2. The client is in an Abandonment State due to recent fragment abandonment event.\n *\n * Known issues:\n * 1. In IE11 with auto switching off, if a user switches to a quality they can not download in time the fragment may be appended in the same range as the playhead or even in the past, in IE11 it may cause a stutter or stall in playback.\n * @property {boolean} [flushBufferAtTrackSwitch=false]\n * When enabled, after a track switch and in case buffer is being replaced, the video element is flushed (seek at current playback time) once a segment of the new track is appended in buffer in order to force video decoder to play new track.\n *\n * This can be required on some devices like GoogleCast devices to make track switching functional.\n *\n * Otherwise track switching will be effective only once after previous buffered track is fully consumed.\n * @property {boolean} [reuseExistingSourceBuffers=true]\n * Enable reuse of existing MediaSource Sourcebuffers during period transition.\n * @property {number} [bufferPruningInterval=10]\n * The interval of pruning buffer in seconds.\n * @property {number} [bufferToKeep=20]\n * This value influences the buffer pruning logic.\n *\n * Allows you to modify the buffer that is kept in source buffer in seconds.\n * 0|-----------bufferToPrune-----------|-----bufferToKeep-----|currentTime|\n * @property {number} [bufferTimeAtTopQuality=30]\n * The time that the internal buffer target will be set to once playing the top quality.\n *\n * If there are multiple bitrates in your adaptation, and the media is playing at the highest bitrate, then we try to build a larger buffer at the top quality to increase stability and to maintain media quality.\n * @property {number} [bufferTimeAtTopQualityLongForm=60]\n * The time that the internal buffer target will be set to once playing the top quality for long form content.\n * @property {number} [longFormContentDurationThreshold=600]\n * The threshold which defines if the media is considered long form content.\n *\n * This will directly affect the buffer targets when playing back at the top quality.\n * @property {number} [initialBufferLevel=NaN]\n * Initial buffer level before playback starts\n * @property {number} [stableBufferTime=12]\n * The time that the internal buffer target will be set to post startup/seeks (NOT top quality).\n *\n * When the time is set higher than the default you will have to wait longer to see automatic bitrate switches but will have a larger buffer which will increase stability.\n * @property {number} [stallThreshold=0.3]\n * Stall threshold used in BufferController.js to determine whether a track should still be changed and which buffer range to prune.\n * @property {boolean} [useAppendWindow=true]\n * Specifies if the appendWindow attributes of the MSE SourceBuffers should be set according to content duration from manifest.\n * @property {boolean} [setStallState=false]\n * Specifies if we fire manual waiting events once the stall threshold is reached\n */\n\n/**\n * @typedef {Object} module:Settings~AudioVideoSettings\n * @property {number|boolean|string} [audio]\n * Configuration for audio media type of tracks.\n * @property {number|boolean|string} [video]\n * Configuration for video media type of tracks.\n */\n\n/**\n * @typedef {Object} DebugSettings\n * @property {number} [logLevel=dashjs.Debug.LOG_LEVEL_WARNING]\n * Sets up the log level. The levels are cumulative.\n *\n * For example, if you set the log level to dashjs.Debug.LOG_LEVEL_WARNING all warnings, errors and fatals will be logged.\n *\n * Possible values.\n *\n * - dashjs.Debug.LOG_LEVEL_NONE\n * No message is written in the browser console.\n *\n * - dashjs.Debug.LOG_LEVEL_FATAL\n * Log fatal errors.\n * An error is considered fatal when it causes playback to fail completely.\n *\n * - dashjs.Debug.LOG_LEVEL_ERROR\n * Log error messages.\n *\n * - dashjs.Debug.LOG_LEVEL_WARNING\n * Log warning messages.\n *\n * - dashjs.Debug.LOG_LEVEL_INFO\n * Log info messages.\n *\n * - dashjs.Debug.LOG_LEVEL_DEBUG\n * Log debug messages.\n * @property {boolean} [dispatchEvent=false]\n * Enable to trigger a Events.LOG event whenever log output is generated.\n *\n * Note this will be dispatched regardless of log level.\n */\n\n/**\n * @typedef {Object} module:Settings~ErrorSettings\n * @property {object} [recoverAttempts={mediaErrorDecode: 5}]\n * Defines the maximum number of recover attempts for specific media errors.\n *\n * For mediaErrorDecode the player will reset the MSE and skip the blacklisted segment that caused the decode error. The resulting gap will be handled by the GapController.\n */\n\n/**\n * @typedef {Object} CachingInfoSettings\n * @property {boolean} [enable]\n * Enable or disable the caching feature.\n * @property {number} [ttl]\n * Time to live.\n *\n * A value defined in milliseconds representing how log to cache the settings for.\n */\n\n/**\n * @typedef {Object} Gaps\n * @property {boolean} [jumpGaps=true]\n * Sets whether player should jump small gaps (discontinuities) in the buffer.\n * @property {boolean} [jumpLargeGaps=true]\n * Sets whether player should jump large gaps (discontinuities) in the buffer.\n * @property {number} [smallGapLimit=1.5]\n * Time in seconds for a gap to be considered small.\n * @property {number} [threshold=0.3]\n * Threshold at which the gap handling is executed. If currentRangeEnd - currentTime < threshold the gap jump will be triggered.\n * For live stream the jump might be delayed to keep a consistent live edge.\n * Note that the amount of buffer at which platforms automatically stall might differ.\n * @property {boolean} [enableSeekFix=false]\n * Enables the adjustment of the seek target once no valid segment request could be generated for a specific seek time. This can happen if the user seeks to a position for which there is a gap in the timeline.\n */\n\n/**\n * @typedef {Object} UtcSynchronizationSettings\n * @property {boolean} [enabled=true]\n * Enables or disables the UTC clock synchronization\n * @property {boolean} [useManifestDateHeaderTimeSource=true]\n * Allows you to enable the use of the Date Header, if exposed with CORS, as a timing source for live edge detection.\n *\n * The use of the date header will happen only after the other timing source that take precedence fail or are omitted as described.\n * @property {number} [backgroundAttempts=2]\n * Number of synchronization attempts to perform in the background after an initial synchronization request has been done. This is used to verify that the derived client-server offset is correct.\n *\n * The background requests are async and done in parallel to the start of the playback.\n *\n * This value is also used to perform a resync after 404 errors on segments.\n * @property {number} [timeBetweenSyncAttempts=30]\n * The time in seconds between two consecutive sync attempts.\n *\n * Note: This value is used as an initial starting value. The internal value of the TimeSyncController is adjusted during playback based on the drift between two consecutive synchronization attempts.\n *\n * Note: A sync is only performed after an MPD update. In case the @minimumUpdatePeriod is larger than this value the sync will be delayed until the next MPD update.\n * @property {number} [maximumTimeBetweenSyncAttempts=600]\n * The maximum time in seconds between two consecutive sync attempts.\n *\n * @property {number} [minimumTimeBetweenSyncAttempts=2]\n * The minimum time in seconds between two consecutive sync attempts.\n *\n * @property {number} [timeBetweenSyncAttemptsAdjustmentFactor=2]\n * The factor used to multiply or divide the timeBetweenSyncAttempts parameter after a sync. The maximumAllowedDrift defines whether this value is used as a factor or a dividend.\n *\n * @property {number} [maximumAllowedDrift=100]\n * The maximum allowed drift specified in milliseconds between two consecutive synchronization attempts.\n *\n * @property {boolean} [enableBackgroundSyncAfterSegmentDownloadError=true]\n * Enables or disables the background sync after the player ran into a segment download error.\n *\n * @property {object} [defaultTimingSource={scheme:'urn:mpeg:dash:utc:http-xsdate:2014',value: 'http://time.akamai.com/?iso&ms'}]\n * The default timing source to be used. The timing sources in the MPD take precedence over this one.\n */\n\n/**\n * @typedef {Object} Scheduling\n * @property {number} [defaultTimeout=300]\n * Default timeout between two consecutive segment scheduling attempts\n * @property {number} [lowLatencyTimeout]\n * Default timeout between two consecutive low-latency segment scheduling attempts\n * @property {boolean} [scheduleWhilePaused=true]\n * Set to true if you would like dash.js to keep downloading fragments in the background when the video element is paused.\n */\n\n/**\n * @typedef {Object} Text\n * @property {number} [defaultEnabled=true]\n * Enable/disable subtitle rendering by default.\n */\n\n/**\n * @typedef {Object} LiveCatchupSettings\n * @property {number} [minDrift=0.02]\n * Use this method to set the minimum latency deviation allowed before activating catch-up mechanism.\n *\n * In low latency mode, when the difference between the measured latency and the target one, as an absolute number, is higher than the one sets with this method, then dash.js increases/decreases playback rate until target latency is reached.\n *\n * LowLatencyMinDrift should be provided in seconds, and it uses values between 0.0 and 0.5.\n *\n * Note: Catch-up mechanism is only applied when playing low latency live streams.\n * @property {number} [maxDrift=12]\n * Use this method to set the maximum latency deviation allowed before dash.js to do a seeking to live position.\n *\n * In low latency mode, when the difference between the measured latency and the target one, as an absolute number, is higher than the one sets with this method, then dash.js does a seek to live edge position minus the target live delay.\n *\n * LowLatencyMaxDriftBeforeSeeking should be provided in seconds.\n *\n * If 0, then seeking operations won't be used for fixing latency deviations.\n *\n * Note: Catch-up mechanism is only applied when playing low latency live streams.\n * @property {number} [playbackRate=0.5]\n * Use this parameter to set the maximum catch up rate, as a percentage, for low latency live streams.\n *\n * In low latency mode, when measured latency is higher/lower than the target one, dash.js increases/decreases playback rate respectively up to (+/-) the percentage defined with this method until target is reached.\n *\n * Valid values for catch up rate are in range 0-0.5 (0-50%).\n *\n * Set it to 0 to turn off live catch up feature.\n *\n * Note: Catch-up mechanism is only applied when playing low latency live streams.\n * @property {number} [latencyThreshold=NaN]\n * Use this parameter to set the maximum threshold for which live catch up is applied.\n *\n * For instance, if this value is set to 8 seconds, then live catchup is only applied if the current live latency is equal or below 8 seconds.\n *\n * The reason behind this parameter is to avoid an increase of the playback rate if the user seeks within the DVR window.\n *\n * If no value is specified this will be twice the maximum live delay.\n *\n * The maximum live delay is either specified in the manifest as part of a ServiceDescriptor or calculated the following:\n * maximumLiveDelay = targetDelay + liveCatchupMinDrift.\n *\n * @property {number} [playbackBufferMin=NaN]\n * Use this parameter to specify the minimum buffer which is used for LoL+ based playback rate reduction.\n *\n *\n * @property {boolean} [enabled=false]\n * Use this parameter to enable the catchup mode for non low-latency streams.\n *\n * @property {string} [mode=\"liveCatchupModeDefault\"]\n * Use this parameter to switch between different catchup modes.\n *\n * Options: \"liveCatchupModeDefault\" or \"liveCatchupModeLOLP\".\n *\n * Note: Catch-up mechanism is automatically applied when playing low latency live streams.\n */\n\n/**\n * @typedef {Object} RequestTypeSettings\n * @property {number} [MPD]\n * Manifest type of requests.\n * @property {number} [XLinkExpansion]\n * XLink expansion type of requests.\n * @property {number} [InitializationSegment]\n * Request to retrieve an initialization segment.\n * @property {number} [IndexSegment]\n * Request to retrieve an index segment (SegmentBase).\n * @property {number} [MediaSegment]\n * Request to retrieve a media segment (video/audio/image/text chunk).\n * @property {number} [BitstreamSwitchingSegment]\n * Bitrate stream switching type of request.\n * @property {number} [FragmentInfoSegment]\n * Request to retrieve a FragmentInfo segment (specific to Smooth Streaming live streams).\n * @property {number} [other]\n * Other type of request.\n * @property {number} [lowLatencyReductionFactor]\n * For low latency mode, values of type of request are divided by lowLatencyReductionFactor.\n *\n * Note: It's not type of request.\n * @property {number} [lowLatencyMultiplyFactor]\n * For low latency mode, values of type of request are multiplied by lowLatencyMultiplyFactor.\n *\n * Note: It's not type of request.\n */\n\n/**\n * @typedef {Object} Protection\n * @property {boolean} [keepProtectionMediaKeys=false]\n * Set the value for the ProtectionController and MediaKeys life cycle.\n *\n * If true, the ProtectionController and then created MediaKeys and MediaKeySessions will be preserved during the MediaPlayer lifetime.\n * @property {boolean} ignoreEmeEncryptedEvent\n * If set to true the player will ignore \"encrypted\" and \"needkey\" events thrown by the EME.\n */\n\n/**\n * @typedef {Object} Capabilities\n * @property {boolean} [filterUnsupportedEssentialProperties=true]\n * Enable to filter all the AdaptationSets and Representations which contain an unsupported \\ element.\n * @property {boolean} [useMediaCapabilitiesApi=false]\n * Enable to use the MediaCapabilities API to check whether codecs are supported. If disabled MSE.isTypeSupported will be used instead.\n */\n\n/**\n * @typedef {Object} AbrSettings\n * @property {string} [movingAverageMethod=\"slidingWindow\"]\n * Sets the moving average method used for smoothing throughput estimates.\n *\n * Valid methods are \"slidingWindow\" and \"ewma\".\n *\n * The call has no effect if an invalid method is passed.\n *\n * The sliding window moving average method computes the average throughput using the last four segments downloaded.\n *\n * If the stream is live (as opposed to VOD), then only the last three segments are used.\n *\n * If wide variations in throughput are detected, the number of segments can be dynamically increased to avoid oscillations.\n *\n * The exponentially weighted moving average (EWMA) method computes the average using exponential smoothing.\n *\n * Two separate estimates are maintained, a fast one with a three-second half life and a slow one with an eight-second half life.\n *\n * The throughput estimate at any time is the minimum of the fast and slow estimates.\n *\n * This allows a fast reaction to a bandwidth drop and prevents oscillations on bandwidth spikes.\n * @property {string} [ABRStrategy=\"abrDynamic\"]\n * Returns the current ABR strategy being used: \"abrDynamic\", \"abrBola\" or \"abrThroughput\".\n * @property {object} [trackSwitchMode={video: \"neverReplace\", audio: \"alwaysReplace\"}]\n * @property {object} [additionalAbrRules={insufficientBufferRule: false,switchHistoryRule: true,droppedFramesRule: true,abandonRequestsRule: false}]\n * Enable/Disable additional ABR rules in case ABRStrategy is set to \"abrDynamic\", \"abrBola\" or \"abrThroughput\".\n * @property {number} [bandwidthSafetyFactor=0.9]\n * Standard ABR throughput rules multiply the throughput by this value.\n *\n * It should be between 0 and 1, with lower values giving less rebuffering (but also lower quality).\n * @property {boolean} [useDefaultABRRules=true]\n * Should the default ABR rules be used, or the custom ones added.\n * @property {boolean} [useDeadTimeLatency=true]\n * If true, only the download portion will be considered part of the download bitrate and latency will be regarded as static.\n *\n * If false, the reciprocal of the whole transfer time will be used.\n * @property {boolean} [limitBitrateByPortal=false]\n * If true, the size of the video portal will limit the max chosen video resolution.\n * @property {boolean} [usePixelRatioInLimitBitrateByPortal=false]\n * Sets whether to take into account the device's pixel ratio when defining the portal dimensions.\n *\n * Useful on, for example, retina displays.\n * @property {module:Settings~AudioVideoSettings} [maxBitrate={audio: -1, video: -1}]\n * The maximum bitrate that the ABR algorithms will choose.\n *\n * Use NaN for no limit.\n * @property {module:Settings~AudioVideoSettings} [minBitrate={audio: -1, video: -1}]\n * The minimum bitrate that the ABR algorithms will choose.\n *\n * Use NaN for no limit.\n * @property {module:Settings~AudioVideoSettings} [maxRepresentationRatio={audio: 1, video: 1}]\n * When switching multi-bitrate content (auto or manual mode) this property specifies the maximum representation allowed, as a proportion of the size of the representation set.\n *\n * You can set or remove this cap at anytime before or during playback.\n *\n * To clear this setting you set the value to 1.\n *\n * If both this and maxAllowedBitrate are defined, maxAllowedBitrate is evaluated first, then maxAllowedRepresentation, i.e. the lowest value from executing these rules is used.\n *\n * This feature is typically used to reserve higher representations for playback only when connected over a fast connection.\n * @property {module:Settings~AudioVideoSettings} [initialBitrate={audio: -1, video: -1}]\n * Explicitly set the starting bitrate for audio or video.\n * @property {module:Settings~AudioVideoSettings} [initialRepresentationRatio={audio: -1, video: -1}]\n * Explicitly set the initial representation ratio.\n *\n * If initalBitrate is specified, this is ignored.\n * @property {module:Settings~AudioVideoSettings} [autoSwitchBitrate={audio: true, video: true}]\n * Indicates whether the player should enable ABR algorithms to switch the bitrate.\n *\n * @property {string} [fetchThroughputCalculationMode=\"abrFetchThroughputCalculationDownloadedData\"]\n * Algorithm to determine the throughput in case the Fetch API is used for low latency streaming.\n *\n * For details please check the samples section and FetchLoader.js.\n */\n\n/**\n * @typedef {Object} module:Settings~CmcdSettings\n * @property {boolean} [enable=false]\n * Enable or disable the CMCD reporting.\n * @property {string} [sid]\n * GUID identifying the current playback session.\n *\n * Should be in UUID format.\n *\n * If not specified a UUID will be automatically generated.\n * @property {string} [cid]\n * A unique string to identify the current content.\n *\n * If not specified it will be a hash of the MPD url.\n * @property {number} [rtp]\n * The requested maximum throughput that the client considers sufficient for delivery of the asset.\n *\n * If not specified this value will be dynamically calculated in the CMCDModel based on the current buffer level.\n * @property {number} [rtpSafetyFactor]\n * This value is used as a factor for the rtp value calculation: rtp = minBandwidth * rtpSafetyFactor\n *\n * If not specified this value defaults to 5. Note that this value is only used when no static rtp value is defined.\n * @property {number} [mode]\n * The method to use to attach cmcd metrics to the requests. 'query' to use query parameters, 'header' to use http headers.\n *\n * If not specified this value defaults to 'query'.\n */\n\n/**\n * @typedef {Object} Metrics\n * @property {number} [metricsMaxListDepth=100]\n * Maximum number of metrics that are persisted per type.\n */\n\n/**\n * @typedef {Object} StreamingSettings\n * @property {number} [abandonLoadTimeout=10000]\n * A timeout value in seconds, which during the ABRController will block switch-up events.\n *\n * This will only take effect after an abandoned fragment event occurs.\n * @property {number} [wallclockTimeUpdateInterval=50]\n * How frequently the wallclockTimeUpdated internal event is triggered (in milliseconds).\n * @property {boolean} [lowLatencyEnabled=false]\n * Manually enable or disable low latency mode.\n *\n * @property {boolean} [lowLatencyEnabledByManifest=true]\n * If this value is set to true we enable the low latency mode based on MPD attributes: Specifically in case \"availabilityTimeComplete\" of the current representation is set to false.\n *\n * @property {number} [manifestUpdateRetryInterval=100]\n * For live streams, set the interval-frequency in milliseconds at which dash.js will check if the current manifest is still processed before downloading the next manifest once the minimumUpdatePeriod time has.\n * @property {boolean} [cacheInitSegments=true]\n * Enables the caching of init segments to avoid requesting the init segments before each representation switch.\n * @property {number} [eventControllerRefreshDelay=100]\n * Defines the delay in milliseconds between two consecutive checks for events to be fired.\n * @property {module:Settings~Metrics} metrics Metric settings\n * @property {module:Settings~LiveDelay} delay Live Delay settings\n * @property {module:Settings~TimeShiftBuffer} timeShiftBuffer TimeShiftBuffer settings\n * @property {module:Settings~Protection} protection DRM related settings\n * @property {module:Settings~Capabilities} capabilities Capability related settings\n * @property {module:Settings~Buffer} buffer Buffer related settings\n * @property {module:Settings~Gaps} gaps Gap related settings\n * @property {module:Settings~UtcSynchronizationSettings} utcSynchronization Settings related to UTC clock synchronization\n * @property {module:Settings~Scheduling} scheduling Settings related to segment scheduling\n * @property {module:Settings~Text} text Settings related to Subtitles and captions\n * @property {module:Settings~LiveCatchupSettings} liveCatchup Settings related to live catchup.\n * @property {module:Settings~CachingInfoSettings} [lastBitrateCachingInfo={enabled: true, ttl: 360000}]\n * Set to false if you would like to disable the last known bit rate from being stored during playback and used to set the initial bit rate for subsequent playback within the expiration window.\n *\n * The default expiration is one hour, defined in milliseconds.\n *\n * If expired, the default initial bit rate (closest to 1000 kbps) will be used for that session and a new bit rate will be stored during that session.\n * @property {module:Settings~AudioVideoSettings} [cacheLoadThresholds={video: 50, audio: 5}]\n * For a given media type, the threshold which defines if the response to a fragment request is coming from browser cache or not.\n * @property {module:Settings~AudioVideoSettings} [trackSwitchMode={video: \"neverReplace\", audio: \"alwaysReplace\"}]\n * For a given media type defines if existing segments in the buffer should be overwritten once the track is switched. For instance if the user switches the audio language the existing segments in the audio buffer will be replaced when setting this value to \"alwaysReplace\".\n *\n * Possible values\n *\n * - Constants.TRACK_SWITCH_MODE_ALWAYS_REPLACE\n * Replace existing segments in the buffer\n *\n * - Constants.TRACK_SWITCH_MODE_NEVER_REPLACE\n * Do not replace existing segments in the buffer\n *\n * @property {string} [selectionModeForInitialTrack=\"highestBitrate\"]\n * Sets the selection mode for the initial track. This mode defines how the initial track will be selected if no initial media settings are set. If initial media settings are set this parameter will be ignored. Available options are:\n *\n * Possible values\n *\n * - Constants.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY\n * This mode makes the player select the track with the highest selectionPriority as defined in the manifest. If not selectionPriority is given we fallback to TRACK_SELECTION_MODE_HIGHEST_BITRATE. This mode is a default mode.\n *\n * - Constants.TRACK_SELECTION_MODE_HIGHEST_BITRATE\n * This mode makes the player select the track with a highest bitrate.\n *\n * - Constants.TRACK_SELECTION_MODE_FIRST_TRACK\n * This mode makes the player select the first track found in the manifest.\n *\n * - Constants.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY\n * This mode makes the player select the track with the lowest bitrate per pixel average.\n *\n * - Constants.TRACK_SELECTION_MODE_WIDEST_RANGE\n * This mode makes the player select the track with a widest range of bitrates.\n *\n *\n * @property {number} [fragmentRequestTimeout=0]\n * Time in milliseconds before timing out on loading a media fragment.\n *\n * Fragments that timeout are retried as if they failed.\n * @property {module:Settings~RequestTypeSettings} [retryIntervals]\n * Time in milliseconds of which to reload a failed file load attempt.\n *\n * For low latency mode these values are divided by lowLatencyReductionFactor.\n * @property {module:Settings~RequestTypeSettings} [retryAttempts]\n * Total number of retry attempts that will occur on a file load before it fails.\n *\n * For low latency mode these values are multiplied by lowLatencyMultiplyFactor.\n * @property {module:Settings~AbrSettings} abr\n * Adaptive Bitrate algorithm related settings.\n * @property {module:Settings~CmcdSettings} cmcd\n * Settings related to Common Media Client Data reporting.\n */\n\n\n/**\n * @class\n * @ignore\n */\nfunction Settings() {\n let instance;\n\n /**\n * @const {PlayerSettings} defaultSettings\n * @ignore\n */\n const defaultSettings = {\n debug: {\n logLevel: Debug.LOG_LEVEL_WARNING,\n dispatchEvent: false\n },\n streaming: {\n abandonLoadTimeout: 10000,\n wallclockTimeUpdateInterval: 100,\n lowLatencyEnabled: false,\n lowLatencyEnabledByManifest: true,\n manifestUpdateRetryInterval: 100,\n cacheInitSegments: false,\n eventControllerRefreshDelay: 150,\n capabilities: {\n filterUnsupportedEssentialProperties: true,\n useMediaCapabilitiesApi: false\n },\n timeShiftBuffer: {\n calcFromSegmentTimeline: false,\n fallbackToSegmentTimeline: true\n },\n metrics: {\n maxListDepth: 100\n },\n delay: {\n liveDelayFragmentCount: NaN,\n liveDelay: NaN,\n useSuggestedPresentationDelay: true,\n applyServiceDescription: true\n },\n protection: {\n keepProtectionMediaKeys: false,\n ignoreEmeEncryptedEvent: false\n },\n buffer: {\n enableSeekDecorrelationFix: false,\n fastSwitchEnabled: true,\n flushBufferAtTrackSwitch: false,\n reuseExistingSourceBuffers: true,\n bufferPruningInterval: 10,\n bufferToKeep: 20,\n bufferTimeAtTopQuality: 30,\n bufferTimeAtTopQualityLongForm: 60,\n initialBufferLevel: NaN,\n stableBufferTime: 12,\n longFormContentDurationThreshold: 600,\n stallThreshold: 0.3,\n useAppendWindow: true,\n setStallState: true\n },\n gaps: {\n jumpGaps: true,\n jumpLargeGaps: true,\n smallGapLimit: 1.5,\n threshold: 0.3,\n enableSeekFix: true\n },\n utcSynchronization: {\n enabled: true,\n useManifestDateHeaderTimeSource: true,\n backgroundAttempts: 2,\n timeBetweenSyncAttempts: 30,\n maximumTimeBetweenSyncAttempts: 600,\n minimumTimeBetweenSyncAttempts: 2,\n timeBetweenSyncAttemptsAdjustmentFactor: 2,\n maximumAllowedDrift: 100,\n enableBackgroundSyncAfterSegmentDownloadError: true,\n defaultTimingSource: {\n scheme: 'urn:mpeg:dash:utc:http-xsdate:2014',\n value: 'https://time.akamai.com/?iso&ms'\n }\n },\n scheduling: {\n defaultTimeout: 500,\n lowLatencyTimeout: 0,\n scheduleWhilePaused: true\n },\n text: {\n defaultEnabled: true\n },\n liveCatchup: {\n minDrift: 0.02,\n maxDrift: 12,\n playbackRate: 0.5,\n latencyThreshold: 60,\n playbackBufferMin: 0.5,\n enabled: false,\n mode: Constants.LIVE_CATCHUP_MODE_DEFAULT\n },\n lastBitrateCachingInfo: {\n enabled: true,\n ttl: 360000\n },\n lastMediaSettingsCachingInfo: {\n enabled: true,\n ttl: 360000\n },\n cacheLoadThresholds: {\n video: 50,\n audio: 5\n },\n trackSwitchMode: {\n audio: Constants.TRACK_SWITCH_MODE_ALWAYS_REPLACE,\n video: Constants.TRACK_SWITCH_MODE_NEVER_REPLACE\n },\n selectionModeForInitialTrack: Constants.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY,\n fragmentRequestTimeout: 10000,\n retryIntervals: {\n [HTTPRequest.MPD_TYPE]: 500,\n [HTTPRequest.XLINK_EXPANSION_TYPE]: 500,\n [HTTPRequest.MEDIA_SEGMENT_TYPE]: 1000,\n [HTTPRequest.INIT_SEGMENT_TYPE]: 1000,\n [HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE]: 1000,\n [HTTPRequest.INDEX_SEGMENT_TYPE]: 1000,\n [HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE]: 1000,\n [HTTPRequest.LICENSE]: 1000,\n [HTTPRequest.OTHER_TYPE]: 1000,\n lowLatencyReductionFactor: 10\n },\n retryAttempts: {\n [HTTPRequest.MPD_TYPE]: 3,\n [HTTPRequest.XLINK_EXPANSION_TYPE]: 1,\n [HTTPRequest.MEDIA_SEGMENT_TYPE]: 3,\n [HTTPRequest.INIT_SEGMENT_TYPE]: 3,\n [HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE]: 3,\n [HTTPRequest.INDEX_SEGMENT_TYPE]: 3,\n [HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE]: 3,\n [HTTPRequest.LICENSE]: 3,\n [HTTPRequest.OTHER_TYPE]: 3,\n lowLatencyMultiplyFactor: 5\n },\n abr: {\n movingAverageMethod: Constants.MOVING_AVERAGE_SLIDING_WINDOW,\n ABRStrategy: Constants.ABR_STRATEGY_DYNAMIC,\n additionalAbrRules: {\n insufficientBufferRule: true,\n switchHistoryRule: true,\n droppedFramesRule: true,\n abandonRequestsRule: false\n },\n bandwidthSafetyFactor: 0.9,\n useDefaultABRRules: true,\n useDeadTimeLatency: true,\n limitBitrateByPortal: false,\n usePixelRatioInLimitBitrateByPortal: false,\n maxBitrate: {\n audio: -1,\n video: -1\n },\n minBitrate: {\n audio: -1,\n video: -1\n },\n maxRepresentationRatio: {\n audio: 1,\n video: 1\n },\n initialBitrate: {\n audio: -1,\n video: -1\n },\n initialRepresentationRatio: {\n audio: -1,\n video: -1\n },\n autoSwitchBitrate: {\n audio: true,\n video: true\n },\n fetchThroughputCalculationMode: Constants.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING\n },\n cmcd: {\n enabled: false,\n sid: null,\n cid: null,\n rtp: null,\n rtpSafetyFactor: 5,\n mode: Constants.CMCD_MODE_QUERY\n }\n },\n errors: {\n recoverAttempts: {\n mediaErrorDecode: 5\n }\n }\n };\n\n let settings = Utils.clone(defaultSettings);\n\n //Merge in the settings. If something exists in the new config that doesn't match the schema of the default config,\n //regard it as an error and log it.\n function mixinSettings(source, dest, path) {\n for (let n in source) {\n if (source.hasOwnProperty(n)) {\n if (dest.hasOwnProperty(n)) {\n if (typeof source[n] === 'object' && source[n] !== null) {\n mixinSettings(source[n], dest[n], path.slice() + n + '.');\n } else {\n dest[n] = Utils.clone(source[n]);\n }\n } else {\n throw new Error('Settings parameter ' + path + n + ' is not supported');\n }\n }\n }\n }\n\n /**\n * Return the settings object. Don't copy/store this object, you won't get updates.\n * @func\n * @instance\n */\n function get() {\n return settings;\n }\n\n /**\n * @func\n * @instance\n * @param {object} settingsObj - This should be a partial object of the Settings.Schema type. That is, fields defined should match the path (e.g.\n * settingsObj.streaming.abr.autoSwitchBitrate.audio -> defaultSettings.streaming.abr.autoSwitchBitrate.audio). Where an element's path does\n * not match it is ignored, and a warning is logged.\n *\n * Use to change the settings object. Any new values defined will overwrite the settings and anything undefined will not change.\n * Implementers of new settings should add it in an approriate namespace to the defaultSettings object and give it a default value (that is not undefined).\n *\n */\n function update(settingsObj) {\n if (typeof settingsObj === 'object') {\n mixinSettings(settingsObj, settings, '');\n }\n }\n\n /**\n * Resets the settings object. Everything is set to its default value.\n * @func\n * @instance\n *\n */\n function reset() {\n settings = Utils.clone(defaultSettings);\n }\n\n instance = {\n get: get,\n update: update,\n reset: reset\n };\n\n return instance;\n}\n\n\nSettings.__dashjs_factory_name = 'Settings';\nlet factory = FactoryMaker.getSingletonFactory(Settings);\nexport default factory;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport EventsBase from '../../core/events/EventsBase';\n\n/**\n * @class\n * @implements EventsBase\n */\nclass MetricsReportingEvents extends EventsBase {\n constructor () {\n super();\n\n this.METRICS_INITIALISATION_COMPLETE = 'internal_metricsReportingInitialized';\n this.BECAME_REPORTING_PLAYER = 'internal_becameReportingPlayer';\n\n /**\n * Triggered when CMCD data was generated for a HTTP request\n * @event MetricsReportingEvents#CMCD_DATA_GENERATED\n */\n this.CMCD_DATA_GENERATED = 'cmcdDataGenerated';\n }\n}\n\nlet metricsReportingEvents = new MetricsReportingEvents();\nexport default metricsReportingEvents;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\nclass EventsBase {\n extend (events, config) {\n if (!events) return;\n\n let override = config ? config.override : false;\n let publicOnly = config ? config.publicOnly : false;\n\n\n for (const evt in events) {\n if (!events.hasOwnProperty(evt) || (this[evt] && !override)) continue;\n if (publicOnly && events[evt].indexOf('public_') === -1) continue;\n this[evt] = events[evt];\n\n }\n }\n}\n\nexport default EventsBase;","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport FactoryMaker from '../../core/FactoryMaker';\nimport FragmentRequest from '../vo/FragmentRequest';\n\nconst FRAGMENT_MODEL_LOADING = 'loading';\nconst FRAGMENT_MODEL_EXECUTED = 'executed';\nconst FRAGMENT_MODEL_CANCELED = 'canceled';\nconst FRAGMENT_MODEL_FAILED = 'failed';\n\nfunction FragmentModel(config) {\n\n config = config || {};\n const eventBus = config.eventBus;\n const events = config.events;\n const dashMetrics = config.dashMetrics;\n const fragmentLoader = config.fragmentLoader;\n const debug = config.debug;\n const streamInfo = config.streamInfo;\n const type = config.type;\n\n let instance,\n logger,\n executedRequests,\n loadingRequests;\n\n function setup() {\n logger = debug.getLogger(instance);\n resetInitialSettings();\n eventBus.on(events.LOADING_COMPLETED, onLoadingCompleted, instance);\n eventBus.on(events.LOADING_DATA_PROGRESS, onLoadingInProgress, instance);\n eventBus.on(events.LOADING_ABANDONED, onLoadingAborted, instance);\n }\n\n function getStreamId() {\n return streamInfo.id;\n }\n\n function getType() {\n return type;\n }\n\n function isFragmentLoaded(request) {\n const isEqualComplete = function (req1, req2) {\n return ((req1.action === FragmentRequest.ACTION_COMPLETE) && (req1.action === req2.action));\n };\n\n const isEqualMedia = function (req1, req2) {\n return !isNaN(req1.index) && (req1.startTime === req2.startTime) && (req1.adaptationIndex === req2.adaptationIndex) && (req1.type === req2.type);\n };\n\n const isEqualInit = function (req1, req2) {\n return isNaN(req1.index) && isNaN(req2.index) && (req1.quality === req2.quality);\n };\n\n const check = function (requests) {\n let isLoaded = false;\n\n requests.some(req => {\n if (isEqualMedia(request, req) || isEqualInit(request, req) || isEqualComplete(request, req)) {\n isLoaded = true;\n return isLoaded;\n }\n });\n return isLoaded;\n };\n\n if (!request) {\n return false;\n }\n\n return check(executedRequests);\n }\n\n function isFragmentLoadedOrPending(request) {\n let isLoaded = false;\n let i = 0;\n let req;\n\n // First, check if the fragment has already been loaded\n isLoaded = isFragmentLoaded(request);\n\n // Then, check if the fragment is about to be loeaded\n if (!isLoaded) {\n for (i = 0; i < loadingRequests.length; i++) {\n req = loadingRequests[i];\n if ((request.url === req.url) && (request.startTime === req.startTime)) {\n isLoaded = true;\n }\n }\n }\n\n return isLoaded;\n }\n\n /**\n *\n * Gets an array of {@link FragmentRequest} objects\n *\n * @param {Object} filter The object with properties by which the method filters the requests to be returned.\n * the only mandatory property is state, which must be a value from\n * other properties should match the properties of {@link FragmentRequest}. E.g.:\n * getRequests({state: FragmentModel.FRAGMENT_MODEL_EXECUTED, quality: 0}) - returns\n * all the requests from executedRequests array where requests.quality = filter.quality\n *\n * @returns {Array}\n * @memberof FragmentModel#\n */\n function getRequests(filter) {\n const states = filter ? filter.state instanceof Array ? filter.state : [filter.state] : [];\n\n let filteredRequests = [];\n states.forEach(state => {\n const requests = getRequestsForState(state);\n filteredRequests = filteredRequests.concat(filterRequests(requests, filter));\n });\n\n return filteredRequests;\n }\n\n function getRequestThreshold(req) {\n return isNaN(req.duration) ? 0.25 : Math.min(req.duration / 8, 0.5);\n }\n\n function removeExecutedRequestsBeforeTime(time) {\n executedRequests = executedRequests.filter(req => {\n const threshold = getRequestThreshold(req);\n return isNaN(req.startTime) || (time !== undefined ? req.startTime >= time - threshold : false);\n });\n }\n\n function removeExecutedRequestsAfterTime(time) {\n executedRequests = executedRequests.filter(req => {\n return isNaN(req.startTime) || (time !== undefined ? req.startTime < time : false);\n });\n }\n\n function removeExecutedRequestsInTimeRange(start, end) {\n if (end <= start + 0.5) {\n return;\n }\n\n executedRequests = executedRequests.filter(req => {\n const threshold = getRequestThreshold(req);\n return (isNaN(req.startTime) || req.startTime >= (end - threshold)) ||\n (isNaN(req.duration) || (req.startTime + req.duration) <= (start + threshold));\n });\n }\n\n // Remove requests that are not \"represented\" by any of buffered ranges\n function syncExecutedRequestsWithBufferedRange(bufferedRanges, streamDuration) {\n if (!bufferedRanges || bufferedRanges.length === 0) {\n removeExecutedRequestsBeforeTime();\n return;\n }\n\n let start = 0;\n for (let i = 0, ln = bufferedRanges.length; i < ln; i++) {\n removeExecutedRequestsInTimeRange(start, bufferedRanges.start(i));\n start = bufferedRanges.end(i);\n }\n if (streamDuration > 0) {\n removeExecutedRequestsInTimeRange(start, streamDuration);\n }\n }\n\n function abortRequests() {\n logger.debug('abort requests');\n fragmentLoader.abort();\n loadingRequests = [];\n }\n\n function executeRequest(request) {\n switch (request.action) {\n case FragmentRequest.ACTION_DOWNLOAD:\n addSchedulingInfoMetrics(request, FRAGMENT_MODEL_LOADING);\n loadingRequests.push(request);\n loadCurrentFragment(request);\n break;\n default:\n logger.warn('Unknown request action.');\n }\n }\n\n function loadCurrentFragment(request) {\n eventBus.trigger(events.FRAGMENT_LOADING_STARTED,\n { request: request },\n { streamId: streamInfo.id, mediaType: type }\n );\n fragmentLoader.load(request);\n }\n\n function getRequestForTime(arr, time, threshold) {\n // loop through the executed requests and pick the one for which the playback interval matches the given time\n const lastIdx = arr.length - 1;\n for (let i = lastIdx; i >= 0; i--) {\n const req = arr[i];\n const start = req.startTime;\n const end = start + req.duration;\n threshold = !isNaN(threshold) ? threshold : getRequestThreshold(req);\n if ((!isNaN(start) && !isNaN(end) && ((time + threshold) >= start) && ((time - threshold) < end)) || (isNaN(start) && isNaN(time))) {\n return req;\n }\n }\n return null;\n }\n\n function filterRequests(arr, filter) {\n // for time use a specific filtration function\n if (filter.hasOwnProperty('time')) {\n return [getRequestForTime(arr, filter.time, filter.threshold)];\n }\n\n return arr.filter(request => {\n for (const prop in filter) {\n if (prop === 'state') continue;\n if (filter.hasOwnProperty(prop) && request[prop] != filter[prop]) return false;\n }\n\n return true;\n });\n }\n\n function getRequestsForState(state) {\n let requests;\n switch (state) {\n case FRAGMENT_MODEL_LOADING:\n requests = loadingRequests;\n break;\n case FRAGMENT_MODEL_EXECUTED:\n requests = executedRequests;\n break;\n default:\n requests = [];\n }\n return requests;\n }\n\n function addSchedulingInfoMetrics(request, state) {\n dashMetrics.addSchedulingInfo(request, state);\n dashMetrics.addRequestsQueue(request.mediaType, loadingRequests, executedRequests);\n }\n\n function onLoadingCompleted(e) {\n if (e.sender !== fragmentLoader) return;\n\n loadingRequests.splice(loadingRequests.indexOf(e.request), 1);\n\n if (e.response && !e.error) {\n executedRequests.push(e.request);\n }\n\n addSchedulingInfoMetrics(e.request, e.error ? FRAGMENT_MODEL_FAILED : FRAGMENT_MODEL_EXECUTED);\n\n eventBus.trigger(events.FRAGMENT_LOADING_COMPLETED,\n {\n request: e.request,\n response: e.response,\n error: e.error,\n sender: this\n },\n { streamId: streamInfo.id, mediaType: type }\n );\n }\n\n function onLoadingInProgress(e) {\n if (e.sender !== fragmentLoader) return;\n\n eventBus.trigger(events.FRAGMENT_LOADING_PROGRESS,\n {\n request: e.request,\n response: e.response,\n error: e.error,\n sender: this\n },\n { streamId: streamInfo.id, mediaType: type }\n );\n }\n\n function onLoadingAborted(e) {\n if (e.sender !== fragmentLoader) return;\n\n eventBus.trigger(events.FRAGMENT_LOADING_ABANDONED,\n { request: e.request },\n { streamId: streamInfo.id, mediaType: type }\n );\n }\n\n function resetInitialSettings() {\n executedRequests = [];\n loadingRequests = [];\n }\n\n function reset() {\n eventBus.off(events.LOADING_COMPLETED, onLoadingCompleted, this);\n eventBus.off(events.LOADING_DATA_PROGRESS, onLoadingInProgress, this);\n eventBus.off(events.LOADING_ABANDONED, onLoadingAborted, this);\n\n if (fragmentLoader) {\n fragmentLoader.reset();\n }\n resetInitialSettings();\n }\n\n function addExecutedRequest(request) {\n executedRequests.push(request);\n }\n\n instance = {\n getStreamId,\n getType,\n getRequests,\n isFragmentLoaded,\n isFragmentLoadedOrPending,\n removeExecutedRequestsBeforeTime,\n removeExecutedRequestsAfterTime,\n syncExecutedRequestsWithBufferedRange,\n abortRequests,\n executeRequest,\n reset,\n resetInitialSettings,\n addExecutedRequest\n };\n\n setup();\n return instance;\n}\n\nFragmentModel.__dashjs_factory_name = 'FragmentModel';\nconst factory = FactoryMaker.getClassFactory(FragmentModel);\nfactory.FRAGMENT_MODEL_LOADING = FRAGMENT_MODEL_LOADING;\nfactory.FRAGMENT_MODEL_EXECUTED = FRAGMENT_MODEL_EXECUTED;\nfactory.FRAGMENT_MODEL_CANCELED = FRAGMENT_MODEL_CANCELED;\nfactory.FRAGMENT_MODEL_FAILED = FRAGMENT_MODEL_FAILED;\nFactoryMaker.updateClassFactory(FragmentModel.__dashjs_factory_name, factory);\nexport default factory;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport FactoryMaker from '../../core/FactoryMaker';\nimport SchemeLoaderFactory from '../../streaming/net/SchemeLoaderFactory';\n\n/**\n * @class URLLoader\n * @description Call Offline Loader or Online Loader dependaing on URL\n * @param {Object} cfg - dependances\n * @ignore\n*/\nfunction URLLoader(cfg) {\n\n cfg = cfg || {};\n const context = this.context;\n\n let instance,\n schemeLoaderFactory,\n loader;\n\n schemeLoaderFactory = SchemeLoaderFactory(context).getInstance();\n\n function load(config) {\n if (!loader) {\n let loaderFactory = schemeLoaderFactory.getLoader(config && config.request ? config.request.url : null);\n loader = loaderFactory(context).create({\n errHandler: cfg.errHandler,\n mediaPlayerModel: cfg.mediaPlayerModel,\n requestModifier: cfg.requestModifier,\n dashMetrics: cfg.dashMetrics,\n boxParser: cfg.boxParser ? cfg.boxParser : null,\n constants: cfg.constants ? cfg.constants : null,\n dashConstants: cfg.dashConstants ? cfg.dashConstants : null,\n urlUtils: cfg.urlUtils ? cfg.urlUtils : null,\n requestTimeout: !isNaN(cfg.requestTimeout) ? cfg.requestTimeout : 0,\n errors: cfg.errors\n });\n }\n loader.load(config);\n }\n\n function abort() {\n if (loader) {\n loader.abort();\n }\n }\n instance = {\n load: load,\n abort: abort\n };\n\n return instance;\n\n}\nURLLoader.__dashjs_factory_name = 'URLLoader';\n\nconst factory = FactoryMaker.getClassFactory(URLLoader);\nexport default factory;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\nclass IsoBox {\n constructor(boxData) {\n this.offset = boxData._offset;\n this.type = boxData.type;\n this.size = boxData.size;\n this.boxes = [];\n if (boxData.boxes) {\n for (let i = 0; i < boxData.boxes.length; i++) {\n this.boxes.push(new IsoBox(boxData.boxes[i]));\n }\n }\n this.isComplete = true;\n\n switch (boxData.type) {\n case 'sidx':\n this.timescale = boxData.timescale;\n this.earliest_presentation_time = boxData.earliest_presentation_time;\n this.first_offset = boxData.first_offset;\n this.references = boxData.references;\n if (boxData.references) {\n this.references = [];\n for (let i = 0; i < boxData.references.length; i++) {\n let reference = {\n reference_type: boxData.references[i].reference_type,\n referenced_size: boxData.references[i].referenced_size,\n subsegment_duration: boxData.references[i].subsegment_duration\n };\n this.references.push(reference);\n }\n }\n break;\n case 'emsg':\n this.id = boxData.id;\n this.version = boxData.version === 1 ? 1 : 0;\n this.value = boxData.value;\n this.timescale = boxData.timescale;\n this.scheme_id_uri = boxData.scheme_id_uri;\n this.presentation_time_delta = boxData.version === 1 ? boxData.presentation_time : boxData.presentation_time_delta;\n this.event_duration = boxData.event_duration;\n this.message_data = boxData.message_data;\n break;\n case 'mdhd':\n this.timescale = boxData.timescale;\n break;\n case 'mfhd':\n this.sequence_number = boxData.sequence_number;\n break;\n case 'subs':\n this.entry_count = boxData.entry_count;\n this.entries = boxData.entries;\n break;\n case 'tfhd':\n this.base_data_offset = boxData.base_data_offset;\n this.sample_description_index = boxData.sample_description_index;\n this.default_sample_duration = boxData.default_sample_duration;\n this.default_sample_size = boxData.default_sample_size;\n this.default_sample_flags = boxData.default_sample_flags;\n this.flags = boxData.flags;\n break;\n case 'tfdt':\n this.version = boxData.version;\n this.baseMediaDecodeTime = boxData.baseMediaDecodeTime;\n this.flags = boxData.flags;\n break;\n case 'trun':\n this.sample_count = boxData.sample_count;\n this.first_sample_flags = boxData.first_sample_flags;\n this.data_offset = boxData.data_offset;\n this.flags = boxData.flags;\n this.samples = boxData.samples;\n if (boxData.samples) {\n this.samples = [];\n for (let i = 0, ln = boxData.samples.length; i < ln; i++) {\n let sample = {\n sample_size: boxData.samples[i].sample_size,\n sample_duration: boxData.samples[i].sample_duration,\n sample_composition_time_offset: boxData.samples[i].sample_composition_time_offset\n };\n this.samples.push(sample);\n }\n }\n break;\n }\n\n }\n\n getChildBox(type) {\n for (let i = 0; i < this.boxes.length; i++) {\n if (this.boxes[i].type === type) {\n return this.boxes[i];\n }\n }\n }\n\n getChildBoxes(type) {\n let boxes = [];\n for (let i = 0; i < this.boxes.length; i++) {\n if (this.boxes[i].type === type) {\n boxes.push(this.boxes[i]);\n }\n }\n return boxes;\n }\n\n}\n\nexport default IsoBox;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport IsoBox from '../vo/IsoBox';\nimport FactoryMaker from '../../core/FactoryMaker';\n\nfunction IsoFile() {\n\n let instance,\n parsedIsoFile;\n\n /**\n * @param {string} type\n * @returns {IsoBox|null}\n * @memberof IsoFile#\n */\n function getBox(type) {\n if (!type || !parsedIsoFile || !parsedIsoFile.boxes || (parsedIsoFile.boxes.length === 0) || typeof parsedIsoFile.fetch !== 'function') return null;\n\n return convertToDashIsoBox(parsedIsoFile.fetch(type));\n }\n\n /**\n * @param {string} type\n * @returns {Array|null} array of {@link IsoBox}\n * @memberof IsoFile#\n */\n function getBoxes(type) {\n let boxes = [];\n\n if (!type || !parsedIsoFile || typeof parsedIsoFile.fetchAll !== 'function') {\n return boxes;\n }\n\n let boxData = parsedIsoFile.fetchAll(type);\n let box;\n\n for (let i = 0, ln = boxData.length; i < ln; i++) {\n box = convertToDashIsoBox(boxData[i]);\n\n if (box) {\n boxes.push(box);\n }\n }\n\n return boxes;\n }\n\n /**\n * @param {string} value\n * @memberof IsoFile#\n */\n function setData(value) {\n parsedIsoFile = value;\n }\n\n /**\n * @returns {IsoBox|null}\n * @memberof IsoFile#\n */\n function getLastBox() {\n if (!parsedIsoFile || !parsedIsoFile.boxes || !parsedIsoFile.boxes.length) return null;\n\n let type = parsedIsoFile.boxes[parsedIsoFile.boxes.length - 1].type;\n let boxes = getBoxes(type);\n\n return boxes.length > 0 ? boxes[boxes.length - 1] : null;\n }\n\n function convertToDashIsoBox(boxData) {\n if (!boxData) return null;\n\n let box = new IsoBox(boxData);\n\n if (boxData.hasOwnProperty('_incomplete')) {\n box.isComplete = !boxData._incomplete;\n }\n\n return box;\n }\n\n instance = {\n getBox: getBox,\n getBoxes: getBoxes,\n setData: setData,\n getLastBox: getLastBox\n };\n\n return instance;\n}\nIsoFile.__dashjs_factory_name = 'IsoFile';\nexport default FactoryMaker.getClassFactory(IsoFile);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\nclass IsoBoxSearchInfo {\n constructor(lastCompletedOffset, found, size) {\n this.lastCompletedOffset = lastCompletedOffset;\n this.found = found;\n this.size = size;\n }\n}\n\nexport default IsoBoxSearchInfo;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport Debug from '../../core/Debug';\nimport IsoFile from './IsoFile';\nimport FactoryMaker from '../../core/FactoryMaker';\nimport ISOBoxer from 'codem-isoboxer';\n\nimport IsoBoxSearchInfo from '../vo/IsoBoxSearchInfo';\n\nfunction BoxParser(/*config*/) {\n\n let logger,\n instance;\n let context = this.context;\n\n function setup() {\n logger = Debug(context).getInstance().getLogger(instance);\n }\n\n /**\n * @param {ArrayBuffer} data\n * @returns {IsoFile|null}\n * @memberof BoxParser#\n */\n function parse(data) {\n if (!data) return null;\n\n if (data.fileStart === undefined) {\n data.fileStart = 0;\n }\n\n let parsedFile = ISOBoxer.parseBuffer(data);\n let dashIsoFile = IsoFile(context).create();\n\n dashIsoFile.setData(parsedFile);\n\n return dashIsoFile;\n }\n\n /**\n * From the list of type boxes to look for, returns the latest one that is fully completed (header + payload). This\n * method only looks into the list of top boxes and doesn't analyze nested boxes.\n * @param {string[]} types\n * @param {ArrayBuffer|uint8Array} buffer\n * @param {number} offset\n * @returns {IsoBoxSearchInfo}\n * @memberof BoxParser#\n */\n function findLastTopIsoBoxCompleted(types, buffer, offset) {\n if (offset === undefined) {\n offset = 0;\n }\n\n // 8 = size (uint32) + type (4 characters)\n if (!buffer || offset + 8 >= buffer.byteLength) {\n return new IsoBoxSearchInfo(0, false);\n }\n\n const data = (buffer instanceof ArrayBuffer) ? new Uint8Array(buffer) : buffer;\n let boxInfo;\n let lastCompletedOffset = 0;\n while (offset < data.byteLength) {\n const boxSize = parseUint32(data, offset);\n const boxType = parseIsoBoxType(data, offset + 4);\n\n if (boxSize === 0) {\n break;\n }\n\n if (offset + boxSize <= data.byteLength) {\n if (types.indexOf(boxType) >= 0) {\n boxInfo = new IsoBoxSearchInfo(offset, true, boxSize);\n } else {\n lastCompletedOffset = offset + boxSize;\n }\n }\n\n offset += boxSize;\n }\n\n if (!boxInfo) {\n return new IsoBoxSearchInfo(lastCompletedOffset, false);\n }\n\n return boxInfo;\n }\n\n function getSamplesInfo(ab) {\n if (!ab || ab.byteLength === 0) {\n return {sampleList: [], lastSequenceNumber: NaN, totalDuration: NaN, numSequences: NaN};\n }\n let isoFile = parse(ab);\n // zero or more moofs\n let moofBoxes = isoFile.getBoxes('moof');\n // exactly one mfhd per moof\n let mfhdBoxes = isoFile.getBoxes('mfhd');\n\n let sampleDuration,\n sampleCompositionTimeOffset,\n sampleCount,\n sampleSize,\n sampleDts,\n sampleList,\n sample,\n i, j, k, l, m, n,\n dataOffset,\n lastSequenceNumber,\n numSequences,\n totalDuration;\n\n numSequences = isoFile.getBoxes('moof').length;\n lastSequenceNumber = mfhdBoxes[mfhdBoxes.length - 1].sequence_number;\n sampleCount = 0;\n\n sampleList = [];\n let subsIndex = -1;\n let nextSubsSample = -1;\n for (l = 0; l < moofBoxes.length; l++) {\n let moofBox = moofBoxes[l];\n // zero or more trafs per moof\n let trafBoxes = moofBox.getChildBoxes('traf');\n for (j = 0; j < trafBoxes.length; j++) {\n let trafBox = trafBoxes[j];\n // exactly one tfhd per traf\n let tfhdBox = trafBox.getChildBox('tfhd');\n // zero or one tfdt per traf\n let tfdtBox = trafBox.getChildBox('tfdt');\n sampleDts = tfdtBox.baseMediaDecodeTime;\n // zero or more truns per traf\n let trunBoxes = trafBox.getChildBoxes('trun');\n // zero or more subs per traf\n let subsBoxes = trafBox.getChildBoxes('subs');\n for (k = 0; k < trunBoxes.length; k++) {\n let trunBox = trunBoxes[k];\n sampleCount = trunBox.sample_count;\n dataOffset = (tfhdBox.base_data_offset || 0) + (trunBox.data_offset || 0);\n\n for (i = 0; i < sampleCount; i++) {\n sample = trunBox.samples[i];\n sampleDuration = (sample.sample_duration !== undefined) ? sample.sample_duration : tfhdBox.default_sample_duration;\n sampleSize = (sample.sample_size !== undefined) ? sample.sample_size : tfhdBox.default_sample_size;\n sampleCompositionTimeOffset = (sample.sample_composition_time_offset !== undefined) ? sample.sample_composition_time_offset : 0;\n let sampleData = {\n 'dts': sampleDts,\n 'cts': (sampleDts + sampleCompositionTimeOffset),\n 'duration': sampleDuration,\n 'offset': moofBox.offset + dataOffset,\n 'size': sampleSize,\n 'subSizes': [sampleSize]\n };\n if (subsBoxes) {\n for (m = 0; m < subsBoxes.length; m++) {\n let subsBox = subsBoxes[m];\n if (subsIndex < (subsBox.entry_count - 1) && i > nextSubsSample) {\n subsIndex++;\n nextSubsSample += subsBox.entries[subsIndex].sample_delta;\n }\n if (i == nextSubsSample) {\n sampleData.subSizes = [];\n let entry = subsBox.entries[subsIndex];\n for (n = 0; n < entry.subsample_count; n++) {\n sampleData.subSizes.push(entry.subsamples[n].subsample_size);\n }\n }\n }\n }\n sampleList.push(sampleData);\n dataOffset += sampleSize;\n sampleDts += sampleDuration;\n }\n }\n totalDuration = sampleDts - tfdtBox.baseMediaDecodeTime;\n }\n }\n return {sampleList: sampleList, lastSequenceNumber: lastSequenceNumber, totalDuration: totalDuration, numSequences: numSequences};\n }\n\n function getMediaTimescaleFromMoov(ab) {\n let isoFile = parse(ab);\n let mdhdBox = isoFile ? isoFile.getBox('mdhd') : undefined;\n\n return mdhdBox ? mdhdBox.timescale : NaN;\n }\n\n function parseUint32(data, offset) {\n return data[offset + 3] >>> 0 |\n (data[offset + 2] << 8) >>> 0 |\n (data[offset + 1] << 16) >>> 0 |\n (data[offset] << 24) >>> 0;\n }\n\n function parseIsoBoxType(data, offset) {\n return String.fromCharCode(data[offset++]) +\n String.fromCharCode(data[offset++]) +\n String.fromCharCode(data[offset++]) +\n String.fromCharCode(data[offset]);\n }\n\n function findInitRange(data) {\n let initRange = null;\n let start,\n end;\n\n const isoFile = parse(data);\n\n if (!isoFile) {\n return initRange;\n }\n\n const ftyp = isoFile.getBox('ftyp');\n const moov = isoFile.getBox('moov');\n\n logger.debug('Searching for initialization.');\n\n if (moov && moov.isComplete) {\n start = ftyp ? ftyp.offset : moov.offset;\n end = moov.offset + moov.size - 1;\n initRange = start + '-' + end;\n\n logger.debug('Found the initialization. Range: ' + initRange);\n }\n\n return initRange;\n }\n\n /**\n * Real-time parsing (whenever data is loaded in the buffer payload) of the payload to capture the moof of a chunk\n * @param {array} types\n * @param {ArrayBuffer} buffer\n * @param {number} offset\n * @return {IsoBoxSearchInfo}\n */\n function parsePayload(types, buffer, offset) {\n if (offset === undefined) {\n offset = 0;\n }\n\n if (!buffer || offset + 8 >= buffer.byteLength) {\n return new IsoBoxSearchInfo(0, false);\n }\n\n const data = (buffer instanceof ArrayBuffer) ? new Uint8Array(buffer) : buffer;\n let boxInfo;\n let lastCompletedOffset = 0;\n while (offset < data.byteLength) {\n const boxSize = parseUint32(data, offset);\n const boxType = parseIsoBoxType(data, offset + 4);\n\n if (boxSize === 0) {\n break;\n }\n\n if (offset + boxSize <= data.byteLength) {\n if (types.indexOf(boxType) >= 0) {\n boxInfo = new IsoBoxSearchInfo(offset, true, boxSize, boxType);\n } else {\n lastCompletedOffset = offset + boxSize;\n }\n }\n\n offset += boxSize;\n }\n\n if (!boxInfo) {\n return new IsoBoxSearchInfo(lastCompletedOffset, false);\n }\n\n return boxInfo;\n }\n\n instance = {\n parse,\n findLastTopIsoBoxCompleted,\n getMediaTimescaleFromMoov,\n getSamplesInfo,\n findInitRange,\n parsePayload\n };\n\n setup();\n\n return instance;\n}\nBoxParser.__dashjs_factory_name = 'BoxParser';\nexport default FactoryMaker.getSingletonFactory(BoxParser);\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","/*! codem-isoboxer v0.3.6 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */\nvar ISOBoxer = {};\n\nISOBoxer.parseBuffer = function(arrayBuffer) {\n return new ISOFile(arrayBuffer).parse();\n};\n\nISOBoxer.addBoxProcessor = function(type, parser) {\n if (typeof type !== 'string' || typeof parser !== 'function') {\n return;\n }\n ISOBox.prototype._boxProcessors[type] = parser;\n};\n\nISOBoxer.createFile = function() {\n return new ISOFile();\n};\n\n// See ISOBoxer.append() for 'pos' parameter syntax\nISOBoxer.createBox = function(type, parent, pos) {\n var newBox = ISOBox.create(type);\n if (parent) {\n parent.append(newBox, pos);\n }\n return newBox;\n};\n\n// See ISOBoxer.append() for 'pos' parameter syntax\nISOBoxer.createFullBox = function(type, parent, pos) {\n var newBox = ISOBoxer.createBox(type, parent, pos);\n newBox.version = 0;\n newBox.flags = 0;\n return newBox;\n};\n\nISOBoxer.Utils = {};\nISOBoxer.Utils.dataViewToString = function(dataView, encoding) {\n var impliedEncoding = encoding || 'utf-8';\n if (typeof TextDecoder !== 'undefined') {\n return new TextDecoder(impliedEncoding).decode(dataView);\n }\n var a = [];\n var i = 0;\n\n if (impliedEncoding === 'utf-8') {\n /* The following algorithm is essentially a rewrite of the UTF8.decode at\n http://bannister.us/weblog/2007/simple-base64-encodedecode-javascript/\n */\n\n while (i < dataView.byteLength) {\n var c = dataView.getUint8(i++);\n if (c < 0x80) {\n // 1-byte character (7 bits)\n } else if (c < 0xe0) {\n // 2-byte character (11 bits)\n c = (c & 0x1f) << 6;\n c |= (dataView.getUint8(i++) & 0x3f);\n } else if (c < 0xf0) {\n // 3-byte character (16 bits)\n c = (c & 0xf) << 12;\n c |= (dataView.getUint8(i++) & 0x3f) << 6;\n c |= (dataView.getUint8(i++) & 0x3f);\n } else {\n // 4-byte character (21 bits)\n c = (c & 0x7) << 18;\n c |= (dataView.getUint8(i++) & 0x3f) << 12;\n c |= (dataView.getUint8(i++) & 0x3f) << 6;\n c |= (dataView.getUint8(i++) & 0x3f);\n }\n a.push(String.fromCharCode(c));\n }\n } else { // Just map byte-by-byte (probably wrong)\n while (i < dataView.byteLength) {\n a.push(String.fromCharCode(dataView.getUint8(i++)));\n }\n }\n return a.join('');\n};\n\nISOBoxer.Utils.utf8ToByteArray = function(string) {\n // Only UTF-8 encoding is supported by TextEncoder\n var u, i;\n if (typeof TextEncoder !== 'undefined') {\n u = new TextEncoder().encode(string);\n } else {\n u = [];\n for (i = 0; i < string.length; ++i) {\n var c = string.charCodeAt(i);\n if (c < 0x80) {\n u.push(c);\n } else if (c < 0x800) {\n u.push(0xC0 | (c >> 6));\n u.push(0x80 | (63 & c));\n } else if (c < 0x10000) {\n u.push(0xE0 | (c >> 12));\n u.push(0x80 | (63 & (c >> 6)));\n u.push(0x80 | (63 & c));\n } else {\n u.push(0xF0 | (c >> 18));\n u.push(0x80 | (63 & (c >> 12)));\n u.push(0x80 | (63 & (c >> 6)));\n u.push(0x80 | (63 & c));\n }\n }\n }\n return u;\n};\n\n// Method to append a box in the list of child boxes\n// The 'pos' parameter can be either:\n// - (number) a position index at which to insert the new box\n// - (string) the type of the box after which to insert the new box\n// - (object) the box after which to insert the new box\nISOBoxer.Utils.appendBox = function(parent, box, pos) {\n box._offset = parent._cursor.offset;\n box._root = (parent._root ? parent._root : parent);\n box._raw = parent._raw;\n box._parent = parent;\n\n if (pos === -1) {\n // The new box is a sub-box of the parent but not added in boxes array,\n // for example when the new box is set as an entry (see dref and stsd for example)\n return;\n }\n\n if (pos === undefined || pos === null) {\n parent.boxes.push(box);\n return;\n }\n\n var index = -1,\n type;\n\n if (typeof pos === \"number\") {\n index = pos;\n } else {\n if (typeof pos === \"string\") {\n type = pos;\n } else if (typeof pos === \"object\" && pos.type) {\n type = pos.type;\n } else {\n parent.boxes.push(box);\n return;\n }\n\n for (var i = 0; i < parent.boxes.length; i++) {\n if (type === parent.boxes[i].type) {\n index = i + 1;\n break;\n }\n }\n }\n parent.boxes.splice(index, 0, box);\n};\n\nif (typeof exports !== 'undefined') {\n exports.parseBuffer = ISOBoxer.parseBuffer;\n exports.addBoxProcessor = ISOBoxer.addBoxProcessor;\n exports.createFile = ISOBoxer.createFile;\n exports.createBox = ISOBoxer.createBox;\n exports.createFullBox = ISOBoxer.createFullBox;\n exports.Utils = ISOBoxer.Utils;\n}\n\nISOBoxer.Cursor = function(initialOffset) {\n this.offset = (typeof initialOffset == 'undefined' ? 0 : initialOffset);\n};\n\nvar ISOFile = function(arrayBuffer) {\n this._cursor = new ISOBoxer.Cursor();\n this.boxes = [];\n if (arrayBuffer) {\n this._raw = new DataView(arrayBuffer);\n }\n};\n\nISOFile.prototype.fetch = function(type) {\n var result = this.fetchAll(type, true);\n return (result.length ? result[0] : null);\n};\n\nISOFile.prototype.fetchAll = function(type, returnEarly) {\n var result = [];\n ISOFile._sweep.call(this, type, result, returnEarly);\n return result;\n};\n\nISOFile.prototype.parse = function() {\n this._cursor.offset = 0;\n this.boxes = [];\n while (this._cursor.offset < this._raw.byteLength) {\n var box = ISOBox.parse(this);\n\n // Box could not be parsed\n if (typeof box.type === 'undefined') break;\n\n this.boxes.push(box);\n }\n return this;\n};\n\nISOFile._sweep = function(type, result, returnEarly) {\n if (this.type && this.type == type) result.push(this);\n for (var box in this.boxes) {\n if (result.length && returnEarly) return;\n ISOFile._sweep.call(this.boxes[box], type, result, returnEarly);\n }\n};\n\nISOFile.prototype.write = function() {\n\n var length = 0,\n i;\n\n for (i = 0; i < this.boxes.length; i++) {\n length += this.boxes[i].getLength(false);\n }\n\n var bytes = new Uint8Array(length);\n this._rawo = new DataView(bytes.buffer);\n this.bytes = bytes;\n this._cursor.offset = 0;\n\n for (i = 0; i < this.boxes.length; i++) {\n this.boxes[i].write();\n }\n\n return bytes.buffer;\n};\n\nISOFile.prototype.append = function(box, pos) {\n ISOBoxer.Utils.appendBox(this, box, pos);\n};\nvar ISOBox = function() {\n this._cursor = new ISOBoxer.Cursor();\n};\n\nISOBox.parse = function(parent) {\n var newBox = new ISOBox();\n newBox._offset = parent._cursor.offset;\n newBox._root = (parent._root ? parent._root : parent);\n newBox._raw = parent._raw;\n newBox._parent = parent;\n newBox._parseBox();\n parent._cursor.offset = newBox._raw.byteOffset + newBox._raw.byteLength;\n return newBox;\n};\n\nISOBox.create = function(type) {\n var newBox = new ISOBox();\n newBox.type = type;\n newBox.boxes = [];\n return newBox;\n};\n\nISOBox.prototype._boxContainers = ['dinf', 'edts', 'mdia', 'meco', 'mfra', 'minf', 'moof', 'moov', 'mvex', 'stbl', 'strk', 'traf', 'trak', 'tref', 'udta', 'vttc', 'sinf', 'schi', 'encv', 'enca'];\n\nISOBox.prototype._boxProcessors = {};\n\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Generic read/write functions\n\nISOBox.prototype._procField = function (name, type, size) {\n if (this._parsing) {\n this[name] = this._readField(type, size);\n }\n else {\n this._writeField(type, size, this[name]);\n }\n};\n\nISOBox.prototype._procFieldArray = function (name, length, type, size) {\n var i;\n if (this._parsing) {\n this[name] = [];\n for (i = 0; i < length; i++) {\n this[name][i] = this._readField(type, size);\n }\n }\n else {\n for (i = 0; i < this[name].length; i++) {\n this._writeField(type, size, this[name][i]);\n }\n }\n};\n\nISOBox.prototype._procFullBox = function() {\n this._procField('version', 'uint', 8);\n this._procField('flags', 'uint', 24);\n};\n\nISOBox.prototype._procEntries = function(name, length, fn) {\n var i;\n if (this._parsing) {\n this[name] = [];\n for (i = 0; i < length; i++) {\n this[name].push({});\n fn.call(this, this[name][i]);\n }\n }\n else {\n for (i = 0; i < length; i++) {\n fn.call(this, this[name][i]);\n }\n }\n};\n\nISOBox.prototype._procSubEntries = function(entry, name, length, fn) {\n var i;\n if (this._parsing) {\n entry[name] = [];\n for (i = 0; i < length; i++) {\n entry[name].push({});\n fn.call(this, entry[name][i]);\n }\n }\n else {\n for (i = 0; i < length; i++) {\n fn.call(this, entry[name][i]);\n }\n }\n};\n\nISOBox.prototype._procEntryField = function (entry, name, type, size) {\n if (this._parsing) {\n entry[name] = this._readField(type, size);\n }\n else {\n this._writeField(type, size, entry[name]);\n }\n};\n\nISOBox.prototype._procSubBoxes = function(name, length) {\n var i;\n if (this._parsing) {\n this[name] = [];\n for (i = 0; i < length; i++) {\n this[name].push(ISOBox.parse(this));\n }\n }\n else {\n for (i = 0; i < length; i++) {\n if (this._rawo) {\n this[name][i].write();\n } else {\n this.size += this[name][i].getLength();\n }\n }\n }\n};\n\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Read/parse functions\n\nISOBox.prototype._readField = function(type, size) {\n switch (type) {\n case 'uint':\n return this._readUint(size);\n case 'int':\n return this._readInt(size);\n case 'template':\n return this._readTemplate(size);\n case 'string':\n return (size === -1) ? this._readTerminatedString() : this._readString(size);\n case 'data':\n return this._readData(size);\n case 'utf8':\n return this._readUTF8String();\n default:\n return -1;\n }\n};\n\nISOBox.prototype._readInt = function(size) {\n var result = null,\n offset = this._cursor.offset - this._raw.byteOffset;\n switch(size) {\n case 8:\n result = this._raw.getInt8(offset);\n break;\n case 16:\n result = this._raw.getInt16(offset);\n break;\n case 32:\n result = this._raw.getInt32(offset);\n break;\n case 64:\n // Warning: JavaScript cannot handle 64-bit integers natively.\n // This will give unexpected results for integers >= 2^53\n var s1 = this._raw.getInt32(offset);\n var s2 = this._raw.getInt32(offset + 4);\n result = (s1 * Math.pow(2,32)) + s2;\n break;\n }\n this._cursor.offset += (size >> 3);\n return result;\n};\n\nISOBox.prototype._readUint = function(size) {\n var result = null,\n offset = this._cursor.offset - this._raw.byteOffset,\n s1, s2;\n switch(size) {\n case 8:\n result = this._raw.getUint8(offset);\n break;\n case 16:\n result = this._raw.getUint16(offset);\n break;\n case 24:\n s1 = this._raw.getUint16(offset);\n s2 = this._raw.getUint8(offset + 2);\n result = (s1 << 8) + s2;\n break;\n case 32:\n result = this._raw.getUint32(offset);\n break;\n case 64:\n // Warning: JavaScript cannot handle 64-bit integers natively.\n // This will give unexpected results for integers >= 2^53\n s1 = this._raw.getUint32(offset);\n s2 = this._raw.getUint32(offset + 4);\n result = (s1 * Math.pow(2,32)) + s2;\n break;\n }\n this._cursor.offset += (size >> 3);\n return result;\n};\n\nISOBox.prototype._readString = function(length) {\n var str = '';\n for (var c = 0; c < length; c++) {\n var char = this._readUint(8);\n str += String.fromCharCode(char);\n }\n return str;\n};\n\nISOBox.prototype._readTemplate = function(size) {\n var pre = this._readUint(size / 2);\n var post = this._readUint(size / 2);\n return pre + (post / Math.pow(2, size / 2));\n};\n\nISOBox.prototype._readTerminatedString = function() {\n var str = '';\n while (this._cursor.offset - this._offset < this._raw.byteLength) {\n var char = this._readUint(8);\n if (char === 0) break;\n str += String.fromCharCode(char);\n }\n return str;\n};\n\nISOBox.prototype._readData = function(size) {\n var length = (size > 0) ? size : (this._raw.byteLength - (this._cursor.offset - this._offset));\n if (length > 0) {\n var data = new Uint8Array(this._raw.buffer, this._cursor.offset, length);\n\n this._cursor.offset += length;\n return data;\n }\n else {\n return null;\n }\n};\n\nISOBox.prototype._readUTF8String = function() {\n var length = this._raw.byteLength - (this._cursor.offset - this._offset);\n var data = null;\n if (length > 0) {\n data = new DataView(this._raw.buffer, this._cursor.offset, length);\n this._cursor.offset += length;\n }\n \n return data ? ISOBoxer.Utils.dataViewToString(data) : data;\n};\n\nISOBox.prototype._parseBox = function() {\n this._parsing = true;\n this._cursor.offset = this._offset;\n\n // return immediately if there are not enough bytes to read the header\n if (this._offset + 8 > this._raw.buffer.byteLength) {\n this._root._incomplete = true;\n return;\n }\n\n this._procField('size', 'uint', 32);\n this._procField('type', 'string', 4);\n\n if (this.size === 1) { this._procField('largesize', 'uint', 64); }\n if (this.type === 'uuid') { this._procFieldArray('usertype', 16, 'uint', 8); }\n\n switch(this.size) {\n case 0:\n this._raw = new DataView(this._raw.buffer, this._offset, (this._raw.byteLength - this._cursor.offset + 8));\n break;\n case 1:\n if (this._offset + this.size > this._raw.buffer.byteLength) {\n this._incomplete = true;\n this._root._incomplete = true;\n } else {\n this._raw = new DataView(this._raw.buffer, this._offset, this.largesize);\n }\n break;\n default:\n if (this._offset + this.size > this._raw.buffer.byteLength) {\n this._incomplete = true;\n this._root._incomplete = true;\n } else {\n this._raw = new DataView(this._raw.buffer, this._offset, this.size);\n }\n }\n\n // additional parsing\n if (!this._incomplete) {\n if (this._boxProcessors[this.type]) {\n this._boxProcessors[this.type].call(this);\n }\n if (this._boxContainers.indexOf(this.type) !== -1) {\n this._parseContainerBox();\n } else{\n // Unknown box => read and store box content\n this._data = this._readData();\n }\n }\n};\n\nISOBox.prototype._parseFullBox = function() {\n this.version = this._readUint(8);\n this.flags = this._readUint(24);\n};\n\nISOBox.prototype._parseContainerBox = function() {\n this.boxes = [];\n while (this._cursor.offset - this._raw.byteOffset < this._raw.byteLength) {\n this.boxes.push(ISOBox.parse(this));\n }\n};\n\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Write functions\n\nISOBox.prototype.append = function(box, pos) {\n ISOBoxer.Utils.appendBox(this, box, pos);\n};\n\nISOBox.prototype.getLength = function() {\n this._parsing = false;\n this._rawo = null;\n\n this.size = 0;\n this._procField('size', 'uint', 32);\n this._procField('type', 'string', 4);\n\n if (this.size === 1) { this._procField('largesize', 'uint', 64); }\n if (this.type === 'uuid') { this._procFieldArray('usertype', 16, 'uint', 8); }\n\n if (this._boxProcessors[this.type]) {\n this._boxProcessors[this.type].call(this);\n }\n\n if (this._boxContainers.indexOf(this.type) !== -1) {\n for (var i = 0; i < this.boxes.length; i++) {\n this.size += this.boxes[i].getLength();\n }\n } \n\n if (this._data) {\n this._writeData(this._data);\n }\n\n return this.size;\n};\n\nISOBox.prototype.write = function() {\n this._parsing = false;\n this._cursor.offset = this._parent._cursor.offset;\n\n switch(this.size) {\n case 0:\n this._rawo = new DataView(this._parent._rawo.buffer, this._cursor.offset, (this.parent._rawo.byteLength - this._cursor.offset));\n break;\n case 1:\n this._rawo = new DataView(this._parent._rawo.buffer, this._cursor.offset, this.largesize);\n break;\n default:\n this._rawo = new DataView(this._parent._rawo.buffer, this._cursor.offset, this.size);\n }\n\n this._procField('size', 'uint', 32);\n this._procField('type', 'string', 4);\n\n if (this.size === 1) { this._procField('largesize', 'uint', 64); }\n if (this.type === 'uuid') { this._procFieldArray('usertype', 16, 'uint', 8); }\n\n if (this._boxProcessors[this.type]) {\n this._boxProcessors[this.type].call(this);\n }\n\n if (this._boxContainers.indexOf(this.type) !== -1) {\n for (var i = 0; i < this.boxes.length; i++) {\n this.boxes[i].write();\n }\n } \n\n if (this._data) {\n this._writeData(this._data);\n }\n\n this._parent._cursor.offset += this.size;\n\n return this.size;\n};\n\nISOBox.prototype._writeInt = function(size, value) {\n if (this._rawo) {\n var offset = this._cursor.offset - this._rawo.byteOffset;\n switch(size) {\n case 8:\n this._rawo.setInt8(offset, value);\n break;\n case 16:\n this._rawo.setInt16(offset, value);\n break;\n case 32:\n this._rawo.setInt32(offset, value);\n break;\n case 64:\n // Warning: JavaScript cannot handle 64-bit integers natively.\n // This will give unexpected results for integers >= 2^53\n var s1 = Math.floor(value / Math.pow(2,32));\n var s2 = value - (s1 * Math.pow(2,32));\n this._rawo.setUint32(offset, s1);\n this._rawo.setUint32(offset + 4, s2);\n break;\n }\n this._cursor.offset += (size >> 3);\n } else {\n this.size += (size >> 3);\n }\n};\n\nISOBox.prototype._writeUint = function(size, value) {\n\n if (this._rawo) {\n var offset = this._cursor.offset - this._rawo.byteOffset,\n s1, s2;\n switch(size) {\n case 8:\n this._rawo.setUint8(offset, value);\n break;\n case 16:\n this._rawo.setUint16(offset, value);\n break;\n case 24:\n s1 = (value & 0xFFFF00) >> 8;\n s2 = (value & 0x0000FF);\n this._rawo.setUint16(offset, s1);\n this._rawo.setUint8(offset + 2, s2);\n break;\n case 32:\n this._rawo.setUint32(offset, value);\n break;\n case 64:\n // Warning: JavaScript cannot handle 64-bit integers natively.\n // This will give unexpected results for integers >= 2^53\n s1 = Math.floor(value / Math.pow(2,32));\n s2 = value - (s1 * Math.pow(2,32));\n this._rawo.setUint32(offset, s1);\n this._rawo.setUint32(offset + 4, s2);\n break;\n }\n this._cursor.offset += (size >> 3);\n } else {\n this.size += (size >> 3);\n }\n};\n\nISOBox.prototype._writeString = function(size, str) {\n for (var c = 0; c < size; c++) {\n this._writeUint(8, str.charCodeAt(c));\n }\n};\n\nISOBox.prototype._writeTerminatedString = function(str) {\n if (str.length === 0) {\n return;\n }\n for (var c = 0; c < str.length; c++) {\n this._writeUint(8, str.charCodeAt(c));\n }\n this._writeUint(8, 0);\n};\n\nISOBox.prototype._writeTemplate = function(size, value) {\n var pre = Math.floor(value);\n var post = (value - pre) * Math.pow(2, size / 2);\n this._writeUint(size / 2, pre);\n this._writeUint(size / 2, post);\n};\n\nISOBox.prototype._writeData = function(data) {\n var i;\n //data to copy\n if (data) {\n if (this._rawo) {\n //Array and Uint8Array has also to be managed\n if (data instanceof Array) {\n var offset = this._cursor.offset - this._rawo.byteOffset;\n for (var i = 0; i < data.length; i++) {\n this._rawo.setInt8(offset + i, data[i]);\n }\n this._cursor.offset += data.length;\n } \n\n if (data instanceof Uint8Array) {\n this._root.bytes.set(data, this._cursor.offset);\n this._cursor.offset += data.length;\n }\n\n } else {\n //nothing to copy only size to compute\n this.size += data.length;\n }\n }\n};\n\nISOBox.prototype._writeUTF8String = function(string) {\n var u = ISOBoxer.Utils.utf8ToByteArray(string);\n if (this._rawo) {\n var dataView = new DataView(this._rawo.buffer, this._cursor.offset, u.length);\n for (var i = 0; i < u.length; i++) {\n dataView.setUint8(i, u[i]);\n }\n } else {\n this.size += u.length;\n }\n};\n\nISOBox.prototype._writeField = function(type, size, value) {\n switch (type) {\n case 'uint':\n this._writeUint(size, value);\n break;\n case 'int':\n this._writeInt(size, value);\n break;\n case 'template':\n this._writeTemplate(size, value);\n break;\n case 'string':\n if (size == -1) {\n this._writeTerminatedString(value);\n } else {\n this._writeString(size, value);\n }\n break;\n case 'data':\n this._writeData(value);\n break;\n case 'utf8':\n this._writeUTF8String(value);\n break;\n default:\n break;\n }\n};\n\n// ISO/IEC 14496-15:2014 - avc1 box\nISOBox.prototype._boxProcessors['avc1'] = ISOBox.prototype._boxProcessors['encv'] = function() {\n // SampleEntry fields\n this._procFieldArray('reserved1', 6, 'uint', 8);\n this._procField('data_reference_index', 'uint', 16);\n // VisualSampleEntry fields\n this._procField('pre_defined1', 'uint', 16);\n this._procField('reserved2', 'uint', 16);\n this._procFieldArray('pre_defined2', 3, 'uint', 32);\n this._procField('width', 'uint', 16);\n this._procField('height', 'uint', 16);\n this._procField('horizresolution', 'template', 32);\n this._procField('vertresolution', 'template', 32);\n this._procField('reserved3', 'uint', 32);\n this._procField('frame_count', 'uint', 16);\n this._procFieldArray('compressorname', 32,'uint', 8);\n this._procField('depth', 'uint', 16);\n this._procField('pre_defined3', 'int', 16);\n // AVCSampleEntry fields\n this._procField('config', 'data', -1);\n};\n\n// ISO/IEC 14496-12:2012 - 8.7.2 Data Reference Box\nISOBox.prototype._boxProcessors['dref'] = function() {\n this._procFullBox();\n this._procField('entry_count', 'uint', 32);\n this._procSubBoxes('entries', this.entry_count);\n};\n\n// ISO/IEC 14496-12:2012 - 8.6.6 Edit List Box\nISOBox.prototype._boxProcessors['elst'] = function() {\n this._procFullBox();\n this._procField('entry_count', 'uint', 32);\n this._procEntries('entries', this.entry_count, function(entry) {\n this._procEntryField(entry, 'segment_duration', 'uint', (this.version === 1) ? 64 : 32);\n this._procEntryField(entry, 'media_time', 'int', (this.version === 1) ? 64 : 32);\n this._procEntryField(entry, 'media_rate_integer', 'int', 16);\n this._procEntryField(entry, 'media_rate_fraction', 'int', 16);\n });\n};\n\n// ISO/IEC 23009-1:2014 - 5.10.3.3 Event Message Box\nISOBox.prototype._boxProcessors['emsg'] = function() {\n this._procFullBox();\n if (this.version == 1) {\n this._procField('timescale', 'uint', 32);\n this._procField('presentation_time', 'uint', 64);\n this._procField('event_duration', 'uint', 32);\n this._procField('id', 'uint', 32);\n this._procField('scheme_id_uri', 'string', -1);\n this._procField('value', 'string', -1);\n } else {\n this._procField('scheme_id_uri', 'string', -1);\n this._procField('value', 'string', -1);\n this._procField('timescale', 'uint', 32);\n this._procField('presentation_time_delta', 'uint', 32);\n this._procField('event_duration', 'uint', 32);\n this._procField('id', 'uint', 32);\n }\n this._procField('message_data', 'data', -1);\n};\n// ISO/IEC 14496-12:2012 - 8.1.2 Free Space Box\nISOBox.prototype._boxProcessors['free'] = ISOBox.prototype._boxProcessors['skip'] = function() {\n this._procField('data', 'data', -1);\n};\n\n// ISO/IEC 14496-12:2012 - 8.12.2 Original Format Box\nISOBox.prototype._boxProcessors['frma'] = function() {\n this._procField('data_format', 'uint', 32);\n};\n// ISO/IEC 14496-12:2012 - 4.3 File Type Box / 8.16.2 Segment Type Box\nISOBox.prototype._boxProcessors['ftyp'] =\nISOBox.prototype._boxProcessors['styp'] = function() {\n this._procField('major_brand', 'string', 4);\n this._procField('minor_version', 'uint', 32);\n var nbCompatibleBrands = -1;\n if (this._parsing) {\n nbCompatibleBrands = (this._raw.byteLength - (this._cursor.offset - this._raw.byteOffset)) / 4;\n }\n this._procFieldArray('compatible_brands', nbCompatibleBrands, 'string', 4);\n};\n\n// ISO/IEC 14496-12:2012 - 8.4.3 Handler Reference Box\nISOBox.prototype._boxProcessors['hdlr'] = function() {\n this._procFullBox();\n this._procField('pre_defined', 'uint', 32);\n this._procField('handler_type', 'string', 4);\n this._procFieldArray('reserved', 3, 'uint', 32);\n this._procField('name', 'string', -1);\n};\n\n// ISO/IEC 14496-12:2012 - 8.1.1 Media Data Box\nISOBox.prototype._boxProcessors['mdat'] = function() {\n this._procField('data', 'data', -1);\n};\n\n// ISO/IEC 14496-12:2012 - 8.4.2 Media Header Box\nISOBox.prototype._boxProcessors['mdhd'] = function() {\n this._procFullBox();\n this._procField('creation_time', 'uint', (this.version == 1) ? 64 : 32);\n this._procField('modification_time', 'uint', (this.version == 1) ? 64 : 32);\n this._procField('timescale', 'uint', 32);\n this._procField('duration', 'uint', (this.version == 1) ? 64 : 32);\n if (!this._parsing && typeof this.language === 'string') {\n // In case of writing and language has been set as a string, then convert it into char codes array\n this.language = ((this.language.charCodeAt(0) - 0x60) << 10) |\n ((this.language.charCodeAt(1) - 0x60) << 5) |\n ((this.language.charCodeAt(2) - 0x60));\n }\n this._procField('language', 'uint', 16);\n if (this._parsing) {\n this.language = String.fromCharCode(((this.language >> 10) & 0x1F) + 0x60,\n ((this.language >> 5) & 0x1F) + 0x60,\n (this.language & 0x1F) + 0x60);\n }\n this._procField('pre_defined', 'uint', 16);\n};\n\n// ISO/IEC 14496-12:2012 - 8.8.2 Movie Extends Header Box\nISOBox.prototype._boxProcessors['mehd'] = function() {\n this._procFullBox();\n this._procField('fragment_duration', 'uint', (this.version == 1) ? 64 : 32);\n};\n\n// ISO/IEC 14496-12:2012 - 8.8.5 Movie Fragment Header Box\nISOBox.prototype._boxProcessors['mfhd'] = function() {\n this._procFullBox();\n this._procField('sequence_number', 'uint', 32);\n};\n\n// ISO/IEC 14496-12:2012 - 8.8.11 Movie Fragment Random Access Box\nISOBox.prototype._boxProcessors['mfro'] = function() {\n this._procFullBox();\n this._procField('mfra_size', 'uint', 32); // Called mfra_size to distinguish from the normal \"size\" attribute of a box\n};\n\n\n// ISO/IEC 14496-12:2012 - 8.5.2.2 mp4a box (use AudioSampleEntry definition and naming)\nISOBox.prototype._boxProcessors['mp4a'] = ISOBox.prototype._boxProcessors['enca'] = function() {\n // SampleEntry fields\n this._procFieldArray('reserved1', 6, 'uint', 8);\n this._procField('data_reference_index', 'uint', 16);\n // AudioSampleEntry fields\n this._procFieldArray('reserved2', 2, 'uint', 32);\n this._procField('channelcount', 'uint', 16);\n this._procField('samplesize', 'uint', 16);\n this._procField('pre_defined', 'uint', 16);\n this._procField('reserved3', 'uint', 16);\n this._procField('samplerate', 'template', 32);\n // ESDescriptor fields\n this._procField('esds', 'data', -1);\n};\n\n// ISO/IEC 14496-12:2012 - 8.2.2 Movie Header Box\nISOBox.prototype._boxProcessors['mvhd'] = function() {\n this._procFullBox();\n this._procField('creation_time', 'uint', (this.version == 1) ? 64 : 32);\n this._procField('modification_time', 'uint', (this.version == 1) ? 64 : 32);\n this._procField('timescale', 'uint', 32);\n this._procField('duration', 'uint', (this.version == 1) ? 64 : 32);\n this._procField('rate', 'template', 32);\n this._procField('volume', 'template', 16);\n this._procField('reserved1', 'uint', 16);\n this._procFieldArray('reserved2', 2, 'uint', 32);\n this._procFieldArray('matrix', 9, 'template', 32);\n this._procFieldArray('pre_defined', 6,'uint', 32);\n this._procField('next_track_ID', 'uint', 32);\n};\n\n// ISO/IEC 14496-30:2014 - WebVTT Cue Payload Box.\nISOBox.prototype._boxProcessors['payl'] = function() {\n this._procField('cue_text', 'utf8');\n};\n\n//ISO/IEC 23001-7:2011 - 8.1 Protection System Specific Header Box\nISOBox.prototype._boxProcessors['pssh'] = function() {\n this._procFullBox();\n \n this._procFieldArray('SystemID', 16, 'uint', 8);\n this._procField('DataSize', 'uint', 32);\n this._procFieldArray('Data', this.DataSize, 'uint', 8);\n};\n// ISO/IEC 14496-12:2012 - 8.12.5 Scheme Type Box\nISOBox.prototype._boxProcessors['schm'] = function() {\n this._procFullBox();\n \n this._procField('scheme_type', 'uint', 32);\n this._procField('scheme_version', 'uint', 32);\n\n if (this.flags & 0x000001) {\n this._procField('scheme_uri', 'string', -1);\n }\n};\n// ISO/IEC 14496-12:2012 - 8.6.4.1 sdtp box \nISOBox.prototype._boxProcessors['sdtp'] = function() {\n this._procFullBox();\n\n var sample_count = -1;\n if (this._parsing) {\n sample_count = (this._raw.byteLength - (this._cursor.offset - this._raw.byteOffset));\n }\n\n this._procFieldArray('sample_dependency_table', sample_count, 'uint', 8);\n};\n\n// ISO/IEC 14496-12:2012 - 8.16.3 Segment Index Box\nISOBox.prototype._boxProcessors['sidx'] = function() {\n this._procFullBox();\n this._procField('reference_ID', 'uint', 32);\n this._procField('timescale', 'uint', 32);\n this._procField('earliest_presentation_time', 'uint', (this.version == 1) ? 64 : 32);\n this._procField('first_offset', 'uint', (this.version == 1) ? 64 : 32);\n this._procField('reserved', 'uint', 16);\n this._procField('reference_count', 'uint', 16);\n this._procEntries('references', this.reference_count, function(entry) {\n if (!this._parsing) {\n entry.reference = (entry.reference_type & 0x00000001) << 31;\n entry.reference |= (entry.referenced_size & 0x7FFFFFFF);\n entry.sap = (entry.starts_with_SAP & 0x00000001) << 31;\n entry.sap |= (entry.SAP_type & 0x00000003) << 28;\n entry.sap |= (entry.SAP_delta_time & 0x0FFFFFFF);\n }\n this._procEntryField(entry, 'reference', 'uint', 32);\n this._procEntryField(entry, 'subsegment_duration', 'uint', 32);\n this._procEntryField(entry, 'sap', 'uint', 32);\n if (this._parsing) {\n entry.reference_type = (entry.reference >> 31) & 0x00000001;\n entry.referenced_size = entry.reference & 0x7FFFFFFF;\n entry.starts_with_SAP = (entry.sap >> 31) & 0x00000001;\n entry.SAP_type = (entry.sap >> 28) & 0x00000007;\n entry.SAP_delta_time = (entry.sap & 0x0FFFFFFF);\n }\n });\n};\n\n// ISO/IEC 14496-12:2012 - 8.4.5.3 Sound Media Header Box\nISOBox.prototype._boxProcessors['smhd'] = function() {\n this._procFullBox();\n this._procField('balance', 'uint', 16);\n this._procField('reserved', 'uint', 16);\n};\n\n// ISO/IEC 14496-12:2012 - 8.16.4 Subsegment Index Box\nISOBox.prototype._boxProcessors['ssix'] = function() {\n this._procFullBox();\n this._procField('subsegment_count', 'uint', 32);\n this._procEntries('subsegments', this.subsegment_count, function(subsegment) {\n this._procEntryField(subsegment, 'ranges_count', 'uint', 32);\n this._procSubEntries(subsegment, 'ranges', subsegment.ranges_count, function(range) {\n this._procEntryField(range, 'level', 'uint', 8);\n this._procEntryField(range, 'range_size', 'uint', 24);\n });\n });\n};\n\n// ISO/IEC 14496-12:2012 - 8.5.2 Sample Description Box\nISOBox.prototype._boxProcessors['stsd'] = function() {\n this._procFullBox();\n this._procField('entry_count', 'uint', 32);\n this._procSubBoxes('entries', this.entry_count);\n};\n\n// ISO/IEC 14496-12:2015 - 8.7.7 Sub-Sample Information Box\nISOBox.prototype._boxProcessors['subs'] = function () {\n this._procFullBox();\n this._procField('entry_count', 'uint', 32);\n this._procEntries('entries', this.entry_count, function(entry) {\n this._procEntryField(entry, 'sample_delta', 'uint', 32);\n this._procEntryField(entry, 'subsample_count', 'uint', 16);\n this._procSubEntries(entry, 'subsamples', entry.subsample_count, function(subsample) {\n this._procEntryField(subsample, 'subsample_size', 'uint', (this.version === 1) ? 32 : 16);\n this._procEntryField(subsample, 'subsample_priority', 'uint', 8);\n this._procEntryField(subsample, 'discardable', 'uint', 8);\n this._procEntryField(subsample, 'codec_specific_parameters', 'uint', 32);\n });\n });\n};\n\n//ISO/IEC 23001-7:2011 - 8.2 Track Encryption Box\nISOBox.prototype._boxProcessors['tenc'] = function() {\n this._procFullBox();\n\n this._procField('default_IsEncrypted', 'uint', 24);\n this._procField('default_IV_size', 'uint', 8);\n this._procFieldArray('default_KID', 16, 'uint', 8);\n };\n\n// ISO/IEC 14496-12:2012 - 8.8.12 Track Fragmnent Decode Time\nISOBox.prototype._boxProcessors['tfdt'] = function() {\n this._procFullBox();\n this._procField('baseMediaDecodeTime', 'uint', (this.version == 1) ? 64 : 32);\n};\n\n// ISO/IEC 14496-12:2012 - 8.8.7 Track Fragment Header Box\nISOBox.prototype._boxProcessors['tfhd'] = function() {\n this._procFullBox();\n this._procField('track_ID', 'uint', 32);\n if (this.flags & 0x01) this._procField('base_data_offset', 'uint', 64);\n if (this.flags & 0x02) this._procField('sample_description_offset', 'uint', 32);\n if (this.flags & 0x08) this._procField('default_sample_duration', 'uint', 32);\n if (this.flags & 0x10) this._procField('default_sample_size', 'uint', 32);\n if (this.flags & 0x20) this._procField('default_sample_flags', 'uint', 32);\n};\n\n// ISO/IEC 14496-12:2012 - 8.8.10 Track Fragment Random Access Box\nISOBox.prototype._boxProcessors['tfra'] = function() {\n this._procFullBox();\n this._procField('track_ID', 'uint', 32);\n if (!this._parsing) {\n this.reserved = 0;\n this.reserved |= (this.length_size_of_traf_num & 0x00000030) << 4;\n this.reserved |= (this.length_size_of_trun_num & 0x0000000C) << 2;\n this.reserved |= (this.length_size_of_sample_num & 0x00000003);\n }\n this._procField('reserved', 'uint', 32);\n if (this._parsing) {\n this.length_size_of_traf_num = (this.reserved & 0x00000030) >> 4;\n this.length_size_of_trun_num = (this.reserved & 0x0000000C) >> 2;\n this.length_size_of_sample_num = (this.reserved & 0x00000003);\n }\n this._procField('number_of_entry', 'uint', 32);\n this._procEntries('entries', this.number_of_entry, function(entry) {\n this._procEntryField(entry, 'time', 'uint', (this.version === 1) ? 64 : 32);\n this._procEntryField(entry, 'moof_offset', 'uint', (this.version === 1) ? 64 : 32);\n this._procEntryField(entry, 'traf_number', 'uint', (this.length_size_of_traf_num + 1) * 8);\n this._procEntryField(entry, 'trun_number', 'uint', (this.length_size_of_trun_num + 1) * 8);\n this._procEntryField(entry, 'sample_number', 'uint', (this.length_size_of_sample_num + 1) * 8);\n });\n};\n\n// ISO/IEC 14496-12:2012 - 8.3.2 Track Header Box\nISOBox.prototype._boxProcessors['tkhd'] = function() {\n this._procFullBox();\n this._procField('creation_time', 'uint', (this.version == 1) ? 64 : 32);\n this._procField('modification_time', 'uint', (this.version == 1) ? 64 : 32);\n this._procField('track_ID', 'uint', 32);\n this._procField('reserved1', 'uint', 32);\n this._procField('duration', 'uint', (this.version == 1) ? 64 : 32);\n this._procFieldArray('reserved2', 2, 'uint', 32);\n this._procField('layer', 'uint', 16);\n this._procField('alternate_group', 'uint', 16);\n this._procField('volume', 'template', 16);\n this._procField('reserved3', 'uint', 16);\n this._procFieldArray('matrix', 9, 'template', 32);\n this._procField('width', 'template', 32);\n this._procField('height', 'template', 32);\n};\n\n// ISO/IEC 14496-12:2012 - 8.8.3 Track Extends Box\nISOBox.prototype._boxProcessors['trex'] = function() {\n this._procFullBox();\n this._procField('track_ID', 'uint', 32);\n this._procField('default_sample_description_index', 'uint', 32);\n this._procField('default_sample_duration', 'uint', 32);\n this._procField('default_sample_size', 'uint', 32);\n this._procField('default_sample_flags', 'uint', 32);\n};\n\n// ISO/IEC 14496-12:2012 - 8.8.8 Track Run Box\n// Note: the 'trun' box has a direct relation to the 'tfhd' box for defaults.\n// These defaults are not set explicitly here, but are left to resolve for the user.\nISOBox.prototype._boxProcessors['trun'] = function() {\n this._procFullBox();\n this._procField('sample_count', 'uint', 32);\n if (this.flags & 0x1) this._procField('data_offset', 'int', 32);\n if (this.flags & 0x4) this._procField('first_sample_flags', 'uint', 32);\n this._procEntries('samples', this.sample_count, function(sample) {\n if (this.flags & 0x100) this._procEntryField(sample, 'sample_duration', 'uint', 32);\n if (this.flags & 0x200) this._procEntryField(sample, 'sample_size', 'uint', 32);\n if (this.flags & 0x400) this._procEntryField(sample, 'sample_flags', 'uint', 32);\n if (this.flags & 0x800) this._procEntryField(sample, 'sample_composition_time_offset', (this.version === 1) ? 'int' : 'uint', 32);\n });\n};\n\n// ISO/IEC 14496-12:2012 - 8.7.2 Data Reference Box\nISOBox.prototype._boxProcessors['url '] = ISOBox.prototype._boxProcessors['urn '] = function() {\n this._procFullBox();\n if (this.type === 'urn ') {\n this._procField('name', 'string', -1);\n }\n this._procField('location', 'string', -1);\n};\n\n// ISO/IEC 14496-30:2014 - WebVTT Source Label Box\nISOBox.prototype._boxProcessors['vlab'] = function() {\n this._procField('source_label', 'utf8');\n};\n\n// ISO/IEC 14496-12:2012 - 8.4.5.2 Video Media Header Box\nISOBox.prototype._boxProcessors['vmhd'] = function() {\n this._procFullBox();\n this._procField('graphicsmode', 'uint', 16);\n this._procFieldArray('opcolor', 3, 'uint', 16);\n};\n\n// ISO/IEC 14496-30:2014 - WebVTT Configuration Box\nISOBox.prototype._boxProcessors['vttC'] = function() {\n this._procField('config', 'utf8');\n};\n\n// ISO/IEC 14496-30:2014 - WebVTT Empty Sample Box\nISOBox.prototype._boxProcessors['vtte'] = function() {\n // Nothing should happen here.\n};\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport FactoryMaker from '../../core/FactoryMaker';\n\nfunction RequestModifier() {\n\n let instance;\n\n function modifyRequestURL(url) {\n return url;\n }\n\n function modifyRequestHeader(request) {\n return request;\n }\n\n instance = {\n modifyRequestURL: modifyRequestURL,\n modifyRequestHeader: modifyRequestHeader\n };\n\n return instance;\n}\n\nRequestModifier.__dashjs_factory_name = 'RequestModifier';\nexport default FactoryMaker.getSingletonFactory(RequestModifier);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\nclass ErrorsBase {\n extend (errors, config) {\n if (!errors) return;\n\n let override = config ? config.override : false;\n let publicOnly = config ? config.publicOnly : false;\n\n\n for (const err in errors) {\n if (!errors.hasOwnProperty(err) || (this[err] && !override)) continue;\n if (publicOnly && errors[err].indexOf('public_') === -1) continue;\n this[err] = errors[err];\n\n }\n }\n}\n\nexport default ErrorsBase;","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport FactoryMaker from '../../core/FactoryMaker';\n\n/**\n * @module XHRLoader\n * @ignore\n * @description Manages download of resources via HTTP.\n * @param {Object} cfg - dependencies from parent\n */\nfunction XHRLoader(cfg) {\n\n cfg = cfg || {};\n const requestModifier = cfg.requestModifier;\n\n let instance;\n\n function load(httpRequest) {\n\n // Variables will be used in the callback functions\n const requestStartTime = new Date();\n const request = httpRequest.request;\n\n let xhr = new XMLHttpRequest();\n xhr.open(httpRequest.method, httpRequest.url, true);\n\n if (request.responseType) {\n xhr.responseType = request.responseType;\n }\n\n if (request.range) {\n xhr.setRequestHeader('Range', 'bytes=' + request.range);\n }\n\n if (!request.requestStartDate) {\n request.requestStartDate = requestStartTime;\n }\n\n if (requestModifier) {\n xhr = requestModifier.modifyRequestHeader(xhr);\n }\n\n if (httpRequest.headers) {\n for (let header in httpRequest.headers) {\n let value = httpRequest.headers[header];\n if (value) {\n xhr.setRequestHeader(header, value);\n }\n }\n }\n\n xhr.withCredentials = httpRequest.withCredentials;\n\n xhr.onload = httpRequest.onload;\n xhr.onloadend = httpRequest.onend;\n xhr.onerror = httpRequest.onerror;\n xhr.onprogress = httpRequest.progress;\n xhr.onabort = httpRequest.onabort;\n xhr.ontimeout = httpRequest.ontimeout;\n xhr.timeout = httpRequest.timeout;\n\n xhr.send();\n\n httpRequest.response = xhr;\n }\n\n function abort(request) {\n const x = request.response;\n x.onloadend = x.onerror = x.onprogress = undefined; //Ignore events from aborted requests.\n x.abort();\n }\n\n instance = {\n load: load,\n abort: abort\n };\n\n return instance;\n}\n\nXHRLoader.__dashjs_factory_name = 'XHRLoader';\n\nconst factory = FactoryMaker.getClassFactory(XHRLoader);\nexport default factory;\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\nclass Segment {\n constructor() {\n this.indexRange = null;\n // The index of the segment in the list of segments. We start at 0\n this.index = null;\n this.mediaRange = null;\n this.media = null;\n this.duration = NaN;\n // this is the time that should be inserted into the media url\n this.replacementTime = null;\n // this is the number that should be inserted into the media url\n this.replacementNumber = NaN;\n // This is supposed to match the time encoded in the media Segment\n this.mediaStartTime = NaN;\n // When the source buffer timeOffset is set to MSETimeOffset this is the\n // time that will match the seekTarget and video.currentTime\n this.presentationStartTime = NaN;\n // Do not schedule this segment until\n this.availabilityStartTime = NaN;\n // Ignore and discard this segment after\n this.availabilityEndTime = NaN;\n // For dynamic mpd's, this is the wall clock time that the video\n // element currentTime should be presentationStartTime\n this.wallStartTime = NaN;\n this.representation = null;\n }\n}\n\nexport default Segment;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n\nimport DashConstants from '../constants/DashConstants';\n\nclass Representation {\n constructor() {\n this.id = null;\n this.index = -1;\n this.adaptation = null;\n this.segmentInfoType = null;\n this.initialization = null;\n this.codecs = null;\n this.mimeType = null;\n this.codecPrivateData = null;\n this.segmentDuration = NaN;\n this.timescale = 1;\n this.startNumber = 1;\n this.indexRange = null;\n this.range = null;\n this.presentationTimeOffset = 0;\n // Set the source buffer timeOffset to this\n this.MSETimeOffset = NaN;\n // The information we need in the DashHandler to determine whether the last segment has been loaded\n this.mediaFinishedInformation = { numberOfSegments: 0, mediaTimeOfLastSignaledSegment: NaN };\n this.bandwidth = NaN;\n this.width = NaN;\n this.height = NaN;\n this.scanType = null;\n this.maxPlayoutRate = NaN;\n this.availabilityTimeOffset = 0;\n this.availabilityTimeComplete = true;\n }\n\n hasInitialization() {\n return (this.initialization !== null || this.range !== null);\n }\n\n hasSegments() {\n return this.segmentInfoType !== DashConstants.BASE_URL &&\n this.segmentInfoType !== DashConstants.SEGMENT_BASE &&\n !this.indexRange;\n }\n}\n\nexport default Representation;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\nclass AdaptationSet {\n constructor() {\n this.period = null;\n this.index = -1;\n this.type = null;\n }\n}\n\nexport default AdaptationSet;","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\nclass Period {\n constructor() {\n this.id = null;\n this.index = -1;\n this.duration = NaN;\n this.start = NaN;\n this.mpd = null;\n this.nextPeriodId = null;\n }\n}\n\nPeriod.DEFAULT_ID = 'defaultId';\n\nexport default Period;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\nclass Mpd {\n constructor() {\n this.manifest = null;\n this.suggestedPresentationDelay = 0;\n this.availabilityStartTime = null;\n this.availabilityEndTime = Number.POSITIVE_INFINITY;\n this.timeShiftBufferDepth = Number.POSITIVE_INFINITY;\n this.maxSegmentDuration = Number.POSITIVE_INFINITY;\n this.publishTime = null;\n this.minimumUpdatePeriod = NaN;\n this.mediaPresentationDuration = NaN;\n }\n}\n\nexport default Mpd;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\nclass EventStream {\n constructor() {\n this.adaptionSet = null;\n this.representation = null;\n this.period = null;\n this.timescale = 1;\n this.value = '';\n this.schemeIdUri = '';\n this.presentationTimeOffset = 0;\n }\n}\n\nexport default EventStream;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport Constants from '../../streaming/constants/Constants';\nimport DashConstants from '../constants/DashConstants';\nimport Representation from '../vo/Representation';\nimport AdaptationSet from '../vo/AdaptationSet';\nimport Period from '../vo/Period';\nimport Mpd from '../vo/Mpd';\nimport UTCTiming from '../vo/UTCTiming';\nimport Event from '../vo/Event';\nimport BaseURL from '../vo/BaseURL';\nimport EventStream from '../vo/EventStream';\nimport ObjectUtils from '../../streaming/utils/ObjectUtils';\nimport URLUtils from '../../streaming/utils/URLUtils';\nimport FactoryMaker from '../../core/FactoryMaker';\nimport Debug from '../../core/Debug';\nimport DashJSError from '../../streaming/vo/DashJSError';\nimport Errors from '../../core/errors/Errors';\nimport {THUMBNAILS_SCHEME_ID_URIS} from '../../streaming/thumbnail/ThumbnailTracks';\n\nfunction DashManifestModel() {\n let instance,\n logger,\n errHandler,\n BASE64;\n\n const context = this.context;\n const urlUtils = URLUtils(context).getInstance();\n\n const isInteger = Number.isInteger || function (value) {\n return typeof value === 'number' &&\n isFinite(value) &&\n Math.floor(value) === value;\n };\n\n function setup() {\n logger = Debug(context).getInstance().getLogger(instance);\n }\n\n function getIsTypeOf(adaptation, type) {\n if (!adaptation) {\n throw new Error('adaptation is not defined');\n }\n\n if (!type) {\n throw new Error('type is not defined');\n }\n\n // Check for thumbnail images\n if (adaptation.Representation_asArray && adaptation.Representation_asArray.length) {\n const essentialProperties = getEssentialPropertiesForRepresentation(adaptation.Representation_asArray[0]);\n if (essentialProperties && essentialProperties.length > 0 && THUMBNAILS_SCHEME_ID_URIS.indexOf(essentialProperties[0].schemeIdUri) >= 0) {\n return (type === Constants.IMAGE);\n }\n }\n\n // Check ContentComponent.contentType\n if (adaptation.ContentComponent_asArray && adaptation.ContentComponent_asArray.length > 0) {\n if (adaptation.ContentComponent_asArray.length > 1) {\n return (type === Constants.MUXED);\n } else if (adaptation.ContentComponent_asArray[0].contentType === type) {\n return true;\n }\n }\n\n const mimeTypeRegEx = (type === Constants.TEXT) ? new RegExp('(ttml|vtt|wvtt|stpp)') : new RegExp(type);\n\n // Check codecs\n if (adaptation.Representation_asArray && adaptation.Representation_asArray.length) {\n const codecs = adaptation.Representation_asArray[0].codecs;\n if (mimeTypeRegEx.test(codecs)) {\n return true;\n }\n }\n\n // Check Adaptation's mimeType\n if (adaptation.hasOwnProperty(DashConstants.MIME_TYPE)) {\n return mimeTypeRegEx.test(adaptation.mimeType);\n }\n\n // Check Representation's mimeType\n if (adaptation.Representation_asArray) {\n let representation;\n for (let i = 0; i < adaptation.Representation_asArray.length; i++) {\n representation = adaptation.Representation_asArray[i];\n if (representation.hasOwnProperty(DashConstants.MIME_TYPE)) {\n return mimeTypeRegEx.test(representation.mimeType);\n }\n }\n }\n\n return false;\n }\n\n function getIsFragmented(adaptation) {\n if (!adaptation) {\n throw new Error('adaptation is not defined');\n }\n if (adaptation.hasOwnProperty(DashConstants.SEGMENT_TEMPLATE) ||\n adaptation.hasOwnProperty(DashConstants.SEGMENT_TIMELINE) ||\n adaptation.hasOwnProperty(DashConstants.SEGMENT_LIST) ||\n adaptation.hasOwnProperty(DashConstants.SEGMENT_BASE)) {\n return true;\n }\n if (adaptation.Representation_asArray && adaptation.Representation_asArray.length > 0) {\n const representation = adaptation.Representation_asArray[0];\n if (representation.hasOwnProperty(DashConstants.SEGMENT_TEMPLATE) ||\n representation.hasOwnProperty(DashConstants.SEGMENT_TIMELINE) ||\n representation.hasOwnProperty(DashConstants.SEGMENT_LIST) ||\n representation.hasOwnProperty(DashConstants.SEGMENT_BASE)) {\n return true;\n }\n }\n return false;\n }\n\n function getIsAudio(adaptation) {\n return getIsTypeOf(adaptation, Constants.AUDIO);\n }\n\n function getIsVideo(adaptation) {\n return getIsTypeOf(adaptation, Constants.VIDEO);\n }\n\n function getIsText(adaptation) {\n return getIsTypeOf(adaptation, Constants.TEXT);\n }\n\n function getIsMuxed(adaptation) {\n return getIsTypeOf(adaptation, Constants.MUXED);\n }\n\n function getIsImage(adaptation) {\n return getIsTypeOf(adaptation, Constants.IMAGE);\n }\n\n function getLanguageForAdaptation(adaptation) {\n let lang = '';\n\n if (adaptation && adaptation.hasOwnProperty(DashConstants.LANG)) {\n //Filter out any other characters not allowed according to RFC5646\n lang = adaptation.lang.replace(/[^A-Za-z0-9-]/g, '');\n }\n\n return lang;\n }\n\n function getViewpointForAdaptation(adaptation) {\n return adaptation && adaptation.hasOwnProperty(DashConstants.VIEWPOINT) ? adaptation.Viewpoint : null;\n }\n\n function getRolesForAdaptation(adaptation) {\n return adaptation && adaptation.hasOwnProperty(DashConstants.ROLE_ASARRAY) ? adaptation.Role_asArray : [];\n }\n\n function getAccessibilityForAdaptation(adaptation) {\n return adaptation && adaptation.hasOwnProperty(DashConstants.ACCESSIBILITY_ASARRAY) ? adaptation.Accessibility_asArray : [];\n }\n\n function getAudioChannelConfigurationForAdaptation(adaptation) {\n return adaptation && adaptation.hasOwnProperty(DashConstants.AUDIOCHANNELCONFIGURATION_ASARRAY) ? adaptation.AudioChannelConfiguration_asArray : [];\n }\n\n function getAudioChannelConfigurationForRepresentation(representation) {\n return representation && representation.hasOwnProperty(DashConstants.AUDIOCHANNELCONFIGURATION_ASARRAY) ? representation.AudioChannelConfiguration_asArray : [];\n }\n\n function getRepresentationSortFunction() {\n return (a, b) => a.bandwidth - b.bandwidth;\n }\n\n function processAdaptation(realAdaptation) {\n if (realAdaptation && Array.isArray(realAdaptation.Representation_asArray)) {\n realAdaptation.Representation_asArray.sort(getRepresentationSortFunction());\n }\n\n return realAdaptation;\n }\n\n function getRealAdaptations(manifest, periodIndex) {\n return manifest && manifest.Period_asArray && isInteger(periodIndex) ? manifest.Period_asArray[periodIndex] ? manifest.Period_asArray[periodIndex].AdaptationSet_asArray : [] : [];\n }\n\n function getRealPeriods(manifest) {\n return manifest && manifest.Period_asArray ? manifest.Period_asArray : [];\n }\n\n function getRealPeriodForIndex(index, manifest) {\n const realPeriods = getRealPeriods(manifest);\n if (realPeriods.length > 0 && isInteger(index)) {\n return realPeriods[index];\n } else {\n return null;\n }\n }\n\n function getAdaptationForId(id, manifest, periodIndex) {\n const realAdaptations = getRealAdaptations(manifest, periodIndex);\n let i,\n len;\n\n for (i = 0, len = realAdaptations.length; i < len; i++) {\n if (realAdaptations[i].hasOwnProperty(DashConstants.ID) && realAdaptations[i].id === id) {\n return realAdaptations[i];\n }\n }\n\n return null;\n }\n\n function getAdaptationForIndex(index, manifest, periodIndex) {\n const realAdaptations = getRealAdaptations(manifest, periodIndex);\n if (realAdaptations.length > 0 && isInteger(index)) {\n return realAdaptations[index];\n } else {\n return null;\n }\n }\n\n function getIndexForAdaptation(realAdaptation, manifest, periodIndex) {\n if (!realAdaptation) {\n return -1;\n }\n\n const realAdaptations = getRealAdaptations(manifest, periodIndex);\n\n for (let i = 0; i < realAdaptations.length; i++) {\n let objectUtils = ObjectUtils(context).getInstance();\n if (objectUtils.areEqual(realAdaptations[i], realAdaptation)) {\n return i;\n }\n }\n\n return -1;\n }\n\n function getAdaptationsForType(manifest, periodIndex, type) {\n const realAdaptations = getRealAdaptations(manifest, periodIndex);\n let i,\n len;\n const adaptations = [];\n\n for (i = 0, len = realAdaptations.length; i < len; i++) {\n if (getIsTypeOf(realAdaptations[i], type)) {\n adaptations.push(processAdaptation(realAdaptations[i]));\n }\n }\n\n return adaptations;\n }\n\n function getCodec(adaptation, representationId, addResolutionInfo) {\n let codec = null;\n\n if (adaptation && adaptation.Representation_asArray && adaptation.Representation_asArray.length > 0) {\n const representation = isInteger(representationId) && representationId >= 0 && representationId < adaptation.Representation_asArray.length ?\n adaptation.Representation_asArray[representationId] : adaptation.Representation_asArray[0];\n if (representation) {\n codec = representation.mimeType + ';codecs=\"' + representation.codecs + '\"';\n if (addResolutionInfo && representation.width !== undefined) {\n codec += ';width=\"' + representation.width + '\";height=\"' + representation.height + '\"';\n }\n }\n }\n\n // If the codec contains a profiles parameter we remove it. Otherwise it will cause problems when checking for codec capabilities of the platform\n if (codec) {\n codec = codec.replace(/\\sprofiles=[^;]*/g, '');\n }\n\n return codec;\n }\n\n function getMimeType(adaptation) {\n return adaptation && adaptation.Representation_asArray && adaptation.Representation_asArray.length > 0 ? adaptation.Representation_asArray[0].mimeType : null;\n }\n\n function getKID(adaptation) {\n if (!adaptation || !adaptation.hasOwnProperty(DashConstants.CENC_DEFAULT_KID)) {\n return null;\n }\n return adaptation[DashConstants.CENC_DEFAULT_KID];\n }\n\n function getLabelsForAdaptation(adaptation) {\n if (!adaptation || !Array.isArray(adaptation.Label_asArray)) {\n return [];\n }\n\n const labelArray = [];\n\n for (let i = 0; i < adaptation.Label_asArray.length; i++) {\n labelArray.push({\n lang: adaptation.Label_asArray[i].lang,\n text: adaptation.Label_asArray[i].__text || adaptation.Label_asArray[i]\n });\n }\n\n return labelArray;\n }\n\n function getContentProtectionData(adaptation) {\n if (!adaptation || !adaptation.hasOwnProperty(DashConstants.CONTENTPROTECTION_ASARRAY) || adaptation.ContentProtection_asArray.length === 0) {\n return null;\n }\n return adaptation.ContentProtection_asArray;\n }\n\n function getIsDynamic(manifest) {\n let isDynamic = false;\n if (manifest && manifest.hasOwnProperty('type')) {\n isDynamic = (manifest.type === DashConstants.DYNAMIC);\n }\n return isDynamic;\n }\n\n function getId(manifest) {\n return (manifest && manifest[DashConstants.ID]) || null;\n }\n\n function hasProfile(manifest, profile) {\n let has = false;\n\n if (manifest && manifest.profiles && manifest.profiles.length > 0) {\n has = (manifest.profiles.indexOf(profile) !== -1);\n }\n\n return has;\n }\n\n function getDuration(manifest) {\n let mpdDuration;\n //@mediaPresentationDuration specifies the duration of the entire Media Presentation.\n //If the attribute is not present, the duration of the Media Presentation is unknown.\n if (manifest && manifest.hasOwnProperty(DashConstants.MEDIA_PRESENTATION_DURATION)) {\n mpdDuration = manifest.mediaPresentationDuration;\n } else if (manifest && manifest.type == 'dynamic') {\n mpdDuration = Number.POSITIVE_INFINITY;\n } else {\n mpdDuration = Number.MAX_SAFE_INTEGER || Number.MAX_VALUE;\n }\n\n return mpdDuration;\n }\n\n function getBandwidth(representation) {\n return representation && representation.bandwidth ? representation.bandwidth : NaN;\n }\n\n function getManifestUpdatePeriod(manifest, latencyOfLastUpdate = 0) {\n let delay = NaN;\n if (manifest && manifest.hasOwnProperty(DashConstants.MINIMUM_UPDATE_PERIOD)) {\n delay = manifest.minimumUpdatePeriod;\n }\n return isNaN(delay) ? delay : Math.max(delay - latencyOfLastUpdate, 1);\n }\n\n function getPublishTime(manifest) {\n return manifest && manifest.hasOwnProperty(DashConstants.PUBLISH_TIME) ? new Date(manifest[DashConstants.PUBLISH_TIME]) : null;\n }\n\n function getRepresentationCount(adaptation) {\n return adaptation && Array.isArray(adaptation.Representation_asArray) ? adaptation.Representation_asArray.length : 0;\n }\n\n function getBitrateListForAdaptation(realAdaptation) {\n const processedRealAdaptation = processAdaptation(realAdaptation);\n const realRepresentations = processedRealAdaptation && Array.isArray(processedRealAdaptation.Representation_asArray) ? processedRealAdaptation.Representation_asArray : [];\n\n return realRepresentations.map((realRepresentation) => {\n return {\n bandwidth: realRepresentation.bandwidth,\n width: realRepresentation.width || 0,\n height: realRepresentation.height || 0,\n scanType: realRepresentation.scanType || null,\n id: realRepresentation.id || null\n };\n });\n }\n\n function getSelectionPriority(realAdaption) {\n try {\n const priority = realAdaption && typeof realAdaption.selectionPriority !== 'undefined' ? parseInt(realAdaption.selectionPriority) : 1;\n\n return isNaN(priority) ? 1 : priority;\n } catch (e) {\n return 1;\n }\n }\n\n function getEssentialPropertiesForRepresentation(realRepresentation) {\n if (!realRepresentation || !realRepresentation.EssentialProperty_asArray || !realRepresentation.EssentialProperty_asArray.length) return null;\n\n return realRepresentation.EssentialProperty_asArray.map((prop) => {\n return {\n schemeIdUri: prop.schemeIdUri,\n value: prop.value\n };\n });\n }\n\n function getRepresentationFor(index, adaptation) {\n return adaptation && adaptation.Representation_asArray && adaptation.Representation_asArray.length > 0 &&\n isInteger(index) ? adaptation.Representation_asArray[index] : null;\n }\n\n function getRealAdaptationFor(voAdaptation) {\n if (voAdaptation && voAdaptation.period && isInteger(voAdaptation.period.index)) {\n const periodArray = voAdaptation.period.mpd.manifest.Period_asArray[voAdaptation.period.index];\n if (periodArray && periodArray.AdaptationSet_asArray && isInteger(voAdaptation.index)) {\n return processAdaptation(periodArray.AdaptationSet_asArray[voAdaptation.index]);\n }\n }\n }\n\n function getRepresentationsForAdaptation(voAdaptation) {\n const voRepresentations = [];\n const processedRealAdaptation = getRealAdaptationFor(voAdaptation);\n let segmentInfo,\n baseUrl;\n\n if (processedRealAdaptation && processedRealAdaptation.Representation_asArray) {\n // TODO: TO BE REMOVED. We should get just the baseUrl elements that affects to the representations\n // that we are processing. Making it works properly will require much further changes and given\n // parsing base Urls parameters is needed for our ultra low latency examples, we will\n // keep this \"tricky\" code until the real (and good) solution comes\n if (voAdaptation && voAdaptation.period && isInteger(voAdaptation.period.index)) {\n const baseUrls = getBaseURLsFromElement(voAdaptation.period.mpd.manifest);\n if (baseUrls) {\n baseUrl = baseUrls[0];\n }\n }\n for (let i = 0, len = processedRealAdaptation.Representation_asArray.length; i < len; ++i) {\n const realRepresentation = processedRealAdaptation.Representation_asArray[i];\n const voRepresentation = new Representation();\n voRepresentation.index = i;\n voRepresentation.adaptation = voAdaptation;\n\n if (realRepresentation.hasOwnProperty(DashConstants.ID)) {\n voRepresentation.id = realRepresentation.id;\n }\n if (realRepresentation.hasOwnProperty(DashConstants.CODECS)) {\n voRepresentation.codecs = realRepresentation.codecs;\n }\n if (realRepresentation.hasOwnProperty(DashConstants.MIME_TYPE)) {\n voRepresentation.mimeType = realRepresentation[DashConstants.MIME_TYPE];\n }\n if (realRepresentation.hasOwnProperty(DashConstants.CODEC_PRIVATE_DATA)) {\n voRepresentation.codecPrivateData = realRepresentation.codecPrivateData;\n }\n if (realRepresentation.hasOwnProperty(DashConstants.BANDWITH)) {\n voRepresentation.bandwidth = realRepresentation.bandwidth;\n }\n if (realRepresentation.hasOwnProperty(DashConstants.WIDTH)) {\n voRepresentation.width = realRepresentation.width;\n }\n if (realRepresentation.hasOwnProperty(DashConstants.HEIGHT)) {\n voRepresentation.height = realRepresentation.height;\n }\n if (realRepresentation.hasOwnProperty(DashConstants.SCAN_TYPE)) {\n voRepresentation.scanType = realRepresentation.scanType;\n }\n if (realRepresentation.hasOwnProperty(DashConstants.MAX_PLAYOUT_RATE)) {\n voRepresentation.maxPlayoutRate = realRepresentation.maxPlayoutRate;\n }\n\n if (realRepresentation.hasOwnProperty(DashConstants.SEGMENT_BASE)) {\n segmentInfo = realRepresentation.SegmentBase;\n voRepresentation.segmentInfoType = DashConstants.SEGMENT_BASE;\n } else if (realRepresentation.hasOwnProperty(DashConstants.SEGMENT_LIST)) {\n segmentInfo = realRepresentation.SegmentList;\n\n if (segmentInfo.hasOwnProperty(DashConstants.SEGMENT_TIMELINE)) {\n voRepresentation.segmentInfoType = DashConstants.SEGMENT_TIMELINE;\n } else {\n voRepresentation.segmentInfoType = DashConstants.SEGMENT_LIST;\n }\n } else if (realRepresentation.hasOwnProperty(DashConstants.SEGMENT_TEMPLATE)) {\n segmentInfo = realRepresentation.SegmentTemplate;\n\n if (segmentInfo.hasOwnProperty(DashConstants.SEGMENT_TIMELINE)) {\n voRepresentation.segmentInfoType = DashConstants.SEGMENT_TIMELINE;\n } else {\n voRepresentation.segmentInfoType = DashConstants.SEGMENT_TEMPLATE;\n }\n\n if (segmentInfo.hasOwnProperty(DashConstants.INITIALIZATION_MINUS)) {\n voRepresentation.initialization = segmentInfo.initialization.split('$Bandwidth$')\n .join(realRepresentation.bandwidth).split('$RepresentationID$').join(realRepresentation.id);\n }\n } else {\n voRepresentation.segmentInfoType = DashConstants.BASE_URL;\n }\n\n voRepresentation.essentialProperties = getEssentialPropertiesForRepresentation(realRepresentation);\n\n if (segmentInfo) {\n if (segmentInfo.hasOwnProperty(DashConstants.INITIALIZATION)) {\n const initialization = segmentInfo.Initialization;\n\n if (initialization.hasOwnProperty(DashConstants.SOURCE_URL)) {\n voRepresentation.initialization = initialization.sourceURL;\n }\n\n if (initialization.hasOwnProperty(DashConstants.RANGE)) {\n voRepresentation.range = initialization.range;\n // initialization source url will be determined from\n // BaseURL when resolved at load time.\n }\n } else if (getIsText(processedRealAdaptation) &&\n getIsFragmented(processedRealAdaptation) &&\n processedRealAdaptation.mimeType &&\n processedRealAdaptation.mimeType.indexOf('application/mp4') === -1) {\n voRepresentation.range = 0;\n }\n\n if (segmentInfo.hasOwnProperty(DashConstants.TIMESCALE)) {\n voRepresentation.timescale = segmentInfo.timescale;\n }\n if (segmentInfo.hasOwnProperty(DashConstants.DURATION)) {\n // TODO according to the spec @maxSegmentDuration specifies the maximum duration of any Segment in any Representation in the Media Presentation\n // It is also said that for a SegmentTimeline any @d value shall not exceed the value of MPD@maxSegmentDuration, but nothing is said about\n // SegmentTemplate @duration attribute. We need to find out if @maxSegmentDuration should be used instead of calculated duration if the the duration\n // exceeds @maxSegmentDuration\n voRepresentation.segmentDuration = segmentInfo.duration / voRepresentation.timescale;\n } else if (realRepresentation.hasOwnProperty(DashConstants.SEGMENT_TEMPLATE)) {\n segmentInfo = realRepresentation.SegmentTemplate;\n\n if (segmentInfo.hasOwnProperty(DashConstants.SEGMENT_TIMELINE)) {\n voRepresentation.segmentDuration = calcSegmentDuration(segmentInfo.SegmentTimeline) / voRepresentation.timescale;\n }\n }\n if (segmentInfo.hasOwnProperty(DashConstants.MEDIA)) {\n voRepresentation.media = segmentInfo.media;\n }\n if (segmentInfo.hasOwnProperty(DashConstants.START_NUMBER)) {\n voRepresentation.startNumber = segmentInfo.startNumber;\n }\n if (segmentInfo.hasOwnProperty(DashConstants.INDEX_RANGE)) {\n voRepresentation.indexRange = segmentInfo.indexRange;\n }\n if (segmentInfo.hasOwnProperty(DashConstants.PRESENTATION_TIME_OFFSET)) {\n voRepresentation.presentationTimeOffset = segmentInfo.presentationTimeOffset / voRepresentation.timescale;\n }\n if (segmentInfo.hasOwnProperty(DashConstants.AVAILABILITY_TIME_OFFSET)) {\n voRepresentation.availabilityTimeOffset = segmentInfo.availabilityTimeOffset;\n } else if (baseUrl && baseUrl.availabilityTimeOffset !== undefined) {\n voRepresentation.availabilityTimeOffset = baseUrl.availabilityTimeOffset;\n }\n if (segmentInfo.hasOwnProperty(DashConstants.AVAILABILITY_TIME_COMPLETE)) {\n voRepresentation.availabilityTimeComplete = segmentInfo.availabilityTimeComplete !== 'false';\n } else if (baseUrl && baseUrl.availabilityTimeComplete !== undefined) {\n voRepresentation.availabilityTimeComplete = baseUrl.availabilityTimeComplete;\n }\n }\n\n voRepresentation.MSETimeOffset = calcMSETimeOffset(voRepresentation);\n voRepresentation.path = [voAdaptation.period.index, voAdaptation.index, i];\n voRepresentations.push(voRepresentation);\n }\n }\n\n return voRepresentations;\n }\n\n function calcSegmentDuration(segmentTimeline) {\n if (!segmentTimeline || !segmentTimeline.S_asArray) {\n return NaN;\n }\n let s0 = segmentTimeline.S_asArray[0];\n let s1 = segmentTimeline.S_asArray[1];\n return s0.hasOwnProperty('d') ? s0.d : (s1.t - s0.t);\n }\n\n function calcMSETimeOffset(representation) {\n // The MSEOffset is offset from AST for media. It is Period@start - presentationTimeOffset\n const presentationOffset = representation.presentationTimeOffset;\n const periodStart = representation.adaptation.period.start;\n return (periodStart - presentationOffset);\n }\n\n function getAdaptationsForPeriod(voPeriod) {\n const realPeriod = voPeriod && isInteger(voPeriod.index) ? voPeriod.mpd.manifest.Period_asArray[voPeriod.index] : null;\n const voAdaptations = [];\n let voAdaptationSet,\n realAdaptationSet,\n i;\n\n if (realPeriod && realPeriod.AdaptationSet_asArray) {\n for (i = 0; i < realPeriod.AdaptationSet_asArray.length; i++) {\n realAdaptationSet = realPeriod.AdaptationSet_asArray[i];\n voAdaptationSet = new AdaptationSet();\n if (realAdaptationSet.hasOwnProperty(DashConstants.ID)) {\n voAdaptationSet.id = realAdaptationSet.id;\n }\n voAdaptationSet.index = i;\n voAdaptationSet.period = voPeriod;\n\n if (getIsMuxed(realAdaptationSet)) {\n voAdaptationSet.type = Constants.MUXED;\n } else if (getIsAudio(realAdaptationSet)) {\n voAdaptationSet.type = Constants.AUDIO;\n } else if (getIsVideo(realAdaptationSet)) {\n voAdaptationSet.type = Constants.VIDEO;\n } else if (getIsText(realAdaptationSet)) {\n voAdaptationSet.type = Constants.TEXT;\n } else if (getIsImage(realAdaptationSet)) {\n voAdaptationSet.type = Constants.IMAGE;\n } else {\n logger.warn('Unknown Adaptation stream type');\n }\n voAdaptations.push(voAdaptationSet);\n }\n }\n\n return voAdaptations;\n }\n\n function getRegularPeriods(mpd) {\n const isDynamic = mpd ? getIsDynamic(mpd.manifest) : false;\n const voPeriods = [];\n let realPreviousPeriod = null;\n let realPeriod = null;\n let voPreviousPeriod = null;\n let voPeriod = null;\n let len,\n i;\n\n for (i = 0, len = mpd && mpd.manifest && mpd.manifest.Period_asArray ? mpd.manifest.Period_asArray.length : 0; i < len; i++) {\n realPeriod = mpd.manifest.Period_asArray[i];\n\n // If the attribute @start is present in the Period, then the\n // Period is a regular Period and the PeriodStart is equal\n // to the value of this attribute.\n if (realPeriod.hasOwnProperty(DashConstants.START)) {\n voPeriod = new Period();\n voPeriod.start = realPeriod.start;\n }\n // If the @start attribute is absent, but the previous Period\n // element contains a @duration attribute then then this new\n // Period is also a regular Period. The start time of the new\n // Period PeriodStart is the sum of the start time of the previous\n // Period PeriodStart and the value of the attribute @duration\n // of the previous Period.\n else if (realPreviousPeriod !== null && realPreviousPeriod.hasOwnProperty(DashConstants.DURATION) && voPreviousPeriod !== null) {\n voPeriod = new Period();\n voPeriod.start = parseFloat((voPreviousPeriod.start + voPreviousPeriod.duration).toFixed(5));\n }\n // If (i) @start attribute is absent, and (ii) the Period element\n // is the first in the MPD, and (iii) the MPD@type is 'static',\n // then the PeriodStart time shall be set to zero.\n else if (i === 0 && !isDynamic) {\n voPeriod = new Period();\n voPeriod.start = 0;\n }\n\n // The Period extends until the PeriodStart of the next Period.\n // The difference between the PeriodStart time of a Period and\n // the PeriodStart time of the following Period.\n if (voPreviousPeriod !== null && isNaN(voPreviousPeriod.duration)) {\n if (voPeriod !== null) {\n voPreviousPeriod.duration = parseFloat((voPeriod.start - voPreviousPeriod.start).toFixed(5));\n } else {\n logger.warn('First period duration could not be calculated because lack of start and duration period properties. This will cause timing issues during playback');\n }\n }\n\n if (voPeriod !== null) {\n voPeriod.id = getPeriodId(realPeriod, i);\n voPeriod.index = i;\n voPeriod.mpd = mpd;\n\n if (realPeriod.hasOwnProperty(DashConstants.DURATION)) {\n voPeriod.duration = realPeriod.duration;\n }\n\n if (voPreviousPeriod) {\n voPreviousPeriod.nextPeriodId = voPeriod.id;\n }\n\n voPeriods.push(voPeriod);\n realPreviousPeriod = realPeriod;\n voPreviousPeriod = voPeriod;\n }\n\n realPeriod = null;\n voPeriod = null;\n }\n\n if (voPeriods.length === 0) {\n return voPeriods;\n }\n\n // The last Period extends until the end of the Media Presentation.\n // The difference between the PeriodStart time of the last Period\n // and the mpd duration\n if (voPreviousPeriod !== null && isNaN(voPreviousPeriod.duration)) {\n voPreviousPeriod.duration = parseFloat((getEndTimeForLastPeriod(voPreviousPeriod) - voPreviousPeriod.start).toFixed(5));\n }\n\n return voPeriods;\n }\n\n function getPeriodId(realPeriod, i) {\n if (!realPeriod) {\n throw new Error('Period cannot be null or undefined');\n }\n\n let id = Period.DEFAULT_ID + '_' + i;\n\n if (realPeriod.hasOwnProperty(DashConstants.ID) && realPeriod.id.length > 0 && realPeriod.id !== '__proto__') {\n id = realPeriod.id;\n }\n\n return id;\n }\n\n function getMpd(manifest) {\n const mpd = new Mpd();\n\n if (manifest) {\n mpd.manifest = manifest;\n\n if (manifest.hasOwnProperty(DashConstants.AVAILABILITY_START_TIME)) {\n mpd.availabilityStartTime = new Date(manifest.availabilityStartTime.getTime());\n } else {\n if (manifest.loadedTime) {\n mpd.availabilityStartTime = new Date(manifest.loadedTime.getTime());\n }\n }\n\n if (manifest.hasOwnProperty(DashConstants.AVAILABILITY_END_TIME)) {\n mpd.availabilityEndTime = new Date(manifest.availabilityEndTime.getTime());\n }\n\n if (manifest.hasOwnProperty(DashConstants.MINIMUM_UPDATE_PERIOD)) {\n mpd.minimumUpdatePeriod = manifest.minimumUpdatePeriod;\n }\n\n if (manifest.hasOwnProperty(DashConstants.MEDIA_PRESENTATION_DURATION)) {\n mpd.mediaPresentationDuration = manifest.mediaPresentationDuration;\n }\n\n if (manifest.hasOwnProperty(DashConstants.SUGGESTED_PRESENTATION_DELAY)) {\n mpd.suggestedPresentationDelay = manifest.suggestedPresentationDelay;\n }\n\n if (manifest.hasOwnProperty(DashConstants.TIMESHIFT_BUFFER_DEPTH)) {\n mpd.timeShiftBufferDepth = manifest.timeShiftBufferDepth;\n }\n\n if (manifest.hasOwnProperty(DashConstants.MAX_SEGMENT_DURATION)) {\n mpd.maxSegmentDuration = manifest.maxSegmentDuration;\n }\n\n if (manifest.hasOwnProperty(DashConstants.PUBLISH_TIME)) {\n mpd.publishTime = new Date(manifest.publishTime);\n }\n }\n\n return mpd;\n }\n\n function checkConfig() {\n if (!errHandler || !errHandler.hasOwnProperty('error')) {\n throw new Error(Constants.MISSING_CONFIG_ERROR);\n }\n }\n\n function getEndTimeForLastPeriod(voPeriod) {\n checkConfig();\n const isDynamic = getIsDynamic(voPeriod.mpd.manifest);\n\n let periodEnd;\n if (voPeriod.mpd.manifest.mediaPresentationDuration) {\n periodEnd = voPeriod.mpd.manifest.mediaPresentationDuration;\n } else if (voPeriod.duration) {\n periodEnd = voPeriod.duration;\n } else if (isDynamic) {\n periodEnd = Number.POSITIVE_INFINITY;\n } else {\n errHandler.error(new DashJSError(Errors.MANIFEST_ERROR_ID_PARSE_CODE, 'Must have @mediaPresentationDuration on MPD or an explicit @duration on the last period.', voPeriod));\n }\n\n return periodEnd;\n }\n\n function getEventsForPeriod(period) {\n const manifest = period && period.mpd && period.mpd.manifest ? period.mpd.manifest : null;\n const periodArray = manifest ? manifest.Period_asArray : null;\n const eventStreams = periodArray && period && isInteger(period.index) ? periodArray[period.index].EventStream_asArray : null;\n const events = [];\n let i,\n j;\n\n if (eventStreams) {\n for (i = 0; i < eventStreams.length; i++) {\n const eventStream = new EventStream();\n eventStream.period = period;\n eventStream.timescale = 1;\n\n if (eventStreams[i].hasOwnProperty(Constants.SCHEME_ID_URI)) {\n eventStream.schemeIdUri = eventStreams[i][Constants.SCHEME_ID_URI];\n } else {\n throw new Error('Invalid EventStream. SchemeIdUri has to be set');\n }\n if (eventStreams[i].hasOwnProperty(DashConstants.TIMESCALE)) {\n eventStream.timescale = eventStreams[i][DashConstants.TIMESCALE];\n }\n if (eventStreams[i].hasOwnProperty(DashConstants.VALUE)) {\n eventStream.value = eventStreams[i][DashConstants.VALUE];\n }\n if (eventStreams[i].hasOwnProperty(DashConstants.PRESENTATION_TIME_OFFSET)) {\n eventStream.presentationTimeOffset = eventStreams[i][DashConstants.PRESENTATION_TIME_OFFSET];\n }\n for (j = 0; eventStreams[i].Event_asArray && j < eventStreams[i].Event_asArray.length; j++) {\n const currentMpdEvent = eventStreams[i].Event_asArray[j];\n const event = new Event();\n event.presentationTime = 0;\n event.eventStream = eventStream;\n\n if (currentMpdEvent.hasOwnProperty(DashConstants.PRESENTATION_TIME)) {\n event.presentationTime = currentMpdEvent.presentationTime;\n }\n const presentationTimeOffset = eventStream.presentationTimeOffset ? eventStream.presentationTimeOffset / eventStream.timescale : 0;\n event.calculatedPresentationTime = event.presentationTime / eventStream.timescale + period.start - presentationTimeOffset;\n\n if (currentMpdEvent.hasOwnProperty(DashConstants.DURATION)) {\n event.duration = currentMpdEvent.duration / eventStream.timescale;\n }\n if (currentMpdEvent.hasOwnProperty(DashConstants.ID)) {\n event.id = currentMpdEvent.id;\n } else {\n event.id = null;\n }\n\n if (currentMpdEvent.Signal && currentMpdEvent.Signal.Binary) {\n // toString is used to manage both regular and namespaced tags\n event.messageData = BASE64.decodeArray(currentMpdEvent.Signal.Binary.toString());\n } else {\n // From Cor.1: 'NOTE: this attribute is an alternative\n // to specifying a complete XML element(s) in the Event.\n // It is useful when an event leans itself to a compact\n // string representation'.\n event.messageData =\n currentMpdEvent.messageData ||\n currentMpdEvent.__cdata ||\n currentMpdEvent.__text;\n }\n\n events.push(event);\n }\n }\n }\n\n return events;\n }\n\n function getEventStreams(inbandStreams, representation) {\n const eventStreams = [];\n let i;\n\n if (!inbandStreams) return eventStreams;\n\n for (i = 0; i < inbandStreams.length; i++) {\n const eventStream = new EventStream();\n eventStream.timescale = 1;\n eventStream.representation = representation;\n\n if (inbandStreams[i].hasOwnProperty(Constants.SCHEME_ID_URI)) {\n eventStream.schemeIdUri = inbandStreams[i].schemeIdUri;\n } else {\n throw new Error('Invalid EventStream. SchemeIdUri has to be set');\n }\n if (inbandStreams[i].hasOwnProperty(DashConstants.TIMESCALE)) {\n eventStream.timescale = inbandStreams[i].timescale;\n }\n if (inbandStreams[i].hasOwnProperty(DashConstants.VALUE)) {\n eventStream.value = inbandStreams[i].value;\n }\n eventStreams.push(eventStream);\n }\n\n return eventStreams;\n }\n\n function getEventStreamForAdaptationSet(manifest, adaptation) {\n let inbandStreams,\n periodArray,\n adaptationArray;\n\n if (manifest && manifest.Period_asArray && adaptation && adaptation.period && isInteger(adaptation.period.index)) {\n periodArray = manifest.Period_asArray[adaptation.period.index];\n if (periodArray && periodArray.AdaptationSet_asArray && isInteger(adaptation.index)) {\n adaptationArray = periodArray.AdaptationSet_asArray[adaptation.index];\n if (adaptationArray) {\n inbandStreams = adaptationArray.InbandEventStream_asArray;\n }\n }\n }\n\n return getEventStreams(inbandStreams, null);\n }\n\n function getEventStreamForRepresentation(manifest, representation) {\n let inbandStreams,\n periodArray,\n adaptationArray,\n representationArray;\n\n if (manifest && manifest.Period_asArray && representation && representation.adaptation && representation.adaptation.period && isInteger(representation.adaptation.period.index)) {\n periodArray = manifest.Period_asArray[representation.adaptation.period.index];\n if (periodArray && periodArray.AdaptationSet_asArray && isInteger(representation.adaptation.index)) {\n adaptationArray = periodArray.AdaptationSet_asArray[representation.adaptation.index];\n if (adaptationArray && adaptationArray.Representation_asArray && isInteger(representation.index)) {\n representationArray = adaptationArray.Representation_asArray[representation.index];\n if (representationArray) {\n inbandStreams = representationArray.InbandEventStream_asArray;\n }\n }\n }\n }\n\n return getEventStreams(inbandStreams, representation);\n }\n\n function getUTCTimingSources(manifest) {\n const isDynamic = getIsDynamic(manifest);\n const hasAST = manifest ? manifest.hasOwnProperty(DashConstants.AVAILABILITY_START_TIME) : false;\n const utcTimingsArray = manifest ? manifest.UTCTiming_asArray : null;\n const utcTimingEntries = [];\n\n // do not bother synchronizing the clock unless MPD is live,\n // or it is static and has availabilityStartTime attribute\n if ((isDynamic || hasAST)) {\n if (utcTimingsArray) {\n // the order is important here - 23009-1 states that the order\n // in the manifest \"indicates relative preference, first having\n // the highest, and the last the lowest priority\".\n utcTimingsArray.forEach(function (utcTiming) {\n const entry = new UTCTiming();\n\n if (utcTiming.hasOwnProperty(Constants.SCHEME_ID_URI)) {\n entry.schemeIdUri = utcTiming.schemeIdUri;\n } else {\n // entries of type DescriptorType with no schemeIdUri\n // are meaningless. let's just ignore this entry and\n // move on.\n return;\n }\n\n // this is (incorrectly) interpreted as a number - schema\n // defines it as a string\n if (utcTiming.hasOwnProperty(DashConstants.VALUE)) {\n entry.value = utcTiming.value.toString();\n } else {\n // without a value, there's not a lot we can do with\n // this entry. let's just ignore this one and move on\n return;\n }\n\n // we're not interested in the optional id or any other\n // attributes which might be attached to the entry\n\n utcTimingEntries.push(entry);\n });\n }\n }\n\n return utcTimingEntries;\n }\n\n function getBaseURLsFromElement(node) {\n const baseUrls = [];\n // if node.BaseURL_asArray and node.baseUri are undefined entries\n // will be [undefined] which entries.some will just skip\n const entries = node.BaseURL_asArray || [node.baseUri];\n let earlyReturn = false;\n\n entries.some(entry => {\n if (entry) {\n const baseUrl = new BaseURL();\n let text = entry.__text || entry;\n\n if (urlUtils.isRelative(text)) {\n // it doesn't really make sense to have relative and\n // absolute URLs at the same level, or multiple\n // relative URLs at the same level, so assume we are\n // done from this level of the MPD\n earlyReturn = true;\n\n // deal with the specific case where the MPD@BaseURL\n // is specified and is relative. when no MPD@BaseURL\n // entries exist, that case is handled by the\n // [node.baseUri] in the entries definition.\n if (node.baseUri) {\n text = urlUtils.resolve(text, node.baseUri);\n }\n }\n\n baseUrl.url = text;\n\n // serviceLocation is optional, but we need it in order\n // to blacklist correctly. if it's not available, use\n // anything unique since there's no relationship to any\n // other BaseURL and, in theory, the url should be\n // unique so use this instead.\n if (entry.hasOwnProperty(DashConstants.SERVICE_LOCATION) &&\n entry.serviceLocation.length) {\n baseUrl.serviceLocation = entry.serviceLocation;\n } else {\n baseUrl.serviceLocation = text;\n }\n\n if (entry.hasOwnProperty(DashConstants.DVB_PRIORITY)) {\n baseUrl.dvb_priority = entry[DashConstants.DVB_PRIORITY];\n }\n\n if (entry.hasOwnProperty(DashConstants.DVB_WEIGHT)) {\n baseUrl.dvb_weight = entry[DashConstants.DVB_WEIGHT];\n }\n\n if (entry.hasOwnProperty(DashConstants.AVAILABILITY_TIME_OFFSET)) {\n baseUrl.availabilityTimeOffset = entry[DashConstants.AVAILABILITY_TIME_OFFSET];\n }\n\n if (entry.hasOwnProperty(DashConstants.AVAILABILITY_TIME_COMPLETE)) {\n baseUrl.availabilityTimeComplete = entry[DashConstants.AVAILABILITY_TIME_COMPLETE] !== 'false';\n }\n /* NOTE: byteRange currently unused\n */\n\n baseUrls.push(baseUrl);\n\n return earlyReturn;\n }\n });\n\n return baseUrls;\n }\n\n function getLocation(manifest) {\n if (manifest && manifest.hasOwnProperty(Constants.LOCATION)) {\n // for now, do not support multiple Locations -\n // just set Location to the first Location.\n manifest.Location = manifest.Location_asArray[0];\n\n return manifest.Location;\n }\n\n // may well be undefined\n return undefined;\n }\n\n function getPatchLocation(manifest) {\n if (manifest && manifest.hasOwnProperty(DashConstants.PATCH_LOCATION)) {\n // only include support for single patch location currently\n manifest.PatchLocation = manifest.PatchLocation_asArray[0];\n\n return manifest.PatchLocation;\n }\n\n // no patch location provided\n return undefined;\n }\n\n function getSuggestedPresentationDelay(mpd) {\n return mpd && mpd.hasOwnProperty(DashConstants.SUGGESTED_PRESENTATION_DELAY) ? mpd.suggestedPresentationDelay : null;\n }\n\n function getAvailabilityStartTime(mpd) {\n return mpd && mpd.hasOwnProperty(DashConstants.AVAILABILITY_START_TIME) && mpd.availabilityStartTime !== null ? mpd.availabilityStartTime.getTime() : null;\n }\n\n function getServiceDescriptions(manifest) {\n const serviceDescriptions = [];\n if (manifest && manifest.hasOwnProperty(DashConstants.SERVICE_DESCRIPTION)) {\n for (const sd of manifest.ServiceDescription_asArray) {\n // Convert each of the properties defined in\n let id, schemeIdUri, latency, playbackRate;\n for (const prop in sd) {\n if (sd.hasOwnProperty(prop)) {\n if (prop === DashConstants.ID) {\n id = sd[prop];\n } else if (prop === DashConstants.SERVICE_DESCRIPTION_SCOPE) {\n schemeIdUri = sd[prop].schemeIdUri;\n } else if (prop === DashConstants.SERVICE_DESCRIPTION_LATENCY) {\n latency = {\n target: sd[prop].target,\n max: sd[prop].max,\n min: sd[prop].min\n };\n } else if (prop === DashConstants.SERVICE_DESCRIPTION_PLAYBACK_RATE) {\n playbackRate = {\n max: sd[prop].max,\n min: sd[prop].min\n };\n }\n }\n }\n // we have a ServiceDescription for low latency. Add it if it really has parameters defined\n if (schemeIdUri === Constants.SERVICE_DESCRIPTION_LL_SCHEME && (latency || playbackRate)) {\n serviceDescriptions.push({\n id,\n schemeIdUri,\n latency,\n playbackRate\n });\n }\n }\n }\n\n return serviceDescriptions;\n }\n\n function getSupplementalProperties(adaptation) {\n const supplementalProperties = {};\n\n if (adaptation && adaptation.hasOwnProperty(DashConstants.SUPPLEMENTAL_PROPERTY)) {\n for (const sp of adaptation.SupplementalProperty_asArray) {\n if (sp.hasOwnProperty(Constants.SCHEME_ID_URI) && sp.hasOwnProperty(DashConstants.VALUE)) {\n supplementalProperties[sp[Constants.SCHEME_ID_URI]] = sp[DashConstants.VALUE];\n }\n }\n }\n return supplementalProperties;\n }\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.errHandler) {\n errHandler = config.errHandler;\n }\n\n if (config.BASE64) {\n BASE64 = config.BASE64;\n }\n }\n\n instance = {\n getIsTypeOf,\n getIsText,\n getIsFragmented,\n getLanguageForAdaptation,\n getViewpointForAdaptation,\n getRolesForAdaptation,\n getAccessibilityForAdaptation,\n getAudioChannelConfigurationForAdaptation,\n getAudioChannelConfigurationForRepresentation,\n getAdaptationForIndex,\n getIndexForAdaptation,\n getAdaptationForId,\n getAdaptationsForType,\n getRealPeriods,\n getRealPeriodForIndex,\n getCodec,\n getSelectionPriority,\n getMimeType,\n getKID,\n getLabelsForAdaptation,\n getContentProtectionData,\n getIsDynamic,\n getId,\n hasProfile,\n getDuration,\n getBandwidth,\n getManifestUpdatePeriod,\n getPublishTime,\n getRepresentationCount,\n getBitrateListForAdaptation,\n getRepresentationFor,\n getRepresentationsForAdaptation,\n getAdaptationsForPeriod,\n getRegularPeriods,\n getMpd,\n getEventsForPeriod,\n getEssentialPropertiesForRepresentation,\n getEventStreamForAdaptationSet,\n getEventStreamForRepresentation,\n getUTCTimingSources,\n getBaseURLsFromElement,\n getRepresentationSortFunction,\n getLocation,\n getPatchLocation,\n getSuggestedPresentationDelay,\n getAvailabilityStartTime,\n getServiceDescriptions,\n getSupplementalProperties,\n setConfig\n };\n\n setup();\n\n return instance;\n}\n\nDashManifestModel.__dashjs_factory_name = 'DashManifestModel';\nexport default FactoryMaker.getSingletonFactory(DashManifestModel);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\nclass ThumbnailTrackInfo {\n constructor() {\n this.bitrate = 0;\n this.width = 0;\n this.height = 0;\n this.tilesHor = 0;\n this.tilesVert = 0;\n this.widthPerTile = 0;\n this.heightPerTile = 0;\n this.startNumber = 0;\n this.segmentDuration = 0;\n this.timescale = 0;\n this.templateUrl = '';\n this.id = '';\n }\n}\n\nexport default ThumbnailTrackInfo;","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport Constants from '../constants/Constants';\nimport DashConstants from '../../dash/constants/DashConstants';\nimport FactoryMaker from '../../core/FactoryMaker';\nimport ThumbnailTrackInfo from '../vo/ThumbnailTrackInfo';\nimport URLUtils from '../../streaming/utils/URLUtils';\nimport {replaceIDForTemplate, getTimeBasedSegment} from '../../dash/utils/SegmentsUtils';\nimport BoxParser from '../../streaming/utils/BoxParser';\nimport XHRLoader from '../../streaming/net/XHRLoader';\nimport DashHandler from '../../dash/DashHandler';\nimport SegmentsController from '../../dash/controllers/SegmentsController';\n\nexport const THUMBNAILS_SCHEME_ID_URIS = ['http://dashif.org/thumbnail_tile',\n 'http://dashif.org/guidelines/thumbnail_tile'];\n\nfunction ThumbnailTracks(config) {\n const context = this.context;\n const adapter = config.adapter;\n const baseURLController = config.baseURLController;\n const streamInfo = config.streamInfo;\n const timelineConverter = config.timelineConverter;\n const debug = config.debug;\n const eventBus = config.eventBus;\n const events = config.events;\n const dashConstants = config.dashConstants;\n\n const urlUtils = URLUtils(context).getInstance();\n\n let instance,\n tracks,\n dashHandler,\n currentTrackIndex,\n mediaInfo,\n segmentsController,\n loader,\n boxParser;\n\n function setup() {\n reset();\n loader = XHRLoader(context).create({});\n boxParser = BoxParser(context).getInstance();\n\n segmentsController = SegmentsController(context).create({\n events,\n eventBus,\n streamInfo,\n timelineConverter,\n dashConstants,\n dashMetrics: config.dashMetrics,\n segmentBaseController: config.segmentBaseController,\n type: Constants.IMAGE\n });\n\n dashHandler = DashHandler(context).create({\n streamInfo,\n type: Constants.IMAGE,\n timelineConverter,\n segmentsController,\n baseURLController,\n debug,\n eventBus,\n events,\n dashConstants,\n urlUtils\n });\n\n // initialize controllers\n dashHandler.initialize(adapter ? adapter.getIsDynamic() : false);\n }\n\n function addTracks() {\n if (!streamInfo || !adapter) {\n return;\n }\n\n // Extract thumbnail tracks\n mediaInfo = adapter.getMediaInfoForType(streamInfo, Constants.IMAGE);\n if (!mediaInfo) {\n return;\n }\n\n const voReps = adapter.getVoRepresentations(mediaInfo);\n\n if (voReps && voReps.length > 0) {\n voReps.forEach((rep) => {\n if ((rep.segmentInfoType === DashConstants.SEGMENT_TEMPLATE && rep.segmentDuration > 0 && rep.media) ||\n rep.segmentInfoType === DashConstants.SEGMENT_TIMELINE) {\n _createTrack(rep);\n }\n if (rep.segmentInfoType === DashConstants.SEGMENT_BASE) {\n _createTrack(rep, true);\n }\n });\n }\n\n if (tracks.length > 0) {\n // Sort bitrates and select the lowest bitrate rendition\n tracks.sort((a, b) => a.bitrate - b.bitrate);\n }\n }\n\n function _createTrack(representation, useSegmentBase) {\n const track = new ThumbnailTrackInfo();\n track.id = representation.id;\n track.bitrate = representation.bandwidth;\n track.width = representation.width;\n track.height = representation.height;\n track.tilesHor = 1;\n track.tilesVert = 1;\n\n if (representation.essentialProperties) {\n representation.essentialProperties.forEach((p) => {\n if (THUMBNAILS_SCHEME_ID_URIS.indexOf(p.schemeIdUri) >= 0 && p.value) {\n const vars = p.value.split('x');\n if (vars.length === 2 && !isNaN(vars[0]) && !isNaN(vars[1])) {\n track.tilesHor = parseInt(vars[0], 10);\n track.tilesVert = parseInt(vars[1], 10);\n }\n }\n });\n }\n\n if (useSegmentBase) {\n segmentsController.updateSegmentData(representation)\n .then((data) => {\n _handleUpdatedSegmentData(track, representation, data);\n });\n\n } else {\n track.startNumber = representation.startNumber;\n track.segmentDuration = representation.segmentDuration;\n track.timescale = representation.timescale;\n track.templateUrl = buildTemplateUrl(representation);\n }\n\n if (track.tilesHor > 0 && track.tilesVert > 0) {\n // Precalculate width and heigth per tile for perf reasons\n track.widthPerTile = track.width / track.tilesHor;\n track.heightPerTile = track.height / track.tilesVert;\n tracks.push(track);\n }\n }\n\n function _handleUpdatedSegmentData(track, representation, data) {\n let cache = [];\n const segments = _normalizeSegments(data, representation);\n representation.segments = segments;\n track.segmentDuration = representation.segments[0].duration; //assume all segments have the same duration\n\n track.readThumbnail = function (time, callback) {\n\n let cached = null;\n cache.some(el => {\n if (el.start <= time && el.end > time) {\n cached = el.url;\n return true;\n }\n });\n if (cached) {\n callback(cached);\n } else {\n representation.segments.some((ss) => {\n if (ss.mediaStartTime <= time && ss.mediaStartTime + ss.duration > time) {\n const baseURL = baseURLController.resolve(representation.path);\n loader.load({\n method: 'get',\n url: baseURL.url,\n request: {\n range: ss.mediaRange,\n responseType: 'arraybuffer'\n },\n onload: function (e) {\n let info = boxParser.getSamplesInfo(e.target.response);\n let blob = new Blob([e.target.response.slice(info.sampleList[0].offset, info.sampleList[0].offset + info.sampleList[0].size)], { type: 'image/jpeg' });\n let imageUrl = window.URL.createObjectURL(blob);\n cache.push({\n start: ss.mediaStartTime,\n end: ss.mediaStartTime + ss.duration,\n url: imageUrl\n });\n if (callback)\n callback(imageUrl);\n }\n });\n return true;\n }\n });\n }\n };\n }\n\n function _normalizeSegments(data, representation) {\n const segments = [];\n let count = 0;\n\n let i,\n len,\n s,\n seg;\n\n for (i = 0, len = data.segments.length; i < len; i++) {\n s = data.segments[i];\n\n seg = getTimeBasedSegment(\n timelineConverter,\n adapter.getIsDynamic(),\n representation,\n s.startTime,\n s.duration,\n s.timescale,\n s.media,\n s.mediaRange,\n count);\n\n if (seg) {\n segments.push(seg);\n seg = null;\n count++;\n }\n }\n return segments;\n }\n\n function buildTemplateUrl(representation) {\n const templateUrl = urlUtils.isRelative(representation.media) ?\n urlUtils.resolve(representation.media, baseURLController.resolve(representation.path).url) : representation.media;\n\n if (!templateUrl) {\n return '';\n }\n\n return replaceIDForTemplate(templateUrl, representation.id);\n }\n\n function getTracks() {\n return tracks;\n }\n\n function getCurrentTrackIndex() {\n return currentTrackIndex;\n }\n\n function getCurrentTrack() {\n if (currentTrackIndex < 0) {\n return null;\n }\n return tracks[currentTrackIndex];\n }\n\n function setTrackByIndex(index) {\n if (!tracks || tracks.length === 0) {\n return;\n }\n // select highest bitrate in case selected index is higher than bitrate list length\n if (index >= tracks.length) {\n index = tracks.length - 1;\n }\n currentTrackIndex = index;\n }\n\n function getThumbnailRequestForTime(time) {\n let currentVoRep;\n const voReps = adapter.getVoRepresentations(mediaInfo);\n for (let i = 0; i < voReps.length; i++) {\n if (tracks[currentTrackIndex].id === voReps[i].id) {\n currentVoRep = voReps[i];\n break;\n }\n }\n\n return dashHandler.getSegmentRequestForTime(mediaInfo, currentVoRep, time);\n }\n\n function reset() {\n tracks = [];\n currentTrackIndex = -1;\n mediaInfo = null;\n }\n\n instance = {\n getTracks,\n addTracks,\n reset,\n setTrackByIndex,\n getCurrentTrack,\n getCurrentTrackIndex,\n getThumbnailRequestForTime\n };\n\n setup();\n\n return instance;\n}\n\nThumbnailTracks.__dashjs_factory_name = 'ThumbnailTracks';\nexport default FactoryMaker.getClassFactory(ThumbnailTracks);\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/**/\n\nvar pna = require('process-nextick-args');\n/**/\n\n/**/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) {\n keys.push(key);\n }return keys;\n};\n/**/\n\nmodule.exports = Duplex;\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\n\nutil.inherits(Duplex, Readable);\n\n{\n // avoid scope creep, the keys array can then be collected\n var keys = objectKeys(Writable.prototype);\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\n\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n\n Readable.call(this, options);\n Writable.call(this, options);\n\n if (options && options.readable === false) this.readable = false;\n\n if (options && options.writable === false) this.writable = false;\n\n this.allowHalfOpen = true;\n if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n this.once('end', onend);\n}\n\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._writableState.highWaterMark;\n }\n});\n\n// the no-half-open enforcer\nfunction onend() {\n // if we allow half-open state, or if the writable side ended,\n // then we're ok.\n if (this.allowHalfOpen || this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n pna.nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n self.end();\n}\n\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n get: function () {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});\n\nDuplex.prototype._destroy = function (err, cb) {\n this.push(null);\n this.end();\n\n pna.nextTick(cb, err);\n};","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport FragmentRequest from '../streaming/vo/FragmentRequest';\nimport {HTTPRequest} from '../streaming/vo/metrics/HTTPRequest';\nimport FactoryMaker from '../core/FactoryMaker';\nimport MediaPlayerEvents from '../streaming/MediaPlayerEvents';\nimport {\n replaceIDForTemplate,\n replaceTokenForTemplate,\n unescapeDollarsInTemplate\n} from './utils/SegmentsUtils';\nimport DashConstants from './constants/DashConstants';\n\n\nconst DEFAULT_ADJUST_SEEK_TIME_THRESHOLD = 0.5;\n\n\nfunction DashHandler(config) {\n\n config = config || {};\n\n const eventBus = config.eventBus;\n const debug = config.debug;\n const urlUtils = config.urlUtils;\n const type = config.type;\n const streamInfo = config.streamInfo;\n const segmentsController = config.segmentsController;\n const timelineConverter = config.timelineConverter;\n const baseURLController = config.baseURLController;\n\n let instance,\n logger,\n lastSegment,\n isDynamicManifest,\n mediaHasFinished;\n\n function setup() {\n logger = debug.getLogger(instance);\n resetInitialSettings();\n\n eventBus.on(MediaPlayerEvents.DYNAMIC_TO_STATIC, _onDynamicToStatic, instance);\n }\n\n function initialize(isDynamic) {\n isDynamicManifest = isDynamic;\n mediaHasFinished = false;\n segmentsController.initialize(isDynamic);\n }\n\n function getStreamId() {\n return streamInfo.id;\n }\n\n function getType() {\n return type;\n }\n\n function getStreamInfo() {\n return streamInfo;\n }\n\n function resetInitialSettings() {\n lastSegment = null;\n }\n\n function reset() {\n resetInitialSettings();\n eventBus.off(MediaPlayerEvents.DYNAMIC_TO_STATIC, _onDynamicToStatic, instance);\n }\n\n function _setRequestUrl(request, destination, representation) {\n const baseURL = baseURLController.resolve(representation.path);\n let url,\n serviceLocation;\n\n if (!baseURL || (destination === baseURL.url) || (!urlUtils.isRelative(destination))) {\n url = destination;\n } else {\n url = baseURL.url;\n serviceLocation = baseURL.serviceLocation;\n\n if (destination) {\n url = urlUtils.resolve(destination, url);\n }\n }\n\n if (urlUtils.isRelative(url)) {\n return false;\n }\n\n request.url = url;\n request.serviceLocation = serviceLocation;\n\n return true;\n }\n\n function getInitRequest(mediaInfo, representation) {\n if (!representation) return null;\n return _generateInitRequest(mediaInfo, representation, getType());\n }\n\n function _generateInitRequest(mediaInfo, representation, mediaType) {\n const request = new FragmentRequest();\n const period = representation.adaptation.period;\n const presentationStartTime = period.start;\n\n request.mediaType = mediaType;\n request.type = HTTPRequest.INIT_SEGMENT_TYPE;\n request.range = representation.range;\n request.availabilityStartTime = timelineConverter.calcAvailabilityStartTimeFromPresentationTime(presentationStartTime, representation, isDynamicManifest);\n request.availabilityEndTime = timelineConverter.calcAvailabilityEndTimeFromPresentationTime(presentationStartTime + period.duration, representation, isDynamicManifest);\n request.quality = representation.index;\n request.mediaInfo = mediaInfo;\n request.representationId = representation.id;\n\n if (_setRequestUrl(request, representation.initialization, representation)) {\n request.url = replaceTokenForTemplate(request.url, 'Bandwidth', representation.bandwidth);\n return request;\n }\n }\n\n function _getRequestForSegment(mediaInfo, segment) {\n if (segment === null || segment === undefined) {\n return null;\n }\n\n const request = new FragmentRequest();\n const representation = segment.representation;\n const bandwidth = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].bandwidth;\n let url = segment.media;\n\n url = replaceTokenForTemplate(url, 'Number', segment.replacementNumber);\n url = replaceTokenForTemplate(url, 'Time', segment.replacementTime);\n url = replaceTokenForTemplate(url, 'Bandwidth', bandwidth);\n url = replaceIDForTemplate(url, representation.id);\n url = unescapeDollarsInTemplate(url);\n\n request.mediaType = getType();\n request.type = HTTPRequest.MEDIA_SEGMENT_TYPE;\n request.range = segment.mediaRange;\n request.startTime = segment.presentationStartTime;\n request.mediaStartTime = segment.mediaStartTime;\n request.duration = segment.duration;\n request.timescale = representation.timescale;\n request.availabilityStartTime = segment.availabilityStartTime;\n request.availabilityEndTime = segment.availabilityEndTime;\n request.wallStartTime = segment.wallStartTime;\n request.quality = representation.index;\n request.index = segment.index;\n request.mediaInfo = mediaInfo;\n request.adaptationIndex = representation.adaptation.index;\n request.representationId = representation.id;\n\n if (_setRequestUrl(request, url, representation)) {\n return request;\n }\n }\n\n function isLastSegmentRequested(representation, bufferingTime) {\n if (!representation || !lastSegment) {\n return false;\n }\n\n // Either transition from dynamic to static was done or no next static segment found\n if (mediaHasFinished) {\n return true;\n }\n\n // Period is endless\n if (!isFinite(representation.adaptation.period.duration)) {\n return false;\n }\n\n // we are replacing existing stuff in the buffer for instance after a track switch\n if (lastSegment.presentationStartTime + lastSegment.duration > bufferingTime) {\n return false;\n }\n\n // Additional segment references may be added to the last period.\n // Additional periods may be added to the end of the MPD.\n // Segment references SHALL NOT be added to any period other than the last period.\n // An MPD update MAY combine adding segment references to the last period with adding of new periods. An MPD update that adds content MAY be combined with an MPD update that removes content.\n // The index of the last requested segment is higher than the number of available segments.\n // For SegmentTimeline and SegmentTemplate the index does not include the startNumber.\n // For SegmentList the index includes the startnumber which is why the numberOfSegments includes this as well\n if (representation.mediaFinishedInformation && !isNaN(representation.mediaFinishedInformation.numberOfSegments) && !isNaN(lastSegment.index) && lastSegment.index >= (representation.mediaFinishedInformation.numberOfSegments - 1)) {\n // For static manifests and Template addressing we can compare the index against the number of available segments\n if (!isDynamicManifest || representation.segmentInfoType === DashConstants.SEGMENT_TEMPLATE) {\n return true;\n }\n // For SegmentList we need to check if the next period is signaled\n else if (isDynamicManifest && representation.segmentInfoType === DashConstants.SEGMENT_LIST && representation.adaptation.period.nextPeriodId) {\n return true\n }\n }\n\n // For dynamic SegmentTimeline manifests we need to check if the next period is already signaled and the segment we fetched before is the last one that is signaled.\n // We can not simply use the index, as numberOfSegments might have decreased after an MPD update\n return !!(isDynamicManifest && representation.adaptation.period.nextPeriodId && representation.segmentInfoType === DashConstants.SEGMENT_TIMELINE && representation.mediaFinishedInformation &&\n !isNaN(representation.mediaFinishedInformation.mediaTimeOfLastSignaledSegment) && lastSegment && !isNaN(lastSegment.mediaStartTime) && !isNaN(lastSegment.duration) && lastSegment.mediaStartTime + lastSegment.duration >= (representation.mediaFinishedInformation.mediaTimeOfLastSignaledSegment - 0.05));\n }\n\n\n function getSegmentRequestForTime(mediaInfo, representation, time) {\n let request = null;\n\n if (!representation || !representation.segmentInfoType) {\n return request;\n }\n\n const segment = segmentsController.getSegmentByTime(representation, time);\n if (segment) {\n lastSegment = segment;\n logger.debug('Index for time ' + time + ' is ' + segment.index);\n request = _getRequestForSegment(mediaInfo, segment);\n }\n\n return request;\n }\n\n /**\n * This function returns the next segment request without modifying any internal variables. Any class (e.g CMCD Model) that needs information about the upcoming request should use this method.\n * @param {object} mediaInfo\n * @param {object} representation\n * @return {FragmentRequest|null}\n */\n function getNextSegmentRequestIdempotent(mediaInfo, representation) {\n let request = null;\n let indexToRequest = lastSegment ? lastSegment.index + 1 : 0;\n const segment = segmentsController.getSegmentByIndex(\n representation,\n indexToRequest,\n lastSegment ? lastSegment.mediaStartTime : -1\n );\n if (!segment) return null;\n request = _getRequestForSegment(mediaInfo, segment);\n return request;\n }\n\n /**\n * Main function to get the next segment request.\n * @param {object} mediaInfo\n * @param {object} representation\n * @return {FragmentRequest|null}\n */\n function getNextSegmentRequest(mediaInfo, representation) {\n let request = null;\n\n if (!representation || !representation.segmentInfoType) {\n return null;\n }\n\n let indexToRequest = lastSegment ? lastSegment.index + 1 : 0;\n\n const segment = segmentsController.getSegmentByIndex(representation, indexToRequest, lastSegment ? lastSegment.mediaStartTime : -1);\n\n // No segment found\n if (!segment) {\n // Dynamic manifest there might be something available in the next iteration\n if (isDynamicManifest && !mediaHasFinished) {\n logger.debug(getType() + ' No segment found at index: ' + indexToRequest + '. Wait for next loop');\n return null;\n } else {\n mediaHasFinished = true;\n }\n } else {\n request = _getRequestForSegment(mediaInfo, segment);\n lastSegment = segment;\n }\n\n return request;\n }\n\n /**\n * This function returns a time for which we can generate a request. It is supposed to be as close as possible to the target time.\n * This is useful in scenarios in which the user seeks into a gap. We will not find a valid request then and need to adjust the seektime.\n * @param {number} time\n * @param {object} mediaInfo\n * @param {object} representation\n * @param {number} targetThreshold\n */\n function getValidSeekTimeCloseToTargetTime(time, mediaInfo, representation, targetThreshold) {\n try {\n\n if (isNaN(time) || !mediaInfo || !representation) {\n return NaN;\n }\n\n if (time < 0) {\n time = 0;\n }\n\n if (isNaN(targetThreshold)) {\n targetThreshold = DEFAULT_ADJUST_SEEK_TIME_THRESHOLD;\n }\n\n if (getSegmentRequestForTime(mediaInfo, representation, time)) {\n return time;\n }\n\n const start = representation.adaptation.period.start;\n const end = representation.adaptation.period.start + representation.adaptation.period.duration;\n let currentUpperTime = Math.min(time + targetThreshold, end);\n let currentLowerTime = Math.max(time - targetThreshold, start);\n let adjustedTime = NaN;\n let targetRequest = null;\n\n while (currentUpperTime <= end || currentLowerTime >= start) {\n let upperRequest = null;\n let lowerRequest = null;\n if (currentUpperTime <= end) {\n upperRequest = getSegmentRequestForTime(mediaInfo, representation, currentUpperTime);\n }\n if (currentLowerTime >= start) {\n lowerRequest = getSegmentRequestForTime(mediaInfo, representation, currentLowerTime);\n }\n\n if (lowerRequest) {\n adjustedTime = currentLowerTime;\n targetRequest = lowerRequest;\n break;\n } else if (upperRequest) {\n adjustedTime = currentUpperTime;\n targetRequest = upperRequest;\n break;\n }\n\n currentUpperTime += targetThreshold;\n currentLowerTime -= targetThreshold;\n }\n\n if (targetRequest) {\n const requestEndTime = targetRequest.startTime + targetRequest.duration;\n\n // Keep the original start time in case it is covered by a segment\n if (time >= targetRequest.startTime && requestEndTime - time > targetThreshold) {\n return time;\n }\n\n // If target time is before the start of the request use request starttime\n if (time < targetRequest.startTime) {\n return targetRequest.startTime;\n }\n\n return Math.min(requestEndTime - targetThreshold, adjustedTime);\n }\n\n return adjustedTime;\n\n\n } catch (e) {\n return NaN;\n }\n }\n\n function getCurrentIndex() {\n return lastSegment ? lastSegment.index : -1;\n }\n\n function _onDynamicToStatic() {\n logger.debug('Dynamic stream complete');\n mediaHasFinished = true;\n }\n\n instance = {\n initialize,\n getStreamId,\n getType,\n getStreamInfo,\n getInitRequest,\n getSegmentRequestForTime,\n getCurrentIndex,\n getNextSegmentRequest,\n isLastSegmentRequested,\n reset,\n getNextSegmentRequestIdempotent,\n getValidSeekTimeCloseToTargetTime\n };\n\n setup();\n\n return instance;\n}\n\nDashHandler.__dashjs_factory_name = 'DashHandler';\nexport default FactoryMaker.getClassFactory(DashHandler);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport FactoryMaker from '../../core/FactoryMaker';\nimport Constants from '../../streaming/constants/Constants';\n\nimport {getTimeBasedSegment} from './SegmentsUtils';\n\nfunction TimelineSegmentsGetter(config, isDynamic) {\n\n config = config || {};\n const timelineConverter = config.timelineConverter;\n const dashMetrics = config.dashMetrics;\n\n let instance;\n\n function checkConfig() {\n if (!timelineConverter) {\n throw new Error(Constants.MISSING_CONFIG_ERROR);\n }\n }\n\n function getMediaFinishedInformation(representation) {\n if (!representation) {\n return 0;\n }\n\n const base = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentTemplate ||\n representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentList;\n const timeline = base.SegmentTimeline;\n\n let time = 0;\n let scaledTime = 0;\n let availableSegments = 0;\n\n let fragments,\n frag,\n i,\n len,\n j,\n repeat,\n fTimescale;\n\n fTimescale = representation.timescale;\n fragments = timeline.S_asArray;\n\n len = fragments.length;\n\n for (i = 0; i < len; i++) {\n frag = fragments[i];\n repeat = 0;\n if (frag.hasOwnProperty('r')) {\n repeat = frag.r;\n }\n\n // For a repeated S element, t belongs only to the first segment\n if (frag.hasOwnProperty('t')) {\n time = frag.t;\n scaledTime = time / fTimescale;\n }\n\n // This is a special case: \"A negative value of the @r attribute of the S element indicates that the duration indicated in @d attribute repeats until the start of the next S element, the end of the Period or until the\n // next MPD update.\"\n if (repeat < 0) {\n const nextFrag = fragments[i + 1];\n repeat = _calculateRepeatCountForNegativeR(representation, nextFrag, frag, fTimescale, scaledTime);\n }\n\n for (j = 0; j <= repeat; j++) {\n availableSegments++;\n\n time += frag.d;\n scaledTime = time / fTimescale;\n }\n }\n\n // We need to account for the index of the segments starting at 0. We subtract 1\n return { numberOfSegments: availableSegments, mediaTimeOfLastSignaledSegment: scaledTime };\n }\n\n function iterateSegments(representation, iterFunc) {\n const base = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentTemplate ||\n representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentList;\n const timeline = base.SegmentTimeline;\n const list = base.SegmentURL_asArray;\n\n let time = 0;\n let scaledTime = 0;\n let relativeIdx = -1;\n\n let fragments,\n frag,\n i,\n len,\n j,\n repeat,\n fTimescale;\n\n fTimescale = representation.timescale;\n fragments = timeline.S_asArray;\n\n let breakIterator = false;\n\n for (i = 0, len = fragments.length; i < len && !breakIterator; i++) {\n frag = fragments[i];\n repeat = 0;\n if (frag.hasOwnProperty('r')) {\n repeat = frag.r;\n }\n\n // For a repeated S element, t belongs only to the first segment\n if (frag.hasOwnProperty('t')) {\n time = frag.t;\n scaledTime = time / fTimescale;\n }\n\n // This is a special case: \"A negative value of the @r attribute of the S element indicates that the duration indicated in @d attribute repeats until the start of the next S element, the end of the Period or until the\n // next MPD update.\"\n if (repeat < 0) {\n const nextFrag = fragments[i + 1];\n repeat = _calculateRepeatCountForNegativeR(representation, nextFrag, frag, fTimescale, scaledTime);\n }\n\n for (j = 0; j <= repeat && !breakIterator; j++) {\n relativeIdx++;\n\n breakIterator = iterFunc(time, scaledTime, base, list, frag, fTimescale, relativeIdx, i);\n\n if (breakIterator) {\n representation.segmentDuration = frag.d / fTimescale;\n }\n\n time += frag.d;\n scaledTime = time / fTimescale;\n }\n }\n }\n\n function _calculateRepeatCountForNegativeR(representation, nextFrag, frag, fTimescale, scaledTime) {\n let repeatEndTime;\n\n if (nextFrag && nextFrag.hasOwnProperty('t')) {\n repeatEndTime = nextFrag.t / fTimescale;\n } else {\n try {\n let availabilityEnd = 0;\n if (!isNaN(representation.adaptation.period.start) && !isNaN(representation.adaptation.period.duration) && isFinite(representation.adaptation.period.duration)) {\n // use end of the Period\n availabilityEnd = representation.adaptation.period.start + representation.adaptation.period.duration;\n } else {\n // use DVR window\n const dvrWindow = dashMetrics.getCurrentDVRInfo();\n availabilityEnd = !isNaN(dvrWindow.end) ? dvrWindow.end : 0;\n }\n repeatEndTime = timelineConverter.calcMediaTimeFromPresentationTime(availabilityEnd, representation);\n representation.segmentDuration = frag.d / fTimescale;\n } catch (e) {\n repeatEndTime = 0;\n }\n }\n\n return Math.max(Math.ceil((repeatEndTime - scaledTime) / (frag.d / fTimescale)) - 1, 0);\n }\n\n\n function getSegmentByIndex(representation, index, lastSegmentTime) {\n checkConfig();\n\n if (!representation) {\n return null;\n }\n\n let segment = null;\n let found = false;\n\n iterateSegments(representation, function (time, scaledTime, base, list, frag, fTimescale, relativeIdx, i) {\n if (found || lastSegmentTime < 0) {\n let media = base.media;\n let mediaRange = frag.mediaRange;\n\n if (list) {\n media = list[i].media || '';\n mediaRange = list[i].mediaRange;\n }\n\n segment = getTimeBasedSegment(\n timelineConverter,\n isDynamic,\n representation,\n time,\n frag.d,\n fTimescale,\n media,\n mediaRange,\n relativeIdx,\n frag.tManifest);\n\n return true;\n } else if (scaledTime >= lastSegmentTime - frag.d * 0.5 / fTimescale) { // same logic, if deviation is\n // 50% of segment duration, segment is found if scaledTime is greater than or equal to (startTime of previous segment - half of the previous segment duration)\n found = true;\n }\n\n return false;\n });\n\n return segment;\n }\n\n function getSegmentByTime(representation, requestedTime) {\n checkConfig();\n\n if (!representation) {\n return null;\n }\n\n if (requestedTime === undefined) {\n requestedTime = null;\n }\n\n let segment = null;\n const requiredMediaTime = timelineConverter.calcMediaTimeFromPresentationTime(requestedTime, representation);\n\n iterateSegments(representation, function (time, scaledTime, base, list, frag, fTimescale, relativeIdx, i) {\n // In some cases when requiredMediaTime = actual end time of the last segment\n // it is possible that this time a bit exceeds the declared end time of the last segment.\n // in this case we still need to include the last segment in the segment list.\n if ((requiredMediaTime < (scaledTime + (frag.d / fTimescale))) && requiredMediaTime >= scaledTime) {\n let media = base.media;\n let mediaRange = frag.mediaRange;\n\n if (list) {\n media = list[i].media || '';\n mediaRange = list[i].mediaRange;\n }\n\n segment = getTimeBasedSegment(\n timelineConverter,\n isDynamic,\n representation,\n time,\n frag.d,\n fTimescale,\n media,\n mediaRange,\n relativeIdx,\n frag.tManifest);\n\n return true;\n }\n\n return false;\n });\n\n return segment;\n }\n\n\n instance = {\n getSegmentByIndex,\n getSegmentByTime,\n getMediaFinishedInformation\n };\n\n return instance;\n}\n\nTimelineSegmentsGetter.__dashjs_factory_name = 'TimelineSegmentsGetter';\nconst factory = FactoryMaker.getClassFactory(TimelineSegmentsGetter);\nexport default factory;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport FactoryMaker from '../../core/FactoryMaker';\nimport Constants from '../../streaming/constants/Constants';\n\nimport {replaceTokenForTemplate, getIndexBasedSegment} from './SegmentsUtils';\n\nfunction TemplateSegmentsGetter(config, isDynamic) {\n config = config || {};\n const timelineConverter = config.timelineConverter;\n\n let instance;\n\n function checkConfig() {\n if (!timelineConverter || !timelineConverter.hasOwnProperty('calcPeriodRelativeTimeFromMpdRelativeTime')) {\n throw new Error(Constants.MISSING_CONFIG_ERROR);\n }\n }\n\n function getMediaFinishedInformation(representation) {\n const mediaFinishedInformation = { numberOfSegments: 0, mediaTimeOfLastSignaledSegment: NaN }\n if (!representation) {\n return mediaFinishedInformation\n }\n\n const duration = representation.segmentDuration;\n if (isNaN(duration)) {\n mediaFinishedInformation.numberOfSegments = 1;\n } else {\n mediaFinishedInformation.numberOfSegments = Math.ceil(representation.adaptation.period.duration / duration);\n }\n\n return mediaFinishedInformation;\n }\n\n function getSegmentByIndex(representation, index) {\n checkConfig();\n\n if (!representation) {\n return null;\n }\n\n const template = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentTemplate;\n\n // This is the index without @startNumber\n index = Math.max(index, 0);\n\n const seg = getIndexBasedSegment(timelineConverter, isDynamic, representation, index);\n if (seg) {\n seg.replacementTime = Math.round((index - 1) * representation.segmentDuration * representation.timescale, 10);\n\n let url = template.media;\n url = replaceTokenForTemplate(url, 'Number', seg.replacementNumber);\n url = replaceTokenForTemplate(url, 'Time', seg.replacementTime);\n seg.media = url;\n }\n\n return seg;\n }\n\n function getSegmentByTime(representation, requestedTime) {\n checkConfig();\n\n if (!representation) {\n return null;\n }\n\n const duration = representation.segmentDuration;\n\n if (isNaN(duration)) {\n return null;\n }\n\n // Calculate the relative time for the requested time in this period\n let periodTime = timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(representation, requestedTime);\n const index = Math.floor(periodTime / duration);\n\n return getSegmentByIndex(representation, index);\n }\n\n instance = {\n getSegmentByIndex,\n getSegmentByTime,\n getMediaFinishedInformation\n };\n\n return instance;\n}\n\nTemplateSegmentsGetter.__dashjs_factory_name = 'TemplateSegmentsGetter';\nconst factory = FactoryMaker.getClassFactory(TemplateSegmentsGetter);\nexport default factory;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport FactoryMaker from '../../core/FactoryMaker';\nimport Constants from '../../streaming/constants/Constants';\n\nimport {getIndexBasedSegment} from './SegmentsUtils';\n\nfunction ListSegmentsGetter(config, isDynamic) {\n\n config = config || {};\n const timelineConverter = config.timelineConverter;\n\n let instance;\n\n function checkConfig() {\n if (!timelineConverter || !timelineConverter.hasOwnProperty('calcPeriodRelativeTimeFromMpdRelativeTime')) {\n throw new Error(Constants.MISSING_CONFIG_ERROR);\n }\n }\n\n function getMediaFinishedInformation(representation) {\n const mediaFinishedInformation = { numberOfSegments: 0, mediaTimeOfLastSignaledSegment: NaN }\n\n if (!representation) {\n return mediaFinishedInformation;\n }\n\n const list = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentList;\n const startNumber = representation && !isNaN(representation.startNumber) ? representation.startNumber : 1;\n const offset = Math.max(startNumber - 1, 0);\n\n mediaFinishedInformation.numberOfSegments = offset + list.SegmentURL_asArray.length;\n\n return mediaFinishedInformation\n }\n\n function getSegmentByIndex(representation, index) {\n checkConfig();\n\n if (!representation) {\n return null;\n }\n\n const list = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentList;\n const len = list.SegmentURL_asArray.length;\n\n const startNumber = representation && !isNaN(representation.startNumber) ? representation.startNumber : 1;\n const offsetToSubtract = Math.max(startNumber - 1, 0);\n\n const relativeIndex = Math.max(index - offsetToSubtract, 0);\n\n let segment = null;\n if (relativeIndex < len) {\n const s = list.SegmentURL_asArray[relativeIndex];\n\n segment = getIndexBasedSegment(timelineConverter, isDynamic, representation, index);\n if (segment) {\n segment.replacementTime = (startNumber + index - 1) * representation.segmentDuration;\n segment.media = s.media ? s.media : '';\n segment.mediaRange = s.mediaRange;\n segment.indexRange = s.indexRange;\n }\n }\n\n return segment;\n }\n\n function getSegmentByTime(representation, requestedTime) {\n checkConfig();\n\n if (!representation) {\n return null;\n }\n\n const duration = representation.segmentDuration;\n\n if (isNaN(duration)) {\n return null;\n }\n\n const periodTime = timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(representation, requestedTime);\n const index = Math.floor(periodTime / duration);\n\n return getSegmentByIndex(representation, index);\n }\n\n instance = {\n getSegmentByIndex,\n getSegmentByTime,\n getMediaFinishedInformation\n };\n\n return instance;\n}\n\nListSegmentsGetter.__dashjs_factory_name = 'ListSegmentsGetter';\nconst factory = FactoryMaker.getClassFactory(ListSegmentsGetter);\nexport default factory;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport FactoryMaker from '../../core/FactoryMaker';\nimport Constants from '../../streaming/constants/Constants';\n\n\nfunction SegmentBaseGetter(config) {\n\n config = config || {};\n const timelineConverter = config.timelineConverter;\n\n let instance;\n\n function checkConfig() {\n if (!timelineConverter || !timelineConverter.hasOwnProperty('calcPeriodRelativeTimeFromMpdRelativeTime')) {\n throw new Error(Constants.MISSING_CONFIG_ERROR);\n }\n }\n\n function getMediaFinishedInformation(representation) {\n const mediaFinishedInformation = { numberOfSegments: 0, mediaTimeOfLastSignaledSegment: NaN }\n\n if (!representation || !representation.segments) {\n return mediaFinishedInformation\n }\n\n mediaFinishedInformation.numberOfSegments = representation.segments.length;\n\n return mediaFinishedInformation;\n }\n\n function getSegmentByIndex(representation, index) {\n checkConfig();\n\n if (!representation) {\n return null;\n }\n\n const len = representation.segments ? representation.segments.length : -1;\n let seg;\n if (index < len) {\n seg = representation.segments[index];\n if (seg && seg.index === index) {\n return seg;\n }\n }\n\n for (let i = 0; i < len; i++) {\n seg = representation.segments[i];\n\n if (seg && seg.index === index) {\n return seg;\n }\n }\n\n return null;\n }\n\n function getSegmentByTime(representation, requestedTime) {\n checkConfig();\n\n const index = getIndexByTime(representation, requestedTime);\n\n return getSegmentByIndex(representation, index);\n }\n\n function getIndexByTime(representation, time) {\n if (!representation) {\n return -1;\n }\n\n const segments = representation.segments;\n const ln = segments ? segments.length : null;\n\n let idx = -1;\n let epsilon,\n seg,\n ft,\n fd,\n i;\n\n if (segments && ln > 0) {\n for (i = 0; i < ln; i++) {\n seg = segments[i];\n ft = seg.presentationStartTime;\n fd = seg.duration;\n\n epsilon = fd / 2;\n if ((time + epsilon) >= ft &&\n (time - epsilon) < (ft + fd)) {\n idx = seg.index;\n break;\n }\n }\n }\n\n return idx;\n }\n\n instance = {\n getSegmentByIndex,\n getSegmentByTime,\n getMediaFinishedInformation\n };\n\n return instance;\n}\n\nSegmentBaseGetter.__dashjs_factory_name = 'SegmentBaseGetter';\nconst factory = FactoryMaker.getClassFactory(SegmentBaseGetter);\nexport default factory;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport FactoryMaker from '../../core/FactoryMaker';\nimport TimelineSegmentsGetter from '../utils/TimelineSegmentsGetter';\nimport TemplateSegmentsGetter from '../utils/TemplateSegmentsGetter';\nimport ListSegmentsGetter from '../utils/ListSegmentsGetter';\nimport SegmentBaseGetter from '../utils/SegmentBaseGetter';\n\nfunction SegmentsController(config) {\n config = config || {};\n\n const context = this.context;\n const dashConstants = config.dashConstants;\n const type = config.type;\n const segmentBaseController = config.segmentBaseController;\n\n let instance,\n getters;\n\n function setup() {\n getters = {};\n }\n\n function initialize(isDynamic) {\n getters[dashConstants.SEGMENT_TIMELINE] = TimelineSegmentsGetter(context).create(config, isDynamic);\n getters[dashConstants.SEGMENT_TEMPLATE] = TemplateSegmentsGetter(context).create(config, isDynamic);\n getters[dashConstants.SEGMENT_LIST] = ListSegmentsGetter(context).create(config, isDynamic);\n getters[dashConstants.SEGMENT_BASE] = SegmentBaseGetter(context).create(config, isDynamic);\n }\n\n function updateInitData(voRepresentation, hasInitialization) {\n if (hasInitialization) {\n return Promise.resolve();\n }\n return segmentBaseController.getSegmentBaseInitSegment({\n representation: voRepresentation,\n mediaType: type\n });\n }\n\n function updateSegmentData(voRepresentation, hasSegments) {\n if (hasSegments) {\n return Promise.resolve();\n }\n return segmentBaseController.getSegmentList({\n mimeType: voRepresentation.mimeType,\n representation: voRepresentation,\n mediaType: type\n });\n }\n\n function getSegmentsGetter(representation) {\n return representation ? representation.segments ? getters[dashConstants.SEGMENT_BASE] : getters[representation.segmentInfoType] : null;\n }\n\n function getSegmentByIndex(representation, index, lastSegmentTime) {\n const getter = getSegmentsGetter(representation);\n return getter ? getter.getSegmentByIndex(representation, index, lastSegmentTime) : null;\n }\n\n function getSegmentByTime(representation, time) {\n const getter = getSegmentsGetter(representation);\n return getter ? getter.getSegmentByTime(representation, time) : null;\n }\n\n function getMediaFinishedInformation(representation) {\n const getter = getSegmentsGetter(representation);\n return getter ? getter.getMediaFinishedInformation(representation) : {\n numberOfSegments: 0,\n mediaTimeOfLastSignaledSegment: NaN\n };\n }\n\n instance = {\n initialize,\n updateInitData,\n updateSegmentData,\n getSegmentByIndex,\n getSegmentByTime,\n getMediaFinishedInformation\n };\n\n setup();\n\n return instance;\n}\n\nSegmentsController.__dashjs_factory_name = 'SegmentsController';\nconst factory = FactoryMaker.getClassFactory(SegmentsController);\nexport default factory;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n\nconst DEFAULT_DVB_PRIORITY = 1;\nconst DEFAULT_DVB_WEIGHT = 1;\n\nclass BaseURL {\n constructor(url, serviceLocation, priority, weight) {\n this.url = url || '';\n this.serviceLocation = serviceLocation || url || '';\n\n // DVB extensions\n this.dvb_priority = priority || DEFAULT_DVB_PRIORITY;\n this.dvb_weight = weight || DEFAULT_DVB_WEIGHT;\n\n this.availabilityTimeOffset = 0;\n this.availabilityTimeComplete = true;\n\n /* currently unused:\n * byteRange,\n */\n }\n}\n\nBaseURL.DEFAULT_DVB_PRIORITY = DEFAULT_DVB_PRIORITY;\nBaseURL.DEFAULT_DVB_WEIGHT = DEFAULT_DVB_WEIGHT;\n\nexport default BaseURL;\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2015-2016, DASH Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * 2. Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n(function(exports) {\n\n \"use strict\";\n\n /**\n * Exceptions from regular ASCII. CodePoints are mapped to UTF-16 codes\n */\n\n var specialCea608CharsCodes = {\n 0x2a : 0xe1, // lowercase a, acute accent\n 0x5c : 0xe9, // lowercase e, acute accent\n 0x5e : 0xed, // lowercase i, acute accent\n 0x5f : 0xf3, // lowercase o, acute accent\n 0x60 : 0xfa, // lowercase u, acute accent\n 0x7b : 0xe7, // lowercase c with cedilla\n 0x7c : 0xf7, // division symbol\n 0x7d : 0xd1, // uppercase N tilde\n 0x7e : 0xf1, // lowercase n tilde\n 0x7f : 0x2588, // Full block\n // THIS BLOCK INCLUDES THE 16 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\n // THAT COME FROM HI BYTE=0x11 AND LOW BETWEEN 0x30 AND 0x3F\n // THIS MEANS THAT \\x50 MUST BE ADDED TO THE VALUES\n 0x80 : 0xae, // Registered symbol (R)\n 0x81 : 0xb0, // degree sign\n 0x82 : 0xbd, // 1/2 symbol\n 0x83 : 0xbf, // Inverted (open) question mark\n 0x84 : 0x2122, // Trademark symbol (TM)\n 0x85 : 0xa2, // Cents symbol\n 0x86 : 0xa3, // Pounds sterling\n 0x87 : 0x266a, // Music 8'th note\n 0x88 : 0xe0, // lowercase a, grave accent\n 0x89 : 0x20, // transparent space (regular)\n 0x8a : 0xe8, // lowercase e, grave accent\n 0x8b : 0xe2, // lowercase a, circumflex accent\n 0x8c : 0xea, // lowercase e, circumflex accent\n 0x8d : 0xee, // lowercase i, circumflex accent\n 0x8e : 0xf4, // lowercase o, circumflex accent\n 0x8f : 0xfb, // lowercase u, circumflex accent\n // THIS BLOCK INCLUDES THE 32 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\n // THAT COME FROM HI BYTE=0x12 AND LOW BETWEEN 0x20 AND 0x3F\n 0x90 : 0xc1, // capital letter A with acute\n 0x91 : 0xc9, // capital letter E with acute\n 0x92 : 0xd3, // capital letter O with acute\n 0x93 : 0xda, // capital letter U with acute\n 0x94 : 0xdc, // capital letter U with diaresis\n 0x95 : 0xfc, // lowercase letter U with diaeresis\n 0x96 : 0x2018, // opening single quote\n 0x97 : 0xa1, // inverted exclamation mark\n 0x98 : 0x2a, // asterisk\n 0x99 : 0x2019, // closing single quote\n 0x9a : 0x2501, // box drawings heavy horizontal\n 0x9b : 0xa9, // copyright sign\n 0x9c : 0x2120, // Service mark\n 0x9d : 0x2022, // (round) bullet\n 0x9e : 0x201c, // Left double quotation mark\n 0x9f : 0x201d, // Right double quotation mark\n 0xa0 : 0xc0, // uppercase A, grave accent\n 0xa1 : 0xc2, // uppercase A, circumflex\n 0xa2 : 0xc7, // uppercase C with cedilla\n 0xa3 : 0xc8, // uppercase E, grave accent\n 0xa4 : 0xca, // uppercase E, circumflex\n 0xa5 : 0xcb, // capital letter E with diaresis\n 0xa6 : 0xeb, // lowercase letter e with diaresis\n 0xa7 : 0xce, // uppercase I, circumflex\n 0xa8 : 0xcf, // uppercase I, with diaresis\n 0xa9 : 0xef, // lowercase i, with diaresis\n 0xaa : 0xd4, // uppercase O, circumflex\n 0xab : 0xd9, // uppercase U, grave accent\n 0xac : 0xf9, // lowercase u, grave accent\n 0xad : 0xdb, // uppercase U, circumflex\n 0xae : 0xab, // left-pointing double angle quotation mark\n 0xaf : 0xbb, // right-pointing double angle quotation mark\n // THIS BLOCK INCLUDES THE 32 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\n // THAT COME FROM HI BYTE=0x13 AND LOW BETWEEN 0x20 AND 0x3F\n 0xb0 : 0xc3, // Uppercase A, tilde\n 0xb1 : 0xe3, // Lowercase a, tilde\n 0xb2 : 0xcd, // Uppercase I, acute accent\n 0xb3 : 0xcc, // Uppercase I, grave accent\n 0xb4 : 0xec, // Lowercase i, grave accent\n 0xb5 : 0xd2, // Uppercase O, grave accent\n 0xb6 : 0xf2, // Lowercase o, grave accent\n 0xb7 : 0xd5, // Uppercase O, tilde\n 0xb8 : 0xf5, // Lowercase o, tilde\n 0xb9 : 0x7b, // Open curly brace\n 0xba : 0x7d, // Closing curly brace\n 0xbb : 0x5c, // Backslash\n 0xbc : 0x5e, // Caret\n 0xbd : 0x5f, // Underscore\n 0xbe : 0x7c, // Pipe (vertical line)\n 0xbf : 0x223c, // Tilde operator\n 0xc0 : 0xc4, // Uppercase A, umlaut\n 0xc1 : 0xe4, // Lowercase A, umlaut\n 0xc2 : 0xd6, // Uppercase O, umlaut\n 0xc3 : 0xf6, // Lowercase o, umlaut\n 0xc4 : 0xdf, // Esszett (sharp S)\n 0xc5 : 0xa5, // Yen symbol\n 0xc6 : 0xa4, // Generic currency sign\n 0xc7 : 0x2503, // Box drawings heavy vertical\n 0xc8 : 0xc5, // Uppercase A, ring\n 0xc9 : 0xe5, // Lowercase A, ring\n 0xca : 0xd8, // Uppercase O, stroke\n 0xcb : 0xf8, // Lowercase o, strok\n 0xcc : 0x250f, // Box drawings heavy down and right\n 0xcd : 0x2513, // Box drawings heavy down and left\n 0xce : 0x2517, // Box drawings heavy up and right\n 0xcf : 0x251b // Box drawings heavy up and left\n };\n\n /**\n * Get Unicode Character from CEA-608 byte code\n */\n var getCharForByte = function(byte) {\n var charCode = byte;\n if (specialCea608CharsCodes.hasOwnProperty(byte)) {\n charCode = specialCea608CharsCodes[byte];\n }\n return String.fromCharCode(charCode);\n };\n\n var NR_ROWS = 15,\n NR_COLS = 32;\n // Tables to look up row from PAC data\n var rowsLowCh1 = {0x11 : 1, 0x12 : 3, 0x15 : 5, 0x16 : 7, 0x17 : 9, 0x10 : 11, 0x13 : 12, 0x14 : 14};\n var rowsHighCh1 = {0x11 : 2, 0x12 : 4, 0x15 : 6, 0x16 : 8, 0x17 : 10, 0x13 : 13, 0x14 : 15};\n var rowsLowCh2 = {0x19 : 1, 0x1A : 3, 0x1D : 5, 0x1E : 7, 0x1F : 9, 0x18 : 11, 0x1B : 12, 0x1C : 14};\n var rowsHighCh2 = {0x19 : 2, 0x1A : 4, 0x1D : 6, 0x1E : 8, 0x1F : 10, 0x1B : 13, 0x1C : 15};\n\n var backgroundColors = ['white', 'green', 'blue', 'cyan', 'red', 'yellow', 'magenta', 'black', 'transparent'];\n\n /**\n * Simple logger class to be able to write with time-stamps and filter on level.\n */\n var logger = {\n verboseFilter : {'DATA' : 3, 'DEBUG' : 3, 'INFO' : 2, 'WARNING' : 2, 'TEXT' : 1, 'ERROR' : 0},\n time : null,\n verboseLevel : 0, // Only write errors\n setTime : function(newTime) {\n this.time = newTime;\n },\n log : function(severity, msg) {\n var minLevel = this.verboseFilter[severity];\n if (this.verboseLevel >= minLevel) {\n console.log(this.time + \" [\" + severity + \"] \" + msg);\n }\n }\n };\n\n var numArrayToHexArray = function(numArray) {\n var hexArray = [];\n for (var j = 0; j < numArray.length; j++) {\n hexArray.push(numArray[j].toString(16));\n }\n return hexArray;\n };\n\n /**\n * State of CEA-608 pen or character\n * @constructor\n */\n var PenState = function(foreground, underline, italics, background, flash) {\n this.foreground = foreground || \"white\";\n this.underline = underline || false;\n this.italics = italics || false;\n this.background = background || \"black\";\n this.flash = flash || false;\n };\n\n PenState.prototype = {\n \n reset : function() {\n this.foreground = \"white\";\n this.underline = false;\n this.italics = false;\n this.background = \"black\";\n this.flash = false;\n },\n \n setStyles : function(styles) {\n var attribs = [\"foreground\", \"underline\", \"italics\", \"background\", \"flash\"];\n for (var i = 0 ; i < attribs.length; i++) {\n var style = attribs[i];\n if (styles.hasOwnProperty(style)) {\n this[style] = styles[style];\n }\n }\n },\n \n isDefault : function() {\n return (this.foreground === \"white\" && !this.underline && !this.italics && \n this.background === \"black\" && !this.flash);\n },\n\n equals : function(other) {\n return ( (this.foreground === other.foreground) && \n (this.underline === other.underline) &&\n (this.italics === other.italics) &&\n (this.background === other.background) &&\n (this.flash === other.flash) );\n },\n\n copy : function(newPenState) {\n this.foreground = newPenState.foreground;\n this.underline = newPenState.underline;\n this.italics = newPenState.italics;\n this.background = newPenState.background;\n this.flash = newPenState.flash;\n },\n \n toString: function() {\n return (\"color=\" + this.foreground + \", underline=\" + this.underline + \", italics=\" + this.italics +\n \", background=\" + this.background + \", flash=\" + this.flash);\n }\n };\n\n /**\n * Unicode character with styling and background.\n * @constructor\n */\n var StyledUnicodeChar = function(uchar, foreground, underline, italics, background, flash) {\n this.uchar = uchar || ' '; // unicode character\n this.penState = new PenState(foreground, underline,italics, background, flash);\n };\n\n StyledUnicodeChar.prototype = {\n \n reset: function() {\n this.uchar = ' ';\n this.penState.reset();\n },\n \n setChar: function(uchar, newPenState) {\n this.uchar = uchar;\n this.penState.copy(newPenState);\n },\n \n setPenState: function(newPenState) {\n this.penState.copy(newPenState);\n },\n \n equals: function(other) {\n return this.uchar === other.uchar && this.penState.equals(other.penState);\n },\n \n copy: function(newChar) {\n this.uchar = newChar.uchar;\n this.penState.copy(newChar.penState);\n },\n \n isEmpty : function() {\n return this.uchar === ' ' && this.penState.isDefault();\n }\n };\n\n /**\n * CEA-608 row consisting of NR_COLS instances of StyledUnicodeChar.\n * @constructor\n */\n var Row = function() {\n this.chars = [];\n for (var i = 0 ; i < NR_COLS ; i++) {\n this.chars.push(new StyledUnicodeChar());\n }\n this.pos = 0;\n this.currPenState = new PenState();\n };\n\n Row.prototype = {\n \n equals: function(other) {\n var equal = true;\n for (var i = 0 ; i < NR_COLS; i ++) {\n if (!this.chars[i].equals(other.chars[i])) {\n equal = false;\n break;\n }\n }\n return equal;\n },\n \n copy: function(other) {\n for (var i = 0 ; i < NR_COLS; i ++) {\n this.chars[i].copy(other.chars[i]);\n }\n },\n \n isEmpty : function() {\n var empty = true;\n for (var i = 0 ; i < NR_COLS; i ++) {\n if (!this.chars[i].isEmpty()) {\n empty = false;\n break;\n }\n }\n return empty;\n },\n\n /**\n * Set the cursor to a valid column.\n */\n setCursor : function(absPos) {\n if (this.pos !== absPos) {\n this.pos = absPos;\n }\n if (this.pos < 0) {\n logger.log(\"ERROR\", \"Negative cursor position \" + this.pos);\n this.pos = 0;\n } else if (this.pos > NR_COLS) {\n logger.log(\"ERROR\", \"Too large cursor position \" + this.pos);\n this.pos = NR_COLS;\n }\n },\n\n /** \n * Move the cursor relative to current position.\n */\n moveCursor : function(relPos) {\n var newPos = this.pos + relPos;\n if (relPos > 1) {\n for (var i = this.pos+1; i < newPos+1 ; i++) {\n this.chars[i].setPenState(this.currPenState);\n }\n }\n this.setCursor(newPos);\n },\n\n /**\n * Backspace, move one step back and clear character.\n */\n backSpace : function () {\n this.moveCursor(-1);\n this.chars[this.pos].setChar(' ', this.currPenState);\n },\n\n insertChar: function(byte) {\n if (byte >= 0x90) { //Extended char\n this.backSpace();\n }\n var char = getCharForByte(byte);\n if (this.pos >= NR_COLS) {\n logger.log(\"ERROR\", \"Cannot insert \" + byte.toString(16) + \n \" (\" + char + \") at position \" + this.pos + \". Skipping it!\");\n return;\n }\n this.chars[this.pos].setChar(char, this.currPenState);\n this.moveCursor(1);\n },\n\n clearFromPos : function(startPos) {\n var i;\n for (i = startPos ; i < NR_COLS ; i++) {\n this.chars[i].reset();\n }\n },\n\n clear : function() {\n this.clearFromPos(0);\n this.pos = 0;\n this.currPenState.reset();\n },\n\n clearToEndOfRow : function() {\n this.clearFromPos(this.pos);\n },\n\n getTextString: function() {\n var chars = [];\n var empty = true;\n for (var i = 0 ; i < NR_COLS ; i++) {\n var char = this.chars[i].uchar;\n if (char !== \" \") {\n empty = false;\n }\n chars.push(char);\n }\n if (empty) {\n return \"\";\n } else {\n return chars.join(\"\");\n }\n },\n\n setPenStyles: function(styles) {\n this.currPenState.setStyles(styles);\n var currChar = this.chars[this.pos];\n currChar.setPenState(this.currPenState);\n }\n };\n\n /**\n * Keep a CEA-608 screen of 32x15 styled characters\n * @constructor\n */\n var CaptionScreen = function() {\n\n this.rows = [];\n for (var i = 0 ; i < NR_ROWS; i++) {\n this.rows.push(new Row()); // Note that we use zero-based numbering (0-14)\n }\n this.currRow = NR_ROWS - 1;\n this.nrRollUpRows = null;\n this.reset();\n };\n\n CaptionScreen.prototype = {\n\n reset : function() {\n for (var i = 0 ; i < NR_ROWS ; i++) {\n this.rows[i].clear();\n }\n this.currRow = NR_ROWS - 1;\n },\n\n equals : function(other) {\n var equal = true;\n for (var i = 0 ; i < NR_ROWS ; i++) {\n if (!this.rows[i].equals(other.rows[i])) {\n equal = false;\n break;\n }\n }\n return equal;\n },\n\n copy : function(other) {\n for (var i = 0 ; i < NR_ROWS ; i++) {\n this.rows[i].copy(other.rows[i]);\n }\n },\n\n isEmpty : function() {\n var empty = true;\n for (var i = 0 ; i < NR_ROWS ; i++) {\n if (!this.rows[i].isEmpty()) {\n empty = false;\n break;\n }\n }\n return empty;\n },\n\n backSpace : function() {\n var row = this.rows[this.currRow]; \n row.backSpace();\n },\n\n clearToEndOfRow : function() {\n var row = this.rows[this.currRow];\n row.clearToEndOfRow();\n },\n\n /**\n * Insert a character (without styling) in the current row.\n */\n insertChar : function(char) {\n var row = this.rows[this.currRow];\n row.insertChar(char);\n },\n\n setPen : function(styles) {\n var row = this.rows[this.currRow];\n row.setPenStyles(styles);\n },\n\n moveCursor : function(relPos) {\n var row = this.rows[this.currRow];\n row.moveCursor(relPos); \n },\n\n setCursor : function(absPos) {\n logger.log(\"INFO\", \"setCursor: \" + absPos);\n var row = this.rows[this.currRow];\n row.setCursor(absPos);\n },\n\n setPAC : function(pacData) {\n logger.log(\"INFO\", \"pacData = \" + JSON.stringify(pacData));\n var newRow = pacData.row - 1;\n if (this.nrRollUpRows && newRow < this.nrRollUpRows - 1) {\n newRow = this.nrRollUpRows-1;\n }\n this.currRow = newRow;\n var row = this.rows[this.currRow];\n if (pacData.indent !== null) {\n var indent = pacData.indent;\n var prevPos = Math.max(indent-1, 0);\n row.setCursor(pacData.indent);\n pacData.color = row.chars[prevPos].penState.foreground;\n }\n var styles = {foreground : pacData.color, underline : pacData.underline, italics : pacData.italics, background : 'black', flash : false};\n this.setPen(styles);\n },\n\n /**\n * Set background/extra foreground, but first do back_space, and then insert space (backwards compatibility).\n */\n setBkgData : function(bkgData) {\n\n logger.log(\"INFO\", \"bkgData = \" + JSON.stringify(bkgData));\n this.backSpace();\n this.setPen(bkgData);\n this.insertChar(0x20); //Space\n },\n\n setRollUpRows : function(nrRows) {\n this.nrRollUpRows = nrRows;\n },\n\n rollUp : function() {\n if (this.nrRollUpRows === null) {\n logger.log(\"DEBUG\", \"roll_up but nrRollUpRows not set yet\");\n return; //Not properly setup\n }\n logger.log(\"TEXT\", this.getDisplayText());\n var topRowIndex = this.currRow + 1 - this.nrRollUpRows;\n var topRow = this.rows.splice(topRowIndex, 1)[0];\n topRow.clear();\n this.rows.splice(this.currRow, 0, topRow);\n logger.log(\"INFO\", \"Rolling up\");\n //logger.log(\"TEXT\", this.get_display_text())\n },\n\n /**\n * Get all non-empty rows with as unicode text. \n */ \n getDisplayText : function(asOneRow) {\n asOneRow = asOneRow || false;\n var displayText = [];\n var text = \"\";\n var rowNr = -1;\n for (var i = 0 ; i < NR_ROWS ; i++) {\n var rowText = this.rows[i].getTextString();\n if (rowText) {\n rowNr = i+1;\n if (asOneRow) {\n displayText.push(\"Row \" + rowNr + ': \"' + rowText + '\"');\n } else {\n displayText.push(rowText.trim());\n }\n }\n }\n if (displayText.length > 0) {\n if (asOneRow) {\n text = \"[\" + displayText.join(\" | \") + \"]\";\n } else {\n text = displayText.join(\"\\n\");\n }\n }\n return text;\n },\n\n getTextAndFormat : function() {\n return this.rows;\n }\n };\n\n /**\n * Handle a CEA-608 channel and send decoded data to outputFilter\n * @constructor\n * @param {Number} channelNumber (1 or 2)\n * @param {CueHandler} outputFilter Output from channel1 newCue(startTime, endTime, captionScreen)\n */\n var Cea608Channel = function(channelNumber, outputFilter) {\n\n this.chNr = channelNumber;\n this.outputFilter = outputFilter;\n this.mode = null;\n this.verbose = 0;\n this.displayedMemory = new CaptionScreen();\n this.nonDisplayedMemory = new CaptionScreen();\n this.lastOutputScreen = new CaptionScreen();\n this.currRollUpRow = this.displayedMemory.rows[NR_ROWS-1];\n this.writeScreen = this.displayedMemory;\n this.mode = null;\n this.cueStartTime = null; // Keeps track of where a cue started.\n };\n\n Cea608Channel.prototype = {\n \n modes : [\"MODE_ROLL-UP\", \"MODE_POP-ON\", \"MODE_PAINT-ON\", \"MODE_TEXT\"],\n \n reset : function() {\n this.mode = null;\n this.displayedMemory.reset();\n this.nonDisplayedMemory.reset();\n this.lastOutputScreen.reset();\n this.currRollUpRow = this.displayedMemory.rows[NR_ROWS-1];\n this.writeScreen = this.displayedMemory;\n this.mode = null;\n this.cueStartTime = null;\n this.lastCueEndTime = null;\n },\n\n getHandler : function() {\n return this.outputFilter;\n },\n\n setHandler : function(newHandler) {\n this.outputFilter = newHandler;\n },\n\n setPAC : function(pacData) {\n this.writeScreen.setPAC(pacData);\n },\n\n setBkgData : function(bkgData) {\n this.writeScreen.setBkgData(bkgData);\n },\n\n setMode : function(newMode) {\n if (newMode === this.mode) {\n return;\n }\n this.mode = newMode;\n logger.log(\"INFO\", \"MODE=\" + newMode);\n if (this.mode == \"MODE_POP-ON\") {\n this.writeScreen = this.nonDisplayedMemory;\n } else {\n this.writeScreen = this.displayedMemory;\n this.writeScreen.reset();\n }\n if (this.mode !== \"MODE_ROLL-UP\") {\n this.displayedMemory.nrRollUpRows = null;\n this.nonDisplayedMemory.nrRollUpRows = null;\n }\n this.mode = newMode;\n },\n\n insertChars : function(chars) {\n for (var i = 0 ; i < chars.length ; i++) {\n this.writeScreen.insertChar(chars[i]);\n }\n var screen = this.writeScreen === this.displayedMemory ? \"DISP\" : \"NON_DISP\";\n logger.log(\"INFO\", screen + \": \" + this.writeScreen.getDisplayText(true));\n if (this.mode === \"MODE_PAINT-ON\" || this.mode === \"MODE_ROLL-UP\") {\n logger.log(\"TEXT\", \"DISPLAYED: \" + this.displayedMemory.getDisplayText(true));\n this.outputDataUpdate();\n }\n },\n\n cc_RCL: function() { // Resume Caption Loading (switch mode to Pop On)\n logger.log(\"INFO\", \"RCL - Resume Caption Loading\");\n this.setMode(\"MODE_POP-ON\");\n },\n cc_BS: function() { // BackSpace\n logger.log(\"INFO\", \"BS - BackSpace\");\n if (this.mode === \"MODE_TEXT\") {\n return;\n }\n this.writeScreen.backSpace();\n if (this.writeScreen === this.displayedMemory) {\n this.outputDataUpdate();\n }\n },\n cc_AOF : function() { // Reserved (formerly Alarm Off)\n return;\n },\n cc_AON: function() { // Reserved (formerly Alarm On)\n return;\n },\n cc_DER: function() { // Delete to End of Row\n logger.log(\"INFO\", \"DER- Delete to End of Row\");\n this.writeScreen.clearToEndOfRow();\n this.outputDataUpdate();\n },\n cc_RU: function(nrRows) { //Roll-Up Captions-2,3,or 4 Rows\n logger.log(\"INFO\", \"RU(\" + nrRows +\") - Roll Up\");\n this.writeScreen = this.displayedMemory;\n this.setMode(\"MODE_ROLL-UP\");\n this.writeScreen.setRollUpRows(nrRows);\n },\n cc_FON: function() { //Flash On\n logger.log(\"INFO\", \"FON - Flash On\");\n this.writeScreen.setPen({flash : true});\n },\n cc_RDC: function() { // Resume Direct Captioning (switch mode to PaintOn)\n logger.log(\"INFO\", \"RDC - Resume Direct Captioning\");\n this.setMode(\"MODE_PAINT-ON\");\n },\n cc_TR: function() { // Text Restart in text mode (not supported, however)\n logger.log(\"INFO\", \"TR\");\n this.setMode(\"MODE_TEXT\");\n },\n cc_RTD: function() { // Resume Text Display in Text mode (not supported, however)\n logger.log(\"INFO\", \"RTD\");\n this.setMode(\"MODE_TEXT\");\n },\n cc_EDM: function() { // Erase Displayed Memory\n logger.log(\"INFO\", \"EDM - Erase Displayed Memory\");\n this.displayedMemory.reset();\n this.outputDataUpdate();\n },\n cc_CR: function() { // Carriage Return\n logger.log(\"CR - Carriage Return\");\n this.writeScreen.rollUp();\n this.outputDataUpdate();\n },\n cc_ENM: function() { //Erase Non-Displayed Memory\n logger.log(\"INFO\", \"ENM - Erase Non-displayed Memory\");\n this.nonDisplayedMemory.reset();\n },\n cc_EOC: function() { //End of Caption (Flip Memories)\n logger.log(\"INFO\", \"EOC - End Of Caption\");\n if (this.mode === \"MODE_POP-ON\") {\n var tmp = this.displayedMemory;\n this.displayedMemory = this.nonDisplayedMemory;\n this.nonDisplayedMemory = tmp;\n this.writeScreen = this.nonDisplayedMemory;\n logger.log(\"TEXT\", \"DISP: \" + this.displayedMemory.getDisplayText());\n }\n this.outputDataUpdate();\n },\n cc_TO: function(nrCols) { // Tab Offset 1,2, or 3 columns\n logger.log(\"INFO\", \"TO(\" + nrCols + \") - Tab Offset\");\n this.writeScreen.moveCursor(nrCols);\n },\n cc_MIDROW: function(secondByte) { // Parse MIDROW command\n var styles = {flash : false};\n styles.underline = secondByte % 2 === 1;\n styles.italics = secondByte >= 0x2e;\n if (!styles.italics) {\n var colorIndex = Math.floor(secondByte/2) - 0x10;\n var colors = [\"white\", \"green\", \"blue\", \"cyan\", \"red\", \"yellow\", \"magenta\"];\n styles.foreground = colors[colorIndex];\n } else {\n styles.foreground = \"white\";\n }\n logger.log(\"INFO\", \"MIDROW: \" + JSON.stringify(styles));\n this.writeScreen.setPen(styles);\n },\n\n outputDataUpdate: function() {\n var t = logger.time;\n if (t === null) {\n return;\n }\n if (this.outputFilter) {\n if (this.outputFilter.updateData) {\n this.outputFilter.updateData(t, this.displayedMemory);\n }\n if (this.cueStartTime === null && !this.displayedMemory.isEmpty()) { // Start of a new cue\n this.cueStartTime = t;\n } else {\n if (!this.displayedMemory.equals(this.lastOutputScreen)) { \n if (this.outputFilter.newCue) {\n this.outputFilter.newCue(this.cueStartTime, t, this.lastOutputScreen);\n }\n this.cueStartTime = this.displayedMemory.isEmpty() ? null : t;\n }\n }\n this.lastOutputScreen.copy(this.displayedMemory);\n }\n },\n\n cueSplitAtTime : function(t) {\n if (this.outputFilter) {\n if (!this.displayedMemory.isEmpty()) {\n if (this.outputFilter.newCue) {\n this.outputFilter.newCue(this.cueStartTime, t, this.displayedMemory);\n }\n this.cueStartTime = t;\n }\n }\n }\n };\n\n /**\n * Parse CEA-608 data and send decoded data to out1 and out2.\n * @constructor\n * @param {Number} field CEA-608 field (1 or 2)\n * @param {CueHandler} out1 Output from channel1 newCue(startTime, endTime, captionScreen)\n * @param {CueHandler} out2 Output from channel2 newCue(startTime, endTime, captionScreen)\n */\n var Cea608Parser = function(field, out1, out2) {\n this.field = field || 1;\n this.outputs = [out1, out2];\n this.channels = [new Cea608Channel(1, out1), new Cea608Channel(2, out2)];\n this.currChNr = -1; // Will be 1 or 2\n this.lastCmdA = null; // First byte of last command\n this.lastCmdB = null; // Second byte of last command\n this.bufferedData = [];\n this.startTime = null;\n this.lastTime = null;\n this.dataCounters = {'padding' : 0, 'char' : 0, 'cmd' : 0, 'other' : 0};\n };\n\n Cea608Parser.prototype = {\n \n getHandler : function(index) {\n return this.channels[index].getHandler();\n },\n \n setHandler : function(index, newHandler) {\n this.channels[index].setHandler(newHandler);\n },\n\n /**\n * Add data for time t in forms of list of bytes (unsigned ints). The bytes are treated as pairs.\n */\n addData : function(t, byteList) {\n var cmdFound, a, b, \n charsFound = false;\n \n this.lastTime = t;\n logger.setTime(t);\n\n for (var i = 0 ; i < byteList.length ; i+=2) {\n a = byteList[i] & 0x7f;\n b = byteList[i+1] & 0x7f;\n\n if (a >= 0x10 && a <= 0x1f && a === this.lastCmdA && b === this.lastCmdB) {\n this.lastCmdA = null;\n this.lastCmdB = null;\n logger.log(\"DEBUG\", \"Repeated command (\" + numArrayToHexArray([a, b]) + \") is dropped\");\n continue; // Repeated commands are dropped (once)\n }\n\n if (a === 0 && b === 0) {\n this.dataCounters.padding += 2;\n continue;\n } else {\n logger.log(\"DATA\", \"[\" + numArrayToHexArray([byteList[i], byteList[i+1]]) +\"] -> (\" + numArrayToHexArray([a, b]) + \")\");\n }\n cmdFound = this.parseCmd(a, b);\n if (!cmdFound) {\n cmdFound = this.parseMidrow(a, b);\n }\n if (!cmdFound) {\n cmdFound = this.parsePAC(a, b);\n }\n if (!cmdFound) {\n cmdFound = this.parseBackgroundAttributes(a, b);\n }\n if (!cmdFound) {\n charsFound = this.parseChars(a, b);\n if (charsFound) {\n if (this.currChNr && this.currChNr >=0) {\n var channel = this.channels[this.currChNr-1];\n channel.insertChars(charsFound);\n } else {\n logger.log(\"WARNING\", \"No channel found yet. TEXT-MODE?\");\n }\n }\n }\n if (cmdFound) {\n this.dataCounters.cmd += 2;\n } else if (charsFound) {\n this.dataCounters.char += 2;\n } else {\n this.dataCounters.other += 2;\n logger.log(\"WARNING\", \"Couldn't parse cleaned data \" + numArrayToHexArray([a, b]) +\n \" orig: \" + numArrayToHexArray([byteList[i], byteList[i+1]]));\n }\n }\n },\n\n /**\n * Parse Command.\n * @returns {Boolean} Tells if a command was found\n */\n parseCmd: function(a, b) {\n var chNr = null;\n\n var cond1 = (a === 0x14 || a === 0x15 || a === 0x1C || a === 0x1D) && (0x20 <= b && b <= 0x2F);\n var cond2 = (a === 0x17 || a === 0x1F) && (0x21 <= b && b <= 0x23);\n if (!(cond1 || cond2)) {\n return false;\n }\n \n if (a === 0x14 || a === 0x15 || a === 0x17) {\n chNr = 1;\n } else {\n chNr = 2; // (a === 0x1C || a === 0x1D || a=== 0x1f)\n }\n\n var channel = this.channels[chNr - 1];\n\n if (a === 0x14 || a === 0x15 || a === 0x1C || a === 0x1D) {\n if (b === 0x20) {\n channel.cc_RCL();\n } else if (b === 0x21) {\n channel.cc_BS();\n } else if (b === 0x22) {\n channel.cc_AOF();\n } else if (b === 0x23) {\n channel.cc_AON();\n } else if (b === 0x24) {\n channel.cc_DER();\n } else if (b === 0x25) {\n channel.cc_RU(2);\n } else if (b === 0x26) {\n channel.cc_RU(3);\n } else if (b === 0x27) {\n channel.cc_RU(4);\n } else if (b === 0x28) {\n channel.cc_FON();\n } else if (b === 0x29) {\n channel.cc_RDC();\n } else if (b === 0x2A) {\n channel.cc_TR();\n } else if (b === 0x2B) {\n channel.cc_RTD();\n } else if (b === 0x2C) {\n channel.cc_EDM();\n } else if (b === 0x2D) {\n channel.cc_CR();\n } else if (b === 0x2E) {\n channel.cc_ENM();\n } else if (b === 0x2F) {\n channel.cc_EOC();\n }\n } else { //a == 0x17 || a == 0x1F\n channel.cc_TO(b - 0x20);\n }\n this.lastCmdA = a;\n this.lastCmdB = b;\n this.currChNr = chNr;\n return true;\n },\n\n /**\n * Parse midrow styling command\n * @returns {Boolean}\n */\n parseMidrow : function(a, b) {\n var chNr = null;\n \n if ( ((a === 0x11) || (a === 0x19)) && 0x20 <= b && b <= 0x2f) {\n if (a === 0x11) {\n chNr = 1;\n } else {\n chNr = 2;\n }\n if (chNr !== this.currChNr) {\n logger.log(\"ERROR\", \"Mismatch channel in midrow parsing\");\n return false;\n }\n var channel = this.channels[chNr-1];\n // cea608 spec says midrow codes should inject a space\n channel.insertChars([0x20]);\n channel.cc_MIDROW(b);\n logger.log(\"DEBUG\", \"MIDROW (\" + numArrayToHexArray([a, b]) + \")\");\n this.lastCmdA = a;\n this.lastCmdB = b;\n return true;\n }\n return false;\n },\n /**\n * Parse Preable Access Codes (Table 53).\n * @returns {Boolean} Tells if PAC found\n */\n parsePAC : function(a, b) {\n\n var chNr = null;\n var row = null;\n \n var case1 = ((0x11 <= a && a <= 0x17) || (0x19 <= a && a <= 0x1F)) && (0x40 <= b && b <= 0x7F);\n var case2 = (a === 0x10 || a === 0x18) && (0x40 <= b && b <= 0x5F);\n if (! (case1 || case2)) {\n return false;\n }\n\n chNr = (a <= 0x17) ? 1 : 2;\n\n if (0x40 <= b && b <= 0x5F) {\n row = (chNr === 1) ? rowsLowCh1[a] : rowsLowCh2[a];\n } else { // 0x60 <= b <= 0x7F\n row = (chNr === 1) ? rowsHighCh1[a] : rowsHighCh2[a];\n }\n var pacData = this.interpretPAC(row, b);\n var channel = this.channels[chNr-1];\n channel.setPAC(pacData);\n this.lastCmdA = a;\n this.lastCmdB = b;\n this.currChNr = chNr;\n return true;\n },\n\n /**\n * Interpret the second byte of the pac, and return the information.\n * @returns {Object} pacData with style parameters.\n */\n interpretPAC : function (row, byte) {\n var pacIndex = byte;\n var pacData = {color : null, italics : false, indent : null, underline : false, row : row};\n \n if (byte > 0x5F) {\n pacIndex = byte - 0x60;\n } else {\n pacIndex = byte - 0x40;\n }\n pacData.underline = (pacIndex & 1) === 1;\n if (pacIndex <= 0xd) {\n pacData.color = ['white', 'green', 'blue', 'cyan', 'red', 'yellow', 'magenta', 'white'][Math.floor(pacIndex/2)];\n } else if (pacIndex <= 0xf) {\n pacData.italics = true;\n pacData.color = 'white';\n } else {\n pacData.indent = (Math.floor((pacIndex-0x10)/2))*4;\n }\n return pacData; // Note that row has zero offset. The spec uses 1.\n },\n\n /**\n * Parse characters.\n * @returns An array with 1 to 2 codes corresponding to chars, if found. null otherwise.\n */\n parseChars : function(a, b) {\n\n var channelNr = null,\n charCodes = null,\n charCode1 = null,\n charCode2 = null;\n\n if (a >= 0x19) {\n channelNr = 2;\n charCode1 = a - 8;\n } else {\n channelNr = 1;\n charCode1 = a;\n }\n if (0x11 <= charCode1 && charCode1 <= 0x13) {\n // Special character\n var oneCode = b;\n if (charCode1 === 0x11) {\n oneCode = b + 0x50;\n } else if (charCode1 === 0x12) {\n oneCode = b + 0x70;\n } else {\n oneCode = b + 0x90;\n }\n logger.log(\"INFO\", \"Special char '\" + getCharForByte(oneCode) + \"' in channel \" + channelNr);\n charCodes = [oneCode];\n this.lastCmdA = a;\n this.lastCmdB = b;\n } else if (0x20 <= a && a <= 0x7f) {\n charCodes = (b === 0) ? [a] : [a, b];\n this.lastCmdA = null;\n this.lastCmdB = null;\n }\n if (charCodes) {\n var hexCodes = numArrayToHexArray(charCodes);\n logger.log(\"DEBUG\", \"Char codes = \" + hexCodes.join(\",\"));\n }\n return charCodes;\n },\n \n /**\n * Parse extended background attributes as well as new foreground color black.\n * @returns{Boolean} Tells if background attributes are found\n */\n parseBackgroundAttributes : function(a, b) {\n var bkgData,\n index,\n chNr,\n channel;\n\n var case1 = (a === 0x10 || a === 0x18) && (0x20 <= b && b <= 0x2f);\n var case2 = (a === 0x17 || a === 0x1f) && (0x2d <=b && b <= 0x2f);\n if (!(case1 || case2)) {\n return false;\n }\n bkgData = {};\n if (a === 0x10 || a === 0x18) {\n index = Math.floor((b-0x20)/2);\n bkgData.background = backgroundColors[index];\n if (b % 2 === 1) {\n bkgData.background = bkgData.background + \"_semi\";\n }\n } else if (b === 0x2d) {\n bkgData.background = \"transparent\";\n } else {\n bkgData.foreground = \"black\";\n if (b === 0x2f) {\n bkgData.underline = true;\n }\n }\n chNr = (a < 0x18) ? 1 : 2;\n channel = this.channels[chNr-1];\n channel.setBkgData(bkgData);\n this.lastCmdA = a;\n this.lastCmdB = b;\n return true;\n },\n\n /**\n * Reset state of parser and its channels.\n */\n reset : function() {\n for (var i=0 ; i < this.channels.length ; i++) {\n if (this.channels[i]) {\n this.channels[i].reset();\n }\n }\n this.lastCmdA = null;\n this.lastCmdB = null;\n },\n\n /**\n * Trigger the generation of a cue, and the start of a new one if displayScreens are not empty.\n */\n cueSplitAtTime : function(t) {\n for (var i=0 ; i < this.channels.length ; i++) {\n if (this.channels[i]) {\n this.channels[i].cueSplitAtTime(t);\n }\n }\n },\n };\n\n /**\n * Find ranges corresponding to SEA CEA-608 NALUS in sizeprepended NALU array.\n * @param {raw} dataView of binary data\n * @param {startPos} start position in raw\n * @param {size} total size of data in raw to consider\n * @returns \n */\n var findCea608Nalus = function(raw, startPos, size) {\n var nalSize = 0,\n cursor = startPos,\n nalType = 0,\n cea608NaluRanges = [],\n // Check SEI data according to ANSI-SCTE 128\n isCEA608SEI = function (payloadType, payloadSize, raw, pos) {\n if (payloadType !== 4 || payloadSize < 8) {\n return null;\n }\n var countryCode = raw.getUint8(pos);\n var providerCode = raw.getUint16(pos + 1);\n var userIdentifier = raw.getUint32(pos + 3);\n var userDataTypeCode = raw.getUint8(pos + 7);\n return countryCode == 0xB5 && providerCode == 0x31 && userIdentifier == 0x47413934 && userDataTypeCode == 0x3;\n };\n while (cursor < startPos + size) {\n nalSize = raw.getUint32(cursor);\n nalType = raw.getUint8(cursor + 4) & 0x1F;\n //console.log(time + \" NAL \" + nalType);\n if (nalType === 6) {\n // SEI NAL Unit. The NAL header is the first byte\n //console.log(\"SEI NALU of size \" + nalSize + \" at time \" + time);\n var pos = cursor + 5;\n var payloadType = -1;\n while (pos < cursor + 4 + nalSize - 1) { // The last byte should be rbsp_trailing_bits\n payloadType = 0;\n var b = 0xFF;\n while (b === 0xFF) {\n b = raw.getUint8(pos);\n payloadType += b;\n pos++;\n }\n var payloadSize = 0;\n b = 0xFF;\n while (b === 0xFF) {\n b = raw.getUint8(pos);\n payloadSize += b;\n pos++;\n }\n if (isCEA608SEI(payloadType, payloadSize, raw, pos)) {\n //console.log(\"CEA608 SEI \" + time + \" \" + payloadSize);\n cea608NaluRanges.push([pos, payloadSize]);\n }\n pos += payloadSize;\n }\n }\n cursor += nalSize + 4;\n }\n return cea608NaluRanges;\n };\n \n var extractCea608DataFromRange = function(raw, cea608Range) {\n var pos = cea608Range[0];\n var fieldData = [[], []];\n\n pos += 8; // Skip the identifier up to userDataTypeCode\n var ccCount = raw.getUint8(pos) & 0x1f;\n pos += 2; // Advance 1 and skip reserved byte\n \n for (var i = 0; i < ccCount; i++) {\n var byte = raw.getUint8(pos);\n var ccValid = byte & 0x4;\n var ccType = byte & 0x3;\n pos++;\n var ccData1 = raw.getUint8(pos); // Keep parity bit\n pos++;\n var ccData2 = raw.getUint8(pos); // Keep parity bit\n pos++;\n if (ccValid && ((ccData1 & 0x7f) + (ccData2 & 0x7f) !== 0)) { //Check validity and non-empty data\n if (ccType === 0) {\n fieldData[0].push(ccData1);\n fieldData[0].push(ccData2);\n } else if (ccType === 1) {\n fieldData[1].push(ccData1);\n fieldData[1].push(ccData2);\n }\n }\n }\n return fieldData;\n };\n\n exports.logger = logger;\n exports.PenState = PenState;\n exports.CaptionScreen = CaptionScreen; \n exports.Cea608Parser = Cea608Parser;\n exports.findCea608Nalus = findCea608Nalus;\n exports.extractCea608DataFromRange = extractCea608DataFromRange;\n\n}(typeof exports === 'undefined' ? this.cea608parser = {} : exports));\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport EventBus from '../../core/EventBus';\nimport MediaPlayerEvents from '../MediaPlayerEvents';\nimport MetricsReportingEvents from '../metrics/MetricsReportingEvents';\nimport FactoryMaker from '../../core/FactoryMaker';\nimport Settings from '../../core/Settings';\nimport Constants from '../../streaming/constants/Constants';\nimport {HTTPRequest} from '../vo/metrics/HTTPRequest';\nimport DashManifestModel from '../../dash/models/DashManifestModel';\nimport Utils from '../../core/Utils';\n\nconst CMCD_REQUEST_FIELD_NAME = 'CMCD';\nconst CMCD_VERSION = 1;\nconst OBJECT_TYPES = {\n MANIFEST: 'm',\n AUDIO: 'a',\n VIDEO: 'v',\n INIT: 'i',\n CAPTION: 'c',\n ISOBMFF_TEXT_TRACK: 'tt',\n ENCRYPTION_KEY: 'k',\n OTHER: 'o'\n};\nconst STREAMING_FORMATS = {\n DASH: 'd',\n MSS: 's'\n};\nconst STREAM_TYPES = {\n VOD: 'v',\n LIVE: 'l'\n};\nconst RTP_SAFETY_FACTOR = 5;\n\nfunction CmcdModel() {\n\n let dashManifestModel,\n instance,\n internalData,\n abrController,\n dashMetrics,\n playbackController,\n streamProcessors,\n _isStartup,\n _bufferLevelStarved,\n _initialMediaRequestsDone;\n\n let context = this.context;\n let eventBus = EventBus(context).getInstance();\n let settings = Settings(context).getInstance();\n\n function setup() {\n dashManifestModel = DashManifestModel(context).getInstance();\n\n _resetInitialSettings();\n }\n\n function initialize() {\n eventBus.on(MediaPlayerEvents.PLAYBACK_RATE_CHANGED, _onPlaybackRateChanged, instance);\n eventBus.on(MediaPlayerEvents.MANIFEST_LOADED, _onManifestLoaded, instance);\n eventBus.on(MediaPlayerEvents.BUFFER_LEVEL_STATE_CHANGED, _onBufferLevelStateChanged, instance);\n eventBus.on(MediaPlayerEvents.PLAYBACK_SEEKED, _onPlaybackSeeked, instance);\n eventBus.on(MediaPlayerEvents.PERIOD_SWITCH_COMPLETED, _onPeriodSwitchComplete, instance);\n }\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.abrController) {\n abrController = config.abrController;\n }\n\n if (config.dashMetrics) {\n dashMetrics = config.dashMetrics;\n }\n\n if (config.playbackController) {\n playbackController = config.playbackController;\n }\n }\n\n function _resetInitialSettings() {\n internalData = {\n pr: 1,\n nor: null,\n st: null,\n sf: null,\n sid: `${Utils.generateUuid()}`,\n cid: null\n };\n _bufferLevelStarved = {};\n _isStartup = {};\n _initialMediaRequestsDone = {};\n _updateStreamProcessors();\n }\n\n function _onPeriodSwitchComplete() {\n _updateStreamProcessors();\n }\n\n function _updateStreamProcessors() {\n if (!playbackController) return;\n const streamController = playbackController.getStreamController();\n if (!streamController) return;\n if (typeof streamController.getActiveStream !== 'function') return;\n const activeStream = streamController.getActiveStream();\n if (!activeStream) return;\n streamProcessors = activeStream.getProcessors();\n }\n\n function getQueryParameter(request) {\n try {\n if (settings.get().streaming.cmcd && settings.get().streaming.cmcd.enabled) {\n const cmcdData = _getCmcdData(request);\n const finalPayloadString = _buildFinalString(cmcdData);\n\n eventBus.trigger(MetricsReportingEvents.CMCD_DATA_GENERATED, {\n url: request.url,\n mediaType: request.mediaType,\n cmcdData,\n cmcdString: finalPayloadString\n });\n return {\n key: CMCD_REQUEST_FIELD_NAME,\n value: finalPayloadString\n };\n }\n\n return null;\n } catch (e) {\n return null;\n }\n }\n\n function _copyParameters(data, parameterNames) {\n const copiedData = {};\n for (let name of parameterNames) {\n if (data[name]) {\n copiedData[name] = data[name];\n }\n }\n return copiedData;\n }\n\n function getHeaderParameters(request) {\n try {\n if (settings.get().streaming.cmcd && settings.get().streaming.cmcd.enabled) {\n const cmcdData = _getCmcdData(request);\n const cmcdObjectHeader = _copyParameters(cmcdData, ['br', 'd', 'ot', 'tb']);\n const cmcdRequestHeader = _copyParameters(cmcdData, ['bl', 'dl', 'mtp', 'nor', 'nrr', 'su']);\n const cmcdStatusHeader = _copyParameters(cmcdData, ['bs', 'rtp']);\n const cmcdSessionHeader = _copyParameters(cmcdData, ['cid', 'pr', 'sf', 'sid', 'st', 'v']);\n const headers = {\n 'CMCD-Object': _buildFinalString(cmcdObjectHeader),\n 'CMCD-Request': _buildFinalString(cmcdRequestHeader),\n 'CMCD-Status': _buildFinalString(cmcdStatusHeader),\n 'CMCD-Session': _buildFinalString(cmcdSessionHeader)\n };\n\n eventBus.trigger(MetricsReportingEvents.CMCD_DATA_GENERATED, {\n url: request.url,\n mediaType: request.mediaType,\n cmcdData,\n headers\n });\n return headers;\n }\n\n return null;\n } catch (e) {\n return null;\n }\n }\n\n function _getCmcdData(request) {\n try {\n let cmcdData = null;\n\n if (request.type === HTTPRequest.MPD_TYPE) {\n return _getCmcdDataForMpd(request);\n } else if (request.type === HTTPRequest.MEDIA_SEGMENT_TYPE) {\n _initForMediaType(request.mediaType);\n return _getCmcdDataForMediaSegment(request);\n } else if (request.type === HTTPRequest.INIT_SEGMENT_TYPE) {\n return _getCmcdDataForInitSegment(request);\n } else if (request.type === HTTPRequest.OTHER_TYPE || request.type === HTTPRequest.XLINK_EXPANSION_TYPE) {\n return _getCmcdDataForOther(request);\n } else if (request.type === HTTPRequest.LICENSE) {\n return _getCmcdDataForLicense(request);\n }\n\n return cmcdData;\n } catch (e) {\n return null;\n }\n }\n\n function _getCmcdDataForLicense(request) {\n const data = _getGenericCmcdData(request);\n\n data.ot = OBJECT_TYPES.ENCRYPTION_KEY;\n\n return data;\n }\n\n function _getCmcdDataForMpd() {\n const data = _getGenericCmcdData();\n\n data.ot = OBJECT_TYPES.MANIFEST;\n\n return data;\n }\n\n function _getCmcdDataForMediaSegment(request) {\n const data = _getGenericCmcdData();\n const encodedBitrate = _getBitrateByRequest(request);\n const d = _getObjectDurationByRequest(request);\n const mtp = _getMeasuredThroughputByType(request.mediaType);\n const dl = _getDeadlineByType(request.mediaType);\n const bl = _getBufferLevelByType(request.mediaType);\n const tb = _getTopBitrateByType(request.mediaType);\n const pr = internalData.pr;\n\n const nextRequest = _probeNextRequest(request.mediaType);\n\n let ot;\n if (request.mediaType === Constants.VIDEO) ot = OBJECT_TYPES.VIDEO;\n if (request.mediaType === Constants.AUDIO) ot = OBJECT_TYPES.AUDIO;\n if (request.mediaType === Constants.TEXT) {\n if (request.mediaInfo.mimeType === 'application/mp4') {\n ot = OBJECT_TYPES.ISOBMFF_TEXT_TRACK;\n } else {\n ot = OBJECT_TYPES.CAPTION;\n }\n }\n\n let rtp = settings.get().streaming.cmcd.rtp;\n if (!rtp) {\n rtp = _calculateRtp(request);\n }\n data.rtp = rtp;\n\n if (nextRequest) {\n if (request.url !== nextRequest.url) {\n data.nor = encodeURIComponent(Utils.getRelativeUrl(request.url, nextRequest.url));\n } else if (nextRequest.range) {\n data.nrr = nextRequest.range;\n }\n }\n\n if (encodedBitrate) {\n data.br = encodedBitrate;\n }\n\n if (ot) {\n data.ot = ot;\n }\n\n if (!isNaN(d)) {\n data.d = d;\n }\n\n if (!isNaN(mtp)) {\n data.mtp = mtp;\n }\n\n if (!isNaN(dl)) {\n data.dl = dl;\n }\n\n if (!isNaN(bl)) {\n data.bl = bl;\n }\n\n if (!isNaN(tb)) {\n data.tb = tb;\n }\n\n if (!isNaN(pr) && pr !== 1) {\n data.pr = pr;\n }\n\n if (_bufferLevelStarved[request.mediaType]) {\n data.bs = true;\n _bufferLevelStarved[request.mediaType] = false;\n }\n\n if (_isStartup[request.mediaType] || !_initialMediaRequestsDone[request.mediaType]) {\n data.su = true;\n _isStartup[request.mediaType] = false;\n _initialMediaRequestsDone[request.mediaType] = true;\n }\n\n return data;\n }\n\n function _initForMediaType(mediaType) {\n\n if (!_initialMediaRequestsDone.hasOwnProperty(mediaType)) {\n _initialMediaRequestsDone[mediaType] = false;\n }\n\n if (!_isStartup.hasOwnProperty(mediaType)) {\n _isStartup[mediaType] = false;\n }\n\n if (!_bufferLevelStarved.hasOwnProperty(mediaType)) {\n _bufferLevelStarved[mediaType] = false;\n }\n }\n\n function _getCmcdDataForInitSegment() {\n const data = _getGenericCmcdData();\n\n data.ot = OBJECT_TYPES.INIT;\n data.su = true;\n\n return data;\n }\n\n function _getCmcdDataForOther() {\n const data = _getGenericCmcdData();\n\n data.ot = OBJECT_TYPES.OTHER;\n\n return data;\n }\n\n\n function _getGenericCmcdData() {\n const data = {};\n\n let cid = settings.get().streaming.cmcd.cid ? settings.get().streaming.cmcd.cid : internalData.cid;\n\n data.v = CMCD_VERSION;\n data.sid = settings.get().streaming.cmcd.sid ? settings.get().streaming.cmcd.sid : internalData.sid;\n\n data.sid = `${data.sid}`;\n\n if (cid) {\n data.cid = `${cid}`;\n }\n\n if (!isNaN(internalData.pr) && internalData.pr !== 1 && internalData.pr !== null) {\n data.pr = internalData.pr;\n }\n\n if (internalData.st) {\n data.st = internalData.st;\n }\n\n if (internalData.sf) {\n data.sf = internalData.sf;\n }\n\n return data;\n }\n\n function _getBitrateByRequest(request) {\n try {\n const quality = request.quality;\n const bitrateList = request.mediaInfo.bitrateList;\n\n return parseInt(bitrateList[quality].bandwidth / 1000);\n } catch (e) {\n return null;\n }\n }\n\n function _getTopBitrateByType(mediaType) {\n try {\n const info = abrController.getTopBitrateInfoFor(mediaType);\n return Math.round(info.bitrate / 1000);\n } catch (e) {\n return null;\n }\n }\n\n function _getObjectDurationByRequest(request) {\n try {\n return !isNaN(request.duration) ? Math.round(request.duration * 1000) : null;\n } catch (e) {\n return null;\n }\n }\n\n function _getMeasuredThroughputByType(mediaType) {\n try {\n return parseInt(abrController.getThroughputHistory().getSafeAverageThroughput(mediaType) / 100) * 100;\n } catch (e) {\n return null;\n }\n }\n\n function _getDeadlineByType(mediaType) {\n try {\n const playbackRate = internalData.pr;\n const bufferLevel = dashMetrics.getCurrentBufferLevel(mediaType);\n\n if (!isNaN(playbackRate) && !isNaN(bufferLevel)) {\n return parseInt((bufferLevel / playbackRate) * 10) * 100;\n }\n\n return null;\n } catch (e) {\n return null;\n }\n }\n\n function _getBufferLevelByType(mediaType) {\n try {\n const bufferLevel = dashMetrics.getCurrentBufferLevel(mediaType);\n\n if (!isNaN(bufferLevel)) {\n return parseInt(bufferLevel * 10) * 100;\n }\n\n return null;\n } catch (e) {\n return null;\n }\n }\n\n function _onPlaybackRateChanged(data) {\n try {\n internalData.pr = data.playbackRate;\n } catch (e) {\n\n }\n }\n\n function _onManifestLoaded(data) {\n try {\n const isDynamic = dashManifestModel.getIsDynamic(data.data);\n const st = isDynamic ? STREAM_TYPES.LIVE : STREAM_TYPES.VOD;\n const sf = data.protocol && data.protocol === 'MSS' ? STREAMING_FORMATS.MSS : STREAMING_FORMATS.DASH;\n\n internalData.st = `${st}`;\n internalData.sf = `${sf}`;\n } catch (e) {\n }\n }\n\n function _onBufferLevelStateChanged(data) {\n try {\n if (data.state && data.mediaType) {\n if (data.state === MediaPlayerEvents.BUFFER_EMPTY) {\n\n if (!_bufferLevelStarved[data.mediaType]) {\n _bufferLevelStarved[data.mediaType] = true;\n }\n if (!_isStartup[data.mediaType]) {\n _isStartup[data.mediaType] = true;\n }\n }\n }\n } catch (e) {\n\n }\n }\n\n function _onPlaybackSeeked() {\n for (let key in _bufferLevelStarved) {\n if (_bufferLevelStarved.hasOwnProperty(key)) {\n _bufferLevelStarved[key] = true;\n }\n }\n\n for (let key in _isStartup) {\n if (_isStartup.hasOwnProperty(key)) {\n _isStartup[key] = true;\n }\n }\n }\n\n function _buildFinalString(cmcdData) {\n try {\n if (!cmcdData) {\n return null;\n }\n const keys = Object.keys(cmcdData).sort((a, b) => a.localeCompare(b));\n const length = keys.length;\n\n let cmcdString = keys.reduce((acc, key, index) => {\n if (key === 'v' && cmcdData[key] === 1) return acc; // Version key should only be reported if it is != 1\n if (typeof cmcdData[key] === 'string' && key !== 'ot' && key !== 'sf' && key !== 'st') {\n acc += `${key}=${JSON.stringify(cmcdData[key])}`;\n } else {\n acc += `${key}=${cmcdData[key]}`;\n }\n if (index < length - 1) {\n acc += ',';\n }\n\n return acc;\n }, '');\n\n cmcdString = cmcdString.replace(/=true/g, '');\n\n // Remove last comma at the end\n cmcdString = cmcdString.replace(/,\\s*$/, '');\n\n return cmcdString;\n } catch (e) {\n return null;\n }\n }\n\n function _probeNextRequest(mediaType) {\n if (!streamProcessors || streamProcessors.length === 0) return;\n for (let streamProcessor of streamProcessors) {\n if (streamProcessor.getType() === mediaType) {\n return streamProcessor.probeNextRequest();\n }\n }\n }\n\n function _calculateRtp(request) {\n // Get the values we need\n let playbackRate = playbackController.getPlaybackRate();\n if (!playbackRate) playbackRate = 1;\n let { quality, mediaType, mediaInfo, duration } = request;\n let currentBufferLevel = _getBufferLevelByType(mediaType);\n if (currentBufferLevel === 0) currentBufferLevel = 500;\n let bitrate = mediaInfo.bitrateList[quality].bandwidth;\n\n // Calculate RTP\n let segmentSize = (bitrate * duration) / 1000; // Calculate file size in kilobits\n let timeToLoad = (currentBufferLevel / playbackRate) / 1000; // Calculate time available to load file in seconds\n let minBandwidth = segmentSize / timeToLoad; // Calculate the exact bandwidth required\n let rtpSafetyFactor = settings.get().streaming.cmcd.rtpSafetyFactor && !isNaN(settings.get().streaming.cmcd.rtpSafetyFactor) ? settings.get().streaming.cmcd.rtpSafetyFactor : RTP_SAFETY_FACTOR;\n let maxBandwidth = minBandwidth * rtpSafetyFactor; // Include a safety buffer\n\n let rtp = (parseInt(maxBandwidth / 100) + 1) * 100; // Round to the next multiple of 100\n\n return rtp;\n }\n\n function reset() {\n eventBus.off(MediaPlayerEvents.PLAYBACK_RATE_CHANGED, _onPlaybackRateChanged, this);\n eventBus.off(MediaPlayerEvents.MANIFEST_LOADED, _onManifestLoaded, this);\n eventBus.off(MediaPlayerEvents.BUFFER_LEVEL_STATE_CHANGED, _onBufferLevelStateChanged, instance);\n eventBus.off(MediaPlayerEvents.PLAYBACK_SEEKED, _onPlaybackSeeked, instance);\n\n _resetInitialSettings();\n }\n\n instance = {\n getQueryParameter,\n getHeaderParameters,\n setConfig,\n reset,\n initialize\n };\n\n setup();\n\n return instance;\n}\n\nCmcdModel.__dashjs_factory_name = 'CmcdModel';\nexport default FactoryMaker.getSingletonFactory(CmcdModel);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\nclass UTCTiming {\n constructor() {\n // UTCTiming is a DescriptorType and doesn't have any additional fields\n this.schemeIdUri = '';\n this.value = '';\n }\n}\n\nexport default UTCTiming;","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\nclass Event {\n constructor() {\n this.duration = NaN;\n this.presentationTime = NaN;\n this.id = NaN;\n this.messageData = '';\n this.eventStream = null;\n this.presentationTimeDelta = NaN; // Specific EMSG Box parameter\n }\n}\n\nexport default Event;","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport FactoryMaker from '../../core/FactoryMaker';\nimport deepEqual from 'fast-deep-equal';\n\n/**\n * @module ObjectUtils\n * @ignore\n * @description Provides utility functions for objects\n */\nfunction ObjectUtils() {\n\n let instance;\n\n /**\n * Returns true if objects are equal\n * @return {boolean}\n * @param {object} obj1\n * @param {object} obj2\n * @memberof module:ObjectUtils\n * @instance\n */\n function areEqual(obj1, obj2) {\n return deepEqual(obj1, obj2);\n }\n\n instance = {\n areEqual: areEqual\n };\n\n return instance;\n}\n\nObjectUtils.__dashjs_factory_name = 'ObjectUtils';\nexport default FactoryMaker.getSingletonFactory(ObjectUtils);\n","/*\n Copyright 2011-2013 Abdulla Abdurakhmanov\n Original sources are available at https://code.google.com/p/x2js/\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/*\n Further modified for dashjs to:\n - keep track of children nodes in order in attribute __children.\n - add type conversion matchers\n - re-add ignoreRoot\n - allow zero-length attributePrefix\n - don't add white-space text nodes\n - remove explicit RequireJS support\n*/\n\nfunction X2JS(config) {\n 'use strict';\n\n var VERSION = \"1.2.0\";\n\n config = config || {};\n initConfigDefaults();\n initRequiredPolyfills();\n\n function initConfigDefaults() {\n if(config.escapeMode === undefined) {\n config.escapeMode = true;\n }\n\n if (config.attributePrefix === undefined) {\n config.attributePrefix = \"_\";\n }\n\n config.arrayAccessForm = config.arrayAccessForm || \"none\";\n config.emptyNodeForm = config.emptyNodeForm || \"text\";\n\n if(config.enableToStringFunc === undefined) {\n config.enableToStringFunc = true;\n }\n config.arrayAccessFormPaths = config.arrayAccessFormPaths || [];\n if(config.skipEmptyTextNodesForObj === undefined) {\n config.skipEmptyTextNodesForObj = true;\n }\n if(config.stripWhitespaces === undefined) {\n config.stripWhitespaces = true;\n }\n config.datetimeAccessFormPaths = config.datetimeAccessFormPaths || [];\n\n if(config.useDoubleQuotes === undefined) {\n config.useDoubleQuotes = false;\n }\n\n config.xmlElementsFilter = config.xmlElementsFilter || [];\n config.jsonPropertiesFilter = config.jsonPropertiesFilter || [];\n\n if(config.keepCData === undefined) {\n config.keepCData = false;\n }\n\n if (config.ignoreRoot === undefined) {\n config.ignoreRoot = false;\n }\n }\n\n var DOMNodeTypes = {\n ELEMENT_NODE \t : 1,\n TEXT_NODE \t : 3,\n CDATA_SECTION_NODE : 4,\n COMMENT_NODE\t : 8,\n DOCUMENT_NODE \t : 9\n };\n\n function initRequiredPolyfills() {\n }\n\n function getNodeLocalName( node ) {\n var nodeLocalName = node.localName;\n if(nodeLocalName == null) // Yeah, this is IE!!\n nodeLocalName = node.baseName;\n if(nodeLocalName == null || nodeLocalName==\"\") // ==\"\" is IE too\n nodeLocalName = node.nodeName;\n return nodeLocalName;\n }\n\n function getNodePrefix(node) {\n return node.prefix;\n }\n\n function escapeXmlChars(str) {\n if(typeof(str) == \"string\")\n return str.replace(/&/g, '&').replace(//g, '>').replace(/\"/g, '"').replace(/'/g, ''');\n else\n return str;\n }\n\n function unescapeXmlChars(str) {\n return str.replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '\"').replace(/'/g, \"'\").replace(/&/g, '&');\n }\n\n function checkInStdFiltersArrayForm(stdFiltersArrayForm, obj, name, path) {\n var idx = 0;\n for(; idx < stdFiltersArrayForm.length; idx++) {\n var filterPath = stdFiltersArrayForm[idx];\n if( typeof filterPath === \"string\" ) {\n if(filterPath == path)\n break;\n }\n else\n if( filterPath instanceof RegExp) {\n if(filterPath.test(path))\n break;\n }\n else\n if( typeof filterPath === \"function\") {\n if(filterPath(obj, name, path))\n break;\n }\n }\n return idx!=stdFiltersArrayForm.length;\n }\n\n function toArrayAccessForm(obj, childName, path) {\n switch(config.arrayAccessForm) {\n case \"property\":\n if(!(obj[childName] instanceof Array))\n obj[childName+\"_asArray\"] = [obj[childName]];\n else\n obj[childName+\"_asArray\"] = obj[childName];\n break;\n /*case \"none\":\n break;*/\n }\n\n if(!(obj[childName] instanceof Array) && config.arrayAccessFormPaths.length > 0) {\n if(checkInStdFiltersArrayForm(config.arrayAccessFormPaths, obj, childName, path)) {\n obj[childName] = [obj[childName]];\n }\n }\n }\n\n function fromXmlDateTime(prop) {\n // Implementation based up on http://stackoverflow.com/questions/8178598/xml-datetime-to-javascript-date-object\n // Improved to support full spec and optional parts\n var bits = prop.split(/[-T:+Z]/g);\n\n var d = new Date(bits[0], bits[1]-1, bits[2]);\n var secondBits = bits[5].split(\"\\.\");\n d.setHours(bits[3], bits[4], secondBits[0]);\n if(secondBits.length>1)\n d.setMilliseconds(secondBits[1]);\n\n // Get supplied time zone offset in minutes\n if(bits[6] && bits[7]) {\n var offsetMinutes = bits[6] * 60 + Number(bits[7]);\n var sign = /\\d\\d-\\d\\d:\\d\\d$/.test(prop)? '-' : '+';\n\n // Apply the sign\n offsetMinutes = 0 + (sign == '-'? -1 * offsetMinutes : offsetMinutes);\n\n // Apply offset and local timezone\n d.setMinutes(d.getMinutes() - offsetMinutes - d.getTimezoneOffset())\n }\n else\n if(prop.indexOf(\"Z\", prop.length - 1) !== -1) {\n d = new Date(Date.UTC(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds(), d.getMilliseconds()));\n }\n\n // d is now a local time equivalent to the supplied time\n return d;\n }\n\n function checkFromXmlDateTimePaths(value, childName, fullPath) {\n if(config.datetimeAccessFormPaths.length > 0) {\n var path = fullPath.split(\"\\.#\")[0];\n if(checkInStdFiltersArrayForm(config.datetimeAccessFormPaths, value, childName, path)) {\n return fromXmlDateTime(value);\n }\n else\n return value;\n }\n else\n return value;\n }\n\n function checkXmlElementsFilter(obj, childType, childName, childPath) {\n if( childType == DOMNodeTypes.ELEMENT_NODE && config.xmlElementsFilter.length > 0) {\n return checkInStdFiltersArrayForm(config.xmlElementsFilter, obj, childName, childPath);\n }\n else\n return true;\n }\n\n function parseDOMChildren( node, path ) {\n if(node.nodeType == DOMNodeTypes.DOCUMENT_NODE) {\n var result = new Object;\n var nodeChildren = node.childNodes;\n // Alternative for firstElementChild which is not supported in some environments\n for(var cidx=0; cidx 1 && result.__text!=null && config.skipEmptyTextNodesForObj) {\n if( (config.stripWhitespaces && result.__text==\"\") || (result.__text.trim()==\"\")) {\n delete result.__text;\n }\n }\n delete result.__cnt;\n\n if( config.enableToStringFunc && (result.__text!=null || result.__cdata!=null )) {\n result.toString = function() {\n return (this.__text!=null? this.__text:'')+( this.__cdata!=null ? this.__cdata:'');\n };\n }\n\n return result;\n }\n else\n if(node.nodeType == DOMNodeTypes.TEXT_NODE || node.nodeType == DOMNodeTypes.CDATA_SECTION_NODE) {\n return node.nodeValue;\n }\n }\n\n function startTag(jsonObj, element, attrList, closed) {\n var resultStr = \"<\"+ ( (jsonObj!=null && jsonObj.__prefix!=null)? (jsonObj.__prefix+\":\"):\"\") + element;\n if(attrList!=null) {\n for(var aidx = 0; aidx < attrList.length; aidx++) {\n var attrName = attrList[aidx];\n var attrVal = jsonObj[attrName];\n if(config.escapeMode)\n attrVal=escapeXmlChars(attrVal);\n resultStr+=\" \"+attrName.substr(config.attributePrefix.length)+\"=\";\n if(config.useDoubleQuotes)\n resultStr+='\"'+attrVal+'\"';\n else\n resultStr+=\"'\"+attrVal+\"'\";\n }\n }\n if(!closed)\n resultStr+=\">\";\n else\n resultStr+=\"/>\";\n return resultStr;\n }\n\n function endTag(jsonObj,elementName) {\n return \"\";\n }\n\n function endsWith(str, suffix) {\n return str.indexOf(suffix, str.length - suffix.length) !== -1;\n }\n\n function jsonXmlSpecialElem ( jsonObj, jsonObjField ) {\n if((config.arrayAccessForm==\"property\" && endsWith(jsonObjField.toString(),(\"_asArray\")))\n || jsonObjField.toString().indexOf(config.attributePrefix)==0\n || jsonObjField.toString().indexOf(\"__\")==0\n || (jsonObj[jsonObjField] instanceof Function) )\n return true;\n else\n return false;\n }\n\n function jsonXmlElemCount ( jsonObj ) {\n var elementsCnt = 0;\n if(jsonObj instanceof Object ) {\n for( var it in jsonObj ) {\n if(jsonXmlSpecialElem ( jsonObj, it) )\n continue;\n elementsCnt++;\n }\n }\n return elementsCnt;\n }\n\n function checkJsonObjPropertiesFilter(jsonObj, propertyName, jsonObjPath) {\n return config.jsonPropertiesFilter.length == 0\n || jsonObjPath==\"\"\n || checkInStdFiltersArrayForm(config.jsonPropertiesFilter, jsonObj, propertyName, jsonObjPath);\n }\n\n function parseJSONAttributes ( jsonObj ) {\n var attrList = [];\n if(jsonObj instanceof Object ) {\n for( var ait in jsonObj ) {\n if(ait.toString().indexOf(\"__\")== -1 && ait.toString().indexOf(config.attributePrefix)==0) {\n attrList.push(ait);\n }\n }\n }\n return attrList;\n }\n\n function parseJSONTextAttrs ( jsonTxtObj ) {\n var result =\"\";\n\n if(jsonTxtObj.__cdata!=null) {\n result+=\"\";\n }\n\n if(jsonTxtObj.__text!=null) {\n if(config.escapeMode)\n result+=escapeXmlChars(jsonTxtObj.__text);\n else\n result+=jsonTxtObj.__text;\n }\n return result;\n }\n\n function parseJSONTextObject ( jsonTxtObj ) {\n var result =\"\";\n\n if( jsonTxtObj instanceof Object ) {\n result+=parseJSONTextAttrs ( jsonTxtObj );\n }\n else\n if(jsonTxtObj!=null) {\n if(config.escapeMode)\n result+=escapeXmlChars(jsonTxtObj);\n else\n result+=jsonTxtObj;\n }\n\n return result;\n }\n\n function getJsonPropertyPath(jsonObjPath, jsonPropName) {\n if (jsonObjPath===\"\") {\n return jsonPropName;\n }\n else\n return jsonObjPath+\".\"+jsonPropName;\n }\n\n function parseJSONArray ( jsonArrRoot, jsonArrObj, attrList, jsonObjPath ) {\n var result = \"\";\n if(jsonArrRoot.length == 0) {\n result+=startTag(jsonArrRoot, jsonArrObj, attrList, true);\n }\n else {\n for(var arIdx = 0; arIdx < jsonArrRoot.length; arIdx++) {\n result+=startTag(jsonArrRoot[arIdx], jsonArrObj, parseJSONAttributes(jsonArrRoot[arIdx]), false);\n result+=parseJSONObject(jsonArrRoot[arIdx], getJsonPropertyPath(jsonObjPath,jsonArrObj));\n result+=endTag(jsonArrRoot[arIdx],jsonArrObj);\n }\n }\n return result;\n }\n\n function parseJSONObject ( jsonObj, jsonObjPath ) {\n var result = \"\";\n\n var elementsCnt = jsonXmlElemCount ( jsonObj );\n\n if(elementsCnt > 0) {\n for( var it in jsonObj ) {\n\n if(jsonXmlSpecialElem ( jsonObj, it) || (jsonObjPath!=\"\" && !checkJsonObjPropertiesFilter(jsonObj, it, getJsonPropertyPath(jsonObjPath,it))) )\n continue;\n\n var subObj = jsonObj[it];\n\n var attrList = parseJSONAttributes( subObj )\n\n if(subObj == null || subObj == undefined) {\n result+=startTag(subObj, it, attrList, true);\n }\n else\n if(subObj instanceof Object) {\n\n if(subObj instanceof Array) {\n result+=parseJSONArray( subObj, it, attrList, jsonObjPath );\n }\n else if(subObj instanceof Date) {\n result+=startTag(subObj, it, attrList, false);\n result+=subObj.toISOString();\n result+=endTag(subObj,it);\n }\n else {\n var subObjElementsCnt = jsonXmlElemCount ( subObj );\n if(subObjElementsCnt > 0 || subObj.__text!=null || subObj.__cdata!=null) {\n result+=startTag(subObj, it, attrList, false);\n result+=parseJSONObject(subObj, getJsonPropertyPath(jsonObjPath,it));\n result+=endTag(subObj,it);\n }\n else {\n result+=startTag(subObj, it, attrList, true);\n }\n }\n }\n else {\n result+=startTag(subObj, it, attrList, false);\n result+=parseJSONTextObject(subObj);\n result+=endTag(subObj,it);\n }\n }\n }\n result+=parseJSONTextObject(jsonObj);\n\n return result;\n }\n\n this.parseXmlString = function(xmlDocStr) {\n var isIEParser = window.ActiveXObject || \"ActiveXObject\" in window;\n if (xmlDocStr === undefined) {\n return null;\n }\n var xmlDoc;\n if (window.DOMParser) {\n var parser=new window.DOMParser();\n var parsererrorNS = null;\n try {\n xmlDoc = parser.parseFromString( xmlDocStr, \"text/xml\" );\n if(xmlDoc.getElementsByTagNameNS(\"*\", \"parsererror\").length > 0) {\n xmlDoc = null;\n }\n }\n catch(err) {\n xmlDoc = null;\n }\n }\n else {\n // IE :(\n if(xmlDocStr.indexOf(\"\") + 2 );\n }\n xmlDoc=new ActiveXObject(\"Microsoft.XMLDOM\");\n xmlDoc.async=\"false\";\n xmlDoc.loadXML(xmlDocStr);\n }\n return xmlDoc;\n };\n\n this.asArray = function(prop) {\n if (prop === undefined || prop == null)\n return [];\n else\n if(prop instanceof Array)\n return prop;\n else\n return [prop];\n };\n\n this.toXmlDateTime = function(dt) {\n if(dt instanceof Date)\n return dt.toISOString();\n else\n if(typeof(dt) === 'number' )\n return new Date(dt).toISOString();\n else\n return null;\n };\n\n this.asDateTime = function(prop) {\n if(typeof(prop) == \"string\") {\n return fromXmlDateTime(prop);\n }\n else\n return prop;\n };\n\n this.xml2json = function (xmlDoc) {\n return parseDOMChildren ( xmlDoc );\n };\n\n this.xml_str2json = function (xmlDocStr) {\n var xmlDoc = this.parseXmlString(xmlDocStr);\n if(xmlDoc!=null)\n return this.xml2json(xmlDoc);\n else\n return null;\n };\n\n this.json2xml_str = function (jsonObj) {\n return parseJSONObject ( jsonObj, \"\" );\n };\n\n this.json2xml = function (jsonObj) {\n var xmlDocStr = this.json2xml_str (jsonObj);\n return this.parseXmlString(xmlDocStr);\n };\n\n this.getVersion = function () {\n return VERSION;\n };\n}\n\nexport default X2JS;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport FactoryMaker from '../../core/FactoryMaker';\nimport Settings from '../../core/Settings';\nimport Constants from '../constants/Constants';\n\n/**\n * @module FetchLoader\n * @ignore\n * @description Manages download of resources via HTTP using fetch.\n * @param {Object} cfg - dependencies from parent\n */\nfunction FetchLoader(cfg) {\n\n cfg = cfg || {};\n const context = this.context;\n const requestModifier = cfg.requestModifier;\n const lowLatencyThroughputModel = cfg.lowLatencyThroughputModel;\n const boxParser = cfg.boxParser;\n const settings = Settings(context).getInstance();\n let instance, dashMetrics;\n\n function setup(cfg) {\n dashMetrics = cfg.dashMetrics;\n }\n\n function load(httpRequest) {\n\n // Variables will be used in the callback functions\n const requestStartTime = new Date();\n const request = httpRequest.request;\n\n const headers = new Headers(); /*jshint ignore:line*/\n if (request.range) {\n headers.append('Range', 'bytes=' + request.range);\n }\n\n if (httpRequest.headers) {\n for (let header in httpRequest.headers) {\n let value = httpRequest.headers[header];\n if (value) {\n headers.append(header, value);\n }\n }\n }\n\n if (!request.requestStartDate) {\n request.requestStartDate = requestStartTime;\n }\n\n if (requestModifier) {\n // modifyRequestHeader expects a XMLHttpRequest object so,\n // to keep backward compatibility, we should expose a setRequestHeader method\n // TODO: Remove RequestModifier dependency on XMLHttpRequest object and define\n // a more generic way to intercept/modify requests\n requestModifier.modifyRequestHeader({\n setRequestHeader: function (header, value) {\n headers.append(header, value);\n }\n });\n }\n\n let abortController;\n if (typeof window.AbortController === 'function') {\n abortController = new AbortController(); /*jshint ignore:line*/\n httpRequest.abortController = abortController;\n abortController.signal.onabort = httpRequest.onabort;\n }\n\n const reqOptions = {\n method: httpRequest.method,\n headers: headers,\n credentials: httpRequest.withCredentials ? 'include' : undefined,\n signal: abortController ? abortController.signal : undefined\n };\n\n const calculationMode = settings.get().streaming.abr.fetchThroughputCalculationMode;\n const requestTime = Date.now();\n let throughputCapacityDelayMS = 0;\n\n new Promise((resolve) => {\n if (calculationMode === Constants.ABR_FETCH_THROUGHPUT_CALCULATION_AAST && lowLatencyThroughputModel) {\n throughputCapacityDelayMS = lowLatencyThroughputModel.getThroughputCapacityDelayMS(request, dashMetrics.getCurrentBufferLevel(request.mediaType) * 1000);\n if (throughputCapacityDelayMS) {\n // safely delay the \"fetch\" call a bit to be able to meassure the throughput capacity of the line.\n // this will lead to first few chunks downloaded at max network speed\n return setTimeout(resolve, throughputCapacityDelayMS);\n }\n }\n resolve();\n })\n .then(() => {\n let markBeforeFetch = Date.now();\n\n fetch(httpRequest.url, reqOptions).then(function (response) {\n if (!httpRequest.response) {\n httpRequest.response = {};\n }\n httpRequest.response.status = response.status;\n httpRequest.response.statusText = response.statusText;\n httpRequest.response.responseURL = response.url;\n\n if (!response.ok) {\n httpRequest.onerror();\n }\n\n let responseHeaders = '';\n for (const key of response.headers.keys()) {\n responseHeaders += key + ': ' + response.headers.get(key) + '\\r\\n';\n }\n httpRequest.response.responseHeaders = responseHeaders;\n\n if (!response.body) {\n // Fetch returning a ReadableStream response body is not currently supported by all browsers.\n // Browser compatibility: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API\n // If it is not supported, returning the whole segment when it's ready (as xhr)\n return response.arrayBuffer().then(function (buffer) {\n httpRequest.response.response = buffer;\n const event = {\n loaded: buffer.byteLength,\n total: buffer.byteLength,\n stream: false\n };\n httpRequest.progress(event);\n httpRequest.onload();\n httpRequest.onend();\n return;\n });\n }\n\n const totalBytes = parseInt(response.headers.get('Content-Length'), 10);\n let bytesReceived = 0;\n let signaledFirstByte = false;\n let remaining = new Uint8Array();\n let offset = 0;\n\n if (calculationMode === Constants.ABR_FETCH_THROUGHPUT_CALCULATION_AAST && lowLatencyThroughputModel) {\n let markA = markBeforeFetch;\n let markB = 0;\n\n function fetchMeassurement(stream) {\n const reader = stream.getReader();\n const measurement = [];\n\n reader.read().then(function processFetch(args) {\n const value = args.value;\n const done = args.done;\n markB = Date.now()\n\n if (value && value.length) {\n const chunkDownloadDurationMS = markB - markA;\n const chunkBytes = value.length;\n measurement.push({\n chunkDownloadTimeRelativeMS: markB - markBeforeFetch,\n chunkDownloadDurationMS,\n chunkBytes,\n kbps: Math.round(8 * chunkBytes / (chunkDownloadDurationMS / 1000)),\n bufferLevel: dashMetrics.getCurrentBufferLevel(request.mediaType)\n });\n }\n\n if (done) {\n\n const fetchDuration = markB - markBeforeFetch;\n const bytesAllChunks = measurement.reduce((prev, curr) => prev + curr.chunkBytes, 0);\n\n lowLatencyThroughputModel.addMeasurement(request, fetchDuration, measurement, requestTime, throughputCapacityDelayMS, responseHeaders);\n\n httpRequest.progress({\n loaded: bytesAllChunks,\n total: bytesAllChunks,\n lengthComputable: true,\n time: lowLatencyThroughputModel.getEstimatedDownloadDurationMS(request),\n stream: true\n });\n return;\n }\n markA = Date.now();\n return reader.read().then(processFetch);\n });\n }\n // tee'ing streams is supported by all current major browsers\n // https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/tee\n const [forMeasure, forConsumer] = response.body.tee();\n fetchMeassurement(forMeasure);\n httpRequest.reader = forConsumer.getReader();\n } else {\n httpRequest.reader = response.body.getReader();\n }\n\n let downloadedData = [];\n let startTimeData = [];\n let endTimeData = [];\n let lastChunkWasFinished = true;\n\n\n const processResult = function ({ value, done }) { // Bug fix Parse whenever data is coming [value] better than 1ms looking that increase CPU\n if (done) {\n if (remaining) {\n if (calculationMode !== Constants.ABR_FETCH_THROUGHPUT_CALCULATION_AAST) {\n // If there is pending data, call progress so network metrics\n // are correctly generated\n // Same structure as https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequestEventTarget/\n let calculatedThroughput = null;\n if (calculationMode === Constants.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING) {\n calculatedThroughput = calculateThroughputByChunkData(startTimeData, endTimeData);\n }\n\n httpRequest.progress({\n loaded: bytesReceived,\n total: isNaN(totalBytes) ? bytesReceived : totalBytes,\n lengthComputable: true,\n time: calculateDownloadedTime(downloadedData, bytesReceived),\n throughput: calculatedThroughput,\n stream: true\n });\n }\n\n httpRequest.response.response = remaining.buffer;\n }\n httpRequest.onload();\n httpRequest.onend();\n return;\n }\n\n if (value && value.length > 0) {\n remaining = concatTypedArray(remaining, value);\n bytesReceived += value.length;\n\n downloadedData.push({\n ts: Date.now(),\n bytes: value.length\n });\n\n if (calculationMode === Constants.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING && lastChunkWasFinished) {\n // Parse the payload and capture the the 'moof' box\n const boxesInfo = boxParser.findLastTopIsoBoxCompleted(['moof'], remaining, offset);\n if (boxesInfo.found) {\n // Store the beginning time of each chunk download in array StartTimeData\n lastChunkWasFinished = false;\n startTimeData.push({\n ts: performance.now(), /* jshint ignore:line */\n bytes: value.length\n });\n }\n }\n\n const boxesInfo = boxParser.findLastTopIsoBoxCompleted(['moov', 'mdat'], remaining, offset);\n if (boxesInfo.found) {\n const end = boxesInfo.lastCompletedOffset + boxesInfo.size;\n\n // Store the end time of each chunk download with its size in array EndTimeData\n if (calculationMode === Constants.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING && !lastChunkWasFinished) {\n lastChunkWasFinished = true;\n endTimeData.push({\n ts: performance.now(), /* jshint ignore:line */\n bytes: remaining.length\n });\n }\n\n // If we are going to pass full buffer, avoid copying it and pass\n // complete buffer. Otherwise clone the part of the buffer that is completed\n // and adjust remaining buffer. A clone is needed because ArrayBuffer of a typed-array\n // keeps a reference to the original data\n let data;\n if (end === remaining.length) {\n data = remaining;\n remaining = new Uint8Array();\n } else {\n data = new Uint8Array(remaining.subarray(0, end));\n remaining = remaining.subarray(end);\n }\n // Announce progress but don't track traces. Throughput measures are quite unstable\n // when they are based in small amount of data\n httpRequest.progress({\n data: data.buffer,\n lengthComputable: false,\n noTrace: true\n });\n\n offset = 0;\n } else {\n offset = boxesInfo.lastCompletedOffset;\n // Call progress so it generates traces that will be later used to know when the first byte\n // were received\n if (!signaledFirstByte) {\n httpRequest.progress({\n lengthComputable: false,\n noTrace: true\n });\n signaledFirstByte = true;\n }\n }\n }\n read(httpRequest, processResult);\n };\n read(httpRequest, processResult);\n })\n .catch(function (e) {\n if (httpRequest.onerror) {\n httpRequest.onerror(e);\n }\n });\n });\n }\n\n function read(httpRequest, processResult) {\n httpRequest.reader.read()\n .then(processResult)\n .catch(function (e) {\n if (httpRequest.onerror && httpRequest.response.status === 200) {\n // Error, but response code is 200, trigger error\n httpRequest.onerror(e);\n }\n });\n }\n\n function concatTypedArray(remaining, data) {\n if (remaining.length === 0) {\n return data;\n }\n const result = new Uint8Array(remaining.length + data.length);\n result.set(remaining);\n result.set(data, remaining.length);\n return result;\n }\n\n function abort(request) {\n if (request.abortController) {\n // For firefox and edge\n request.abortController.abort();\n } else if (request.reader) {\n // For Chrome\n try {\n request.reader.cancel();\n request.onabort();\n } catch (e) {\n // throw exceptions (TypeError) when reader was previously closed,\n // for example, because a network issue\n }\n }\n }\n\n function calculateDownloadedTime(downloadedData, bytesReceived) {\n try {\n downloadedData = downloadedData.filter(data => data.bytes > ((bytesReceived / 4) / downloadedData.length));\n if (downloadedData.length > 1) {\n let time = 0;\n const avgTimeDistance = (downloadedData[downloadedData.length - 1].ts - downloadedData[0].ts) / downloadedData.length;\n downloadedData.forEach((data, index) => {\n // To be counted the data has to be over a threshold\n const next = downloadedData[index + 1];\n if (next) {\n const distance = next.ts - data.ts;\n time += distance < avgTimeDistance ? distance : 0;\n }\n });\n return time;\n }\n return null;\n } catch (e) {\n return null;\n }\n }\n\n function calculateThroughputByChunkData(startTimeData, endTimeData) {\n try {\n let datum, datumE;\n // Filter the last chunks in a segment in both arrays [StartTimeData and EndTimeData]\n datum = startTimeData.filter((data, i) => i < startTimeData.length - 1);\n datumE = endTimeData.filter((dataE, i) => i < endTimeData.length - 1);\n let chunkThroughputs = [];\n // Compute the average throughput of the filtered chunk data\n if (datum.length > 1) {\n let shortDurationBytesReceived = 0;\n let shortDurationStartTime = 0;\n for (let i = 0; i < datum.length; i++) {\n if (datum[i] && datumE[i]) {\n let chunkDownloadTime = datumE[i].ts - datum[i].ts;\n if (chunkDownloadTime > 1) {\n chunkThroughputs.push((8 * datumE[i].bytes) / chunkDownloadTime);\n } else {\n if (shortDurationStartTime === 0) {\n shortDurationStartTime = datum[i].ts;\n }\n let cumulatedChunkDownloadTime = datumE[i].ts - shortDurationStartTime;\n if (cumulatedChunkDownloadTime > 1) {\n chunkThroughputs.push((8 * shortDurationBytesReceived) / cumulatedChunkDownloadTime);\n shortDurationBytesReceived = 0;\n shortDurationStartTime = 0;\n } else {\n // continue cumulating short duration data\n shortDurationBytesReceived += datumE[i].bytes;\n }\n }\n }\n }\n\n if (chunkThroughputs.length > 0) {\n const sumOfChunkThroughputs = chunkThroughputs.reduce((a, b) => a + b, 0);\n return sumOfChunkThroughputs / chunkThroughputs.length;\n }\n }\n\n return null;\n } catch (e) {\n return null;\n }\n }\n\n instance = {\n load: load,\n abort: abort,\n calculateDownloadedTime: calculateDownloadedTime,\n setup\n };\n\n return instance;\n}\n\nFetchLoader.__dashjs_factory_name = 'FetchLoader';\n\nconst factory = FactoryMaker.getClassFactory(FetchLoader);\nexport default factory;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport Debug from '../../core/Debug';\nimport FactoryMaker from '../../core/FactoryMaker';\n\nfunction LowLatencyThroughputModel() {\n\n const LLTM_MAX_MEASUREMENTS = 10;\n // factor (<1) is used to reduce the real needed download time when at very bleeding live edge\n const LLTM_SEMI_OPTIMISTIC_ESTIMATE_FACTOR = 0.8;\n const LLTM_OPTIMISTIC_ESTIMATE_FACTOR = 0.6;\n\n const LLTM_SLOW_SEGMENT_DOWNLOAD_TOLERANCE = 1.05;\n const LLTM_MAX_DELAY_MS = 250;\n\n const context = this.context;\n let instance;\n let logger;\n let measurements = {};\n\n function setup() {\n logger = Debug(context).getInstance().getLogger(instance);\n }\n\n /**\n * Linear regression with least squares method to get a trend function for buffer lavel at chunk receive timestamps\n * @param {*} chunkMeasurements\n * @returns linear trend function\n */\n function createBufferLevelTrendFunction(chunkMeasurements) {\n const result = {};\n\n let sumX = 0\n let sumY = 0\n let sumXY = 0\n let sumXSq = 0\n const N = chunkMeasurements.length\n\n\n for (var i = 0; i < N; ++i) {\n sumX += chunkMeasurements[i].chunkDownloadTimeRelativeMS;\n sumY += chunkMeasurements[i].bufferLevel;\n sumXY += chunkMeasurements[i].chunkDownloadTimeRelativeMS * chunkMeasurements[i].bufferLevel;\n sumXSq += chunkMeasurements[i].chunkDownloadTimeRelativeMS * chunkMeasurements[i].chunkDownloadTimeRelativeMS\n }\n\n result.m = ((sumXY - sumX * sumY / N)) / (sumXSq - sumX * sumX / N)\n result.b = sumY / N - result.m * sumX / N\n\n return function (x) {\n return result.m * x + result.b\n }\n }\n\n function isBufferSafeAndStable(lastMeasurements) {\n let isBufferSafeAndStable = true;\n let lastBitrate;\n const aveBufferLevelLastSegements = lastMeasurements.reduce((prev, curr) => prev + curr.bufferLevelAtSegmentEnd, 0) / lastMeasurements.length;\n lastMeasurements.forEach(m => {\n // inner segment buffer stability\n if (Math.abs(m.bufferLevelAtSegmentEnd / m.bufferLevelAtSegmentStart) < 0.95) {\n isBufferSafeAndStable = false;\n }\n\n // inter segment buffer stability\n if (m.bufferLevelAtSegmentEnd / aveBufferLevelLastSegements < 0.8) {\n isBufferSafeAndStable = false;\n }\n\n // representation bitrate remained at least constant\n if (!lastBitrate) {\n lastBitrate = m.bitrate;\n } else if (lastBitrate > m.bitrate) {\n isBufferSafeAndStable = false;\n }\n });\n return isBufferSafeAndStable;\n }\n\n /**\n * Based on the MPD, timing and buffer information of the last recent segments and their chunks\n * the most stable download time (in milliseconds) is calculated.\n * @param {*} request HTTPLoader request object\n * @returns download time in milliseconds of last fetched segment\n */\n function getEstimatedDownloadDurationMS(request) {\n const lastMeasurement = measurements[request.mediaType].slice(-1).pop();\n const lastThreeMeasurements = measurements[request.mediaType].slice(-3)\n\n // calculate and remember the buffer level trend during the last fetched segment\n const lastChunkRelativeTimeMS = lastMeasurement.chunkMeasurements.slice(-1).pop().chunkDownloadTimeRelativeMS;\n lastMeasurement.bufferLevelAtSegmentStart = lastMeasurement.getEstimatedBufferLevel(lastChunkRelativeTimeMS / 2);\n lastMeasurement.bufferLevelAtSegmentEnd = lastMeasurement.getEstimatedBufferLevel(lastChunkRelativeTimeMS);\n\n const isBufferStable = isBufferSafeAndStable(lastThreeMeasurements);\n\n const selectedOptimisticFactor = isBufferStable ? LLTM_OPTIMISTIC_ESTIMATE_FACTOR : LLTM_SEMI_OPTIMISTIC_ESTIMATE_FACTOR;\n\n // fetch duration was longer than segment duration, but buffer was stable\n if (lastMeasurement.isBufferStable && lastMeasurement.segDurationMS * LLTM_SLOW_SEGMENT_DOWNLOAD_TOLERANCE < lastMeasurement.fetchDownloadDurationMS) {\n return lastMeasurement.fetchDownloadDurationMS;\n }\n // buffer is drying or fetch took too long\n if (!isBufferStable || lastMeasurement.segDurationMS < lastMeasurement.fetchDownloadDurationMS) {\n return lastMeasurement.fetchDownloadDurationMS * LLTM_SEMI_OPTIMISTIC_ESTIMATE_FACTOR;\n }\n\n // did we requested a fully available segment? -> most accurate throughput calculation\n // we use adjusted availability start time to decide\n // Note: this \"download mode\" usually happens at startup and if requests are delayed artificially\n if (lastMeasurement.adjustedAvailabilityStartTimeMS <= (lastMeasurement.requestTimeMS + lastMeasurement.throughputCapacityDelayMS) - lastMeasurement.segDurationMS) {\n return lastMeasurement.fetchDownloadDurationMS * LLTM_SEMI_OPTIMISTIC_ESTIMATE_FACTOR;\n }\n\n // get all chunks that have been downloaded before fetch reached bleeding live edge\n // the remaining chunks loaded at production rate we will approximated\n const chunkAvailablePeriod = (lastMeasurement.requestTimeMS + lastMeasurement.throughputCapacityDelayMS) - lastMeasurement.adjustedAvailabilityStartTimeMS;\n let chunkBytesBBLE = 0; // BBLE -> Before bleeding live edge\n let chunkDownloadtimeMSBBLE = 0;\n let chunkCount = 0;\n for (let index = 0; index < lastMeasurement.chunkMeasurements.length; index++) {\n const chunk = lastMeasurement.chunkMeasurements[index];\n if (chunkAvailablePeriod < chunkDownloadtimeMSBBLE + chunk.chunkDownloadDurationMS) {\n break;\n }\n chunkDownloadtimeMSBBLE += chunk.chunkDownloadDurationMS;\n chunkBytesBBLE += chunk.chunkBytes;\n chunkCount++;\n }\n\n if (chunkAvailablePeriod < 0) {\n logger.warn('request time was before adjusted availibitly start time');\n }\n\n // there have to be some chunks available (20% of max count)\n // otherwise we are at bleeding live edge and the few chunks are insufficient to estimate correctly\n if (chunkBytesBBLE && chunkDownloadtimeMSBBLE && chunkCount > lastMeasurement.chunkMeasurements.length * 0.2) {\n const downloadThroughput = chunkBytesBBLE / chunkDownloadtimeMSBBLE; // bytes per millesecond\n const estimatedDownloadtimeMS = lastMeasurement.segmentBytes / downloadThroughput;\n // if real download was shorter then report this incl. semi optimistical estimate factor\n if (lastMeasurement.fetchDownloadDurationMS < estimatedDownloadtimeMS) {\n return lastMeasurement.fetchDownloadDurationMS * selectedOptimisticFactor;\n }\n return estimatedDownloadtimeMS * selectedOptimisticFactor;\n }\n\n // when we are to tight at live edge and it's stable then\n // we start to optimistically estimate download time\n // in such a way that a switch to next rep will be possible\n // optimistical estimate: assume download was fast enough for next higher rendition\n let nextHigherBitrate = lastMeasurement.bitrate;\n lastMeasurement.bitrateList.some(b => {\n if (b.bandwidth > lastMeasurement.bitrate) {\n nextHigherBitrate = b.bandwidth;\n return true;\n }\n });\n // already highest bitrate?\n\n if (nextHigherBitrate === lastMeasurement.bitrate) {\n return lastMeasurement.fetchDownloadDurationMS * selectedOptimisticFactor;\n }\n return selectedOptimisticFactor * lastMeasurement.segmentBytes * 8 * 1000 / nextHigherBitrate;\n }\n\n /**\n * Get calculated value for a safe artificial delay of the next request to allow to accumulate some chunks.\n * This allows better line throughput measurement.\n * @param {*} request\n * @param {*} currentBufferLevel current buffer level in milliseconds\n * @returns delay in milliseconds\n */\n function getThroughputCapacityDelayMS(request, currentBufferLevelMS) {\n const lastThreeMeasurements = measurements[request.mediaType] && measurements[request.mediaType].slice(-3);\n\n if (!lastThreeMeasurements || lastThreeMeasurements.length < 3) {\n return 0;\n }\n\n\n\n // in case not stable buffer, no artificially delay for the next request\n if (!isBufferSafeAndStable(lastThreeMeasurements)) {\n return 0;\n }\n\n // allowed artificial delay is the min of quater of buffer level in milliseconds and LLTM_MAX_DELAY_MS\n return currentBufferLevelMS / 4 > LLTM_MAX_DELAY_MS ? LLTM_MAX_DELAY_MS : currentBufferLevelMS / 4;\n }\n\n /**\n * Add some measurement data for bookkeeping and being able to derive decisions on estimated throughput.\n * @param {*} request HTTPLoader object to get MPD and media info from\n * @param {*} fetchDownloadDurationMS Duration how long the fetch actually took\n * @param {*} chunkMeasurements Array containing chunk timings and buffer levels\n * @param {*} requestTimeMS Timestamp at which the fetch was initiated\n * @param {*} throughputCapacityDelayMS An artificial delay that was used for this request\n */\n function addMeasurement(request, fetchDownloadDurationMS, chunkMeasurements, requestTimeMS, throughputCapacityDelayMS) {\n if (request && request.mediaType && !measurements[request.mediaType]) {\n measurements[request.mediaType] = [];\n }\n const bitrateEntry = request.mediaInfo.bitrateList.find(item => item.id === request.representationId);\n measurements[request.mediaType].push({\n index: request.index,\n repId: request.representationId,\n mediaType: request.mediaType,\n requestTimeMS,\n adjustedAvailabilityStartTimeMS: request.availabilityStartTime.getTime(),\n segDurationMS: request.duration * 1000,\n chunksDurationMS: chunkMeasurements.reduce((prev, curr) => prev + curr.chunkDownloadDurationMS, 0),\n segmentBytes: chunkMeasurements.reduce((prev, curr) => prev + curr.chunkBytes, 0),\n bitrate: bitrateEntry && bitrateEntry.bandwidth,\n bitrateList: request.mediaInfo.bitrateList,\n chunkMeasurements,\n fetchDownloadDurationMS,\n throughputCapacityDelayMS,\n getEstimatedBufferLevel: createBufferLevelTrendFunction(chunkMeasurements.slice(1)) // don't use first chunk's buffer level\n });\n // maintain only a maximum amount of most recent measurements\n if (measurements[request.mediaType].length > LLTM_MAX_MEASUREMENTS) {\n measurements[request.mediaType].shift();\n }\n }\n\n instance = {\n setup,\n addMeasurement,\n getThroughputCapacityDelayMS,\n getEstimatedDownloadDurationMS\n };\n\n setup()\n\n return instance;\n}\n\nLowLatencyThroughputModel.__dashjs_factory_name = 'LowLatencyThroughputModel';\nexport default FactoryMaker.getSingletonFactory(LowLatencyThroughputModel);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport XHRLoader from './XHRLoader';\nimport FetchLoader from './FetchLoader';\nimport {HTTPRequest} from '../vo/metrics/HTTPRequest';\nimport FactoryMaker from '../../core/FactoryMaker';\nimport DashJSError from '../vo/DashJSError';\nimport CmcdModel from '../models/CmcdModel';\nimport Utils from '../../core/Utils';\nimport Debug from '../../core/Debug';\nimport EventBus from '../../core/EventBus';\nimport Events from '../../core/events/Events';\nimport Settings from '../../core/Settings';\nimport Constants from '../constants/Constants';\nimport LowLatencyThroughputModel from '../models/LowLatencyThroughputModel';\n\n/**\n * @module HTTPLoader\n * @ignore\n * @description Manages download of resources via HTTP.\n * @param {Object} cfg - dependancies from parent\n */\nfunction HTTPLoader(cfg) {\n\n cfg = cfg || {};\n\n const context = this.context;\n const errHandler = cfg.errHandler;\n const dashMetrics = cfg.dashMetrics;\n const mediaPlayerModel = cfg.mediaPlayerModel;\n const requestModifier = cfg.requestModifier;\n const boxParser = cfg.boxParser;\n const errors = cfg.errors;\n const requestTimeout = cfg.requestTimeout || 0;\n const eventBus = EventBus(context).getInstance();\n const settings = Settings(context).getInstance();\n\n let instance,\n requests,\n delayedRequests,\n retryRequests,\n downloadErrorToRequestTypeMap,\n cmcdModel,\n lowLatencyThroughputModel,\n logger;\n\n function setup() {\n logger = Debug(context).getInstance().getLogger(instance);\n requests = [];\n delayedRequests = [];\n retryRequests = [];\n cmcdModel = CmcdModel(context).getInstance();\n lowLatencyThroughputModel = LowLatencyThroughputModel(context).getInstance();\n\n downloadErrorToRequestTypeMap = {\n [HTTPRequest.MPD_TYPE]: errors.DOWNLOAD_ERROR_ID_MANIFEST_CODE,\n [HTTPRequest.XLINK_EXPANSION_TYPE]: errors.DOWNLOAD_ERROR_ID_XLINK_CODE,\n [HTTPRequest.INIT_SEGMENT_TYPE]: errors.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE,\n [HTTPRequest.MEDIA_SEGMENT_TYPE]: errors.DOWNLOAD_ERROR_ID_CONTENT_CODE,\n [HTTPRequest.INDEX_SEGMENT_TYPE]: errors.DOWNLOAD_ERROR_ID_CONTENT_CODE,\n [HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE]: errors.DOWNLOAD_ERROR_ID_CONTENT_CODE,\n [HTTPRequest.OTHER_TYPE]: errors.DOWNLOAD_ERROR_ID_CONTENT_CODE\n };\n }\n\n function internalLoad(config, remainingAttempts) {\n const request = config.request;\n const traces = [];\n let firstProgress = true;\n let needFailureReport = true;\n let requestStartTime = new Date();\n let lastTraceTime = requestStartTime;\n let lastTraceReceivedCount = 0;\n let httpRequest;\n\n if (!requestModifier || !dashMetrics || !errHandler) {\n throw new Error('config object is not correct or missing');\n }\n\n const handleLoaded = function (success) {\n needFailureReport = false;\n\n request.requestStartDate = requestStartTime;\n request.requestEndDate = new Date();\n request.firstByteDate = request.firstByteDate || requestStartTime;\n\n if (!request.checkExistenceOnly) {\n const responseUrl = httpRequest.response ? httpRequest.response.responseURL : null;\n const responseStatus = httpRequest.response ? httpRequest.response.status : null;\n const responseHeaders = httpRequest.response && httpRequest.response.getAllResponseHeaders ? httpRequest.response.getAllResponseHeaders() :\n httpRequest.response ? httpRequest.response.responseHeaders : [];\n\n dashMetrics.addHttpRequest(request, responseUrl, responseStatus, responseHeaders, success ? traces : null);\n\n if (request.type === HTTPRequest.MPD_TYPE) {\n dashMetrics.addManifestUpdate(request);\n }\n }\n };\n\n const onloadend = function () {\n if (requests.indexOf(httpRequest) === -1) {\n return;\n } else {\n requests.splice(requests.indexOf(httpRequest), 1);\n }\n\n if (needFailureReport) {\n handleLoaded(false);\n\n if (remainingAttempts > 0) {\n\n // If we get a 404 to a media segment we should check the client clock again and perform a UTC sync in the background.\n try {\n if (settings.get().streaming.utcSynchronization.enableBackgroundSyncAfterSegmentDownloadError && request.type === HTTPRequest.MEDIA_SEGMENT_TYPE) {\n // Only trigger a sync if the loading failed for the first time\n const initialNumberOfAttempts = mediaPlayerModel.getRetryAttemptsForType(HTTPRequest.MEDIA_SEGMENT_TYPE);\n if (initialNumberOfAttempts === remainingAttempts) {\n eventBus.trigger(Events.ATTEMPT_BACKGROUND_SYNC);\n }\n }\n } catch (e) {\n\n }\n\n remainingAttempts--;\n let retryRequest = { config: config };\n retryRequests.push(retryRequest);\n retryRequest.timeout = setTimeout(function () {\n if (retryRequests.indexOf(retryRequest) === -1) {\n return;\n } else {\n retryRequests.splice(retryRequests.indexOf(retryRequest), 1);\n }\n internalLoad(config, remainingAttempts);\n }, mediaPlayerModel.getRetryIntervalsForType(request.type));\n } else {\n if (request.type === HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE) {\n return;\n }\n\n errHandler.error(new DashJSError(downloadErrorToRequestTypeMap[request.type], request.url + ' is not available', {\n request: request,\n response: httpRequest.response\n }));\n\n if (config.error) {\n config.error(request, 'error', httpRequest.response.statusText);\n }\n\n if (config.complete) {\n config.complete(request, httpRequest.response.statusText);\n }\n }\n }\n };\n\n const progress = function (event) {\n const currentTime = new Date();\n\n if (firstProgress) {\n firstProgress = false;\n if (!event.lengthComputable ||\n (event.lengthComputable && event.total !== event.loaded)) {\n request.firstByteDate = currentTime;\n }\n }\n\n if (event.lengthComputable) {\n request.bytesLoaded = event.loaded;\n request.bytesTotal = event.total;\n }\n\n if (!event.noTrace) {\n traces.push({\n s: lastTraceTime,\n d: event.time ? event.time : currentTime.getTime() - lastTraceTime.getTime(),\n b: [event.loaded ? event.loaded - lastTraceReceivedCount : 0],\n t: event.throughput\n });\n\n lastTraceTime = currentTime;\n lastTraceReceivedCount = event.loaded;\n }\n\n if (config.progress && event) {\n config.progress(event);\n }\n };\n\n const onload = function () {\n if (httpRequest.response.status >= 200 && httpRequest.response.status <= 299) {\n handleLoaded(true);\n\n if (config.success) {\n config.success(httpRequest.response.response, httpRequest.response.statusText, httpRequest.response.responseURL);\n }\n\n if (config.complete) {\n config.complete(request, httpRequest.response.statusText);\n }\n }\n };\n\n const onabort = function () {\n if (config.abort) {\n config.abort(request);\n }\n };\n\n const ontimeout = function (event) {\n let timeoutMessage;\n if (event.lengthComputable) {\n let percentageComplete = (event.loaded / event.total) * 100;\n timeoutMessage = 'Request timeout: loaded: ' + event.loaded + ', out of: ' + event.total + ' : ' + percentageComplete.toFixed(3) + '% Completed';\n } else {\n timeoutMessage = 'Request timeout: non-computable download size';\n }\n logger.warn(timeoutMessage);\n };\n\n let loader;\n if (settings.get().streaming.lowLatencyEnabled && window.fetch && request.responseType === 'arraybuffer' && request.type === HTTPRequest.MEDIA_SEGMENT_TYPE) {\n loader = FetchLoader(context).create({\n requestModifier: requestModifier,\n lowLatencyThroughputModel,\n boxParser: boxParser\n });\n loader.setup({\n dashMetrics\n });\n } else {\n loader = XHRLoader(context).create({\n requestModifier: requestModifier\n });\n }\n\n let headers = null;\n let modifiedUrl = requestModifier.modifyRequestURL(request.url);\n if (settings.get().streaming.cmcd && settings.get().streaming.cmcd.enabled) {\n const cmcdMode = settings.get().streaming.cmcd.mode;\n if (cmcdMode === Constants.CMCD_MODE_QUERY) {\n const additionalQueryParameter = _getAdditionalQueryParameter(request);\n modifiedUrl = Utils.addAditionalQueryParameterToUrl(modifiedUrl, additionalQueryParameter);\n } else if (cmcdMode === Constants.CMCD_MODE_HEADER) {\n headers = cmcdModel.getHeaderParameters(request);\n }\n }\n request.url = modifiedUrl;\n const verb = request.checkExistenceOnly ? HTTPRequest.HEAD : HTTPRequest.GET;\n const withCredentials = mediaPlayerModel.getXHRWithCredentialsForType(request.type);\n\n\n httpRequest = {\n url: modifiedUrl,\n method: verb,\n withCredentials: withCredentials,\n request: request,\n onload: onload,\n onend: onloadend,\n onerror: onloadend,\n progress: progress,\n onabort: onabort,\n ontimeout: ontimeout,\n loader: loader,\n timeout: requestTimeout,\n headers: headers\n };\n\n // Adds the ability to delay single fragment loading time to control buffer.\n let now = new Date().getTime();\n if (isNaN(request.delayLoadingTime) || now >= request.delayLoadingTime) {\n // no delay - just send\n requests.push(httpRequest);\n loader.load(httpRequest);\n } else {\n // delay\n let delayedRequest = { httpRequest: httpRequest };\n delayedRequests.push(delayedRequest);\n delayedRequest.delayTimeout = setTimeout(function () {\n if (delayedRequests.indexOf(delayedRequest) === -1) {\n return;\n } else {\n delayedRequests.splice(delayedRequests.indexOf(delayedRequest), 1);\n }\n try {\n requestStartTime = new Date();\n lastTraceTime = requestStartTime;\n requests.push(delayedRequest.httpRequest);\n loader.load(delayedRequest.httpRequest);\n } catch (e) {\n delayedRequest.httpRequest.onerror();\n }\n }, (request.delayLoadingTime - now));\n }\n }\n\n function _getAdditionalQueryParameter(request) {\n try {\n const additionalQueryParameter = [];\n const cmcdQueryParameter = cmcdModel.getQueryParameter(request);\n\n if (cmcdQueryParameter) {\n additionalQueryParameter.push(cmcdQueryParameter);\n }\n\n return additionalQueryParameter;\n } catch (e) {\n return [];\n }\n }\n\n /**\n * Initiates a download of the resource described by config.request\n * @param {Object} config - contains request (FragmentRequest or derived type), and callbacks\n * @memberof module:HTTPLoader\n * @instance\n */\n function load(config) {\n if (config.request) {\n internalLoad(\n config,\n mediaPlayerModel.getRetryAttemptsForType(\n config.request.type\n )\n );\n } else {\n if (config.error) {\n config.error(config.request, 'error');\n }\n }\n }\n\n /**\n * Aborts any inflight downloads\n * @memberof module:HTTPLoader\n * @instance\n */\n function abort() {\n retryRequests.forEach(t => {\n clearTimeout(t.timeout);\n // abort request in order to trigger LOADING_ABANDONED event\n if (t.config.request && t.config.abort) {\n t.config.abort(t.config.request);\n }\n });\n retryRequests = [];\n\n delayedRequests.forEach(x => clearTimeout(x.delayTimeout));\n delayedRequests = [];\n\n requests.forEach(x => {\n // MSS patch: ignore FragmentInfo requests\n if (x.request.type === HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE) {\n return;\n }\n\n // abort will trigger onloadend which we don't want\n // when deliberately aborting inflight requests -\n // set them to undefined so they are not called\n x.onloadend = x.onerror = x.onprogress = undefined;\n x.loader.abort(x);\n });\n requests = [];\n }\n\n instance = {\n load: load,\n abort: abort\n };\n\n setup();\n\n return instance;\n}\n\nHTTPLoader.__dashjs_factory_name = 'HTTPLoader';\n\nconst factory = FactoryMaker.getClassFactory(HTTPLoader);\nexport default factory;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport FactoryMaker from '../../core/FactoryMaker';\nimport HTTPLoader from '../../streaming/net/HTTPLoader';\n\n/**\n * @module\n * @description Choose right url loader for scheme\n * @ignore\n */\nfunction SchemeLoaderFactory() {\n\n let instance;\n\n let schemeLoaderMap;\n\n function registerLoader(scheme, loader) {\n schemeLoaderMap[scheme] = loader;\n }\n\n function unregisterLoader(scheme) {\n if (schemeLoaderMap[scheme]) {\n delete schemeLoaderMap[scheme];\n }\n }\n\n function unregisterAllLoader() {\n schemeLoaderMap = {};\n }\n\n function getLoader(url) {\n\n // iterates through schemeLoaderMap to find a loader for the scheme\n for (var scheme in schemeLoaderMap) {\n if (schemeLoaderMap.hasOwnProperty(scheme) && url.startsWith(scheme)) {\n return schemeLoaderMap[scheme];\n }\n }\n\n return HTTPLoader;\n }\n\n function reset() {\n unregisterAllLoader();\n }\n\n function setup() {\n reset();\n }\n\n setup();\n\n instance = {\n getLoader: getLoader,\n registerLoader: registerLoader,\n unregisterLoader: unregisterLoader,\n unregisterAllLoader: unregisterAllLoader,\n reset: reset\n };\n\n return instance;\n}\n\nSchemeLoaderFactory.__dashjs_factory_name = 'SchemeLoaderFactory';\nconst factory = FactoryMaker.getSingletonFactory(SchemeLoaderFactory);\nexport default factory;\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\n\nfunction isArray(arg) {\n if (Array.isArray) {\n return Array.isArray(arg);\n }\n return objectToString(arg) === '[object Array]';\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = Buffer.isBuffer;\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n","// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,\n// backported and transplited with Babel, with backwards-compat fixes\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string') {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n var isAbsolute = exports.isAbsolute(path),\n trailingSlash = substr(path, -1) === '/';\n\n // Normalize the path\n path = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n if (typeof p !== 'string') {\n throw new TypeError('Arguments to path.join must be strings');\n }\n return p;\n }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n from = exports.resolve(from).substr(1);\n to = exports.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end - start + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function (path) {\n if (typeof path !== 'string') path = path + '';\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) {\n // return '//';\n // Backwards-compat fix:\n return '/';\n }\n return path.slice(0, end);\n};\n\nfunction basename(path) {\n if (typeof path !== 'string') path = path + '';\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n}\n\n// Uses a mixed approach for backwards-compatibility, as ext behavior changed\n// in new Node.js versions, so only basename() above is backported here\nexports.basename = function (path, ext) {\n var f = basename(path);\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\nexports.extname = function (path) {\n if (typeof path !== 'string') path = path + '';\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n};\n\nfunction filter (xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n ? function (str, start, len) { return str.substr(start, len) }\n : function (str, start, len) {\n if (start < 0) start = str.length + start;\n return str.substr(start, len);\n }\n;\n","/* \r\n * Copyright (c) 2016, Pierre-Anthony Lemieux \r\n * All rights reserved.\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * * Redistributions of source code must retain the above copyright notice, this\r\n * list of conditions and the following disclaimer.\r\n * * Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n */\r\n\r\nexports.generateISD = require('./isd').generateISD;\r\nexports.fromXML = require('./doc').fromXML;\r\nexports.renderHTML = require('./html').render;","/**\n* The copyright in this software is being made available under the BSD License,\n* included below. This software may be subject to other third party and contributor\n* rights, including patent rights, and no such rights are granted under this license.\n*\n* Copyright (c) 2013, Dash Industry Forum.\n* All rights reserved.\n*\n* Redistribution and use in source and binary forms, with or without modification,\n* are permitted provided that the following conditions are met:\n* * Redistributions of source code must retain the above copyright notice, this\n* list of conditions and the following disclaimer.\n* * Redistributions in binary form must reproduce the above copyright notice,\n* this list of conditions and the following disclaimer in the documentation and/or\n* other materials provided with the distribution.\n* * Neither the name of Dash Industry Forum nor the names of its\n* contributors may be used to endorse or promote products derived from this software\n* without specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n* POSSIBILITY OF SUCH DAMAGE.\n*/\nimport FactoryMaker from '../../core/FactoryMaker';\nimport { checkInteger } from '../utils/SupervisorTools';\n\nfunction CustomTimeRanges(/*config*/) {\n let customTimeRangeArray = [];\n let length = 0;\n\n function add(start, end) {\n let i = 0;\n\n for (i = 0; (i < this.customTimeRangeArray.length) && (start > this.customTimeRangeArray[i].start); i++);\n\n this.customTimeRangeArray.splice(i, 0, {start: start,end: end});\n\n for (i = 0; i < this.customTimeRangeArray.length - 1; i++) {\n if (this.mergeRanges(i,i + 1)) {\n i--;\n }\n }\n this.length = this.customTimeRangeArray.length;\n }\n\n function clear() {\n this.customTimeRangeArray = [];\n this.length = 0;\n }\n\n function remove(start, end) {\n for (let i = 0; i < this.customTimeRangeArray.length; i++) {\n if (start <= this.customTimeRangeArray[i].start && end >= this.customTimeRangeArray[i].end) {\n // |--------------Range i-------|\n //|---------------Range to remove ---------------|\n // or\n //|--------------Range i-------|\n //|--------------Range to remove ---------------|\n // or\n // |--------------Range i-------|\n //|--------------Range to remove ---------------|\n this.customTimeRangeArray.splice(i,1);\n i--;\n\n } else if (start > this.customTimeRangeArray[i].start && end < this.customTimeRangeArray[i].end) {\n //|-----------------Range i----------------|\n // |-------Range to remove -----|\n this.customTimeRangeArray.splice(i + 1, 0, {start: end,end: this.customTimeRangeArray[i].end});\n this.customTimeRangeArray[i].end = start;\n break;\n } else if ( start > this.customTimeRangeArray[i].start && start < this.customTimeRangeArray[i].end) {\n //|-----------Range i----------|\n // |---------Range to remove --------|\n // or\n //|-----------------Range i----------------|\n // |-------Range to remove -----|\n this.customTimeRangeArray[i].end = start;\n } else if ( end > this.customTimeRangeArray[i].start && end < this.customTimeRangeArray[i].end) {\n // |-----------Range i----------|\n //|---------Range to remove --------|\n // or\n //|-----------------Range i----------------|\n //|-------Range to remove -----|\n this.customTimeRangeArray[i].start = end;\n }\n }\n\n this.length = this.customTimeRangeArray.length;\n }\n\n function mergeRanges(rangeIndex1, rangeIndex2) {\n let range1 = this.customTimeRangeArray[rangeIndex1];\n let range2 = this.customTimeRangeArray[rangeIndex2];\n\n if (range1.start <= range2.start && range2.start <= range1.end && range1.end <= range2.end) {\n //|-----------Range1----------|\n // |-----------Range2----------|\n range1.end = range2.end;\n this.customTimeRangeArray.splice(rangeIndex2,1);\n return true;\n\n } else if (range2.start <= range1.start && range1.start <= range2.end && range2.end <= range1.end) {\n // |-----------Range1----------|\n //|-----------Range2----------|\n range1.start = range2.start;\n this.customTimeRangeArray.splice(rangeIndex2,1);\n return true;\n } else if (range2.start <= range1.start && range1.start <= range2.end && range1.end <= range2.end) {\n // |--------Range1-------|\n //|---------------Range2--------------|\n this.customTimeRangeArray.splice(rangeIndex1,1);\n return true;\n } else if (range1.start <= range2.start && range2.start <= range1.end && range2.end <= range1.end) {\n //|-----------------Range1--------------|\n // |-----------Range2----------|\n this.customTimeRangeArray.splice(rangeIndex2,1);\n return true;\n }\n return false;\n }\n\n function start(index) {\n checkInteger(index);\n\n if (index >= this.customTimeRangeArray.length || index < 0) {\n return NaN;\n }\n\n return this.customTimeRangeArray[index].start;\n }\n\n function end(index) {\n checkInteger(index);\n\n if (index >= this.customTimeRangeArray.length || index < 0) {\n return NaN;\n }\n\n return this.customTimeRangeArray[index].end;\n }\n\n return {\n customTimeRangeArray: customTimeRangeArray,\n length: length,\n add: add,\n clear: clear,\n remove: remove,\n mergeRanges: mergeRanges,\n start: start,\n end: end\n };\n}\nCustomTimeRanges.__dashjs_factory_name = 'CustomTimeRanges';\nexport default FactoryMaker.getClassFactory(CustomTimeRanges);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport FactoryMaker from '../../core/FactoryMaker';\nimport {THUMBNAILS_SCHEME_ID_URIS} from '../thumbnail/ThumbnailTracks';\nimport Constants from '../constants/Constants';\n\nconst codecCompatibilityTable = [\n {\n 'codec': 'avc1',\n 'compatibleCodecs': ['avc3']\n },\n {\n 'codec': 'avc3',\n 'compatibleCodecs': ['avc1']\n }\n];\n\nexport function supportsMediaSource() {\n let hasWebKit = ('WebKitMediaSource' in window);\n let hasMediaSource = ('MediaSource' in window);\n\n return (hasWebKit || hasMediaSource);\n}\n\nfunction Capabilities() {\n\n let instance,\n settings,\n encryptedMediaSupported;\n\n function setup() {\n encryptedMediaSupported = false;\n }\n\n function setConfig(config) {\n if (!config) {\n return;\n }\n\n if (config.settings) {\n settings = config.settings;\n }\n }\n\n /**\n * Returns whether Encrypted Media Extensions are supported on this\n * user agent\n *\n * @return {boolean} true if EME is supported, false otherwise\n */\n function supportsEncryptedMedia() {\n return encryptedMediaSupported;\n }\n\n /**\n *\n * @param {boolean} value\n */\n function setEncryptedMediaSupported(value) {\n encryptedMediaSupported = value;\n }\n\n /**\n * Check if a codec is supported by the MediaSource. We use the MediaCapabilities API or the MSE to check.\n * @param {object} config\n * @param {string} type\n * @return {Promise}\n */\n function supportsCodec(config, type) {\n\n if (type !== Constants.AUDIO && type !== Constants.VIDEO) {\n return Promise.resolve(true);\n }\n\n if (_canUseMediaCapabilitiesApi(config, type)) {\n return _checkCodecWithMediaCapabilities(config, type);\n }\n\n return _checkCodecWithMse(config);\n }\n\n /**\n * MediaCapabilitiesAPI throws an error if one of the attribute is missing. We only use it if we have all required information.\n * @param {object} config\n * @param {string} type\n * @return {*|boolean|boolean}\n * @private\n */\n function _canUseMediaCapabilitiesApi(config, type) {\n\n return settings.get().streaming.capabilities.useMediaCapabilitiesApi && navigator.mediaCapabilities && navigator.mediaCapabilities.decodingInfo && ((config.codec && type === Constants.AUDIO) || (type === Constants.VIDEO && config.codec && config.width && config.height && config.bitrate && config.framerate));\n }\n\n /**\n * Check codec support using the MSE\n * @param {object} config\n * @return {Promise | Promise}\n * @private\n */\n function _checkCodecWithMse(config) {\n return new Promise((resolve) => {\n if (!config || !config.codec) {\n resolve(false);\n return;\n }\n\n let codec = config.codec;\n if (config.width && config.height) {\n codec += ';width=\"' + config.width + '\";height=\"' + config.height + '\"';\n }\n\n if ('MediaSource' in window && MediaSource.isTypeSupported(codec)) {\n resolve(true);\n return;\n } else if ('WebKitMediaSource' in window && WebKitMediaSource.isTypeSupported(codec)) {\n resolve(true);\n return;\n }\n\n resolve(false);\n });\n\n }\n\n /**\n * Check codec support using the MediaCapabilities API\n * @param {object} config\n * @param {string} type\n * @return {Promise}\n * @private\n */\n function _checkCodecWithMediaCapabilities(config, type) {\n return new Promise((resolve) => {\n\n if (!config || !config.codec) {\n resolve(false);\n return;\n }\n\n const configuration = {\n type: 'media-source'\n };\n\n configuration[type] = {};\n configuration[type].contentType = config.codec;\n configuration[type].width = config.width;\n configuration[type].height = config.height;\n configuration[type].bitrate = parseInt(config.bitrate);\n configuration[type].framerate = parseFloat(config.framerate);\n\n navigator.mediaCapabilities.decodingInfo(configuration)\n .then((result) => {\n resolve(result.supported);\n })\n .catch(() => {\n resolve(false);\n });\n });\n }\n\n /**\n * Check if a specific EssentialProperty is supported\n * @param {object} ep\n * @return {boolean}\n */\n function supportsEssentialProperty(ep) {\n try {\n return THUMBNAILS_SCHEME_ID_URIS.indexOf(ep.schemeIdUri) !== -1;\n } catch (e) {\n return true;\n }\n }\n\n /**\n * Check if the root of the old codec is the same as the new one, or if it's declared as compatible in the compat table\n * @param {string} codec1\n * @param {string} codec2\n * @return {boolean}\n */\n function codecRootCompatibleWithCodec(codec1, codec2) {\n const codecRoot = codec1.split('.')[0];\n const rootCompatible = codec2.indexOf(codecRoot) === 0;\n let compatTableCodec;\n for (let i = 0; i < codecCompatibilityTable.length; i++) {\n if (codecCompatibilityTable[i].codec === codecRoot) {\n compatTableCodec = codecCompatibilityTable[i];\n break;\n }\n }\n if (compatTableCodec) {\n return rootCompatible || compatTableCodec.compatibleCodecs.some((compatibleCodec) => codec2.indexOf(compatibleCodec) === 0);\n }\n return rootCompatible;\n }\n\n instance = {\n setConfig,\n supportsMediaSource,\n supportsEncryptedMedia,\n supportsCodec,\n setEncryptedMediaSupported,\n supportsEssentialProperty,\n codecRootCompatibleWithCodec\n };\n\n setup();\n\n return instance;\n}\n\nCapabilities.__dashjs_factory_name = 'Capabilities';\nexport default FactoryMaker.getSingletonFactory(Capabilities);\n","/* \r\n * Copyright (c) 2016, Pierre-Anthony Lemieux \r\n * All rights reserved.\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * * Redistributions of source code must retain the above copyright notice, this\r\n * list of conditions and the following disclaimer.\r\n * * Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n */\r\n\r\n/**\r\n * @module imscNames\r\n */\r\n\r\n;\r\n(function (imscNames) { // wrapper for non-node envs\r\n\r\n imscNames.ns_tt = \"http://www.w3.org/ns/ttml\";\r\n imscNames.ns_tts = \"http://www.w3.org/ns/ttml#styling\";\r\n imscNames.ns_ttp = \"http://www.w3.org/ns/ttml#parameter\";\r\n imscNames.ns_xml = \"http://www.w3.org/XML/1998/namespace\";\r\n imscNames.ns_itts = \"http://www.w3.org/ns/ttml/profile/imsc1#styling\";\r\n imscNames.ns_ittp = \"http://www.w3.org/ns/ttml/profile/imsc1#parameter\";\r\n imscNames.ns_smpte = \"http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt\";\r\n imscNames.ns_ebutts = \"urn:ebu:tt:style\";\r\n \r\n})(typeof exports === 'undefined' ? this.imscNames = {} : exports);\r\n\r\n\r\n\r\n\r\n","'use strict';\n\nif (!process.version ||\n process.version.indexOf('v0.') === 0 ||\n process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {\n module.exports = { nextTick: nextTick };\n} else {\n module.exports = process\n}\n\nfunction nextTick(fn, arg1, arg2, arg3) {\n if (typeof fn !== 'function') {\n throw new TypeError('\"callback\" argument must be a function');\n }\n var len = arguments.length;\n var args, i;\n switch (len) {\n case 0:\n case 1:\n return process.nextTick(fn);\n case 2:\n return process.nextTick(function afterTickOne() {\n fn.call(null, arg1);\n });\n case 3:\n return process.nextTick(function afterTickTwo() {\n fn.call(null, arg1, arg2);\n });\n case 4:\n return process.nextTick(function afterTickThree() {\n fn.call(null, arg1, arg2, arg3);\n });\n default:\n args = new Array(len - 1);\n i = 0;\n while (i < args.length) {\n args[i++] = arguments[i];\n }\n return process.nextTick(function afterTick() {\n fn.apply(null, args);\n });\n }\n}\n\n","/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n * Metrics Constants declaration\n * @class\n * @ignore\n */\nclass MetricsConstants {\n\n init () {\n this.TCP_CONNECTION = 'TcpList';\n this.HTTP_REQUEST = 'HttpList';\n this.TRACK_SWITCH = 'RepSwitchList';\n this.BUFFER_LEVEL = 'BufferLevel';\n this.BUFFER_LOADED = 'bufferLoaded';\n this.ABANDON_LOAD = 'abandonload';\n this.ALLOW_LOAD = 'allowload';\n this.BUFFER_EMPTY = 'bufferStalled';\n this.BUFFER_STATE = 'BufferState';\n this.DVR_INFO = 'DVRInfo';\n this.DROPPED_FRAMES = 'DroppedFrames';\n this.SCHEDULING_INFO = 'SchedulingInfo';\n this.REQUESTS_QUEUE = 'RequestsQueue';\n this.MANIFEST_UPDATE = 'ManifestUpdate';\n this.MANIFEST_UPDATE_STREAM_INFO = 'ManifestUpdatePeriodInfo';\n this.MANIFEST_UPDATE_TRACK_INFO = 'ManifestUpdateRepresentationInfo';\n this.PLAY_LIST = 'PlayList';\n this.DVB_ERRORS = 'DVBErrors';\n }\n\n constructor() {\n this.init();\n }\n}\n\nlet constants = new MetricsConstants();\nexport default constants;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport Constants from '../constants/Constants';\nimport MetricsConstants from '../constants/MetricsConstants';\nimport EventBus from '../../core/EventBus';\nimport Events from '../../core/events/Events';\nimport FactoryMaker from '../../core/FactoryMaker';\nimport Debug from '../../core/Debug';\nimport MediaPlayerEvents from '../../streaming/MediaPlayerEvents';\n\nconst LIVE_UPDATE_PLAYBACK_TIME_INTERVAL_MS = 500;\n\nfunction PlaybackController() {\n\n const context = this.context;\n const eventBus = EventBus(context).getInstance();\n\n let instance,\n logger,\n streamController,\n dashMetrics,\n adapter,\n videoModel,\n timelineConverter,\n wallclockTimeIntervalId,\n liveDelay,\n streamInfo,\n isDynamic,\n mediaPlayerModel,\n playOnceInitialized,\n lastLivePlaybackTime,\n availabilityStartTime,\n seekTarget,\n internalSeek,\n isLowLatencySeekingInProgress,\n playbackStalled,\n minPlaybackRateChange,\n manifestUpdateInProgress,\n settings;\n\n function setup() {\n logger = Debug(context).getInstance().getLogger(instance);\n\n reset();\n }\n\n /**\n * Initializes the PlaybackController. This function is called whenever the stream is switched.\n * @param {object} sInfo\n * @param {boolean} periodSwitch\n */\n function initialize(sInfo, periodSwitch) {\n streamInfo = sInfo;\n\n if (periodSwitch !== true) {\n _initializeForFirstStream();\n } else {\n _initializeAfterStreamSwitch();\n }\n }\n\n /**\n * Initializes the PlaybackController when the first stream is to be played.\n * @private\n */\n function _initializeForFirstStream() {\n addAllListeners();\n isDynamic = streamInfo.manifestInfo.isDynamic;\n isLowLatencySeekingInProgress = false;\n playbackStalled = false;\n internalSeek = false;\n\n // Detect safari browser (special behavior for low latency streams)\n const ua = typeof navigator !== 'undefined' ? navigator.userAgent.toLowerCase() : '';\n const isSafari = /safari/.test(ua) && !/chrome/.test(ua);\n minPlaybackRateChange = isSafari ? 0.25 : 0.02;\n\n eventBus.on(Events.DATA_UPDATE_COMPLETED, _onDataUpdateCompleted, instance);\n eventBus.on(Events.LOADING_PROGRESS, _onFragmentLoadProgress, instance);\n eventBus.on(Events.MANIFEST_UPDATED, _onManifestUpdated, instance);\n eventBus.on(Events.STREAMS_COMPOSED, _onStreamsComposed, instance);\n eventBus.on(MediaPlayerEvents.BUFFER_LEVEL_STATE_CHANGED, _onBufferLevelStateChanged, instance);\n eventBus.on(MediaPlayerEvents.PLAYBACK_PROGRESS, _onPlaybackProgression, instance);\n eventBus.on(MediaPlayerEvents.PLAYBACK_TIME_UPDATED, _onPlaybackProgression, instance);\n eventBus.on(MediaPlayerEvents.PLAYBACK_ENDED, _onPlaybackEnded, instance, { priority: EventBus.EVENT_PRIORITY_HIGH });\n eventBus.on(MediaPlayerEvents.STREAM_INITIALIZING, _onStreamInitializing, instance);\n eventBus.on(MediaPlayerEvents.REPRESENTATION_SWITCH, _onRepresentationSwitch, instance);\n\n if (playOnceInitialized) {\n playOnceInitialized = false;\n play();\n }\n }\n\n /**\n * Initializes the PlaybackController after the stream is switched. This will only happen with multiperiod MPDs.\n * @private\n */\n function _initializeAfterStreamSwitch() {\n\n }\n\n function getTimeToStreamEnd(sInfo = null) {\n return parseFloat((getStreamEndTime(sInfo) - getTime()).toFixed(5));\n }\n\n function getStreamEndTime(sInfo) {\n const refInfo = sInfo ? sInfo : streamInfo;\n return refInfo.start + refInfo.duration;\n }\n\n function play() {\n if (streamInfo && videoModel && videoModel.getElement()) {\n videoModel.play();\n } else {\n playOnceInitialized = true;\n }\n }\n\n function isPaused() {\n return streamInfo && videoModel ? videoModel.isPaused() : null;\n }\n\n function pause() {\n if (streamInfo && videoModel) {\n videoModel.pause();\n }\n }\n\n function isSeeking() {\n return streamInfo && videoModel ? videoModel.isSeeking() : null;\n }\n\n function isStalled() {\n return streamInfo && videoModel ? videoModel.isStalled() : null;\n }\n\n function seek(time, stickToBuffered, internal) {\n if (!streamInfo || !videoModel) return;\n\n let currentTime = !isNaN(seekTarget) ? seekTarget : videoModel.getTime();\n if (time === currentTime) return;\n\n internalSeek = (internal === true);\n\n if (!internalSeek) {\n seekTarget = time;\n eventBus.trigger(Events.PLAYBACK_SEEK_ASKED);\n }\n logger.info('Requesting seek to time: ' + time + (internalSeek ? ' (internal)' : ''));\n videoModel.setCurrentTime(time, stickToBuffered);\n }\n\n function seekToLive() {\n const type = streamController && streamController.hasVideoTrack() ? Constants.VIDEO : Constants.AUDIO;\n const DVRMetrics = dashMetrics.getCurrentDVRInfo(type);\n const DVRWindow = DVRMetrics ? DVRMetrics.range : null;\n\n if (DVRWindow && !isNaN(DVRWindow.end)) {\n seek(DVRWindow.end - mediaPlayerModel.getLiveDelay(), true, false);\n }\n }\n\n function getTime() {\n return streamInfo && videoModel ? videoModel.getTime() : null;\n }\n\n function getNormalizedTime() {\n let t = getTime();\n\n if (isDynamic && !isNaN(availabilityStartTime)) {\n const timeOffset = availabilityStartTime / 1000;\n // Fix current time for firefox and safari (returned as an absolute time)\n if (t > timeOffset) {\n t -= timeOffset;\n }\n }\n return t;\n }\n\n function getPlaybackRate() {\n return streamInfo && videoModel ? videoModel.getPlaybackRate() : null;\n }\n\n function getPlayedRanges() {\n return streamInfo && videoModel ? videoModel.getPlayedRanges() : null;\n }\n\n function getEnded() {\n return streamInfo && videoModel ? videoModel.getEnded() : null;\n }\n\n function getIsDynamic() {\n return isDynamic;\n }\n\n function getStreamController() {\n return streamController;\n }\n\n function getIsManifestUpdateInProgress() {\n return manifestUpdateInProgress;\n }\n\n /**\n * Computes the desirable delay for the live edge to avoid a risk of getting 404 when playing at the bleeding edge\n * @param {number} fragmentDuration - seconds?\n * @param {object} manifestInfo\n * @returns {number} object\n * @memberof PlaybackController#\n */\n function computeAndSetLiveDelay(fragmentDuration, manifestInfo) {\n let delay,\n ret,\n startTime;\n const END_OF_PLAYLIST_PADDING = 10;\n const MIN_BUFFER_TIME_FACTOR = 4;\n const FRAGMENT_DURATION_FACTOR = 4;\n const adjustedFragmentDuration = !isNaN(fragmentDuration) && isFinite(fragmentDuration) ? fragmentDuration : NaN;\n\n let suggestedPresentationDelay = adapter.getSuggestedPresentationDelay();\n\n\n // Apply live delay from ServiceDescription\n if (settings.get().streaming.delay.applyServiceDescription && isNaN(settings.get().streaming.delay.liveDelay) && isNaN(settings.get().streaming.delay.liveDelayFragmentCount)) {\n _applyServiceDescription(manifestInfo);\n }\n\n if (mediaPlayerModel.getLiveDelay()) {\n delay = mediaPlayerModel.getLiveDelay(); // If set by user, this value takes precedence\n } else if (settings.get().streaming.delay.liveDelayFragmentCount !== null && !isNaN(settings.get().streaming.delay.liveDelayFragmentCount) && !isNaN(adjustedFragmentDuration)) {\n delay = adjustedFragmentDuration * settings.get().streaming.delay.liveDelayFragmentCount;\n } else if (settings.get().streaming.delay.useSuggestedPresentationDelay === true && suggestedPresentationDelay !== null && !isNaN(suggestedPresentationDelay) && suggestedPresentationDelay > 0) {\n delay = suggestedPresentationDelay;\n } else if (!isNaN(adjustedFragmentDuration)) {\n delay = adjustedFragmentDuration * FRAGMENT_DURATION_FACTOR;\n } else {\n delay = manifestInfo && !isNaN(manifestInfo.minBufferTime) ? manifestInfo.minBufferTime * MIN_BUFFER_TIME_FACTOR : streamInfo.manifestInfo.minBufferTime * MIN_BUFFER_TIME_FACTOR;\n }\n\n startTime = adapter.getAvailabilityStartTime();\n\n if (startTime !== null) {\n availabilityStartTime = startTime;\n }\n\n if (manifestInfo && manifestInfo.dvrWindowSize > 0) {\n // cap target latency to:\n // - dvrWindowSize / 2 for short playlists\n // - dvrWindowSize - END_OF_PLAYLIST_PADDING for longer playlists\n const targetDelayCapping = Math.max(manifestInfo.dvrWindowSize - END_OF_PLAYLIST_PADDING, manifestInfo.dvrWindowSize / 2);\n ret = Math.min(delay, targetDelayCapping);\n } else {\n ret = delay;\n }\n liveDelay = ret;\n return ret;\n }\n\n function _applyServiceDescription(manifestInfo) {\n if (!manifestInfo || !manifestInfo.serviceDescriptions) {\n return;\n }\n\n let llsd = null;\n\n for (let i = 0; i < manifestInfo.serviceDescriptions.length; i++) {\n const sd = manifestInfo.serviceDescriptions[i];\n if (sd.schemeIdUri === Constants.SERVICE_DESCRIPTION_LL_SCHEME) {\n llsd = sd;\n break;\n }\n }\n\n if (llsd) {\n if (llsd.latency && llsd.latency.target > 0) {\n logger.debug('Apply LL properties coming from service description. Target Latency (ms):', llsd.latency.target);\n settings.update({\n streaming: {\n delay: {\n liveDelay: llsd.latency.target / 1000,\n },\n liveCatchup: {\n minDrift: (llsd.latency.target + 500) / 1000,\n maxDrift: llsd.latency.max > llsd.latency.target ? (llsd.latency.max - llsd.latency.target + 500) / 1000 : undefined\n }\n }\n });\n }\n if (llsd.playbackRate && llsd.playbackRate.max > 1.0) {\n logger.debug('Apply LL properties coming from service description. Max PlaybackRate:', llsd.playbackRate.max);\n settings.update({\n streaming: {\n liveCatchup: {\n playbackRate: llsd.playbackRate.max - 1.0\n }\n }\n });\n }\n }\n }\n\n function getAvailabilityStartTime() {\n return availabilityStartTime;\n }\n\n function getLiveDelay() {\n return liveDelay;\n }\n\n function getCurrentLiveLatency() {\n if (!isDynamic || isNaN(availabilityStartTime)) {\n return NaN;\n }\n let currentTime = getNormalizedTime();\n if (isNaN(currentTime) || currentTime === 0) {\n return 0;\n }\n\n const now = new Date().getTime() + timelineConverter.getClientTimeOffset() * 1000;\n return Math.max(((now - availabilityStartTime - currentTime * 1000) / 1000).toFixed(3), 0);\n }\n\n function reset() {\n pause();\n playOnceInitialized = false;\n liveDelay = 0;\n availabilityStartTime = 0;\n manifestUpdateInProgress = false;\n seekTarget = NaN;\n if (videoModel) {\n eventBus.off(Events.DATA_UPDATE_COMPLETED, _onDataUpdateCompleted, instance);\n eventBus.off(Events.LOADING_PROGRESS, _onFragmentLoadProgress, instance);\n eventBus.off(Events.MANIFEST_UPDATED, _onManifestUpdated, instance);\n eventBus.off(Events.STREAMS_COMPOSED, _onStreamsComposed, instance);\n eventBus.off(MediaPlayerEvents.BUFFER_LEVEL_STATE_CHANGED, _onBufferLevelStateChanged, instance);\n eventBus.off(MediaPlayerEvents.PLAYBACK_PROGRESS, _onPlaybackProgression, instance);\n eventBus.off(MediaPlayerEvents.PLAYBACK_TIME_UPDATED, _onPlaybackProgression, instance);\n eventBus.off(MediaPlayerEvents.PLAYBACK_ENDED, _onPlaybackEnded, instance);\n eventBus.off(MediaPlayerEvents.STREAM_INITIALIZING, _onStreamInitializing, instance);\n eventBus.off(MediaPlayerEvents.REPRESENTATION_SWITCH, _onRepresentationSwitch, instance);\n videoModel.setPlaybackRate(1.0, true);\n stopUpdatingWallclockTime();\n removeAllListeners();\n }\n wallclockTimeIntervalId = null;\n videoModel = null;\n streamInfo = null;\n isDynamic = null;\n }\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.streamController) {\n streamController = config.streamController;\n }\n if (config.dashMetrics) {\n dashMetrics = config.dashMetrics;\n }\n if (config.mediaPlayerModel) {\n mediaPlayerModel = config.mediaPlayerModel;\n }\n if (config.adapter) {\n adapter = config.adapter;\n }\n if (config.videoModel) {\n videoModel = config.videoModel;\n }\n if (config.timelineConverter) {\n timelineConverter = config.timelineConverter;\n }\n if (config.settings) {\n settings = config.settings;\n }\n }\n\n function getActualPresentationTime(currentTime, mediatype) {\n const DVRMetrics = dashMetrics.getCurrentDVRInfo(mediatype);\n const DVRWindow = DVRMetrics ? DVRMetrics.range : null;\n let actualTime;\n\n if (!DVRWindow) {\n return NaN;\n }\n\n if (currentTime > DVRWindow.end) {\n actualTime = Math.max(DVRWindow.end - liveDelay, DVRWindow.start);\n\n } else if (currentTime > 0 && currentTime + 0.250 < DVRWindow.start && Math.abs(currentTime - DVRWindow.start) < 315360000) {\n\n // Checking currentTime plus 250ms as the 'timeupdate' is fired with a frequency between 4Hz and 66Hz\n // https://developer.mozilla.org/en-US/docs/Web/Events/timeupdate\n // http://w3c.github.io/html/single-page.html#offsets-into-the-media-resource\n // Checking also duration of the DVR makes sense. We detected temporary situations in which currentTime\n // is bad reported by the browser which causes playback to jump to start (315360000 = 1 year)\n if (settings.get().streaming.lowLatencyEnabled) {\n actualTime = Math.max(DVRWindow.end - liveDelay, DVRWindow.start);\n } else {\n actualTime = DVRWindow.start;\n }\n } else {\n actualTime = currentTime;\n }\n\n return actualTime;\n }\n\n function startUpdatingWallclockTime() {\n if (wallclockTimeIntervalId !== null) return;\n\n const tick = function () {\n _onWallclockTime();\n };\n\n wallclockTimeIntervalId = setInterval(tick, settings.get().streaming.wallclockTimeUpdateInterval);\n }\n\n function stopUpdatingWallclockTime() {\n clearInterval(wallclockTimeIntervalId);\n wallclockTimeIntervalId = null;\n }\n\n /**\n * Compare the current time of the video against the DVR window. If we are out of the DVR window we need to seek.\n * @param {object} mediaType\n */\n function updateCurrentTime(mediaType = null) {\n if (isPaused() || !isDynamic || videoModel.getReadyState() === 0 || isSeeking() || manifestUpdateInProgress) return;\n\n // Note: In some cases we filter certain media types completely (for instance due to an unsupported video codec). This happens after the first entry to the DVR metric has been added.\n // Now the DVR window for the filtered media type is not updated anymore. Consequently, always use a mediaType that is available to get a valid DVR window.\n if (!mediaType) {\n mediaType = streamController.hasVideoTrack() ? Constants.VIDEO : Constants.AUDIO;\n }\n // Compare the current time of the video element against the range defined in the DVR window.\n const currentTime = getNormalizedTime();\n const actualTime = getActualPresentationTime(currentTime, mediaType);\n const timeChanged = (!isNaN(actualTime) && actualTime !== currentTime);\n if (timeChanged && !isSeeking() && (isStalled() || playbackStalled || videoModel.getReadyState() === 1)) {\n logger.debug(`UpdateCurrentTime: Seek to actual time: ${actualTime} from currentTime: ${currentTime}`);\n seek(actualTime);\n }\n }\n\n function _onDataUpdateCompleted(e) {\n const representationInfo = adapter.convertRepresentationToRepresentationInfo(e.currentRepresentation);\n const info = representationInfo ? representationInfo.mediaInfo.streamInfo : null;\n\n if (info === null || streamInfo.id !== info.id) return;\n streamInfo = info;\n }\n\n function _onCanPlay() {\n eventBus.trigger(Events.CAN_PLAY);\n }\n\n function _onCanPlayThrough() {\n eventBus.trigger(Events.CAN_PLAY_THROUGH);\n }\n\n function _onPlaybackStart() {\n logger.info('Native video element event: play');\n updateCurrentTime();\n startUpdatingWallclockTime();\n eventBus.trigger(Events.PLAYBACK_STARTED, { startTime: getTime() });\n }\n\n function _onPlaybackWaiting() {\n logger.info('Native video element event: waiting');\n eventBus.trigger(Events.PLAYBACK_WAITING, { playingTime: getTime() });\n }\n\n function _onPlaybackPlaying() {\n logger.info('Native video element event: playing');\n eventBus.trigger(Events.PLAYBACK_PLAYING, { playingTime: getTime() });\n }\n\n function _onPlaybackPaused() {\n logger.info('Native video element event: pause');\n eventBus.trigger(Events.PLAYBACK_PAUSED, { ended: getEnded() });\n }\n\n function _onPlaybackSeeking() {\n // Check if internal seeking to be ignored\n if (internalSeek) {\n internalSeek = false;\n return;\n }\n\n let seekTime = getTime();\n // On some browsers/devices, in case of live streams, setting current time on video element fails when there is no buffered data at requested time\n // Then re-set seek target time and video element will be seeked afterwhile once data is buffered (see BufferContoller)\n if (!isNaN(seekTarget) && seekTarget !== seekTime) {\n seekTime = seekTarget;\n }\n seekTarget = NaN;\n\n logger.info('Seeking to: ' + seekTime);\n startUpdatingWallclockTime();\n eventBus.trigger(Events.PLAYBACK_SEEKING, {\n seekTime: seekTime,\n streamId: streamInfo.id\n });\n }\n\n function _onPlaybackSeeked() {\n logger.info('Native video element event: seeked');\n eventBus.trigger(Events.PLAYBACK_SEEKED);\n }\n\n function _onPlaybackTimeUpdated() {\n if (streamInfo) {\n eventBus.trigger(Events.PLAYBACK_TIME_UPDATED, {\n timeToEnd: getTimeToStreamEnd(),\n time: getTime(),\n streamId: streamInfo.id\n });\n }\n }\n\n function _onPlaybackProgress() {\n eventBus.trigger(Events.PLAYBACK_PROGRESS, { streamId: streamInfo.id });\n }\n\n function _onPlaybackRateChanged() {\n const rate = getPlaybackRate();\n logger.info('Native video element event: ratechange: ', rate);\n eventBus.trigger(Events.PLAYBACK_RATE_CHANGED, { playbackRate: rate });\n }\n\n function _onPlaybackMetaDataLoaded() {\n logger.info('Native video element event: loadedmetadata');\n eventBus.trigger(Events.PLAYBACK_METADATA_LOADED);\n startUpdatingWallclockTime();\n }\n\n function _onPlaybackLoadedData() {\n logger.info('Native video element event: loadeddata');\n eventBus.trigger(Events.PLAYBACK_LOADED_DATA);\n }\n\n // Event to handle the native video element ended event\n function _onNativePlaybackEnded() {\n logger.info('Native video element event: ended');\n pause();\n stopUpdatingWallclockTime();\n const streamInfo = streamController ? streamController.getActiveStreamInfo() : null;\n if (!streamInfo) return;\n eventBus.trigger(Events.PLAYBACK_ENDED, { 'isLast': streamInfo.isLast });\n }\n\n // Handle DASH PLAYBACK_ENDED event\n function _onPlaybackEnded(e) {\n if (wallclockTimeIntervalId && e.isLast) {\n // PLAYBACK_ENDED was triggered elsewhere, react.\n logger.info('onPlaybackEnded -- PLAYBACK_ENDED but native video element didn\\'t fire ended');\n const seekTime = e.seekTime ? e.seekTime : getStreamEndTime();\n videoModel.setCurrentTime(seekTime);\n pause();\n stopUpdatingWallclockTime();\n }\n }\n\n function _onPlaybackError(event) {\n const target = event.target || event.srcElement;\n eventBus.trigger(Events.PLAYBACK_ERROR, { error: target.error });\n }\n\n function _onWallclockTime() {\n eventBus.trigger(Events.WALLCLOCK_TIME_UPDATED, {\n isDynamic: isDynamic,\n time: new Date()\n });\n\n // Updates playback time for paused dynamic streams\n // (video element doesn't call timeupdate when the playback is paused)\n if (getIsDynamic()) {\n streamController.addDVRMetric();\n if (isPaused()) {\n _updateLivePlaybackTime();\n } else {\n updateCurrentTime();\n }\n }\n }\n\n function _updateLivePlaybackTime() {\n const now = Date.now();\n if (!lastLivePlaybackTime || now > lastLivePlaybackTime + LIVE_UPDATE_PLAYBACK_TIME_INTERVAL_MS) {\n lastLivePlaybackTime = now;\n _onPlaybackTimeUpdated();\n }\n }\n\n\n function _onPlaybackProgression() {\n if (\n isDynamic &&\n _isCatchupEnabled() &&\n settings.get().streaming.liveCatchup.playbackRate > 0 &&\n !isPaused() &&\n !isSeeking()\n ) {\n if (_needToCatchUp()) {\n startPlaybackCatchUp();\n } else {\n stopPlaybackCatchUp();\n }\n }\n }\n\n function _isCatchupEnabled() {\n return settings.get().streaming.liveCatchup.enabled || settings.get().streaming.lowLatencyEnabled;\n }\n\n /**\n * Returns the combined minimum buffer level of all StreamProcessors. If a filter list is provided the types specified in the filter list are excluded.\n * @param {array} filterList StreamProcessor types to exclude\n * @return {null}\n */\n function getBufferLevel(filterList = null) {\n let bufferLevel = null;\n streamController.getActiveStreamProcessors().forEach(p => {\n if (!filterList || filterList.length === 0 || filterList.indexOf(p.getType()) === -1) {\n const bl = p.getBufferLevel();\n if (bufferLevel === null) {\n bufferLevel = bl;\n } else {\n bufferLevel = Math.min(bufferLevel, bl);\n }\n }\n });\n\n return bufferLevel;\n }\n\n /**\n * Returns the mode for live playback catchup.\n * @return {String}\n * @private\n */\n function _getCatchupMode() {\n const playbackBufferMin = settings.get().streaming.liveCatchup.playbackBufferMin;\n\n return settings.get().streaming.liveCatchup.mode === Constants.LIVE_CATCHUP_MODE_LOLP && playbackBufferMin !== null && !isNaN(playbackBufferMin) ? Constants.LIVE_CATCHUP_MODE_LOLP : Constants.LIVE_CATCHUP_MODE_DEFAULT;\n }\n\n /**\n * Checks whether the catchup mechanism should be enabled\n * @return {boolean}\n */\n function _needToCatchUp() {\n try {\n if (_isCatchupEnabled() && settings.get().streaming.liveCatchup.playbackRate > 0 && getTime() > 0) {\n\n const catchupMode = _getCatchupMode();\n const currentLiveLatency = getCurrentLiveLatency();\n const liveDelay = mediaPlayerModel.getLiveDelay();\n const liveCatchupLatencyThreshold = mediaPlayerModel.getLiveCatchupLatencyThreshold();\n const liveCatchUpMinDrift = settings.get().streaming.liveCatchup.minDrift;\n\n if (catchupMode === Constants.LIVE_CATCHUP_MODE_LOLP) {\n const currentBuffer = getBufferLevel();\n const playbackBufferMin = settings.get().streaming.liveCatchup.playbackBufferMin;\n\n return _lolpNeedToCatchUpCustom(currentLiveLatency, liveDelay, liveCatchUpMinDrift, currentBuffer, playbackBufferMin, liveCatchupLatencyThreshold);\n } else {\n return _defaultNeedToCatchUp(currentLiveLatency, liveDelay, liveCatchupLatencyThreshold, liveCatchUpMinDrift);\n }\n }\n } catch (e) {\n return false;\n }\n }\n\n /**\n * Default algorithm to determine if catchup mode should be enabled\n * @param {number} currentLiveLatency\n * @param {number} liveDelay\n * @param {number} liveCatchupLatencyThreshold\n * @param {number} minDrift\n * @return {boolean}\n * @private\n */\n function _defaultNeedToCatchUp(currentLiveLatency, liveDelay, liveCatchupLatencyThreshold, minDrift) {\n try {\n const latencyDrift = Math.abs(currentLiveLatency - liveDelay);\n\n return latencyDrift > minDrift && (isNaN(liveCatchupLatencyThreshold) || currentLiveLatency <= liveCatchupLatencyThreshold);\n } catch (e) {\n return false;\n }\n }\n\n /**\n * LoL+ logic to determine if catchup mode should be enabled\n * @param {number} currentLiveLatency\n * @param {number} liveDelay\n * @param {number} minDrift\n * @param {number} currentBuffer\n * @param {number} playbackBufferMin\n * @param {number} liveCatchupLatencyThreshold\n * @return {boolean}\n * @private\n */\n function _lolpNeedToCatchUpCustom(currentLiveLatency, liveDelay, minDrift, currentBuffer, playbackBufferMin, liveCatchupLatencyThreshold) {\n try {\n const latencyDrift = Math.abs(currentLiveLatency - liveDelay);\n\n return (isNaN(liveCatchupLatencyThreshold) || currentLiveLatency <= liveCatchupLatencyThreshold) && (latencyDrift > minDrift || currentBuffer < playbackBufferMin);\n } catch (e) {\n return false;\n }\n }\n\n /**\n * Apply catchup mode\n */\n function startPlaybackCatchUp() {\n if (videoModel) {\n let results;\n const currentPlaybackRate = videoModel.getPlaybackRate();\n const liveCatchupPlaybackRate = settings.get().streaming.liveCatchup.playbackRate;\n const currentLiveLatency = getCurrentLiveLatency();\n const liveDelay = mediaPlayerModel.getLiveDelay();\n const bufferLevel = getBufferLevel();\n // Custom playback control: Based on buffer level\n if (_getCatchupMode() === Constants.LIVE_CATCHUP_MODE_LOLP) {\n const liveCatchUpMinDrift = settings.get().streaming.liveCatchup.minDrift;\n const playbackBufferMin = settings.get().streaming.liveCatchup.playbackBufferMin;\n results = _calculateNewPlaybackRateLolP(liveCatchupPlaybackRate, currentLiveLatency, liveDelay, liveCatchUpMinDrift, playbackBufferMin, bufferLevel, currentPlaybackRate);\n } else {\n // Default playback control: Based on target and current latency\n results = _calculateNewPlaybackRateDefault(liveCatchupPlaybackRate, currentLiveLatency, liveDelay, bufferLevel, currentPlaybackRate);\n }\n\n // Obtain newRate and apply to video model\n let newRate = results.newRate;\n if (newRate) { // non-null\n videoModel.setPlaybackRate(newRate);\n }\n\n const deltaLatency = currentLiveLatency - liveDelay;\n if (settings.get().streaming.liveCatchup.maxDrift > 0 && !isLowLatencySeekingInProgress &&\n deltaLatency > settings.get().streaming.liveCatchup.maxDrift) {\n logger.info('Low Latency catchup mechanism. Latency too high, doing a seek to live point');\n isLowLatencySeekingInProgress = true;\n seekToLive();\n } else {\n isLowLatencySeekingInProgress = false;\n }\n }\n }\n\n /**\n * Default algorithm to calculate the new playback rate\n * @param {number} liveCatchUpPlaybackRate\n * @param {number} currentLiveLatency\n * @param {number} liveDelay\n * @param {number} bufferLevel\n * @param {number} currentPlaybackRate\n * @return {{newRate: number}}\n * @private\n */\n function _calculateNewPlaybackRateDefault(liveCatchUpPlaybackRate, currentLiveLatency, liveDelay, bufferLevel, currentPlaybackRate) {\n const cpr = liveCatchUpPlaybackRate;\n const deltaLatency = currentLiveLatency - liveDelay;\n const d = deltaLatency * 5;\n\n // Playback rate must be between (1 - cpr) - (1 + cpr)\n // ex: if cpr is 0.5, it can have values between 0.5 - 1.5\n const s = (cpr * 2) / (1 + Math.pow(Math.E, -d));\n let newRate = (1 - cpr) + s;\n // take into account situations in which there are buffer stalls,\n // in which increasing playbackRate to reach target latency will\n // just cause more and more stall situations\n if (playbackStalled) {\n // const bufferLevel = getBufferLevel();\n if (bufferLevel > liveDelay / 2) {\n // playbackStalled = false;\n playbackStalled = false;\n } else if (deltaLatency > 0) {\n newRate = 1.0;\n }\n }\n\n // don't change playbackrate for small variations (don't overload element with playbackrate changes)\n if (Math.abs(currentPlaybackRate - newRate) <= minPlaybackRateChange) {\n newRate = null;\n }\n\n return {\n newRate: newRate\n };\n\n }\n\n /**\n * Lol+ algorithm to calculate the new playback rate\n * @param {number} liveCatchUpPlaybackRate\n * @param {number} currentLiveLatency\n * @param {number} liveDelay\n * @param {number} minDrift\n * @param {number} playbackBufferMin\n * @param {number} bufferLevel\n * @param {number} currentPlaybackRate\n * @return {{newRate: number}}\n * @private\n */\n function _calculateNewPlaybackRateLolP(liveCatchUpPlaybackRate, currentLiveLatency, liveDelay, minDrift, playbackBufferMin, bufferLevel, currentPlaybackRate) {\n const cpr = liveCatchUpPlaybackRate;\n let newRate;\n\n // Hybrid: Buffer-based\n if (bufferLevel < playbackBufferMin) {\n // Buffer in danger, slow down\n const deltaBuffer = bufferLevel - playbackBufferMin; // -ve value\n const d = deltaBuffer * 5;\n\n // Playback rate must be between (1 - cpr) - (1 + cpr)\n // ex: if cpr is 0.5, it can have values between 0.5 - 1.5\n const s = (cpr * 2) / (1 + Math.pow(Math.E, -d));\n newRate = (1 - cpr) + s;\n\n logger.debug('[LoL+ playback control_buffer-based] bufferLevel: ' + bufferLevel + ', newRate: ' + newRate);\n } else {\n // Hybrid: Latency-based\n // Buffer is safe, vary playback rate based on latency\n\n // Check if latency is within range of target latency\n const minDifference = 0.02;\n if (Math.abs(currentLiveLatency - liveDelay) <= (minDifference * liveDelay)) {\n newRate = 1;\n } else {\n const deltaLatency = currentLiveLatency - liveDelay;\n const d = deltaLatency * 5;\n\n // Playback rate must be between (1 - cpr) - (1 + cpr)\n // ex: if cpr is 0.5, it can have values between 0.5 - 1.5\n const s = (cpr * 2) / (1 + Math.pow(Math.E, -d));\n newRate = (1 - cpr) + s;\n }\n\n logger.debug('[LoL+ playback control_latency-based] latency: ' + currentLiveLatency + ', newRate: ' + newRate);\n }\n\n if (playbackStalled) {\n if (bufferLevel > liveDelay / 2) {\n playbackStalled = false;\n }\n }\n\n // don't change playbackrate for small variations (don't overload element with playbackrate changes)\n if (Math.abs(currentPlaybackRate - newRate) <= minPlaybackRateChange) {\n newRate = null;\n }\n\n return {\n newRate: newRate\n };\n }\n\n function stopPlaybackCatchUp() {\n if (videoModel) {\n videoModel.setPlaybackRate(1.0);\n }\n }\n\n function _onFragmentLoadProgress(e) {\n // If using fetch and stream mode is not available, readjust live latency so it is 20% higher than segment duration\n if (e.stream === false && settings.get().streaming.lowLatencyEnabled && !isNaN(e.request.duration)) {\n const minDelay = 1.2 * e.request.duration;\n if (minDelay > mediaPlayerModel.getLiveDelay()) {\n logger.warn('Browser does not support fetch API with StreamReader. Increasing live delay to be 20% higher than segment duration:', minDelay.toFixed(2));\n settings.update({\n streaming: {\n delay: {\n liveDelay: minDelay,\n }\n }\n });\n }\n }\n }\n\n function _onBufferLevelStateChanged(e) {\n // do not stall playback when get an event from Stream that is not active\n if (e.streamId !== streamInfo.id) return;\n\n if (_isCatchupEnabled()) {\n if (e.state === MetricsConstants.BUFFER_EMPTY && !isSeeking()) {\n if (!playbackStalled) {\n playbackStalled = true;\n stopPlaybackCatchUp();\n }\n }\n } else {\n if (settings.get().streaming.buffer.setStallState) {\n videoModel.setStallState(e.mediaType, e.state === MetricsConstants.BUFFER_EMPTY);\n }\n }\n }\n\n function onPlaybackStalled(e) {\n eventBus.trigger(Events.PLAYBACK_STALLED, { e: e });\n }\n\n function _onStreamInitializing(e) {\n _checkEnableLowLatency(e.mediaInfo);\n }\n\n /**\n * We enable low latency playback if for the current representation availabilityTimeComplete is set to false\n * @param e\n * @private\n */\n function _onRepresentationSwitch(e) {\n const activeStreamInfo = streamController.getActiveStreamInfo();\n if (!settings.get().streaming.lowLatencyEnabledByManifest || !e || !activeStreamInfo || !e.currentRepresentation || !e.streamId || e.streamId !== activeStreamInfo.id || !e.mediaType || (e.mediaType !== Constants.VIDEO && e.mediaType !== Constants.AUDIO)) {\n return;\n }\n\n const lowLatencyEnabled = !e.currentRepresentation.availabilityTimeComplete;\n\n if (lowLatencyEnabled) {\n settings.update({\n streaming: {\n lowLatencyEnabled: lowLatencyEnabled\n }\n });\n }\n }\n\n /**\n * A new manifest has been loaded, updating is still in progress.\n * @private\n */\n function _onManifestUpdated() {\n manifestUpdateInProgress = true;\n }\n\n /**\n * Manifest update was completed\n * @private\n */\n function _onStreamsComposed() {\n manifestUpdateInProgress = false;\n }\n\n\n function _checkEnableLowLatency(mediaInfo) {\n if (mediaInfo && mediaInfo.supplementalProperties &&\n mediaInfo.supplementalProperties[Constants.SUPPLEMENTAL_PROPERTY_LL_SCHEME] === 'true') {\n logger.debug('Low Latency critical SupplementalProperty set: Enabling low Latency');\n settings.update({\n streaming: {\n lowLatencyEnabled: true\n }\n });\n }\n }\n\n function addAllListeners() {\n videoModel.addEventListener('canplay', _onCanPlay);\n videoModel.addEventListener('canplaythrough', _onCanPlayThrough);\n videoModel.addEventListener('play', _onPlaybackStart);\n videoModel.addEventListener('waiting', _onPlaybackWaiting);\n videoModel.addEventListener('playing', _onPlaybackPlaying);\n videoModel.addEventListener('pause', _onPlaybackPaused);\n videoModel.addEventListener('error', _onPlaybackError);\n videoModel.addEventListener('seeking', _onPlaybackSeeking);\n videoModel.addEventListener('seeked', _onPlaybackSeeked);\n videoModel.addEventListener('timeupdate', _onPlaybackTimeUpdated);\n videoModel.addEventListener('progress', _onPlaybackProgress);\n videoModel.addEventListener('ratechange', _onPlaybackRateChanged);\n videoModel.addEventListener('loadedmetadata', _onPlaybackMetaDataLoaded);\n videoModel.addEventListener('loadeddata', _onPlaybackLoadedData);\n videoModel.addEventListener('stalled', onPlaybackStalled);\n videoModel.addEventListener('ended', _onNativePlaybackEnded);\n }\n\n function removeAllListeners() {\n videoModel.removeEventListener('canplay', _onCanPlay);\n videoModel.removeEventListener('canplaythrough', _onCanPlayThrough);\n videoModel.removeEventListener('play', _onPlaybackStart);\n videoModel.removeEventListener('waiting', _onPlaybackWaiting);\n videoModel.removeEventListener('playing', _onPlaybackPlaying);\n videoModel.removeEventListener('pause', _onPlaybackPaused);\n videoModel.removeEventListener('error', _onPlaybackError);\n videoModel.removeEventListener('seeking', _onPlaybackSeeking);\n videoModel.removeEventListener('seeked', _onPlaybackSeeked);\n videoModel.removeEventListener('timeupdate', _onPlaybackTimeUpdated);\n videoModel.removeEventListener('progress', _onPlaybackProgress);\n videoModel.removeEventListener('ratechange', _onPlaybackRateChanged);\n videoModel.removeEventListener('loadedmetadata', _onPlaybackMetaDataLoaded);\n videoModel.removeEventListener('loadeddata', _onPlaybackLoadedData);\n videoModel.removeEventListener('stalled', onPlaybackStalled);\n videoModel.removeEventListener('ended', _onNativePlaybackEnded);\n }\n\n instance = {\n initialize,\n setConfig,\n getTimeToStreamEnd,\n getBufferLevel,\n getTime,\n getNormalizedTime,\n getIsManifestUpdateInProgress,\n getPlaybackRate,\n getPlayedRanges,\n getEnded,\n getIsDynamic,\n getStreamController,\n computeAndSetLiveDelay,\n getLiveDelay,\n getCurrentLiveLatency,\n play,\n isPaused,\n pause,\n isSeeking,\n getStreamEndTime,\n seek,\n reset,\n updateCurrentTime,\n getAvailabilityStartTime\n };\n\n setup();\n\n return instance;\n}\n\nPlaybackController.__dashjs_factory_name = 'PlaybackController';\nexport default FactoryMaker.getSingletonFactory(PlaybackController);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport Debug from '../core/Debug';\nimport DashJSError from './vo/DashJSError';\nimport FactoryMaker from '../core/FactoryMaker';\nimport Errors from '../core/errors/Errors';\nimport Settings from '../core/Settings';\nimport constants from './constants/Constants';\nimport {HTTPRequest} from './vo/metrics/HTTPRequest';\nimport Events from '../core/events/Events';\n\nconst APPEND_WINDOW_START_OFFSET = 0.1;\nconst APPEND_WINDOW_END_OFFSET = 0.01;\n\n/**\n * @class SourceBufferSink\n * @ignore\n * @implements FragmentSink\n */\n\nconst CHECK_INTERVAL = 50;\n\nfunction SourceBufferSink(config) {\n const context = this.context;\n const settings = Settings(context).getInstance();\n const textController = config.textController;\n const eventBus = config.eventBus;\n\n let instance,\n type,\n logger,\n buffer,\n mediaInfo,\n intervalId;\n\n let callbacks = [];\n let appendQueue = [];\n let isAppendingInProgress = false;\n let mediaSource = config.mediaSource;\n let lastRequestAppended = null;\n\n function setup() {\n logger = Debug(context).getInstance().getLogger(instance);\n }\n\n function initializeForStreamSwitch(mInfo, selectedRepresentation, oldSourceBufferSink) {\n mediaInfo = mInfo;\n type = mediaInfo.type;\n const codec = mediaInfo.codec;\n\n _copyPreviousSinkData(oldSourceBufferSink);\n _addEventListeners();\n\n const promises = [];\n\n promises.push(_abortBeforeAppend);\n promises.push(updateAppendWindow(mediaInfo.streamInfo));\n promises.push(changeType(codec));\n\n if (selectedRepresentation && selectedRepresentation.MSETimeOffset !== undefined) {\n promises.push(updateTimestampOffset(selectedRepresentation.MSETimeOffset));\n }\n\n return Promise.all(promises);\n }\n\n function changeType(codec) {\n return new Promise((resolve) => {\n _waitForUpdateEnd(() => {\n if (buffer.changeType) {\n buffer.changeType(codec);\n }\n resolve();\n });\n });\n }\n\n function _copyPreviousSinkData(oldSourceBufferSink) {\n buffer = oldSourceBufferSink.getBuffer();\n }\n\n function initializeForFirstUse(streamInfo, mInfo, selectedRepresentation) {\n mediaInfo = mInfo;\n type = mediaInfo.type;\n const codec = mediaInfo.codec;\n try {\n // Safari claims to support anything starting 'application/mp4'.\n // it definitely doesn't understand 'application/mp4;codecs=\"stpp\"'\n // - currently no browser does, so check for it and use our own\n // implementation. The same is true for codecs=\"wvtt\".\n if (codec.match(/application\\/mp4;\\s*codecs=\"(stpp|wvtt).*\"/i)) {\n return _initializeForText(streamInfo);\n }\n\n buffer = mediaSource.addSourceBuffer(codec);\n\n _addEventListeners();\n\n const promises = [];\n\n promises.push(updateAppendWindow(mediaInfo.streamInfo));\n\n if (selectedRepresentation && selectedRepresentation.MSETimeOffset !== undefined) {\n promises.push(updateTimestampOffset(selectedRepresentation.MSETimeOffset));\n }\n\n return Promise.all(promises);\n\n } catch (e) {\n // Note that in the following, the quotes are open to allow for extra text after stpp and wvtt\n if ((mediaInfo.type == constants.TEXT && !mediaInfo.isFragmented) || (codec.indexOf('codecs=\"stpp') !== -1) || (codec.indexOf('codecs=\"vtt') !== -1)) {\n return _initializeForText(streamInfo);\n }\n return Promise.reject(e);\n }\n }\n\n function _initializeForText(streamInfo) {\n buffer = textController.getTextSourceBuffer(streamInfo);\n return Promise.resolve();\n }\n\n function _addEventListeners() {\n // use updateend event if possible\n if (typeof buffer.addEventListener === 'function') {\n try {\n buffer.addEventListener('updateend', _updateEndHandler, false);\n buffer.addEventListener('error', _errHandler, false);\n buffer.addEventListener('abort', _errHandler, false);\n\n } catch (err) {\n // use setInterval to periodically check if updating has been completed\n intervalId = setInterval(_updateEndHandler, CHECK_INTERVAL);\n }\n } else {\n // use setInterval to periodically check if updating has been completed\n intervalId = setInterval(_updateEndHandler, CHECK_INTERVAL);\n }\n }\n\n function getType() {\n return type;\n }\n\n function _removeEventListeners() {\n try {\n if (typeof buffer.removeEventListener === 'function') {\n buffer.removeEventListener('updateend', _updateEndHandler, false);\n buffer.removeEventListener('error', _errHandler, false);\n buffer.removeEventListener('abort', _errHandler, false);\n }\n clearInterval(intervalId);\n } catch (e) {\n logger.error(e);\n }\n }\n\n function updateAppendWindow(sInfo) {\n return new Promise((resolve) => {\n\n if (!buffer || !settings.get().streaming.buffer.useAppendWindow) {\n resolve();\n return;\n }\n\n _waitForUpdateEnd(() => {\n try {\n if (!buffer) {\n resolve();\n return;\n }\n\n let appendWindowEnd = mediaSource.duration;\n let appendWindowStart = 0;\n if (sInfo && !isNaN(sInfo.start) && !isNaN(sInfo.duration) && isFinite(sInfo.duration)) {\n appendWindowEnd = sInfo.start + sInfo.duration;\n }\n if (sInfo && !isNaN(sInfo.start)) {\n appendWindowStart = sInfo.start;\n }\n if (buffer.appendWindowEnd !== appendWindowEnd || buffer.appendWindowStart !== appendWindowStart) {\n buffer.appendWindowStart = 0;\n buffer.appendWindowEnd = appendWindowEnd + APPEND_WINDOW_END_OFFSET;\n buffer.appendWindowStart = Math.max(appendWindowStart - APPEND_WINDOW_START_OFFSET, 0);\n logger.debug(`Updated append window for ${mediaInfo.type}. Set start to ${buffer.appendWindowStart} and end to ${buffer.appendWindowEnd}`);\n }\n\n resolve();\n } catch (e) {\n logger.warn(`Failed to set append window`);\n resolve();\n }\n });\n });\n }\n\n function updateTimestampOffset(MSETimeOffset) {\n return new Promise((resolve) => {\n\n if (!buffer) {\n resolve();\n return;\n }\n\n _waitForUpdateEnd(() => {\n try {\n if (buffer.timestampOffset !== MSETimeOffset && !isNaN(MSETimeOffset)) {\n buffer.timestampOffset = MSETimeOffset;\n logger.debug(`Set MSE timestamp offset to ${MSETimeOffset}`);\n }\n resolve();\n } catch (e) {\n resolve();\n }\n });\n });\n }\n\n\n function reset() {\n if (buffer) {\n try {\n callbacks = [];\n _removeEventListeners();\n isAppendingInProgress = false;\n appendQueue = [];\n if (!buffer.getClassName || buffer.getClassName() !== 'TextSourceBuffer') {\n logger.debug(`Removing sourcebuffer from media source`);\n mediaSource.removeSourceBuffer(buffer);\n }\n } catch (e) {\n\n }\n buffer = null;\n }\n lastRequestAppended = null;\n }\n\n function getBuffer() {\n return buffer;\n }\n\n function getAllBufferRanges() {\n try {\n return buffer.buffered;\n } catch (e) {\n logger.error('getAllBufferRanges exception: ' + e.message);\n return null;\n }\n }\n\n function append(chunk, request = null) {\n return new Promise((resolve, reject) => {\n if (!chunk) {\n reject({\n chunk: chunk,\n error: new DashJSError(Errors.APPEND_ERROR_CODE, Errors.APPEND_ERROR_MESSAGE)\n });\n return;\n }\n appendQueue.push({ data: chunk, promise: { resolve, reject }, request });\n _waitForUpdateEnd(_appendNextInQueue.bind(this));\n });\n }\n\n function _abortBeforeAppend() {\n return new Promise((resolve) => {\n _waitForUpdateEnd(() => {\n // Save the append window, which is reset on abort().\n const appendWindowStart = buffer.appendWindowStart;\n const appendWindowEnd = buffer.appendWindowEnd;\n\n if (buffer) {\n buffer.abort();\n buffer.appendWindowStart = appendWindowStart;\n buffer.appendWindowEnd = appendWindowEnd;\n }\n resolve();\n });\n });\n }\n\n function remove(range) {\n return new Promise((resolve, reject) => {\n const start = range.start;\n const end = range.end;\n\n // make sure that the given time range is correct. Otherwise we will get InvalidAccessError\n if (!((start >= 0) && (end > start))) {\n resolve();\n return;\n }\n\n _waitForUpdateEnd(function () {\n try {\n buffer.remove(start, end);\n // updating is in progress, we should wait for it to complete before signaling that this operation is done\n _waitForUpdateEnd(function () {\n resolve({\n from: start,\n to: end,\n unintended: false\n });\n if (range.resolve) {\n range.resolve();\n }\n });\n } catch (err) {\n reject({\n from: start,\n to: end,\n unintended: false,\n error: new DashJSError(Errors.REMOVE_ERROR_CODE, Errors.REMOVE_ERROR_MESSAGE)\n });\n if (range.reject) {\n range.reject(err);\n }\n }\n });\n });\n }\n\n function _appendNextInQueue() {\n if (isAppendingInProgress) {\n return;\n }\n\n if (appendQueue.length > 0) {\n isAppendingInProgress = true;\n const nextChunk = appendQueue[0];\n appendQueue.splice(0, 1);\n\n const afterSuccess = function () {\n isAppendingInProgress = false;\n if (appendQueue.length > 0) {\n _appendNextInQueue.call(this);\n }\n // Init segments are cached. In any other case we dont need the chunk bytes anymore and can free the memory\n if (nextChunk && nextChunk.data && nextChunk.data.segmentType && nextChunk.data.segmentType !== HTTPRequest.INIT_SEGMENT_TYPE) {\n delete nextChunk.data.bytes;\n }\n nextChunk.promise.resolve({ chunk: nextChunk.data });\n };\n\n try {\n lastRequestAppended = nextChunk.request;\n if (nextChunk.data.bytes.byteLength === 0) {\n afterSuccess.call(this);\n } else {\n if (buffer.appendBuffer) {\n buffer.appendBuffer(nextChunk.data.bytes);\n } else {\n buffer.append(nextChunk.data.bytes, nextChunk.data);\n }\n // updating is in progress, we should wait for it to complete before signaling that this operation is done\n _waitForUpdateEnd(afterSuccess.bind(this));\n }\n } catch (err) {\n logger.fatal('SourceBuffer append failed \"' + err + '\"');\n if (appendQueue.length > 0) {\n _appendNextInQueue();\n } else {\n isAppendingInProgress = false;\n }\n\n delete nextChunk.data.bytes;\n nextChunk.promise.reject({ chunk: nextChunk.data, error: new DashJSError(err.code, err.message) });\n }\n }\n }\n\n function abort() {\n return new Promise((resolve) => {\n try {\n appendQueue = [];\n if (mediaSource.readyState === 'open') {\n _waitForUpdateEnd(() => {\n try {\n if (buffer) {\n buffer.abort();\n }\n resolve();\n } catch (e) {\n resolve();\n }\n });\n } else if (buffer && buffer.setTextTrack && mediaSource.readyState === 'ended') {\n buffer.abort(); //The cues need to be removed from the TextSourceBuffer via a call to abort()\n resolve();\n } else {\n resolve();\n }\n } catch (e) {\n resolve();\n }\n });\n }\n\n function _executeCallback() {\n if (callbacks.length > 0) {\n if (!buffer.updating) {\n const cb = callbacks.shift();\n cb();\n // Try to execute next callback if still not updating\n _executeCallback();\n }\n }\n }\n\n function _updateEndHandler() {\n // if updating is still in progress do nothing and wait for the next check again.\n if (buffer.updating) {\n return;\n }\n\n // updating is completed, now we can stop checking and resolve the promise\n _executeCallback();\n }\n\n function _errHandler(e) {\n const error = e.target || {};\n _triggerEvent(Events.SOURCE_BUFFER_ERROR, { error, lastRequestAppended })\n }\n\n function _triggerEvent(eventType, data) {\n let payload = data || {};\n eventBus.trigger(eventType, payload, { streamId: mediaInfo.streamInfo.id, mediaType: type });\n }\n\n function _waitForUpdateEnd(callback) {\n callbacks.push(callback);\n\n if (!buffer.updating) {\n _executeCallback();\n }\n }\n\n instance = {\n getType,\n getAllBufferRanges,\n getBuffer,\n append,\n remove,\n abort,\n reset,\n updateTimestampOffset,\n initializeForStreamSwitch,\n initializeForFirstUse,\n updateAppendWindow,\n changeType\n };\n\n setup();\n\n return instance;\n}\n\nSourceBufferSink.__dashjs_factory_name = 'SourceBufferSink';\nconst factory = FactoryMaker.getClassFactory(SourceBufferSink);\nexport default factory;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n * Represents data structure to keep and drive {DataChunk}\n */\n\nimport FactoryMaker from '../../core/FactoryMaker';\n\nfunction InitCache() {\n\n let data = {};\n\n function save (chunk) {\n const id = chunk.streamId;\n const representationId = chunk.representationId;\n\n data[id] = data[id] || {};\n data[id][representationId] = chunk;\n }\n\n function extract (streamId, representationId) {\n if (data && data[streamId] && data[streamId][representationId]) {\n return data[streamId][representationId];\n } else {\n return null;\n }\n }\n\n\n function reset () {\n data = {};\n }\n\n const instance = {\n save: save,\n extract: extract,\n reset: reset\n };\n\n return instance;\n}\n\nInitCache.__dashjs_factory_name = 'InitCache';\nexport default FactoryMaker.getSingletonFactory(InitCache);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport Constants from '../constants/Constants';\nimport MetricsConstants from '../constants/MetricsConstants';\nimport FragmentModel from '../models/FragmentModel';\nimport SourceBufferSink from '../SourceBufferSink';\nimport EventBus from '../../core/EventBus';\nimport Events from '../../core/events/Events';\nimport FactoryMaker from '../../core/FactoryMaker';\nimport Debug from '../../core/Debug';\nimport InitCache from '../utils/InitCache';\nimport DashJSError from '../vo/DashJSError';\nimport Errors from '../../core/errors/Errors';\nimport {HTTPRequest} from '../vo/metrics/HTTPRequest';\nimport MediaPlayerEvents from '../../streaming/MediaPlayerEvents';\n\nconst BUFFER_END_THRESHOLD = 0.5;\nconst BUFFER_RANGE_CALCULATION_THRESHOLD = 0.01;\nconst QUOTA_EXCEEDED_ERROR_CODE = 22;\n\nconst BUFFER_CONTROLLER_TYPE = 'BufferController';\n\nfunction BufferController(config) {\n\n config = config || {};\n const context = this.context;\n const eventBus = EventBus(context).getInstance();\n const errHandler = config.errHandler;\n const fragmentModel = config.fragmentModel;\n const representationController = config.representationController;\n const adapter = config.adapter;\n const textController = config.textController;\n const abrController = config.abrController;\n const playbackController = config.playbackController;\n const streamInfo = config.streamInfo;\n const type = config.type;\n const settings = config.settings;\n\n let instance,\n logger,\n isBufferingCompleted,\n bufferLevel,\n criticalBufferLevel,\n mediaSource,\n maxAppendedIndex,\n maximumIndex,\n sourceBufferSink,\n bufferState,\n appendedBytesInfo,\n wallclockTicked,\n isPruningInProgress,\n isQuotaExceeded,\n initCache,\n pendingPruningRanges,\n replacingBuffer,\n seekTarget;\n\n\n function setup() {\n logger = Debug(context).getInstance().getLogger(instance);\n initCache = InitCache(context).getInstance();\n\n resetInitialSettings();\n }\n\n /**\n * Initialize the BufferController. Sets the media source and registers the event handlers.\n * @param {object} mediaSource\n */\n function initialize(mediaSource) {\n setMediaSource(mediaSource);\n\n eventBus.on(Events.INIT_FRAGMENT_LOADED, _onInitFragmentLoaded, instance);\n eventBus.on(Events.MEDIA_FRAGMENT_LOADED, _onMediaFragmentLoaded, instance);\n eventBus.on(Events.WALLCLOCK_TIME_UPDATED, _onWallclockTimeUpdated, instance);\n\n eventBus.on(MediaPlayerEvents.PLAYBACK_PLAYING, _onPlaybackPlaying, instance);\n eventBus.on(MediaPlayerEvents.PLAYBACK_PROGRESS, _onPlaybackProgression, instance);\n eventBus.on(MediaPlayerEvents.PLAYBACK_TIME_UPDATED, _onPlaybackProgression, instance);\n eventBus.on(MediaPlayerEvents.PLAYBACK_RATE_CHANGED, _onPlaybackRateChanged, instance);\n eventBus.on(MediaPlayerEvents.PLAYBACK_STALLED, _onPlaybackStalled, instance);\n }\n\n /**\n * Returns the stream id\n * @return {string}\n */\n function getStreamId() {\n return streamInfo.id;\n }\n\n /**\n * Returns the media type\n * @return {type}\n */\n function getType() {\n return type;\n }\n\n /**\n * Returns the type of the BufferController. We distinguish between standard buffer controllers and buffer controllers related to texttracks.\n * @return {string}\n */\n function getBufferControllerType() {\n return BUFFER_CONTROLLER_TYPE;\n }\n\n /**\n * Sets the mediasource.\n * @param {object} value\n */\n function setMediaSource(value) {\n mediaSource = value;\n }\n\n /**\n * Get the RepresentationInfo for a certain quality.\n * @param {number} quality\n * @return {object}\n * @private\n */\n function _getRepresentationInfo(quality) {\n return adapter.convertRepresentationToRepresentationInfo(representationController.getRepresentationForQuality(quality));\n }\n\n /**\n * Creates a SourceBufferSink object\n * @param {object} mediaInfo\n * @param {array} oldBufferSinks\n * @return {object|null} SourceBufferSink\n */\n function createBufferSink(mediaInfo, oldBufferSinks = []) {\n return new Promise((resolve, reject) => {\n if (!initCache || !mediaInfo || !mediaSource) {\n resolve(null);\n return;\n }\n\n const requiredQuality = abrController.getQualityFor(type, streamInfo.id);\n sourceBufferSink = SourceBufferSink(context).create({\n mediaSource,\n textController,\n eventBus\n });\n _initializeSink(mediaInfo, oldBufferSinks, requiredQuality)\n .then(() => {\n return updateBufferTimestampOffset(_getRepresentationInfo(requiredQuality));\n })\n .then(() => {\n resolve(sourceBufferSink);\n })\n .catch((e) => {\n logger.fatal('Caught error on create SourceBuffer: ' + e);\n errHandler.error(new DashJSError(Errors.MEDIASOURCE_TYPE_UNSUPPORTED_CODE, Errors.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE + type));\n reject(e);\n });\n });\n }\n\n function _initializeSink(mediaInfo, oldBufferSinks, requiredQuality) {\n const selectedRepresentation = _getRepresentationInfo(requiredQuality);\n\n if (oldBufferSinks && oldBufferSinks[type] && (type === Constants.VIDEO || type === Constants.AUDIO)) {\n return sourceBufferSink.initializeForStreamSwitch(mediaInfo, selectedRepresentation, oldBufferSinks[type]);\n } else {\n return sourceBufferSink.initializeForFirstUse(streamInfo, mediaInfo, selectedRepresentation);\n }\n }\n\n\n /**\n * Callback handler when init segment has been loaded. Based on settings, the init segment is saved to the cache, and appended to the buffer.\n * @param {object} e\n * @private\n */\n function _onInitFragmentLoaded(e) {\n if (settings.get().streaming.cacheInitSegments) {\n logger.info('Init fragment finished loading saving to', type + '\\'s init cache');\n initCache.save(e.chunk);\n }\n logger.debug('Append Init fragment', type, ' with representationId:', e.chunk.representationId, ' and quality:', e.chunk.quality, ', data size:', e.chunk.bytes.byteLength);\n _appendToBuffer(e.chunk);\n }\n\n /**\n * Append the init segment for a certain representation to the buffer. If the init segment is cached we take the one from the cache. Otherwise the function returns false and the segment has to be requested again.\n * @param {string} representationId\n * @return {boolean}\n */\n function appendInitSegmentFromCache(representationId) {\n // Get init segment from cache\n const chunk = initCache.extract(streamInfo.id, representationId);\n\n if (!chunk) {\n // Init segment not in cache, shall be requested\n return false;\n }\n\n // Append init segment into buffer\n logger.info('Append Init fragment', type, ' with representationId:', chunk.representationId, ' and quality:', chunk.quality, ', data size:', chunk.bytes.byteLength);\n _appendToBuffer(chunk);\n\n return true;\n }\n\n /**\n * Calls the _appendToBuffer function to append the segment to the buffer. In case of a track switch the buffer might be cleared.\n * @param {object} e\n */\n function _onMediaFragmentLoaded(e) {\n _appendToBuffer(e.chunk, e.request);\n }\n\n /**\n * Append data to the MSE buffer using the SourceBufferSink\n * @param {object} chunk\n * @private\n */\n function _appendToBuffer(chunk, request = null) {\n sourceBufferSink.append(chunk, request)\n .then((e) => {\n _onAppended(e);\n })\n .catch((e) => {\n _onAppended(e);\n });\n\n if (chunk.mediaInfo.type === Constants.VIDEO) {\n _triggerEvent(Events.VIDEO_CHUNK_RECEIVED, { chunk: chunk });\n }\n }\n\n function _showBufferRanges(ranges) {\n if (ranges && ranges.length > 0) {\n for (let i = 0, len = ranges.length; i < len; i++) {\n logger.debug('Buffered range: ' + ranges.start(i) + ' - ' + ranges.end(i) + ', currentTime = ', playbackController.getTime());\n }\n }\n }\n\n function _onAppended(e) {\n if (e.error) {\n // If we receive a QUOTA_EXCEEDED_ERROR_CODE we should adjust the target buffer times to avoid this error in the future.\n if (e.error.code === QUOTA_EXCEEDED_ERROR_CODE) {\n _handleQuotaExceededError();\n }\n if (e.error.code === QUOTA_EXCEEDED_ERROR_CODE || !hasEnoughSpaceToAppend()) {\n logger.warn('Clearing playback buffer to overcome quota exceed situation');\n // Notify ScheduleController to stop scheduling until buffer has been pruned\n _triggerEvent(Events.QUOTA_EXCEEDED, {\n criticalBufferLevel: criticalBufferLevel,\n quotaExceededTime: e.chunk.start\n });\n clearBuffers(getClearRanges());\n }\n return;\n }\n\n // Check if session has not been stopped in the meantime (while last segment was being appended)\n if (!sourceBufferSink) return;\n\n _updateBufferLevel();\n\n isQuotaExceeded = false;\n appendedBytesInfo = e.chunk;\n\n if (!appendedBytesInfo || !appendedBytesInfo.endFragment) {\n return;\n }\n\n if (appendedBytesInfo && !isNaN(appendedBytesInfo.index)) {\n maxAppendedIndex = Math.max(appendedBytesInfo.index, maxAppendedIndex);\n _checkIfBufferingCompleted();\n }\n\n const ranges = sourceBufferSink.getAllBufferRanges();\n if (appendedBytesInfo.segmentType === HTTPRequest.MEDIA_SEGMENT_TYPE) {\n _showBufferRanges(ranges);\n _onPlaybackProgression();\n _adjustSeekTarget();\n }\n\n if (appendedBytesInfo) {\n _triggerEvent(Events.BYTES_APPENDED_END_FRAGMENT, {\n quality: appendedBytesInfo.quality,\n startTime: appendedBytesInfo.start,\n index: appendedBytesInfo.index,\n bufferedRanges: ranges,\n segmentType: appendedBytesInfo.segmentType,\n mediaType: type\n });\n }\n }\n\n /**\n * In some cases the segment we requested might start at a different time than we initially aimed for. segments timeline/template tolerance.\n * We might need to do an internal seek if there is drift.\n * @private\n */\n function _adjustSeekTarget() {\n if (isNaN(seekTarget)) return;\n // Check buffered data only for audio and video\n if (type !== Constants.AUDIO && type !== Constants.VIDEO) {\n seekTarget = NaN;\n return;\n }\n\n // Check if current buffered range already contains seek target (and current video element time)\n const currentTime = playbackController.getTime();\n let range = getRangeAt(seekTarget, 0);\n if (currentTime === seekTarget && range) {\n seekTarget = NaN;\n return;\n }\n\n // Get buffered range corresponding to the seek target\n const segmentDuration = representationController.getCurrentRepresentation().segmentDuration;\n range = getRangeAt(seekTarget, segmentDuration);\n if (!range) return;\n\n if (settings.get().streaming.buffer.enableSeekDecorrelationFix && Math.abs(currentTime - seekTarget) > segmentDuration) {\n // If current video model time is decorrelated from seek target (and appended buffer) then seek video element\n // (in case of live streams on some browsers/devices for which we can't set video element time at unavalaible range)\n\n // Check if appended segment is not anterior from seek target (segments timeline/template tolerance)\n if (seekTarget <= range.end) {\n // Seek video element to seek target or range start if appended buffer starts after seek target (segments timeline/template tolerance)\n playbackController.seek(Math.max(seekTarget, range.start), false, true);\n }\n } else if (currentTime < range.start) {\n // If appended buffer starts after seek target (segments timeline/template tolerance) then seek to range start\n playbackController.seek(range.start, false, true);\n }\n }\n\n function _handleQuotaExceededError() {\n isQuotaExceeded = true;\n criticalBufferLevel = getTotalBufferedTime() * 0.8;\n logger.warn('Quota exceeded, Critical Buffer: ' + criticalBufferLevel);\n\n if (criticalBufferLevel > 0) {\n // recalculate buffer lengths according to criticalBufferLevel\n const bufferToKeep = Math.max(0.2 * criticalBufferLevel, 1);\n const bufferAhead = criticalBufferLevel - bufferToKeep;\n const bufferTimeAtTopQuality = Math.min(settings.get().streaming.buffer.bufferTimeAtTopQuality, bufferAhead * 0.9);\n const bufferTimeAtTopQualityLongForm = Math.min(settings.get().streaming.buffer.bufferTimeAtTopQualityLongForm, bufferAhead * 0.9);\n const s = {\n streaming: {\n buffer: {\n bufferToKeep: parseFloat(bufferToKeep.toFixed(5)),\n bufferTimeAtTopQuality: parseFloat(bufferTimeAtTopQuality.toFixed(5)),\n bufferTimeAtTopQualityLongForm: parseFloat(bufferTimeAtTopQualityLongForm.toFixed(5))\n }\n }\n };\n settings.update(s);\n }\n }\n\n //**********************************************************************\n // START Buffer Level, State & Sufficiency Handling.\n //**********************************************************************\n function prepareForPlaybackSeek() {\n if (isBufferingCompleted) {\n setIsBufferingCompleted(false);\n }\n\n // Abort the current request and empty all possible segments to be appended\n return sourceBufferSink.abort();\n }\n\n function prepareForReplacementTrackSwitch(codec) {\n return new Promise((resolve, reject) => {\n sourceBufferSink.abort()\n .then(() => {\n return updateAppendWindow();\n })\n .then(() => {\n return sourceBufferSink.changeType(codec);\n })\n .then(() => {\n return pruneAllSafely();\n })\n .then(() => {\n setIsBufferingCompleted(false);\n resolve();\n })\n .catch((e) => {\n reject(e);\n });\n });\n }\n\n function prepareForReplacementQualitySwitch() {\n return new Promise((resolve, reject) => {\n sourceBufferSink.abort()\n .then(() => {\n return updateAppendWindow();\n })\n .then(() => {\n return pruneAllSafely();\n })\n .then(() => {\n setIsBufferingCompleted(false);\n resolve();\n })\n .catch((e) => {\n reject(e);\n });\n });\n }\n\n function prepareForNonReplacementTrackSwitch(codec) {\n return new Promise((resolve, reject) => {\n updateAppendWindow()\n .then(() => {\n return sourceBufferSink.changeType(codec);\n })\n .then(() => {\n resolve();\n })\n .catch((e) => {\n reject(e);\n });\n });\n }\n\n function pruneAllSafely() {\n return new Promise((resolve, reject) => {\n let ranges = getAllRangesWithSafetyFactor();\n\n if (!ranges || ranges.length === 0) {\n _onPlaybackProgression();\n resolve();\n return;\n }\n\n clearBuffers(ranges)\n .then(() => {\n resolve();\n })\n .catch((e) => {\n reject(e);\n });\n });\n }\n\n function getAllRangesWithSafetyFactor(seekTime) {\n const clearRanges = [];\n const ranges = sourceBufferSink.getAllBufferRanges();\n\n // no valid ranges\n if (!ranges || ranges.length === 0) {\n return clearRanges;\n }\n\n // if no target time is provided we clear everyhing\n if ((!seekTime && seekTime !== 0) || isNaN(seekTime)) {\n clearRanges.push({\n start: ranges.start(0),\n end: ranges.end(ranges.length - 1) + BUFFER_END_THRESHOLD\n });\n }\n\n // otherwise we need to calculate the correct pruning range\n else {\n\n const behindPruningRange = _getRangeBehindForPruning(seekTime, ranges);\n const aheadPruningRange = _getRangeAheadForPruning(seekTime, ranges);\n\n if (behindPruningRange) {\n clearRanges.push(behindPruningRange);\n }\n\n if (aheadPruningRange) {\n clearRanges.push(aheadPruningRange);\n }\n }\n\n return clearRanges;\n }\n\n function _getRangeBehindForPruning(targetTime, ranges) {\n const bufferToKeepBehind = settings.get().streaming.buffer.bufferToKeep;\n const startOfBuffer = ranges.start(0);\n\n // if we do a seek ahead of the current play position we do need to prune behind the new play position\n const behindDiff = targetTime - startOfBuffer;\n if (behindDiff > bufferToKeepBehind) {\n\n let rangeEnd = Math.max(0, targetTime - bufferToKeepBehind);\n // Ensure we keep full range of current fragment\n const currentTimeRequest = fragmentModel.getRequests({\n state: FragmentModel.FRAGMENT_MODEL_EXECUTED,\n time: targetTime,\n threshold: BUFFER_RANGE_CALCULATION_THRESHOLD\n })[0];\n\n if (currentTimeRequest) {\n rangeEnd = Math.min(currentTimeRequest.startTime, rangeEnd);\n }\n if (rangeEnd > 0) {\n return {\n start: startOfBuffer,\n end: rangeEnd\n };\n }\n }\n\n return null;\n }\n\n function _getRangeAheadForPruning(targetTime, ranges) {\n // if we do a seek behind the current play position we do need to prune ahead of the new play position\n const endOfBuffer = ranges.end(ranges.length - 1) + BUFFER_END_THRESHOLD;\n const isLongFormContent = streamInfo.manifestInfo.duration >= settings.get().streaming.buffer.longFormContentDurationThreshold;\n const bufferToKeepAhead = isLongFormContent ? settings.get().streaming.buffer.bufferTimeAtTopQualityLongForm : settings.get().streaming.buffer.bufferTimeAtTopQuality;\n const aheadDiff = endOfBuffer - targetTime;\n\n if (aheadDiff > bufferToKeepAhead) {\n\n let rangeStart = targetTime + bufferToKeepAhead;\n // Ensure we keep full range of current fragment\n const currentTimeRequest = fragmentModel.getRequests({\n state: FragmentModel.FRAGMENT_MODEL_EXECUTED,\n time: targetTime,\n threshold: BUFFER_RANGE_CALCULATION_THRESHOLD\n })[0];\n\n if (currentTimeRequest) {\n rangeStart = Math.max(currentTimeRequest.startTime + currentTimeRequest.duration, rangeStart);\n }\n if (rangeStart < endOfBuffer) {\n return {\n start: rangeStart,\n end: endOfBuffer\n };\n }\n }\n\n return null;\n }\n\n function _onPlaybackProgression() {\n if (!replacingBuffer || (type === Constants.TEXT && textController.isTextEnabled())) {\n _updateBufferLevel();\n }\n }\n\n function _onPlaybackStalled() {\n checkIfSufficientBuffer();\n }\n\n function _onPlaybackPlaying() {\n checkIfSufficientBuffer();\n seekTarget = NaN;\n }\n\n function getRangeAt(time, tolerance) {\n const ranges = sourceBufferSink.getAllBufferRanges();\n let start = 0;\n let end = 0;\n let firstStart = null;\n let lastEnd = null;\n let gap = 0;\n let len,\n i;\n\n const toler = !isNaN(tolerance) ? tolerance : 0.15;\n\n if (ranges !== null && ranges !== undefined) {\n for (i = 0, len = ranges.length; i < len; i++) {\n start = ranges.start(i);\n end = ranges.end(i);\n if (firstStart === null) {\n gap = Math.abs(start - time);\n if (time >= start && time < end) {\n // start the range\n firstStart = start;\n lastEnd = end;\n } else if (gap <= toler) {\n // start the range even though the buffer does not contain time 0\n firstStart = start;\n lastEnd = end;\n }\n } else {\n gap = start - lastEnd;\n if (gap <= toler) {\n // the discontinuity is smaller than the tolerance, combine the ranges\n lastEnd = end;\n } else {\n break;\n }\n }\n }\n\n if (firstStart !== null) {\n return {\n start: firstStart,\n end: lastEnd\n };\n }\n }\n\n return null;\n }\n\n function getBufferLength(time, tolerance) {\n let range,\n length;\n\n // Consider gap/discontinuity limit as tolerance\n if (settings.get().streaming.gaps.jumpGaps) {\n tolerance = settings.get().streaming.gaps.smallGapLimit;\n }\n\n range = getRangeAt(time, tolerance);\n\n if (range === null) {\n length = 0;\n } else {\n length = range.end - time;\n }\n\n return length;\n }\n\n function _updateBufferLevel() {\n if (playbackController) {\n const tolerance = settings.get().streaming.gaps.jumpGaps && !isNaN(settings.get().streaming.gaps.smallGapLimit) ? settings.get().streaming.gaps.smallGapLimit : NaN;\n bufferLevel = Math.max(getBufferLength(playbackController.getTime() || 0, tolerance), 0);\n _triggerEvent(Events.BUFFER_LEVEL_UPDATED, { mediaType: type, bufferLevel: bufferLevel });\n checkIfSufficientBuffer();\n }\n }\n\n function _checkIfBufferingCompleted() {\n const isLastIdxAppended = maxAppendedIndex >= maximumIndex - 1; // Handles 0 and non 0 based request index\n const periodBuffered = playbackController.getTimeToStreamEnd(streamInfo) - bufferLevel <= 0;\n\n if ((isLastIdxAppended || periodBuffered) && !isBufferingCompleted) {\n setIsBufferingCompleted(true);\n logger.debug(`checkIfBufferingCompleted trigger BUFFERING_COMPLETED for stream id ${streamInfo.id} and type ${type}`);\n }\n }\n\n function checkIfSufficientBuffer() {\n // No need to check buffer if type is not audio or video (for example if several errors occur during text parsing, so that the buffer cannot be filled, no error must occur on video playback)\n if (type !== Constants.AUDIO && type !== Constants.VIDEO) return;\n\n // When the player is working in low latency mode, the buffer is often below STALL_THRESHOLD.\n // So, when in low latency mode, change dash.js behavior so it notifies a stall just when\n // buffer reach 0 seconds\n if (((!settings.get().streaming.lowLatencyEnabled && bufferLevel < settings.get().streaming.buffer.stallThreshold) || bufferLevel === 0) && !isBufferingCompleted) {\n _notifyBufferStateChanged(MetricsConstants.BUFFER_EMPTY);\n } else {\n if (isBufferingCompleted || bufferLevel >= settings.get().streaming.buffer.stallThreshold || (settings.get().streaming.lowLatencyEnabled && bufferLevel > 0)) {\n _notifyBufferStateChanged(MetricsConstants.BUFFER_LOADED);\n }\n }\n }\n\n function _notifyBufferStateChanged(state) {\n if (bufferState === state ||\n (state === MetricsConstants.BUFFER_EMPTY && playbackController.getTime() === 0) || // Don't trigger BUFFER_EMPTY if it's initial loading\n (type === Constants.TEXT && !textController.isTextEnabled())) {\n return;\n }\n\n bufferState = state;\n\n _triggerEvent(Events.BUFFER_LEVEL_STATE_CHANGED, { state: state });\n _triggerEvent(state === MetricsConstants.BUFFER_LOADED ? Events.BUFFER_LOADED : Events.BUFFER_EMPTY);\n logger.debug(state === MetricsConstants.BUFFER_LOADED ? 'Got enough buffer to start' : 'Waiting for more buffer before starting playback');\n }\n\n /* prune buffer on our own in background to avoid browsers pruning buffer silently */\n function pruneBuffer() {\n if (!sourceBufferSink || type === Constants.TEXT) {\n return;\n }\n\n if (!isBufferingCompleted) {\n clearBuffers(getClearRanges());\n }\n }\n\n function getClearRanges() {\n const clearRanges = [];\n const ranges = sourceBufferSink.getAllBufferRanges();\n if (!ranges || ranges.length === 0) {\n return clearRanges;\n }\n\n const currentTime = playbackController.getTime();\n let startRangeToKeep = Math.max(0, currentTime - settings.get().streaming.buffer.bufferToKeep);\n\n const currentTimeRequest = fragmentModel.getRequests({\n state: FragmentModel.FRAGMENT_MODEL_EXECUTED,\n time: currentTime,\n threshold: BUFFER_RANGE_CALCULATION_THRESHOLD\n })[0];\n\n // Ensure we keep full range of current fragment\n if (currentTimeRequest) {\n startRangeToKeep = Math.min(currentTimeRequest.startTime, startRangeToKeep);\n } else if (currentTime === 0 && playbackController.getIsDynamic()) {\n // Don't prune before the live stream starts, it messes with low latency\n return [];\n }\n\n if (ranges.start(0) <= startRangeToKeep) {\n const behindRange = {\n start: 0,\n end: startRangeToKeep\n };\n for (let i = 0; i < ranges.length && ranges.end(i) <= startRangeToKeep; i++) {\n behindRange.end = ranges.end(i);\n }\n if (behindRange.start < behindRange.end) {\n clearRanges.push(behindRange);\n }\n }\n\n return clearRanges;\n }\n\n function clearBuffers(ranges) {\n return new Promise((resolve, reject) => {\n if (!ranges || !sourceBufferSink || ranges.length === 0) {\n resolve();\n return;\n }\n\n const promises = [];\n ranges.forEach((range) => {\n promises.push(_addClearRangeWithPromise(range));\n });\n\n\n if (!isPruningInProgress) {\n clearNextRange();\n }\n\n Promise.all(promises)\n .then(() => {\n resolve();\n })\n .catch((e) => {\n reject(e);\n });\n });\n }\n\n function _addClearRangeWithPromise(range) {\n return new Promise((resolve, reject) => {\n range.resolve = resolve;\n range.reject = reject;\n pendingPruningRanges.push(range);\n });\n }\n\n function clearNextRange() {\n try {\n // If there's nothing to prune reset state\n if (pendingPruningRanges.length === 0 || !sourceBufferSink) {\n logger.debug('Nothing to prune, halt pruning');\n pendingPruningRanges = [];\n isPruningInProgress = false;\n return;\n }\n\n const sourceBuffer = sourceBufferSink.getBuffer();\n // If there's nothing buffered any pruning is invalid, so reset our state\n if (!sourceBuffer || !sourceBuffer.buffered || sourceBuffer.buffered.length === 0) {\n logger.debug('SourceBuffer is empty (or does not exist), halt pruning');\n pendingPruningRanges = [];\n isPruningInProgress = false;\n return;\n }\n\n const range = pendingPruningRanges.shift();\n logger.debug(`${type}: Removing buffer from: ${range.start} to ${range.end}`);\n isPruningInProgress = true;\n\n // If removing buffer ahead current playback position, update maxAppendedIndex\n const currentTime = playbackController.getTime();\n if (currentTime < range.end) {\n setIsBufferingCompleted(false);\n }\n\n sourceBufferSink.remove(range)\n .then((e) => {\n _onRemoved(e);\n })\n .catch((e) => {\n _onRemoved(e);\n });\n } catch (e) {\n isPruningInProgress = false;\n }\n }\n\n function _onRemoved(e) {\n logger.debug('onRemoved buffer from:', e.from, 'to', e.to);\n\n const ranges = sourceBufferSink.getAllBufferRanges();\n _showBufferRanges(ranges);\n\n if (pendingPruningRanges.length === 0) {\n isPruningInProgress = false;\n _updateBufferLevel();\n }\n\n if (e.unintended) {\n logger.warn('Detected unintended removal from:', e.from, 'to', e.to, 'setting streamprocessor time to', e.from);\n _triggerEvent(Events.SEEK_TARGET, { time: e.from });\n }\n\n if (isPruningInProgress) {\n clearNextRange();\n } else {\n if (!replacingBuffer) {\n _updateBufferLevel();\n } else {\n replacingBuffer = false;\n }\n _triggerEvent(Events.BUFFER_CLEARED, {\n from: e.from,\n to: e.to,\n unintended: e.unintended,\n hasEnoughSpaceToAppend: hasEnoughSpaceToAppend(),\n quotaExceeded: isQuotaExceeded\n });\n }\n }\n\n function updateBufferTimestampOffset(representationInfo) {\n return new Promise((resolve) => {\n if (!representationInfo || representationInfo.MSETimeOffset === undefined || !sourceBufferSink || !sourceBufferSink.updateTimestampOffset) {\n resolve();\n return;\n }\n // Each track can have its own @presentationTimeOffset, so we should set the offset\n // if it has changed after switching the quality or updating an mpd\n sourceBufferSink.updateTimestampOffset(representationInfo.MSETimeOffset)\n .then(() => {\n resolve();\n })\n .catch(() => {\n resolve();\n });\n });\n\n }\n\n function updateAppendWindow() {\n if (sourceBufferSink && !isBufferingCompleted) {\n return sourceBufferSink.updateAppendWindow(streamInfo);\n }\n return Promise.resolve();\n }\n\n function segmentRequestingCompleted(segmentIndex) {\n if (!isNaN(segmentIndex)) {\n maximumIndex = segmentIndex;\n _checkIfBufferingCompleted();\n }\n }\n\n function _onWallclockTimeUpdated() {\n wallclockTicked++;\n const secondsElapsed = (wallclockTicked * (settings.get().streaming.wallclockTimeUpdateInterval / 1000));\n if ((secondsElapsed >= settings.get().streaming.buffer.bufferPruningInterval)) {\n wallclockTicked = 0;\n pruneBuffer();\n }\n }\n\n function _onPlaybackRateChanged() {\n checkIfSufficientBuffer();\n }\n\n function getBuffer() {\n return sourceBufferSink;\n }\n\n function getBufferLevel() {\n return bufferLevel;\n }\n\n function getMediaSource() {\n return mediaSource;\n }\n\n function getIsBufferingCompleted() {\n return isBufferingCompleted;\n }\n\n function setIsBufferingCompleted(value) {\n if (isBufferingCompleted === value) {\n return;\n }\n\n isBufferingCompleted = value;\n\n if (isBufferingCompleted) {\n _triggerEvent(Events.BUFFERING_COMPLETED);\n } else {\n maximumIndex = Number.POSITIVE_INFINITY;\n }\n }\n\n function getIsPruningInProgress() {\n return isPruningInProgress;\n }\n\n function getTotalBufferedTime() {\n try {\n const ranges = sourceBufferSink.getAllBufferRanges();\n let totalBufferedTime = 0;\n let ln,\n i;\n\n if (!ranges) return totalBufferedTime;\n\n for (i = 0, ln = ranges.length; i < ln; i++) {\n totalBufferedTime += ranges.end(i) - ranges.start(i);\n }\n\n return totalBufferedTime;\n } catch (e) {\n return 0;\n }\n }\n\n /**\n * This function returns the maximum time for which the buffer is continuous starting from a target time.\n * As soon as there is a gap we return the time before the gap starts\n * @param {number} targetTime\n */\n function getContinuousBufferTimeForTargetTime(targetTime) {\n try {\n let adjustedTime = targetTime;\n const ranges = sourceBufferSink.getAllBufferRanges();\n\n if (!ranges || ranges.length === 0) {\n return NaN;\n }\n\n let i = 0;\n\n while (adjustedTime === targetTime && i < ranges.length) {\n const start = ranges.start(i);\n const end = ranges.end(i);\n\n if (adjustedTime >= start && adjustedTime <= end) {\n adjustedTime = end;\n }\n\n i += 1;\n }\n\n return adjustedTime === targetTime ? NaN : adjustedTime;\n\n } catch (e) {\n\n }\n }\n\n function hasEnoughSpaceToAppend() {\n const totalBufferedTime = getTotalBufferedTime();\n return (isNaN(totalBufferedTime) || totalBufferedTime < criticalBufferLevel);\n }\n\n function setSeekTarget(value) {\n seekTarget = value;\n }\n\n function _triggerEvent(eventType, data) {\n let payload = data || {};\n eventBus.trigger(eventType, payload, { streamId: streamInfo.id, mediaType: type });\n }\n\n function resetInitialSettings(errored, keepBuffers) {\n criticalBufferLevel = Number.POSITIVE_INFINITY;\n bufferState = undefined;\n maximumIndex = Number.POSITIVE_INFINITY;\n maxAppendedIndex = 0;\n appendedBytesInfo = null;\n isBufferingCompleted = false;\n isPruningInProgress = false;\n isQuotaExceeded = false;\n bufferLevel = 0;\n wallclockTicked = 0;\n pendingPruningRanges = [];\n seekTarget = NaN;\n\n if (sourceBufferSink) {\n let tmpSourceBufferSinkToReset = sourceBufferSink;\n sourceBufferSink = null;\n if (!errored && !keepBuffers) {\n tmpSourceBufferSinkToReset.abort()\n .then(() => {\n tmpSourceBufferSinkToReset.reset(keepBuffers);\n tmpSourceBufferSinkToReset = null;\n });\n }\n }\n\n replacingBuffer = false;\n }\n\n function reset(errored, keepBuffers) {\n eventBus.off(Events.INIT_FRAGMENT_LOADED, _onInitFragmentLoaded, this);\n eventBus.off(Events.MEDIA_FRAGMENT_LOADED, _onMediaFragmentLoaded, this);\n eventBus.off(Events.WALLCLOCK_TIME_UPDATED, _onWallclockTimeUpdated, this);\n\n eventBus.off(MediaPlayerEvents.PLAYBACK_PLAYING, _onPlaybackPlaying, this);\n eventBus.off(MediaPlayerEvents.PLAYBACK_PROGRESS, _onPlaybackProgression, this);\n eventBus.off(MediaPlayerEvents.PLAYBACK_TIME_UPDATED, _onPlaybackProgression, this);\n eventBus.off(MediaPlayerEvents.PLAYBACK_RATE_CHANGED, _onPlaybackRateChanged, this);\n eventBus.off(MediaPlayerEvents.PLAYBACK_STALLED, _onPlaybackStalled, this);\n\n\n resetInitialSettings(errored, keepBuffers);\n }\n\n instance = {\n initialize,\n getStreamId,\n getType,\n getBufferControllerType,\n createBufferSink,\n getBuffer,\n getBufferLevel,\n getRangeAt,\n setMediaSource,\n getMediaSource,\n appendInitSegmentFromCache,\n getIsBufferingCompleted,\n setIsBufferingCompleted,\n getIsPruningInProgress,\n reset,\n prepareForPlaybackSeek,\n prepareForReplacementTrackSwitch,\n prepareForNonReplacementTrackSwitch,\n prepareForReplacementQualitySwitch,\n updateAppendWindow,\n getAllRangesWithSafetyFactor,\n getContinuousBufferTimeForTargetTime,\n clearBuffers,\n pruneAllSafely,\n updateBufferTimestampOffset,\n setSeekTarget,\n segmentRequestingCompleted\n };\n\n setup();\n return instance;\n}\n\nBufferController.__dashjs_factory_name = BUFFER_CONTROLLER_TYPE;\nexport default FactoryMaker.getClassFactory(BufferController);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport EventBus from '../../core/EventBus';\nimport Events from '../../core/events/Events';\nimport FactoryMaker from '../../core/FactoryMaker';\nimport InitCache from '../utils/InitCache';\nimport SourceBufferSink from '../SourceBufferSink';\nimport DashJSError from '../../streaming/vo/DashJSError';\nimport Errors from '../../core/errors/Errors';\n\nconst BUFFER_CONTROLLER_TYPE = 'NotFragmentedTextBufferController';\n\nfunction NotFragmentedTextBufferController(config) {\n\n config = config || {};\n const context = this.context;\n const eventBus = EventBus(context).getInstance();\n\n const textController = config.textController;\n const errHandler = config.errHandler;\n const streamInfo = config.streamInfo;\n const type = config.type;\n\n let instance,\n isBufferingCompleted,\n initialized,\n mediaSource,\n sourceBufferSink,\n initCache;\n\n function setup() {\n initialized = false;\n mediaSource = null;\n isBufferingCompleted = false;\n\n initCache = InitCache(context).getInstance();\n\n eventBus.on(Events.INIT_FRAGMENT_LOADED, _onInitFragmentLoaded, instance);\n }\n\n function getBufferControllerType() {\n return BUFFER_CONTROLLER_TYPE;\n }\n\n function initialize(source) {\n setMediaSource(source);\n }\n\n function createBufferSink(mediaInfo) {\n return new Promise((resolve, reject) => {\n try {\n sourceBufferSink = SourceBufferSink(context).create({ mediaSource, textController, eventBus });\n sourceBufferSink.initializeForFirstUse(streamInfo, mediaInfo);\n if (!initialized) {\n if (sourceBufferSink.getBuffer() && typeof sourceBufferSink.getBuffer().initialize === 'function') {\n sourceBufferSink.getBuffer().initialize();\n }\n initialized = true;\n }\n resolve(sourceBufferSink);\n } catch (e) {\n errHandler.error(new DashJSError(Errors.MEDIASOURCE_TYPE_UNSUPPORTED_CODE, Errors.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE + type));\n reject(e);\n }\n });\n\n }\n\n function getStreamId() {\n return streamInfo.id;\n }\n\n function getType() {\n return type;\n }\n\n function getBuffer() {\n return sourceBufferSink;\n }\n\n function setMediaSource(value) {\n mediaSource = value;\n }\n\n function getMediaSource() {\n return mediaSource;\n }\n\n function getIsPruningInProgress() {\n return false;\n }\n\n function getBufferLevel() {\n return 0;\n }\n\n function getIsBufferingCompleted() {\n return isBufferingCompleted;\n }\n\n function setIsBufferingCompleted(value) {\n if (isBufferingCompleted === value) {\n return;\n }\n\n isBufferingCompleted = value;\n\n if (isBufferingCompleted) {\n triggerEvent(Events.BUFFERING_COMPLETED);\n }\n }\n\n function reset(errored) {\n eventBus.off(Events.INIT_FRAGMENT_LOADED, _onInitFragmentLoaded, instance);\n\n if (!errored && sourceBufferSink) {\n sourceBufferSink.abort();\n sourceBufferSink.reset();\n sourceBufferSink = null;\n }\n }\n\n function appendInitSegmentFromCache(representationId) {\n // If text data file already in cache then no need to append it again\n return initCache.extract(streamInfo.id, representationId) !== null;\n }\n\n function _onInitFragmentLoaded(e) {\n if (!e.chunk.bytes || isBufferingCompleted) return;\n\n initCache.save(e.chunk);\n\n sourceBufferSink.append(e.chunk);\n\n setIsBufferingCompleted(true);\n }\n\n function getRangeAt() {\n return null;\n }\n\n function getAllRangesWithSafetyFactor() {\n return [];\n }\n\n function getContinuousBufferTimeForTargetTime() {\n return Number.POSITIVE_INFINITY;\n }\n\n function clearBuffers() {\n return Promise.resolve();\n }\n\n function updateBufferTimestampOffset() {\n return Promise.resolve();\n }\n\n function prepareForPlaybackSeek() {\n return Promise.resolve();\n }\n\n function prepareForReplacementTrackSwitch() {\n isBufferingCompleted = false;\n return Promise.resolve();\n }\n\n function updateAppendWindow() {\n return Promise.resolve();\n }\n\n function setSeekTarget() {\n\n }\n\n function segmentRequestingCompleted() {\n\n }\n\n function pruneAllSafely() {\n return Promise.resolve();\n }\n\n function triggerEvent(eventType, data) {\n let payload = data || {};\n eventBus.trigger(eventType, payload, { streamId: streamInfo.id, mediaType: type });\n }\n\n instance = {\n initialize,\n getStreamId,\n getType,\n getBufferControllerType,\n createBufferSink,\n getBuffer,\n getBufferLevel,\n getRangeAt,\n getAllRangesWithSafetyFactor,\n getContinuousBufferTimeForTargetTime,\n setMediaSource,\n getMediaSource,\n appendInitSegmentFromCache,\n getIsBufferingCompleted,\n setIsBufferingCompleted,\n getIsPruningInProgress,\n reset,\n clearBuffers,\n prepareForPlaybackSeek,\n prepareForReplacementTrackSwitch,\n setSeekTarget,\n updateAppendWindow,\n pruneAllSafely,\n updateBufferTimestampOffset,\n segmentRequestingCompleted\n };\n\n setup();\n\n return instance;\n}\n\nNotFragmentedTextBufferController.__dashjs_factory_name = BUFFER_CONTROLLER_TYPE;\nexport default FactoryMaker.getClassFactory(NotFragmentedTextBufferController);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport Constants from '../constants/Constants';\nimport FragmentModel from '../models/FragmentModel';\nimport EventBus from '../../core/EventBus';\nimport Events from '../../core/events/Events';\nimport FactoryMaker from '../../core/FactoryMaker';\nimport Debug from '../../core/Debug';\nimport MetricsConstants from '../constants/MetricsConstants';\nimport MediaPlayerEvents from '../MediaPlayerEvents';\n\nfunction ScheduleController(config) {\n\n config = config || {};\n const context = this.context;\n const eventBus = EventBus(context).getInstance();\n const dashMetrics = config.dashMetrics;\n const mediaPlayerModel = config.mediaPlayerModel;\n const fragmentModel = config.fragmentModel;\n const abrController = config.abrController;\n const playbackController = config.playbackController;\n const textController = config.textController;\n const type = config.type;\n const bufferController = config.bufferController;\n const settings = config.settings;\n\n let instance,\n streamInfo,\n logger,\n currentRepresentationInfo,\n timeToLoadDelay,\n scheduleTimeout,\n hasVideoTrack,\n lastFragmentRequest,\n topQualityIndex,\n lastInitializedQuality,\n switchTrack,\n initSegmentRequired,\n checkPlaybackQuality;\n\n function setup() {\n logger = Debug(context).getInstance().getLogger(instance);\n resetInitialSettings();\n streamInfo = config.streamInfo;\n }\n\n function initialize(_hasVideoTrack) {\n hasVideoTrack = _hasVideoTrack;\n\n eventBus.on(Events.BYTES_APPENDED_END_FRAGMENT, _onBytesAppended, instance);\n eventBus.on(Events.URL_RESOLUTION_FAILED, _onURLResolutionFailed, instance);\n eventBus.on(MediaPlayerEvents.PLAYBACK_STARTED, _onPlaybackStarted, instance);\n eventBus.on(MediaPlayerEvents.PLAYBACK_RATE_CHANGED, _onPlaybackRateChanged, instance);\n eventBus.on(MediaPlayerEvents.PLAYBACK_TIME_UPDATED, _onPlaybackTimeUpdated, instance);\n }\n\n function getType() {\n return type;\n }\n\n function getStreamId() {\n return streamInfo.id;\n }\n\n function setCurrentRepresentation(representationInfo) {\n currentRepresentationInfo = representationInfo;\n }\n\n function startScheduleTimer(value) {\n if (bufferController.getIsBufferingCompleted()) return;\n\n clearScheduleTimer();\n const timeoutValue = !isNaN(value) ? value : 0;\n scheduleTimeout = setTimeout(schedule, timeoutValue);\n }\n\n function clearScheduleTimer() {\n if (scheduleTimeout) {\n clearTimeout(scheduleTimeout);\n scheduleTimeout = null;\n }\n }\n\n function hasTopQualityChanged() {\n const streamId = streamInfo.id;\n const newTopQualityIndex = abrController.getMaxAllowedIndexFor(type, streamId);\n\n if (isNaN(topQualityIndex) || topQualityIndex != newTopQualityIndex) {\n logger.info('Top quality ' + type + ' index has changed from ' + topQualityIndex + ' to ' + newTopQualityIndex);\n topQualityIndex = newTopQualityIndex;\n return true;\n }\n return false;\n\n }\n\n /**\n * Schedule the request for an init or a media segment\n */\n function schedule() {\n try {\n // Check if we are supposed to stop scheduling\n if (_shouldClearScheduleTimer()) {\n clearScheduleTimer();\n return;\n }\n\n if (_shouldScheduleNextRequest()) {\n let qualityChange = false;\n if (checkPlaybackQuality) {\n // in case the playback quality is supposed to be changed, the corresponding StreamProcessor will update the currentRepresentation.\n // The StreamProcessor will also start the schedule timer again once the quality switch has beeen prepared. Consequently, we only call _getNextFragment if the quality is not changed.\n qualityChange = abrController.checkPlaybackQuality(type, streamInfo.id);\n }\n if (!qualityChange) {\n _getNextFragment();\n }\n\n } else {\n startScheduleTimer(settings.get().streaming.lowLatencyEnabled ? settings.get().streaming.scheduling.lowLatencyTimeout : settings.get().streaming.scheduling.defaultTimeout);\n }\n } catch (e) {\n startScheduleTimer(settings.get().streaming.lowLatencyEnabled ? settings.get().streaming.scheduling.lowLatencyTimeout : settings.get().streaming.scheduling.defaultTimeout);\n }\n }\n\n /**\n * Triggers the events to start requesting an init or a media segment. This will be picked up by the corresponding StreamProcessor.\n * @private\n */\n function _getNextFragment() {\n // A quality changed occured or we are switching the AdaptationSet. In that case we need to load a new init segment\n if (initSegmentRequired || currentRepresentationInfo.quality !== lastInitializedQuality || switchTrack) {\n if (switchTrack) {\n logger.debug('Switch track for ' + type + ', representation id = ' + currentRepresentationInfo.id);\n switchTrack = false;\n } else {\n logger.debug('Quality has changed, get init request for representationid = ' + currentRepresentationInfo.id);\n }\n eventBus.trigger(Events.INIT_FRAGMENT_NEEDED,\n { representationId: currentRepresentationInfo.id, sender: instance },\n { streamId: streamInfo.id, mediaType: type }\n );\n checkPlaybackQuality = false;\n initSegmentRequired = false;\n }\n\n // Request a media segment instead\n else {\n logger.debug(`Media segment needed for ${type} and stream id ${streamInfo.id}`);\n eventBus.trigger(Events.MEDIA_FRAGMENT_NEEDED,\n {},\n { streamId: streamInfo.id, mediaType: type }\n );\n checkPlaybackQuality = true;\n }\n\n }\n\n /**\n * Check if we need to stop scheduling for now.\n * @return {boolean}\n * @private\n */\n function _shouldClearScheduleTimer() {\n try {\n return (((type === Constants.TEXT) && !textController.isTextEnabled()) ||\n (playbackController.isPaused() && (!playbackController.getStreamController().getInitialPlayback() || !playbackController.getStreamController().getAutoPlay()) && !settings.get().streaming.scheduling.scheduleWhilePaused));\n } catch (e) {\n return false;\n }\n }\n\n /**\n * Check if we can start scheduling the next request\n * @return {boolean}\n * @private\n */\n function _shouldScheduleNextRequest() {\n try {\n return currentRepresentationInfo && (isNaN(lastInitializedQuality) || switchTrack || hasTopQualityChanged() || _shouldBuffer());\n } catch (e) {\n return false;\n }\n }\n\n /**\n * Check if the current buffer level is below our buffer target.\n * @return {boolean}\n * @private\n */\n function _shouldBuffer() {\n if (!type || !currentRepresentationInfo) {\n return true;\n }\n const bufferLevel = dashMetrics.getCurrentBufferLevel(type);\n return bufferLevel < getBufferTarget();\n }\n\n /**\n * Determine the buffer target depending on the type and whether we have audio and video AdaptationSets available\n * @return {number}\n */\n function getBufferTarget() {\n let bufferTarget = NaN;\n\n if (!type || !currentRepresentationInfo) {\n return bufferTarget;\n }\n\n if (type === Constants.TEXT) {\n bufferTarget = _getBufferTargetForFragmentedText();\n } else if (type === Constants.AUDIO && hasVideoTrack) {\n bufferTarget = _getBufferTargetForAudio();\n } else {\n bufferTarget = _getGenericBufferTarget();\n }\n\n return bufferTarget;\n }\n\n /**\n * Returns the buffer target for fragmented text tracks\n * @return {number}\n * @private\n */\n function _getBufferTargetForFragmentedText() {\n try {\n if (textController.isTextEnabled()) {\n if (isNaN(currentRepresentationInfo.fragmentDuration)) { //fragmentDuration of currentRepresentationInfo is not defined,\n // call metrics function to have data in the latest scheduling info...\n // if no metric, returns 0. In this case, rule will return false.\n const schedulingInfo = dashMetrics.getCurrentSchedulingInfo(MetricsConstants.SCHEDULING_INFO);\n return schedulingInfo ? schedulingInfo.duration : 0;\n } else {\n return currentRepresentationInfo.fragmentDuration;\n }\n } else { // text is disabled, rule will return false\n return 0;\n }\n } catch (e) {\n return 0;\n }\n }\n\n /**\n * Returns the buffer target for audio tracks in case we have a video track available as well\n * @return {number}\n * @private\n */\n function _getBufferTargetForAudio() {\n try {\n const videoBufferLevel = dashMetrics.getCurrentBufferLevel(Constants.VIDEO);\n // For multiperiod we need to consider that audio and video segments might have different durations.\n // This can lead to scenarios in which we completely buffered the video segments and the video buffer level for the current period is not changing anymore. However we might still need a small audio segment to finish buffering audio as well.\n // If we set the buffer time of audio equal to the video buffer time scheduling for the remaining audio segment will only be triggered when audio fragmentDuration > videoBufferLevel. That will delay preloading of the upcoming period.\n // Should find a better solution than just adding 1\n if (isNaN(currentRepresentationInfo.fragmentDuration)) {\n return videoBufferLevel + 1;\n } else {\n return Math.max(videoBufferLevel + 1, currentRepresentationInfo.fragmentDuration);\n }\n } catch (e) {\n return 0;\n }\n }\n\n /**\n * Determines the generic buffer target, for instance for video tracks\n * @return {number}\n * @private\n */\n function _getGenericBufferTarget() {\n try {\n const streamInfo = currentRepresentationInfo.mediaInfo.streamInfo;\n if (abrController.isPlayingAtTopQuality(streamInfo)) {\n const isLongFormContent = streamInfo.manifestInfo.duration >= settings.get().streaming.buffer.longFormContentDurationThreshold;\n return isLongFormContent ? settings.get().streaming.buffer.bufferTimeAtTopQualityLongForm : settings.get().streaming.buffer.bufferTimeAtTopQuality;\n } else {\n return mediaPlayerModel.getStableBufferTime();\n }\n } catch (e) {\n return mediaPlayerModel.getStableBufferTime();\n }\n }\n\n function setSwitchTrack(value) {\n switchTrack = value;\n }\n\n function getSwitchStrack() {\n return switchTrack;\n }\n\n function _onPlaybackTimeUpdated() {\n _completeQualityChange(true);\n }\n\n function _completeQualityChange(trigger) {\n if (playbackController && fragmentModel) {\n const item = fragmentModel.getRequests({\n state: FragmentModel.FRAGMENT_MODEL_EXECUTED,\n time: playbackController.getTime(),\n threshold: 0\n })[0];\n\n if (item && playbackController.getTime() >= item.startTime) {\n if ((!lastFragmentRequest.mediaInfo || (item.mediaInfo.type === lastFragmentRequest.mediaInfo.type && item.mediaInfo.id !== lastFragmentRequest.mediaInfo.id)) && trigger) {\n eventBus.trigger(Events.TRACK_CHANGE_RENDERED, {\n mediaType: type,\n oldMediaInfo: lastFragmentRequest.mediaInfo,\n newMediaInfo: item.mediaInfo,\n streamId: streamInfo.id\n });\n }\n if ((item.quality !== lastFragmentRequest.quality || item.adaptationIndex !== lastFragmentRequest.adaptationIndex) && trigger) {\n logger.debug(`Quality change rendered for streamId ${streamInfo.id} and type ${type}`);\n eventBus.trigger(Events.QUALITY_CHANGE_RENDERED, {\n mediaType: type,\n oldQuality: lastFragmentRequest.quality,\n newQuality: item.quality,\n streamId: streamInfo.id\n });\n }\n lastFragmentRequest = {\n mediaInfo: item.mediaInfo,\n quality: item.quality,\n adaptationIndex: item.adaptationIndex\n };\n }\n }\n }\n\n function _onBytesAppended(e) {\n logger.debug(`Appended bytes for ${e.mediaType} and stream id ${streamInfo.id}`);\n\n // we save the last initialized quality. That way we make sure that the media fragments we are about to append match the init segment\n if (isNaN(e.index) || isNaN(lastInitializedQuality)) {\n lastInitializedQuality = e.quality;\n logger.info('[' + type + '] ' + 'lastInitializedRepresentationInfo changed to ' + e.quality);\n }\n\n startScheduleTimer(0);\n }\n\n function _onURLResolutionFailed() {\n fragmentModel.abortRequests();\n clearScheduleTimer();\n }\n\n function _onPlaybackStarted() {\n if (!settings.get().streaming.scheduling.scheduleWhilePaused) {\n startScheduleTimer();\n }\n }\n\n function _onPlaybackRateChanged(e) {\n dashMetrics.updatePlayListTraceMetrics({ playbackspeed: e.playbackRate.toString() });\n }\n\n function setTimeToLoadDelay(value) {\n timeToLoadDelay = value;\n }\n\n function getTimeToLoadDelay() {\n return timeToLoadDelay;\n }\n\n function setCheckPlaybackQuality(value) {\n checkPlaybackQuality = value;\n }\n\n function setInitSegmentRequired(value) {\n initSegmentRequired = value;\n }\n\n function resetInitialSettings() {\n checkPlaybackQuality = true;\n timeToLoadDelay = 0;\n lastInitializedQuality = NaN;\n lastFragmentRequest = {\n mediaInfo: undefined,\n quality: NaN,\n adaptationIndex: NaN\n };\n topQualityIndex = NaN;\n switchTrack = false;\n initSegmentRequired = false;\n }\n\n function reset() {\n eventBus.off(Events.BYTES_APPENDED_END_FRAGMENT, _onBytesAppended, instance);\n eventBus.off(Events.URL_RESOLUTION_FAILED, _onURLResolutionFailed, instance);\n eventBus.off(MediaPlayerEvents.PLAYBACK_STARTED, _onPlaybackStarted, instance);\n eventBus.off(MediaPlayerEvents.PLAYBACK_RATE_CHANGED, _onPlaybackRateChanged, instance);\n eventBus.off(MediaPlayerEvents.PLAYBACK_TIME_UPDATED, _onPlaybackTimeUpdated, instance);\n\n clearScheduleTimer();\n _completeQualityChange(false);\n resetInitialSettings();\n streamInfo = null;\n }\n\n function getPlaybackController() {\n return playbackController;\n }\n\n instance = {\n initialize,\n getType,\n getStreamId,\n setCurrentRepresentation,\n setTimeToLoadDelay,\n getTimeToLoadDelay,\n setSwitchTrack,\n getSwitchStrack,\n startScheduleTimer,\n clearScheduleTimer,\n reset,\n getBufferTarget,\n getPlaybackController,\n setCheckPlaybackQuality,\n setInitSegmentRequired\n };\n\n setup();\n\n return instance;\n}\n\nScheduleController.__dashjs_factory_name = 'ScheduleController';\nexport default FactoryMaker.getClassFactory(ScheduleController);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @classdesc a PlayList from ISO23009-1 Annex D, this Object holds reference to the playback session information\n * @ignore\n */\nclass PlayList {\n /**\n * @class\n */\n constructor() {\n\n /**\n * Timestamp of the user action that starts the playback stream...\n * @public\n */\n this.start = null;\n /**\n * Presentation time at which playout was requested by the user...\n * @public\n */\n this.mstart = null;\n /**\n * Type of user action which triggered playout\n * - New playout request (e.g. initial playout or seeking)\n * - Resume from pause\n * - Other user request (e.g. user-requested quality change)\n * - Start of a metrics collection stream (hence earlier entries in the play list not collected)\n * @public\n */\n this.starttype = null;\n\n /**\n * List of streams of continuous rendering of decoded samples.\n * @public\n */\n this.trace = [];\n }\n}\n\n/* Public Static Constants */\nPlayList.INITIAL_PLAYOUT_START_REASON = 'initial_playout';\nPlayList.SEEK_START_REASON = 'seek';\nPlayList.RESUME_FROM_PAUSE_START_REASON = 'resume';\nPlayList.METRICS_COLLECTION_START_REASON = 'metrics_collection_start';\n\n/**\n * @classdesc a PlayList.Trace from ISO23009-1 Annex D\n * @ignore\n */\nclass PlayListTrace {\n /**\n * @class\n */\n constructor() {\n /**\n * The value of the Representation@id of the Representation from which the samples were taken.\n * @type {string}\n * @public\n */\n this.representationid = null;\n /**\n * If not present, this metrics concerns the Representation as a whole.\n * If present, subreplevel indicates the greatest value of any\n * Subrepresentation@level being rendered.\n * @type {number}\n * @public\n */\n this.subreplevel = null;\n /**\n * The time at which the first sample was rendered\n * @type {number}\n * @public\n */\n this.start = null;\n /**\n * The presentation time of the first sample rendered.\n * @type {number}\n * @public\n */\n this.mstart = null;\n /**\n * The duration of the continuously presented samples (which is the same in real time and media time). \"Continuously presented\" means that the media clock continued to advance at the playout speed throughout the interval. NOTE: the spec does not call out the units, but all other durations etc are in ms, and we use ms too.\n * @type {number}\n * @public\n */\n this.duration = null;\n /**\n * The playback speed relative to normal playback speed (i.e.normal forward playback speed is 1.0).\n * @type {number}\n * @public\n */\n this.playbackspeed = null;\n /**\n * The reason why continuous presentation of this Representation was stopped.\n * representation switch\n * rebuffering\n * user request\n * end of Period\n * end of Stream\n * end of content\n * end of a metrics collection period\n *\n * @type {string}\n * @public\n */\n this.stopreason = null;\n }\n}\n\nPlayListTrace.REPRESENTATION_SWITCH_STOP_REASON = 'representation_switch';\nPlayListTrace.REBUFFERING_REASON = 'rebuffering';\nPlayListTrace.USER_REQUEST_STOP_REASON = 'user_request';\nPlayListTrace.END_OF_PERIOD_STOP_REASON = 'end_of_period';\nPlayListTrace.END_OF_CONTENT_STOP_REASON = 'end_of_content';\nPlayListTrace.METRICS_COLLECTION_STOP_REASON = 'metrics_collection_end';\nPlayListTrace.FAILURE_STOP_REASON = 'failure';\n\nexport { PlayList, PlayListTrace };\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport Constants from './constants/Constants';\nimport DashConstants from '../dash/constants/DashConstants';\nimport MetricsConstants from './constants/MetricsConstants';\nimport FragmentModel from './models/FragmentModel';\nimport BufferController from './controllers/BufferController';\nimport NotFragmentedTextBufferController from './text/NotFragmentedTextBufferController';\nimport ScheduleController from './controllers/ScheduleController';\nimport RepresentationController from '../dash/controllers/RepresentationController';\nimport FactoryMaker from '../core/FactoryMaker';\nimport {checkInteger} from './utils/SupervisorTools';\nimport EventBus from '../core/EventBus';\nimport Events from '../core/events/Events';\nimport DashHandler from '../dash/DashHandler';\nimport Errors from '../core/errors/Errors';\nimport DashJSError from './vo/DashJSError';\nimport Debug from '../core/Debug';\nimport RequestModifier from './utils/RequestModifier';\nimport URLUtils from '../streaming/utils/URLUtils';\nimport BoxParser from './utils/BoxParser';\nimport {PlayListTrace} from './vo/metrics/PlayList';\nimport SegmentsController from '../dash/controllers/SegmentsController';\nimport {HTTPRequest} from './vo/metrics/HTTPRequest';\n\nfunction StreamProcessor(config) {\n\n config = config || {};\n let context = this.context;\n let eventBus = EventBus(context).getInstance();\n\n let streamInfo = config.streamInfo;\n let type = config.type;\n let errHandler = config.errHandler;\n let mimeType = config.mimeType;\n let timelineConverter = config.timelineConverter;\n let adapter = config.adapter;\n let manifestModel = config.manifestModel;\n let mediaPlayerModel = config.mediaPlayerModel;\n let fragmentModel = config.fragmentModel;\n let abrController = config.abrController;\n let playbackController = config.playbackController;\n let mediaController = config.mediaController;\n let textController = config.textController;\n let dashMetrics = config.dashMetrics;\n let settings = config.settings;\n let boxParser = config.boxParser;\n let segmentBlacklistController = config.segmentBlacklistController;\n\n let instance,\n logger,\n isDynamic,\n mediaInfo,\n mediaInfoArr,\n bufferController,\n scheduleController,\n representationController,\n shouldUseExplicitTimeForRequest,\n qualityChangeInProgress,\n dashHandler,\n segmentsController,\n bufferingTime;\n\n function setup() {\n logger = Debug(context).getInstance().getLogger(instance);\n resetInitialSettings();\n\n eventBus.on(Events.DATA_UPDATE_COMPLETED, _onDataUpdateCompleted, instance, { priority: EventBus.EVENT_PRIORITY_HIGH }); // High priority to be notified before Stream\n eventBus.on(Events.INIT_FRAGMENT_NEEDED, _onInitFragmentNeeded, instance);\n eventBus.on(Events.MEDIA_FRAGMENT_NEEDED, _onMediaFragmentNeeded, instance);\n eventBus.on(Events.MEDIA_FRAGMENT_LOADED, _onMediaFragmentLoaded, instance);\n eventBus.on(Events.BUFFER_LEVEL_STATE_CHANGED, _onBufferLevelStateChanged, instance);\n eventBus.on(Events.BUFFER_CLEARED, _onBufferCleared, instance);\n eventBus.on(Events.SEEK_TARGET, _onSeekTarget, instance);\n eventBus.on(Events.FRAGMENT_LOADING_ABANDONED, _onFragmentLoadingAbandoned, instance);\n eventBus.on(Events.FRAGMENT_LOADING_COMPLETED, _onFragmentLoadingCompleted, instance);\n eventBus.on(Events.QUOTA_EXCEEDED, _onQuotaExceeded, instance);\n eventBus.on(Events.SET_FRAGMENTED_TEXT_AFTER_DISABLED, _onSetFragmentedTextAfterDisabled, instance);\n eventBus.on(Events.SET_NON_FRAGMENTED_TEXT, _onSetNonFragmentedText, instance);\n eventBus.on(Events.SOURCE_BUFFER_ERROR, _onSourceBufferError, instance);\n }\n\n function initialize(mediaSource, hasVideoTrack, isFragmented) {\n\n segmentsController = SegmentsController(context).create({\n events: Events,\n eventBus,\n streamInfo,\n timelineConverter,\n dashConstants: DashConstants,\n segmentBaseController: config.segmentBaseController,\n type\n });\n\n dashHandler = DashHandler(context).create({\n streamInfo,\n type,\n timelineConverter,\n dashMetrics,\n mediaPlayerModel,\n baseURLController: config.baseURLController,\n errHandler,\n segmentsController,\n settings,\n boxParser,\n events: Events,\n eventBus,\n errors: Errors,\n debug: Debug(context).getInstance(),\n requestModifier: RequestModifier(context).getInstance(),\n dashConstants: DashConstants,\n constants: Constants,\n urlUtils: URLUtils(context).getInstance()\n });\n\n isDynamic = streamInfo.manifestInfo.isDynamic;\n\n // Create/initialize controllers\n dashHandler.initialize(isDynamic);\n abrController.registerStreamType(type, instance);\n\n representationController = RepresentationController(context).create({\n streamInfo,\n type,\n abrController,\n dashMetrics,\n playbackController,\n timelineConverter,\n dashConstants: DashConstants,\n events: Events,\n eventBus,\n errors: Errors,\n isDynamic,\n segmentsController\n });\n\n bufferController = _createBufferControllerForType(type, isFragmented);\n if (bufferController) {\n bufferController.initialize(mediaSource);\n }\n\n scheduleController = ScheduleController(context).create({\n streamInfo,\n type,\n mimeType,\n adapter,\n dashMetrics,\n mediaPlayerModel,\n fragmentModel,\n abrController,\n playbackController,\n textController,\n mediaController,\n bufferController,\n settings\n });\n\n scheduleController.initialize(hasVideoTrack);\n\n bufferingTime = 0;\n shouldUseExplicitTimeForRequest = false;\n }\n\n function getStreamId() {\n return streamInfo.id;\n }\n\n function getType() {\n return type;\n }\n\n function getIsTextTrack() {\n return adapter.getIsTextTrack(representationController.getData());\n }\n\n function resetInitialSettings() {\n mediaInfoArr = [];\n mediaInfo = null;\n bufferingTime = 0;\n shouldUseExplicitTimeForRequest = false;\n qualityChangeInProgress = false;\n }\n\n function reset(errored, keepBuffers) {\n if (dashHandler) {\n dashHandler.reset();\n }\n\n if (bufferController) {\n bufferController.reset(errored, keepBuffers);\n bufferController = null;\n }\n\n if (scheduleController) {\n scheduleController.reset();\n scheduleController = null;\n }\n\n if (representationController) {\n representationController.reset();\n representationController = null;\n }\n\n if (segmentsController) {\n segmentsController = null;\n }\n\n if (abrController) {\n abrController.unRegisterStreamType(getStreamId(), type);\n }\n\n eventBus.off(Events.DATA_UPDATE_COMPLETED, _onDataUpdateCompleted, instance);\n eventBus.off(Events.INIT_FRAGMENT_NEEDED, _onInitFragmentNeeded, instance);\n eventBus.off(Events.MEDIA_FRAGMENT_NEEDED, _onMediaFragmentNeeded, instance);\n eventBus.off(Events.MEDIA_FRAGMENT_LOADED, _onMediaFragmentLoaded, instance);\n eventBus.off(Events.BUFFER_LEVEL_STATE_CHANGED, _onBufferLevelStateChanged, instance);\n eventBus.off(Events.BUFFER_CLEARED, _onBufferCleared, instance);\n eventBus.off(Events.SEEK_TARGET, _onSeekTarget, instance);\n eventBus.off(Events.FRAGMENT_LOADING_ABANDONED, _onFragmentLoadingAbandoned, instance);\n eventBus.off(Events.FRAGMENT_LOADING_COMPLETED, _onFragmentLoadingCompleted, instance);\n eventBus.off(Events.SET_FRAGMENTED_TEXT_AFTER_DISABLED, _onSetFragmentedTextAfterDisabled, instance);\n eventBus.off(Events.SET_NON_FRAGMENTED_TEXT, _onSetNonFragmentedText, instance);\n eventBus.off(Events.QUOTA_EXCEEDED, _onQuotaExceeded, instance);\n eventBus.off(Events.SOURCE_BUFFER_ERROR, _onSourceBufferError, instance);\n\n resetInitialSettings();\n type = null;\n streamInfo = null;\n }\n\n function isUpdating() {\n return representationController ? representationController.isUpdating() : false;\n }\n\n /**\n * When a seek within the corresponding period occurs this function initiates the clearing of the buffer and sets the correct buffering time.\n * @param {object} e\n * @private\n */\n function prepareInnerPeriodPlaybackSeeking(e) {\n return new Promise((resolve) => {\n // Stop segment requests until we have figured out for which time we need to request a segment. We don't want to replace existing segments.\n scheduleController.clearScheduleTimer();\n fragmentModel.abortRequests();\n\n // Abort operations to the SourceBuffer Sink and reset the BufferControllers isBufferingCompleted state.\n bufferController.prepareForPlaybackSeek()\n .then(() => {\n // Clear the buffer. We need to prune everything which is not in the target interval.\n const clearRanges = bufferController.getAllRangesWithSafetyFactor(e.seekTime);\n // When everything has been pruned go on\n return bufferController.clearBuffers(clearRanges);\n })\n .then(() => {\n // Figure out the correct segment request time.\n const continuousBufferTime = bufferController.getContinuousBufferTimeForTargetTime(e.seekTime);\n\n // If the buffer is continuous and exceeds the duration of the period we are still done buffering. We need to trigger the buffering completed event in order to start prebuffering upcoming periods again\n if (!isNaN(continuousBufferTime) && !isNaN(streamInfo.duration) && isFinite(streamInfo.duration) && continuousBufferTime >= streamInfo.start + streamInfo.duration) {\n bufferController.setIsBufferingCompleted(true);\n resolve();\n } else {\n const targetTime = isNaN(continuousBufferTime) ? e.seekTime : continuousBufferTime;\n setExplicitBufferingTime(targetTime);\n bufferController.setSeekTarget(targetTime);\n\n const promises = [];\n\n // append window has been reset by abort() operation. Set the correct values again\n promises.push(bufferController.updateAppendWindow());\n\n // Timestamp offset couldve been changed by preloading period\n const representationInfo = getRepresentationInfo();\n promises.push(bufferController.updateBufferTimestampOffset(representationInfo));\n\n Promise.all(promises)\n .then(() => {\n // We might have aborted the append operation of an init segment. Append init segment again.\n scheduleController.setInitSegmentRequired(true);\n\n // Right after a seek we should not immediately check the playback quality\n scheduleController.setCheckPlaybackQuality(false);\n scheduleController.startScheduleTimer();\n resolve();\n });\n }\n })\n .catch((e) => {\n logger.error(e);\n });\n });\n\n }\n\n /**\n * Seek outside of the current period.\n * @return {Promise}\n */\n function prepareOuterPeriodPlaybackSeeking() {\n return new Promise((resolve, reject) => {\n try {\n // Stop scheduling\n scheduleController.clearScheduleTimer();\n\n // Abort all ongoing requests\n fragmentModel.abortRequests();\n\n // buffering not complete anymore and abort current append operation to SourceBuffer\n bufferController.prepareForPlaybackSeek()\n .then(() => {\n // Clear the buffers completely.\n return bufferController.pruneAllSafely();\n })\n .then(() => {\n resolve();\n });\n\n } catch (e) {\n reject(e);\n }\n });\n }\n\n /**\n * ScheduleController indicates that an init segment needs to be fetched.\n * @param {object} e\n * @param {boolean} rescheduleIfNoRequest - Defines whether we reschedule in case no valid request could be generated\n * @private\n */\n function _onInitFragmentNeeded(e, rescheduleIfNoRequest = true) {\n // Event propagation may have been stopped (see MssHandler)\n if (!e.sender) return;\n\n if (playbackController.getIsManifestUpdateInProgress()) {\n _noValidRequest();\n return;\n }\n\n if (getIsTextTrack() && !textController.isTextEnabled()) return;\n\n if (bufferController && e.representationId) {\n if (!bufferController.appendInitSegmentFromCache(e.representationId)) {\n const rep = representationController.getCurrentRepresentation();\n // Dummy init segment (fragmented tracks without initialization segment)\n if (rep.range === 0) {\n _onMediaFragmentNeeded();\n return;\n }\n // Init segment not in cache, send new request\n const request = dashHandler ? dashHandler.getInitRequest(mediaInfo, rep) : null;\n if (request) {\n fragmentModel.executeRequest(request);\n } else if (rescheduleIfNoRequest) {\n scheduleController.setInitSegmentRequired(true);\n _noValidRequest();\n }\n }\n }\n }\n\n /**\n * ScheduleController indicates that a media segment is needed\n * @param {boolean} rescheduleIfNoRequest - Defines whether we reschedule in case no valid request could be generated\n * @private\n */\n function _onMediaFragmentNeeded(e, rescheduleIfNoRequest = true) {\n // Don't schedule next fragments while updating manifest or pruning to avoid buffer inconsistencies\n if (playbackController.getIsManifestUpdateInProgress() || bufferController.getIsPruningInProgress()) {\n _noValidRequest();\n return;\n }\n\n let request = _getFragmentRequest();\n if (request) {\n shouldUseExplicitTimeForRequest = false;\n _mediaRequestGenerated(request);\n } else {\n _noMediaRequestGenerated(rescheduleIfNoRequest);\n }\n }\n\n /**\n * If we generated a valid media request we can execute the request. In some cases the segment might be blacklisted.\n * @param {object} request\n * @private\n */\n function _mediaRequestGenerated(request) {\n if (!isNaN(request.startTime + request.duration)) {\n bufferingTime = request.startTime + request.duration;\n }\n request.delayLoadingTime = new Date().getTime() + scheduleController.getTimeToLoadDelay();\n scheduleController.setTimeToLoadDelay(0);\n if (!_shouldIgnoreRequest(request)) {\n logger.debug(`Next fragment request url for stream id ${streamInfo.id} and media type ${type} is ${request.url}`);\n fragmentModel.executeRequest(request);\n } else {\n logger.warn(`Fragment request url ${request.url} for stream id ${streamInfo.id} and media type ${type} is on the ignore list and will be skipped`);\n _noValidRequest();\n }\n }\n\n /**\n * We could not generate a valid request. Check if the media is finished, we are stuck in a gap or simply need to wait for the next segment to be available.\n * @param {boolean} rescheduleIfNoRequest\n * @private\n */\n function _noMediaRequestGenerated(rescheduleIfNoRequest) {\n const representation = representationController.getCurrentRepresentation();\n\n // If this statement is true we are stuck. A static manifest does not change and we did not find a valid request for the target time\n // There is no point in trying again. We need to adjust the time in order to find a valid request. This can happen if the user/app seeked into a gap.\n if (settings.get().streaming.gaps.enableSeekFix && !isDynamic && shouldUseExplicitTimeForRequest && (playbackController.isSeeking() || playbackController.getTime() === 0)) {\n const adjustedTime = dashHandler.getValidSeekTimeCloseToTargetTime(bufferingTime, mediaInfo, representation, settings.get().streaming.gaps.threshold);\n if (!isNaN(adjustedTime)) {\n playbackController.seek(adjustedTime, false, false);\n return;\n }\n }\n\n // Check if the media is finished. If so, no need to schedule another request\n const isLastSegmentRequested = dashHandler.isLastSegmentRequested(representation, bufferingTime);\n if (isLastSegmentRequested) {\n const segmentIndex = dashHandler.getCurrentIndex();\n logger.debug(`Segment requesting for stream ${streamInfo.id} has finished`);\n eventBus.trigger(Events.STREAM_REQUESTING_COMPLETED, { segmentIndex }, {\n streamId: streamInfo.id,\n mediaType: type\n });\n bufferController.segmentRequestingCompleted(segmentIndex);\n scheduleController.clearScheduleTimer();\n return;\n }\n\n if (rescheduleIfNoRequest) {\n _noValidRequest();\n }\n }\n\n /**\n * In certain situations we need to ignore a request. For instance, if a segment is blacklisted because it caused an MSE error.\n * @private\n */\n function _shouldIgnoreRequest(request) {\n let blacklistUrl = request.url;\n\n if (request.range) {\n blacklistUrl = blacklistUrl.concat('_', request.range);\n }\n\n return segmentBlacklistController.contains(blacklistUrl)\n }\n\n /**\n * Get the init or media segment request using the DashHandler.\n * @return {null|FragmentRequest|null}\n * @private\n */\n function _getFragmentRequest() {\n const representationInfo = getRepresentationInfo();\n let request;\n\n if (isNaN(bufferingTime) || (getType() === Constants.TEXT && !textController.isTextEnabled())) {\n return null;\n }\n\n // Use time just whenever is strictly needed\n const useTime = shouldUseExplicitTimeForRequest;\n\n if (dashHandler) {\n const representation = representationController && representationInfo ? representationController.getRepresentationForQuality(representationInfo.quality) : null;\n\n if (useTime) {\n request = dashHandler.getSegmentRequestForTime(mediaInfo, representation, bufferingTime);\n } else {\n request = dashHandler.getNextSegmentRequest(mediaInfo, representation);\n }\n }\n\n return request;\n }\n\n /**\n * Whenever we can not generate a valid request we restart scheduling according to the timeouts defined in the settings.\n * @private\n */\n function _noValidRequest() {\n scheduleController.startScheduleTimer(settings.get().streaming.lowLatencyEnabled ? settings.get().streaming.scheduling.lowLatencyTimeout : settings.get().streaming.scheduling.defaultTimeout);\n }\n\n function _onDataUpdateCompleted(e) {\n if (!e.error) {\n // Update representation if no error\n scheduleController.setCurrentRepresentation(adapter.convertRepresentationToRepresentationInfo(e.currentRepresentation));\n if (!bufferController.getIsBufferingCompleted()) {\n bufferController.updateBufferTimestampOffset(e.currentRepresentation);\n }\n }\n }\n\n function _onBufferLevelStateChanged(e) {\n dashMetrics.addBufferState(type, e.state, scheduleController.getBufferTarget());\n if (e.state === MetricsConstants.BUFFER_EMPTY && !playbackController.isSeeking()) {\n logger.info('Buffer is empty! Stalling!');\n dashMetrics.pushPlayListTraceMetrics(new Date(), PlayListTrace.REBUFFERING_REASON);\n }\n }\n\n function _onBufferCleared(e) {\n // Remove executed requests not buffered anymore\n fragmentModel.syncExecutedRequestsWithBufferedRange(\n bufferController.getBuffer().getAllBufferRanges(),\n streamInfo.duration);\n\n // If buffer removed ahead current time (QuotaExceededError or automatic buffer pruning) then adjust current index handler time\n if (e.quotaExceeded && e.from > playbackController.getTime()) {\n setExplicitBufferingTime(e.from);\n }\n\n // (Re)start schedule once buffer has been pruned after a QuotaExceededError\n if (e.hasEnoughSpaceToAppend && e.quotaExceeded) {\n scheduleController.startScheduleTimer();\n }\n }\n\n /**\n * This function is called when the corresponding SourceBuffer encountered an error.\n * We blacklist the last segment assuming it caused the error\n * @param {object} e\n * @private\n */\n function _onSourceBufferError(e) {\n if (!e || !e.lastRequestAppended || !e.lastRequestAppended.url) {\n return;\n }\n\n let blacklistUrl = e.lastRequestAppended.url;\n\n if (e.lastRequestAppended.range) {\n blacklistUrl = blacklistUrl.concat('_', e.lastRequestAppended.range);\n }\n logger.warn(`Blacklisting segment with url ${blacklistUrl}`);\n segmentBlacklistController.add(blacklistUrl);\n }\n\n /**\n * The quality has changed which means we have switched to a different representation.\n * If we want to aggressively replace existing parts in the buffer we need to make sure that the new quality is higher than the already buffered one.\n * @param {object} e\n * @private\n */\n function prepareQualityChange(e) {\n logger.debug(`Preparing quality switch for type ${type}`);\n const newQuality = e.newQuality;\n\n qualityChangeInProgress = true;\n\n // Stop scheduling until we are done with preparing the quality switch\n scheduleController.clearScheduleTimer();\n\n const representationInfo = getRepresentationInfo(newQuality);\n scheduleController.setCurrentRepresentation(representationInfo);\n representationController.prepareQualityChange(newQuality);\n\n // Abort the current request to avoid inconsistencies. A quality switch can also be triggered manually by the application.\n // If we update the buffer values now, or initialize a request to the new init segment, the currently downloading media segment might \"work\" with wrong values.\n // Everything that is already in the buffer queue is ok and will be handled by the corresponding function below depending on the switch mode.\n fragmentModel.abortRequests();\n\n // In any case we need to update the MSE.timeOffset\n bufferController.updateBufferTimestampOffset(representationInfo)\n .then(() => {\n\n // If the switch should occur immediately we need to replace existing stuff in the buffer\n if (e.reason && e.reason.forceReplace) {\n _prepareReplacementQualitySwitch();\n }\n\n // If fast switch is enabled we check if we are supposed to replace existing stuff in the buffer\n else if (settings.get().streaming.buffer.fastSwitchEnabled) {\n _prepareForFastQualitySwitch(representationInfo);\n }\n\n // Default quality switch. We append the new quality to the already buffered stuff\n else {\n _prepareForDefaultQualitySwitch();\n }\n\n dashMetrics.pushPlayListTraceMetrics(new Date(), PlayListTrace.REPRESENTATION_SWITCH_STOP_REASON);\n dashMetrics.createPlaylistTraceMetrics(representationInfo.id, playbackController.getTime() * 1000, playbackController.getPlaybackRate());\n })\n }\n\n function _prepareReplacementQualitySwitch() {\n\n // Inform other classes like the GapController that we are replacing existing stuff\n eventBus.trigger(Events.BUFFER_REPLACEMENT_STARTED, {\n mediaType: type,\n streamId: streamInfo.id\n }, { mediaType: type, streamId: streamInfo.id });\n\n // Abort appending segments to the buffer. Also adjust the appendWindow as we might have been in the progress of prebuffering stuff.\n bufferController.prepareForReplacementQualitySwitch()\n .then(() => {\n _bufferClearedForReplacement();\n qualityChangeInProgress = false;\n })\n .catch(() => {\n _bufferClearedForReplacement();\n qualityChangeInProgress = false;\n });\n }\n\n function _prepareForFastQualitySwitch(representationInfo) {\n // if we switch up in quality and need to replace existing parts in the buffer we need to adjust the buffer target\n const time = playbackController.getTime();\n let safeBufferLevel = 1.5;\n const request = fragmentModel.getRequests({\n state: FragmentModel.FRAGMENT_MODEL_EXECUTED,\n time: time + safeBufferLevel,\n threshold: 0\n })[0];\n\n if (request && !getIsTextTrack()) {\n const bufferLevel = bufferController.getBufferLevel();\n const abandonmentState = abrController.getAbandonmentStateFor(streamInfo.id, type);\n\n if (request.quality < representationInfo.quality && bufferLevel >= safeBufferLevel && abandonmentState !== MetricsConstants.ABANDON_LOAD) {\n const targetTime = time + safeBufferLevel;\n setExplicitBufferingTime(targetTime);\n scheduleController.setCheckPlaybackQuality(false);\n scheduleController.startScheduleTimer();\n } else {\n _prepareForDefaultQualitySwitch();\n }\n } else {\n scheduleController.startScheduleTimer();\n }\n qualityChangeInProgress = false;\n }\n\n function _prepareForDefaultQualitySwitch() {\n // We might have aborted the current request. We need to set an explicit buffer time based on what we already have in the buffer.\n _bufferClearedForNonReplacement()\n qualityChangeInProgress = false;\n }\n\n /**\n * We have canceled the download of a fragment and need to adjust the buffer time or reload an init segment\n * @param {object} e\n */\n function _onFragmentLoadingAbandoned(e) {\n logger.info('onFragmentLoadingAbandoned request: ' + e.request.url + ' has been aborted');\n\n // we only need to handle this if we are not seeking, not switching the tracks and not switching the quality\n if (!playbackController.isSeeking() && !scheduleController.getSwitchStrack() && !qualityChangeInProgress) {\n logger.info('onFragmentLoadingAbandoned request: ' + e.request.url + ' has to be downloaded again, origin is not seeking process or switch track call');\n\n // in case of an init segment we force the download of an init segment\n if (e.request && e.request.isInitializationRequest()) {\n scheduleController.setInitSegmentRequired(true);\n }\n\n // in case of a media segment we reset the buffering time\n else {\n setExplicitBufferingTime(e.request.startTime + (e.request.duration / 2));\n }\n\n // In case of a seek the schedule controller was stopped and will be started once the buffer has been pruned.\n scheduleController.startScheduleTimer(0);\n }\n }\n\n /**\n * When a fragment has been loaded we need to start the schedule timer again in case of an error.\n * @param {object} e\n */\n function _onFragmentLoadingCompleted(e) {\n logger.info('OnFragmentLoadingCompleted for stream id ' + streamInfo.id + ' and media type ' + type + ' - Url:', e.request ? e.request.url : 'undefined', e.request.range ? ', Range:' + e.request.range : '');\n\n if (getIsTextTrack()) {\n scheduleController.startScheduleTimer(0);\n }\n\n if (e.error && e.request.serviceLocation) {\n _handleFragmentLoadingError(e);\n }\n }\n\n /**\n * If we encountered an error when loading the fragment we need to handle it according to the segment type\n * @private\n */\n function _handleFragmentLoadingError(e) {\n logger.info(`Fragment loading completed with an error`);\n\n if (!e || !e.request || !e.request.type) {\n return;\n }\n\n // In case there are baseUrls that can still be tried a valid request can be generated. If no valid request can be generated we ran out of baseUrls.\n // Consequently, we need to signal that we dont want to retry in case no valid request could be generated otherwise we keep trying with the same url infinitely.\n\n // Init segment could not be loaded. If we have multiple baseUrls we still have a chance to get a valid segment.\n if (e.request.type === HTTPRequest.INIT_SEGMENT_TYPE) {\n _onInitFragmentNeeded({\n representationId: e.request.representationId,\n sender: {}\n }, false)\n }\n\n // Media segment could not be loaded\n else if (e.request.type === HTTPRequest.MEDIA_SEGMENT_TYPE) {\n setExplicitBufferingTime(e.request.startTime + (e.request.duration / 2));\n _onMediaFragmentNeeded({}, false);\n }\n }\n\n /**\n * Callback function triggered by the TextController whenever a track is changed for fragmented text. Will only be triggered if textracks have previously been disabled.\n * @private\n */\n function _onSetFragmentedTextAfterDisabled() {\n setExplicitBufferingTime(playbackController.getTime());\n getScheduleController().startScheduleTimer();\n }\n\n /**\n * Callback function triggered by the TextController whenever a track is changed for non fragmented text\n * @param {object} e\n * @private\n */\n function _onSetNonFragmentedText(e) {\n const currentTrackInfo = e.currentTrackInfo;\n\n if (!currentTrackInfo) {\n return;\n }\n\n const mInfo = mediaInfoArr.find((info) => {\n return info.index === currentTrackInfo.index && info.lang === currentTrackInfo.lang;\n });\n\n if (mInfo) {\n selectMediaInfo(mInfo)\n .then(() => {\n bufferController.setIsBufferingCompleted(false);\n setExplicitBufferingTime(playbackController.getTime());\n scheduleController.setInitSegmentRequired(true);\n scheduleController.startScheduleTimer();\n });\n }\n }\n\n function _onQuotaExceeded(e) {\n // Stop scheduler (will be restarted once buffer is pruned)\n setExplicitBufferingTime(e.quotaExceededTime);\n scheduleController.clearScheduleTimer();\n }\n\n function getRepresentationController() {\n return representationController;\n }\n\n function getBuffer() {\n return bufferController ? bufferController.getBuffer() : null;\n }\n\n function getBufferController() {\n return bufferController;\n }\n\n function getFragmentModel() {\n return fragmentModel;\n }\n\n function updateStreamInfo(newStreamInfo) {\n streamInfo = newStreamInfo;\n if (!isBufferingCompleted()) {\n return bufferController.updateAppendWindow();\n }\n return Promise.resolve();\n }\n\n function getStreamInfo() {\n return streamInfo;\n }\n\n /**\n * Called once the StreamProcessor is initialized and when the track is switched. We only have one StreamProcessor per media type. So we need to adjust the mediaInfo once we switch/select a track.\n * @param {object} newMediaInfo\n */\n function selectMediaInfo(newMediaInfo) {\n if (newMediaInfo !== mediaInfo && (!newMediaInfo || !mediaInfo || (newMediaInfo.type === mediaInfo.type))) {\n mediaInfo = newMediaInfo;\n }\n\n const newRealAdaptation = adapter.getRealAdaptation(streamInfo, mediaInfo);\n const voRepresentations = adapter.getVoRepresentations(mediaInfo);\n\n if (representationController) {\n const realAdaptation = representationController.getData();\n const maxQuality = abrController.getMaxAllowedIndexFor(type, streamInfo.id);\n const minIdx = abrController.getMinAllowedIndexFor(type, streamInfo.id);\n\n let quality,\n averageThroughput;\n let bitrate = null;\n\n if ((realAdaptation === null || (realAdaptation.id !== newRealAdaptation.id)) && type !== Constants.TEXT) {\n averageThroughput = abrController.getThroughputHistory().getAverageThroughput(type, isDynamic);\n bitrate = averageThroughput || abrController.getInitialBitrateFor(type, streamInfo.id);\n quality = abrController.getQualityForBitrate(mediaInfo, bitrate, streamInfo.id);\n } else {\n quality = abrController.getQualityFor(type, streamInfo.id);\n }\n\n if (minIdx !== undefined && quality < minIdx) {\n quality = minIdx;\n }\n if (quality > maxQuality) {\n quality = maxQuality;\n }\n return representationController.updateData(newRealAdaptation, voRepresentations, type, mediaInfo.isFragmented, quality);\n } else {\n return Promise.resolve();\n }\n }\n\n function addMediaInfo(newMediaInfo) {\n if (mediaInfoArr.indexOf(newMediaInfo) === -1) {\n mediaInfoArr.push(newMediaInfo);\n }\n }\n\n function clearMediaInfoArray() {\n mediaInfoArr = [];\n }\n\n function getMediaInfo() {\n return mediaInfo;\n }\n\n function getMediaSource() {\n return bufferController.getMediaSource();\n }\n\n function setMediaSource(mediaSource) {\n bufferController.setMediaSource(mediaSource);\n }\n\n function getScheduleController() {\n return scheduleController;\n }\n\n /**\n * Get a specific voRepresentation. If quality parameter is defined, this function will return the voRepresentation for this quality.\n * Otherwise, this function will return the current voRepresentation used by the representationController.\n * @param {number} quality - quality index of the voRepresentaion expected.\n */\n function getRepresentationInfo(quality) {\n let voRepresentation;\n\n if (quality !== undefined) {\n checkInteger(quality);\n voRepresentation = representationController ? representationController.getRepresentationForQuality(quality) : null;\n } else {\n voRepresentation = representationController ? representationController.getCurrentRepresentation() : null;\n }\n\n return adapter.convertRepresentationToRepresentationInfo(voRepresentation);\n }\n\n function isBufferingCompleted() {\n return bufferController ? bufferController.getIsBufferingCompleted() : false;\n }\n\n function getBufferLevel() {\n return bufferController ? bufferController.getBufferLevel() : 0;\n }\n\n /**\n * Probe the next request. This is used in the CMCD model to get information about the upcoming request. Note: No actual request is performed here.\n * @return {FragmentRequest|null}\n */\n function probeNextRequest() {\n const representationInfo = getRepresentationInfo();\n\n const representation = representationController && representationInfo ?\n representationController.getRepresentationForQuality(representationInfo.quality) : null;\n\n let request = dashHandler.getNextSegmentRequestIdempotent(\n mediaInfo,\n representation\n );\n\n return request;\n }\n\n function _onMediaFragmentLoaded(e) {\n const chunk = e.chunk;\n\n const bytes = chunk.bytes;\n const quality = chunk.quality;\n const currentRepresentation = getRepresentationInfo(quality);\n const voRepresentation = representationController && currentRepresentation ? representationController.getRepresentationForQuality(currentRepresentation.quality) : null;\n\n // If we switch tracks this event might be fired after the representations in the RepresentationController have been updated according to the new MediaInfo.\n // In this case there will be no currentRepresentation and voRepresentation matching the \"old\" quality\n if (currentRepresentation && voRepresentation) {\n const eventStreamMedia = adapter.getEventsFor(currentRepresentation.mediaInfo);\n const eventStreamTrack = adapter.getEventsFor(currentRepresentation, voRepresentation);\n\n if (eventStreamMedia && eventStreamMedia.length > 0 || eventStreamTrack && eventStreamTrack.length > 0) {\n const request = fragmentModel.getRequests({\n state: FragmentModel.FRAGMENT_MODEL_EXECUTED,\n quality: quality,\n index: chunk.index\n })[0];\n\n const events = _handleInbandEvents(bytes, request, eventStreamMedia, eventStreamTrack);\n eventBus.trigger(Events.INBAND_EVENTS,\n { events: events },\n { streamId: streamInfo.id }\n );\n }\n }\n }\n\n function _handleInbandEvents(data, request, mediaInbandEvents, trackInbandEvents) {\n try {\n const eventStreams = {};\n const events = [];\n\n /* Extract the possible schemeIdUri : If a DASH client detects an event message box with a scheme that is not defined in MPD, the client is expected to ignore it */\n const inbandEvents = mediaInbandEvents.concat(trackInbandEvents);\n for (let i = 0, ln = inbandEvents.length; i < ln; i++) {\n eventStreams[inbandEvents[i].schemeIdUri + '/' + inbandEvents[i].value] = inbandEvents[i];\n }\n\n const isoFile = BoxParser(context).getInstance().parse(data);\n const eventBoxes = isoFile.getBoxes('emsg');\n\n if (!eventBoxes || eventBoxes.length === 0) {\n return events;\n }\n\n const sidx = isoFile.getBox('sidx');\n const mediaAnchorTime = sidx && !isNaN(sidx.earliest_presentation_time) && !isNaN(sidx.timescale) ? sidx.earliest_presentation_time / sidx.timescale : request && !isNaN(request.mediaStartTime) ? request.mediaStartTime : 0;\n const fragmentMediaStartTime = Math.max(mediaAnchorTime, 0);\n const voRepresentation = representationController.getCurrentRepresentation();\n\n for (let i = 0, ln = eventBoxes.length; i < ln; i++) {\n const event = adapter.getEvent(eventBoxes[i], eventStreams, fragmentMediaStartTime, voRepresentation);\n\n if (event) {\n events.push(event);\n }\n }\n\n return events;\n } catch (e) {\n return [];\n }\n }\n\n function createBufferSinks(previousBufferSinks) {\n const buffer = getBuffer();\n\n if (buffer) {\n return Promise.resolve(buffer);\n }\n\n return bufferController ? bufferController.createBufferSink(mediaInfo, previousBufferSinks) : Promise.resolve(null);\n }\n\n function prepareTrackSwitch() {\n return new Promise((resolve) => {\n logger.debug(`Preparing track switch for type ${type}`);\n const shouldReplace = type === Constants.TEXT || (settings.get().streaming.trackSwitchMode[type] === Constants.TRACK_SWITCH_MODE_ALWAYS_REPLACE && playbackController.getTimeToStreamEnd(streamInfo) > settings.get().streaming.buffer.stallThreshold);\n\n // when buffering is completed and we are not supposed to replace anything do nothing.\n // Still we need to trigger preloading again and call change type in case user seeks back before transitioning to next period\n if (bufferController.getIsBufferingCompleted() && !shouldReplace) {\n bufferController.prepareForNonReplacementTrackSwitch(mediaInfo.codec)\n .then(() => {\n eventBus.trigger(Events.BUFFERING_COMPLETED, {}, { streamId: streamInfo.id, mediaType: type })\n })\n .catch(() => {\n eventBus.trigger(Events.BUFFERING_COMPLETED, {}, { streamId: streamInfo.id, mediaType: type })\n })\n resolve();\n return;\n }\n\n // We stop the schedule controller and signal a track switch. That way we request a new init segment next\n scheduleController.clearScheduleTimer();\n scheduleController.setSwitchTrack(true);\n\n // when we are supposed to replace it does not matter if buffering is already completed\n if (shouldReplace) {\n // Inform other classes like the GapController that we are replacing existing stuff\n eventBus.trigger(Events.BUFFER_REPLACEMENT_STARTED, {\n mediaType: type,\n streamId: streamInfo.id\n }, { mediaType: type, streamId: streamInfo.id });\n\n // Abort the current request it will be removed from the buffer anyways\n fragmentModel.abortRequests();\n\n // Abort appending segments to the buffer. Also adjust the appendWindow as we might have been in the progress of prebuffering stuff.\n bufferController.prepareForReplacementTrackSwitch(mediaInfo.codec)\n .then(() => {\n // Timestamp offset couldve been changed by preloading period\n const representationInfo = getRepresentationInfo();\n return bufferController.updateBufferTimestampOffset(representationInfo);\n })\n .then(() => {\n _bufferClearedForReplacement();\n resolve();\n })\n .catch(() => {\n _bufferClearedForReplacement();\n resolve();\n });\n } else {\n // We do not replace anything that is already in the buffer. Still we need to prepare the buffer for the track switch\n bufferController.prepareForNonReplacementTrackSwitch(mediaInfo.codec)\n .then(() => {\n _bufferClearedForNonReplacement();\n resolve();\n })\n .catch(() => {\n _bufferClearedForNonReplacement();\n resolve();\n });\n }\n })\n\n }\n\n /**\n * For an instant track switch we need to adjust the buffering time after the buffer has been pruned.\n * @private\n */\n function _bufferClearedForReplacement() {\n const targetTime = playbackController.getTime();\n\n if (settings.get().streaming.buffer.flushBufferAtTrackSwitch) {\n // For some devices (like chromecast) it is necessary to seek the video element to reset the internal decoding buffer,\n // otherwise audio track switch will be effective only once after previous buffered track is consumed\n playbackController.seek(targetTime + 0.001, false, true);\n }\n\n setExplicitBufferingTime(targetTime);\n bufferController.setSeekTarget(targetTime);\n scheduleController.startScheduleTimer();\n }\n\n function _bufferClearedForNonReplacement() {\n const time = playbackController.getTime();\n const continuousBufferTime = bufferController.getContinuousBufferTimeForTargetTime(time);\n const targetTime = isNaN(continuousBufferTime) ? time : continuousBufferTime;\n\n setExplicitBufferingTime(targetTime);\n scheduleController.startScheduleTimer();\n }\n\n\n function _createBufferControllerForType(type, isFragmented) {\n let controller = null;\n\n if (!type) {\n errHandler.error(new DashJSError(Errors.MEDIASOURCE_TYPE_UNSUPPORTED_CODE, Errors.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE + 'not properly defined'));\n return null;\n }\n\n if (type === Constants.TEXT && !isFragmented) {\n controller = NotFragmentedTextBufferController(context).create({\n streamInfo,\n type,\n mimeType,\n fragmentModel,\n textController,\n errHandler,\n settings\n });\n } else {\n controller = BufferController(context).create({\n streamInfo,\n type,\n mediaPlayerModel,\n manifestModel,\n fragmentModel,\n errHandler,\n mediaController,\n representationController,\n adapter,\n textController,\n abrController,\n playbackController,\n settings\n });\n }\n\n return controller;\n }\n\n function _onSeekTarget(e) {\n if (e && !isNaN(e.time)) {\n setExplicitBufferingTime(e.time);\n bufferController.setSeekTarget(e.time);\n }\n }\n\n function setExplicitBufferingTime(value) {\n bufferingTime = value;\n shouldUseExplicitTimeForRequest = true;\n }\n\n function finalisePlayList(time, reason) {\n dashMetrics.pushPlayListTraceMetrics(time, reason);\n }\n\n instance = {\n initialize,\n getStreamId,\n getType,\n isUpdating,\n getBufferController,\n getFragmentModel,\n getScheduleController,\n getRepresentationController,\n getRepresentationInfo,\n getBufferLevel,\n isBufferingCompleted,\n createBufferSinks,\n updateStreamInfo,\n getStreamInfo,\n selectMediaInfo,\n clearMediaInfoArray,\n addMediaInfo,\n prepareTrackSwitch,\n prepareQualityChange,\n getMediaInfo,\n getMediaSource,\n setMediaSource,\n getBuffer,\n setExplicitBufferingTime,\n finalisePlayList,\n probeNextRequest,\n prepareInnerPeriodPlaybackSeeking,\n prepareOuterPeriodPlaybackSeeking,\n reset\n };\n\n setup();\n\n return instance;\n}\n\nStreamProcessor.__dashjs_factory_name = 'StreamProcessor';\nexport default FactoryMaker.getClassFactory(StreamProcessor);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport Constants from '../constants/Constants';\nimport DataChunk from '../vo/DataChunk';\nimport FragmentModel from '../models/FragmentModel';\nimport FragmentLoader from '../FragmentLoader';\nimport RequestModifier from '../utils/RequestModifier';\nimport EventBus from '../../core/EventBus';\nimport Events from '../../core/events/Events';\nimport MediaPlayerEvents from '../MediaPlayerEvents';\nimport Errors from '../../core/errors/Errors';\nimport FactoryMaker from '../../core/FactoryMaker';\nimport Debug from '../../core/Debug';\n\nfunction FragmentController(config) {\n\n config = config || {};\n const context = this.context;\n const eventBus = EventBus(context).getInstance();\n\n const errHandler = config.errHandler;\n const mediaPlayerModel = config.mediaPlayerModel;\n const dashMetrics = config.dashMetrics;\n const debug = Debug(context).getInstance();\n const streamInfo = config.streamInfo;\n\n let instance,\n logger,\n fragmentModels;\n\n function setup() {\n logger = debug.getLogger(instance);\n resetInitialSettings();\n eventBus.on(MediaPlayerEvents.FRAGMENT_LOADING_COMPLETED, onFragmentLoadingCompleted, instance);\n eventBus.on(MediaPlayerEvents.FRAGMENT_LOADING_PROGRESS, onFragmentLoadingCompleted, instance);\n }\n\n function getStreamId() {\n return streamInfo.id;\n }\n\n function getModel(type) {\n let model = fragmentModels[type];\n if (!model) {\n model = FragmentModel(context).create({\n streamInfo: streamInfo,\n type: type,\n dashMetrics: dashMetrics,\n fragmentLoader: FragmentLoader(context).create({\n dashMetrics: dashMetrics,\n mediaPlayerModel: mediaPlayerModel,\n errHandler: errHandler,\n requestModifier: RequestModifier(context).getInstance(),\n settings: config.settings,\n boxParser: config.boxParser,\n eventBus: eventBus,\n events: Events,\n errors: Errors,\n dashConstants: config.dashConstants,\n urlUtils: config.urlUtils,\n streamId: getStreamId()\n }),\n debug: debug,\n eventBus: eventBus,\n events: Events\n });\n\n fragmentModels[type] = model;\n }\n\n return model;\n }\n\n function resetInitialSettings() {\n for (let model in fragmentModels) {\n fragmentModels[model].reset();\n }\n fragmentModels = {};\n }\n\n function reset() {\n eventBus.off(MediaPlayerEvents.FRAGMENT_LOADING_COMPLETED, onFragmentLoadingCompleted, this);\n eventBus.off(MediaPlayerEvents.FRAGMENT_LOADING_PROGRESS, onFragmentLoadingCompleted, this);\n resetInitialSettings();\n }\n\n function createDataChunk(bytes, request, streamId, endFragment) {\n const chunk = new DataChunk();\n\n chunk.streamId = streamId;\n chunk.mediaInfo = request.mediaInfo;\n chunk.segmentType = request.type;\n chunk.start = request.startTime;\n chunk.duration = request.duration;\n chunk.end = chunk.start + chunk.duration;\n chunk.bytes = bytes;\n chunk.index = request.index;\n chunk.quality = request.quality;\n chunk.representationId = request.representationId;\n chunk.endFragment = endFragment;\n\n return chunk;\n }\n\n function onFragmentLoadingCompleted(e) {\n // Event propagation may have been stopped (see MssHandler)\n if (!e.sender) return;\n\n const request = e.request;\n const bytes = e.response;\n const isInit = request.isInitializationRequest();\n const strInfo = request.mediaInfo.streamInfo;\n\n if (e.error) {\n if (request.mediaType === Constants.AUDIO || request.mediaType === Constants.VIDEO || (request.mediaType === Constants.TEXT && request.mediaInfo.isFragmented)) {\n // add service location to blacklist controller - only for audio or video. text should not set errors\n eventBus.trigger(Events.SERVICE_LOCATION_BLACKLIST_ADD, { entry: e.request.serviceLocation });\n }\n }\n\n if (!bytes || !strInfo) {\n logger.warn('No ' + request.mediaType + ' bytes to push or stream is inactive.');\n return;\n }\n const chunk = createDataChunk(bytes, request, streamInfo.id, e.type !== Events.FRAGMENT_LOADING_PROGRESS);\n eventBus.trigger(isInit ? Events.INIT_FRAGMENT_LOADED : Events.MEDIA_FRAGMENT_LOADED,\n {\n chunk: chunk,\n request: request\n },\n { streamId: strInfo.id, mediaType: request.mediaType }\n );\n }\n\n instance = {\n getStreamId: getStreamId,\n getModel: getModel,\n reset: reset\n };\n\n setup();\n\n return instance;\n}\n\nFragmentController.__dashjs_factory_name = 'FragmentController';\nexport default FactoryMaker.getClassFactory(FragmentController);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\nclass Thumbnail {\n constructor() {\n this.url = null;\n this.width = null;\n this.height = null;\n this.x = null;\n this.y = null;\n }\n}\n\nexport default Thumbnail;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\nclass BitrateInfo {\n constructor() {\n this.mediaType = null;\n this.bitrate = null;\n this.width = null;\n this.height = null;\n this.scanType = null;\n this.qualityIndex = NaN;\n }\n}\n\nexport default BitrateInfo;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport FactoryMaker from '../../core/FactoryMaker';\nimport Constants from '../constants/Constants';\nimport Thumbnail from '../vo/Thumbnail';\nimport ThumbnailTracks from './ThumbnailTracks';\nimport BitrateInfo from '../vo/BitrateInfo';\nimport {replaceTokenForTemplate, unescapeDollarsInTemplate} from '../../dash/utils/SegmentsUtils';\n\nfunction ThumbnailController(config) {\n\n const context = this.context;\n const streamInfo = config.streamInfo;\n\n let instance,\n thumbnailTracks;\n\n function setup() {\n reset();\n thumbnailTracks = ThumbnailTracks(context).create({\n streamInfo: streamInfo,\n adapter: config.adapter,\n baseURLController: config.baseURLController,\n timelineConverter: config.timelineConverter,\n debug: config.debug,\n eventBus: config.eventBus,\n events: config.events,\n dashConstants: config.dashConstants,\n dashMetrics: config.dashMetrics,\n segmentBaseController: config.segmentBaseController\n });\n }\n\n function initialize() {\n thumbnailTracks.addTracks();\n const tracks = thumbnailTracks.getTracks();\n\n if (tracks && tracks.length > 0) {\n setTrackByIndex(0);\n }\n }\n\n function getStreamId() {\n return streamInfo.id;\n }\n\n function provide(time, callback) {\n\n if (typeof callback !== 'function') {\n return;\n }\n const track = thumbnailTracks.getCurrentTrack();\n let offset,\n request;\n if (!track || track.segmentDuration <= 0 || time === undefined || time === null) {\n callback(null);\n return;\n }\n\n request = thumbnailTracks.getThumbnailRequestForTime(time);\n if (request) {\n track.segmentDuration = request.duration;\n }\n\n offset = time % track.segmentDuration;\n\n const thumbIndex = Math.floor((offset * track.tilesHor * track.tilesVert) / track.segmentDuration);\n // Create and return the thumbnail\n const thumbnail = new Thumbnail();\n\n thumbnail.width = Math.floor(track.widthPerTile);\n thumbnail.height = Math.floor(track.heightPerTile);\n thumbnail.x = Math.floor(thumbIndex % track.tilesHor) * track.widthPerTile;\n thumbnail.y = Math.floor(thumbIndex / track.tilesHor) * track.heightPerTile;\n\n if ('readThumbnail' in track) {\n return track.readThumbnail(time, (url) => {\n thumbnail.url = url;\n callback(thumbnail);\n });\n } else {\n if (!request) {\n const seq = Math.floor(time / track.segmentDuration);\n thumbnail.url = _buildUrlFromTemplate(track, seq);\n } else {\n thumbnail.url = request.url;\n track.segmentDuration = NaN;\n }\n callback(thumbnail);\n }\n }\n\n function _buildUrlFromTemplate(track, seq) {\n const seqIdx = seq + track.startNumber;\n let url = replaceTokenForTemplate(track.templateUrl, 'Number', seqIdx);\n url = replaceTokenForTemplate(url, 'Time', (seqIdx - 1) * track.segmentDuration * track.timescale);\n url = replaceTokenForTemplate(url, 'Bandwidth', track.bandwidth);\n return unescapeDollarsInTemplate(url);\n }\n\n function setTrackByIndex(index) {\n thumbnailTracks.setTrackByIndex(index);\n }\n\n function getCurrentTrackIndex() {\n return thumbnailTracks.getCurrentTrackIndex();\n }\n\n function getBitrateList() {\n const tracks = thumbnailTracks.getTracks();\n let i = 0;\n\n return tracks.map((t) => {\n const bitrateInfo = new BitrateInfo();\n bitrateInfo.mediaType = Constants.IMAGE;\n bitrateInfo.qualityIndex = i++;\n bitrateInfo.bitrate = t.bitrate;\n bitrateInfo.width = t.width;\n bitrateInfo.height = t.height;\n return bitrateInfo;\n });\n }\n\n function reset() {\n if (thumbnailTracks) {\n thumbnailTracks.reset();\n }\n }\n\n instance = {\n getStreamId,\n initialize,\n provide,\n setTrackByIndex,\n getCurrentTrackIndex,\n getBitrateList,\n reset\n };\n\n setup();\n\n return instance;\n}\n\nThumbnailController.__dashjs_factory_name = 'ThumbnailController';\nexport default FactoryMaker.getClassFactory(ThumbnailController);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport FactoryMaker from '../../core/FactoryMaker';\nimport EventBus from '../../core/EventBus';\n\nfunction BlackListController(config) {\n\n config = config || {};\n let instance;\n let blacklist = [];\n\n const eventBus = EventBus(this.context).getInstance();\n const updateEventName = config.updateEventName;\n const addBlacklistEventName = config.addBlacklistEventName;\n\n function contains(query) {\n if (!blacklist.length || !query || !query.length) {\n return false;\n }\n\n return (blacklist.indexOf(query) !== -1);\n }\n\n function add(entry) {\n if (blacklist.indexOf(entry) !== -1) {\n return;\n }\n\n blacklist.push(entry);\n\n eventBus.trigger(updateEventName, { entry: entry });\n }\n\n function onAddBlackList(e) {\n add(e.entry);\n }\n\n function setup() {\n if (addBlacklistEventName) {\n eventBus.on(addBlacklistEventName, onAddBlackList, instance);\n }\n }\n\n function reset() {\n blacklist = [];\n }\n\n instance = {\n add: add,\n contains: contains,\n reset: reset\n };\n\n setup();\n return instance;\n}\n\nBlackListController.__dashjs_factory_name = 'BlackListController';\nexport default FactoryMaker.getClassFactory(BlackListController);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport Constants from './constants/Constants';\nimport DashConstants from '../dash/constants/DashConstants';\nimport StreamProcessor from './StreamProcessor';\nimport FragmentController from './controllers/FragmentController';\nimport ThumbnailController from './thumbnail/ThumbnailController';\nimport EventBus from '../core/EventBus';\nimport Events from '../core/events/Events';\nimport Debug from '../core/Debug';\nimport Errors from '../core/errors/Errors';\nimport FactoryMaker from '../core/FactoryMaker';\nimport DashJSError from './vo/DashJSError';\nimport BoxParser from './utils/BoxParser';\nimport URLUtils from './utils/URLUtils';\nimport BlacklistController from './controllers/BlacklistController';\n\n\nconst MEDIA_TYPES = [Constants.VIDEO, Constants.AUDIO, Constants.TEXT, Constants.MUXED, Constants.IMAGE];\n\n\nfunction Stream(config) {\n\n config = config || {};\n const context = this.context;\n const eventBus = EventBus(context).getInstance();\n const urlUtils = URLUtils(context).getInstance();\n\n const manifestModel = config.manifestModel;\n const mediaPlayerModel = config.mediaPlayerModel;\n const dashMetrics = config.dashMetrics;\n const manifestUpdater = config.manifestUpdater;\n const adapter = config.adapter;\n const timelineConverter = config.timelineConverter;\n const capabilities = config.capabilities;\n const errHandler = config.errHandler;\n const abrController = config.abrController;\n const playbackController = config.playbackController;\n const eventController = config.eventController;\n const mediaController = config.mediaController;\n const protectionController = config.protectionController;\n const textController = config.textController;\n const videoModel = config.videoModel;\n let streamInfo = config.streamInfo;\n const settings = config.settings;\n\n\n let instance,\n logger,\n streamProcessors,\n isInitialized,\n isActive,\n hasFinishedBuffering,\n hasVideoTrack,\n hasAudioTrack,\n updateError,\n isUpdating,\n fragmentController,\n thumbnailController,\n segmentBlacklistController,\n preloaded,\n boxParser,\n debug,\n isEndedEventSignaled,\n trackChangedEvents;\n\n /**\n * Setup the stream\n */\n function setup() {\n try {\n debug = Debug(context).getInstance();\n logger = debug.getLogger(instance);\n resetInitialSettings();\n\n boxParser = BoxParser(context).getInstance();\n\n segmentBlacklistController = BlacklistController(context).create({\n updateEventName: Events.SEGMENT_LOCATION_BLACKLIST_CHANGED,\n addBlacklistEventName: Events.SEGMENT_LOCATION_BLACKLIST_ADD\n });\n\n fragmentController = FragmentController(context).create({\n streamInfo: streamInfo,\n mediaPlayerModel: mediaPlayerModel,\n dashMetrics: dashMetrics,\n errHandler: errHandler,\n settings: settings,\n boxParser: boxParser,\n dashConstants: DashConstants,\n urlUtils: urlUtils\n });\n\n } catch (e) {\n throw e;\n }\n }\n\n /**\n * Initialize the events\n */\n function initialize() {\n registerEvents();\n registerProtectionEvents();\n textController.initializeForStream(streamInfo);\n eventBus.trigger(Events.STREAM_UPDATED, { streamInfo: streamInfo });\n }\n\n /**\n * Register the streaming events\n */\n function registerEvents() {\n eventBus.on(Events.BUFFERING_COMPLETED, onBufferingCompleted, instance);\n eventBus.on(Events.DATA_UPDATE_COMPLETED, onDataUpdateCompleted, instance);\n eventBus.on(Events.INBAND_EVENTS, onInbandEvents, instance);\n }\n\n /**\n * Unregister the streaming events\n */\n function unRegisterEvents() {\n eventBus.off(Events.DATA_UPDATE_COMPLETED, onDataUpdateCompleted, instance);\n eventBus.off(Events.BUFFERING_COMPLETED, onBufferingCompleted, instance);\n eventBus.off(Events.INBAND_EVENTS, onInbandEvents, instance);\n }\n\n /**\n * Register the protection events\n */\n function registerProtectionEvents() {\n if (protectionController) {\n eventBus.on(Events.KEY_ERROR, onProtectionError, instance);\n eventBus.on(Events.SERVER_CERTIFICATE_UPDATED, onProtectionError, instance);\n eventBus.on(Events.LICENSE_REQUEST_COMPLETE, onProtectionError, instance);\n eventBus.on(Events.KEY_SYSTEM_SELECTED, onProtectionError, instance);\n eventBus.on(Events.KEY_SESSION_CREATED, onProtectionError, instance);\n eventBus.on(Events.KEY_STATUSES_CHANGED, onProtectionError, instance);\n }\n }\n\n /**\n * Unregister the protection events\n */\n function unRegisterProtectionEvents() {\n if (protectionController) {\n eventBus.off(Events.KEY_ERROR, onProtectionError, instance);\n eventBus.off(Events.SERVER_CERTIFICATE_UPDATED, onProtectionError, instance);\n eventBus.off(Events.LICENSE_REQUEST_COMPLETE, onProtectionError, instance);\n eventBus.off(Events.KEY_SYSTEM_SELECTED, onProtectionError, instance);\n eventBus.off(Events.KEY_SESSION_CREATED, onProtectionError, instance);\n eventBus.off(Events.KEY_STATUSES_CHANGED, onProtectionError, instance);\n }\n }\n\n /**\n * Returns the stream id\n * @return {*|null}\n */\n function getStreamId() {\n return streamInfo ? streamInfo.id : null;\n }\n\n /**\n * Activates Stream by re-initializing some of its components\n * @param {MediaSource} mediaSource\n * @param {array} previousBufferSinks\n * @memberof Stream#\n */\n function activate(mediaSource, previousBufferSinks) {\n return new Promise((resolve, reject) => {\n if (isActive) {\n resolve(previousBufferSinks);\n return;\n }\n\n if (getPreloaded()) {\n isActive = true;\n eventBus.trigger(Events.STREAM_ACTIVATED, {\n streamInfo\n });\n resolve(previousBufferSinks);\n return;\n }\n\n\n _initializeMedia(mediaSource, previousBufferSinks)\n .then((bufferSinks) => {\n isActive = true;\n eventBus.trigger(Events.STREAM_ACTIVATED, {\n streamInfo\n });\n resolve(bufferSinks);\n })\n .catch((e) => {\n reject(e);\n });\n });\n }\n\n /**\n *\n * @param {object} mediaSource\n * @param {array} previousBufferSinks\n * @return {Promise}\n * @private\n */\n function _initializeMedia(mediaSource, previousBufferSinks) {\n return _commonMediaInitialization(mediaSource, previousBufferSinks);\n }\n\n function startPreloading(mediaSource, previousBuffers) {\n return new Promise((resolve, reject) => {\n\n if (getPreloaded()) {\n reject();\n return;\n }\n\n logger.info(`[startPreloading] Preloading next stream with id ${getId()}`);\n setPreloaded(true);\n\n _commonMediaInitialization(mediaSource, previousBuffers)\n .then(() => {\n for (let i = 0; i < streamProcessors.length && streamProcessors[i]; i++) {\n streamProcessors[i].setExplicitBufferingTime(getStartTime());\n streamProcessors[i].getScheduleController().startScheduleTimer();\n }\n resolve();\n })\n .catch(() => {\n setPreloaded(false);\n reject();\n });\n });\n }\n\n /**\n *\n * @param {object} mediaSource\n * @param {array} previousBufferSinks\n * @return {Promise}\n * @private\n */\n function _commonMediaInitialization(mediaSource, previousBufferSinks) {\n return new Promise((resolve, reject) => {\n checkConfig();\n\n isUpdating = true;\n addInlineEvents();\n\n\n let element = videoModel.getElement();\n\n MEDIA_TYPES.forEach((mediaType) => {\n if (mediaType !== Constants.VIDEO || (!element || (element && (/^VIDEO$/i).test(element.nodeName)))) {\n _initializeMediaForType(mediaType, mediaSource);\n }\n });\n\n _createBufferSinks(previousBufferSinks)\n .then((bufferSinks) => {\n isUpdating = false;\n\n if (streamProcessors.length === 0) {\n const msg = 'No streams to play.';\n errHandler.error(new DashJSError(Errors.MANIFEST_ERROR_ID_NOSTREAMS_CODE, msg, manifestModel.getValue()));\n logger.fatal(msg);\n } else {\n _checkIfInitializationCompleted();\n }\n\n // All mediaInfos for texttracks are added to the TextSourceBuffer by now. We can start creating the tracks\n textController.createTracks(streamInfo);\n\n resolve(bufferSinks);\n })\n .catch((e) => {\n reject(e);\n });\n });\n\n }\n\n\n /**\n * Initialize for a given media type. Creates a corresponding StreamProcessor\n * @param {string} type\n * @param {object} mediaSource\n * @private\n */\n function _initializeMediaForType(type, mediaSource) {\n let allMediaForType = adapter.getAllMediaInfoForType(streamInfo, type);\n let embeddedMediaInfos = [];\n\n let mediaInfo = null;\n let initialMediaInfo;\n\n if (!allMediaForType || allMediaForType.length === 0) {\n logger.info('No ' + type + ' data.');\n return;\n }\n\n if (type === Constants.VIDEO) {\n hasVideoTrack = true;\n }\n\n if (type === Constants.AUDIO) {\n hasAudioTrack = true;\n }\n\n for (let i = 0, ln = allMediaForType.length; i < ln; i++) {\n mediaInfo = allMediaForType[i];\n\n if (type === Constants.TEXT && !!mediaInfo.isEmbedded) {\n textController.addEmbeddedTrack(streamInfo, mediaInfo);\n embeddedMediaInfos.push(mediaInfo);\n }\n if (_isMediaSupported(mediaInfo)) {\n mediaController.addTrack(mediaInfo);\n }\n }\n\n if (embeddedMediaInfos.length > 0) {\n mediaController.setInitialMediaSettingsForType(type, streamInfo);\n textController.setInitialSettings(mediaController.getInitialSettings(type));\n textController.addMediaInfosToBuffer(streamInfo, type, embeddedMediaInfos);\n }\n\n // Filter out embedded text track before creating StreamProcessor\n allMediaForType = allMediaForType.filter(mediaInfo => {\n return !mediaInfo.isEmbedded;\n });\n if (allMediaForType.length === 0) {\n return;\n }\n\n if (type === Constants.IMAGE) {\n thumbnailController = ThumbnailController(context).create({\n streamInfo: streamInfo,\n adapter: adapter,\n baseURLController: config.baseURLController,\n timelineConverter: config.timelineConverter,\n debug: debug,\n eventBus: eventBus,\n events: Events,\n dashConstants: DashConstants,\n dashMetrics: config.dashMetrics,\n segmentBaseController: config.segmentBaseController\n });\n thumbnailController.initialize();\n return;\n }\n\n eventBus.trigger(Events.STREAM_INITIALIZING, {\n streamInfo: streamInfo,\n mediaInfo: mediaInfo\n });\n\n mediaController.setInitialMediaSettingsForType(type, streamInfo);\n\n let streamProcessor = _createStreamProcessor(allMediaForType, mediaSource);\n\n initialMediaInfo = mediaController.getCurrentTrackFor(type, streamInfo.id);\n\n if (initialMediaInfo) {\n abrController.updateTopQualityIndex(initialMediaInfo);\n // In case of mixed fragmented and embedded text tracks, check if initial selected text track is not an embedded track\n streamProcessor.selectMediaInfo((type !== Constants.TEXT || !initialMediaInfo.isEmbedded) ? initialMediaInfo : allMediaForType[0]);\n }\n\n }\n\n function _isMediaSupported(mediaInfo) {\n const type = mediaInfo ? mediaInfo.type : null;\n let msg;\n\n if (type === Constants.MUXED) {\n msg = 'Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines';\n logger.fatal(msg);\n errHandler.error(new DashJSError(Errors.MANIFEST_ERROR_ID_MULTIPLEXED_CODE, msg, manifestModel.getValue()));\n return false;\n }\n\n if (type === Constants.TEXT || type === Constants.IMAGE) {\n return true;\n }\n\n if (!!mediaInfo.contentProtection && !capabilities.supportsEncryptedMedia()) {\n errHandler.error(new DashJSError(Errors.CAPABILITY_MEDIAKEYS_ERROR_CODE, Errors.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE));\n return false;\n }\n\n return true;\n }\n\n /**\n * Creates the StreamProcessor for a given media type.\n * @param {object} initialMediaInfo\n * @param {array} allMediaForType\n * @param {object} mediaSource\n * @private\n */\n function _createStreamProcessor(allMediaForType, mediaSource) {\n\n const mediaInfo = (allMediaForType && allMediaForType.length > 0) ? allMediaForType[0] : null;\n let fragmentModel = fragmentController.getModel(mediaInfo ? mediaInfo.type : null);\n const type = mediaInfo ? mediaInfo.type : null;\n const mimeType = mediaInfo ? mediaInfo.mimeType : null;\n const isFragmented = mediaInfo ? mediaInfo.isFragmented : null;\n\n let streamProcessor = StreamProcessor(context).create({\n streamInfo,\n type,\n mimeType,\n timelineConverter,\n adapter,\n manifestModel,\n mediaPlayerModel,\n fragmentModel,\n dashMetrics: config.dashMetrics,\n baseURLController: config.baseURLController,\n segmentBaseController: config.segmentBaseController,\n abrController,\n playbackController,\n mediaController,\n textController,\n errHandler,\n settings,\n boxParser,\n segmentBlacklistController\n });\n\n streamProcessor.initialize(mediaSource, hasVideoTrack, isFragmented);\n streamProcessors.push(streamProcessor);\n\n for (let i = 0; i < allMediaForType.length; i++) {\n streamProcessor.addMediaInfo(allMediaForType[i]);\n }\n\n if (type === Constants.TEXT) {\n textController.addMediaInfosToBuffer(streamInfo, type, allMediaForType, fragmentModel);\n }\n\n return streamProcessor;\n }\n\n /**\n * Creates the SourceBufferSink objects for all StreamProcessors\n * @param {array} previousBuffersSinks\n * @return {Promise}\n * @private\n */\n function _createBufferSinks(previousBuffersSinks) {\n return new Promise((resolve) => {\n const buffers = {};\n const promises = streamProcessors.map((sp) => {\n return sp.createBufferSinks(previousBuffersSinks);\n });\n\n Promise.all(promises)\n .then((bufferSinks) => {\n bufferSinks.forEach((sink) => {\n if (sink) {\n buffers[sink.getType()] = sink;\n }\n });\n resolve(buffers);\n })\n .catch(() => {\n resolve(buffers);\n });\n });\n }\n\n /**\n * Partially resets some of the Stream elements. This function is called when preloading of streams is canceled or a stream switch occurs.\n * @memberof Stream#\n * @param {boolean} keepBuffers\n */\n function deactivate(keepBuffers) {\n let ln = streamProcessors ? streamProcessors.length : 0;\n const errored = false;\n for (let i = 0; i < ln; i++) {\n let fragmentModel = streamProcessors[i].getFragmentModel();\n fragmentModel.abortRequests();\n fragmentModel.resetInitialSettings();\n streamProcessors[i].reset(errored, keepBuffers);\n }\n if (textController) {\n textController.deactivateStream(streamInfo);\n }\n streamProcessors = [];\n isActive = false;\n hasFinishedBuffering = false;\n setPreloaded(false);\n setIsEndedEventSignaled(false);\n eventBus.trigger(Events.STREAM_DEACTIVATED, { streamInfo });\n }\n\n function getIsActive() {\n return isActive;\n }\n\n function setMediaSource(mediaSource) {\n for (let i = 0; i < streamProcessors.length;) {\n if (_isMediaSupported(streamProcessors[i].getMediaInfo())) {\n streamProcessors[i].setMediaSource(mediaSource);\n i++;\n } else {\n streamProcessors[i].reset();\n streamProcessors.splice(i, 1);\n }\n }\n\n if (streamProcessors.length === 0) {\n const msg = 'No streams to play.';\n errHandler.error(new DashJSError(Errors.MANIFEST_ERROR_ID_NOSTREAMS_CODE, msg + 'nostreams', manifestModel.getValue()));\n logger.fatal(msg);\n }\n }\n\n function resetInitialSettings(keepBuffers) {\n deactivate(keepBuffers);\n isInitialized = false;\n hasVideoTrack = false;\n hasAudioTrack = false;\n updateError = {};\n isUpdating = false;\n isEndedEventSignaled = false;\n trackChangedEvents = [];\n }\n\n function reset(keepBuffers) {\n\n if (fragmentController) {\n fragmentController.reset();\n fragmentController = null;\n }\n\n if (abrController && streamInfo) {\n abrController.clearDataForStream(streamInfo.id);\n }\n\n if (segmentBlacklistController) {\n segmentBlacklistController.reset();\n segmentBlacklistController = null;\n }\n\n resetInitialSettings(keepBuffers);\n\n streamInfo = null;\n\n unRegisterEvents();\n\n unRegisterProtectionEvents();\n\n }\n\n function getDuration() {\n return streamInfo ? streamInfo.duration : NaN;\n }\n\n function getIsEndedEventSignaled() {\n return isEndedEventSignaled;\n }\n\n function setIsEndedEventSignaled(value) {\n isEndedEventSignaled = value;\n }\n\n function getStartTime() {\n return streamInfo ? streamInfo.start : NaN;\n }\n\n function getId() {\n return streamInfo ? streamInfo.id : null;\n }\n\n function getStreamInfo() {\n return streamInfo;\n }\n\n function getHasAudioTrack() {\n return hasAudioTrack;\n }\n\n function getHasVideoTrack() {\n return hasVideoTrack;\n }\n\n function getThumbnailController() {\n return thumbnailController;\n }\n\n function checkConfig() {\n if (!videoModel || !abrController) {\n throw new Error(Constants.MISSING_CONFIG_ERROR);\n }\n }\n\n /**\n * @param {string} type\n * @returns {Array}\n * @memberof Stream#\n */\n function getBitrateListFor(type) {\n checkConfig();\n if (type === Constants.IMAGE) {\n if (!thumbnailController) {\n return [];\n }\n return thumbnailController.getBitrateList();\n }\n const mediaInfo = getMediaInfo(type);\n return abrController.getBitrateList(mediaInfo);\n }\n\n function onProtectionError(event) {\n if (event.error) {\n errHandler.error(event.error);\n logger.fatal(event.error.message);\n }\n }\n\n function prepareTrackChange(e) {\n if (!isActive || !streamInfo) {\n return;\n }\n\n hasFinishedBuffering = false;\n\n let mediaInfo = e.newMediaInfo;\n let manifest = manifestModel.getValue();\n\n adapter.setCurrentMediaInfo(streamInfo.id, mediaInfo.type, mediaInfo);\n\n let processor = getProcessorForMediaInfo(mediaInfo);\n if (!processor) return;\n\n let currentTime = playbackController.getTime();\n logger.info('Stream - Process track changed at current time ' + currentTime);\n\n // Applies only for MSS streams\n if (manifest.refreshManifestOnSwitchTrack) {\n trackChangedEvents.push(e);\n if (!manifestUpdater.getIsUpdating()) {\n logger.debug('Stream - Refreshing manifest for switch track');\n manifestUpdater.refreshManifest();\n }\n } else {\n processor.selectMediaInfo(mediaInfo)\n .then(() => {\n if (mediaInfo.type === Constants.VIDEO || mediaInfo.type === Constants.AUDIO) {\n abrController.updateTopQualityIndex(mediaInfo);\n }\n processor.prepareTrackSwitch();\n });\n }\n }\n\n function prepareQualityChange(e) {\n const processor = _getProcessorByType(e.mediaType);\n\n if (processor) {\n processor.prepareQualityChange(e);\n }\n }\n\n function addInlineEvents() {\n if (eventController) {\n const events = adapter.getEventsFor(streamInfo);\n eventController.addInlineEvents(events);\n }\n }\n\n function _checkIfInitializationCompleted() {\n const ln = streamProcessors.length;\n const hasError = !!updateError.audio || !!updateError.video;\n let error = hasError ? new DashJSError(Errors.DATA_UPDATE_FAILED_ERROR_CODE, Errors.DATA_UPDATE_FAILED_ERROR_MESSAGE) : null;\n\n for (let i = 0; i < ln; i++) {\n if (streamProcessors[i].isUpdating() || isUpdating) {\n return;\n }\n }\n\n if (protectionController) {\n // Need to check if streamProcessors exists because streamProcessors\n // could be cleared in case an error is detected while initializing DRM keysystem\n protectionController.clearMediaInfoArray();\n for (let i = 0; i < ln && streamProcessors[i]; i++) {\n const type = streamProcessors[i].getType();\n const mediaInfo = streamProcessors[i].getMediaInfo();\n if (type === Constants.AUDIO ||\n type === Constants.VIDEO ||\n (type === Constants.TEXT && mediaInfo.isFragmented)) {\n let mediaInfo = streamProcessors[i].getMediaInfo();\n if (mediaInfo) {\n protectionController.initializeForMedia(mediaInfo);\n }\n }\n }\n }\n\n if (error) {\n errHandler.error(error);\n } else if (!isInitialized) {\n isInitialized = true;\n videoModel.waitForReadyState(Constants.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA, () => {\n eventBus.trigger(Events.STREAM_INITIALIZED, {\n streamInfo: streamInfo\n });\n })\n }\n\n }\n\n function getMediaInfo(type) {\n let streamProcessor = null;\n\n for (let i = 0; i < streamProcessors.length; i++) {\n streamProcessor = streamProcessors[i];\n\n if (streamProcessor.getType() === type) {\n return streamProcessor.getMediaInfo();\n }\n }\n\n return null;\n }\n\n function onBufferingCompleted() {\n let processors = getProcessors();\n const ln = processors.length;\n\n if (ln === 0) {\n logger.warn('onBufferingCompleted - can\\'t trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined');\n return;\n }\n\n // if there is at least one buffer controller that has not completed buffering yet do nothing\n for (let i = 0; i < ln; i++) {\n //if audio or video buffer is not buffering completed state, do not send STREAM_BUFFERING_COMPLETED\n if (!processors[i].isBufferingCompleted() && (processors[i].getType() === Constants.AUDIO || processors[i].getType() === Constants.VIDEO)) {\n logger.debug('onBufferingCompleted - One streamProcessor has finished but', processors[i].getType(), 'one is not buffering completed');\n return;\n }\n }\n\n logger.debug('onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED');\n hasFinishedBuffering = true;\n eventBus.trigger(Events.STREAM_BUFFERING_COMPLETED, { streamInfo: streamInfo }, { streamInfo });\n }\n\n function onDataUpdateCompleted(e) {\n updateError[e.mediaType] = e.error;\n _checkIfInitializationCompleted();\n }\n\n function onInbandEvents(e) {\n if (eventController) {\n eventController.addInbandEvents(e.events);\n }\n }\n\n function getProcessorForMediaInfo(mediaInfo) {\n if (!mediaInfo || !mediaInfo.type) {\n return null;\n }\n\n return _getProcessorByType(mediaInfo.type);\n }\n\n function _getProcessorByType(type) {\n if (!type) {\n return null;\n }\n\n let processors = getProcessors();\n\n return processors.filter(function (processor) {\n return (processor.getType() === type);\n })[0];\n }\n\n function getProcessors() {\n let arr = [];\n\n let type,\n streamProcessor;\n\n for (let i = 0; i < streamProcessors.length; i++) {\n streamProcessor = streamProcessors[i];\n type = streamProcessor.getType();\n\n if (type === Constants.AUDIO || type === Constants.VIDEO || type === Constants.TEXT) {\n arr.push(streamProcessor);\n }\n }\n\n return arr;\n }\n\n function startScheduleControllers() {\n const ln = streamProcessors.length;\n for (let i = 0; i < ln && streamProcessors[i]; i++) {\n streamProcessors[i].getScheduleController().startScheduleTimer();\n }\n }\n\n function updateData(updatedStreamInfo) {\n return new Promise((resolve) => {\n isUpdating = true;\n streamInfo = updatedStreamInfo;\n\n if (eventController) {\n addInlineEvents();\n }\n\n let promises = [];\n for (let i = 0, ln = streamProcessors.length; i < ln; i++) {\n let streamProcessor = streamProcessors[i];\n const currentMediaInfo = streamProcessor.getMediaInfo();\n promises.push(streamProcessor.updateStreamInfo(streamInfo));\n let allMediaForType = adapter.getAllMediaInfoForType(streamInfo, streamProcessor.getType());\n // Check if AdaptationSet has not been removed in MPD update\n if (allMediaForType) {\n // Remove the current mediaInfo objects before adding the updated ones\n streamProcessor.clearMediaInfoArray();\n for (let j = 0; j < allMediaForType.length; j++) {\n const mInfo = allMediaForType[j];\n streamProcessor.addMediaInfo(allMediaForType[j]);\n if (adapter.areMediaInfosEqual(currentMediaInfo, mInfo)) {\n abrController.updateTopQualityIndex(mInfo);\n promises.push(streamProcessor.selectMediaInfo(mInfo))\n }\n }\n }\n }\n\n Promise.all(promises)\n .then(() => {\n promises = [];\n\n while (trackChangedEvents.length > 0) {\n let trackChangedEvent = trackChangedEvents.pop();\n let mediaInfo = trackChangedEvent.newMediaInfo;\n let processor = getProcessorForMediaInfo(trackChangedEvent.oldMediaInfo);\n if (!processor) return;\n promises.push(processor.prepareTrackSwitch());\n processor.selectMediaInfo(mediaInfo);\n }\n\n return Promise.all(promises)\n })\n .then(() => {\n isUpdating = false;\n _checkIfInitializationCompleted();\n eventBus.trigger(Events.STREAM_UPDATED, { streamInfo: streamInfo });\n resolve();\n })\n\n })\n }\n\n function isMediaCodecCompatible(newStream, previousStream = null) {\n return compareCodecs(newStream, Constants.VIDEO, previousStream) && compareCodecs(newStream, Constants.AUDIO, previousStream);\n }\n\n function isProtectionCompatible(newStream) {\n if (!newStream) {\n return true;\n }\n return _compareProtectionConfig(Constants.VIDEO, newStream) && _compareProtectionConfig(Constants.AUDIO, newStream);\n }\n\n function _compareProtectionConfig(type, newStream) {\n const currentStreamInfo = getStreamInfo();\n const newStreamInfo = newStream.getStreamInfo();\n\n if (!newStreamInfo || !currentStreamInfo) {\n return true;\n }\n\n const newAdaptation = adapter.getAdaptationForType(newStreamInfo.index, type, newStreamInfo);\n const currentAdaptation = adapter.getAdaptationForType(currentStreamInfo.index, type, currentStreamInfo);\n\n if (!newAdaptation || !currentAdaptation) {\n // If there is no adaptation for neither the old or the new stream they're compatible\n return !newAdaptation && !currentAdaptation;\n }\n\n // If the current period is unencrypted and the upcoming one is encrypted we need to reset sourcebuffers.\n return !(!_isAdaptationDrmProtected(currentAdaptation) && _isAdaptationDrmProtected(newAdaptation));\n }\n\n function _isAdaptationDrmProtected(adaptation) {\n\n if (!adaptation) {\n // If there is no adaptation for neither the old or the new stream they're compatible\n return false;\n }\n\n // If the current period is unencrypted and the upcoming one is encrypted we need to reset sourcebuffers.\n return !!(adaptation.ContentProtection || (adaptation.Representation && adaptation.Representation.length > 0 && adaptation.Representation[0].ContentProtection));\n }\n\n function compareCodecs(newStream, type, previousStream = null) {\n if (!newStream || !newStream.hasOwnProperty('getStreamInfo')) {\n return false;\n }\n const newStreamInfo = newStream.getStreamInfo();\n const currentStreamInfo = previousStream ? previousStream.getStreamInfo() : getStreamInfo();\n\n if (!newStreamInfo || !currentStreamInfo) {\n return false;\n }\n\n const newAdaptation = adapter.getAdaptationForType(newStreamInfo.index, type, newStreamInfo);\n const currentAdaptation = adapter.getAdaptationForType(currentStreamInfo.index, type, currentStreamInfo);\n\n if (!newAdaptation || !currentAdaptation) {\n // If there is no adaptation for neither the old or the new stream they're compatible\n return !newAdaptation && !currentAdaptation;\n }\n\n const sameMimeType = newAdaptation && currentAdaptation && newAdaptation.mimeType === currentAdaptation.mimeType;\n const oldCodecs = currentAdaptation.Representation_asArray.map((representation) => {\n return representation.codecs;\n });\n\n const newCodecs = newAdaptation.Representation_asArray.map((representation) => {\n return representation.codecs;\n });\n\n const codecMatch = newCodecs.some((newCodec) => {\n return oldCodecs.indexOf(newCodec) > -1;\n });\n\n const partialCodecMatch = newCodecs.some((newCodec) => oldCodecs.some((oldCodec) => capabilities.codecRootCompatibleWithCodec(oldCodec, newCodec)));\n return codecMatch || (partialCodecMatch && sameMimeType);\n }\n\n function setPreloaded(value) {\n preloaded = value;\n }\n\n function getPreloaded() {\n return preloaded;\n }\n\n function getHasFinishedBuffering() {\n return hasFinishedBuffering;\n }\n\n function getAdapter() {\n return adapter;\n }\n\n instance = {\n initialize,\n getStreamId,\n activate,\n deactivate,\n getIsActive,\n getDuration,\n getStartTime,\n getId,\n getStreamInfo,\n getHasAudioTrack,\n getHasVideoTrack,\n startPreloading,\n getThumbnailController,\n getBitrateListFor,\n updateData,\n reset,\n getProcessors,\n setMediaSource,\n isMediaCodecCompatible,\n isProtectionCompatible,\n getPreloaded,\n getIsEndedEventSignaled,\n setIsEndedEventSignaled,\n getAdapter,\n getHasFinishedBuffering,\n setPreloaded,\n startScheduleControllers,\n prepareTrackChange,\n prepareQualityChange\n };\n\n setup();\n return instance;\n}\n\nStream.__dashjs_factory_name = 'Stream';\nexport default FactoryMaker.getClassFactory(Stream);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport EventBus from '../core/EventBus';\nimport Events from '../core/events/Events';\nimport MediaPlayerEvents from '../streaming/MediaPlayerEvents';\nimport FactoryMaker from '../core/FactoryMaker';\nimport Debug from '../core/Debug';\nimport Errors from '../core/errors/Errors';\nimport DashConstants from '../dash/constants/DashConstants';\nimport URLUtils from './utils/URLUtils';\n\nfunction ManifestUpdater() {\n\n const context = this.context;\n const eventBus = EventBus(context).getInstance();\n const urlUtils = URLUtils(context).getInstance();\n\n let instance,\n logger,\n refreshDelay,\n refreshTimer,\n isPaused,\n isStopped,\n isUpdating,\n manifestLoader,\n manifestModel,\n adapter,\n errHandler,\n settings;\n\n function setup() {\n logger = Debug(context).getInstance().getLogger(instance);\n }\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.manifestModel) {\n manifestModel = config.manifestModel;\n }\n if (config.adapter) {\n adapter = config.adapter;\n }\n if (config.manifestLoader) {\n manifestLoader = config.manifestLoader;\n }\n if (config.errHandler) {\n errHandler = config.errHandler;\n }\n if (config.settings) {\n settings = config.settings;\n }\n }\n\n function initialize() {\n resetInitialSettings();\n\n eventBus.on(Events.STREAMS_COMPOSED, onStreamsComposed, this);\n eventBus.on(MediaPlayerEvents.PLAYBACK_STARTED, onPlaybackStarted, this);\n eventBus.on(MediaPlayerEvents.PLAYBACK_PAUSED, onPlaybackPaused, this);\n eventBus.on(Events.INTERNAL_MANIFEST_LOADED, onManifestLoaded, this);\n }\n\n function setManifest(manifest) {\n update(manifest);\n }\n\n function resetInitialSettings() {\n refreshDelay = NaN;\n isUpdating = false;\n isPaused = true;\n isStopped = false;\n stopManifestRefreshTimer();\n }\n\n function reset() {\n\n eventBus.off(MediaPlayerEvents.PLAYBACK_STARTED, onPlaybackStarted, this);\n eventBus.off(MediaPlayerEvents.PLAYBACK_PAUSED, onPlaybackPaused, this);\n eventBus.off(Events.STREAMS_COMPOSED, onStreamsComposed, this);\n eventBus.off(Events.INTERNAL_MANIFEST_LOADED, onManifestLoaded, this);\n\n resetInitialSettings();\n }\n\n function stopManifestRefreshTimer() {\n if (refreshTimer !== null) {\n clearTimeout(refreshTimer);\n refreshTimer = null;\n }\n }\n\n function startManifestRefreshTimer(delay) {\n stopManifestRefreshTimer();\n\n if (isStopped) {\n return;\n }\n\n if (isNaN(delay) && !isNaN(refreshDelay)) {\n delay = refreshDelay * 1000;\n }\n\n if (!isNaN(delay)) {\n logger.debug('Refresh manifest in ' + delay + ' milliseconds.');\n refreshTimer = setTimeout(onRefreshTimer, delay);\n }\n }\n\n function refreshManifest(ignorePatch = false) {\n isUpdating = true;\n const manifest = manifestModel.getValue();\n\n // default to the original url in the manifest\n let url = manifest.url;\n\n // Check for PatchLocation and Location alternatives\n const patchLocation = adapter.getPatchLocation(manifest);\n const location = adapter.getLocation(manifest);\n if (patchLocation && !ignorePatch) {\n url = patchLocation;\n } else if (location) {\n url = location;\n }\n\n // if one of the alternatives was relative, convert to absolute\n if (urlUtils.isRelative(url)) {\n url = urlUtils.resolve(url, manifest.url);\n }\n\n manifestLoader.load(url);\n }\n\n function update(manifest) {\n if (!manifest) {\n // successful update with no content implies existing manifest remains valid\n manifest = manifestModel.getValue();\n\n // override load time to avoid invalid latency tracking and ensure update cadence\n manifest.loadedTime = new Date();\n } else if (adapter.getIsPatch(manifest)) {\n // with patches the in-memory manifest is our base\n let patch = manifest;\n manifest = manifestModel.getValue();\n\n // check for patch validity\n let isPatchValid = adapter.isPatchValid(manifest, patch);\n let patchSuccessful = isPatchValid;\n\n if (isPatchValid) {\n // grab publish time before update\n let publishTime = adapter.getPublishTime(manifest);\n\n // apply validated patch to manifest\n patchSuccessful = adapter.applyPatchToManifest(manifest, patch);\n\n // get the updated publish time\n let updatedPublishTime = adapter.getPublishTime(manifest);\n\n // ensure the patch properly updated the in-memory publish time\n patchSuccessful = publishTime.getTime() != updatedPublishTime.getTime();\n }\n\n // if the patch failed to apply, force a full manifest refresh\n if (!patchSuccessful) {\n logger.debug('Patch provided is invalid, performing full manifest refresh');\n refreshManifest(true);\n return;\n }\n\n // override load time to avoid invalid latency tracking and ensure update cadence\n manifest.loadedTime = new Date();\n }\n\n // See DASH-IF IOP v4.3 section 4.6.4 \"Transition Phase between Live and On-Demand\"\n // Stop manifest update, ignore static manifest and signal end of dynamic stream to detect end of stream\n if (manifestModel.getValue() && manifestModel.getValue().type === DashConstants.DYNAMIC && manifest.type === DashConstants.STATIC) {\n eventBus.trigger(Events.DYNAMIC_TO_STATIC);\n isUpdating = false;\n isStopped = true;\n return;\n }\n\n manifestModel.setValue(manifest);\n\n const date = new Date();\n const latencyOfLastUpdate = (date.getTime() - manifest.loadedTime.getTime()) / 1000;\n refreshDelay = adapter.getManifestUpdatePeriod(manifest, latencyOfLastUpdate);\n // setTimeout uses a 32 bit number to store the delay. Any number greater than it\n // will cause event associated with setTimeout to trigger immediately\n if (refreshDelay * 1000 > 0x7FFFFFFF) {\n refreshDelay = 0x7FFFFFFF / 1000;\n }\n eventBus.trigger(Events.MANIFEST_UPDATED, { manifest: manifest });\n logger.info('Manifest has been refreshed at ' + date + '[' + date.getTime() / 1000 + '] ');\n\n if (!isPaused) {\n startManifestRefreshTimer();\n }\n }\n\n function onRefreshTimer() {\n if (isPaused) {\n return;\n }\n if (isUpdating) {\n startManifestRefreshTimer(settings.get().streaming.manifestUpdateRetryInterval);\n return;\n }\n refreshManifest();\n }\n\n function onManifestLoaded(e) {\n if (!e.error) {\n update(e.manifest);\n } else if (e.error.code === Errors.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE) {\n errHandler.error(e.error);\n }\n }\n\n function onPlaybackStarted (/*e*/) {\n isPaused = false;\n startManifestRefreshTimer();\n }\n\n function onPlaybackPaused(/*e*/) {\n isPaused = !settings.get().streaming.scheduling.scheduleWhilePaused;\n\n if (isPaused) {\n stopManifestRefreshTimer();\n }\n }\n\n function onStreamsComposed(/*e*/) {\n // When streams are ready we can consider manifest update completed. Resolve the update promise.\n isUpdating = false;\n }\n\n function getIsUpdating() {\n return isUpdating;\n }\n\n instance = {\n initialize: initialize,\n setManifest: setManifest,\n refreshManifest: refreshManifest,\n getIsUpdating: getIsUpdating,\n setConfig: setConfig,\n reset: reset\n };\n\n setup();\n return instance;\n}\nManifestUpdater.__dashjs_factory_name = 'ManifestUpdater';\nexport default FactoryMaker.getClassFactory(ManifestUpdater);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport DashJSError from './../vo/DashJSError';\nimport {HTTPRequest} from '../vo/metrics/HTTPRequest';\nimport EventBus from './../../core/EventBus';\nimport Events from './../../core/events/Events';\nimport Errors from './../../core/errors/Errors';\nimport FactoryMaker from '../../core/FactoryMaker';\nimport Debug from '../../core/Debug';\nimport URLUtils from '../utils/URLUtils';\n\nconst HTTP_TIMEOUT_MS = 5000;\nconst DEFAULT_MAXIMUM_ALLOWED_DRIFT = 100;\nconst DEFAULT_TIME_BETWEEN_SYNC_ATTEMPTS_ADJUSTMENT_FACTOR = 2;\nconst DEFAULT_BACKGROUND_ATTEMPTS = 2;\nconst DEFAULT_TIME_BETWEEN_SYNC_ATTEMPTS = 30;\nconst DEFAULT_MINIMUM_TIME_BETWEEN_BACKGROUND_SYNC_ATTEMPTS = 30;\nconst DEFAULT_MAXIMUM_TIME_BETWEEN_SYNC = 600;\nconst DEFAULT_MINIMUM_TIME_BETWEEN_SYNC = 2;\n\nfunction TimeSyncController() {\n\n const context = this.context;\n const eventBus = EventBus(context).getInstance();\n const urlUtils = URLUtils(context).getInstance();\n\n let instance,\n logger,\n isSynchronizing,\n isBackgroundSynchronizing,\n settings,\n handlers,\n dashMetrics,\n backgroundSyncTimeOffsets,\n timingSources,\n timeOfLastSync,\n timeOfLastBackgroundSync,\n lastOffset,\n lastTimingSource,\n internalTimeBetweenSyncAttempts,\n errHandler,\n baseURLController;\n\n function setup() {\n logger = Debug(context).getInstance().getLogger(instance);\n\n eventBus.on(Events.ATTEMPT_BACKGROUND_SYNC, _onAttemptBackgroundSync, instance);\n }\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.dashMetrics) {\n dashMetrics = config.dashMetrics;\n }\n\n if (config.baseURLController) {\n baseURLController = config.baseURLController;\n }\n\n if (config.errHandler) {\n errHandler = config.errHandler;\n }\n\n if (config.settings) {\n settings = config.settings;\n }\n }\n\n function _resetInitialSettings() {\n backgroundSyncTimeOffsets = [];\n timingSources = [];\n timeOfLastSync = null;\n timeOfLastBackgroundSync = null;\n lastTimingSource = null;\n lastOffset = NaN;\n isSynchronizing = false;\n isBackgroundSynchronizing = false;\n internalTimeBetweenSyncAttempts = settings.get().streaming.utcSynchronization.timeBetweenSyncAttempts;\n }\n\n /**\n * Register the timing handler depending on the schemeIdUris. This method is called once when the StreamController is initialized\n */\n function initialize() {\n _resetInitialSettings();\n\n // a list of known schemeIdUris and a method to call with @value\n handlers = {\n 'urn:mpeg:dash:utc:http-head:2014': _httpHeadHandler,\n 'urn:mpeg:dash:utc:http-xsdate:2014': _httpHandler.bind(null, _xsdatetimeDecoder),\n 'urn:mpeg:dash:utc:http-iso:2014': _httpHandler.bind(null, _iso8601Decoder),\n 'urn:mpeg:dash:utc:direct:2014': _directHandler,\n\n // some specs referencing early ISO23009-1 drafts incorrectly use\n // 2012 in the URI, rather than 2014. support these for now.\n 'urn:mpeg:dash:utc:http-head:2012': _httpHeadHandler,\n 'urn:mpeg:dash:utc:http-xsdate:2012': _httpHandler.bind(null, _xsdatetimeDecoder),\n 'urn:mpeg:dash:utc:http-iso:2012': _httpHandler.bind(null, _iso8601Decoder),\n 'urn:mpeg:dash:utc:direct:2012': _directHandler,\n\n // it isn't clear how the data returned would be formatted, and\n // no public examples available so http-ntp not supported for now.\n // presumably you would do an arraybuffer type xhr and decode the\n // binary data returned but I would want to see a sample first.\n 'urn:mpeg:dash:utc:http-ntp:2014': _notSupportedHandler,\n\n // not clear how this would be supported in javascript (in browser)\n 'urn:mpeg:dash:utc:ntp:2014': _notSupportedHandler,\n 'urn:mpeg:dash:utc:sntp:2014': _notSupportedHandler\n };\n\n }\n\n /**\n * Sync against a timing source. T\n * @param {array} tSources\n * @param {boolean} isDynamic\n */\n function attemptSync(tSources, isDynamic) {\n\n timingSources = tSources;\n\n // Stop if we are already synchronizing\n if (isSynchronizing) {\n return;\n }\n\n // No synchronization required we can signal the completion immediately\n if (!_shouldPerformSynchronization(isDynamic)) {\n eventBus.trigger(Events.TIME_SYNCHRONIZATION_COMPLETED);\n return;\n }\n\n isSynchronizing = true;\n _attemptRecursiveSync();\n }\n\n /**\n * Does a synchronization in the background in case the last offset should be verified or a 404 occurs\n */\n function _onAttemptBackgroundSync() {\n if (!settings.get().streaming.utcSynchronization.enabled || isSynchronizing || isBackgroundSynchronizing || !lastTimingSource || !lastTimingSource.value || !lastTimingSource.schemeIdUri || isNaN(lastOffset) || isNaN(settings.get().streaming.utcSynchronization.backgroundAttempts)) {\n return;\n }\n\n if (timeOfLastBackgroundSync && ((Date.now() - timeOfLastBackgroundSync) / 1000) < DEFAULT_MINIMUM_TIME_BETWEEN_BACKGROUND_SYNC_ATTEMPTS) {\n return;\n }\n\n backgroundSyncTimeOffsets = [];\n isBackgroundSynchronizing = true;\n const backgroundAttempts = !isNaN(settings.get().streaming.utcSynchronization.backgroundAttempts) ? settings.get().streaming.utcSynchronization.backgroundAttempts : DEFAULT_BACKGROUND_ATTEMPTS;\n _attemptBackgroundSync(backgroundAttempts);\n }\n\n /**\n * Perform a defined number of background attempts\n * @param {number} attempts\n * @private\n */\n function _attemptBackgroundSync(attempts) {\n try {\n if (attempts <= 0) {\n _completeBackgroundTimeSyncSequence();\n return;\n }\n\n const deviceTimeBeforeSync = Date.now();\n handlers[lastTimingSource.schemeIdUri](\n lastTimingSource.value,\n function (serverTime) {\n // the timing source returned something useful\n const deviceTimeAfterSync = Date.now();\n const offset = _calculateOffset(deviceTimeBeforeSync, deviceTimeAfterSync, serverTime);\n\n backgroundSyncTimeOffsets.push(offset);\n _attemptBackgroundSync(attempts - 1);\n },\n function () {\n _completeBackgroundTimeSyncSequence();\n }\n );\n } catch (e) {\n _completeBackgroundTimeSyncSequence();\n }\n }\n\n /**\n * Sync against a timing source. This method is called recursively if the time sync for the first entry in timingSources fails.\n * @param {number} sourceIndex\n */\n function _attemptRecursiveSync(sourceIndex = null) {\n // if called with no sourceIndex, use zero (highest priority)\n let index = sourceIndex || 0;\n\n // the sources should be ordered in priority from the manifest.\n // try each in turn, from the top, until either something\n // sensible happens, or we run out of sources to try.\n if (!timingSources || timingSources.length === 0 || index >= timingSources.length) {\n _onComplete();\n return;\n }\n let source = timingSources[index];\n\n if (source) {\n // check if there is a handler for this @schemeIdUri\n if (handlers.hasOwnProperty(source.schemeIdUri)) {\n // if so, call it with its @value\n const deviceTimeBeforeSync = new Date().getTime();\n handlers[source.schemeIdUri](\n source.value,\n function (serverTime) {\n // the timing source returned something useful\n const deviceTimeAfterSync = new Date().getTime();\n const offset = _calculateOffset(deviceTimeBeforeSync, deviceTimeAfterSync, serverTime);\n lastTimingSource = source;\n\n _onComplete(offset);\n },\n function () {\n // the timing source was probably uncontactable\n // or returned something we can't use - try again\n // with the remaining sources\n _attemptRecursiveSync(index + 1);\n }\n );\n } else {\n // an unknown schemeIdUri must have been found\n // try again with the remaining sources\n _attemptRecursiveSync(index + 1);\n }\n } else {\n // no valid time source could be found, just use device time\n _onComplete();\n }\n\n }\n\n /**\n * Calculate the offset between client and server. Account for the roundtrip time\n * @param {number} deviceTimeBeforeSync\n * @param {number} deviceTimeAfterSync\n * @param {number} serverTime\n * @return {number}\n * @private\n */\n function _calculateOffset(deviceTimeBeforeSync, deviceTimeAfterSync, serverTime) {\n const deviceReferenceTime = deviceTimeAfterSync - ((deviceTimeAfterSync - deviceTimeBeforeSync) / 2);\n\n return serverTime - deviceReferenceTime;\n }\n\n /**\n * Checks if a synchronization is required\n * @param {boolean} isDynamic\n * @return {boolean}\n * @private\n */\n function _shouldPerformSynchronization(isDynamic) {\n try {\n if (!isDynamic || !settings.get().streaming.utcSynchronization.enabled) {\n return false;\n }\n const timeBetweenSyncAttempts = !isNaN(internalTimeBetweenSyncAttempts) ? internalTimeBetweenSyncAttempts : DEFAULT_TIME_BETWEEN_SYNC_ATTEMPTS;\n\n if (!timeOfLastSync || !timeBetweenSyncAttempts || isNaN(timeBetweenSyncAttempts)) {\n return true;\n }\n\n return ((Date.now() - timeOfLastSync) / 1000) >= timeBetweenSyncAttempts;\n } catch (e) {\n return true;\n }\n }\n\n /**\n * Callback after sync has been completed\n * @param {number} offset\n * @private\n */\n function _onComplete(offset = NaN) {\n let failed = isNaN(offset);\n if (failed && settings.get().streaming.utcSynchronization.useManifestDateHeaderTimeSource) {\n //Before falling back to binary search , check if date header exists on MPD. if so, use for a time source.\n _checkForDateHeader();\n } else {\n _completeTimeSyncSequence(failed, offset);\n }\n }\n\n /**\n * Takes xsdatetime and returns milliseconds since UNIX epoch. May not be necessary as xsdatetime is very similar to ISO 8601 which is natively understood by javascript Date parser\n * @param {string} xsdatetimeStr\n * @return {number}\n * @private\n */\n function _alternateXsdatetimeDecoder(xsdatetimeStr) {\n // taken from DashParser - should probably refactor both uses\n const SECONDS_IN_MIN = 60;\n const MINUTES_IN_HOUR = 60;\n const MILLISECONDS_IN_SECONDS = 1000;\n let datetimeRegex = /^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\\.[0-9]*)?)?(?:([+\\-])([0-9]{2})([0-9]{2}))?/;\n\n let utcDate,\n timezoneOffset;\n\n let match = datetimeRegex.exec(xsdatetimeStr);\n\n // If the string does not contain a timezone offset different browsers can interpret it either\n // as UTC or as a local time so we have to parse the string manually to normalize the given date value for\n // all browsers\n utcDate = Date.UTC(\n parseInt(match[1], 10),\n parseInt(match[2], 10) - 1, // months start from zero\n parseInt(match[3], 10),\n parseInt(match[4], 10),\n parseInt(match[5], 10),\n (match[6] && (parseInt(match[6], 10) || 0)),\n (match[7] && parseFloat(match[7]) * MILLISECONDS_IN_SECONDS) || 0\n );\n // If the date has timezone offset take it into account as well\n if (match[9] && match[10]) {\n timezoneOffset = parseInt(match[9], 10) * MINUTES_IN_HOUR + parseInt(match[10], 10);\n utcDate += (match[8] === '+' ? -1 : +1) * timezoneOffset * SECONDS_IN_MIN * MILLISECONDS_IN_SECONDS;\n }\n\n return new Date(utcDate).getTime();\n }\n\n\n /**\n * Try to use the built in parser, since xsdate is a constrained ISO8601 which is supported natively by Date.parse. if that fails, try a regex-based version used elsewhere in this application.\n * @param {string} xsdatetimeStr\n * @return {number}\n */\n function _xsdatetimeDecoder(xsdatetimeStr) {\n let parsedDate = Date.parse(xsdatetimeStr);\n\n if (isNaN(parsedDate)) {\n parsedDate = _alternateXsdatetimeDecoder(xsdatetimeStr);\n }\n\n return parsedDate;\n }\n\n /**\n * Takes ISO 8601 timestamp and returns milliseconds since UNIX epoch\n * @param {string} isoStr\n * @return {number}\n */\n function _iso8601Decoder(isoStr) {\n return Date.parse(isoStr);\n }\n\n /**\n * Takes RFC 1123 timestamp (which is same as ISO8601) and returns milliseconds since UNIX epoch\n * @param {string} dateStr\n * @return {number}\n */\n function _rfc1123Decoder(dateStr) {\n return Date.parse(dateStr);\n }\n\n /**\n * Handler for unsupported scheme ids.\n * @param {string} url\n * @param {function} onSuccessCB\n * @param {function} onFailureCB\n * @private\n */\n function _notSupportedHandler(url, onSuccessCB, onFailureCB) {\n onFailureCB();\n }\n\n /**\n * Direct handler\n * @param {string} xsdatetimeStr\n * @param {function} onSuccessCB\n * @param {function} onFailureCB\n */\n function _directHandler(xsdatetimeStr, onSuccessCB, onFailureCB) {\n let time = _xsdatetimeDecoder(xsdatetimeStr);\n\n if (!isNaN(time)) {\n onSuccessCB(time);\n return;\n }\n\n onFailureCB();\n }\n\n /**\n * Generic http handler\n * @param {function} decoder\n * @param {string} url\n * @param {function} onSuccessCB\n * @param {function} onFailureCB\n * @param {boolean} isHeadRequest\n * @private\n */\n function _httpHandler(decoder, url, onSuccessCB, onFailureCB, isHeadRequest) {\n let oncomplete,\n onload;\n let complete = false;\n let req = new XMLHttpRequest();\n\n let verb = isHeadRequest ? HTTPRequest.HEAD : HTTPRequest.GET;\n let urls = url.match(/\\S+/g);\n\n // according to ISO 23009-1, url could be a white-space\n // separated list of URLs. just handle one at a time.\n url = urls.shift();\n\n oncomplete = function () {\n if (complete) {\n return;\n }\n\n // we only want to pass through here once per xhr,\n // regardless of whether the load was successful.\n complete = true;\n\n // if there are more urls to try, call self.\n if (urls.length) {\n _httpHandler(decoder, urls.join(' '), onSuccessCB, onFailureCB, isHeadRequest);\n } else {\n onFailureCB();\n }\n };\n\n onload = function () {\n let time,\n result;\n\n if (req.status === 200) {\n time = isHeadRequest ?\n req.getResponseHeader('Date') :\n req.response;\n\n result = decoder(time);\n\n // decoder returns NaN if non-standard input\n if (!isNaN(result)) {\n onSuccessCB(result);\n complete = true;\n }\n }\n };\n\n if (urlUtils.isRelative(url)) {\n // passing no path to resolve will return just MPD BaseURL/baseUri\n const baseUrl = baseURLController.resolve();\n if (baseUrl) {\n url = urlUtils.resolve(url, baseUrl.url);\n }\n }\n\n req.open(verb, url);\n req.timeout = HTTP_TIMEOUT_MS || 0;\n req.onload = onload;\n req.onloadend = oncomplete;\n req.send();\n }\n\n /**\n * Handler for http-head schemeIdUri\n * @param {string} url\n * @param {function} onSuccessCB\n * @param {function} onFailureCB\n * @private\n */\n function _httpHeadHandler(url, onSuccessCB, onFailureCB) {\n _httpHandler(_rfc1123Decoder, url, onSuccessCB, onFailureCB, true);\n }\n\n /**\n * Checks if a date header is present in the MPD response and calculates the offset based on the header\n * @private\n */\n function _checkForDateHeader() {\n let dateHeaderValue = dashMetrics.getLatestMPDRequestHeaderValueByID('Date');\n let dateHeaderTime = dateHeaderValue !== null ? new Date(dateHeaderValue).getTime() : Number.NaN;\n\n if (!isNaN(dateHeaderTime)) {\n const offsetToDeviceTimeMs = dateHeaderTime - Date.now();\n _completeTimeSyncSequence(false, offsetToDeviceTimeMs);\n } else {\n _completeTimeSyncSequence(true);\n }\n }\n\n /**\n * Triggers the event to signal that the time synchronization was completed\n * @param {boolean} failed\n * @param {number} offset\n * @private\n */\n function _completeTimeSyncSequence(failed, offset) {\n\n // Adjust the time of the next sync based on the drift between current offset and last offset\n if (!isNaN(lastOffset) && !isNaN(offset) && !failed) {\n _adjustTimeBetweenSyncAttempts(offset);\n }\n\n // Update the internal data\n if (!failed && !isNaN(offset)) {\n timeOfLastSync = Date.now();\n isSynchronizing = false;\n\n // if this is the first sync we are doing perform background syncs as well to confirm current offset\n const shouldAttemptBackgroundSync = isNaN(lastOffset);\n lastOffset = offset;\n if (shouldAttemptBackgroundSync) {\n _onAttemptBackgroundSync();\n }\n logger.debug(`Completed UTC sync. Setting client - server offset to ${offset}`);\n }\n\n if (failed) {\n lastTimingSource = null;\n isSynchronizing = false;\n errHandler.error(new DashJSError(Errors.TIME_SYNC_FAILED_ERROR_CODE, Errors.TIME_SYNC_FAILED_ERROR_MESSAGE));\n }\n\n // Notify other classes\n eventBus.trigger(Events.UPDATE_TIME_SYNC_OFFSET, {\n offset: offset,\n });\n eventBus.trigger(Events.TIME_SYNCHRONIZATION_COMPLETED);\n }\n\n function _adjustTimeBetweenSyncAttempts(offset) {\n try {\n const isOffsetDriftWithinThreshold = _isOffsetDriftWithinThreshold(offset);\n const timeBetweenSyncAttempts = !isNaN(internalTimeBetweenSyncAttempts) ? internalTimeBetweenSyncAttempts : DEFAULT_TIME_BETWEEN_SYNC_ATTEMPTS;\n const timeBetweenSyncAttemptsAdjustmentFactor = !isNaN(settings.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor) ? settings.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor : DEFAULT_TIME_BETWEEN_SYNC_ATTEMPTS_ADJUSTMENT_FACTOR;\n const maximumTimeBetweenSyncAttempts = !isNaN(settings.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts) ? settings.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts : DEFAULT_MAXIMUM_TIME_BETWEEN_SYNC;\n const minimumTimeBetweenSyncAttempts = !isNaN(settings.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts) ? settings.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts : DEFAULT_MINIMUM_TIME_BETWEEN_SYNC;\n let adjustedTimeBetweenSyncAttempts;\n\n if (isOffsetDriftWithinThreshold) {\n // The drift between the current offset and the last offset is within the allowed threshold. Increase sync time\n adjustedTimeBetweenSyncAttempts = Math.min(timeBetweenSyncAttempts * timeBetweenSyncAttemptsAdjustmentFactor, maximumTimeBetweenSyncAttempts);\n logger.debug(`Increasing timeBetweenSyncAttempts to ${adjustedTimeBetweenSyncAttempts}`);\n } else {\n // Drift between the current offset and the last offset is not within the allowed threshold. Decrease sync time\n adjustedTimeBetweenSyncAttempts = Math.max(timeBetweenSyncAttempts / timeBetweenSyncAttemptsAdjustmentFactor, minimumTimeBetweenSyncAttempts);\n logger.debug(`Decreasing timeBetweenSyncAttempts to ${adjustedTimeBetweenSyncAttempts}`);\n }\n\n internalTimeBetweenSyncAttempts = adjustedTimeBetweenSyncAttempts;\n } catch (e) {\n\n }\n }\n\n /**\n * Callback after all background syncs have been completed.\n * @private\n */\n function _completeBackgroundTimeSyncSequence() {\n if (!backgroundSyncTimeOffsets || backgroundSyncTimeOffsets.length === 0) {\n return;\n }\n\n const averageOffset = backgroundSyncTimeOffsets.reduce((acc, curr) => {\n return acc + curr;\n }, 0) / backgroundSyncTimeOffsets.length;\n\n if (!_isOffsetDriftWithinThreshold(averageOffset)) {\n logger.debug(`Completed background UTC sync. Setting client - server offset to ${averageOffset}`);\n lastOffset = averageOffset;\n eventBus.trigger(Events.UPDATE_TIME_SYNC_OFFSET, {\n offset: lastOffset\n });\n } else {\n logger.debug(`Completed background UTC sync. Offset is within allowed threshold and is not adjusted.`);\n }\n\n isBackgroundSynchronizing = false;\n timeOfLastBackgroundSync = Date.now();\n }\n\n function _isOffsetDriftWithinThreshold(offset) {\n try {\n if (isNaN(lastOffset)) {\n return true;\n }\n\n const maxAllowedDrift = settings.get().streaming.utcSynchronization.maximumAllowedDrift && !isNaN(settings.get().streaming.utcSynchronization.maximumAllowedDrift) ? settings.get().streaming.utcSynchronization.maximumAllowedDrift : DEFAULT_MAXIMUM_ALLOWED_DRIFT;\n const lowerBound = lastOffset - maxAllowedDrift;\n const upperBound = lastOffset + maxAllowedDrift;\n\n return offset >= lowerBound && offset <= upperBound;\n } catch (e) {\n return true;\n }\n }\n\n function reset() {\n _resetInitialSettings();\n\n eventBus.off(Events.ATTEMPT_BACKGROUND_SYNC, _onAttemptBackgroundSync, instance);\n }\n\n instance = {\n initialize,\n attemptSync,\n setConfig,\n reset\n };\n\n setup();\n\n return instance;\n}\n\nTimeSyncController.__dashjs_factory_name = 'TimeSyncController';\nconst factory = FactoryMaker.getSingletonFactory(TimeSyncController);\nfactory.HTTP_TIMEOUT_MS = HTTP_TIMEOUT_MS;\nFactoryMaker.updateSingletonFactory(TimeSyncController.__dashjs_factory_name, factory);\nexport default factory;\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport FactoryMaker from '../../core/FactoryMaker';\nimport Debug from '../../core/Debug';\n\nfunction MediaSourceController() {\n\n let instance,\n mediaSource,\n logger;\n\n const context = this.context;\n\n function setup() {\n logger = Debug(context).getInstance().getLogger(instance);\n }\n\n function createMediaSource() {\n\n let hasWebKit = ('WebKitMediaSource' in window);\n let hasMediaSource = ('MediaSource' in window);\n\n if (hasMediaSource) {\n mediaSource = new MediaSource();\n } else if (hasWebKit) {\n mediaSource = new WebKitMediaSource();\n }\n\n return mediaSource;\n }\n\n function attachMediaSource(videoModel) {\n\n let objectURL = window.URL.createObjectURL(mediaSource);\n\n videoModel.setSource(objectURL);\n\n return objectURL;\n }\n\n function detachMediaSource(videoModel) {\n videoModel.setSource(null);\n }\n\n function setDuration(value) {\n if (!mediaSource || mediaSource.readyState !== 'open') return;\n if (value === null && isNaN(value)) return;\n if (mediaSource.duration === value) return;\n\n if (!isBufferUpdating(mediaSource)) {\n logger.info('Set MediaSource duration:' + value);\n mediaSource.duration = value;\n } else {\n setTimeout(setDuration.bind(null, value), 50);\n }\n }\n\n function setSeekable(start, end) {\n if (mediaSource && typeof mediaSource.setLiveSeekableRange === 'function' && typeof mediaSource.clearLiveSeekableRange === 'function' &&\n mediaSource.readyState === 'open' && start >= 0 && start < end) {\n mediaSource.clearLiveSeekableRange();\n mediaSource.setLiveSeekableRange(start, end);\n }\n }\n\n function signalEndOfStream(source) {\n if (!source || source.readyState !== 'open') {\n return;\n }\n\n let buffers = source.sourceBuffers;\n\n for (let i = 0; i < buffers.length; i++) {\n if (buffers[i].updating) {\n return;\n }\n if (buffers[i].buffered.length === 0) {\n return;\n }\n }\n logger.info('call to mediaSource endOfStream');\n source.endOfStream();\n }\n\n function isBufferUpdating(source) {\n let buffers = source.sourceBuffers;\n for (let i = 0; i < buffers.length; i++) {\n if (buffers[i].updating) {\n return true;\n }\n }\n return false;\n }\n\n instance = {\n createMediaSource,\n attachMediaSource,\n detachMediaSource,\n setDuration,\n setSeekable,\n signalEndOfStream\n };\n\n setup();\n\n return instance;\n}\n\nMediaSourceController.__dashjs_factory_name = 'MediaSourceController';\nexport default FactoryMaker.getSingletonFactory(MediaSourceController);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport FactoryMaker from '../../core/FactoryMaker';\nimport Debug from '../../core/Debug';\nimport EventBus from '../../core/EventBus';\nimport MediaPlayerEvents from '../../streaming/MediaPlayerEvents';\nimport XHRLoader from '../net/XHRLoader';\n\nfunction EventController() {\n\n const MPD_RELOAD_SCHEME = 'urn:mpeg:dash:event:2012';\n const MPD_RELOAD_VALUE = 1;\n\n const MPD_CALLBACK_SCHEME = 'urn:mpeg:dash:event:callback:2015';\n const MPD_CALLBACK_VALUE = 1;\n\n const REMAINING_EVENTS_THRESHOLD = 300;\n\n const EVENT_HANDLED_STATES = {\n DISCARDED: 'discarded',\n UPDATED: 'updated',\n ADDED: 'added'\n };\n\n const context = this.context;\n const eventBus = EventBus(context).getInstance();\n\n let instance,\n logger,\n inlineEvents, // Holds all Inline Events not triggered yet\n inbandEvents, // Holds all Inband Events not triggered yet\n eventInterval, // variable holding the setInterval\n lastEventTimerCall,\n manifestUpdater,\n playbackController,\n settings,\n eventHandlingInProgress,\n isStarted;\n\n /**\n * Internal setup when class is instanced\n */\n function _setup() {\n logger = Debug(context).getInstance().getLogger(instance);\n _resetInitialSettings();\n }\n\n /**\n * Checks if the provded configuration is valid\n */\n function checkConfig() {\n if (!manifestUpdater || !playbackController) {\n throw new Error('setConfig function has to be called previously');\n }\n }\n\n /**\n * Reset to initial settings\n */\n function _resetInitialSettings() {\n isStarted = false;\n inlineEvents = {}; // Format inlineEvents[schemeIdUri]\n inbandEvents = {}; // Format inlineEvents[schemeIdUri]\n eventInterval = null;\n eventHandlingInProgress = false;\n lastEventTimerCall = Date.now() / 1000;\n }\n\n /**\n * Stops the EventController by clearing the event interval\n */\n function _stop() {\n try {\n if (eventInterval !== null && isStarted) {\n clearInterval(eventInterval);\n eventInterval = null;\n isStarted = false;\n _onStopEventController();\n }\n } catch (e) {\n throw e;\n }\n }\n\n /**\n * Starts the interval function of the EventController\n */\n function start() {\n try {\n checkConfig();\n logger.debug('Start Event Controller');\n const refreshDelay = settings.get().streaming.eventControllerRefreshDelay;\n if (!isStarted && !isNaN(refreshDelay)) {\n isStarted = true;\n eventInterval = setInterval(_onEventTimer, refreshDelay);\n }\n } catch (e) {\n throw e;\n }\n }\n\n /**\n * Add MPD events to the list of events.\n * Events that are not in the MPD anymore but not triggered yet will still be deleted.\n * Existing events might get updated.\n * @param {Array.} values\n */\n function addInlineEvents(values) {\n try {\n checkConfig();\n\n if (values) {\n for (let i = 0; i < values.length; i++) {\n let event = values[i];\n let result = _addOrUpdateEvent(event, inlineEvents, true);\n\n if (result === EVENT_HANDLED_STATES.ADDED) {\n logger.debug(`Added inline event with id ${event.id}`);\n // If we see the event for the first time we trigger it in onReceive mode\n _startEvent(event, values, MediaPlayerEvents.EVENT_MODE_ON_RECEIVE);\n } else if (result === EVENT_HANDLED_STATES.UPDATED) {\n logger.debug(`Updated inline event with id ${event.id}`);\n }\n }\n }\n } catch (e) {\n throw e;\n }\n }\n\n /**\n * Add EMSG events to the list of events\n * Messages with the same id within the scope of the same scheme_id_uri and value pair are equivalent , i.e. processing of any one event message box with the same id is sufficient.\n * @param {Array.} values\n */\n function addInbandEvents(values) {\n try {\n checkConfig();\n\n for (let i = 0; i < values.length; i++) {\n let event = values[i];\n let result = _addOrUpdateEvent(event, inbandEvents, false);\n\n if (result === EVENT_HANDLED_STATES.ADDED) {\n if (event.eventStream.schemeIdUri === MPD_RELOAD_SCHEME && inbandEvents[event.id] === undefined) {\n _handleManifestReloadEvent(event);\n }\n logger.debug('Added inband event with id ' + event.id);\n _startEvent(event, values, MediaPlayerEvents.EVENT_MODE_ON_RECEIVE);\n } else {\n logger.debug(`Inband event with scheme_id_uri ${event.eventStream.schemeIdUri}, value ${event.eventStream.value} and id ${event.id} was ignored because it has been added before.`);\n }\n }\n _onEventTimer();\n } catch (e) {\n throw e;\n }\n }\n\n /**\n * Adds or updates an event to/in the list of events\n * @param {object} event\n * @param {object} events\n * @param {boolean} shouldOverwriteExistingEvents\n * @return {string}\n * @private\n */\n function _addOrUpdateEvent(event, events, shouldOverwriteExistingEvents = false) {\n const schemeIdUri = event.eventStream.schemeIdUri;\n const value = event.eventStream.value;\n const id = event.id;\n let eventState = EVENT_HANDLED_STATES.DISCARDED;\n\n if (!events[schemeIdUri]) {\n events[schemeIdUri] = [];\n }\n\n const indexOfExistingEvent = events[schemeIdUri].findIndex((e) => {\n return ((!value || (e.eventStream.value && e.eventStream.value === value)) && (e.id === id));\n });\n\n if (indexOfExistingEvent === -1) {\n events[schemeIdUri].push(event);\n eventState = EVENT_HANDLED_STATES.ADDED;\n } else if (shouldOverwriteExistingEvents) {\n events[schemeIdUri][indexOfExistingEvent] = event;\n eventState = EVENT_HANDLED_STATES.UPDATED;\n }\n\n return eventState;\n }\n\n /**\n * Triggers an MPD reload\n * @param {object} event\n * @private\n */\n function _handleManifestReloadEvent(event) {\n try {\n if (event.eventStream.value == MPD_RELOAD_VALUE) {\n const validUntil = event.calculatedPresentationTime;\n let newDuration;\n if (event.calculatedPresentationTime == 0xFFFFFFFF) {//0xFF... means remaining duration unknown\n newDuration = NaN;\n } else {\n newDuration = event.calculatedPresentationTime + event.duration;\n }\n //logger.info('Manifest validity changed: Valid until: ' + validUntil + '; remaining duration: ' + newDuration);\n eventBus.trigger(MediaPlayerEvents.MANIFEST_VALIDITY_CHANGED, {\n id: event.id,\n validUntil: validUntil,\n newDuration: newDuration,\n newManifestValidAfter: NaN //event.message_data - this is an arraybuffer with a timestring in it, but not used yet\n }, {\n mode: MediaPlayerEvents.EVENT_MODE_ON_START\n });\n }\n } catch (e) {\n }\n }\n\n /**\n * Iterate through the eventList and trigger the events\n */\n function _onEventTimer() {\n try {\n if (!eventHandlingInProgress) {\n eventHandlingInProgress = true;\n const currentVideoTime = playbackController.getTime();\n let presentationTimeThreshold = (currentVideoTime - lastEventTimerCall);\n\n // For dynamic streams lastEventTimeCall will be large in the first iteration. Avoid firing all events at once.\n presentationTimeThreshold = lastEventTimerCall > 0 ? Math.max(0, presentationTimeThreshold) : 0;\n\n _triggerEvents(inbandEvents, presentationTimeThreshold, currentVideoTime);\n _triggerEvents(inlineEvents, presentationTimeThreshold, currentVideoTime);\n\n lastEventTimerCall = currentVideoTime;\n eventHandlingInProgress = false;\n }\n } catch (e) {\n eventHandlingInProgress = false;\n }\n }\n\n /**\n * When the EventController is stopped this callback is triggered. Starts the remaining events.\n * @private\n */\n function _onStopEventController() {\n try {\n // EventController might be stopped before the period is over. Before we stop the event controller we check for events that needs to be triggered at the period boundary.\n _triggerRemainingEvents(inbandEvents);\n _triggerRemainingEvents(inlineEvents);\n } catch (e) {\n\n }\n }\n\n /**\n * Iterate over a list of events and trigger the ones for which the presentation time is within the current timing interval\n * @param {object} events\n * @param {number} presentationTimeThreshold\n * @param {number} currentVideoTime\n * @private\n */\n function _triggerEvents(events, presentationTimeThreshold, currentVideoTime) {\n try {\n const callback = function (event) {\n if (event !== undefined) {\n const duration = !isNaN(event.duration) ? event.duration : 0;\n // The event is either about to start or has already been started and we are within its duration\n if ((event.calculatedPresentationTime <= currentVideoTime && event.calculatedPresentationTime + presentationTimeThreshold + duration >= currentVideoTime)) {\n _startEvent(event, events, MediaPlayerEvents.EVENT_MODE_ON_START);\n } else if (_eventHasExpired(currentVideoTime, duration + presentationTimeThreshold, event.calculatedPresentationTime) || _eventIsInvalid(event)) {\n logger.debug(`Deleting event ${event.id} as it is expired or invalid`);\n _removeEvent(events, event);\n }\n }\n };\n\n _iterateAndTriggerCallback(events, callback);\n } catch (e) {\n }\n }\n\n /**\n * Triggers the remaining events after the EventController has been stopped\n * @param {object} events\n * @private\n */\n function _triggerRemainingEvents(events) {\n try {\n const currentTime = playbackController.getTime();\n const callback = function (event) {\n const periodDuration = event.eventStream && event.eventStream.period && !isNaN(event.eventStream.period.duration) ? event.eventStream.period.duration : NaN;\n const periodStart = event.eventStream && event.eventStream.period && !isNaN(event.eventStream.period.start) ? event.eventStream.period.start : NaN;\n\n if (isNaN(periodDuration) || isNaN(periodStart)) {\n return;\n }\n\n const calculatedPresentationTimeInSeconds = event.calculatedPresentationTime;\n\n if (Math.abs(calculatedPresentationTimeInSeconds - currentTime) < REMAINING_EVENTS_THRESHOLD) {\n _startEvent(event, events, MediaPlayerEvents.EVENT_MODE_ON_START);\n }\n\n };\n\n _iterateAndTriggerCallback(events, callback);\n\n } catch (e) {\n\n }\n }\n\n /**\n * Iterates over the inline/inband event object and triggers a callback for each event\n * @param {object} events\n * @param {function} callback\n * @private\n */\n function _iterateAndTriggerCallback(events, callback) {\n try {\n if (events) {\n const schemeIdUris = Object.keys(events);\n for (let i = 0; i < schemeIdUris.length; i++) {\n const schemeIdEvents = events[schemeIdUris[i]];\n schemeIdEvents.forEach((event) => {\n if (event !== undefined) {\n callback(event);\n }\n });\n }\n }\n } catch (e) {\n\n }\n }\n\n /**\n * Checks if an event is expired. For instance if the presentationTime + the duration of an event are smaller than the current video time.\n * @param {number} currentVideoTime\n * @param {number} threshold\n * @param {number} calculatedPresentationTimeInSeconds\n * @return {boolean}\n * @private\n */\n function _eventHasExpired(currentVideoTime, threshold, calculatedPresentationTimeInSeconds) {\n try {\n return currentVideoTime - threshold > calculatedPresentationTimeInSeconds;\n } catch (e) {\n return false;\n }\n }\n\n /**\n * Checks if an event is invalid. This is the case if the end time of the parent period is smaller than the presentation time of the event.\n * @param {object} event\n * @return {boolean}\n * @private\n */\n function _eventIsInvalid(event) {\n try {\n const periodEndTime = event.eventStream.period.start + event.eventStream.period.duration;\n\n return event.calculatedPresentationTime > periodEndTime;\n } catch (e) {\n return false;\n }\n }\n\n /**\n * Starts an event. Depending on the schemeIdUri we distinguis between\n * - MPD Reload events\n * - MPD Callback events\n * - Events to be dispatched to the application\n * Events should be removed from the list before beeing triggered. Otherwise the event handler might cause an error and the remove function will not be called.\n * @param {object} event\n * @param {object} events\n * @param {String} mode\n * @private\n */\n function _startEvent(event, events, mode) {\n try {\n const currentVideoTime = playbackController.getTime();\n const eventId = event.id;\n\n if (mode === MediaPlayerEvents.EVENT_MODE_ON_RECEIVE) {\n logger.debug(`Received event ${eventId}`);\n eventBus.trigger(event.eventStream.schemeIdUri, { event: event }, { mode });\n return;\n }\n\n if (event.eventStream.schemeIdUri === MPD_RELOAD_SCHEME && event.eventStream.value == MPD_RELOAD_VALUE) {\n if (event.duration !== 0 || event.presentationTimeDelta !== 0) { //If both are set to zero, it indicates the media is over at this point. Don't reload the manifest.\n logger.debug(`Starting manifest refresh event ${eventId} at ${currentVideoTime}`);\n _removeEvent(events, event);\n _refreshManifest();\n }\n } else if (event.eventStream.schemeIdUri === MPD_CALLBACK_SCHEME && event.eventStream.value == MPD_CALLBACK_VALUE) {\n logger.debug(`Starting callback event ${eventId} at ${currentVideoTime}`);\n _removeEvent(events, event);\n _sendCallbackRequest(event.messageData);\n } else {\n logger.debug(`Starting event ${eventId} at ${currentVideoTime}`);\n _removeEvent(events, event);\n eventBus.trigger(event.eventStream.schemeIdUri, { event: event }, { mode });\n }\n\n } catch (e) {\n }\n }\n\n /**\n * Removes an event from the list. If this is the last event of type \"schemeIdUri\" the corresponding schemeIdUri Object in the list of events is deleted.\n * @param {object} events\n * @param {object} event\n * @private\n */\n function _removeEvent(events, event) {\n const schemeIdUri = event.eventStream.schemeIdUri;\n const value = event.eventStream.value;\n const id = event.id;\n\n events[schemeIdUri] = events[schemeIdUri].filter((e) => {\n return (value && e.eventStream.value && e.eventStream.value !== value) || e.id !== id;\n });\n\n if (events[schemeIdUri].length === 0) {\n delete events[schemeIdUri];\n }\n\n }\n\n /**\n * Refresh the manifest\n * @private\n */\n function _refreshManifest() {\n try {\n checkConfig();\n manifestUpdater.refreshManifest();\n } catch (e) {\n }\n }\n\n /**\n * Send a callback request\n * @param {String} url\n * @private\n */\n function _sendCallbackRequest(url) {\n try {\n let loader = XHRLoader(context).create({});\n loader.load({\n method: 'get',\n url: url,\n request: {\n responseType: 'arraybuffer'\n }\n });\n } catch (e) {\n throw e;\n }\n }\n\n /**\n * Set the config of the EventController\n * @param {object} config\n */\n function setConfig(config) {\n try {\n if (!config) {\n return;\n }\n if (config.manifestUpdater) {\n manifestUpdater = config.manifestUpdater;\n }\n if (config.playbackController) {\n playbackController = config.playbackController;\n }\n if (config.settings) {\n settings = config.settings;\n }\n\n } catch (e) {\n throw e;\n }\n }\n\n /**\n * Returns all inline events that have not been triggered yet\n * @return {object}\n */\n function getInlineEvents() {\n return inlineEvents;\n }\n\n /**\n * Returns all inband events that have not been triggered yet\n * @return {object}\n */\n function getInbandEvents() {\n return inbandEvents;\n }\n\n /**\n * Stop the EventController and reset all initial settings\n */\n function reset() {\n _stop();\n _resetInitialSettings();\n }\n\n instance = {\n addInlineEvents,\n addInbandEvents,\n getInbandEvents,\n getInlineEvents,\n start,\n setConfig,\n reset\n };\n\n _setup();\n\n return instance;\n}\n\nEventController.__dashjs_factory_name = 'EventController';\nexport default FactoryMaker.getSingletonFactory(EventController);\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nexport default {\n LEVELS: {\n SUGGESTION: 'Suggestion',\n WARNING: 'Warning',\n ERROR: 'Error'\n },\n EVENTS: {\n NO_UTC_TIMING_ELEMENT: {\n key: 'NO_UTC_TIMING_ELEMENT',\n message: 'No UTCTiming element is present in the manifest. You may experience playback failures. For a detailed validation use https://conformance.dashif.org/'\n },\n NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE: {\n key: 'NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE',\n message: 'SMPTE 2052-1:2013 defines the attribute name as \"imageType\" and does not define \"imagetype\"'\n },\n INVALID_DVR_WINDOW: {\n key: 'INVALID_DVR_WINDOW',\n message: 'No valid segment found when applying a specification compliant DVR window calculation. Using SegmentTimeline entries as a fallback.'\n }\n }\n};\n","/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\nimport Constants from '../constants/Constants';\nimport MetricsConstants from '../constants/MetricsConstants';\nimport Stream from '../Stream';\nimport ManifestUpdater from '../ManifestUpdater';\nimport EventBus from '../../core/EventBus';\nimport Events from '../../core/events/Events';\nimport FactoryMaker from '../../core/FactoryMaker';\nimport {\n PlayList,\n PlayListTrace\n} from '../vo/metrics/PlayList';\nimport Debug from '../../core/Debug';\nimport InitCache from '../utils/InitCache';\nimport URLUtils from '../utils/URLUtils';\nimport MediaPlayerEvents from '../MediaPlayerEvents';\nimport TimeSyncController from './TimeSyncController';\nimport MediaSourceController from './MediaSourceController';\nimport DashJSError from '../vo/DashJSError';\nimport Errors from '../../core/errors/Errors';\nimport EventController from './EventController';\nimport ConformanceViolationConstants from '../constants/ConformanceViolationConstants';\n\nconst PLAYBACK_ENDED_TIMER_INTERVAL = 200;\nconst DVR_WAITING_OFFSET = 2;\n\nfunction StreamController() {\n\n const context = this.context;\n const eventBus = EventBus(context).getInstance();\n\n let instance,\n logger,\n capabilities,\n capabilitiesFilter,\n manifestUpdater,\n manifestLoader,\n manifestModel,\n adapter,\n dashMetrics,\n mediaSourceController,\n timeSyncController,\n baseURLController,\n segmentBaseController,\n uriFragmentModel,\n abrController,\n mediaController,\n eventController,\n initCache,\n urlUtils,\n errHandler,\n timelineConverter,\n streams,\n activeStream,\n protectionController,\n textController,\n protectionData,\n autoPlay,\n isStreamSwitchingInProgress,\n hasMediaError,\n hasInitialisationError,\n mediaSource,\n videoModel,\n playbackController,\n mediaPlayerModel,\n isPaused,\n initialPlayback,\n playbackEndedTimerInterval,\n bufferSinks,\n preloadingStreams,\n supportsChangeType,\n settings,\n firstLicenseIsFetched,\n waitForPlaybackStartTimeout,\n errorInformation;\n\n function setup() {\n logger = Debug(context).getInstance().getLogger(instance);\n timeSyncController = TimeSyncController(context).getInstance();\n mediaSourceController = MediaSourceController(context).getInstance();\n initCache = InitCache(context).getInstance();\n urlUtils = URLUtils(context).getInstance();\n\n resetInitialSettings();\n }\n\n function initialize(autoPl, protData) {\n _checkConfig();\n\n autoPlay = autoPl;\n protectionData = protData;\n timelineConverter.initialize();\n\n manifestUpdater = ManifestUpdater(context).create();\n manifestUpdater.setConfig({\n manifestModel: manifestModel,\n adapter: adapter,\n manifestLoader: manifestLoader,\n errHandler: errHandler,\n settings: settings\n });\n manifestUpdater.initialize();\n\n eventController = EventController(context).getInstance();\n eventController.setConfig({\n manifestUpdater: manifestUpdater,\n playbackController: playbackController,\n settings\n });\n eventController.start();\n\n\n timeSyncController.setConfig({\n dashMetrics,\n baseURLController,\n errHandler,\n settings\n });\n timeSyncController.initialize();\n\n if (protectionController) {\n eventBus.trigger(Events.PROTECTION_CREATED, {\n controller: protectionController\n });\n protectionController.setMediaElement(videoModel.getElement());\n if (protectionData) {\n protectionController.setProtectionData(protectionData);\n }\n }\n\n registerEvents();\n }\n\n function registerEvents() {\n eventBus.on(MediaPlayerEvents.PLAYBACK_TIME_UPDATED, _onPlaybackTimeUpdated, instance);\n eventBus.on(MediaPlayerEvents.PLAYBACK_SEEKING, _onPlaybackSeeking, instance);\n eventBus.on(MediaPlayerEvents.PLAYBACK_ERROR, _onPlaybackError, instance);\n eventBus.on(MediaPlayerEvents.PLAYBACK_STARTED, _onPlaybackStarted, instance);\n eventBus.on(MediaPlayerEvents.PLAYBACK_PAUSED, _onPlaybackPaused, instance);\n eventBus.on(MediaPlayerEvents.PLAYBACK_ENDED, _onPlaybackEnded, instance);\n eventBus.on(MediaPlayerEvents.METRIC_ADDED, _onMetricAdded, instance);\n eventBus.on(MediaPlayerEvents.MANIFEST_VALIDITY_CHANGED, _onManifestValidityChanged, instance);\n eventBus.on(MediaPlayerEvents.BUFFER_LEVEL_UPDATED, _onBufferLevelUpdated, instance);\n eventBus.on(MediaPlayerEvents.QUALITY_CHANGE_REQUESTED, _onQualityChanged, instance);\n\n if (Events.KEY_SESSION_UPDATED) {\n eventBus.on(Events.KEY_SESSION_UPDATED, _onKeySessionUpdated, instance);\n }\n\n eventBus.on(Events.MANIFEST_UPDATED, _onManifestUpdated, instance);\n eventBus.on(Events.STREAM_BUFFERING_COMPLETED, _onStreamBufferingCompleted, instance);\n eventBus.on(Events.TIME_SYNCHRONIZATION_COMPLETED, _onTimeSyncCompleted, instance);\n eventBus.on(Events.CURRENT_TRACK_CHANGED, _onCurrentTrackChanged, instance);\n }\n\n function unRegisterEvents() {\n eventBus.off(MediaPlayerEvents.PLAYBACK_TIME_UPDATED, _onPlaybackTimeUpdated, instance);\n eventBus.off(MediaPlayerEvents.PLAYBACK_SEEKING, _onPlaybackSeeking, instance);\n eventBus.off(MediaPlayerEvents.PLAYBACK_ERROR, _onPlaybackError, instance);\n eventBus.off(MediaPlayerEvents.PLAYBACK_STARTED, _onPlaybackStarted, instance);\n eventBus.off(MediaPlayerEvents.PLAYBACK_PAUSED, _onPlaybackPaused, instance);\n eventBus.off(MediaPlayerEvents.PLAYBACK_ENDED, _onPlaybackEnded, instance);\n eventBus.off(MediaPlayerEvents.METRIC_ADDED, _onMetricAdded, instance);\n eventBus.off(MediaPlayerEvents.MANIFEST_VALIDITY_CHANGED, _onManifestValidityChanged, instance);\n eventBus.off(MediaPlayerEvents.BUFFER_LEVEL_UPDATED, _onBufferLevelUpdated, instance);\n eventBus.off(MediaPlayerEvents.QUALITY_CHANGE_REQUESTED, _onQualityChanged, instance);\n\n if (Events.KEY_SESSION_UPDATED) {\n eventBus.off(Events.KEY_SESSION_UPDATED, _onKeySessionUpdated, instance);\n }\n\n eventBus.off(Events.MANIFEST_UPDATED, _onManifestUpdated, instance);\n eventBus.off(Events.STREAM_BUFFERING_COMPLETED, _onStreamBufferingCompleted, instance);\n eventBus.off(Events.TIME_SYNCHRONIZATION_COMPLETED, _onTimeSyncCompleted, instance);\n eventBus.off(Events.CURRENT_TRACK_CHANGED, _onCurrentTrackChanged, instance);\n }\n\n /**\n * When the UTC snychronization is completed we can compose the streams\n * @private\n */\n function _onTimeSyncCompleted( /*e*/) {\n _composeStreams();\n }\n\n /**\n *\n * @private\n */\n function _onKeySessionUpdated() {\n firstLicenseIsFetched = true;\n }\n\n /**\n * Setup the stream objects after the stream start and each MPD reload. This function is called after the UTC sync has been done (TIME_SYNCHRONIZATION_COMPLETED)\n * @private\n */\n function _composeStreams() {\n try {\n const streamsInfo = adapter.getStreamsInfo();\n\n if (!activeStream && streamsInfo.length === 0) {\n throw new Error('There are no streams');\n }\n\n if (activeStream) {\n dashMetrics.updateManifestUpdateInfo({\n currentTime: playbackController.getTime(),\n buffered: videoModel.getBufferRange(),\n presentationStartTime: streamsInfo[0].start,\n clientTimeOffset: timelineConverter.getClientTimeOffset()\n });\n }\n\n // Filter streams that are outdated and not included in the MPD anymore\n if (streams.length > 0) {\n _filterOutdatedStreams(streamsInfo);\n }\n\n const promises = [];\n for (let i = 0, ln = streamsInfo.length; i < ln; i++) {\n const streamInfo = streamsInfo[i];\n promises.push(_initializeOrUpdateStream(streamInfo));\n dashMetrics.addManifestUpdateStreamInfo(streamInfo);\n }\n\n Promise.all(promises)\n .then(() => {\n if (!activeStream) {\n _initializeForFirstStream(streamsInfo);\n }\n\n eventBus.trigger(Events.STREAMS_COMPOSED);\n // Additional periods might have been added after an MPD update. Check again if we can start prebuffering.\n _checkIfPrebufferingCanStart();\n })\n .catch((e) => {\n throw e;\n })\n\n } catch (e) {\n errHandler.error(new DashJSError(Errors.MANIFEST_ERROR_ID_NOSTREAMS_CODE, e.message + 'nostreamscomposed', manifestModel.getValue()));\n hasInitialisationError = true;\n reset();\n }\n }\n\n /**\n * Called for each stream when composition is performed. Either a new instance of Stream is created or the existing one is updated.\n * @param {object} streamInfo\n * @private\n */\n function _initializeOrUpdateStream(streamInfo) {\n let stream = getStreamById(streamInfo.id);\n\n // If the Stream object does not exist we probably loaded the manifest the first time or it was\n // introduced in the updated manifest, so we need to create a new Stream and perform all the initialization operations\n if (!stream) {\n stream = Stream(context).create({\n manifestModel,\n mediaPlayerModel,\n dashMetrics,\n manifestUpdater,\n adapter,\n timelineConverter,\n capabilities,\n capabilitiesFilter,\n errHandler,\n baseURLController,\n segmentBaseController,\n textController,\n abrController,\n playbackController,\n eventController,\n mediaController,\n protectionController,\n videoModel,\n streamInfo,\n settings\n });\n streams.push(stream);\n stream.initialize();\n return Promise.resolve();\n } else {\n return stream.updateData(streamInfo);\n }\n }\n\n /**\n * Initialize playback for the first period.\n * @param {object} streamsInfo\n * @private\n */\n function _initializeForFirstStream(streamsInfo) {\n\n // Add the DVR window so we can calculate the right starting point\n addDVRMetric();\n\n // If the start is in the future we need to wait\n const dvrRange = dashMetrics.getCurrentDVRInfo().range;\n if (dvrRange.end < dvrRange.start) {\n if (waitForPlaybackStartTimeout) {\n clearTimeout(waitForPlaybackStartTimeout);\n }\n const waitingTime = Math.min((((dvrRange.end - dvrRange.start) * -1) + DVR_WAITING_OFFSET) * 1000, 2147483647);\n logger.debug(`Waiting for ${waitingTime} ms before playback can start`);\n eventBus.trigger(Events.AST_IN_FUTURE, { delay: waitingTime });\n waitForPlaybackStartTimeout = setTimeout(() => {\n _initializeForFirstStream(streamsInfo);\n }, waitingTime);\n return;\n }\n\n // Compute and set the live delay\n if (adapter.getIsDynamic() && streams.length) {\n const manifestInfo = streamsInfo[0].manifestInfo;\n const fragmentDuration = _getFragmentDurationForLiveDelayCalculation(streamsInfo, manifestInfo);\n playbackController.computeAndSetLiveDelay(fragmentDuration, manifestInfo);\n }\n\n // Figure out the correct start time and the correct start period\n const startTime = _getInitialStartTime();\n let initialStream = getStreamForTime(startTime);\n const startStream = initialStream !== null ? initialStream : streams[0];\n\n eventBus.trigger(Events.INITIAL_STREAM_SWITCH, { startTime });\n _switchStream(startStream, null, startTime);\n _startPlaybackEndedTimerInterval();\n }\n\n /**\n * Switch from the current stream (period) to the next stream (period).\n * @param {object} stream\n * @param {object} previousStream\n * @param {number} seekTime\n * @private\n */\n function _switchStream(stream, previousStream, seekTime) {\n try {\n if (isStreamSwitchingInProgress || !stream || (previousStream === stream && stream.getIsActive())) {\n return;\n }\n\n isStreamSwitchingInProgress = true;\n eventBus.trigger(Events.PERIOD_SWITCH_STARTED, {\n fromStreamInfo: previousStream ? previousStream.getStreamInfo() : null,\n toStreamInfo: stream.getStreamInfo()\n });\n\n let keepBuffers = false;\n activeStream = stream;\n\n if (previousStream) {\n keepBuffers = _canSourceBuffersBeReused(stream, previousStream);\n previousStream.deactivate(keepBuffers);\n }\n\n // Determine seek time when switching to new period\n // - seek at given seek time\n // - or seek at period start if upcoming period is not prebuffered\n seekTime = !isNaN(seekTime) ? seekTime : (!keepBuffers && previousStream ? stream.getStreamInfo().start : NaN);\n logger.info(`Switch to stream ${stream.getId()}. Seektime is ${seekTime}, current playback time is ${playbackController.getTime()}. Seamless period switch is set to ${keepBuffers}`);\n\n preloadingStreams = preloadingStreams.filter((s) => {\n return s.getId() !== activeStream.getId();\n });\n playbackController.initialize(getActiveStreamInfo(), !!previousStream);\n\n if (videoModel.getElement()) {\n _openMediaSource(seekTime, keepBuffers);\n }\n } catch (e) {\n isStreamSwitchingInProgress = false;\n }\n }\n\n /**\n * Setup the Media Source. Open MSE and attach event listeners\n * @param {number} seekTime\n * @param {boolean} keepBuffers\n * @private\n */\n function _openMediaSource(seekTime, keepBuffers) {\n let sourceUrl;\n\n function _onMediaSourceOpen() {\n // Manage situations in which a call to reset happens while MediaSource is being opened\n if (!mediaSource || mediaSource.readyState !== 'open') return;\n\n logger.debug('MediaSource is open!');\n window.URL.revokeObjectURL(sourceUrl);\n mediaSource.removeEventListener('sourceopen', _onMediaSourceOpen);\n mediaSource.removeEventListener('webkitsourceopen', _onMediaSourceOpen);\n\n _setMediaDuration();\n const dvrInfo = dashMetrics.getCurrentDVRInfo();\n mediaSourceController.setSeekable(dvrInfo.range.start, dvrInfo.range.end);\n _activateStream(seekTime, keepBuffers);\n }\n\n function _open() {\n mediaSource.addEventListener('sourceopen', _onMediaSourceOpen, false);\n mediaSource.addEventListener('webkitsourceopen', _onMediaSourceOpen, false);\n sourceUrl = mediaSourceController.attachMediaSource(videoModel);\n logger.debug('MediaSource attached to element. Waiting on open...');\n }\n\n if (!mediaSource) {\n mediaSource = mediaSourceController.createMediaSource();\n _open();\n } else {\n if (keepBuffers) {\n _activateStream(seekTime, keepBuffers);\n } else {\n mediaSourceController.detachMediaSource(videoModel);\n _open();\n }\n }\n }\n\n /**\n * Activates a new stream.\n * @param {number} seekTime\n * @param {boolean} keepBuffers\n */\n function _activateStream(seekTime, keepBuffers) {\n activeStream.activate(mediaSource, keepBuffers ? bufferSinks : undefined, seekTime)\n .then((sinks) => {\n // check if change type is supported by the browser\n if (sinks) {\n const keys = Object.keys(sinks);\n if (keys.length > 0 && sinks[keys[0]].getBuffer().changeType) {\n supportsChangeType = true;\n }\n bufferSinks = sinks;\n }\n\n // Set the initial time for this stream in the StreamProcessor\n if (!isNaN(seekTime)) {\n eventBus.trigger(Events.SEEK_TARGET, { time: seekTime }, { streamId: activeStream.getId() });\n playbackController.seek(seekTime, false, true);\n activeStream.startScheduleControllers();\n }\n\n isStreamSwitchingInProgress = false;\n eventBus.trigger(Events.PERIOD_SWITCH_COMPLETED, { toStreamInfo: getActiveStreamInfo() });\n });\n }\n\n /**\n * A playback seeking event was triggered. We need to disable the preloading streams and call the respective seeking handler.\n * We distinguish between inner period seeks and outer period seeks\n * @param {object} e\n * @private\n */\n function _onPlaybackSeeking(e) {\n const oldTime = playbackController.getTime();\n const newTime = e.seekTime;\n const seekToStream = getStreamForTime(newTime);\n\n if (!seekToStream || seekToStream === activeStream) {\n _cancelPreloading(oldTime, newTime);\n _handleInnerPeriodSeek(e);\n } else if (seekToStream && seekToStream !== activeStream) {\n _cancelPreloading(oldTime, newTime, seekToStream);\n _handleOuterPeriodSeek(e, seekToStream);\n }\n\n _createPlaylistMetrics(PlayList.SEEK_START_REASON);\n }\n\n /**\n * Cancels the preloading of certain streams based on the position we are seeking to.\n * @param {number} oldTime\n * @param {number} newTime\n * @param {boolean} isInnerPeriodSeek\n * @private\n */\n function _cancelPreloading(oldTime, newTime, seekToStream = null) {\n // Inner period seek forward\n if (oldTime <= newTime && !seekToStream) {\n _deactivateAllPreloadingStreams();\n }\n\n // Inner period seek: If we seek backwards we might need to prune the period(s) that are currently being prebuffered. For now deactivate everything\n else if (oldTime > newTime && !seekToStream) {\n _deactivateAllPreloadingStreams();\n }\n\n // Outer period seek: Deactivate everything for now\n else {\n _deactivateAllPreloadingStreams();\n }\n\n }\n\n /**\n * Deactivates all preloading streams\n * @private\n */\n function _deactivateAllPreloadingStreams() {\n if (preloadingStreams && preloadingStreams.length > 0) {\n preloadingStreams.forEach((s) => {\n s.deactivate(true);\n });\n preloadingStreams = [];\n }\n }\n\n /**\n * Handle an inner period seek. Prepare all StreamProcessors for the seek.\n * @param {object} e\n * @private\n */\n function _handleInnerPeriodSeek(e) {\n const streamProcessors = activeStream.getProcessors();\n\n streamProcessors.forEach((sp) => {\n return sp.prepareInnerPeriodPlaybackSeeking(e);\n });\n\n _flushPlaylistMetrics(PlayListTrace.USER_REQUEST_STOP_REASON);\n }\n\n /**\n * Handle an outer period seek. Dispatch the corresponding event to be handled in the BufferControllers and the ScheduleControllers\n * @param {object} e\n * @param {object} seekToStream\n * @private\n */\n function _handleOuterPeriodSeek(e, seekToStream) {\n // Stop segment requests\n const seekTime = e && !isNaN(e.seekTime) ? e.seekTime : NaN;\n const streamProcessors = activeStream.getProcessors();\n\n const promises = streamProcessors.map((sp) => {\n // Cancel everything in case the active stream is still buffering\n return sp.prepareOuterPeriodPlaybackSeeking(e);\n });\n\n Promise.all(promises)\n .then(() => {\n _switchStream(seekToStream, activeStream, seekTime);\n })\n .catch((e) => {\n errHandler.error(e);\n });\n }\n\n /**\n * A track change occured. We deactivate the preloading streams\n * @param {object} e\n * @private\n */\n function _onCurrentTrackChanged(e) {\n // Track was changed in non active stream. No need to do anything, this only happens when a stream starts preloading\n if (e.newMediaInfo.streamInfo.id !== activeStream.getId()) {\n return;\n }\n\n // If the track was changed in the active stream we need to stop preloading and remove the already prebuffered stuff. Since we do not support preloading specific handling of specific AdaptationSets yet.\n _deactivateAllPreloadingStreams();\n\n activeStream.prepareTrackChange(e);\n }\n\n /**\n * If the source buffer can be reused we can potentially start buffering the next period\n * @param {object} nextStream\n * @param {object} previousStream\n * @return {boolean}\n * @private\n */\n function _canSourceBuffersBeReused(nextStream, previousStream) {\n try {\n // Seamless period switch allowed only if:\n // - none of the periods uses contentProtection.\n // - AND changeType method implemented by browser or periods use the same codec.\n return (settings.get().streaming.buffer.reuseExistingSourceBuffers && (previousStream.isProtectionCompatible(nextStream) || firstLicenseIsFetched) && (supportsChangeType || previousStream.isMediaCodecCompatible(nextStream, previousStream)));\n } catch (e) {\n return false;\n }\n }\n\n /**\n * Initiate the preloading of the next stream\n * @param {object} nextStream\n * @param {object} previousStream\n * @private\n */\n function _onStreamCanLoadNext(nextStream, previousStream = null) {\n\n if (mediaSource && !nextStream.getPreloaded()) {\n let seamlessPeriodSwitch = _canSourceBuffersBeReused(nextStream, previousStream);\n\n if (seamlessPeriodSwitch) {\n nextStream.startPreloading(mediaSource, bufferSinks)\n .then(() => {\n preloadingStreams.push(nextStream);\n });\n }\n }\n }\n\n /**\n * Returns the corresponding stream object for a specific presentation time.\n * @param {number} time\n * @return {null|object}\n */\n function getStreamForTime(time) {\n\n if (isNaN(time)) {\n return null;\n }\n\n const ln = streams.length;\n\n for (let i = 0; i < ln; i++) {\n const stream = streams[i];\n const streamEnd = parseFloat((stream.getStartTime() + stream.getDuration()).toFixed(5));\n\n if (time < streamEnd) {\n return stream;\n }\n }\n\n return null;\n }\n\n /**\n * Add the DVR window to the metric list. We need the DVR window to restrict the seeking and calculate the right start time.\n */\n function addDVRMetric() {\n try {\n const isDynamic = adapter.getIsDynamic();\n const streamsInfo = adapter.getStreamsInfo();\n const manifestInfo = streamsInfo[0].manifestInfo;\n const time = playbackController.getTime();\n const range = timelineConverter.calcTimeShiftBufferWindow(streams, isDynamic);\n const activeStreamProcessors = getActiveStreamProcessors();\n\n if (typeof range.start === 'undefined' || typeof range.end === 'undefined') {\n return;\n }\n\n if (!activeStreamProcessors || activeStreamProcessors.length === 0) {\n dashMetrics.addDVRInfo(Constants.VIDEO, time, manifestInfo, range);\n } else {\n activeStreamProcessors.forEach((sp) => {\n dashMetrics.addDVRInfo(sp.getType(), time, manifestInfo, range);\n });\n }\n } catch (e) {\n }\n }\n\n /**\n * The buffer level for a certain media type has been updated. If this is the initial playback and we want to autoplay the content we check if we can start playback now.\n * For livestreams we might have a drift of the target live delay compared to the current live delay because reaching the initial buffer level took time.\n * @param {object} e\n * @private\n */\n function _onBufferLevelUpdated(e) {\n\n // check if this is the initial playback and we reached the buffer target. If autoplay is true we start playback\n if (initialPlayback && autoPlay) {\n const initialBufferLevel = mediaPlayerModel.getInitialBufferLevel();\n const excludedStreamProcessors = [Constants.TEXT];\n if (isNaN(initialBufferLevel) || initialBufferLevel <= playbackController.getBufferLevel(excludedStreamProcessors) || (adapter.getIsDynamic() && initialBufferLevel > playbackController.getLiveDelay())) {\n initialPlayback = false;\n _createPlaylistMetrics(PlayList.INITIAL_PLAYOUT_START_REASON);\n playbackController.play();\n }\n }\n\n if (e && e.mediaType) {\n dashMetrics.addBufferLevel(e.mediaType, new Date(), e.bufferLevel * 1000);\n }\n }\n\n /**\n * When the quality is changed in the currently active stream and we do an aggressive replacement we must stop prebuffering. This is similar to a replacing track switch\n * Otherwise preloading can go on.\n * @param e\n * @private\n */\n function _onQualityChanged(e) {\n if (e.streamInfo.id === activeStream.getId() && e.reason && e.reason.forceReplace) {\n _deactivateAllPreloadingStreams();\n }\n\n const stream = getStreamById(e.streamInfo.id);\n\n stream.prepareQualityChange(e);\n }\n\n /**\n * When the playback time is updated we add the droppedFrames metric to the dash metric object\n * @private\n */\n function _onPlaybackTimeUpdated(/*e*/) {\n if (hasVideoTrack()) {\n const playbackQuality = videoModel.getPlaybackQuality();\n if (playbackQuality) {\n dashMetrics.addDroppedFrames(playbackQuality);\n }\n }\n }\n\n /**\n * Once playback starts add playlist metrics depending on whether this was the first playback or playback resumed after pause\n * @private\n */\n function _onPlaybackStarted( /*e*/) {\n logger.debug('[onPlaybackStarted]');\n if (!initialPlayback && isPaused) {\n _createPlaylistMetrics(PlayList.RESUME_FROM_PAUSE_START_REASON);\n }\n if (initialPlayback) {\n initialPlayback = false;\n }\n isPaused = false;\n }\n\n /**\n * Once playback is paused flush metrics\n * @param {object} e\n * @private\n */\n function _onPlaybackPaused(e) {\n logger.debug('[onPlaybackPaused]');\n if (!e.ended) {\n isPaused = true;\n _flushPlaylistMetrics(PlayListTrace.USER_REQUEST_STOP_REASON);\n }\n }\n\n /**\n * Callback once a stream/period is completely buffered. We can either signal the end of the stream or start prebuffering the next period.\n * @param {object} e\n * @private\n */\n function _onStreamBufferingCompleted(e) {\n logger.debug(`Stream with id ${e.streamInfo.id} finished buffering`);\n const isLast = e.streamInfo.isLast;\n if (mediaSource && isLast) {\n logger.info('[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController.');\n mediaSourceController.signalEndOfStream(mediaSource);\n } else {\n _checkIfPrebufferingCanStart();\n }\n }\n\n /**\n * Check if we can start prebuffering the next period.\n * @private\n */\n function _checkIfPrebufferingCanStart() {\n // In multiperiod situations, we can start buffering the next stream\n if (!activeStream || !activeStream.getHasFinishedBuffering()) {\n return;\n }\n const upcomingStreams = _getNextStreams(activeStream);\n let i = 0;\n\n while (i < upcomingStreams.length) {\n const stream = upcomingStreams[i];\n const previousStream = i === 0 ? activeStream : upcomingStreams[i - 1];\n\n // If the preloading for the current stream is not scheduled, but its predecessor has finished buffering we can start prebuffering this stream\n if (!stream.getPreloaded() && previousStream.getHasFinishedBuffering()) {\n if (mediaSource) {\n _onStreamCanLoadNext(stream, previousStream);\n }\n }\n i += 1;\n }\n }\n\n /**\n * In some cases we need to fire the playback ended event manually\n * @private\n */\n function _startPlaybackEndedTimerInterval() {\n if (!playbackEndedTimerInterval) {\n playbackEndedTimerInterval = setInterval(function () {\n if (!isStreamSwitchingInProgress && playbackController.getTimeToStreamEnd() <= 0 && !playbackController.isSeeking()) {\n eventBus.trigger(Events.PLAYBACK_ENDED, { 'isLast': getActiveStreamInfo().isLast });\n }\n }, PLAYBACK_ENDED_TIMER_INTERVAL);\n }\n }\n\n /**\n * Stop the check if the playback has ended\n * @private\n */\n function _stopPlaybackEndedTimerInterval() {\n if (playbackEndedTimerInterval) {\n clearInterval(playbackEndedTimerInterval);\n playbackEndedTimerInterval = null;\n }\n }\n\n /**\n * Returns a playhead time, in seconds, converted to be relative\n * to the start of an identified stream/period or null if no such stream\n * @param {number} time\n * @param {string} id\n * @returns {number|null}\n */\n function getTimeRelativeToStreamId(time, id) {\n let stream = null;\n let baseStart = 0;\n let streamStart = 0;\n let streamDur = null;\n\n for (let i = 0; i < streams.length; i++) {\n stream = streams[i];\n streamStart = stream.getStartTime();\n streamDur = stream.getDuration();\n\n // use start time, if not undefined or NaN or similar\n if (Number.isFinite(streamStart)) {\n baseStart = streamStart;\n }\n\n if (stream.getId() === id) {\n return time - baseStart;\n } else {\n // use duration if not undefined or NaN or similar\n if (Number.isFinite(streamDur)) {\n baseStart += streamDur;\n }\n }\n }\n\n return null;\n }\n\n /**\n * Returns the streamProcessors of the active stream.\n * @return {array}\n */\n function getActiveStreamProcessors() {\n return activeStream ? activeStream.getProcessors() : [];\n }\n\n /**\n * Once playback has ended we switch to the next stream\n * @param {object} e\n */\n function _onPlaybackEnded(e) {\n if (activeStream && !activeStream.getIsEndedEventSignaled()) {\n activeStream.setIsEndedEventSignaled(true);\n const nextStream = _getNextStream();\n if (nextStream) {\n logger.debug(`StreamController onEnded, found next stream with id ${nextStream.getStreamInfo().id}. Switching from ${activeStream.getStreamInfo().id} to ${nextStream.getStreamInfo().id}`);\n _switchStream(nextStream, activeStream, NaN);\n } else {\n logger.debug('StreamController no next stream found');\n activeStream.setIsEndedEventSignaled(false);\n }\n _flushPlaylistMetrics(nextStream ? PlayListTrace.END_OF_PERIOD_STOP_REASON : PlayListTrace.END_OF_CONTENT_STOP_REASON);\n }\n if (e && e.isLast) {\n _stopPlaybackEndedTimerInterval();\n }\n }\n\n /**\n * Returns the next stream to be played relative to the stream provided. If no stream is provided we use the active stream.\n * In order to avoid rounding issues we should not use the duration of the periods. Instead find the stream with starttime closest to startTime of the previous stream.\n * @param {object} stream\n * @return {null|object}\n */\n function _getNextStream(stream = null) {\n const refStream = stream ? stream : activeStream ? activeStream : null;\n\n if (!refStream) {\n return null;\n }\n\n const refStreamInfo = refStream.getStreamInfo();\n const start = refStreamInfo.start;\n let i = 0;\n let targetIndex = -1;\n let lastDiff = NaN;\n\n while (i < streams.length) {\n const s = streams[i];\n const sInfo = s.getStreamInfo();\n const diff = sInfo.start - start;\n\n if (diff > 0 && (isNaN(lastDiff) || diff < lastDiff) && refStreamInfo.id !== sInfo.id) {\n lastDiff = diff;\n targetIndex = i;\n }\n\n i += 1;\n }\n\n if (targetIndex >= 0) {\n return streams[targetIndex];\n }\n\n return null;\n }\n\n /**\n * Returns all upcoming streams relative to the provided stream. If no stream is provided we use the active stream.\n * @param {object} stream\n * @return {array}\n */\n function _getNextStreams(stream = null) {\n try {\n const refStream = stream ? stream : activeStream ? activeStream : null;\n\n if (refStream) {\n const refStreamInfo = refStream.getStreamInfo();\n\n return streams.filter(function (stream) {\n const sInfo = stream.getStreamInfo();\n return sInfo.start > refStreamInfo.start && refStreamInfo.id !== sInfo.id;\n });\n }\n } catch (e) {\n return [];\n }\n }\n\n /**\n * Sets the duration attribute of the MediaSource using the MediaSourceController.\n * @param {number} duration\n * @private\n */\n function _setMediaDuration(duration) {\n const manifestDuration = duration ? duration : getActiveStreamInfo().manifestInfo.duration;\n mediaSourceController.setDuration(manifestDuration);\n }\n\n /**\n * Returns the active stream\n * @return {object}\n */\n function getActiveStream() {\n return activeStream;\n }\n\n /**\n * Initial playback indicates if we have called play() for the first time yet.\n * @return {*}\n */\n function getInitialPlayback() {\n return initialPlayback;\n }\n\n /**\n * Auto Play indicates if the stream starts automatically as soon as it is initialized.\n * @return {boolean}\n */\n function getAutoPlay() {\n return autoPlay;\n }\n\n /**\n * Called once the first stream has been initialized. We only use this function to seek to the right start time.\n * @return {number}\n * @private\n */\n function _getInitialStartTime() {\n // Seek new stream in priority order:\n // - at start time provided in URI parameters\n // - at stream/period start time (for static streams) or live start time (for dynamic streams)\n let startTime;\n if (adapter.getIsDynamic()) {\n // For dynamic stream, start by default at (live edge - live delay)\n const dvrInfo = dashMetrics.getCurrentDVRInfo();\n const liveEdge = dvrInfo && dvrInfo.range ? dvrInfo.range.end : 0;\n // we are already in the right start period. so time should not be smaller than period@start and should not be larger than period@end\n startTime = liveEdge - playbackController.getLiveDelay();\n // If start time in URI, take min value between live edge time and time from URI (capped by DVR window range)\n const dvrWindow = dvrInfo ? dvrInfo.range : null;\n if (dvrWindow) {\n // #t shall be relative to period start\n const startTimeFromUri = _getStartTimeFromUriParameters(true);\n if (!isNaN(startTimeFromUri)) {\n logger.info('Start time from URI parameters: ' + startTimeFromUri);\n // If calcFromSegmentTimeline is enabled we saw problems caused by the MSE.seekableRange when starting at dvrWindow.start. Apply a small offset to avoid this problem.\n const offset = settings.get().streaming.timeShiftBuffer.calcFromSegmentTimeline ? 0.1 : 0;\n startTime = Math.max(Math.min(startTime, startTimeFromUri), dvrWindow.start + offset);\n }\n }\n } else {\n // For static stream, start by default at period start\n const streams = getStreams();\n const streamInfo = streams[0].getStreamInfo();\n startTime = streamInfo.start;\n // If start time in URI, take max value between period start and time from URI (if in period range)\n const startTimeFromUri = _getStartTimeFromUriParameters(false);\n if (!isNaN(startTimeFromUri)) {\n logger.info('Start time from URI parameters: ' + startTimeFromUri);\n startTime = Math.max(startTime, startTimeFromUri);\n }\n }\n\n return startTime;\n }\n\n /**\n * 23009-1 Annex C.4 defines MPD anchors to use URI fragment syntax to start a presentation at a given time and a given state\n * @param {boolean} isDynamic\n * @return {number}\n * @private\n */\n function _getStartTimeFromUriParameters(isDynamic) {\n const fragData = uriFragmentModel.getURIFragmentData();\n if (!fragData || !fragData.t) {\n return NaN;\n }\n const refStream = getStreams()[0];\n const refStreamStartTime = refStream.getStreamInfo().start;\n // Consider only start time of MediaRange\n // TODO: consider end time of MediaRange to stop playback at provided end time\n fragData.t = fragData.t.split(',')[0];\n // \"t=