Added "hold" command to WebRTC
This commit is contained in:
		
							parent
							
								
									76db36dfed
								
							
						
					
					
						commit
						4a712404ed
					
				
					 1 changed files with 15 additions and 0 deletions
				
			
		|  | @ -557,6 +557,21 @@ namespace Mist{ | ||||||
|       return; |       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"){ |     if (command["type"] == "stop"){ | ||||||
|       INFO_MSG("Received stop() command."); |       INFO_MSG("Received stop() command."); | ||||||
|       myConn.close(); |       myConn.close(); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Thulinma
						Thulinma