我有這樣的代碼:Android和視頻流
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
String url = "http://people.sc.fsu.edu/~jburkardt/data/mp4/cavity_flow_movie.mp4";
videoPlayer(url);
}
public void videoPlayer(String url){
getWindow().setFormat(PixelFormat.TRANSLUCENT);
VideoView videoHolder = (VideoView) findViewById(R.id.videoView1);
videoHolder.setMediaController(new MediaController(this));
videoHolder.setVideoPath(url);
videoHolder.requestFocus();
videoHolder.start();
}
如果工作正常,但如果URL是http://www.tuoregalo.com/video2.avi那不行....爲什麼?錯誤消息是「不可視的視頻」