我正在尝试编写应用。我需要做Activity来观看在线流。现在尝试使用youtube。我有错误:/
这个代码:
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
Log.d(TAG, "Starting Video View");
setContentView(R.layout.video_views);
this.Url = getIntent().getStringExtra("Url");
Log.d(TAG, "Stream Address: " + Url);
video_view = (VideoView) findViewById(R.id.video_views);
Uri uri = Uri.parse(Url);
video_view.setVideoURI(uri);
video_view.requestFocus();
video_view.start();
}
这是错误:
04-17 09:16:07.151: D/MediaPlayer(26908): Couldn't open file on client side, trying server side
04-17 09:16:30.250: E/MediaPlayer(26908): error (1, -2147483648)
04-17 09:16:30.250: E/MediaPlayer(26908): Error (1,-2147483648)
04-17 09:16:30.250: D/VideoView(26908): Error: 1,-2147483648
Url是100%正确的,我无法在浏览器中打开它。有任何想法吗?我试图只在模拟器上打开,它可以成为问题的根源吗?