@reactoo/watchtogether-sdk-js 2.5.78 → 2.5.80
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/modules/wt-room.js
CHANGED
|
@@ -96,21 +96,21 @@ class RoomSession {
|
|
|
96
96
|
|
|
97
97
|
static subscriptionRules = {
|
|
98
98
|
participant: {
|
|
99
|
-
"watchparty": ['participant', 'talkback'],
|
|
99
|
+
"watchparty": ['participant', 'talkback', 'host'],
|
|
100
100
|
"commentary": ['participant', 'talkback', 'host'],
|
|
101
101
|
"videowall": ['host', 'talkback', 'observer', 'observerSolo1', 'observerSolo2', 'observerSolo3'],
|
|
102
102
|
"videowall-queue": ['host', 'talkback', 'observer', 'observerSolo1', 'observerSolo2', 'observerSolo3'],
|
|
103
103
|
"videowall-queue-video": ['host', 'talkback', 'observer', 'observerSolo1', 'observerSolo2', 'observerSolo3']
|
|
104
104
|
},
|
|
105
105
|
monitor: {
|
|
106
|
-
"watchparty": ['participant'],
|
|
106
|
+
"watchparty": ['participant', 'host'],
|
|
107
107
|
"commentary": ['participant', 'host'],
|
|
108
108
|
"videowall": ['host', 'participant'],
|
|
109
109
|
"videowall-queue": ['host', 'participant'],
|
|
110
110
|
"videowall-queue-video": ['host', 'participant'],
|
|
111
111
|
},
|
|
112
112
|
talkback: {
|
|
113
|
-
"watchparty": ['participant'],
|
|
113
|
+
"watchparty": ['participant', 'host'],
|
|
114
114
|
"commentary": ['host', 'participant'],
|
|
115
115
|
"videowall": ['host', 'participant'],
|
|
116
116
|
"videowall-queue": ['host', 'participant'],
|
|
@@ -186,7 +186,6 @@ class RoomSession {
|
|
|
186
186
|
this.isReclaiming = false;
|
|
187
187
|
this.isStreaming = false;
|
|
188
188
|
|
|
189
|
-
this._ipv6Support = false;
|
|
190
189
|
this._retries = 0;
|
|
191
190
|
this._maxRetries = 3;
|
|
192
191
|
this._keepAliveId = null;
|
|
@@ -527,6 +526,8 @@ class RoomSession {
|
|
|
527
526
|
let event = msg["videoroom"] || null;
|
|
528
527
|
let list = msg["publishers"] || {};
|
|
529
528
|
let leaving = msg["leaving"];
|
|
529
|
+
let kicked = msg["kicked"];
|
|
530
|
+
|
|
530
531
|
//let joining = msg["joining"];
|
|
531
532
|
let unpublished = msg["unpublished"];
|
|
532
533
|
let error = msg["error"];
|
|
@@ -609,12 +610,12 @@ class RoomSession {
|
|
|
609
610
|
this._removeParticipant(this.handleId);
|
|
610
611
|
if (msg['reason'] === 'kicked') {
|
|
611
612
|
this.emit('kicked');
|
|
612
|
-
this.disconnect().catch(() => {
|
|
613
|
-
});
|
|
613
|
+
this.disconnect().catch(() => {});
|
|
614
614
|
}
|
|
615
615
|
} else if (leaving) {
|
|
616
|
+
//TODO: shouldnt we detach?
|
|
616
617
|
this._log('leaving', leaving);
|
|
617
|
-
this._removeParticipant(null, leaving);
|
|
618
|
+
this._removeParticipant(null, leaving, true);
|
|
618
619
|
}
|
|
619
620
|
|
|
620
621
|
if (unpublished === 'ok') {
|
|
@@ -625,6 +626,13 @@ class RoomSession {
|
|
|
625
626
|
this._removeParticipant(null, unpublished, true); // we do hangup and detach
|
|
626
627
|
}
|
|
627
628
|
|
|
629
|
+
if(kicked === 'ok') {
|
|
630
|
+
// this case shouldn't exist
|
|
631
|
+
} else if(kicked) {
|
|
632
|
+
this._log('kicked', kicked);
|
|
633
|
+
this._removeParticipant(null, kicked, true); // we do hangup and detach
|
|
634
|
+
}
|
|
635
|
+
|
|
628
636
|
if (error) {
|
|
629
637
|
this.emit('error', {
|
|
630
638
|
type: 'error',
|
|
@@ -1249,12 +1257,8 @@ class RoomSession {
|
|
|
1249
1257
|
|
|
1250
1258
|
pc_config["sdpSemantics"] = this.isUnifiedPlan ? "unified-plan" : "plan-b";
|
|
1251
1259
|
|
|
1252
|
-
let pc_constraints = {
|
|
1253
|
-
|
|
1254
|
-
};
|
|
1255
|
-
if (this._ipv6Support === true) {
|
|
1256
|
-
pc_constraints.optional.push({"googIPv6": true});
|
|
1257
|
-
}
|
|
1260
|
+
let pc_constraints = {};
|
|
1261
|
+
|
|
1258
1262
|
if (adapter.browserDetails.browser === "edge") {
|
|
1259
1263
|
// This is Edge, enable BUNDLE explicitly
|
|
1260
1264
|
pc_config.bundlePolicy = "max-bundle";
|