Engineering and Developers Blog
What's happening with engineering and developers at YouTube
A Chrome Extension for YouTube Activity Feeds
Wednesday, December 22, 2010
Slave Jovanovski, an engineer at YouTube, has put together a
Google Chrome extension
that should be of interest to the YouTube API community. It’s called
YouTube Feed
, and after installing and authenticating with your YouTube account, it automatically will fetch your YouTube social activity stream (both subscriptions and friends’ actions) while you use Google Chrome. When a new event, like a YouTube friend uploading or commenting on a video, takes place, the extension will notify you and provide details on the activity, as well as links to view the actual video. You have control over which types of activities you’d like to be notified about, as well as how frequently you’d like the extension to check for updates.
While you’ll hopefully find the extension useful on its own merits, the fact that the source code has been released as part of an
open source project
means that the extension’s code can serve as inspiration (or a jumping off point) for writing your own JavaScript code that interacts with the YouTube API. Curious as to how to use OAuth to authenticate YouTube accounts from a Chrome Extension? Or request JSON data with a JavaScript callback? The answers await you in the
source code
!
Cheers,
–Jeff Posnick, YouTube API Team
Accelerating YouTube Playback
Wednesday, December 1, 2010
The YouTube Players team’s goal is to make sure that watching videos online is as enjoyable an experience as possible. As a viewer, maximizing enjoyment usually involves some tradeoffs: sure, you can watch a 1080p high definition version of the newest movie trailer, but that might mean choppy playback as your computer strains to keep up with the more demanding processing required. We wanted to let you know about some changes we’re making to help minimize those tradeoffs, so that you can watch smoother, higher-quality video from your existing devices.
Adobe’s
recently announced
Flash Player 10.2 release supports a new, more efficient video display mechanism known as the Stage Video API. The full details of how and why Stage Video speeds up video display can be found in Adobe’s
technical documentation
. The Players Team will be gradually experimenting with Stage Video playbacks on YouTube.com in the coming weeks, but as a developer using the ActionScript 3 Player APIs, you can enable Stage Video playback for your embedded video right away; simply add the
wmode=direct
parameter to the player URL that you’re using to reference the YouTube video. You’ll need the
Flash Player 10.2 installed
to take advantage of the accelerated playback, but playbacks will work for users with older Flash Player versions as well.
The Players Team knows that Stage Video for Flash playbacks is just one path to take toward improving video playback performance across the web. For example, YouTube playbacks using the
new <iframe> embeds
will automatically benefit as
more
and
more
(and
more
) modern browsers add hardware acceleration for the native HTML5 <video> element.
Cheers,
-Jeff Posnick, on behalf of the YouTube Players team
(Updated 2011-02-09 to reflect the production release of Flash Player 10.2.)
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
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