开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜