Preload media devices to avoid later delay

Co-authored-by: ayumi yu <ayumi@signal.org>
This commit is contained in:
Jim Gustafson 2023-11-01 11:03:08 -07:00 committed by GitHub
parent 6d216a3eca
commit 59a4f237fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 43 additions and 0 deletions

View file

@ -108,6 +108,9 @@ export type IPCEventsCallbacksType = {
deleteAllMyStories: () => Promise<void>;
editCustomColor: (colorId: string, customColor: CustomColorType) => void;
getConversationsWithCustomColor: (x: string) => Array<ConversationType>;
getMediaAccessStatus: (
mediaType: 'screen' | 'microphone' | 'camera'
) => Promise<string | unknown>;
installStickerPack: (packId: string, key: string) => Promise<void>;
isFormattingFlagEnabled: () => boolean;
isPhoneNumberSharingEnabled: () => boolean;
@ -609,6 +612,11 @@ export function createIPCEvents(
showWhatsNewModal();
},
getMediaAccessStatus: async (
mediaType: 'screen' | 'microphone' | 'camera'
) => {
return window.IPC.getMediaAccessStatus(mediaType);
},
getMediaPermissions: window.IPC.getMediaPermissions,
getMediaCameraPermissions: window.IPC.getMediaCameraPermissions,