telemersive-bus 0.0.29 → 0.4.0

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/BusManager.js CHANGED
@@ -548,17 +548,36 @@ class BusManager {
548
548
  startServerSidePortScripts = async (_roomName, _roomId) => {
549
549
  if(this.switchBoardURI !== null){
550
550
  console.log(` -> starting ports for room '${_roomName}' on range '${_roomId}000 - ${_roomId}999`);
551
- try{
552
- /** the ultragrid needs two hundert range */
553
- for (let i = 0; i < 20; i++) {
554
- await this.addSwitchBoardProxy(_roomName, _roomId * 1000 + 100 + i * 10, 'one2manyMo', "Ultragrid proxy, channel:" + i);
551
+ /** the ultragrid needs two hundert range */
552
+ for (let i = 0; i < 20; i++) {
553
+ // OSC proxies
554
+ try{
555
+ await this.addSwitchBoardProxy(_roomName,_roomId * 1000 + i * 10 + 0, 'many2manyBi', "UDP proxy for OSC, channel:" + i);
556
+ } catch(err){
557
+ console.error(` ...: ${err}. Interrupting process of starting up many2manyBi script on port ${_roomId * 1000 + i * 10 + 05}.`);
555
558
  }
556
- for (let i = 0; i < 10; i++) {
557
- await this.addSwitchBoardProxy(_roomName,_roomId * 1000 + i, 'many2manyBi', "UDP proxy, channel:" + i);
558
- await this.addSwitchBoardProxy(_roomName, _roomId * 1000 + 300 + i * 10, 'one2manyBi', "MoCap proxy, channel:" + i);
559
+ // Ultragrid video and audio proxies
560
+ try{
561
+ await this.addSwitchBoardProxy(_roomName, _roomId * 1000 + i * 10 + 2, 'one2manyMo', "Ultragrid video proxy, channel:" + i);
562
+ } catch(err){
563
+ console.error(` ...: ${err}. Interrupting process of starting up one2manyMo script on port ${_roomId * 1000 + i * 10 + 2}.`);
564
+ }
565
+ try{
566
+ await this.addSwitchBoardProxy(_roomName, _roomId * 1000 + i * 10 + 4, 'one2manyMo', "Ultragrid audio proxy, channel:" + i);
567
+ } catch(err){
568
+ console.error(` ...: ${err}. Interrupting process of starting up one2manyMo script on port ${_roomId * 1000 + i * 10 + 4}.`);
569
+ }
570
+ // NatNet2OSC and NatNetBridge proxies
571
+ try{
572
+ await this.addSwitchBoardProxy(_roomName, _roomId * 1000 + i * 10 + 6, 'one2manyMo', "NatNet-data proxy, channel:" + i);
573
+ } catch(err){
574
+ console.error(` ...: ${err}. Interrupting process of starting up one2manyMo script on port ${_roomId * 1000 + i * 10 + 6}.`);
575
+ }
576
+ try{
577
+ await this.addSwitchBoardProxy(_roomName, _roomId * 1000 + i * 10 + 8, 'one2manyBi', "MoCap/NatNet-Ctrl proxy, channel:" + i);
578
+ } catch(err){
579
+ console.error(` ...: ${err}. Interrupting process of starting up one2manyBi script on port ${_roomId * 1000 + i * 10 + 8}.`);
559
580
  }
560
- } catch(err){
561
- console.error(` ...: ${err}. Interrupting process of starting up server side scripts.`);
562
581
  }
563
582
  console.log(` <- started all ports for room ${_roomName}`);
564
583
  } else {
@@ -572,14 +591,32 @@ class BusManager {
572
591
  stopServerSidePortScripts = async (_roomName, _roomId) => {
573
592
  if(this.switchBoardURI !== null) {
574
593
  console.log(` -> stopping ports for room '${_roomName}' on range '${_roomId}000 - ${_roomId}999`);
575
- try {
576
- for (let i = 0; i < 10; i++) {
577
- await this.deleteSwitchBoardProxy(_roomId * 1000 + i);
578
- await this.deleteSwitchBoardProxy(_roomId * 1000 + 100 + i * 10);
579
- await this.deleteSwitchBoardProxy(_roomId * 1000 + 300 + i * 10);
594
+ for (let i = 0; i < 20; i++) {
595
+ try{
596
+ await this.deleteSwitchBoardProxy(_roomId * 1000 + i * 10 + 0);
597
+ } catch(err){
598
+ console.error(` ...: ${err}. Interrupting process of stopping many2manyBi script on port ${_roomId * 1000 + i * 10 + 0}.`);
599
+ }
600
+ try{
601
+ await this.deleteSwitchBoardProxy(_roomId * 1000 + i * 10 + 2);
602
+ } catch(err){
603
+ console.error(` ...: ${err}. Interrupting process of stopping one2manyMo script on port ${_roomId * 1000 + i * 10 + 2}.`);
604
+ }
605
+ try{
606
+ await this.deleteSwitchBoardProxy(_roomId * 1000 + i * 10 + 4);
607
+ } catch(err){
608
+ console.error(` ...: ${err}. Interrupting process of stopping one2manyMo script on port ${_roomId * 1000 + i * 10 + 4}.`);
609
+ }
610
+ try{
611
+ await this.deleteSwitchBoardProxy(_roomId * 1000 + i * 10 + 6);
612
+ } catch(err){
613
+ console.error(` ...: ${err}. Interrupting process of stopping one2manyMo script on port ${_roomId * 1000 + i * 10 + 6}.`);
614
+ }
615
+ try{
616
+ await this.deleteSwitchBoardProxy(_roomId * 1000 + i * 10 + 8);
617
+ } catch(err){
618
+ console.error(` ...: ${err}. Interrupting process of stopping one2manyBi script on port ${_roomId * 1000 + i * 10 + 8}.`);
580
619
  }
581
- } catch (err) {
582
- console.error(` ...: ${err}. Interrupting process of stopping server side scripts.`);
583
620
  }
584
621
  console.log(` <- stopped all ports for room ${_roomName}`);
585
622
  }else {
@@ -5,7 +5,7 @@ class Version {
5
5
  }
6
6
 
7
7
  getProtocolVersion = () => {
8
- return '3.0.0';
8
+ return '0.0.4';
9
9
  }
10
10
  }
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telemersive-bus",
3
- "version": "0.0.29",
3
+ "version": "0.4.0",
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": {