fix: Don't send audio as undefined and instead omit it (#241)
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
This commit is contained in:
parent
a5664a35b7
commit
dc20b6e232
|
|
@ -202,10 +202,14 @@ export function createMainWindow() {
|
||||||
if (sources.length == 1) {
|
if (sources.length == 1) {
|
||||||
// TODO: Get audio to work with wayland
|
// TODO: Get audio to work with wayland
|
||||||
// See vencord for an implementation using a virtual microphone.
|
// See vencord for an implementation using a virtual microphone.
|
||||||
callback({
|
request.audioRequested
|
||||||
video: sources[0],
|
? callback({
|
||||||
audio: request.audioRequested ? "loopback" : undefined,
|
video: sources[0],
|
||||||
});
|
audio: "loopback",
|
||||||
|
})
|
||||||
|
: callback({
|
||||||
|
video: sources[0],
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ipcMain.once(
|
ipcMain.once(
|
||||||
|
|
@ -214,10 +218,14 @@ export function createMainWindow() {
|
||||||
if (idx < 0 || idx > sources.length) {
|
if (idx < 0 || idx > sources.length) {
|
||||||
callback({});
|
callback({});
|
||||||
} else {
|
} else {
|
||||||
callback({
|
audio
|
||||||
video: sources[idx],
|
? callback({
|
||||||
audio: audio ? "loopback" : undefined,
|
video: sources[idx],
|
||||||
});
|
audio: "loopback",
|
||||||
|
})
|
||||||
|
: callback({
|
||||||
|
video: sources[idx],
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue