bitmovin-player
Version:
The Bitmovin HTML5 Adaptive Streaming Player for MPEG-DASH and HLS
13 lines (12 loc) • 20.4 kB
JavaScript
/****************************************************************************
* Copyright (C) 2019, Bitmovin, Inc., All Rights Reserved
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*
* Bitmovin Player Version 8.16.2
*
****************************************************************************/
(function() {
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.subtitles=t():(e.bitmovin=e.bitmovin||{},e.bitmovin.player=e.bitmovin.player||{},e.bitmovin.player.subtitles=t())}(this,function(){return webpackJsonpbitmovin_player__name_([8],{186:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.build=function(e){return new(function(){function t(){}return t.prototype.add=function(t){e.addSubtitle(t)},t.prototype.remove=function(t){e.removeSubtitle(t)},t.prototype.list=function(){return e.listSubtitles()},t.prototype.enable=function(t,n){void 0===n&&(n=!0),e.enableSubtitle(t,n)},t.prototype.disable=function(t){e.disableSubtitle(t)},t}())},e}();t.PlayerSubtitlesApiFactory=i},187:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(0),o=n(1),a=n(5),s=n(407),l=n(408),u=n(409),d=n(55),c=function(){function e(e){var t=this;this.getTransmuxer=function(){return t.transmuxer},this.onSeek=function(){t.cea608Extractor&&t.cea608Extractor.reset(),t.clearBuffersUntil(t.context.renderer.getDuration())},this.onPeriodSwitched=function(e){t.context.settings.DISABLE_SUBTITLE_PERIOD_SWITCH||(t.context.logger.debug("Switching periods in subtitleService"),Object.keys(t.subtitleHandlers).forEach(function(n){var i=t.subtitleHandlers[n];i.getSubtitleType()===d.SubtitleType.FRAGMENTED&&i.periodId===e.sourcePeriod.periodId&&t.removeSubtitle(n),i.getSubtitleType()===d.SubtitleType.EXTERNAL_FILE&&i.periodId&&i.periodId!==e.targetPeriod.periodId&&t.removeSubtitle(n)}))},this.reset=function(){Object.keys(t.subtitleHandlers).forEach(function(e){return t.subtitleHandlers[e].dispose()}),t.subtitleHandlers={},t.cea608Extractor&&(t.cea608Extractor.dispose(),t.cea608Extractor=null)},this.context=e,this.subtitleHandlers={},this.eventHandler=e.eventHandler,this.manifestService=e.serviceManager.get(a.ServiceName.ManifestService),this.transmuxer=null,this.eventHandler.on(o.PlayerEvent.Seek,this.onSeek),this.eventHandler.on(o.PlayerEvent.TimeShift,this.onSeek),this.eventHandler.on(o.PlayerEvent.SourceUnloaded,this.reset),this.eventHandler.on(o.PlayerEvent.PeriodSwitched,this.onPeriodSwitched)}return e.prototype.setTransmuxer=function(e){this.transmuxer=e},e.prototype.hasSubtitle=function(e){return Boolean(this.subtitleHandlers[e])},e.prototype.enableSubtitle=function(e){return this.subtitleHandlers[e]&&!this.subtitleHandlers[e].isActive()?this.subtitleHandlers[e].activate().then(function(){return!0},function(){return!1}):Promise.resolve(!1)},e.prototype.addExternalSubtitle=function(e,t){if(void 0===t&&(t=null),!e.url)return this.context.logger.warn("Tried to create a subtitle handler for an external subtitle file but no URL was provided"),null;e.id||(e.id=e.url),this.applyLabelFunctionForSubtitle(e);var n=new l.ExternalFileSubtitleHandler(this.context,e,t),i=!1;return this.subtitleHandlers[n.getSubtitle().id]&&(i=this.subtitleHandlers[n.getSubtitle().id].isActive(),this.removeSubtitle(n.getSubtitle().id)),this.subtitleHandlers[n.getSubtitle().id]=n,this.signalNewSubtitle(e),i&&n.activate(),e},e.prototype.applyLabelFunctionForSubtitle=function(e){var t=this.context.sourceContext.source.labeling;this.manifestService.getManifest()._hls?t&&t.hls&&t.hls.subtitles&&"function"==typeof t.hls.subtitles&&(e.label=t.hls.subtitles(e)):t&&t.dash&&t.dash.subtitles&&"function"==typeof t.dash.subtitles&&(e.label=t.dash.subtitles(e))},e.prototype.addFragmentSubtitle=function(e,t){if(!i.ModuleManager.has(r.ModuleName.EngineBitmovin))return this.context.logger.warn("Unable to add fragmented subtitles because MSE Module is missing"),null;var n=this.manifestService.getLangObjectFromAdaptationSet(t,e.mimeType),o={id:n.id,label:n.label,lang:n.lang,isFragmented:!0,kind:n.kind,role:n.role,url:void 0},a=!1;return this.subtitleHandlers[o.id]&&(a=this.subtitleHandlers[o.id].isActive(),this.subtitleHandlers[o.id].dispose()),this.applyLabelFunctionForSubtitle(o),this.subtitleHandlers[o.id]=new u.FragmentedSubtitleHandler(this.context,e,o,this.getTransmuxer,t),this.signalNewSubtitle(o),a&&this.subtitleHandlers[o.id].activate(),o},e.prototype.setupCea608CaptionExtractor=function(e){if(i.ModuleManager.has(r.ModuleName.SubtitlesCEA608)){this.cea608Extractor&&this.cea608Extractor.dispose();var t=i.ModuleManager.get(r.ModuleName.SubtitlesCEA608).Cea608Extractor;return this.cea608Extractor=new t(e),this.cea608Extractor}return this.context.logger.log("CEA Caption parsing is disabled, because the Cea680 module is not loaded"),null},e.prototype.extractCaptionsFromSegment=function(e,t){var n=this;if(this.cea608Extractor)return this.cea608Extractor.extract(e).then(function(i){var r=i.map(function(e){return{start:e.startTime-t,end:e.endTime-t,text:e.text,channel:e.channel,position:e.position}});r.length>0&&(n.context.logger.insane("Extracted Closed Captions from fMP4: "+JSON.stringify(r)),n.handleClosedCaptions(r,e.getPeriodId()))})["catch"](function(e){n.context.logger.debug("Error parsing CEA-608 Captions from fMP4: "+e)})},e.prototype.handleClosedCaptions=function(e,t){if(e&&Array.isArray(e)&&0!==e.length)for(var n=this.manifestService.getClosedCaptionLabels(t),i=function(i){var o={id:e[i].channel,kind:"captions",lang:"unknown",label:"Captions ("+e[i].channel+")",url:void 0},a=n.find(function(e){return e.id===o.id});a&&(o.label=a.label),r.applyLabelFunctionForSubtitle(o);var l=r.subtitleHandlers[o.id];l||(r.subtitleHandlers[o.id]=new s.Cea608Handler(r.context,o),r.signalNewSubtitle(o)),r.subtitleHandlers[o.id].addCaption(e[i],t)},r=this,o=0;o<e.length;o++)i(o)},e.prototype.signalNewSubtitle=function(e){this.eventHandler.dispatchEvent(o.PlayerEvent.SubtitleAdded,{subtitle:e})},e.prototype.disableSubtitle=function(e){return this.subtitleHandlers[e]?this.subtitleHandlers[e].deactivate().then(function(){return!0},function(){return!1}):Promise.resolve(!1)},e.prototype.removeSubtitle=function(e){if(this.subtitleHandlers[e]){var t=this.subtitleHandlers[e].getSubtitle();this.subtitleHandlers[e].dispose(),delete this.subtitleHandlers[e],this.eventHandler&&this.eventHandler.dispatchEvent(o.PlayerEvent.SubtitleRemoved,{subtitle:t})}},e.prototype.getActiveSubtitles=function(){var e=this;return Object.keys(this.subtitleHandlers).filter(function(t){return e.subtitleHandlers[t].isActive()}).map(function(t){return e.subtitleHandlers[t].getSubtitle()})},e.prototype.getAvailableSubtitles=function(e){var t=this;return Object.keys(this.subtitleHandlers).filter(function(n){var i=t.subtitleHandlers[n].periodId;return!i||e===i}).map(function(e){return t.subtitleHandlers[e].getSubtitle()})},e.prototype.clearBuffersUntil=function(e){var t=this;Object.keys(this.subtitleHandlers).forEach(function(n){return t.subtitleHandlers[n].clearBuffersUntil(e)})},e.prototype.dispose=function(){this.reset(),this.eventHandler.off(o.PlayerEvent.Seek,this.onSeek),this.eventHandler.off(o.PlayerEvent.TimeShift,this.onSeek),this.eventHandler.off(o.PlayerEvent.SourceUnloaded,this.reset),this.eventHandler.off(o.PlayerEvent.PeriodSwitched,this.onPeriodSwitched),this.subtitleHandlers={},this.eventHandler=null},e}();t.SubtitleService=c},402:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=n(186),o=n(62),a=n(187);t.SubtitleModuleDefinition={name:i.ModuleName.Subtitles,module:{SubtitleService:a.SubtitleService,SubtitleParserFactory:o.SubtitleParserFactory,PlayerSubtitlesApiFactory:r.PlayerSubtitlesApiFactory}},t["default"]=t.SubtitleModuleDefinition},403:function(e,t,n){"use strict";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)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){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});var r=n(18),o=n(16),a=function(e){function t(t){var n=e.call(this,o.WarningCode.MODULE_MISSING)||this;return n.message=o.WarningCode[n.code]+t,n}return i(t,e),t}(r.PlayerWarning);t.ModuleMissingWarning=a},404:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=n(74),o=function(){function e(){}return e.parseSubtitles=function(e){var t=r.TextSegmentAnalyzer.detectEncoding(e.getData());return[{start:e.getPlaybackTime(),end:e.getPlaybackTime()+e.getDuration(),text:i.ArrayHelper.convertBufferSourceToUTF8(e.getData(),t)}]},e}();t.PlainTextSubtitleParser=o},407:function(e,t,n){"use strict";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)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){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});var r=n(81),o=n(55),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.addCaption=function(e,t){e&&(this.fireOnCueParsedEvents([e],t),this.timeline.addCues([e],0))},t.prototype.getSubtitleType=function(){return o.SubtitleType.IN_STREAM},t}(r.AbstractSubtitleHandler);t.Cea608Handler=a},408:function(e,t,n){"use strict";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)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){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});var r=n(1),o=n(8),a=n(18),s=n(16),l=n(15),u=n(62),d=n(81),c=n(55),p=function(e){function t(n,i,r){var a=e.call(this,n,i,r&&r._internalId.periodId)||this;return a.onFileLoaded=function(e){if(a.timeline.removeCues(),e.body){a.isFileLoaded=!0;var t=a.parse(e.body.trim());a.fireOnCueParsedEvents(t,null),a.timeline.addCues(t)}},r&&(i.id=r.Representation[0]._id),a.externalFileUrl=t.enforceHTTPSForSecureOrigins(i.url.trim()),a.isFileLoaded=!1,a.subtitleLoader=new l.DefaultContentLoader(a.context,{maxRetries:a.context.settings.MAX_RETRIES,retryDelay:a.context.settings.RETRY_DELAY,requestType:o.HttpRequestType.MEDIA_SUBTITLES}),a}return i(t,e),t.prototype.activate=function(){var t=this;return e.prototype.activate.call(this),this.context.logger.debug("loading "+this.externalFileUrl),Promise.resolve().then(function(){return t.loadPromise?t.loadPromise:t.isFileLoaded?void 0:(t.loadPromise=t.subtitleLoader.load(t.externalFileUrl).then(t.onFileLoaded)["catch"](function(e){throw t.context.eventHandler.dispatchEvent(r.PlayerEvent.Warning,new a.PlayerWarning(s.WarningCode.NETWORK_COULD_NOT_LOAD_SUBTITLE)),t.context.logger.debug("Could not load subtitles/captions, got HTTP status code "+e.status),t.deactivate(),t.loadPromise=null,"loading failed"}),t.loadPromise)})},t.prototype.parse=function(e){var t=u.SubtitleParserFactory.createInstance(this.context,e);return t.parse(e)},t.enforceHTTPSForSecureOrigins=function(e){var t=new RegExp("^(?:[a-z]+:)?//","i");return"https:"===location.protocol?e.replace(t,"//"):e},t.prototype.getSubtitleType=function(){return c.SubtitleType.EXTERNAL_FILE},t.prototype.clearBuffersUntil=function(){},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.subtitleLoader.dispose()},t}(d.AbstractSubtitleHandler);t.ExternalFileSubtitleHandler=p},409:function(e,t,n){"use strict";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)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){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});var r=n(0),o=n(1),a=n(5),s=n(6),l=n(74),u=n(404),d=n(62),c=n(2),p=n(81),f=n(55),h=function(e){function t(t,n,i,a,d){var p=e.call(this,t,i,n.periodId)||this;p.onSegmentDataAvailable=function(e){var t=Promise.resolve();return p.isTransmuxingRequired&&p.getTransmuxer()&&(t=p.getTransmuxer().initialized()),t.then(function(){p.updateBufferLevel(e);var t=e.getData(),n=e.getMetadata(),i="wvtt"===e.getCodec()&&l.TextSegmentAnalyzer.isPlainTextPayload(t);i&&(n.subtitles=u.PlainTextSubtitleParser.parseSubtitles(e));var r=-p.segmentController.getMPDHandler().getTimestampOffset();if(p.getTransmuxer&&p.getTransmuxer()&&(r+=p.getTransmuxer().getTimestampMappingOffset()),Array.isArray(n.subtitles)){var o="stpp"===e.getCodec()||i;p.addCues(e,n.subtitles,o,r)}})},p.onTimeUpdate=function(e){e&&(p.segmentBufferRange.start=e.time),p.segmentBufferRange.end-p.segmentBufferRange.start>=p.bufferSettings.getForwardTargetLevel()||p.segmentController.hasNext()&&(p.segmentController.getMPDHandler().resolvePendingSegmentInfoRequests(),p.segmentController.getNext())},p.onSeek=function(e){p.isActive()&&p.segmentController.seekTo(e.seekTarget||e.target)},p.onMpdUpdated=function(){p.segmentController.updateMpd()},p.eventHandler=t.eventHandler,p.getTransmuxer=a,p.isTransmuxingRequired=n.isTransmuxingRequired,p.bufferSettings=t.bufferSettings,p.segmentBufferRange={start:0,end:0},p.adaptationSet=d;var f=c.ModuleManager.get(r.ModuleName.EngineBitmovin).SegmentController;return p.segmentController=new f(t,p.onSegmentDataAvailable,n.mimeType,n.codec,n.isTransmuxingRequired,n.manifestLoader,n.periodId),p.segmentController.setCurrentLangObj(i),p.eventHandler.on(o.PlayerEvent.Seek,p.onSeek),p.eventHandler.on(o.PlayerEvent.TimeShift,p.onSeek),p.eventHandler.on(s.InternalEvent.MPDUpdated,p.onMpdUpdated,!0),p}return i(t,e),t.prototype.updateBufferLevel=function(e){if(!e.isInit()){var t=this.getBufferdRange().end;e.getPlaybackTime()&&(t=e.getPlaybackTime()),e.getDuration()&&(this.segmentBufferRange.end=t+e.getDuration())}},t.prototype.addCues=function(e,n,i,r){if(n){var o=i?this.parseCues(n,r):n;o=t.ensureCueInSegmentRange(o,e.getPlaybackTime(),e.getDuration(),r),this.fireOnCueParsedEvents(o,this.periodId),this.timeline.addCues(o)}},t.prototype.parseCues=function(e,t){var n=this;return e.flatMap(function(e){return n.parse(e.text,t)})},t.ensureCueInSegmentRange=function(e,t,n,i){if(!t||t<0||!n)return e;if(e.length>0){var r=e.every(function(e){return e.start<n});r&&e.forEach(function(e){e.start+=t-i,e.end+=t-i})}return e},t.prototype.parse=function(e,t){var n=d.SubtitleParserFactory.createInstance(this.context,e);return t?n.parse(e,t):n.parse(e)},t.prototype.activate=function(){var t=this;return e.prototype.activate.call(this),this.prepareActivation().then(function(){var e=t.segmentController.getMPDHandler();isNaN(e.getTimestampOffset())&&e.setTimestampOffset(0);var n=t.context.serviceManager.get(a.ServiceName.PlayerStateService);t.segmentController.seekTo(n.currentTime),t.segmentController.getNext(),t.eventHandler.on(o.PlayerEvent.TimeChanged,t.onTimeUpdate)})},t.prototype.prepareActivation=function(){var e=this;if(this.isTransmuxingRequired){var t=null,n=this.context.serviceManager.get(a.ServiceName.ManifestService),i=this.segmentController.getManifestLoader();if(n.isLive())t=i.addSubtitleVariantUpdater(this.adaptationSet.Representation[0]);else{var r=this.adaptationSet.Representation[0].SegmentList[0];0===r.SegmentURL.length&&(t=i.updateRepresentation(this.adaptationSet.Representation[0]))}if(t)return t.then(function(){return new Promise(function(t){e.onResolvePlaylistUpdate=t,e.context.eventHandler.one(s.InternalEvent.MPDUpdated,e.onResolvePlaylistUpdate,!0)})})}return Promise.resolve()},t.prototype.deactivate=function(){if(this.timeline.removeCues(),this.segmentBufferRange={start:0,end:0},this.eventHandler.off(o.PlayerEvent.TimeChanged,this.onTimeUpdate),this.isTransmuxingRequired){var t=this.context.serviceManager.get(a.ServiceName.ManifestService);if(t.isLive()){var n=this.segmentController.getManifestLoader();n.removeSubtitleVariantUpdater(this.adaptationSet.Representation[0])}}return e.prototype.deactivate.call(this)},t.prototype.getSubtitleType=function(){return f.SubtitleType.FRAGMENTED},t.prototype.getBufferdRange=function(){return this.segmentBufferRange},t.prototype.clearBuffersUntil=function(t){e.prototype.clearBuffersUntil.call(this,t),this.segmentBufferRange.end<=t?(this.segmentBufferRange.start=0,this.segmentBufferRange.end=0):this.segmentBufferRange.start<t&&(this.segmentBufferRange.start=t)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.eventHandler.off(o.PlayerEvent.Seek,this.onSeek),this.eventHandler.off(o.PlayerEvent.TimeShift,this.onSeek),this.eventHandler.off(s.InternalEvent.MPDUpdated,this.onMpdUpdated),this.eventHandler.off(s.InternalEvent.MPDUpdated,this.onResolvePlaylistUpdate),this.segmentController.dispose()},t}(p.AbstractSubtitleHandler);t.FragmentedSubtitleHandler=h},55:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i;!function(e){e[e.EXTERNAL_FILE=0]="EXTERNAL_FILE",e[e.FRAGMENTED=1]="FRAGMENTED",e[e.IN_STREAM=2]="IN_STREAM"}(i=t.SubtitleType||(t.SubtitleType={}))},62:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(0),o=n(1),a=n(403),s=function(){function e(){}return e.createInstance=function(e,t){var n;if(t.indexOf("<?")>-1||t.indexOf("<tt")>-1)if(i.ModuleManager.has(r.ModuleName.SubtitlesTTML)){var s=i.ModuleManager.get(r.ModuleName.SubtitlesTTML).TTMLParser;n=new s(e)}else e.eventHandler.dispatchEvent(o.PlayerEvent.Warning,new a.ModuleMissingWarning(r.ModuleName.SubtitlesTTML));else if(i.ModuleManager.has(r.ModuleName.SubtitlesWebVTT)){var l=i.ModuleManager.get(r.ModuleName.SubtitlesWebVTT);n=new l.WebVTTParser(e)}else e.eventHandler.dispatchEvent(o.PlayerEvent.Warning,new a.ModuleMissingWarning(r.ModuleName.SubtitlesWebVTT));return n},e}();t.SubtitleParserFactory=s},81:function(e,t,n){"use strict";var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(69),a=function(){function e(t,n,i){var a=this;void 0===i&&(i=null),this.onCueEnter=function(t){a.context.eventHandler.dispatchEvent(r.PlayerEvent.CueEnter,e.prepareCueEvent(t,a.getSubtitle().id))},this.onCueExit=function(t){a.context.eventHandler&&a.context.eventHandler.dispatchEvent(r.PlayerEvent.CueExit,e.prepareCueEvent(t,a.getSubtitle().id))},this.context=t,this.subtitle=n,this.subtitle.enabled=this.subtitle.enabled||!1,this.timeline=new o.Timeline(t,{onCueEnter:this.onCueEnter,onCueExit:this.onCueExit}),this.timeline.stopListening(),this.periodId=i}return e.prototype.fireOnCueParsedEvents=function(e,t){var n=this;e&&this.context.eventHandler&&e.forEach(function(e){n.context.eventHandler.dispatchEvent(r.PlayerEvent.CueParsed,i({subtitleId:n.getSubtitle().id},e,{periodId:t}))})},e.prototype.isActive=function(){return this.subtitle.enabled},e.prototype.activate=function(){return this.subtitle.enabled=!0,this.timeline.startListening(),this.timeline.show(),Promise.resolve()},e.prototype.deactivate=function(){return this.subtitle.enabled=!1,this.timeline.stopListening(),this.timeline.hide(),Promise.resolve()},e.prototype.getSubtitle=function(){return this.subtitle},e.prototype.clearBuffersUntil=function(e){this.timeline.removeCuesUntil(e)},e.prototype.dispose=function(){this.deactivate(),this.timeline.dispose()},e.prepareCueEvent=function(e,t){var n={subtitleId:t,text:e.content.text,start:e.start,end:e.end};return e.content.position&&(n.position=e.content.position),e.content.image&&(n.image=e.content.image),n},e}();t.AbstractSubtitleHandler=a}},[402])});
})();