|Basic||Player APIs with embedded player|
|Medium||Player APIs with chromeless player|
|Advanced||Data API and Player APIs with chromeless player|
Players and Player APIs
YouTube players can be embedded in a web page or app using either an
<iframe> tag or an
<object> tag. YouTube supports two kinds of players:
An embedded player is a standard YouTube player that can be added to an app using embed code that you can generate or copy from a video's watch page on YouTube. Embedded players have standard controls, like a play/pause button, volume control, and video progress bar.
You can customize the playback experience for an embedded player by appending parameters to the player's embed URL. For example, you can use the
autoplayparameter to automatically play videos or the
loopparameter to cause a video to play repeatedly.
A chromeless player is a YouTube player that has no player controls. (Interface elements and controls around content, such as the buttons at the top of a browser window, are referred to as "chrome.") A chromeless player can be customized within a Flash or HTML app.
Note: To allow room for critical player functionality, players must be at least 200px by 200px.
<iframe>in your app. This API is only compatible with embedded
The Flash (AS3) Player API lets you use ActionScript to control an embedded or chromeless player in a Flash application.
The Data API allows a program to perform many of the operations available on the YouTube website. It is possible to search for videos, retrieve standard feeds, and see related content. A program can also authenticate as a user to upload videos, modify user playlists, and more.
The Data API is useful for sites or applications that want to have a deep integration with YouTube, such as an app that captures video and lets users upload that video directly to YouTube. The Data API gives you programmatic access to YouTube video and user information, enabling you to personalize your application with users' existing information and to perform actions, like rating or commenting on videos, on their behalf.
YouTube currently supports the following Data API versions:
API Version 3.0 provides rich client library support and is integrated with Google's common API infrastructure. It offers core functionality not available in older API versions, including Freebase integration via topics and universal search, which lets you send a single request to search for channels, playlists, and videos.
- The Getting Started guide explains basic concepts of YouTube and of the API itself.
- The API's guides and tutorials explain how to perform some of the API's core functions, such as implementing OAuth 2.0 authentication or uploading a video. Guides may also describe new and exciting API features, such as how to search with Freebase topics.
- The reference guide explains how to use the API to perform all of the different supported operations.
API versions 2.0 and 2.1 are based on the Google Data Protocol and Atom Publishing Protocol standards. They provide a more comprehensive set of functionality than version 3.0, though the gap is narrowing quickly.
- The Developer's Guide explains how the Data API works at the basic level using XML and HTTP. It details the requests and responses that the YouTube API servers expect and return.
- The Reference Guide provides more detail about the structure of these requests and responses. It defines the API's feed types, HTTP request parameters, HTTP response codes, and XML elements.