Search code examples
androidaudiostreammp3media-player

Live mp3 stream playing by Media Player without buffering


My question is about media player live streaming from the url in my application?

I'm trying to play live stream mp3 audio by media player.

The problem is that when i am using default URL as given in this link , then it works fine. But i changed the following mp3 link , then after playing 1 seconds it taking buffering and after completion its play the song, but i need that it plays the song with the buffering as well.

please help.

Thanks in advance.


Solution

  • It is not easy task to accomplish. You can use this link https://code.google.com/p/mp3tunes/source/browse/

    as reference app to develop your own progressive mediaplayer app. From the above link you will get the whole architecture for your app.Song downloading and playing is happens at the same time.The architecture developed in the reference app is more robust and reusable. Specially look at following classes

    • NanoHTTD.java
    • HttpServer.java
    • PlaybackService.java
    • PlaybackQueue.java
    • TrackDownloader.java

    Thank You.