setMemberMeta
setMemberMeta
- setMemberMeta(
params):Promise<void>
Assigns custom metadata to the specified RoomSessionMember. You can use this to store metadata whose meaning is entirely defined by your application.
Note that calling this method overwrites any metadata that had been previously set on the specified member.
Parameters
params
Object containing the parameters of the method.
memberId
ID of the member to affect.
meta
The metadata object to assign to the member.
Returns
Promise<void>
Example
In this example, we set metadata for a member as soon as they join the room.
Once the member’s metadata is set, we log the metadata for that member with
the onMemberUpdated event.
This example assumes that there is a RoomSession
already active and that members are joining the room.