开发者

How i play Mp3 from server from avaudioplayer

I am new in iPhone,Anyone tell me ple开发者_如何转开发ase how i play audio uploaded on server. in my application some songs are from local and some others are from Server,Locally i play songs successfully but how i play a audio file from server from AVAudioplayer.

Thanks, Arun


As documented:

AVAudioPlayer *player = [AVAudioPlayer initWithContentsOfUrl:urlToAudioResource];
[player play];


http://github.com/mattgallagher/AudioStreamer


AVAudioPlayer plays file when it loads. To stream audio you should try use AVPlayer. It can play audio from web servers without UI freezing.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜