Handling Browser Permissions
Properties
self.mediaPermissions
: The current audio and video browser permissions given by the local
user.
Permissions start with NOT_REQUESTED
and can go into 4 different states
ACCEPTED
- The user accepted browser permission promptsDENIED
- The user denied browser permission promptsSYSTEM_DENIED
- The user's browser does not have the required permission, in this case usually the OS hasn't granted permission the browser applicationCOULD_NOT_START
- Unable to start the selected device, you can retry with a different device
warning
One other thing to note down here is user might revoke permission later, or might unplug devices etc so these states can change at runtime
Use the mediaPermissionUpdate
event on self
to listen for these changes