Links and code for Acadiana Adobe User Group Presentation - Video APIs - October 21, 2008

1. YouTube javascript APIs.
http://code.google.com/apis/youtube/js_api_reference.html

2. YouTube javascript API example page.
http://code.google.com/apis/youtube/js_example_1.html

3. Including a callback function.

Javascript in head:

function onYouTubePlayerReady(playerId) { ytplayer = document.getElementById("myytplayer"); ytplayer.addEventListener("onStateChange", "onytplayerStateChange"); }

function onytplayerStateChange(newState) { var theEventID = #event_id#; xmlHTTPRequest('../xxx/youtubecallback.cfm?yt_state=' + escape(newState) + '&event_id=' + escape(theEventID)); }


Javascript in call:

var params = { allowScriptAccess: "always" }; var atts = { id: "myytplayer" }; swfobject.embedSWF("http://www.youtube.com/v/#YouTube1#&enablejsapi=1&playerapiid=ytplayer", "ytapiplayer", "#YouTubeWidth#", "#YouTubeHeight#", "8", null, null, params, atts);

Script reporting callback info:
http://www.pasa-online.org/utility/flvreport.cfm

4. JW Media Player.
http://www.jeroenwijering.com/?item=JW_FLV_Player

Javascript API:
http://code.jeroenwijering.com/trac/wiki/FlashAPI

FlashVars help:
http://code.jeroenwijering.com/trac/wiki/FlashVars

Code to make FlashVars call:

flashvars="width=240&height=200&autostart=#theautostart#&file=http://pasa-online.org/xxx/#tvspot#.flv&image=http://pasa-online.org/xxx/#tvspot#.jpg&usefullscreen=false&id=#tvspot#&callback=http://pasa-online.org/xxx/FLVcallback.cfm?armada=#url.armada#"

NOTE: Be alert that these calls were written for version 3.x of player and you may need to check 4.x references cited above to id particular FlashVars.

In action:
http://www.pasa-online.org/one/oneevent.cfm?event_id=147

5. Other useful tools, with an eye to helping clients upload their own videos into your own CMS, etc.

Tubemaster: http://tubemaster.free.fr/supported.html

Mux: http://mux.am/

And don't forget YouTube as a means of uploading and converting!

6. List of tools, etc. from Ray Camden's portion of the presentation.

FFMpeg video converter:
http://ffmpeg.mplayerhq.hu/

YouTube Dev: http://www.youtube.com/dev

Google code:
http://code.google.com/apis/youtube/overview.html (Overview)
http://code.google.com/apis/youtube/2.0/developers_guide_protocol.html (Guide)
http://code.google.com/apis/youtube/2.0/reference.html (Reference)
http://code.google.com/apis/youtube/dashboard/ (Keys)

Ray Camden's ColdFusion wrapper at RIAForge: http://youtubecfc.riaforge.org