mirror of
https://github.com/owncast/owncast.git
synced 2024-11-22 21:03:19 +03:00
Set some actual values in admin video forms
This commit is contained in:
parent
5038992513
commit
5e2c1a42b0
3 changed files with 18 additions and 11 deletions
|
@ -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 }) {
|
|||
<br />
|
||||
<div className="segment-slider">
|
||||
<Slider
|
||||
tipFormatter={value => TOOLTIPS[value] }
|
||||
onChange={handleChange}
|
||||
min={1}
|
||||
max={Object.keys(SLIDER_MARKS).length}
|
||||
|
|
|
@ -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() {
|
|||
<br />
|
||||
<div className="segment-slider">
|
||||
<Slider
|
||||
tooltipVisible
|
||||
tipFormatter={value => <SegmentToolTip value={SLIDER_COMMENTS[value]} />}
|
||||
onChange={handleChange}
|
||||
min={1}
|
||||
|
|
|
@ -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({
|
|||
</p>
|
||||
<div className="form-component">
|
||||
<Slider
|
||||
// tooltipVisible={dataState.videoPassthrough !== true}
|
||||
tipFormatter={value => `${value} ${videoBRUnit}`}
|
||||
disabled={dataState.videoPassthrough === true}
|
||||
defaultValue={dataState.videoBitrate}
|
||||
|
|
Loading…
Reference in a new issue