--- title: meetroom load: requirelib("meetroom"); order: 250 --- Control interface for the MeetRoom video conferencing WebApp. The library is only injected for users who have access permission to the **MeetRoom** module (the same gate as the `/system/meetroom/*` endpoints). Every meeting room owns a shared space where the room's chat and file attachments are mirrored; posting into that space with the sharedspace API delivers the item into the live meeting chat. ## `meetroom.createRoom(title, password)` → object Create a meeting room hosted by the calling user. Both arguments are optional (`""` for an untitled / open room). Returns `{ roomid, displayid, title, host, protected, participants, createdat, spaceid }` where `spaceid` is the room's shared space. ```javascript requirelib("meetroom"); var room = meetroom.createRoom("Weekly standup", ""); sendJSONResp({ invite: room.displayid, space: room.spaceid }); ``` ## `meetroom.getRoomInfo(roomid)` → object | null Describe a room. Returns `{ exists: false }` for unknown IDs. `spaceid` is included only when the calling user is the room's host. ## `meetroom.getRoomSpace(roomid, password)` → string | null Return the room's shared space ID after passing the same password check the join endpoint applies. Use this to chat with a meeting you were invited to: ```javascript requirelib("meetroom"); requirelib("sharedspace"); var spaceid = meetroom.getRoomSpace("123456789", "roomPassword"); if (spaceid !== null) { sharedspace.addText(spaceid, "Reminder: meeting notes are due today"); } ``` ## `meetroom.listMyRooms()` → array List the live rooms hosted by the calling user (same fields as `createRoom`). ## `meetroom.endRoom(roomid)` → bool End the meeting for everyone. Host only. ## `meetroom.getAttendance(roomid)` → array | null Export the room's attendance log: `{ username, joinedat, leftat, present }` per join (`leftat` is `0` while the participant is still connected). Only the host or a currently connected participant may read it. ```javascript requirelib("meetroom"); var log = meetroom.getAttendance("123456789"); if (log !== null) { var report = ""; for (var i = 0; i < log.length; i++) { report += log[i].username + "," + log[i].joinedat + "," + log[i].leftat + "\n"; } if (requirelib("filelib")) { filelib.writeFile("user:/Desktop/attendance.csv", report); } } ```