> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # toggleLock > Toggles the call lock state, preventing or allowing new participants from joining. ```ts toggleLock(): Promise ``` 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$`](/docs/browser-sdk/v4/reference/webrtc-call/locked\$). Requires the `lock` capability — inspect [`call.capabilities$`](/docs/browser-sdk/v4/reference/webrtc-call/capabilities\$) before exposing the control in your UI. ## **Returns** `Promise` — resolves once the server has acknowledged the state change. ## **Examples** ### Toggle from a UI button ```ts lockButton.addEventListener('click', async () => { await call.toggleLock(); }); ``` ### Reflect lock state in the UI ```ts call.locked$.subscribe((locked) => { lockButton.textContent = locked ? 'Unlock' : 'Lock'; }); ``` ## **See** * [`locked$`](/docs/browser-sdk/v4/reference/webrtc-call/locked\$) — observable of the current lock state. > Toggles the call lock state, preventing or allowing new participants from joining.