I use AVAudioPlayer to play sound, and it works great when playing files locally stored on a PC.
But when I give the URL of some audio file over the Internet, it fails. This is what the code looks like:
NSString *url = [[NSString alloc] init]; url = @"http://files.website.net/audio/files/audioFile.mp3"; NSURL *fileURL = [[NSURL alloc] initWithString: url]; AVAudioPlayer *newPlayer =[[AVAudioPlayer alloc] initWithContentsOfURL: fileURL error: nil];
Can someone point out the problem and what can be done?
Thank!
ios objective-c streaming avaudioplayer
Bangdel 03 Sep '10 at 12:40 2010-09-03 12:40
source share