我正在通过via:https://github.com/voximplant/react-native-voximplant将我的React与via平台集成起来
我怎么把前面的照相机换回来呢?在文档或相关示例中找不到任何信息。
发布于 2022-11-07 10:45:36
要将摄像机从前面切换到后面,需要使用switchCamera方法,如下例所示
import { Voximplant } from 'react-native-voximplant';
const switchCamera = () => {
Voximplant.Hardware.CameraManager.getInstance().switchCamera(Voximplant.Hardware.CameraType.BACK);
}您还可以监听Voximplant.Hardware.CameraEvents.CameraSwitchDone和Voximplant.Hardware.CameraEvents.CameraSwitchError事件,以监视摄像机更改的状态。
https://stackoverflow.com/questions/73692298
复制相似问题