Skip to content

Commit

Permalink
improve(webapp): default video resolution use height
Browse files Browse the repository at this point in the history
  • Loading branch information
a-wing committed Nov 25, 2024
1 parent 7b8019a commit 760d16b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webapp/lib/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ async function asyncGetVideoStream(deviceId: string): Promise<MediaStream> {
if (deviceId === 'none') {
/* empty */
} else if (deviceId === 'screen') {
stream = await navigator.mediaDevices.getDisplayMedia({ audio: false, video: { width: 640 } })
stream = await navigator.mediaDevices.getDisplayMedia({ audio: false, video: { height: 720 } })
} else {
stream = await navigator.mediaDevices.getUserMedia({ audio: false, video: { width: 320, deviceId: deviceId } })
stream = await navigator.mediaDevices.getUserMedia({ audio: false, video: { height: 480, deviceId: deviceId } })
}
return stream
}
Expand Down

0 comments on commit 760d16b

Please sign in to comment.