10.0.5 (Oct 13, 2019)
Aug 29, 2016
Nov 19, 2020
Pierfrancesco Soffritti (PierfrancescoSoffritti)
Andrew Shu (talklittle)
Matt Kula (matthewrkula)
Askar Syzdykov (askarsyzdykov)
Pierfrancesco Soffritti (PierfrancescoSoffritti)
RmK (rajeefmk)
Julien Guerinet (jguerinet)
Ankit Saliya (Apsaliya)
Valentin Hinov (ValCanBuild)
Anson Chen (ct7ct7ct7)
Kenshi Shiode (solt9029)
Hanno J. Gödecke (hannojg)
Abel Tesfaye (AbelTesfaye)
Lucas Vanhalst (lucasvanhalst)
Jakub Bartusiak (jbartusiak)
Kajetan Puchalski (mrkajetanp)
Source code
APK file



android-youtube-player is a stable and customizable open source YouTube player for Android. It provides a simple View that can be easily integrated in every Activity/Fragment.

To interact with YouTube the library uses the IFrame Player API, inside of a WebView, therefore the YouTube app is not required on the user's device and there are no issues with YouTube Terms of Service.

The web UI of the IFrame Player player is hidden. Instead, a native UI built on top of Android is used to interact with the player, providing a native experience to the users.

The UI of the player is 100% customizable. The default UI can be changed, to show and hide new views, or can be completely replaced by a custom UI.

This library also provides a Chromecast YouTube player, that you can use to cast YouTube videos from your app to a Chromecast device.

Why does this library exist?

The official library provided by Google to integrate YouTube videos in Android apps is the YouTube Android Player API. The official library is quite buggy (some bugs are 5+ years old) and lacks in support from Google. I found it to be quite unreliable and therefore unusable in production.

This, added to its limited options for customization and lack of Chromecast support, lead me to the development of this open source library.

A lengthier explanation to why you may want to consider using an alternative to the official YouTube player is written in this Medium post.

A list of published apps that are using this library: (let me know if you want to add your app to this list)

It is recommended that you add YouTubePlayerView as a lifecycle observer of its parent Activity/Fragment. You can read why in the documentation.

YouTubePlayerView youTubePlayerView = findViewById(;

(If you have problems adding YouTubePlayerView as a LifecycleObserver, you probably aren't using androidx, I suggest you migrate your dependencies)

That's all you need, a YouTube video is now playing in your app.

If you want more control, everything can be done programmatically by getting a reference to your YouTubePlayerView and adding a YouTubePlayerListener to it.

YouTubePlayerView youTubePlayerView = findViewById(;

youTubePlayerView.addYouTubePlayerListener(new AbstractYouTubePlayerListener() {
  public void onReady(@NonNull YouTubePlayer youTubePlayer) {
    String videoId = "S0Q4gqBUs7c";
    youTubePlayer.loadVideo(videoId, 0);