logo
Video Call
On this page

Scenario-based Audio and Video Configuration


Feature Introduction

To facilitate quick integration and reduce the integration threshold for developers, the SDK has developed various scenario-based configuration solutions through extensive online data verification. Developers can select the corresponding room mode based on the required scenario, and the SDK will automatically apply configurations suitable for that scenario, such as audio and video codecs, audio and video parameters, flow control strategies, etc., thereby quickly achieving the best results in that scenario. Currently supported scenarios include showcase live streaming, KTV, standard 1v1 audio and video calls, high-quality 1v1 audio and video calls, standard voice chat room, and high-quality voice chat room.

Usage Method

In the profile (ZegoEngineProfile) parameter when creating the engine, you need to specify a scenario in the scenario (ZegoScenario) field. You can choose based on your actual audio and video business scenario.

Warning
  • Users in the same room are recommended to use the same room scenario for the best results.
  • If your App has multiple audio and video business scenarios, for example, both 1v1 audio and video call scenarios and showcase live streaming scenarios. You can switch scenarios by calling setRoomScenario after leaving the room, without destroying the engine (destroyEngine), and then login to other rooms.

Currently, the SDK supports the following scenarios:

Scenario (Supported version: 3.0.0 and above)Scenario DescriptionKey Configuration Description
Broadcast

Live streaming scenario, suitable for one-to-many live streaming scenarios such as showcase, gaming, e-commerce, education large classes, etc. It has been optimized for audio and video quality, smoothness, compatibility, etc.

Note: In the live streaming scenario, the SDK does not distinguish between business "roles" (such as hosts and viewers), and all users in the room can publish and play streams.

  • Resolution: 540p.
  • Frame rate: 24 fps.
  • Audio encoder compatibility: Server-side transcoding is required when interoperating with Web SDK.
StandardVideoCall

Standard audio and video call scenario, suitable for 1v1 video or voice call scenarios.

  • Resolution: 360p.
  • Frame rate: 15 fps.
  • Audio encoder compatibility: Only available for RTC streaming, server-side transcoding is required when relaying to CDN.
HighQualityVideoCall

High-quality audio and video call scenario, similar to the StandardVideoCall scenario, but this scenario uses higher video configurations by default than the StandardVideoCall scenario, suitable for video call scenarios with higher requirements for video quality.

  • Resolution: 540p.
  • Frame rate: 24 fps.
  • Audio encoder compatibility: Only available for RTC streaming, server-side transcoding is required when relaying to CDN.
StandardVoiceCall

Standard voice call scenario, suitable for 1v1 pure voice call scenarios.

Note: On the Real-time Audio and Video (Express-Video) SDK, this scenario does not enable the camera by default.

-
StandardChatroom

Standard voice chat room scenario, suitable for multi-person pure voice calls, saving traffic.

Note: On the Real-time Audio and Video (Express-Video) SDK, this scenario does not enable the camera by default. For voice chat room scenarios with music, it is recommended to choose the high-quality voice chat room scenario configuration.

Audio encoder compatibility: Only available for RTC streaming, server-side transcoding is required when relaying to CDN.
HighQualityChatroom

High-quality voice chat room scenario, similar to the StandardChatroom scenario, but this scenario uses higher audio configurations by default than the StandardChatroom scenario, suitable for multi-person pure voice call scenarios with higher requirements for audio quality.

Note: On the Real-time Audio and Video (Express-Video) SDK, this scenario does not enable the camera by default.

Audio encoder compatibility: Only available for RTC streaming, server-side transcoding is required when relaying to CDN.
Karaoke

Karaoke (KTV) scenario, suitable for real-time singing, online K song scenarios. It has been optimized for latency, audio quality, ear monitoring, echo cancellation, etc., while also ensuring precise alignment and ultra-low latency during multi-person singing.

Note: On the Real-time Audio and Video (Express-Video) SDK, this scenario does not enable the camera by default.

Audio encoder compatibility: Only available for RTC streaming, server-side transcoding is required when relaying to CDN.
Default

Default (General) scenario. If none of the above scenario enums match the developer's actual application scenario, you can use this default scenario.

  • Resolution: 360p.
  • Frame rate: 15 fps.
  • Audio encoder compatibility: Server-side transcoding is required when interoperating with Web SDK.
Warning

Since the following 3 legacy scenarios have been deprecated, users using legacy scenarios are requested to migrate to the above new scenarios as soon as possible.

  • General legacy general scenario.
  • Communication legacy real-time communication scenario.
  • Live legacy live streaming scenario.

If after specifying a scenario, developers have the need for fine-grained control over SDK audio and video configurations, they can configure through other APIs. The priority is higher than scenario-based configuration. For details, please refer to the Common Video Configuration documentation.

Warning
  • After logging into the room, modifying the room scenario is no longer allowed. To switch scenarios, you need to leave the room first. If you have logged into multiple rooms, you need to leave all rooms before switching scenarios. If you call setRoomScenario while already logged into a room, the call will be invalid and error code 1000067 will be returned through the onDebugError callback.
  • After leaving the room, once you switch scenarios through setRoomScenario, all previous fine-grained configurations of related audio and video made through the above APIs will be reset to the default values of the new scenario. Therefore, it is recommended to set the scenario first, and then adjust the audio and video configuration through other APIs.
  • If you have requirements for other scenarios or configuration questions, please contact ZEGOCLOUD Technical Support.

Previous

Implementing Video Call

Next

Using Token Authentication

On this page

Back to top