@reactoo/watchtogether-sdk-js 2.7.90 → 2.7.91
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.
|
@@ -9869,12 +9869,12 @@ class RoomSession {
|
|
|
9869
9869
|
this.apisecret = null;
|
|
9870
9870
|
this.handleId = null;
|
|
9871
9871
|
this.ws = null;
|
|
9872
|
+
this.isSupposeToBeConnected = false;
|
|
9872
9873
|
this.isRestarting = false;
|
|
9873
9874
|
this.isConnecting = false;
|
|
9874
9875
|
this.isDisconnecting = false;
|
|
9875
9876
|
this.isConnected = false;
|
|
9876
9877
|
this.isPublished = false;
|
|
9877
|
-
this.isReclaiming = false;
|
|
9878
9878
|
this.isStreaming = false;
|
|
9879
9879
|
this.isMuted = [];
|
|
9880
9880
|
this.isVideoEnabled = false;
|
|
@@ -10189,6 +10189,9 @@ class RoomSession {
|
|
|
10189
10189
|
}
|
|
10190
10190
|
}
|
|
10191
10191
|
_longPoll() {
|
|
10192
|
+
if (!this.isSupposeToBeConnected) {
|
|
10193
|
+
return;
|
|
10194
|
+
}
|
|
10192
10195
|
let longpoll = this.server + "/" + this.sessionId + "?rid=" + new Date().getTime();
|
|
10193
10196
|
if (this._maxev) longpoll = longpoll + "&maxev=" + this._maxev;
|
|
10194
10197
|
if (this.token) longpoll = longpoll + "&token=" + encodeURIComponent(this.token);
|
|
@@ -11144,6 +11147,7 @@ class RoomSession {
|
|
|
11144
11147
|
let simulcast = arguments.length > 11 && arguments[11] !== undefined ? arguments[11] : false;
|
|
11145
11148
|
let simulcastSettings = arguments.length > 12 && arguments[12] !== undefined ? arguments[12] : this.defaultSimulcastSettings;
|
|
11146
11149
|
let enableDtx = arguments.length > 13 && arguments[13] !== undefined ? arguments[13] : false;
|
|
11150
|
+
this.isSupposeToBeConnected = true;
|
|
11147
11151
|
if (this.isConnecting) {
|
|
11148
11152
|
return Promise.reject({
|
|
11149
11153
|
type: 'warning',
|
|
@@ -11188,6 +11192,7 @@ class RoomSession {
|
|
|
11188
11192
|
}
|
|
11189
11193
|
disconnect() {
|
|
11190
11194
|
var _this$_abortControlle, _this$_abortControlle2;
|
|
11195
|
+
this.isSupposeToBeConnected = false;
|
|
11191
11196
|
if (this.isDisconnecting) {
|
|
11192
11197
|
return Promise.resolve();
|
|
11193
11198
|
}
|
|
@@ -11221,6 +11226,7 @@ class RoomSession {
|
|
|
11221
11226
|
});
|
|
11222
11227
|
}
|
|
11223
11228
|
startStream(streamId, server, iceServers, token, userId) {
|
|
11229
|
+
this.isSupposeToBeConnected = true;
|
|
11224
11230
|
if (this.isConnecting) {
|
|
11225
11231
|
return Promise.reject({
|
|
11226
11232
|
type: 'warning',
|