logo
On this page

Scenario-based Audio/Video Configuration


Feature Overview

To facilitate quick integration and reduce the integration threshold for developers, the SDK has verified a large amount of online data and developed various scenario-based configuration solutions. Developers can choose the corresponding room mode based on the required scenario, and the SDK will automatically apply audio/video codecs, audio/video parameters, flow control strategies, and other configurations suitable for that scenario, thereby quickly achieving the best effect in that scenario. Currently supported scenarios include show live streaming, KTV, standard 1v1 audio/video calls, high-quality 1v1 audio/video calls, standard audio chat rooms, and high-quality audio chat rooms.

How to Use

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/video business scenario.

Warning
  • For users in the same room, it is recommended to use the same room scenario to obtain the best effect.
  • If your App has multiple audio/video business scenarios, for example, both 1v1 audio/video call scenarios and show live streaming scenarios. You can switch scenarios by calling setRoomScenario after exiting a room without destroying the engine (destroyEngine), and then log in 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 show, gaming, e-commerce, education large classes, etc. Optimized for audio/video quality, smoothness, compatibility, etc.

Note: In live streaming scenarios, the SDK does not have business "roles" (such as hosts, audience). 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/video call scenario, suitable for 1v1 video or voice call scenarios.

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

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

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

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

Note: In the Express Video SDK, this scenario does not enable the camera by default.It is recommended to choose high-quality audio chat room scenario configuration for audio chat room scenarios with music.

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

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

Note: In the Express Video SDK, this scenario does not enable the camera by default.

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

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

Note: In the Express Video SDK, this scenario does not enable the camera by default.

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

Default (general) scenario. If the above scenario enumerations do not 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, please migrate to the new scenarios above 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 needs for fine-grained control of SDK audio/video configurations, they can configure through other APIs. The priority is higher than scenario-based configuration. For details, please refer to Common Video Configuration and Traffic Control documentation.

Warning
  • After logging into a room, modifying the room scenario is no longer allowed. To switch scenarios, you need to exit the room first. If you have logged into multiple rooms, you need to exit all rooms before switching scenarios. If setRoomScenario is called while already logged into a room, the call will be invalid and error code 1000067 will be callback through onDebugError.
  • After exiting a room, once you switch scenarios through setRoomScenario, all related audio/video fine-grained configurations previously 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 audio/video configurations through other APIs.
  • If you have other scenario setting requirements or configuration questions, please contact ZEGO Technical Support.

Previous

Implementing Video Call (Web)

Next

Using Token Authentication

On this page

Back to top