diff --git a/src/master-playlist-controller.js b/src/master-playlist-controller.js index 2ce1ae786..1280e76c7 100644 --- a/src/master-playlist-controller.js +++ b/src/master-playlist-controller.js @@ -274,8 +274,9 @@ export class MasterPlaylistController extends videojs.EventTarget { loaderType: 'audio' })); - segmentLoaderOptions.loaderType = 'vtt'; - this.subtitleSegmentLoader_ = new VTTSegmentLoader(segmentLoaderOptions); + this.subtitleSegmentLoader_ = new VTTSegmentLoader(videojs.mergeOptions(segmentLoaderOptions, { + loaderType: 'vtt' + })); this.decrypter_.onmessage = (event) => { if (event.data.source === 'main') { @@ -623,7 +624,6 @@ export class MasterPlaylistController extends videojs.EventTarget { for (let mediaGroup in mediaGroups.SUBTITLES) { if (!this.subtitleGroups_.groups[mediaGroup]) { - // this.subtitleGroups_.groups[mediaGroup] = { unforced: [], forced: {} }; this.subtitleGroups_.groups[mediaGroup] = []; } diff --git a/src/vtt-segment-loader.js b/src/vtt-segment-loader.js index 0de74242d..9aeea4b74 100644 --- a/src/vtt-segment-loader.js +++ b/src/vtt-segment-loader.js @@ -1130,8 +1130,6 @@ export default class VTTSegmentLoader extends videojs.EventTarget { time: segment.start }; } - - // TODO - adjust other segments with new info } /**