fix: native resolution capture + correct click offset for title bar
- Remove restrictive resolution constraints, capture at native res - Account for window frame/title bar when mapping click coordinates (capture includes title bar but sendInputEvent is content-relative) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
b4211a7d50
commit
f19d883a69
@ -22,11 +22,7 @@ async function getCaptureStream() {
|
|||||||
mandatory: {
|
mandatory: {
|
||||||
chromeMediaSource: 'desktop',
|
chromeMediaSource: 'desktop',
|
||||||
chromeMediaSourceId: sourceId,
|
chromeMediaSourceId: sourceId,
|
||||||
minWidth: 1280,
|
maxFrameRate: 15
|
||||||
maxWidth: 1920,
|
|
||||||
minHeight: 720,
|
|
||||||
maxHeight: 1080,
|
|
||||||
maxFrameRate: 30
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
10
main.js
10
main.js
@ -1023,9 +1023,13 @@ ipcMain.on('remote:input-event', (_event, data) => {
|
|||||||
if (!remote || !remote.allowInput) return;
|
if (!remote || !remote.allowInput) return;
|
||||||
if (data.role !== 'admin') return;
|
if (data.role !== 'admin') return;
|
||||||
|
|
||||||
const bounds = mainWindow.getContentBounds();
|
// Capture includes window frame (title bar), but sendInputEvent is relative to content area
|
||||||
const x = Math.round((data.x || 0) * bounds.width);
|
const winBounds = mainWindow.getBounds();
|
||||||
const y = Math.round((data.y || 0) * bounds.height);
|
const contentBounds = mainWindow.getContentBounds();
|
||||||
|
const frameLeft = contentBounds.x - winBounds.x;
|
||||||
|
const titleBarHeight = contentBounds.y - winBounds.y;
|
||||||
|
const x = Math.round((data.x || 0) * winBounds.width - frameLeft);
|
||||||
|
const y = Math.round((data.y || 0) * winBounds.height - titleBarHeight);
|
||||||
|
|
||||||
switch (data.type) {
|
switch (data.type) {
|
||||||
case 'mousemove':
|
case 'mousemove':
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "multi-hoster-uploader",
|
"name": "multi-hoster-uploader",
|
||||||
"version": "2.1.7",
|
"version": "2.1.8",
|
||||||
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
|
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user