banner



How To Play Radio On Iphone 5

4 Answers 4

Matt Gallagher wrote a very good class for playing streaming audio on the Mac desktop and on the iPhone. See it here How To Stream Internet Radio on iPhone.

The flipside is you need a server running Nicecast, Shoutcast, Icecast or some other MP3 or AAC streaming audio software. And of course this server will need an audio connection to the radio station - either through an FM receiver, analog connection or dedicated hardware - entirely based upon the capabilities and infrastructure of the station.

answered Jun 22 '09 at 16:14

iPhone OS 3.0 supports live streaming via HTTP of MPEG-2 transport streams containing AAC audio (HE-AAC or AAC-LC). You'll find everything you need to know in the HTTP Live Streaming Overview.

answered Jun 22 '09 at 12:58

yes you can play online streaming radio on your iPhone, use MPMoviePlayerController to stream your music

first you should import media player framework and audio toolbox framework

then import

                                  #import <MediaPlayer/MediaPlayer.h>  MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:    [NSURL URLWithString:@"YOUR URL"]];     player.movieSourceType = MPMovieSourceTypeStreaming;     player.view.hidden = YES;     [self.view addSubview:player.view];     [player prepareToPlay];     [player play];                              

you can stop playing music by just calling

                [player stop];                              

thank you,

answered Apr 4 '12 at 9:23

3

  • I tried this but it stops after 3 seconds and I have to click the play button again. Is there a setting that I should do for the player object to let it play continuously?

    Apr 22 '13 at 16:19

  • I solved this by initializing an instance-variable rather than just using the code above.

    May 5 '13 at 16:20

  • @antf MPMoviePlayerController will stream continuously , i think u have tried some opensources ! just put the code in the did load and it will work perfectly

    May 7 '13 at 11:47

You can use the AVPlayer class from the AVFoundation framework for playing streaming audio from a server. AVPlayer will only play codecs supported by the iOS SDK like mp3 and aac.

Some radio stations use the Microsoft streaming server which uses the mms:// protocol and the wma audio codec which is not supported by the iOS SDK. If you want to play these radio stations you must use a third party library like libmms or FFmpeg. The third party libraries will take care of the mms:// protocol and wma codec but you'll still need to use the Audio Queue services for playing the decoded audio data.

answered Dec 21 '11 at 13:03

How To Play Radio On Iphone 5

Source: https://stackoverflow.com/questions/1026449/how-to-stream-internet-radio-on-iphone

Posted by: griggsnour1949.blogspot.com

0 Response to "How To Play Radio On Iphone 5"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel