# CameraCapturerConfiguration (/zh-CN/api-reference/rtc/flutter/class-cameracapturerconfiguration) > For AI agents: see the complete documentation index at [llms.txt](/llms.txt). ```dart @JsonSerializable(explicitToJson: true, includeIfNull: false) class CameraCapturerConfiguration { const CameraCapturerConfiguration( {this.cameraDirection, this.cameraFocalLengthType, this.deviceId, this.cameraId, this.followEncodeDimensionRatio, this.format}); @JsonKey(name: 'cameraDirection') final CameraDirection? cameraDirection; @JsonKey(name: 'cameraFocalLengthType') final CameraFocalLengthType? cameraFocalLengthType; @JsonKey(name: 'deviceId') final String? deviceId; @JsonKey(name: 'cameraId') final String? cameraId; @JsonKey(name: 'followEncodeDimensionRatio') final bool? followEncodeDimensionRatio; @JsonKey(name: 'format') final VideoFormat? format; factory CameraCapturerConfiguration.fromJson(Map json) => _$CameraCapturerConfigurationFromJson(json); Map toJson() => _$CameraCapturerConfigurationToJson(this); } ``` ## 属性 [#属性] (可选)摄像头方向。详见 [CameraDirection](/zh-CN/api-reference/rtc/flutter/enum-cameradirection)。 :::note 注: 该参数仅适用于 Android 和 iOS 平台。 ::: (可选)摄像头 ID。默认为前置摄像头对应的摄像头 ID。你可以通过 Android 原生系统 API 获取摄像头 ID,详见 [Camera.open()](https://developer.android.google.cn/reference/android/hardware/Camera#open(int)) 和 [CameraManager.getCameraIdList()](https://developer.android.google.cn/reference/android/hardware/camera2/CameraManager?hl=en#getCameraIdList())。 :::note 注: - 该参数仅适用于 Android。 - 该参数和 `cameraDirection` 均用于指定摄像头,二者为互斥关系,你可以按需选用其中之一,具体区别如下: - 通过 `cameraDirection` 指定摄像头的方式更为简便。你只需指定摄像头的方向(前置或后置),无需指定具体的摄像头 ID,SDK 会通过系统 API 去检索和确定实际的摄像头 ID。 - 通过 `cameraId` 则可以更精确地指定某个特定的摄像头。对于多摄像头的设备,`cameraDirection` 无法识别或访问全部可用摄像头,这种情况建议使用 `cameraId` 直接指定你想要的摄像头 ID。 ::: (可选)摄像头的焦距类型。详见 [CameraFocalLengthType](/zh-CN/api-reference/rtc/flutter/enum-camerafocallengthtype)。 :::note 注: - 该参数仅适用于 Android 和 iOS。 - 如需设置摄像头的焦距类型,仅支持通过 `cameraDirection` 指定摄像头,不支持通过 `cameraId` 进行指定。 - 部分 iOS 设备的后置摄像头为多个摄像头组成的融合镜头,如双摄(广角和超广角)或三摄(广角、超广角和长焦),对于这种具备超广角能力的融合镜头,你可以通过以下任意一种方式实现超广角的采集效果: - 方式一:将该参数设置为 `cameraFocalLengthUltraWide` (2)(超广角镜头)。 - 方式二:将该参数设置为 `cameraFocalLengthDefault` (0)(标准镜头),然后调用 [setCameraZoomFactor](/zh-CN/api-reference/rtc/flutter/device-management/video-device#api_irtcengine_setcamerazoomfactor) 将相机缩放比例设置为小于 1.0 的数值,最小可以设置为 0.5。 区别为方式一的超广角大小不可调节,方式二支持自由调节相机的缩放比例。 ::: (可选)视频帧格式。详见 [VideoFormat](/zh-CN/api-reference/rtc/flutter/class-videoformat)。 (可选)摄像头的 ID。最大长度为 [MaxDeviceIdLengthType](/zh-CN/api-reference/rtc/flutter/enum-maxdeviceidlengthtype)。 :::note 注: 该参数仅适用于 Windows 和 macOS。 ::: (可选)是否跟随 [setVideoEncoderConfiguration](/zh-CN/api-reference/rtc/flutter/video/video-basic#api_irtcengine_setvideoencoderconfiguration) 中设置的视频宽高比: - true:(默认) 跟随。SDK 会将采集到的视频按照已设置的视频宽高比进行裁剪,会同步改变本地预览画面、[onCaptureVideoFrame](/zh-CN/api-reference/rtc/flutter/video/video-raw#callback_ivideoframeobserver_oncapturevideoframe) 和 [onPreEncodeVideoFrame](/zh-CN/api-reference/rtc/flutter/video/video-raw#callback_ivideoframeobserver_onpreencodevideoframe) 中的视频画面。 - false:不跟随。SDK不改变采集到的视频帧宽高比。