1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-13 05:40:32 +05:30

Close overlays on exiting full screen

This commit is contained in:
Arkadiusz Fal 2022-08-13 16:18:27 +02:00
parent cf14ff51c5
commit 661de78ab3

View File

@ -276,16 +276,23 @@ struct VideoPlayerView: View {
#endif
}
}
.onChange(of: fullScreenLayout) { newValue in
if !newValue { playerControls.presentingDetailsOverlay = false }
}
#if os(iOS)
.statusBar(hidden: fullScreenLayout)
#endif
}
var fullScreenLayout: Bool {
if player.currentItem.isNil {
return false
}
#if os(iOS)
player.playingFullScreen || verticalSizeClass == .compact
return player.playingFullScreen || verticalSizeClass == .compact
#else
player.playingFullScreen
return player.playingFullScreen
#endif
}