Prettified Code!

This commit is contained in:
gabek
2021-02-15 22:09:34 +00:00
committed by GitHub Action
parent ee5e462c59
commit 259ac676ff
3 changed files with 23 additions and 15 deletions

View File

@@ -16,7 +16,8 @@ const VIDEO_VARIANT_DEFAULTS = {
defaultValue: 24, defaultValue: 24,
unit: 'fps', unit: 'fps',
incrementBy: null, incrementBy: null,
tip: 'Reducing your framerate will decrease the amount of video that needs to be encoded and sent to your viewers, saving CPU and bandwidth at the expense of smoothness. A lower value is generally is fine for most content.', tip:
'Reducing your framerate will decrease the amount of video that needs to be encoded and sent to your viewers, saving CPU and bandwidth at the expense of smoothness. A lower value is generally is fine for most content.',
}, },
videoBitrate: { videoBitrate: {
min: 600, min: 600,
@@ -150,7 +151,8 @@ export default function VideoVariantForm({
return ( return (
<div className="config-variant-form"> <div className="config-variant-form">
<p className="description"> <p className="description">
<a href="https://owncast.online/docs/video">Learn more</a> about how each of these settings can impact the performance of your server. <a href="https://owncast.online/docs/video">Learn more</a> about how each of these settings
can impact the performance of your server.
</p> </p>
<Row gutter={16}> <Row gutter={16}>
@@ -161,7 +163,9 @@ export default function VideoVariantForm({
defaultValue={dataState.cpuUsageLevel} defaultValue={dataState.cpuUsageLevel}
onChange={handleVideoCpuUsageLevelChange} onChange={handleVideoCpuUsageLevelChange}
/> />
<p className="read-more-subtext"><a href="https://owncast.online/docs/video/#cpu-usage">Read more about CPU usage.</a></p> <p className="read-more-subtext">
<a href="https://owncast.online/docs/video/#cpu-usage">Read more about CPU usage.</a>
</p>
</div> </div>
{/* VIDEO PASSTHROUGH FIELD - currently disabled */} {/* VIDEO PASSTHROUGH FIELD - currently disabled */}
@@ -179,7 +183,8 @@ export default function VideoVariantForm({
<Col sm={24} md={12}> <Col sm={24} md={12}>
{/* VIDEO BITRATE FIELD */} {/* VIDEO BITRATE FIELD */}
<div <div
className={`form-module bitrate-container ${dataState.videoPassthrough ? 'disabled' : '' className={`form-module bitrate-container ${
dataState.videoPassthrough ? 'disabled' : ''
}`} }`}
> >
<Typography.Title level={3}>Video Bitrate</Typography.Title> <Typography.Title level={3}>Video Bitrate</Typography.Title>
@@ -198,7 +203,9 @@ export default function VideoVariantForm({
/> />
<p className="selected-value-note">{selectedVideoBRnote()}</p> <p className="selected-value-note">{selectedVideoBRnote()}</p>
</div> </div>
<p className="read-more-subtext"><a href="https://owncast.online/docs/video/#bitrate">Read more about bitrates.</a></p> <p className="read-more-subtext">
<a href="https://owncast.online/docs/video/#bitrate">Read more about bitrates.</a>
</p>
</div> </div>
</Col> </Col>
</Row> </Row>
@@ -241,7 +248,9 @@ export default function VideoVariantForm({
/> />
<p className="selected-value-note">{selectedFramerateNote()}</p> <p className="selected-value-note">{selectedFramerateNote()}</p>
</div> </div>
<p className="read-more-subtext"><a href="https://owncast.online/docs/video/#framerate">Read more about framerates.</a></p> <p className="read-more-subtext">
<a href="https://owncast.online/docs/video/#framerate">Read more about framerates.</a>
</p>
</div> </div>
</Panel> </Panel>
</Collapse> </Collapse>

View File

@@ -12,8 +12,10 @@ export default function ConfigVideoSettings() {
<Title>Video configuration</Title> <Title>Video configuration</Title>
<p className="description"> <p className="description">
Before changing your video configuration{' '} Before changing your video configuration{' '}
<a href="https://owncast.online/docs/video">visit the video documentation</a> to learn <a href="https://owncast.online/docs/video">visit the video documentation</a> to learn how
how it impacts your stream performance. The general rule is to start conservatively by having one middle quality stream output variant and experiment with adding more of varied qualities. it impacts your stream performance. The general rule is to start conservatively by having
one middle quality stream output variant and experiment with adding more of varied
qualities.
</p> </p>
<Row gutter={[16, 16]}> <Row gutter={[16, 16]}>

View File

@@ -1,7 +1,6 @@
// styles for Video variant editor (table + modal) // styles for Video variant editor (table + modal)
.config-video-variants { .config-video-variants {
.variants-table { .variants-table {
margin-top: 2em; margin-top: 2em;
} }
@@ -9,7 +8,6 @@
.variants-table-module { .variants-table-module {
min-width: 400px; min-width: 400px;
} }
} }
// modal content // modal content
@@ -28,7 +26,6 @@
} }
} }
.variants-table { .variants-table {
.actions { .actions {
display: flex; display: flex;
@@ -36,8 +33,8 @@
justify-content: center; justify-content: center;
} }
.delete-button { .delete-button {
margin-left: .5em; margin-left: 0.5em;
opacity: .8; opacity: 0.8;
} }
} }