I\'m using UIWebView to play YouTube videos in an iPad.
UIWebView
How can I detect when a YouTube video is finished playing? I see the play icon in the status ba
Here's a Swift 3 answer
NotificationCenter.default.addObserver( self, selector: #selector(self.videoEnded), name: .AVPlayerItemDidPlayToEndTime, object: nil) } func videoEnded(){ print("video ended") }