2

I am trying to find the best way to play a URL of an mp3. I've tried Audiostreamer but it doesn't fit my needs as it's geared towards infinite streams, and not finite streams.

Any help is appreciated!

Thanks!

WedTM
  • 2,587
  • 5
  • 37
  • 54

1 Answers1

1

AVAudioPlayer is your answer:

http://developer.apple.com/iPhone/library/documentation/AVFoundation/Reference/AVAudioPlayerClassReference/Reference/Reference.html#//apple_ref/occ/instm/AVAudioPlayer/initWithContentsOfURL:error:

Dan Lorenc
  • 5,376
  • 1
  • 23
  • 34
  • What if the URL needs to have a cookie passed to it? – WedTM Jun 18 '09 at 18:32
  • Then you can use the [AVAudioPlayer initWithData] method. Use an NSURLRequest to generate the proper request with the cookie, then save the response as an NSData object. – Dan Lorenc Jun 18 '09 at 19:24