setMaxVideoEncoderConfig abstract method

Future<int?> setMaxVideoEncoderConfig(
  1. VideoEncoderConfig maxSolution
)

Video publisher calls this API to set the parameters of the maximum resolution video stream that is expected to be published, including resolution, frame rate, bitrate, scale mode, and fallback strategy in poor network conditions.

maxSolution: The maximum video encoding parameter.

Notes:

  • You can use RTCVideo.enableSimulcastMode simultaneously to publish streams with different resolutions. Specifically, if you want to publish multiple streams with different resolutions, you need to call this method and enable the simulcast mode with RTCVideo.enableSimulcastMode before publishing your streams. The SDK will intelligently adjust the number of streams to be published (up to 4) and their parameters based on the settings of the subscribing end. The resolution set by calling this method will be the maximum resolution among the streams. For specific rules, please refer to Simulcasting.
  • Without calling this API, SDK will only publish one stream for you with a resolution of 640px × 360px and a frame rate of 15fps.
  • This API applies to 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?> setMaxVideoEncoderConfig(VideoEncoderConfig maxSolution);