Added "hold" command to WebRTC

This commit is contained in:
Thulinma 2021-08-02 10:05:26 +02:00
parent 76db36dfed
commit 4a712404ed

View file

@ -557,6 +557,21 @@ namespace Mist{
return;
}
if (command["type"] == "hold") {
parseData = false;
JSON::Value commandResult;
commandResult["type"] = "on_time";
commandResult["paused"] = !parseData;
commandResult["current"] = currentTime();
commandResult["begin"] = startTime();
commandResult["end"] = endTime();
for (std::map<size_t, Comms::Users>::iterator it = userSelect.begin(); it != userSelect.end(); it++){
commandResult["tracks"].append(it->first);
}
webSock->sendFrame(commandResult.toString());
return;
}
if (command["type"] == "stop"){
INFO_MSG("Received stop() command.");
myConn.close();