I have an app that streams MP3 podcast files using an MPMediaPlayerViewController, as follows:
MPMoviePlayerViewController *v =
[[[MPMoviePlayerViewController alloc] initWithContentURL:url] autorelease];
[[v moviePlayer] setAllowsAirPlay:YES];
[[v moviePlayer] play];
[self presentMoviePlayerViewControllerAnimated:v];
NSError *myErr;
AVAudioSession *session = [AVAudioSession sharedInstance];
[session setCategory:AVAudioSessionCategoryPlayback error:&myErr];
The AVAudioSession call allows the audio to continue in the background.
This all works well, but when I stream the audio via Bluetooth to (eg) my car stereo, the track information and duration are not set.
Are there any tutorials around that say how to set this information so that the information correctly displays on the external player?
This code shows me my current playing track info in lockscreen. Try this:
currentPlayingAudiois my audio object with title and artist name properties. You can put your podcast name for example.