teleportxr 1.0.52 → 1.0.55
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 +7 -3
- package/package.json +1 -1
package/client/client.js
CHANGED
|
@@ -255,8 +255,10 @@ class Client {
|
|
|
255
255
|
//! disconnecting, or when the server determines that the client is lost or needs to be booted.
|
|
256
256
|
StopStreaming()
|
|
257
257
|
{
|
|
258
|
-
this.webRtcConnectionManager
|
|
258
|
+
if(this.webRtcConnectionManager)
|
|
259
|
+
this.webRtcConnectionManager.destroyConnection(this.clientID);
|
|
259
260
|
this.webRtcConnection=null;
|
|
261
|
+
this.webRtcConnectionManager=null;
|
|
260
262
|
}
|
|
261
263
|
// Generic message acknowledgement. Certain kinds of message are expected to be ack'ed.
|
|
262
264
|
ReceiveAcknowledgement(data)
|
|
@@ -559,9 +561,11 @@ class Client {
|
|
|
559
561
|
console.log("Handshake claims to have "<<handshakeMessage.uint64_resourceCount<<" resources but has only enough data for "+numReceived);
|
|
560
562
|
}
|
|
561
563
|
else {
|
|
564
|
+
// Wrap the Node Buffer correctly: use its underlying ArrayBuffer together with
|
|
565
|
+
// byteOffset (Buffers may share a pooled ArrayBuffer, so offset 0 is wrong).
|
|
566
|
+
var dataView =new DataView(data.buffer, data.byteOffset, data.byteLength);
|
|
562
567
|
var offset =message.HandshakeMessage.sizeof();
|
|
563
|
-
|
|
564
|
-
for(let i=0;i<this.handshakeMessage.resourceCount;i++ ) {
|
|
568
|
+
for(let i=0;i<handshakeMessage.uint64_resourceCount;i++ ) {
|
|
565
569
|
var uid=dataView.getBigUint64(offset,core.endian);
|
|
566
570
|
this.geometryService.ConfirmResource(uid);
|
|
567
571
|
offset+=core.UID_SIZE;
|
package/package.json
CHANGED