Skip to content

Commit

Permalink
[MSS] fix text track switch for live streams (Dash-Industry-Forum#3698)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbert authored and dsilhavy committed Jul 14, 2021
1 parent 499008f commit 34ebd15
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/streaming/Stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -855,12 +855,11 @@ function Stream(config) {

if (trackChangedEvent) {
let mediaInfo = trackChangedEvent.newMediaInfo;
if (mediaInfo.type !== Constants.TEXT) {
let processor = getProcessorForMediaInfo(trackChangedEvent.oldMediaInfo);
if (!processor) return;
promises.push(processor.prepareTrackSwitch());
trackChangedEvent = undefined;
}
let processor = getProcessorForMediaInfo(trackChangedEvent.oldMediaInfo);
if (!processor) return;
promises.push(processor.prepareTrackSwitch());
processor.selectMediaInfo(mediaInfo);
trackChangedEvent = undefined;
}

return Promise.all(promises)
Expand Down

0 comments on commit 34ebd15

Please sign in to comment.