Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,如果我开始使用前置摄像头进行会话,我正在尝试在后置摄像头和前置摄像头之间切换它可以工作,但另一方面,AVCapturepreview 层不可见,只是显示一个空白屏幕。
首先停止预览会话。停止时(为此使用委托)设置所需的相机设备并重新启动预览会话。在代码中:
[[PBJVision sharedInstance] stopPreview]; //implement the following deluge ate - (void)visionSessionDidStopPreview:(PBJVision *)vision{ vision.cameraDevice = PBJCameraDeviceFront; [vision startPreview]; }