Reputation: 2608
Can any one suggest which player will support to play live streaming video url's in android, That player has to retrieve metadata which is loaded in live streaming video Url's.
I tried with below code.
VideoView mVideoView = (VideoView) findViewById(R.id.videoView);
MediaController mc = new MediaController(this);
mc.setAnchorView(mVideoView);
mc.setMediaPlayer(mVideoView);
Uri video = Uri.parse("http://71.177.216.160:8888/abr/playlist.m3u8");
mVideoView.setMediaController(mc);
mVideoView.setVideoURI(video);
mVideoView.start();
Using the above code, we can play the video. But How can i retrive metadata from the playing video url..??
Can any one help me.
Upvotes: 1
Views: 1154
Reputation: 650
You can try Vitamio SDK to play live streams in Android. Use the MediaMetadataRetriever
class to access the metadata like this:
MediaMetadataRetriever retriever = new MediaMetadataRetriever(this);
retriever.setDataSource(path);
retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION);
retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_TITLE)
Upvotes: 0