YouTube

Sample Applications

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.

  1. Video Wall
  2. Simple PlayerView
  3. Simple PlayerFragment
  4. Custom Player Controls
  5. Custom Fullscreen Handling
  6. Overlay ActionBar Demo
  7. Standalone Player
  8. YouTube App Launcher Intents

Video Wall

This application combines API features with other functionality in the Android SDK to show off the API's capabilities. The app shows a video wall of thumbnail images for videos in a YouTube playlist. One of the thumbnails will flip over and begin playing a video from the playlist, which will play until it finishes. After that, the video will be replaced with a thumnbail, and a different thumbnail will flip over to play another video.

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.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.