Bump version to 0.5.3 and enhance Windows audio capture using loopback
Some checks failed
Build and Release / build (x64, ubuntu-latest, linux) (push) Has been skipped
Build and Release / build (arm64, macos-latest, darwin) (push) Has been cancelled
Build and Release / build (x64, macos-latest, darwin) (push) Has been cancelled
Build and Release / build (x64, windows-latest, win32) (push) Has been cancelled
Build and Release / release (push) Has been cancelled

This commit is contained in:
Илья Глазунов 2026-01-15 19:20:34 +03:00
parent 01b8415a02
commit bf9ec15912
2 changed files with 25 additions and 8 deletions

View File

@ -1,7 +1,7 @@
{
"name": "cheating-daddy",
"productName": "cheating-daddy",
"version": "0.5.2",
"version": "0.5.3",
"description": "cheating daddy",
"main": "src/index.js",
"scripts": {

View File

@ -64,15 +64,32 @@ function createWindow(sendToRenderer, geminiSessionRef) {
{ useSystemPicker: false } // Disable system picker, use our source directly
);
} else if (process.platform === 'win32') {
// On Windows, use system picker so user can enable "Share audio" checkbox
// This is REQUIRED for system audio capture on Windows
// On Windows, use desktopCapturer with loopback audio
// This captures system audio via WASAPI without needing user interaction
session.defaultSession.setDisplayMediaRequestHandler(
(request, callback) => {
console.log('Windows: Using system picker for screen/audio selection');
// Don't call callback - let system picker handle it
// The system picker will provide both video and audio if user checks the box
async (request, callback) => {
try {
console.log('Windows: Getting screen sources with loopback audio...');
const sources = await desktopCapturer.getSources({
types: ['screen'],
thumbnailSize: { width: 0, height: 0 }
});
if (sources.length === 0) {
console.error('No screen sources available on Windows');
callback(null);
return;
}
console.log('Windows: Using screen source:', sources[0].name, 'with loopback audio');
// 'loopback' enables system audio capture via WASAPI on Windows
callback({ video: sources[0], audio: 'loopback' });
} catch (error) {
console.error('Error getting screen sources on Windows:', error);
callback(null);
}
},
{ useSystemPicker: true }
{ useSystemPicker: false }
);
} else {
// On Linux, try to get system audio via loopback