Checks the permission based on the provided settings.
The options for checking permissions.
The type of permission to check. Can be "audioSetting", "videoSetting", "screenshareSetting", or "chatSetting".
The setting for audio permission. Can be "allow", "approval", or other.
The setting for video permission. Can be "allow", "approval", or other.
The setting for screenshare permission. Can be "allow", "approval", or other.
The setting for chat permission. Can be "allow", "approval", or other.
Will throw an error if an unexpected error occurs during the permission check.
const options = { permissionType: 'videoSetting', audioSetting: 'allow', videoSetting: 'approval', screenshareSetting: 'deny', chatSetting: 'allow',};const result = await checkPermissionService.checkPermission(options);console.log(result);// Output: 1 (since videoSetting is 'approval') Copy
const options = { permissionType: 'videoSetting', audioSetting: 'allow', videoSetting: 'approval', screenshareSetting: 'deny', chatSetting: 'allow',};const result = await checkPermissionService.checkPermission(options);console.log(result);// Output: 1 (since videoSetting is 'approval')
Checks the permission based on the provided settings.
Param: options
The options for checking permissions.
Param: options.permissionType
The type of permission to check. Can be "audioSetting", "videoSetting", "screenshareSetting", or "chatSetting".
Param: options.audioSetting
The setting for audio permission. Can be "allow", "approval", or other.
Param: options.videoSetting
The setting for video permission. Can be "allow", "approval", or other.
Param: options.screenshareSetting
The setting for screenshare permission. Can be "allow", "approval", or other.
Param: options.chatSetting
The setting for chat permission. Can be "allow", "approval", or other.
Returns
Throws
Will throw an error if an unexpected error occurs during the permission check.
Example