I have to Playlist of songs by fetching them from the server. I am using MediaPlayer OnCompletionListner to play the next song. But each time it taking time to connect to the server. Which feels like lagging in playing in audio. Is there any solution to play files from the server one after another without ant lag.?
Related
I am preparing an application that plays playlists of 10 songs in m3u8 format. I am using ResolvingDataSource because I am fetching the m3u8 url to the audio file before starting playback.
Is it possible for ResolvingDataSource.Resolver to invoke every time the track changes?
Thanks for any help
I noticed that when ResolvingDataSource.Resolver takes the url to track in the playlist one time, when I go back to the same position again the exoplayer takes the m3u8 url from memory without calling ResolvingDataSource.Resolver.
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.
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.
Trying write a media player app in android. I am thinking how to import the songs automatically for my media player app when I copy new song to my smartphone. Because everytime I open my media player app, it has to fetch the music files on my device and list the tracks. So it will be so slow and takes processing power. So any idea how should I implement this in efficient way?
I have a link that directly starts downloading of the song, but I want to stream that song in my app without downloading. Is it possible? Please help me through.
Link is: http://workintelligentonline.com/church/audio/1New Stories (Highway Blues).wma
For your application to play the song, the decoder has to read the data from memory. So the streaming data has to stored into a buffer or a page-cache implementation which is then fed to the decoder.
Once the song playback is completed, the MediaPlayer engine is closed which will release the allocated memory too. As long as your application doesn't write the contents of the memory into a file, you have technically played a streaming song without downloading.
I have created one songs album app. In this app, i have to play the songs by using URLs. These URLs gave me 2 types of songs.The first one is on-demand songs, which are our regular songs limited to 5 or 6 minutes. I dont have any problems to play/stop these songs with MediaPlayer object. The second one is live streaming, which is nothing but shout casting.With this shout-casting URLs, the MediaPlayer object is not working properly that means after playing say some 5 seconds of song the mediaplyer stops playing. I dont know what is the problem with live streaming data. if anyone knows about this, please guide me to rock the Mediaplayer.
Thanks
Venu
To play live streaming we need to set mp.setAudioStreamType(AudioManager.STREAM_MUSIC);
It works for me a lot.