feat: update venmic (#230)

* feat: update venmic

* chore(deps): bump venmic
This commit is contained in:
Noah
2023-11-10 18:12:36 +01:00
committed by GitHub
parent b24535483e
commit a232af06ed
5 changed files with 15 additions and 12 deletions

View File

@@ -53,10 +53,9 @@ ipcMain.handle(IpcEvents.VIRT_MIC_LIST, () => {
ipcMain.handle(
IpcEvents.VIRT_MIC_START,
(_, target: string) =>
(_, targets: string[]) =>
obtainVenmic()?.link({
key: "application.name",
value: target,
props: targets.map(target => ({ key: "application.name", value: target })),
mode: "include"
})
);
@@ -65,8 +64,12 @@ ipcMain.handle(
IpcEvents.VIRT_MIC_START_SYSTEM,
() =>
obtainVenmic()?.link({
key: "application.process.id",
value: getRendererAudioServicePid(),
props: [
{
key: "application.process.id",
value: getRendererAudioServicePid()
}
],
mode: "exclude"
})
);

View File

@@ -63,7 +63,7 @@ export const VesktopNative = {
virtmic: {
list: () =>
invoke<{ ok: false; isGlibcxxToOld: boolean } | { ok: true; targets: string[] }>(IpcEvents.VIRT_MIC_LIST),
start: (target: string) => invoke<void>(IpcEvents.VIRT_MIC_START, target),
start: (targets: string[]) => invoke<void>(IpcEvents.VIRT_MIC_START, targets),
startSystem: () => invoke<void>(IpcEvents.VIRT_MIC_START_SYSTEM),
stop: () => invoke<void>(IpcEvents.VIRT_MIC_STOP)
},

View File

@@ -106,7 +106,7 @@ export function openScreenSharePicker(screens: Source[], skipPicker: boolean) {
if (v.audioSource === "Entire System") {
await VesktopNative.virtmic.startSystem();
} else {
await VesktopNative.virtmic.start(v.audioSource);
await VesktopNative.virtmic.start([v.audioSource]);
}
}
resolve(v);