Skip to content

Commit

Permalink
feat: Improve gap-detection robustness (shaka-project#4399)
Browse files Browse the repository at this point in the history
This raises the default gap-detection threshold from 0.1 seconds for
some platforms and 0.5 seconds for others to 0.5 second universally.
This fixes test flake in gap-jumping tests on Android and may improve
gap-jumping generally for certain platforms or content.
  • Loading branch information
joeyparrish committed Aug 10, 2022
1 parent e9d836a commit 4293a14
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lib/util/player_configuration.js
Expand Up @@ -147,7 +147,7 @@ shaka.util.PlayerConfiguration = class {
ignoreTextStreamFailures: false,
alwaysStreamText: false,
startAtSegmentBoundary: false,
gapDetectionThreshold: 0.1,
gapDetectionThreshold: 0.5,
durationBackoff: 1,
forceTransmuxTS: false,
// Offset by 5 seconds since Chromecast takes a few seconds to start
Expand All @@ -173,15 +173,6 @@ shaka.util.PlayerConfiguration = class {
maxDisabledTime: 30,
};

// Some browsers will stop earlier than others before a gap (e.g., Edge
// stops 0.5 seconds before a gap). So for some browsers we need to use a
// larger threshold. See: https://bit.ly/2K5xmJO
if (shaka.util.Platform.isLegacyEdge() ||
shaka.util.Platform.isTizen() ||
shaka.util.Platform.isChromecast()) {
streaming.gapDetectionThreshold = 0.5;
}

// WebOS, Tizen, and Chromecast have long hardware pipelines that respond
// slowly to seeking. Therefore we should not seek when we detect a stall
// on one of these platforms. Instead, default stallSkip to 0 to force the
Expand Down

0 comments on commit 4293a14

Please sign in to comment.