dashjs
Version:
A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.
1 lines • 100 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.dashjs=t():e.dashjs=t()}(self,(function(){return function(){var e={6398:function(e,t,n){"use strict";var r=n(5595),a=n(8512),i=n(5448),o=1,s=2,u=3,c=4,l=5;function f(e){e=e||{};var t,n,i,f,d=this.context,h=(0,r.Z)(d).getInstance(),g=e.settings,m=[];function p(e){return e&&e.bind?e.bind(window.console):window.console.log.bind(window.console)}function E(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];A.apply(void 0,[o,this].concat(t))}function _(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];A.apply(void 0,[s,this].concat(t))}function y(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];A.apply(void 0,[u,this].concat(t))}function T(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];A.apply(void 0,[c,this].concat(t))}function b(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];A.apply(void 0,[l,this].concat(t))}function A(e,t){var r="",o=null;n&&(o=(new Date).getTime(),r+="["+(o-f)+"]"),i&&t&&t.getClassName&&(r+="["+t.getClassName()+"]",t.getType&&(r+="["+t.getType()+"]")),r.length>0&&(r+=" ");for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];Array.apply(null,u).forEach((function(e){r+=e+" "})),m[e]&&g&&g.get().debug.logLevel>=e&&m[e](r),g&&g.get().debug.dispatchEvent&&h.trigger(a.Z.LOG,{message:r,level:e})}return t={getLogger:function(e){return{fatal:E.bind(e),error:_.bind(e),warn:y.bind(e),info:T.bind(e),debug:b.bind(e)}},setLogTimestampVisible:function(e){n=e},setCalleeNameVisible:function(e){i=e}},n=!0,i=!0,f=(new Date).getTime(),"undefined"!=typeof window&&window.console&&(m[o]=p(window.console.error),m[s]=p(window.console.error),m[u]=p(window.console.warn),m[c]=p(window.console.info),m[l]=p(window.console.debug)),t}f.__dashjs_factory_name="Debug";var d=i.Z.getSingletonFactory(f);d.LOG_LEVEL_NONE=0,d.LOG_LEVEL_FATAL=o,d.LOG_LEVEL_ERROR=s,d.LOG_LEVEL_WARNING=u,d.LOG_LEVEL_INFO=c,d.LOG_LEVEL_DEBUG=l,i.Z.updateSingletonFactory(f.__dashjs_factory_name,d),t.Z=d},5595:function(e,t,n){"use strict";var r=n(5448),a=n(8825);function i(){var e={};function t(t,n,r){var a=-1;return e[t]?(e[t].some((function(e,t){if(e&&e.callback===n&&(!r||r===e.scope))return a=t,!0})),a):a}var n={on:function(n,r,a){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!n)throw new Error("event type cannot be null or undefined");if(!r||"function"!=typeof r)throw new Error("listener must be a function: "+r);var o=i.priority||0;if(!(t(n,r,a)>=0)){e[n]=e[n]||[];var s={callback:r,scope:a,priority:o};a&&a.getStreamId&&(s.streamId=a.getStreamId()),a&&a.getType&&(s.mediaType=a.getType()),i&&i.mode&&(s.mode=i.mode);var u=e[n].some((function(t,r){if(t&&o>t.priority)return e[n].splice(r,0,s),!0}));u||e[n].push(s)}},off:function(n,r,a){if(n&&r&&e[n]){var i=t(n,r,a);i<0||(e[n][i]=null)}},trigger:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t&&e[t]){if((n=n||{}).hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");n.type=t,r.streamId&&(n.streamId=r.streamId),r.mediaType&&(n.mediaType=r.mediaType),e[t].filter((function(e){return!(!e||r.streamId&&e.streamId&&e.streamId!==r.streamId||r.mediaType&&e.mediaType&&e.mediaType!==r.mediaType||r.mode&&e.mode&&e.mode!==r.mode||!e.mode&&r.mode&&r.mode===a.Z.EVENT_MODE_ON_RECEIVE)})).forEach((function(e){return e&&e.callback.call(e.scope,n)}))}},reset:function(){e={}}};return n}i.__dashjs_factory_name="EventBus";var o=r.Z.getSingletonFactory(i);o.EVENT_PRIORITY_LOW=0,o.EVENT_PRIORITY_HIGH=5e3,r.Z.updateSingletonFactory(i.__dashjs_factory_name,o),t.Z=o},5448:function(e,t){"use strict";var n=function(){var e,t=[],n={},r={};function a(e,n){for(var r in t){var a=t[r];if(a.context===e&&a.name===n)return a.instance}return null}function i(e,t){return t[e]}function o(e,t,n){e in n&&(n[e]=t)}function s(t,n,r){var a,i=t.__dashjs_factory_name,o=n[i];if(o){var s=o.instance;if(!o.override)return s.apply({context:n,factory:e},r);for(var u in a=t.apply({context:n},r),s=s.apply({context:n,factory:e,parent:a},r))a.hasOwnProperty(u)&&(a[u]=s[u])}else a=t.apply({context:n},r);return a.getClassName=function(){return i},a}return e={extend:function(e,t,n,r){!r[e]&&t&&(r[e]={instance:t,override:n})},getSingletonInstance:a,setSingletonInstance:function(e,n,r){for(var a in t){var i=t[a];if(i.context===e&&i.name===n)return void(t[a].instance=r)}t.push({name:n,context:e,instance:r})},deleteSingletonInstances:function(e){t=t.filter((function(t){return t.context!==e}))},getSingletonFactory:function(e){var r=i(e.__dashjs_factory_name,n);return r||(r=function(n){var r;return void 0===n&&(n={}),{getInstance:function(){return r||(r=a(n,e.__dashjs_factory_name)),r||(r=s(e,n,arguments),t.push({name:e.__dashjs_factory_name,context:n,instance:r})),r}}},n[e.__dashjs_factory_name]=r),r},getSingletonFactoryByName:function(e){return i(e,n)},updateSingletonFactory:function(e,t){o(e,t,n)},getClassFactory:function(e){var t=i(e.__dashjs_factory_name,r);return t||(t=function(t){return void 0===t&&(t={}),{create:function(){return s(e,t,arguments)}}},r[e.__dashjs_factory_name]=t),t},getClassFactoryByName:function(e){return i(e,r)},updateClassFactory:function(e,t){o(e,t,r)}},e}();t.Z=n},1264:function(e,t,n){"use strict";var r=n(5448),a=n(703),i=n(6398),o=n(3393),s=n(7855),u=n(5595),c=n(8512);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(){var e,t,n=this.context,r=(0,u.Z)(n).getInstance(),d={"streaming.delay.liveDelay":c.Z.SETTING_UPDATED_LIVE_DELAY,"streaming.delay.liveDelayFragmentCount":c.Z.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,"streaming.liveCatchup.enabled":c.Z.SETTING_UPDATED_CATCHUP_ENABLED,"streaming.liveCatchup.playbackRate.min":c.Z.SETTING_UPDATED_PLAYBACK_RATE_MIN,"streaming.liveCatchup.playbackRate.max":c.Z.SETTING_UPDATED_PLAYBACK_RATE_MAX},h={debug:{logLevel:i.Z.LOG_LEVEL_WARNING,dispatchEvent:!1},streaming:{abandonLoadTimeout:1e4,wallclockTimeUpdateInterval:100,manifestUpdateRetryInterval:100,liveUpdateTimeThresholdInMilliseconds:0,cacheInitSegments:!1,applyServiceDescription:!0,applyProducerReferenceTime:!0,applyContentSteering:!0,eventControllerRefreshDelay:100,enableManifestDurationMismatchFix:!0,parseInbandPrft:!1,enableManifestTimescaleMismatchFix:!1,capabilities:{filterUnsupportedEssentialProperties:!0,useMediaCapabilitiesApi:!1},timeShiftBuffer:{calcFromSegmentTimeline:!1,fallbackToSegmentTimeline:!0},metrics:{maxListDepth:100},delay:{liveDelayFragmentCount:NaN,liveDelay:NaN,useSuggestedPresentationDelay:!0},protection:{keepProtectionMediaKeys:!1,ignoreEmeEncryptedEvent:!1,detectPlayreadyMessageFormat:!0},buffer:{enableSeekDecorrelationFix:!1,fastSwitchEnabled:!0,flushBufferAtTrackSwitch:!1,reuseExistingSourceBuffers:!0,bufferPruningInterval:10,bufferToKeep:20,bufferTimeAtTopQuality:30,bufferTimeAtTopQualityLongForm:60,initialBufferLevel:NaN,stableBufferTime:12,longFormContentDurationThreshold:600,stallThreshold:.3,useAppendWindow:!0,setStallState:!0,avoidCurrentTimeRangePruning:!1,useChangeTypeForTrackSwitch:!0,mediaSourceDurationInfinity:!0,resetSourceBuffersForTrackSwitch:!1},gaps:{jumpGaps:!0,jumpLargeGaps:!0,smallGapLimit:1.5,threshold:.3,enableSeekFix:!0,enableStallFix:!1,stallSeek:.1},utcSynchronization:{enabled:!0,useManifestDateHeaderTimeSource:!0,backgroundAttempts:2,timeBetweenSyncAttempts:30,maximumTimeBetweenSyncAttempts:600,minimumTimeBetweenSyncAttempts:2,timeBetweenSyncAttemptsAdjustmentFactor:2,maximumAllowedDrift:100,enableBackgroundSyncAfterSegmentDownloadError:!0,defaultTimingSource:{scheme:"urn:mpeg:dash:utc:http-xsdate:2014",value:"https://time.akamai.com/?iso&ms"}},scheduling:{defaultTimeout:500,lowLatencyTimeout:0,scheduleWhilePaused:!0},text:{defaultEnabled:!0,dispatchForManualRendering:!1,extendSegmentedCues:!0,imsc:{displayForcedOnlyMode:!1,enableRollUp:!0},webvtt:{customRenderingEnabled:!1}},liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN},playbackBufferMin:.5,enabled:null,mode:o.Z.LIVE_CATCHUP_MODE_DEFAULT},lastBitrateCachingInfo:{enabled:!0,ttl:36e4},lastMediaSettingsCachingInfo:{enabled:!0,ttl:36e4},saveLastMediaSettingsForCurrentStreamingSession:!0,cacheLoadThresholds:{video:50,audio:5},trackSwitchMode:{audio:o.Z.TRACK_SWITCH_MODE_ALWAYS_REPLACE,video:o.Z.TRACK_SWITCH_MODE_NEVER_REPLACE},selectionModeForInitialTrack:o.Z.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY,fragmentRequestTimeout:2e4,fragmentRequestProgressTimeout:-1,manifestRequestTimeout:1e4,retryIntervals:(e={},f(e,s.w.MPD_TYPE,500),f(e,s.w.XLINK_EXPANSION_TYPE,500),f(e,s.w.MEDIA_SEGMENT_TYPE,1e3),f(e,s.w.INIT_SEGMENT_TYPE,1e3),f(e,s.w.BITSTREAM_SWITCHING_SEGMENT_TYPE,1e3),f(e,s.w.INDEX_SEGMENT_TYPE,1e3),f(e,s.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE,1e3),f(e,s.w.LICENSE,1e3),f(e,s.w.OTHER_TYPE,1e3),f(e,"lowLatencyReductionFactor",10),e),retryAttempts:(t={},f(t,s.w.MPD_TYPE,3),f(t,s.w.XLINK_EXPANSION_TYPE,1),f(t,s.w.MEDIA_SEGMENT_TYPE,3),f(t,s.w.INIT_SEGMENT_TYPE,3),f(t,s.w.BITSTREAM_SWITCHING_SEGMENT_TYPE,3),f(t,s.w.INDEX_SEGMENT_TYPE,3),f(t,s.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE,3),f(t,s.w.LICENSE,3),f(t,s.w.OTHER_TYPE,3),f(t,"lowLatencyMultiplyFactor",5),t),abr:{movingAverageMethod:o.Z.MOVING_AVERAGE_SLIDING_WINDOW,ABRStrategy:o.Z.ABR_STRATEGY_DYNAMIC,additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0,abandonRequestsRule:!0},abrRulesParameters:{abandonRequestsRule:{graceTimeThreshold:500,abandonMultiplier:1.8,minLengthToAverage:5}},bandwidthSafetyFactor:.9,useDefaultABRRules:!0,useDeadTimeLatency:!0,limitBitrateByPortal:!1,usePixelRatioInLimitBitrateByPortal:!1,maxBitrate:{audio:-1,video:-1},minBitrate:{audio:-1,video:-1},maxRepresentationRatio:{audio:1,video:1},initialBitrate:{audio:-1,video:-1},initialRepresentationRatio:{audio:-1,video:-1},autoSwitchBitrate:{audio:!0,video:!0},fetchThroughputCalculationMode:o.Z.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING},cmcd:{enabled:!1,sid:null,cid:null,rtp:null,rtpSafetyFactor:5,mode:o.Z.CMCD_MODE_QUERY,enabledKeys:["br","d","ot","tb","bl","dl","mtp","nor","nrr","su","bs","rtp","cid","pr","sf","sid","st","v"]},cmsd:{enabled:!1,abr:{applyMb:!1,etpWeightRatio:0}}},errors:{recoverAttempts:{mediaErrorDecode:5}}},g=a.Z.clone(h);function m(e,t,n){for(var i in e)e.hasOwnProperty(i)&&(t.hasOwnProperty(i)?"object"!==l(e[i])||e[i]instanceof Array||null===e[i]?(t[i]=a.Z.clone(e[i]),d[n+i]&&r.trigger(d[n+i])):m(e[i],t[i],n.slice()+i+"."):console.error("Settings parameter "+n+i+" is not supported"))}return{get:function(){return g},update:function(e){"object"===l(e)&&m(e,g,"")},reset:function(){g=a.Z.clone(h)}}}d.__dashjs_factory_name="Settings";var h=r.Z.getSingletonFactory(d);t.Z=h},703:function(e,t,n){"use strict";var r=n(3875),a=n.n(r),i=n(1067);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"mixin",value:function(t,n,r){var a,i={};if(t)for(var s in n)n.hasOwnProperty(s)&&(a=n[s],s in t&&(t[s]===a||s in i&&i[s]===a)||("object"===o(t[s])&&null!==t[s]?t[s]=e.mixin(t[s],a,r):t[s]=r(a)));return t}},{key:"clone",value:function(t){if(!t||"object"!==o(t))return t;var n;if(t instanceof Array){n=[];for(var r=0,a=t.length;r<a;++r)r in t&&n.push(e.clone(t[r]))}else n={};return e.mixin(n,t,e.clone)}},{key:"addAditionalQueryParameterToUrl",value:function(e,t){try{if(!t||0===t.length)return e;var n=new URL(e);return t.forEach((function(e){e.key&&e.value&&n.searchParams.set(e.key,e.value)})),n.href}catch(t){return e}}},{key:"parseHttpHeaders",value:function(e){var t={};if(!e)return t;for(var n=e.trim().split("\r\n"),r=0,a=n.length;r<a;r++){var i=n[r],o=i.indexOf(": ");o>0&&(t[i.substring(0,o)]=i.substring(o+2))}return t}},{key:"generateUuid",value:function(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)}))}},{key:"generateHashCode",value:function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}},{key:"getRelativeUrl",value:function(e,t){try{var n=new URL(e),r=new URL(t);if(n.protocol=r.protocol,n.origin!==r.origin)return t;var i=a().relative(n.pathname.substr(0,n.pathname.lastIndexOf("/")),r.pathname.substr(0,r.pathname.lastIndexOf("/"))),o=0===i.length?1:0;return i+=r.pathname.substr(r.pathname.lastIndexOf("/")+o,r.pathname.length-1),r.pathname.length<i.length?r.pathname:i}catch(e){return t}}},{key:"parseUserAgent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;try{var t=null===e&&"undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"";return(0,i.UAParser)(t)}catch(e){return{}}}},{key:"stringHasProtocol",value:function(e){return/(http(s?)):\/\//i.test(e)}}],null&&s(t.prototype,null),n&&s(t,n),e}();t.Z=u},4351:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=o(t);if(n){var a=o(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return i(this,e)});function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=r.call(this)).ATTEMPT_BACKGROUND_SYNC="attemptBackgroundSync",e.BUFFERING_COMPLETED="bufferingCompleted",e.BUFFER_CLEARED="bufferCleared",e.BYTES_APPENDED_END_FRAGMENT="bytesAppendedEndFragment",e.BUFFER_REPLACEMENT_STARTED="bufferReplacementStarted",e.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",e.CMSD_STATIC_HEADER="cmsdStaticHeader",e.CURRENT_TRACK_CHANGED="currentTrackChanged",e.DATA_UPDATE_COMPLETED="dataUpdateCompleted",e.INBAND_EVENTS="inbandEvents",e.INITIAL_STREAM_SWITCH="initialStreamSwitch",e.INIT_FRAGMENT_LOADED="initFragmentLoaded",e.INIT_FRAGMENT_NEEDED="initFragmentNeeded",e.INTERNAL_MANIFEST_LOADED="internalManifestLoaded",e.ORIGINAL_MANIFEST_LOADED="originalManifestLoaded",e.LOADING_COMPLETED="loadingCompleted",e.LOADING_PROGRESS="loadingProgress",e.LOADING_DATA_PROGRESS="loadingDataProgress",e.LOADING_ABANDONED="loadingAborted",e.MANIFEST_UPDATED="manifestUpdated",e.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",e.MEDIA_FRAGMENT_NEEDED="mediaFragmentNeeded",e.QUOTA_EXCEEDED="quotaExceeded",e.SEGMENT_LOCATION_BLACKLIST_ADD="segmentLocationBlacklistAdd",e.SEGMENT_LOCATION_BLACKLIST_CHANGED="segmentLocationBlacklistChanged",e.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD="serviceLocationBlacklistAdd",e.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",e.SERVICE_LOCATION_LOCATION_BLACKLIST_ADD="serviceLocationLocationBlacklistAdd",e.SERVICE_LOCATION_LOCATION_BLACKLIST_CHANGED="serviceLocationLocationBlacklistChanged",e.SET_FRAGMENTED_TEXT_AFTER_DISABLED="setFragmentedTextAfterDisabled",e.SET_NON_FRAGMENTED_TEXT="setNonFragmentedText",e.SOURCE_BUFFER_ERROR="sourceBufferError",e.STREAMS_COMPOSED="streamsComposed",e.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",e.STREAM_REQUESTING_COMPLETED="streamRequestingCompleted",e.TEXT_TRACKS_QUEUE_INITIALIZED="textTracksQueueInitialized",e.TIME_SYNCHRONIZATION_COMPLETED="timeSynchronizationComplete",e.UPDATE_TIME_SYNC_OFFSET="updateTimeSyncOffset",e.URL_RESOLUTION_FAILED="urlResolutionFailed",e.VIDEO_CHUNK_RECEIVED="videoChunkReceived",e.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",e.XLINK_ELEMENT_LOADED="xlinkElementLoaded",e.XLINK_READY="xlinkReady",e.SEEK_TARGET="seekTarget",e.SETTING_UPDATED_LIVE_DELAY="settingUpdatedLiveDelay",e.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT="settingUpdatedLiveDelayFragmentCount",e.SETTING_UPDATED_CATCHUP_ENABLED="settingUpdatedCatchupEnabled",e.SETTING_UPDATED_PLAYBACK_RATE_MIN="settingUpdatedPlaybackRateMin",e.SETTING_UPDATED_PLAYBACK_RATE_MAX="settingUpdatedPlaybackRateMax",e}return s}(n(8342).Z);t.Z=s},8512:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}function o(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(u,e);var t,n,r=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=s(t);if(n){var a=s(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return o(this,e)});function u(){return a(this,u),r.apply(this,arguments)}return u}(n(4351).Z),c=new u;t.Z=c},8342:function(e,t){"use strict";function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,(r=[{key:"extend",value:function(e,t){if(e){var n=!!t&&t.override,r=!!t&&t.publicOnly;for(var a in e)!e.hasOwnProperty(a)||this[a]&&!n||r&&-1===e[a].indexOf("public_")||(this[a]=e[a])}}}])&&n(t.prototype,r),e}();t.Z=r},2610:function(e,t){"use strict";t.Z=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.schemeIdUri="",this.value=""}},8825:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var s=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=o(t);if(n){var a=o(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return i(this,e)});function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=r.call(this)).AST_IN_FUTURE="astInFuture",e.BASE_URLS_UPDATED="baseUrlsUpdated",e.BUFFER_EMPTY="bufferStalled",e.BUFFER_LOADED="bufferLoaded",e.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",e.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",e.DVB_FONT_DOWNLOAD_ADDED="dvbFontDownloadAdded",e.DVB_FONT_DOWNLOAD_COMPLETE="dvbFontDownloadComplete",e.DVB_FONT_DOWNLOAD_FAILED="dvbFontDownloadFailed",e.DYNAMIC_TO_STATIC="dynamicToStatic",e.ERROR="error",e.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",e.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",e.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",e.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",e.LOG="log",e.MANIFEST_LOADING_STARTED="manifestLoadingStarted",e.MANIFEST_LOADING_FINISHED="manifestLoadingFinished",e.MANIFEST_LOADED="manifestLoaded",e.METRICS_CHANGED="metricsChanged",e.METRIC_CHANGED="metricChanged",e.METRIC_ADDED="metricAdded",e.METRIC_UPDATED="metricUpdated",e.PERIOD_SWITCH_STARTED="periodSwitchStarted",e.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",e.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",e.QUALITY_CHANGE_RENDERED="qualityChangeRendered",e.TRACK_CHANGE_RENDERED="trackChangeRendered",e.STREAM_INITIALIZING="streamInitializing",e.STREAM_UPDATED="streamUpdated",e.STREAM_ACTIVATED="streamActivated",e.STREAM_DEACTIVATED="streamDeactivated",e.STREAM_INITIALIZED="streamInitialized",e.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",e.TEXT_TRACKS_ADDED="allTextTracksAdded",e.TEXT_TRACK_ADDED="textTrackAdded",e.CUE_ENTER="cueEnter",e.CUE_EXIT="cueExit",e.THROUGHPUT_MEASUREMENT_STORED="throughputMeasurementStored",e.TTML_PARSED="ttmlParsed",e.TTML_TO_PARSE="ttmlToParse",e.CAPTION_RENDERED="captionRendered",e.CAPTION_CONTAINER_RESIZE="captionContainerResize",e.CAN_PLAY="canPlay",e.CAN_PLAY_THROUGH="canPlayThrough",e.PLAYBACK_ENDED="playbackEnded",e.PLAYBACK_ERROR="playbackError",e.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",e.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",e.PLAYBACK_LOADED_DATA="playbackLoadedData",e.PLAYBACK_PAUSED="playbackPaused",e.PLAYBACK_PLAYING="playbackPlaying",e.PLAYBACK_PROGRESS="playbackProgress",e.PLAYBACK_RATE_CHANGED="playbackRateChanged",e.PLAYBACK_SEEKED="playbackSeeked",e.PLAYBACK_SEEKING="playbackSeeking",e.PLAYBACK_STALLED="playbackStalled",e.PLAYBACK_STARTED="playbackStarted",e.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",e.PLAYBACK_VOLUME_CHANGED="playbackVolumeChanged",e.PLAYBACK_WAITING="playbackWaiting",e.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged",e.EVENT_MODE_ON_START="eventModeOnStart",e.EVENT_MODE_ON_RECEIVE="eventModeOnReceive",e.CONFORMANCE_VIOLATION="conformanceViolation",e.REPRESENTATION_SWITCH="representationSwitch",e.ADAPTATION_SET_REMOVED_NO_CAPABILITIES="adaptationSetRemovedNoCapabilities",e.CONTENT_STEERING_REQUEST_COMPLETED="contentSteeringRequestCompleted",e.INBAND_PRFT="inbandPrft",e.MANAGED_MEDIA_SOURCE_START_STREAMING="managedMediaSourceStartStreaming",e.MANAGED_MEDIA_SOURCE_END_STREAMING="managedMediaSourceEndStreaming",e}return s}(n(8342).Z));t.Z=s},3393:function(e,t){"use strict";function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var r=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var t,r;return t=e,(r=[{key:"init",value:function(){this.STREAM="stream",this.VIDEO="video",this.AUDIO="audio",this.TEXT="text",this.MUXED="muxed",this.IMAGE="image",this.STPP="stpp",this.TTML="ttml",this.VTT="vtt",this.WVTT="wvtt",this.CONTENT_STEERING="contentSteering",this.ABR_STRATEGY_DYNAMIC="abrDynamic",this.ABR_STRATEGY_BOLA="abrBola",this.ABR_STRATEGY_L2A="abrL2A",this.ABR_STRATEGY_LoLP="abrLoLP",this.ABR_STRATEGY_THROUGHPUT="abrThroughput",this.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA="abrFetchThroughputCalculationDownloadedData",this.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING="abrFetchThroughputCalculationMoofParsing",this.ABR_FETCH_THROUGHPUT_CALCULATION_AAST="abrFetchThroughputCalculationAAST",this.LIVE_CATCHUP_MODE_DEFAULT="liveCatchupModeDefault",this.LIVE_CATCHUP_MODE_LOLP="liveCatchupModeLoLP",this.MOVING_AVERAGE_SLIDING_WINDOW="slidingWindow",this.MOVING_AVERAGE_EWMA="ewma",this.BAD_ARGUMENT_ERROR="Invalid Arguments",this.MISSING_CONFIG_ERROR="Missing config parameter(s)",this.TRACK_SWITCH_MODE_ALWAYS_REPLACE="alwaysReplace",this.TRACK_SWITCH_MODE_NEVER_REPLACE="neverReplace",this.TRACK_SELECTION_MODE_FIRST_TRACK="firstTrack",this.TRACK_SELECTION_MODE_HIGHEST_BITRATE="highestBitrate",this.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY="highestEfficiency",this.TRACK_SELECTION_MODE_WIDEST_RANGE="widestRange",this.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY="highestSelectionPriority",this.CMCD_MODE_QUERY="query",this.CMCD_MODE_HEADER="header",this.INITIALIZE="initialize",this.TEXT_SHOWING="showing",this.TEXT_HIDDEN="hidden",this.TEXT_DISABLED="disabled",this.CC1="CC1",this.CC3="CC3",this.UTF8="utf-8",this.SCHEME_ID_URI="schemeIdUri",this.START_TIME="starttime",this.SERVICE_DESCRIPTION_DVB_LL_SCHEME="urn:dvb:dash:lowlatency:scope:2019",this.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME="urn:dvb:dash:lowlatency:critical:2019",this.FONT_DOWNLOAD_DVB_SCHEME="urn:dvb:dash:fontdownload:2014",this.XML="XML",this.ARRAY_BUFFER="ArrayBuffer",this.DVB_REPORTING_URL="dvb:reportingUrl",this.DVB_PROBABILITY="dvb:probability",this.OFF_MIMETYPE="application/font-sfnt",this.WOFF_MIMETYPE="application/font-woff",this.VIDEO_ELEMENT_READY_STATES={HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4},this.FILE_LOADER_TYPES={FETCH:"fetch_loader",XHR:"xhr_loader"}}}])&&n(t.prototype,r),e}());t.Z=r},3860:function(e,t){"use strict";function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var r=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var t,r;return t=e,(r=[{key:"init",value:function(){this.TCP_CONNECTION="TcpList",this.HTTP_REQUEST="HttpList",this.TRACK_SWITCH="RepSwitchList",this.BUFFER_LEVEL="BufferLevel",this.BUFFER_LOADED="bufferLoaded",this.ABANDON_LOAD="abandonload",this.ALLOW_LOAD="allowload",this.BUFFER_EMPTY="bufferStalled",this.BUFFER_STATE="BufferState",this.DVR_INFO="DVRInfo",this.DROPPED_FRAMES="DroppedFrames",this.SCHEDULING_INFO="SchedulingInfo",this.REQUESTS_QUEUE="RequestsQueue",this.MANIFEST_UPDATE="ManifestUpdate",this.MANIFEST_UPDATE_STREAM_INFO="ManifestUpdatePeriodInfo",this.MANIFEST_UPDATE_TRACK_INFO="ManifestUpdateRepresentationInfo",this.PLAY_LIST="PlayList",this.DVB_ERRORS="DVBErrors",this.HTTP_REQUEST_DVB_REPORTING_TYPE="DVBReporting"}}])&&n(t.prototype,r),e}());t.Z=r},1180:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var s=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=o(t);if(n){var a=o(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return i(this,e)});function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=r.call(this)).METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",e.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer",e.CMCD_DATA_GENERATED="cmcdDataGenerated",e}return s}(n(8342).Z));t.Z=s},5717:function(e,t,n){"use strict";var r=n(2610),a=n(5448),i=n(1264),o=n(3106),s=n(1767),u=n(3393);function c(){var e,t,n,a,c,l,f,d,h=this.context,g=(0,i.Z)(h).getInstance();function m(){a=[],c=[],l=[],d=[],f=null,t=[]}function p(e,t){var n=-1;e.some((function(e,r){if(e===t)return n=r,!0})),n<0||e.splice(n,1)}function E(e){var t;for(t=0;t<d.length;t++)if(d[t].rulename===e)return t;return-1}function _(e,n){y(e,n);var a=new r.Z;a.schemeIdUri=e,a.value=n,t.push(a)}function y(e,n){(0,o.PS)(e,"string"),(0,o.PS)(n,"string"),t.forEach((function(r,a){r.schemeIdUri===e&&r.value===n&&t.splice(a,1)}))}return e={getCustomInitialTrackSelectionFunction:function(){return f},setCustomInitialTrackSelectionFunction:function(e){f=e},resetCustomInitialTrackSelectionFunction:function(){f=null},getLicenseResponseFilters:function(){return c},getLicenseRequestFilters:function(){return a},getCustomCapabilitiesFilters:function(){return l},registerCustomCapabilitiesFilter:function(e){l.push(e)},registerLicenseResponseFilter:function(e){c.push(e)},registerLicenseRequestFilter:function(e){a.push(e)},unregisterCustomCapabilitiesFilter:function(e){p(l,e)},unregisterLicenseResponseFilter:function(e){p(c,e)},unregisterLicenseRequestFilter:function(e){p(a,e)},addAbrCustomRule:function(e,t,n){if("string"!=typeof e||e!==s.Z.ABANDON_FRAGMENT_RULES&&e!==s.Z.QUALITY_SWITCH_RULES||"string"!=typeof t)throw u.Z.BAD_ARGUMENT_ERROR;var r=E(t);-1===r?d.push({type:e,rulename:t,rule:n}):(d[r].type=e,d[r].rule=n)},removeAllAbrCustomRule:function(){d=[]},removeAbrCustomRule:function(e){if(e){var t=E(e);-1!==t&&d.splice(t,1)}else d=[]},getAbrCustomRules:function(){return d},addUTCTimingSource:_,removeUTCTimingSource:y,getUTCTimingSources:function(){return t},clearDefaultUTCTimingSources:function(){t=[]},restoreDefaultUTCTimingSources:function(){var e=g.get().streaming.utcSynchronization.defaultTimingSource;_(e.scheme,e.value)},setXHRWithCredentialsForType:function e(t,r){t?n[t]=!!r:Object.keys(n).forEach((function(t){e(t,r)}))},getXHRWithCredentialsForType:function(e){var t=n[e];return void 0===t?n.default:t},setConfig:function(){},reset:function(){m()}},n={default:!1},m(),e}c.__dashjs_factory_name="CustomParametersModel",t.Z=a.Z.getSingletonFactory(c)},2068:function(e,t,n){"use strict";var r=n(5448),a={DEFAULT:.5,STRONG:1,WEAK:0};function i(e,t,n){var r,i;return r=void 0===e?-1:e,i=function(e){var t=a.DEFAULT;return e!==a.DEFAULT&&e!==a.STRONG&&e!==a.WEAK||(t=e),t}(n),{quality:r,reason:void 0===t?null:t,priority:i}}i.__dashjs_factory_name="SwitchRequest";var o=r.Z.getClassFactory(i);o.NO_CHANGE=-1,o.PRIORITY=a,r.Z.updateClassFactory(i.__dashjs_factory_name,o),t.Z=o},1767:function(e,t,n){"use strict";var r=n(5628),a=n(6535),i=n(7423),o=n(895),s=n(6070),u=n(3112),c=n(1914),l=n(5435),f=n(5448),d=n(2068),h=n(3393),g="qualitySwitchRules",m="abandonFragmentRules";function p(e){e=e||{};var t,n,f=this.context,p=e.mediaPlayerModel,E=e.customParametersModel,_=e.dashMetrics,y=e.settings;function T(e){return e.filter((function(e){return e.quality>d.Z.NO_CHANGE}))}function b(e){var t,n,r,a,i,o={},s=null;if(0!==e.length){for(o[d.Z.PRIORITY.STRONG]={quality:d.Z.NO_CHANGE,reason:null},o[d.Z.PRIORITY.WEAK]={quality:d.Z.NO_CHANGE,reason:null},o[d.Z.PRIORITY.DEFAULT]={quality:d.Z.NO_CHANGE,reason:null},t=0,n=e.length;t<n;t+=1)(r=e[t]).quality!==d.Z.NO_CHANGE&&(o[r.priority].quality===d.Z.NO_CHANGE||o[r.priority].quality>r.quality)&&(o[r.priority].quality=r.quality,o[r.priority].reason=r.reason||null);return o[d.Z.PRIORITY.WEAK].quality!==d.Z.NO_CHANGE&&(s=o[d.Z.PRIORITY.WEAK]),o[d.Z.PRIORITY.DEFAULT].quality!==d.Z.NO_CHANGE&&(s=o[d.Z.PRIORITY.DEFAULT]),o[d.Z.PRIORITY.STRONG].quality!==d.Z.NO_CHANGE&&(s=o[d.Z.PRIORITY.STRONG]),s&&(a=s.quality,i=s.reason),(0,d.Z)(f).create(a,i)}}return{initialize:function(){t=[],n=[],y.get().streaming.abr.useDefaultABRRules&&(y.get().streaming.abr.ABRStrategy===h.Z.ABR_STRATEGY_L2A?t.push((0,c.Z)(f).create({dashMetrics:_,settings:y})):y.get().streaming.abr.ABRStrategy===h.Z.ABR_STRATEGY_LoLP?t.push((0,l.Z)(f).create({dashMetrics:_})):(t.push((0,u.Z)(f).create({dashMetrics:_,mediaPlayerModel:p,settings:y})),t.push((0,r.Z)(f).create({dashMetrics:_})),y.get().streaming.abr.additionalAbrRules.insufficientBufferRule&&t.push((0,a.Z)(f).create({dashMetrics:_,settings:y})),y.get().streaming.abr.additionalAbrRules.switchHistoryRule&&t.push((0,s.Z)(f).create()),y.get().streaming.abr.additionalAbrRules.droppedFramesRule&&t.push((0,o.Z)(f).create()),y.get().streaming.abr.additionalAbrRules.abandonRequestsRule&&n.push((0,i.Z)(f).create({dashMetrics:_,mediaPlayerModel:p,settings:y})))),E.getAbrCustomRules().forEach((function(e){e.type===g&&t.push(e.rule(f).create()),e.type===m&&n.push(e.rule(f).create())}))},reset:function(){[t,n].forEach((function(e){e&&e.length&&e.forEach((function(e){return e.reset&&e.reset()}))})),t=[],n=[]},getMaxQuality:function(e){return b(T(t.map((function(t){return t.getMaxIndex(e)}))))||(0,d.Z)(f).create()},getMinSwitchRequest:b,shouldAbandonFragment:function(e,t){var r=b(T(n.map((function(n){return n.shouldAbandon(e,t)}))));return r&&(r.reason.forceAbandon=!0),r||(0,d.Z)(f).create()},getQualitySwitchRules:function(){return t}}}p.__dashjs_factory_name="ABRRulesCollection";var E=f.Z.getClassFactory(p);E.QUALITY_SWITCH_RULES=g,E.ABANDON_FRAGMENT_RULES=m,f.Z.updateSingletonFactory(p.__dashjs_factory_name,E),t.Z=E},7423:function(e,t,n){"use strict";var r=n(2068),a=n(5448),i=n(6398);function o(e){e=e||{};var t,n,a,s,u,c=this.context,l=e.mediaPlayerModel,f=e.dashMetrics,d=e.settings;function h(){a={},s={},u=[]}return t={shouldAbandon:function(e){var t=(0,r.Z)(c).create(r.Z.NO_CHANGE,{name:o.__dashjs_factory_name});if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getCurrentRequest")&&e.hasOwnProperty("getRepresentationInfo")&&e.hasOwnProperty("getAbrController")))return t;var i,h,g=e.getMediaInfo(),m=e.getMediaType(),p=e.getStreamInfo(),E=p?p.id:null,_=e.getCurrentRequest();if(!isNaN(_.index)){i=m,h=_.index,a[i]=a[i]||{},a[i][h]=a[i][h]||{};var y=l.getStableBufferTime();if(f.getCurrentBufferLevel(m)>y)return t;var T=a[m][_.index];if(null===T||null===_.firstByteDate||s.hasOwnProperty(T.id))return t;if(void 0===T.firstByteTime&&(u[m]=[],T.firstByteTime=_.firstByteDate.getTime(),T.segmentDuration=_.duration,T.bytesTotal=_.bytesTotal,T.id=_.index),T.bytesLoaded=_.bytesLoaded,T.elapsedTime=(new Date).getTime()-T.firstByteTime,T.bytesLoaded>0&&T.elapsedTime>0&&function(e,t){u[e]=u[e]||[],u[e].push(t)}(m,Math.round(8*T.bytesLoaded/T.elapsedTime)),u[m].length>=d.get().streaming.abr.abrRulesParameters.abandonRequestsRule.minLengthToAverage&&T.elapsedTime>d.get().streaming.abr.abrRulesParameters.abandonRequestsRule.graceTimeThreshold&&T.bytesLoaded<T.bytesTotal){var b=u[m].reduce((function(e,t){return e+t}),0);if(T.measuredBandwidthInKbps=Math.round(b/u[m].length),T.estimatedTimeOfDownload=+(8*T.bytesTotal/T.measuredBandwidthInKbps/1e3).toFixed(2),T.estimatedTimeOfDownload<T.segmentDuration*d.get().streaming.abr.abrRulesParameters.abandonRequestsRule.abandonMultiplier||0===e.getRepresentationInfo().quality)return t;if(!s.hasOwnProperty(T.id)){var A=e.getAbrController(),v=T.bytesTotal-T.bytesLoaded,R=A.getBitrateList(g),w=A.getQualityForBitrate(g,T.measuredBandwidthInKbps*d.get().streaming.abr.bandwidthSafetyFactor,E),S=A.getMinAllowedIndexFor(m,E),I=void 0!==S?Math.max(S,w):w;v>T.bytesTotal*R[I].bitrate/R[A.getQualityFor(m,E)].bitrate&&(t.quality=I,t.reason.throughput=T.measuredBandwidthInKbps,t.reason.fragmentID=T.id,t.reason.rule=this.getClassName(),s[T.id]=T,n.debug("["+m+"] frag id",T.id," is asking to abandon and switch to quality to ",I," measured bandwidth was",T.measuredBandwidthInKbps),delete a[m][T.id])}}else T.bytesLoaded===T.bytesTotal&&delete a[m][T.id]}return t},reset:h},n=(0,i.Z)(c).getInstance().getLogger(t),h(),t}o.__dashjs_factory_name="AbandonRequestsRule",t.Z=a.Z.getClassFactory(o)},3112:function(e,t,n){"use strict";var r=n(3860),a=n(2068),i=n(5448),o=n(7855),s=n(5595),u=n(8512),c=n(6398),l=n(8825),f=n(3393),d=10;function h(e){e=e||{};var t,n,i,h=this.context,g=e.dashMetrics,m=e.mediaPlayerModel,p=(0,s.Z)(h).getInstance();function E(e,t,n){var r=n.reduce((function(e,t,r){return t>n[e]?r:e}),0);if(0===r)return null;var a=Math.max(e,d+2*t.length),i=(n[r]-1)/(a/d-1);return{gp:i,Vp:d/i}}function _(e){e.placeholderBuffer=0,e.mostAdvancedSegmentStart=NaN,e.lastSegmentWasReplacement=!1,e.lastSegmentStart=NaN,e.lastSegmentDurationS=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN}function y(e,t){var n=m.getStableBufferTime();if(e.stableBufferTime!==n){var r=E(n,e.bitrates,e.utilities);if(r.Vp!==e.Vp||r.gp!==e.gp){var a=g.getCurrentBufferLevel(t),i=a+e.placeholderBuffer;i-=d,i*=r.Vp/e.Vp,i+=d,e.stableBufferTime=n,e.Vp=r.Vp,e.gp=r.gp,e.placeholderBuffer=Math.max(0,i-a)}}}function T(e,t){return e.Vp*(e.utilities[t]+e.gp)}function b(e,t){for(var n=e.bitrates[t],r=e.utilities[t],a=0,i=t-1;i>=0;--i)if(e.utilities[i]<e.utilities[t]){var o=e.bitrates[i],s=e.utilities[i],u=e.Vp*(e.gp+(n*s-o*r)/(n-o));a=Math.max(a,u)}return a}function A(e){var t=e.mediaType===f.Z.AUDIO?[f.Z.AUDIO]:i;for(var n in t)i.hasOwnProperty(n)&&2===i[n].state&&(i[n].placeholderBuffer=0)}function v(){for(var e in i)if(i.hasOwnProperty(e)){var t=i[e];0!==t.state&&(t.state=1,_(t))}}function R(e){if(e&&e.chunk&&e.chunk.mediaInfo){var t=i[e.chunk.mediaInfo.type];if(t&&0!==t.state){var n=e.chunk.start;isNaN(t.mostAdvancedSegmentStart)||n>t.mostAdvancedSegmentStart?(t.mostAdvancedSegmentStart=n,t.lastSegmentWasReplacement=!1):t.lastSegmentWasReplacement=!0,t.lastSegmentStart=n,t.lastSegmentDurationS=e.chunk.duration,t.lastQuality=e.chunk.quality,S(t,e.chunk.mediaInfo.type)}}}function w(e){if(e&&e.metric===r.Z.HTTP_REQUEST&&e.value&&e.value.type===o.w.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var t=i[e.mediaType];t&&0!==t.state&&(t.lastSegmentRequestTimeMs=e.value.trequest.getTime(),t.lastSegmentFinishTimeMs=e.value._tfinish.getTime(),S(t,e.mediaType))}}function S(e,t){if(!isNaN(e.lastSegmentStart)&&!isNaN(e.lastSegmentRequestTimeMs)&&!isNaN(e.placeholderBuffer)){if(e.placeholderBuffer*=.99,!isNaN(e.lastSegmentFinishTimeMs)){var n=g.getCurrentBufferLevel(t)+.001*(e.lastSegmentFinishTimeMs-e.lastSegmentRequestTimeMs),r=T(e,e.lastQuality),a=Math.max(0,r-n);e.placeholderBuffer=Math.min(a,e.placeholderBuffer)}e.lastSegmentWasReplacement&&!isNaN(e.lastSegmentDurationS)&&(e.placeholderBuffer+=e.lastSegmentDurationS),e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN}}function I(e){if(e){var t=i[e.mediaType];t&&0!==t.state&&(t.abrQuality=e.newQuality)}}function N(e){if(e){var t=i[e.mediaType];if(t&&0!==t.state){var n,r=g.getCurrentBufferLevel(e.mediaType);n=t.abrQuality>0?b(t,t.abrQuality):d;var a=Math.max(0,n-r);t.placeholderBuffer=Math.min(t.placeholderBuffer,a)}}}function C(){i={}}return t={getMaxIndex:function(e){var t=(0,a.Z)(h).create();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getScheduleController")&&e.hasOwnProperty("getStreamInfo")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("useBufferOccupancyABR")))return t;var r=e.getMediaInfo(),o=e.getMediaType(),s=e.getScheduleController(),u=e.getStreamInfo(),c=e.getAbrController(),l=c.getThroughputHistory(),f=u?u.id:null,d=u&&u.manifestInfo&&u.manifestInfo.isDynamic,p=e.useBufferOccupancyABR();if(t.reason=t.reason||{},!p)return t;s.setTimeToLoadDelay(0);var A=function(e){var t=e.getMediaType(),n=i[t];return n?0!==n.state&&y(n,t):(n=function(e){var t={},n=e.getMediaInfo().bitrateList.map((function(e){return e.bandwidth})),r=function(e){return e.map((function(e){return Math.log(e)}))}(n);r=r.map((function(e){return e-r[0]+1}));var a=m.getStableBufferTime(),i=E(a,n,r);return i?(t.state=1,t.bitrates=n,t.utilities=r,t.stableBufferTime=a,t.Vp=i.Vp,t.gp=i.gp,t.lastQuality=0,_(t)):t.state=0,t}(e),i[t]=n),n}(e);if(0===A.state)return t;var v,R=g.getCurrentBufferLevel(o),w=l.getAverageThroughput(o,d),S=l.getSafeAverageThroughput(o,d),I=l.getAverageLatency(o);if(t.reason.state=A.state,t.reason.throughput=w,t.reason.latency=I,isNaN(w))return t;switch(A.state){case 1:v=c.getQualityForBitrate(r,S,f,I),t.quality=v,t.reason.throughput=S,A.placeholderBuffer=Math.max(0,b(A,v)-R),A.lastQuality=v,!isNaN(A.lastSegmentDurationS)&&R>=A.lastSegmentDurationS&&(A.state=2);break;case 2:!function(e,t){var n=Date.now();if(isNaN(e.lastSegmentFinishTimeMs)){if(!isNaN(e.lastCallTimeMs)){var r=.001*(n-e.lastCallTimeMs);e.placeholderBuffer+=Math.max(0,r)}}else{var a=.001*(n-e.lastSegmentFinishTimeMs);e.placeholderBuffer+=Math.max(0,a)}e.lastCallTimeMs=n,e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN,y(e,t)}(A,o),v=function(e,t){for(var n=e.bitrates.length,r=NaN,a=NaN,i=0;i<n;++i){var o=(e.Vp*(e.utilities[i]+e.gp)-t)/e.bitrates[i];(isNaN(a)||o>=a)&&(a=o,r=i)}return r}(A,R+A.placeholderBuffer);var N=c.getQualityForBitrate(r,S,f,I);v>A.lastQuality&&v>N&&(v=Math.max(N,A.lastQuality));var C=Math.max(0,R+A.placeholderBuffer-T(A,v));C<=A.placeholderBuffer?(A.placeholderBuffer-=C,C=0):(C-=A.placeholderBuffer,A.placeholderBuffer=0,v<c.getMaxAllowedIndexFor(o,f)?s.setTimeToLoadDelay(1e3*C):C=0),t.quality=v,t.reason.throughput=w,t.reason.latency=I,t.reason.bufferLevel=R,t.reason.placeholderBuffer=A.placeholderBuffer,t.reason.delay=C,A.lastQuality=v;break;default:n.debug("BOLA ABR rule invoked in bad state."),t.quality=c.getQualityForBitrate(r,S,f,I),t.reason.state=A.state,t.reason.throughput=S,t.reason.latency=I,A.state=1,_(A)}return t},reset:function(){C(),p.off(l.Z.BUFFER_EMPTY,A,t),p.off(l.Z.PLAYBACK_SEEKING,v,t),p.off(l.Z.METRIC_ADDED,w,t),p.off(l.Z.QUALITY_CHANGE_REQUESTED,I,t),p.off(l.Z.FRAGMENT_LOADING_ABANDONED,N,t),p.off(u.Z.MEDIA_FRAGMENT_LOADED,R,t)}},n=(0,c.Z)(h).getInstance().getLogger(t),C(),p.on(l.Z.BUFFER_EMPTY,A,t),p.on(l.Z.PLAYBACK_SEEKING,v,t),p.on(l.Z.METRIC_ADDED,w,t),p.on(l.Z.QUALITY_CHANGE_REQUESTED,I,t),p.on(l.Z.FRAGMENT_LOADING_ABANDONED,N,t),p.on(u.Z.MEDIA_FRAGMENT_LOADED,R,t),t}h.__dashjs_factory_name="BolaRule",t.Z=i.Z.getClassFactory(h)},895:function(e,t,n){"use strict";var r=n(5448),a=n(2068),i=n(6398);function o(){var e,t,n=this.context;return e={getMaxIndex:function(e){var r=(0,a.Z)(n).create();if(!e||!e.hasOwnProperty("getDroppedFramesHistory"))return r;var i=e.getDroppedFramesHistory(),o=e.getStreamInfo().id;if(i){var s=i.getFrameHistory(o);if(!s||0===s.length)return r;for(var u=0,c=0,l=a.Z.NO_CHANGE,f=1;f<s.length;f++)if(s[f]&&(u=s[f].droppedVideoFrames,(c=s[f].totalVideoFrames)>375&&u/c>.15)){l=f-1,t.debug("index: "+l+" Dropped Frames: "+u+" Total Frames: "+c);break}return(0,a.Z)(n).create(l,{droppedFrames:u})}return r}},t=(0,i.Z)(n).getInstance().getLogger(e),e}o.__dashjs_factory_name="DroppedFramesRule",t.Z=r.Z.getClassFactory(o)},6535:function(e,t,n){"use strict";var r=n(5595),a=n(8512),i=n(5448),o=n(6398),s=n(2068),u=n(3393),c=n(3860),l=n(8825);function f(e){e=e||{};var t,n,i,f=this.context,d=(0,r.Z)(f).getInstance(),h=e.dashMetrics;function g(){(i={})[u.Z.VIDEO]={ignoreCount:2},i[u.Z.AUDIO]={ignoreCount:2}}function m(){g()}function p(e){isNaN(e.startTime)||e.mediaType!==u.Z.AUDIO&&e.mediaType!==u.Z.VIDEO||i[e.mediaType].ignoreCount>0&&i[e.mediaType].ignoreCount--}return t={getMaxIndex:function(e){var t=(0,s.Z)(f).create();if(!e||!e.hasOwnProperty("getMediaType"))return t;!function(){if(!h||!h.hasOwnProperty("getCurrentBufferLevel")||!h.hasOwnProperty("getCurrentBufferState"))throw new Error(u.Z.MISSING_CONFIG_ERROR)}();var r=e.getMediaType(),a=h.getCurrentBufferState(r),o=e.getRepresentationInfo().fragmentDuration,l=e.getStreamInfo(),d=l?l.id:null,g=e.getScheduleController(),m=l&&l.manifestInfo&&l.manifestInfo.isDynamic;if(function(e,t){return!e&&i[t].ignoreCount>0}(g.getPlaybackController().getLowLatencyModeEnabled(),r)||!o)return t;if(a&&a.state===c.Z.BUFFER_EMPTY)n.debug("["+r+"] Switch to index 0; buffer is empty."),t.quality=0,t.reason="InsufficientBufferRule: Buffer is empty";else{var p=e.getMediaInfo(),E=e.getAbrController(),_=E.getThroughputHistory(),y=h.getCurrentBufferLevel(r),T=_.getAverageThroughput(r,m),b=_.getAverageLatency(r),A=T*(y/o)*.5;t.quality=E.getQualityForBitrate(p,A,d,b),t.reason="InsufficientBufferRule: being conservative to avoid immediate rebuffering"}return t},reset:function(){g(),d.off(l.Z.PLAYBACK_SEEKING,m,t),d.off(a.Z.BYTES_APPENDED_END_FRAGMENT,p,t)}},n=(0,o.Z)(f).getInstance().getLogger(t),g(),d.on(l.Z.PLAYBACK_SEEKING,m,t),d.on(a.Z.BYTES_APPENDED_END_FRAGMENT,p,t),t}f.__dashjs_factory_name="InsufficientBufferRule",t.Z=i.Z.getClassFactory(f)},1914:function(e,t,n){"use strict";var r=n(3860),a=n(2068),i=n(5448),o=n(7855),s=n(5595),u=n(8512),c=n(6398),l=n(3393);function f(e){e=e||{};var t,n,i,f,d=this.context,h=e.dashMetrics,g=(0,s.Z)(d).getInstance();function m(e){e.placeholderBuffer=0,e.mostAdvancedSegmentStart=NaN,e.lastSegmentWasReplacement=!1,e.lastSegmentStart=NaN,e.lastSegmentDurationS=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN,e.lastSegmentUrl=""}function p(){for(var e in n)if(n.hasOwnProperty(e)){var t=n[e];0!==t.state&&(t.state=1,m(t))}}function E(e){if(e&&e.chunk&&e.chunk.mediaInfo){var t=n[e.chunk.mediaInfo.type],r=i[e.chunk.mediaInfo.type];if(t&&0!==t.state){var a=e.chunk.start;isNaN(t.mostAdvancedSegmentStart)||a>t.mostAdvancedSegmentStart?(t.mostAdvancedSegmentStart=a,t.lastSegmentWasReplacement=!1):t.lastSegmentWasReplacement=!0,t.lastSegmentStart=a,t.lastSegmentDurationS=e.chunk.duration,t.lastQuality=e.chunk.quality,y(t,r)}}}function _(e){if(e&&e.metric===r.Z.HTTP_REQUEST&&e.value&&e.value.type===o.w.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var t=n[e.mediaType],a=i[e.mediaType];t&&0!==t.state&&(t.lastSegmentRequestTimeMs=e.value.trequest.getTime(),t.lastSegmentFinishTimeMs=e.value._tfinish.getTime(),y(t,a))}}function y(e,t){isNaN(e.lastSegmentStart)||isNaN(e.lastSegmentRequestTimeMs)||(t.segment_request_start_s=.001*e.lastSegmentRequestTimeMs,t.segment_download_finish_s=.001*e.lastSegmentFinishTimeMs,e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN)}function T(e){if(e&&e.mediaType){var t=n[e.mediaType];t&&0!==t.state&&(t.abrQuality=e.newQuality)}}function b(e,t){if(e.length!==t.length)return-1;for(var n=0,r=0;r<e.length;r++)n+=e[r]*t[r];return n}function A(){n={},i={}}return t={getMaxIndex:function(e){var t,r=(0,a.Z)(d).create(),s=Math.pow(4,.99),u=Math.max(Math.pow(4,1),s*Math.sqrt(4)),c=e.getMediaInfo(),g=e.getMediaType(),p=c.bitrateList.map((function(e){return e.bandwidth})),E=p.length,_=e.getScheduleController(),y=e.getStreamInfo(),T=e.getAbrController(),A=T.getThroughputHistory(),v=y&&y.manifestInfo&&y.manifestInfo.isDynamic,R=e.useL2AABR(),w=h.getCurrentBufferLevel(g,!0),S=A.getSafeAverageThroughput(g,v),I=A.getAverageThroughput(g,v),N=A.getAverageLatency(g),C=e.getVideoModel().getPlaybackRate();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getScheduleController")&&e.hasOwnProperty("getStreamInfo")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("useL2AABR")))return r;if(r.reason=r.reason||{},!R||g===l.Z.AUDIO)return r;_.setTimeToLoadDelay(0);var D=function(e){var t=e.getMediaType(),r=n[t];return r||(r=function(e){var t={},n=e.getMediaInfo(),r=n.bitrateList.map((function(e){return e.bandwidth/1e3}));return t.state=1,t.bitrates=r,t.lastQuality=0,function(e){e&&e.type&&(i[e.type]={},i[e.type].w=[],i[e.type].prev_w=[],i[e.type].Q=0,i[e.type].segment_request_start_s=0,i[e.type].segment_download_finish_s=0,i[e.type].B_target=1.5)}(n),m(t),t}(e),n[t]=r),r}(e);if(0===D.state)return r;var M=i[g];if(!M)return r;if(r.reason.state=D.state,r.reason.throughput=I,r.reason.latency=N,isNaN(I))return r;switch(D.state){case 1:if(t=T.getQualityForBitrate(c,S,