Tuesday, November 17, 2009

Enrich your site with YouTube Direct

Today we announced the launch of YouTube Direct, a new tool built on top of YouTube's public APIs that enables any developer to solicit video submissions on their website, powered by YouTube.

Users upload their videos directly on the developer's website, after which the developer can review the submissions and select the best ones to showcase. Since these videos live on YouTube, users are able to reach YouTube's large user base directly while also getting broader exposure and editorial validation for the videos they create.

Although YouTube Direct was originally created with our news partners in mind, we believe that other developers and website owners can benefit from it as well. To put YouTube Direct in the hands of as many developers as possible, we open sourced the bulk of the code and designed it to run on Google App Engine - Google's scalable hosting platform. This enables developers to easily deploy their own instance of the tool and take advantage of App Engine's scalability and low cost. The videos themselves are served from the same infrastructure that powers YouTube.com.





Visit YouTube Direct for Developers page to read more about it or go directly to the project page to download the code. As always, we'd love to hear your feedback on this new tool. Drop us a line in YouTube's Developer Forum.

Tuesday, November 10, 2009

New YouTube API Version Available for Testing

While we don't normally call out new releases of the Google Data YouTube API on this blog, we wanted to draw specific attention to the version that has just been pushed out to our staging servers. There are two specific changes that we'd like to give our developers and partners a chance to test before they go live. Both changes affect important areas of the API: ClientLogin authentication, and playback URLs in media:content entries.

We fully intend for the changes to be backwards compatible, and from the developer's perspective you should not have to change any code. But testing your code is always a best practice, so if you rely on ClientLogin or retrieving media playback URLs from the Google Data YouTube API, please repoint your code to http://stage.gdata.youtube.com and confirm functionality.

Any incompatibilities should be reported as soon as possible in our YouTube API Developer Forum. We expect to move the changes from the staging environment into production on November 17.

Wednesday, November 4, 2009

Final Decommission Notice for the Legacy YouTube API

It's been several years since we've released the Google Data-based YouTube API, and in that time we've been encouraging developers who used the legacy YouTube API to upgrade before we pull the metaphoric plug on that older version. At this point, all but a handful of holdouts have upgraded, and as of November 11, 2009, the legacy YouTube API will cease operation.

If you're using one of our YouTube API client libraries, then you're definitely making use of the modern Google Data YouTube API. If you're manually making HTTP requests to a URL whose hostname contains gdata.youtube.com, then you're also good to go. If you think you might still be using the legacy YouTube API but aren't sure, take a look at some of the example legacy API calls in this migration guide. If it turns out that you are still using the older API, then the migration guide will give you the information you need to upgrade – and be sure to do so before November 11!

Friday, October 30, 2009

Cleaning Up Our Embeds

For the longest time, official YouTube video embed codes have contained embarrassingly malformed URLs; the first URL parameter (at the end of URLs) should always start with a ? character, but our URL parameters begin with &. That looks something like this:

http://www.youtube.com/v/0XjwoVqM_qE&feature=player_embedded&fs=1 (incorrect)
http://www.youtube.com/v/0XjwoVqM_qE?feature=player_embedded&fs=1 (correct)

Fortunately, we've found a way to use correct URLs without breaking old browsers and we can't wait to do it.

Speaking of changes to the embed code, we'll also be tweaking the HTML content. The new YouTube embed code is leaner and still works on everything from ancient desktop browsers to modern smart phones. You won't find another snippet of HTML that's as battle-tested and mother-approved! Here's a preview of the new, streamlined format:








And here's what the HTML looks like:

<object width="425" height="344">
<param name="movie" value="http://www.youtube.com/v/0XjwoVqM_qE?color1=0xb1b1b1&color2=0xcfcfcf&hl=en&feature=player_embedded&fs=1">
<param name="allowFullScreen" value="true">
<param name="allowScriptAccess" value="always">
<embed src="http://www.youtube.com/v/0XjwoVqM_qE?color1=0xb1b1b1&color2=0xcfcfcf&hl=en&feature=player_embedded&fs=1"
type="application/x-shockwave-flash" allowfullscreen="true"
allowScriptAccess="always" width="425" height="344">
</object>


If you grab YouTube embed codes by hand from YouTube.com, or from the YouTube Player APIs or oEmbed, you'll start getting this updated HTML soon. As for all the embeds already on the web: worry not, those will continue to work forever.

Wednesday, October 14, 2009

The ActionScript 3 YouTube Chromeless Player is Now Live

We have some good news for developers who integrate YouTube videos into their ActionScript 3 Flash applications: the official YouTube Chromeless Player API has been updated to natively support ActionScript 3!

Previous to this release, ActionScript 3 developers had to rely on wrapper libraries that bridged the gap between the native ActionScript 2 API and their own ActionScript 3 code. We're thrilled that intrepid developers were able to patch things together on their own and share their code with the rest of the community. Now that there's official support for using the chromeless player from ActionScript 3, everyone should have more time to focus on writing compelling Flash applications, rather than dealing with the unique issues that cross-language coding entails.

Please check out our ActionScript 3 documentation, and let us know what you think of the new API in our developer forum.

With the launch of ActionScript 3 support, we're officially deprecating the ActionScript 2 YouTube Chromeless Player API. As per our YouTube API deprecation policy, detailed in our Terms of Service, we will continue to operate the ActionScript 2 API for a period of three years (until October 14, 2012).

Cheers,
-The YouTube API Team

Monday, October 12, 2009

Direct Uploads Server Migration

We first announced our new API upload infrastructure back in June and asked developers to test their YouTube API code against our staging environment.

Since then, we've started deploying the new upload infrastructure to production machines in a phased manner. Last month, we transitioned browser-based API uploads to the new servers, and have been closely monitoring performance and error rates to ensure that there were no unintended side effects.

We're now ready to begin the transition for direct uploads. Starting today, a small percentage of direct uploads traffic will automatically be routed to our new servers. We will be monitoring traffic over the next few weeks and gradually increasing the traffic that the new servers receive until we have fully completed the migration.

As a developer, you won't have to make any changes in your code to take advantage of the increased reliability and bug fixes found in the new infrastructure. While we do expect that this new infrastructure will be fully backwards compatible, if you do notice any change in your application's behavior with regard to direct uploads, please let us know in our developer group.

Cheers,
-The YouTube API Team

Friday, October 9, 2009

oEmbed support

oEmbed is a pretty slick way to embed multimedia for a link. For example with a request like this:

You get a response like this:
{"provider_url": "http://www.youtube.com/",
"title": "Auto-Tune the News #8: dragons. geese. Michael Vick. (ft. T-Pain)",
"html": "embed code",
...}
The value for the "html" key is all you need to insert into your webpage to render an embedded YouTube video:

Check out the documentation at oEmbed.com for more information.