telemersive-bus 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/utils/Peer.js CHANGED
@@ -270,6 +270,10 @@ class Peer {
270
270
  if(this.peerName === _message.peerName){
271
271
  this.bubbleUpCallback('bus', [ 'warning', 'peer', `another peer is using the same name: '${this.peerName}'`]);
272
272
  }
273
+
274
+ let currentPeer = this.peers[_message.peerId];
275
+ this.bubbleUpCallback('bus', [ 'peers', 'remote', 'joined', currentPeer.peerName, currentPeer.peerId, currentPeer.localIpV4, currentPeer.publicIpV4])
276
+
273
277
  this.updatePeerListMessage();
274
278
  }
275
279
  };
@@ -286,6 +290,10 @@ class Peer {
286
290
 
287
291
  if(this.peers[_message.peerId] != null){
288
292
  console.log(` --> remote peer '${_message.peerName}' - ${_message.peerId} left room`);
293
+
294
+ let currentPeer = this.peers[_message.peerId];
295
+ this.bubbleUpCallback('bus', [ 'peers', 'remote', 'left', currentPeer.peerName, currentPeer.peerId])
296
+
289
297
  delete this.peers[_message.peerId];
290
298
  this.updatePeerListMessage();
291
299
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telemersive-bus",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "MQTT based data protocol to manage unlimited peers, connected by rooms, where all peers joined to a room can exchange private data. It provides a simple chat mechanism, latency pinging, publish-subscribe mechanism (based on mqtt) and a OSC-like data stream. ",
5
5
  "main": "index.js",
6
6
  "directories": {