Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/helpers/audioActivityDetector.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ class AudioActivityDetector extends EventEmitter {
// stdin must be "pipe" — the Windows binary monitors stdin for parent death
const child = spawn(binaryPath, ["--exclude-pid", String(process.pid)], {
stdio: ["pipe", "pipe", "pipe"],
windowsHide: true,
});
this._listenerProcess = child;

Expand Down
1 change: 1 addition & 0 deletions src/helpers/meetingAecManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class MeetingAecManager {

const child = spawn(binaryPath, ["--sample-rate", String(SAMPLE_RATE)], {
stdio: ["pipe", "pipe", "pipe"],
windowsHide: true,
});

this.process = child;
Expand Down
2 changes: 2 additions & 0 deletions src/helpers/textEditMonitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ class TextEditMonitor extends EventEmitter {

this.process = spawn(command, args, {
stdio: ["pipe", "pipe", "pipe"],
windowsHide: true,
});

// Send original text via stdin
Expand Down Expand Up @@ -391,6 +392,7 @@ class TextEditMonitor extends EventEmitter {

this.process = spawn(command, [...args, String(targetPid)], {
stdio: ["pipe", "pipe", "pipe"],
windowsHide: true,
});

this.process.stdin.write(originalText + "\n");
Expand Down
32 changes: 32 additions & 0 deletions test/helpers/windows-helper-spawn-hide.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const test = require("node:test");
const assert = require("node:assert/strict");
const fs = require("fs");
const path = require("path");

const ROOT = path.join(__dirname, "../..");

function read(rel) {
return fs.readFileSync(path.join(ROOT, rel), "utf8");
}

test("meeting AEC helper spawn sets windowsHide", () => {
const src = read("src/helpers/meetingAecManager.js");
assert.match(
src,
/spawn\(binaryPath,\s*\["--sample-rate"[\s\S]*?windowsHide:\s*true/
);
});

test("text edit monitor spawns set windowsHide", () => {
const src = read("src/helpers/textEditMonitor.js");
const hides = (src.match(/windowsHide:\s*true/g) || []).length;
assert.ok(hides >= 2, `expected both monitor spawns to set windowsHide, got ${hides}`);
});

test("Windows mic-listener spawn sets windowsHide", () => {
const src = read("src/helpers/audioActivityDetector.js");
assert.match(
src,
/_tryEventDrivenWin32[\s\S]*?spawn\(binaryPath,\s*\["--exclude-pid"[\s\S]*?windowsHide:\s*true/
);
});