# 人像锁定 (/zh-CN/api-reference/rtc/unreal-blueprint/video/video-prenpro/center-stage) > For AI agents: see the complete documentation index at [llms.txt](/llms.txt). ## EnableCameraCenterStage [#enablecameracenterstage] 开启或关闭人像锁定功能。 ```cpp UFUNCTION(BlueprintCallable, Category = "Agora|IRtcEngine") int EnableCameraCenterStage(bool enabled); ``` 人像锁定功能默认关闭,你需要调用该方法开启。如果需要关闭该功能,则需重新调用该方法并将 enabled 设置为 `false`。 :::caution 注意: 该方法仅适用于 iOS 和 macOS。 ::: ### 适用场景 [#适用场景] 人像锁定功能可广泛应用于在线会议、秀场、在线教育等场景。主播可以开启该功能,确保无论移动与否,自己始终在画面中心,以便取得良好的展示效果。 ### 调用时机 [#调用时机] 该方法必须在摄像头成功开启后调用,即 SDK 触发 [OnLocalVideoStateChanged](/zh-CN/api-reference/rtc/unreal-blueprint/video/video-basic#callback_irtcengineeventhandler_onlocalvideostatechanged) 回调,返回本地视频状态为 LOCAL_VIDEO_STREAM_STATE_CAPTURING (1) 后。 ### 调用限制 [#调用限制] 由于该功能对设备性能要求较高,你需要在以下类型或更高性能的设备上使用该功能: - iPad: - 12.9 英寸 iPad Pro(第五代) - 11 英寸 iPad Pro(第三代) - iPad(第九代) - iPad mini(第六代) - iPad Air(第五代) - 2020 年 M1 MacBook Pro 13 英寸 + iPhone 11(将 iPhone 作为 MacBook 的外接摄像头使用) 声网建议你在开启该功能前,先调用 [IsCameraCenterStageSupported](/zh-CN/api-reference/rtc/unreal-blueprint/video/video-prenpro/center-stage#api_irtcengine_iscameracenterstagesupported) 查询当前设备是否支持人像锁定。 ### 参数 [#参数] 是否开启人像锁定功能: - `true`:开启人像锁定。 - `false`:关闭人像锁定。 ### 返回值 [#返回值] - 0: 方法调用成功。 - < 0: 方法调用失败。详见[错误码](/zh-CN/api-reference/rtc/error-code)了解详情和解决建议。 ### 所属接口类 [#所属接口类] - [IRtcEngine](/zh-CN/api-reference/rtc/unreal-blueprint/rtc-interface-class#class_irtcengine) ## IsCameraCenterStageSupported [#iscameracenterstagesupported] 查询摄像头是否支持人像锁定。 ```cpp UFUNCTION(BlueprintCallable, Category = "Agora|IRtcEngine") bool IsCameraCenterStageSupported(); ``` :::caution 注意: 该方法仅适用于 iOS 和 macOS。 ::: 在调用 [EnableCameraCenterStage](/zh-CN/api-reference/rtc/unreal-blueprint/video/video-prenpro/center-stage#api_irtcengine_enablecameracenterstage) 开启人像锁定功能前,建议你先调用该方法查询当前设备是否支持人像锁定。 ### 调用时机 [#调用时机-1] 该方法必须在摄像头成功开启后调用,即 SDK 触发 [OnLocalVideoStateChanged](/zh-CN/api-reference/rtc/unreal-blueprint/video/video-basic#callback_irtcengineeventhandler_onlocalvideostatechanged) 回调,返回本地视频状态为 LOCAL_VIDEO_STREAM_STATE_CAPTURING (1) 后。 ### 调用限制 [#调用限制-1] 无。 ### 返回值 [#返回值-1] - `true`: 当前摄像头支持人像锁定。 - `false`: 当前摄像头不支持人像锁定。 ### 所属接口类 [#所属接口类-1] - [IRtcEngine](/zh-CN/api-reference/rtc/unreal-blueprint/rtc-interface-class#class_irtcengine)