Audio playing while downloading

5 views
Skip to first unread message

ajay

unread,
May 31, 2012, 7:34:46 AM5/31/12
to iphonesdkd...@googlegroups.com
Hi Folks,

I am trying to download play audio file while downloading from the server. I gone through the AVAudioPlayer class and it has limited functionality. Can I achieve my requirement? I know how to download a file and how to play it once download completed and stored in sandbox.

I gone through the below link, But I am not sure will it work or not and more over I am not able look into internal functionality. Please suggest me the best link if the provided link is not correct




Regards,
Ajay Kumar



Aashish Bhatia

unread,
May 31, 2012, 11:55:55 AM5/31/12
to iphonesdkd...@googlegroups.com
NSURL *theURL = [NSURL urlWithString:@"http://yourdomain.com/yourmediafile.mp3"];

MPMoviePlayerController* yourPlayerController = [[MPMoviePlayerController alloc] initWithContentURL:theURL];

[yourPlayerController.moviePlayer play];

You can use this code to stream the audio and video as well.

Thanks,
Aashish

--
You received this message because you are subscribed to the Google Groups "iPhone SDK Development" group.
To post to this group, send email to iphonesdkd...@googlegroups.com.
To unsubscribe from this group, send email to iphonesdkdevelop...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/iphonesdkdevelopment?hl=en.



--
Regards,
Aashish Bhatia

Reply all
Reply to author
Forward
0 new messages