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.
精彩评论