Prettified Code!

This commit is contained in:
gabek 2021-02-21 00:09:40 +00:00 committed by GitHub Action
parent 03df7fecba
commit 7da9a4dd08
3 changed files with 25 additions and 11 deletions

View File

@ -49,8 +49,8 @@ export default function CPUUsageSelector({ defaultValue, disabled, onChange }: P
return 'CPU usage selection is disabled when Video Passthrough is enabled.'; return 'CPU usage selection is disabled when Video Passthrough is enabled.';
} }
return TOOLTIPS[selectedOption] return TOOLTIPS[selectedOption];
} };
return ( return (
<div className="config-video-cpu-container"> <div className="config-video-cpu-container">

View File

@ -228,10 +228,12 @@ export default function VideoVariantForm({
<div className="form-module resolution-module"> <div className="form-module resolution-module">
<Typography.Title level={3}>Resolution</Typography.Title> <Typography.Title level={3}>Resolution</Typography.Title>
<p className="description"> <p className="description">
Resizing your content will take additional resources on your server. If you wish to Resizing your content will take additional resources on your server. If you wish
optionally resize your content for this stream output then you should either set the to optionally resize your content for this stream output then you should either
width <strong>or</strong> the height to keep your aspect ratio.{' '} set the width <strong>or</strong> the height to keep your aspect ratio.{' '}
<a href="https://owncast.online/docs/video/#resolution">Read more about resolutions.</a> <a href="https://owncast.online/docs/video/#resolution">
Read more about resolutions.
</a>
</p> </p>
<br /> <br />
<TextField <TextField
@ -255,9 +257,19 @@ export default function VideoVariantForm({
<div className="form-module video-passthroug-module"> <div className="form-module video-passthroug-module">
<Typography.Title level={3}>Video Passthrough</Typography.Title> <Typography.Title level={3}>Video Passthrough</Typography.Title>
<p className="description"> <p className="description">
<p>Enabling video passthrough may allow for less hardware utilization, but may also make your stream <strong>unplayable</strong>.</p> <p>
<p>All other settings for this stream output will be disabled if passthrough is used.</p> Enabling video passthrough may allow for less hardware utilization, but may also
<p><a href="https://owncast.online/docs/video/#video-passthrough">Read the documentation before enabling, as it impacts your stream.</a></p> make your stream <strong>unplayable</strong>.
</p>
<p>
All other settings for this stream output will be disabled if passthrough is
used.
</p>
<p>
<a href="https://owncast.online/docs/video/#video-passthrough">
Read the documentation before enabling, as it impacts your stream.
</a>
</p>
</p> </p>
<Popconfirm <Popconfirm
disabled={dataState.videoPassthrough === true} disabled={dataState.videoPassthrough === true}

View File

@ -135,14 +135,16 @@ export default function CurrentVariantsTable() {
title: 'Video bitrate', title: 'Video bitrate',
dataIndex: 'videoBitrate', dataIndex: 'videoBitrate',
key: 'videoBitrate', key: 'videoBitrate',
render: (bitrate: number, variant: VideoVariant) => (!bitrate || variant.videoPassthrough ? 'Same as source' : `${bitrate} kbps`), render: (bitrate: number, variant: VideoVariant) =>
!bitrate || variant.videoPassthrough ? 'Same as source' : `${bitrate} kbps`,
}, },
{ {
title: 'CPU Usage', title: 'CPU Usage',
dataIndex: 'cpuUsageLevel', dataIndex: 'cpuUsageLevel',
key: 'cpuUsageLevel', key: 'cpuUsageLevel',
render: (level: string, variant: VideoVariant) => (!level || variant.videoPassthrough ? 'n/a' : CPU_USAGE_LEVEL_MAP[level]), render: (level: string, variant: VideoVariant) =>
!level || variant.videoPassthrough ? 'n/a' : CPU_USAGE_LEVEL_MAP[level],
}, },
{ {
title: '', title: '',