I have to play Dailymotion videos in an Android APP, but I must not do it in a WebView . VideoView class just accepts files streamed, and Dailymotion API has'nt got any resource for Android.
Does anyone know how to implement it?
Thanks!
String LINK = "Your_Link_Goes_Here";
setContentView(R.layout.mediaplayer);
VideoView videoView = (VideoView) findViewById(R.id.video);
MediaController mc = new MediaController(this);
mc.setAnchorView(videoView);
mc.setMediaPlayer(videoView);
Uri video = Uri.parse(LINK);
videoView.setMediaController(mc);
videoView.setVideoURI(video);
videoView.start();
Try out this code..
VideoView is the best and in video view you can play streaming url also you can play the local files which you have on device sdcard or embeeded with in your app..
Refer this LINK this a sample
LINK
Related
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.
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)
I am making live tv channel streaming app.
But when i try to play the .sdp files in the android videoview it gives the error that "Sorry can't play this video".But it is playing .mp4 and .3gp videos successfully.
What should i do.I googled alot but in vain.
String VideoURL = "rtsp://pull.newclear.tv/live/livestream2_160p";
//"rtsp://pull.newclear.tv/live/livestream2_160p";
//.sdp links are also giving same error
//links of above type are not working
This is my code for videoview
MediaController mediacontroller = new MediaController(
VideoViewActivity.this);
mediacontroller.setAnchorView(videoview);
// Get the URL from String VideoURL
Uri video = Uri.parse(VideoURL);
videoview.setMediaController(mediacontroller);
videoview.setVideoURI(video);
I am getting multiple Youtube URL from Json through this link!
First Thing is that when i play one url VideoView . I am getting ## Sorry ! this video cannot played##. I have searched for this where RTSP url support VideoView.
Now How I'll get RTSP Url. & How to Play Multiple Videos?
My VideoView Code Is:-
VideoView videoView = (VideoView) findViewById(R.id.VideoView);
Button youtube=(Button)findViewById(R.id.button1);
MediaController mediaController = new MediaController(this);
mediaController.setAnchorView(videoView);
Uri video = Uri.parse("http://m.youtube.com/details?v=LKLHoNy5xpE");
videoView.setMediaController(mediaController);
videoView.setVideoURI(video);
videoView.start();
Hello i am new android developer. And I don't know about Live Streaming Hindi TV channels. I find on net but not get perfect idea.
Can anybody give me idea about how android works with live Streaming channels.
THanks in advance.
Dimple
You can use VideoView for this. Try following:
String LINK = "type_here_the_link";
setContentView(R.layout.mediaplayer);
VideoView videoView = (VideoView) findViewById(R.id.video);
MediaController mc = new MediaController(this);
mc.setAnchorView(videoView);
mc.setMediaPlayer(videoView);
Uri video = Uri.parse(LINK);
videoView.setMediaController(mc);
videoView.setVideoURI(video);
videoView.start();
For more info, please see this: how to play video from url
I need HTTP/RTSP Video Streaming with Android. Any Ideas ?
Is that possible to go with JMF with Android ? Any Working examples ?
Already tried with
http://davanum.wordpress.com/2007/12/29/android-videomusic-player-sample-from-local-disk-as-well-as-remote-urls/
Its not working with my case. Are there any specific types of videos that Android can stream ?
Thanks.
You don't necessarily need JMF. Android has built in support for HTTP/RTSP video streaming.
Try this:
String LINK = "type_here_the_link";
setContentView(R.layout.mediaplayer);
VideoView videoView = (VideoView) findViewById(R.id.video);
MediaController mc = new MediaController(this);
mc.setAnchorView(videoView);
mc.setMediaPlayer(videoView);
Uri video = Uri.parse(LINK);
videoView.setMediaController(mc);
videoView.setVideoURI(video);
videoView.start();