From 5e2c1a42b09344ac7b3281644ce8b905a61c9737 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Wed, 3 Feb 2021 10:26:46 -0800 Subject: [PATCH] Set some actual values in admin video forms --- web/pages/components/config/cpu-usage.tsx | 9 +++++++++ web/pages/components/config/video-latency.tsx | 13 ++++++------- web/pages/components/config/video-variant-form.tsx | 7 +++---- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/web/pages/components/config/cpu-usage.tsx b/web/pages/components/config/cpu-usage.tsx index 1f79cc04c..9b54425db 100644 --- a/web/pages/components/config/cpu-usage.tsx +++ b/web/pages/components/config/cpu-usage.tsx @@ -12,6 +12,14 @@ const SLIDER_MARKS = { 5: 'highest', }; +const TOOLTIPS = { + 1: 'lowest', + 2: 'low', + 3: 'medium', + 4: 'high', + 5: 'highest', +}; + export default function CPUUsageSelector({ defaultValue, onChange }) { const [selectedOption, setSelectedOption] = useState(null); @@ -40,6 +48,7 @@ export default function CPUUsageSelector({ defaultValue, onChange }) {
TOOLTIPS[value] } onChange={handleChange} min={1} max={Object.keys(SLIDER_MARKS).length} diff --git a/web/pages/components/config/video-latency.tsx b/web/pages/components/config/video-latency.tsx index 216c2a77d..d337cc43e 100644 --- a/web/pages/components/config/video-latency.tsx +++ b/web/pages/components/config/video-latency.tsx @@ -11,12 +11,12 @@ import { const { Title } = Typography; const SLIDER_MARKS = { - 1: '1 - low', - 2: '2', - 3: '3', - 4: '4', - 5: '5', - 6: '6 - high', + 1: 'low', + 2: '', + 3: '', + 4: '', + 5: '', + 6: 'high', }; const SLIDER_COMMENTS = { @@ -110,7 +110,6 @@ export default function VideoLatency() {
} onChange={handleChange} min={1} diff --git a/web/pages/components/config/video-variant-form.tsx b/web/pages/components/config/video-variant-form.tsx index 24a3f88e7..e82a37788 100644 --- a/web/pages/components/config/video-variant-form.tsx +++ b/web/pages/components/config/video-variant-form.tsx @@ -12,7 +12,7 @@ const { Panel } = Collapse; const VIDEO_VARIANT_DEFAULTS = { framerate: { min: 10, - max: 80, + max: 90, defaultValue: 24, unit: 'fps', incrementBy: 1, @@ -20,8 +20,8 @@ const VIDEO_VARIANT_DEFAULTS = { }, videoBitrate: { min: 600, - max: 1200, - defaultValue: 800, + max: 6000, + defaultValue: 1200, unit: 'kbps', incrementBy: 100, tip: 'This is importatnt yo', @@ -138,7 +138,6 @@ export default function VideoVariantForm({

`${value} ${videoBRUnit}`} disabled={dataState.videoPassthrough === true} defaultValue={dataState.videoBitrate}