forked from Github/frigate
Adjust nginx proc count based on available CPUs (#11653)
* Restrict nginx to 4 processes if more are available * Fix bash * Different sed structure * Limit ffmpeg thread counts for secondary ffmpeg processes * Add up / down keyboard shortcut
This commit is contained in:
@@ -139,6 +139,11 @@ export default function VideoControls({
|
||||
const onKeyboardShortcut = useCallback(
|
||||
(key: string, down: boolean, repeat: boolean) => {
|
||||
switch (key) {
|
||||
case "ArrowDown":
|
||||
if (down) {
|
||||
onSeek(-1);
|
||||
}
|
||||
break;
|
||||
case "ArrowLeft":
|
||||
if (down) {
|
||||
onSeek(-10);
|
||||
@@ -149,6 +154,11 @@ export default function VideoControls({
|
||||
onSeek(10);
|
||||
}
|
||||
break;
|
||||
case "ArrowUp":
|
||||
if (down) {
|
||||
onSeek(1);
|
||||
}
|
||||
break;
|
||||
case "f":
|
||||
if (setFullscreen && down && !repeat) {
|
||||
setFullscreen(!fullscreen);
|
||||
@@ -171,7 +181,9 @@ export default function VideoControls({
|
||||
[video, isPlaying, fullscreen, setFullscreen, onSeek],
|
||||
);
|
||||
useKeyboardListener(
|
||||
hotKeys ? ["ArrowLeft", "ArrowRight", "f", "m", " "] : [],
|
||||
hotKeys
|
||||
? ["ArrowDown", "ArrowLeft", "ArrowRight", "ArrowUp", "f", "m", " "]
|
||||
: [],
|
||||
onKeyboardShortcut,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user