setChannelProfile abstract method

Future<void> setChannelProfile(
  1. ChannelProfileType profile
)

Sets the channel profile.

You can call this method to set the channel profile. The SDK adopts different optimization strategies for different use cases, such as prioritizing video quality in live streaming scenarios. The default channel profile after SDK initialization is live streaming. To ensure real-time audio and video quality, all users in the same channel must use the same channel profile.

  • profile Channel profile. See ChannelProfileType.

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. < 0: Failure. See Error Codes for details and resolution suggestions. -2: Invalid parameter. -7: SDK not initialized.

Implementation

Future<void> setChannelProfile(ChannelProfileType profile);