setRemoteVideoStreamType method

  1. @override
Future<void> setRemoteVideoStreamType(
  1. int uid,
  2. VideoStreamType streamType
)

Sets the stream type of the remote video.

Under limited network conditions, if the publisher has not disabled the dual-stream mode using RtcEngine.enableDualStreamMode (false), the receiver can choose to receive either the high-video stream (the high resolution, and high bitrate video stream) or the low-video stream (the low resolution, and low bitrate video stream).

By default, users receive the high-video stream. Call this method if you want to switch to the low-video stream. This method allows the app to adjust the corresponding video stream type based on the size of the video window to reduce the bandwidth and resources.

The aspect ratio of the low-video stream is the same as the high-video stream. Once the resolution of the high-video stream is set, the system automatically sets the resolution, frame rate, and bitrate of the low-video stream.

The SDK reports the result of calling this method in the RtcEngineEventHandler.apiCallExecuted callback.

Parameter uid ID of the remote user sending the video stream.

Parameter streamType Sets the video-stream type. See VideoStreamType.

Implementation

@override
Future<void> setRemoteVideoStreamType(int uid, VideoStreamType streamType) {
  return _invokeMethod('setRemoteVideoStreamType', {
    'uid': uid,
    'streamType': VideoStreamTypeConverter(streamType).value(),
  });
}