Files
yattee/Model
Arkadiusz Fal 4c5b801c45 Fix Now Playing controls when switching between MPV and AVPlayer backends
When switching from AVPlayer to MPV backend, Now Playing controls (play/pause/seek) were disabled because AVPlayer maintained control of the remote command center and audio session. This fix ensures MPV can properly reclaim control.

Key changes:
- Clear AVPlayer's current item when switching to MPV to release media control
- Clear Now Playing info and set playback state to stopped before MPV takes over
- Reset remote command center by removing all targets (including AVPlayer's internal handlers) and re-adding custom handlers
- Force audio session deactivation/reactivation with .notifyOthersOnDeactivation
- Add forceReactivate parameter to setupAudioSessionForNowPlaying() for backend switches
- Ensure stream loading continues after Now Playing setup (don't return early)

The fix properly handles the transition by:
1. Clearing AVPlayer's media session completely
2. Scheduling async Now Playing setup without blocking stream loading
3. Resetting remote command handlers to reclaim control from AVPlayer
4. Re-activating audio session to establish MPV as the active player
2025-11-18 16:43:17 +01:00
..
2024-08-24 13:17:26 +02:00
2024-02-02 11:16:27 +01:00
2024-09-10 09:38:14 +02:00
2024-08-18 14:46:51 +02:00
2022-10-27 18:03:57 +02:00
2021-12-04 20:57:09 +01:00
2021-12-05 18:31:33 +01:00
2023-07-24 19:45:30 +02:00
2024-08-18 14:46:51 +02:00
2023-02-05 14:24:13 +01:00
2024-08-18 14:46:51 +02:00
2023-07-24 19:45:30 +02:00
2023-04-22 23:39:42 +02:00
2024-08-25 23:41:06 +02:00
2024-05-16 19:01:02 +02:00
2023-04-22 23:10:28 +02:00
2023-07-24 19:45:30 +02:00
2024-08-24 17:52:35 +02:00
2023-04-22 23:10:28 +02:00
2023-09-23 21:59:38 +02:00
2024-05-03 15:20:51 +02:00
2024-02-02 11:16:27 +01:00
2023-02-05 14:24:07 +01:00
2024-05-16 19:01:02 +02:00
2023-05-25 18:36:02 +02:00
2023-05-25 18:36:03 +02:00