开发者

how to know which song is playing in avaudioplayer

开发者 https://www.devze.com 2023-02-16 04:54 出处:网络
ho开发者_开发知识库w to know which song is playing in avaudioplayerThe \"url\" property of AVAudioPlayer returns the file path of the file currently being played.

ho开发者_开发知识库w to know which song is playing in avaudioplayer


The "url" property of AVAudioPlayer returns the file path of the file currently being played.

I have a feeling what you're actually asking is how to find out which song is playing in the system though. In which case you should use nowPlayingItem in MPMusicPlayerController. This shows, for example, which song is playing in iTunes.


just get its property .url:

  //NO:  your.AVAudioPlayer.url;

EDIT:

yourAVAudioPlayer.url; // 
0

精彩评论

暂无评论...
验证码 换一张
取 消