teleportxr 1.0.12 → 1.0.14

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.
@@ -4,7 +4,7 @@ const EventEmitter = require('events');
4
4
  const wrtc =require('@roamhq/wrtc');
5
5
  const DefaultRTCPeerConnection = require('@roamhq/wrtc').RTCPeerConnection;
6
6
 
7
- const TIME_TO_CONNECTED = 10000;
7
+ const TIME_TO_CONNECTED = 30000;
8
8
  const TIME_TO_HOST_CANDIDATES = 3000; // NOTE: Too long.
9
9
  const TIME_TO_RECONNECTED = 1000;
10
10
 
@@ -83,6 +83,7 @@ class WebRtcConnection extends EventEmitter
83
83
  if (this.peerConnection.iceConnectionState !== 'connected'
84
84
  && this.peerConnection.iceConnectionState !== 'completed')
85
85
  {
86
+ console.log("WebRtcConnection timeout, this.peerConnection.iceConnectionState = "+this.peerConnection.iceConnectionState);
86
87
  this.close();
87
88
  }
88
89
  }, this.options.timeToConnected);
@@ -190,8 +191,9 @@ class WebRtcConnection extends EventEmitter
190
191
  await this.waitUntilIceGatheringStateComplete(this.peerConnection, this.options);
191
192
  } catch (error)
192
193
  {
193
- console.error(error.toString());
194
+ console.error("doOffer error: "+error.toString());
194
195
  this.close();
196
+ console.log("doOffer close");
195
197
  throw error;
196
198
  }
197
199
  };
@@ -205,6 +207,7 @@ class WebRtcConnection extends EventEmitter
205
207
  escapedStr=escapedStr.replaceAll('\n','\\n');
206
208
  } catch(error)
207
209
  {
210
+ console.error("applyAnswer error: "+error.toString());
208
211
  }
209
212
  var sessionDescription=new wrtc.RTCSessionDescription();
210
213
  sessionDescription.sdp=answer;
@@ -225,6 +228,7 @@ class WebRtcConnection extends EventEmitter
225
228
  };
226
229
  this.close = () =>
227
230
  {
231
+ console.log("WebRtcConnection.close()");
228
232
  this.peerConnection.removeEventListener('iceconnectionstatechange', onIceConnectionStateChange);
229
233
  if (connectionTimer)
230
234
  {
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "name": "teleportxr",
15
15
  "description": "Teleport Spatial Server on node.js",
16
- "version": "1.0.12",
16
+ "version": "1.0.14",
17
17
  "repository": {
18
18
  "type": "git",
19
19
  "url": "git+https://github.com/simul/teleport-nodejs.git"