setRemoteVideoStreamType method

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

Sets the video stream type of the remote video stream when the remote user sends dual streams.

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.

  • If the remote user enables the dual-stream mode by calling the RtcEngine.enableDualStreamMode method, the SDK receives the high-video stream by default. You can use this method to switch to the low-video stream.
  • If dual-stream mode is not enabled, the SDK receives the high-stream video by default. By default, 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.

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(String uid, VideoStreamType streamType) {
  return _invokeMethod('setRemoteVideoStreamType', {
    'uid': uid,
    'streamType': VideoStreamTypeConverter(streamType).value()
  });
}