通知
本站点除 Legacy 产品与方案外,已迁移至 声网新文档中心 ,当前页面不再维护
Documentation
All
Console 官网 Community Technical support

How can I set a mirror mode?

Type: Integration issues    Platform: Android / iOS / macOS / Windows   Last Updated: 2022/09/14 02:28:35

As of v3.0.0, Agora Native SDK provides new methods for you to obtain the desired video display effect at different stages in a video call.

Stage 1. Set a mirror mode for the local view

On the local device, the video stream of the local user is bound to the local view, and the local user can see the display effect of the local view. You can use mirrorMode in the setupLocalVideo orsetLocalRenderMode method to set a mirror effect for the local view. It affects only the local user's view on the local device, not any view on the remote device.

mirrorMode has a default value, that is, the SDK enables mirror mode at this stage when using the front camera, and disables it when using the rear camera.

Stage 2. Set a mirror effect for the remote view on the local device

The video stream of a remote user is bound to the corresponding remote view on the local device, and the local user can see the display effect of the remote view. You can use mirrorMode in the setupRemoteVideo or setRemoteRenderMode method to set a mirror effect for the remote view. It affects only the remote user's view on the local device, not any view on the remote device.

Stage 3. Set a mirror effect for the video stream to be sent

The local video stream is encoded and then sent to the remote user. You can use config in the setVideoEncoderConfiguration method to set a mirror effect for the video stream to be sent. It affects only the local user's view on the remote device, not any view on the local device.

API reference

See the following API reference for details: