How change videoGravity of VideoPlayer in SwiftUI

I have the new iOS 14 VideoPlayer:

Code Block
private let player = AVPlayer(url: Bundle.main.url(forResource: "TL20_06_Shoba3_4k", withExtension: "mp4")!)
var body: some View {
VideoPlayer(player: player)
.aspectRatio(contentMode: .fill)
...


This player setup can not display 4:3 video on 16:9 screen of tv without black stripes. Modifier aspectRatio does not work on VideoPlayer.

How can I set videoGravity of existed AVPlayerLayer to resizeAspectFill via SwiftUI API?

Replies

You can use the .scaledToFill() view modifier on VideoPlayer:
VideoPlayer(player: player).scaledToFill()
VideoPlayer(player: player).scaledToFill()
doesn't work either
Post not yet marked as solved Up vote reply of ngb Down vote reply of ngb
Bump. Any solution to this?

Bump this would be nice to do