Browse Source

Set some actual values in admin video forms

pull/1886/head
Gabe Kangas 5 years ago
parent
commit
5e2c1a42b0
  1. 9
      web/pages/components/config/cpu-usage.tsx
  2. 13
      web/pages/components/config/video-latency.tsx
  3. 7
      web/pages/components/config/video-variant-form.tsx

9
web/pages/components/config/cpu-usage.tsx

@ -12,6 +12,14 @@ const SLIDER_MARKS = { @@ -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 }) { @@ -40,6 +48,7 @@ export default function CPUUsageSelector({ defaultValue, onChange }) {
<br />
<div className="segment-slider">
<Slider
tipFormatter={value => TOOLTIPS[value] }
onChange={handleChange}
min={1}
max={Object.keys(SLIDER_MARKS).length}

13
web/pages/components/config/video-latency.tsx

@ -11,12 +11,12 @@ import { @@ -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() { @@ -110,7 +110,6 @@ export default function VideoLatency() {
<br />
<div className="segment-slider">
<Slider
tooltipVisible
tipFormatter={value => <SegmentToolTip value={SLIDER_COMMENTS[value]} />}
onChange={handleChange}
min={1}

7
web/pages/components/config/video-variant-form.tsx

@ -12,7 +12,7 @@ const { Panel } = Collapse; @@ -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 = { @@ -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({ @@ -138,7 +138,6 @@ export default function VideoVariantForm({
</p>
<div className="form-component">
<Slider
// tooltipVisible={dataState.videoPassthrough !== true}
tipFormatter={value => `${value} ${videoBRUnit}`}
disabled={dataState.videoPassthrough === true}
defaultValue={dataState.videoBitrate}

Loading…
Cancel
Save