I am using twilio to create a phone app. I have a link to a voicemail and I am trying to play the voicemail from a control in a tableview. Since I have never streamed audio before I decided to simplify everything and just try to stream audio from any URL. The URL I am trying to stream audio from is "http://ift.tt/1dOzwuu".
I have tried using examples from Apples Developer page but I guess I'm just not understanding the documentation.
This is what I am currently trying and I get an error.
NSURL *url = [NSURL URLWithString:@"http://ift.tt/1dOzwuu"];
NSError *error;
self.player = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:&error];
And I get This Error...
Error Domain=NSOSStatusErrorDomain Code=2003334207 "The operation couldn’t be completed. (OSStatus error 2003334207.)"
Am I going in the right direction or should I be doing something differently. I've found a number of different threads but none of what I see gets me to play audio. A Push in the right direction would be greatly appreciated.
Aucun commentaire:
Enregistrer un commentaire