Tuesday, October 28, 2014

WatchMe live stream!

With the new YouTube WatchMe for Android project, you can easily integrate YouTube Live Streaming into your Android app. YouTube WatchMe brings your app the same live broadcasting capabilities that you've seen in great apps like Live on YouTube – by Xperia™ and Re – by HTC.



YouTube WatchMe for Android is an open-source project that uses the YouTube Data API v3, YouTube Live Streaming API, Google Play Services and Plus API. You can customize it for your app, and you can also contribute to the project by filing merge requests for new features or submitting bug reports.


How to start using the app
  1. Sync the Github repo
    1. Enable the Youtube Data API v3 and Google+ API.
    2. Create a client ID for Android, using your SHA1 and package name.
  2. Include cross-platform compiled streaming libraries.
Either
  • libffmpeg.so under src/main/jniLibs/armeabi,
or
  • another streaming library with modifying VideoStreamingInterface

Main Activity
Main Activity
YouTube player
Live Streaming Activity
This App is still experimental, so stay tuned here and subscribe to the YouTube for Developers channel to keep up on the latest.


Cheers,

Ibrahim Ulukaya, and the YouTube API Team

Friday, September 19, 2014

Have you migrated to Data API v3 yet?

If you’re already using or migrated to the YouTube Data API v3, you can stop reading and go watch this instead.

If you haven’t yet migrated from the previous API version (v2), we wanted to remind you it will be unsupported as of April 20, 2015, and shut down soon thereafter. To make it fast and easy for you to migrate, check out the new Migration Guide. It’ll help you identify the v3 API methods and parameters that correspond to the functionality that you've been using in the v2 API. It also points out new features that the v3 API supports.

Screenshot_9_17_14,_4_10_PM.jpeg

The guide also lists functionality that is yet to be migrated as well as v2 features that will or might be deprecated, so you can check any feature your current app may be using and share feedback with us.

Once you’re done with that, join the rest of the folks who’ve migrated, kick back and enjoy this.

Tuesday, August 26, 2014

Find videos uploaded from any location with the YouTube Data API v3

When news breaks, it's critical to have immediate, unfiltered access to information about the unfolding developments. During events like the Ukrainian protests and the Arab Spring, people are uploading firsthand, breaking news stories to YouTube. The YouTube Data API (v3) makes it easier to find those videos by supporting the ability to search for videos within a given radius of specified latitude/longitude coordinates. By using this feature in conjunction with the specific Freebase topic filter and upload date with time, you can discover up-to-the-minute breaking news material from people witnessing important world events.


To see an example, check out this web app that uses the new YouTube location search feature and Google Maps APIs. The app is used by news agencies to find legitimate footage and allows them to filter videos based on location, keywords, and upload time.


To search for geotagged videos, set the latitude and longitude to specify the center of a circular geographic area to be searched and the location radius to define the size of the circle. The radius can be in meters, kilometers or miles with a max size of 1000 KM.  

Don’t have the latitude and longitude? Not a problem. The Google Maps API can geo-code search terms (e.g., “Boston”) and return the appropriate geographic coordinates. The Google Maps API also lets you create interactive maps to plot the results of the search. For your convenience, we’re publishing the code as open source for all to use.

Friday, May 9, 2014

Test drive the YouTube APIs

Since the launch of the new YouTube for Developers site, you’ve been able to access API resources, see the showcase apps and hear the stories of successful YouTube Developers. With today’s addition of four new demos, you’ll be able to play with the APIs and find use cases you can easily adapt into your own application.


The Upload Widget demo uses the YouTube Data API, resumable uploads, YouTube Upload Widget, and the YouTube iFrame Player API. Inspired by globalfeed.org, it lets visitors upload videos in which they answer a few questions. On the first page, users can also see answers uploaded by others.

Upload Widget
Via the Freebase API and the YouTube Data API, the Topic Explorer helps visitors find videos related to queries using the Google Knowledge Graph. After the initial query search on Freebase, users can select the exact entity on the Google Knowledge Graph and find videos related to the entity rather than to the simple search term. They can then watch these videos in a player that uses the YouTube iFrame API.
Topic Explorer
By using the YouTube Analytics API, viewers can see the geographic distribution of viewers for Google Developer videos during Google I/O 2013. They can slide through different dates to change the statistics. They can also hover over continents to find the exact viewcounts and the most popular videos for that continent for the selected date.


Analytics
With the power of the YouTube Live Streaming API and the YouTube Data API, visitors can see the most popular YouTube live streams right now. They can click the titles of streams to watch them in a player, which uses the YouTube iFrame API, or simply click one of the empty time slots in the last row to schedule their own broadcasts in the calendar.

Live Widget
Stay tuned here and subscribe to the YouTube for Developers channel to keep up on the latest.

Tuesday, March 25, 2014

Introducing YouTube developer stories

Over the years, we have seen many amazing applications built using the YouTube APIs. These applications span different verticals and extend YouTube to a broader audience. We invited four developers to share their stories and give you inspiration for your work.

Fullscreen

Fullscreen helps creators and brands supercharge their online presence by building tools on top of YouTube data.





Tubular Labs


A great video is nothing without an audience. Tubular helps YouTube creators and marketers grow their audience and take them to the next level.





Capella Systems


Using the power of YouTube, Capella builds live streaming software that makes broadcasting a breeze.





Kamcord


Kamcord helps mobile gamers capture their favorite moments and share them with the world via YouTube.




Stay tuned for more YouTube developer stories in the future, visit YouTube.com/developers to learn more about YouTube APIs and start your own story.

-Amanda Surya and the YouTube for Developers team

Tuesday, March 4, 2014

Committing to the YouTube Data API v3

Since the YouTube Data API v3 launch in 2012, many of you have used the v3 API to create integrations like Next Big Sound and Interesante.

The YouTube Data API v3 is now on the list of APIs identified in our deprecation policy, which means we will notify developers a year in advance before deprecating v3. Note, however, that some specific v3 features are excluded from this notice requirement. You can find the list here. As a reminder, v3 gives you the ability to get information about Freebase topics associated with the videos, more search features, improved client libraries support and much more.

To focus on improving v3, it’s time to say goodbye to our old friend, v2. In keeping with deprecation policy, most API functionality will remain available for use until April 20, 2015, so you have more than a year to move to the new API. See the deprecation policy in the Terms of Service for more details.

While v3 offers the majority of v2 functionality, there are currently a couple of tasks that can only be done with the older API. Specifically, applications that manage captions or that work with video comments still need to use the v2 API until modern equivalents are available. Our goal is to provide similar functionality well before the April 2015 shut-off date—please subscribe to this blog, the YouTube Data API v3 revision history page, or follow +YouTubeDev on Google+ to keep up-to-date.

If you’re a v2 developer who’s looking for help migrating to v3, the best place to start is with our documentation and FAQs. We've also made several videos that explain v3 concepts, such as registering for API access and handling authorization with OAuth 2.0.




Cheers,

Monday, December 16, 2013

Building on YouTube APIs in the cloud with Google Apps Script

There’s nothing better in this world than a great pairing, like coffee and donuts or bees and honey. Today there’s a new one to add to the list: Google Apps Script now has built in support for the YouTube Data v3 and YouTube Analytics APIs. If you haven’t yet heard of Google Apps Script, you’re missing out on an easy-to-use tool for integrating and automating common tasks across many of Google’s services. With less than half a screen’s worth of code in Google Apps Script’s cloud-based editor, you can:

  • Dynamically update a spreadsheet containing watch-time statistics for all of your channel's videos, with all the flexibility and power of Google Sheets to sort and slice that data
  • Create a live dashboard or scheduled email report about your channel's performance
  • Handle channel management tasks such as scheduling automatic bulletins or changing the visibility of a large number of videos from private to public
  • Automate playlist rotation without having to maintain a server or keep a computer for the sole purpose of running a script
Google Apps Script's cloud-based environment and autocomplete functionality make it easy to just open an editor, enable the YouTube APIs, and start writing code:



For functions that require OAuth 2.0 authorization, there’s no authorization code to write and no token management to deal with. Once your script is ready, just click “Run” and Google Apps Script will present you with an authorization dialog. Once you select the channel you want to authorize, the script will have all of the permissions it needs to operate on your behalf, running in the background at scheduled intervals if you so desire.

To get started, browse to Google Drive. Click “Create” and then choose “Script”. This will open a new browser tab to the Google Apps Script editor. Name your project and click on “Resources” and select “Advanced Google Services”:


Toggle the YouTube Data API and/or YouTube Analytics API on:


Note the message that these services must be enabled in the API console. Click the link to be taken to the Google Developer Console. The link in the message will take you to a specific API project created for this specific Apps Script. Scroll down and toggle on the YouTube APIs the script will use:


Switch back to the tab containing Google Apps Script and click “OK”. You’re ready to start writing code. Type “YouTube” and hit the period key (“.”). If the APIs have been turned on correctly, you will be able to start writing code and calling functions available in the Data API or Analytics API. For instance, a short script that searches for videos about “dogs” and prints the video IDs to the Google Apps Script log would look like this:


function searchByKeyword() {
  var results = YouTube.Search.list("id,snippet", 
                   {q : "google apps script", maxResults: 25});
  
  for(var i in results.items) {
    var item = results.items[i];
    Logger.log("[%s] Title: %s", item.id.videoId, item.snippet.title);
  }
}

For more information about this update to Google Apps Script, check out the post on their official blog. To learn more about how to integrate scheduled jobs, write to spreadsheets or any of the many things Google Apps Script can do, check out the tutorials at their home at developers.google.com/apps-script. If you’re the type that prefers to learn on the go, get started with your own copy of our sample code in your Google Drive. You will still need to enable the APIs, so don’t forget to go to “Resources > Advanced Google services” for the link to the Developer Console project to turn on the APIs.


If you have any questions, feel free to find us on StackOverflow under the youtube-api and google-apps-script tags. Happy coding!


- Ikai Lan
YouTube Developer Relations