openLocalCamera method
Future<TUIActionCallback>
openLocalCamera(
)
Implementation
Future<TUIActionCallback> openLocalCamera() async {
var isGranted = await Permission.camera.isGranted;
if (!isGranted) {
var cameraPermission = await Permission.camera.request();
if (!cameraPermission.isGranted) {
return TUIActionCallback(
code: TUIError.errPermissionDenied,
message: "camera permission denied");
}
}
var result = await _roomEngine.openLocalCamera(
RoomStore.to.videoSetting.isFrontCamera,
RoomStore.to.videoSetting.videoResolution);
if (result.code == TUIError.success) {
RoomStore.to.videoSetting.isCameraOpened = true;
}
return result;
}