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"
|
"arrpc": "github:OpenAsar/arrpc#89f4da610ccfac93f461826a446a17cd3b23953d"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@vencord/venmic": "^1.7.0"
|
"@vencord/venmic": "^2.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
||||||
|
|
|
@ -11,8 +11,8 @@ dependencies:
|
||||||
|
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@vencord/venmic':
|
'@vencord/venmic':
|
||||||
specifier: ^1.7.0
|
specifier: ^2.0.1
|
||||||
version: 1.7.0
|
version: 2.0.1
|
||||||
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@fal-works/esbuild-plugin-global-externals':
|
'@fal-works/esbuild-plugin-global-externals':
|
||||||
|
@ -960,8 +960,8 @@ packages:
|
||||||
type-fest: 3.13.1
|
type-fest: 3.13.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@vencord/venmic@1.7.0:
|
/@vencord/venmic@2.0.1:
|
||||||
resolution: {integrity: sha512-WtIfoPaFWMU0Q98KQx9BTjTQQgevb0hwpTiJTDi5uL274JRSt5lm/J5qIwsYrPNsvLv0AJvyUV0Zc8dU+hUc5w==}
|
resolution: {integrity: sha512-trO858it+ah05qaa2AUt5OYxBKSJC5/p4JlqmOKZ5HyNKk8Fqb3i87ioDzQNPccebZhSZJkRXTNUY39IhhLfFQ==}
|
||||||
engines: {node: '>=14.15'}
|
engines: {node: '>=14.15'}
|
||||||
os: [linux]
|
os: [linux]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
|
|
@ -53,10 +53,9 @@ ipcMain.handle(IpcEvents.VIRT_MIC_LIST, () => {
|
||||||
|
|
||||||
ipcMain.handle(
|
ipcMain.handle(
|
||||||
IpcEvents.VIRT_MIC_START,
|
IpcEvents.VIRT_MIC_START,
|
||||||
(_, target: string) =>
|
(_, targets: string[]) =>
|
||||||
obtainVenmic()?.link({
|
obtainVenmic()?.link({
|
||||||
key: "application.name",
|
props: targets.map(target => ({ key: "application.name", value: target })),
|
||||||
value: target,
|
|
||||||
mode: "include"
|
mode: "include"
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
@ -65,8 +64,12 @@ ipcMain.handle(
|
||||||
IpcEvents.VIRT_MIC_START_SYSTEM,
|
IpcEvents.VIRT_MIC_START_SYSTEM,
|
||||||
() =>
|
() =>
|
||||||
obtainVenmic()?.link({
|
obtainVenmic()?.link({
|
||||||
|
props: [
|
||||||
|
{
|
||||||
key: "application.process.id",
|
key: "application.process.id",
|
||||||
value: getRendererAudioServicePid(),
|
value: getRendererAudioServicePid()
|
||||||
|
}
|
||||||
|
],
|
||||||
mode: "exclude"
|
mode: "exclude"
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
|
@ -63,7 +63,7 @@ export const VesktopNative = {
|
||||||
virtmic: {
|
virtmic: {
|
||||||
list: () =>
|
list: () =>
|
||||||
invoke<{ ok: false; isGlibcxxToOld: boolean } | { ok: true; targets: string[] }>(IpcEvents.VIRT_MIC_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),
|
startSystem: () => invoke<void>(IpcEvents.VIRT_MIC_START_SYSTEM),
|
||||||
stop: () => invoke<void>(IpcEvents.VIRT_MIC_STOP)
|
stop: () => invoke<void>(IpcEvents.VIRT_MIC_STOP)
|
||||||
},
|
},
|
||||||
|
|
|
@ -106,7 +106,7 @@ export function openScreenSharePicker(screens: Source[], skipPicker: boolean) {
|
||||||
if (v.audioSource === "Entire System") {
|
if (v.audioSource === "Entire System") {
|
||||||
await VesktopNative.virtmic.startSystem();
|
await VesktopNative.virtmic.startSystem();
|
||||||
} else {
|
} else {
|
||||||
await VesktopNative.virtmic.start(v.audioSource);
|
await VesktopNative.virtmic.start([v.audioSource]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
resolve(v);
|
resolve(v);
|
||||||
|
|
Loading…
Reference in a new issue