From e6bc503ddea2e11652c57a9cd56b829d5b9d859d Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Wed, 12 Jun 2019 21:01:11 +0300
Subject: [PATCH] Working multi streams

---
 web-service/src/index.js | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/web-service/src/index.js b/web-service/src/index.js
index 092cd7b80..f4096ecdc 100644
--- a/web-service/src/index.js
+++ b/web-service/src/index.js
@@ -69,13 +69,11 @@ RGBDStream.prototype.pushFrames = function(rgb, depth) {
 	this.depth = depth;
 
 	for (let i=0; i < this.clients.length; i++) {
-		console.log("Push frame");
 		this.clients[i].push(this.uri, rgb, depth);
 	}
 
 	let i=0;
 	while (i < this.clients.length) {
-		console.log("TX COUNT", this.clients[i].txmax);
 		if (this.clients[i].txcount >= this.clients[i].txmax) {
 			console.log("remove client");
 			this.clients.splice(i, 1);
@@ -220,13 +218,7 @@ app.ws('/', (ws, req) => {
 		//uri_to_peer[streams[i]] = peer;
 		peer_uris[p.string_id].push(uri);
 
-		uri_data[uri] = {
-			peer: p,
-			title: "",
-			rgb: null,
-			depth: null,
-			pose: null
-		};
+		uri_data[uri] = new RGBDStream(uri, p);
 
 		broadcastExcept(p, "add_stream", uri);
 	});
-- 
GitLab