Misc Improvements (#14076)

* Return ID of export in http response

* Ignore keyboard listener when typing in text field

* Add other keyboard listeners
This commit is contained in:
Nicolas Mowen
2024-09-30 15:55:44 -06:00
committed by GitHub
parent 95d6da3111
commit 94fd75e014
5 changed files with 46 additions and 7 deletions

View File

@@ -236,6 +236,25 @@ export default function LiveCameraView({
return "mse";
}, [lowBandwidth, mic, webRTC, isRestreamed]);
useKeyboardListener(["m"], (key, modifiers) => {
if (!modifiers.down) {
return;
}
switch (key) {
case "m":
if (supportsAudioOutput) {
setAudio(!audio);
}
break;
case "t":
if (supports2WayTalk) {
setMic(!mic);
}
break;
}
});
// layout state
const windowAspectRatio = useMemo(() => {