ios - I am trying to play audio from server using AVAudioPlayer, but file not Playing -


i trying make online audio player. can't paly audio using avaudioplayer object. please me. in advance.

here audio player code. ================>>

nsurl *url =[[nsurl alloc] initwithstring:@"my url"];  xplayer = [[avaudioplayer alloc] initwithcontentsofurl:url error:nil]; xplayer.numberofloops = 0; xplayer.volume = 1.0f;  [xplayer preparetoplay]; [xplayer play]; 

q: avaudioplayer provide support streaming audio content?

a: avaudioplayer class not provide support streaming audio based on http url's. url used initwithcontentsofurl: must file url (file://). is, local path.

source: https://developer.apple.com/library/ios/qa/qa1634/_index.html


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -