@reactoo/watchtogether-sdk-js 2.7.15 → 2.7.17
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/dist/watchtogether-sdk.js +167 -167
- package/dist/watchtogether-sdk.min.js +2 -2
- package/package.json +2 -2
- package/src/modules/wt-room.js +3 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reactoo/watchtogether-sdk-js",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.17",
|
|
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.
|
|
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"
|
package/src/modules/wt-room.js
CHANGED
|
@@ -1573,8 +1573,8 @@ class RoomSession {
|
|
|
1573
1573
|
this._log = console.log.bind(console);
|
|
1574
1574
|
}
|
|
1575
1575
|
|
|
1576
|
-
_getHandle(handleId, rfid = null, userId = null) {
|
|
1577
|
-
return this._participants.find(p => p.handleId === handleId || (rfid && p.rfid === rfid) || (userId && decodeJanusDisplay(p.userId)?.userId === userId));
|
|
1576
|
+
_getHandle(handleId, rfid = null, userId = null, fullUserId = null) {
|
|
1577
|
+
return this._participants.find(p => p.handleId === handleId || (rfid && p.rfid === rfid) || (userId && decodeJanusDisplay(p.userId)?.userId === userId) || (fullUserId && p.userId === fullUserId));
|
|
1578
1578
|
}
|
|
1579
1579
|
|
|
1580
1580
|
|
|
@@ -3291,15 +3291,12 @@ 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
3295
|
participants = participants.filter(p => p.id !== handle.userId);
|
|
3297
|
-
|
|
3298
3296
|
// get rid of participants that are in participants but not in remoteUsersCache
|
|
3299
3297
|
remoteUsersCache = remoteUsersCache.filter(r => participants.find(p => p.id === r.id));
|
|
3300
3298
|
remoteUsersCache.forEach(r => {
|
|
3301
|
-
const handle = this._getHandle(null, null,
|
|
3302
|
-
|
|
3299
|
+
const handle = this._getHandle(null, null, null, r.userId);
|
|
3303
3300
|
if(this._participantShouldSubscribe(r.userId)) {
|
|
3304
3301
|
// todo: do a nicer flag to indicate inactive handle than just checking for pc
|
|
3305
3302
|
if(!handle || !handle.webrtcStuff?.pc) {
|