setRoomExtraInfo method

FutureOr<long> setRoomExtraInfo(
  1. String key,
  2. String value
)

@valid since 3.52 @detail api @author lichangfeng.rtc @brief Sets extra information about the RTC room the local user joins. @param key Key of the extra information, less than 10 bytes in length.
A maximum of 5 keys can exist in the same room, beyond which the first key will be replaced. @param value Content of the extra information, less than 128 bytes in length. @return API call result:
- 0: Success with a taskId returned. - <0: Failure. See SetRoomExtraInfoResult{@link #SetRoomExtraInfoResult} for the reasons. @note - Call joinRoom{@link #RTCRoom#joinRoom} first before you call this API to set extra information. - After calling this API, you will receive onSetRoomExtraInfoResult{@link #IRTCRoomEventHandler#onSetRoomExtraInfoResult} callback informing you the result of the setting. - After the extra information is successfully set, other users in the same room will receive the information through onRoomExtraInfoUpdate{@link #IRTCRoomEventHandler#onRoomExtraInfoUpdate} callback. - Users who join the room later will be notified of all extra information in the room set prior to entering.

Implementation

FutureOr<long> setRoomExtraInfo(String key, String value) async {
  return await nativeCall('setRoomExtraInfo', [key, value]);
}