Skip to content

Commit

Permalink
fix(HLS): IMSC1 subtitles not working in a HLS stream
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad committed Jan 30, 2023
1 parent 67a2451 commit 5b64165
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/hls/hls_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,8 @@ shaka.hls.HlsParser = class {
}
});

const type = shaka.util.ManifestParserUtils.ContentType.TEXT;

// Set the codecs for text streams.
for (const tag of subtitleTags) {
const groupId = tag.getRequiredAttrValue('GROUP-ID');
Expand All @@ -1204,6 +1206,9 @@ shaka.hls.HlsParser = class {
if (textStreamInfos) {
for (const textStreamInfo of textStreamInfos) {
textStreamInfo.stream.codecs = codecs;
textStreamInfo.stream.mimeType =
this.guessMimeTypeBeforeLoading_(type, codecs) ||
this.guessMimeTypeFallback_(type);
}
}
}
Expand Down

0 comments on commit 5b64165

Please sign in to comment.