android-youtube-player is a stable and customizable open source YouTube player library for Android that wraps the IFrame Player API inside a WebView.
The library solves the problem of reliably playing YouTube videos on Android following Google's deprecation of the official YouTube Android Player API. It wraps Google's IFrame Player API, which runs inside a WebView, and exposes it through a native Java and Kotlin interface. This approach ensures compliance with YouTube's terms of service because it uses YouTube's own web player rather than attempting direct video access. The library also includes a Chromecast extension that enables casting YouTube videos from an app to Chromecast devices.
Developers should choose this tool if they need a straightforward way to embed YouTube playback in Android activities or fragments without managing the complexity of the IFrame API directly. The library provides a simple View that integrates easily into existing layouts. It suits any Android project requiring YouTube video playback, from small feature additions to media-heavy applications. The tool is particularly valuable for projects that previously relied on Google's deprecated official API and need a maintained alternative.
The project maintains active engagement with its user base through documentation and support channels. Development includes regular updates to address compatibility issues and maintain alignment with YouTube's platform changes. The codebase is written in Kotlin, reflecting modern Android development practices. The project accepts community contributions and maintains transparency about its development direction through its public repository and documentation site.