setVideoEncoderConfig abstract method

Future<int?> setVideoEncoderConfig(
  1. List<VideoEncoderConfig> channelSolutions
)

Video publisher calls this API to set the configurations of each stream published, including resolution, frame rate, bitrate, scale mode, and fallback strategy in poor network conditions.

channelSolutions: List of configurations for multiple streams. You can set parameters for up to 3 streams, SDK will always take the value of the first 3 streams when parameters for more streams are set.
The resolution you set is the maximum resolution of each stream, and must be arranged in descending order. The frame rates must be arranged in descending order.

Notes:

  • If you call this API after enabling the mode of publishing multiple streams with RTCVideo.enableSimulcastMode, SDK will publish streams as you set, otherwise the SDK by default publishes the first stream that you have set.
  • If you want to publish multiple streams with different resolutions, you need to call this method and RTCVideo.enableSimulcastMode.
  • Without calling this API to set parameters for multiple video streams, the SDK only publishes one video stream with a resolution of 640px × 360px and a frame rate of 15fps.
  • After setting parameters for multiple video streams, SDK will automatically match the streams to be published based on the desired subscription parameters set by subscribers.
  • This API applies the video stream captured by the camera, see RTCVideo.setScreenVideoEncoderConfig for setting parameters for screen sharing video stream.
  • See Simulcasting for more details.

Implementation

Future<int?> setVideoEncoderConfig(List<VideoEncoderConfig> channelSolutions);