I'm making a mac app that plays a video using AVPlayerView. I want to control the player programmatically. I've set the controlStyle to none, so that the user can't press the buttons to control the player.
theplayer.controlsStyle = AVPlayerViewControlsStyleNone;
You can't use the buttons now but when you press the space bar you can still pause it. Or when you press the arrow keys you can still control the player.
So is there a way to disable all user interaction?
You can subclass
AVPlayerView
and overrideacceptsFirstResponder
to returnNO
: