如何在我的Andr​​oid应用程序播放YouTube视频?

问题描述:

我如何玩 YouTube的视频在我的应用程序?我想通过直接从YouTube无需下载流媒体播放视频。此外,虽然播放视频,我想提供的菜单选项。我不想用默认的意图播放视频。我怎样才能做到这一点?

How do I play YouTube videos in my application? I want to play video by streaming it directly from YouTube without downloading. Also, while playing videos, I want provide menu options. I don't want to play video using default intent. How can I do this?

这是BTN单击事件

btnvideo.setOnClickListener(new OnClickListener() {

public void onClick(View v) {

    startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse("http://www.youtube.com/watch?v=Hxy8BZGQ5Jo")));
    Log.i("Video", "Video Playing....");

    }
}); 

这种类型在另一个页面打开,并在YouTube,其中u可以显示你的视频

this type it opened in another page with the youtube where u can show your video