AliyunPlayer v7.10.0
Aliyun Player API Reference Manual for iOS Platforms
Loading...
Searching...
No Matches
<AliPlayerPictureInPictureDelegate> Protocol Reference

Delegate protocol for Picture in Picture (PiP) functionality. More...

#include "AliPlayerPictureInPictureDelegate.h"

Inheritance diagram for <AliPlayerPictureInPictureDelegate>:

Instance Methods

(void) - pictureInPictureController:didTransitionToRenderSize:
 Called when the Picture in Picture window's render size changes.
(void) - pictureInPictureController:failedToStartPictureInPictureWithError:
 Called when Picture in Picture fails to start.
(void) - pictureInPictureController:restoreUserInterfaceForPictureInPictureStopWithCompletionHandler:
 Called to restore the user interface before Picture in Picture stops.
(void) - pictureInPictureController:setPlaying:
 Called when the user taps the play/pause button in the Picture in Picture window.
(void) - pictureInPictureController:skipByInterval:completionHandler:
 Called when the user requests skipping forward or backward in the Picture in Picture window.
(void) - pictureInPictureControllerDidStartPictureInPicture:
 Called when Picture in Picture has successfully started.
(void) - pictureInPictureControllerDidStopPictureInPicture:
 Called when Picture in Picture has stopped.
(void) - pictureInPictureControllerIsPictureInPictureEnable:isEnable:
 Called when the Picture in Picture feature's enable state changes.
(BOOL) - pictureInPictureControllerIsPlaybackPaused:
 Called to query the current playback state for updating the Picture in Picture UI.
(CMTimeRange) - pictureInPictureControllerTimeRangeForPlayback:layerTime:
 Called to provide the current playable time range.
(void) - pictureInPictureControllerWillStartPictureInPicture:
 Called when Picture in Picture is about to start.
(void) - pictureInPictureControllerWillStopPictureInPicture:
 Called when Picture in Picture is about to stop.

Detailed Description

Delegate protocol for Picture in Picture (PiP) functionality.

This protocol defines callback methods for various lifecycle stages and user interaction events when the player is in Picture in Picture mode.

All methods are optional (@optional).

Method Documentation

◆ pictureInPictureController:didTransitionToRenderSize:

- (void) pictureInPictureController: (nonnull AVPictureInPictureController *) pictureInPictureController
didTransitionToRenderSize: (CMVideoDimensions) newRenderSize 
optionalrequired

Called when the Picture in Picture window's render size changes.

This method is invoked when the render size of the Picture in Picture window changes.

Parameters
pictureInPictureControllerThe Picture in Picture controller instance, non-null
newRenderSizeThe new render size, of type CMVideoDimensions

◆ pictureInPictureController:failedToStartPictureInPictureWithError:

- (void) pictureInPictureController: (AVPictureInPictureController *_Nullable) pictureInPictureController
failedToStartPictureInPictureWithError: (NSError *_Nullable) error 
optionalrequired

Called when Picture in Picture fails to start.

This method is invoked when the system attempts to start Picture in Picture but fails.

Parameters
pictureInPictureControllerThe Picture in Picture controller instance, which may be nil
errorThe error information for the failure, which may be nil

◆ pictureInPictureController:restoreUserInterfaceForPictureInPictureStopWithCompletionHandler:

- (void) pictureInPictureController: (AVPictureInPictureController *_Nullable) pictureInPictureController
restoreUserInterfaceForPictureInPictureStopWithCompletionHandler: (void(^)(BOOL restored)) completionHandler 
optionalrequired

Called to restore the user interface before Picture in Picture stops.

This method is invoked when Picture in Picture is about to stop, notifying the delegate to restore the main player's user interface.

The completion handler must be called with YES to allow the system to complete the interface restoration.

Parameters
pictureInPictureControllerThe Picture in Picture controller instance, which may be nil
completionHandlerThe completion handler that must be called with YES to allow the system to complete the restoration

◆ pictureInPictureController:setPlaying:

- (void) pictureInPictureController: (nonnull AVPictureInPictureController *) pictureInPictureController
setPlaying: (BOOL) playing 
optionalrequired

Called when the user taps the play/pause button in the Picture in Picture window.

This method is invoked when the user taps the play/pause button in the Picture in Picture window.

Parameters
pictureInPictureControllerThe Picture in Picture controller instance, non-null
playingIndicates whether the player should be in playing (YES) or paused (NO) state

◆ pictureInPictureController:skipByInterval:completionHandler:

- (void) pictureInPictureController: (nonnull AVPictureInPictureController *) pictureInPictureController
skipByInterval: (CMTime) skipInterval
completionHandler: (nonnull void(^)(void)) completionHandler 
optionalrequired

Called when the user requests skipping forward or backward in the Picture in Picture window.

This method is invoked when the user taps the skip forward or backward button in the Picture in Picture window.

The completion handler must be called to notify the system that the skip operation has completed.

Parameters
pictureInPictureControllerThe Picture in Picture controller instance, non-null
skipIntervalThe time interval to skip; positive for forward, negative for backward
completionHandlerThe completion handler that must be called to notify the system that the skip operation has completed

◆ pictureInPictureControllerDidStartPictureInPicture:

- (void) pictureInPictureControllerDidStartPictureInPicture: (AVPictureInPictureController *_Nullable) pictureInPictureController
optionalrequired

Called when Picture in Picture has successfully started.

This method is invoked after Picture in Picture mode has been successfully entered.

Parameters
pictureInPictureControllerThe Picture in Picture controller instance, which may be nil

◆ pictureInPictureControllerDidStopPictureInPicture:

- (void) pictureInPictureControllerDidStopPictureInPicture: (AVPictureInPictureController *_Nullable) pictureInPictureController
optionalrequired

Called when Picture in Picture has stopped.

This method is invoked after Picture in Picture mode has been fully exited.

Parameters
pictureInPictureControllerThe Picture in Picture controller instance, which may be nil

◆ pictureInPictureControllerIsPictureInPictureEnable:isEnable:

- (void) pictureInPictureControllerIsPictureInPictureEnable: (nullable AVPictureInPictureController *) pictureInPictureController
isEnable: (BOOL) isEnable 
optionalrequired

Called when the Picture in Picture feature's enable state changes.

This method is invoked when the enable state of the Picture in Picture feature changes.

Parameters
pictureInPictureControllerThe Picture in Picture controller instance, which may be nil
isEnableYES if Picture in Picture is enabled, NO if disabled

◆ pictureInPictureControllerIsPlaybackPaused:

- (BOOL) pictureInPictureControllerIsPlaybackPaused: (nonnull AVPictureInPictureController *) pictureInPictureController
optionalrequired

Called to query the current playback state for updating the Picture in Picture UI.

This method allows the delegate to return the actual playback state of the player so that the Picture in Picture controller can correctly display the play/pause button state.

Parameters
pictureInPictureControllerThe Picture in Picture controller instance, non-null
Returns
YES if currently paused, NO if currently playing

◆ pictureInPictureControllerTimeRangeForPlayback:layerTime:

- (CMTimeRange) pictureInPictureControllerTimeRangeForPlayback: (nonnull AVPictureInPictureController *) pictureInPictureController
layerTime: (CMTime) layerTime 
optionalrequired

Called to provide the current playable time range.

This method allows the delegate to inform the Picture in Picture controller of the current playable time range of the media.

Parameters
pictureInPictureControllerThe Picture in Picture controller instance, non-null
layerTimeThe current layer time
Returns
The current playable time range of the media, of type CMTimeRange

◆ pictureInPictureControllerWillStartPictureInPicture:

- (void) pictureInPictureControllerWillStartPictureInPicture: (AVPictureInPictureController *_Nullable) pictureInPictureController
optional

Called when Picture in Picture is about to start.

This method is invoked before the system attempts to start Picture in Picture mode.

Parameters
pictureInPictureControllerThe Picture in Picture controller instance, which may be nil

◆ pictureInPictureControllerWillStopPictureInPicture:

- (void) pictureInPictureControllerWillStopPictureInPicture: (AVPictureInPictureController *_Nullable) pictureInPictureController
optionalrequired

Called when Picture in Picture is about to stop.

This method is invoked before the system prepares to exit Picture in Picture mode.

Parameters
pictureInPictureControllerThe Picture in Picture controller instance, which may be nil

The documentation for this protocol was generated from the following file: