enableDualStreamMode abstract method

Future<void> enableDualStreamMode({
  1. required bool enabled,
  2. SimulcastStreamConfig? streamConfig,
})

Sets the dual-stream mode on the sender side and the low-quality video stream.

Deprecated: This method is deprecated as of v4.2.0. Use setDualStreamMode instead. You can call this method to enable or disable the dual-stream mode on the publisher side. Dual streams are a pairing of a high-quality video stream and a low-quality video stream: High-quality video stream: High bitrate, high resolution. Low-quality video stream: Low bitrate, low resolution. After you enable dual-stream mode, you can call setRemoteVideoStreamType to choose to receive either the high-quality video stream or the low-quality video stream on the subscriber side. This method is applicable to all types of streams from the sender, including but not limited to video streams collected from cameras, screen sharing streams, and custom-collected video streams. If you need to enable dual video streams in a multi-channel scenario, you can call the enableDualStreamModeEx method. You can call this method either before or after joining a channel.

  • enabled Whether to enable dual-stream mode: true : Enable dual-stream mode. false : (Default) Disable dual-stream mode.
  • streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig. When setting mode to disableSimulcastStream, setting streamConfig will not take effect.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly.

Implementation

Future<void> enableDualStreamMode(
    {required bool enabled, SimulcastStreamConfig? streamConfig});