# AgoraCameraCapturerConfiguration (/zh-CN/api-reference/rtc/macos/class-cameracapturerconfiguration)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

<a id="class_cameracapturerconfiguration__prototype"></a>

```objc
__attribute__((visibility("default"))) @interface AgoraCameraCapturerConfiguration: NSObject
#if TARGET_OS_IOS
@property (assign, nonatomic) AgoraCameraDirection cameraDirection;
@property(assign, nonatomic) AgoraFocalLength cameraFocalLengthType;
#elif TARGET_OS_MAC
@property (copy, nonatomic) NSString * _Nullable deviceId;
#endif
@property(assign, nonatomic) CGSize dimensions;
@property(assign, nonatomic) int frameRate;
@property(assign, nonatomic) BOOL followEncodeDimensionRatio;
@end
```

<a id="class_cameracapturerconfiguration__parameters"></a>

## 属性 [#属性]

<ParameterList>
<a id="cameradirection"></a>
<Parameter name="cameraDirection">

摄像头方向，仅适用于 iOS。详见 `AgoraCameraDirection`。

</Parameter>
<a id="camerafocallengthtype"></a>
<Parameter name="cameraFocalLengthType">

摄像头焦距类型，仅适用于 iOS。详见 `AgoraFocalLength`。

:::note
注： 对于配备多镜头后置摄像头的 iOS 设备（如双摄像头：广角和超广角，或三摄像头：广角、超广角和长焦），你可以使用以下任一方式以超广角视角采集视频：

- 方法一：将该参数设置为 `AgoraFocalLengthUltraWide`（2）（超广角镜头）。
- 方法二：将该参数设置为 `AgoraFocalLengthDefault`（0）（标准镜头），然后调用 `setCameraZoomFactor:` 将摄像头的缩放因子设置为小于 1.0 的值，最小值为 0.5。

两种方法的区别在于，方法一的超广角尺寸不可调节，而方法二支持自由调节摄像头的缩放因子。
:::

</Parameter>
<a id="deviceid"></a>
<Parameter name="deviceId">

摄像头设备 ID，仅适用于 macOS。

</Parameter>
<a id="dimensions"></a>
<Parameter name="dimensions">

视频帧的尺寸（单位：像素）。默认值为 960 × 540。

</Parameter>
<a id="framerate"></a>
<Parameter name="frameRate">

视频帧的帧率（单位：fps）。默认值为 15。

</Parameter>
<a id="followencodedimensionratio"></a>
<Parameter name="followEncodeDimensionRatio">

是否遵循通过 `setVideoEncoderConfiguration` 设置的视频宽高比。

- YES：（默认）遵循设置的视频宽高比。SDK 会根据设置的视频宽高比裁剪采集的视频，并同步更新本地预览画面以及 `onCaptureVideoFrame` 和 `onPreEncodeVideoFrame` 中的视频帧。
- NO：不遵循设置的视频宽高比。SDK 不会更改采集视频帧的宽高比。

</Parameter>
</ParameterList>
