diff --git a/lib/media/media_source_engine.js b/lib/media/media_source_engine.js index 9b25bfce41..2922d058e9 100644 --- a/lib/media/media_source_engine.js +++ b/lib/media/media_source_engine.js @@ -518,7 +518,7 @@ shaka.media.MediaSourceEngine = class { // For HLS CEA-608/708 CLOSED-CAPTIONS, text data is embedded in // the video stream, so textEngine may not have been initialized. if (!this.textEngine_) { - this.reinitText('text/vtt'); + this.reinitText(shaka.util.MimeUtils.CEA608_CLOSED_CAPTION_MIMETYPE); } if (transmuxedData.metadata) { @@ -545,7 +545,7 @@ shaka.media.MediaSourceEngine = class { contentType, () => this.append_(contentType, transmuxedSegment)); } else if (hasClosedCaptions) { if (!this.textEngine_) { - this.reinitText('text/vtt'); + this.reinitText(shaka.util.MimeUtils.CEA608_CLOSED_CAPTION_MIMETYPE); } // If it is the init segment for closed captions, initialize the closed // caption parser. diff --git a/lib/text/text_engine.js b/lib/text/text_engine.js index 2a125da694..861fd11cbb 100644 --- a/lib/text/text_engine.js +++ b/lib/text/text_engine.js @@ -134,6 +134,7 @@ shaka.text.TextEngine = class { // into TextEngine and TextDisplayer. if (mimeType == shaka.util.MimeUtils.CEA608_CLOSED_CAPTION_MIMETYPE || mimeType == shaka.util.MimeUtils.CEA708_CLOSED_CAPTION_MIMETYPE) { + this.parser_ = null; return; }