Hello, I'm getting a "deprecated" notice for AVPlayerItemFailedToPlayToEndTime in:
How should I use this event on SwiftUI and Swift 5?
All tutorials and forums around this question use:
let videoEnded = NotificationCenter.default.publisher(for: NSNotification.Name.AVPlayerItemDidPlayToEndTime)
/// … ContentView …
AVPlayerControllerRepresented(player: player)
.onReceive(){ _in
updateTaskId
}
Also DispatchQueue is everywhere when on should be using
.task(id){}
Could someone help out people with documentation challenges like me grok a simple example?
Thank you!