teleportxr 1.0.51 → 1.0.52

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.
Files changed (2) hide show
  1. package/client/client.js +4 -2
  2. package/package.json +1 -1
package/client/client.js CHANGED
@@ -267,8 +267,10 @@ class Client {
267
267
  return;
268
268
  }
269
269
  var msg =new message.AcknowledgementMessage();
270
- var bf =data;
271
- var dataView =new DataView(data,0,data.length);
270
+ // data arrives from the WebSocket signaling channel as a Node Buffer (Uint8Array view over a pooled
271
+ // ArrayBuffer), so we must wrap its underlying buffer using byteOffset/byteLength rather than passing
272
+ // the Buffer directly to DataView.
273
+ var dataView =new DataView(data.buffer,data.byteOffset,data.byteLength);
272
274
  core.decodeFromDataView(msg,dataView,0);
273
275
  if(msg.uint64_ackId==this.currentOriginState.ackId)
274
276
  {
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "name": "teleportxr",
17
17
  "description": "Teleport Spatial Server on node.js",
18
- "version": "1.0.51",
18
+ "version": "1.0.52",
19
19
  "repository": {
20
20
  "type": "git",
21
21
  "url": "git+https://github.com/simul/teleport-nodejs.git"