Mod improves display of progress data

This commit is contained in:
Jan Stabenow 2022-11-07 17:29:34 +01:00
parent 44f7377669
commit 0edf69ed7c
No known key found for this signature in database
GPG Key ID: 9C22DD65A9AAF133
3 changed files with 15 additions and 12 deletions

View File

@ -5,8 +5,9 @@
- Add `fps_mode` to x264, x265, vp9 encoder
- Add scale filter to non-hwaccel encoders
- Add PeerTube and Media Network to publication services (plattforms, software)
- Mod simplifies the setup of Restreamer-to-Restreamer connections
- Add reset button to hide a player logo (datarhei/restreamer#431)
- Mod improves display of progress data
- Mod simplifies the setup of Restreamer-to-Restreamer connections
- Mod adds Istafeed.me as StreamKey service to Instagram's publishing service
- Mod renames "Low delay" to "Low latency (buffer)" and set false as default (requires more feedback)
- Fix videojs-overlay logo size (datarhei/restreamer#431)

View File

@ -57,7 +57,7 @@ export default function Progress(props) {
<Grid item xs={12}>
<Typography variant="h4">
<strong>
<Number value={Math.round(progress.fps)} />
<Number value={progress.fps} digits={2} minDigits={2} />
</strong>
</Typography>
<Typography variant="body2" gutterBottom>
@ -70,7 +70,7 @@ export default function Progress(props) {
<Grid item xs={12}>
<Typography variant="h4">
<strong>
<Number value={progress.bitrate} minDigits={2} />
<Number value={progress.bitrate} digits={2} minDigits={2} />
</strong>
</Typography>
<Typography variant="body2" gutterBottom>
@ -83,7 +83,7 @@ export default function Progress(props) {
<Grid item xs={12}>
<Typography variant="h4">
<strong>
<Number value={progress.q} digits={2} />
<Number value={progress.q} digits={2} minDigits={2} />
</strong>
</Typography>
<Typography variant="body2" gutterBottom>
@ -96,7 +96,7 @@ export default function Progress(props) {
<Grid item xs={12}>
<Typography variant="h4">
<strong>
<Number value={progress.speed} minDigits={2} />
<Number value={progress.speed} digits={2} minDigits={2} />
</strong>
</Typography>
<Typography variant="body2" gutterBottom>
@ -108,7 +108,9 @@ export default function Progress(props) {
</Grid>
<Grid item xs={12}>
<Typography variant="h4">
<strong>{!isNaN(Math.round((props.drop * 100) / props.frames)) || 0}%</strong>
<strong>
<Number value={!isNaN((props.drop * 100) / props.frames) || 0} digits={2} minDigits={2} />%
</strong>
</Typography>
<Typography variant="body2" gutterBottom>
<Trans>Frame drops</Trans>
@ -120,7 +122,7 @@ export default function Progress(props) {
<Grid item xs={12}>
<Typography variant="h4">
<strong>
<Number value={Math.round(progress.dup)} />
<Number value={progress.dup} digits={2} minDigits={2} />
</strong>
</Typography>
<Typography variant="body2" gutterBottom>

View File

@ -10,8 +10,8 @@ import Palette from '../../theme/base/palette';
export default function Progress(props) {
const uptime = props.progress.time;
const bitrate = props.progress.bitrate.toFixed(2);
const fps = Math.round(props.progress.fps);
const bitrate = props.progress.bitrate;
const fps = props.progress.fps;
const speed = props.progress.speed;
const valueStyle = {
@ -40,7 +40,7 @@ export default function Progress(props) {
...divStyle,
};
if (fps && (fps < 10 || speed < 1.0)) {
if (fps && uptime > 30 && (fps < 10 || speed < 0.99 || speed > 1.01)) {
fpsStyle.backgroundColor = Palette.background.box_danger;
} else {
fpsStyle.backgroundColor = Palette.background.box_default;
@ -61,7 +61,7 @@ export default function Progress(props) {
<Grid item xs={4}>
<div style={bitrateStyle}>
<Typography variant="body1" style={valueStyle}>
<Number value={bitrate} minDigits={2} />
<Number value={bitrate} digits={0} />
</Typography>
<Typography variant="body2">
<Trans>kbit/s</Trans>
@ -71,7 +71,7 @@ export default function Progress(props) {
<Grid item xs={4}>
<div style={fpsStyle}>
<Typography variant="body1" style={valueStyle}>
<Number value={fps} digits={2} />
<Number value={fps} digits={0} />
</Typography>
<Typography variant="body2">
<Trans>FPS</Trans>