From 995e5bb28fa9f56752b201644414183ee50c07f1 Mon Sep 17 00:00:00 2001 From: Thibault Deckers Date: Thu, 17 Jun 2021 16:57:15 +0900 Subject: [PATCH] fixed video still playing in the background after leaving the app in some cases --- lib/widgets/viewer/entry_viewer_stack.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/widgets/viewer/entry_viewer_stack.dart b/lib/widgets/viewer/entry_viewer_stack.dart index a238444f6..f00f6da16 100644 --- a/lib/widgets/viewer/entry_viewer_stack.dart +++ b/lib/widgets/viewer/entry_viewer_stack.dart @@ -154,14 +154,14 @@ class _EntryViewerStackState extends State with SingleTickerPr @override void didChangeAppLifecycleState(AppLifecycleState state) { switch (state) { + case AppLifecycleState.inactive: case AppLifecycleState.paused: + case AppLifecycleState.detached: _pauseVideoControllers(); break; case AppLifecycleState.resumed: availability.onResume(); break; - default: - break; } }