Air 3.4 official release - stageVideo.attachCamera doesn't display anything


hello everybody,

 

 

since air 3.4 in no longer in beta phase i've decided write post stagevideo.attachcamera method should work doesn't.

 

here's source code:

 

          [swf(framerate="60", width="480", height="800")]

          public class attachvideotest extends sprite {

 

                    private var _camera:camera;

                    private var _stagevideo:stagevideo;

 

                    public function attachvideotest() {

                              stage.scalemode = stagescalemode.no_scale;

                              stage.align = stagealign.top_left;

                              initcamera();

                              stage.addeventlistener(stagevideoavailabilityevent.stage_video_availability, stagevideoavailabilityhandler);

                    }

 

                    private function initcamera():void{

                              _camera = camera.getcamera();

                              _camera.setmode(320, 240, 10, false);

                    }

 

                    private function stagevideoavailabilityhandler(event:stagevideoavailabilityevent=null):void {

                              if(event.availability == stagevideoavailability.available && stage.stagevideos){

                                        trace("stagevideoavailabilityhandler, stage.stagevideos: " +  stage.stagevideos);

                                        _stagevideo = stage.stagevideos[0];

                                        _stagevideo.viewport = new rectangle(0, 0, 320, 240);

                                        _stagevideo.attachcamera(_camera);

                              }

                    }

          }


the result white screen.
i've tested on
- samsung galaxy i9100 android 4.0.4 (original rom samsung, without mods)

- nexus s android 4.0.1

 

 

thank he

me.. toooooo -_-



More discussions in AIR Development


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support