mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Fix applying safe area insets on iOS
This commit is contained in:
@@ -146,11 +146,11 @@ struct VideoPlayerView: View {
|
||||
|
||||
#if os(iOS)
|
||||
var playerWidth: Double? {
|
||||
fullScreenLayout ? (UIScreen.main.bounds.size.width - safeAreaInsets.left - safeAreaInsets.right) : nil
|
||||
fullScreenLayout ? (UIScreen.main.bounds.size.width - SafeArea.insets.left - SafeArea.insets.right) : nil
|
||||
}
|
||||
|
||||
var playerHeight: Double? {
|
||||
fullScreenLayout ? UIScreen.main.bounds.size.height - (OrientationTracker.shared.currentInterfaceOrientation.isPortrait ? (safeAreaInsets.top + safeAreaInsets.bottom) : 0) : nil
|
||||
fullScreenLayout ? UIScreen.main.bounds.size.height - (OrientationTracker.shared.currentInterfaceOrientation.isPortrait ? (SafeArea.insets.top + SafeArea.insets.bottom) : 0) : nil
|
||||
}
|
||||
|
||||
var playerEdgesIgnoringSafeArea: Edge.Set {
|
||||
@@ -403,10 +403,6 @@ struct VideoPlayerView: View {
|
||||
}
|
||||
}
|
||||
|
||||
var safeAreaInsets: UIEdgeInsets {
|
||||
UIApplication.shared.windows.first?.safeAreaInsets ?? .init()
|
||||
}
|
||||
|
||||
private func configureOrientationUpdatesBasedOnAccelerometer() {
|
||||
if OrientationTracker.shared.currentInterfaceOrientation.isLandscape,
|
||||
Defaults[.enterFullscreenInLandscape],
|
||||
|
Reference in New Issue
Block a user