mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 22:37:04 +08:00
fix(electron): use askForMeetingPermission for asking microphone permission (#11792)
This commit is contained in:
@@ -210,7 +210,13 @@ export const MeetingsSettings = () => {
|
||||
|
||||
const handleOpenMicrophoneRecordingPermissionSetting =
|
||||
useAsyncCallback(async () => {
|
||||
await meetingSettingsService.showRecordingPermissionSetting('microphone');
|
||||
const result =
|
||||
await meetingSettingsService.askForMeetingPermission('microphone');
|
||||
if (!result) {
|
||||
await meetingSettingsService.showRecordingPermissionSetting(
|
||||
'microphone'
|
||||
);
|
||||
}
|
||||
}, [meetingSettingsService]);
|
||||
|
||||
const handleOpenSavedRecordings = useAsyncCallback(async () => {
|
||||
|
||||
@@ -114,6 +114,12 @@ export class MeetingSettingsService extends Service {
|
||||
);
|
||||
}
|
||||
|
||||
async askForMeetingPermission(type: 'microphone') {
|
||||
return this.desktopApiService?.handler.recording.askForMeetingPermission(
|
||||
type
|
||||
);
|
||||
}
|
||||
|
||||
setRecordingMode = (mode: MeetingSettingsSchema['recordingMode']) => {
|
||||
const currentMode = this.settings.recordingMode;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user