Skip to content

Commit 9280425

Browse files
authored
chore: Simplify inaccurateManifestTolerance when crossBoundaryStrategy is not KEEP (#8866)
1 parent 4ef5e33 commit 9280425

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

lib/media/streaming_engine.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1742,8 +1742,9 @@ shaka.media.StreamingEngine = class {
17421742
// If there's positive drift then we need to adjust the lookup time, and
17431743
// may wind up requesting the previous segment to be safe.
17441744
// inaccurateManifestTolerance should be 0 for low latency streaming.
1745-
const inaccurateTolerance = this.manifest_.sequenceMode ?
1746-
0 : this.config_.inaccurateManifestTolerance;
1745+
const inaccurateTolerance =
1746+
(this.manifest_.sequenceMode || this.shouldUseCrossBoundaryLogic_()) ?
1747+
0 : this.config_.inaccurateManifestTolerance;
17471748
const lookupTime = Math.max(presentationTime - inaccurateTolerance, 0);
17481749

17491750
shaka.log.v1(logPrefix, 'looking up segment',

lib/player.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4594,15 +4594,6 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
45944594
delete config['streaming']['minBytesForProgressEvents'];
45954595
}
45964596

4597-
// Enforce inaccurateManifestTolerance: 0 when using crossBoundaryStrategy
4598-
// different from KEEP.
4599-
if (config['streaming'] && 'crossBoundaryStrategy' in config['streaming']) {
4600-
if (config['streaming']['crossBoundaryStrategy'] !=
4601-
shaka.config.CrossBoundaryStrategy.KEEP) {
4602-
config['streaming']['inaccurateManifestTolerance'] = 0;
4603-
}
4604-
}
4605-
46064597
const ret = shaka.util.PlayerConfiguration.mergeConfigObjects(
46074598
this.config_, config, this.defaultConfig_());
46084599

0 commit comments

Comments
 (0)