Add PiP for iOS

This commit is contained in:
Arkadiusz Fal
2022-05-20 23:23:14 +02:00
parent 0c7f963378
commit 0d6f481470
9 changed files with 137 additions and 21 deletions

View File

@@ -41,7 +41,9 @@ final class MPVBackend: PlayerBackend {
updateControlsIsPlaying()
#if !os(macOS)
UIApplication.shared.isIdleTimerDisabled = model.presentingPlayer && isPlaying
DispatchQueue.main.async {
UIApplication.shared.isIdleTimerDisabled = self.model.presentingPlayer && self.isPlaying
}
#endif
}}
var playerItemDuration: CMTime?