Fix AVPlayer layout

This commit is contained in:
Arkadiusz Fal 2023-06-07 21:56:56 +02:00
parent 8d11a92f97
commit 0328656a44
2 changed files with 4 additions and 2 deletions

View File

@ -1079,7 +1079,9 @@ final class PlayerModel: ObservableObject {
DispatchQueue.main.async { [weak self] in
guard let self else { return }
self.aspectRatio = self.backend.aspectRatio
withAnimation {
self.aspectRatio = self.backend.aspectRatio
}
}
#endif
}

View File

@ -25,7 +25,7 @@ struct VideoPlayerSizeModifier: ViewModifier {
func body(content: Content) -> some View {
content
.frame(maxWidth: geometry.size.width)
.frame(width: geometry.size.width)
.frame(maxHeight: maxHeight)
#if !os(macOS)