Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a custom button to AVPlayerViewController?

Is there any way to add a 'skip 30 minutes back/forward' button to a subclassed AVPlayerViewController so it looks native (just like play/pause button)?

like image 522
David Avatar asked Oct 30 '22 13:10

David


1 Answers

There is actually no 'good' way of doing it. Apple keeps AVPlayerViewController simple and unfortunately unextensible.

The only thing you can do is set a custom overlaying view. But it doesn't solve the problem.

And docs say you shouldn't subclass AVPlayerViewController which means you either use it and accept as it is or write your own controller that manages an instance of AVPlayer and has everything you need.

like image 174
David Avatar answered Nov 15 '22 06:11

David