mirror of
https://github.com/yattee/yattee.git
synced 2024-12-14 22:30:32 +05:30
Fix player size when orientation is locked
This commit is contained in:
parent
f9ea2b6688
commit
3fb2c532ee
@ -223,7 +223,8 @@ struct VideoPlayerView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var playerHeight: Double? {
|
var playerHeight: Double? {
|
||||||
fullScreenLayout ? UIScreen.main.bounds.size.height - (OrientationTracker.shared.currentInterfaceOrientation.isPortrait ? (SafeArea.insets.top + SafeArea.insets.bottom) : 0) : nil
|
let lockedPortrait = player.lockedOrientation?.contains(.portrait) ?? false
|
||||||
|
return fullScreenLayout ? UIScreen.main.bounds.size.height - (OrientationTracker.shared.currentInterfaceOrientation.isPortrait || lockedPortrait ? (SafeArea.insets.top + SafeArea.insets.bottom) : 0) : nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var playerEdgesIgnoringSafeArea: Edge.Set {
|
var playerEdgesIgnoringSafeArea: Edge.Set {
|
||||||
@ -372,10 +373,6 @@ struct VideoPlayerView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var fullScreenLayout: Bool {
|
var fullScreenLayout: Bool {
|
||||||
if player.currentItem.isNil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
return player.playingFullScreen || verticalSizeClass == .compact
|
return player.playingFullScreen || verticalSizeClass == .compact
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user