Note that there are some explanatory texts on larger screens.

plurals
  1. PODisplay bug with Front Camera, Video and VideoDisplay in Adobe AIR (Flex 4.6.0) for Android
    primarykey
    data
    text
    <p>I'm current working wits <code>AS3</code> and <code>Flex 4.6</code> to create an android application. i'm using the front camera and attach it to a local <code>Video</code> object that i add as an child to an <code>VideoDisplay</code> object.</p> <p>When i debug on my computer everything is working perfectly, but when i build the project and run it on my Android device my local video display becomes an gray grid. As example i took an picture of the device.<img src="https://i.stack.imgur.com/o0FoB.jpg" alt="Picture of the problem"></p> <p>I wrote this method based on a post here on Stackoverflow to initialize the front and back camera.</p> <pre><code>private function InitCamera():void { var CamCount:int = ( Camera.isSupported ) ? Camera.names.length : 0; for( var i:int = 0; i &lt; CamCount; i++ ) { var cam:Camera = Camera.getCamera( String( i ) ); if( cam ) { if( cam.position == CameraPosition.FRONT ) { CamFront = cam; continue; } if( cam.position == CameraPosition.BACK ) { CamBack = cam; continue; } if( cam.position == CameraPosition.UNKNOWN ) { CamFront = cam; continue; } } } } </code></pre> <p>And i wrote this method to create an <code>Video</code> object, attach the front <code>Camera</code> as the default camera and add the <code>Video</code> as an child to an <code>VideoDisplay</code>:</p> <pre><code>private function SetUpLocalVideo():void { Debug( "Setting up local video" ); LocalVideo = new Video( this.LVideo.width, this.LVideo.height ); LocalVideo.attachCamera( CamFront ); LVideo.addChild( LocalVideo ); &lt;--- this is the VideoDisplay } </code></pre> <p>I've been searching on the internet for an solution, but so far i failed to find any.</p> <p>Do any one else had this problem before ? can you share you solutions with me ? I appreciate the help.</p> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload