Skip to main content
Participant
August 12, 2014
Question

Getting Flex mobile camera or CameraUI?

  • August 12, 2014
  • 0 replies
  • 256 views

1  traditional way of getting flex mobile camera ,we both know that

cam = Camera.getCamera("0"); //get rear camera of mobile

cam = Camera.getCamera("1");// get front camera of mobile

and this way, i can easily push stream to AMS5.0

but the problem is that , the camera presented in mobile is 90 degree left ,unnormal. how can i get the right view of video

2 another  way of getting camera is using CameraUI class

if(CameraUI.isSupported){
var   cam:CameraUI = new CameraUI();
cam.launch(MediaType.IMAGE);
//publishmyCam();
}
else{
//la.text = "您没有安装摄像头";
}

i paste the code in fb4.6 above

this way i get the rear camera of my mobile , but now i don't know how to publish stream to AMS.

nsOut.attachCamera (cam);   //nsOut is NetStream , this gives me a wrong infomation ,can't attach CameraUI here

anyone could tell me how to do it ?     

    This topic has been closed for replies.