> 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. # requestPermissions > requestPermissions function in the WebRTC namespace. ### requestPermissions * `Const` **requestPermissions**(`constraints`): `Promise` Prompts the user to grant permissions for the devices matching the specified set of constraints. #### Parameters **`constraints`** `MediaStreamConstraints` — required A [MediaStreamConstraints](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamConstraints) object specifying requirements for the permissions. --- #### Returns `Promise` #### Examples To only request audio permissions: ```javascript await SignalWire.WebRTC.requestPermissions({ audio: true, video: false }); ``` To request permissions for both audio and video, specifying constraints for the video: ```javascript const constraints = { audio: true, video: { width: { min: 1024, ideal: 1280, max: 1920 }, height: { min: 576, ideal: 720, max: 1080 }, }, }; await SignalWire.WebRTC.requestPermissions(constraints); ``` > requestPermissions function in the WebRTC namespace.