guard handleRefresh during pip and reset high latency count on app resume

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tommy Chow 2026-03-15 22:15:00 -07:00
parent 28b4c16398
commit 9c7bef6f3a

View file

@ -530,6 +530,7 @@ abstract class NativeVideoStoreBase with Store implements VideoPlayerInterface {
@override
@action
Future<void> handleRefresh() async {
if (_isInPipMode) return;
HapticFeedback.lightImpact();
// Reset recovery cap on user-initiated refresh (error was shown).
// Stall recovery calls this with _error == null, preserving the cap.
@ -687,6 +688,7 @@ abstract class NativeVideoStoreBase with Store implements VideoPlayerInterface {
@action
void handleAppResume() {
if (_isInPipMode) return;
_highLatencyCount = 0;
updateStreamInfo(forceUpdate: true);
if (!_userPaused && !_initializing && _controller != null) {
_controller!.play();