Has anyone ever gotten MediaPlayer to play audio streams directly off
the network without having to download them first?

Here is my naive code straight out of the manual:

---snip---
_player = new MediaPlayer();
_player.setOnPreparedListener(this);
_player.setOnErrorListener(this);
_player.setOnBufferingUpdateListener(this);
_player.setAudioStreamType(AudioSystem.STREAM_MUSIC);
_player.setDataSource("http://myurlhere/file.mp3";);
_player.prepareAsync();
---snip---

If I use prepareAsync(), onError() gets called with the mysterious
parameters 1, 0. If I use prepare(), I get an equally mysterious
IOException with no detail string.

I notice a number of people have tried this --- has anyone actually
succeeded?

-- 
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "I have always wished for my computer to be as easy to use as my
│ telephone; my wish has come true because I can no longer figure out
│ how to use my telephone." --- Bjarne Stroustrup

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to