Post

Replies

Boosts

Views

Activity

Video Player inside List SwiftUI iOS 16 - controls not displayed
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
2
1
1.3k
Sep ’22