mirror of
https://github.com/yattee/yattee.git
synced 2024-12-15 23:00:32 +05:30
Close overlays on exiting full screen
This commit is contained in:
parent
4a1ae0620e
commit
48b35988ae
@ -276,16 +276,23 @@ struct VideoPlayerView: View {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.onChange(of: fullScreenLayout) { newValue in
|
||||||
|
if !newValue { playerControls.presentingDetailsOverlay = false }
|
||||||
|
}
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
.statusBar(hidden: fullScreenLayout)
|
.statusBar(hidden: fullScreenLayout)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
var fullScreenLayout: Bool {
|
var fullScreenLayout: Bool {
|
||||||
|
if player.currentItem.isNil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
player.playingFullScreen || verticalSizeClass == .compact
|
return player.playingFullScreen || verticalSizeClass == .compact
|
||||||
#else
|
#else
|
||||||
player.playingFullScreen
|
return player.playingFullScreen
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user