mirror of
https://github.com/yattee/yattee.git
synced 2025-11-16 06:58:43 +00:00
Fix MPV player vertical positioning in fullscreen mode
Remove incorrect safe area insets from offsetY calculation that was causing unequal black bars (smaller top, larger bottom). Now properly centers video with equal padding like AVPlayer backend.
This commit is contained in:
@@ -422,7 +422,7 @@ final class MPVClient: ObservableObject {
|
||||
#if os(iOS)
|
||||
insets = OrientationTracker.shared.currentInterfaceOrientation.isPortrait ? SafeAreaModel.shared.safeArea.bottom : 0
|
||||
#endif
|
||||
let offsetY = max(0, model.playingFullScreen ? ((model.playerSize.height / 2.0) - ((height + insets) / 2)) : 0)
|
||||
let offsetY = max(0, model.playingFullScreen ? ((model.playerSize.height / 2.0) - (height / 2)) : 0)
|
||||
UIView.animate(withDuration: 0.2, animations: {
|
||||
self.glView?.frame = CGRect(x: 0, y: offsetY, width: roundedWidth, height: height)
|
||||
}) { completion in
|
||||
|
||||
Reference in New Issue
Block a user