Commit Graph

15 Commits

Author SHA1 Message Date
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
Toni Förster
4e4add3c42 fix double rotation
Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-09-06 16:47:15 +02:00
Toni Förster
322a550666 simplified fullscreen and orientation handling
- iPad: rotate to device orientation on startup
- fixed controls in portrait fullscreen
- iOS: don’t call setNeedsDrawing multiple times
- On iOS we call set needs drawing only once.
- Added cooldown time to MPV.Client setNeedsDrawing to avoid multiple successive calls
- make fullscreen animation smoother
- dragGesture now calls toggleFullScreenAction
- fix tvOS and macOS build

Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-09-05 18:17:14 +02:00
Toni Förster
633af02577 don’t activate AVAudioSession on app start
Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-08-31 13:19:54 +02:00
Toni Förster
1a22ac71be move AVAudioSession configuration to AppDelegate
Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-08-29 15:09:16 +02:00
Arkadiusz Fal
4ce9dc6729 Fix build issues 2024-05-16 19:05:00 +02:00
Arkadiusz Fal
7741e531f4 Swiftformat fixes 2024-05-16 19:01:02 +02:00
Tim Johnsen
626652c421 Update iOS/AppDelegate.swift 2024-04-25 10:18:10 -07:00
Tim Johnsen
fb42b80276 Handle deep links. 2024-04-25 10:01:44 -07:00
Arkadiusz Fal
fcf527fa87 Player bar visibility modes and settings 2023-02-05 14:24:13 +01:00
Arkadiusz Fal
5f858bc6d4 Orientation improvements 2022-10-27 18:03:57 +02:00
Arkadiusz Fal
c66e9a6f35 Add translucency to tab bar on iOS 2022-10-27 18:03:57 +02:00
Arkadiusz Fal
c0f395b2df Hide home indicator 2022-10-27 18:03:57 +02:00
Arkadiusz Fal
b3d471c8a0 Lint 2022-10-27 18:03:57 +02:00
Arkadiusz Fal
d6e75295e1 Add iOS option to lock portrait mode in browsing 2022-01-02 20:50:59 +01:00