Skip to content

Remote Command Center

levching edited this page Apr 15, 2020 · 3 revisions

The ISN_MPRemoteCommandCenter object that responds to remote control events sent by external accessories and system controls.

See the example how to listen for most popular events below:

using SA.iOS.MediaPlayer;
...

ISN_MPRemoteCommandCenter.OnPlayCommand.AddListener(() => {
    Debug.Log("OnPlayCommand");
});

ISN_MPRemoteCommandCenter.OnPauseCommand.AddListener(() => {
    Debug.Log("OnPauseCommand");
});

ISN_MPRemoteCommandCenter.OnStopCommand.AddListener(() => {
    Debug.Log("OnStopCommand");
});

ISN_MPRemoteCommandCenter.OnNextTrackCommand.AddListener(() => {
    Debug.Log("OnNextTrackCommand");
});

ISN_MPRemoteCommandCenter.OnPreviousTrackCommand.AddListener(() => {
    Debug.Log("OnPreviousTrackCommand");
});

About

Foundation

AV Foundation

App Tracking Transparency

Game Kit

Store Kit

UI Kit

Social

Replay Kit

Contacts

AVKit

Photos

App Delegate

User Notifications

MediaPlayer

Core Location

AdSupport

EventKit

CloudKit

Authentication Services

XCode

Knowledge Base

Clone this wiki locally