为啥手机的摄像头和正面的摄像头是90°歪斜,使用ui.rotation=90;都没有效果。。。
下面的代码:
if(a.length==1){
trace("手机后摄像头");
cam = Camera.getCamera("0");
}else{
trace("手机前摄像头");
cam = Camera.getCamera("1");
cam.setMode(400, 300, 30, false);
cam.setMotionLevel(0);
this.video = new Video();
this.video.attachCamera(cam);
//使用mx:UIComponent或者s:VideoDisplay播放摄像头
ui.addChild(this.video);
}
下面的代码:
if(a.length==1){
trace("手机后摄像头");
cam = Camera.getCamera("0");
}else{
trace("手机前摄像头");
cam = Camera.getCamera("1");
cam.setMode(400, 300, 30, false);
cam.setMotionLevel(0);
this.video = new Video();
this.video.attachCamera(cam);
//使用mx:UIComponent或者s:VideoDisplay播放摄像头
ui.addChild(this.video);
}