deleteMemberMeta

View as Markdown

deleteMemberMeta

  • deleteMemberMeta(params): Promise<void>

Deletes the specified keys from the metadata for the specified member.

Parameters

params
object

Object containing the parameters of the method.

memberId
string

Id of the member to affect. If omitted, affects the current member.

keys
string[]

The keys to remove.

Returns

Promise<void>

Permissions

  • room.set_meta

You need to specify the permissions when creating the Video Room Token on the server side.

Example

1roomSession.on("member.updated", (e) => {
2 // We can set an event listener to log changes to the metadata.
3 console.log(e.member.meta);
4});
5
6await roomSession.setMemberMeta({
7 memberId: "...",
8 meta: { foo: "bar", baz: true },
9});
10// The logger will now print `{ foo: "bar", baz: true }`
11
12await roomSession.deleteMemberMeta({ memberId: "...", keys: ["foo"] });
13// The logger will now print `{ baz: true }`