Hello i am trying to get my android 2.2 app stream music. So far I have been able to stream from a radio station via the mediaPlayer.setDataSource("STREAM HERE")
I have tried with a m3u file and it won’t work (unless my m3u file is wrong). Can it support xspf or what other file types?
How could i go about solving this problem?
thanks a lot
The
setDataSource()method on the media player will accept file or URIs for a media source. Look at this list to see what media formats the media player accepts: http://developer.android.com/guide/appendix/media-formats.htmlI am fairly certain that the media player will not play playlist files like M3U. You would have to create your own M3U player, which could be accomplished via the
MediaPlayermethod:setOnCompletionListener(MediaPlayer.OnCompletionListener listener)When playback is done, you could start playing the next media resource in your playlist.