Skip to content

Commit 9b05c6d

Browse files
committed
reverted getUserMedia
1 parent 82583b5 commit 9b05c6d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/webui/screenshot.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,15 @@ async function screenshot (format) {
2424
const stream = await navigator.mediaDevices.getUserMedia({
2525
audio: false,
2626
video: {
27-
width: { min: 1280, ideal: 1920, max: 4000 },
28-
height: { min: 720, ideal: 1080, max: 4000 },
29-
deviceId: source.id
27+
// @ts-ignore
28+
mandatory: {
29+
chromeMediaSource: 'desktop',
30+
chromeMediaSourceId: source.id,
31+
minWidth: 1280,
32+
maxWidth: 4000,
33+
minHeight: 720,
34+
maxHeight: 4000
35+
}
3036
}
3137
})
3238

0 commit comments

Comments
 (0)