Browse Source

Prettified Code!

pull/1886/head
gabek 5 years ago committed by GitHub Action
parent
commit
7da9a4dd08
  1. 4
      web/components/config/cpu-usage.tsx
  2. 26
      web/components/config/video-variant-form.tsx
  3. 6
      web/components/config/video-variants-table.tsx

4
web/components/config/cpu-usage.tsx

@ -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">

26
web/components/config/video-variant-form.tsx

@ -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}

6
web/components/config/video-variants-table.tsx

@ -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: '',

Loading…
Cancel
Save