Avatar

Correct answer by
Level 3

Well, I have not yet had a chance to test it, but with AIR 3, you should be

able to use WebCamPublisher.CameraNameIndex to set the camera to the

front-facing one.

You should be able to do something like:

function setupPublisher(publisher:WebcamPublisher):void {

var camera:Camera;

var cameraCount:uint = Camera.names.length;

for ( var i:uint = 0; i < cameraCount; ++i )

{

camera = Camera.getCamera( String(i) );

if ( camera.position == CameraPosition.FRONT )

publisher.cameraNameIndex = String(i);

}

}

(with apologies for the formatting)

View solution in original post