@reactoo/watchtogether-sdk-js 2.7.81 → 2.7.82

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.
@@ -222,7 +222,7 @@
222
222
  console.log('Iot message:', r);
223
223
  });
224
224
 
225
- Instance.auth.deviceLogin(true) // login as browser
225
+ Instance.auth.login('dusan1','abc123ABC') // login as browser
226
226
  .then(r => Instance.iot.iotLogin()) // login to mqtt
227
227
  .then(r => {
228
228
  if(roomId) {
@@ -527,6 +527,12 @@
527
527
  sess.sendSystemMessage('customData', {some: 'data'})
528
528
  }
529
529
 
530
+ window.testUnsetAttributesObject = function() {
531
+ Instance.room.updateAttribute({id:'boha', roomId: roomId, operation: 'setAll', attributeName:'layoutAttributes', value: {cicina:'kuchyna'}})
532
+ .then(r => console.log(r))
533
+ .catch(e => console.log(e))
534
+ }
535
+
530
536
  </script>
531
537
 
532
538
  </body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactoo/watchtogether-sdk-js",
3
- "version": "2.7.81",
3
+ "version": "2.7.82",
4
4
  "description": "Javascript SDK for Reactoo",
5
5
  "main": "dist/watchtogether-sdk.min.js",
6
6
  "module": "dist/watchtogether-sdk.min.js",
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- import {wait, getBrowserFingerprint} from "./utils";
3
+ import {getBrowserFingerprint} from "./utils";
4
4
 
5
5
  let auth = function () {
6
6
  return {
@@ -354,7 +354,7 @@ let room = function () {
354
354
  },
355
355
 
356
356
  destroySessions: () => {
357
- roomSessions.forEach(session => session.destroy().catch(e => this.log(e)));
357
+ roomSessions.forEach(session => session.destroy().catch(e => this.__privates.room._log(e)));
358
358
  roomSessions.length = 0;
359
359
  },
360
360
 
@@ -260,7 +260,7 @@ class RoomSession {
260
260
  this._aqIntervalCounter = 0;
261
261
  this._aqIntervalDivisor = 4;
262
262
  this._aqTimeoutId = null;
263
- this._sendMessageTimeout = 5000;
263
+ this._sendMessageTimeout = 10000;
264
264
  this._retries = 0;
265
265
  this._maxRetries = 5;
266
266
  this._keepAliveId = null;
@@ -498,6 +498,7 @@ class RoomSession {
498
498
  }
499
499
 
500
500
  if (this._retries < this._maxRetries) {
501
+ //TODO: clear this timeout
501
502
  setTimeout(() => {
502
503
  this._retries++;
503
504
  this._reconnect().catch(e => {