YouTube Player library for Android and Chromecast, stable and customizable. Work fast with our official CLI. Learn more. If nothing happens, download GitHub Desktop and try again. If nothing happens, download Xcode and try again. If nothing happens, download the GitHub extension for Visual Studio and try again.
Account Options Sign in. Top charts. New releases. Add to Wishlist. A complete video and music player app, it supports music and videos of all the major formats. It will fetch all kinds of saved content on your Android device and will even let you play YouTube music videos as well.
The API defines methods for loading and playing YouTube videos and playlists and for customizing and controlling the video playback experience. You can then control playback programmatically. For example, you can play, pause, or seek to a specific point in the currently loaded video. You can also register event listeners to get callbacks for certain events, such as the player loading a video or the player state changing. Finally, the API has helper functionality to support orientation changes as well as transitions to fullscreen playback. The API client library interacts with a service that is distributed as a part of the YouTube app for the Android platform. The client library has a light footprint, meaning it won't adversely impact your app's file size, if you use ProGuard as part of your build process. However, upgrading is not necessary if you do not care about new features or bug fixes. Generally, devices running Android 2.
Adding video content to your Android app can create a great interactive experience for your users. YouTube offers a massive library of videos and a reliable video streaming platform that you can leverage to embed video into your Android app. YouTube offers an official API to allow developers to play YouTube videos in their app, however, it has not been updated in a long time and it requires the user to have the YouTube app installed on their device. A great alternative free to use, open-source API that allows you to embed YouTube videos to be played within an Android app is android-youtube-player created by Pierfrancesco Soffritti. In addition to being able to play videos from YouTube, android-youtube-player also you to customize the user interface of the video player as well as offering the ability to cast YouTube videos from the player to a Chromecast device. In this post I will show you how to set up and the android-youtube-player library in your Android project and play YouTube videos embedded into your app. To obtain the latest Gradle dependency for the android-youtube-player API check out the GitHub repository for the project at the link below.