Skip to content

Commit

Permalink
Fix shaka-project#3783 captions not working after a period transition…
Browse files Browse the repository at this point in the history
… on live DASH streams (shaka-project#3801)

Embedded CEA-608 captions don't work on multi period live DASH DAI streams after new periods appear in the manifest because commas are appended the streams originalId string, which disrupts some stream matching code in text_engine.js

The problem has been resolved by preventing makeTextStreamsForClosedCaptions() from altering the PeriodCombiner.textStreams_ array.

Fixes shaka-project#3783
  • Loading branch information
caridley committed Dec 13, 2021
1 parent b6d7138 commit 6e0737e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/util/periods.js
Expand Up @@ -80,7 +80,10 @@ shaka.util.PeriodCombiner = class {

/** @return {!Array.<shaka.extern.Stream>} */
getTextStreams() {
return this.textStreams_;
// Return a copy of the array because makeTextStreamsForClosedCaptions
// may make changes to the contents of the array. Those changes should not
// propagate back to the PeriodCombiner.
return this.textStreams_.slice();
}

/** @return {!Array.<shaka.extern.Stream>} */
Expand Down

0 comments on commit 6e0737e

Please sign in to comment.