startCamera method
- bool frontCamera
打开本地摄像头
注意:startVirtualCamera,startCamera,startScreenCapture,同一 Pusher 实例下,仅有一个能上行,三者为覆盖关系。例如先调用 startCamera,后调用 startVirtualCamera。此时表现为暂停摄像头推流,开启图片推流
参数:
frontCamera 指定摄像头方向是否为前置
- true 【默认值】: 切换到前置摄像头
- false: 切换到后置摄像头
返回值:
0
成功,更多信息请查看 V2TXLiveCode
Implementation
Future<V2TXLiveCode> startCamera(bool frontCamera) async {
var result = await _channel.invokeMethod(
'startCamera', {"frontCamera": frontCamera});
return _liveCodeWithResult(result);
}