mirror of
https://github.com/sipeed/NanoKVM-USB.git
synced 2026-09-11 05:59:57 -05:00
fix: update video and audio constraints
This commit is contained in:
@@ -78,7 +78,12 @@ const App = () => {
|
||||
height: { ideal: resolution?.height || 1080 },
|
||||
frameRate: { ideal: 60 }
|
||||
},
|
||||
audio: true
|
||||
audio: {
|
||||
echoCancellation: false,
|
||||
noiseSuppression: false,
|
||||
autoGainControl: false,
|
||||
sampleRate: 48000,
|
||||
}
|
||||
});
|
||||
stream.getTracks().forEach((track) => track.stop());
|
||||
|
||||
|
||||
@@ -17,9 +17,20 @@ class Camera {
|
||||
deviceId: { exact: id },
|
||||
width: { ideal: width },
|
||||
height: { ideal: height },
|
||||
frameRate: { ideal: 60 }
|
||||
frameRate: { ideal: 60 },
|
||||
latency: { ideal: 0 },
|
||||
resizeMode: 'none'
|
||||
},
|
||||
audio: audioId ? { deviceId: { exact: audioId } } : false
|
||||
audio: audioId
|
||||
? {
|
||||
deviceId: { exact: audioId },
|
||||
echoCancellation: false,
|
||||
noiseSuppression: false,
|
||||
autoGainControl: false,
|
||||
sampleRate: 48000,
|
||||
latency: 0
|
||||
}
|
||||
: false
|
||||
};
|
||||
|
||||
this.id = id;
|
||||
|
||||
@@ -75,7 +75,12 @@ const App = (): ReactElement => {
|
||||
height: { ideal: resolution?.height || 1080 },
|
||||
frameRate: { ideal: 60 }
|
||||
},
|
||||
audio: true
|
||||
audio: {
|
||||
echoCancellation: false,
|
||||
noiseSuppression: false,
|
||||
autoGainControl: false,
|
||||
sampleRate: 48000
|
||||
}
|
||||
})
|
||||
stream.getTracks().forEach((track) => track.stop())
|
||||
}
|
||||
|
||||
@@ -17,9 +17,20 @@ class Camera {
|
||||
deviceId: { exact: id },
|
||||
width: { ideal: width },
|
||||
height: { ideal: height },
|
||||
frameRate: { ideal: 60 }
|
||||
frameRate: { ideal: 60 },
|
||||
latency: { ideal: 0 },
|
||||
resizeMode: 'none'
|
||||
},
|
||||
audio: audioId ? { deviceId: { exact: audioId } } : false
|
||||
audio: audioId
|
||||
? {
|
||||
deviceId: { exact: audioId },
|
||||
echoCancellation: false,
|
||||
noiseSuppression: false,
|
||||
autoGainControl: false,
|
||||
sampleRate: 48000,
|
||||
latency: 0
|
||||
}
|
||||
: false
|
||||
}
|
||||
|
||||
this.id = id
|
||||
|
||||
Reference in New Issue
Block a user