fix: video frame rate not set when used for the first time

This commit is contained in:
wj-xiao
2026-01-19 17:23:08 +08:00
parent 287cbb5dcc
commit 8b09b2950e
2 changed files with 4 additions and 2 deletions

View File

@@ -75,7 +75,8 @@ const App = () => {
const stream = await navigator.mediaDevices.getUserMedia({
video: {
width: { ideal: resolution?.width || 1920 },
height: { ideal: resolution?.height || 1080 }
height: { ideal: resolution?.height || 1080 },
frameRate: { ideal: 60 }
},
audio: true
});

View File

@@ -72,7 +72,8 @@ const App = (): ReactElement => {
const stream = await navigator.mediaDevices.getUserMedia({
video: {
width: { ideal: resolution?.width || 1920 },
height: { ideal: resolution?.height || 1080 }
height: { ideal: resolution?.height || 1080 },
frameRate: { ideal: 60 }
},
audio: true
})