Skip to content

Commit 5c0de47

Browse files
steveseguinclaude
andcommitted
Add automated test for window-audio-capture validation
- Add test/automated-capture-test.html: Self-contained test page that validates screen capture, app audio capture, and WebRTC pipeline without user interaction - Add test-log IPC handler in main.js to forward renderer logs to terminal Test validates: - Edge window discovery via desktopCapturer - Video capture using chromeMediaSourceId - Audio session discovery (msedge.exe process) - Native audio capture via WASAPI process loopback - Audio level detection (RMS analysis) - WebRTC video/audio loopback transmission Run with: npm start -- --url="file:///.../test/automated-capture-test.html" --node 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 7621881 commit 5c0de47

File tree

2 files changed

+563
-0
lines changed

2 files changed

+563
-0
lines changed

main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ ipcMain.on('getSources', async function(eventRet, args) {
1717
} catch(e){console.error(e);}
1818
});
1919

20+
// Test logging handler - forwards renderer logs to main process console
21+
ipcMain.on('test-log', (event, { type, msg }) => {
22+
const prefix = type === 'error' ? '\x1b[31m' : type === 'success' ? '\x1b[32m' : '\x1b[36m';
23+
const reset = '\x1b[0m';
24+
console.log(`${prefix}[TEST:${type.toUpperCase()}]${reset} ${msg}`);
25+
});
2026

2127
const { Readable } = require('stream');
2228
const { fetch: undiciFetch } = require('undici');

0 commit comments

Comments
 (0)