@reactoo/watchtogether-sdk-js 2.7.14 → 2.7.16

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.
@@ -32,8 +32,8 @@
32
32
 
33
33
  //https://studio.reactoo.com/room/edf441b3-7415-49c4-9557-273cb93bc746/LJj4W2Cz-nG3U-lb0R-TAaY-o7Thmb8xHSbE
34
34
 
35
- let roomId = "c22ada04-6c95-4524-91d8-e915bcef2e61"; // It will create room automatically if not set
36
- let pinHash = "OayoOVzK-XmWr-BTID-fVwH-eH44Tn3xSWeR";// '967ca05f-7fab-a205-5913-39393bbbe923';
35
+ let roomId = "8cd6d475-629e-4fe7-b89e-ca480940b02e"; // It will create room automatically if not set
36
+ let pinHash = null//"OayoOVzK-XmWr-BTID-fVwH-eH44Tn3xSWeR";// '967ca05f-7fab-a205-5913-39393bbbe923';
37
37
 
38
38
  let participants = document.querySelector('.participants');
39
39
  var video = document.querySelector('.contentVideo');
@@ -199,7 +199,7 @@
199
199
  console.log('Iot message:', r);
200
200
  });
201
201
 
202
- Instance.auth.deviceLogin(true) // login as browser
202
+ Instance.auth.providerLogin('observer', 'TPpHTkLL8lfzvFZ4JRww7w6A1pD1h5b~hZDthaj3me9i0jY4AX9ehKv1oVfOa7uKZiHiVzyjfc~RVK_Q~ZG0kui9UAyQR8pJD3P5LCLOAMngnjeU2kIt9io70rbdDg--') // login as browser
203
203
  .then(r => Instance.iot.iotLogin()) // login to mqtt
204
204
  .then(r => {
205
205
  if(roomId) {
@@ -224,7 +224,7 @@
224
224
  return r.data;
225
225
  })
226
226
  })
227
- .then(r => Instance.room.createSession({constructId, roomId:r.roomId, pinHash: r.pinHash, role:'participant', options: {
227
+ .then(r => Instance.room.createSession({constructId, roomId:r.roomId, pinHash: r.pinHash, role:'observerSolo1', options: {
228
228
  // simulcast: true,
229
229
  // simulcastSettings: {
230
230
  // "default" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactoo/watchtogether-sdk-js",
3
- "version": "2.7.14",
3
+ "version": "2.7.16",
4
4
  "description": "Javascript SDK for Reactoo",
5
5
  "main": "src/index.js",
6
6
  "unpkg": "dist/watchtogether-sdk.min.js",
@@ -42,7 +42,7 @@
42
42
  "yargs": "^10.1.2"
43
43
  },
44
44
  "dependencies": {
45
- "aws-iot-device-sdk": "^2.2.11",
45
+ "aws-iot-device-sdk": "^2.2.15",
46
46
  "serialize-error": "9.1.0",
47
47
  "swagger-client": "3.18.0",
48
48
  "webrtc-adapter": "^9.0.1"
@@ -210,11 +210,11 @@ let room = function () {
210
210
 
211
211
  },
212
212
 
213
- roomRecorder: ({roomId, operation = 'get', config, outputs, destinationIds, screenWidth, screenHeight, payload} = {}) => {
213
+ roomRecorder: ({roomId, operation = 'get', config, outputs, destinationIds, destinations, screenWidth, screenHeight, payload} = {}) => {
214
214
  return this.__privates.auth.__client
215
215
  .then(client => client.apis.wt.recordRoom({}, {
216
216
  requestBody: {
217
- roomId, operation, config, outputs, destinationIds, screenWidth, screenHeight, payload
217
+ roomId, operation, config, outputs, destinationIds, destinations, screenWidth, screenHeight, payload
218
218
  }
219
219
  }))
220
220
  },
@@ -3291,9 +3291,8 @@ class RoomSession {
3291
3291
  let participants = r.participants;
3292
3292
  let remoteUsersCache = this._remoteUsersCache;
3293
3293
  let handle = this._getHandle(this.handleId);
3294
-
3295
3294
  // filter out my user id from response and compare it to remoteUsersCache
3296
- participants = participants.filter(p => p.id !== handle.userId);
3295
+ participants = participants.filter(p => decodeJanusDisplay(p.id)?.userId !== decodeJanusDisplay(handle.userId)?.userId);
3297
3296
 
3298
3297
  // get rid of participants that are in participants but not in remoteUsersCache
3299
3298
  remoteUsersCache = remoteUsersCache.filter(r => participants.find(p => p.id === r.id));