MPMusicPlayerController
does not control the podcast app in iOS 7. Is there a way to pause, start, and seek a playing podcast in iOS 7 (podcast was started playing with the Podcast app).
If I do [[MPMusicPlayerController iPodMusicPlayer] play]
it stops the podcast and starts a music MP3.
[[MPMusicPlayerController applicationMusicPlayer] play]
does not work either.
You have to set the playlist to podcasts to play podcasts, like so:
MPMusicPlayerController *player = [MPMusicPlayerController iPodMusicPlayer];
MPMediaQuery *query = [MPMediaQuery podcastsQuery];
MPMediaItemCollection *collection =
[MPMediaItemCollection collectionWithItems:[query items]];
[player setQueueWithItemCollection:collection];
[player play];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.