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

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -