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.
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.
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.?
Does ExoPlayer support playlist as sourceData ?
I need to get an array of url's streaming videos and play them one after another.
My problem is that if I switch to next video after the first is finished, it will take time to load it and it is not playing them continuously (meaning starting to load the next before the first ends).
Is there any way to do that in ExoPlayer ? or any other player ?
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.
I want to play youtube videos in my application.I get this data from gdata.youtube.com with a xml.Is there a more suitable way to do this?
Also i want to play only audio part of a youtube video.I don't want to show video view.Is it possible in MediaPlayer component?
Attempting to do this is in violation of YouTube's Terms of Service (Section II, item 10 and item 14 stops you from creating tiny, unnoticeable player windows)