Embed Native YouTube Videos in Android apps [YouTube Player API]
Google had opened up access to limited set of developers like Flipboard, which had been using and helping Google improve the Youtube API. YouTube native API for Android is finally out, and it hopes to simplify all types of YouTube integrations.
YouTube player API offers these benefits:
- High-quality video playback supported on Android 2.2 (Froyo) or newer
- Easy integration with your Android application (no WebView required)
- Fullscreen and orientation change support
- Closed captions display
- Support for YouTube ads
- Programmatic access, similar to existing Player APIs, to most aspects of the YouTube video playback experience
- Integration with the Android YouTube app using a standard set of YouTube Intents.
Apps like Flipboard, BuzzFeed, 9x9TV have already been using the Youtube Player API.
How to get started with Youtube Player API for Android
Step 2. Register your application in Google API console and obtain API key that would need to use in the app. (How to)
Step 3. Go through sample applications that describe the API usage in all video embedding formats.
- Video Wall
- Simple PlayerView
- Simple PlayerFragment
- Custom Player Controls
- Custom Fullscreen Handling
- Overlay ActionBar Demo
- Standalone Player
- YouTube App Launcher Intents
Checkout the Video below, it will walk you through Samples, YoutubePlayerApi usage and more.