setChannelProfile abstract method

Future<void> setChannelProfile(
  1. ChannelProfileType profile
)

Sets the channel profile.

After initializing the SDK, the default channel profile is the live streaming profile. You can call this method to set the channel profile. The Agora SDK differentiates channel profiles and applies optimization algorithms accordingly. For example, it prioritizes smoothness and low latency for a video call and prioritizes video quality for interactive live video streaming. To ensure the quality of real-time communication, Agora recommends that all users in a channel use the same channel profile. This method must be called and set before joinChannel, and cannot be set again after joining the channel.

  • profile The 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. < 0: Failure. -2: The parameter is invalid. -7: The SDK is not initialized.

Implementation

Future<void> setChannelProfile(ChannelProfileType profile);