Don't draw player when in background

This commit is contained in:
Arkadiusz Fal
2022-06-05 19:12:00 +02:00
parent 9d79543085
commit b90a726f87
2 changed files with 11 additions and 0 deletions

View File

@@ -446,6 +446,8 @@ final class PlayerModel: ObservableObject {
}
#else
func handleEnterForeground() {
setNeedsDrawing(true)
guard closePiPAndOpenPlayerOnEnteringForeground, playingInPictureInPicture else {
return
}
@@ -454,6 +456,10 @@ final class PlayerModel: ObservableObject {
closePiP()
}
func handleEnterBackground() {
setNeedsDrawing(false)
}
func enterFullScreen() {
guard !controls.playingFullscreen else {
return