setRoomExtraInfo abstract method
Valid since v3.56.1
Sets/updates extra information about the room the local user joins.
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.
value
: Content of the extra information, less than 128 bytes in length.
Return value:
0
: Success with a taskId returned.<0
: Failure. See SetRoomExtraInfoResult for the reasons.
Notes:
- Call RTCRoom.joinRoom first before you call this API to set extra information.
- After calling this API, you will receive RTCRoomEventHandler.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 RTCRoomEventHandler.onRoomExtraInfoUpdate.
- Users who join the room later will be notified of all extra information in the room set prior to entering.
Implementation
Future<int?> setRoomExtraInfo({
required String key,
required String value,
});