@reactoo/watchtogether-sdk-js 2.7.39 → 2.7.40

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactoo/watchtogether-sdk-js",
3
- "version": "2.7.39",
3
+ "version": "2.7.40",
4
4
  "description": "Javascript SDK for Reactoo",
5
5
  "main": "src/index.js",
6
6
  "unpkg": "dist/watchtogether-sdk.min.js",
@@ -280,7 +280,11 @@ class Iot {
280
280
  }
281
281
 
282
282
  // Find a suitable topic for the connection check
283
- const suitableTopic = Array.from(this.subscribedTopics).find(topic => topic.indexOf('user') > -1);
283
+ let suitableTopic = Array.from(this.subscribedTopics).find(topic => topic.indexOf('user') > -1);
284
+
285
+ if(!suitableTopic) {
286
+ suitableTopic = Array.from(this.subscribedTopics).find(topic => topic.indexOf('room') > -1 && topic !== 'wt/instanceroom/reactooDemo');
287
+ }
284
288
 
285
289
  if (!suitableTopic) {
286
290
  reject(new Error('No suitable topic found for connection check'));
@@ -323,7 +327,12 @@ class Iot {
323
327
  return;
324
328
  }
325
329
  // Find a suitable topic for the connection check
326
- const suitableTopic = Array.from(this.subscribedTopics).find(topic => topic.indexOf('user') > -1);
330
+ let suitableTopic = Array.from(this.subscribedTopics).find(topic => topic.indexOf('user') > -1);
331
+
332
+ if(!suitableTopic) {
333
+ suitableTopic = Array.from(this.subscribedTopics).find(topic => topic.indexOf('room') > -1 && topic !== 'wt/instanceroom/reactooDemo');
334
+ }
335
+
327
336
  if (!suitableTopic) {
328
337
  this.log('No suitable topic found for keep alive message');
329
338
  return;
@@ -2311,7 +2311,6 @@ class RoomSession {
2311
2311
  config.isIceRestarting = false;
2312
2312
  });
2313
2313
  }
2314
-
2315
2314
  }
2316
2315
 
2317
2316
  _setupTransceivers(handleId, [audioSend, audioRecv, videoSend, videoRecv, audioTransceiver = null, videoTransceiver = null]) {