Add warning if process depends on disabled RTMP/SRT server
This commit is contained in:
parent
9e5a9dd8aa
commit
a55924d28c
@ -2798,11 +2798,19 @@ class Restreamer {
|
||||
p.state.progress.outputs[i].address = replace(p.state.progress.outputs[i].address);
|
||||
}
|
||||
|
||||
if (!p.state.command) {
|
||||
p.state.command = [];
|
||||
}
|
||||
|
||||
p.state.command = p.state.command.map(replace);
|
||||
p.state.last_logline = replace(p.state.last_logline);
|
||||
}
|
||||
|
||||
if (p.report) {
|
||||
if (!p.report.prelude) {
|
||||
p.report.prelude = [];
|
||||
}
|
||||
|
||||
p.report.prelude = p.report.prelude.map(replace);
|
||||
p.report.log = p.report.log.map((l) => [l[0], replace(l[1])]);
|
||||
|
||||
@ -2812,10 +2820,6 @@ class Restreamer {
|
||||
}
|
||||
}
|
||||
|
||||
if (p.service) {
|
||||
p.service.token = replace(p.service.token);
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
@ -79,6 +79,7 @@ export default function Main(props) {
|
||||
open: false,
|
||||
data: '',
|
||||
});
|
||||
const [$config, setConfig] = React.useState(null);
|
||||
|
||||
const navigate = useNavigate();
|
||||
const address = props.restreamer.Address() + '/';
|
||||
@ -96,7 +97,10 @@ export default function Main(props) {
|
||||
}, []);
|
||||
|
||||
const load = async () => {
|
||||
let metadata = await props.restreamer.GetIngestMetadata(_channelid);
|
||||
const config = props.restreamer.ConfigActive();
|
||||
setConfig(config);
|
||||
|
||||
const metadata = await props.restreamer.GetIngestMetadata(_channelid);
|
||||
if (metadata.version && metadata.version === 1) {
|
||||
setMetadata({
|
||||
...$metadata,
|
||||
@ -141,6 +145,14 @@ export default function Main(props) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!$config.source.network.rtmp.enabled && $metadata.control.rtmp.enable) {
|
||||
state.state = 'error';
|
||||
state.progress.error = 'RTMP server is not enabled, but required.';
|
||||
} else if (!$config.source.network.srt.enabled && $metadata.control.srt.enable) {
|
||||
state.state = 'error';
|
||||
state.progress.error = 'SRT server is not enabled, but required.';
|
||||
}
|
||||
|
||||
setState({
|
||||
...$state,
|
||||
...state,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user