[android-developers] Re: MediaPlayer - Streaming
Is that URL a streamable media file playable by Android? It doesn't
look like that to me.
Doug
On Jul 7, 1:51 am, Thanh Le Cong <thanh...@gmail.com> wrote:
> Hello Everybody,
> I want to use MediaPlayer play a file mp3 or video with Streaming. I have
> code:
> try {
> String path = "http://codpro.tk/test.mp3";
> mediaPlayer = new MediaPlayer();
> mediaPlayer.setDataSource(path);
>
> mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
> mediaPlayer.prepare();
> mediaPlayer.start();
> } catch (Exception e) {
> Toast.makeText(PlayLocalFiles.this, e.getMessage(),
> Toast.LENGTH_LONG);
> txtStatus.setText(e.getMessage());
> }
> I got error message: "Prepare failed.: status=0x1". I have been search for
> slove it and repair it. But I didn't solve the problem yet.
>
> Could you please help me?
> Thank you,
> --
> Thanh, Le Cong <http://fit.utehy.edu.vn/codepro>
--
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
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home