Skip to content

Commit 1523ce0

Browse files
committed
feat: add max frame rate
fix: #99
1 parent 052e026 commit 1523ce0

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

browser/src/libs/camera/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ class Camera {
1313
this.close();
1414

1515
const constraints = {
16-
video: { deviceId: { exact: id }, width: { ideal: width }, height: { ideal: height } },
16+
video: {
17+
deviceId: { exact: id },
18+
width: { ideal: width },
19+
height: { ideal: height },
20+
frameRate: { ideal: 60 }
21+
},
1722
audio: audioId ? { deviceId: { exact: audioId } } : false
1823
};
1924

desktop/src/renderer/src/libs/camera/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ class Camera {
1313
this.close()
1414

1515
const constraints = {
16-
video: { deviceId: { exact: id }, width: { ideal: width }, height: { ideal: height } },
16+
video: {
17+
deviceId: { exact: id },
18+
width: { ideal: width },
19+
height: { ideal: height },
20+
frameRate: { ideal: 60 }
21+
},
1722
audio: audioId ? { deviceId: { exact: audioId } } : false
1823
}
1924

0 commit comments

Comments
 (0)