signal-desktop/ts/util/callingPermissions.ts
2020-07-30 13:08:47 -07:00

10 lines
303 B
TypeScript

export async function requestCameraPermissions(): Promise<boolean> {
if (!(await window.getMediaCameraPermissions())) {
await window.showCallingPermissionsPopup(true);
// Check the setting again (from the source of truth).
return window.getMediaCameraPermissions();
}
return true;
}