Hi could anyone please help me with the following. In my UIViewContoller I have a tableView and one instance of AVPlayer that receives the different url per cell for playing and embedded as subview in the tableViewCell. And I need to implement full-screen mode option for playing video on taping on the button in tableViewCell. In this method I use something like this:
myVideoPlayer.stopPlaying
let playerViewController = AVPlayerViewController()
playerViewController.player = myVideoPlayer
self.present(playerViewController, animated: true) {
playerViewController.player.play()
}
The actual result is: AVPlayerViewController is opened the video is playing from the relevant time but after 3-4 seconds it stops rendering yet audio continues playing. And if I close this controller in my cell audio is playing from the relevant time that was the last from the controller but the video is frozen.