steep-balloon-41261
10/08/2025, 12:26 AMtall-airline-16756
10/08/2025, 12:26 AMtall-airline-16756
10/08/2025, 12:27 AMRoom object. It offers handy properties like sid, name, and metadata. Here’s a simple example to guide you:
let room = Room()
Task {
do {
try await room.connect(url: "your-room-url", token: "your-token")
// Access room details
if let roomSid = room.sid {
print("Room SID: \(roomSid)")
}
if let roomName = room.name {
print("Room Name: \(roomName)")
}
if let metadata = room.metadata {
print("Room Metadata: \(metadata)")
}
} catch {
print("Failed to connect: \(error)")
}
}
If you’re working with a ChatContext object, just make sure it lets you access the underlying Room instance. From there, you can easily get the room SID and other details you need.
Please feel free to reach out if you’d like me to walk you through any part of this or if you have more questions—I’m here to help!
Sources: Shared/Contexts/RoomContext.swift | Multiplatform/Controllers/RoomContext.swift | lib/src/context/room_context.dart | README.md | Room metadata | LiveKit Docs