Reputation: 41
I'm trying to create a web radio application. For now, I'm able to play music from a streaming web radio, even when my application is on background (thanks to Background modes and the AVAudioSession singleton) I would like to know if I would be able, with the AVAudioPlayer class I'm using, to use the device music player to stream my web radio on the device locked screen and control it (see the screenshot I provided as an example) .
Thanks for reading me,
Maël
Upvotes: 1
Views: 90
Reputation: 41
I found an issue to my problem. All I had to do is to use the MPNowPlayingInfoCenter class and to set informations like the song title. The audio controls show themselves automatically when you play sound thanks to the AVAudioSession singleton.
Upvotes: 2