Function: useMicrophonePermission()
useMicrophonePermission():
PermissionState
Returns whether the user has granted permission to use the Microphone, or not.
If the user doesn't grant Audio Permission, you can use the <Camera>
but you cannot
record videos with audio (the audio={..}
prop).
Returns​
PermissionState
Example​
const { hasPermission, requestPermission } = useMicrophonePermission()
const canRecordAudio = hasPermission
return <Camera video={true} audio={canRecordAudio} />
Defined in​
hooks/useCameraPermission.ts:80