Skip to content
Snippets Groups Projects
Commit e6bc503d authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Working multi streams

parent ab504be8
No related branches found
No related tags found
1 merge request!30Fixes #77 multiple ws stream clients
Pipeline #11410 passed
......@@ -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);
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment