2

I am using AVPlayerViewController to play video. When play button is tapped in AVPlayerViewController I need to perform some action. But I can't detect whether play button is tapped. Here is a picture for better understanding.enter image description here

Any assistance would be a great help.

pigeon_39
  • 1,503
  • 2
  • 22
  • 34

1 Answers1

0

Officially there is not any Done Button click event.

What you could do is associate a UITapGestureRecognizer with the view of the AVPlayerViewController, allowing the "menu" press type, and cancelling touches in view. Your selector callback will then be responsible for handling the pausing of playback and the dismissal of the AVPlayerViewController, but it would also allow you to perform any other cleanup required specific to your implementation.

Alternatively you can follow it. Its smart workaround.

Community
  • 1
  • 1
ankit
  • 3,537
  • 1
  • 16
  • 32