signal-desktop/ts/util/callingPermissions.ts

11 lines
303 B
TypeScript
Raw Normal View History

2020-06-04 18:16:19 +00:00
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;
}