toggleLock

View as MarkdownOpen in Claude
toggleLock(): Promise<void>

Toggles the call’s locked state. While locked, the server rejects new join requests; participants already on the call are unaffected. Useful for closing the door on a meeting once everyone expected has arrived.

The current state is reflected by locked$. Requires the lock capability — inspect call.capabilities$ before exposing the control in your UI.

Returns

Promise<void> — resolves once the server has acknowledged the state change.

Examples

Toggle from a UI button

lockButton.addEventListener('click', async () => {
await call.toggleLock();
});

Reflect lock state in the UI

call.locked$.subscribe((locked) => {
lockButton.textContent = locked ? 'Unlock' : 'Lock';
});

See

  • locked$ — observable of the current lock state.