teleportxr 1.0.11 → 1.0.12

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.
@@ -77,9 +77,7 @@ class WebRtcConnection extends EventEmitter
77
77
  reconnect()
78
78
  {
79
79
  this.peerConnection =new DefaultRTCPeerConnection({ sdpSemantics: 'unified-plan'});
80
-
81
80
  this.beforeOffer();
82
-
83
81
  let connectionTimer = this.options.setTimeout(() =>
84
82
  {
85
83
  if (this.peerConnection.iceConnectionState !== 'connected'
@@ -215,12 +213,15 @@ class WebRtcConnection extends EventEmitter
215
213
  };
216
214
  this.applyRemoteCandidate = async(candidate_txt,mid,mlineindex)=>
217
215
  {
218
- console.log("received remote candidate.");
219
- this.peerConnection.addIceCandidate(new wrtc.RTCIceCandidate({
216
+ console.log("received remote candidate: "+candidate_txt);
217
+ const ice=new wrtc.RTCIceCandidate({
220
218
  candidate: candidate_txt,
221
219
  sdpMLineIndex: mlineindex,
222
220
  sdpMid: mid
223
- }));
221
+ });
222
+ this.peerConnection.addIceCandidate(ice).catch((e)=>{
223
+ console.log(`Failure during addIceCandidate(): ${e.name}`);
224
+ });
224
225
  };
225
226
  this.close = () =>
226
227
  {
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.11",
16
+ "version": "1.0.12",
17
17
  "repository": {
18
18
  "type": "git",
19
19
  "url": "git+https://github.com/simul/teleport-nodejs.git"