I've used AVPlayer and AVPlayerViewController.
let playerController = AVPlayerViewController()
var player = AVPlayer()
self.player = AVPlayer(URL: NSURL(fileURLWithPath:videoPath))
self.playerController.player = self.player
self.playerController.showsPlaybackControls = false
self.addChildViewController(self.playerController)
self.view.addSubview(self.playerController.view)
self.playerController.view.frame = ...
I can play video with controls but when video finish I have to hide controls.
I found the event if video finished and at that time I hide the control
func playerDidFinishPlaying(note: NSNotification) {
self.playerController.showsPlaybackControls = false
}
Problem: If user zoom out video and video finished then hide control so Is there any possibilty to back to original frame
Thank you so much in adv.
