I'm able to get the AVPlayerViewController to display properly via presentViewController. The Play and Pause buttons work as expected, but the Fast Forward/Backward buttons don't do anything... I've looked over the documentation but haven't seen any mention that I need to explicitly implement a gesture function for them.
I'm not doing anything special to instantiate the AVPlayerViewContoller with a local video file in mp4 format:
let videoURL = NSURL(fileURLWithPath: path)
let player = AVPlayer(URL: videoURL!)
let playerViewController = AVPlayerViewController()
playerViewController.player = player
self.presentViewController(playerViewController, animated: true) {
playerViewController.player!.play()
}
What am I missing? I find it hard to believe no one else has come across this.
I think it could possibly be:
- Because it's a local mp4 file.
- I need to implement the touch callbacks for ff/fb manually.
- ???