【发布时间】:2016-02-02 17:05:06
【问题描述】:
【问题讨论】:
-
@MarcinOrlowski 好吧,我试图把它放在 VideoView 中,但没有用。我还看到我可以使用 Youtube API。但如果有办法不用它,我会更喜欢。
标签: android android-intent youtube
【问题讨论】:
标签: android android-intent youtube
您需要使用 YouTube Android Player API。请参阅此处的说明:https://developers.google.com/youtube/android/player/
如果您想通过Intent 打开 youtube 频道,您可以使用以下 sn-p:
public static void watchYoutubeVideo(Context context, String channelId) {
Intent intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("http://www.youtube.com/channel/" + channelId));
context.startActivity(intent);
}
【讨论】: