Thursday, June 17, 2010

[android-developers] Re: How to avoid PlayerDriver "invalid percentage value" error?

¿no help? :(

On Jun 10, 12:20 am, Androide <tonipr...@gmail.com> wrote:
> I want to play a live streaming in mp3, but when i call prepareAsync,
> "invalidpercentagevalue xxx" shows. This is a example of live
> streaming:
>
> http://83.231.187.202:80/rtve/radio1.mp3
>
> And this is my simplified code:
>
> mp = new MediaPlayer();
>         try {
>                         mp.setDataSource("http://83.231.187.202:80/rtve/radio1.mp3");
>                 } catch (Exception e) {
>                 }
>         mp.setOnPreparedListener( new OnPreparedListener() {
>                         @Override
>                         public void onPrepared(MediaPlayer mp) {
>                                 mp.start();
>                         }
>                 });
>
>         Button button = (Button) findViewById(R.id.Button01);
>         button.setOnClickListener( new OnClickListener() {
>                         @Override
>                         public void onClick(View v) {
>                                 mp.prepareAsync();
>                         }
>
> I understand why this is happening, but other apps use this method and
> don't show any error in logcat. How can i get this?
>
> Regards.

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment