checkPermissions

View as Markdown

checkPermissions

  • Const checkPermissions(name?): Promise<null | boolean>

Asynchronously returns whether we have permissions to access the specified resource. Some common parameter values for name are "camera", "microphone", and "speaker". In those cases, prefer the dedicated functions checkCameraPermissions, checkMicrophonePermissions, and checkSpeakerPermissions.

Parameters

name
DevicePermissionName

Name of the resource.

Returns

Promise<null | boolean>

Example

1await SignalWire.WebRTC.checkPermissions("camera");
2// true: we have permission for using the camera