SwiftUI VideoPlayer (Video Controls) in iOS14

Is there a way to disable the default video controls (play/pause/scrubber/etc) on the new SwiftUI VideoPlayer in iOS14, so I could create a custom one?

Replies

You can use disabled modifier:

Code Block `
VideoPlayer(player: player)
.disabled(true)
`
I tried the .disabled modifier, but I still see the controls appear for the 1st three seconds before disappearing.

Did you ever find a solution for this?

I found this article https://www.createwithswift.com/custom-video-player-with-avkit-and-swiftui-supporting-picture-in-picture/

it explains how to create a custom player.