Pages

Points to ponder when using StageVideo in an Android AIR app

If you are planning to use the StageVideo in Adobe AIR for an Android app you will need to take note of the following points.

  • In the application xml manifest document ensure that you have the renderMode set as : <renderMode>direct</renderMode>
  • In your Actionscript class set an event listener to listen for the availability of the StageVideo on the android device

stage.addEventListener(StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, availabilityChangedHandler);

  • In the event handler you can instantiate an instance of the Video class as a fallback if there is no StageVideo, or go ahead and initialise the StageVideo.
  • After activating the StageVideo make sure that you set the size of the StageVideo viewport (or you will hear your streamed video and not see any pictures whatsoever). 
  • If you are developing with the Flex SDK you need to set the application background alpha to 0

svideo = stage.stageVideos[0];

svideo.viewPort = new Rectangle( 0, 0, 622 , 480 ) ;

For the moment I think thats the nub of it. New findings will be added. Please note that StageVideo is only supported in AIR 3+ runtime

 

aYo Binitie II

No comments:

Instagram