SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Downloaden Sie, um offline zu lesen
Building Video Apps
 with YouTube APIs
      Silicon Valley CodeCamp
                Jarek Wilkiewicz
              twitter.com/wjarek
                      10/10/2010
Agenda
  Intro
  Life of a video
  APIs
     Back-end (Google Data API)
     Front-end (Player)
  App Examples
     YouTube Direct
     YouTube Direct Mobile
  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>

Is video application development hard ?
                                          *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,
  description, location, 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=football+-soccer
   &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
   Call Kanye
   And more!

If your application obtains OAuth/AuthSub authorization from a
user, all of these can be done on user's behalf.
Adding a playlist in PHP

<?php
require_once 'Zend/Loader.php'; // the Zend dir must be in your include_path
Zend_Loader::loadClass('Zend_Gdata_YouTube');
[…] // authenticate
$yt = new Zend_Gdata_YouTube($httpClient, $applicationId, $clientId, $developerKey);
$newPlaylist = $yt->newPlaylistListEntry();
$newPlaylist->description = $yt->newDescription()->setText('description of my new playlist');
$newPlaylist->title = $yt->newTitle()->setText('title of my new playlist');
// post the new playlist
$postLocation = 'http://gdata.youtube.com/feeds/api/users/default/playlists';
try {
  $yt->insertEntry($newPlaylist, $postLocation);
} catch (Zend_Gdata_App_Exception $e) {
  echo $e->getMessage();
}
?>
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 (AS3, AS2 deprecated)
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 : load a video

<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
      google.load("swfobject", "2.1");
</script>
[...]
// The video to load.
var videoID = "ylLzyHk54Z0"
// Lets Flash from another domain call JavaScript
var params = { allowScriptAccess: "always" };
// The element id of the Flash embed
var atts = { id: "ytPlayer" };
// All of the magic handled by SWFObject (http://code.google.com/p/swfobject/)
swfobject.embedSWF("http://www.youtube.com/v/" + videoID +
              "&enablejsapi=1&playerapiid=player1",
              "videoDiv", "480",
              "295", "8", null, null, params, atts);
Player JavaScript API : Events

function onYouTubePlayerReady(playerId) {
  ytplayer = document.getElementById("ytPlayer");
  ytplayer.addEventListener("onStateChange", "onPlayerStateChange");
  ytplayer.addEventListener("onError", "onPlayerError");
}
function onPlayerStateChange(newState) {
  updateHTML("playerState", newState);
  updatePlayerInfo()
}
function updatePlayerInfo() {
  if(ytplayer) {
    updateHTML("videoDuration", ytplayer.getDuration());
    updateHTML("videoCurrentTime", ytplayer.getCurrentTime());
    updateHTML("bytesTotal", ytplayer.getVideoBytesTotal());
    updateHTML("startBytes", ytplayer.getVideoStartBytes());
    updateHTML("bytesLoaded", ytplayer.getVideoBytesLoaded());
  }
}
Player API : ActionScript

private static const PLAYER_URL:String =
     "http://www.youtube.com/apiplayer?version=3";
[…]

private function setupPlayerLoader():void {
  playerLoader = new SWFLoader();
  playerLoader.addEventListener(Event.INIT, playerLoaderInitHandler);
  playerLoader.load(PLAYER_URL);
}

private function playerLoaderInitHandler(event:Event):void {
  addChild(playerLoader);
  playerLoader.content.addEventListener("onReady", onPlayerReady);
  playerLoader.content.addEventListener("onError", onPlayerError);
}
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
Mobile : Sharing, Searching, Playback



  Sharing, Searching
     Java Google Data Library
     Objective-C Google Data Library

  Playback
     ACTION_VIEW intent
     openURL method of the UIApplication
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/
App Examples
YouTube Direct : Overview

YouTube Direct (YTD) is an open source video
submission platform that is built on top of the YouTube
API and Google App Engine.

YTD has two components:
  Embeddable video uploader <iframe>.
  Admin-only moderation control panel.

Google Code Project:
http://code.google.com/p/youtube-direct/
YouTube Direct : Overview

Download the code and deploy to your own
App Engine instance.

Demo at:
http://ytd-demo.appspot.com/test.html
YouTube Direct : Upload Interface
YouTube Direct : Upload Interface
YouTube Direct : Upload Interface
YouTube Direct : Admin Interface
YouTube Direct : Architecture
YouTube Direct : Mobile


  Mobile application for video upload
  Integrated with your YouTube Direct instance
  running on AppEngine
  Extensively tested on NexusOne, iPhone
  version in the works
  Google Code Project
  http://code.google.com/p/ytd-android/
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
Example : http://ureport.abc7news.com
Conclusion

Is video application development hard ?

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)
Backup slides
Playgrounds


OAuth Playground
http://googlecodesamples.com/oauth_playground/

Chromeless Player
http://code.google.com/apis/ajax/playground/?
exp=youtube#chromeless_player

Player Demo
http://code.google.com/apis/youtube/youtube_player_demo.html
Docs Links
    Protocol Reference
http://code.google.com/apis/youtube/2.0/reference.html
    Developer Guide
http://code.google.com/apis/youtube/2.0/developers_guide_protocol_audience.html
    Player APIs
http://code.google.com/apis/youtube/getting_started.html#player_apis
    Mobile Resources
http://code.google.com/apis/youtube/articles/youtube_mobileresources.html
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/

Weitere ähnliche Inhalte

Was ist angesagt?

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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 

Was ist angesagt? (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
 
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
 
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
 
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
 
Writing first-hudson-plugin
Writing first-hudson-pluginWriting first-hudson-plugin
Writing first-hudson-plugin
 
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)
 
Os Johnson
Os JohnsonOs Johnson
Os Johnson
 
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
 
WordCamp Raleigh WordPress & Social Media Integration
WordCamp Raleigh WordPress & Social Media IntegrationWordCamp Raleigh WordPress & Social Media Integration
WordCamp Raleigh WordPress & Social Media Integration
 
Eclipse Overview
Eclipse Overview Eclipse Overview
Eclipse Overview
 
Mobile Meow at Mobilism
Mobile Meow at MobilismMobile Meow at Mobilism
Mobile Meow at Mobilism
 
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 ...
 
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
 
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
 
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
 
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
 
Gae
GaeGae
Gae
 

Andere mochten auch

Why APIs are Different Than Integration
Why APIs are Different Than IntegrationWhy APIs are Different Than Integration
Why APIs are Different Than IntegrationApigee | Google Cloud
 
YouTube API Japan UG #1
YouTube API Japan UG #1YouTube API Japan UG #1
YouTube API Japan UG #1Yukio Andoh
 
Youtube IFrame Player API
Youtube IFrame Player APIYoutube IFrame Player API
Youtube IFrame Player APIRyan Chung
 
4w 1h with youtube api
4w 1h with youtube api4w 1h with youtube api
4w 1h with youtube apiOue Ekasit
 
Scaling APIs: Predict, Prepare for, Overcome the Challenges
Scaling APIs: Predict, Prepare for, Overcome the ChallengesScaling APIs: Predict, Prepare for, Overcome the Challenges
Scaling APIs: Predict, Prepare for, Overcome the ChallengesApigee | Google Cloud
 
IT-youtube Presentation
IT-youtube PresentationIT-youtube Presentation
IT-youtube Presentationsafiya999
 
Youtube Presentation
Youtube PresentationYoutube Presentation
Youtube Presentationtownsend
 
YouTube Presentation
YouTube PresentationYouTube Presentation
YouTube Presentationguest786f62
 
Federated Search: The Good, The Bad And The Ugly
Federated Search: The Good, The Bad And The UglyFederated Search: The Good, The Bad And The Ugly
Federated Search: The Good, The Bad And The Uglydorishelfer
 
YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autón...
YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autón...YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autón...
YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autón...Jarek Wilkiewicz
 
Youtube를활용한app만들기
Youtube를활용한app만들기Youtube를활용한app만들기
Youtube를활용한app만들기DaeHee Jang
 
Google {Learning} Analytics GEUG14
Google {Learning} Analytics GEUG14 Google {Learning} Analytics GEUG14
Google {Learning} Analytics GEUG14 Martin Hawksey
 
The Day The Earth Broke Into Two...A Jataka Story
The Day The Earth Broke Into Two...A Jataka StoryThe Day The Earth Broke Into Two...A Jataka Story
The Day The Earth Broke Into Two...A Jataka StoryOH TEIK BIN
 
Wisdom From A Laugh 145, 146
Wisdom From A Laugh 145, 146Wisdom From A Laugh 145, 146
Wisdom From A Laugh 145, 146OH TEIK BIN
 
DESIGN IT! Talk #001 (UX) Yukio Andoh
DESIGN IT! Talk #001 (UX) Yukio AndohDESIGN IT! Talk #001 (UX) Yukio Andoh
DESIGN IT! Talk #001 (UX) Yukio AndohYukio Andoh
 
Google Search Engine
Google Search Engine Google Search Engine
Google Search Engine Aniket_1415
 
How to upload PowerPoint to You Tube
How to upload PowerPoint to You TubeHow to upload PowerPoint to You Tube
How to upload PowerPoint to You Tubegaochuhan
 

Andere mochten auch (20)

Why APIs are Different Than Integration
Why APIs are Different Than IntegrationWhy APIs are Different Than Integration
Why APIs are Different Than Integration
 
YouTube API Japan UG #1
YouTube API Japan UG #1YouTube API Japan UG #1
YouTube API Japan UG #1
 
Api vortrag
Api vortragApi vortrag
Api vortrag
 
Youtube IFrame Player API
Youtube IFrame Player APIYoutube IFrame Player API
Youtube IFrame Player API
 
4w 1h with youtube api
4w 1h with youtube api4w 1h with youtube api
4w 1h with youtube api
 
Scaling APIs: Predict, Prepare for, Overcome the Challenges
Scaling APIs: Predict, Prepare for, Overcome the ChallengesScaling APIs: Predict, Prepare for, Overcome the Challenges
Scaling APIs: Predict, Prepare for, Overcome the Challenges
 
IT-youtube Presentation
IT-youtube PresentationIT-youtube Presentation
IT-youtube Presentation
 
Youtube Presentation
Youtube PresentationYoutube Presentation
Youtube Presentation
 
YouTube Powerpoint
YouTube PowerpointYouTube Powerpoint
YouTube Powerpoint
 
YouTube Presentation
YouTube PresentationYouTube Presentation
YouTube Presentation
 
Federated Search: The Good, The Bad And The Ugly
Federated Search: The Good, The Bad And The UglyFederated Search: The Good, The Bad And The Ugly
Federated Search: The Good, The Bad And The Ugly
 
YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autón...
YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autón...YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autón...
YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autón...
 
Youtube를활용한app만들기
Youtube를활용한app만들기Youtube를활용한app만들기
Youtube를활용한app만들기
 
Google {Learning} Analytics GEUG14
Google {Learning} Analytics GEUG14 Google {Learning} Analytics GEUG14
Google {Learning} Analytics GEUG14
 
The Day The Earth Broke Into Two...A Jataka Story
The Day The Earth Broke Into Two...A Jataka StoryThe Day The Earth Broke Into Two...A Jataka Story
The Day The Earth Broke Into Two...A Jataka Story
 
Wisdom From A Laugh 145, 146
Wisdom From A Laugh 145, 146Wisdom From A Laugh 145, 146
Wisdom From A Laugh 145, 146
 
DESIGN IT! Talk #001 (UX) Yukio Andoh
DESIGN IT! Talk #001 (UX) Yukio AndohDESIGN IT! Talk #001 (UX) Yukio Andoh
DESIGN IT! Talk #001 (UX) Yukio Andoh
 
Effective writing
Effective writingEffective writing
Effective writing
 
Google Search Engine
Google Search Engine Google Search Engine
Google Search Engine
 
How to upload PowerPoint to You Tube
How to upload PowerPoint to You TubeHow to upload PowerPoint to You Tube
How to upload PowerPoint to You Tube
 

Ähnlich wie Building Video Applications with YouTube APIs

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
 
HTML5 multimedia - where we are, where we're going
HTML5 multimedia - where we are, where we're goingHTML5 multimedia - where we are, where we're going
HTML5 multimedia - where we are, where we're goingbrucelawson
 
HTML5 Multimedia: where we are, where we're going
HTML5 Multimedia: where we are, where we're goingHTML5 Multimedia: where we are, where we're going
HTML5 Multimedia: where we are, where we're goingbrucelawson
 
HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...
HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...
HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...Patrick Lauke
 
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 Google App Engine Oil Framework
The Google App Engine Oil FrameworkThe Google App Engine Oil Framework
The Google App Engine Oil FrameworkEric ShangKuan
 
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
 
Google analytics
Google analyticsGoogle analytics
Google analyticsSean Tsai
 
Multimedia on the web - HTML5 video and audio
Multimedia on the web - HTML5 video and audioMultimedia on the web - HTML5 video and audio
Multimedia on the web - HTML5 video and audioChristian Heilmann
 
The Rich Standard: Getting Familiar with HTML5
The Rich Standard: Getting Familiar with HTML5The Rich Standard: Getting Familiar with HTML5
The Rich Standard: Getting Familiar with HTML5Todd Anglin
 
HTML5 Video Player - HTML5 Dev Conf 2012
HTML5 Video Player - HTML5 Dev Conf 2012HTML5 Video Player - HTML5 Dev Conf 2012
HTML5 Video Player - HTML5 Dev Conf 2012steveheffernan
 
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
 
HTML5 for Rich User Experience
HTML5 for Rich User ExperienceHTML5 for Rich User Experience
HTML5 for Rich User ExperienceMahbubur Rahman
 
Hands on SPA development
Hands on SPA developmentHands on SPA development
Hands on SPA developmentShawn Constance
 
audio, video and canvas in HTML5 - standards>next Manchester 29.09.2010
audio, video and canvas in HTML5 - standards>next Manchester 29.09.2010audio, video and canvas in HTML5 - standards>next Manchester 29.09.2010
audio, video and canvas in HTML5 - standards>next Manchester 29.09.2010Patrick Lauke
 
Capture, record, clip, embed and play, search: video from newbie to ninja
Capture, record, clip, embed and play, search: video from newbie to ninjaCapture, record, clip, embed and play, search: video from newbie to ninja
Capture, record, clip, embed and play, search: video from newbie to ninjaVito Flavio Lorusso
 
Structure your Play application with the cake pattern (and test it)
Structure your Play application with the cake pattern (and test it)Structure your Play application with the cake pattern (and test it)
Structure your Play application with the cake pattern (and test it)yann_s
 

Ähnlich wie Building Video Applications with YouTube APIs (20)

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
 
HTML5 multimedia - where we are, where we're going
HTML5 multimedia - where we are, where we're goingHTML5 multimedia - where we are, where we're going
HTML5 multimedia - where we are, where we're going
 
Introduction to python scrapping
Introduction to python scrappingIntroduction to python scrapping
Introduction to python scrapping
 
HTML5 Multimedia: where we are, where we're going
HTML5 Multimedia: where we are, where we're goingHTML5 Multimedia: where we are, where we're going
HTML5 Multimedia: where we are, where we're going
 
HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...
HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...
HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...
 
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 Google App Engine Oil Framework
The Google App Engine Oil FrameworkThe Google App Engine Oil Framework
The Google App Engine Oil Framework
 
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)
 
Google analytics
Google analyticsGoogle analytics
Google analytics
 
Multimedia on the web - HTML5 video and audio
Multimedia on the web - HTML5 video and audioMultimedia on the web - HTML5 video and audio
Multimedia on the web - HTML5 video and audio
 
The Rich Standard: Getting Familiar with HTML5
The Rich Standard: Getting Familiar with HTML5The Rich Standard: Getting Familiar with HTML5
The Rich Standard: Getting Familiar with HTML5
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
 
HTML5 Video Player - HTML5 Dev Conf 2012
HTML5 Video Player - HTML5 Dev Conf 2012HTML5 Video Player - HTML5 Dev Conf 2012
HTML5 Video Player - HTML5 Dev Conf 2012
 
Web Apps
Web AppsWeb Apps
Web Apps
 
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...
 
HTML5 for Rich User Experience
HTML5 for Rich User ExperienceHTML5 for Rich User Experience
HTML5 for Rich User Experience
 
Hands on SPA development
Hands on SPA developmentHands on SPA development
Hands on SPA development
 
audio, video and canvas in HTML5 - standards>next Manchester 29.09.2010
audio, video and canvas in HTML5 - standards>next Manchester 29.09.2010audio, video and canvas in HTML5 - standards>next Manchester 29.09.2010
audio, video and canvas in HTML5 - standards>next Manchester 29.09.2010
 
Capture, record, clip, embed and play, search: video from newbie to ninja
Capture, record, clip, embed and play, search: video from newbie to ninjaCapture, record, clip, embed and play, search: video from newbie to ninja
Capture, record, clip, embed and play, search: video from newbie to ninja
 
Structure your Play application with the cake pattern (and test it)
Structure your Play application with the cake pattern (and test it)Structure your Play application with the cake pattern (and test it)
Structure your Play application with the cake pattern (and test it)
 

Kürzlich hochgeladen

COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 
GenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncGenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncObject Automation
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 
Babel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxBabel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxYounusS2
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
Spring24-Release Overview - Wellingtion User Group-1.pdf
Spring24-Release Overview - Wellingtion User Group-1.pdfSpring24-Release Overview - Wellingtion User Group-1.pdf
Spring24-Release Overview - Wellingtion User Group-1.pdfAnna Loughnan Colquhoun
 
Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.francesco barbera
 
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdfJamie (Taka) Wang
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URLRuncy Oommen
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfinfogdgmi
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 

Kürzlich hochgeladen (20)

COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 
GenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncGenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation Inc
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 
Babel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxBabel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptx
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
Spring24-Release Overview - Wellingtion User Group-1.pdf
Spring24-Release Overview - Wellingtion User Group-1.pdfSpring24-Release Overview - Wellingtion User Group-1.pdf
Spring24-Release Overview - Wellingtion User Group-1.pdf
 
Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.
 
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URL
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdf
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 

Building Video Applications with YouTube APIs

  • 1. Building Video Apps with YouTube APIs Silicon Valley CodeCamp Jarek Wilkiewicz twitter.com/wjarek 10/10/2010
  • 2. Agenda Intro Life of a video APIs Back-end (Google Data API) Front-end (Player) App Examples YouTube Direct YouTube Direct Mobile 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> Is video application development hard ? *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, description, location, 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=football+-soccer &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
  • 10. APIs Google Data APIs Player APIs
  • 11. 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
  • 12. 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>
  • 13. 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); } }
  • 14. 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 Call Kanye And more! If your application obtains OAuth/AuthSub authorization from a user, all of these can be done on user's behalf.
  • 15. Adding a playlist in PHP <?php require_once 'Zend/Loader.php'; // the Zend dir must be in your include_path Zend_Loader::loadClass('Zend_Gdata_YouTube'); […] // authenticate $yt = new Zend_Gdata_YouTube($httpClient, $applicationId, $clientId, $developerKey); $newPlaylist = $yt->newPlaylistListEntry(); $newPlaylist->description = $yt->newDescription()->setText('description of my new playlist'); $newPlaylist->title = $yt->newTitle()->setText('title of my new playlist'); // post the new playlist $postLocation = 'http://gdata.youtube.com/feeds/api/users/default/playlists'; try { $yt->insertEntry($newPlaylist, $postLocation); } catch (Zend_Gdata_App_Exception $e) { echo $e->getMessage(); } ?>
  • 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 (AS3, AS2 deprecated)
  • 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 : load a video <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script type="text/javascript"> google.load("swfobject", "2.1"); </script> [...] // The video to load. var videoID = "ylLzyHk54Z0" // Lets Flash from another domain call JavaScript var params = { allowScriptAccess: "always" }; // The element id of the Flash embed var atts = { id: "ytPlayer" }; // All of the magic handled by SWFObject (http://code.google.com/p/swfobject/) swfobject.embedSWF("http://www.youtube.com/v/" + videoID + "&enablejsapi=1&playerapiid=player1", "videoDiv", "480", "295", "8", null, null, params, atts);
  • 21. Player JavaScript API : Events function onYouTubePlayerReady(playerId) { ytplayer = document.getElementById("ytPlayer"); ytplayer.addEventListener("onStateChange", "onPlayerStateChange"); ytplayer.addEventListener("onError", "onPlayerError"); } function onPlayerStateChange(newState) { updateHTML("playerState", newState); updatePlayerInfo() } function updatePlayerInfo() { if(ytplayer) { updateHTML("videoDuration", ytplayer.getDuration()); updateHTML("videoCurrentTime", ytplayer.getCurrentTime()); updateHTML("bytesTotal", ytplayer.getVideoBytesTotal()); updateHTML("startBytes", ytplayer.getVideoStartBytes()); updateHTML("bytesLoaded", ytplayer.getVideoBytesLoaded()); } }
  • 22. Player API : ActionScript private static const PLAYER_URL:String = "http://www.youtube.com/apiplayer?version=3"; […] private function setupPlayerLoader():void { playerLoader = new SWFLoader(); playerLoader.addEventListener(Event.INIT, playerLoaderInitHandler); playerLoader.load(PLAYER_URL); } private function playerLoaderInitHandler(event:Event):void { addChild(playerLoader); playerLoader.content.addEventListener("onReady", onPlayerReady); playerLoader.content.addEventListener("onError", onPlayerError); }
  • 23. What about mobile ? Video: David After Dentist by booba1234 http://www.youtube.com/watch?v=txqiwrbYGrs
  • 24. 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];
  • 25. 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. Mobile : Sharing, Searching, Playback Sharing, Searching Java Google Data Library Objective-C Google Data Library Playback ACTION_VIEW intent openURL method of the UIApplication
  • 27. 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/
  • 29. YouTube Direct : Overview YouTube Direct (YTD) is an open source video submission platform that is built on top of the YouTube API and Google App Engine. YTD has two components: Embeddable video uploader <iframe>. Admin-only moderation control panel. Google Code Project: http://code.google.com/p/youtube-direct/
  • 30. YouTube Direct : Overview Download the code and deploy to your own App Engine instance. Demo at: http://ytd-demo.appspot.com/test.html
  • 31. YouTube Direct : Upload Interface
  • 32. YouTube Direct : Upload Interface
  • 33. YouTube Direct : Upload Interface
  • 34. YouTube Direct : Admin Interface
  • 35. YouTube Direct : Architecture
  • 36. YouTube Direct : Mobile Mobile application for video upload Integrated with your YouTube Direct instance running on AppEngine Extensively tested on NexusOne, iPhone version in the works Google Code Project http://code.google.com/p/ytd-android/
  • 37. 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
  • 39. Conclusion Is video application development hard ? 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)
  • 42. Docs Links Protocol Reference http://code.google.com/apis/youtube/2.0/reference.html Developer Guide http://code.google.com/apis/youtube/2.0/developers_guide_protocol_audience.html Player APIs http://code.google.com/apis/youtube/getting_started.html#player_apis Mobile Resources http://code.google.com/apis/youtube/articles/youtube_mobileresources.html
  • 43. 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/