Merge pull request #644 from stonerl/music-mode

MusicMode: don't bindPlayerToLayer when entering foreground
This commit is contained in:
Arkadiusz Fal 2024-05-16 18:21:35 +02:00 committed by GitHub
commit 46f89db11a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -946,7 +946,10 @@ final class PlayerModel: ObservableObject {
#else #else
func handleEnterForeground() { func handleEnterForeground() {
setNeedsDrawing(presentingPlayer) setNeedsDrawing(presentingPlayer)
if !musicMode, activeBackend == .appleAVPlayer {
avPlayerBackend.bindPlayerToLayer() avPlayerBackend.bindPlayerToLayer()
}
guard closePiPAndOpenPlayerOnEnteringForeground, playingInPictureInPicture else { guard closePiPAndOpenPlayerOnEnteringForeground, playingInPictureInPicture else {
return return