setRemoteVideoStreamTypeEx abstract method

Future<void> setRemoteVideoStreamTypeEx({
  1. required int uid,
  2. required VideoStreamType streamType,
  3. required RtcConnection connection,
})

Sets the video stream type to subscribe to.

The SDK will dynamically adjust the size of the corresponding video stream based on the size of the video window to save bandwidth and computing resources. The default aspect ratio of the low-quality video stream is the same as that of the high-quality video stream. According to the current aspect ratio of the high-quality video stream, the system will automatically allocate the resolution, frame rate, and bitrate of the low-quality video stream. The SDK defaults to enabling low-quality video stream adaptive mode (autoSimulcastStream) on the sending end, which means the sender does not actively send low-quality video stream. The receiver with the role of the host can initiate a low-quality video stream request by calling this method, and upon receiving the request, the sending end automatically starts sending the low-quality video stream. If the publisher has already called setDualStreamModeEx and set mode to disableSimulcastStream (never send low-quality video stream), calling this method will not take effect, you should call setDualStreamModeEx again on the sending end and adjust the settings. Calling this method on the receiving end of the audience role will not take effect.

  • uid The user ID.
  • streamType The video stream type, see VideoStreamType.
  • connection The connection 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.

Implementation

Future<void> setRemoteVideoStreamTypeEx(
    {required int uid,
    required VideoStreamType streamType,
    required RtcConnection connection});