如何通过Intent播放YouTube视频?

时间:2013-08-21 08:06:24

标签: android android-intent youtube android-youtube-api

在我的应用中,我想点击特定按钮,然后跳转到youtube应用并显示youtube用户.Eg http://www.youtube.com/user/punjabiradiousa。怎么可能请提出一些技巧?

3 个答案:

答案 0 :(得分:8)

这样做:

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.youtube.com/user/punjabiradiousa")));

从这里采取:Android YouTube app Play Video Intent

答案 1 :(得分:1)

此代码我以前用过播放YouTube视频

Matcher matcher = Pattern.compile("http://www.youtube.com/embed/").matcher(mVideoId);
matcher.find()
Intent lVideoIntent = new Intent(
                                null,
                                Uri.parse("ytv://" + mVideoId),
                                MainScreen.mContext,
                                com.kids.youtube.OpenYouTubePlayerActivity.class);
                                startActivity(lVideoIntent);

答案 2 :(得分:0)

正在运作

myFunct'
相关问题