I am using SFSafariViewController in my app. When the user plays a video I have to show a pop up asking whether the user wants to download the videos. I have done this with UIWebView and AVPlayerItemBecameCurrentNotification. But this is not working in SFSafariViewController. Can someone give me a solution to this?
Here is the code of adding observer to SFSafariViewController
NotificationCenter.default.addObserver(self.safariViewController!, selector: #selector(self.playerItemBecameCurrent), name: NSNotification.Name(rawValue: "AVPlayerItemBecameCurrentNotification"), object: nil)
Thanks