RTC SDK room-control actions
Web performRoomAction(action, payload), Android performRoomAction(action, JSONObject, RoomCallback), iOS performRoomAction(_:payload:), and the UniApp native roomAction bridge share this allowlist. The SDK supplies the current roomId, participant, device, and token. Do not construct /api/v2/rtc/session/..., WHIP/WHEP, or WebSocket URLs in host UI.
const room = await client.performRoomAction('snapshot')
await client.performRoomAction('transferHost', { targetParticipantId: room.members[1].participantId, keepPreviousHostAsCohost: true })
An accepted HTTP action does not prove an external stream or recording is already ready; query its effective state. The server checks current role, device, and grants on every action. A transferred or removed host cannot continue using old UI state. Handle Android success/httpFailure, iOS async throws, Web Promise rejection, and UniApp roomActionResult as actual outcomes; a UniApp bridge ACK is not the server result.
Room and members
| Action | Payload | Result/check | Permission and edge case |
|---|---|---|---|
snapshot |
None | Room, members, recording policy, own capabilities | Members may read; admission has a separate status endpoint. |
updateAccessPolicy |
accessMode=Open/InviteOnly, waitingRoomEnabled, isLocked |
Updated policy; reread snapshot |
Authorized moderator; locking does not disconnect existing sessions. |
createInvitation |
subjectIssuer, subjectId, displayName, role, capabilities, expiresInMinutes, bypassWaitingRoom |
One-time invitation result | Requires invitation rights. Do not log or place the ticket in a public URL. |
reviewAdmission |
participantId, admit, optional reason |
Waiting member status | The target may already have left or timed out; a denied ticket cannot simply be replayed. |
moderateMember |
participantId, action; action-specific role, micEnabled, cameraEnabled, screenSharing, kick, reason |
Member/media event | The server constrains action and actor. A payload operatorId cannot impersonate another user. |
setCohost |
participantId, enabled, optional reason |
Leadership state | Current host grants/revokes for a valid member. |
claimHost |
Optional reason |
Current host | Only valid organizer/manager recovery conditions; it cannot seize an active host. |
transferHost |
targetParticipantId, optional keepPreviousHostAsCohost, reason |
New and old roles | Current host only. The former host loses host-only recording controls. |
extendMeeting |
minutes, optional reason |
Scheduled end time | Subject to the hard deadline and room extension policy. |
closeRoom |
None | Room-closed event | Host ends every device session. Old device tokens must not reconnect. |
The target of reviewAdmission, moderateMember, setCohost, and reviewWhiteboard is a participantId, not a display name, device session, or publication ID.
Media, external sources, and collaboration
| Action | Payload | Result/check | Permission and edge case |
|---|---|---|---|
publicationStats |
None | Visible publications and stats | Values can be absent between samples; camera and screen are separate. |
getEndpointInfo / reportEndpointInfo |
Read has none; report uses SDK-collected fields | Recent device info / report result | Do not submit hardware-unique identifiers or another member's device data. |
setVideoQuality |
targetParticipantId (one or explicit all), quality (width, height, frame rate) |
Desired policy and later effective quality | Device capability may prevent immediate application. Check quality events or stats. |
externalSourceCandidates |
None | Authorized channels and grantId |
Does not expose RTSP passwords or source URLs. |
externalSources |
None | Current room bindings | An external source is not a human participant; show offline state honestly. |
addExternalSource |
grantId |
Binding ID and subsequent media state | Host can select only a business-authorized source. Recording remains grant-controlled. |
removeExternalSource |
bindingId |
Binding-removal event | Detaches only this room; the original channel and other rooms remain running. |
requestWhiteboard |
requestAccess, optional reason |
Pending/cancelled request | A request does not grant immediate write access. |
reviewWhiteboard |
participantId, allow, optional reason |
Member write-grant event | Host approval/revocation; final image upload still rechecks permission. |
lockWhiteboard |
locked |
Board lock state | Ordinary members become read-only; prior board events remain. |
externalSourceCandidates is the business-approved subset, not every camera in the cluster. A trusted backend creates/revokes grants through the RTC management API; a meeting SDK only selects within those grants.
Recording and state
| Action | Payload | Result/check | Permission and edge case |
|---|---|---|---|
currentContinuousRecording |
None | Active run or null |
Admitted members may read. null does not mean historical recordings are absent. |
startContinuousRecording |
None | recordingId, Starting/Recording |
Room recording policy must be enabled; current host only. Repeated start returns the active run. |
stopContinuousRecording |
recordingId |
Stopping, then final Stopped |
Stops the specified run. Files may still be finalizing while Stopping. |
recordingTargets |
None | Per-publication targets | Legacy per-stream recording only, not a full-run catalog. |
startRecording / stopRecording |
Target fields such as publicationId, mediaKind, participantId, screen |
Per-stream state | Legacy per-stream controls. Use continuous recording for a whole meeting. |
Historical query, playback, and download do not use this in-meeting action API. Have the backend issue a separate view/play/download archive ticket, then use the archive SDK. See the RTC HTTP API reference for exact routes and permissions.