时间:2010-07-26 06:52:46

标签: android video-streaming jmf http-streaming

1 个答案:

答案 0 :(得分:2)

您不一定需要JMF。 Android内置支持 HTTP / RTSP视频流

试试这个:

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();