1

I am working on a production app and I need to use an instance of AVPlayerViewController to play videos.

I would like to have a show segue present the controller by pushing it onto the navigation stack. However, this leads to strange behavior, because the user can press the full-screen button on the bottom right corner.

In Full-screen mode, there is a Done button which will exit full screen mode, but half the time, when I press Done, all of the playback controls disappear except for the scrubber which cannot move. Since I am in a navigation controller, the screen and the player is still there, but the playback controls break sometimes. It seems like the AVPlayerViewController is designed only to be presented modally and automatically dismissed with the Done button.

I know that in the documentation and example code, the AVPlayerViewController is presented modally into Full Screen and the Done button automatically dismisses it for you. But is it possible to push an AVPlayerViewController onto the navigation stack, without that strange Done button behavior?

Unheilig
  • 16,196
  • 193
  • 68
  • 98
andypf
  • 197
  • 2
  • 10
  • Why would you want to push it onto the stack? It's supposed to be presented modally. If you want other behaviour subclass (no idea how far you'll get) or implement your own view controller. – Mark Bourke Apr 22 '17 at 23:49
  • @MarkBourke It was unclear in the documentation that the controller could only be presented modally, so I was hoping someone could clarify. Thank you very much for the help. – andypf Apr 25 '17 at 03:53
  • @MarkBourke - why do you say that? I mean, granted, from my own experience presenting it modally works much better. But is there documentation somewhere that explains this? – Dan Morrow Jan 30 '18 at 03:54

0 Answers0