make STREAM_NAME configurable, add admin interface for mediaserver

This commit is contained in:
Reaby committed 2020-05-13 23:27:46 +03:00
1 parent f826752ed9
commit a6fc4c6cbe
5 files changed
+14 -10

No files matched your search

+2 -3
View File
@@ -124,17 +124,16 @@ class admin {
});
socket.on('controls.startStream', function (data) {
socket.on('controls.startStream', function () {
let view = self.getView();
let serverOptions = self.getServerOptions();
if (serverOptions.isStreaming === false) {
serverOptions.loop = false;
serverOptions.streamSource = "http://" + config.serverHost + ":" + (config.serverListenPort + 1) + "/live/" + data.streamName + ".flv";
serverOptions.streamSource = "http://" + config.serverHost + ":" + (config.serverListenPort + 1) + "/live/" + config.streamKey + ".flv";
serverOptions.isStreaming = true;
cli.success("start stream");
} else {
serverOptions.loop = true;
serverOptions.isStreaming = false;
serverOptions.streamSource = "";