requestPermissions
requestPermissions
ConstrequestPermissions(constraints):Promise<void>
Prompts the user to grant permissions for the devices matching the specified set of constraints.
Parameters
constraints
A MediaStreamConstraints object specifying requirements for the permissions.
Returns
Promise<void>
Examples
To only request audio permissions:
To request permissions for both audio and video, specifying constraints for the video: