Re: Displaying playing track information
Re: Displaying playing track information
- Subject: Re: Displaying playing track information
- From: Rick Mann <email@hidden>
- Date: Wed, 19 Nov 2014 01:33:40 -0800
> On Nov 18, 2014, at 21:30 , Anthony Myatt <email@hidden> wrote:
>
> MPNowPlayingInfoCenter (https://developer.apple.com/Library/ios/documentation/MediaPlayer/Reference/MPNowPlayingInfoCenter_Class/index.html) allows you to set the title, artist, album, etc on the lock screen and connected devices.
So, I'm calling the code like this:
MPNowPlayingInfoCenter* ic = [MPNowPlayingInfoCenter defaultCenter];
ic.nowPlayingInfo =
@{
MPMediaItemPropertyTitle : self.episode.title,
MPMediaItemPropertyAlbumTitle : self.episode.segment.name,
MPMediaItemPropertyArtist : @"Artist",
MPMediaItemPropertyComposer : @"Composer",
MPMediaItemPropertyMediaType : @(MPMediaTypePodcast),
MPMediaItemPropertyPlaybackDuration : @(self.player.duration),
MPNowPlayingInfoPropertyElapsedPlaybackTime : @(self.player.currentTime),
};
But nothing appears in the lock screen.
If I connect to my AppleTV, and begin playback, the AppleTV shows the track information for the "Now Playing" in the Music app, but plays the audio from my app.
--
Rick Mann
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden