Remote Command Center

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");
});