MPPlayableContentDelegate

Trait MPPlayableContentDelegate 

Source
pub unsafe trait MPPlayableContentDelegate: NSObjectProtocol {
    // Provided methods
    unsafe fn playableContentManager_initiatePlaybackOfContentItemAtIndexPath_completionHandler(
        &self,
        content_manager: &MPPlayableContentManager,
        index_path: &NSIndexPath,
        completion_handler: &DynBlock<dyn Fn(*mut NSError)>,
    )
       where Self: Sized + Message { ... }
    unsafe fn playableContentManager_initializePlaybackQueueWithCompletionHandler(
        &self,
        content_manager: &MPPlayableContentManager,
        completion_handler: &DynBlock<dyn Fn(*mut NSError)>,
    )
       where Self: Sized + Message { ... }
    unsafe fn playableContentManager_initializePlaybackQueueWithContentItems_completionHandler(
        &self,
        content_manager: &MPPlayableContentManager,
        content_items: Option<&NSArray>,
        completion_handler: &DynBlock<dyn Fn(*mut NSError)>,
    )
       where Self: Sized + Message { ... }
    unsafe fn playableContentManager_didUpdateContext(
        &self,
        content_manager: &MPPlayableContentManager,
        context: &MPPlayableContentManagerContext,
    )
       where Self: Sized + Message { ... }
}
👎Deprecated: Use CarPlay framework
Available on crate feature MPPlayableContentDelegate only.
Expand description

The MPPlayableContentDelegate is a protocol that allows for external media players to send playback commands to an application. For instance, the user could browse the application’s media content (provided by the MPPlayableContentDataSource) and selects a content item to play. If the media player decides that it wants to play the item, it will ask the application’s content delegate to initiate playback.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn playableContentManager_initiatePlaybackOfContentItemAtIndexPath_completionHandler( &self, content_manager: &MPPlayableContentManager, index_path: &NSIndexPath, completion_handler: &DynBlock<dyn Fn(*mut NSError)>, )
where Self: Sized + Message,

👎Deprecated: Use CarPlay framework
Available on crate features MPPlayableContentManager and block2 only.

This method is called when a media player interface wants to play a requested content item. The application should call the completion handler with an appropriate error if there was an error beginning playback for the item.

Source

unsafe fn playableContentManager_initializePlaybackQueueWithCompletionHandler( &self, content_manager: &MPPlayableContentManager, completion_handler: &DynBlock<dyn Fn(*mut NSError)>, )
where Self: Sized + Message,

👎Deprecated: Use Intents framework for initiating playback queues.
Available on crate features MPPlayableContentManager and block2 only.

This method is called when a media player interface wants the now playing app to setup a playback queue for later playback. The application should load content into its play queue but not start playback until a Play command is received or if the playable content manager requests to play something else. The app should call the provided completion handler once it is ready to play something.

Source

unsafe fn playableContentManager_initializePlaybackQueueWithContentItems_completionHandler( &self, content_manager: &MPPlayableContentManager, content_items: Option<&NSArray>, completion_handler: &DynBlock<dyn Fn(*mut NSError)>, )
where Self: Sized + Message,

👎Deprecated: Use Intents framework for initiating playback queues.
Available on crate features MPPlayableContentManager and block2 only.

This method is called when a media player interface wants the now playing app to setup a playback queue for later playback. The application should load content into its play queue based on the provided content items and prepare it for playback, but not start playback until a Play command is received or if the playable content manager requests to play something else. A nil contentItems array means that the app should prepare its queue with anything it deems appropriate. The app should call the provided completion handler once it is ready to play something.

Source

unsafe fn playableContentManager_didUpdateContext( &self, content_manager: &MPPlayableContentManager, context: &MPPlayableContentManagerContext, )
where Self: Sized + Message,

👎Deprecated: Use CarPlay framework
Available on crate features MPPlayableContentManager and MPPlayableContentManagerContext only.

This method is called when the content server notifies the manager that the current context has changed.

Trait Implementations§

Source§

impl ProtocolType for dyn MPPlayableContentDelegate

Source§

const NAME: &'static str = "MPPlayableContentDelegate"

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 MPPlayableContentDelegate

Implementations on Foreign Types§

Source§

impl<T> MPPlayableContentDelegate for ProtocolObject<T>

Implementors§