display video from url
Can you give an example, how to display v开发者_运维知识库ideo from the url?
The easier way:
public class A extends Activity{
public void onCreate(Bundle b){
super.onCreate(b);
VideoView videoView = new VideoView(this);
setContentView(videoView);
videoView.setVideoPath("http://example.com/video.mp4");
videoView.setMediaController(new MediaController(this));
videoView.requestFocus();
videoView.start();
}
}
精彩评论