whar are meta data and how can i add somethin in i...
# ask-ai
h
whar are meta data and how can i add somethin in it?
t
Thanks for reaching out, Ju. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! Just wanted to share a quick rundown on how you can add metadata in LiveKit—it can be done at a few different levels: participant, room, or SIP dispatch rule. Here’s the scoop: • Participant Metadata: You can easily set metadata for a local participant using client SDKs (like the
setMetadata()
method) or update any participant's metadata through server APIs (for example, the
UpdateParticipant
API). • Room Metadata: This one’s handled via server APIs, either when you create the room or later on using the
UpdateRoomMetadata
API. • SIP Participant Metadata: You can include metadata in SIP dispatch rules, and it’ll automatically apply to all SIP participants created through that rule. If you let me know which type you're interested in, I’d be happy to walk you through the details and help you get set up! Sources: src/room/participant/LocalParticipant.ts | livekit-rtc/livekit/rtc/participant.py | lib/src/participant/local.dart | Runtime/Scripts/Participant.cs | Runtime/Scripts/Room/Participant/LocalParticipant.cs
h
what are meta data? are their independet from the user interaction?
t
Hey there! Just wanted to explain a bit about metadata in LiveKit. It’s basically application-specific info linked to either a room or a participant. Room metadata is shared with everyone in the room and usually holds settings that affect the whole group. Participant metadata, however, is all about the individual and their unique info. Now, room metadata is managed on the server side, so participants can’t change it directly, but they can definitely see it and get updates when it changes. Participant metadata is a bit more flexible—if someone has the right permissions in their access token, they can update their own metadata. If you want me to go over anything in more detail or give you some real-world examples of how metadata works in LiveKit, just give me a shout! Sources: State synchronization | Participant attributes and metadata | LiveKit Docs | Participant attributes and metadata | LiveKit Docs | agent-console/app/_components/room-action-panel.tsx | Room metadata | LiveKit Docs