@reactoo/watchtogether-sdk-js 2.6.41 → 2.6.43

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.6.41",
3
+ "version": "2.6.43",
4
4
  "description": "Javascript SDK for Reactoo",
5
5
  "main": "src/index.js",
6
6
  "unpkg": "dist/watchtogether-sdk.min.js",
@@ -200,7 +200,7 @@ class RoomSession {
200
200
  this.isStreaming = false;
201
201
 
202
202
  this._retries = 0;
203
- this._maxRetries = 3;
203
+ this._maxRetries = 5;
204
204
  this._keepAliveId = null;
205
205
  this._participants = [];
206
206
  this._roomType = 'watchparty';
@@ -440,7 +440,7 @@ class RoomSession {
440
440
 
441
441
  this._keepAliveId = setTimeout(() => {
442
442
  this._startKeepAlive();
443
- }, 30000);
443
+ }, 10000);
444
444
  }
445
445
 
446
446
  _stopKeepAlive() {
@@ -1062,6 +1062,7 @@ class RoomSession {
1062
1062
  .then(json => {
1063
1063
  this.sessionId = json["session_id"] ? json["session_id"] : json.data["id"];
1064
1064
  this._startKeepAlive();
1065
+ this._participants.map(p => this._iceRestart(p.handleId))
1065
1066
  this.isReclaiming = false;
1066
1067
  this.emit('joining', false);
1067
1068
  this._retries = 0;
@@ -1397,7 +1398,6 @@ class RoomSession {
1397
1398
  //TODO: check if this isnt fired prematurely when we switch internet connection
1398
1399
  if (config.pc.connectionState === 'failed') {
1399
1400
  this._log('connectionState failed');
1400
- this._iceRestart(handleId);
1401
1401
  }
1402
1402
  this.emit('connectionState', [handleId, handleId === this.handleId, config.pc.connectionState]);
1403
1403
  if(handleId !== this.handleId && config.pc.connectionState === 'connected') {
@@ -2314,7 +2314,7 @@ class RoomSession {
2314
2314
  reject({type: 'warning', id: 17, message: 'Connection cancelled'})
2315
2315
  }
2316
2316
 
2317
- dataChannelTimeoutId = setTimeout(_rejectTimeout, 5000);
2317
+ dataChannelTimeoutId = setTimeout(_rejectTimeout, 10000);
2318
2318
  this._abortController.signal.addEventListener('abort', _rejectAbort);
2319
2319
 
2320
2320
  this.on('dataChannel', _resolve, this);