Also the URl is a http (MP3) stream URL - as opposed tioo other opost
where RTSP is being tried. It looks like it should just work. Has
anyone else got streaming working via a streaming URL?

On Sep 1, 1:24 pm, siliconeagle <rrmu...@gmail.com> wrote:
> I am trying to build streaming radio into my app, which works fines
> streaming files over the internet, but when i try to use a shoutcast
> url in get the error below, which from the soruce code looks liek the
> mediaPlayer is looking for the duration in the header. Does anyone
> know if shoutcast urls will work withthe default media player? Or do i
> have to download chunks into a ping-pong buffer sor something? The url
> has no porblems downloading via the browser.
>
> the error is:-
>
> 09-01 11:53:25.634 E/MediaPlayer(16972): stop called in state 1
> 09-01 11:53:27.324 D/BatteryWidget(15623): Updating Views
> 09-01 11:53:30.445 E/PlayerDriver(   35): Command PLAYER_INIT
> completed with an error or infoPVMFFailure
> 09-01 11:53:30.445 E/MediaPlayer(16972): error (1, -1)
> 09-01 11:53:30.504 I/NotificationService(   55): enqueueToast
> pkg=net.robmunro.mypod callback=android.app.ITransientNotification$Stub
> $pr...@4323b8f8 duration=1000
> 09-01 11:53:30.514 W/System.err(16972): java.io.IOException: Prepare
> failed.: status=0x1
> 09-01 11:53:30.644 W/System.err(16972): at
> android.media.MediaPlayer.prepare(Native Method)
> 09-01 11:53:30.644 W/System.err(16972): at
> net.robmunro.mypod.util.MediaPlayerWrapper.playMedia
> (MediaPlayerWrapper.java:111)
>
> the code i use is:-
> try {
>         mPlayer.stop();
>         mPlayer.reset();} catch (Exception e) {
>
>         e.printStackTrace();}
>
> this.source=source;
> if (source.equals(Globals.SOURCE_LOCAL)) {
>          mPlayer.setDataSource(f.path);
>          buffered = 0;} else if (source.equals(Globals.SOURCE_STREAM)) {
>
>         mPlayer.setDataSource(f.remoteUrl);
>          buffered = 100;}
>
> mPlayer.prepare();
> mPlayer.start();
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to