setVideoEncoderConfigurationEx abstract method

Future<void> setVideoEncoderConfigurationEx({
  1. required VideoEncoderConfiguration config,
  2. required RtcConnection connection,
})

Sets the video encoding attributes.

Sets the encoding attributes for the local video. Each video encoding profile corresponds to a set of video parameters, including resolution, frame rate, and bitrate. The config parameter of this method defines the maximum values achievable under ideal network conditions. If the network condition is poor, the video engine will not use this config to render the local video and will automatically downgrade to a more appropriate video configuration.

  • config Video encoding configuration. See VideoEncoderConfiguration.
  • connection Connection information. See RtcConnection.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. See Error Codes for details and resolution suggestions.

Implementation

Future<void> setVideoEncoderConfigurationEx(
    {required VideoEncoderConfiguration config,
    required RtcConnection connection});