Interface AVPlayerViewControllerDelegate


  • public interface AVPlayerViewControllerDelegate
    [@protocol] AVPlayerViewControllerDelegate A protocol for delegates of AVPlayerViewController.
    • Method Detail

      • playerViewControllerFailedToStartPictureInPictureWithError

        default void playerViewControllerFailedToStartPictureInPictureWithError​(AVPlayerViewController playerViewController,
                                                                                NSError error)
        playerViewController:failedToStartPictureInPictureWithError: Delegate can implement this method to be notified when Picture in Picture failed to start.
        Parameters:
        playerViewController - The player view controller.
        error - An error describing why it failed.
      • playerViewControllerDidStartPictureInPicture

        default void playerViewControllerDidStartPictureInPicture​(AVPlayerViewController playerViewController)
        playerViewControllerDidStartPictureInPicture: Delegate can implement this method to be notified when Picture in Picture did start.
        Parameters:
        playerViewController - The player view controller.
      • playerViewControllerDidStopPictureInPicture

        default void playerViewControllerDidStopPictureInPicture​(AVPlayerViewController playerViewController)
        playerViewControllerDidStopPictureInPicture: Delegate can implement this method to be notified when Picture in Picture did stop.
        Parameters:
        playerViewController - The player view controller.
      • playerViewControllerShouldAutomaticallyDismissAtPictureInPictureStart

        default boolean playerViewControllerShouldAutomaticallyDismissAtPictureInPictureStart​(AVPlayerViewController playerViewController)
        playerViewControllerShouldAutomaticallyDismissAtPictureInPictureStart: Delegate can implement this method and return NO to prevent player view controller from automatically being dismissed when Picture in Picture starts.
        Parameters:
        playerViewController - The player view controller.
      • playerViewControllerWillStartPictureInPicture

        default void playerViewControllerWillStartPictureInPicture​(AVPlayerViewController playerViewController)
        playerViewControllerWillStartPictureInPicture: Delegate can implement this method to be notified when Picture in Picture will start.
        Parameters:
        playerViewController - The player view controller.
      • playerViewControllerWillStopPictureInPicture

        default void playerViewControllerWillStopPictureInPicture​(AVPlayerViewController playerViewController)
        playerViewControllerWillStopPictureInPicture: Delegate can implement this method to be notified when Picture in Picture will stop.
        Parameters:
        playerViewController - The player view controller.
      • playerViewControllerWillBeginFullScreenPresentationWithAnimationCoordinator

        default void playerViewControllerWillBeginFullScreenPresentationWithAnimationCoordinator​(AVPlayerViewController playerViewController,
                                                                                                 UIViewControllerTransitionCoordinator coordinator)
        playerViewController:willBeginFullScreenPresentationWithAnimationCoordinator: 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.
        Parameters:
        playerViewController - The player view controller.
        coordinator - An object conforming to UIViewControllerTransitionCoordinator.
      • playerViewControllerWillEndFullScreenPresentationWithAnimationCoordinator

        default void playerViewControllerWillEndFullScreenPresentationWithAnimationCoordinator​(AVPlayerViewController playerViewController,
                                                                                               UIViewControllerTransitionCoordinator coordinator)
        playerViewController:willEndFullScreenPresentationWithAnimationCoordinator: Informs the delegate that AVPlayerViewController is about to stop displaying its contents full screen. See the discussion of -[AVPlayerViewControllerDelegatePrivate playerViewController:willBeginFullScreenPresentationWithAnimationCoordinator:].
        Parameters:
        playerViewController - The player view controller.
        coordinator - An object conforming to UIViewControllerTransitionCoordinator.