usePermissions
usePermissions(): Object
usePermissions
is a convenience hook to access the local participant's permissions
.
Return type
Returns an object with the following properties:
Name | Type | Description |
---|---|---|
canSendAudio | boolean | true in case the local participant's permissions.canSend is true , or includes 'audio' |
canSendVideo | boolean | true in case the local participant's permissions.canSend is true , or includes 'video' |
canSendCustomAudio | boolean | true in case the local participant's permissions.canSend is true , or includes 'customAudio' |
canSendCustomVideo | boolean | true in case the local participant's permissions.canSend is true , or includes 'customVideo' |
canSendScreenAudio | boolean | true in case the local participant's permissions.canSend is true , or includes 'screenAudio' |
canSendScreenVideo | boolean | true in case the local participant's permissions.canSend is true , or includes 'screenVideo' |
hasPresence | boolean | true in case the local participant's permissions.hasPresence is true |
permissions | Object | The local participant's permissions object, as returned from participants() |