@vkontakte/calls-sdk 2.8.11-dev.d67d6abf.0 → 2.8.11-dev.fa0dcb9d.0
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/calls-sdk.cjs.js +4 -4
- package/calls-sdk.esm.js +101 -107
- package/classes/Conversation.d.ts +1 -0
- package/classes/transport/Transport.d.ts +0 -2
- package/package.json +1 -1
- package/static/External.d.ts +9 -12
- package/static/Params.d.ts +9 -9
package/calls-sdk.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @vkontakte/calls-sdk v2.8.11-dev.
|
|
3
|
-
*
|
|
2
|
+
* @vkontakte/calls-sdk v2.8.11-dev.fa0dcb9d.0
|
|
3
|
+
* Wed, 03 Jun 2026 21:10:07 GMT
|
|
4
4
|
* https://calls-sdk.cdn-vk.ru/doc/latest/index.html
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -739,7 +739,7 @@ var ye = ve.getInstance(), C = class e {
|
|
|
739
739
|
return 1.1;
|
|
740
740
|
}
|
|
741
741
|
static get sdkVersion() {
|
|
742
|
-
return "2.8.11-dev.
|
|
742
|
+
return "2.8.11-dev.fa0dcb9d.0";
|
|
743
743
|
}
|
|
744
744
|
static get debug() {
|
|
745
745
|
return e._params.debug;
|
|
@@ -1911,12 +1911,12 @@ var je;
|
|
|
1911
1911
|
R.debug("Remote status:", t, e), M("onRemoteStatus", e, t, n, r);
|
|
1912
1912
|
}
|
|
1913
1913
|
e.onRemoteStatus = se;
|
|
1914
|
-
function ce(
|
|
1915
|
-
j("onPermissionsRequested"
|
|
1914
|
+
function ce() {
|
|
1915
|
+
j("onPermissionsRequested");
|
|
1916
1916
|
}
|
|
1917
1917
|
e.onPermissionsRequested = ce;
|
|
1918
|
-
function le(e, t
|
|
1919
|
-
j("onPermissionsError", e, t
|
|
1918
|
+
function le(e, t) {
|
|
1919
|
+
j("onPermissionsError", e, t);
|
|
1920
1920
|
}
|
|
1921
1921
|
e.onPermissionsError = le;
|
|
1922
1922
|
function ue(e, t, n) {
|
|
@@ -1980,8 +1980,8 @@ var je;
|
|
|
1980
1980
|
j("onVolumesDetected", Ae(e), t);
|
|
1981
1981
|
}
|
|
1982
1982
|
e.onVolumesDetected = xe;
|
|
1983
|
-
function Se(e, t
|
|
1984
|
-
j("onLocalVolume", e, t
|
|
1983
|
+
function Se(e, t) {
|
|
1984
|
+
j("onLocalVolume", e, t);
|
|
1985
1985
|
}
|
|
1986
1986
|
e.onLocalVolume = Se;
|
|
1987
1987
|
function Ce(e, t, n) {
|
|
@@ -1992,20 +1992,20 @@ var je;
|
|
|
1992
1992
|
j("onHangup", e, t);
|
|
1993
1993
|
}
|
|
1994
1994
|
e.onHangup = we;
|
|
1995
|
-
function T(e
|
|
1996
|
-
j("onMultipartyChatCreated", N(e)
|
|
1995
|
+
function T(e) {
|
|
1996
|
+
j("onMultipartyChatCreated", N(e));
|
|
1997
1997
|
}
|
|
1998
1998
|
e.onMultipartyChatCreated = T;
|
|
1999
|
-
function E(
|
|
2000
|
-
j("onDeviceChange"
|
|
1999
|
+
function E() {
|
|
2000
|
+
j("onDeviceChange");
|
|
2001
2001
|
}
|
|
2002
2002
|
e.onDeviceChange = E;
|
|
2003
|
-
function D(e
|
|
2004
|
-
j("onFingerprintChange", e
|
|
2003
|
+
function D(e) {
|
|
2004
|
+
j("onFingerprintChange", e);
|
|
2005
2005
|
}
|
|
2006
2006
|
e.onFingerprintChange = D;
|
|
2007
|
-
function Te(
|
|
2008
|
-
j("onTokenExpired"
|
|
2007
|
+
function Te() {
|
|
2008
|
+
j("onTokenExpired");
|
|
2009
2009
|
}
|
|
2010
2010
|
e.onTokenExpired = Te;
|
|
2011
2011
|
function Ee(e, t, n = !1, r) {
|
|
@@ -2036,12 +2036,12 @@ var je;
|
|
|
2036
2036
|
j("onDebugMessage", e, ...t);
|
|
2037
2037
|
}
|
|
2038
2038
|
e.onDebugMessage = A;
|
|
2039
|
-
function je(e, t
|
|
2040
|
-
j("onStatistics", Object.assign({}, e, { memory: t })
|
|
2039
|
+
function je(e, t) {
|
|
2040
|
+
j("onStatistics", Object.assign({}, e, { memory: t }));
|
|
2041
2041
|
}
|
|
2042
2042
|
e.onStatistics = je;
|
|
2043
|
-
function P(
|
|
2044
|
-
j("onAutoplayError"
|
|
2043
|
+
function P() {
|
|
2044
|
+
j("onAutoplayError");
|
|
2045
2045
|
}
|
|
2046
2046
|
e.onAutoplayError = P;
|
|
2047
2047
|
function Me(e, t, n, r, i, a) {
|
|
@@ -2116,8 +2116,8 @@ var je;
|
|
|
2116
2116
|
j("onVideoSuspendSuggest", e, t);
|
|
2117
2117
|
}
|
|
2118
2118
|
e.onVideoSuspendSuggest = Ye;
|
|
2119
|
-
function Xe(e
|
|
2120
|
-
j("onSignalingMessage", typeof e == "string" ? e : N(e)
|
|
2119
|
+
function Xe(e) {
|
|
2120
|
+
j("onSignalingMessage", typeof e == "string" ? e : N(e));
|
|
2121
2121
|
}
|
|
2122
2122
|
e.onSignalingMessage = Xe;
|
|
2123
2123
|
function Ze(e, t) {
|
|
@@ -6207,12 +6207,6 @@ var ri = 2 ** 15 - 1, ii = 1, ai = 5, oi = 5, si = class e {
|
|
|
6207
6207
|
getTopology() {
|
|
6208
6208
|
return this._topology;
|
|
6209
6209
|
}
|
|
6210
|
-
preventRestart() {
|
|
6211
|
-
this._topology === "SERVER" ? this._serverTransport?.preventRestart() : this._directTransport?.preventRestart();
|
|
6212
|
-
}
|
|
6213
|
-
allowRestart() {
|
|
6214
|
-
this._topology === "SERVER" ? this._serverTransport?.allowRestart() : this._directTransport?.allowRestart();
|
|
6215
|
-
}
|
|
6216
6210
|
isAllocated(e) {
|
|
6217
6211
|
return this._allocated.indexOf(e) >= 0;
|
|
6218
6212
|
}
|
|
@@ -7898,7 +7892,7 @@ var Oa = class {
|
|
|
7898
7892
|
}
|
|
7899
7893
|
}, Wa = 1e3, Ga = 1e4, Ka = 15, Q = class e extends g {
|
|
7900
7894
|
constructor(e, t) {
|
|
7901
|
-
super(), h(this, "_api", void 0), h(this, "_signaling", void 0), h(this, "_signalingActor", void 0), h(this, "_mediaSource", null), h(this, "_conversation", null), h(this, "_myLastRequestedLayouts", {}), h(this, "_state", "IDLE"), h(this, "_participantState", X.CALLED), h(this, "_participants", {}), h(this, "_pendingParticipants", /* @__PURE__ */ new Map()), h(this, "_transport", null), h(this, "_debugInfo", null), h(this, "_volumesDetector", null), h(this, "_speakerDetector", null), h(this, "_localVolumeDetector", null), h(this, "_specListener", null), h(this, "_activeSpeakerId", null), h(this, "_lastSignalledActiveSpeakerId", null), h(this, "_isRealTimeAsrRequested", !1), h(this, "_serverSettings", $n()), h(this, "_serverTimeOffset", 0), h(this, "_delayedHangup", !1), h(this, "_abortController", null), h(this, "_onUnload", void 0), h(this, "_audioOutput", void 0), h(this, "_lastStalled", {}), h(this, "_audioMixStalled", !1), h(this, "_audioFix", null), h(this, "_streamByStreamId", /* @__PURE__ */ new Map()), h(this, "_streamIdByStreamDescription", /* @__PURE__ */ new Map()), h(this, "_streamWaitTimerByStreamDescription", /* @__PURE__ */ new Map()), h(this, "_sequenceNumberByStreamDescription", /* @__PURE__ */ new Map()), h(this, "_cooldownTimestampByStreamDescription", /* @__PURE__ */ new Map()), h(this, "_cooldownQueueCleanupTimer", null), h(this, "_statFirstMediaReceived", void 0), h(this, "_changeMediaSettings", S.debounce(async (e) => {
|
|
7895
|
+
super(), h(this, "_api", void 0), h(this, "_signaling", void 0), h(this, "_signalingActor", void 0), h(this, "_mediaSource", null), h(this, "_conversation", null), h(this, "_myLastRequestedLayouts", {}), h(this, "_state", "IDLE"), h(this, "_previousState", null), h(this, "_participantState", X.CALLED), h(this, "_participants", {}), h(this, "_pendingParticipants", /* @__PURE__ */ new Map()), h(this, "_transport", null), h(this, "_debugInfo", null), h(this, "_volumesDetector", null), h(this, "_speakerDetector", null), h(this, "_localVolumeDetector", null), h(this, "_specListener", null), h(this, "_activeSpeakerId", null), h(this, "_lastSignalledActiveSpeakerId", null), h(this, "_isRealTimeAsrRequested", !1), h(this, "_serverSettings", $n()), h(this, "_serverTimeOffset", 0), h(this, "_delayedHangup", !1), h(this, "_abortController", null), h(this, "_onUnload", void 0), h(this, "_audioOutput", void 0), h(this, "_lastStalled", {}), h(this, "_audioMixStalled", !1), h(this, "_audioFix", null), h(this, "_streamByStreamId", /* @__PURE__ */ new Map()), h(this, "_streamIdByStreamDescription", /* @__PURE__ */ new Map()), h(this, "_streamWaitTimerByStreamDescription", /* @__PURE__ */ new Map()), h(this, "_sequenceNumberByStreamDescription", /* @__PURE__ */ new Map()), h(this, "_cooldownTimestampByStreamDescription", /* @__PURE__ */ new Map()), h(this, "_cooldownQueueCleanupTimer", null), h(this, "_statFirstMediaReceived", void 0), h(this, "_changeMediaSettings", S.debounce(async (e) => {
|
|
7902
7896
|
if (this._signaling.ready) try {
|
|
7903
7897
|
await this._signaling.changeMediaSettings(e);
|
|
7904
7898
|
} catch (e) {
|
|
@@ -8000,7 +7994,7 @@ var Oa = class {
|
|
|
8000
7994
|
let n = this._extractLocalParticipantFromConnection(e);
|
|
8001
7995
|
if (n) {
|
|
8002
7996
|
let e = S.mapParticipantState(n);
|
|
8003
|
-
Object.keys(e).length > 0 && P.onLocalParticipantState(e);
|
|
7997
|
+
Object.keys(e).length > 0 && P.onLocalParticipantState(e, !1, this.id);
|
|
8004
7998
|
}
|
|
8005
7999
|
return this._openTransport(Object.values(await this._getParticipants()), !1), this._conversation;
|
|
8006
8000
|
} catch (e) {
|
|
@@ -8483,7 +8477,7 @@ var Oa = class {
|
|
|
8483
8477
|
}
|
|
8484
8478
|
async _onConversationParticipantListChunk(e) {
|
|
8485
8479
|
let t = e.participants;
|
|
8486
|
-
t && P.onConversationParticipantListChunk(await this._participantListChunkToExternalChunk(this._createParticipantListChunk(t)));
|
|
8480
|
+
t && P.onConversationParticipantListChunk(await this._participantListChunkToExternalChunk(this._createParticipantListChunk(t)), this.id);
|
|
8487
8481
|
}
|
|
8488
8482
|
_createParticipantListChunk(e) {
|
|
8489
8483
|
return {
|
|
@@ -8517,7 +8511,7 @@ var Oa = class {
|
|
|
8517
8511
|
for (let n of e) {
|
|
8518
8512
|
let e = S.composeId(n);
|
|
8519
8513
|
if (R.test("Conversation:RegisterParticipant", e), this._isMe(e)) {
|
|
8520
|
-
this._conversation.roles = n.roles || [], this._conversation.roles.length && (R.debug(`Local roles changed: ${n.roles}`), P.onLocalRolesChanged(this._conversation.roles, !0)), this._registerParticipantLocalMuteState(n);
|
|
8514
|
+
this._conversation.roles = n.roles || [], this._conversation.roles.length && (R.debug(`Local roles changed: ${n.roles}`), P.onLocalRolesChanged(this._conversation.roles, !0, this.id)), this._registerParticipantLocalMuteState(n);
|
|
8521
8515
|
continue;
|
|
8522
8516
|
}
|
|
8523
8517
|
if (n.state === X.HUNGUP || n.state === X.REJECTED) {
|
|
@@ -8541,7 +8535,7 @@ var Oa = class {
|
|
|
8541
8535
|
isInRoom: t
|
|
8542
8536
|
}, i);
|
|
8543
8537
|
let a = await this._getParticipant(e);
|
|
8544
|
-
a && n.roles && n.roles.length && (R.debug(`Roles for participant [${e}] changed: ${n.roles}`), P.onRolesChanged(a.externalId, n.roles, !0));
|
|
8538
|
+
a && n.roles && n.roles.length && (R.debug(`Roles for participant [${e}] changed: ${n.roles}`), P.onRolesChanged(a.externalId, n.roles, !0, this.id));
|
|
8545
8539
|
}
|
|
8546
8540
|
}
|
|
8547
8541
|
_registerParticipantLocalMuteState({ muteStates: e, unmuteOptions: t }) {
|
|
@@ -8790,7 +8784,7 @@ var Oa = class {
|
|
|
8790
8784
|
}
|
|
8791
8785
|
async hold(e) {
|
|
8792
8786
|
let t = Tr.get();
|
|
8793
|
-
await this._signaling.hold(e, e ? void 0 : t), e ? (this._state === "ACTIVE" && (this._state = "HELD"), await this._mediaSource?.stopLocalMedia(), P.onLocalStatus(A.ONHOLD, this.id)) : (this._state === "HELD" && (this._state = "ACTIVE"), await this._mediaSource?.resumeLocalMedia(), this._mediaSource && P.onLocalStream(this._mediaSource?.getStream() ?? null, this._mediaSource.mediaSettings, this.id));
|
|
8787
|
+
await this._signaling.hold(e, e ? void 0 : t), e ? ((this._state === "ACTIVE" || this._state === "IDLE") && (this._previousState = this._state, this._state = "HELD"), await this._mediaSource?.stopLocalMedia(), P.onLocalStatus(A.ONHOLD, this.id)) : (this._state === "HELD" && (this._state = this._previousState || "ACTIVE", this._previousState = null), await this._mediaSource?.resumeLocalMedia(), P.onLocalStatus(A.WAITING, this.id), this._mediaSource && P.onLocalStream(this._mediaSource?.getStream() ?? null, this._mediaSource.mediaSettings, this.id));
|
|
8794
8788
|
}
|
|
8795
8789
|
async putHandsDown() {
|
|
8796
8790
|
this._checkAdminRole(), await this._signaling.putHandsDown();
|
|
@@ -8863,7 +8857,7 @@ var Oa = class {
|
|
|
8863
8857
|
streamName: n.streamName,
|
|
8864
8858
|
mediaType: n.mediaType
|
|
8865
8859
|
};
|
|
8866
|
-
a ? P.onLocalLive(i, e) : P.onRemoteLive(r.externalId, e);
|
|
8860
|
+
a ? P.onLocalLive(i, e, this.id) : P.onRemoteLive(r.externalId, e, this.id);
|
|
8867
8861
|
}
|
|
8868
8862
|
break;
|
|
8869
8863
|
case V.CAMERA:
|
|
@@ -8921,7 +8915,7 @@ var Oa = class {
|
|
|
8921
8915
|
}
|
|
8922
8916
|
}
|
|
8923
8917
|
async _onParticipantPromoted(e) {
|
|
8924
|
-
this._conversation && this._conversation.audienceMode ? (R.log("Promoted in audience mode", !e.demote), this._conversation.restricted = e.demote, this._processRecordInfos(e), !e.demote && this._mediaSource && this._changeMediaSettings(this._mediaSource.mediaSettings)) : (R.log("Promoted in waiting hall", !e.demote), e.demote ? (R.log("Kicked from waiting hall"), this._close(new E(T.REMOVED))) : (this._updateConversation(e), await this._onJoinPart2(e))), P.onPromoted(e.demote);
|
|
8918
|
+
this._conversation && this._conversation.audienceMode ? (R.log("Promoted in audience mode", !e.demote), this._conversation.restricted = e.demote, this._processRecordInfos(e), !e.demote && this._mediaSource && this._changeMediaSettings(this._mediaSource.mediaSettings)) : (R.log("Promoted in waiting hall", !e.demote), e.demote ? (R.log("Kicked from waiting hall"), this._close(new E(T.REMOVED))) : (this._updateConversation(e), await this._onJoinPart2(e))), P.onPromoted(e.demote, this.id);
|
|
8925
8919
|
}
|
|
8926
8920
|
async _onChatRoomUpdated(e, t = 0, n = [], r, i) {
|
|
8927
8921
|
R.log(`Chat room updated: ${e}`);
|
|
@@ -8941,7 +8935,7 @@ var Oa = class {
|
|
|
8941
8935
|
let t = S.decomposeId(e).id;
|
|
8942
8936
|
a.push(t), s.push(t);
|
|
8943
8937
|
}), !a.length) {
|
|
8944
|
-
P.onChatRoomUpdated(e, t, l, [], []);
|
|
8938
|
+
P.onChatRoomUpdated(e, t, l, [], [], this.id);
|
|
8945
8939
|
return;
|
|
8946
8940
|
}
|
|
8947
8941
|
if (c.length) {
|
|
@@ -8949,14 +8943,14 @@ var Oa = class {
|
|
|
8949
8943
|
l.push(...e);
|
|
8950
8944
|
}
|
|
8951
8945
|
let u = await this._api.getExternalIdsByOkIds(o), d = await this._api.getExternalIdsByOkIds(s);
|
|
8952
|
-
P.onChatRoomUpdated(e, t, l, u, d);
|
|
8946
|
+
P.onChatRoomUpdated(e, t, l, u, d, this.id);
|
|
8953
8947
|
}
|
|
8954
8948
|
async _onSharedMovieUpdate(e) {
|
|
8955
8949
|
let t = this._conversation?.externalId;
|
|
8956
|
-
for (let n of e.data) if (this._isMe(n.participantId)) P.onLocalLiveUpdate(t, n);
|
|
8950
|
+
for (let n of e.data) if (this._isMe(n.participantId)) P.onLocalLiveUpdate(t, n, this.id);
|
|
8957
8951
|
else {
|
|
8958
8952
|
let e = await this._getExternalIdByParticipantId(n.participantId);
|
|
8959
|
-
e && P.onRemoteLiveUpdate(e, n);
|
|
8953
|
+
e && P.onRemoteLiveUpdate(e, n, this.id);
|
|
8960
8954
|
}
|
|
8961
8955
|
}
|
|
8962
8956
|
async _onSharedMovieInfoStarted(e) {
|
|
@@ -8968,10 +8962,10 @@ var Oa = class {
|
|
|
8968
8962
|
async _processSharedMovieInfo(e, t = null) {
|
|
8969
8963
|
if (!e) return;
|
|
8970
8964
|
let n = this._conversation?.externalId;
|
|
8971
|
-
if (this._isMe(e.initiatorId)) P.onLocalSharedMovieInfo(n, e, t);
|
|
8965
|
+
if (this._isMe(e.initiatorId)) P.onLocalSharedMovieInfo(n, e, t, this.id);
|
|
8972
8966
|
else {
|
|
8973
8967
|
let n = await this._getExternalIdByParticipantId(e.initiatorId);
|
|
8974
|
-
n && P.onRemoteSharedMovieInfo(n, e, t);
|
|
8968
|
+
n && P.onRemoteSharedMovieInfo(n, e, t, this.id);
|
|
8975
8969
|
}
|
|
8976
8970
|
}
|
|
8977
8971
|
async _processConnectionSharedMovieInfo(e) {
|
|
@@ -8987,8 +8981,8 @@ var Oa = class {
|
|
|
8987
8981
|
e && P.onAsrSet({
|
|
8988
8982
|
externalId: e,
|
|
8989
8983
|
movieId: r.movieId
|
|
8990
|
-
}, n);
|
|
8991
|
-
} else n && P.onAsrSet(null, n);
|
|
8984
|
+
}, n, this.id);
|
|
8985
|
+
} else n && P.onAsrSet(null, n, this.id);
|
|
8992
8986
|
}
|
|
8993
8987
|
async _processConversationUrlSharingInfo(e) {
|
|
8994
8988
|
if (!this._conversation) return;
|
|
@@ -8996,7 +8990,7 @@ var Oa = class {
|
|
|
8996
8990
|
let { urlSharingInfoByRoom: t } = this._conversation, n = this._conversation.roomId, r = t.get(n);
|
|
8997
8991
|
if (r && !this._isMe(r.initiatorId)) {
|
|
8998
8992
|
let e = await this._getExternalIdByParticipantId(r.initiatorId);
|
|
8999
|
-
e && P.onRemoteSharedUrl(e, r.sharedUrl, n);
|
|
8993
|
+
e && P.onRemoteSharedUrl(e, r.sharedUrl, n, this.id);
|
|
9000
8994
|
}
|
|
9001
8995
|
}
|
|
9002
8996
|
_extractConnectionUrlSharingInfo(e) {
|
|
@@ -9011,12 +9005,12 @@ var Oa = class {
|
|
|
9011
9005
|
movieId: r,
|
|
9012
9006
|
source: i
|
|
9013
9007
|
};
|
|
9014
|
-
if (this._isMe(n)) P.onLocalSharedMovieStoppedInfo(t, o, a);
|
|
9008
|
+
if (this._isMe(n)) P.onLocalSharedMovieStoppedInfo(t, o, a, this.id);
|
|
9015
9009
|
else {
|
|
9016
9010
|
let e = await this._getExternalIdByParticipantId(n);
|
|
9017
9011
|
if (e) {
|
|
9018
9012
|
let t = (await this._getParticipants())[n];
|
|
9019
|
-
t?.movieShareInfos && (t.movieShareInfos = t.movieShareInfos.filter((e) => e && e.movieId !== r)), P.onRemoteSharedMovieStoppedInfo(e, o, a);
|
|
9013
|
+
t?.movieShareInfos && (t.movieShareInfos = t.movieShareInfos.filter((e) => e && e.movieId !== r)), P.onRemoteSharedMovieStoppedInfo(e, o, a, this.id);
|
|
9020
9014
|
}
|
|
9021
9015
|
}
|
|
9022
9016
|
}
|
|
@@ -9028,11 +9022,11 @@ var Oa = class {
|
|
|
9028
9022
|
initiatorId: r
|
|
9029
9023
|
}) : t.delete(a), !(!i && a !== n && t.has(n)) && (!i || !this._isMe(r))) {
|
|
9030
9024
|
let e = await this._getExternalIdByParticipantId(r);
|
|
9031
|
-
e && P.onRemoteSharedUrl(e, i, a);
|
|
9025
|
+
e && P.onRemoteSharedUrl(e, i, a, this.id);
|
|
9032
9026
|
}
|
|
9033
9027
|
}
|
|
9034
9028
|
_onFeaturesPerRoleChanged(e) {
|
|
9035
|
-
R.log(`Features per role changed: ${e.notification}`), this._conversation && (this._conversation.featuresPerRole = e.featuresPerRole ?? {}), P.onFeaturesPerRoleChanged(e.featuresPerRole);
|
|
9029
|
+
R.log(`Features per role changed: ${e.notification}`), this._conversation && (this._conversation.featuresPerRole = e.featuresPerRole ?? {}), P.onFeaturesPerRoleChanged(e.featuresPerRole, this.id);
|
|
9036
9030
|
}
|
|
9037
9031
|
async _waitForStreamIfNeeded(e) {
|
|
9038
9032
|
if (e.fastScreenShare && !e.participantStreamDescription) {
|
|
@@ -9057,7 +9051,7 @@ var Oa = class {
|
|
|
9057
9051
|
R.warn(`Participant ${r} received outdated PAT response: sequence number ${e.sequenceNumber}; last sent sequence number for given participant is ${o}`), D.log(y.PAT_OUTDATED_RESPONSE);
|
|
9058
9052
|
return;
|
|
9059
9053
|
}
|
|
9060
|
-
i && e.suspend !== void 0 && n && (R.debug(`participant-sources-update: mediaType=${n}, suspend=${e.suspend}`), P.onRemoteStreamSuspended(i.externalId, n, e.suspend));
|
|
9054
|
+
i && e.suspend !== void 0 && n && (R.debug(`participant-sources-update: mediaType=${n}, suspend=${e.suspend}`), P.onRemoteStreamSuspended(i.externalId, n, e.suspend, this.id));
|
|
9061
9055
|
let s = e.streamId, c = e.rtpTimestamp ? this._getWaitingTime(s, e.rtpTimestamp) : 0;
|
|
9062
9056
|
if (c <= 0) {
|
|
9063
9057
|
this._streamWaitTimerByStreamDescription.delete(a);
|
|
@@ -9080,7 +9074,7 @@ var Oa = class {
|
|
|
9080
9074
|
stream: c,
|
|
9081
9075
|
mediaType: l
|
|
9082
9076
|
};
|
|
9083
|
-
n ? P.onLocalLive(o, t) : P.onRemoteLive(o, t);
|
|
9077
|
+
n ? P.onLocalLive(o, t, this.id) : P.onRemoteLive(o, t, this.id);
|
|
9084
9078
|
}
|
|
9085
9079
|
} else l === V.SCREEN ? P.onRemoteScreenStream(i.externalId, c, this.id) : n || P.onRemoteStream(i.externalId, c, this.id);
|
|
9086
9080
|
} else {
|
|
@@ -9408,19 +9402,19 @@ var Oa = class {
|
|
|
9408
9402
|
_onLocalMediaStreamChanged(e) {
|
|
9409
9403
|
if (!this._conversation || !this._mediaSource) return;
|
|
9410
9404
|
let t = this._mediaSource.mediaSettings;
|
|
9411
|
-
R.debug("Local media stream changed", t), e.kind === k.audio && this._mediaSource && (this._audioFix = new Oa(this._mediaSource)), P.onLocalStreamUpdate(t, e.kind), !this._conversation?.waitingHall && !this._conversation?.observer && !this._isAudienceModeListener() && this._changeMediaSettings(t);
|
|
9405
|
+
R.debug("Local media stream changed", t), e.kind === k.audio && this._mediaSource && (this._audioFix = new Oa(this._mediaSource)), P.onLocalStreamUpdate(t, e.kind, this.id), !this._conversation?.waitingHall && !this._conversation?.observer && !this._isAudienceModeListener() && this._changeMediaSettings(t);
|
|
9412
9406
|
}
|
|
9413
9407
|
_onScreenSharingStatus(e) {
|
|
9414
9408
|
let t = this.mediaSettings;
|
|
9415
9409
|
R.log("Screen sharing changed", e.track, t);
|
|
9416
9410
|
let n = e.track ? new MediaStream([e.track]) : null;
|
|
9417
|
-
P.onScreenStream(n, t);
|
|
9411
|
+
P.onScreenStream(n, t, this.id);
|
|
9418
9412
|
}
|
|
9419
9413
|
async _changeRemoteMediaSettings(e, t) {
|
|
9420
9414
|
R.debug(`Remote media settings changed [${e}]`, t);
|
|
9421
9415
|
let n = this._conversation?.externalId;
|
|
9422
9416
|
if (this._isMe(e) && n) {
|
|
9423
|
-
P.onLocalMediaSettings(n, t);
|
|
9417
|
+
P.onLocalMediaSettings(n, t, this.id);
|
|
9424
9418
|
return;
|
|
9425
9419
|
}
|
|
9426
9420
|
let r = await this._getParticipant(e);
|
|
@@ -9428,14 +9422,14 @@ var Oa = class {
|
|
|
9428
9422
|
this._warnParticipantNotInConversation(e);
|
|
9429
9423
|
return;
|
|
9430
9424
|
}
|
|
9431
|
-
r.mediaSettings = t, this._state === "ACTIVE" && P.onRemoteMediaSettings(r.externalId, t, r.markers), this._specListener && this._specListener.onChangeRemoteMediaSettings(e, t);
|
|
9425
|
+
r.mediaSettings = t, this._state === "ACTIVE" && P.onRemoteMediaSettings(r.externalId, t, r.markers, this.id), this._specListener && this._specListener.onChangeRemoteMediaSettings(e, t);
|
|
9432
9426
|
}
|
|
9433
9427
|
_extractLocalParticipantFromConnection(e) {
|
|
9434
9428
|
let t = this._api.getUserId();
|
|
9435
9429
|
return (e.conversation.participants || []).find((n) => n.id === t || S.comparePeerId(n.peerId, e.peerId));
|
|
9436
9430
|
}
|
|
9437
9431
|
_changeLocalParticipantState(e) {
|
|
9438
|
-
R.debug("Local participant state force changed by admin", e), this._state === "ACTIVE" && P.onLocalParticipantState(e);
|
|
9432
|
+
R.debug("Local participant state force changed by admin", e), this._state === "ACTIVE" && P.onLocalParticipantState(e, !1, this.id);
|
|
9439
9433
|
}
|
|
9440
9434
|
async _changeRemoteParticipantState(e, t) {
|
|
9441
9435
|
R.debug(`Remote participant state changed [${e}]`, t);
|
|
@@ -9444,7 +9438,7 @@ var Oa = class {
|
|
|
9444
9438
|
this._warnParticipantNotInConversation(e);
|
|
9445
9439
|
return;
|
|
9446
9440
|
}
|
|
9447
|
-
n.participantState = t || {}, this._state === "ACTIVE" && P.onRemoteParticipantState(n.externalId, n.participantState, n.markers);
|
|
9441
|
+
n.participantState = t || {}, this._state === "ACTIVE" && P.onRemoteParticipantState(n.externalId, n.participantState, n.markers, this.id);
|
|
9448
9442
|
}
|
|
9449
9443
|
async _changeMultipleParticipantState(e, t) {
|
|
9450
9444
|
R.debug("Multiple participants state changed", e);
|
|
@@ -9463,10 +9457,10 @@ var Oa = class {
|
|
|
9463
9457
|
markers: r.markers
|
|
9464
9458
|
});
|
|
9465
9459
|
}
|
|
9466
|
-
}), this._state === "ACTIVE" && (r && P.onLocalParticipantState(r, !0), n.length && P.onRemoteParticipantsState(n, t));
|
|
9460
|
+
}), this._state === "ACTIVE" && (r && P.onLocalParticipantState(r, !0, this.id), n.length && P.onRemoteParticipantsState(n, t, this.id));
|
|
9467
9461
|
}
|
|
9468
9462
|
_invokeRolesChangedCallbackIfNeeded(e) {
|
|
9469
|
-
this._state === "ACTIVE" && e.roles && e.roles.length && (R.debug(`Roles for participant [${e.id}] changed: ${e.roles}`), P.onRolesChanged(e.externalId, e.roles, !0));
|
|
9463
|
+
this._state === "ACTIVE" && e.roles && e.roles.length && (R.debug(`Roles for participant [${e.id}] changed: ${e.roles}`), P.onRolesChanged(e.externalId, e.roles, !0, this.id));
|
|
9470
9464
|
}
|
|
9471
9465
|
_onSignalingNotification(e) {
|
|
9472
9466
|
switch (e.notification) {
|
|
@@ -9522,7 +9516,7 @@ var Oa = class {
|
|
|
9522
9516
|
this._warnParticipantNotInConversation(e.adminId);
|
|
9523
9517
|
return;
|
|
9524
9518
|
}
|
|
9525
|
-
P.onPromotionApproved(t);
|
|
9519
|
+
P.onPromotionApproved(t, this.id);
|
|
9526
9520
|
}
|
|
9527
9521
|
async _onSignalingReconnect(e) {
|
|
9528
9522
|
if (!this._conversation) return;
|
|
@@ -9729,7 +9723,7 @@ var Oa = class {
|
|
|
9729
9723
|
}
|
|
9730
9724
|
async _onPeerRegistered(e) {
|
|
9731
9725
|
let t = S.composeMessageId(e), n = await this._getParticipant(t);
|
|
9732
|
-
n && (n.clientType = e.clientType, n.platform = e.platform), P.onPeerRegistered();
|
|
9726
|
+
n && (n.clientType = e.clientType, n.platform = e.platform), P.onPeerRegistered(this.id);
|
|
9733
9727
|
}
|
|
9734
9728
|
async _onMicSwitched(e) {
|
|
9735
9729
|
P.onDeviceSwitched(v.AUDIO, !e.mute, this.id), await this.toggleLocalAudio(!e.mute);
|
|
@@ -9740,7 +9734,7 @@ var Oa = class {
|
|
|
9740
9734
|
this._warnParticipantNotInConversation(t);
|
|
9741
9735
|
return;
|
|
9742
9736
|
}
|
|
9743
|
-
P.onChatMessage(e.message, n, e.direct);
|
|
9737
|
+
P.onChatMessage(e.message, n, e.direct, this.id);
|
|
9744
9738
|
}
|
|
9745
9739
|
async _onCustomData(e) {
|
|
9746
9740
|
if (Object.hasOwn(e.data, "sdk")) return;
|
|
@@ -9749,7 +9743,7 @@ var Oa = class {
|
|
|
9749
9743
|
this._warnParticipantNotInConversation(t);
|
|
9750
9744
|
return;
|
|
9751
9745
|
}
|
|
9752
|
-
P.onCustomData(e.data, n, e.direct);
|
|
9746
|
+
P.onCustomData(e.data, n, e.direct, this.id);
|
|
9753
9747
|
}
|
|
9754
9748
|
async _onRecordInfo(e, t = null) {
|
|
9755
9749
|
if (!this._conversation || !e) return;
|
|
@@ -9757,7 +9751,7 @@ var Oa = class {
|
|
|
9757
9751
|
if (n?.recordMovieId !== e?.recordMovieId || n?.recordStartTime !== e?.recordStartTime) {
|
|
9758
9752
|
this._conversation.recordsInfoByRoom.set(t, e);
|
|
9759
9753
|
let n = await this._getExternalIdByParticipantId(e.initiator);
|
|
9760
|
-
n ? P.onRecordStarted(n, e.recordMovieId, e.recordStartTime, e.recordType, e.recordExternalMovieId, e.recordExternalOwnerId, t) : this._warnParticipantNotInConversation(e.initiator);
|
|
9754
|
+
n ? P.onRecordStarted(n, e.recordMovieId, e.recordStartTime, e.recordType, e.recordExternalMovieId, e.recordExternalOwnerId, t, this.id) : this._warnParticipantNotInConversation(e.initiator);
|
|
9761
9755
|
}
|
|
9762
9756
|
}
|
|
9763
9757
|
async _onStopRecordInfo({ participant: e, recordMovieId: t }, n = null) {
|
|
@@ -9765,15 +9759,15 @@ var Oa = class {
|
|
|
9765
9759
|
let r = this._conversation.recordsInfoByRoom.get(n);
|
|
9766
9760
|
if (!(!r || r.recordMovieId !== t)) if (this._conversation.recordsInfoByRoom.set(n, null), e) {
|
|
9767
9761
|
let t = await this._getExternalIdByParticipantId(e);
|
|
9768
|
-
P.onRecordStopped(n, t ?? null);
|
|
9769
|
-
} else P.onRecordStopped(n, null);
|
|
9762
|
+
P.onRecordStopped(n, t ?? null, this.id);
|
|
9763
|
+
} else P.onRecordStopped(n, null, this.id);
|
|
9770
9764
|
}
|
|
9771
9765
|
async _changePinnedParticipantForRoom() {
|
|
9772
9766
|
if (!this._conversation) return;
|
|
9773
9767
|
let e = this._conversation.roomId, t = this._conversation.pinnedParticipantIdByRoom.get(e);
|
|
9774
9768
|
if (t && !this._isMe(t)) {
|
|
9775
9769
|
let n = await this._getExternalIdByParticipantId(t);
|
|
9776
|
-
n && P.onPinnedParticipant(n, !1, null, e);
|
|
9770
|
+
n && P.onPinnedParticipant(n, !1, null, e, this.id);
|
|
9777
9771
|
}
|
|
9778
9772
|
}
|
|
9779
9773
|
async _changeRecordInfoForRoom() {
|
|
@@ -9781,8 +9775,8 @@ var Oa = class {
|
|
|
9781
9775
|
let e = this._conversation.roomId, t = this._conversation.recordsInfoByRoom.get(e);
|
|
9782
9776
|
if (t) {
|
|
9783
9777
|
let n = await this._getExternalIdByParticipantId(t.initiator);
|
|
9784
|
-
n ? P.onRecordStarted(n, t.recordMovieId, t.recordStartTime, t.recordType, t.recordExternalMovieId, t.recordExternalOwnerId, e) : this._warnParticipantNotInConversation(t.initiator);
|
|
9785
|
-
} else P.onRecordStopped(e, null);
|
|
9778
|
+
n ? P.onRecordStarted(n, t.recordMovieId, t.recordStartTime, t.recordType, t.recordExternalMovieId, t.recordExternalOwnerId, e, this.id) : this._warnParticipantNotInConversation(t.initiator);
|
|
9779
|
+
} else P.onRecordStopped(e, null, this.id);
|
|
9786
9780
|
}
|
|
9787
9781
|
async _changeAsrInfoForRoom() {
|
|
9788
9782
|
if (!this._conversation) return;
|
|
@@ -9792,15 +9786,15 @@ var Oa = class {
|
|
|
9792
9786
|
n && P.onAsrSet({
|
|
9793
9787
|
externalId: n,
|
|
9794
9788
|
movieId: t.movieId
|
|
9795
|
-
}, e);
|
|
9796
|
-
} else P.onAsrSet(null, e);
|
|
9789
|
+
}, e, this.id);
|
|
9790
|
+
} else P.onAsrSet(null, e, this.id);
|
|
9797
9791
|
}
|
|
9798
9792
|
async _changeUrlSharingInfoForRoom() {
|
|
9799
9793
|
if (!this._conversation) return;
|
|
9800
9794
|
let { roomId: e } = this._conversation, { urlSharingInfoByRoom: t } = this._conversation, n = t.get(e);
|
|
9801
9795
|
if (n) {
|
|
9802
9796
|
let t = await this._getExternalIdByParticipantId(n.initiatorId);
|
|
9803
|
-
t && P.onRemoteSharedUrl(t, n.sharedUrl, e);
|
|
9797
|
+
t && P.onRemoteSharedUrl(t, n.sharedUrl, e, this.id);
|
|
9804
9798
|
}
|
|
9805
9799
|
}
|
|
9806
9800
|
async _onParticipantAnimojiChanged(e) {
|
|
@@ -9810,7 +9804,7 @@ var Oa = class {
|
|
|
9810
9804
|
this._warnParticipantNotInConversation(e.participantId);
|
|
9811
9805
|
return;
|
|
9812
9806
|
}
|
|
9813
|
-
P.onParticipantVmojiUpdate(t);
|
|
9807
|
+
P.onParticipantVmojiUpdate(t, this.id);
|
|
9814
9808
|
}
|
|
9815
9809
|
}
|
|
9816
9810
|
async _onAsrStart(e) {
|
|
@@ -9822,12 +9816,12 @@ var Oa = class {
|
|
|
9822
9816
|
this._warnParticipantNotInConversation(t.initiatorId);
|
|
9823
9817
|
return;
|
|
9824
9818
|
}
|
|
9825
|
-
P.onAsrStarted(r, t.movieId, n);
|
|
9819
|
+
P.onAsrStarted(r, t.movieId, n, this.id);
|
|
9826
9820
|
}
|
|
9827
9821
|
_onAsrStop(e) {
|
|
9828
9822
|
if (!this._conversation) return;
|
|
9829
9823
|
let t = e.roomId || null;
|
|
9830
|
-
t === null && (this._conversation.asrInfo = null), this._conversation.asrInfoByRoom.delete(t), P.onAsrStopped(t);
|
|
9824
|
+
t === null && (this._conversation.asrInfo = null), this._conversation.asrInfoByRoom.delete(t), P.onAsrStopped(t, this.id);
|
|
9831
9825
|
}
|
|
9832
9826
|
async _onAsrTranscription(e) {
|
|
9833
9827
|
if (!this._conversation) return;
|
|
@@ -9836,18 +9830,18 @@ var Oa = class {
|
|
|
9836
9830
|
this._warnParticipantNotInConversation(e.participantId);
|
|
9837
9831
|
return;
|
|
9838
9832
|
}
|
|
9839
|
-
P.onAsrTranscription(t, e.text, e.timestamp, e.duration);
|
|
9833
|
+
P.onAsrTranscription(t, e.text, e.timestamp, e.duration, this.id);
|
|
9840
9834
|
}
|
|
9841
9835
|
async _onRolesChanged(e, t) {
|
|
9842
9836
|
if (this._conversation && this._isMe(e) && !_a(this._conversation.roles, t)) {
|
|
9843
|
-
R.debug(`Local roles changed: ${t}`), this._conversation.roles = t, P.onLocalRolesChanged(t), this._processMuteState({
|
|
9837
|
+
R.debug(`Local roles changed: ${t}`), this._conversation.roles = t, P.onLocalRolesChanged(t, !1, this.id), this._processMuteState({
|
|
9844
9838
|
mediaOptions: xa(this._getMuteStatesForCurrentRoom(), fa.MUTE_PERMANENT),
|
|
9845
9839
|
stateUpdated: !0
|
|
9846
9840
|
}), S.includesOneOf(t, [ga.ADMIN, ga.CREATOR]) ? this._refreshRooms(!0) : t.length || this._onRoomSwitched(null);
|
|
9847
9841
|
return;
|
|
9848
9842
|
}
|
|
9849
9843
|
let n = await this._getParticipant(e);
|
|
9850
|
-
n && !_a(n.roles, t) && (R.debug(`Roles for participant [${e}] changed: ${t}`), n.roles = t, P.onRolesChanged(n.externalId, t));
|
|
9844
|
+
n && !_a(n.roles, t) && (R.debug(`Roles for participant [${e}] changed: ${t}`), n.roles = t, P.onRolesChanged(n.externalId, t, !1, this.id));
|
|
9851
9845
|
}
|
|
9852
9846
|
async _onMuteParticipant(e, t = !1) {
|
|
9853
9847
|
if (!this._conversation) return;
|
|
@@ -9861,12 +9855,12 @@ var Oa = class {
|
|
|
9861
9855
|
if (t) {
|
|
9862
9856
|
R.debug(`Mute states for participant [${e.participantId}] changed`, r);
|
|
9863
9857
|
let o = e.adminId ? await this._getExternalIdByParticipantId(e.adminId) : null;
|
|
9864
|
-
P.onMuteStates(r, i, a, n, e.unmute, t.externalId, o, e.stateUpdated, e.requestedMedia, e.roomId);
|
|
9858
|
+
P.onMuteStates(r, i, a, n, e.unmute, t.externalId, o, e.stateUpdated, e.requestedMedia, e.roomId, this.id);
|
|
9865
9859
|
}
|
|
9866
9860
|
return;
|
|
9867
9861
|
}
|
|
9868
9862
|
if (e.requestedMedia?.length || (n && !t ? this._setMuteStatesForRoomId(r, o) : n || (this._conversation.muteStatesPersonal = r)), e.adminId && this._isMe(e.adminId)) {
|
|
9869
|
-
n && P.onMuteStates(r, i, a, n, e.unmute, null, this._conversation.externalId, e.stateUpdated, e.requestedMedia, e.roomId);
|
|
9863
|
+
n && P.onMuteStates(r, i, a, n, e.unmute, null, this._conversation.externalId, e.stateUpdated, e.requestedMedia, e.roomId, this.id);
|
|
9870
9864
|
return;
|
|
9871
9865
|
}
|
|
9872
9866
|
await this._processMuteState({
|
|
@@ -9915,25 +9909,25 @@ var Oa = class {
|
|
|
9915
9909
|
break;
|
|
9916
9910
|
}
|
|
9917
9911
|
}
|
|
9918
|
-
P.onMuteStates(l, s, t, n, r, null, c, i, a, o);
|
|
9912
|
+
P.onMuteStates(l, s, t, n, r, null, c, i, a, o, this.id);
|
|
9919
9913
|
}
|
|
9920
9914
|
async _onPinParticipant(e, t = !1, n, r = null) {
|
|
9921
9915
|
if (!this._conversation) return;
|
|
9922
9916
|
let i = this._conversation.pinnedParticipantIdByRoom.get(r);
|
|
9923
|
-
if (i && i !== e) if (this._isMe(i)) P.onLocalPin(!0, r);
|
|
9917
|
+
if (i && i !== e) if (this._isMe(i)) P.onLocalPin(!0, r, this.id);
|
|
9924
9918
|
else {
|
|
9925
9919
|
let t = await this._getExternalIdByParticipantId(i);
|
|
9926
|
-
t && P.onPinnedParticipant(t, !0, this._denormalizeMarkers(e, n), r);
|
|
9920
|
+
t && P.onPinnedParticipant(t, !0, this._denormalizeMarkers(e, n), r, this.id);
|
|
9927
9921
|
}
|
|
9928
|
-
if (this._isMe(e)) P.onLocalPin(t, r);
|
|
9922
|
+
if (this._isMe(e)) P.onLocalPin(t, r, this.id);
|
|
9929
9923
|
else {
|
|
9930
9924
|
let i = await this._getExternalIdByParticipantId(e);
|
|
9931
|
-
i && P.onPinnedParticipant(i, t, this._denormalizeMarkers(e, n), r);
|
|
9925
|
+
i && P.onPinnedParticipant(i, t, this._denormalizeMarkers(e, n), r, this.id);
|
|
9932
9926
|
}
|
|
9933
9927
|
this._conversation.pinnedParticipantIdByRoom.set(r, t ? null : e);
|
|
9934
9928
|
}
|
|
9935
9929
|
_onOptionsChanged(e) {
|
|
9936
|
-
this._conversation && !ua(this._conversation.options, e) && (this._conversation.options = e, P.onOptionsChanged(e), e.includes(la.ADMIN_IS_HERE) ? this._conversation.restricted && this._conversation.waitingHall && P.onLocalStatus(A.WAITING_HALL, this.id) : e.includes(la.WAIT_FOR_ADMIN) && this._conversation.restricted && P.onLocalStatus(A.WAIT_FOR_ADMIN, this.id));
|
|
9930
|
+
this._conversation && !ua(this._conversation.options, e) && (this._conversation.options = e, P.onOptionsChanged(e, this.id), e.includes(la.ADMIN_IS_HERE) ? this._conversation.restricted && this._conversation.waitingHall && P.onLocalStatus(A.WAITING_HALL, this.id) : e.includes(la.WAIT_FOR_ADMIN) && this._conversation.restricted && P.onLocalStatus(A.WAIT_FOR_ADMIN, this.id));
|
|
9937
9931
|
}
|
|
9938
9932
|
async _onNetworkStatus(e) {
|
|
9939
9933
|
if (this._conversation) {
|
|
@@ -9943,7 +9937,7 @@ var Oa = class {
|
|
|
9943
9937
|
if (this._isMe(r) || r === "") e = this._conversation.networkRating;
|
|
9944
9938
|
else if (n[r]) e = n[r].networkRating;
|
|
9945
9939
|
else continue;
|
|
9946
|
-
if (e !== i) if (this._isMe(r) || r === "") this._conversation.networkRating = i, kr.getInstance().value = i, P.onLocalNetworkStatusChanged(i);
|
|
9940
|
+
if (e !== i) if (this._isMe(r) || r === "") this._conversation.networkRating = i, kr.getInstance().value = i, P.onLocalNetworkStatusChanged(i, this.id);
|
|
9947
9941
|
else {
|
|
9948
9942
|
let e = n[r];
|
|
9949
9943
|
e.networkRating = i, t.push({
|
|
@@ -9953,7 +9947,7 @@ var Oa = class {
|
|
|
9953
9947
|
}
|
|
9954
9948
|
}
|
|
9955
9949
|
if (t.length === 0) return;
|
|
9956
|
-
R.log("Received network status update: ", e), P.onNetworkStatusChanged(t);
|
|
9950
|
+
R.log("Received network status update: ", e), P.onNetworkStatusChanged(t, this.id);
|
|
9957
9951
|
}
|
|
9958
9952
|
}
|
|
9959
9953
|
async _onRemoteStreamSecond(e, t) {
|
|
@@ -9962,11 +9956,11 @@ var Oa = class {
|
|
|
9962
9956
|
}
|
|
9963
9957
|
async _onAnimojiStream(e, t) {
|
|
9964
9958
|
if (this._isMe(e) && this._mediaSource) {
|
|
9965
|
-
P.onVmojiStream(t, this._mediaSource.mediaSettings);
|
|
9959
|
+
P.onVmojiStream(t, this._mediaSource.mediaSettings, this.id);
|
|
9966
9960
|
return;
|
|
9967
9961
|
}
|
|
9968
9962
|
let n = await this._getParticipant(e);
|
|
9969
|
-
n && P.onRemoteVmojiStream(n.externalId, t);
|
|
9963
|
+
n && P.onRemoteVmojiStream(n.externalId, t, this.id);
|
|
9970
9964
|
}
|
|
9971
9965
|
async _onAnimojiError(e) {
|
|
9972
9966
|
try {
|
|
@@ -9974,7 +9968,7 @@ var Oa = class {
|
|
|
9974
9968
|
t && (delete e.participantId, P.onVmojiError({
|
|
9975
9969
|
...e,
|
|
9976
9970
|
externalId: t
|
|
9977
|
-
}));
|
|
9971
|
+
}, this.id));
|
|
9978
9972
|
} catch (e) {
|
|
9979
9973
|
R.warn("_onAnimojiError failed", e);
|
|
9980
9974
|
}
|
|
@@ -9989,10 +9983,10 @@ var Oa = class {
|
|
|
9989
9983
|
}
|
|
9990
9984
|
}
|
|
9991
9985
|
_changeFeaturesPerRole() {
|
|
9992
|
-
this._conversation && P.onFeaturesPerRoleChanged(this._conversation.featuresPerRole ?? {});
|
|
9986
|
+
this._conversation && P.onFeaturesPerRoleChanged(this._conversation.featuresPerRole ?? {}, this.id);
|
|
9993
9987
|
}
|
|
9994
9988
|
_changeNeedRate() {
|
|
9995
|
-
this._conversation && this._conversation.needRate && P.onRateNeeded();
|
|
9989
|
+
this._conversation && this._conversation.needRate && P.onRateNeeded(this.id);
|
|
9996
9990
|
}
|
|
9997
9991
|
async _onVolumesDetected(e) {
|
|
9998
9992
|
let t = [];
|
|
@@ -10003,7 +9997,7 @@ var Oa = class {
|
|
|
10003
9997
|
volume: r.real
|
|
10004
9998
|
});
|
|
10005
9999
|
}
|
|
10006
|
-
P.onVolumesDetected(t);
|
|
10000
|
+
P.onVolumesDetected(t, this.id);
|
|
10007
10001
|
}
|
|
10008
10002
|
async _onSpeakerChanged(e) {
|
|
10009
10003
|
this._activeSpeakerId = e;
|
|
@@ -10031,7 +10025,7 @@ var Oa = class {
|
|
|
10031
10025
|
this._state !== "HELD" && (e === q.CONNECTING && P.onLocalStatus(A.CONNECTING, this.id), e === q.RECONNECTING && P.onLocalStatus(A.RECONNECT, this.id), e === q.FAILED && this._transport && this._transport.allocated().length === 0 && (this._signaling.ready && await this._signaling.hangup(T.FAILED), this._close(new E(T.FAILED), "Transport failed")));
|
|
10032
10026
|
}
|
|
10033
10027
|
async _onRemoteTrackAdded(e, t, n) {
|
|
10034
|
-
if (e.endsWith(Cr.AUDIO_MIX)) R.debug("Remote audio mix track added"), this._audioOutput.add(e, n), P.onRemoteMixedAudioStream(t);
|
|
10028
|
+
if (e.endsWith(Cr.AUDIO_MIX)) R.debug("Remote audio mix track added"), this._audioOutput.add(e, n), P.onRemoteMixedAudioStream(t, this.id);
|
|
10035
10029
|
else if (e.startsWith(Cr.TRANSPARENT_AUDIO_TRACK_PREFIX)) R.debug(`Remote transparent audio track added: ${e}`), this._audioOutput.add(e, n);
|
|
10036
10030
|
else if (e.startsWith(Cr.PARTICIPANT_AGNOSTIC_TRACK_PREFIX)) R.debug(`Participant-agnostic track added: ${e}`), this._streamByStreamId.set(e, t);
|
|
10037
10031
|
else {
|
|
@@ -10104,7 +10098,7 @@ var Oa = class {
|
|
|
10104
10098
|
e && (R.debug("Toggle join availability", {
|
|
10105
10099
|
available: t,
|
|
10106
10100
|
chatId: e
|
|
10107
|
-
}), P.onJoinStatus(t, e));
|
|
10101
|
+
}), P.onJoinStatus(t, e, this.id));
|
|
10108
10102
|
}
|
|
10109
10103
|
async _updateDisplayLayoutFromCache(e) {
|
|
10110
10104
|
if (this._transport?.getTopology() !== J.SERVER) return;
|
|
@@ -10121,7 +10115,7 @@ var Oa = class {
|
|
|
10121
10115
|
r.length && P.onRemoteStatus(r, t, n, this.id);
|
|
10122
10116
|
}
|
|
10123
10117
|
_onJoinLinkChanged(e) {
|
|
10124
|
-
this._conversation && e.joinLink && (this._conversation.joinLink = e.joinLink), P.onJoinLinkChanged(e.joinLink);
|
|
10118
|
+
this._conversation && e.joinLink && (this._conversation.joinLink = e.joinLink), P.onJoinLinkChanged(e.joinLink, this.id);
|
|
10125
10119
|
}
|
|
10126
10120
|
async _onRoomsUpdated(e) {
|
|
10127
10121
|
if (this._isCalledState()) return;
|
|
@@ -10134,11 +10128,11 @@ var Oa = class {
|
|
|
10134
10128
|
deactivated: r?.deactivated
|
|
10135
10129
|
});
|
|
10136
10130
|
}
|
|
10137
|
-
P.onRoomsUpdated(t);
|
|
10131
|
+
P.onRoomsUpdated(t, this.id);
|
|
10138
10132
|
}
|
|
10139
10133
|
async _onRoomUpdated(e) {
|
|
10140
10134
|
let t = await this._convertRoomToExternal(e.room || null);
|
|
10141
|
-
e.events.some((e) => e === pa.UPDATE) && (e.muteStates !== void 0 && this._setMuteStatesForRoomId(e.muteStates, e.roomId), e.recordInfo !== void 0 && this._conversation?.recordsInfoByRoom.set(e.roomId, e.recordInfo), e.asrInfo !== void 0 && this._conversation?.asrInfoByRoom.set(e.roomId, e.asrInfo)), this._isCalledState() || P.onRoomUpdated(e.events, e.roomId, t, e.deactivate || null);
|
|
10135
|
+
e.events.some((e) => e === pa.UPDATE) && (e.muteStates !== void 0 && this._setMuteStatesForRoomId(e.muteStates, e.roomId), e.recordInfo !== void 0 && this._conversation?.recordsInfoByRoom.set(e.roomId, e.recordInfo), e.asrInfo !== void 0 && this._conversation?.asrInfoByRoom.set(e.roomId, e.asrInfo)), this._isCalledState() || P.onRoomUpdated(e.events, e.roomId, t, e.deactivate || null, this.id);
|
|
10142
10136
|
}
|
|
10143
10137
|
async _convertRoomToExternal(e) {
|
|
10144
10138
|
if (!e) return null;
|
|
@@ -10211,16 +10205,16 @@ var Oa = class {
|
|
|
10211
10205
|
removedParticipantMarkers: e?.removedParticipantMarkers,
|
|
10212
10206
|
removedParticipantIds: c
|
|
10213
10207
|
};
|
|
10214
|
-
this._isCalledState() || P.onRoomParticipantsUpdated(u);
|
|
10208
|
+
this._isCalledState() || P.onRoomParticipantsUpdated(u, this.id);
|
|
10215
10209
|
}
|
|
10216
10210
|
async _onRoomSwitched(e, t = !1) {
|
|
10217
10211
|
if (!this._conversation || this._conversation.roomId === e) return;
|
|
10218
10212
|
let n = this._conversation.roomId;
|
|
10219
10213
|
if (this._conversation.roomId = e, t && !this._isCalledState()) {
|
|
10220
|
-
P.onRoomStart(e);
|
|
10214
|
+
P.onRoomStart(e, this.id);
|
|
10221
10215
|
return;
|
|
10222
10216
|
}
|
|
10223
|
-
this._isCalledState() || P.onRoomSwitched(e), e !== null && !this._isCallAdmin() && await this._refreshRooms(!1), this._changePinnedParticipantForRoom(), this._changeRecordInfoForRoom(), this._changeMuteStatesForRoom(e, n), await this._changeAsrInfoForRoom(), await this._changeUrlSharingInfoForRoom();
|
|
10217
|
+
this._isCalledState() || P.onRoomSwitched(e, this.id), e !== null && !this._isCallAdmin() && await this._refreshRooms(!1), this._changePinnedParticipantForRoom(), this._changeRecordInfoForRoom(), this._changeMuteStatesForRoom(e, n), await this._changeAsrInfoForRoom(), await this._changeUrlSharingInfoForRoom();
|
|
10224
10218
|
}
|
|
10225
10219
|
async _refreshRooms(e) {
|
|
10226
10220
|
let t;
|
|
@@ -10235,7 +10229,7 @@ var Oa = class {
|
|
|
10235
10229
|
n && r.push(n);
|
|
10236
10230
|
}
|
|
10237
10231
|
}
|
|
10238
|
-
r.length && !this._isCalledState() && P.onRoomsUpdated({ [pa.UPDATE]: { rooms: r } });
|
|
10232
|
+
r.length && !this._isCalledState() && P.onRoomsUpdated({ [pa.UPDATE]: { rooms: r } }, this.id);
|
|
10239
10233
|
}
|
|
10240
10234
|
async _onFeedback(e) {
|
|
10241
10235
|
let t = [];
|
|
@@ -10253,7 +10247,7 @@ var Oa = class {
|
|
|
10253
10247
|
}
|
|
10254
10248
|
t.push(e);
|
|
10255
10249
|
}
|
|
10256
|
-
P.onFeedback(t, e.roomId);
|
|
10250
|
+
P.onFeedback(t, e.roomId, this.id);
|
|
10257
10251
|
}
|
|
10258
10252
|
async _onDecorativeParticipantIdChanged(e) {
|
|
10259
10253
|
if (!this._conversation || !e.decorativeParticipantId || !e.decorativeExternalParticipantId) return;
|
|
@@ -10265,14 +10259,14 @@ var Oa = class {
|
|
|
10265
10259
|
return;
|
|
10266
10260
|
}
|
|
10267
10261
|
let o = Z.fromSignaling(r, a.deviceIdx);
|
|
10268
|
-
if (P.onParticipantIdChanged(a, o), this._api.cacheExternalId(n, o), this._api.mapDecorativeId(n, t), i) this._conversation.externalId = o;
|
|
10262
|
+
if (P.onParticipantIdChanged(a, o, this.id), this._api.cacheExternalId(n, o), this._api.mapDecorativeId(n, t), i) this._conversation.externalId = o;
|
|
10269
10263
|
else {
|
|
10270
10264
|
let e = await this._getParticipants();
|
|
10271
10265
|
e[t].externalId = o;
|
|
10272
10266
|
}
|
|
10273
10267
|
}
|
|
10274
10268
|
_onVideoSuspendSuggest(e) {
|
|
10275
|
-
!this._conversation || this._conversation.topology !== J.SERVER || (R.debug("Video suspend suggested", e), P.onVideoSuspendSuggest(e.bandwidth));
|
|
10269
|
+
!this._conversation || this._conversation.topology !== J.SERVER || (R.debug("Video suspend suggested", e), P.onVideoSuspendSuggest(e.bandwidth, this.id));
|
|
10276
10270
|
}
|
|
10277
10271
|
async _onParticipantHold(e) {
|
|
10278
10272
|
R.debug("Participant hold suggested", e);
|