I have developed simple camera application for Android mobile using flex 4. The problem is , when I run that application it uses the rear camera. It’s not using the front camera. How can I change the camera. I need to use front side camera for this application , kindly help me .
var camera:Camera = Camera.getCamera(cameraIndex.toString());
if (camera)
{
var ui: UIComponent = new UIComponent();
var localVideoDisplay: Video = new Video(180, 135);
localVideoDisplay.attachCamera(camera);
ui.addChild(localVideoDisplay);
cameraGroup.addChild(ui);
}
this is the code I have used in my application.
try
Use
getCamera(CameraPosition.FRONT)