setDualStreamModeEx abstract method
- required SimulcastStreamMode mode,
- required SimulcastStreamConfig streamConfig,
- required RtcConnection connection,
Sets the dual-stream mode on the sender side.
By default, the SDK enables the small stream adaptive mode (autoSimulcastStream) on the sender side, meaning the sender does not actively send the low-quality stream. The receiver with host role can call setRemoteVideoStreamTypeEx to request the low-quality stream, and the sender starts sending it upon receiving the request. If you want to change this behavior, you can call this method and set mode to disableSimulcastStream (never send low-quality stream) or enableSimulcastStream (always send low-quality stream). If you want to restore the default behavior after making changes, call this method again and set mode to autoSimulcastStream. The differences and relations between this method and enableDualStreamModeEx are as follows: Calling this method with mode set to disableSimulcastStream has the same effect as enableDualStreamModeEx(false). Calling this method with mode set to enableSimulcastStream has the same effect as enableDualStreamModeEx(true). Both methods can be called before or after joining a channel. If both are used, the settings in the method called later take effect.
modeThe mode for sending video streams. See SimulcastStreamMode.streamConfigConfiguration of the low-quality video stream. See SimulcastStreamConfig. When mode is set to disableSimulcastStream, setting streamConfig has no effect.connectionConnection information. See RtcConnection.
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. See Error Codes for details and resolution suggestions.
Implementation
Future<void> setDualStreamModeEx(
{required SimulcastStreamMode mode,
required SimulcastStreamConfig streamConfig,
required RtcConnection connection});