Engineering and Developers Blog
What's happening with engineering and developers at YouTube
More Channels to Feed On
Wednesday, November 10, 2010
The YouTube API’s standard feeds are a great way to expose your users to the best of what YouTube has to offer. To compliment the existing
standard video feeds
, which contain lists of individual videos that meet certain criteria (the top rated videos in the United States for the current day,
for instance
), we’re happy to introduce a new set of
standard channel feeds
.
While standard video feeds contain lists of videos,
standard channel feeds
contain lists of channels, or user accounts. The two types of standard channel feeds are
most_viewed
and
most_subscribed
, and just like with video feeds you can narrow down your results even further with time, region, and
category
or
user type
parameters. For example, the URL for requesting the most viewed channels with videos related to music in Great Britain for the past week is
http://gdata.youtube.com/feeds/api/channelstandardfeeds/GB/most_viewed/-/Music?v=2&time=this_week
. Each entry in a standard channel feed provides detailed information about a specific YouTube channel, including a
element with info on how many comments, videos, and views that channel has received.
Once you have these lists of channels, a natural next step would be to allow your logged-in users to
subscribe
to a given channel or view a list of videos
uploaded
in that channel.
Standard channel feeds are only available in version 2 of the YouTube API, which will
soon be the default version
in the production environment. In the meantime, be sure to
explicitly specify
that you want to use version 2 when making your YouTube API requests.
Cheers,
Jeff Posnick, YouTube API Team
Update to the ClientLogin URL
Thursday, November 4, 2010
We want to let the developer community know about a change to the officially supported URL for YouTube API
ClientLogin
requests. Previously, developers who wanted to obtain authentication credentials via a username and password had to send their ClientLogin request to
https://www.google.com/youtube/accounts/ClientLogin
. The new URL that we encourage all developers to use is
https://www.google.com/accounts/ClientLogin
. This new URL has been functional for a while, and is the same URL that other Google APIs use for ClientLogin requests. Switching YouTube API ClientLogin traffic to the standard URL ensures that developers across all of Google’s APIs will see standard behavior when logging users in.
All of the details regarding this switch as well as best practices for performing ClientLogin requests can be found in our YouTube API
documentation
. There is one specific change in behavior that is worth calling out: responses from the new ClientLogin URL will not include the YouTube username of the authenticated user, which the old URL’s responses did provide. We encourage developers to take advantage of the username
default
when constructing YouTube API request URLs, which always refers to the currently logged in user.
We have no immediate plans to disable the old ClientLogin URL, but we do encourage developers to update their code at their earliest convenience to point to the new URL. We will post again with further details if and when the legacy URL is turned off.
Cheers,
-Jeff Posnick, YouTube API Team
The ActionScript 2 Chromeless Player and Monetized Videos
Monday, October 25, 2010
The
ActionScript 3 Player APIs
, both in the chromeless and embedded variety, have been available for use since
last October
. When we released the ActionScript 3 APIs, we announced the deprecation of the ActionScript 2 equivalents. As per our deprecation policy, we will keep the ActionScript 2 Player APIs running through October of 2012; however, we wanted to announce a change in the videos available for playback that will affect those still using the ActionScript 2
chromeless
player.
As of early January, 2011, some videos that YouTube and our content partners would like to monetize will not be playable using the ActionScript 2 chromeless player because it does not have the ability to show ads. If you attempt to play back such a video, an
onError
event will be fired, as
documented
in the ActionScript 2 Player APIs reference guide. As a developer, you can handle this event and play an alternate video, or display an explanatory message to your users.
Please note that this change only affects playback in the ActionScript 2 chromeless player. If you are using the ActionScript 2 embedded player (i.e. the official YouTube player with built-in controls) or if you’ve already upgraded to one of the ActionScript 3 players, you can continue to play the same video content you can play today. Also note that you might be using the the ActionScript 2 chromeless player indirectly if you’re using a third-party custom video player to play back YouTube content. Please reach out to the provider of your custom video player if you’re not sure whether this change will affect you.
Cheers,
-Jeff Posnick, YouTube API Team
PubSubHubbub for YouTube Activities
Thursday, October 7, 2010
Update (February 2012)
: We're happy to report that PubSubHubbub functionality for YouTube feeds has been restored for the uploads, subscriptions, and favorites feed. When subscribing to a feed URL, be sure that the only URL parameter you include is v=2, e.g.
http://gdata.youtube.com/feeds/api/users/GoogleDevelopers/uploads?v=2
Update (November 2011)
: As mentioned below, PubSubHubbub for YouTube feeds is currently inactive. The engineering team is investigating options for restoring functionality; more info will be posted following those investigations.
Update (October 2011)
: Unfortunately, we no longer support subscribing to YouTube user events via PubSubHubbub. We suggest using the
Simple Update Protocol
as an alternative.
PubSubHubbub
, for those not in the know, is a server-to-server protocol for notifying interested parties of events they’re interested in. Notifications are pushed out to subscribers via HTTP
web hooks
, which offers efficiencies over polling-based solutions. With PubSubHubbub, your server finds out about events in near real-time, without having to determine the optimal polling interval or repeatedly fetch individual activity feeds that haven’t changed.
We’re happy to announce that it’s now possible to subscribe to three types of YouTube user events via PubSubHubbub: video uploads, new subscriptions, and video favorites. The subscription requests need to be made on a per-user basis, so you will only receive updates for specific users that you’re interested in.
Your code can look for our PubSubHubbub
hub
address in the
href
attribute of the top-level
<link rel='hub'>
element in uploads, subscriptions, and favorites feeds. For example, the feed
http://gdata.youtube.com/feeds/api/users/GoogleDevelopers/uploads?v=2
exposes the hub address in the
<link rel='hub' href='http://pubsubhubbub.appspot.com'/>
element.
More details on the PubSubHubbub can be found in the
specification document
. If you’d like your server to receive YouTube user event updates via PubSubHubbub, this
list of libraries
is a good place to start.
Cheers,
-Jeff Posnick, YouTube API Team, in conjunction with the PubSubHubbub Team
Resources for Mobile Development with YouTube
Friday, September 24, 2010
The importance of mobile applications in our day-to-day lives continues to grow. We can now do so many things with our phones that would have been impossible not too long ago. While watching videos on mobile devices has been popular for quite some time, mobile uploads to YouTube grew by 160% last year. Mobile application developers can take advantage of this growth by incorporating different types of functionality. Many interesting YouTube projects combine video capture, uploading, sharing and playback, with application logic executing both on the mobile device and in the cloud. With that in mind, we've compiled this
article
to help developers quickly get up to speed on what is involved in building one, please
let us know
what you think!
Update:
article
translations are now available in Chinese, Japanese, Korean, Portugese, Russian and Spanish ! Here are the links :
YouTube 移动应用程序开发参考资料
YouTube 行動應用程式開發資源
携帯端末向け開発リソース YouTube
YouTube를 통한 모바일 개발 도움말
Recursos para desenvolvimento de aplicativos para celular com o YouTube
Ресурсы для разработки мобильных приложений, интегрированных с YouTube
Recursos de desarrollo para móviles con YouTube
Thanks,
-Jarek Wilkiewicz, YouTube API Team
Staging Server Now Defaults to YouTube API Version 2
Monday, September 13, 2010
The YouTube Google Data API currently exists in two flavors: version 1 and version 2. If you’re not explicitly requesting version 2 of the API, then you’re using the default, version 1.
As we add new functionality to the API, it’s invariably added to version 2: features like
partial responses/updates
,
extended access controls
,
captioning support
, and
YouTube Insight statistics
are only available to developers accessing the newer release. We’ve kept version 1 running as-is for a while now, and will continue to do so for months to come, but we’re taking the first step to transition developers off of version 1 of the API by changing the default in our
staging server
environment to version 2.
We expect to default the production environment to version 2 before the end of the year, and we will post again when we have more definite dates. In the meantime, if you are still using version 1 of the API, please prepare for the change by taking one of the following steps:
Modify a test version of your code to access
stage.gdata.youtube.com
URLs as described in
this blog post
. You’ll automatically default to version 2, and you can test and make changes to your code against the staging server.
Start explicitly requesting version 2 using the
v=2
URL parameter or
GData-Version
HTTP request header
. Most of the YouTube API client libraries provide methods for switching between API versions, and they will take care of setting the appropriate
GData-Version
header for you. You may need to modify your code to make it compatible with version 2.
If you know that your code is incompatible with version 2 of the YouTube API and you can’t fix things yet, start explicitly requesting version 1 of the API. Note that this is not a long-term solution, as all code will eventually need to be migrated off of version 1.
Stay tuned over the coming months for more announcements about the change to the default in production, and the eventual decommission of version 1, currently scheduled for October 2011.
Cheers,
-Jeff Posnick, YouTube API Team
A New Way To Embed YouTube Videos
Thursday, July 22, 2010
An enhancement to our video embed capability is now available through a new embed code style. This new style uses
<iframe>
and looks like this:
<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/
VIDEO_ID
"
allowfullscreen
frameborder="0">
</iframe>
Example:
<br />
If you use the new embed code style, your viewers will be able to view your embedded video in one of our Flash or HTML5 players, depending on their viewing environment and preferences. Environments that support the HTML5 video player are
listed here on our HTML5 settings page.
In instances where HTML5 isn't supported (e.g. our HTML5 player can't play videos with ads), we use Flash.
An additional benefit of the new embed style is that it will eventually allow embeds to work on mobile devices, which typically use a built-in player instead of Flash or HTML5.
Before we make this new embed code the standard for our general users, we wanted to give our developer community a preview. While there may be some limitations, please try it out and
let us know how it went.
Toliver Jue, Software Engineer
recently learned some dance moves from “
黄帝心仙人
".
Labels
.net
acceleration
access control
accessibility
actionscript
activities
activity
android
announcements
apis
app engine
appengine
apps script
as2
as3
atom
authentication
authorization
authsub
best practices
blackops
bootcamp
captions
categories
channels
charts
chrome
chromeless
client library
clientlibraries
clientlogin
code
color
comments
compositing
create
curation
custom player
decommission
default
deprecation
devs
direct
discovery
docs
Documentation RSS
dotnet
education
embed
embedding
events
extension
feeds
flash
format
friendactivity
friends
fun
gears
google developers live
google group
googlegamedev
googleio
html5
https
iframe
insight
io12
io2011
ios
iphone
irc
issue tracker
java
javascript
json
json-c
jsonc
knight
legacy
Live Streaming API
LiveBroadcasts API
logo
mashups
media:keywords keywords tags metadata
metadata
mobile
mozilla
news
oauth
oauth2
office hours
open source
partial
partial response
partial update
partners
patch
php
player
playlists
policy
previews
pubsubhubbub
push
python
quota
rails
releases
rendering
reports
responses
resumable
ruby
samples
sandbox
shortform
ssl https certificate staging stage
stack overflow
stage video
staging
standard feeds
storify
storyful
subscription
sup
survey
tdd
theme
tos
tutorials
updates
uploads
v2
v3
video
voting
watch history
watchlater
webvtt
youtube
youtube api
youtube developers live
youtube direct
ytd
Archive
2015
December
Chat it up, streamers! New Live Chat, Fan Funding ...
November
October
May
April
March
January
2014
October
September
August
May
March
2013
December
October
September
August
July
June
May
April
March
February
2012
December
November
September
August
July
June
May
April
March
February
January
2011
December
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
July
June
May
April
March
February
January
2009
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
2007
December
November
August
June
May
Feed
YouTube
on
Follow @youtubedev