Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198
MediaRemote.framework: Difference between revisions - iPhone Development Wiki

MediaRemote.framework: Difference between revisions

From iPhone Development Wiki
(+ changing from second person to third person)
(second person is less awkward here)
 
Line 9: Line 9:
MediaRemote uses commands to control various things.
MediaRemote uses commands to control various things.


One can send a command to the server by doing:
You can send a command to the server by doing:


<source lang=C>
<source lang=C>

Latest revision as of 08:29, 22 January 2014

MediaRemote.framework
Private Framework
Availabile 5.0 – present
Class Prefix MR
Headers [headers.cynder.me]

MediaRemote is a framework that is used to communicate with the media server, mediaserverd. It can be utilized to query the server for now playing information, play or pause the current song, skip 15 seconds, etc.

Sending a command

MediaRemote uses commands to control various things.

You can send a command to the server by doing:

MRMediaRemoteSendCommand(kMRTogglePlayPause, 0);

For a complete list of commands, see the header file at the bottom of this page.

Getting now playing information

You may use the MRMediaRemoteGetNowPlayingInfo function to get information about the playing media. See the header file for a list of keys to use with the dictionary.

MRMediaRemoteGetNowPlayingInfo(dispatch_get_main_queue(), ^(CFDictionaryRef information) {
        NSLog(@"We got the information: %@", information);
});

References