Browse Source

Prettified Code!

pull/1886/head
gabek 5 years ago committed by GitHub Action
parent
commit
259ac676ff
  1. 23
      web/components/config/video-variant-form.tsx
  2. 6
      web/pages/config-video.tsx
  3. 9
      web/styles/config-video-variants.scss

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

@ -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,8 +183,9 @@ 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>
<p className="description">{VIDEO_VARIANT_DEFAULTS.videoBitrate.tip}</p> <p className="description">{VIDEO_VARIANT_DEFAULTS.videoBitrate.tip}</p>
@ -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>

6
web/pages/config-video.tsx

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

9
web/styles/config-video-variants.scss

@ -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,11 +33,11 @@
justify-content: center; justify-content: center;
} }
.delete-button { .delete-button {
margin-left: .5em; margin-left: 0.5em;
opacity: .8; opacity: 0.8;
} }
} }
.read-more-subtext { .read-more-subtext {
font-size: 0.8rem; font-size: 0.8rem;
} }

Loading…
Cancel
Save