YouTube Android Player API
Written by Kay Ewbank   
Tuesday, 10 July 2012

A YouTube Android Player API was  'pre-announced' at Google I/O, and while the full announcement and release is still in the future, the API is available for use now.

Displaying and viewing YouTube content on Android devices currently means using the YouTube app or some compromise in ease of use or functionality. The new API will provide a native YouTube video experience, with full player controls from within your apps, meaning your users can view the videos without leaving your app.

You can get an overview of the API from the Google I/O session video:


The API is suitable for use with Android on mobiles, tablets and Google TV, and you’ll be able to carry out the basic coding to integrate videos in just three lines. The API has automatic support for full-screen change of orientation, and will adjust the quality of the stream according to the strength of the network connection. There’s even support for paid content.

There are actually several YouTube APIs alongside a collection of tools. The Data API can be used to carry out most of the operations a normal YouTube user can on the YouTube website.


The Player APIs let you control the YouTube player using JavaScript or ActionScript. You get a choice of using the basic embedded player, which already contains player controls, or the chromeless player, which lets you create your own player controls.

The embedded player is sufficient if you just want to add a player to your website to show individual videos or a playlist, though it can be customized to use a different color player or to alter some behaviors. It can also be used in conjunction with the Data API, so your app can find a video using the Data API and then display it using the embedded player. The player can be controlled using JavaScript or ActionScript from within a Flash application.

In either case, you can mimic user actions such as pausing the video, seeking ahead, and muting the sound. You can also poll the status of the player and listen for events, to let your code react to whatever the player is currently doing.

Next in complexity is the chromeless Player. This lets you display and work with a YouTube video with no controls, and it exposes the same JavaScript and ActionScript APIs as the embedded player does.


The Data API gives you everything you need to program a device or server-side logic for a website. You can use it to search for videos, retrieve standard feeds, and see related content. The API also lets your apps authenticate as a user to upload videos, and to modify user playlists. It gives you the means to work programmatically with the video and user information stored on YouTube.

The API manages the XML and HTTP requests and responses that the YouTube API servers expect and return. To make working with the API easier, Google has put together a number of client libraries that abstract the API into a language-specific object model, including Java, .NET, PHP, and Python.

More Information

YouTube API Overview Guide






or email your comment to:

To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, Facebook, Google+ or Linkedin,  or sign up for our weekly newsletter.



Foojay - All About Java and the OpenJDK

Tracking the OpenJDK is not an easy feat. It evolves rapidly under a release cycle of a new version every 6 months, hence there's hoards of new features, changes and bug fixes.This is where foojay ste [ ... ]

Computer History Under the Hammer

If you crave for a slice of computer history, an online auction from Bonhams salerooms in Los Angeles on November 5th provides plenty of choice. If you don't have deep enough pockets, just browsing th [ ... ]

More News

Last Updated ( Tuesday, 10 July 2012 )