I just have a simple videplayer I want to update the current video but I don´t know how
struct VideoPlayerView: UIViewRepresentable {
@Binding var videoURL: URL?
func makeUIView(context: Context) -> UIView {
return playerUIView(frame: .zero, URL: videoURL!)
}
func updateUIView(_ uiView: UIView, context: Context) {
print(videoURL)
}
}
when the binding value change the videoURL print on the updateUIView its working but isn't changing the video, im new on swift and dint know how to update the current playing video.