Interface AVPlayerViewControllerDelegate


  • public interface AVPlayerViewControllerDelegate
    [@protocol] AVPlayerViewControllerDelegate A protocol for delegates of AVPlayerViewController. API-Since: 9.0
    • Method Detail

      • playerViewControllerFailedToStartPictureInPictureWithError

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

        default void playerViewControllerRestoreUserInterfaceForPictureInPictureStopWithCompletionHandler​(@NotNull
                                                                                                          @NotNull AVPlayerViewController playerViewController,
                                                                                                          @NotNull
                                                                                                          @NotNull AVPlayerViewControllerDelegate.Block_playerViewControllerRestoreUserInterfaceForPictureInPictureStopWithCompletionHandler completionHandler)
        playerViewController:restoreUserInterfaceForPictureInPictureStopWithCompletionHandler: Delegate can implement this method to restore the user interface before Picture in Picture stops. API-Since: 9.0
        Parameters:
        playerViewController - The player view controller.
        completionHandler - The completion handler the delegate needs to call after restore.
      • playerViewControllerDidStartPictureInPicture

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

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

        default boolean playerViewControllerShouldAutomaticallyDismissAtPictureInPictureStart​(@NotNull
                                                                                              @NotNull 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. API-Since: 9.0
        Parameters:
        playerViewController - The player view controller.
      • playerViewControllerWillStartPictureInPicture

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

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

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

        default void playerViewControllerWillEndFullScreenPresentationWithAnimationCoordinator​(@NotNull
                                                                                               @NotNull AVPlayerViewController playerViewController,
                                                                                               @NotNull
                                                                                               @NotNull 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:]. API-Since: 12.0
        Parameters:
        playerViewController - The player view controller.
        coordinator - An object conforming to UIViewControllerTransitionCoordinator.
      • playerViewControllerRestoreUserInterfaceForFullScreenExitWithCompletionHandler

        default void playerViewControllerRestoreUserInterfaceForFullScreenExitWithCompletionHandler​(@NotNull
                                                                                                    @NotNull AVPlayerViewController playerViewController,
                                                                                                    @NotNull
                                                                                                    @NotNull AVPlayerViewControllerDelegate.Block_playerViewControllerRestoreUserInterfaceForFullScreenExitWithCompletionHandler completionHandler)
        playerViewController:restoreUserInterfaceForFullScreenExitWithCompletionHandler: The delegate can implement this method to restore the user interface before exiting fullscreen. API-Since: 15.0
        Parameters:
        playerViewController - The player view controller.
        completionHandler - The completion handler the delegate must call after restoring the interface for an exit full screen transition.
      • playerViewControllerDidPresentInterstitialTimeRange

        default void playerViewControllerDidPresentInterstitialTimeRange​(@NotNull
                                                                         @NotNull AVPlayerViewController playerViewController,
                                                                         @NotNull
                                                                         @NotNull AVInterstitialTimeRange interstitial)
        playerViewController:didPresentInterstitialTimeRange: The delegate can implement this method to be notified when the player view controller has finished presenting interstitial content. API-Since: 16.0
        Parameters:
        playerViewController - The player view controller.
        interstitial - The interstitial time range.
      • playerViewControllerWillPresentInterstitialTimeRange

        default void playerViewControllerWillPresentInterstitialTimeRange​(@NotNull
                                                                          @NotNull AVPlayerViewController playerViewController,
                                                                          @NotNull
                                                                          @NotNull AVInterstitialTimeRange interstitial)
        playerViewController:willPresentInterstitialTimeRange: The delegate can implement this method to be notified when the player view controller is about to present interstitial content to the user. API-Since: 16.0
        Parameters:
        playerViewController - The player view controller.
        interstitial - The interstitial time range.