YouTube Android Player API
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


blog comments powered by Disqus

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.



Fear And Loathing In the App Store 13 - Apple Rejects F.lux And It Isn't Even In The App Store!

I thought we had seen all the possibilities for troubles in the App Store, but this one reaches a new level of silliness. The app concerned wasn't even in the App Store, but Apple still managed to get [ ... ]

Microsoft's Astoria Android Emulation Might Not Happen

It has to be admitted that this isn't hard news, but there are a number of sources indicating that Microsoft might be having trouble with its project Astoria. 

More News

Last Updated ( Tuesday, 10 July 2012 )

RSS feed of news items only
I Programmer News
Copyright © 2015 All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.