setRoomExtraInfo method
@valid since 3.52.
@detail api
@author lichangfeng.rtc
@brief Sets extra information about the 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 ByteRTCSetRoomExtraInfoResult{@link #ByteRTCSetRoomExtraInfoResult} for the reasons.
@note
- Call joinRoom:userInfo:userVisibility:roomConfig:{@link #ByteRTCRoom#joinRoom:userInfo:userVisibility:roomConfig} first before you call this API to set extra information.
- After calling this API, you will receive rtcRoom:onSetRoomExtraInfoResult:result:{@link #ByteRTCRoomDelegate#rtcRoom:onSetRoomExtraInfoResult:result} 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 rtcRoom:onRoomExtraInfoUpdate:value:lastUpdateUserId:lastUpdateTimeMs:{@link #ByteRTCRoomDelegate#rtcRoom:onRoomExtraInfoUpdate:value:lastUpdateUserId:lastUpdateTimeMs} callback.
- Users who join the room later will be notified of all extra information in the room set prior to entering.
Implementation
FutureOr<NSInteger> setRoomExtraInfo(NSString key, NSString value) async {
return await nativeCall('setRoomExtraInfo:value:', [key, value]);
}