简体   繁体   中英

How to play specific song from music library?

If I'm using

MusicPlayer = MPMusicPlayerController.iPodMusicPlayer()

To get MPMusicPlayerController how skip all songs to get to one called "example song" (this line of code is getting me music player with all songs of iOS device)?

You will need to use the Media Player framework to explore the music library and find the song you want. Then you can put it into a queue and hand that queue to the iPod music player. Note that if playing the song is all you want to do, there may be better ways to do that than through the iPod music player; but the procedure for exploring the music library remains the same in any case.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM