Video Call
  • iOS
  • Android
  • Web
  • Flutter : Dart
  • React Native
  • Electron
  • Unity3D
  • Cocos Creator
  • Windows
  • macOS
  • Linux
  • Overview
  • Develop your app
    • Quick start
    • Enhance basic feature
      • Use Tokens for authentication
      • Config your video based on scenes
      • Check the room connection status
      • Set up common video config
  • Best practices
    • Implement call invitation
    • Implement a live audio room
  • Upgrade using advanced features
    • Advanced features
      • Configure the video
        • Watermark the video/Take snapshots
        • Beautify & Change the voice
        • Configure video codec
        • Configure video codec
      • Improve video quality
        • Configure bandwidth management
        • Test network and devices in advance
        • Visualize the sound level
        • Monitor streaming quality
      • Message signaling
        • Convey extra information using SEI
        • Broadcast real-time messages to a room
      • Play media files
        • Play media files
        • Play sound effects
      • Share the screen
      • Mix the video streams
      • Record video media data
      • Monitoring and channel settings
    • Distincitve features
      • Play streams via URL
      • Play a transparent gift special effect
  • Resources & Reference
    • SDK
    • Sample codes
    • API reference
      • Client APIs
      • Server APIs
    • Debugging
      • Error codes
    • FAQs
    • Key concepts
  • Communication capability
  • Documentation
  • Video Call
  • Develop your app
  • Enhance basic feature
  • Config your video based on scenes

Scenario-based audio/video config

Last updated:2023-11-15 17:10

Introduction

The SDK provides a variety of preset scenarios, facilitating your quick and easy access. You can select a room scenario based on your requirements. Then the SDK automatically applies the audio and video codecs, audio and video parameters, network traffic control strategy, and other configurations suitable for the scenario to quickly achieve the best effect. Currently, the SDK supports the following scenarios: live streaming, KTV, standard one-to-one voice and video calls, high-quality one-to-one voice and video calls, standard voice chatroom, and high-quality voice chatroom.

Calling methods

In profile (ZegoEngineProfile) used to create an engine, you need to set the scenario (ZegoScenario) field to a room scenario based on the audio and video service requirements.

  • For users in the same room, it is recommended to use the same room scenario to achieve the best effect.
  • If your app has multiple audio and video service scenarios, for example, both one-to-one voice and video call scenario and live streaming scenario, and a user who has logged in to a room needs to switch the scenario, you do not need to call (destroyEngine) to destroy the engine. Instead, you can call setRoomScenario to switch the scenario after the user logs out of the room.

The following table lists the room scenarios that are currently supported by the SDK.

Scenario (supported in 3.0.0 and later versions) Description Key configuration
Broadcast
One-to-many live streaming scenarios such as games, e-commerce, and large classes. The quality of sound and picture, fluency, and compatibility are optimized.
Note: Even in live streaming scenarios, the SDK does not differentiate users by role (for example, host or participant), and all users in the same room can publish and play streams.
  • Resolution: 540p
  • Frame rate: 24 fps
  • Audio and video codec compatibility: Transcoding is required on the server side during communication with the web SDK.
StandardVideoCall
Standard one-to-one voice and video call scenario.
  • Resolution: 360p
  • Frame rate: 15 fps
  • Audio and video codec compatibility: It can be used only for RTC stream publishing. Transcoding is required on the server side if streams need to be forwarded to the CDN.
HighQualityVideoCall
High-quality voice and video call scenario. It is similar to the StandardVideoCall scenario but uses a higher video frame rate, bitrate, and resolution by default. It is applicable when high picture quality is required.
  • Resolution: 540p
  • Frame rate: 24 fps
  • Audio and video codec compatibility: It can be used only for RTC stream publishing. Transcoding is required on the server side if streams need to be forwarded to the CDN.
StandardChatroom
Standard voice chatroom scenario, applicable to multi-party voice calls. This scenario features traffic saving.
Note: The ExpressVideo SDK disables the camera for this scenario by default.
Audio and video codec compatibility: It can be used only for RTC stream publishing. Transcoding is required on the server side if streams need to be forwarded to the CDN.
HighQualityChatroom
High-quality voice chatroom scenario. It is similar to the StandardChatroom scenario but uses a higher audio bitrate by default. It is applicable when high sound quality is required during multi-party voice calls.
Note: The ExpressVideo SDK disables the camera for this scenario by default. The Web platform does not support this scenario.
Audio and video codec compatibility: It can be used only for RTC stream publishing. Transcoding is required on the server side if streams need to be forwarded to the CDN.
Karaoke
KTV scenario, applicable when users need to sing a real-time chorus or online karaoke song. The latency, sound quality, headphone monitoring, and acoustic echo cancellation (AEC) are optimized. The precise alignment and ultra-low time latency during a multi-party chorus are also ensured.
Note: The ExpressVideo SDK disables the camera for this scenario by default. The Web platform does not support this scenario.
Audio and video codec compatibility: It can be used only for RTC stream publishing. Transcoding is required on the server side if streams need to be forwarded to the CDN.
Default
Default (general) scenario. You can use this scenario if the preceding enumerated scenarios do not match your requirements.
  • Resolution: 360p
  • Frame rate: 15 fps
  • Audio and video codec compatibility: Transcoding is required on the server side during communication with the web SDK.
The SDK also provides three scenarios of earlier versions that are available only for users who upgrade their Express SDK from a version earlier than v3.0.0.

However, these scenarios have been discarded. Therefore, users must migrate to the scenarios in the new version as soon as possible.

  • General: general scenario in earlier versions
  • Communication: real-time communication scenario in earlier versions
  • Live: live streaming scenario in earlier versions

After specifying a scenario, you can call the following methods of the SDK to adjust audio and video service configurations.

Methods for configuration adjustment
  • Room scenario switchover is allowed only after a user logs out of all rooms. Otherwise, calling setRoomScenario is invalid and onDebugError will be triggered to return error code 1000067.
  • After a user logs out of rooms, if you switch the scenario by calling setRoomScenario, all audio and video service configurations that are adjusted using the preceding methods will be reset to the default of the new scenario. Therefore, you are advised to configure a scenario before adjusting audio and video service configurations.
  • If you need to configure other room scenarios, contact ZEGOCLOUD technical support.
Page Directory