teleportxr 1.0.61 → 1.0.63

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/client/client.js CHANGED
@@ -515,8 +515,10 @@ class Client {
515
515
  // the next UpdateStreaming tick without waiting for the timeout.
516
516
  return;
517
517
  }
518
- console.log("Sending node "+uid+" "+node.name+" to Client "+this.clientID+", size: "+nodeSize+" bytes");
519
- if(this.webRtcConnection.sendGeometry(view2))
518
+ const sendSuccess = this.webRtcConnection.sendGeometry(view2);
519
+ console.log("Sending node "+uid+" "+node.name+" to Client "+this.clientID+", size: "+nodeSize+" bytes — "+
520
+ (sendSuccess ? "OK" : "FAILED"));
521
+ if(sendSuccess)
520
522
  this.geometryService.EncodedResource(uid);
521
523
  }
522
524
  SendGenericResource(uid)
@@ -542,8 +544,10 @@ class Client {
542
544
  // the next UpdateStreaming tick without waiting for the timeout.
543
545
  return;
544
546
  }
545
- console.log("Sending resource "+uid+" "+resource.url+" to Client "+this.clientID+", size: "+resourceSize+" bytes");
546
- if(this.webRtcConnection.sendGeometry(view2))
547
+ const sendSuccess = this.webRtcConnection.sendGeometry(view2);
548
+ console.log("Sending resource "+uid+" "+resource.url+" to Client "+this.clientID+", size: "+resourceSize+" bytes — "+
549
+ (sendSuccess ? "OK" : "FAILED"));
550
+ if(sendSuccess)
547
551
  this.geometryService.EncodedResource(uid);
548
552
  }
549
553
  SendMesh(uid)
@@ -384,14 +384,17 @@ class WebRtcConnection extends EventEmitter
384
384
  // otherwise a dropped send leaves the resource marked Sent and it won't be
385
385
  // retried until geometry_service.timeout_us elapses (default 10 s).
386
386
  sendGeometry(buffer) {
387
- if (!this.isGeometryOpen())
387
+ if (!this.isGeometryOpen()) {
388
+ console.warn('sendGeometry called but geometry channel not open (readyState='+
389
+ (this.geometryDataChannel ? this.geometryDataChannel.readyState : 'null')+')');
388
390
  return false;
391
+ }
389
392
  try {
390
393
  this.geometryDataChannel.send(buffer);
391
394
  return true;
392
395
  }
393
396
  catch(exception) {
394
- console.error('datachannel.sendGeometry exception: '+exception.message);
397
+ console.error('sendGeometry exception: '+exception.message);
395
398
  return false;
396
399
  }
397
400
  }
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "name": "teleportxr",
18
18
  "description": "Teleport Spatial Server on node.js",
19
- "version": "1.0.61",
19
+ "version": "1.0.63",
20
20
  "repository": {
21
21
  "type": "git",
22
22
  "url": "git+https://github.com/simul/teleport-nodejs.git"