Youtube Player API Category

這次 YouTube Chromeless Player API 對 ActionScript 3 的支持堪稱完美了! 首先,回顧之前常用的 Youtube Player API,來個部分總結: youtubechromelesswrapper-as3 youtubechromelesswrapper-as3 的原理是利用 ActionScript’s ExternalInterface class & YouTube’s JavaScript API 進行交互。 查看它的原始碼可以看出它 Loading 的 Youtube Player 地址。 1 2 3 4 5 6 7 //Loading youtube 的 apiplayer,并且設置可以與 Javascript 互動。 private static const CHROMELESS_PLAYER_URL:String="http://www.youtube.com/apiplayer?enablejsapi=1" … _loader = new Loader(); //_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, [...]

差不多一年前 YouTube APIs and Tools team 發布了 YouTube Player API ,另人遺憾的是在對ActionScript2良好的支持上,卻對現在最流行的ActionScript3的支持并不友好,特別是對新手來說,處理AS3和AS2直接的交互和Youtube Player的控制會比較復雜。 TubeLoc 是 Ben Longoria 寫的一個AS2 YouTube Player API的AS3/Flex Proxy Library,你可以非常簡單容易的把Youtube Video加入到你的AS3/Adobe Flex/Adobe Air/AsWing工程當中,真正做到Nice Support! 支持目前最流行的AS3/Adobe Flex/Adobe Air/AsWing 包含了一個Flex Component(Movie.as)和一個基于Sprite的ActionScript3 Class(MovieSprite.as) 支持YouTube Chromeless Player 和 Full-Chrome Player 使用LocalConnection 具體請看: TubeLoc in Google Code TubeLoc in YouTube APIs and Tools