feat: update venmic (#230)
* feat: update venmic * chore(deps): bump venmic
This commit is contained in:
parent
b24535483e
commit
a232af06ed
5 changed files with 15 additions and 12 deletions
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue