AVPlayerViewController Playback control Rewind / fast forward does not work

I can get the AVPlayerViewController to display correctly through the presentViewController. The Play and Pause buttons work as expected, but the Fast Forward / Reward buttons do nothing ... I looked at the documentation, but did not notice that I need to explicitly implement the gesture function for them.

I am not doing anything special to create an instance of AVPlayerViewContoller with a local mp4 video file:

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? It’s hard for me to believe that no one else has come across this.

I think it's possible:

  • Because it is a local mp4 file.
  • I need to implement touch callbacks for ff / fb manually.
  • ???
+5
source share

All Articles