updateChannelMediaOptions

Updates the channel media options after joining the channel.

public abstract int updateChannelMediaOptions(ChannelMediaOptions options);

Parameters

options
The channel media options. See ChannelMediaOptions.

Returns

  • 0: Success.
  • < 0: Failure.
    • -2: The value of a member in the ChannelMediaOptions structure is invalid. For example, the token or the user ID is invalid. You need to fill in a valid parameter.
    • -7: The RtcEngine object has not been initialized. You need to initialize the RtcEngine object before calling this method.
    • -8: The internal state of the RtcEngine object is wrong. The possible reason is that the user is not in the channel. Agora recommends that you use the onConnectionStateChanged callback to determine whether the user exists in the channel. If you receive the CONNECTION_STATE_DISCONNECTED (1) or CONNECTION_STATE_FAILED (5) state, the user is not in the channel. You need to call joinChannel [2/2] to join a channel before calling this method.