Streaming Audio from A URL in Android using MediaPlayer?
Posted
by Sena Gbeckor-Kove
on Stack Overflow
See other posts from Stack Overflow
or by Sena Gbeckor-Kove
Published on 2009-12-27T11:40:32Z
Indexed on
2010/03/24
21:23 UTC
Read the original article
Hit count: 379
Hi,
I've been trying to stream mp3's over http using Android's built in MediaPlayer class. The documentation would suggest to me that this should be as easy as :
MediaPlayer mp = new MediaPlayer();
mp.setDataSource(URL_OF_FILE);
mp.prepare();
mp.start();
However I am getting the following repeatedly. I have tried different URLs as well. Please don't tell me that streaming doesn't work on mp3's.
E/PlayerDriver( 31): Command PLAYER_SET_DATA_SOURCE completed with an error or info PVMFErrNotSupported
W/PlayerDriver( 31): PVMFInfoErrorHandlingComplete
E/MediaPlayer( 198): error (1, -4)
E/MediaPlayer( 198): start called in state 0
E/MediaPlayer( 198): error (-38, 0)
E/MediaPlayer( 198): Error (1,-4)
E/MediaPlayer( 198): Error (-38,0)
Any help much appreciated, thanks S
© Stack Overflow or respective owner