Android youtube API play two or more Youtube players in one main activity Android youtube API play two or more Youtube players in one main activity json json

Android youtube API play two or more Youtube players in one main activity


Maybe trivial answer. But is for your use-case acceptable to call init of second youtube player from success callback of the first one? Have you tried it? It should be a reasonable workaround.

But there might be a catch that is extending YouTubeBaseActivity I looked up documentation, and it looks like there can be only one YouTubeView per activity because of binding between them.

So I can offer another advice, use YouTubePlayerFragment or SupportYouTubePlayerFragment instead. It should have its own lifecycle (not tested).


To achieve two or more youtube players at one activity you need to use YouTubeThumbnailView(It is an ImageView) to show a list of preview images. When the user touch the thumb, you redirect to full screen video player.

Check out this project.