Files
yattee/iOS
Arkadiusz Fal 98bdd5d6a5 Fix iOS Now Playing Info Center integration for AVPlayer backend
This commit enables proper Now Playing Info Center integration on iOS, allowing video playback information to appear in Control Center and Lock Screen with working remote controls.

Key changes:
- Activate audio session on app launch with setCategory(.playback, mode: .moviePlayback) and setActive(true)
- Set up remote commands on first play() call instead of during app initialization to avoid claiming Now Playing slot prematurely
- Remove removeTarget(nil) calls that were claiming Now Playing without content
- Enable remote commands (play, pause, toggle, seek) explicitly and add proper target handlers
- Use backend.isPlaying instead of PlayerModel.isPlaying to avoid race conditions
- Include playback rate (1.0 for playing, 0.0 for paused) in Now Playing info
- Update Now Playing info on main queue for thread safety
- Update Now Playing when switching between backends
- Remove audio session deactivation from pause() and stop() methods

Note: This fix works for AVPlayer backend. MPV backend has fundamental incompatibility with iOS Now Playing system.
2025-11-15 15:44:05 +01:00
..
2023-06-26 13:18:28 +09:00
2025-11-14 23:27:14 +01:00
2023-05-21 19:13:42 +02:00