Files
shaka-player/lib
gmamzn 45a86cacd5 fix(HLS): Prevent infinite manifest update delay (#9867)
During a variant switch in HLS live content, shaka may take ~1 second to
create a new segment index (due to network calls). During this window,
the number of active streams temporarily drops to zero. When update()
runs in this state, lastTargetDuration_ gets set to Infinity because
there are no active streams to reduce it. This causes
getUpdatePlaylistDelay_() to return Infinity, so
updatePlaylistTimer_.tickAfter(Infinity) is called, effectively stopping
manifest updates forever.

Fix this with two guards:
1. In update(): return early when there are no active streams, before
setting lastTargetDuration_ to Infinity.
2. In onUpdate_(): if finalDelay is Infinity or NaN, use a 1-second
fallback delay instead of scheduling with a non-finite value.
2026-03-23 10:20:59 +01:00
..