diff --git a/package.json b/package.json index aa118b4..9d3ef47 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "arrpc": "github:OpenAsar/arrpc#89f4da610ccfac93f461826a446a17cd3b23953d" }, "optionalDependencies": { - "@vencord/venmic": "^1.7.0" + "@vencord/venmic": "^2.0.1" }, "devDependencies": { "@fal-works/esbuild-plugin-global-externals": "^2.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a527680..c22f547 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,8 +11,8 @@ dependencies: optionalDependencies: '@vencord/venmic': - specifier: ^1.7.0 - version: 1.7.0 + specifier: ^2.0.1 + version: 2.0.1 devDependencies: '@fal-works/esbuild-plugin-global-externals': @@ -960,8 +960,8 @@ packages: type-fest: 3.13.1 dev: true - /@vencord/venmic@1.7.0: - resolution: {integrity: sha512-WtIfoPaFWMU0Q98KQx9BTjTQQgevb0hwpTiJTDi5uL274JRSt5lm/J5qIwsYrPNsvLv0AJvyUV0Zc8dU+hUc5w==} + /@vencord/venmic@2.0.1: + resolution: {integrity: sha512-trO858it+ah05qaa2AUt5OYxBKSJC5/p4JlqmOKZ5HyNKk8Fqb3i87ioDzQNPccebZhSZJkRXTNUY39IhhLfFQ==} engines: {node: '>=14.15'} os: [linux] requiresBuild: true diff --git a/src/main/virtmic.ts b/src/main/virtmic.ts index 763e25d..36920e9 100644 --- a/src/main/virtmic.ts +++ b/src/main/virtmic.ts @@ -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" }) ); diff --git a/src/preload/VesktopNative.ts b/src/preload/VesktopNative.ts index ca711bc..d72329d 100644 --- a/src/preload/VesktopNative.ts +++ b/src/preload/VesktopNative.ts @@ -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(IpcEvents.VIRT_MIC_START, target), + start: (targets: string[]) => invoke(IpcEvents.VIRT_MIC_START, targets), startSystem: () => invoke(IpcEvents.VIRT_MIC_START_SYSTEM), stop: () => invoke(IpcEvents.VIRT_MIC_STOP) }, diff --git a/src/renderer/components/ScreenSharePicker.tsx b/src/renderer/components/ScreenSharePicker.tsx index bf141ec..cd2fc6c 100644 --- a/src/renderer/components/ScreenSharePicker.tsx +++ b/src/renderer/components/ScreenSharePicker.tsx @@ -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);