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 { ... }
}AVPlayerView only.Expand description
Provided Methods§
Sourceunsafe fn playerViewWillStartPictureInPicture(&self, player_view: &AVPlayerView)
Available on crate feature objc2-app-kit and macOS only.
unsafe fn playerViewWillStartPictureInPicture(&self, player_view: &AVPlayerView)
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.
Sourceunsafe fn playerViewDidStartPictureInPicture(&self, player_view: &AVPlayerView)
Available on crate feature objc2-app-kit and macOS only.
unsafe fn playerViewDidStartPictureInPicture(&self, player_view: &AVPlayerView)
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.
Sourceunsafe fn playerView_failedToStartPictureInPictureWithError(
&self,
player_view: &AVPlayerView,
error: &NSError,
)
Available on crate feature objc2-app-kit and macOS only.
unsafe fn playerView_failedToStartPictureInPictureWithError( &self, player_view: &AVPlayerView, error: &NSError, )
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.
Sourceunsafe fn playerViewWillStopPictureInPicture(&self, player_view: &AVPlayerView)
Available on crate feature objc2-app-kit and macOS only.
unsafe fn playerViewWillStopPictureInPicture(&self, player_view: &AVPlayerView)
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.
Sourceunsafe fn playerViewDidStopPictureInPicture(&self, player_view: &AVPlayerView)
Available on crate feature objc2-app-kit and macOS only.
unsafe fn playerViewDidStopPictureInPicture(&self, player_view: &AVPlayerView)
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.
Sourceunsafe fn playerView_restoreUserInterfaceForPictureInPictureStopWithCompletionHandler(
&self,
player_view: &AVPlayerView,
completion_handler: &DynBlock<dyn Fn(Bool)>,
)
Available on crate feature block2 and crate feature objc2-app-kit and macOS only.
unsafe fn playerView_restoreUserInterfaceForPictureInPictureStopWithCompletionHandler( &self, player_view: &AVPlayerView, completion_handler: &DynBlock<dyn Fn(Bool)>, )
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.
Sourceunsafe fn playerViewShouldAutomaticallyDismissAtPictureInPictureStart(
&self,
player_view: &AVPlayerView,
) -> bool
Available on crate feature objc2-app-kit and macOS only.
unsafe fn playerViewShouldAutomaticallyDismissAtPictureInPictureStart( &self, player_view: &AVPlayerView, ) -> bool
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.