This page provides a brief overview of the sample applications included in the YouTubeAndroidAPIDemo
package in the API download. To run these projects on your Android device, follow the instructions for enabling USB debugging.
- Video Wall
- Simple PlayerView
- Simple PlayerFragment
- Custom Player Controls
- Custom Fullscreen Handling
- Overlay ActionBar Demo
- Standalone Player
- YouTube App Launcher Intents
Video Wall
Simple PlayerView
This app shows how to use a YouTubePlayerView
to play a video.
Simple PlayerFragment
This app shows how to use a YouTubePlayerFragment
to play a video.
Custom Player Controls
This app displays several custom controls to demonstrate the use of YouTubePlayer
programmatic controls. The app shows a dropdown menu that cues a video or a playlist, a play button, a pause button, and an input field that lets you specify a point to skip to in the video. It also shows an event log that lists player state changes as they happen.
Custom Fullscreen Handling
This app demonstrates the best practice for handling fullscreen video playback. This custom fullscreen handling method is preferred because the YouTube player's default fullscreen implementation causes rebuffering of the video.
Overlay ActionBar Demo
This app shows how you can overlay an action bar on the player when it is in fullscreen mode.
Standalone Player
This app shows how to use a YouTubeStandalonePlayer
intent to start a standalone YouTube player in a separate activity. This player can either be fullscreen or it can appear as a dialog above the current activity.
YouTube App Launcher Intents
This app uses the static methods in the YouTubeIntents
class to create Intents that navigate the user to Activities within the main YouTube application on the device.