Skip to content

Commit

Permalink
fix: Fix exception enabling captions on HLS (shaka-project#4894)
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyparrish authored and Rodolphe Breton committed Jan 27, 2023
1 parent 699657b commit ef6c15b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/media/media_source_engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -920,8 +920,16 @@ shaka.media.MediaSourceEngine = class {
* @return {!Promise}
*/
async resync(contentType, timestampOffset) {
const ContentType = shaka.util.ManifestParserUtils.ContentType;

goog.asserts.assert(this.sequenceMode_,
'resync only used with sequence mode!');

if (contentType == ContentType.TEXT) {
// This operation is for audio and video only.
return;
}

// Queue an abort() to help MSE splice together overlapping segments.
// We set appendWindowEnd when we change periods in DASH content, and the
// period transition may result in overlap.
Expand Down

0 comments on commit ef6c15b

Please sign in to comment.