From 2d49171f7f255d9250194732c0c1b567db985242 Mon Sep 17 00:00:00 2001 From: name Date: Fri, 18 Jul 2025 04:44:20 +0300 Subject: [PATCH] updated getUserMedia --- src/webui/screenshot.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/webui/screenshot.js b/src/webui/screenshot.js index b4022bef2..2a3eb7b04 100644 --- a/src/webui/screenshot.js +++ b/src/webui/screenshot.js @@ -23,14 +23,9 @@ async function screenshot (format) { const stream = await navigator.mediaDevices.getUserMedia({ audio: false, video: { - mandatory: { - chromeMediaSource: 'desktop', - chromeMediaSourceId: source.id, - minWidth: 1280, - maxWidth: 4000, - minHeight: 720, - maxHeight: 4000 - } + width: { min: 1280, ideal: 1920, max: 4000 }, + height: { min: 720, ideal: 1080, max: 4000 }, + deviceId: source.id } })