diff --git a/CHANGELOG.md b/CHANGELOG.md
index b1e80ba11..ed263b223 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
### Changed
- Info: strip `unlocated` filter from context collection when editing location via map
+- Slideshow: keep playing when losing focus but app is still visible (e.g. split screen)
## [v1.10.2] - 2023-12-24
diff --git a/lib/widgets/viewer/entry_viewer_stack.dart b/lib/widgets/viewer/entry_viewer_stack.dart
index e34da51ee..9b8661f9b 100644
--- a/lib/widgets/viewer/entry_viewer_stack.dart
+++ b/lib/widgets/viewer/entry_viewer_stack.dart
@@ -290,19 +290,24 @@ class _EntryViewerStackState extends State with EntryViewContr
void _onAppLifecycleStateChanged() {
switch (AvesApp.lifecycleStateNotifier.value) {
case AppLifecycleState.inactive:
+ // inactive: when losing focus
_onAppInactive();
- case AppLifecycleState.hidden:
case AppLifecycleState.paused:
case AppLifecycleState.detached:
+ // paused: when switching to another app
+ // detached: when app is without a view
+ viewerController.autopilot = false;
pauseVideoControllers();
case AppLifecycleState.resumed:
availability.onResume();
+ case AppLifecycleState.hidden:
+ // hidden: transient state between `inactive` and `paused`
+ break;
}
}
Future _onAppInactive() async {
final playingController = context.read().getPlayingController();
- viewerController.autopilot = false;
bool enabledPip = false;
if (settings.videoBackgroundMode == VideoBackgroundMode.pip) {
enabledPip |= await _enablePictureInPicture();