Reputation: 230
I am new in iPhone,Anyone tell me please 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
Upvotes: 1
Views: 1525
Reputation: 4929
AVAudioPlayer plays file when it loads. To stream audio you should try use AVPlayer. It can play audio from web servers without UI freezing.
Upvotes: 1
Reputation: 3321
As documented:
AVAudioPlayer *player = [AVAudioPlayer initWithContentsOfUrl:urlToAudioResource];
[player play];
Upvotes: 1