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
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:
parent
01b8415a02
commit
bf9ec15912
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "cheating-daddy",
|
"name": "cheating-daddy",
|
||||||
"productName": "cheating-daddy",
|
"productName": "cheating-daddy",
|
||||||
"version": "0.5.2",
|
"version": "0.5.3",
|
||||||
"description": "cheating daddy",
|
"description": "cheating daddy",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -64,15 +64,32 @@ function createWindow(sendToRenderer, geminiSessionRef) {
|
|||||||
{ useSystemPicker: false } // Disable system picker, use our source directly
|
{ useSystemPicker: false } // Disable system picker, use our source directly
|
||||||
);
|
);
|
||||||
} else if (process.platform === 'win32') {
|
} else if (process.platform === 'win32') {
|
||||||
// On Windows, use system picker so user can enable "Share audio" checkbox
|
// On Windows, use desktopCapturer with loopback audio
|
||||||
// This is REQUIRED for system audio capture on Windows
|
// This captures system audio via WASAPI without needing user interaction
|
||||||
session.defaultSession.setDisplayMediaRequestHandler(
|
session.defaultSession.setDisplayMediaRequestHandler(
|
||||||
(request, callback) => {
|
async (request, callback) => {
|
||||||
console.log('Windows: Using system picker for screen/audio selection');
|
try {
|
||||||
// Don't call callback - let system picker handle it
|
console.log('Windows: Getting screen sources with loopback audio...');
|
||||||
// The system picker will provide both video and audio if user checks the box
|
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 {
|
} else {
|
||||||
// On Linux, try to get system audio via loopback
|
// On Linux, try to get system audio via loopback
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user