Rate this page:

DevicePermission

Class that represents permission states for the microphone, speaker, camera, and screen sharing.

Firefox-specific behavior:

  • Dismissing the permission popup is treated as a temporary denial

Safari-specific behavior:

  • Dismissing the permission popup is treated as a temporary denial
  • Permission changes in the browser settings may not update the SDK watchable properties
  • When a denied permission is changed in the browser settings, the SDK watchable property remains denied, but the permission can be requested
  • Temporary denial sets the SDK watchable property to denied, but allows requesting the permission again
  • Denying temporarily or dismissing the permission popup 3 times blocks permission requests (even after the page refresh). Open the page in a new tab to request the permission again

Methods

requestAudioPermission
Copy URL
requestAudioPermission(): 

Promise<PermissionState>

Requests the audio permission.

Returns a promise that resolves to a PermissionState.

Returns

requestCameraPermission
Copy URL
requestCameraPermission(): 

Promise<PermissionState>

Requests the camera permission.

Calling this method can affect StreamManager.createVideoStream or getUserMedia.

Note: Repeated calls of this method may briefly activate the camera indicator, even when the permission is already granted.

Returns a promise that resolves to a PermissionState.

Returns

requestPermissions
Copy URL
requestPermissions(options: 

RequestPermissionsOptions

):

Promise<DevicesPermissionState>

Requests permissions for camera and audio devices.

Returns a promise that resolves to a DevicesPermissionState containing the permission states for camera, microphone, and speaker.

If the initial request fails, automatically retries each requested permission separately

Parameters

Returns

Props

camera
Copy URL
camera: 

ReadonlyWatchable<PermissionState>

Watchable property that allows getting the camera permission state.

microphone
Copy URL
microphone: 

ReadonlyWatchable<PermissionState>

Watchable property that allows getting the microphone permission state.

screenSharing
Copy URL
screenSharing: 

ReadonlyWatchable<PermissionState>

Watchable property that allows getting the permission state for screen sharing.

speaker
Copy URL
speaker: 

ReadonlyWatchable<PermissionState>

Watchable property that allows getting the speaker permission state.

Rate this page: