enableCameraCenterStage
Enables or disables portrait center stage.
virtual int enableCameraCenterStage(bool enabled) = 0;
The portrait center stage feature is off by default. You need to call this method to turn it on. If you need to disable this feature, you need to call this method again and set enabled to false.
Applicable scenarios
The portrait center stage feature can be widely used in scenarios such as online meetings, shows, online education, etc. The host can use this feature to ensure that they are always in the center of the screen, whether they move or not, in order to achieve a good display effect.
Call timing
This method must be called after the camera is successfully enabled, that is, after the SDK triggers the onLocalVideoStateChanged callback and returns the local video state as LOCAL_VIDEO_STREAM_STATE_CAPTURING (1).
Restrictions
- iPad:
- 12.9-inch iPad Pro (5th generation)
- 11-inch iPad Pro (3rd generation)
- iPad (9th generation)
- iPad mini (6th generation)
- iPad Air (5th generation)
- 2020 M1 MacBook Pro 13-inch + iPhone 11 (using iPhone as external camera for the MacBook)
Agora recommends that you call isCameraCenterStageSupported to check whether the current device supports portrait center stage before enabling this feature.
Parameters
- enabled
- Whether to enable the portrait center stage:
true: Enable portrait center stage.false: Disable portrait center stage.
Returns
- 0: Success.
- < 0: Failure.