在我的应用程序有一个videoview,我想在that.For播放YouTube视频,我试过很多方法,如播放YouTube视频的videoview
VideoView mVideoView = new VideoView(this);
setContentView(mVideoView);
mVideoView.setVideoURI(Uri.parse("rtsp://v3.cache7.c.youtube.com/CiILENy73wIaGQlOCTh0GvUeYRMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp"));
mVideoView.start();
对于这个我得到
08-13 12:33:07.443: D/MediaPlayer(618): Couldn't open file on client side, trying server side
08-13 12:33:09.003: E/MediaPlayer(618): error (1, -2147483648)
08-13 12:33:09.003: E/MediaPlayer(618): Error (1,-2147483648)
然后我试图
VideoView mVideoView = new VideoView(this);
setContentView(mVideoView);
mVideoView.setVideoURI(Uri.parse("vnd.youtube:GDD0Brw-udk"));
mVideoView.start();
这里也是我收到了同样的错误。
而且
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.youtube.com/watch?v=GDD0Brw-udk&feature=youtube_gdata_player")));
这让我的应用程序,并开始移动版YouTube,我无法控制。
我用另一种方法是
Intent lVideoIntent = new Intent(null, Uri.parse("http://www.youtube.com/get_video_info?&video_id=GDD0Brw-udk")
, this, IntroVideoActivity.class);
startActivity(lVideoIntent);
这也是不是为我工作..
我应该怎么do..Anyone帮我please..Thanx提前
duplicate http://stackoverflow.com/questions/3815090/webview-and-html5-video – jenuine 2012-08-13 07:37:39