RoomSessionFullState
Objects of this type contain the full state of a RoomSession at a given point in time.
Properties
Whether muted videos are shown in the room layout. See setHideVideoMuted.
List of members that are part of this room session. See RoomSessionMember.
Example
Getting the full state of a room session when it starts:
import { SignalWire } from "@signalwire/realtime-api";
const client = await SignalWire({ project: "your-project-id", token: "your-api-token" });
const videoClient = client.video;
await videoClient.listen({
onRoomStarted: async (roomSession) => {
// roomSession contains the full state
console.log("Room ID:", roomSession.roomId);
console.log("Room Session ID:", roomSession.id);
console.log("Room Name:", roomSession.name);
console.log("Display Name:", roomSession.displayName);
console.log("Current Layout:", roomSession.layoutName);
console.log("Recording Active:", roomSession.recording);
console.log("Hide Video Muted:", roomSession.hideVideoMuted);
console.log("Metadata:", roomSession.meta);
if (roomSession.members) {
console.log("Members in room:", roomSession.members.length);
roomSession.members.forEach(member => {
console.log("- Member:", member.name, "ID:", member.id);
});
}
if (roomSession.previewUrl) {
console.log("Preview URL:", roomSession.previewUrl);
}
}
});
Methods
You get the same methods that are available on a RoomSession object.