setVideoEncoderConfig method

FutureOr<int> setVideoEncoderConfig(
  1. VideoEncoderConfig encoderConfig,
  2. dynamic parameters
)

@detail api @hiddensdk(audiosdk) @brief Sets the expected quality of the video stream by specifying the resolution, frame rate, bitrate, and the fallback strategy when the network is poor. @param encoderConfig See VideoEncoderConfig{@link #VideoEncoderConfig}. @return - 0: Success. - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details. @note - Since V3.61, this method can only set a single profile for the video stream. If you intend to publish the stream in multiple qualities, use setLocalSimulcastMode{@link #RTCEngine#setLocalSimulcastMode}. - Without calling this method, only one stream will be sent with a profile of 640px × 360px @15fps. The default encoding preference is frame rate-first. - If you use an external video source, you can also use this method to set the encoding parameters.

Implementation

FutureOr<int> setVideoEncoderConfig(
    VideoEncoderConfig encoderConfig, JSONObject parameters) async {
  return await nativeCall(
      'setVideoEncoderConfig', [encoderConfig, parameters]);
}