fix(livetv): debounce rapid time-shift skips to stop overshoot

This commit is contained in:
edde746
2026-06-06 10:48:51 +02:00
parent 32421e4c84
commit f74314bbf0
14 changed files with 511 additions and 17 deletions
@@ -63,9 +63,11 @@ extension _PlexVideoControlsPlaybackInputMethods on _PlexVideoControlsState {
}
Future<void> _seekByOffset(Duration delta, {bool notifyCompletion = true}) async {
// Route through live seek callback for time-shifted live TV
if (widget.isLive && widget.onLiveSeek != null && widget.currentPositionEpoch != null) {
widget.onLiveSeek!(widget.currentPositionEpoch! + delta.inSeconds);
// Route relative live-TV skips through the parent accumulator, which
// coalesces a rapid burst into a single transcode re-open and computes the
// target from a stable base rather than the laggy live epoch (#1253).
if (widget.isLive && widget.onLiveSeekBy != null) {
widget.onLiveSeekBy!(delta.inSeconds);
return;
}
final target = widget.player.state.position + delta;