diff --git a/lib/remote-capture.html b/lib/remote-capture.html index 399ae3e..64d3699 100644 --- a/lib/remote-capture.html +++ b/lib/remote-capture.html @@ -22,11 +22,7 @@ async function getCaptureStream() { mandatory: { chromeMediaSource: 'desktop', chromeMediaSourceId: sourceId, - minWidth: 1280, - maxWidth: 1920, - minHeight: 720, - maxHeight: 1080, - maxFrameRate: 30 + maxFrameRate: 15 } } }); diff --git a/main.js b/main.js index f51cf73..bb5892e 100644 --- a/main.js +++ b/main.js @@ -1023,9 +1023,13 @@ ipcMain.on('remote:input-event', (_event, data) => { if (!remote || !remote.allowInput) return; if (data.role !== 'admin') return; - const bounds = mainWindow.getContentBounds(); - const x = Math.round((data.x || 0) * bounds.width); - const y = Math.round((data.y || 0) * bounds.height); + // Capture includes window frame (title bar), but sendInputEvent is relative to content area + const winBounds = mainWindow.getBounds(); + 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) { case 'mousemove': diff --git a/package.json b/package.json index 28ae785..6d2b15b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "multi-hoster-uploader", - "version": "2.1.7", + "version": "2.1.8", "description": "Upload files to doodstream, voe, vidmoly, byse simultaneously", "main": "main.js", "scripts": {