AVPlayerViewPictureInPictureDelegate

Trait AVPlayerViewPictureInPictureDelegate 

Source
pub unsafe trait AVPlayerViewPictureInPictureDelegate: NSObjectProtocol {
    // Provided methods
    unsafe fn playerViewWillStartPictureInPicture(
        &self,
        player_view: &AVPlayerView,
    )
       where Self: Sized + Message { ... }
    unsafe fn playerViewDidStartPictureInPicture(
        &self,
        player_view: &AVPlayerView,
    )
       where Self: Sized + Message { ... }
    unsafe fn playerView_failedToStartPictureInPictureWithError(
        &self,
        player_view: &AVPlayerView,
        error: &NSError,
    )
       where Self: Sized + Message { ... }
    unsafe fn playerViewWillStopPictureInPicture(
        &self,
        player_view: &AVPlayerView,
    )
       where Self: Sized + Message { ... }
    unsafe fn playerViewDidStopPictureInPicture(
        &self,
        player_view: &AVPlayerView,
    )
       where Self: Sized + Message { ... }
    unsafe fn playerView_restoreUserInterfaceForPictureInPictureStopWithCompletionHandler(
        &self,
        player_view: &AVPlayerView,
        completion_handler: &DynBlock<dyn Fn(Bool)>,
    )
       where Self: Sized + Message { ... }
    unsafe fn playerViewShouldAutomaticallyDismissAtPictureInPictureStart(
        &self,
        player_view: &AVPlayerView,
    ) -> bool
       where Self: Sized + Message { ... }
}
Available on crate feature AVPlayerView only.
Expand description

Provided Methods§

Source

unsafe fn playerViewWillStartPictureInPicture(&self, player_view: &AVPlayerView)
where Self: Sized + Message,

Available on crate feature objc2-app-kit and macOS only.

Parameter playerView: The player view.

Delegate can implement this method to be notified when Picture in Picture will start.

Source

unsafe fn playerViewDidStartPictureInPicture(&self, player_view: &AVPlayerView)
where Self: Sized + Message,

Available on crate feature objc2-app-kit and macOS only.

Parameter playerView: The player view.

Delegate can implement this method to be notified when Picture in Picture did start.

Source

unsafe fn playerView_failedToStartPictureInPictureWithError( &self, player_view: &AVPlayerView, error: &NSError, )
where Self: Sized + Message,

Available on crate feature objc2-app-kit and macOS only.

Parameter playerView: The player view.

Parameter error: An error describing why it failed.

Delegate can implement this method to be notified when Picture in Picture failed to start.

Source

unsafe fn playerViewWillStopPictureInPicture(&self, player_view: &AVPlayerView)
where Self: Sized + Message,

Available on crate feature objc2-app-kit and macOS only.

Parameter playerView: The player view.

Delegate can implement this method to be notified when Picture in Picture will stop.

Source

unsafe fn playerViewDidStopPictureInPicture(&self, player_view: &AVPlayerView)
where Self: Sized + Message,

Available on crate feature objc2-app-kit and macOS only.

Parameter playerView: The player view.

Delegate can implement this method to be notified when Picture in Picture did stop.

Source

unsafe fn playerView_restoreUserInterfaceForPictureInPictureStopWithCompletionHandler( &self, player_view: &AVPlayerView, completion_handler: &DynBlock<dyn Fn(Bool)>, )
where Self: Sized + Message,

Available on crate feature block2 and crate feature objc2-app-kit and macOS only.

Parameter playerView: The player view.

Parameter completionHandler: The completion handler the delegate needs to call after restore.

Delegate can implement this method to restore the user interface before Picture in Picture stops.

Source

unsafe fn playerViewShouldAutomaticallyDismissAtPictureInPictureStart( &self, player_view: &AVPlayerView, ) -> bool
where Self: Sized + Message,

Available on crate feature objc2-app-kit and macOS only.

Parameter playerView: The player view.

Delegate can implement this method and return NO to prevent player view from automatically being miniaturized or losing focus when Picture in Picture starts.

Trait Implementations§

Source§

impl ProtocolType for dyn AVPlayerViewPictureInPictureDelegate

Source§

const NAME: &'static str = "AVPlayerViewPictureInPictureDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn AVPlayerViewPictureInPictureDelegate

Implementations on Foreign Types§

Source§

impl<T> AVPlayerViewPictureInPictureDelegate for ProtocolObject<T>

Implementors§