Enable RTMP and SRT controls based on availability

This commit is contained in:
Ingo Oppermann 2022-07-07 15:24:03 +02:00
parent cfde8db58b
commit ad91c38d5a
No known key found for this signature in database
GPG Key ID: 2AB32426E9DD229E
2 changed files with 16 additions and 4 deletions

View File

@ -37,9 +37,15 @@ export default function Control(props) {
};
return (
<Grid container spacing={2}>
{!props.enabled && (
<Grid item xs={12}>
<Typography>
<Trans>RTMP server is not enabled</Trans>
</Typography>
</Grid>
)}
<Grid item xs={12}>
{/* Todo: Check availability with props.enabled */}
<Checkbox label={<Trans>Enable</Trans>} checked={settings.enable} onChange={handleChange('enable')} />
<Checkbox label={<Trans>Enable</Trans>} checked={settings.enable} disabled={!props.enabled} onChange={handleChange('enable')} />
<Typography variant="caption">
<Trans>Make the channel available as an RTMP stream.</Trans>
</Typography>

View File

@ -37,9 +37,15 @@ export default function Control(props) {
};
return (
<Grid container spacing={2}>
{!props.enabled && (
<Grid item xs={12}>
<Typography>
<Trans>SRT server is not enabled</Trans>
</Typography>
</Grid>
)}
<Grid item xs={12}>
{/* Todo: Check availability with props.enabled */}
<Checkbox label={<Trans>Enable</Trans>} checked={settings.enable} onChange={handleChange('enable')} />
<Checkbox label={<Trans>Enable</Trans>} checked={settings.enable} disabled={!props.enabled} onChange={handleChange('enable')} />
<Typography variant="caption">
<Trans>Make the channel available as an SRT stream.</Trans>
</Typography>