开发者

Android Video Streaming

I need HTTP/RTSP Video Streaming with And开发者_JAVA技巧roid. 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();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜