您好我正在使用 AV 框架尝试访问前置摄像头...
这是我这样做的代码..
+ (AVCaptureDevice *)camera
{
NSArray *devices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo];
for (AVCaptureDevice *device in devices) {
if ([device position] == AVCaptureDevicePositionFront) {
NSLog(@"Device Position is :%i",device.position);
return device;
}
}
return nil;
}
NSLog 告诉我我在第二个位置,但是我屏幕上显示的视频仍然来自后面……有什么建议吗?