feat: update venmic (#230)
* feat: update venmic * chore(deps): bump venmic
This commit is contained in:
@@ -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"
|
||||
})
|
||||
);
|
||||
|
||||
@@ -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)
|
||||
},
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user