@reactoo/watchtogether-sdk-js 2.6.23 → 2.6.25
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
package/src/models/iot.js
CHANGED
|
@@ -53,11 +53,11 @@ let iot = function () {
|
|
|
53
53
|
if(!subscribeToSuggestedTopics) {
|
|
54
54
|
return Promise.resolve(instance)
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
let topics = [...suggestedTopic, ...__currentTopicsCopy];
|
|
57
|
+
topics = topics.filter((c, index) => {
|
|
58
58
|
return topics.indexOf(c) === index;
|
|
59
59
|
});
|
|
60
|
-
return Promise.all(
|
|
60
|
+
return Promise.all(topics.map(topic => this.iot.subscribe(topic))).then(() => instance)
|
|
61
61
|
})
|
|
62
62
|
.then((instance) => {
|
|
63
63
|
this.iot.$on('error', this.iot.__reconnect, this);
|
package/src/modules/wt-room.js
CHANGED
|
@@ -732,7 +732,7 @@ class RoomSession {
|
|
|
732
732
|
userId: decodeJanusDisplay(handle.userId)?.userId,
|
|
733
733
|
role: decodeJanusDisplay(handle.userId)?.role,
|
|
734
734
|
stream: null,
|
|
735
|
-
streamMap: handle.webrtcStuff?.streamMap,
|
|
735
|
+
streamMap: structuredClone(handle.webrtcStuff?.streamMap),
|
|
736
736
|
source: null,
|
|
737
737
|
track: null,
|
|
738
738
|
adding: false,
|
|
@@ -1159,7 +1159,7 @@ class RoomSession {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
|
|
1161
1161
|
disconnect() {
|
|
1162
|
-
|
|
1162
|
+
|
|
1163
1163
|
if (this.isDisconnecting) {
|
|
1164
1164
|
return Promise.resolve();
|
|
1165
1165
|
}
|
|
@@ -1367,9 +1367,9 @@ class RoomSession {
|
|
|
1367
1367
|
pc_config.bundlePolicy = "max-bundle";
|
|
1368
1368
|
}
|
|
1369
1369
|
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1370
|
+
// pc_config.bundlePolicy = 'balanced';
|
|
1371
|
+
// pc_config.iceTransportPolicy = 'relay';
|
|
1372
|
+
// pc_config.rtcpMuxPolicy = "negotiate";
|
|
1373
1373
|
|
|
1374
1374
|
this._log('new RTCPeerConnection', pc_config, pc_constraints);
|
|
1375
1375
|
|
|
@@ -1394,7 +1394,7 @@ class RoomSession {
|
|
|
1394
1394
|
userId: decodeJanusDisplay(handle.userId)?.userId,
|
|
1395
1395
|
role: decodeJanusDisplay(handle.userId)?.role,
|
|
1396
1396
|
stream: config.stream,
|
|
1397
|
-
streamMap: config.streamMap,
|
|
1397
|
+
streamMap: structuredClone(config.streamMap),
|
|
1398
1398
|
track: null,
|
|
1399
1399
|
source: null,
|
|
1400
1400
|
optional: true,
|
|
@@ -1417,7 +1417,7 @@ class RoomSession {
|
|
|
1417
1417
|
userId: decodeJanusDisplay(handle.userId)?.userId,
|
|
1418
1418
|
role: decodeJanusDisplay(handle.userId)?.role,
|
|
1419
1419
|
stream: config.stream,
|
|
1420
|
-
streamMap: config.streamMap,
|
|
1420
|
+
streamMap: structuredClone(config.streamMap),
|
|
1421
1421
|
track: null,
|
|
1422
1422
|
source: null,
|
|
1423
1423
|
optional: true,
|
|
@@ -1479,7 +1479,7 @@ class RoomSession {
|
|
|
1479
1479
|
userId: decodeJanusDisplay(handle.userId)?.userId,
|
|
1480
1480
|
role: decodeJanusDisplay(handle.userId)?.role,
|
|
1481
1481
|
stream: config.stream,
|
|
1482
|
-
streamMap: config.streamMap,
|
|
1482
|
+
streamMap: structuredClone(config.streamMap),
|
|
1483
1483
|
source,
|
|
1484
1484
|
track: ev.track,
|
|
1485
1485
|
adding: false,
|
|
@@ -1502,7 +1502,7 @@ class RoomSession {
|
|
|
1502
1502
|
userId: decodeJanusDisplay(handle.userId)?.userId,
|
|
1503
1503
|
role: decodeJanusDisplay(handle.userId)?.role,
|
|
1504
1504
|
stream: config.stream,
|
|
1505
|
-
streamMap: config.streamMap,
|
|
1505
|
+
streamMap: structuredClone(config.streamMap),
|
|
1506
1506
|
source,
|
|
1507
1507
|
track: event.track,
|
|
1508
1508
|
constructId: this.constructId,
|
|
@@ -1532,7 +1532,7 @@ class RoomSession {
|
|
|
1532
1532
|
userId: decodeJanusDisplay(handle.userId)?.userId,
|
|
1533
1533
|
role: decodeJanusDisplay(handle.userId)?.role,
|
|
1534
1534
|
stream: config.stream,
|
|
1535
|
-
streamMap: config.streamMap,
|
|
1535
|
+
streamMap: structuredClone(config.streamMap),
|
|
1536
1536
|
source,
|
|
1537
1537
|
track: ev.target,
|
|
1538
1538
|
adding: false,
|
|
@@ -1556,7 +1556,7 @@ class RoomSession {
|
|
|
1556
1556
|
userId: decodeJanusDisplay(handle.userId)?.userId,
|
|
1557
1557
|
role: decodeJanusDisplay(handle.userId)?.role,
|
|
1558
1558
|
stream: config.stream,
|
|
1559
|
-
streamMap: config.streamMap,
|
|
1559
|
+
streamMap: structuredClone(config.streamMap),
|
|
1560
1560
|
source,
|
|
1561
1561
|
kind: ev.target.kind,
|
|
1562
1562
|
track: ev.target,
|
|
@@ -1578,7 +1578,7 @@ class RoomSession {
|
|
|
1578
1578
|
userId: decodeJanusDisplay(handle.userId)?.userId,
|
|
1579
1579
|
role: decodeJanusDisplay(handle.userId)?.role,
|
|
1580
1580
|
stream: config.stream,
|
|
1581
|
-
streamMap: config.streamMap,
|
|
1581
|
+
streamMap: structuredClone(config.streamMap),
|
|
1582
1582
|
source,
|
|
1583
1583
|
kind: ev.target.kind,
|
|
1584
1584
|
track: ev.target,
|
|
@@ -2051,7 +2051,7 @@ class RoomSession {
|
|
|
2051
2051
|
videoTransceiver = transceiver;
|
|
2052
2052
|
}
|
|
2053
2053
|
|
|
2054
|
-
|
|
2054
|
+
// Reusing existing transceivers
|
|
2055
2055
|
// TODO: if we start using different codecs for different sources, we need to check for that here
|
|
2056
2056
|
|
|
2057
2057
|
else if(transceiver.currentDirection === 'inactive' && transceiver.sender?.getParameters()?.codecs?.find(c => c.mimeType.indexOf('audio') > -1) && replaceAudio && !audioTransceiver) {
|
|
@@ -2166,7 +2166,7 @@ class RoomSession {
|
|
|
2166
2166
|
role: decodeJanusDisplay(this.display)?.role,
|
|
2167
2167
|
track: ev.detail,
|
|
2168
2168
|
stream: config.stream,
|
|
2169
|
-
streamMap: config.streamMap,
|
|
2169
|
+
streamMap: structuredClone(config.streamMap),
|
|
2170
2170
|
source,
|
|
2171
2171
|
adding: false,
|
|
2172
2172
|
removing: true,
|
|
@@ -2194,7 +2194,7 @@ class RoomSession {
|
|
|
2194
2194
|
role: decodeJanusDisplay(this.display)?.role,
|
|
2195
2195
|
track,
|
|
2196
2196
|
stream: config.stream,
|
|
2197
|
-
streamMap: config.streamMap,
|
|
2197
|
+
streamMap: structuredClone(config.streamMap),
|
|
2198
2198
|
source,
|
|
2199
2199
|
adding: true,
|
|
2200
2200
|
constructId: this.constructId,
|
|
@@ -2219,7 +2219,7 @@ class RoomSession {
|
|
|
2219
2219
|
userId: decodeJanusDisplay(handle.userId)?.userId,
|
|
2220
2220
|
role: decodeJanusDisplay(this.display)?.role,
|
|
2221
2221
|
stream: null,
|
|
2222
|
-
streamMap: config.streamMap,
|
|
2222
|
+
streamMap: structuredClone(config.streamMap),
|
|
2223
2223
|
source,
|
|
2224
2224
|
adding: false,
|
|
2225
2225
|
constructId: this.constructId,
|