如何在Android中播放.avi视频?来自网址的视频。
答案 0 :(得分:-1)
嘿,您可以尝试以下代码,使用网址
播放视频 String link="http://s1133.photobucket.com/albums/m590/Anniebabycupcakez/?action=view& current=1376992942447_242.avi";
VideoView videoView = (VideoView) findViewById(R.id.VideoView);
MediaController mediaController = new MediaController(this);
mediaController.setAnchorView(videoView);
Uri video = Uri.parse(link);
videoView.setMediaController(mediaController);
videoView.setVideoURI(video);
videoView.start();
使用VideoView只需设置uri:
videoView.setVideoURI(Uri.parse(videoUrl));