feat: add max frame rate

fix: https://github.com/sipeed/NanoKVM-USB/issues/99
This commit is contained in:
Guoguo
2025-12-29 10:29:54 +08:00
parent ab68816576
commit 1d053527b1
2 changed files with 12 additions and 2 deletions

View File

@@ -13,7 +13,12 @@ class Camera {
this.close();
const constraints = {
video: { deviceId: { exact: id }, width: { ideal: width }, height: { ideal: height } },
video: {
deviceId: { exact: id },
width: { ideal: width },
height: { ideal: height },
frameRate: { ideal: 60 }
},
audio: audioId ? { deviceId: { exact: audioId } } : false
};

View File

@@ -13,7 +13,12 @@ class Camera {
this.close()
const constraints = {
video: { deviceId: { exact: id }, width: { ideal: width }, height: { ideal: height } },
video: {
deviceId: { exact: id },
width: { ideal: width },
height: { ideal: height },
frameRate: { ideal: 60 }
},
audio: audioId ? { deviceId: { exact: audioId } } : false
}