From 64caa7e5478dae378a983503730b8c72fd336ded Mon Sep 17 00:00:00 2001 From: busti Date: Sun, 10 Dec 2023 07:04:18 +0100 Subject: [PATCH] fix: automatically select highest available video resolution --- frontend/src/components/WebcamFileSource.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/components/WebcamFileSource.vue b/frontend/src/components/WebcamFileSource.vue index 1cb7b58..7413d77 100644 --- a/frontend/src/components/WebcamFileSource.vue +++ b/frontend/src/components/WebcamFileSource.vue @@ -100,6 +100,12 @@ export default { if (this.stream) this.allowed = true; }, async assignStream() { + const capabilities = this.stream.getTracks()[0].getCapabilities(); + await this.attemptGetUserMedia({ + deviceId: capabilities.deviceId, + width: {exact: capabilities.width.max}, + height: {exact: capabilities.height.max} + }) this.capturing = true; this.streaming = false; const {video} = this.$refs;