```room.on('roomMetadataChanged', (metadata) =>...
# ask-ai
b
Copy code
room.on('roomMetadataChanged', (metadata) => {  
  console.log('Room metadata changed to:', metadata);  
});
will this work in javascript UI will i be able to get this event in javascrip client sdk for ui
t
Thanks for reaching out, Mohammed. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Yes — that will work. The JavaScript client SDK emits
roomMetadataChanged
on the
Room
object and the handler receives the updated metadata (a string). Your snippet is correct for a UI:
Copy code
room.on('roomMetadataChanged', (metadata) => {
  console.log('Room metadata changed to:', metadata);
});
This fires when room metadata is updated via the server-side API, and all participants in the room receive the event. Would you like an example of how to update room metadata from the server or how to parse/use the metadata in the UI? Sources: Handling events | LiveKit docs