0
這是我的代碼,用於通過在編碼中提供所需的視頻網址來下載視頻,它以我的方式自動下載,但它的任何內容都不能正常工作。我的視頻下載程序不能正常工作
import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.widget.MediaController;
import android.widget.VideoView;
public class Video extends Activity {
/** Called when the activity is first created. */
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(R.layout.main);
VideoView videoView = (VideoView)this.findViewById(R.id.videoView);
MediaController mc = new MediaController(this);
videoView.setMediaController(mc);
// (1) Web
videoView.setVideoURI(Uri.parse("http://www.youtube.com/watch?v=CHVhwcOg6y8"));
videoView.requestFocus();
videoView.start();
}
}
答案是否解決了您的問題? – Karthik 2011-12-20 09:05:31