telemersive-bus 0.4.0 → 0.5.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 +12 -22
- package/lib/utils/version.js +1 -1
- package/package.json +1 -1
package/lib/BusManager.js
CHANGED
|
@@ -552,31 +552,26 @@ class BusManager {
|
|
|
552
552
|
for (let i = 0; i < 20; i++) {
|
|
553
553
|
// OSC proxies
|
|
554
554
|
try{
|
|
555
|
-
await this.addSwitchBoardProxy(_roomName,_roomId * 1000 + i * 10 +
|
|
555
|
+
await this.addSwitchBoardProxy(_roomName,_roomId * 1000 + i * 10 + 9, _roomId * 1000 + i * 10 + 9, 'many2manyBi', "UDP proxy for OSC, channel:" + i);
|
|
556
556
|
} catch(err){
|
|
557
|
-
console.error(` ...: ${err}. Interrupting process of starting up many2manyBi script on port ${_roomId * 1000 + i * 10 +
|
|
557
|
+
console.error(` ...: ${err}. Interrupting process of starting up many2manyBi script on port ${_roomId * 1000 + i * 10 + 9}.`);
|
|
558
558
|
}
|
|
559
559
|
// Ultragrid video and audio proxies
|
|
560
560
|
try{
|
|
561
|
-
await this.addSwitchBoardProxy(_roomName, _roomId * 1000 + i * 10 + 2, 'one2manyMo', "Ultragrid
|
|
561
|
+
await this.addSwitchBoardProxy(_roomName, _roomId * 1000 + i * 10 + 2, _roomId * 1000 + i * 10 + 6,'one2manyMo', "Ultragrid-video proxy, channel:" + i);
|
|
562
562
|
} catch(err){
|
|
563
563
|
console.error(` ...: ${err}. Interrupting process of starting up one2manyMo script on port ${_roomId * 1000 + i * 10 + 2}.`);
|
|
564
564
|
}
|
|
565
565
|
try{
|
|
566
|
-
await this.addSwitchBoardProxy(_roomName, _roomId * 1000 + i * 10 + 4, 'one2manyMo', "Ultragrid
|
|
566
|
+
await this.addSwitchBoardProxy(_roomName, _roomId * 1000 + i * 10 + 4, _roomId * 1000 + i * 10 + 8, 'one2manyMo', "Ultragrid-audio / NatNet-data proxy, channel:" + i);
|
|
567
567
|
} catch(err){
|
|
568
568
|
console.error(` ...: ${err}. Interrupting process of starting up one2manyMo script on port ${_roomId * 1000 + i * 10 + 4}.`);
|
|
569
569
|
}
|
|
570
570
|
// NatNet2OSC and NatNetBridge proxies
|
|
571
571
|
try{
|
|
572
|
-
await this.addSwitchBoardProxy(_roomName, _roomId * 1000 + i * 10 +
|
|
572
|
+
await this.addSwitchBoardProxy(_roomName, _roomId * 1000 + i * 10 + 0, _roomId * 1000 + i * 10 + 1, 'one2manyBi', "MoCap/NatNet-Ctrl proxy, channel:" + i);
|
|
573
573
|
} catch(err){
|
|
574
|
-
console.error(` ...: ${err}. Interrupting process of starting up
|
|
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}.`);
|
|
574
|
+
console.error(` ...: ${err}. Interrupting process of starting up one2manyBi script on port ${_roomId * 1000 + i * 10 + 0}.`);
|
|
580
575
|
}
|
|
581
576
|
}
|
|
582
577
|
console.log(` <- started all ports for room ${_roomName}`);
|
|
@@ -593,9 +588,9 @@ class BusManager {
|
|
|
593
588
|
console.log(` -> stopping ports for room '${_roomName}' on range '${_roomId}000 - ${_roomId}999`);
|
|
594
589
|
for (let i = 0; i < 20; i++) {
|
|
595
590
|
try{
|
|
596
|
-
await this.deleteSwitchBoardProxy(_roomId * 1000 + i * 10 +
|
|
591
|
+
await this.deleteSwitchBoardProxy(_roomId * 1000 + i * 10 + 9);
|
|
597
592
|
} catch(err){
|
|
598
|
-
console.error(` ...: ${err}. Interrupting process of stopping many2manyBi script on port ${_roomId * 1000 + i * 10 +
|
|
593
|
+
console.error(` ...: ${err}. Interrupting process of stopping many2manyBi script on port ${_roomId * 1000 + i * 10 + 9}.`);
|
|
599
594
|
}
|
|
600
595
|
try{
|
|
601
596
|
await this.deleteSwitchBoardProxy(_roomId * 1000 + i * 10 + 2);
|
|
@@ -608,14 +603,9 @@ class BusManager {
|
|
|
608
603
|
console.error(` ...: ${err}. Interrupting process of stopping one2manyMo script on port ${_roomId * 1000 + i * 10 + 4}.`);
|
|
609
604
|
}
|
|
610
605
|
try{
|
|
611
|
-
await this.deleteSwitchBoardProxy(_roomId * 1000 + i * 10 +
|
|
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);
|
|
606
|
+
await this.deleteSwitchBoardProxy(_roomId * 1000 + i * 10 + 0);
|
|
617
607
|
} catch(err){
|
|
618
|
-
console.error(` ...: ${err}. Interrupting process of stopping one2manyBi script on port ${_roomId * 1000 + i * 10 +
|
|
608
|
+
console.error(` ...: ${err}. Interrupting process of stopping one2manyBi script on port ${_roomId * 1000 + i * 10 + 0}.`);
|
|
619
609
|
}
|
|
620
610
|
}
|
|
621
611
|
console.log(` <- stopped all ports for room ${_roomName}`);
|
|
@@ -627,9 +617,9 @@ class BusManager {
|
|
|
627
617
|
/**
|
|
628
618
|
* start individual server side port proxy
|
|
629
619
|
*/
|
|
630
|
-
addSwitchBoardProxy = async (_room, _port, _type, _description) => {
|
|
620
|
+
addSwitchBoardProxy = async (_room, _port, _many_port, _type, _description) => {
|
|
631
621
|
try {
|
|
632
|
-
let payload = { room: _room, port: _port, type: _type, description: _description };
|
|
622
|
+
let payload = { room: _room, port: _port, many_port: _many_port, type: _type, description: _description };
|
|
633
623
|
await superagent.post(this.switchBoardURI).send(payload).then(res => {
|
|
634
624
|
|
|
635
625
|
});
|
package/lib/utils/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "telemersive-bus",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.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": {
|