bitmovin-player 8.263.0 → 8.264.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bitmovinplayer-serviceworker.js +2 -2
- package/bitmovinplayer-serviceworker.prod.js +2 -2
- package/bitmovinplayer-ui.css +1 -1
- package/bitmovinplayer-ui.js +2 -2
- package/bitmovinplayer.js +2 -2
- package/bitmovinplayer.prod.js +2 -2
- package/modules/bitmovinplayer-abr.js +2 -2
- package/modules/bitmovinplayer-abr.prod.js +2 -2
- package/modules/bitmovinplayer-advertising-bitmovin.js +2 -2
- package/modules/bitmovinplayer-advertising-bitmovin.prod.js +2 -2
- package/modules/bitmovinplayer-advertising-core.js +2 -2
- package/modules/bitmovinplayer-advertising-core.prod.js +2 -2
- package/modules/bitmovinplayer-advertising-ima.js +2 -2
- package/modules/bitmovinplayer-advertising-ima.prod.js +2 -2
- package/modules/bitmovinplayer-advertising-omsdk.js +2 -2
- package/modules/bitmovinplayer-advertising-omsdk.prod.js +2 -2
- package/modules/bitmovinplayer-analytics.js +1 -1
- package/modules/bitmovinplayer-analytics.prod.js +1 -1
- package/modules/bitmovinplayer-container-mp4.js +2 -2
- package/modules/bitmovinplayer-container-mp4.prod.js +2 -2
- package/modules/bitmovinplayer-container-ts.js +2 -2
- package/modules/bitmovinplayer-container-ts.prod.js +2 -2
- package/modules/bitmovinplayer-container-webm.js +2 -2
- package/modules/bitmovinplayer-container-webm.prod.js +2 -2
- package/modules/bitmovinplayer-core.js +2 -2
- package/modules/bitmovinplayer-core.prod.js +2 -2
- package/modules/bitmovinplayer-crypto.js +1 -1
- package/modules/bitmovinplayer-crypto.prod.js +1 -1
- package/modules/bitmovinplayer-dash.js +1 -1
- package/modules/bitmovinplayer-dash.prod.js +1 -1
- package/modules/bitmovinplayer-drm.js +2 -2
- package/modules/bitmovinplayer-drm.prod.js +2 -2
- package/modules/bitmovinplayer-engine-bitmovin.js +2 -2
- package/modules/bitmovinplayer-engine-bitmovin.prod.js +2 -2
- package/modules/bitmovinplayer-engine-native.js +2 -2
- package/modules/bitmovinplayer-engine-native.prod.js +2 -2
- package/modules/bitmovinplayer-engine-webrtc.js +2 -2
- package/modules/bitmovinplayer-engine-webrtc.prod.js +2 -2
- package/modules/bitmovinplayer-envivio.js +1 -1
- package/modules/bitmovinplayer-envivio.prod.js +1 -1
- package/modules/bitmovinplayer-hls.js +2 -2
- package/modules/bitmovinplayer-hls.prod.js +2 -2
- package/modules/bitmovinplayer-lowlatency.js +2 -2
- package/modules/bitmovinplayer-lowlatency.prod.js +2 -2
- package/modules/bitmovinplayer-mserenderer.js +2 -2
- package/modules/bitmovinplayer-mserenderer.prod.js +2 -2
- package/modules/bitmovinplayer-patch.js +1 -1
- package/modules/bitmovinplayer-patch.prod.js +1 -1
- package/modules/bitmovinplayer-playstation4.js +2 -2
- package/modules/bitmovinplayer-playstation4.prod.js +2 -2
- package/modules/bitmovinplayer-playstation5.js +2 -2
- package/modules/bitmovinplayer-playstation5.prod.js +2 -2
- package/modules/bitmovinplayer-polyfill.js +1 -1
- package/modules/bitmovinplayer-polyfill.prod.js +1 -1
- package/modules/bitmovinplayer-reactnative.js +1 -1
- package/modules/bitmovinplayer-reactnative.prod.js +1 -1
- package/modules/bitmovinplayer-remotecontrol.js +2 -2
- package/modules/bitmovinplayer-remotecontrol.prod.js +2 -2
- package/modules/bitmovinplayer-serviceworker-client.js +2 -2
- package/modules/bitmovinplayer-serviceworker-client.prod.js +2 -2
- package/modules/bitmovinplayer-serviceworker.js +2 -2
- package/modules/bitmovinplayer-serviceworker.prod.js +2 -2
- package/modules/bitmovinplayer-sgai.js +2 -2
- package/modules/bitmovinplayer-sgai.prod.js +2 -2
- package/modules/bitmovinplayer-smooth.js +2 -2
- package/modules/bitmovinplayer-smooth.prod.js +2 -2
- package/modules/bitmovinplayer-style.js +2 -2
- package/modules/bitmovinplayer-style.prod.js +2 -2
- package/modules/bitmovinplayer-subtitles-cea608.js +2 -2
- package/modules/bitmovinplayer-subtitles-cea608.prod.js +2 -2
- package/modules/bitmovinplayer-subtitles-native.js +2 -2
- package/modules/bitmovinplayer-subtitles-native.prod.js +2 -2
- package/modules/bitmovinplayer-subtitles-ttml.js +1 -1
- package/modules/bitmovinplayer-subtitles-ttml.prod.js +2 -2
- package/modules/bitmovinplayer-subtitles-vtt.js +2 -2
- package/modules/bitmovinplayer-subtitles-vtt.prod.js +1 -1
- package/modules/bitmovinplayer-subtitles.js +2 -2
- package/modules/bitmovinplayer-subtitles.prod.js +2 -2
- package/modules/bitmovinplayer-thumbnail-imp.js +2 -2
- package/modules/bitmovinplayer-thumbnail-imp.prod.js +2 -2
- package/modules/bitmovinplayer-thumbnail.js +2 -2
- package/modules/bitmovinplayer-thumbnail.prod.js +2 -2
- package/modules/bitmovinplayer-tizen.js +2 -2
- package/modules/bitmovinplayer-tizen.prod.js +2 -2
- package/modules/bitmovinplayer-ui.js +2 -2
- package/modules/bitmovinplayer-ui.prod.js +1 -1
- package/modules/bitmovinplayer-vidaa.js +2 -2
- package/modules/bitmovinplayer-vidaa.prod.js +2 -2
- package/modules/bitmovinplayer-vr.js +2 -2
- package/modules/bitmovinplayer-vr.prod.js +2 -2
- package/modules/bitmovinplayer-webos.js +2 -2
- package/modules/bitmovinplayer-webos.prod.js +2 -2
- package/modules/bitmovinplayer-wpe.js +2 -2
- package/modules/bitmovinplayer-wpe.prod.js +1 -1
- package/modules/bitmovinplayer-xml.js +1 -1
- package/modules/bitmovinplayer-xml.prod.js +1 -1
- package/package.json +1 -1
- package/types/advertising/API.d.ts +1 -1
- package/types/core/PlayerAPI.d.ts +1 -1
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* This software includes open-source components. See THIRD_PARTY_NOTICES
|
|
10
10
|
* in the distribution for details.
|
|
11
11
|
*
|
|
12
|
-
* Bitmovin Player Version 8.
|
|
12
|
+
* Bitmovin Player Version 8.264.0
|
|
13
13
|
*
|
|
14
14
|
****************************************************************************/
|
|
15
15
|
|
|
16
16
|
(function() {
|
|
17
|
-
"use strict";!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.tizen=t():(e.bitmovin=e.bitmovin||{},e.bitmovin.player=e.bitmovin.player||{},e.bitmovin.player.tizen=t())}(self,(function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[405],{28006:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.IncreasingTimeout=void 0;var i=n(88844),r=function(){function e(e,t,n){this.defaultInterval=e,this.maxInterval=t,this.intervalMultiplier=n,this.resetInterval()}return e.prototype.clearTimeout=function(){(0,i.clearTimeoutIfDefined)(this.cU)},e.prototype.setTimeout=function(e){this.clearTimeout(),this.cU=window.setTimeout((function(){return e()}),this.dU)},e.prototype.resetInterval=function(){this.dU=this.defaultInterval},e.prototype.increaseInterval=function(){this.dU=Math.min(this.maxInterval,this.dU*this.intervalMultiplier)},e}();t.IncreasingTimeout=r},59235:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.TizenModuleDefinition=void 0;var i=n(70962),r=n(15487),o=n(62756),a=n(53188),s=n(69411),u=n(26862),c=n(74682);t.TizenModuleDefinition={name:o.ModuleName.Tizen,module:function(){return{createTizenDRMManager:a.createTizenDRMManager,TizenVideoElementWrapper:c.TizenVideoElementWrapper,getTizenEMEHandlerConstructor:s.getTizenEMEHandlerConstructor,getTizenMSERendererConstructor:u.getTizenMSERendererConstructor}},dependencies:[o.ModuleName.RendererMse],hooks:{add:function(){var e;(0,r.isTizen2017)()&&(i.DefaultSettings.END_OF_BUFFER_TOLERANCE=.7),((0,r.isTizen2016)()||(0,r.isTizen2017)())&&(i.DefaultSettings.HLS_CLEAR_BUFFERS_ON_DISCONTINUITY_SWITCHES=!0),(0,r.isTizen2022)()&&(i.DefaultSettings.TIZEN_DELAY_END_OF_STREAM_SIGNALING=!0),(null!==(e=(0,r.getTizenVersion)().major)&&void 0!==e?e:0)<r.TIZEN_2019_MAJOR_VERSION&&(i.DefaultSettings.TIZEN_MAX_SAFE_BMDT=4294967295,i.DefaultSettings.TIZEN_MAX_SAFE_PTO=4294967295),(0,r.isTizen2017)()||(0,r.isTizen2018)()||(0,r.isTizen2019)()?i.DefaultSettings.MAX_STARTUP_BUFFER=4:i.DefaultSettings.MAX_STARTUP_BUFFER=2.5}}},t.default=t.TizenModuleDefinition},53188:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.createTizenDRMManager=function(e){return new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onInitDataAdded=function(n){e.prototype.addInitData.call(t,n)},t}return i(t,e),t.prototype.setConfig=function(t,n){var i=this;return e.prototype.setConfig.call(this,t,n).then((function(e){return null!==i.emeHandler&&s(i.emeHandler)&&i.emeHandler.addInitDataListener(i),e}))},t.prototype.Qu=function(e){var t,n="";do{t=this.emeHandler.getIdentifierFromInitData(e.initDataStr)+n,n="-".concat(a.Util.generateUniqueId())}while(this.licenseStorage.getLicense(t,this.usedKeySystem.kind));return t},t.prototype.preprocessInitDataStr=function(e){if(e.initDataStr)return e.forceLicenseRequest?this.Qu(e):this.emeHandler.getIdentifierFromInitData(e.initDataStr)},t.prototype.shutdown=function(){return null!==this.emeHandler&&s(this.emeHandler)&&this.emeHandler.removeInitDataListener(this),e.prototype.shutdown.call(this)},t}(r.ModuleManager.get(o.ModuleName.DRM).DRMManager))(e)};var r=n(88052),o=n(62756),a=n(70850),s=function(e){return"function"==typeof e.addInitDataListener&&"function"==typeof e.removeInitDataListener}},69411:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getTizenEMEHandlerConstructor=function(){var e=a.ModuleManager.get(s.ModuleName.DRM);return null===u&&(u=function(e){function t(t){var n=e.call(this,t)||this;return n.cv=[],n.Ru=new o.Deferred,n}return i(t,e),t.prototype.invokeEncryptedListener=function(t,n){var i=this;e.prototype.invokeEncryptedListener.call(this,t,n),n.forEach((function(e){return i.cv.forEach((function(n){n.onInitDataAdded(r(r({},e),{initData:t.buffer,forceLicenseRequest:!0}))}))})),this.Ru.resolve()},t.prototype.addInitDataListener=function(e){this.cv.includes(e)||this.cv.push(e)},t.prototype.removeInitDataListener=function(e){var t=this.cv.findIndex((function(t){return t===e}));t>-1&&this.cv.splice(t,1)},t.prototype.requestLicense=function(t,n){var i=this;return this.Ru.promise.then((function(){return e.prototype.requestLicense.call(i,t,n)}))},t}(e.WebKitPrefixedEMEHandler)),u};var o=n(34841),a=n(88052),s=n(62756),u=null},26862:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_VALUE_32_BIT=t.TIZEN_2018_BUFFER_START_SAFETY_MARGIN=void 0,t.getTizenMSERendererConstructor=function(){if(null===p){var e=(0,d.getTvRendererConstructor)();p=function(e){function n(t){var n=e.call(this,t)||this;return n.fv=function(){var e,t,i;if("ended"===(null===(e=n.mse)||void 0===e?void 0:e.readyState))return null!==(t=n.getEndOfBufferTime())&&void 0!==t?t:-1;var r=n.context.sourceContext.sourceIdentifier,a=n.context.serviceManager.get(o.ServiceName.ManifestService,r),s=n.getDuration();if(null==a?void 0:a.isLive()){var u=Object.values(null!==(i=n.getRangesInSourceBuffers())&&void 0!==i?i:[]).find((function(e){return e.find((function(e){return e.end>s}))}));if(u)return u.reduce((function(e,t){return e.end<t.end?t:e})).end}return s},n.gv=function(){if(!n.dv&&!n.video.ended){var e=n.fv(),t=n.getCurrentTime();if(t&&e>0&&e-t<=1){var i=Math.max(e-t,0),r=(0,c.toMilliSeconds)(i)/n.video.playbackRate+(0,c.toMilliSeconds)(1);n.dv=setTimeout((function(){n.context.isDisposed||n.video.paused||n.video.eventHandler.triggerEvent(l.MediaElementEvent.ended),n.dv=null}),r)}}},n.hv=function(){n.iv();var e=n.getDuration(),t=n.getCurrentTime();t&&e&&t>=e&&n.video.eventHandler.triggerEvent(l.MediaElementEvent.ended)},n.iv=function(){n.dv&&((0,f.clearTimeoutIfDefined)(n.dv),n.dv=null)},n.dv=null,n.video.addEventListener(l.MediaElementEvent.timeupdate,n.gv),n.video.addEventListener(l.MediaElementEvent.stalled,n.gv),n.video.addEventListener(l.MediaElementEvent.seeking,n.iv),n.video.addEventListener(l.MediaElementEvent.ended,n.iv),n.video.addEventListener(l.MediaElementEvent.pause,n.hv),n}return i(n,e),n.prototype.getMaxSafeBaseMediaDecodeTime=function(){return this.context.settings.TIZEN_MAX_SAFE_BMDT},n.prototype.getMaxSafePresentationTimeOffset=function(){return this.context.settings.TIZEN_MAX_SAFE_PTO},n.prototype.jv=function(){var e;return null!==(e=this.ev)&&void 0!==e||(this.ev=new s.DelayedEndOfStreamHelper(this.context,2)),this.ev},n.prototype.setEndOfStream=function(t){var n=this;return void 0===t&&(t=!0),this.context.settings.TIZEN_DELAY_END_OF_STREAM_SIGNALING?this.jv().setEndOfStream(t,(function(){return e.prototype.setEndOfStream.call(n,t)})):e.prototype.setEndOfStream.call(this,t)},n.prototype.setDuration=function(e){this.mse&&(e=Math.floor(1e4*e)/1e4,isFinite(e)||(e=m),this.mse.setDuration(e))},n.prototype.getDuration=function(){var e,t,n,i,r,o=isNaN(null!==(t=null===(e=this.video)||void 0===e?void 0:e.duration)&&void 0!==t?t:NaN)?null!==(i=null===(n=this.mse)||void 0===n?void 0:n.getDuration())&&void 0!==i?i:0:null===(r=this.video)||void 0===r?void 0:r.duration;return o===m?1/0:null!=o?o:NaN},n.prototype.release=function(){var t;return this.video.removeEventListener(l.MediaElementEvent.timeupdate,this.gv),this.video.removeEventListener(l.MediaElementEvent.stalled,this.gv),this.video.removeEventListener(l.MediaElementEvent.seeking,this.iv),this.video.removeEventListener(l.MediaElementEvent.ended,this.iv),this.video.removeEventListener(l.MediaElementEvent.pause,this.hv),null===(t=this.ev)||void 0===t||t.release(),e.prototype.release.call(this)},n.prototype.removeData=function(t,n,i,r){var o=this;return void 0===r&&(r=!1),this.waitingForSeekedPromise,Promise.resolve(this.waitingForSeekedPromise).catch((function(e){})).then((function(){return e.prototype.removeData.call(o,t,n,i,r)}))},n.prototype.adjustTimeToNextCommonBufferStart=function(n){var i=e.prototype.adjustTimeToNextCommonBufferStart.call(this,n);return!isNaN(i)&&(0,u.isTizen2018)()&&this.video?function(e,t,n){var i=(0,r.getBufferedRanges)(e).find((function(e){return e.start<=t&&t<=e.end}));return i?Math.max(t,i.start+n):t}(this.video,i,t.TIZEN_2018_BUFFER_START_SAFETY_MARGIN):i},n.prototype.seekOnVideoElement=function(e){var t=this,n=-1,i=new Promise((function(i){var r=[l.MediaElementEvent.seeked,l.MediaElementEvent.playing,l.MediaElementEvent.canplay],o=function(){(0,f.clearTimeoutIfDefined)(n);var e=t.video.currentTime;i(t.getBaseMediaDecodeTimeHandler().then((function(t){return t.mapToExternalTime(e)}))),s()},s=function(){r.forEach((function(e){t.eventHandler.off(e,o)})),t.playerEventHandler.off(a.PlayerEvent.PeriodSwitched,o)};r.forEach((function(e){t.eventHandler.on(e,o)})),t.playerEventHandler.on(a.PlayerEvent.PeriodSwitched,o);try{t.video.currentTime=e}catch(e){throw s(),e}}));if((0,u.isTizen2017)()||(0,u.isTizen2018)()){var r=new Promise((function(i){n=window.setTimeout((function(){return i(t.getBaseMediaDecodeTimeHandler().then((function(t){return t.mapToExternalTime(e)})))}),v)}));this.waitingForSeekedPromise=Promise.race([r,i])}else this.waitingForSeekedPromise=i;return this.waitingForSeekedPromise},n.prototype.saveCurrentTime=function(){var e=this,t=Object.keys(this.segmentQueues).some((function(t){return e.getBufferedRanges(t).length>0}));this.setCurrentTimeContext?this.savedCurrentTime=this.setCurrentTimeContext.time:t&&(this.savedCurrentTime=this.getCurrentVideoTime())},n}(e)}return p};var r=n(4524),o=n(80813),a=n(3714),s=n(35660),u=n(15487),c=n(89927),f=n(88844),l=n(19274),d=n(35501),p=null,m=Math.pow(2,32),v=1e3;t.TIZEN_2018_BUFFER_START_SAFETY_MARGIN=.02,t.MAX_VALUE_32_BIT=Math.pow(2,32)-1},74682:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TizenVideoElementWrapper=t.MaxSameCurrentTimeUpdate=void 0;var r=n(15487),o=n(19274),a=n(79186),s=n(28006);t.MaxSameCurrentTimeUpdate=10;var u=function(e){function n(t,n){var i=e.call(this,t,n)||this;i.pv=function(){i.kv.clearTimeout()},i.qv=function(){i.element.seeking||i.mv===i.currentTime||i.kv.clearTimeout(),i.rv()};var o=(0,r.isTizen2018)()?2e4:8e3,a=(0,r.isTizen2018)()?1e4:1e3;return i.kv=new s.IncreasingTimeout(a,o,1.8),i.lv=0,i.mv=-1,i.nv(),i}return i(n,e),n.prototype.nv=function(){this.mediaElementEventHandler.addEventListener(o.MediaElementEvent.playing,this.pv),this.mediaElementEventHandler.addEventListener(o.MediaElementEvent.timeupdate,this.qv)},n.prototype.ov=function(){this.mediaElementEventHandler&&(this.mediaElementEventHandler.removeEventListener(o.MediaElementEvent.playing,this.pv),this.mediaElementEventHandler.removeEventListener(o.MediaElementEvent.timeupdate,this.qv))},n.prototype.rv=function(){this.element.seeking||(this.mv===this.element.currentTime?this.lv++:this.lv=0,this.lv===t.MaxSameCurrentTimeUpdate&&(this.vv(this.mv),this.lv=0),this.mv=this.element.currentTime)},n.prototype.sv=function(e){var t=this;this.kv.setTimeout((function(){return t.uv(e)}))},n.prototype.tv=function(e,t){var n=function(e,t){var n=(e.end-t)/2,i=n+n*Math.random();return t+Math.min(.01+.1*Math.random(),i)}(e,t);this.element.currentTime=n},n.prototype.uv=function(e){!this.element.seeking||this.element.playbackRate>1?(this.element.seeking&&"playbackRate (".concat(this.element.playbackRate,") > 1, disabling currentTime safety checks"),this.kv.clearTimeout()):this.vv(e)},n.prototype.vv=function(e){var t=function(e,t){return function(e){var t=[];try{for(var n=0;n<e.buffered.length;n++)t.push({start:e.buffered.start(n),end:e.buffered.end(n)})}catch(e){}return t}(e).find((function(e){return e.start<=t&&e.end>=t}))}(this.element,e);if(t){if(function(e){var t,n,i=null===(t=e.store)||void 0===t?void 0:t.getState(),r=null==i?void 0:i.drmLicenses,o=null!==(n=null==r?void 0:r.drmData)&&void 0!==n?n:{};return Object.keys(o).flatMap((function(e){return Object.keys(o[e]).map((function(t){return o[e][t]}))})).some((function(e){return e.wasRequested&&!e.hasLicense}))}(this.context))return this.kv.resetInterval(),void this.sv(e);this.tv(t,e),this.kv.increaseInterval(),this.sv(e)}else this.sv(e)},Object.defineProperty(n.prototype,"currentTime",{get:function(){return this.element.currentTime},set:function(e){this.element.currentTime=e,this.kv.resetInterval(),this.lv=0,this.sv(e)},enumerable:!1,configurable:!0}),n.prototype.dispose=function(){this.kv.clearTimeout(),this.ov(),e.prototype.dispose.call(this)},n}(a.VideoElementWrapper);t.TizenVideoElementWrapper=u},84276:function(e,t,n){var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseMediaDecodeTimeHandler=t.PtoGapFillingMode=void 0;var r,o=n(4524),a=n(80813),s=n(87827),u=n(68925),c=n(47602),f=n(19483),l=n(34841),d=n(87244),p=n(85434),m=n(15487),v=n(89927),h=n(19274),g=n(88052),T=n(62756),y=n(44885),M=n(73849),E=n(8301),b=n(48558),_=n(21651);!function(e){e.KeepGaps="keep-gaps",e.FillGaps="fill-gaps"}(r||(t.PtoGapFillingMode=r={}));var S=function(){function e(e,t,n,a){var s=this;this.maxSafeBaseMediaDecodeTime=n,this.maxSafePresentationTimeOffset=a,this.dV=function(){s.fV(s.KU.settings.END_OF_BUFFER_TOLERANCE)},this.eV=function(){s.fV(s.KU.settings.END_OF_BUFFER_RECOVERY_TOLERANCE)},this.kV=function(){if(s.KU.videoElement)try{var e=s.jV(),t=s.KU.videoElement.currentTime,n=s.gV(t).mapEach((function(e){return e.playbackRange})).mapAll((function(e){return o.BufferRangeHelper.mergeRanges(e,s.KU.settings.GAP_TOLERANCE)})).getObject(),r=o.BufferRangeHelper.getCommonBufferedRanges(i(i({},n),{bufferedRanges:e})).shift();if(void 0!==r){var a=r.getStart();s.KU.videoElement.currentTime=a,s.hV(),s.KU.videoElement.eventHandler.removeEventListener(h.MediaElementEvent.currenttimenotadvancing,s.eV),s.RU().finally((function(){var e;return null===(e=s.SV())||void 0===e?void 0:e.dispatch((0,u.setTimestampRollingOver)(!1))})).then((function(){})).catch((function(e){}))}else s.iV()}catch(e){}},this.KU=e,this.QU=r.KeepGaps,this.OU=t,this.LU=void 0,this.NU=new Map,this.MU=new _.SegmentTimeInformationArrayMap,this.KU.videoElement&&(this.KU.videoElement.addEventListener(h.MediaElementEvent.waiting,this.eV),this.KU.videoElement.addEventListener(h.MediaElementEvent.stalled,this.eV),this.KU.videoElement.addEventListener(h.MediaElementEvent.timeupdate,this.dV),e.settings.FORCE_BASE_MEDIA_DECODE_TIME_REWRITE)}return e.prototype.RU=function(){var e=this,t=[];return this.cV().keys.forEach((function(n){t.push(e.OU(n))})),Promise.all(t).then((function(){}))},e.prototype.getEndOfBufferTime=function(){var e=o.BufferRangeHelper.getCommonBufferedRanges(this.cV(!0).getObject()).sort((function(e,t){return e.getStart()-t.getStart()}));return e.length>0?e[e.length-1].getEnd():0},e.prototype.setPtoGapFillingMode=function(e){this.QU=e},e.prototype.getEarliestExternalTimeBufferedRangeIndex=function(e){var t=0;try{for(var n=void 0,i=0;i<e.length;i++){var r=this.mapToExternalTime(e.start(i));(void 0===n||r<n)&&(n=r,t=i)}}catch(e){}return t},e.prototype.cV=function(e){var t=this;return void 0===e&&(e=!1),this.MU.mapEach((function(t){return e?t.originalPlaybackRange:t.playbackRange})).mapAll((function(e){return o.BufferRangeHelper.mergeRanges(e,t.KU.settings.GAP_TOLERANCE)}))},e.prototype.fV=function(e){var t,n,i=this.KU.videoElement;if(i){var r=i.currentTime;if(!(r>=i.duration&&i.duration>0)){var o=i.buffered;if(o.length<2)null===(t=this.SV())||void 0===t||t.dispatch((0,u.setTimestampRollingOver)(!1));else if(0!==this.getEarliestExternalTimeBufferedRangeIndex(o)){var a=o.end(o.length-1);r>=a-Math.max(this.KU.settings.MINIMAL_BACKWARD_BUFFER_CLEARING_INTERVAL,this.KU.settings.END_OF_BUFFER_TOLERANCE,this.KU.settings.END_OF_BUFFER_RECOVERY_TOLERANCE)&&(null===(n=this.SV())||void 0===n||n.dispatch((0,u.setTimestampRollingOver)(!0))),r>=a-e&&this.kV()}}}},e.prototype.gV=function(e){var t=this,n=this.KU.settings.GAP_TOLERANCE,i=new f.ArrayMap;return this.MU.keys.forEach((function(r){var o=!1,a=-1/0,s=t.MU.get(r),u=!1;s.sort((function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime}));var c=s.filter((function(t){var i=t.playbackRange,r=i.start-n<=e&&i.end+n>=e;if(u=u||r,!isFinite(a)&&r)a=t.playbackTime;else if(isFinite(a))return o=o||t.playbackTime<a;return!1}));0!==c.length||u||(s.sort((function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime})),c=s.filter((function(t){return t.playbackRange.end<e}))),i.addAll(r,c)})),i},e.prototype.hV=function(){void 0!==this.LU&&(this.LU(),this.LU=void 0)},e.prototype.iV=function(){var e=this,t=this.SV();void 0!==t&&(this.hV(),this.LU=(0,c.subscribeToRendererBufferChanges)(t,(function(){return e.eV()})))},e.prototype.jV=function(){var e,t=[],n=null===(e=this.KU.videoElement)||void 0===e?void 0:e.buffered;if(!function(e){return 0!==(null==e?void 0:e.length)}(n))return[];for(var i=0;i<n.length;i++)t.push({start:n.start(i),end:n.end(i)});return t},e.prototype.lV=function(e){var t,n=e.getMimeType(),i=e.getPlaybackTimeRange();if(void 0!==i){var r=(null!==(t=this.MU.get(n))&&void 0!==t?t:[]).filter((function(e){return e.originalPlaybackRange.end<i.end}));return r[r.length-1]}},e.prototype.mV=function(e){var t=this,n=!1,i=!1,o=new _.SegmentTimeInformationArrayMap;return this.MU.keys.forEach((function(e){return(0,y.ensureMimeTypeInMap)(o,e)})),e.forEach((function(e){if(!e.isDirty()){var a=new b.SegmentTimeInformation(e,t.maxSafeBaseMediaDecodeTime),s=a.presentationTimeOffset/a.timescale,u=t.FV(s),c=t.GV(a);(n=n||u||c||t.KU.settings.FORCE_BASE_MEDIA_DECODE_TIME_REWRITE||t.BV(a)||t.CV(a,a.baseMediaDecodeTime,a.presentationTimeOffset))&&(a.isBaseMediaDecodeTimeLimitExceeded=!0);var f=t.lV(e);(f?f.originalPresentationTimeOffset/f.timescale:s)===s||t.QU!==r.FillGaps&&!(null==f?void 0:f.isBaseMediaDecodeTimeLimitExceeded)||(i=!0),(0,y.addSegmentTimeInfoToMap)(o,a.mimeType,a)}})),[n,i,o]},e.prototype.nV=function(e){return g.ModuleManager.has(T.ModuleName.ContainerMP4)?e.getTFDTBoxOffsets()||g.ModuleManager.get(T.ModuleName.ContainerMP4).parseTfdtBoxOffsets(e):[]},e.prototype.oV=function(e,t){var n=this.nV(e);e.setTFDTBoxOffsets(n);var i=e.getBaseMediaDecodeTime()-t.truncatedBaseMediaDecodeTime;e.getTFDTBoxOffsets().forEach((function(t){var n=0,r=new DataView(e.getData(),t),o=r.getUint32(n);n+=4;var a=String.fromCharCode(r.getUint8(n++),r.getUint8(n++),r.getUint8(n++),r.getUint8(n++));if(n+=1===o?8:0,"tfdt"===a){var s=r.getUint8(n);n+=4,1===s?function(e,t,n){var i=e.getUint32(t),r=e.getUint32(t+4),o=i*Math.pow(2,32)+r-n;e.setUint32(t,Math.floor(o/Math.pow(2,32))),t+=4,e.setUint32(t,o)}(r,n,i):function(e,t,n){var i=e.getUint32(t)-n;e.setUint32(t,i)}(r,n,i)}})),e.setBaseMediaDecodeTime(t.truncatedBaseMediaDecodeTime),e.setDirty(!0)},e.prototype.pV=function(e,t){var n=this;t.forAll((function(t,i){(0,y.addSegmentTimeInfoToMap)(n.MU,t,i);var r=i.getMatchingSegment(e);r&&n.oV(r,i)}))},e.prototype.qV=function(e,t){return e.reduce((function(e,n){var i=t(n),r=Math.floor(i/n.timescale);return!isFinite(e)&&isFinite(r)||r<e?r:e}),-1/0)},e.prototype.rV=function(e,t){var n=this;return Math.min.apply(Math,e.transform((function(e){return n.qV(e,t)})))},e.prototype.sV=function(e){return this.rV(e,(function(e){return e.truncatedBaseMediaDecodeTime-e.truncatedPresentationTimeOffset}))},e.prototype.tV=function(e){return this.rV(e,(function(e){return e.originalPresentationTimeOffset}))},e.prototype.uV=function(e){var t={},n=this.tV(e);isFinite(n)&&(e.forAll((function(e,i){var r=i.timescale,o=i.originalBaseMediaDecodeTime,a=i.originalPresentationTimeOffset,s=Math.floor(a-n*r),u=a-s,c=o-u,f=Math.floor(u/r);i.truncatedBaseMediaDecodeTime=c,i.truncatedPresentationTimeOffset=s,t.hasOwnProperty(e)||(t[e]=f)})),this.vV(t))},e.prototype.vV=function(e){var t=this;Object.keys(e).forEach((function(n){var i=t.NU.get(n);i&&i.resolve(e[n]);var r=new l.Deferred;t.NU.set(n,r),r.resolve(e[n])}))},e.prototype.wV=function(e,t){var n,i=this,r=this.sV(t);isFinite(r)&&(t.forAll((function(t,n){var o=n.getMatchingSegment(e);o&&i.xV(o,n,r),(0,y.addSegmentTimeInfoToMap)(i.MU,t,n)})),null===(n=this.KU.videoElement)||void 0===n||n.addEventListener(h.MediaElementEvent.currenttimenotadvancing,this.eV))},e.prototype.xV=function(e,t,n){t.truncatedBaseMediaDecodeTime=t.truncatedBaseMediaDecodeTime-t.timescale*n,t.truncatedPlaybackTime=(t.truncatedBaseMediaDecodeTime-t.truncatedPresentationTimeOffset)/t.timescale,this.oV(e,t)},e.prototype.yV=function(e){for(var t,n,i=e.keys,o=e.getAll(),a=[],s=1/0,u=0,c=i;u<c.length;u++){var f=c[u],l=(null!==(t=this.MU.get(f))&&void 0!==t?t:[]).filter((function(e){return!o.includes(e)&&!e.isReferenceSegment}));l.sort((function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime}));var d=l.pop(),p=null!==(n=null==d?void 0:d.playbackRange.end)&&void 0!==n?n:1/0,m=e.get(f)||[];if(0===m.length)return 1/0;var v=Math.min.apply(Math,m.map((function(e){return e.playbackTime}))),h=v-p;s=Math.min(s,v),isFinite(h)&&a.push(h)}if(a.length!==i.length)return 0;var g=s-this.KU.settings.GAP_TOLERANCE,T=this.QU===r.KeepGaps?Math.min.apply(Math,a):Math.max.apply(Math,a);return Math.min(T,g)},e.prototype.zV=function(e,t){var n=this,i=this.yV(t),r=!0;if(t.forAll((function(e,o){if(r){var a=o.timescale,s=i*a,u=o.truncatedPresentationTimeOffset+s,c=o.truncatedBaseMediaDecodeTime;n.DV(c,u,o,t)||(r=!1)}})),r){var o={};t.forAll((function(e,t){var n=t.timescale,r=i*n;t.updateAsContinuous(t.truncatedBaseMediaDecodeTime,t.truncatedPresentationTimeOffset+r);var a=t.originalPresentationTimeOffset-t.truncatedPresentationTimeOffset;o[e]=a/t.timescale})),this.vV(o),e.forEach((function(e){return e.setDirty(!0)}))}},e.prototype.AV=function(e,t,n){return 0===t.length||!!t.keys.every((function(e){return(t.get(e)||[]).length>0}))&&(this.uV(t),this.wV(e,t),n&&this.zV(e,t),!0)},e.prototype.BV=function(e){var t;if(e.isBaseMediaDecodeTimeLimitExceeded)return!0;var n=(0,M.getLargestPrecedingSegmentTimeInfo)(null!==(t=this.MU.get(e.mimeType))&&void 0!==t?t:[],e.originalPlaybackTime);return!!n&&isFinite(n.truncatedBaseMediaDecodeTime)&&n.truncatedBaseMediaDecodeTime!==n.originalBaseMediaDecodeTime},e.prototype.CV=function(e,t,n){var i,r=e.duration,o=e.timescale,a=e.mimeType,s=this.MU.keys.find((function(e){return e!==a}));if(!s)return!1;var u=null===(i=this.MU.get(s))||void 0===i?void 0:i.slice(-1)[0];if(!u)return!1;var c=(t+n)/o,f={start:c,end:c+r},l=u.playbackTime+u.duration,d={start:l,end:l+u.duration},p=Math.max(f.start,d.start);return!(Math.min(f.end,d.end)-p<=r/2)&&d.end*u.timescale-u.presentationTimeOffset>this.maxSafeBaseMediaDecodeTime},e.prototype.DV=function(e,t,n,i){var r=this,o=n.duration,a=n.timescale;if(e+o*a>this.maxSafeBaseMediaDecodeTime)return!1;if(this.CV(n,e,t))return!1;var s=t/a,u=e/a+o,c=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=[];return e.forEach((function(e){e.forAll((function(e,t){n.includes(t.timescale)||n.push(t.timescale)}))})),n}(i,this.MU);return c.every((function(e){return r.EV(s,u,e)}))},e.prototype.EV=function(e,t,n){return t*n+e*n<=this.maxSafeBaseMediaDecodeTime},e.prototype.FV=function(e){return Math.abs(e)>this.maxSafePresentationTimeOffset},e.prototype.GV=function(e){if(!(0,m.isTizen2017)())return!1;var t=e.originalPlaybackTime,n=e.duration,i=e.mimeType,r=t+n>(0,v.toSeconds)(this.maxSafeBaseMediaDecodeTime);return p.MimeTypeHelper.isAudio(i)&&r},e.prototype.HV=function(e,t){if(this.KU.settings.FORCE_BASE_MEDIA_DECODE_TIME_REWRITE)return!0;var n=e/t.timescale;return!!this.FV(n)||this.GV(t)},e.prototype.IV=function(e,t,n){var i=e.baseMediaDecodeTime,r=e.presentationTimeOffset,o=e.foundMatchingPreviousSegment,a=!this.DV(i,r,t,n);return o?a:a||this.HV(r,t)},e.prototype.JV=function(e){var t=this,n=new f.ArrayMap,i=new f.ArrayMap;return e.keys.forEach((function(r){var o;(0,y.ensureMimeTypeInMap)(n,r),(0,y.ensureMimeTypeInMap)(i,r),(0,y.ensureMimeTypeInMap)(t.MU,r);var a=null!==(o=t.MU.get(r))&&void 0!==o?o:[],s=a.length?a:t.MU.getAllValues();(e.get(r)||[]).forEach((function(r){var o=(0,M.findOverflowDataForSegmentInMap)(r,s,t.KU.settings.GAP_TOLERANCE,t.KU.logger);if(t.IV(o,r,e))r.updateAsDiscontinuous(),(0,y.addSegmentTimeInfoToMap)(i,r.mimeType,r);else{var a=o.baseMediaDecodeTime,u=o.presentationTimeOffset;r.updateAsContinuous(a,u),(0,y.addSegmentTimeInfoToMap)(n,r.mimeType,r)}}))})),{discontinuousSegmentTimeInfoMap:i,continuousSegmentTimeInfoMap:n}},e.prototype.KV=function(e,t,n){var i=this.JV(t),r=i.discontinuousSegmentTimeInfoMap,o=i.continuousSegmentTimeInfoMap;if(this.pV(e,o),this.AV(e,r,n))return!0;var a=(0,E.maybeSwitchOverASegmentToDiscontinuous)({continuousSegmentTimeInfoMap:o,discontinuousSegmentTimeInfoMap:r});if(!a){var s=this.JV(this.MU);a=(0,E.maybeSwitchOverASegmentToDiscontinuous)({continuousSegmentTimeInfoMap:s.continuousSegmentTimeInfoMap,discontinuousSegmentTimeInfoMap:r})}return!!a&&this.AV(e,r,n)},e.prototype.LV=function(e){var t=this;e.forAll((function(e,n){var i;(null===(i=t.MU.get(e))||void 0===i?void 0:i.find(n.equals))||(0,y.addSegmentTimeInfoToMap)(t.MU,n.mimeType,n);var r=t.NU.get(n.mimeType);r&&r.resolve(0)}))},e.prototype.MV=function(e){return e.every((function(e){return p.MimeTypeHelper.isMP4(e.getMimeType())}))},e.prototype.NV=function(){this.maxSafeBaseMediaDecodeTime=1/0,this.maxSafePresentationTimeOffset=1/0},e.prototype.OV=function(){return this.maxSafeBaseMediaDecodeTime!==1/0||this.maxSafePresentationTimeOffset!==1/0},e.prototype.rewriteTimeStampsIfNecessary=function(e){var t;!this.MV(e)&&this.OV()&&this.NV();var n=this.PV(),i=e.map(b.getSectionId).reduce(O,[]).some((function(e){return!n.includes(e)})),r=function(e){return e.reduce((function(e,t){return e.includes(t.getMimeType())||e.push(t.getMimeType()),e}),[])}(e),o=this.MU.keys.every((function(e){return r.includes(e)}));if(i&&!o)return!1;var a=this.mV(e),s=a[0],u=a[1],c=a[2];if(s)return this.KV(e,c,u);if(i&&u)return this.QV(e,c),!0;for(var f=0,l=c.getAllValues();f<l.length;f++){var d=l[f],p=d.mimeType,m=null!==(t=this.MU.get(p))&&void 0!==t?t:[],v=(0,M.findPrecedingSegmentTimeInfo)(m,d,this.KU.settings.GAP_TOLERANCE);(null==v?void 0:v.isBaseMediaDecodeTimeLimitExceeded)&&!d.isBaseMediaDecodeTimeLimitExceeded&&(d.updateAsDiscontinuous(),d.updateAsContinuous(d.originalBaseMediaDecodeTime,v.truncatedPresentationTimeOffset))}return this.LV(c),!0},e.prototype.PV=function(){return this.MU.transform((function(e){return e.map((function(e){return e.sectionId}))})).flatMap((function(e){return e})).reduce(O,[])},e.prototype.QV=function(e,t){var n={},i=this.yV(t);t.forAll((function(e,t){var r=-i*t.timescale,o=r/t.timescale;t.isBaseMediaDecodeTimeLimitExceeded=!0,t.updateAsContinuous(t.originalBaseMediaDecodeTime,t.originalPresentationTimeOffset-r),n[t.mimeType]=o})),this.vV(n),this.LV(t),e.forEach((function(e){return e.setDirty(!0)}))},e.prototype.signalBufferRemoval=function(e,t,n){var i;if(this.MU.has(e)){var r=o.BufferRangeHelper.mergeRanges(t,this.KU.settings.GAP_TOLERANCE),a=this.MU.get(e)||[],s=a.filter((function(e){return e.isPlaybackRangeOverlapping(r)}));if(0===s.length&&this.vV(((i={})[e]=0,i)),this.RV(a,r,n)){var u=a[0];u.markAsReferenceSegment(),s.push(u)}this.MU.set(e,s)}},e.prototype.RV=function(e,t,n){var i=this.SV();if((0,d.isSwitchingBufferBlocks)(i)||0!==t.length||0===e.length)return!1;var r=this.KU.store.getState(),o=!!(null==r?void 0:r.player)&&(0,s.getIsSeekingOrTimeshifting)(r.player),u=this.KU.serviceManager.get(a.ServiceName.ManifestService,this.KU.sourceContext.sourceIdentifier),c=this.mapToExternalTime(n),f=null==u?void 0:u.getPeriodIdForTime(c);return!o&&e[0].periodId===f},e.prototype.mapToExternalTime=function(e,t){var n=this;void 0===t&&(t=!1);var i=this.MU.getAllValues(),r=i.find((function(t){var i=t.playbackRange.start-n.KU.settings.GAP_TOLERANCE,r=t.playbackRange.end+n.KU.settings.GAP_TOLERANCE;return!t.isReferenceSegment&&e>=i&&e<=r}))||(t?i[0]:void 0);return r&&(this.PU=r.originalPlaybackTime-r.playbackTime),this.mapToCachedExternalTime(e)},e.prototype.mapToCachedExternalTime=function(e){return void 0!==this.PU?Math.max(this.PU+e,0):e},e.prototype.mapToInternalTime=function(e,t,n){var i=this;void 0===t&&(t=!1);var r=this.MU.getAllValues().filter((function(e){return void 0===n||n===e.mimeType})),o=r.find((function(t){var n=t.originalPlaybackRange.start-i.KU.settings.GAP_TOLERANCE,r=t.originalPlaybackRange.end+i.KU.settings.GAP_TOLERANCE;return e>=n&&e<=r}))||(t?r[0]:void 0);return o?Math.max(o.playbackTime+(e-o.originalPlaybackTime),0):e},e.prototype.mapToExternalTimeRange=function(e){if(null!=e)return{start:this.mapToExternalTime(e.start),end:this.mapToExternalTime(e.end)}},e.prototype.mapToExternalTimeRanges=function(e){var t=this;return e.map((function(e){return t.mapToExternalTimeRange(e)})).filter((function(e){return void 0!==e}))},e.prototype.mapToExternalTimeRangesMap=function(e){var t=this;return null==e?null:Object.keys(e).reduce((function(n,i){return n[i]=t.mapToExternalTimeRanges(e[i]),n}),{})},e.prototype.getSegmentTimeRanges=function(e,t){var n=this,i=[];return e.forEach((function(e){var r=n.MU.get(t).find((function(t){return t.isSegmentMatching(e)}));r&&i.push(r.playbackRange)})),i},e.prototype.getCorrectTimeStampOffset=function(e,t){var n=this.NU.get(e);return n||(n=new l.Deferred,this.NU.set(e,n)),n.promise.then((function(e){return t+e}))},e.prototype.dispose=function(){var e,t,n,i;this.MU.clear(),this.hV(),null===(e=this.KU.videoElement)||void 0===e||e.removeEventListener(h.MediaElementEvent.currenttimenotadvancing,this.eV),null===(t=this.KU.videoElement)||void 0===t||t.removeEventListener(h.MediaElementEvent.waiting,this.eV),null===(n=this.KU.videoElement)||void 0===n||n.removeEventListener(h.MediaElementEvent.stalled,this.eV),null===(i=this.KU.videoElement)||void 0===i||i.removeEventListener(h.MediaElementEvent.timeupdate,this.dV)},e.prototype.SV=function(){return this.KU.serviceManager.get(a.ServiceName.SourceStoreService,this.KU.sourceContext.sourceIdentifier)},e}();function O(e,t){return e.includes(t)||e.push(t),e}t.BaseMediaDecodeTimeHandler=S,Math.log(2)},44885:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.addSegmentTimeInfoToMap=void 0,t.ensureMimeTypeInMap=function(e,t){e.get(t)||e.addAll(t,[])},t.addSegmentTimeInfoToMap=function(e,t,n){(function(e,t,n){var i;return null===(i=e.get(t))||void 0===i?void 0:i.find((function(e){return e.segmentUrl===(null==n?void 0:n.segmentUrl)&&e.equals(n)}))})(e,t,n)||e.add(t,n)}},73849:function(e,t){function n(e){return Math.floor(e.originalBaseMediaDecodeTime-e.baseMediaDecodeTime)}function i(e){return Math.floor(e.originalPresentationTimeOffset-e.presentationTimeOffset)}function r(e,t,n){return e.find((function(e){var i=e.originalPlaybackRange.end;return t.originalPlaybackRange.start>=i-n&&t.originalPlaybackRange.start<=i+n}))}function o(e,t){return e.reduce((function(e,n){var i=n.originalPlaybackTime,r=e?e.originalPlaybackTime:-1/0;return i<t&&i>r?n:e}),void 0)}Object.defineProperty(t,"__esModule",{value:!0}),t.findOverflowDataForSegmentInMap=function(e,t,a,s){var u=1/0,c=1/0,f=r(t,e,a)||o(t,e.originalPlaybackTime),l=f?e.timescale/f.timescale:1,d=f&&e.originalPresentationTimeOffset===f.originalPresentationTimeOffset*l;return d&&(u=e.originalBaseMediaDecodeTime-Math.round(n(f)*l),c=e.originalPresentationTimeOffset-Math.round(i(f)*l)),{baseMediaDecodeTime:u,presentationTimeOffset:c,foundMatchingPreviousSegment:Boolean(d)}},t.getBmdtOffset=n,t.getPtoOffset=i,t.findPrecedingSegmentTimeInfo=r,t.getLargestPrecedingSegmentTimeInfo=o},8301:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.findContinuousSegmentToMove=t.maybeSwitchOverASegmentToDiscontinuous=void 0;var i=n(44885);t.maybeSwitchOverASegmentToDiscontinuous=function(e){var n=(0,t.findContinuousSegmentToMove)(e);return n&&(e.continuousSegmentTimeInfoMap.deleteValue(n.mimeType,n),n.updateAsDiscontinuous(),(0,i.addSegmentTimeInfoToMap)(e.discontinuousSegmentTimeInfoMap,n.mimeType,n)),n},t.findContinuousSegmentToMove=function(e){var t=e.continuousSegmentTimeInfoMap.keys;if(2!==t.length)return null;if(t.every((function(t){return e.continuousSegmentTimeInfoMap.get(t).length>0})))return null;for(var n=0,i=t;n<i.length;n++){var r=i[n];if(e.discontinuousSegmentTimeInfoMap.has(r)&&!((e.discontinuousSegmentTimeInfoMap.get(r)||[]).length>0)){var o=e.continuousSegmentTimeInfoMap.get(r)||[];if(o.length)return o[0]}}return null}},48558:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTimeInformation=void 0,t.getSectionId=o;var i=n(4524),r=function(){function e(e,t){var n,i,r=this;this.equals=function(e){if(e){var t=r.mimeType===e.mimeType,n=r.duration===e.duration,i=r.originalBaseMediaDecodeTime===e.originalBaseMediaDecodeTime,o=r.sectionId===e.sectionId;return t&&n&&i&&o}return!1},this.segmentUrl=e.getUrl(),this.duration=e.getDuration(),this.mimeType=e.getMimeType(),this.timescale=null!==(n=e.getTimescale())&&void 0!==n?n:1,this.originalPlaybackTime=e.getPlaybackTime(),this.zbb=null===(i=e.getSegmentInfo())||void 0===i?void 0:i.byteRange,this.originalBaseMediaDecodeTime=e.getBaseMediaDecodeTime(),this.originalPresentationTimeOffset=e.getPresentationTimeOffset()*this.timescale,this.isBaseMediaDecodeTimeLimitExceeded=this.originalBaseMediaDecodeTime+this.duration*this.timescale>t,this.periodId=e.getPeriodId(),this.ybb=!1,this.sectionId=o(e),this.truncatedBaseMediaDecodeTime=1/0,this.truncatedPresentationTimeOffset=1/0,this.truncatedPlaybackTime=1/0}return Object.defineProperty(e.prototype,"isReferenceSegment",{get:function(){return this.ybb},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playbackTime",{get:function(){return this.isBaseMediaDecodeTimeLimitExceeded&&this.truncatedPlaybackTime!==1/0?this.truncatedPlaybackTime:this.originalPlaybackTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseMediaDecodeTime",{get:function(){return this.isBaseMediaDecodeTimeLimitExceeded&&this.truncatedBaseMediaDecodeTime!==1/0?this.truncatedBaseMediaDecodeTime:this.originalBaseMediaDecodeTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"presentationTimeOffset",{get:function(){return this.isBaseMediaDecodeTimeLimitExceeded&&this.truncatedPresentationTimeOffset!==1/0?this.truncatedPresentationTimeOffset:this.originalPresentationTimeOffset},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playbackRange",{get:function(){return{start:this.playbackTime,end:this.playbackTime+this.duration}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"originalPlaybackRange",{get:function(){return{start:this.originalPlaybackTime,end:this.originalPlaybackTime+this.duration}},enumerable:!1,configurable:!0}),e.prototype.getMatchingSegment=function(e){var t=this;return e.find((function(e){return t.isSegmentMatching(e)}))},e.prototype.isSegmentMatching=function(e){var t,n,i,r=e.getUrl()===this.segmentUrl,o=e.getPlaybackTime()===this.originalPlaybackTime,a=null===(t=e.getSegmentInfo())||void 0===t?void 0:t.byteRange,s=(null==a?void 0:a.start)===(null===(n=this.zbb)||void 0===n?void 0:n.start),u=(null==a?void 0:a.end)===(null===(i=this.zbb)||void 0===i?void 0:i.end),c=s&&u,f=e.getMimeType()===this.mimeType;return r&&o&&c&&f},e.prototype.updateAsDiscontinuous=function(){this.isBaseMediaDecodeTimeLimitExceeded=!0},e.prototype.updateAsContinuous=function(e,t){this.truncatedBaseMediaDecodeTime=e,this.truncatedPresentationTimeOffset=t,this.truncatedPlaybackTime=(e-t)/this.timescale},e.prototype.markAsReferenceSegment=function(){this.ybb=!0},e.prototype.isPlaybackRangeOverlapping=function(e){var t=this.playbackRange,n={buffered:e},r=i.BufferRangeHelper.isInBufferedRange(n,t.start),o=i.BufferRangeHelper.isInBufferedRange(n,t.end),a=i.BufferRangeHelper.getCommonBufferedRanges({buffered:e,inSegment:[t]}).length>0;return r||o||a},e}();function o(e){var t,n,i;return null!==(i=null===(n=null===(t=e.getSegmentInfo())||void 0===t?void 0:t.discontinuitySequenceNumber)||void 0===n?void 0:n.toString())&&void 0!==i?i:e.getPeriodId()}t.SegmentTimeInformation=r},21651:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTimeInformationArrayMap=void 0;var r=function(e){function t(){return e.call(this,(function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime}))||this}return i(t,e),t.prototype.find=function(e){if(e)return this.get(e.getMimeType()).find((function(t){return t.isSegmentMatching(e)}))},t}(n(61252).SortedArrayMap);t.SegmentTimeInformationArrayMap=r},61252:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SortedArrayMap=void 0;var r=function(e){function t(t){var n=e.call(this)||this;return n.Sbb=t,n.Tbb=[],n}return i(t,e),t.prototype.getAllValues=function(){return this.Tbb},t.prototype.Ubb=function(e){return e?e.sort(this.Sbb):[]},t.prototype.set=function(t,n){var i=this.Ubb(n);return this.Vbb(t,i),e.prototype.set.call(this,t,i)},t.prototype.add=function(e,t){var n=t?[t]:[];return this.addAll(e,n),this},t.prototype.addAll=function(e,t){this.ensure(e),this.set(e,[].concat(t||[],this.get(e)))},t.prototype.delete=function(t){return this.Wbb(this.get(t)),e.prototype.delete.call(this,t)},t.prototype.deleteValue=function(t,n){return this.Wbb([n]),e.prototype.deleteValue.call(this,t,n)},t.prototype.clear=function(){this.Tbb=[],e.prototype.clear.call(this)},t.prototype.Vbb=function(e,t){void 0===t&&(t=[]);var n=this.get(e);this.Wbb(n),this.Tbb=this.Ubb(this.Tbb.concat(t))},t.prototype.Wbb=function(e){var t=this;void 0===e&&(e=[]),e.forEach((function(e){var n=t.Tbb.indexOf(e);n>-1&&t.Tbb.splice(n,1)}))},t}(n(19483).ArrayMap);t.SortedArrayMap=r},1124:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.getTvMseWrapperConstructor=function(){return void 0===r&&(r=f()),r};var r,o=n(3714),a=n(20213),s=n(70850),u=n(88052),c=n(24281),f=function(){return function(e){function t(t,n){var i=e.call(this,t)||this;return i.Bbb={},i.Abb=n,i}return i(t,e),t.prototype.printDetailedBufferRange=function(e,t){var n;try{n=e.buffered}catch(e){return}if(0!==n.length)for(var i=0;i<n.length;i++)n.start(i),n.end(i)},t.prototype.getBufferStartTime=function(){var e=this,t=Object.keys(this.sourceBuffers).map((function(t){return 0===e.sourceBuffers[t].bufferedRanges.length?0:e.Abb.mapToExternalTime(e.sourceBuffers[t].bufferedRanges[0].start)}));return Math.max.apply(null,t)},t.prototype.updateTimestampOffset=function(t,n){try{e.prototype.updateTimestampOffset.call(this,t,n)}catch(e){e.code===DOMException.INVALID_STATE_ERR&&this.context.eventHandler.dispatchEvent(o.PlayerEvent.Warning,new a.PlayerWarning(a.WarningCode.PLAYBACK_WARNING,"Unable to update timestampOffset (Invalid State error)",e))}},t.prototype.Cbb=function(e,t){this.Bbb[e]||(this.Bbb[e]={currentOffset:this.sourceBuffers[e].buffer.timestampOffset,pendingOffset:t})},t.prototype.queueTimestampOffsetUpdate=function(t,n){var i=this;return this.Cbb(t,n),this.Abb.getCorrectTimeStampOffset(t,n).then((function(e){return i.Bbb[t].pendingOffset=e})).then((function(){var n=i.Bbb[t].pendingOffset,r=i.Bbb[t].currentOffset;return s.Util.roundValue(r,6)===s.Util.roundValue(n,6)&&i.isMediaSourceOpen()?Promise.resolve():(i.Bbb[t].currentOffset=n,e.prototype.queueTimestampOffsetUpdate.call(i,t,n).finally((function(){var e,n,r=null===(n=null===(e=i.sourceBuffers[t])||void 0===e?void 0:e.buffer)||void 0===n?void 0:n.timestampOffset;i.Bbb[t].currentOffset=r})))}))},t.prototype.getBufferRangeStart=function(e,t){void 0===t&&(t=0);var n=this.Abb.getEarliestExternalTimeBufferedRangeIndex(e);return Math.max(t,e.start(n))},t.prototype.preBufferRemoval=function(e,t,n){},t.prototype.getRangePendingRemoval=function(e){return this.sourceBuffers.hasOwnProperty(e)&&this.Abb.mapToExternalTimeRange(this.sourceBuffers[e].rangePendingRemoval)||void 0},t.prototype.addToBuffer=function(t){var n=this;return(0,c.rewriteUnsupportedBoxes)(t),this.Dbb(t).then((function(){return e.prototype.addToBuffer.call(n,t)}))},t.prototype.Dbb=function(e){var t=e.getMimeType(),n=-e.getPresentationTimeOffset();return e.isDirty()&&!e.isInit()?this.setTimestampOffset(t,n):Promise.resolve()},t}(u.ModuleManager.get(a.ModuleName.RendererMse).MSEWrapper)}},35501:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.getTvRendererConstructor=function(){return void 0===o&&(o=m()),o};var o,a=n(4524),s=n(66790),u=n(34841),c=n(88052),f=n(62756),l=n(84276),d=n(48558),p=n(1124),m=function(){return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.postBufferRemoval=function(e,n,i){t.video&&t.baseMediaDecodeTimeHandler.signalBufferRemoval(e,t.HU(e),t.video.currentTime)},t}return i(t,e),t.prototype.init=function(t){this.baseMediaDecodeTimeHandler=new l.BaseMediaDecodeTimeHandler(this.context,this.GU.bind(this),this.getMaxSafeBaseMediaDecodeTime(),this.getMaxSafePresentationTimeOffset()),e.prototype.init.call(this,t),this.FU||(this.FU=new u.Deferred),this.FU.resolve(this.baseMediaDecodeTimeHandler)},t.prototype.getMaxSafeBaseMediaDecodeTime=function(){return 1/0},t.prototype.getMaxSafePresentationTimeOffset=function(){return 1/0},t.prototype.createMSEWrapper=function(){return new((0,p.getTvMseWrapperConstructor)())(this.context,this.baseMediaDecodeTimeHandler)},t.prototype.getCurrentVideoTime=function(){return this.baseMediaDecodeTimeHandler.mapToExternalTime(e.prototype.getCurrentVideoTime.call(this))},t.prototype.getRangesInSourceBuffers=function(){return this.baseMediaDecodeTimeHandler.mapToExternalTimeRangesMap(e.prototype.getRangesInSourceBuffers.call(this))},t.prototype.getBufferedRanges=function(t){return this.baseMediaDecodeTimeHandler.mapToExternalTimeRanges(e.prototype.getBufferedRanges.call(this,t))},t.prototype.getVideoElementBufferedRanges=function(){var t=e.prototype.getVideoElementBufferedRanges.call(this);return this.baseMediaDecodeTimeHandler.mapToExternalTimeRanges(t)},t.prototype.GU=function(e){var t,n,i=this;if(!this.mse)return Promise.reject();var r=null===(t=this.mse)||void 0===t?void 0:t.getBufferedRanges(e),o=null!==(n=null==r?void 0:r.slice(1))&&void 0!==n?n:[];return Promise.all(o.map((function(t){var n;return null===(n=i.mse)||void 0===n?void 0:n.removeFromBuffer(e,t.start-i.settings.GAP_TOLERANCE,t.end+i.settings.GAP_TOLERANCE,i.postBufferRemoval)}))).then((function(){}))},t.prototype.removeData=function(e,t,n,i){if(void 0===i&&(i=!1),!this.mse)return Promise.reject();void 0===t&&void 0===n&&!i&&this.saveCurrentTime(),this.removeDataFromSegmentQueues(e,t,n);var r=void 0!==t?this.baseMediaDecodeTimeHandler.mapToInternalTime(t,!0,e):void 0,o=void 0!==n?this.baseMediaDecodeTimeHandler.mapToInternalTime(n,!0,e):void 0;return this.mse.removeFromBuffer(e,r,o,this.postBufferRemoval)},t.prototype.addSegmentFromQueueToMse=function(t){var n=this,i=this.IU((function(e){return!e.isInit()})),r=Object.keys(this.segmentQueues).every((function(e){var t=n.mse&&n.mse.getBufferedRanges(e).length>0,r=i.some((function(t){return t.getMimeType()===e}));return t||r}));if(0===i.length||!r)return Promise.reject(s.SOURCE_BUFFER_APPEND_STATUS.SUSPENDED);var o=i.reduce((function(e,t){return t.getPlaybackTime()<e.getPlaybackTime()?t:e}),i[0]),a=(0,d.getSectionId)(o),u=this.IU((function(e){return!e.isInit()&&(0,d.getSectionId)(e)===a}));return this.baseMediaDecodeTimeHandler.rewriteTimeStampsIfNecessary(u)?e.prototype.addSegmentFromQueueToMse.call(this,t):Promise.reject(s.SOURCE_BUFFER_APPEND_STATUS.SUSPENDED)},t.prototype.HU=function(e){var t,n;if(null===this.mse||!this.segmentQueues.hasOwnProperty(e))return[];var i=this.IU((function(e){return!e.isInit()})),o=this.baseMediaDecodeTimeHandler.getSegmentTimeRanges(i,e),s=null!==(n=null===(t=this.mse)||void 0===t?void 0:t.getBufferedRanges(e))&&void 0!==n?n:[];return a.BufferRangeHelper.mergeRanges(r(r([],o,!0),s,!0),this.settings.GAP_TOLERANCE)},t.prototype.adjustTimeToNextCommonBufferStart=function(t){var n=e.prototype.adjustTimeToNextCommonBufferStart.call(this,t);return isNaN(n)?NaN:Math.ceil(100*this.baseMediaDecodeTimeHandler.mapToInternalTime(n))/100},t.prototype.seekOnVideoElement=function(e){var t=this;return this.waitingForSeekedPromise=new Promise((function(n,i){if(t.video){t.video.currentTime=e;var r=t.video.currentTime;n(t.getBaseMediaDecodeTimeHandler().then((function(e){return e.mapToExternalTime(r)})))}else i("No video reference")})),this.waitingForSeekedPromise},t.prototype.getBaseMediaDecodeTimeHandler=function(){return this.FU.promise},t.prototype.IU=function(e){var t=this;return void 0===e&&(e=function(){return!0}),Object.keys(this.segmentQueues).flatMap((function(e){return t.segmentQueues[e]})).filter(e)},t.prototype.getEndOfBufferTime=function(){if(this.video&&this.video.buffered&&this.video.buffered.length>0&&this.baseMediaDecodeTimeHandler)return this.baseMediaDecodeTimeHandler.getEndOfBufferTime()},t.prototype.shutdown=function(t){var n=this;return e.prototype.shutdown.call(this,t).then((function(){n.JU()}))},t.prototype.JU=function(){this.FU=new u.Deferred,this.baseMediaDecodeTimeHandler.dispose()},t.prototype.release=function(){return this.JU(),e.prototype.release.call(this)},t}(c.ModuleManager.get(f.ModuleName.RendererMse).MSERenderer)}},24281:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.rewriteUnsupportedBoxes=function(e,t){void 0===t&&(t=o),t.forEach((function(t){var n,i=null===(n=e.getParsedData())||void 0===n?void 0:n.get(t);i&&(0,r.rewriteMp4BoxType)(i,"free")}))};var i=n(15487),r=n(2992),o=function(){var e=["skip"];return((0,i.isTizen2016)()||(0,i.isTizen2017)())&&e.push("moov.trak.edts"),e}()}},function(e){return function(){return e(e.s=59235)}()}])}));
|
|
17
|
+
"use strict";!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.tizen=t():(e.bitmovin=e.bitmovin||{},e.bitmovin.player=e.bitmovin.player||{},e.bitmovin.player.tizen=t())}(self,(function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[405],{28006:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.IncreasingTimeout=void 0;var i=n(88844),r=function(){function e(e,t,n){this.defaultInterval=e,this.maxInterval=t,this.intervalMultiplier=n,this.resetInterval()}return e.prototype.clearTimeout=function(){(0,i.clearTimeoutIfDefined)(this.yU)},e.prototype.setTimeout=function(e){this.clearTimeout(),this.yU=window.setTimeout((function(){return e()}),this.zU)},e.prototype.resetInterval=function(){this.zU=this.defaultInterval},e.prototype.increaseInterval=function(){this.zU=Math.min(this.maxInterval,this.zU*this.intervalMultiplier)},e}();t.IncreasingTimeout=r},59235:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.TizenModuleDefinition=void 0;var i=n(70962),r=n(15487),o=n(62756),a=n(53188),s=n(69411),u=n(26862),c=n(74682);t.TizenModuleDefinition={name:o.ModuleName.Tizen,module:function(){return{createTizenDRMManager:a.createTizenDRMManager,TizenVideoElementWrapper:c.TizenVideoElementWrapper,getTizenEMEHandlerConstructor:s.getTizenEMEHandlerConstructor,getTizenMSERendererConstructor:u.getTizenMSERendererConstructor}},dependencies:[o.ModuleName.RendererMse],hooks:{add:function(){var e;(0,r.isTizen2017)()&&(i.DefaultSettings.END_OF_BUFFER_TOLERANCE=.7),((0,r.isTizen2016)()||(0,r.isTizen2017)())&&(i.DefaultSettings.HLS_CLEAR_BUFFERS_ON_DISCONTINUITY_SWITCHES=!0),(0,r.isTizen2022)()&&(i.DefaultSettings.TIZEN_DELAY_END_OF_STREAM_SIGNALING=!0),(null!==(e=(0,r.getTizenVersion)().major)&&void 0!==e?e:0)<r.TIZEN_2019_MAJOR_VERSION&&(i.DefaultSettings.TIZEN_MAX_SAFE_BMDT=4294967295,i.DefaultSettings.TIZEN_MAX_SAFE_PTO=4294967295),(0,r.isTizen2017)()||(0,r.isTizen2018)()||(0,r.isTizen2019)()?i.DefaultSettings.MAX_STARTUP_BUFFER=4:i.DefaultSettings.MAX_STARTUP_BUFFER=2.5}}},t.default=t.TizenModuleDefinition},53188:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.createTizenDRMManager=function(e){return new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onInitDataAdded=function(n){e.prototype.addInitData.call(t,n)},t}return i(t,e),t.prototype.setConfig=function(t,n){var i=this;return e.prototype.setConfig.call(this,t,n).then((function(e){return null!==i.emeHandler&&s(i.emeHandler)&&i.emeHandler.addInitDataListener(i),e}))},t.prototype.Qu=function(e){var t,n="";do{t=this.emeHandler.getIdentifierFromInitData(e.initDataStr)+n,n="-".concat(a.Util.generateUniqueId())}while(this.licenseStorage.getLicense(t,this.usedKeySystem.kind));return t},t.prototype.preprocessInitDataStr=function(e){if(e.initDataStr)return e.forceLicenseRequest?this.Qu(e):this.emeHandler.getIdentifierFromInitData(e.initDataStr)},t.prototype.shutdown=function(){return null!==this.emeHandler&&s(this.emeHandler)&&this.emeHandler.removeInitDataListener(this),e.prototype.shutdown.call(this)},t}(r.ModuleManager.get(o.ModuleName.DRM).DRMManager))(e)};var r=n(88052),o=n(62756),a=n(70850),s=function(e){return"function"==typeof e.addInitDataListener&&"function"==typeof e.removeInitDataListener}},69411:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getTizenEMEHandlerConstructor=function(){var e=a.ModuleManager.get(s.ModuleName.DRM);return null===u&&(u=function(e){function t(t){var n=e.call(this,t)||this;return n.cv=[],n.Ru=new o.Deferred,n}return i(t,e),t.prototype.invokeEncryptedListener=function(t,n){var i=this;e.prototype.invokeEncryptedListener.call(this,t,n),n.forEach((function(e){return i.cv.forEach((function(n){n.onInitDataAdded(r(r({},e),{initData:t.buffer,forceLicenseRequest:!0}))}))})),this.Ru.resolve()},t.prototype.addInitDataListener=function(e){this.cv.includes(e)||this.cv.push(e)},t.prototype.removeInitDataListener=function(e){var t=this.cv.findIndex((function(t){return t===e}));t>-1&&this.cv.splice(t,1)},t.prototype.requestLicense=function(t,n){var i=this;return this.Ru.promise.then((function(){return e.prototype.requestLicense.call(i,t,n)}))},t}(e.WebKitPrefixedEMEHandler)),u};var o=n(34841),a=n(88052),s=n(62756),u=null},26862:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_VALUE_32_BIT=t.TIZEN_2018_BUFFER_START_SAFETY_MARGIN=void 0,t.getTizenMSERendererConstructor=function(){if(null===p){var e=(0,d.getTvRendererConstructor)();p=function(e){function n(t){var n=e.call(this,t)||this;return n.fv=function(){var e,t,i;if("ended"===(null===(e=n.mse)||void 0===e?void 0:e.readyState))return null!==(t=n.getEndOfBufferTime())&&void 0!==t?t:-1;var r=n.context.sourceContext.sourceIdentifier,a=n.context.serviceManager.get(o.ServiceName.ManifestService,r),s=n.getDuration();if(null==a?void 0:a.isLive()){var u=Object.values(null!==(i=n.getRangesInSourceBuffers())&&void 0!==i?i:[]).find((function(e){return e.find((function(e){return e.end>s}))}));if(u)return u.reduce((function(e,t){return e.end<t.end?t:e})).end}return s},n.gv=function(){if(!n.dv&&!n.video.ended){var e=n.fv(),t=n.getCurrentTime();if(t&&e>0&&e-t<=1){var i=Math.max(e-t,0),r=(0,c.toMilliSeconds)(i)/n.video.playbackRate+(0,c.toMilliSeconds)(1);n.dv=setTimeout((function(){n.context.isDisposed||n.video.paused||n.video.eventHandler.triggerEvent(l.MediaElementEvent.ended),n.dv=null}),r)}}},n.hv=function(){n.iv();var e=n.getDuration(),t=n.getCurrentTime();t&&e&&t>=e&&n.video.eventHandler.triggerEvent(l.MediaElementEvent.ended)},n.iv=function(){n.dv&&((0,f.clearTimeoutIfDefined)(n.dv),n.dv=null)},n.dv=null,n.video.addEventListener(l.MediaElementEvent.timeupdate,n.gv),n.video.addEventListener(l.MediaElementEvent.stalled,n.gv),n.video.addEventListener(l.MediaElementEvent.seeking,n.iv),n.video.addEventListener(l.MediaElementEvent.ended,n.iv),n.video.addEventListener(l.MediaElementEvent.pause,n.hv),n}return i(n,e),n.prototype.getMaxSafeBaseMediaDecodeTime=function(){return this.context.settings.TIZEN_MAX_SAFE_BMDT},n.prototype.getMaxSafePresentationTimeOffset=function(){return this.context.settings.TIZEN_MAX_SAFE_PTO},n.prototype.jv=function(){var e;return null!==(e=this.ev)&&void 0!==e||(this.ev=new s.DelayedEndOfStreamHelper(this.context,2)),this.ev},n.prototype.setEndOfStream=function(t){var n=this;return void 0===t&&(t=!0),this.context.settings.TIZEN_DELAY_END_OF_STREAM_SIGNALING?this.jv().setEndOfStream(t,(function(){return e.prototype.setEndOfStream.call(n,t)})):e.prototype.setEndOfStream.call(this,t)},n.prototype.setDuration=function(e){this.mse&&(e=Math.floor(1e4*e)/1e4,isFinite(e)||(e=m),this.mse.setDuration(e))},n.prototype.getDuration=function(){var e,t,n,i,r,o=isNaN(null!==(t=null===(e=this.video)||void 0===e?void 0:e.duration)&&void 0!==t?t:NaN)?null!==(i=null===(n=this.mse)||void 0===n?void 0:n.getDuration())&&void 0!==i?i:0:null===(r=this.video)||void 0===r?void 0:r.duration;return o===m?1/0:null!=o?o:NaN},n.prototype.release=function(){var t;return this.video.removeEventListener(l.MediaElementEvent.timeupdate,this.gv),this.video.removeEventListener(l.MediaElementEvent.stalled,this.gv),this.video.removeEventListener(l.MediaElementEvent.seeking,this.iv),this.video.removeEventListener(l.MediaElementEvent.ended,this.iv),this.video.removeEventListener(l.MediaElementEvent.pause,this.hv),null===(t=this.ev)||void 0===t||t.release(),e.prototype.release.call(this)},n.prototype.removeData=function(t,n,i,r){var o=this;return void 0===r&&(r=!1),this.waitingForSeekedPromise,Promise.resolve(this.waitingForSeekedPromise).catch((function(e){})).then((function(){return e.prototype.removeData.call(o,t,n,i,r)}))},n.prototype.adjustTimeToNextCommonBufferStart=function(n){var i=e.prototype.adjustTimeToNextCommonBufferStart.call(this,n);return!isNaN(i)&&(0,u.isTizen2018)()&&this.video?function(e,t,n){var i=(0,r.getBufferedRanges)(e).find((function(e){return e.start<=t&&t<=e.end}));return i?Math.max(t,i.start+n):t}(this.video,i,t.TIZEN_2018_BUFFER_START_SAFETY_MARGIN):i},n.prototype.seekOnVideoElement=function(e){var t=this,n=-1,i=new Promise((function(i){var r=[l.MediaElementEvent.seeked,l.MediaElementEvent.playing,l.MediaElementEvent.canplay],o=function(){(0,f.clearTimeoutIfDefined)(n);var e=t.video.currentTime;i(t.getBaseMediaDecodeTimeHandler().then((function(t){return t.mapToExternalTime(e)}))),s()},s=function(){r.forEach((function(e){t.eventHandler.off(e,o)})),t.playerEventHandler.off(a.PlayerEvent.PeriodSwitched,o)};r.forEach((function(e){t.eventHandler.on(e,o)})),t.playerEventHandler.on(a.PlayerEvent.PeriodSwitched,o);try{t.video.currentTime=e}catch(e){throw s(),e}}));if((0,u.isTizen2017)()||(0,u.isTizen2018)()){var r=new Promise((function(i){n=window.setTimeout((function(){return i(t.getBaseMediaDecodeTimeHandler().then((function(t){return t.mapToExternalTime(e)})))}),v)}));this.waitingForSeekedPromise=Promise.race([r,i])}else this.waitingForSeekedPromise=i;return this.waitingForSeekedPromise},n.prototype.saveCurrentTime=function(){var e=this,t=Object.keys(this.segmentQueues).some((function(t){return e.getBufferedRanges(t).length>0}));this.setCurrentTimeContext?this.savedCurrentTime=this.setCurrentTimeContext.time:t&&(this.savedCurrentTime=this.getCurrentVideoTime())},n}(e)}return p};var r=n(4524),o=n(80813),a=n(3714),s=n(35660),u=n(15487),c=n(89927),f=n(88844),l=n(19274),d=n(35501),p=null,m=Math.pow(2,32),v=1e3;t.TIZEN_2018_BUFFER_START_SAFETY_MARGIN=.02,t.MAX_VALUE_32_BIT=Math.pow(2,32)-1},74682:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TizenVideoElementWrapper=t.MaxSameCurrentTimeUpdate=void 0;var r=n(15487),o=n(19274),a=n(79186),s=n(28006);t.MaxSameCurrentTimeUpdate=10;var u=function(e){function n(t,n){var i=e.call(this,t,n)||this;i.pv=function(){i.kv.clearTimeout()},i.qv=function(){i.element.seeking||i.mv===i.currentTime||i.kv.clearTimeout(),i.rv()};var o=(0,r.isTizen2018)()?2e4:8e3,a=(0,r.isTizen2018)()?1e4:1e3;return i.kv=new s.IncreasingTimeout(a,o,1.8),i.lv=0,i.mv=-1,i.nv(),i}return i(n,e),n.prototype.nv=function(){this.mediaElementEventHandler.addEventListener(o.MediaElementEvent.playing,this.pv),this.mediaElementEventHandler.addEventListener(o.MediaElementEvent.timeupdate,this.qv)},n.prototype.ov=function(){this.mediaElementEventHandler&&(this.mediaElementEventHandler.removeEventListener(o.MediaElementEvent.playing,this.pv),this.mediaElementEventHandler.removeEventListener(o.MediaElementEvent.timeupdate,this.qv))},n.prototype.rv=function(){this.element.seeking||(this.mv===this.element.currentTime?this.lv++:this.lv=0,this.lv===t.MaxSameCurrentTimeUpdate&&(this.vv(this.mv),this.lv=0),this.mv=this.element.currentTime)},n.prototype.sv=function(e){var t=this;this.kv.setTimeout((function(){return t.uv(e)}))},n.prototype.tv=function(e,t){var n=function(e,t){var n=(e.end-t)/2,i=n+n*Math.random();return t+Math.min(.01+.1*Math.random(),i)}(e,t);this.element.currentTime=n},n.prototype.uv=function(e){!this.element.seeking||this.element.playbackRate>1?(this.element.seeking&&"playbackRate (".concat(this.element.playbackRate,") > 1, disabling currentTime safety checks"),this.kv.clearTimeout()):this.vv(e)},n.prototype.vv=function(e){var t=function(e,t){return function(e){var t=[];try{for(var n=0;n<e.buffered.length;n++)t.push({start:e.buffered.start(n),end:e.buffered.end(n)})}catch(e){}return t}(e).find((function(e){return e.start<=t&&e.end>=t}))}(this.element,e);if(t){if(function(e){var t,n,i=null===(t=e.store)||void 0===t?void 0:t.getState(),r=null==i?void 0:i.drmLicenses,o=null!==(n=null==r?void 0:r.drmData)&&void 0!==n?n:{};return Object.keys(o).flatMap((function(e){return Object.keys(o[e]).map((function(t){return o[e][t]}))})).some((function(e){return e.wasRequested&&!e.hasLicense}))}(this.context))return this.kv.resetInterval(),void this.sv(e);this.tv(t,e),this.kv.increaseInterval(),this.sv(e)}else this.sv(e)},Object.defineProperty(n.prototype,"currentTime",{get:function(){return this.element.currentTime},set:function(e){this.element.currentTime=e,this.kv.resetInterval(),this.lv=0,this.sv(e)},enumerable:!1,configurable:!0}),n.prototype.dispose=function(){this.kv.clearTimeout(),this.ov(),e.prototype.dispose.call(this)},n}(a.VideoElementWrapper);t.TizenVideoElementWrapper=u},84276:function(e,t,n){var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseMediaDecodeTimeHandler=t.PtoGapFillingMode=void 0;var r,o=n(4524),a=n(80813),s=n(87827),u=n(68925),c=n(47602),f=n(19483),l=n(34841),d=n(87244),p=n(85434),m=n(15487),v=n(89927),h=n(19274),g=n(88052),T=n(62756),y=n(44885),M=n(73849),E=n(8301),b=n(48558),O=n(21651);!function(e){e.KeepGaps="keep-gaps",e.FillGaps="fill-gaps"}(r||(t.PtoGapFillingMode=r={}));var _=function(){function e(e,t,n,a){var s=this;this.maxSafeBaseMediaDecodeTime=n,this.maxSafePresentationTimeOffset=a,this.fV=function(){s.hV(s.MU.settings.END_OF_BUFFER_TOLERANCE)},this.gV=function(){s.hV(s.MU.settings.END_OF_BUFFER_RECOVERY_TOLERANCE)},this.mV=function(){if(s.MU.videoElement)try{var e=s.lV(),t=s.MU.videoElement.currentTime,n=s.iV(t).mapEach((function(e){return e.playbackRange})).mapAll((function(e){return o.BufferRangeHelper.mergeRanges(e,s.MU.settings.GAP_TOLERANCE)})).getObject(),r=o.BufferRangeHelper.getCommonBufferedRanges(i(i({},n),{bufferedRanges:e})).shift();if(void 0!==r){var a=r.getStart();s.MU.videoElement.currentTime=a,s.jV(),s.MU.videoElement.eventHandler.removeEventListener(h.MediaElementEvent.currenttimenotadvancing,s.gV),s.dV().finally((function(){var e;return null===(e=s.UV())||void 0===e?void 0:e.dispatch((0,u.setTimestampRollingOver)(!1))})).then((function(){})).catch((function(e){}))}else s.kV()}catch(e){}},this.MU=e,this.cV=r.KeepGaps,this.QU=t,this.NU=void 0,this.PU=new Map,this.OU=new O.SegmentTimeInformationArrayMap,this.MU.videoElement&&(this.MU.videoElement.addEventListener(h.MediaElementEvent.waiting,this.gV),this.MU.videoElement.addEventListener(h.MediaElementEvent.stalled,this.gV),this.MU.videoElement.addEventListener(h.MediaElementEvent.timeupdate,this.fV),e.settings.FORCE_BASE_MEDIA_DECODE_TIME_REWRITE)}return e.prototype.dV=function(){var e=this,t=[];return this.eV().keys.forEach((function(n){t.push(e.QU(n))})),Promise.all(t).then((function(){}))},e.prototype.getEndOfBufferTime=function(){var e=o.BufferRangeHelper.getCommonBufferedRanges(this.eV(!0).getObject()).sort((function(e,t){return e.getStart()-t.getStart()}));return e.length>0?e[e.length-1].getEnd():0},e.prototype.setPtoGapFillingMode=function(e){this.cV=e},e.prototype.getEarliestExternalTimeBufferedRangeIndex=function(e){var t=0;try{for(var n=void 0,i=0;i<e.length;i++){var r=this.mapToExternalTime(e.start(i));(void 0===n||r<n)&&(n=r,t=i)}}catch(e){}return t},e.prototype.eV=function(e){var t=this;return void 0===e&&(e=!1),this.OU.mapEach((function(t){return e?t.originalPlaybackRange:t.playbackRange})).mapAll((function(e){return o.BufferRangeHelper.mergeRanges(e,t.MU.settings.GAP_TOLERANCE)}))},e.prototype.hV=function(e){var t,n,i=this.MU.videoElement;if(i){var r=i.currentTime;if(!(r>=i.duration&&i.duration>0)){var o=i.buffered;if(o.length<2)null===(t=this.UV())||void 0===t||t.dispatch((0,u.setTimestampRollingOver)(!1));else if(0!==this.getEarliestExternalTimeBufferedRangeIndex(o)){var a=o.end(o.length-1);r>=a-Math.max(this.MU.settings.MINIMAL_BACKWARD_BUFFER_CLEARING_INTERVAL,this.MU.settings.END_OF_BUFFER_TOLERANCE,this.MU.settings.END_OF_BUFFER_RECOVERY_TOLERANCE)&&(null===(n=this.UV())||void 0===n||n.dispatch((0,u.setTimestampRollingOver)(!0))),r>=a-e&&this.mV()}}}},e.prototype.iV=function(e){var t=this,n=this.MU.settings.GAP_TOLERANCE,i=new f.ArrayMap;return this.OU.keys.forEach((function(r){var o=!1,a=-1/0,s=t.OU.get(r),u=!1;s.sort((function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime}));var c=s.filter((function(t){var i=t.playbackRange,r=i.start-n<=e&&i.end+n>=e;if(u=u||r,!isFinite(a)&&r)a=t.playbackTime;else if(isFinite(a))return o=o||t.playbackTime<a;return!1}));0!==c.length||u||(s.sort((function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime})),c=s.filter((function(t){return t.playbackRange.end<e}))),i.addAll(r,c)})),i},e.prototype.jV=function(){void 0!==this.NU&&(this.NU(),this.NU=void 0)},e.prototype.kV=function(){var e=this,t=this.UV();void 0!==t&&(this.jV(),this.NU=(0,c.subscribeToRendererBufferChanges)(t,(function(){return e.gV()})))},e.prototype.lV=function(){var e,t=[],n=null===(e=this.MU.videoElement)||void 0===e?void 0:e.buffered;if(!function(e){return 0!==(null==e?void 0:e.length)}(n))return[];for(var i=0;i<n.length;i++)t.push({start:n.start(i),end:n.end(i)});return t},e.prototype.nV=function(e){var t,n=e.getMimeType(),i=e.getPlaybackTimeRange();if(void 0!==i){var r=(null!==(t=this.OU.get(n))&&void 0!==t?t:[]).filter((function(e){return e.originalPlaybackRange.end<i.end}));return r[r.length-1]}},e.prototype.oV=function(e){var t=this,n=!1,i=!1,o=new O.SegmentTimeInformationArrayMap;return this.OU.keys.forEach((function(e){return(0,y.ensureMimeTypeInMap)(o,e)})),e.forEach((function(e){if(!e.isDirty()){var a=new b.SegmentTimeInformation(e,t.maxSafeBaseMediaDecodeTime),s=a.presentationTimeOffset/a.timescale,u=t.HV(s),c=t.IV(a);(n=n||u||c||t.MU.settings.FORCE_BASE_MEDIA_DECODE_TIME_REWRITE||t.DV(a)||t.EV(a,a.baseMediaDecodeTime,a.presentationTimeOffset))&&(a.isBaseMediaDecodeTimeLimitExceeded=!0);var f=t.nV(e);(f?f.originalPresentationTimeOffset/f.timescale:s)===s||t.cV!==r.FillGaps&&!(null==f?void 0:f.isBaseMediaDecodeTimeLimitExceeded)||(i=!0),(0,y.addSegmentTimeInfoToMap)(o,a.mimeType,a)}})),[n,i,o]},e.prototype.pV=function(e){return g.ModuleManager.has(T.ModuleName.ContainerMP4)?e.getTFDTBoxOffsets()||g.ModuleManager.get(T.ModuleName.ContainerMP4).parseTfdtBoxOffsets(e):[]},e.prototype.qV=function(e,t){var n=this.pV(e);e.setTFDTBoxOffsets(n);var i=e.getBaseMediaDecodeTime()-t.truncatedBaseMediaDecodeTime;e.getTFDTBoxOffsets().forEach((function(t){var n=0,r=new DataView(e.getData(),t),o=r.getUint32(n);n+=4;var a=String.fromCharCode(r.getUint8(n++),r.getUint8(n++),r.getUint8(n++),r.getUint8(n++));if(n+=1===o?8:0,"tfdt"===a){var s=r.getUint8(n);n+=4,1===s?function(e,t,n){var i=e.getUint32(t),r=e.getUint32(t+4),o=i*Math.pow(2,32)+r-n;e.setUint32(t,Math.floor(o/Math.pow(2,32))),t+=4,e.setUint32(t,o)}(r,n,i):function(e,t,n){var i=e.getUint32(t)-n;e.setUint32(t,i)}(r,n,i)}})),e.setBaseMediaDecodeTime(t.truncatedBaseMediaDecodeTime),e.setDirty(!0)},e.prototype.rV=function(e,t){var n=this;t.forAll((function(t,i){(0,y.addSegmentTimeInfoToMap)(n.OU,t,i);var r=i.getMatchingSegment(e);r&&n.qV(r,i)}))},e.prototype.sV=function(e,t){return e.reduce((function(e,n){var i=t(n),r=Math.floor(i/n.timescale);return!isFinite(e)&&isFinite(r)||r<e?r:e}),-1/0)},e.prototype.tV=function(e,t){var n=this;return Math.min.apply(Math,e.transform((function(e){return n.sV(e,t)})))},e.prototype.uV=function(e){return this.tV(e,(function(e){return e.truncatedBaseMediaDecodeTime-e.truncatedPresentationTimeOffset}))},e.prototype.vV=function(e){return this.tV(e,(function(e){return e.originalPresentationTimeOffset}))},e.prototype.wV=function(e){var t={},n=this.vV(e);isFinite(n)&&(e.forAll((function(e,i){var r=i.timescale,o=i.originalBaseMediaDecodeTime,a=i.originalPresentationTimeOffset,s=Math.floor(a-n*r),u=a-s,c=o-u,f=Math.floor(u/r);i.truncatedBaseMediaDecodeTime=c,i.truncatedPresentationTimeOffset=s,t.hasOwnProperty(e)||(t[e]=f)})),this.xV(t))},e.prototype.xV=function(e){var t=this;Object.keys(e).forEach((function(n){var i=t.PU.get(n);i&&i.resolve(e[n]);var r=new l.Deferred;t.PU.set(n,r),r.resolve(e[n])}))},e.prototype.yV=function(e,t){var n,i=this,r=this.uV(t);isFinite(r)&&(t.forAll((function(t,n){var o=n.getMatchingSegment(e);o&&i.zV(o,n,r),(0,y.addSegmentTimeInfoToMap)(i.OU,t,n)})),null===(n=this.MU.videoElement)||void 0===n||n.addEventListener(h.MediaElementEvent.currenttimenotadvancing,this.gV))},e.prototype.zV=function(e,t,n){t.truncatedBaseMediaDecodeTime=t.truncatedBaseMediaDecodeTime-t.timescale*n,t.truncatedPlaybackTime=(t.truncatedBaseMediaDecodeTime-t.truncatedPresentationTimeOffset)/t.timescale,this.qV(e,t)},e.prototype.AV=function(e){for(var t,n,i=e.keys,o=e.getAll(),a=[],s=1/0,u=0,c=i;u<c.length;u++){var f=c[u],l=(null!==(t=this.OU.get(f))&&void 0!==t?t:[]).filter((function(e){return!o.includes(e)&&!e.isReferenceSegment}));l.sort((function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime}));var d=l.pop(),p=null!==(n=null==d?void 0:d.playbackRange.end)&&void 0!==n?n:1/0,m=e.get(f)||[];if(0===m.length)return 1/0;var v=Math.min.apply(Math,m.map((function(e){return e.playbackTime}))),h=v-p;s=Math.min(s,v),isFinite(h)&&a.push(h)}if(a.length!==i.length)return 0;var g=s-this.MU.settings.GAP_TOLERANCE,T=this.cV===r.KeepGaps?Math.min.apply(Math,a):Math.max.apply(Math,a);return Math.min(T,g)},e.prototype.BV=function(e,t){var n=this,i=this.AV(t),r=!0;if(t.forAll((function(e,o){if(r){var a=o.timescale,s=i*a,u=o.truncatedPresentationTimeOffset+s,c=o.truncatedBaseMediaDecodeTime;n.FV(c,u,o,t)||(r=!1)}})),r){var o={};t.forAll((function(e,t){var n=t.timescale,r=i*n;t.updateAsContinuous(t.truncatedBaseMediaDecodeTime,t.truncatedPresentationTimeOffset+r);var a=t.originalPresentationTimeOffset-t.truncatedPresentationTimeOffset;o[e]=a/t.timescale})),this.xV(o),e.forEach((function(e){return e.setDirty(!0)}))}},e.prototype.CV=function(e,t,n){return 0===t.length||!!t.keys.every((function(e){return(t.get(e)||[]).length>0}))&&(this.wV(t),this.yV(e,t),n&&this.BV(e,t),!0)},e.prototype.DV=function(e){var t;if(e.isBaseMediaDecodeTimeLimitExceeded)return!0;var n=(0,M.getLargestPrecedingSegmentTimeInfo)(null!==(t=this.OU.get(e.mimeType))&&void 0!==t?t:[],e.originalPlaybackTime);return!!n&&isFinite(n.truncatedBaseMediaDecodeTime)&&n.truncatedBaseMediaDecodeTime!==n.originalBaseMediaDecodeTime},e.prototype.EV=function(e,t,n){var i,r=e.duration,o=e.timescale,a=e.mimeType,s=this.OU.keys.find((function(e){return e!==a}));if(!s)return!1;var u=null===(i=this.OU.get(s))||void 0===i?void 0:i.slice(-1)[0];if(!u)return!1;var c=(t+n)/o,f={start:c,end:c+r},l=u.playbackTime+u.duration,d={start:l,end:l+u.duration},p=Math.max(f.start,d.start);return!(Math.min(f.end,d.end)-p<=r/2)&&d.end*u.timescale-u.presentationTimeOffset>this.maxSafeBaseMediaDecodeTime},e.prototype.FV=function(e,t,n,i){var r=this,o=n.duration,a=n.timescale;if(e+o*a>this.maxSafeBaseMediaDecodeTime)return!1;if(this.EV(n,e,t))return!1;var s=t/a,u=e/a+o,c=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=[];return e.forEach((function(e){e.forAll((function(e,t){n.includes(t.timescale)||n.push(t.timescale)}))})),n}(i,this.OU);return c.every((function(e){return r.GV(s,u,e)}))},e.prototype.GV=function(e,t,n){return t*n+e*n<=this.maxSafeBaseMediaDecodeTime},e.prototype.HV=function(e){return Math.abs(e)>this.maxSafePresentationTimeOffset},e.prototype.IV=function(e){if(!(0,m.isTizen2017)())return!1;var t=e.originalPlaybackTime,n=e.duration,i=e.mimeType,r=t+n>(0,v.toSeconds)(this.maxSafeBaseMediaDecodeTime);return p.MimeTypeHelper.isAudio(i)&&r},e.prototype.JV=function(e,t){if(this.MU.settings.FORCE_BASE_MEDIA_DECODE_TIME_REWRITE)return!0;var n=e/t.timescale;return!!this.HV(n)||this.IV(t)},e.prototype.KV=function(e,t,n){var i=e.baseMediaDecodeTime,r=e.presentationTimeOffset,o=e.foundMatchingPreviousSegment,a=!this.FV(i,r,t,n);return o?a:a||this.JV(r,t)},e.prototype.LV=function(e){var t=this,n=new f.ArrayMap,i=new f.ArrayMap;return e.keys.forEach((function(r){var o;(0,y.ensureMimeTypeInMap)(n,r),(0,y.ensureMimeTypeInMap)(i,r),(0,y.ensureMimeTypeInMap)(t.OU,r);var a=null!==(o=t.OU.get(r))&&void 0!==o?o:[],s=a.length?a:t.OU.getAllValues();(e.get(r)||[]).forEach((function(r){var o=(0,M.findOverflowDataForSegmentInMap)(r,s,t.MU.settings.GAP_TOLERANCE,t.MU.logger);if(t.KV(o,r,e))r.updateAsDiscontinuous(),(0,y.addSegmentTimeInfoToMap)(i,r.mimeType,r);else{var a=o.baseMediaDecodeTime,u=o.presentationTimeOffset;r.updateAsContinuous(a,u),(0,y.addSegmentTimeInfoToMap)(n,r.mimeType,r)}}))})),{discontinuousSegmentTimeInfoMap:i,continuousSegmentTimeInfoMap:n}},e.prototype.MV=function(e,t,n){var i=this.LV(t),r=i.discontinuousSegmentTimeInfoMap,o=i.continuousSegmentTimeInfoMap;if(this.rV(e,o),this.CV(e,r,n))return!0;var a=(0,E.maybeSwitchOverASegmentToDiscontinuous)({continuousSegmentTimeInfoMap:o,discontinuousSegmentTimeInfoMap:r});if(!a){var s=this.LV(this.OU);a=(0,E.maybeSwitchOverASegmentToDiscontinuous)({continuousSegmentTimeInfoMap:s.continuousSegmentTimeInfoMap,discontinuousSegmentTimeInfoMap:r})}return!!a&&this.CV(e,r,n)},e.prototype.NV=function(e){var t=this;e.forAll((function(e,n){var i;(null===(i=t.OU.get(e))||void 0===i?void 0:i.find(n.equals))||(0,y.addSegmentTimeInfoToMap)(t.OU,n.mimeType,n);var r=t.PU.get(n.mimeType);r&&r.resolve(0)}))},e.prototype.OV=function(e){return e.every((function(e){return p.MimeTypeHelper.isMP4(e.getMimeType())}))},e.prototype.PV=function(){this.maxSafeBaseMediaDecodeTime=1/0,this.maxSafePresentationTimeOffset=1/0},e.prototype.QV=function(){return this.maxSafeBaseMediaDecodeTime!==1/0||this.maxSafePresentationTimeOffset!==1/0},e.prototype.rewriteTimeStampsIfNecessary=function(e){var t;!this.OV(e)&&this.QV()&&this.PV();var n=this.RV(),i=e.map(b.getSectionId).reduce(S,[]).some((function(e){return!n.includes(e)})),r=function(e){return e.reduce((function(e,t){return e.includes(t.getMimeType())||e.push(t.getMimeType()),e}),[])}(e),o=this.OU.keys.every((function(e){return r.includes(e)}));if(i&&!o)return!1;var a=this.oV(e),s=a[0],u=a[1],c=a[2];if(s)return this.MV(e,c,u);if(i&&u)return this.SV(e,c),!0;for(var f=0,l=c.getAllValues();f<l.length;f++){var d=l[f],p=d.mimeType,m=null!==(t=this.OU.get(p))&&void 0!==t?t:[],v=(0,M.findPrecedingSegmentTimeInfo)(m,d,this.MU.settings.GAP_TOLERANCE);(null==v?void 0:v.isBaseMediaDecodeTimeLimitExceeded)&&!d.isBaseMediaDecodeTimeLimitExceeded&&(d.updateAsDiscontinuous(),d.updateAsContinuous(d.originalBaseMediaDecodeTime,v.truncatedPresentationTimeOffset))}return this.NV(c),!0},e.prototype.RV=function(){return this.OU.transform((function(e){return e.map((function(e){return e.sectionId}))})).flatMap((function(e){return e})).reduce(S,[])},e.prototype.SV=function(e,t){var n={},i=this.AV(t);t.forAll((function(e,t){var r=-i*t.timescale,o=r/t.timescale;t.isBaseMediaDecodeTimeLimitExceeded=!0,t.updateAsContinuous(t.originalBaseMediaDecodeTime,t.originalPresentationTimeOffset-r),n[t.mimeType]=o})),this.xV(n),this.NV(t),e.forEach((function(e){return e.setDirty(!0)}))},e.prototype.signalBufferRemoval=function(e,t,n){var i;if(this.OU.has(e)){var r=o.BufferRangeHelper.mergeRanges(t,this.MU.settings.GAP_TOLERANCE),a=this.OU.get(e)||[],s=a.filter((function(e){return e.isPlaybackRangeOverlapping(r)}));if(0===s.length&&this.xV(((i={})[e]=0,i)),this.TV(a,r,n)){var u=a[0];u.markAsReferenceSegment(),s.push(u)}this.OU.set(e,s)}},e.prototype.TV=function(e,t,n){var i=this.UV();if((0,d.isSwitchingBufferBlocks)(i)||0!==t.length||0===e.length)return!1;var r=this.MU.store.getState(),o=!!(null==r?void 0:r.player)&&(0,s.getIsSeekingOrTimeshifting)(r.player),u=this.MU.serviceManager.get(a.ServiceName.ManifestService,this.MU.sourceContext.sourceIdentifier),c=this.mapToExternalTime(n),f=null==u?void 0:u.getPeriodIdForTime(c);return!o&&e[0].periodId===f},e.prototype.mapToExternalTime=function(e,t){var n=this;void 0===t&&(t=!1);var i=this.OU.getAllValues(),r=i.find((function(t){var i=t.playbackRange.start-n.MU.settings.GAP_TOLERANCE,r=t.playbackRange.end+n.MU.settings.GAP_TOLERANCE;return!t.isReferenceSegment&&e>=i&&e<=r}))||(t?i[0]:void 0);return r&&(this.RU=r.originalPlaybackTime-r.playbackTime),this.mapToCachedExternalTime(e)},e.prototype.mapToCachedExternalTime=function(e){return void 0!==this.RU?Math.max(this.RU+e,0):e},e.prototype.mapToInternalTime=function(e,t,n){var i=this;void 0===t&&(t=!1);var r=this.OU.getAllValues().filter((function(e){return void 0===n||n===e.mimeType})),o=r.find((function(t){var n=t.originalPlaybackRange.start-i.MU.settings.GAP_TOLERANCE,r=t.originalPlaybackRange.end+i.MU.settings.GAP_TOLERANCE;return e>=n&&e<=r}))||(t?r[0]:void 0);return o?Math.max(o.playbackTime+(e-o.originalPlaybackTime),0):e},e.prototype.mapToExternalTimeRange=function(e){if(null!=e)return{start:this.mapToExternalTime(e.start),end:this.mapToExternalTime(e.end)}},e.prototype.mapToExternalTimeRanges=function(e){var t=this;return e.map((function(e){return t.mapToExternalTimeRange(e)})).filter((function(e){return void 0!==e}))},e.prototype.mapToExternalTimeRangesMap=function(e){var t=this;return null==e?null:Object.keys(e).reduce((function(n,i){return n[i]=t.mapToExternalTimeRanges(e[i]),n}),{})},e.prototype.getSegmentTimeRanges=function(e,t){var n=this,i=[];return e.forEach((function(e){var r=n.OU.get(t).find((function(t){return t.isSegmentMatching(e)}));r&&i.push(r.playbackRange)})),i},e.prototype.getCorrectTimeStampOffset=function(e,t){var n=this.PU.get(e);return n||(n=new l.Deferred,this.PU.set(e,n)),n.promise.then((function(e){return t+e}))},e.prototype.dispose=function(){var e,t,n,i;this.OU.clear(),this.jV(),null===(e=this.MU.videoElement)||void 0===e||e.removeEventListener(h.MediaElementEvent.currenttimenotadvancing,this.gV),null===(t=this.MU.videoElement)||void 0===t||t.removeEventListener(h.MediaElementEvent.waiting,this.gV),null===(n=this.MU.videoElement)||void 0===n||n.removeEventListener(h.MediaElementEvent.stalled,this.gV),null===(i=this.MU.videoElement)||void 0===i||i.removeEventListener(h.MediaElementEvent.timeupdate,this.fV)},e.prototype.UV=function(){return this.MU.serviceManager.get(a.ServiceName.SourceStoreService,this.MU.sourceContext.sourceIdentifier)},e}();function S(e,t){return e.includes(t)||e.push(t),e}t.BaseMediaDecodeTimeHandler=_,Math.log(2)},44885:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.addSegmentTimeInfoToMap=void 0,t.ensureMimeTypeInMap=function(e,t){e.get(t)||e.addAll(t,[])},t.addSegmentTimeInfoToMap=function(e,t,n){(function(e,t,n){var i;return null===(i=e.get(t))||void 0===i?void 0:i.find((function(e){return e.segmentUrl===(null==n?void 0:n.segmentUrl)&&e.equals(n)}))})(e,t,n)||e.add(t,n)}},73849:function(e,t){function n(e){return Math.floor(e.originalBaseMediaDecodeTime-e.baseMediaDecodeTime)}function i(e){return Math.floor(e.originalPresentationTimeOffset-e.presentationTimeOffset)}function r(e,t,n){return e.find((function(e){var i=e.originalPlaybackRange.end;return t.originalPlaybackRange.start>=i-n&&t.originalPlaybackRange.start<=i+n}))}function o(e,t){return e.reduce((function(e,n){var i=n.originalPlaybackTime,r=e?e.originalPlaybackTime:-1/0;return i<t&&i>r?n:e}),void 0)}Object.defineProperty(t,"__esModule",{value:!0}),t.findOverflowDataForSegmentInMap=function(e,t,a,s){var u=1/0,c=1/0,f=r(t,e,a)||o(t,e.originalPlaybackTime),l=f?e.timescale/f.timescale:1,d=f&&e.originalPresentationTimeOffset===f.originalPresentationTimeOffset*l;return d&&(u=e.originalBaseMediaDecodeTime-Math.round(n(f)*l),c=e.originalPresentationTimeOffset-Math.round(i(f)*l)),{baseMediaDecodeTime:u,presentationTimeOffset:c,foundMatchingPreviousSegment:Boolean(d)}},t.getBmdtOffset=n,t.getPtoOffset=i,t.findPrecedingSegmentTimeInfo=r,t.getLargestPrecedingSegmentTimeInfo=o},8301:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.findContinuousSegmentToMove=t.maybeSwitchOverASegmentToDiscontinuous=void 0;var i=n(44885);t.maybeSwitchOverASegmentToDiscontinuous=function(e){var n=(0,t.findContinuousSegmentToMove)(e);return n&&(e.continuousSegmentTimeInfoMap.deleteValue(n.mimeType,n),n.updateAsDiscontinuous(),(0,i.addSegmentTimeInfoToMap)(e.discontinuousSegmentTimeInfoMap,n.mimeType,n)),n},t.findContinuousSegmentToMove=function(e){var t=e.continuousSegmentTimeInfoMap.keys;if(2!==t.length)return null;if(t.every((function(t){return e.continuousSegmentTimeInfoMap.get(t).length>0})))return null;for(var n=0,i=t;n<i.length;n++){var r=i[n];if(e.discontinuousSegmentTimeInfoMap.has(r)&&!((e.discontinuousSegmentTimeInfoMap.get(r)||[]).length>0)){var o=e.continuousSegmentTimeInfoMap.get(r)||[];if(o.length)return o[0]}}return null}},48558:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTimeInformation=void 0,t.getSectionId=o;var i=n(4524),r=function(){function e(e,t){var n,i,r=this;this.equals=function(e){if(e){var t=r.mimeType===e.mimeType,n=r.duration===e.duration,i=r.originalBaseMediaDecodeTime===e.originalBaseMediaDecodeTime,o=r.sectionId===e.sectionId;return t&&n&&i&&o}return!1},this.segmentUrl=e.getUrl(),this.duration=e.getDuration(),this.mimeType=e.getMimeType(),this.timescale=null!==(n=e.getTimescale())&&void 0!==n?n:1,this.originalPlaybackTime=e.getPlaybackTime(),this.Bbb=null===(i=e.getSegmentInfo())||void 0===i?void 0:i.byteRange,this.originalBaseMediaDecodeTime=e.getBaseMediaDecodeTime(),this.originalPresentationTimeOffset=e.getPresentationTimeOffset()*this.timescale,this.isBaseMediaDecodeTimeLimitExceeded=this.originalBaseMediaDecodeTime+this.duration*this.timescale>t,this.periodId=e.getPeriodId(),this.Abb=!1,this.sectionId=o(e),this.truncatedBaseMediaDecodeTime=1/0,this.truncatedPresentationTimeOffset=1/0,this.truncatedPlaybackTime=1/0}return Object.defineProperty(e.prototype,"isReferenceSegment",{get:function(){return this.Abb},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playbackTime",{get:function(){return this.isBaseMediaDecodeTimeLimitExceeded&&this.truncatedPlaybackTime!==1/0?this.truncatedPlaybackTime:this.originalPlaybackTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseMediaDecodeTime",{get:function(){return this.isBaseMediaDecodeTimeLimitExceeded&&this.truncatedBaseMediaDecodeTime!==1/0?this.truncatedBaseMediaDecodeTime:this.originalBaseMediaDecodeTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"presentationTimeOffset",{get:function(){return this.isBaseMediaDecodeTimeLimitExceeded&&this.truncatedPresentationTimeOffset!==1/0?this.truncatedPresentationTimeOffset:this.originalPresentationTimeOffset},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playbackRange",{get:function(){return{start:this.playbackTime,end:this.playbackTime+this.duration}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"originalPlaybackRange",{get:function(){return{start:this.originalPlaybackTime,end:this.originalPlaybackTime+this.duration}},enumerable:!1,configurable:!0}),e.prototype.getMatchingSegment=function(e){var t=this;return e.find((function(e){return t.isSegmentMatching(e)}))},e.prototype.isSegmentMatching=function(e){var t,n,i,r=e.getUrl()===this.segmentUrl,o=e.getPlaybackTime()===this.originalPlaybackTime,a=null===(t=e.getSegmentInfo())||void 0===t?void 0:t.byteRange,s=(null==a?void 0:a.start)===(null===(n=this.Bbb)||void 0===n?void 0:n.start),u=(null==a?void 0:a.end)===(null===(i=this.Bbb)||void 0===i?void 0:i.end),c=s&&u,f=e.getMimeType()===this.mimeType;return r&&o&&c&&f},e.prototype.updateAsDiscontinuous=function(){this.isBaseMediaDecodeTimeLimitExceeded=!0},e.prototype.updateAsContinuous=function(e,t){this.truncatedBaseMediaDecodeTime=e,this.truncatedPresentationTimeOffset=t,this.truncatedPlaybackTime=(e-t)/this.timescale},e.prototype.markAsReferenceSegment=function(){this.Abb=!0},e.prototype.isPlaybackRangeOverlapping=function(e){var t=this.playbackRange,n={buffered:e},r=i.BufferRangeHelper.isInBufferedRange(n,t.start),o=i.BufferRangeHelper.isInBufferedRange(n,t.end),a=i.BufferRangeHelper.getCommonBufferedRanges({buffered:e,inSegment:[t]}).length>0;return r||o||a},e}();function o(e){var t,n,i;return null!==(i=null===(n=null===(t=e.getSegmentInfo())||void 0===t?void 0:t.discontinuitySequenceNumber)||void 0===n?void 0:n.toString())&&void 0!==i?i:e.getPeriodId()}t.SegmentTimeInformation=r},21651:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTimeInformationArrayMap=void 0;var r=function(e){function t(){return e.call(this,(function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime}))||this}return i(t,e),t.prototype.find=function(e){if(e)return this.get(e.getMimeType()).find((function(t){return t.isSegmentMatching(e)}))},t}(n(61252).SortedArrayMap);t.SegmentTimeInformationArrayMap=r},61252:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SortedArrayMap=void 0;var r=function(e){function t(t){var n=e.call(this)||this;return n.scb=t,n.tcb=[],n}return i(t,e),t.prototype.getAllValues=function(){return this.tcb},t.prototype.ucb=function(e){return e?e.sort(this.scb):[]},t.prototype.set=function(t,n){var i=this.ucb(n);return this.vcb(t,i),e.prototype.set.call(this,t,i)},t.prototype.add=function(e,t){var n=t?[t]:[];return this.addAll(e,n),this},t.prototype.addAll=function(e,t){this.ensure(e),this.set(e,[].concat(t||[],this.get(e)))},t.prototype.delete=function(t){return this.wcb(this.get(t)),e.prototype.delete.call(this,t)},t.prototype.deleteValue=function(t,n){return this.wcb([n]),e.prototype.deleteValue.call(this,t,n)},t.prototype.clear=function(){this.tcb=[],e.prototype.clear.call(this)},t.prototype.vcb=function(e,t){void 0===t&&(t=[]);var n=this.get(e);this.wcb(n),this.tcb=this.ucb(this.tcb.concat(t))},t.prototype.wcb=function(e){var t=this;void 0===e&&(e=[]),e.forEach((function(e){var n=t.tcb.indexOf(e);n>-1&&t.tcb.splice(n,1)}))},t}(n(19483).ArrayMap);t.SortedArrayMap=r},1124:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.getTvMseWrapperConstructor=function(){return void 0===r&&(r=f()),r};var r,o=n(3714),a=n(20213),s=n(70850),u=n(88052),c=n(24281),f=function(){return function(e){function t(t,n){var i=e.call(this,t)||this;return i.Dbb={},i.Cbb=n,i}return i(t,e),t.prototype.printDetailedBufferRange=function(e,t){var n;try{n=e.buffered}catch(e){return}if(0!==n.length)for(var i=0;i<n.length;i++)n.start(i),n.end(i)},t.prototype.getBufferStartTime=function(){var e=this,t=Object.keys(this.sourceBuffers).map((function(t){return 0===e.sourceBuffers[t].bufferedRanges.length?0:e.Cbb.mapToExternalTime(e.sourceBuffers[t].bufferedRanges[0].start)}));return Math.max.apply(null,t)},t.prototype.updateTimestampOffset=function(t,n){try{e.prototype.updateTimestampOffset.call(this,t,n)}catch(e){e.code===DOMException.INVALID_STATE_ERR&&this.context.eventHandler.dispatchEvent(o.PlayerEvent.Warning,new a.PlayerWarning(a.WarningCode.PLAYBACK_WARNING,"Unable to update timestampOffset (Invalid State error)",e))}},t.prototype.Ebb=function(e,t){this.Dbb[e]||(this.Dbb[e]={currentOffset:this.sourceBuffers[e].buffer.timestampOffset,pendingOffset:t})},t.prototype.queueTimestampOffsetUpdate=function(t,n){var i=this;return this.Ebb(t,n),this.Cbb.getCorrectTimeStampOffset(t,n).then((function(e){return i.Dbb[t].pendingOffset=e})).then((function(){var n=i.Dbb[t].pendingOffset,r=i.Dbb[t].currentOffset;return s.Util.roundValue(r,6)===s.Util.roundValue(n,6)&&i.isMediaSourceOpen()?Promise.resolve():(i.Dbb[t].currentOffset=n,e.prototype.queueTimestampOffsetUpdate.call(i,t,n).finally((function(){var e,n,r=null===(n=null===(e=i.sourceBuffers[t])||void 0===e?void 0:e.buffer)||void 0===n?void 0:n.timestampOffset;i.Dbb[t].currentOffset=r})))}))},t.prototype.getBufferRangeStart=function(e,t){void 0===t&&(t=0);var n=this.Cbb.getEarliestExternalTimeBufferedRangeIndex(e);return Math.max(t,e.start(n))},t.prototype.preBufferRemoval=function(e,t,n){},t.prototype.getRangePendingRemoval=function(e){return this.sourceBuffers.hasOwnProperty(e)&&this.Cbb.mapToExternalTimeRange(this.sourceBuffers[e].rangePendingRemoval)||void 0},t.prototype.addToBuffer=function(t){var n=this;return(0,c.rewriteUnsupportedBoxes)(t),this.Fbb(t).then((function(){return e.prototype.addToBuffer.call(n,t)}))},t.prototype.Fbb=function(e){var t=e.getMimeType(),n=-e.getPresentationTimeOffset();return e.isDirty()&&!e.isInit()?this.setTimestampOffset(t,n):Promise.resolve()},t}(u.ModuleManager.get(a.ModuleName.RendererMse).MSEWrapper)}},35501:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.getTvRendererConstructor=function(){return void 0===o&&(o=m()),o};var o,a=n(4524),s=n(66790),u=n(34841),c=n(88052),f=n(62756),l=n(84276),d=n(48558),p=n(1124),m=function(){return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.postBufferRemoval=function(e,n,i){t.video&&t.baseMediaDecodeTimeHandler.signalBufferRemoval(e,t.JU(e),t.video.currentTime)},t}return i(t,e),t.prototype.init=function(t){this.baseMediaDecodeTimeHandler=new l.BaseMediaDecodeTimeHandler(this.context,this.IU.bind(this),this.getMaxSafeBaseMediaDecodeTime(),this.getMaxSafePresentationTimeOffset()),e.prototype.init.call(this,t),this.HU||(this.HU=new u.Deferred),this.HU.resolve(this.baseMediaDecodeTimeHandler)},t.prototype.getMaxSafeBaseMediaDecodeTime=function(){return 1/0},t.prototype.getMaxSafePresentationTimeOffset=function(){return 1/0},t.prototype.createMSEWrapper=function(){return new((0,p.getTvMseWrapperConstructor)())(this.context,this.baseMediaDecodeTimeHandler)},t.prototype.getCurrentVideoTime=function(){return this.baseMediaDecodeTimeHandler.mapToExternalTime(e.prototype.getCurrentVideoTime.call(this))},t.prototype.getRangesInSourceBuffers=function(){return this.baseMediaDecodeTimeHandler.mapToExternalTimeRangesMap(e.prototype.getRangesInSourceBuffers.call(this))},t.prototype.getBufferedRanges=function(t){return this.baseMediaDecodeTimeHandler.mapToExternalTimeRanges(e.prototype.getBufferedRanges.call(this,t))},t.prototype.getVideoElementBufferedRanges=function(){var t=e.prototype.getVideoElementBufferedRanges.call(this);return this.baseMediaDecodeTimeHandler.mapToExternalTimeRanges(t)},t.prototype.IU=function(e){var t,n,i=this;if(!this.mse)return Promise.reject();var r=null===(t=this.mse)||void 0===t?void 0:t.getBufferedRanges(e),o=null!==(n=null==r?void 0:r.slice(1))&&void 0!==n?n:[];return Promise.all(o.map((function(t){var n;return null===(n=i.mse)||void 0===n?void 0:n.removeFromBuffer(e,t.start-i.settings.GAP_TOLERANCE,t.end+i.settings.GAP_TOLERANCE,i.postBufferRemoval)}))).then((function(){}))},t.prototype.removeData=function(e,t,n,i){if(void 0===i&&(i=!1),!this.mse)return Promise.reject();void 0===t&&void 0===n&&!i&&this.saveCurrentTime(),this.removeDataFromSegmentQueues(e,t,n);var r=void 0!==t?this.baseMediaDecodeTimeHandler.mapToInternalTime(t,!0,e):void 0,o=void 0!==n?this.baseMediaDecodeTimeHandler.mapToInternalTime(n,!0,e):void 0;return this.mse.removeFromBuffer(e,r,o,this.postBufferRemoval)},t.prototype.addSegmentFromQueueToMse=function(t){var n=this,i=this.KU((function(e){return!e.isInit()})),r=Object.keys(this.segmentQueues).every((function(e){var t=n.mse&&n.mse.getBufferedRanges(e).length>0,r=i.some((function(t){return t.getMimeType()===e}));return t||r}));if(0===i.length||!r)return Promise.reject(s.SOURCE_BUFFER_APPEND_STATUS.SUSPENDED);var o=i.reduce((function(e,t){return t.getPlaybackTime()<e.getPlaybackTime()?t:e}),i[0]),a=(0,d.getSectionId)(o),u=this.KU((function(e){return!e.isInit()&&(0,d.getSectionId)(e)===a}));return this.baseMediaDecodeTimeHandler.rewriteTimeStampsIfNecessary(u)?e.prototype.addSegmentFromQueueToMse.call(this,t):Promise.reject(s.SOURCE_BUFFER_APPEND_STATUS.SUSPENDED)},t.prototype.JU=function(e){var t,n;if(null===this.mse||!this.segmentQueues.hasOwnProperty(e))return[];var i=this.KU((function(e){return!e.isInit()})),o=this.baseMediaDecodeTimeHandler.getSegmentTimeRanges(i,e),s=null!==(n=null===(t=this.mse)||void 0===t?void 0:t.getBufferedRanges(e))&&void 0!==n?n:[];return a.BufferRangeHelper.mergeRanges(r(r([],o,!0),s,!0),this.settings.GAP_TOLERANCE)},t.prototype.adjustTimeToNextCommonBufferStart=function(t){var n=e.prototype.adjustTimeToNextCommonBufferStart.call(this,t);return isNaN(n)?NaN:Math.ceil(100*this.baseMediaDecodeTimeHandler.mapToInternalTime(n))/100},t.prototype.seekOnVideoElement=function(e){var t=this;return this.waitingForSeekedPromise=new Promise((function(n,i){if(t.video){t.video.currentTime=e;var r=t.video.currentTime;n(t.getBaseMediaDecodeTimeHandler().then((function(e){return e.mapToExternalTime(r)})))}else i("No video reference")})),this.waitingForSeekedPromise},t.prototype.getBaseMediaDecodeTimeHandler=function(){return this.HU.promise},t.prototype.KU=function(e){var t=this;return void 0===e&&(e=function(){return!0}),Object.keys(this.segmentQueues).flatMap((function(e){return t.segmentQueues[e]})).filter(e)},t.prototype.getEndOfBufferTime=function(){if(this.video&&this.video.buffered&&this.video.buffered.length>0&&this.baseMediaDecodeTimeHandler)return this.baseMediaDecodeTimeHandler.getEndOfBufferTime()},t.prototype.shutdown=function(t){var n=this;return e.prototype.shutdown.call(this,t).then((function(){n.LU()}))},t.prototype.LU=function(){this.HU=new u.Deferred,this.baseMediaDecodeTimeHandler.dispose()},t.prototype.release=function(){return this.LU(),e.prototype.release.call(this)},t}(c.ModuleManager.get(f.ModuleName.RendererMse).MSERenderer)}},24281:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.rewriteUnsupportedBoxes=function(e,t){void 0===t&&(t=o),t.forEach((function(t){var n,i=null===(n=e.getParsedData())||void 0===n?void 0:n.get(t);i&&(0,r.rewriteMp4BoxType)(i,"free")}))};var i=n(15487),r=n(2992),o=function(){var e=["skip"];return((0,i.isTizen2016)()||(0,i.isTizen2017)())&&e.push("moov.trak.edts"),e}()}},function(e){return function(){return e(e.s=59235)}()}])}));
|
|
18
18
|
})();
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* This software includes open-source components. See THIRD_PARTY_NOTICES
|
|
10
10
|
* in the distribution for details.
|
|
11
11
|
*
|
|
12
|
-
* Bitmovin Player Version 8.
|
|
12
|
+
* Bitmovin Player Version 8.264.0
|
|
13
13
|
*
|
|
14
14
|
****************************************************************************/
|
|
15
15
|
|
|
16
16
|
(function() {
|
|
17
|
-
"use strict";!function(o,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ui=e():(o.bitmovin=o.bitmovin||{},o.bitmovin.player=o.bitmovin.player||{},o.bitmovin.player.ui=e())}(self,(function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[209],{35725:function(o,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.UIModuleDefinition=void 0;var n=i(62756),t=i(18528);e.UIModuleDefinition={name:n.ModuleName.UI,module:{},hooks:{setup:function(o,e){var i;null!==(i=o.uiControlsMap)&&void 0!==i||(o.uiControlsMap=new WeakMap);var n=new t.UiControls(e);o.uiControlsMap.set(e,n)},destroy:function(o,e){var i,n,t=null===(i=o.uiControlsMap)||void 0===i?void 0:i.get(e);return t&&(t.dispose(),null===(n=o.uiControlsMap)||void 0===n||n.delete(e)),Promise.resolve()}}},e.default=e.UIModuleDefinition},18528:function(o,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.UiControls=void 0;var n=i(45202),t=i(43767),r=i(70850),u=function(){function o(o){this.
|
|
17
|
+
"use strict";!function(o,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ui=e():(o.bitmovin=o.bitmovin||{},o.bitmovin.player=o.bitmovin.player||{},o.bitmovin.player.ui=e())}(self,(function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[209],{35725:function(o,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.UIModuleDefinition=void 0;var n=i(62756),t=i(18528);e.UIModuleDefinition={name:n.ModuleName.UI,module:{},hooks:{setup:function(o,e){var i;null!==(i=o.uiControlsMap)&&void 0!==i||(o.uiControlsMap=new WeakMap);var n=new t.UiControls(e);o.uiControlsMap.set(e,n)},destroy:function(o,e){var i,n,t=null===(i=o.uiControlsMap)||void 0===i?void 0:i.get(e);return t&&(t.dispose(),null===(n=o.uiControlsMap)||void 0===n||n.delete(e)),Promise.resolve()}}},e.default=e.UIModuleDefinition},18528:function(o,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.UiControls=void 0;var n=i(45202),t=i(43767),r=i(70850),u=function(){function o(o){this.Qv=!1,this.Rv=null;var e=o.getConfig(!0);!1!==e.ui&&(e.ui&&(this.Sv=e.ui),this.Tv(o))}return o.prototype.Tv=function(o){var e=this,i=o.getConfig(),r=o.getConfig(!0);t.FileLoader.getInstance().loadCSS(r.location.ui_css,r.style),this.Uv(i,r).then((function(i){var t;i?n.Environment.modules.playerui=i:(null===(t=window.bitmovin)||void 0===t?void 0:t.playerui)&&(n.Environment.modules.playerui=window.bitmovin.playerui),e.Vv(o,r)})).catch((function(o){console.warn("Could not load UI",o),e.Rv=null}))},o.prototype.Uv=function(e,i){var r;if(null!=(null===(r=e.location)||void 0===r?void 0:r.ui))return t.FileLoader.getInstance().loadScript(e.location.ui,!0);if(o.isDefaultUIAvailable())return Promise.resolve(n.Environment.modules.playerui);var u=i.location.ui;return t.FileLoader.getInstance().loadScript(u,!0)},o.prototype.Vv=function(o,e){this.Qv||(this.Rv=e.style.uiManagerFactory(o,this.Sv))},o.isDefaultUIAvailable=function(){if(!n.Environment.modules.playerui||!n.Environment.modules.playerui.UIFactory)return!1;var o=n.Environment.modules.playerui.UIFactory;return o&&r.Util.isFunction(o.buildUI)},o.prototype.dispose=function(){this.Qv=!0,this.Rv&&this.Rv.release()},o}();e.UiControls=u}},function(o){return function(){return o(o.s=35725)}()}])}));
|
|
18
18
|
})();
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* This software includes open-source components. See THIRD_PARTY_NOTICES
|
|
10
10
|
* in the distribution for details.
|
|
11
11
|
*
|
|
12
|
-
* Bitmovin Player Version 8.
|
|
12
|
+
* Bitmovin Player Version 8.264.0
|
|
13
13
|
*
|
|
14
14
|
****************************************************************************/
|
|
15
15
|
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* This software includes open-source components. See THIRD_PARTY_NOTICES
|
|
10
10
|
* in the distribution for details.
|
|
11
11
|
*
|
|
12
|
-
* Bitmovin Player Version 8.
|
|
12
|
+
* Bitmovin Player Version 8.264.0
|
|
13
13
|
*
|
|
14
14
|
****************************************************************************/
|
|
15
15
|
|
|
16
16
|
(function() {
|
|
17
|
-
"use strict";!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.vidaa=t():(e.bitmovin=e.bitmovin||{},e.bitmovin.player=e.bitmovin.player||{},e.bitmovin.player.vidaa=t())}(self,(function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[838],{84276:function(e,t,n){var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseMediaDecodeTimeHandler=t.PtoGapFillingMode=void 0;var r,o=n(4524),a=n(80813),s=n(87827),u=n(68925),c=n(47602),f=n(19483),d=n(34841),l=n(87244),m=n(85434),p=n(15487),g=n(89927),h=n(19274),v=n(88052),T=n(62756),y=n(44885),M=n(73849),b=n(8301),E=n(48558),O=n(21651);!function(e){e.KeepGaps="keep-gaps",e.FillGaps="fill-gaps"}(r||(t.PtoGapFillingMode=r={}));var U=function(){function e(e,t,n,a){var s=this;this.maxSafeBaseMediaDecodeTime=n,this.maxSafePresentationTimeOffset=a,this.fV=function(){s.hV(s.MU.settings.END_OF_BUFFER_TOLERANCE)},this.gV=function(){s.hV(s.MU.settings.END_OF_BUFFER_RECOVERY_TOLERANCE)},this.mV=function(){if(s.MU.videoElement)try{var e=s.lV(),t=s.MU.videoElement.currentTime,n=s.iV(t).mapEach((function(e){return e.playbackRange})).mapAll((function(e){return o.BufferRangeHelper.mergeRanges(e,s.MU.settings.GAP_TOLERANCE)})).getObject(),r=o.BufferRangeHelper.getCommonBufferedRanges(i(i({},n),{bufferedRanges:e})).shift();if(void 0!==r){var a=r.getStart();s.MU.logger.debug("continuing playback at ".concat(a," (from ").concat(t,")")),s.MU.videoElement.currentTime=a,s.jV(),s.MU.videoElement.eventHandler.removeEventListener(h.MediaElementEvent.currenttimenotadvancing,s.gV),s.dV().finally((function(){var e;return null===(e=s.UV())||void 0===e?void 0:e.dispatch((0,u.setTimestampRollingOver)(!1))})).then((function(){s.MU.logger.debug("successfully cleared previous buffers")})).catch((function(e){s.MU.logger.debug("could not clear previous buffers:",e)}))}else s.kV()}catch(e){s.MU.logger.debug("could not handle timestamp overflow:",e)}else s.MU.logger.debug("Could not handle timestamp overflow: Video Element is not defined")},this.MU=e,this.cV=r.KeepGaps,this.QU=t,this.NU=void 0,this.PU=new Map,this.OU=new O.SegmentTimeInformationArrayMap,this.MU.videoElement?(this.MU.videoElement.addEventListener(h.MediaElementEvent.waiting,this.gV),this.MU.videoElement.addEventListener(h.MediaElementEvent.stalled,this.gV),this.MU.videoElement.addEventListener(h.MediaElementEvent.timeupdate,this.fV),e.logger.debug("BaseMediaDecodeTime limit is set to ".concat(S(n)," bits")),e.logger.debug("PresentationTimeOffset limit is set to ".concat(S(a)," bits")),e.settings.FORCE_BASE_MEDIA_DECODE_TIME_REWRITE&&e.logger.debug("BaseMediaDecodeTime rewriting is forced!")):e.logger.debug("Could not set up BaseMediaDecodeTime rewriting: Video Element is not defined")}return e.prototype.dV=function(){var e=this,t=[];return this.eV().keys.forEach((function(n){t.push(e.QU(n))})),Promise.all(t).then((function(){}))},e.prototype.getEndOfBufferTime=function(){var e=o.BufferRangeHelper.getCommonBufferedRanges(this.eV(!0).getObject()).sort((function(e,t){return e.getStart()-t.getStart()}));return e.length>0?e[e.length-1].getEnd():0},e.prototype.setPtoGapFillingMode=function(e){this.cV=e},e.prototype.getEarliestExternalTimeBufferedRangeIndex=function(e){var t=0;try{for(var n=void 0,i=0;i<e.length;i++){var r=this.mapToExternalTime(e.start(i));(void 0===n||r<n)&&(n=r,t=i)}}catch(e){this.MU.logger.debug("Could not determine buffer region offset:",e)}return t},e.prototype.eV=function(e){var t=this;return void 0===e&&(e=!1),this.OU.mapEach((function(t){return e?t.originalPlaybackRange:t.playbackRange})).mapAll((function(e){return o.BufferRangeHelper.mergeRanges(e,t.MU.settings.GAP_TOLERANCE)}))},e.prototype.hV=function(e){var t,n,i=this.MU.videoElement;if(i){var r=i.currentTime;if(!(r>=i.duration&&i.duration>0)){var o=i.buffered;if(o.length<2)null===(t=this.UV())||void 0===t||t.dispatch((0,u.setTimestampRollingOver)(!1));else if(0!==this.getEarliestExternalTimeBufferedRangeIndex(o)){var a=o.end(o.length-1);r>=a-Math.max(this.MU.settings.MINIMAL_BACKWARD_BUFFER_CLEARING_INTERVAL,this.MU.settings.END_OF_BUFFER_TOLERANCE,this.MU.settings.END_OF_BUFFER_RECOVERY_TOLERANCE)&&(null===(n=this.UV())||void 0===n||n.dispatch((0,u.setTimestampRollingOver)(!0))),r>=a-e&&this.mV()}}}},e.prototype.iV=function(e){var t=this,n=this.MU.settings.GAP_TOLERANCE,i=new f.ArrayMap;return this.OU.keys.forEach((function(r){var o=!1,a=-1/0,s=t.OU.get(r),u=!1;s.sort((function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime}));var c=s.filter((function(t){var i=t.playbackRange,r=i.start-n<=e&&i.end+n>=e;if(u=u||r,!isFinite(a)&&r)a=t.playbackTime;else if(isFinite(a))return o=o||t.playbackTime<a;return!1}));0!==c.length||u||(s.sort((function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime})),c=s.filter((function(t){return t.playbackRange.end<e}))),i.addAll(r,c)})),i},e.prototype.jV=function(){void 0!==this.NU&&(this.NU(),this.NU=void 0)},e.prototype.kV=function(){var e=this,t=this.UV();void 0!==t&&(this.jV(),this.NU=(0,c.subscribeToRendererBufferChanges)(t,(function(){return e.gV()})))},e.prototype.lV=function(){var e,t=[],n=null===(e=this.MU.videoElement)||void 0===e?void 0:e.buffered;if(!function(e){return 0!==(null==e?void 0:e.length)}(n))return[];for(var i=0;i<n.length;i++)t.push({start:n.start(i),end:n.end(i)});return t},e.prototype.nV=function(e){var t,n=e.getMimeType(),i=e.getPlaybackTimeRange();if(void 0!==i){var r=(null!==(t=this.OU.get(n))&&void 0!==t?t:[]).filter((function(e){return e.originalPlaybackRange.end<i.end}));return r[r.length-1]}},e.prototype.oV=function(e){var t=this,n=!1,i=!1,o=new O.SegmentTimeInformationArrayMap;return this.OU.keys.forEach((function(e){return(0,y.ensureMimeTypeInMap)(o,e)})),e.forEach((function(e){if(!e.isDirty()){var a=new E.SegmentTimeInformation(e,t.maxSafeBaseMediaDecodeTime),s=a.presentationTimeOffset/a.timescale,u=t.HV(s),c=t.IV(a);(n=n||u||c||t.MU.settings.FORCE_BASE_MEDIA_DECODE_TIME_REWRITE||t.DV(a)||t.EV(a,a.baseMediaDecodeTime,a.presentationTimeOffset))&&(a.isBaseMediaDecodeTimeLimitExceeded=!0,t.MU.logger.debug("BaseMediaDecodeTime (".concat(a.originalBaseMediaDecodeTime,") exceeding limit for ").concat(a.mimeType," segment")));var f=t.nV(e),d=f?f.originalPresentationTimeOffset/f.timescale:s;d===s||t.cV!==r.FillGaps&&!(null==f?void 0:f.isBaseMediaDecodeTimeLimitExceeded)||(t.MU.logger.debug("Detected a presentation time offset change: ".concat(d," -> ").concat(s),{precedingSegmentTimeInfo:null==f?void 0:f.segmentUrl}),i=!0),(0,y.addSegmentTimeInfoToMap)(o,a.mimeType,a)}})),[n,i,o]},e.prototype.pV=function(e){return v.ModuleManager.has(T.ModuleName.ContainerMP4)?e.getTFDTBoxOffsets()||v.ModuleManager.get(T.ModuleName.ContainerMP4).parseTfdtBoxOffsets(e):(this.MU.logger.debug("Can't rewrite BMDT for TS segment as MP4 module is not available"),[])},e.prototype.qV=function(e,t){var n=this.pV(e);e.setTFDTBoxOffsets(n);var i=e.getBaseMediaDecodeTime()-t.truncatedBaseMediaDecodeTime;e.getTFDTBoxOffsets().forEach((function(t){var n=0,r=new DataView(e.getData(),t),o=r.getUint32(n);n+=4;var a=String.fromCharCode(r.getUint8(n++),r.getUint8(n++),r.getUint8(n++),r.getUint8(n++));if(n+=1===o?8:0,"tfdt"===a){var s=r.getUint8(n);n+=4,1===s?function(e,t,n){var i=e.getUint32(t),r=e.getUint32(t+4),o=i*Math.pow(2,32)+r-n;e.setUint32(t,Math.floor(o/Math.pow(2,32))),t+=4,e.setUint32(t,o)}(r,n,i):function(e,t,n){var i=e.getUint32(t)-n;e.setUint32(t,i)}(r,n,i)}})),e.setBaseMediaDecodeTime(t.truncatedBaseMediaDecodeTime),e.setDirty(!0)},e.prototype.rV=function(e,t){var n=this;t.forAll((function(t,i){(0,y.addSegmentTimeInfoToMap)(n.OU,t,i);var r=i.getMatchingSegment(e);r&&n.qV(r,i)}))},e.prototype.sV=function(e,t){return e.reduce((function(e,n){var i=t(n),r=Math.floor(i/n.timescale);return!isFinite(e)&&isFinite(r)||r<e?r:e}),-1/0)},e.prototype.tV=function(e,t){var n=this;return Math.min.apply(Math,e.transform((function(e){return n.sV(e,t)})))},e.prototype.uV=function(e){return this.tV(e,(function(e){return e.truncatedBaseMediaDecodeTime-e.truncatedPresentationTimeOffset}))},e.prototype.vV=function(e){return this.tV(e,(function(e){return e.originalPresentationTimeOffset}))},e.prototype.wV=function(e){var t={},n=this.vV(e);isFinite(n)?(e.forAll((function(e,i){var r=i.timescale,o=i.originalBaseMediaDecodeTime,a=i.originalPresentationTimeOffset,s=Math.floor(a-n*r),u=a-s,c=o-u,f=Math.floor(u/r);i.truncatedBaseMediaDecodeTime=c,i.truncatedPresentationTimeOffset=s,t.hasOwnProperty(e)||(t[e]=f)})),this.xV(t)):this.MU.logger.debug("Could not determine common PresentationTimeOffset divisor")},e.prototype.xV=function(e){var t=this;Object.keys(e).forEach((function(n){var i=t.PU.get(n);i&&i.resolve(e[n]);var r=new d.Deferred;t.PU.set(n,r),r.resolve(e[n])}))},e.prototype.yV=function(e,t){var n,i=this,r=this.uV(t);isFinite(r)?(t.forAll((function(t,n){var o=n.getMatchingSegment(e);o&&i.zV(o,n,r),(0,y.addSegmentTimeInfoToMap)(i.OU,t,n)})),null===(n=this.MU.videoElement)||void 0===n||n.addEventListener(h.MediaElementEvent.currenttimenotadvancing,this.gV)):this.MU.logger.debug("Could not determine common BaseMediaDecideTime divisor")},e.prototype.zV=function(e,t,n){t.truncatedBaseMediaDecodeTime=t.truncatedBaseMediaDecodeTime-t.timescale*n,t.truncatedPlaybackTime=(t.truncatedBaseMediaDecodeTime-t.truncatedPresentationTimeOffset)/t.timescale,this.qV(e,t)},e.prototype.AV=function(e){for(var t,n,i=e.keys,o=e.getAll(),a=[],s=1/0,u=0,c=i;u<c.length;u++){var f=c[u],d=(null!==(t=this.OU.get(f))&&void 0!==t?t:[]).filter((function(e){return!o.includes(e)&&!e.isReferenceSegment}));d.sort((function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime}));var l=d.pop(),m=null!==(n=null==l?void 0:l.playbackRange.end)&&void 0!==n?n:1/0,p=e.get(f)||[];if(0===p.length)return 1/0;var g=Math.min.apply(Math,p.map((function(e){return e.playbackTime}))),h=g-m;s=Math.min(s,g),isFinite(h)&&a.push(h)}if(a.length!==i.length)return this.MU.logger.debug("No segments to align with end of buffer"),0;var v=s-this.MU.settings.GAP_TOLERANCE,T=this.cV===r.KeepGaps?Math.min.apply(Math,a):Math.max.apply(Math,a);return Math.min(T,v)},e.prototype.BV=function(e,t){var n=this,i=this.AV(t),r=!0;if(t.forAll((function(e,o){if(r){var a=o.timescale,s=i*a,u=o.truncatedPresentationTimeOffset+s,c=o.truncatedBaseMediaDecodeTime;n.FV(c,u,o,t)||(n.MU.logger.debug("Cannot shift segments to EOB: would exceed timestamp limits for ".concat(e)),r=!1)}})),r){this.MU.logger.debug("Aligning segments with EOB by shifting ".concat(i," seconds"));var o={};t.forAll((function(e,t){var n=t.timescale,r=i*n;t.updateAsContinuous(t.truncatedBaseMediaDecodeTime,t.truncatedPresentationTimeOffset+r);var a=t.originalPresentationTimeOffset-t.truncatedPresentationTimeOffset;o[e]=a/t.timescale})),this.xV(o),e.forEach((function(e){return e.setDirty(!0)}))}else this.MU.logger.debug("Cannot align segments with end of buffer: would exceed timestamp limits")},e.prototype.CV=function(e,t,n){return 0===t.length||(t.keys.every((function(e){return(t.get(e)||[]).length>0}))?(this.wV(t),this.yV(e,t),n&&this.BV(e,t),!0):(this.MU.logger.debug("Could not handle BaseMediaDecodeTime overflow: at least one buffer is empty"),!1))},e.prototype.DV=function(e){var t;if(e.isBaseMediaDecodeTimeLimitExceeded)return!0;var n=(0,M.getLargestPrecedingSegmentTimeInfo)(null!==(t=this.OU.get(e.mimeType))&&void 0!==t?t:[],e.originalPlaybackTime);return!!n&&isFinite(n.truncatedBaseMediaDecodeTime)&&n.truncatedBaseMediaDecodeTime!==n.originalBaseMediaDecodeTime},e.prototype.EV=function(e,t,n){var i,r=e.duration,o=e.timescale,a=e.mimeType,s=this.OU.keys.find((function(e){return e!==a}));if(!s)return!1;var u=null===(i=this.OU.get(s))||void 0===i?void 0:i.slice(-1)[0];if(!u)return!1;var c=(t+n)/o,f={start:c,end:c+r},d=u.playbackTime+u.duration,l={start:d,end:d+u.duration},m=Math.max(f.start,l.start);return!(Math.min(f.end,l.end)-m<=r/2)&&l.end*u.timescale-u.presentationTimeOffset>this.maxSafeBaseMediaDecodeTime},e.prototype.FV=function(e,t,n,i){var r=this,o=n.duration,a=n.timescale;if(e+o*a>this.maxSafeBaseMediaDecodeTime)return this.MU.logger.debug("Detected BMDT overflow for ".concat(n.mimeType," segment")),!1;if(this.EV(n,e,t))return this.MU.logger.debug("Triggering early BMDT overflow for ".concat(n.mimeType," segment")),!1;var s=t/a,u=e/a+o,c=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=[];return e.forEach((function(e){e.forAll((function(e,t){n.includes(t.timescale)||n.push(t.timescale)}))})),n}(i,this.OU);return c.every((function(e){return r.GV(s,u,e)}))},e.prototype.GV=function(e,t,n){return t*n+e*n<=this.maxSafeBaseMediaDecodeTime},e.prototype.HV=function(e){return Math.abs(e)>this.maxSafePresentationTimeOffset},e.prototype.IV=function(e){if(!(0,p.isTizen2017)())return!1;var t=e.originalPlaybackTime,n=e.duration,i=e.mimeType,r=t+n>(0,g.toSeconds)(this.maxSafeBaseMediaDecodeTime);return m.MimeTypeHelper.isAudio(i)&&r},e.prototype.JV=function(e,t){if(this.MU.settings.FORCE_BASE_MEDIA_DECODE_TIME_REWRITE)return!0;var n=e/t.timescale;return!!this.HV(n)||this.IV(t)},e.prototype.KV=function(e,t,n){var i=e.baseMediaDecodeTime,r=e.presentationTimeOffset,o=e.foundMatchingPreviousSegment,a=!this.FV(i,r,t,n);return o?a:a||this.JV(r,t)},e.prototype.LV=function(e){var t=this,n=new f.ArrayMap,i=new f.ArrayMap;return e.keys.forEach((function(r){var o;(0,y.ensureMimeTypeInMap)(n,r),(0,y.ensureMimeTypeInMap)(i,r),(0,y.ensureMimeTypeInMap)(t.OU,r);var a=null!==(o=t.OU.get(r))&&void 0!==o?o:[],s=a.length?a:t.OU.getAllValues();(e.get(r)||[]).forEach((function(r){var o=(0,M.findOverflowDataForSegmentInMap)(r,s,t.MU.settings.GAP_TOLERANCE,t.MU.logger);if(t.KV(o,r,e))t.MU.logger.debug("Segment added to discontinuous time info map.",r.segmentUrl,r.mimeType),r.updateAsDiscontinuous(),(0,y.addSegmentTimeInfoToMap)(i,r.mimeType,r);else{var a=o.baseMediaDecodeTime,u=o.presentationTimeOffset;r.updateAsContinuous(a,u),(0,y.addSegmentTimeInfoToMap)(n,r.mimeType,r)}}))})),{discontinuousSegmentTimeInfoMap:i,continuousSegmentTimeInfoMap:n}},e.prototype.MV=function(e,t,n){var i,r=this.LV(t),o=r.discontinuousSegmentTimeInfoMap,a=r.continuousSegmentTimeInfoMap;if(this.rV(e,a),this.CV(e,o,n))return!0;var s=(0,b.maybeSwitchOverASegmentToDiscontinuous)({continuousSegmentTimeInfoMap:a,discontinuousSegmentTimeInfoMap:o});if(!s){var u=this.LV(this.OU);s=(0,b.maybeSwitchOverASegmentToDiscontinuous)({continuousSegmentTimeInfoMap:u.continuousSegmentTimeInfoMap,discontinuousSegmentTimeInfoMap:o}),this.MU.logger.debug("Did not find any matching segment time info in current map, retried with existing ones.",s)}return!!s&&(this.MU.logger.debug("Moved ".concat(s.mimeType," segment from continued to discontinued. Trying to process discontinued infos again."),{switchedSegmentUrl:s.segmentUrl,matchingSegmentUrl:null===(i=s.getMatchingSegment(e))||void 0===i?void 0:i.getUrl()}),this.CV(e,o,n))},e.prototype.NV=function(e){var t=this;e.forAll((function(e,n){var i;(null===(i=t.OU.get(e))||void 0===i?void 0:i.find(n.equals))||(0,y.addSegmentTimeInfoToMap)(t.OU,n.mimeType,n);var r=t.PU.get(n.mimeType);r&&r.resolve(0)}))},e.prototype.OV=function(e){return e.every((function(e){return m.MimeTypeHelper.isMP4(e.getMimeType())}))},e.prototype.PV=function(){this.maxSafeBaseMediaDecodeTime=1/0,this.maxSafePresentationTimeOffset=1/0},e.prototype.QV=function(){return this.maxSafeBaseMediaDecodeTime!==1/0||this.maxSafePresentationTimeOffset!==1/0},e.prototype.rewriteTimeStampsIfNecessary=function(e){var t;!this.OV(e)&&this.QV()&&(this.MU.logger.debug("Disabling BMDT rewriting due to unsupported container format"),this.PV());var n=this.RV(),i=e.map(E.getSectionId).reduce(V,[]).some((function(e){return!n.includes(e)})),r=function(e){return e.reduce((function(e,t){return e.includes(t.getMimeType())||e.push(t.getMimeType()),e}),[])}(e),o=this.OU.keys.every((function(e){return r.includes(e)}));if(i&&!o)return this.MU.logger.debug("Cannot check for rewriting necessity - not all buffers have data yet"),!1;var a=this.oV(e),s=a[0],u=a[1],c=a[2];if(s)return this.MV(e,c,u);if(i&&u)return this.SV(e,c),!0;for(var f=0,d=c.getAllValues();f<d.length;f++){var l=d[f],m=l.mimeType,p=null!==(t=this.OU.get(m))&&void 0!==t?t:[],g=(0,M.findPrecedingSegmentTimeInfo)(p,l,this.MU.settings.GAP_TOLERANCE);(null==g?void 0:g.isBaseMediaDecodeTimeLimitExceeded)&&!l.isBaseMediaDecodeTimeLimitExceeded&&(l.updateAsDiscontinuous(),l.updateAsContinuous(l.originalBaseMediaDecodeTime,g.truncatedPresentationTimeOffset))}return this.NV(c),!0},e.prototype.RV=function(){return this.OU.transform((function(e){return e.map((function(e){return e.sectionId}))})).flatMap((function(e){return e})).reduce(V,[])},e.prototype.SV=function(e,t){var n={},i=this.AV(t);this.MU.logger.debug("Trying to handle PTO change, required shift: ".concat(i,"s")),t.forAll((function(e,t){var r=-i*t.timescale,o=r/t.timescale;t.isBaseMediaDecodeTimeLimitExceeded=!0,t.updateAsContinuous(t.originalBaseMediaDecodeTime,t.originalPresentationTimeOffset-r),n[t.mimeType]=o})),this.xV(n),this.NV(t),e.forEach((function(e){return e.setDirty(!0)}))},e.prototype.signalBufferRemoval=function(e,t,n){var i;if(this.OU.has(e)){var r=o.BufferRangeHelper.mergeRanges(t,this.MU.settings.GAP_TOLERANCE),a=this.OU.get(e)||[],s=a.filter((function(e){return e.isPlaybackRangeOverlapping(r)}));if(0===s.length&&this.xV(((i={})[e]=0,i)),this.TV(a,r,n)){var u=a[0];this.MU.logger.debug("Keeping reference BMDT segment info for mime type ".concat(e," after buffer clearing"),{segmentUrl:u.segmentUrl,sectionId:u.sectionId}),u.markAsReferenceSegment(),s.push(u)}this.OU.set(e,s)}},e.prototype.TV=function(e,t,n){var i=this.UV();if((0,l.isSwitchingBufferBlocks)(i)||0!==t.length||0===e.length)return!1;var r=this.MU.store.getState(),o=!!(null==r?void 0:r.player)&&(0,s.getIsSeekingOrTimeshifting)(r.player),u=this.MU.serviceManager.get(a.ServiceName.ManifestService,this.MU.sourceContext.sourceIdentifier),c=this.mapToExternalTime(n),f=null==u?void 0:u.getPeriodIdForTime(c);return!o&&e[0].periodId===f},e.prototype.mapToExternalTime=function(e,t){var n=this;void 0===t&&(t=!1);var i=this.OU.getAllValues(),r=i.find((function(t){var i=t.playbackRange.start-n.MU.settings.GAP_TOLERANCE,r=t.playbackRange.end+n.MU.settings.GAP_TOLERANCE;return!t.isReferenceSegment&&e>=i&&e<=r}))||(t?i[0]:void 0);return r&&(this.RU=r.originalPlaybackTime-r.playbackTime),this.mapToCachedExternalTime(e)},e.prototype.mapToCachedExternalTime=function(e){return void 0!==this.RU?Math.max(this.RU+e,0):(this.MU.logger.debug("Couldn't map internal time ".concat(e," to external time")),e)},e.prototype.mapToInternalTime=function(e,t,n){var i=this;void 0===t&&(t=!1);var r=this.OU.getAllValues().filter((function(e){return void 0===n||n===e.mimeType})),o=r.find((function(t){var n=t.originalPlaybackRange.start-i.MU.settings.GAP_TOLERANCE,r=t.originalPlaybackRange.end+i.MU.settings.GAP_TOLERANCE;return e>=n&&e<=r}))||(t?r[0]:void 0);return o?Math.max(o.playbackTime+(e-o.originalPlaybackTime),0):e},e.prototype.mapToExternalTimeRange=function(e){if(null!=e)return{start:this.mapToExternalTime(e.start),end:this.mapToExternalTime(e.end)}},e.prototype.mapToExternalTimeRanges=function(e){var t=this;return e.map((function(e){return t.mapToExternalTimeRange(e)})).filter((function(e){return void 0!==e}))},e.prototype.mapToExternalTimeRangesMap=function(e){var t=this;return null==e?null:Object.keys(e).reduce((function(n,i){return n[i]=t.mapToExternalTimeRanges(e[i]),n}),{})},e.prototype.getSegmentTimeRanges=function(e,t){var n=this,i=[];return e.forEach((function(e){var r=n.OU.get(t).find((function(t){return t.isSegmentMatching(e)}));r&&i.push(r.playbackRange)})),i},e.prototype.getCorrectTimeStampOffset=function(e,t){var n=this.PU.get(e);return n||(n=new d.Deferred,this.PU.set(e,n)),n.promise.then((function(e){return t+e}))},e.prototype.dispose=function(){var e,t,n,i;this.OU.clear(),this.jV(),null===(e=this.MU.videoElement)||void 0===e||e.removeEventListener(h.MediaElementEvent.currenttimenotadvancing,this.gV),null===(t=this.MU.videoElement)||void 0===t||t.removeEventListener(h.MediaElementEvent.waiting,this.gV),null===(n=this.MU.videoElement)||void 0===n||n.removeEventListener(h.MediaElementEvent.stalled,this.gV),null===(i=this.MU.videoElement)||void 0===i||i.removeEventListener(h.MediaElementEvent.timeupdate,this.fV)},e.prototype.UV=function(){return this.MU.serviceManager.get(a.ServiceName.SourceStoreService,this.MU.sourceContext.sourceIdentifier)},e}();t.BaseMediaDecodeTimeHandler=U;var P=Math.log(2);function S(e){return Math.ceil(Math.log(e+1)/P)}function V(e,t){return e.includes(t)||e.push(t),e}},44885:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.addSegmentTimeInfoToMap=void 0,t.ensureMimeTypeInMap=function(e,t){e.get(t)||e.addAll(t,[])},t.addSegmentTimeInfoToMap=function(e,t,n){(function(e,t,n){var i;return null===(i=e.get(t))||void 0===i?void 0:i.find((function(e){return e.segmentUrl===(null==n?void 0:n.segmentUrl)&&e.equals(n)}))})(e,t,n)||e.add(t,n)}},73849:function(e,t){function n(e){return Math.floor(e.originalBaseMediaDecodeTime-e.baseMediaDecodeTime)}function i(e){return Math.floor(e.originalPresentationTimeOffset-e.presentationTimeOffset)}function r(e,t,n){return e.find((function(e){var i=e.originalPlaybackRange.end;return t.originalPlaybackRange.start>=i-n&&t.originalPlaybackRange.start<=i+n}))}function o(e,t){return e.reduce((function(e,n){var i=n.originalPlaybackTime,r=e?e.originalPlaybackTime:-1/0;return i<t&&i>r?n:e}),void 0)}Object.defineProperty(t,"__esModule",{value:!0}),t.findOverflowDataForSegmentInMap=function(e,t,a,s){var u=1/0,c=1/0,f=r(t,e,a)||o(t,e.originalPlaybackTime),d=f?e.timescale/f.timescale:1;1!==d&&s.debug("Detected a timescale change: ".concat(null==f?void 0:f.timescale," -> ").concat(e.timescale));var l=f&&e.originalPresentationTimeOffset===f.originalPresentationTimeOffset*d;return l&&(u=e.originalBaseMediaDecodeTime-Math.round(n(f)*d),c=e.originalPresentationTimeOffset-Math.round(i(f)*d)),{baseMediaDecodeTime:u,presentationTimeOffset:c,foundMatchingPreviousSegment:Boolean(l)}},t.getBmdtOffset=n,t.getPtoOffset=i,t.findPrecedingSegmentTimeInfo=r,t.getLargestPrecedingSegmentTimeInfo=o},8301:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.findContinuousSegmentToMove=t.maybeSwitchOverASegmentToDiscontinuous=void 0;var i=n(44885);t.maybeSwitchOverASegmentToDiscontinuous=function(e){var n=(0,t.findContinuousSegmentToMove)(e);return n&&(e.continuousSegmentTimeInfoMap.deleteValue(n.mimeType,n),n.updateAsDiscontinuous(),(0,i.addSegmentTimeInfoToMap)(e.discontinuousSegmentTimeInfoMap,n.mimeType,n)),n},t.findContinuousSegmentToMove=function(e){var t=e.continuousSegmentTimeInfoMap.keys;if(2!==t.length)return null;if(t.every((function(t){return e.continuousSegmentTimeInfoMap.get(t).length>0})))return null;for(var n=0,i=t;n<i.length;n++){var r=i[n];if(e.discontinuousSegmentTimeInfoMap.has(r)&&!((e.discontinuousSegmentTimeInfoMap.get(r)||[]).length>0)){var o=e.continuousSegmentTimeInfoMap.get(r)||[];if(o.length)return o[0]}}return null}},48558:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTimeInformation=void 0,t.getSectionId=o;var i=n(4524),r=function(){function e(e,t){var n,i,r=this;this.equals=function(e){if(e){var t=r.mimeType===e.mimeType,n=r.duration===e.duration,i=r.originalBaseMediaDecodeTime===e.originalBaseMediaDecodeTime,o=r.sectionId===e.sectionId;return t&&n&&i&&o}return!1},this.segmentUrl=e.getUrl(),this.duration=e.getDuration(),this.mimeType=e.getMimeType(),this.timescale=null!==(n=e.getTimescale())&&void 0!==n?n:1,this.originalPlaybackTime=e.getPlaybackTime(),this.zbb=null===(i=e.getSegmentInfo())||void 0===i?void 0:i.byteRange,this.originalBaseMediaDecodeTime=e.getBaseMediaDecodeTime(),this.originalPresentationTimeOffset=e.getPresentationTimeOffset()*this.timescale,this.isBaseMediaDecodeTimeLimitExceeded=this.originalBaseMediaDecodeTime+this.duration*this.timescale>t,this.periodId=e.getPeriodId(),this.ybb=!1,this.sectionId=o(e),this.truncatedBaseMediaDecodeTime=1/0,this.truncatedPresentationTimeOffset=1/0,this.truncatedPlaybackTime=1/0}return Object.defineProperty(e.prototype,"isReferenceSegment",{get:function(){return this.ybb},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playbackTime",{get:function(){return this.isBaseMediaDecodeTimeLimitExceeded&&this.truncatedPlaybackTime!==1/0?this.truncatedPlaybackTime:this.originalPlaybackTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseMediaDecodeTime",{get:function(){return this.isBaseMediaDecodeTimeLimitExceeded&&this.truncatedBaseMediaDecodeTime!==1/0?this.truncatedBaseMediaDecodeTime:this.originalBaseMediaDecodeTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"presentationTimeOffset",{get:function(){return this.isBaseMediaDecodeTimeLimitExceeded&&this.truncatedPresentationTimeOffset!==1/0?this.truncatedPresentationTimeOffset:this.originalPresentationTimeOffset},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playbackRange",{get:function(){return{start:this.playbackTime,end:this.playbackTime+this.duration}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"originalPlaybackRange",{get:function(){return{start:this.originalPlaybackTime,end:this.originalPlaybackTime+this.duration}},enumerable:!1,configurable:!0}),e.prototype.getMatchingSegment=function(e){var t=this;return e.find((function(e){return t.isSegmentMatching(e)}))},e.prototype.isSegmentMatching=function(e){var t,n,i,r=e.getUrl()===this.segmentUrl,o=e.getPlaybackTime()===this.originalPlaybackTime,a=null===(t=e.getSegmentInfo())||void 0===t?void 0:t.byteRange,s=(null==a?void 0:a.start)===(null===(n=this.zbb)||void 0===n?void 0:n.start),u=(null==a?void 0:a.end)===(null===(i=this.zbb)||void 0===i?void 0:i.end),c=s&&u,f=e.getMimeType()===this.mimeType;return r&&o&&c&&f},e.prototype.updateAsDiscontinuous=function(){this.isBaseMediaDecodeTimeLimitExceeded=!0},e.prototype.updateAsContinuous=function(e,t){this.truncatedBaseMediaDecodeTime=e,this.truncatedPresentationTimeOffset=t,this.truncatedPlaybackTime=(e-t)/this.timescale},e.prototype.markAsReferenceSegment=function(){this.ybb=!0},e.prototype.isPlaybackRangeOverlapping=function(e){var t=this.playbackRange,n={buffered:e},r=i.BufferRangeHelper.isInBufferedRange(n,t.start),o=i.BufferRangeHelper.isInBufferedRange(n,t.end),a=i.BufferRangeHelper.getCommonBufferedRanges({buffered:e,inSegment:[t]}).length>0;return r||o||a},e}();function o(e){var t,n,i;return null!==(i=null===(n=null===(t=e.getSegmentInfo())||void 0===t?void 0:t.discontinuitySequenceNumber)||void 0===n?void 0:n.toString())&&void 0!==i?i:e.getPeriodId()}t.SegmentTimeInformation=r},21651:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTimeInformationArrayMap=void 0;var r=function(e){function t(){return e.call(this,(function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime}))||this}return i(t,e),t.prototype.find=function(e){if(e)return this.get(e.getMimeType()).find((function(t){return t.isSegmentMatching(e)}))},t}(n(61252).SortedArrayMap);t.SegmentTimeInformationArrayMap=r},61252:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SortedArrayMap=void 0;var r=function(e){function t(t){var n=e.call(this)||this;return n.Zbb=t,n.abb=[],n}return i(t,e),t.prototype.getAllValues=function(){return this.abb},t.prototype.bbb=function(e){return e?e.sort(this.Zbb):[]},t.prototype.set=function(t,n){var i=this.bbb(n);return this.cbb(t,i),e.prototype.set.call(this,t,i)},t.prototype.add=function(e,t){var n=t?[t]:[];return this.addAll(e,n),this},t.prototype.addAll=function(e,t){this.ensure(e),this.set(e,[].concat(t||[],this.get(e)))},t.prototype.delete=function(t){return this.dbb(this.get(t)),e.prototype.delete.call(this,t)},t.prototype.deleteValue=function(t,n){return this.dbb([n]),e.prototype.deleteValue.call(this,t,n)},t.prototype.clear=function(){this.abb=[],e.prototype.clear.call(this)},t.prototype.cbb=function(e,t){void 0===t&&(t=[]);var n=this.get(e);this.dbb(n),this.abb=this.bbb(this.abb.concat(t))},t.prototype.dbb=function(e){var t=this;void 0===e&&(e=[]),e.forEach((function(e){var n=t.abb.indexOf(e);n>-1&&t.abb.splice(n,1)}))},t}(n(19483).ArrayMap);t.SortedArrayMap=r},1124:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.getTvMseWrapperConstructor=function(){return void 0===r&&(r=f()),r};var r,o=n(3714),a=n(20213),s=n(70850),u=n(88052),c=n(24281),f=function(){return function(e){function t(t,n){var i=e.call(this,t)||this;return i.Bbb={},i.Abb=n,i}return i(t,e),t.prototype.printDetailedBufferRange=function(e,t){var n;try{n=e.buffered}catch(e){return void this.logger.debug("".concat(t," buffer range: Error accessing buffered ranges"))}if(0!==n.length)for(var i=0;i<n.length;i++){var r=n.start(i),o=n.end(i);this.logger.debug("".concat(t," buffer range [").concat(i,"]: ").concat(this.Abb.mapToExternalTime(r,!0)," - ").concat(this.Abb.mapToExternalTime(o,!0)," (").concat(r," - ").concat(o,")"))}else this.logger.debug("".concat(t," buffer range: empty"))},t.prototype.getBufferStartTime=function(){var e=this,t=Object.keys(this.sourceBuffers).map((function(t){return 0===e.sourceBuffers[t].bufferedRanges.length?0:e.Abb.mapToExternalTime(e.sourceBuffers[t].bufferedRanges[0].start)}));return Math.max.apply(null,t)},t.prototype.updateTimestampOffset=function(t,n){try{e.prototype.updateTimestampOffset.call(this,t,n)}catch(e){this.logger.error("Unable to update timestampOffset",e),e.code===DOMException.INVALID_STATE_ERR&&this.context.eventHandler.dispatchEvent(o.PlayerEvent.Warning,new a.PlayerWarning(a.WarningCode.PLAYBACK_WARNING,"Unable to update timestampOffset (Invalid State error)",e))}},t.prototype.Cbb=function(e,t){this.Bbb[e]||(this.Bbb[e]={currentOffset:this.sourceBuffers[e].buffer.timestampOffset,pendingOffset:t})},t.prototype.queueTimestampOffsetUpdate=function(t,n){var i=this;return this.Cbb(t,n),this.Abb.getCorrectTimeStampOffset(t,n).then((function(e){return i.Bbb[t].pendingOffset=e})).then((function(){var n=i.Bbb[t].pendingOffset,r=i.Bbb[t].currentOffset;return s.Util.roundValue(r,6)===s.Util.roundValue(n,6)&&i.isMediaSourceOpen()?Promise.resolve():(i.logger.debug("Updating timestamp offset for ".concat(t," to ").concat(n," (uncorrected offset: ").concat(r,")")),i.Bbb[t].currentOffset=n,e.prototype.queueTimestampOffsetUpdate.call(i,t,n).finally((function(){var e,n,r=null===(n=null===(e=i.sourceBuffers[t])||void 0===e?void 0:e.buffer)||void 0===n?void 0:n.timestampOffset;i.Bbb[t].currentOffset=r})))}))},t.prototype.getBufferRangeStart=function(e,t){void 0===t&&(t=0);var n=this.Abb.getEarliestExternalTimeBufferedRangeIndex(e);return Math.max(t,e.start(n))},t.prototype.preBufferRemoval=function(e,t,n){this.logger.debug("removing buffer for ".concat(e," (from ").concat(this.Abb.mapToExternalTime(t)," to ").concat(this.Abb.mapToExternalTime(n),") (").concat(t," to ").concat(n,")"))},t.prototype.getRangePendingRemoval=function(e){return this.sourceBuffers.hasOwnProperty(e)&&this.Abb.mapToExternalTimeRange(this.sourceBuffers[e].rangePendingRemoval)||void 0},t.prototype.addToBuffer=function(t){var n=this;return(0,c.rewriteUnsupportedBoxes)(t),this.Dbb(t).then((function(){return e.prototype.addToBuffer.call(n,t)}))},t.prototype.Dbb=function(e){var t=e.getMimeType(),n=-e.getPresentationTimeOffset();return e.isDirty()&&!e.isInit()?this.setTimestampOffset(t,n):Promise.resolve()},t}(u.ModuleManager.get(a.ModuleName.RendererMse).MSEWrapper)}},35501:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.getTvRendererConstructor=function(){return void 0===o&&(o=p()),o};var o,a=n(4524),s=n(66790),u=n(34841),c=n(88052),f=n(62756),d=n(84276),l=n(48558),m=n(1124),p=function(){return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.postBufferRemoval=function(e,n,i){t.video&&(t.baseMediaDecodeTimeHandler.signalBufferRemoval(e,t.JU(e),t.video.currentTime),t.logger.debug("successfully removed buffer for ".concat(e," (from ").concat(t.baseMediaDecodeTimeHandler.mapToExternalTime(n)," to ").concat(t.baseMediaDecodeTimeHandler.mapToExternalTime(i),") (").concat(n," to ").concat(i,")")))},t}return i(t,e),t.prototype.init=function(t){this.baseMediaDecodeTimeHandler=new d.BaseMediaDecodeTimeHandler(this.context,this.IU.bind(this),this.getMaxSafeBaseMediaDecodeTime(),this.getMaxSafePresentationTimeOffset()),e.prototype.init.call(this,t),this.HU||(this.HU=new u.Deferred),this.HU.resolve(this.baseMediaDecodeTimeHandler)},t.prototype.getMaxSafeBaseMediaDecodeTime=function(){return 1/0},t.prototype.getMaxSafePresentationTimeOffset=function(){return 1/0},t.prototype.createMSEWrapper=function(){return new((0,m.getTvMseWrapperConstructor)())(this.context,this.baseMediaDecodeTimeHandler)},t.prototype.getCurrentVideoTime=function(){return this.baseMediaDecodeTimeHandler.mapToExternalTime(e.prototype.getCurrentVideoTime.call(this))},t.prototype.getRangesInSourceBuffers=function(){return this.baseMediaDecodeTimeHandler.mapToExternalTimeRangesMap(e.prototype.getRangesInSourceBuffers.call(this))},t.prototype.getBufferedRanges=function(t){return this.baseMediaDecodeTimeHandler.mapToExternalTimeRanges(e.prototype.getBufferedRanges.call(this,t))},t.prototype.getVideoElementBufferedRanges=function(){var t=e.prototype.getVideoElementBufferedRanges.call(this);return this.baseMediaDecodeTimeHandler.mapToExternalTimeRanges(t)},t.prototype.IU=function(e){var t,n,i=this;if(!this.mse)return Promise.reject();var r=null===(t=this.mse)||void 0===t?void 0:t.getBufferedRanges(e),o=null!==(n=null==r?void 0:r.slice(1))&&void 0!==n?n:[];return Promise.all(o.map((function(t){var n;return i.logger.debug("Clearing buffer on rollover for ".concat(e," from ").concat(t.start," to ").concat(t.end)),null===(n=i.mse)||void 0===n?void 0:n.removeFromBuffer(e,t.start-i.settings.GAP_TOLERANCE,t.end+i.settings.GAP_TOLERANCE,i.postBufferRemoval)}))).then((function(){}))},t.prototype.removeData=function(e,t,n,i){if(void 0===i&&(i=!1),!this.mse)return Promise.reject();void 0===t&&void 0===n&&!i&&this.saveCurrentTime(),this.removeDataFromSegmentQueues(e,t,n);var r=void 0!==t?this.baseMediaDecodeTimeHandler.mapToInternalTime(t,!0,e):void 0,o=void 0!==n?this.baseMediaDecodeTimeHandler.mapToInternalTime(n,!0,e):void 0;return this.mse.removeFromBuffer(e,r,o,this.postBufferRemoval)},t.prototype.addSegmentFromQueueToMse=function(t){var n=this,i=this.KU((function(e){return!e.isInit()})),r=Object.keys(this.segmentQueues).every((function(e){var t=n.mse&&n.mse.getBufferedRanges(e).length>0,r=i.some((function(t){return t.getMimeType()===e}));return t||r}));if(0===i.length||!r)return Promise.reject(s.SOURCE_BUFFER_APPEND_STATUS.SUSPENDED);var o=i.reduce((function(e,t){return t.getPlaybackTime()<e.getPlaybackTime()?t:e}),i[0]),a=(0,l.getSectionId)(o),u=this.KU((function(e){return!e.isInit()&&(0,l.getSectionId)(e)===a}));return this.baseMediaDecodeTimeHandler.rewriteTimeStampsIfNecessary(u)?e.prototype.addSegmentFromQueueToMse.call(this,t):Promise.reject(s.SOURCE_BUFFER_APPEND_STATUS.SUSPENDED)},t.prototype.JU=function(e){var t,n;if(null===this.mse||!this.segmentQueues.hasOwnProperty(e))return[];var i=this.KU((function(e){return!e.isInit()})),o=this.baseMediaDecodeTimeHandler.getSegmentTimeRanges(i,e),s=null!==(n=null===(t=this.mse)||void 0===t?void 0:t.getBufferedRanges(e))&&void 0!==n?n:[];return a.BufferRangeHelper.mergeRanges(r(r([],o,!0),s,!0),this.settings.GAP_TOLERANCE)},t.prototype.adjustTimeToNextCommonBufferStart=function(t){var n=e.prototype.adjustTimeToNextCommonBufferStart.call(this,t);return isNaN(n)?NaN:Math.ceil(100*this.baseMediaDecodeTimeHandler.mapToInternalTime(n))/100},t.prototype.seekOnVideoElement=function(e){var t=this;return this.waitingForSeekedPromise=new Promise((function(n,i){if(t.video){t.video.currentTime=e;var r=t.video.currentTime;n(t.getBaseMediaDecodeTimeHandler().then((function(e){return e.mapToExternalTime(r)})))}else i("No video reference")})),this.waitingForSeekedPromise},t.prototype.getBaseMediaDecodeTimeHandler=function(){return this.HU.promise},t.prototype.KU=function(e){var t=this;return void 0===e&&(e=function(){return!0}),Object.keys(this.segmentQueues).flatMap((function(e){return t.segmentQueues[e]})).filter(e)},t.prototype.getEndOfBufferTime=function(){if(this.video&&this.video.buffered&&this.video.buffered.length>0&&this.baseMediaDecodeTimeHandler)return this.baseMediaDecodeTimeHandler.getEndOfBufferTime()},t.prototype.shutdown=function(t){var n=this;return e.prototype.shutdown.call(this,t).then((function(){n.LU()}))},t.prototype.LU=function(){this.HU=new u.Deferred,this.baseMediaDecodeTimeHandler.dispose()},t.prototype.release=function(){return this.LU(),e.prototype.release.call(this)},t}(c.ModuleManager.get(f.ModuleName.RendererMse).MSERenderer)}},24281:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.rewriteUnsupportedBoxes=function(e,t){void 0===t&&(t=o),t.forEach((function(t){var n,i=null===(n=e.getParsedData())||void 0===n?void 0:n.get(t);i&&(0,r.rewriteMp4BoxType)(i,"free")}))};var i=n(15487),r=n(2992),o=function(){var e=["skip"];return((0,i.isTizen2016)()||(0,i.isTizen2017)())&&e.push("moov.trak.edts"),e}()},73868:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.VidaaModuleDefinition=void 0;var i=n(62756),r=n(72858),o=n(34742);t.VidaaModuleDefinition={name:i.ModuleName.Vidaa,module:function(){return{VidaaVideoElementWrapper:o.VidaaVideoElementWrapper,getVidaaMSERendererConstructor:r.getVidaaMSERendererConstructor}},dependencies:[i.ModuleName.RendererMse]},t.default=t.VidaaModuleDefinition},72858:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.getVidaaMSERendererConstructor=function(){return null===o&&(o=function(){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getMaxSafeBaseMediaDecodeTime=function(){return this.context.settings.VIDAA_MAX_SAFE_BMDT},t.prototype.getMaxSafePresentationTimeOffset=function(){return this.context.settings.VIDAA_MAX_SAFE_PTO},t}((0,r.getTvRendererConstructor)())}()),o};var r=n(35501),o=null},34742:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.VidaaVideoElementWrapper=void 0;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.prime=function(){return this.context.logger.log("Not priming video element as this causes issues on VIDAA"),Promise.resolve()},t}(n(79186).VideoElementWrapper);t.VidaaVideoElementWrapper=r}},function(e){return function(){return e(e.s=73868)}()}])}));
|
|
17
|
+
"use strict";!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.vidaa=t():(e.bitmovin=e.bitmovin||{},e.bitmovin.player=e.bitmovin.player||{},e.bitmovin.player.vidaa=t())}(self,(function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[838],{84276:function(e,t,n){var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseMediaDecodeTimeHandler=t.PtoGapFillingMode=void 0;var r,o=n(4524),a=n(80813),s=n(87827),u=n(68925),c=n(47602),f=n(19483),d=n(34841),l=n(87244),m=n(85434),p=n(15487),g=n(89927),h=n(19274),v=n(88052),T=n(62756),y=n(44885),b=n(73849),M=n(8301),V=n(48558),E=n(21651);!function(e){e.KeepGaps="keep-gaps",e.FillGaps="fill-gaps"}(r||(t.PtoGapFillingMode=r={}));var O=function(){function e(e,t,n,a){var s=this;this.maxSafeBaseMediaDecodeTime=n,this.maxSafePresentationTimeOffset=a,this.mV=function(){s.oV(s.dV.settings.END_OF_BUFFER_TOLERANCE)},this.nV=function(){s.oV(s.dV.settings.END_OF_BUFFER_RECOVERY_TOLERANCE)},this.tV=function(){if(s.dV.videoElement)try{var e=s.sV(),t=s.dV.videoElement.currentTime,n=s.pV(t).mapEach((function(e){return e.playbackRange})).mapAll((function(e){return o.BufferRangeHelper.mergeRanges(e,s.dV.settings.GAP_TOLERANCE)})).getObject(),r=o.BufferRangeHelper.getCommonBufferedRanges(i(i({},n),{bufferedRanges:e})).shift();if(void 0!==r){var a=r.getStart();s.dV.logger.debug("continuing playback at ".concat(a," (from ").concat(t,")")),s.dV.videoElement.currentTime=a,s.qV(),s.dV.videoElement.eventHandler.removeEventListener(h.MediaElementEvent.currenttimenotadvancing,s.nV),s.kV().finally((function(){var e;return null===(e=s.bV())||void 0===e?void 0:e.dispatch((0,u.setTimestampRollingOver)(!1))})).then((function(){s.dV.logger.debug("successfully cleared previous buffers")})).catch((function(e){s.dV.logger.debug("could not clear previous buffers:",e)}))}else s.rV()}catch(e){s.dV.logger.debug("could not handle timestamp overflow:",e)}else s.dV.logger.debug("Could not handle timestamp overflow: Video Element is not defined")},this.dV=e,this.jV=r.KeepGaps,this.hV=t,this.eV=void 0,this.gV=new Map,this.fV=new E.SegmentTimeInformationArrayMap,this.dV.videoElement?(this.dV.videoElement.addEventListener(h.MediaElementEvent.waiting,this.nV),this.dV.videoElement.addEventListener(h.MediaElementEvent.stalled,this.nV),this.dV.videoElement.addEventListener(h.MediaElementEvent.timeupdate,this.mV),e.logger.debug("BaseMediaDecodeTime limit is set to ".concat(D(n)," bits")),e.logger.debug("PresentationTimeOffset limit is set to ".concat(D(a)," bits")),e.settings.FORCE_BASE_MEDIA_DECODE_TIME_REWRITE&&e.logger.debug("BaseMediaDecodeTime rewriting is forced!")):e.logger.debug("Could not set up BaseMediaDecodeTime rewriting: Video Element is not defined")}return e.prototype.kV=function(){var e=this,t=[];return this.lV().keys.forEach((function(n){t.push(e.hV(n))})),Promise.all(t).then((function(){}))},e.prototype.getEndOfBufferTime=function(){var e=o.BufferRangeHelper.getCommonBufferedRanges(this.lV(!0).getObject()).sort((function(e,t){return e.getStart()-t.getStart()}));return e.length>0?e[e.length-1].getEnd():0},e.prototype.setPtoGapFillingMode=function(e){this.jV=e},e.prototype.getEarliestExternalTimeBufferedRangeIndex=function(e){var t=0;try{for(var n=void 0,i=0;i<e.length;i++){var r=this.mapToExternalTime(e.start(i));(void 0===n||r<n)&&(n=r,t=i)}}catch(e){this.dV.logger.debug("Could not determine buffer region offset:",e)}return t},e.prototype.lV=function(e){var t=this;return void 0===e&&(e=!1),this.fV.mapEach((function(t){return e?t.originalPlaybackRange:t.playbackRange})).mapAll((function(e){return o.BufferRangeHelper.mergeRanges(e,t.dV.settings.GAP_TOLERANCE)}))},e.prototype.oV=function(e){var t,n,i=this.dV.videoElement;if(i){var r=i.currentTime;if(!(r>=i.duration&&i.duration>0)){var o=i.buffered;if(o.length<2)null===(t=this.bV())||void 0===t||t.dispatch((0,u.setTimestampRollingOver)(!1));else if(0!==this.getEarliestExternalTimeBufferedRangeIndex(o)){var a=o.end(o.length-1);r>=a-Math.max(this.dV.settings.MINIMAL_BACKWARD_BUFFER_CLEARING_INTERVAL,this.dV.settings.END_OF_BUFFER_TOLERANCE,this.dV.settings.END_OF_BUFFER_RECOVERY_TOLERANCE)&&(null===(n=this.bV())||void 0===n||n.dispatch((0,u.setTimestampRollingOver)(!0))),r>=a-e&&this.tV()}}}},e.prototype.pV=function(e){var t=this,n=this.dV.settings.GAP_TOLERANCE,i=new f.ArrayMap;return this.fV.keys.forEach((function(r){var o=!1,a=-1/0,s=t.fV.get(r),u=!1;s.sort((function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime}));var c=s.filter((function(t){var i=t.playbackRange,r=i.start-n<=e&&i.end+n>=e;if(u=u||r,!isFinite(a)&&r)a=t.playbackTime;else if(isFinite(a))return o=o||t.playbackTime<a;return!1}));0!==c.length||u||(s.sort((function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime})),c=s.filter((function(t){return t.playbackRange.end<e}))),i.addAll(r,c)})),i},e.prototype.qV=function(){void 0!==this.eV&&(this.eV(),this.eV=void 0)},e.prototype.rV=function(){var e=this,t=this.bV();void 0!==t&&(this.qV(),this.eV=(0,c.subscribeToRendererBufferChanges)(t,(function(){return e.nV()})))},e.prototype.sV=function(){var e,t=[],n=null===(e=this.dV.videoElement)||void 0===e?void 0:e.buffered;if(!function(e){return 0!==(null==e?void 0:e.length)}(n))return[];for(var i=0;i<n.length;i++)t.push({start:n.start(i),end:n.end(i)});return t},e.prototype.uV=function(e){var t,n=e.getMimeType(),i=e.getPlaybackTimeRange();if(void 0!==i){var r=(null!==(t=this.fV.get(n))&&void 0!==t?t:[]).filter((function(e){return e.originalPlaybackRange.end<i.end}));return r[r.length-1]}},e.prototype.vV=function(e){var t=this,n=!1,i=!1,o=new E.SegmentTimeInformationArrayMap;return this.fV.keys.forEach((function(e){return(0,y.ensureMimeTypeInMap)(o,e)})),e.forEach((function(e){if(!e.isDirty()){var a=new V.SegmentTimeInformation(e,t.maxSafeBaseMediaDecodeTime),s=a.presentationTimeOffset/a.timescale,u=t.OV(s),c=t.PV(a);(n=n||u||c||t.dV.settings.FORCE_BASE_MEDIA_DECODE_TIME_REWRITE||t.KV(a)||t.LV(a,a.baseMediaDecodeTime,a.presentationTimeOffset))&&(a.isBaseMediaDecodeTimeLimitExceeded=!0,t.dV.logger.debug("BaseMediaDecodeTime (".concat(a.originalBaseMediaDecodeTime,") exceeding limit for ").concat(a.mimeType," segment")));var f=t.uV(e),d=f?f.originalPresentationTimeOffset/f.timescale:s;d===s||t.jV!==r.FillGaps&&!(null==f?void 0:f.isBaseMediaDecodeTimeLimitExceeded)||(t.dV.logger.debug("Detected a presentation time offset change: ".concat(d," -> ").concat(s),{precedingSegmentTimeInfo:null==f?void 0:f.segmentUrl}),i=!0),(0,y.addSegmentTimeInfoToMap)(o,a.mimeType,a)}})),[n,i,o]},e.prototype.wV=function(e){return v.ModuleManager.has(T.ModuleName.ContainerMP4)?e.getTFDTBoxOffsets()||v.ModuleManager.get(T.ModuleName.ContainerMP4).parseTfdtBoxOffsets(e):(this.dV.logger.debug("Can't rewrite BMDT for TS segment as MP4 module is not available"),[])},e.prototype.xV=function(e,t){var n=this.wV(e);e.setTFDTBoxOffsets(n);var i=e.getBaseMediaDecodeTime()-t.truncatedBaseMediaDecodeTime;e.getTFDTBoxOffsets().forEach((function(t){var n=0,r=new DataView(e.getData(),t),o=r.getUint32(n);n+=4;var a=String.fromCharCode(r.getUint8(n++),r.getUint8(n++),r.getUint8(n++),r.getUint8(n++));if(n+=1===o?8:0,"tfdt"===a){var s=r.getUint8(n);n+=4,1===s?function(e,t,n){var i=e.getUint32(t),r=e.getUint32(t+4),o=i*Math.pow(2,32)+r-n;e.setUint32(t,Math.floor(o/Math.pow(2,32))),t+=4,e.setUint32(t,o)}(r,n,i):function(e,t,n){var i=e.getUint32(t)-n;e.setUint32(t,i)}(r,n,i)}})),e.setBaseMediaDecodeTime(t.truncatedBaseMediaDecodeTime),e.setDirty(!0)},e.prototype.yV=function(e,t){var n=this;t.forAll((function(t,i){(0,y.addSegmentTimeInfoToMap)(n.fV,t,i);var r=i.getMatchingSegment(e);r&&n.xV(r,i)}))},e.prototype.zV=function(e,t){return e.reduce((function(e,n){var i=t(n),r=Math.floor(i/n.timescale);return!isFinite(e)&&isFinite(r)||r<e?r:e}),-1/0)},e.prototype.AV=function(e,t){var n=this;return Math.min.apply(Math,e.transform((function(e){return n.zV(e,t)})))},e.prototype.BV=function(e){return this.AV(e,(function(e){return e.truncatedBaseMediaDecodeTime-e.truncatedPresentationTimeOffset}))},e.prototype.CV=function(e){return this.AV(e,(function(e){return e.originalPresentationTimeOffset}))},e.prototype.DV=function(e){var t={},n=this.CV(e);isFinite(n)?(e.forAll((function(e,i){var r=i.timescale,o=i.originalBaseMediaDecodeTime,a=i.originalPresentationTimeOffset,s=Math.floor(a-n*r),u=a-s,c=o-u,f=Math.floor(u/r);i.truncatedBaseMediaDecodeTime=c,i.truncatedPresentationTimeOffset=s,t.hasOwnProperty(e)||(t[e]=f)})),this.EV(t)):this.dV.logger.debug("Could not determine common PresentationTimeOffset divisor")},e.prototype.EV=function(e){var t=this;Object.keys(e).forEach((function(n){var i=t.gV.get(n);i&&i.resolve(e[n]);var r=new d.Deferred;t.gV.set(n,r),r.resolve(e[n])}))},e.prototype.FV=function(e,t){var n,i=this,r=this.BV(t);isFinite(r)?(t.forAll((function(t,n){var o=n.getMatchingSegment(e);o&&i.GV(o,n,r),(0,y.addSegmentTimeInfoToMap)(i.fV,t,n)})),null===(n=this.dV.videoElement)||void 0===n||n.addEventListener(h.MediaElementEvent.currenttimenotadvancing,this.nV)):this.dV.logger.debug("Could not determine common BaseMediaDecideTime divisor")},e.prototype.GV=function(e,t,n){t.truncatedBaseMediaDecodeTime=t.truncatedBaseMediaDecodeTime-t.timescale*n,t.truncatedPlaybackTime=(t.truncatedBaseMediaDecodeTime-t.truncatedPresentationTimeOffset)/t.timescale,this.xV(e,t)},e.prototype.HV=function(e){for(var t,n,i=e.keys,o=e.getAll(),a=[],s=1/0,u=0,c=i;u<c.length;u++){var f=c[u],d=(null!==(t=this.fV.get(f))&&void 0!==t?t:[]).filter((function(e){return!o.includes(e)&&!e.isReferenceSegment}));d.sort((function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime}));var l=d.pop(),m=null!==(n=null==l?void 0:l.playbackRange.end)&&void 0!==n?n:1/0,p=e.get(f)||[];if(0===p.length)return 1/0;var g=Math.min.apply(Math,p.map((function(e){return e.playbackTime}))),h=g-m;s=Math.min(s,g),isFinite(h)&&a.push(h)}if(a.length!==i.length)return this.dV.logger.debug("No segments to align with end of buffer"),0;var v=s-this.dV.settings.GAP_TOLERANCE,T=this.jV===r.KeepGaps?Math.min.apply(Math,a):Math.max.apply(Math,a);return Math.min(T,v)},e.prototype.IV=function(e,t){var n=this,i=this.HV(t),r=!0;if(t.forAll((function(e,o){if(r){var a=o.timescale,s=i*a,u=o.truncatedPresentationTimeOffset+s,c=o.truncatedBaseMediaDecodeTime;n.MV(c,u,o,t)||(n.dV.logger.debug("Cannot shift segments to EOB: would exceed timestamp limits for ".concat(e)),r=!1)}})),r){this.dV.logger.debug("Aligning segments with EOB by shifting ".concat(i," seconds"));var o={};t.forAll((function(e,t){var n=t.timescale,r=i*n;t.updateAsContinuous(t.truncatedBaseMediaDecodeTime,t.truncatedPresentationTimeOffset+r);var a=t.originalPresentationTimeOffset-t.truncatedPresentationTimeOffset;o[e]=a/t.timescale})),this.EV(o),e.forEach((function(e){return e.setDirty(!0)}))}else this.dV.logger.debug("Cannot align segments with end of buffer: would exceed timestamp limits")},e.prototype.JV=function(e,t,n){return 0===t.length||(t.keys.every((function(e){return(t.get(e)||[]).length>0}))?(this.DV(t),this.FV(e,t),n&&this.IV(e,t),!0):(this.dV.logger.debug("Could not handle BaseMediaDecodeTime overflow: at least one buffer is empty"),!1))},e.prototype.KV=function(e){var t;if(e.isBaseMediaDecodeTimeLimitExceeded)return!0;var n=(0,b.getLargestPrecedingSegmentTimeInfo)(null!==(t=this.fV.get(e.mimeType))&&void 0!==t?t:[],e.originalPlaybackTime);return!!n&&isFinite(n.truncatedBaseMediaDecodeTime)&&n.truncatedBaseMediaDecodeTime!==n.originalBaseMediaDecodeTime},e.prototype.LV=function(e,t,n){var i,r=e.duration,o=e.timescale,a=e.mimeType,s=this.fV.keys.find((function(e){return e!==a}));if(!s)return!1;var u=null===(i=this.fV.get(s))||void 0===i?void 0:i.slice(-1)[0];if(!u)return!1;var c=(t+n)/o,f={start:c,end:c+r},d=u.playbackTime+u.duration,l={start:d,end:d+u.duration},m=Math.max(f.start,l.start);return!(Math.min(f.end,l.end)-m<=r/2)&&l.end*u.timescale-u.presentationTimeOffset>this.maxSafeBaseMediaDecodeTime},e.prototype.MV=function(e,t,n,i){var r=this,o=n.duration,a=n.timescale;if(e+o*a>this.maxSafeBaseMediaDecodeTime)return this.dV.logger.debug("Detected BMDT overflow for ".concat(n.mimeType," segment")),!1;if(this.LV(n,e,t))return this.dV.logger.debug("Triggering early BMDT overflow for ".concat(n.mimeType," segment")),!1;var s=t/a,u=e/a+o,c=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=[];return e.forEach((function(e){e.forAll((function(e,t){n.includes(t.timescale)||n.push(t.timescale)}))})),n}(i,this.fV);return c.every((function(e){return r.NV(s,u,e)}))},e.prototype.NV=function(e,t,n){return t*n+e*n<=this.maxSafeBaseMediaDecodeTime},e.prototype.OV=function(e){return Math.abs(e)>this.maxSafePresentationTimeOffset},e.prototype.PV=function(e){if(!(0,p.isTizen2017)())return!1;var t=e.originalPlaybackTime,n=e.duration,i=e.mimeType,r=t+n>(0,g.toSeconds)(this.maxSafeBaseMediaDecodeTime);return m.MimeTypeHelper.isAudio(i)&&r},e.prototype.QV=function(e,t){if(this.dV.settings.FORCE_BASE_MEDIA_DECODE_TIME_REWRITE)return!0;var n=e/t.timescale;return!!this.OV(n)||this.PV(t)},e.prototype.RV=function(e,t,n){var i=e.baseMediaDecodeTime,r=e.presentationTimeOffset,o=e.foundMatchingPreviousSegment,a=!this.MV(i,r,t,n);return o?a:a||this.QV(r,t)},e.prototype.SV=function(e){var t=this,n=new f.ArrayMap,i=new f.ArrayMap;return e.keys.forEach((function(r){var o;(0,y.ensureMimeTypeInMap)(n,r),(0,y.ensureMimeTypeInMap)(i,r),(0,y.ensureMimeTypeInMap)(t.fV,r);var a=null!==(o=t.fV.get(r))&&void 0!==o?o:[],s=a.length?a:t.fV.getAllValues();(e.get(r)||[]).forEach((function(r){var o=(0,b.findOverflowDataForSegmentInMap)(r,s,t.dV.settings.GAP_TOLERANCE,t.dV.logger);if(t.RV(o,r,e))t.dV.logger.debug("Segment added to discontinuous time info map.",r.segmentUrl,r.mimeType),r.updateAsDiscontinuous(),(0,y.addSegmentTimeInfoToMap)(i,r.mimeType,r);else{var a=o.baseMediaDecodeTime,u=o.presentationTimeOffset;r.updateAsContinuous(a,u),(0,y.addSegmentTimeInfoToMap)(n,r.mimeType,r)}}))})),{discontinuousSegmentTimeInfoMap:i,continuousSegmentTimeInfoMap:n}},e.prototype.TV=function(e,t,n){var i,r=this.SV(t),o=r.discontinuousSegmentTimeInfoMap,a=r.continuousSegmentTimeInfoMap;if(this.yV(e,a),this.JV(e,o,n))return!0;var s=(0,M.maybeSwitchOverASegmentToDiscontinuous)({continuousSegmentTimeInfoMap:a,discontinuousSegmentTimeInfoMap:o});if(!s){var u=this.SV(this.fV);s=(0,M.maybeSwitchOverASegmentToDiscontinuous)({continuousSegmentTimeInfoMap:u.continuousSegmentTimeInfoMap,discontinuousSegmentTimeInfoMap:o}),this.dV.logger.debug("Did not find any matching segment time info in current map, retried with existing ones.",s)}return!!s&&(this.dV.logger.debug("Moved ".concat(s.mimeType," segment from continued to discontinued. Trying to process discontinued infos again."),{switchedSegmentUrl:s.segmentUrl,matchingSegmentUrl:null===(i=s.getMatchingSegment(e))||void 0===i?void 0:i.getUrl()}),this.JV(e,o,n))},e.prototype.UV=function(e){var t=this;e.forAll((function(e,n){var i;(null===(i=t.fV.get(e))||void 0===i?void 0:i.find(n.equals))||(0,y.addSegmentTimeInfoToMap)(t.fV,n.mimeType,n);var r=t.gV.get(n.mimeType);r&&r.resolve(0)}))},e.prototype.VV=function(e){return e.every((function(e){return m.MimeTypeHelper.isMP4(e.getMimeType())}))},e.prototype.WV=function(){this.maxSafeBaseMediaDecodeTime=1/0,this.maxSafePresentationTimeOffset=1/0},e.prototype.XV=function(){return this.maxSafeBaseMediaDecodeTime!==1/0||this.maxSafePresentationTimeOffset!==1/0},e.prototype.rewriteTimeStampsIfNecessary=function(e){var t;!this.VV(e)&&this.XV()&&(this.dV.logger.debug("Disabling BMDT rewriting due to unsupported container format"),this.WV());var n=this.YV(),i=e.map(V.getSectionId).reduce(S,[]).some((function(e){return!n.includes(e)})),r=function(e){return e.reduce((function(e,t){return e.includes(t.getMimeType())||e.push(t.getMimeType()),e}),[])}(e),o=this.fV.keys.every((function(e){return r.includes(e)}));if(i&&!o)return this.dV.logger.debug("Cannot check for rewriting necessity - not all buffers have data yet"),!1;var a=this.vV(e),s=a[0],u=a[1],c=a[2];if(s)return this.TV(e,c,u);if(i&&u)return this.ZV(e,c),!0;for(var f=0,d=c.getAllValues();f<d.length;f++){var l=d[f],m=l.mimeType,p=null!==(t=this.fV.get(m))&&void 0!==t?t:[],g=(0,b.findPrecedingSegmentTimeInfo)(p,l,this.dV.settings.GAP_TOLERANCE);(null==g?void 0:g.isBaseMediaDecodeTimeLimitExceeded)&&!l.isBaseMediaDecodeTimeLimitExceeded&&(l.updateAsDiscontinuous(),l.updateAsContinuous(l.originalBaseMediaDecodeTime,g.truncatedPresentationTimeOffset))}return this.UV(c),!0},e.prototype.YV=function(){return this.fV.transform((function(e){return e.map((function(e){return e.sectionId}))})).flatMap((function(e){return e})).reduce(S,[])},e.prototype.ZV=function(e,t){var n={},i=this.HV(t);this.dV.logger.debug("Trying to handle PTO change, required shift: ".concat(i,"s")),t.forAll((function(e,t){var r=-i*t.timescale,o=r/t.timescale;t.isBaseMediaDecodeTimeLimitExceeded=!0,t.updateAsContinuous(t.originalBaseMediaDecodeTime,t.originalPresentationTimeOffset-r),n[t.mimeType]=o})),this.EV(n),this.UV(t),e.forEach((function(e){return e.setDirty(!0)}))},e.prototype.signalBufferRemoval=function(e,t,n){var i;if(this.fV.has(e)){var r=o.BufferRangeHelper.mergeRanges(t,this.dV.settings.GAP_TOLERANCE),a=this.fV.get(e)||[],s=a.filter((function(e){return e.isPlaybackRangeOverlapping(r)}));if(0===s.length&&this.EV(((i={})[e]=0,i)),this.aV(a,r,n)){var u=a[0];this.dV.logger.debug("Keeping reference BMDT segment info for mime type ".concat(e," after buffer clearing"),{segmentUrl:u.segmentUrl,sectionId:u.sectionId}),u.markAsReferenceSegment(),s.push(u)}this.fV.set(e,s)}},e.prototype.aV=function(e,t,n){var i=this.bV();if((0,l.isSwitchingBufferBlocks)(i)||0!==t.length||0===e.length)return!1;var r=this.dV.store.getState(),o=!!(null==r?void 0:r.player)&&(0,s.getIsSeekingOrTimeshifting)(r.player),u=this.dV.serviceManager.get(a.ServiceName.ManifestService,this.dV.sourceContext.sourceIdentifier),c=this.mapToExternalTime(n),f=null==u?void 0:u.getPeriodIdForTime(c);return!o&&e[0].periodId===f},e.prototype.mapToExternalTime=function(e,t){var n=this;void 0===t&&(t=!1);var i=this.fV.getAllValues(),r=i.find((function(t){var i=t.playbackRange.start-n.dV.settings.GAP_TOLERANCE,r=t.playbackRange.end+n.dV.settings.GAP_TOLERANCE;return!t.isReferenceSegment&&e>=i&&e<=r}))||(t?i[0]:void 0);return r&&(this.iV=r.originalPlaybackTime-r.playbackTime),this.mapToCachedExternalTime(e)},e.prototype.mapToCachedExternalTime=function(e){return void 0!==this.iV?Math.max(this.iV+e,0):(this.dV.logger.debug("Couldn't map internal time ".concat(e," to external time")),e)},e.prototype.mapToInternalTime=function(e,t,n){var i=this;void 0===t&&(t=!1);var r=this.fV.getAllValues().filter((function(e){return void 0===n||n===e.mimeType})),o=r.find((function(t){var n=t.originalPlaybackRange.start-i.dV.settings.GAP_TOLERANCE,r=t.originalPlaybackRange.end+i.dV.settings.GAP_TOLERANCE;return e>=n&&e<=r}))||(t?r[0]:void 0);return o?Math.max(o.playbackTime+(e-o.originalPlaybackTime),0):e},e.prototype.mapToExternalTimeRange=function(e){if(null!=e)return{start:this.mapToExternalTime(e.start),end:this.mapToExternalTime(e.end)}},e.prototype.mapToExternalTimeRanges=function(e){var t=this;return e.map((function(e){return t.mapToExternalTimeRange(e)})).filter((function(e){return void 0!==e}))},e.prototype.mapToExternalTimeRangesMap=function(e){var t=this;return null==e?null:Object.keys(e).reduce((function(n,i){return n[i]=t.mapToExternalTimeRanges(e[i]),n}),{})},e.prototype.getSegmentTimeRanges=function(e,t){var n=this,i=[];return e.forEach((function(e){var r=n.fV.get(t).find((function(t){return t.isSegmentMatching(e)}));r&&i.push(r.playbackRange)})),i},e.prototype.getCorrectTimeStampOffset=function(e,t){var n=this.gV.get(e);return n||(n=new d.Deferred,this.gV.set(e,n)),n.promise.then((function(e){return t+e}))},e.prototype.dispose=function(){var e,t,n,i;this.fV.clear(),this.qV(),null===(e=this.dV.videoElement)||void 0===e||e.removeEventListener(h.MediaElementEvent.currenttimenotadvancing,this.nV),null===(t=this.dV.videoElement)||void 0===t||t.removeEventListener(h.MediaElementEvent.waiting,this.nV),null===(n=this.dV.videoElement)||void 0===n||n.removeEventListener(h.MediaElementEvent.stalled,this.nV),null===(i=this.dV.videoElement)||void 0===i||i.removeEventListener(h.MediaElementEvent.timeupdate,this.mV)},e.prototype.bV=function(){return this.dV.serviceManager.get(a.ServiceName.SourceStoreService,this.dV.sourceContext.sourceIdentifier)},e}();t.BaseMediaDecodeTimeHandler=O;var P=Math.log(2);function D(e){return Math.ceil(Math.log(e+1)/P)}function S(e,t){return e.includes(t)||e.push(t),e}},44885:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.addSegmentTimeInfoToMap=void 0,t.ensureMimeTypeInMap=function(e,t){e.get(t)||e.addAll(t,[])},t.addSegmentTimeInfoToMap=function(e,t,n){(function(e,t,n){var i;return null===(i=e.get(t))||void 0===i?void 0:i.find((function(e){return e.segmentUrl===(null==n?void 0:n.segmentUrl)&&e.equals(n)}))})(e,t,n)||e.add(t,n)}},73849:function(e,t){function n(e){return Math.floor(e.originalBaseMediaDecodeTime-e.baseMediaDecodeTime)}function i(e){return Math.floor(e.originalPresentationTimeOffset-e.presentationTimeOffset)}function r(e,t,n){return e.find((function(e){var i=e.originalPlaybackRange.end;return t.originalPlaybackRange.start>=i-n&&t.originalPlaybackRange.start<=i+n}))}function o(e,t){return e.reduce((function(e,n){var i=n.originalPlaybackTime,r=e?e.originalPlaybackTime:-1/0;return i<t&&i>r?n:e}),void 0)}Object.defineProperty(t,"__esModule",{value:!0}),t.findOverflowDataForSegmentInMap=function(e,t,a,s){var u=1/0,c=1/0,f=r(t,e,a)||o(t,e.originalPlaybackTime),d=f?e.timescale/f.timescale:1;1!==d&&s.debug("Detected a timescale change: ".concat(null==f?void 0:f.timescale," -> ").concat(e.timescale));var l=f&&e.originalPresentationTimeOffset===f.originalPresentationTimeOffset*d;return l&&(u=e.originalBaseMediaDecodeTime-Math.round(n(f)*d),c=e.originalPresentationTimeOffset-Math.round(i(f)*d)),{baseMediaDecodeTime:u,presentationTimeOffset:c,foundMatchingPreviousSegment:Boolean(l)}},t.getBmdtOffset=n,t.getPtoOffset=i,t.findPrecedingSegmentTimeInfo=r,t.getLargestPrecedingSegmentTimeInfo=o},8301:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.findContinuousSegmentToMove=t.maybeSwitchOverASegmentToDiscontinuous=void 0;var i=n(44885);t.maybeSwitchOverASegmentToDiscontinuous=function(e){var n=(0,t.findContinuousSegmentToMove)(e);return n&&(e.continuousSegmentTimeInfoMap.deleteValue(n.mimeType,n),n.updateAsDiscontinuous(),(0,i.addSegmentTimeInfoToMap)(e.discontinuousSegmentTimeInfoMap,n.mimeType,n)),n},t.findContinuousSegmentToMove=function(e){var t=e.continuousSegmentTimeInfoMap.keys;if(2!==t.length)return null;if(t.every((function(t){return e.continuousSegmentTimeInfoMap.get(t).length>0})))return null;for(var n=0,i=t;n<i.length;n++){var r=i[n];if(e.discontinuousSegmentTimeInfoMap.has(r)&&!((e.discontinuousSegmentTimeInfoMap.get(r)||[]).length>0)){var o=e.continuousSegmentTimeInfoMap.get(r)||[];if(o.length)return o[0]}}return null}},48558:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTimeInformation=void 0,t.getSectionId=o;var i=n(4524),r=function(){function e(e,t){var n,i,r=this;this.equals=function(e){if(e){var t=r.mimeType===e.mimeType,n=r.duration===e.duration,i=r.originalBaseMediaDecodeTime===e.originalBaseMediaDecodeTime,o=r.sectionId===e.sectionId;return t&&n&&i&&o}return!1},this.segmentUrl=e.getUrl(),this.duration=e.getDuration(),this.mimeType=e.getMimeType(),this.timescale=null!==(n=e.getTimescale())&&void 0!==n?n:1,this.originalPlaybackTime=e.getPlaybackTime(),this.Bbb=null===(i=e.getSegmentInfo())||void 0===i?void 0:i.byteRange,this.originalBaseMediaDecodeTime=e.getBaseMediaDecodeTime(),this.originalPresentationTimeOffset=e.getPresentationTimeOffset()*this.timescale,this.isBaseMediaDecodeTimeLimitExceeded=this.originalBaseMediaDecodeTime+this.duration*this.timescale>t,this.periodId=e.getPeriodId(),this.Abb=!1,this.sectionId=o(e),this.truncatedBaseMediaDecodeTime=1/0,this.truncatedPresentationTimeOffset=1/0,this.truncatedPlaybackTime=1/0}return Object.defineProperty(e.prototype,"isReferenceSegment",{get:function(){return this.Abb},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playbackTime",{get:function(){return this.isBaseMediaDecodeTimeLimitExceeded&&this.truncatedPlaybackTime!==1/0?this.truncatedPlaybackTime:this.originalPlaybackTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseMediaDecodeTime",{get:function(){return this.isBaseMediaDecodeTimeLimitExceeded&&this.truncatedBaseMediaDecodeTime!==1/0?this.truncatedBaseMediaDecodeTime:this.originalBaseMediaDecodeTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"presentationTimeOffset",{get:function(){return this.isBaseMediaDecodeTimeLimitExceeded&&this.truncatedPresentationTimeOffset!==1/0?this.truncatedPresentationTimeOffset:this.originalPresentationTimeOffset},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playbackRange",{get:function(){return{start:this.playbackTime,end:this.playbackTime+this.duration}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"originalPlaybackRange",{get:function(){return{start:this.originalPlaybackTime,end:this.originalPlaybackTime+this.duration}},enumerable:!1,configurable:!0}),e.prototype.getMatchingSegment=function(e){var t=this;return e.find((function(e){return t.isSegmentMatching(e)}))},e.prototype.isSegmentMatching=function(e){var t,n,i,r=e.getUrl()===this.segmentUrl,o=e.getPlaybackTime()===this.originalPlaybackTime,a=null===(t=e.getSegmentInfo())||void 0===t?void 0:t.byteRange,s=(null==a?void 0:a.start)===(null===(n=this.Bbb)||void 0===n?void 0:n.start),u=(null==a?void 0:a.end)===(null===(i=this.Bbb)||void 0===i?void 0:i.end),c=s&&u,f=e.getMimeType()===this.mimeType;return r&&o&&c&&f},e.prototype.updateAsDiscontinuous=function(){this.isBaseMediaDecodeTimeLimitExceeded=!0},e.prototype.updateAsContinuous=function(e,t){this.truncatedBaseMediaDecodeTime=e,this.truncatedPresentationTimeOffset=t,this.truncatedPlaybackTime=(e-t)/this.timescale},e.prototype.markAsReferenceSegment=function(){this.Abb=!0},e.prototype.isPlaybackRangeOverlapping=function(e){var t=this.playbackRange,n={buffered:e},r=i.BufferRangeHelper.isInBufferedRange(n,t.start),o=i.BufferRangeHelper.isInBufferedRange(n,t.end),a=i.BufferRangeHelper.getCommonBufferedRanges({buffered:e,inSegment:[t]}).length>0;return r||o||a},e}();function o(e){var t,n,i;return null!==(i=null===(n=null===(t=e.getSegmentInfo())||void 0===t?void 0:t.discontinuitySequenceNumber)||void 0===n?void 0:n.toString())&&void 0!==i?i:e.getPeriodId()}t.SegmentTimeInformation=r},21651:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTimeInformationArrayMap=void 0;var r=function(e){function t(){return e.call(this,(function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime}))||this}return i(t,e),t.prototype.find=function(e){if(e)return this.get(e.getMimeType()).find((function(t){return t.isSegmentMatching(e)}))},t}(n(61252).SortedArrayMap);t.SegmentTimeInformationArrayMap=r},61252:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SortedArrayMap=void 0;var r=function(e){function t(t){var n=e.call(this)||this;return n.bbb=t,n.cbb=[],n}return i(t,e),t.prototype.getAllValues=function(){return this.cbb},t.prototype.dbb=function(e){return e?e.sort(this.bbb):[]},t.prototype.set=function(t,n){var i=this.dbb(n);return this.ebb(t,i),e.prototype.set.call(this,t,i)},t.prototype.add=function(e,t){var n=t?[t]:[];return this.addAll(e,n),this},t.prototype.addAll=function(e,t){this.ensure(e),this.set(e,[].concat(t||[],this.get(e)))},t.prototype.delete=function(t){return this.fbb(this.get(t)),e.prototype.delete.call(this,t)},t.prototype.deleteValue=function(t,n){return this.fbb([n]),e.prototype.deleteValue.call(this,t,n)},t.prototype.clear=function(){this.cbb=[],e.prototype.clear.call(this)},t.prototype.ebb=function(e,t){void 0===t&&(t=[]);var n=this.get(e);this.fbb(n),this.cbb=this.dbb(this.cbb.concat(t))},t.prototype.fbb=function(e){var t=this;void 0===e&&(e=[]),e.forEach((function(e){var n=t.cbb.indexOf(e);n>-1&&t.cbb.splice(n,1)}))},t}(n(19483).ArrayMap);t.SortedArrayMap=r},1124:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.getTvMseWrapperConstructor=function(){return void 0===r&&(r=f()),r};var r,o=n(3714),a=n(20213),s=n(70850),u=n(88052),c=n(24281),f=function(){return function(e){function t(t,n){var i=e.call(this,t)||this;return i.Dbb={},i.Cbb=n,i}return i(t,e),t.prototype.printDetailedBufferRange=function(e,t){var n;try{n=e.buffered}catch(e){return void this.logger.debug("".concat(t," buffer range: Error accessing buffered ranges"))}if(0!==n.length)for(var i=0;i<n.length;i++){var r=n.start(i),o=n.end(i);this.logger.debug("".concat(t," buffer range [").concat(i,"]: ").concat(this.Cbb.mapToExternalTime(r,!0)," - ").concat(this.Cbb.mapToExternalTime(o,!0)," (").concat(r," - ").concat(o,")"))}else this.logger.debug("".concat(t," buffer range: empty"))},t.prototype.getBufferStartTime=function(){var e=this,t=Object.keys(this.sourceBuffers).map((function(t){return 0===e.sourceBuffers[t].bufferedRanges.length?0:e.Cbb.mapToExternalTime(e.sourceBuffers[t].bufferedRanges[0].start)}));return Math.max.apply(null,t)},t.prototype.updateTimestampOffset=function(t,n){try{e.prototype.updateTimestampOffset.call(this,t,n)}catch(e){this.logger.error("Unable to update timestampOffset",e),e.code===DOMException.INVALID_STATE_ERR&&this.context.eventHandler.dispatchEvent(o.PlayerEvent.Warning,new a.PlayerWarning(a.WarningCode.PLAYBACK_WARNING,"Unable to update timestampOffset (Invalid State error)",e))}},t.prototype.Ebb=function(e,t){this.Dbb[e]||(this.Dbb[e]={currentOffset:this.sourceBuffers[e].buffer.timestampOffset,pendingOffset:t})},t.prototype.queueTimestampOffsetUpdate=function(t,n){var i=this;return this.Ebb(t,n),this.Cbb.getCorrectTimeStampOffset(t,n).then((function(e){return i.Dbb[t].pendingOffset=e})).then((function(){var n=i.Dbb[t].pendingOffset,r=i.Dbb[t].currentOffset;return s.Util.roundValue(r,6)===s.Util.roundValue(n,6)&&i.isMediaSourceOpen()?Promise.resolve():(i.logger.debug("Updating timestamp offset for ".concat(t," to ").concat(n," (uncorrected offset: ").concat(r,")")),i.Dbb[t].currentOffset=n,e.prototype.queueTimestampOffsetUpdate.call(i,t,n).finally((function(){var e,n,r=null===(n=null===(e=i.sourceBuffers[t])||void 0===e?void 0:e.buffer)||void 0===n?void 0:n.timestampOffset;i.Dbb[t].currentOffset=r})))}))},t.prototype.getBufferRangeStart=function(e,t){void 0===t&&(t=0);var n=this.Cbb.getEarliestExternalTimeBufferedRangeIndex(e);return Math.max(t,e.start(n))},t.prototype.preBufferRemoval=function(e,t,n){this.logger.debug("removing buffer for ".concat(e," (from ").concat(this.Cbb.mapToExternalTime(t)," to ").concat(this.Cbb.mapToExternalTime(n),") (").concat(t," to ").concat(n,")"))},t.prototype.getRangePendingRemoval=function(e){return this.sourceBuffers.hasOwnProperty(e)&&this.Cbb.mapToExternalTimeRange(this.sourceBuffers[e].rangePendingRemoval)||void 0},t.prototype.addToBuffer=function(t){var n=this;return(0,c.rewriteUnsupportedBoxes)(t),this.Fbb(t).then((function(){return e.prototype.addToBuffer.call(n,t)}))},t.prototype.Fbb=function(e){var t=e.getMimeType(),n=-e.getPresentationTimeOffset();return e.isDirty()&&!e.isInit()?this.setTimestampOffset(t,n):Promise.resolve()},t}(u.ModuleManager.get(a.ModuleName.RendererMse).MSEWrapper)}},35501:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.getTvRendererConstructor=function(){return void 0===o&&(o=p()),o};var o,a=n(4524),s=n(66790),u=n(34841),c=n(88052),f=n(62756),d=n(84276),l=n(48558),m=n(1124),p=function(){return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.postBufferRemoval=function(e,n,i){t.video&&(t.baseMediaDecodeTimeHandler.signalBufferRemoval(e,t.QU(e),t.video.currentTime),t.logger.debug("successfully removed buffer for ".concat(e," (from ").concat(t.baseMediaDecodeTimeHandler.mapToExternalTime(n)," to ").concat(t.baseMediaDecodeTimeHandler.mapToExternalTime(i),") (").concat(n," to ").concat(i,")")))},t}return i(t,e),t.prototype.init=function(t){this.baseMediaDecodeTimeHandler=new d.BaseMediaDecodeTimeHandler(this.context,this.PU.bind(this),this.getMaxSafeBaseMediaDecodeTime(),this.getMaxSafePresentationTimeOffset()),e.prototype.init.call(this,t),this.OU||(this.OU=new u.Deferred),this.OU.resolve(this.baseMediaDecodeTimeHandler)},t.prototype.getMaxSafeBaseMediaDecodeTime=function(){return 1/0},t.prototype.getMaxSafePresentationTimeOffset=function(){return 1/0},t.prototype.createMSEWrapper=function(){return new((0,m.getTvMseWrapperConstructor)())(this.context,this.baseMediaDecodeTimeHandler)},t.prototype.getCurrentVideoTime=function(){return this.baseMediaDecodeTimeHandler.mapToExternalTime(e.prototype.getCurrentVideoTime.call(this))},t.prototype.getRangesInSourceBuffers=function(){return this.baseMediaDecodeTimeHandler.mapToExternalTimeRangesMap(e.prototype.getRangesInSourceBuffers.call(this))},t.prototype.getBufferedRanges=function(t){return this.baseMediaDecodeTimeHandler.mapToExternalTimeRanges(e.prototype.getBufferedRanges.call(this,t))},t.prototype.getVideoElementBufferedRanges=function(){var t=e.prototype.getVideoElementBufferedRanges.call(this);return this.baseMediaDecodeTimeHandler.mapToExternalTimeRanges(t)},t.prototype.PU=function(e){var t,n,i=this;if(!this.mse)return Promise.reject();var r=null===(t=this.mse)||void 0===t?void 0:t.getBufferedRanges(e),o=null!==(n=null==r?void 0:r.slice(1))&&void 0!==n?n:[];return Promise.all(o.map((function(t){var n;return i.logger.debug("Clearing buffer on rollover for ".concat(e," from ").concat(t.start," to ").concat(t.end)),null===(n=i.mse)||void 0===n?void 0:n.removeFromBuffer(e,t.start-i.settings.GAP_TOLERANCE,t.end+i.settings.GAP_TOLERANCE,i.postBufferRemoval)}))).then((function(){}))},t.prototype.removeData=function(e,t,n,i){if(void 0===i&&(i=!1),!this.mse)return Promise.reject();void 0===t&&void 0===n&&!i&&this.saveCurrentTime(),this.removeDataFromSegmentQueues(e,t,n);var r=void 0!==t?this.baseMediaDecodeTimeHandler.mapToInternalTime(t,!0,e):void 0,o=void 0!==n?this.baseMediaDecodeTimeHandler.mapToInternalTime(n,!0,e):void 0;return this.mse.removeFromBuffer(e,r,o,this.postBufferRemoval)},t.prototype.addSegmentFromQueueToMse=function(t){var n=this,i=this.RU((function(e){return!e.isInit()})),r=Object.keys(this.segmentQueues).every((function(e){var t=n.mse&&n.mse.getBufferedRanges(e).length>0,r=i.some((function(t){return t.getMimeType()===e}));return t||r}));if(0===i.length||!r)return Promise.reject(s.SOURCE_BUFFER_APPEND_STATUS.SUSPENDED);var o=i.reduce((function(e,t){return t.getPlaybackTime()<e.getPlaybackTime()?t:e}),i[0]),a=(0,l.getSectionId)(o),u=this.RU((function(e){return!e.isInit()&&(0,l.getSectionId)(e)===a}));return this.baseMediaDecodeTimeHandler.rewriteTimeStampsIfNecessary(u)?e.prototype.addSegmentFromQueueToMse.call(this,t):Promise.reject(s.SOURCE_BUFFER_APPEND_STATUS.SUSPENDED)},t.prototype.QU=function(e){var t,n;if(null===this.mse||!this.segmentQueues.hasOwnProperty(e))return[];var i=this.RU((function(e){return!e.isInit()})),o=this.baseMediaDecodeTimeHandler.getSegmentTimeRanges(i,e),s=null!==(n=null===(t=this.mse)||void 0===t?void 0:t.getBufferedRanges(e))&&void 0!==n?n:[];return a.BufferRangeHelper.mergeRanges(r(r([],o,!0),s,!0),this.settings.GAP_TOLERANCE)},t.prototype.adjustTimeToNextCommonBufferStart=function(t){var n=e.prototype.adjustTimeToNextCommonBufferStart.call(this,t);return isNaN(n)?NaN:Math.ceil(100*this.baseMediaDecodeTimeHandler.mapToInternalTime(n))/100},t.prototype.seekOnVideoElement=function(e){var t=this;return this.waitingForSeekedPromise=new Promise((function(n,i){if(t.video){t.video.currentTime=e;var r=t.video.currentTime;n(t.getBaseMediaDecodeTimeHandler().then((function(e){return e.mapToExternalTime(r)})))}else i("No video reference")})),this.waitingForSeekedPromise},t.prototype.getBaseMediaDecodeTimeHandler=function(){return this.OU.promise},t.prototype.RU=function(e){var t=this;return void 0===e&&(e=function(){return!0}),Object.keys(this.segmentQueues).flatMap((function(e){return t.segmentQueues[e]})).filter(e)},t.prototype.getEndOfBufferTime=function(){if(this.video&&this.video.buffered&&this.video.buffered.length>0&&this.baseMediaDecodeTimeHandler)return this.baseMediaDecodeTimeHandler.getEndOfBufferTime()},t.prototype.shutdown=function(t){var n=this;return e.prototype.shutdown.call(this,t).then((function(){n.cV()}))},t.prototype.cV=function(){this.OU=new u.Deferred,this.baseMediaDecodeTimeHandler.dispose()},t.prototype.release=function(){return this.cV(),e.prototype.release.call(this)},t}(c.ModuleManager.get(f.ModuleName.RendererMse).MSERenderer)}},24281:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.rewriteUnsupportedBoxes=function(e,t){void 0===t&&(t=o),t.forEach((function(t){var n,i=null===(n=e.getParsedData())||void 0===n?void 0:n.get(t);i&&(0,r.rewriteMp4BoxType)(i,"free")}))};var i=n(15487),r=n(2992),o=function(){var e=["skip"];return((0,i.isTizen2016)()||(0,i.isTizen2017)())&&e.push("moov.trak.edts"),e}()},73868:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.VidaaModuleDefinition=void 0;var i=n(62756),r=n(72858),o=n(34742);t.VidaaModuleDefinition={name:i.ModuleName.Vidaa,module:function(){return{VidaaVideoElementWrapper:o.VidaaVideoElementWrapper,getVidaaMSERendererConstructor:r.getVidaaMSERendererConstructor}},dependencies:[i.ModuleName.RendererMse]},t.default=t.VidaaModuleDefinition},72858:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.getVidaaMSERendererConstructor=function(){return null===o&&(o=function(){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getMaxSafeBaseMediaDecodeTime=function(){return this.context.settings.VIDAA_MAX_SAFE_BMDT},t.prototype.getMaxSafePresentationTimeOffset=function(){return this.context.settings.VIDAA_MAX_SAFE_PTO},t}((0,r.getTvRendererConstructor)())}()),o};var r=n(35501),o=null},34742:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.VidaaVideoElementWrapper=void 0;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.prime=function(){return this.context.logger.log("Not priming video element as this causes issues on VIDAA"),Promise.resolve()},t}(n(79186).VideoElementWrapper);t.VidaaVideoElementWrapper=r}},function(e){return function(){return e(e.s=73868)}()}])}));
|
|
18
18
|
})();
|