Skip to content

Commit

Permalink
Fix: Show captions with rapid seek when ignoreTextStreamFailures is t…
Browse files Browse the repository at this point in the history
  • Loading branch information
Álvaro Velad Galván authored Jun 22, 2021
1 parent e85009d commit 8aa3e9d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/media/streaming_engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,13 @@ shaka.media.StreamingEngine = class {

mediaState.performingUpdate = false;

if (mediaState.type == ContentType.TEXT &&
if (error.code == shaka.util.Error.Code.OPERATION_ABORTED) {
// If the network slows down, abort the current fetch request and start
// a new one, and ignore the error message.
mediaState.performingUpdate = false;
mediaState.updateTimer = null;
this.scheduleUpdate_(mediaState, 0);
} else if (mediaState.type == ContentType.TEXT &&
this.config_.ignoreTextStreamFailures) {
if (error.code == shaka.util.Error.Code.BAD_HTTP_STATUS) {
shaka.log.warning(logPrefix,
Expand All @@ -1307,12 +1313,6 @@ shaka.media.StreamingEngine = class {
'Text stream failed to parse. Proceeding without it.');
}
this.mediaStates_.delete(ContentType.TEXT);
} else if (error.code == shaka.util.Error.Code.OPERATION_ABORTED) {
// If the network slows down, abort the current fetch request and start
// a new one, and ignore the error message.
mediaState.performingUpdate = false;
mediaState.updateTimer = null;
this.scheduleUpdate_(mediaState, 0);
} else if (error.code == shaka.util.Error.Code.QUOTA_EXCEEDED_ERROR) {
this.handleQuotaExceeded_(mediaState, error);
} else if (error.code == shaka.util.Error.Code.BAD_HTTP_STATUS &&
Expand Down

0 comments on commit 8aa3e9d

Please sign in to comment.