SlideShare una empresa de Scribd logo
1 de 39
Descargar para leer sin conexión
Building Video Apps
 with YouTube APIs
        UNAM Mexico City
           Jarek Wilkiewicz
         twitter.com/wjarek
                 04/01/2011
Agenda
• Intro
• Life of a video
• APIs
• Back-end (Google Data API)
• Front-end (Player)
• App Examples
• Q&A
Quiz *




Number of YouTube views per day ?
> your answer here
Number of mobile YouTube views per day?
> your answer here
How much video is uploaded each minute?
> your answer here
%-tage of views coming from outside of US?
> your answer here



                                      *As of Oct 2010
Life of a video

 • Uploading
 • Sharing
 • Searching
 • Playback




Video : Evolution of Dance by Judson Laipply
http://www.youtube.com/watch?v=dMH0bHeiRNg
Life of a video : Uploading
• Via YouTube.com uploader
• Standard (POST)
• Advanced (Java)
• Mobile (mailto:xyz93a@m.youtube.com)
• Using the API
• Browser-based
• Direct
• Direct resumable (great for mobile)
• Metadata (category, keyword, etc.)
Life of a video : Sharing

  • Autoshare
  • Embed
  • Publish to activity feed
Life of a video : Searching
http://gdata.youtube.com/feeds/api/videos?q=Google+Mexico&
orderby=published&
start-index=1&
max-results=10&v=2




                         <?xml version='1.0' encoding='UTF-8'?>
                         <feed xmlns='http://www.w3.org/2005/Atom'
                            xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/'
                          […]
                          <entry gd:etag='W/&quot;C0AMRn47eCp7ImA9WxRQGUw.&quot;'>
                            <id>tag:youtube,2008:video:ZTUVgYoeN_b</id>
                            <published>2008-07-05T19:56:35.000-07:00</published>
                            <updated>2008-07-18T07:21:59.000-07:00</updated>
                            <category scheme='http://schemas.google.com/g/2005#kind'
                              term='http://gdata.youtube.com/schemas/2007#video'/>
                          […]
                          </entry>
                          [...]
                         </feed>
Life of a video : Playback

  On YouTube.com
  On other sites
    Custom Player
    Embedded Player
    Chromeless Player

  On your mobile

  On other devices
APIs
APIs

       Google Data APIs   Player APIs
Google Data APIs

  Protocol
     REST-based
     ATOM syndication format (RFC 4287)
     ATOM publishing protocol (RFC 5023)
     support for XML-based ATOM (default), JSON, JSON-C,
     RSS
  Feeds
     Standard feeds (Top Rated, Most Viewed, ...)
     User's playlists, subscriptions, uploads feeds
     User's comments, profile, contacts feed
  YouTube applications interact with the feeds using the
  Google Data APIs
Feed example : Top Rated
http://gdata.youtube.com/feeds/api/standardfeeds/top_rated

<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom' […] >
 <updated>2008-07-18T05:00:49.000-07:00</updated>
 <title>Top Rated</title>
 <openSearch:totalResults>100</openSearch:totalResults>
 <entry gd:etag='W/&quot;C0AMRw.&quot;'>
  <media:group>
    <media:title type='plain'>Shopping for Coats</media:title>
    <yt:videoid>ZTUVgYoeN_b</yt:videoid>
    <media:content
     url='http://www.youtube.com/v/ZTUVgYoeN_b?f=gdata_standard...'
     type='application/x-shockwave-flash' medium='video'
     [...] duration='215' yt:format='5'/>
    <media:thumbnail url='http://img.youtube.com/vi/ZTUVgYoeN_b/2.jpg'
     height='97' width='130' time='00:00:03.500'/>
  </media:group>
 </entry>
 <entry>
  […]
 </entry>
</feed>
Feed access example in Java
import com.google.gdata.client.youtube.YouTubeService;
import com.google.gdata.data.youtube.VideoEntry;
import com.google.gdata.data.youtube.VideoFeed;

YouTubeService service = new YouTubeService(clientID,
developer_key);
VideoFeed videoFeed = service.getFeed(new URL(feedUrl),
               VideoFeed.class);
printVideoFeed(videoFeed, true);
public static void printVideoFeed(VideoFeed videoFeed, boolean detailed) {
  for(VideoEntry videoEntry : videoFeed.getEntries() ) {
printVideoEntry(videoEntry, detailed);
  }
}
Other useful things one can do with the APIs


   Upload
   Search
   Rate a video (Like/Dislike)
   Comment
   Add a playlist
   Retrieve activity feed (SUP or PubSubHubbub)
   Retrieve Insight video statistics
   Get a better grade on your exam!
   And more!

If your application obtains OAuth/AuthSub authorization from a
user, all of these can be done on user's behalf.
Performing video search in Python

import gdata.youtube.service

def PrintVideoFeed(feed):
 for entry in feed.entry:
  PrintEntryDetails(entry)

yt_service = gdata.youtube.service.YouTubeService()
yt_service.ssl = False
query = gdata.youtube.service.YouTubeVideoQuery()
query.vq = search_terms
query.orderby = 'viewCount'
feed = yt_service.YouTubeQuery(query)
PrintVideoFeed(feed)
Direct upload in C#

using Google.GData.Client;
using Google.GData.Extensions;
using Google.GData.YouTube;
using Google.GData.Extensions.MediaRss;

YouTubeService service = new YouTubeService("exampleCo-exampleApp-1", clientID, developerKey);
service.setUserCredentials(username, password);
YouTubeEntry newEntry = new YouTubeEntry();
newEntry.Media = new MediaGroup();
newEntry.Media.Title = new MediaTitle("My Test Movie");
newEntry.Media.Categories.Add(new MediaCategory("Autos", YouTubeNameTable.CategorySchema));
newEntry.Media.Keywords = new MediaKeywords("cars, funny");
newEntry.Media.Description = new MediaDescription("My description");
newEntry.Private = false;
newEntry.Location = new GeoRssWhere(37, -122);
newEntry.MediaSource = new MediaFileSource("c:file.mov", "video/quicktime");
YouTubeEntry createdEntry = service.Upload(newEntry);
Player APIs


  Control the Player from your Web front-end
  URI parameters
  JavaScript API
  ActionScript API (Flash)
Player Parameters
<object width="425" height="344">
<param name="movie" value="http://www.youtube.com/v/u1zgFlCw8Aw?fs=1"</param>
<param name="allowFullScreen" value="true"></param>
<param name="allowScriptAccess" value="always"></param>
<embed src="http://www.youtube.com/v/u1zgFlCw8Aw?fs=1"
 type="application/x-shockwave-flash"
 allowfullscreen="true"
 allowscriptaccess="always"
 width="425" height="344">
</embed>
</object>

<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.
youtube.com/embed/VIDEO_ID?autoplay=1" frameborder="0">
</iframe>
Player JavaScript API : play for 6 seconds
<script>
  const timeoutMs = 6000;
  var done = false;
  var player1 = new YT.Player('player1', {events: {'onReady': onPlayerReady,
     'onStateChange': onPlayerStateChange
  }});

   function onPlayerReady(evt) {
     evt.target.playVideo();
  }
   function onPlayerStateChange(newState) {
      if (newState == 1 && !done) {
         setTimeout(stopPlayer, timeoutMs);
         done = true;
      }
   }
   function stopPlayer() {
      player1.stopVideo();
   }
</script>
What about mobile ?




Video: David After Dentist by booba1234
http://www.youtube.com/watch?v=txqiwrbYGrs
Mobile : Recording


     Java
Intent i = new Intent();
i.setAction(MediaStore.VIDEO_CAPTURE);
startActivityForResult(i, CAPTURE_RETURN);

      Objective-C
IImagePickerController *imagePicker = [[[UIImagePickerController alloc] init]
autorelease];
imagePicker.delegate = self;
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePicker.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeMovie];
[self presentModalViewController:imagePicker animated:YES];
Mobile : Uploading


  ACTION_SEND intent
  Use Google Data protocol to
  upload
  Libraries available for leading
  mobile platforms; you can use
  direct REST/HTTP on others
App Examples
Apps : Gaming
Apps : Viewchange.org



  Non-profit / social
  change
  Content curated from
  around the world
  Semantic analysis of
  video metadata
  Player integration
Apps : Shortform



  Curation platform for
  video DJs (VJs)
  Player integration
  Custom embed player
Apps : Storify



  Social curation /
  publishing platform
  Multiple data sources
  (Twitter, Facebook,
  YouTube)
  Google Data API
  integration
Apps : Memolane



  Curation app for your
  digital memories
  Integrates multiple
  sources
Apps : The History of Jazz



  “Coffee table” iPad
  application
  Videos help educate and
  discover new music
  Paid app, integrated with
  YouTube and iTunes
YouTube Direct
YouTube Direct : Mobile
 Easy authentication with
 AccountMananger
 Submission idea sync (JSON)
 Notification upon new
 assignments
 Video recording and upload to a
 specific submission idea
 Upload of a video selected from
 the gallery
 Geolocation tagging
 Massage and psychic readings
One last thing ...

       Read the Terms of
       Service
       Monetization Guide
       Branding Guide




                                                        [1]


[1] Photo by sub_lime79 / Misty
http://www.flickr.com/photos/mistybushell/2303555607/
ToS
                                                                             [1]




YouTube API Terms of Service
http://code.google.com/apis/youtube/terms.html

Monetization Guide
http://code.google.com/apis/youtube/creating_monetizable_applications.html

Branding Guide
http://code.google.com/apis/youtube/branding.html




[1] Photo by sub_lime79 / Misty
http://www.flickr.com/photos/mistybushell/2303555607/
Resources


Get the YouTube API developer key and start hacking!
http://code.google.com/apis/youtube/dashboard/gwt


http://code.google.com/apis/youtube (docs)
http://apiblog.youtube.com (blog)
http://code.google.com/apis/youtube/forum (forum)

twitter.com/wjarek (me)
Q&A


        Jarek Wilkiewicz
      twitter.com/wjarek

Más contenido relacionado

La actualidad más candente

SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13Fred Sauer
 
Video Streaming: from the native Android player to uncoventional devices
Video Streaming: from the native Android player to uncoventional devicesVideo Streaming: from the native Android player to uncoventional devices
Video Streaming: from the native Android player to uncoventional devicesMatteo Bonifazi
 
HTML5, Flash, and the Battle For Faster Cat Videos
HTML5, Flash, and the Battle For Faster Cat VideosHTML5, Flash, and the Battle For Faster Cat Videos
HTML5, Flash, and the Battle For Faster Cat VideosGreg Schechter
 
JS Days HTML5 Flash and the Battle for Faster Cat Videos
JS Days HTML5 Flash and the Battle for Faster Cat VideosJS Days HTML5 Flash and the Battle for Faster Cat Videos
JS Days HTML5 Flash and the Battle for Faster Cat VideosGreg Schechter
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!David Gibbons
 
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14Salesforce Developers
 
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...Matt Raible
 
WordCamp Raleigh WordPress & Social Media Integration
WordCamp Raleigh WordPress & Social Media IntegrationWordCamp Raleigh WordPress & Social Media Integration
WordCamp Raleigh WordPress & Social Media IntegrationDigital Strategy Works LLC
 
WordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute WorkshopWordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute WorkshopBrendan Sera-Shriar
 
The Role of Python in SPAs (Single-Page Applications)
The Role of Python in SPAs (Single-Page Applications)The Role of Python in SPAs (Single-Page Applications)
The Role of Python in SPAs (Single-Page Applications)David Gibbons
 
Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020
Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020
Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020Matt Raible
 
Eclipse Overview
Eclipse Overview Eclipse Overview
Eclipse Overview Lars Vogel
 
Mobile Meow at Mobilism
Mobile Meow at MobilismMobile Meow at Mobilism
Mobile Meow at MobilismGreg Schechter
 
Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018Matt Raible
 
Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Matthew McCullough
 
WordPress basic fundamental of plugin development and creating shortcode
WordPress basic fundamental of plugin development and creating shortcodeWordPress basic fundamental of plugin development and creating shortcode
WordPress basic fundamental of plugin development and creating shortcodeRakesh Kushwaha
 
So what's a web app? introduction to the chrome web store
So what's a web app? introduction to the chrome web storeSo what's a web app? introduction to the chrome web store
So what's a web app? introduction to the chrome web storeEric Bidelman
 

La actualidad más candente (20)

Web DU Mobile Meow
Web DU Mobile MeowWeb DU Mobile Meow
Web DU Mobile Meow
 
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
 
Video Streaming: from the native Android player to uncoventional devices
Video Streaming: from the native Android player to uncoventional devicesVideo Streaming: from the native Android player to uncoventional devices
Video Streaming: from the native Android player to uncoventional devices
 
HTML5, Flash, and the Battle For Faster Cat Videos
HTML5, Flash, and the Battle For Faster Cat VideosHTML5, Flash, and the Battle For Faster Cat Videos
HTML5, Flash, and the Battle For Faster Cat Videos
 
JS Days HTML5 Flash and the Battle for Faster Cat Videos
JS Days HTML5 Flash and the Battle for Faster Cat VideosJS Days HTML5 Flash and the Battle for Faster Cat Videos
JS Days HTML5 Flash and the Battle for Faster Cat Videos
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!
 
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
 
Os Johnson
Os JohnsonOs Johnson
Os Johnson
 
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
 
WordCamp Raleigh WordPress & Social Media Integration
WordCamp Raleigh WordPress & Social Media IntegrationWordCamp Raleigh WordPress & Social Media Integration
WordCamp Raleigh WordPress & Social Media Integration
 
Writing first-hudson-plugin
Writing first-hudson-pluginWriting first-hudson-plugin
Writing first-hudson-plugin
 
WordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute WorkshopWordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute Workshop
 
The Role of Python in SPAs (Single-Page Applications)
The Role of Python in SPAs (Single-Page Applications)The Role of Python in SPAs (Single-Page Applications)
The Role of Python in SPAs (Single-Page Applications)
 
Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020
Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020
Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020
 
Eclipse Overview
Eclipse Overview Eclipse Overview
Eclipse Overview
 
Mobile Meow at Mobilism
Mobile Meow at MobilismMobile Meow at Mobilism
Mobile Meow at Mobilism
 
Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018
 
Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2
 
WordPress basic fundamental of plugin development and creating shortcode
WordPress basic fundamental of plugin development and creating shortcodeWordPress basic fundamental of plugin development and creating shortcode
WordPress basic fundamental of plugin development and creating shortcode
 
So what's a web app? introduction to the chrome web store
So what's a web app? introduction to the chrome web storeSo what's a web app? introduction to the chrome web store
So what's a web app? introduction to the chrome web store
 

Similar a YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autónoma de México

Building Video Applications with YouTube APIs
Building Video Applications with YouTube APIsBuilding Video Applications with YouTube APIs
Building Video Applications with YouTube APIsJarek Wilkiewicz
 
Getting started using Google APIs (2019)
Getting started using Google APIs (2019)Getting started using Google APIs (2019)
Getting started using Google APIs (2019)wesley chun
 
IBM Connections Activity Stream APIs - Lab Dec 2012
IBM Connections Activity Stream APIs - Lab Dec 2012IBM Connections Activity Stream APIs - Lab Dec 2012
IBM Connections Activity Stream APIs - Lab Dec 2012Vincent Burckhardt
 
The Glass Class - Tutorial 2 - Mirror API
The Glass Class - Tutorial 2 - Mirror APIThe Glass Class - Tutorial 2 - Mirror API
The Glass Class - Tutorial 2 - Mirror APIGun Lee
 
GOTO - The Ultimate Android Lock Screen
GOTO - The Ultimate Android Lock ScreenGOTO - The Ultimate Android Lock Screen
GOTO - The Ultimate Android Lock ScreenInnoWeb Tech, LLC
 
Introduction to Robotium
Introduction to RobotiumIntroduction to Robotium
Introduction to Robotiumalii abbb
 
iOSDevCamp 2011 - Getting "Test"-y: Test Driven Development & Automated Deplo...
iOSDevCamp 2011 - Getting "Test"-y: Test Driven Development & Automated Deplo...iOSDevCamp 2011 - Getting "Test"-y: Test Driven Development & Automated Deplo...
iOSDevCamp 2011 - Getting "Test"-y: Test Driven Development & Automated Deplo...Rudy Jahchan
 
Building Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience ManagerBuilding Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience Managerconnectwebex
 
The Google App Engine Oil Framework
The Google App Engine Oil FrameworkThe Google App Engine Oil Framework
The Google App Engine Oil FrameworkEric ShangKuan
 
Google analytics
Google analyticsGoogle analytics
Google analyticsSean Tsai
 
The Big Picture and How to Get Started
The Big Picture and How to Get StartedThe Big Picture and How to Get Started
The Big Picture and How to Get Startedguest1af57e
 
Building Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience ManagerBuilding Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience ManagerJustin Edelson
 
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides & more
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides & morePower your apps with Gmail, Google Drive, Calendar, Sheets, Slides & more
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides & morewesley chun
 
The Wide World Of Google Developer Technologies (STLIC 02-10)
The Wide World Of Google Developer Technologies (STLIC 02-10)The Wide World Of Google Developer Technologies (STLIC 02-10)
The Wide World Of Google Developer Technologies (STLIC 02-10)jasonacooper
 
How to implement sso using o auth in golang application
How to implement sso using o auth in golang applicationHow to implement sso using o auth in golang application
How to implement sso using o auth in golang applicationKaty Slemon
 
Wordcampnl - Embed Mobypicture using shortcodes
Wordcampnl - Embed Mobypicture using shortcodesWordcampnl - Embed Mobypicture using shortcodes
Wordcampnl - Embed Mobypicture using shortcodesTiman Rebel
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Matt Raible
 
GDD HTML5, Flash, and the Battle for Faster Cat Videos
GDD HTML5, Flash, and the Battle for Faster Cat VideosGDD HTML5, Flash, and the Battle for Faster Cat Videos
GDD HTML5, Flash, and the Battle for Faster Cat VideosGreg Schechter
 

Similar a YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autónoma de México (20)

Building Video Applications with YouTube APIs
Building Video Applications with YouTube APIsBuilding Video Applications with YouTube APIs
Building Video Applications with YouTube APIs
 
Getting started using Google APIs (2019)
Getting started using Google APIs (2019)Getting started using Google APIs (2019)
Getting started using Google APIs (2019)
 
IBM Connections Activity Stream APIs - Lab Dec 2012
IBM Connections Activity Stream APIs - Lab Dec 2012IBM Connections Activity Stream APIs - Lab Dec 2012
IBM Connections Activity Stream APIs - Lab Dec 2012
 
The Glass Class - Tutorial 2 - Mirror API
The Glass Class - Tutorial 2 - Mirror APIThe Glass Class - Tutorial 2 - Mirror API
The Glass Class - Tutorial 2 - Mirror API
 
GOTO - The Ultimate Android Lock Screen
GOTO - The Ultimate Android Lock ScreenGOTO - The Ultimate Android Lock Screen
GOTO - The Ultimate Android Lock Screen
 
Introduction to Robotium
Introduction to RobotiumIntroduction to Robotium
Introduction to Robotium
 
iOSDevCamp 2011 - Getting "Test"-y: Test Driven Development & Automated Deplo...
iOSDevCamp 2011 - Getting "Test"-y: Test Driven Development & Automated Deplo...iOSDevCamp 2011 - Getting "Test"-y: Test Driven Development & Automated Deplo...
iOSDevCamp 2011 - Getting "Test"-y: Test Driven Development & Automated Deplo...
 
Building Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience ManagerBuilding Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience Manager
 
The Google App Engine Oil Framework
The Google App Engine Oil FrameworkThe Google App Engine Oil Framework
The Google App Engine Oil Framework
 
Google analytics
Google analyticsGoogle analytics
Google analytics
 
The Big Picture and How to Get Started
The Big Picture and How to Get StartedThe Big Picture and How to Get Started
The Big Picture and How to Get Started
 
Building Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience ManagerBuilding Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience Manager
 
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides & more
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides & morePower your apps with Gmail, Google Drive, Calendar, Sheets, Slides & more
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides & more
 
The Wide World Of Google Developer Technologies (STLIC 02-10)
The Wide World Of Google Developer Technologies (STLIC 02-10)The Wide World Of Google Developer Technologies (STLIC 02-10)
The Wide World Of Google Developer Technologies (STLIC 02-10)
 
How to implement sso using o auth in golang application
How to implement sso using o auth in golang applicationHow to implement sso using o auth in golang application
How to implement sso using o auth in golang application
 
Introduction to python scrapping
Introduction to python scrappingIntroduction to python scrapping
Introduction to python scrapping
 
Wordcampnl - Embed Mobypicture using shortcodes
Wordcampnl - Embed Mobypicture using shortcodesWordcampnl - Embed Mobypicture using shortcodes
Wordcampnl - Embed Mobypicture using shortcodes
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017
 
M.youtube can not display
M.youtube can not displayM.youtube can not display
M.youtube can not display
 
GDD HTML5, Flash, and the Battle for Faster Cat Videos
GDD HTML5, Flash, and the Battle for Faster Cat VideosGDD HTML5, Flash, and the Battle for Faster Cat Videos
GDD HTML5, Flash, and the Battle for Faster Cat Videos
 

Último

Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 

Último (20)

Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 

YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autónoma de México

  • 1. Building Video Apps with YouTube APIs UNAM Mexico City Jarek Wilkiewicz twitter.com/wjarek 04/01/2011
  • 2. Agenda • Intro • Life of a video • APIs • Back-end (Google Data API) • Front-end (Player) • App Examples • Q&A
  • 3. Quiz * Number of YouTube views per day ? > your answer here Number of mobile YouTube views per day? > your answer here How much video is uploaded each minute? > your answer here %-tage of views coming from outside of US? > your answer here *As of Oct 2010
  • 4. Life of a video • Uploading • Sharing • Searching • Playback Video : Evolution of Dance by Judson Laipply http://www.youtube.com/watch?v=dMH0bHeiRNg
  • 5. Life of a video : Uploading • Via YouTube.com uploader • Standard (POST) • Advanced (Java) • Mobile (mailto:xyz93a@m.youtube.com) • Using the API • Browser-based • Direct • Direct resumable (great for mobile) • Metadata (category, keyword, etc.)
  • 6. Life of a video : Sharing • Autoshare • Embed • Publish to activity feed
  • 7. Life of a video : Searching http://gdata.youtube.com/feeds/api/videos?q=Google+Mexico& orderby=published& start-index=1& max-results=10&v=2 <?xml version='1.0' encoding='UTF-8'?> <feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' […] <entry gd:etag='W/&quot;C0AMRn47eCp7ImA9WxRQGUw.&quot;'> <id>tag:youtube,2008:video:ZTUVgYoeN_b</id> <published>2008-07-05T19:56:35.000-07:00</published> <updated>2008-07-18T07:21:59.000-07:00</updated> <category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/> […] </entry> [...] </feed>
  • 8. Life of a video : Playback On YouTube.com On other sites Custom Player Embedded Player Chromeless Player On your mobile On other devices
  • 9.
  • 10. APIs
  • 11. APIs Google Data APIs Player APIs
  • 12. Google Data APIs Protocol REST-based ATOM syndication format (RFC 4287) ATOM publishing protocol (RFC 5023) support for XML-based ATOM (default), JSON, JSON-C, RSS Feeds Standard feeds (Top Rated, Most Viewed, ...) User's playlists, subscriptions, uploads feeds User's comments, profile, contacts feed YouTube applications interact with the feeds using the Google Data APIs
  • 13. Feed example : Top Rated http://gdata.youtube.com/feeds/api/standardfeeds/top_rated <?xml version='1.0' encoding='UTF-8'?> <feed xmlns='http://www.w3.org/2005/Atom' […] > <updated>2008-07-18T05:00:49.000-07:00</updated> <title>Top Rated</title> <openSearch:totalResults>100</openSearch:totalResults> <entry gd:etag='W/&quot;C0AMRw.&quot;'> <media:group> <media:title type='plain'>Shopping for Coats</media:title> <yt:videoid>ZTUVgYoeN_b</yt:videoid> <media:content url='http://www.youtube.com/v/ZTUVgYoeN_b?f=gdata_standard...' type='application/x-shockwave-flash' medium='video' [...] duration='215' yt:format='5'/> <media:thumbnail url='http://img.youtube.com/vi/ZTUVgYoeN_b/2.jpg' height='97' width='130' time='00:00:03.500'/> </media:group> </entry> <entry> […] </entry> </feed>
  • 14. Feed access example in Java import com.google.gdata.client.youtube.YouTubeService; import com.google.gdata.data.youtube.VideoEntry; import com.google.gdata.data.youtube.VideoFeed; YouTubeService service = new YouTubeService(clientID, developer_key); VideoFeed videoFeed = service.getFeed(new URL(feedUrl), VideoFeed.class); printVideoFeed(videoFeed, true); public static void printVideoFeed(VideoFeed videoFeed, boolean detailed) { for(VideoEntry videoEntry : videoFeed.getEntries() ) { printVideoEntry(videoEntry, detailed); } }
  • 15. Other useful things one can do with the APIs Upload Search Rate a video (Like/Dislike) Comment Add a playlist Retrieve activity feed (SUP or PubSubHubbub) Retrieve Insight video statistics Get a better grade on your exam! And more! If your application obtains OAuth/AuthSub authorization from a user, all of these can be done on user's behalf.
  • 16. Performing video search in Python import gdata.youtube.service def PrintVideoFeed(feed): for entry in feed.entry: PrintEntryDetails(entry) yt_service = gdata.youtube.service.YouTubeService() yt_service.ssl = False query = gdata.youtube.service.YouTubeVideoQuery() query.vq = search_terms query.orderby = 'viewCount' feed = yt_service.YouTubeQuery(query) PrintVideoFeed(feed)
  • 17. Direct upload in C# using Google.GData.Client; using Google.GData.Extensions; using Google.GData.YouTube; using Google.GData.Extensions.MediaRss; YouTubeService service = new YouTubeService("exampleCo-exampleApp-1", clientID, developerKey); service.setUserCredentials(username, password); YouTubeEntry newEntry = new YouTubeEntry(); newEntry.Media = new MediaGroup(); newEntry.Media.Title = new MediaTitle("My Test Movie"); newEntry.Media.Categories.Add(new MediaCategory("Autos", YouTubeNameTable.CategorySchema)); newEntry.Media.Keywords = new MediaKeywords("cars, funny"); newEntry.Media.Description = new MediaDescription("My description"); newEntry.Private = false; newEntry.Location = new GeoRssWhere(37, -122); newEntry.MediaSource = new MediaFileSource("c:file.mov", "video/quicktime"); YouTubeEntry createdEntry = service.Upload(newEntry);
  • 18. Player APIs Control the Player from your Web front-end URI parameters JavaScript API ActionScript API (Flash)
  • 19. Player Parameters <object width="425" height="344"> <param name="movie" value="http://www.youtube.com/v/u1zgFlCw8Aw?fs=1"</param> <param name="allowFullScreen" value="true"></param> <param name="allowScriptAccess" value="always"></param> <embed src="http://www.youtube.com/v/u1zgFlCw8Aw?fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="344"> </embed> </object> <iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www. youtube.com/embed/VIDEO_ID?autoplay=1" frameborder="0"> </iframe>
  • 20. Player JavaScript API : play for 6 seconds <script> const timeoutMs = 6000; var done = false; var player1 = new YT.Player('player1', {events: {'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange }}); function onPlayerReady(evt) { evt.target.playVideo(); } function onPlayerStateChange(newState) { if (newState == 1 && !done) { setTimeout(stopPlayer, timeoutMs); done = true; } } function stopPlayer() { player1.stopVideo(); } </script>
  • 21. What about mobile ? Video: David After Dentist by booba1234 http://www.youtube.com/watch?v=txqiwrbYGrs
  • 22. Mobile : Recording Java Intent i = new Intent(); i.setAction(MediaStore.VIDEO_CAPTURE); startActivityForResult(i, CAPTURE_RETURN); Objective-C IImagePickerController *imagePicker = [[[UIImagePickerController alloc] init] autorelease]; imagePicker.delegate = self; imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; imagePicker.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeMovie]; [self presentModalViewController:imagePicker animated:YES];
  • 23. Mobile : Uploading ACTION_SEND intent Use Google Data protocol to upload Libraries available for leading mobile platforms; you can use direct REST/HTTP on others
  • 26.
  • 27.
  • 28. Apps : Viewchange.org Non-profit / social change Content curated from around the world Semantic analysis of video metadata Player integration
  • 29. Apps : Shortform Curation platform for video DJs (VJs) Player integration Custom embed player
  • 30. Apps : Storify Social curation / publishing platform Multiple data sources (Twitter, Facebook, YouTube) Google Data API integration
  • 31. Apps : Memolane Curation app for your digital memories Integrates multiple sources
  • 32. Apps : The History of Jazz “Coffee table” iPad application Videos help educate and discover new music Paid app, integrated with YouTube and iTunes
  • 34. YouTube Direct : Mobile Easy authentication with AccountMananger Submission idea sync (JSON) Notification upon new assignments Video recording and upload to a specific submission idea Upload of a video selected from the gallery Geolocation tagging Massage and psychic readings
  • 35.
  • 36. One last thing ... Read the Terms of Service Monetization Guide Branding Guide [1] [1] Photo by sub_lime79 / Misty http://www.flickr.com/photos/mistybushell/2303555607/
  • 37. ToS [1] YouTube API Terms of Service http://code.google.com/apis/youtube/terms.html Monetization Guide http://code.google.com/apis/youtube/creating_monetizable_applications.html Branding Guide http://code.google.com/apis/youtube/branding.html [1] Photo by sub_lime79 / Misty http://www.flickr.com/photos/mistybushell/2303555607/
  • 38. Resources Get the YouTube API developer key and start hacking! http://code.google.com/apis/youtube/dashboard/gwt http://code.google.com/apis/youtube (docs) http://apiblog.youtube.com (blog) http://code.google.com/apis/youtube/forum (forum) twitter.com/wjarek (me)
  • 39. Q&A Jarek Wilkiewicz twitter.com/wjarek