Skip to content
Snippets Groups Projects
Commit 1638c8cf authored by Jonas Blumer's avatar Jonas Blumer
Browse files

added disconnection for clearing hear the world stream when user disconnects....

added disconnection for clearing hear the world stream when user disconnects. mit bi erreneous if more than 2 clients are connected
parent 23a2aef9
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,7 @@ io.on('connection', function(socket){
io.sockets.emit('updateUserCount', Object.keys(io.engine.clients).length);
socket.on('disconnect', function(){
io.sockets.emit('updateUserCount', Object.keys(io.engine.clients).length);
io.sockets.emit('clearExternalData');
});
console.log('a user connected');
socket.on('bpm', function(newBpm){
......
......@@ -28,7 +28,10 @@ $(function(){
iosocket.on('updateExternalGrid', function(data){
//playExternalSound(data));
externalGrid = data;
});
iosocket.on('clearExternalData', function(){
externalGrid = null;
});
iosocket.on('updateUserCount', function(userCount){
......
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