LSP: stop_sessions when editing a stream

This commit is contained in:
cat 2016-09-21 15:57:02 +02:00 committed by Thulinma
parent 80bd99de44
commit 5501c67b49
2 changed files with 103 additions and 89 deletions

View file

@ -2582,6 +2582,14 @@ var UI = {
}
$inputoptions.append(UI.buildUI(build));
}
},{
label: 'Stop sessions',
type: 'checkbox',
help: 'When saving these stream settings, kill this stream\'s current connections.',
pointer: {
main: saveas,
index: 'stop_sessions'
}
},$('<br>'),{
type: 'custom',
custom: $inputoptions
@ -2656,6 +2664,11 @@ var UI = {
else {
send.streams = mist.data.streams;
}
if ((saveas.stop_sessions) && (other != '')) {
send.stop_sessions = other;
delete saveas.stop_sessions;
}
mist.send(function(){
delete mist.data.streams[saveas.name].online;
delete mist.data.streams[saveas.name].error;