fix(video): resolve transient offline refreshes and coordinate watchdog timings
This commit is contained in:
parent
f7048767a7
commit
bce06da3b5
2 changed files with 11 additions and 8 deletions
|
|
@ -757,7 +757,7 @@ abstract class NativeVideoStoreBase
|
|||
await updateStreamInfo(forceUpdate: true);
|
||||
if (_disposed) return;
|
||||
|
||||
if (wasOffline && _streamInfo != null && settingsStore.showVideo) {
|
||||
if (wasOffline && _streamInfo != null && settingsStore.showVideo && !_userPaused) {
|
||||
debugPrint(
|
||||
'NativeVideoStore: stream detected back online, auto-refreshing',
|
||||
);
|
||||
|
|
@ -1062,11 +1062,14 @@ abstract class NativeVideoStoreBase
|
|||
_offlineChannelInfo = null;
|
||||
return;
|
||||
}
|
||||
_overlayTimer?.cancel();
|
||||
_latencyTimer?.cancel();
|
||||
_stallRecoveryTimer?.cancel();
|
||||
_healthyPlaybackTimer?.cancel();
|
||||
_loading = false;
|
||||
if (result.offlineChannel == null) {
|
||||
return;
|
||||
}
|
||||
_overlayTimer?.cancel();
|
||||
_latencyTimer?.cancel();
|
||||
_stallRecoveryTimer?.cancel();
|
||||
_healthyPlaybackTimer?.cancel();
|
||||
_loading = false;
|
||||
_latency = null;
|
||||
_streamInfo = null;
|
||||
_offlineChannelInfo = result.offlineChannel;
|
||||
|
|
@ -1074,7 +1077,7 @@ abstract class NativeVideoStoreBase
|
|||
// Transient network errors leave chat state untouched.
|
||||
if (result.offlineChannel != null) _chatLatencySync.reset();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
@action
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class VideoTimingConstants {
|
|||
|
||||
/// A "play" event arriving within this window after a previous one is
|
||||
/// treated as a failed-recovery bounce rather than a fresh successful start.
|
||||
static const shortPlayWindow = Duration(seconds: 3);
|
||||
static const shortPlayWindow = Duration(seconds: 10);
|
||||
/// Number of short-play bounces required before surfacing a tailored error.
|
||||
static const int shortPlayLoopThreshold = 3;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue