@gbraver-burst-network/anonymous-browser-sdk 2.2.0 → 2.3.0-beta.0

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.
@@ -76,7 +76,8 @@ class LocalWebRTCRoomImpl {
76
76
  */
77
77
  waitUntilMatching() {
78
78
  return __awaiter(this, void 0, void 0, function* () {
79
- yield __classPrivateFieldGet(this, _LocalWebRTCRoomImpl_instances, "m", _LocalWebRTCRoomImpl_signaling).call(this);
79
+ const websocket = yield __classPrivateFieldGet(this, _LocalWebRTCRoomImpl_websocketConnection, "f").getOrCreate();
80
+ const signalingID = yield __classPrivateFieldGet(this, _LocalWebRTCRoomImpl_instances, "m", _LocalWebRTCRoomImpl_signaling).call(this, websocket);
80
81
  const { dataChannel } = yield __classPrivateFieldGet(this, _LocalWebRTCRoomImpl_webRTCConnection, "f").getOrCreateConnection();
81
82
  const flowID = (0, nanoid_1.nanoid)();
82
83
  const { armdozerId: guestArmdozerId, pilotId: guestPilotId } = yield (0, request_selected_player_1.requestSelectedPlayer)(dataChannel, flowID);
@@ -94,12 +95,13 @@ class LocalWebRTCRoomImpl {
94
95
  guestPlayer: battleSDK.enemy,
95
96
  update: battleSDK.initialState,
96
97
  });
98
+ yield (0, delete_signaling_channel_1.deleteSignalingChannel)({ signalingID, websocket });
97
99
  return battleSDK;
98
100
  });
99
101
  }
100
102
  }
101
103
  exports.LocalWebRTCRoomImpl = LocalWebRTCRoomImpl;
102
- _LocalWebRTCRoomImpl_spanId = new WeakMap(), _LocalWebRTCRoomImpl_webRTCConnection = new WeakMap(), _LocalWebRTCRoomImpl_websocketConnection = new WeakMap(), _LocalWebRTCRoomImpl_frontendLog = new WeakMap(), _LocalWebRTCRoomImpl_hostArmdozerId = new WeakMap(), _LocalWebRTCRoomImpl_hostPilotId = new WeakMap(), _LocalWebRTCRoomImpl_instances = new WeakSet(), _LocalWebRTCRoomImpl_signaling = function _LocalWebRTCRoomImpl_signaling() {
104
+ _LocalWebRTCRoomImpl_spanId = new WeakMap(), _LocalWebRTCRoomImpl_webRTCConnection = new WeakMap(), _LocalWebRTCRoomImpl_websocketConnection = new WeakMap(), _LocalWebRTCRoomImpl_frontendLog = new WeakMap(), _LocalWebRTCRoomImpl_hostArmdozerId = new WeakMap(), _LocalWebRTCRoomImpl_hostPilotId = new WeakMap(), _LocalWebRTCRoomImpl_instances = new WeakSet(), _LocalWebRTCRoomImpl_signaling = function _LocalWebRTCRoomImpl_signaling(websocket) {
103
105
  return __awaiter(this, void 0, void 0, function* () {
104
106
  let unSubscribers = [];
105
107
  try {
@@ -107,7 +109,6 @@ _LocalWebRTCRoomImpl_spanId = new WeakMap(), _LocalWebRTCRoomImpl_webRTCConnecti
107
109
  type: "SIGNALING_START",
108
110
  spanId: __classPrivateFieldGet(this, _LocalWebRTCRoomImpl_spanId, "f"),
109
111
  });
110
- const websocket = yield __classPrivateFieldGet(this, _LocalWebRTCRoomImpl_websocketConnection, "f").getOrCreate();
111
112
  const signalingID = yield (0, wait_until_matching_1.waitUntilMatching)(websocket);
112
113
  const { connection, dataChannel } = yield __classPrivateFieldGet(this, _LocalWebRTCRoomImpl_webRTCConnection, "f").getOrCreateConnection();
113
114
  let isRemoteDescriptionSet = false;
@@ -156,7 +157,6 @@ _LocalWebRTCRoomImpl_spanId = new WeakMap(), _LocalWebRTCRoomImpl_webRTCConnecti
156
157
  (0, wait_until_connected_1.waitUntilConnected)(connection),
157
158
  (0, wait_until_data_channel_ready_1.waitUntilDataChannelOpen)(dataChannel),
158
159
  ]);
159
- yield (0, delete_signaling_channel_1.deleteSignalingChannel)({ websocket, signalingID });
160
160
  yield __classPrivateFieldGet(this, _LocalWebRTCRoomImpl_frontendLog, "f").log({
161
161
  type: "SIGNALING_END",
162
162
  spanId: __classPrivateFieldGet(this, _LocalWebRTCRoomImpl_spanId, "f"),
@@ -169,10 +169,10 @@ _LocalWebRTCRoomImpl_spanId = new WeakMap(), _LocalWebRTCRoomImpl_webRTCConnecti
169
169
  summary: selectedLocalIceCandidateSummary,
170
170
  });
171
171
  }
172
+ return signalingID;
172
173
  }
173
174
  finally {
174
175
  unSubscribers.forEach((u) => u.unsubscribe());
175
- __classPrivateFieldGet(this, _LocalWebRTCRoomImpl_websocketConnection, "f").gracefulDisconnect();
176
176
  }
177
177
  });
178
178
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gbraver-burst-network/anonymous-browser-sdk",
3
3
  "description": "gbraver burst anonymous browser sdk",
4
- "version": "2.2.0",
4
+ "version": "2.3.0-beta.0",
5
5
  "author": "Y.Takeuchi",
6
6
  "bugs": {
7
7
  "url": "https://github.com/kaidouji85/gbraver-burst-network/issues",