我正在使用 AVPlayerViewController
播放视频。当在 AVPlayerViewController
中点击播放按钮时,我需要执行一些操作。但我无法检测到播放按钮是否被点击。为了更好地理解,这是一张图片。
任何帮助都会很有帮助。
最佳答案
官方没有任何完成按钮点击事件。
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.
或者您可以关注it .它是明智的解决方法。
关于ios - 在 AVPlayerViewController 中点击播放按钮时执行操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43752826/