public interface AVPlayerViewControllerDelegate
A protocol for delegates of AVPlayerViewController.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
AVPlayerViewControllerDelegate.Block_playerViewControllerRestoreUserInterfaceForFullScreenExitWithCompletionHandler |
static interface |
AVPlayerViewControllerDelegate.Block_playerViewControllerRestoreUserInterfaceForPictureInPictureStopWithCompletionHandler |
default void playerViewControllerFailedToStartPictureInPictureWithError(AVPlayerViewController playerViewController, NSError error)
Delegate can implement this method to be notified when Picture in Picture failed to start.
playerViewController - The player view controller.error - An error describing why it failed.default void playerViewControllerRestoreUserInterfaceForPictureInPictureStopWithCompletionHandler(AVPlayerViewController playerViewController, AVPlayerViewControllerDelegate.Block_playerViewControllerRestoreUserInterfaceForPictureInPictureStopWithCompletionHandler completionHandler)
Delegate can implement this method to restore the user interface before Picture in Picture stops.
playerViewController - The player view controller.completionHandler - The completion handler the delegate needs to call after restore.default void playerViewControllerDidStartPictureInPicture(AVPlayerViewController playerViewController)
Delegate can implement this method to be notified when Picture in Picture did start.
playerViewController - The player view controller.default void playerViewControllerDidStopPictureInPicture(AVPlayerViewController playerViewController)
Delegate can implement this method to be notified when Picture in Picture did stop.
playerViewController - The player view controller.default boolean playerViewControllerShouldAutomaticallyDismissAtPictureInPictureStart(AVPlayerViewController playerViewController)
Delegate can implement this method and return NO to prevent player view controller from automatically being dismissed when Picture in Picture starts.
playerViewController - The player view controller.default void playerViewControllerWillStartPictureInPicture(AVPlayerViewController playerViewController)
Delegate can implement this method to be notified when Picture in Picture will start.
playerViewController - The player view controller.default void playerViewControllerWillStopPictureInPicture(AVPlayerViewController playerViewController)
Delegate can implement this method to be notified when Picture in Picture will stop.
playerViewController - The player view controller.default void playerViewControllerWillBeginFullScreenPresentationWithAnimationCoordinator(AVPlayerViewController playerViewController, UIViewControllerTransitionCoordinator coordinator)
Informs the delegate that AVPlayerViewController is about to start displaying its contents full screen.
This method will not be called if a playerViewController is embedded inside a view controller that is being presented. If the receiver is embedded in a parent view controller, its content will be presented in a new full screen view controller and perhaps in a new window. Use the coordinator to determine whether the playerViewController or its full screen counterpart is being transitioned. Transitions can be interrupted -- use a completion block of one of the coordinator's animation methods to determine whether it has completed.
playerViewController - The player view controller.coordinator - An object conforming to UIViewControllerTransitionCoordinator.default void playerViewControllerWillEndFullScreenPresentationWithAnimationCoordinator(AVPlayerViewController playerViewController, UIViewControllerTransitionCoordinator coordinator)
Informs the delegate that AVPlayerViewController is about to stop displaying its contents full screen.
See the discussion of -[AVPlayerViewControllerDelegatePrivate playerViewController:willBeginFullScreenPresentationWithAnimationCoordinator:].
playerViewController - The player view controller.coordinator - An object conforming to UIViewControllerTransitionCoordinator.default void playerViewControllerRestoreUserInterfaceForFullScreenExitWithCompletionHandler(AVPlayerViewController playerViewController, AVPlayerViewControllerDelegate.Block_playerViewControllerRestoreUserInterfaceForFullScreenExitWithCompletionHandler completionHandler)
The delegate can implement this method to restore the user interface before exiting fullscreen.
playerViewController - The player view controller.completionHandler - The completion handler the delegate must call after restoring the interface for an exit full screen transition.