An Adobe Air Component for the Vimeo Moogaloop API
I have already mentioned it in an earlier blog post that I am still working on a vimeo component for the Adobe AIR environment. Now I have created version which is stable enough for a intensive testings. So if you would like to use it for your Air Application, don't hesitate to use it. I would be very happy about some feedback messages from you.
Now I describe some special functionality compared to my FlexVimeo Player component. Because of the incompatible command Security.allowDomain() in the Adobe Air environment (which is essential for working with the Vimeo Moogaloop API ), I had to create a seperate remote player. This remote player receives control message and send control messages via LocalConnection to the AirVimeoPlayer Component. So if you use my AirVimeoPlayer Component, you must always use my remote_vimeo.swf File for controlling the Vimeo Moogaloop API. It works in the same way as the youTube AS3 API Wrapper.
The other not so nice thing is that I ran in some perfomance issue because of sending to many messages via LocalConnection. So I had to put down the amount of update message for the PlayingState.Playing, but that should not be problem for you. In my cases it works fine.
Otherwise the API of the AirVimeoPlayer is almost the same as the FlexVimeo Player API. So I supported absolutely the same functionaltiy. You can listen to the Events:
1 2 3 |
[Event(name="vimeoPlayerLoaded", type="de.derhess.video.vimeo.VimeoEvent")] [Event(name="vimeoDurationChange", type="de.derhess.video.vimeo.VimeoEvent")] [Event(name="vimeoStatus", type="de.derhess.video.vimeo.VimeoEvent")] |
For controlling the User Interface and the Vimeo Video, you can use these functions:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
public function stop():void; public function play():void ; public function pause():void; /** * Seek to specific loaded time in video (in seconds) */ public function seekTo(time:int):void; public function unloadVideo():void; public function destroyPlayer():void; public function toggleLoop():void; //---------------------------------- // Screen and RenderManagement //---------------------------------- /** * enable HD for the player, but it seems that it is not working?! */ public function hd_on():void; public function hd_off():void; public function showLikeScreen():void; public function showEmbedScreen():void; public function showHDScreen():void; public function showShareScreen():void; public function showVimeoScreenControlls():void; |
And the properties of the AirVimeoPlayer are still the same as the FlexVimeoPlayer Component, except the additional property remotePath:String, which defines the url where the remote player is.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
[Bindable] public videoClipID:int; // The vimeo video clip id [Bindable] public duration:Number; // read-only property [Bindable] public currentTime:Number; // read-only property [Bindable] public playerState:String; // Have look on the VimeoPlayingState Attributes [Bindable] public playerColor:uint; // HexValue of the Player Color [Bindable] public volume:Number; // Volume of the video Player instance [Bindable] public remotePath:String // This is the new property //-------------------------------------------------------------------------- // // Additional getters and setters // //-------------------------------------------------------------------------- [Bindable] public isPlayerLoaded:Boolean; // read-only property public isVideoPlaying:Boolean; // read-only property |
I think this information is enough about this kind of component. You can download the testing vimeo app or the whole vimeo air package, which contains the air installation data and all needed source files.
Download the Vimeo Air Component Package
nice component but unfortunately, I don’t succeed to use it with my AIR Application :/ Do you have documentation, tutorial or other like YoutubePlayer : http://code.google.com/intl/fr/apis/youtube/articles/tubeloc.html
MainChromeless.as :
public function MainChromeless()
{
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
youtubeMovie = new VimeoPlayer(13530866, 551 , 310);
youtubeMovie.addEventListener(VimeoEvent.PLAYER_LOADED, onPlayerReady);
youtubeMovie.x = 10;
youtubeMovie.y = 10;
addChild(youtubeMovie);
}
private function onPlayerReady(event_p:VimeoEvent):void
{
youtubeMovie.width = 640;
youtubeMovie.height = 480;
youtubeMovie.loadVideo(13530866);
}
Thx
I forgot :
SecurityError: Error #3207: Application-sandbox content cannot access this feature.
at flash.system::Security$/allowDomain()
at de.derhess.video.vimeo::VimeoPlayer()[C:\Users\Gozu\Desktop\AIRProject\src\de\derhess\video\vimeo\VimeoPlayer.as:46]
Hi Gozu,
sorry for my late response. I was on a long holiday trip. The vimeo team has changed some stuff on the vimeo API. So I don’t know what is the exact problem. In Flex & Air I created a special component for avoiding some Sandbox Problems…. Maybe you should check these code snippets and classes:
Vimeo Air Application Code:
http://code.google.com/p/derhess/source/browse/trunk/AS3/de/derhess/projects/air_vimeo_player/test_app_air_vimeo.mxml
VimeoAir Component in Flex:
http://code.google.com/p/derhess/source/browse/trunk/AS3/de/derhess/video/vimeo/AirVimeoPlayer.mxml
I hope that helps…
@admin
Hi, is there (after years as i see) any chance to run vimeo player on adobe air build in flash cs5 ?
Vimeo api for as3 still doesn’t work because of System.allowDomain issue…
SecurityError: Error #3207: Application-sandbox content cannot access this feature. at flash.system::Security$/allowDomain()
Can somebody help with this nightmare ?