From 4a712404ed512164530ccbef2c3bfaf563d6e94e Mon Sep 17 00:00:00 2001 From: Thulinma Date: Mon, 2 Aug 2021 10:05:26 +0200 Subject: [PATCH] Added "hold" command to WebRTC --- src/output/output_webrtc.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/output/output_webrtc.cpp b/src/output/output_webrtc.cpp index aa80d38f..980efadd 100644 --- a/src/output/output_webrtc.cpp +++ b/src/output/output_webrtc.cpp @@ -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::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();