I use AVPlayerViewController to display inline videos in my app. The thing is I would like to have custom controls when the AVPlayerViewController goes full screen but not when it is inline.
I'm trying to do this through this delegate method
func playerViewController(_ playerViewController: AVPlayerViewController, willBeginFullScreenPresentationWithAnimationCoordinator coordinator: UIViewControllerTransitionCoordinator) {
playerViewController.showsPlaybackControls = false
addCustomControlsToPlayerViewController()
}
However this is not working cause, even though system controls are hidden, the view containing these controls "AVPlaybackControlsView" is not. And this view is on top of everything else in the ACPlayerViewController.
Is there a way to have system controls when AVPlayerViewController is inline, but custom controls when AVPlayerViewController is full screen?
question from:
https://stackoverflow.com/questions/65644976/display-custom-controls-in-avplayerviewcontroller-when-full-screen 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…