Caught a strange situation. In iOS 16, the controls for the video player are not shown if the video player is placed inside the list. In iOS 15.6.1 this code works fine as it should.
struct ContentView: View{
var body: some View{
VStack{
List(0..<2) { _ in
VStack
{
let vp = AVPlayer(url: videoUrl)
VideoPlayer(player: vp)
.frame(maxWidth: .infinity, idealHeight: 320)
.padding(.horizontal, -20)
.onDisappear{vp.pause()}
.padding()
}
}
}
}
}
Thank you all in advance