sip-connector 23.1.0 → 23.1.1
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.
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import Z from "debug";
|
|
2
2
|
import { TypedEvents as R } from "events-constructor";
|
|
3
|
-
import { CancelableRequest as Y, isCanceledError as
|
|
4
|
-
import { resolveRequesterByTimeout as
|
|
5
|
-
import { hasCanceledError as
|
|
6
|
-
import { createActor as
|
|
7
|
-
import { createStackPromises as
|
|
3
|
+
import { CancelableRequest as Y, isCanceledError as xe } from "@krivega/cancelable-promise";
|
|
4
|
+
import { resolveRequesterByTimeout as Qe, requesterByTimeoutsWithFailCalls as Ye, DelayRequester as Xe, hasCanceledError as Je, SetTimeoutRequest as ge } from "@krivega/timeout-requester";
|
|
5
|
+
import { hasCanceledError as ze, repeatedCallsAsync as ue } from "repeated-calls";
|
|
6
|
+
import { createActor as je, setup as G, assign as M } from "xstate";
|
|
7
|
+
import { createStackPromises as Te, isPromiseIsNotActualError as Ke } from "stack-promises";
|
|
8
8
|
import "ua-parser-js";
|
|
9
9
|
import "sequent-promises";
|
|
10
|
-
import
|
|
10
|
+
import Ze from "lodash";
|
|
11
11
|
const ee = "sip-connector", d = Z(ee), di = () => {
|
|
12
12
|
Z.enable(ee);
|
|
13
13
|
}, hi = () => {
|
|
14
14
|
Z.enable(`-${ee}`);
|
|
15
|
-
},
|
|
16
|
-
var W = /* @__PURE__ */ ((n) => (n.SPECTATOR = "SPECTATOR", n.PARTICIPANT = "PARTICIPANT", n))(W || {}), y = /* @__PURE__ */ ((n) => (n.SHARE_STATE = "application/vinteo.webrtc.sharedesktop", n.MAIN_CAM = "application/vinteo.webrtc.maincam", n.ENTER_ROOM = "application/vinteo.webrtc.roomname", n.MIC = "application/vinteo.webrtc.mic", n.USE_LICENSE = "application/vinteo.webrtc.uselic", n.PARTICIPANT_STATE = "application/vinteo.webrtc.partstate", n.NOTIFY = "application/vinteo.webrtc.notify", n))(y || {}), _ = /* @__PURE__ */ ((n) => (n.SHARE_STATE = "application/vinteo.webrtc.sharedesktop", n.MAIN_CAM = "application/vinteo.webrtc.maincam", n.CHANNELS = "application/vinteo.webrtc.channels", n.MEDIA_STATE = "application/vinteo.webrtc.mediastate", n.REFUSAL = "application/vinteo.webrtc.refusal", n.STATS = "application/vinteo.webrtc.stats", n))(_ || {}), f = /* @__PURE__ */ ((n) => (n.PAUSE_MAIN_CAM = "PAUSEMAINCAM", n.RESUME_MAIN_CAM = "RESUMEMAINCAM", n.MAX_MAIN_CAM_RESOLUTION = "MAXMAINCAMRESOLUTION", n.ADMIN_STOP_MAIN_CAM = "ADMINSTOPMAINCAM", n.ADMIN_START_MAIN_CAM = "ADMINSTARTMAINCAM", n))(f || {}), x = /* @__PURE__ */ ((n) => (n.ADMIN_STOP_MIC = "ADMINSTOPMIC", n.ADMIN_START_MIC = "ADMINSTARTMIC", n))(x || {}),
|
|
17
|
-
const
|
|
15
|
+
}, et = "Error decline with 603", tt = 1006, nt = (n) => typeof n == "object" && n !== null && "code" in n && n.code === tt, st = (n) => n.message === et;
|
|
16
|
+
var W = /* @__PURE__ */ ((n) => (n.SPECTATOR = "SPECTATOR", n.PARTICIPANT = "PARTICIPANT", n))(W || {}), y = /* @__PURE__ */ ((n) => (n.SHARE_STATE = "application/vinteo.webrtc.sharedesktop", n.MAIN_CAM = "application/vinteo.webrtc.maincam", n.ENTER_ROOM = "application/vinteo.webrtc.roomname", n.MIC = "application/vinteo.webrtc.mic", n.USE_LICENSE = "application/vinteo.webrtc.uselic", n.PARTICIPANT_STATE = "application/vinteo.webrtc.partstate", n.NOTIFY = "application/vinteo.webrtc.notify", n))(y || {}), _ = /* @__PURE__ */ ((n) => (n.SHARE_STATE = "application/vinteo.webrtc.sharedesktop", n.MAIN_CAM = "application/vinteo.webrtc.maincam", n.CHANNELS = "application/vinteo.webrtc.channels", n.MEDIA_STATE = "application/vinteo.webrtc.mediastate", n.REFUSAL = "application/vinteo.webrtc.refusal", n.STATS = "application/vinteo.webrtc.stats", n))(_ || {}), f = /* @__PURE__ */ ((n) => (n.PAUSE_MAIN_CAM = "PAUSEMAINCAM", n.RESUME_MAIN_CAM = "RESUMEMAINCAM", n.MAX_MAIN_CAM_RESOLUTION = "MAXMAINCAMRESOLUTION", n.ADMIN_STOP_MAIN_CAM = "ADMINSTOPMAINCAM", n.ADMIN_START_MAIN_CAM = "ADMINSTARTMAINCAM", n))(f || {}), x = /* @__PURE__ */ ((n) => (n.ADMIN_STOP_MIC = "ADMINSTOPMIC", n.ADMIN_START_MIC = "ADMINSTARTMIC", n))(x || {}), Ee = /* @__PURE__ */ ((n) => (n.H264 = "H264", n.VP8 = "VP8", n.VP9 = "VP9", n.AV1 = "AV1", n))(Ee || {}), h = /* @__PURE__ */ ((n) => (n.CONTENT_TYPE = "content-type", n.CONTENT_ENTER_ROOM = "x-webrtc-enter-room", n.CONTENT_USE_LICENSE = "X-WEBRTC-USE-LICENSE", n.PARTICIPANT_NAME = "X-WEBRTC-PARTICIPANT-NAME", n.INPUT_CHANNELS = "X-WEBRTC-INPUT-CHANNELS", n.OUTPUT_CHANNELS = "X-WEBRTC-OUTPUT-CHANNELS", n.MAIN_CAM = "X-WEBRTC-MAINCAM", n.MIC = "X-WEBRTC-MIC", n.MEDIA_SYNC = "X-WEBRTC-SYNC", n.MAIN_CAM_RESOLUTION = "X-WEBRTC-MAINCAM-RESOLUTION", n.MEDIA_STATE = "X-WEBRTC-MEDIA-STATE", n.MEDIA_TYPE = "X-Vinteo-Media-Type", n.MAIN_CAM_STATE = "X-Vinteo-MainCam-State", n.MIC_STATE = "X-Vinteo-Mic-State", n.CONTENT_PARTICIPANT_STATE = "X-WEBRTC-PARTSTATE", n.NOTIFY = "X-VINTEO-NOTIFY", n.CONTENT_ENABLE_MEDIA_DEVICE = "X-WEBRTC-REQUEST-ENABLE-MEDIA-DEVICE", n.CONTENTED_STREAM_STATE = "x-webrtc-share-state", n.CONTENTED_STREAM_CODEC = "x-webrtc-share-codec", n.AVAILABLE_INCOMING_BITRATE = "X-WEBRTC-AVAILABLE-INCOMING-BITRATE", n.AUDIO_TRACK_COUNT = "X-WEBRTC-AUDIO-TRACK-COUNT", n.VIDEO_TRACK_COUNT = "X-WEBRTC-VIDEO-TRACK-COUNT", n.TRACKS_DIRECTION = "X-WEBRTC-TRACKS-DIRECTION", n.AUDIO_ID = "X-WEBRTC-AUDIOID", n))(h || {}), $ = /* @__PURE__ */ ((n) => (n.AVAILABLE_CONTENTED_STREAM = "YOUCANRECEIVECONTENT", n.NOT_AVAILABLE_CONTENTED_STREAM = "CONTENTEND", n.MUST_STOP_PRESENTATION = "YOUMUSTSTOPSENDCONTENT", n))($ || {}), U = /* @__PURE__ */ ((n) => (n.AVAILABLE_CONTENTED_STREAM = "x-webrtc-share-state: YOUCANRECEIVECONTENT", n.NOT_AVAILABLE_CONTENTED_STREAM = "x-webrtc-share-state: CONTENTEND", n.ACK_PERMISSION_TO_START_PRESENTATION = "x-webrtc-share-state: LETMESTARTPRESENTATION", n.STOPPED_CLIENT_PRESENTATION = "x-webrtc-share-state: STOPPRESENTATION", n.ENABLE_MAIN_CAM = "X-WEBRTC-REQUEST-ENABLE-MEDIA-DEVICE: LETMESTARTMAINCAM", n))(U || {}), Q = /* @__PURE__ */ ((n) => (n.ADMIN_SYNC_FORCED = "1", n.ADMIN_SYNC_NOT_FORCED = "0", n))(Q || {}), Se = /* @__PURE__ */ ((n) => (n.AUDIO = "AUDIO", n.VIDEO = "VIDEO", n.AUDIOPLUSPRESENTATION = "AUDIOPLUSPRESENTATION", n))(Se || {}), g = /* @__PURE__ */ ((n) => (n.ENTER_ROOM = "enter-room", n.MAIN_CAM_CONTROL = "main-cam-control", n.USE_LICENSE = "use-license", n.NEW_DTMF = "new-dtmf", n.CONFERENCE_PARTICIPANT_TOKEN_ISSUED = "conference:participant-token-issued", n.CONTENTED_STREAM_AVAILABLE = "contented-stream:available", n.CONTENTED_STREAM_NOT_AVAILABLE = "contented-stream:not-available", n.PRESENTATION_MUST_STOP = "presentation:must-stop", n.CHANNELS_ALL = "channels:all", n.CHANNELS_NOTIFY = "channels:notify", n.PARTICIPANT_ADDED_TO_LIST_MODERATORS = "participant:added-to-list-moderators", n.PARTICIPANT_REMOVED_FROM_LIST_MODERATORS = "participant:removed-from-list-moderators", n.PARTICIPANT_MOVE_REQUEST_TO_STREAM = "participant:move-request-to-stream", n.PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS = "participant:move-request-to-spectators", n.PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS_SYNTHETIC = "participant:move-request-to-spectators-synthetic", n.PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS_WITH_AUDIO_ID = "participant:move-request-to-spectators-with-audio-id", n.PARTICIPANT_MOVE_REQUEST_TO_PARTICIPANTS = "participant:move-request-to-participants", n.PARTICIPATION_ACCEPTING_WORD_REQUEST = "participation:accepting-word-request", n.PARTICIPATION_CANCELLING_WORD_REQUEST = "participation:cancelling-word-request", n.WEBCAST_STARTED = "webcast:started", n.WEBCAST_STOPPED = "webcast:stopped", n.ACCOUNT_CHANGED = "account:changed", n.ACCOUNT_DELETED = "account:deleted", n.ADMIN_START_MAIN_CAM = "admin:start-main-cam", n.ADMIN_STOP_MAIN_CAM = "admin:stop-main-cam", n.ADMIN_START_MIC = "admin:start-mic", n.ADMIN_STOP_MIC = "admin:stop-mic", n.ADMIN_FORCE_SYNC_MEDIA_STATE = "admin:force-sync-media-state", n))(g || {});
|
|
17
|
+
const Ce = [
|
|
18
18
|
"enter-room",
|
|
19
19
|
"main-cam-control",
|
|
20
20
|
"use-license",
|
|
@@ -43,15 +43,15 @@ const pe = [
|
|
|
43
43
|
"admin:start-mic",
|
|
44
44
|
"admin:stop-mic",
|
|
45
45
|
"admin:force-sync-media-state"
|
|
46
|
-
],
|
|
46
|
+
], it = () => new R(Ce), rt = (n) => typeof n == "string" && n.trim().length > 0, L = (n, e) => {
|
|
47
47
|
const t = e.toLowerCase(), s = Object.entries(n).find(([, i]) => typeof i == "string" && i.toLowerCase() === t);
|
|
48
48
|
return s ? s[1] : void 0;
|
|
49
|
-
},
|
|
50
|
-
if (
|
|
49
|
+
}, at = (n) => typeof n == "string" && !Number.isNaN(Number(n)) && Number.isFinite(Number(n)), ot = (n) => {
|
|
50
|
+
if (at(n))
|
|
51
51
|
return Number(n);
|
|
52
52
|
}, N = (n, e) => {
|
|
53
53
|
const t = n.getHeader(e);
|
|
54
|
-
if (!
|
|
54
|
+
if (!rt(t))
|
|
55
55
|
return;
|
|
56
56
|
const s = t.toLowerCase();
|
|
57
57
|
switch (e) {
|
|
@@ -72,13 +72,13 @@ const pe = [
|
|
|
72
72
|
case h.AVAILABLE_INCOMING_BITRATE:
|
|
73
73
|
case h.AUDIO_TRACK_COUNT:
|
|
74
74
|
case h.VIDEO_TRACK_COUNT:
|
|
75
|
-
return
|
|
75
|
+
return ot(s);
|
|
76
76
|
case h.CONTENTED_STREAM_CODEC:
|
|
77
|
-
return L(
|
|
77
|
+
return L(Ee, s);
|
|
78
78
|
case h.CONTENT_TYPE:
|
|
79
79
|
return L(y, s);
|
|
80
80
|
case h.CONTENT_USE_LICENSE:
|
|
81
|
-
return L(
|
|
81
|
+
return L(Se, s);
|
|
82
82
|
case h.MAIN_CAM:
|
|
83
83
|
return L(f, s);
|
|
84
84
|
case h.MIC:
|
|
@@ -94,11 +94,11 @@ const pe = [
|
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
var I = /* @__PURE__ */ ((n) => (n.CHANNELS = "channels", n.WEBCAST_STARTED = "WebcastStarted", n.WEBCAST_STOPPED = "WebcastStopped", n.ACCOUNT_CHANGED = "accountChanged", n.ACCOUNT_DELETED = "accountDeleted", n.ADDED_TO_LIST_MODERATORS = "addedToListModerators", n.REMOVED_FROM_LIST_MODERATORS = "removedFromListModerators", n.ACCEPTING_WORD_REQUEST = "ParticipationRequestAccepted", n.CANCELLING_WORD_REQUEST = "ParticipationRequestRejected", n.MOVE_REQUEST_TO_STREAM = "ParticipantMovedToWebcast", n.CONFERENCE_PARTICIPANT_TOKEN_ISSUED = "ConferenceParticipantTokenIssued", n))(I || {});
|
|
97
|
-
class
|
|
97
|
+
class ct {
|
|
98
98
|
events;
|
|
99
99
|
callManager;
|
|
100
100
|
constructor() {
|
|
101
|
-
this.events =
|
|
101
|
+
this.events = it();
|
|
102
102
|
}
|
|
103
103
|
subscribe({
|
|
104
104
|
connectionManager: e,
|
|
@@ -199,7 +199,7 @@ class dt {
|
|
|
199
199
|
...e,
|
|
200
200
|
extraHeaders: s
|
|
201
201
|
}).catch((i) => {
|
|
202
|
-
if (
|
|
202
|
+
if (st(i))
|
|
203
203
|
throw i;
|
|
204
204
|
});
|
|
205
205
|
}
|
|
@@ -497,7 +497,7 @@ class V {
|
|
|
497
497
|
subscriptions = [];
|
|
498
498
|
stateChangeListeners = /* @__PURE__ */ new Set();
|
|
499
499
|
constructor(e) {
|
|
500
|
-
this.actor =
|
|
500
|
+
this.actor = je(e), this.actor.start(), this.addSubscription(
|
|
501
501
|
this.subscribe((t) => {
|
|
502
502
|
const s = t.value;
|
|
503
503
|
this.stateChangeListeners.forEach((i) => {
|
|
@@ -539,8 +539,8 @@ class V {
|
|
|
539
539
|
return this.subscriptions.push(t), t;
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
|
-
var
|
|
543
|
-
const
|
|
542
|
+
var dt = /* @__PURE__ */ ((n) => (n.IDLE = "call:idle", n.CONNECTING = "call:connecting", n.ACCEPTED = "call:accepted", n.IN_CALL = "call:inCall", n.ENDED = "call:ended", n.FAILED = "call:failed", n))(dt || {});
|
|
543
|
+
const ht = G({
|
|
544
544
|
types: {
|
|
545
545
|
context: {},
|
|
546
546
|
events: {}
|
|
@@ -623,9 +623,9 @@ const lt = G({
|
|
|
623
623
|
}
|
|
624
624
|
}
|
|
625
625
|
});
|
|
626
|
-
class
|
|
626
|
+
class lt extends V {
|
|
627
627
|
constructor(e) {
|
|
628
|
-
super(
|
|
628
|
+
super(ht), this.subscribeToEvents(e);
|
|
629
629
|
}
|
|
630
630
|
get isIdle() {
|
|
631
631
|
return this.state === "call:idle";
|
|
@@ -690,8 +690,8 @@ class gt extends V {
|
|
|
690
690
|
);
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
|
-
var S = /* @__PURE__ */ ((n) => (n.PEER_CONNECTION = "peerconnection", n.CONNECTING = "connecting", n.SENDING = "sending", n.PROGRESS = "progress", n.ACCEPTED = "accepted", n.CONFIRMED = "confirmed", n.ENDED = "ended", n.FAILED = "failed", n.NEW_DTMF = "newDTMF", n.NEW_INFO = "newInfo", n.HOLD = "hold", n.UNHOLD = "unhold", n.MUTED = "muted", n.UNMUTED = "unmuted", n.REINVITE = "reinvite", n.UPDATE = "update", n.REFER = "refer", n.REPLACES = "replaces", n.SDP = "sdp", n.ICE_CANDIDATE = "icecandidate", n.GET_USER_MEDIA_FAILED = "getusermediafailed", n.PEER_CONNECTION_CREATE_OFFER_FAILED = "peerconnection:createofferfailed", n.PEER_CONNECTION_CREATE_ANSWER_FAILED = "peerconnection:createanswerfailed", n.PEER_CONNECTION_SET_LOCAL_DESCRIPTION_FAILED = "peerconnection:setlocaldescriptionfailed", n.PEER_CONNECTION_SET_REMOTE_DESCRIPTION_FAILED = "peerconnection:setremotedescriptionfailed", n.START_PRESENTATION = "presentation:start", n.STARTED_PRESENTATION = "presentation:started", n.END_PRESENTATION = "presentation:end", n.ENDED_PRESENTATION = "presentation:ended", n.FAILED_PRESENTATION = "presentation:failed", n.PEER_CONNECTION_CONFIRMED = "peerconnection:confirmed", n.PEER_CONNECTION_ONTRACK = "peerconnection:ontrack", n.ENDED_FROM_SERVER = "ended:fromserver", n.CALL_STATUS_CHANGED = "call-status-changed", n.REMOTE_TRACKS_CHANGED = "remote-tracks-changed", n.REMOTE_STREAMS_CHANGED = "remote-streams-changed", n))(S || {}),
|
|
694
|
-
const
|
|
693
|
+
var S = /* @__PURE__ */ ((n) => (n.PEER_CONNECTION = "peerconnection", n.CONNECTING = "connecting", n.SENDING = "sending", n.PROGRESS = "progress", n.ACCEPTED = "accepted", n.CONFIRMED = "confirmed", n.ENDED = "ended", n.FAILED = "failed", n.NEW_DTMF = "newDTMF", n.NEW_INFO = "newInfo", n.HOLD = "hold", n.UNHOLD = "unhold", n.MUTED = "muted", n.UNMUTED = "unmuted", n.REINVITE = "reinvite", n.UPDATE = "update", n.REFER = "refer", n.REPLACES = "replaces", n.SDP = "sdp", n.ICE_CANDIDATE = "icecandidate", n.GET_USER_MEDIA_FAILED = "getusermediafailed", n.PEER_CONNECTION_CREATE_OFFER_FAILED = "peerconnection:createofferfailed", n.PEER_CONNECTION_CREATE_ANSWER_FAILED = "peerconnection:createanswerfailed", n.PEER_CONNECTION_SET_LOCAL_DESCRIPTION_FAILED = "peerconnection:setlocaldescriptionfailed", n.PEER_CONNECTION_SET_REMOTE_DESCRIPTION_FAILED = "peerconnection:setremotedescriptionfailed", n.START_PRESENTATION = "presentation:start", n.STARTED_PRESENTATION = "presentation:started", n.END_PRESENTATION = "presentation:end", n.ENDED_PRESENTATION = "presentation:ended", n.FAILED_PRESENTATION = "presentation:failed", n.PEER_CONNECTION_CONFIRMED = "peerconnection:confirmed", n.PEER_CONNECTION_ONTRACK = "peerconnection:ontrack", n.ENDED_FROM_SERVER = "ended:fromserver", n.CALL_STATUS_CHANGED = "call-status-changed", n.REMOTE_TRACKS_CHANGED = "remote-tracks-changed", n.REMOTE_STREAMS_CHANGED = "remote-streams-changed", n))(S || {}), gt = /* @__PURE__ */ ((n) => (n.LOCAL = "local", n.REMOTE = "remote", n.SYSTEM = "system", n))(gt || {});
|
|
694
|
+
const pe = [
|
|
695
695
|
"peerconnection",
|
|
696
696
|
"connecting",
|
|
697
697
|
"sending",
|
|
@@ -722,17 +722,17 @@ const me = [
|
|
|
722
722
|
"peerconnection:createanswerfailed",
|
|
723
723
|
"peerconnection:setlocaldescriptionfailed",
|
|
724
724
|
"peerconnection:setremotedescriptionfailed"
|
|
725
|
-
],
|
|
725
|
+
], ut = [
|
|
726
726
|
"peerconnection:confirmed",
|
|
727
727
|
"peerconnection:ontrack",
|
|
728
728
|
"ended:fromserver",
|
|
729
729
|
"call-status-changed",
|
|
730
730
|
"remote-tracks-changed",
|
|
731
731
|
"remote-streams-changed"
|
|
732
|
-
],
|
|
733
|
-
...
|
|
734
|
-
...
|
|
735
|
-
],
|
|
732
|
+
], me = [
|
|
733
|
+
...pe,
|
|
734
|
+
...ut
|
|
735
|
+
], Tt = () => new R(me), Et = (n, e) => {
|
|
736
736
|
n.getVideoTracks().forEach((s) => {
|
|
737
737
|
"contentHint" in s && s.contentHint !== e && (s.contentHint = e);
|
|
738
738
|
});
|
|
@@ -744,10 +744,10 @@ const me = [
|
|
|
744
744
|
if (!n || e === "recvonly" && t === "recvonly")
|
|
745
745
|
return;
|
|
746
746
|
const i = t === "recvonly" ? [] : n.getAudioTracks(), r = e === "recvonly" ? [] : n.getVideoTracks(), a = [...i, ...r], o = new MediaStream(a);
|
|
747
|
-
return o.getTracks = () => [...o.getAudioTracks(), ...o.getVideoTracks()], s && s !== "none" &&
|
|
747
|
+
return o.getTracks = () => [...o.getAudioTracks(), ...o.getVideoTracks()], s && s !== "none" && Et(o, s), o;
|
|
748
748
|
};
|
|
749
|
-
var
|
|
750
|
-
class
|
|
749
|
+
var Ne = /* @__PURE__ */ ((n) => (n.BYE = "Terminated", n.WEBRTC_ERROR = "WebRTC Error", n.CANCELED = "Canceled", n.REQUEST_TIMEOUT = "Request Timeout", n.REJECTED = "Rejected", n.REDIRECTED = "Redirected", n.UNAVAILABLE = "Unavailable", n.NOT_FOUND = "Not Found", n.ADDRESS_INCOMPLETE = "Address Incomplete", n.INCOMPATIBLE_SDP = "Incompatible SDP", n.BAD_MEDIA_DESCRIPTION = "Bad Media Description", n))(Ne || {});
|
|
750
|
+
class St {
|
|
751
751
|
events;
|
|
752
752
|
rtcSession;
|
|
753
753
|
disposers = /* @__PURE__ */ new Set();
|
|
@@ -812,7 +812,7 @@ class Ct {
|
|
|
812
812
|
const { rtcSession: e } = this;
|
|
813
813
|
if (e && !e.isEnded())
|
|
814
814
|
return e.terminateAsync({
|
|
815
|
-
cause:
|
|
815
|
+
cause: Ne.CANCELED
|
|
816
816
|
}).finally(() => {
|
|
817
817
|
this.reset();
|
|
818
818
|
});
|
|
@@ -899,7 +899,7 @@ class Ct {
|
|
|
899
899
|
});
|
|
900
900
|
subscribeToSessionEvents(e) {
|
|
901
901
|
this.events.eachTriggers((t, s) => {
|
|
902
|
-
const i =
|
|
902
|
+
const i = pe.find((r) => r === s);
|
|
903
903
|
i && (e.on(i, t), this.disposers.add(() => {
|
|
904
904
|
e.off(i, t);
|
|
905
905
|
}));
|
|
@@ -918,7 +918,7 @@ class Ct {
|
|
|
918
918
|
delete this.rtcSession, this.unsubscribeFromSessionEvents(), this.onReset();
|
|
919
919
|
};
|
|
920
920
|
}
|
|
921
|
-
class
|
|
921
|
+
class Ct {
|
|
922
922
|
config;
|
|
923
923
|
tools;
|
|
924
924
|
connection;
|
|
@@ -971,14 +971,14 @@ class pt {
|
|
|
971
971
|
return this.connection.addTransceiver(e, t);
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
|
-
const
|
|
975
|
-
const t =
|
|
974
|
+
const Ae = (n) => n.getSettings(), pt = (n, e) => {
|
|
975
|
+
const t = Ae(n);
|
|
976
976
|
let s = e;
|
|
977
977
|
s ??= n.label;
|
|
978
978
|
let i = t?.msid;
|
|
979
979
|
return i ??= s, i ??= n.id, i;
|
|
980
|
-
},
|
|
981
|
-
const t =
|
|
980
|
+
}, mt = (n, e) => {
|
|
981
|
+
const t = Ae(n);
|
|
982
982
|
let s = e;
|
|
983
983
|
return s ??= t?.msid, s ??= n.label, (s && s.length > 0 ? s : void 0) ?? n.id;
|
|
984
984
|
};
|
|
@@ -999,7 +999,7 @@ class se {
|
|
|
999
999
|
onRemoved: t,
|
|
1000
1000
|
streamHint: s
|
|
1001
1001
|
} = {}) {
|
|
1002
|
-
const i =
|
|
1002
|
+
const i = mt(e, s), r = pt(e, s);
|
|
1003
1003
|
if (this.trackToGroup.has(e.id))
|
|
1004
1004
|
return { isAddedTrack: !1, isAddedStream: !1 };
|
|
1005
1005
|
const a = this.getParticipantGroups(i), o = a.get(r), c = !o;
|
|
@@ -1069,9 +1069,9 @@ class se {
|
|
|
1069
1069
|
}
|
|
1070
1070
|
const J = {
|
|
1071
1071
|
type: "participant"
|
|
1072
|
-
},
|
|
1072
|
+
}, Nt = {
|
|
1073
1073
|
type: "spectator_synthetic"
|
|
1074
|
-
},
|
|
1074
|
+
}, At = (n) => ({
|
|
1075
1075
|
type: "spectator",
|
|
1076
1076
|
recvParams: n
|
|
1077
1077
|
});
|
|
@@ -1097,10 +1097,10 @@ class O {
|
|
|
1097
1097
|
this.changeRole(J);
|
|
1098
1098
|
}
|
|
1099
1099
|
setCallRoleSpectatorSynthetic() {
|
|
1100
|
-
this.changeRole(
|
|
1100
|
+
this.changeRole(Nt);
|
|
1101
1101
|
}
|
|
1102
1102
|
setCallRoleSpectator(e) {
|
|
1103
|
-
this.changeRole(
|
|
1103
|
+
this.changeRole(At(e));
|
|
1104
1104
|
}
|
|
1105
1105
|
changeRole(e) {
|
|
1106
1106
|
const t = this.role;
|
|
@@ -1127,13 +1127,13 @@ class O {
|
|
|
1127
1127
|
this.role = e, this.onRoleChanged?.({ previous: t, next: e });
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
|
-
const
|
|
1130
|
+
const Rt = (n, e) => {
|
|
1131
1131
|
if (!n || !e)
|
|
1132
1132
|
return n === e;
|
|
1133
1133
|
const t = n.mainStream?.id, s = e.mainStream?.id, i = n.contentedStream?.id, r = e.contentedStream?.id;
|
|
1134
1134
|
return t === s && i === r;
|
|
1135
1135
|
};
|
|
1136
|
-
class
|
|
1136
|
+
class It {
|
|
1137
1137
|
lastEmittedStreams;
|
|
1138
1138
|
/**
|
|
1139
1139
|
* Проверяет, изменились ли streams с последнего сохраненного состояния
|
|
@@ -1141,7 +1141,7 @@ class vt {
|
|
|
1141
1141
|
* @returns true, если streams изменились
|
|
1142
1142
|
*/
|
|
1143
1143
|
hasChanged(e) {
|
|
1144
|
-
return !
|
|
1144
|
+
return !Rt(this.lastEmittedStreams, e);
|
|
1145
1145
|
}
|
|
1146
1146
|
/**
|
|
1147
1147
|
* Сохраняет текущие streams как последнее эмитнутое состояние
|
|
@@ -1164,7 +1164,7 @@ class vt {
|
|
|
1164
1164
|
this.lastEmittedStreams = void 0;
|
|
1165
1165
|
}
|
|
1166
1166
|
}
|
|
1167
|
-
const
|
|
1167
|
+
const vt = "default", ft = "dual", Mt = "content_", _t = (n) => `${Mt}${n.toLowerCase()}`, bt = (n) => [...n.getTracks()].some((e) => e.label.includes(ft));
|
|
1168
1168
|
class Ot {
|
|
1169
1169
|
mainRemoteStreamsManager;
|
|
1170
1170
|
recvRemoteStreamsManager;
|
|
@@ -1182,7 +1182,7 @@ class Ot {
|
|
|
1182
1182
|
}) {
|
|
1183
1183
|
const t = this.mainRemoteStreamsManager;
|
|
1184
1184
|
return { manager: t, getRemoteStreams: () => {
|
|
1185
|
-
const i = t.getStreams(), r = i.find((o) => !
|
|
1185
|
+
const i = t.getStreams(), r = i.find((o) => !bt(o)), a = e.isAvailable ? i.find((o) => o !== r) : void 0;
|
|
1186
1186
|
return { mainStream: r, contentedStream: a };
|
|
1187
1187
|
} };
|
|
1188
1188
|
}
|
|
@@ -1191,7 +1191,7 @@ class Ot {
|
|
|
1191
1191
|
}) {
|
|
1192
1192
|
const t = this.recvRemoteStreamsManager;
|
|
1193
1193
|
return { manager: t, getRemoteStreams: () => {
|
|
1194
|
-
const r = t.getStreams(
|
|
1194
|
+
const r = t.getStreams(vt)[0], a = this.getRecvRemoteContentedStream({ stateInfo: e });
|
|
1195
1195
|
return { mainStream: r, contentedStream: a };
|
|
1196
1196
|
} };
|
|
1197
1197
|
}
|
|
@@ -1200,11 +1200,11 @@ class Ot {
|
|
|
1200
1200
|
}) {
|
|
1201
1201
|
if (!e.isAvailable || e.codec === void 0)
|
|
1202
1202
|
return;
|
|
1203
|
-
const t =
|
|
1203
|
+
const t = _t(e.codec);
|
|
1204
1204
|
return this.recvRemoteStreamsManager.getStreams(t)[0];
|
|
1205
1205
|
}
|
|
1206
1206
|
}
|
|
1207
|
-
const
|
|
1207
|
+
const ie = (n) => n.streams[0]?.id;
|
|
1208
1208
|
class Dt {
|
|
1209
1209
|
events;
|
|
1210
1210
|
callStateMachine;
|
|
@@ -1222,9 +1222,9 @@ class Dt {
|
|
|
1222
1222
|
mcuSession;
|
|
1223
1223
|
recvSession;
|
|
1224
1224
|
disposeRecvSessionTrackListener;
|
|
1225
|
-
streamsChangeTracker = new
|
|
1225
|
+
streamsChangeTracker = new It();
|
|
1226
1226
|
constructor(e, t) {
|
|
1227
|
-
this.conferenceStateManager = e, this.contentedStreamManager = t, this.events =
|
|
1227
|
+
this.conferenceStateManager = e, this.contentedStreamManager = t, this.events = Tt(), this.mcuSession = new St(this.events, { onReset: this.reset }), this.callStateMachine = new lt(this.events), this.streamsManagerProvider = new Ot(
|
|
1228
1228
|
this.mainRemoteStreamsManager,
|
|
1229
1229
|
this.recvRemoteStreamsManager
|
|
1230
1230
|
), this.subscribeCallStatusChange(), this.subscribeMcuRemoteTrackEvents(), this.subscribeContentedStreamEvents();
|
|
@@ -1326,7 +1326,7 @@ class Dt {
|
|
|
1326
1326
|
}
|
|
1327
1327
|
subscribeMcuRemoteTrackEvents() {
|
|
1328
1328
|
this.on(S.PEER_CONNECTION_ONTRACK, (e) => {
|
|
1329
|
-
this.addRemoteTrack(this.mainRemoteStreamsManager, e.track,
|
|
1329
|
+
this.addRemoteTrack(this.mainRemoteStreamsManager, e.track, ie(e));
|
|
1330
1330
|
});
|
|
1331
1331
|
}
|
|
1332
1332
|
addRemoteTrack(e, t, s) {
|
|
@@ -1379,7 +1379,7 @@ class Dt {
|
|
|
1379
1379
|
}
|
|
1380
1380
|
attachRecvSessionTracks(e) {
|
|
1381
1381
|
const { peerConnection: t } = e, s = (i) => {
|
|
1382
|
-
this.addRemoteTrack(this.recvRemoteStreamsManager, i.track,
|
|
1382
|
+
this.addRemoteTrack(this.recvRemoteStreamsManager, i.track, ie(i));
|
|
1383
1383
|
};
|
|
1384
1384
|
t.addEventListener("track", s), this.disposeRecvSessionTrackListener = () => {
|
|
1385
1385
|
t.removeEventListener("track", s);
|
|
@@ -1393,7 +1393,7 @@ class Dt {
|
|
|
1393
1393
|
const i = {
|
|
1394
1394
|
quality: "high",
|
|
1395
1395
|
audioChannel: e
|
|
1396
|
-
}, r = new
|
|
1396
|
+
}, r = new Ct(i, { sendOffer: t });
|
|
1397
1397
|
this.recvSession = r, this.recvRemoteStreamsManager.reset(), this.attachRecvSessionTracks(r), r.call(s).catch(() => {
|
|
1398
1398
|
this.stopRecvSession();
|
|
1399
1399
|
});
|
|
@@ -1430,16 +1430,16 @@ const Pt = (n, e) => (n.degradationPreference = e.degradationPreference, n), yt
|
|
|
1430
1430
|
for (let t = n.encodings.length; t < e; t += 1)
|
|
1431
1431
|
n.encodings.push({});
|
|
1432
1432
|
return n;
|
|
1433
|
-
},
|
|
1433
|
+
}, Re = (n) => (e, t) => t !== void 0 && e !== t || t === void 0 && e !== n, Lt = Re(), wt = (n, e) => {
|
|
1434
1434
|
if (Lt(n, e))
|
|
1435
1435
|
return n;
|
|
1436
1436
|
}, Ut = (n, e) => {
|
|
1437
1437
|
const t = n.maxBitrate, s = wt(e, t);
|
|
1438
1438
|
return s !== void 0 && (n.maxBitrate = s), n;
|
|
1439
|
-
},
|
|
1440
|
-
|
|
1439
|
+
}, Ie = 1, Ft = Re(
|
|
1440
|
+
Ie
|
|
1441
1441
|
), Bt = (n, e) => {
|
|
1442
|
-
const t = n === void 0 ? void 0 : Math.max(n,
|
|
1442
|
+
const t = n === void 0 ? void 0 : Math.max(n, Ie);
|
|
1443
1443
|
if (t !== void 0 && Ft(
|
|
1444
1444
|
t,
|
|
1445
1445
|
e
|
|
@@ -1481,7 +1481,7 @@ const Pt = (n, e) => (n.degradationPreference = e.degradationPreference, n), yt
|
|
|
1481
1481
|
$t(t, e), Pt(t, e);
|
|
1482
1482
|
const i = Gt(s, t);
|
|
1483
1483
|
return i && await n.setParameters(t), { parameters: t, isChanged: i };
|
|
1484
|
-
},
|
|
1484
|
+
}, ve = async (n, e, t) => {
|
|
1485
1485
|
const { isChanged: s, parameters: i } = await Vt(n, {
|
|
1486
1486
|
encodings: [
|
|
1487
1487
|
{
|
|
@@ -1494,16 +1494,16 @@ const Pt = (n, e) => (n.degradationPreference = e.degradationPreference, n), yt
|
|
|
1494
1494
|
}, qt = (n, e) => n.find((t) => t.track !== null && e.getTracks().includes(t.track)), Ht = async (n, e, t) => {
|
|
1495
1495
|
const s = qt(n, e);
|
|
1496
1496
|
if (s)
|
|
1497
|
-
return
|
|
1497
|
+
return ve(s, { maxBitrate: t });
|
|
1498
1498
|
};
|
|
1499
1499
|
var P = /* @__PURE__ */ ((n) => (n.START_PRESENTATION = "presentation:start", n.STARTED_PRESENTATION = "presentation:started", n.END_PRESENTATION = "presentation:end", n.ENDED_PRESENTATION = "presentation:ended", n.FAILED_PRESENTATION = "presentation:failed", n))(P || {});
|
|
1500
|
-
const
|
|
1500
|
+
const fe = [
|
|
1501
1501
|
"presentation:start",
|
|
1502
1502
|
"presentation:started",
|
|
1503
1503
|
"presentation:end",
|
|
1504
1504
|
"presentation:ended",
|
|
1505
1505
|
"presentation:failed"
|
|
1506
|
-
], Wt = () => new R(
|
|
1506
|
+
], Wt = () => new R(fe);
|
|
1507
1507
|
var xt = /* @__PURE__ */ ((n) => (n.IDLE = "presentation:idle", n.STARTING = "presentation:starting", n.ACTIVE = "presentation:active", n.STOPPING = "presentation:stopping", n.FAILED = "presentation:failed", n))(xt || {});
|
|
1508
1508
|
const Qt = G({
|
|
1509
1509
|
types: {
|
|
@@ -1902,7 +1902,7 @@ class Yt extends V {
|
|
|
1902
1902
|
);
|
|
1903
1903
|
}
|
|
1904
1904
|
}
|
|
1905
|
-
const Xt = 1, li = (n) =>
|
|
1905
|
+
const Xt = 1, li = (n) => ze(n);
|
|
1906
1906
|
class Jt {
|
|
1907
1907
|
events;
|
|
1908
1908
|
presentationStateMachine;
|
|
@@ -2023,7 +2023,7 @@ class Jt {
|
|
|
2023
2023
|
s,
|
|
2024
2024
|
i
|
|
2025
2025
|
), o = () => !!this.streamPresentationCurrent;
|
|
2026
|
-
return this.cancelableSendPresentationWithRepeatedCalls =
|
|
2026
|
+
return this.cancelableSendPresentationWithRepeatedCalls = ue({
|
|
2027
2027
|
targetFunction: a,
|
|
2028
2028
|
isComplete: o,
|
|
2029
2029
|
isRejectAsValid: !0,
|
|
@@ -2168,7 +2168,7 @@ class zt {
|
|
|
2168
2168
|
}
|
|
2169
2169
|
}
|
|
2170
2170
|
var C = /* @__PURE__ */ ((n) => (n.CONNECTING = "connecting", n.CONNECTED = "connected", n.DISCONNECTED = "disconnected", n.DISCONNECTING = "disconnecting", n.NEW_RTC_SESSION = "newRTCSession", n.REGISTERED = "registered", n.UNREGISTERED = "unregistered", n.REGISTRATION_FAILED = "registrationFailed", n.NEW_MESSAGE = "newMessage", n.SIP_EVENT = "sipEvent", n.CONNECT_STARTED = "connect-started", n.CONNECT_SUCCEEDED = "connect-succeeded", n.CONNECT_FAILED = "connect-failed", n.CONNECT_PARAMETERS_RESOLVE_SUCCESS = "connect-parameters-resolve-success", n.CONNECT_PARAMETERS_RESOLVE_FAILED = "connect-parameters-resolve-failed", n.CONNECTED_WITH_CONFIGURATION = "connected-with-configuration", n))(C || {});
|
|
2171
|
-
const
|
|
2171
|
+
const Me = [
|
|
2172
2172
|
"connecting",
|
|
2173
2173
|
"connected",
|
|
2174
2174
|
"disconnected",
|
|
@@ -2186,11 +2186,11 @@ const _e = [
|
|
|
2186
2186
|
"connect-parameters-resolve-success",
|
|
2187
2187
|
"connect-parameters-resolve-failed",
|
|
2188
2188
|
"connected-with-configuration"
|
|
2189
|
-
],
|
|
2189
|
+
], _e = [...Me, ...jt], Kt = () => new R(_e);
|
|
2190
2190
|
function Zt(n) {
|
|
2191
2191
|
return (e) => `sip:${e}@${n}`;
|
|
2192
2192
|
}
|
|
2193
|
-
const en = (n, e) => () => Math.floor(Math.random() * (e - n)) + n,
|
|
2193
|
+
const en = (n, e) => () => Math.floor(Math.random() * (e - n)) + n, be = (n) => n.trim().replaceAll(" ", "_"), tn = en(1e5, 99999999), nn = 3;
|
|
2194
2194
|
class sn {
|
|
2195
2195
|
cancelableConnectWithRepeatedCalls;
|
|
2196
2196
|
JsSIP;
|
|
@@ -2217,7 +2217,7 @@ class sn {
|
|
|
2217
2217
|
}
|
|
2218
2218
|
let r = !1;
|
|
2219
2219
|
const a = this.getConnectionConfiguration();
|
|
2220
|
-
e !== void 0 && e !== a?.displayName && (r = i.set("display_name",
|
|
2220
|
+
e !== void 0 && e !== a?.displayName && (r = i.set("display_name", be(e)), this.updateConnectionConfiguration("displayName", e));
|
|
2221
2221
|
const o = r;
|
|
2222
2222
|
o ? t(o) : s(new Error("nothing changed"));
|
|
2223
2223
|
});
|
|
@@ -2237,10 +2237,10 @@ class sn {
|
|
|
2237
2237
|
}
|
|
2238
2238
|
connectWithDuplicatedCalls = async (e, { callLimit: t = nn } = {}) => {
|
|
2239
2239
|
const s = async () => this.connectInner(e), i = (r) => {
|
|
2240
|
-
const c = this.getUa()?.isConnected() === !0 && this.hasEqualConnectionConfiguration(e), l = r != null && !
|
|
2240
|
+
const c = this.getUa()?.isConnected() === !0 && this.hasEqualConnectionConfiguration(e), l = r != null && !nt(r);
|
|
2241
2241
|
return c || l;
|
|
2242
2242
|
};
|
|
2243
|
-
return this.stateMachine.startConnect(), this.cancelableConnectWithRepeatedCalls =
|
|
2243
|
+
return this.stateMachine.startConnect(), this.cancelableConnectWithRepeatedCalls = ue({
|
|
2244
2244
|
targetFunction: s,
|
|
2245
2245
|
isComplete: i,
|
|
2246
2246
|
callLimit: t,
|
|
@@ -2345,8 +2345,8 @@ class sn {
|
|
|
2345
2345
|
});
|
|
2346
2346
|
}
|
|
2347
2347
|
}
|
|
2348
|
-
var rn = /* @__PURE__ */ ((n) => (n.IDLE = "connection:idle", n.PREPARING = "connection:preparing", n.CONNECTING = "connection:connecting", n.CONNECTED = "connection:connected", n.REGISTERED = "connection:registered", n.ESTABLISHED = "connection:established", n.DISCONNECTED = "connection:disconnected", n.FAILED = "connection:failed", n))(rn || {}),
|
|
2349
|
-
const an = Object.values(
|
|
2348
|
+
var rn = /* @__PURE__ */ ((n) => (n.IDLE = "connection:idle", n.PREPARING = "connection:preparing", n.CONNECTING = "connection:connecting", n.CONNECTED = "connection:connected", n.REGISTERED = "connection:registered", n.ESTABLISHED = "connection:established", n.DISCONNECTED = "connection:disconnected", n.FAILED = "connection:failed", n))(rn || {}), Oe = /* @__PURE__ */ ((n) => (n.START_CONNECT = "START_CONNECT", n.START_INIT_UA = "START_INIT_UA", n.UA_CONNECTED = "UA_CONNECTED", n.UA_REGISTERED = "UA_REGISTERED", n.UA_UNREGISTERED = "UA_UNREGISTERED", n.UA_DISCONNECTED = "UA_DISCONNECTED", n.CONNECTION_FAILED = "CONNECTION_FAILED", n.RESET = "RESET", n))(Oe || {});
|
|
2349
|
+
const an = Object.values(Oe), on = G({
|
|
2350
2350
|
types: {
|
|
2351
2351
|
context: {},
|
|
2352
2352
|
events: {}
|
|
@@ -3048,7 +3048,7 @@ class F {
|
|
|
3048
3048
|
password: t,
|
|
3049
3049
|
register: a,
|
|
3050
3050
|
uri: D,
|
|
3051
|
-
display_name:
|
|
3051
|
+
display_name: be(i),
|
|
3052
3052
|
user_agent: u,
|
|
3053
3053
|
sdpSemantics: "unified-plan",
|
|
3054
3054
|
sockets: [A],
|
|
@@ -3077,12 +3077,12 @@ class F {
|
|
|
3077
3077
|
extraHeaders: e.extraHeaders
|
|
3078
3078
|
});
|
|
3079
3079
|
return t.eachTriggers((a, o) => {
|
|
3080
|
-
const c =
|
|
3080
|
+
const c = Me.find((l) => l === o);
|
|
3081
3081
|
c && r.on(c, a);
|
|
3082
3082
|
}), { ua: r, helpers: i };
|
|
3083
3083
|
}
|
|
3084
3084
|
}
|
|
3085
|
-
const
|
|
3085
|
+
const De = "Not ready for connection", gn = (n) => n instanceof Error && n.message === De, un = () => new Error(De), Tn = async (n) => typeof n == "function" ? n() : n;
|
|
3086
3086
|
class En {
|
|
3087
3087
|
events;
|
|
3088
3088
|
ua;
|
|
@@ -3229,7 +3229,7 @@ class En {
|
|
|
3229
3229
|
}
|
|
3230
3230
|
class Sn {
|
|
3231
3231
|
connectionManager;
|
|
3232
|
-
stackPromises =
|
|
3232
|
+
stackPromises = Te({
|
|
3233
3233
|
noRunIsNotActual: !0
|
|
3234
3234
|
});
|
|
3235
3235
|
constructor({ connectionManager: e }) {
|
|
@@ -3241,10 +3241,10 @@ class Sn {
|
|
|
3241
3241
|
this.stackPromises.stop();
|
|
3242
3242
|
}
|
|
3243
3243
|
}
|
|
3244
|
-
const
|
|
3244
|
+
const re = 0, Cn = 30;
|
|
3245
3245
|
class pn {
|
|
3246
|
-
countInner =
|
|
3247
|
-
initialCount =
|
|
3246
|
+
countInner = re;
|
|
3247
|
+
initialCount = re;
|
|
3248
3248
|
limitInner = Cn;
|
|
3249
3249
|
isInProgress = !1;
|
|
3250
3250
|
onStatusChange;
|
|
@@ -3294,7 +3294,7 @@ class mn {
|
|
|
3294
3294
|
onSuccessRequest: t,
|
|
3295
3295
|
onFailRequest: s
|
|
3296
3296
|
}) {
|
|
3297
|
-
this.stop(), this.cancelableBeforeRequest = new Y(e), this.checkTelephonyByTimeout =
|
|
3297
|
+
this.stop(), this.cancelableBeforeRequest = new Y(e), this.checkTelephonyByTimeout = Qe({
|
|
3298
3298
|
isDontStopOnFail: !0,
|
|
3299
3299
|
requestInterval: this.interval,
|
|
3300
3300
|
request: async () => {
|
|
@@ -3315,7 +3315,7 @@ class mn {
|
|
|
3315
3315
|
}
|
|
3316
3316
|
}
|
|
3317
3317
|
var v = /* @__PURE__ */ ((n) => (n.BEFORE_ATTEMPT = "before-attempt", n.SUCCESS = "success", n.FAILED_ALL_ATTEMPTS = "failed-all-attempts", n.CANCELLED_ATTEMPTS = "cancelled-attempts", n.CHANGED_ATTEMPT_STATUS = "changed-attempt-status", n.STOP_ATTEMPTS_BY_ERROR = "stop-attempts-by-error", n.LIMIT_REACHED_ATTEMPTS = "limit-reached-attempts", n))(v || {});
|
|
3318
|
-
const
|
|
3318
|
+
const Pe = [
|
|
3319
3319
|
"before-attempt",
|
|
3320
3320
|
"success",
|
|
3321
3321
|
"failed-all-attempts",
|
|
@@ -3323,7 +3323,7 @@ const ye = [
|
|
|
3323
3323
|
"changed-attempt-status",
|
|
3324
3324
|
"stop-attempts-by-error",
|
|
3325
3325
|
"limit-reached-attempts"
|
|
3326
|
-
], Nn = () => new R(
|
|
3326
|
+
], Nn = () => new R(Pe);
|
|
3327
3327
|
class te {
|
|
3328
3328
|
callManager;
|
|
3329
3329
|
disposers = [];
|
|
@@ -3354,7 +3354,7 @@ class In {
|
|
|
3354
3354
|
connectionManager;
|
|
3355
3355
|
pingServerByTimeoutWithFailCalls;
|
|
3356
3356
|
constructor({ connectionManager: e }) {
|
|
3357
|
-
this.connectionManager = e, this.pingServerByTimeoutWithFailCalls =
|
|
3357
|
+
this.connectionManager = e, this.pingServerByTimeoutWithFailCalls = Ye(Rn, {
|
|
3358
3358
|
whenPossibleRequest: async () => {
|
|
3359
3359
|
},
|
|
3360
3360
|
requestInterval: An,
|
|
@@ -3434,7 +3434,7 @@ class fn {
|
|
|
3434
3434
|
this.isRegistrationFailed = !1;
|
|
3435
3435
|
}
|
|
3436
3436
|
}
|
|
3437
|
-
const Mn = 3e3, _n = 15e3,
|
|
3437
|
+
const Mn = 3e3, _n = 15e3, ae = {
|
|
3438
3438
|
LIMIT_REACHED: "Limit reached",
|
|
3439
3439
|
FAILED_TO_RECONNECT: "Failed to reconnect"
|
|
3440
3440
|
}, bn = async () => {
|
|
@@ -3471,7 +3471,7 @@ class Dn {
|
|
|
3471
3471
|
callManager: s
|
|
3472
3472
|
}), this.attemptsState = new pn({
|
|
3473
3473
|
onStatusChange: this.emitStatusChange
|
|
3474
|
-
}), this.cancelableRequestBeforeRetry = new Y(r), this.delayBetweenAttempts = new
|
|
3474
|
+
}), this.cancelableRequestBeforeRetry = new Y(r), this.delayBetweenAttempts = new Xe(
|
|
3475
3475
|
i?.timeoutBetweenAttempts ?? Mn
|
|
3476
3476
|
), this.notActiveCallSubscriber = new te({ callManager: s });
|
|
3477
3477
|
}
|
|
@@ -3546,14 +3546,14 @@ class Dn {
|
|
|
3546
3546
|
d("executeConnectionAttempt: error does not allow retry", e), this.attemptsState.finishAttempt(), this.events.trigger(v.STOP_ATTEMPTS_BY_ERROR, e);
|
|
3547
3547
|
return;
|
|
3548
3548
|
}
|
|
3549
|
-
if (
|
|
3549
|
+
if (Ke(e)) {
|
|
3550
3550
|
d("executeConnectionAttempt: not actual error", e), this.attemptsState.finishAttempt(), this.events.trigger(v.CANCELLED_ATTEMPTS, e);
|
|
3551
3551
|
return;
|
|
3552
3552
|
}
|
|
3553
3553
|
d("executeConnectionAttempt: error", e), this.scheduleReconnect(t);
|
|
3554
3554
|
}
|
|
3555
3555
|
handleLimitReached(e) {
|
|
3556
|
-
this.attemptsState.finishAttempt(), this.events.trigger(v.LIMIT_REACHED_ATTEMPTS, new Error(
|
|
3556
|
+
this.attemptsState.finishAttempt(), this.events.trigger(v.LIMIT_REACHED_ATTEMPTS, new Error(ae.LIMIT_REACHED)), this.startCheckTelephony(e);
|
|
3557
3557
|
}
|
|
3558
3558
|
handleSucceededAttempt(e) {
|
|
3559
3559
|
d("handleSucceededAttempt"), this.subscribeToConnectTriggers(e), this.events.trigger(v.SUCCESS);
|
|
@@ -3614,8 +3614,8 @@ class Dn {
|
|
|
3614
3614
|
}
|
|
3615
3615
|
scheduleReconnect(e) {
|
|
3616
3616
|
d("scheduleReconnect"), this.delayBetweenAttempts.request().then(async () => (d("scheduleReconnect: delayBetweenAttempts success"), this.cancelableRequestBeforeRetry.request())).then(async () => (d("scheduleReconnect: onBeforeRetry success"), this.attemptConnection(e))).catch((t) => {
|
|
3617
|
-
const s = t instanceof Error ? t : new Error(
|
|
3618
|
-
this.attemptsState.finishAttempt(),
|
|
3617
|
+
const s = t instanceof Error ? t : new Error(ae.FAILED_TO_RECONNECT);
|
|
3618
|
+
this.attemptsState.finishAttempt(), xe(t) || Je(t) ? this.events.trigger(v.CANCELLED_ATTEMPTS, s) : this.events.trigger(v.FAILED_ALL_ATTEMPTS, s), d("scheduleReconnect: error", t);
|
|
3619
3619
|
});
|
|
3620
3620
|
}
|
|
3621
3621
|
isConnectionUnavailable() {
|
|
@@ -3627,7 +3627,7 @@ class Dn {
|
|
|
3627
3627
|
};
|
|
3628
3628
|
}
|
|
3629
3629
|
var j = /* @__PURE__ */ ((n) => (n.STATE_CHANGED = "state-changed", n.STATE_RESET = "state-reset", n))(j || {});
|
|
3630
|
-
const
|
|
3630
|
+
const ye = ["state-changed", "state-reset"], Pn = () => new R(ye);
|
|
3631
3631
|
class yn {
|
|
3632
3632
|
events;
|
|
3633
3633
|
state = {};
|
|
@@ -3810,12 +3810,12 @@ class Bn {
|
|
|
3810
3810
|
}
|
|
3811
3811
|
}
|
|
3812
3812
|
var k = /* @__PURE__ */ ((n) => (n.RINGING = "ringing", n.DECLINED_INCOMING_CALL = "declinedIncomingCall", n.TERMINATED_INCOMING_CALL = "terminatedIncomingCall", n.FAILED_INCOMING_CALL = "failedIncomingCall", n))(k || {});
|
|
3813
|
-
const
|
|
3813
|
+
const Le = [
|
|
3814
3814
|
"ringing",
|
|
3815
3815
|
"declinedIncomingCall",
|
|
3816
3816
|
"terminatedIncomingCall",
|
|
3817
3817
|
"failedIncomingCall"
|
|
3818
|
-
], kn = () => new R(
|
|
3818
|
+
], kn = () => new R(Le);
|
|
3819
3819
|
var $n = /* @__PURE__ */ ((n) => (n.IDLE = "incoming:idle", n.RINGING = "incoming:ringing", n.CONSUMED = "incoming:consumed", n.DECLINED = "incoming:declined", n.TERMINATED = "incoming:terminated", n.FAILED = "incoming:failed", n))($n || {});
|
|
3820
3820
|
const Gn = G({
|
|
3821
3821
|
types: {
|
|
@@ -4331,8 +4331,8 @@ class Wn {
|
|
|
4331
4331
|
delete this.incomingRTCSession;
|
|
4332
4332
|
}
|
|
4333
4333
|
}
|
|
4334
|
-
var
|
|
4335
|
-
const
|
|
4334
|
+
var we = /* @__PURE__ */ ((n) => (n.SNAPSHOT_CHANGED = "snapshot-changed", n))(we || {});
|
|
4335
|
+
const Ue = ["snapshot-changed"], xn = () => new R(Ue), Qn = (n, e) => Object.is(n, e), oe = (n) => ({
|
|
4336
4336
|
connection: n.connection.getSnapshot(),
|
|
4337
4337
|
call: n.call.getSnapshot(),
|
|
4338
4338
|
incoming: n.incoming.getSnapshot(),
|
|
@@ -4350,7 +4350,7 @@ class Yn {
|
|
|
4350
4350
|
call: e.callManager.callActor,
|
|
4351
4351
|
incoming: e.incomingCallManager.incomingActor,
|
|
4352
4352
|
presentation: e.presentationManager.presentationActor
|
|
4353
|
-
}, this.currentSnapshot =
|
|
4353
|
+
}, this.currentSnapshot = oe(this.actors), this.actorSubscriptions.push(
|
|
4354
4354
|
this.actors.connection.subscribe(this.notifySubscribers),
|
|
4355
4355
|
this.actors.call.subscribe(this.notifySubscribers),
|
|
4356
4356
|
this.actors.incoming.subscribe(this.notifySubscribers),
|
|
@@ -4384,12 +4384,12 @@ class Yn {
|
|
|
4384
4384
|
}
|
|
4385
4385
|
notifySubscribers = () => {
|
|
4386
4386
|
const e = this.currentSnapshot;
|
|
4387
|
-
this.currentSnapshot =
|
|
4387
|
+
this.currentSnapshot = oe(this.actors);
|
|
4388
4388
|
for (const t of this.subscribers) {
|
|
4389
4389
|
const s = t.selector(this.currentSnapshot);
|
|
4390
4390
|
t.equals(t.current, s) || (t.current = s, t.listener(s));
|
|
4391
4391
|
}
|
|
4392
|
-
this.events.trigger(
|
|
4392
|
+
this.events.trigger(we.SNAPSHOT_CHANGED, {
|
|
4393
4393
|
previous: e,
|
|
4394
4394
|
current: this.currentSnapshot
|
|
4395
4395
|
});
|
|
@@ -4397,7 +4397,7 @@ class Yn {
|
|
|
4397
4397
|
}
|
|
4398
4398
|
const B = 1e3;
|
|
4399
4399
|
var p = /* @__PURE__ */ ((n) => (n.INBOUND_RTP = "inbound-rtp", n.REMOTE_OUTBOUND_RTP = "remote-outbound-rtp", n.MEDIA_SOURCE = "media-source", n.OUTBOUND_RTP = "outbound-rtp", n.REMOTE_INBOUND_RTP = "remote-inbound-rtp", n.CODEC = "codec", n.CANDIDATE_PAIR = "candidate-pair", n.CERTIFICATE = "certificate", n.TRANSPORT = "transport", n.LOCAL_CANDIDATE = "local-candidate", n.REMOTE_CANDIDATE = "remote-candidate", n))(p || {});
|
|
4400
|
-
const
|
|
4400
|
+
const Fe = ["collected"], Xn = () => new R(Fe), Jn = "api/v2/rtp2webrtc/offer", zn = async ({
|
|
4401
4401
|
serverUrl: n,
|
|
4402
4402
|
conferenceNumber: e,
|
|
4403
4403
|
quality: t,
|
|
@@ -4429,7 +4429,7 @@ const Be = ["collected"], Xn = () => new R(Be), Jn = "api/v2/rtp2webrtc/offer",
|
|
|
4429
4429
|
return l;
|
|
4430
4430
|
}
|
|
4431
4431
|
};
|
|
4432
|
-
},
|
|
4432
|
+
}, ce = () => "performance" in window ? performance.now() : Date.now(), q = (n) => [...n.keys()].reduce((e, t) => {
|
|
4433
4433
|
const s = n.get(t);
|
|
4434
4434
|
return s === void 0 ? e : { ...e, [s.type]: s };
|
|
4435
4435
|
}, {}), jn = (n) => {
|
|
@@ -4447,7 +4447,7 @@ const Be = ["collected"], Xn = () => new R(Be), Jn = "api/v2/rtp2webrtc/offer",
|
|
|
4447
4447
|
mediaSource: e[p.MEDIA_SOURCE],
|
|
4448
4448
|
remoteInboundRtp: e[p.REMOTE_INBOUND_RTP]
|
|
4449
4449
|
};
|
|
4450
|
-
},
|
|
4450
|
+
}, de = (n) => {
|
|
4451
4451
|
if (!n)
|
|
4452
4452
|
return {
|
|
4453
4453
|
outboundRtp: void 0,
|
|
@@ -4462,7 +4462,7 @@ const Be = ["collected"], Xn = () => new R(Be), Jn = "api/v2/rtp2webrtc/offer",
|
|
|
4462
4462
|
mediaSource: e[p.MEDIA_SOURCE],
|
|
4463
4463
|
remoteInboundRtp: e[p.REMOTE_INBOUND_RTP]
|
|
4464
4464
|
};
|
|
4465
|
-
},
|
|
4465
|
+
}, he = ({
|
|
4466
4466
|
videoReceiversStats: n,
|
|
4467
4467
|
synchronizationSourcesVideo: e
|
|
4468
4468
|
}) => {
|
|
@@ -4496,7 +4496,7 @@ const Be = ["collected"], Xn = () => new R(Be), Jn = "api/v2/rtp2webrtc/offer",
|
|
|
4496
4496
|
remoteOutboundRtp: t[p.REMOTE_OUTBOUND_RTP],
|
|
4497
4497
|
synchronizationSources: e
|
|
4498
4498
|
};
|
|
4499
|
-
},
|
|
4499
|
+
}, Be = (n) => {
|
|
4500
4500
|
if (!n)
|
|
4501
4501
|
return {
|
|
4502
4502
|
candidatePair: void 0,
|
|
@@ -4518,10 +4518,10 @@ const Be = ["collected"], Xn = () => new R(Be), Jn = "api/v2/rtp2webrtc/offer",
|
|
|
4518
4518
|
videoSenderFirstStats: e,
|
|
4519
4519
|
videoSenderSecondStats: t
|
|
4520
4520
|
}) => ({
|
|
4521
|
-
video:
|
|
4522
|
-
secondVideo:
|
|
4521
|
+
video: de(e),
|
|
4522
|
+
secondVideo: de(t),
|
|
4523
4523
|
audio: jn(n),
|
|
4524
|
-
additional:
|
|
4524
|
+
additional: Be(
|
|
4525
4525
|
n ?? e ?? t
|
|
4526
4526
|
)
|
|
4527
4527
|
}), es = ({
|
|
@@ -4530,11 +4530,11 @@ const Be = ["collected"], Xn = () => new R(Be), Jn = "api/v2/rtp2webrtc/offer",
|
|
|
4530
4530
|
videoReceiverSecondStats: t,
|
|
4531
4531
|
synchronizationSources: s
|
|
4532
4532
|
}) => ({
|
|
4533
|
-
video:
|
|
4533
|
+
video: he({
|
|
4534
4534
|
videoReceiversStats: e,
|
|
4535
4535
|
synchronizationSourcesVideo: s.video
|
|
4536
4536
|
}),
|
|
4537
|
-
secondVideo:
|
|
4537
|
+
secondVideo: he({
|
|
4538
4538
|
videoReceiversStats: t,
|
|
4539
4539
|
synchronizationSourcesVideo: s.video
|
|
4540
4540
|
}),
|
|
@@ -4542,7 +4542,7 @@ const Be = ["collected"], Xn = () => new R(Be), Jn = "api/v2/rtp2webrtc/offer",
|
|
|
4542
4542
|
audioReceiverStats: n,
|
|
4543
4543
|
synchronizationSourcesAudio: s.audio
|
|
4544
4544
|
}),
|
|
4545
|
-
additional:
|
|
4545
|
+
additional: Be(
|
|
4546
4546
|
n ?? e ?? t
|
|
4547
4547
|
)
|
|
4548
4548
|
}), ts = ({
|
|
@@ -4593,7 +4593,7 @@ const Be = ["collected"], Xn = () => new R(Be), Jn = "api/v2/rtp2webrtc/offer",
|
|
|
4593
4593
|
A,
|
|
4594
4594
|
w,
|
|
4595
4595
|
X,
|
|
4596
|
-
|
|
4596
|
+
We
|
|
4597
4597
|
] = E;
|
|
4598
4598
|
return {
|
|
4599
4599
|
synchronizationSources: u,
|
|
@@ -4602,7 +4602,7 @@ const Be = ["collected"], Xn = () => new R(Be), Jn = "api/v2/rtp2webrtc/offer",
|
|
|
4602
4602
|
videoSenderSecondStats: A,
|
|
4603
4603
|
audioReceiverStats: w,
|
|
4604
4604
|
videoReceiverFirstStats: X,
|
|
4605
|
-
videoReceiverSecondStats:
|
|
4605
|
+
videoReceiverSecondStats: We
|
|
4606
4606
|
};
|
|
4607
4607
|
});
|
|
4608
4608
|
}, ss = (n) => {
|
|
@@ -4613,7 +4613,7 @@ class is {
|
|
|
4613
4613
|
setTimeoutRequest;
|
|
4614
4614
|
requesterAllStatistics = new Y(ns);
|
|
4615
4615
|
constructor() {
|
|
4616
|
-
this.events = Xn(), this.setTimeoutRequest = new
|
|
4616
|
+
this.events = Xn(), this.setTimeoutRequest = new ge();
|
|
4617
4617
|
}
|
|
4618
4618
|
get requested() {
|
|
4619
4619
|
return this.setTimeoutRequest.requested;
|
|
@@ -4649,10 +4649,10 @@ class is {
|
|
|
4649
4649
|
collectStatistics = (e, {
|
|
4650
4650
|
onError: t
|
|
4651
4651
|
}) => {
|
|
4652
|
-
const s =
|
|
4652
|
+
const s = ce();
|
|
4653
4653
|
this.requestAllStatistics(e).then((i) => {
|
|
4654
4654
|
this.events.trigger("collected", ts(i));
|
|
4655
|
-
const a =
|
|
4655
|
+
const a = ce() - s;
|
|
4656
4656
|
let o = B;
|
|
4657
4657
|
a > 48 ? o = B * 4 : a > 32 ? o = B * 3 : a > 16 && (o = B * 2), this.start(e, {
|
|
4658
4658
|
onError: t,
|
|
@@ -4796,7 +4796,7 @@ class Es {
|
|
|
4796
4796
|
}
|
|
4797
4797
|
}
|
|
4798
4798
|
class Ss {
|
|
4799
|
-
stackPromises =
|
|
4799
|
+
stackPromises = Te({
|
|
4800
4800
|
noRunIsNotActual: !0
|
|
4801
4801
|
});
|
|
4802
4802
|
/**
|
|
@@ -4827,13 +4827,13 @@ class Cs {
|
|
|
4827
4827
|
this.onSetParameters = e, this.taskQueue = new Ss();
|
|
4828
4828
|
}
|
|
4829
4829
|
async setEncodingsToSender(e, t) {
|
|
4830
|
-
return this.taskQueue.add(async () =>
|
|
4830
|
+
return this.taskQueue.add(async () => ve(e, t, this.onSetParameters));
|
|
4831
4831
|
}
|
|
4832
4832
|
stop() {
|
|
4833
4833
|
this.taskQueue.stop();
|
|
4834
4834
|
}
|
|
4835
4835
|
}
|
|
4836
|
-
const
|
|
4836
|
+
const ke = (n, e) => n !== void 0 && e !== void 0 && n.toLowerCase().includes(e.toLowerCase()), ps = 1e6, b = (n) => n * ps, $e = b(0.06), Ge = b(4), ms = (n) => n <= 64 ? $e : n <= 128 ? b(0.12) : n <= 256 ? b(0.25) : n <= 384 ? b(0.32) : n <= 426 ? b(0.38) : n <= 640 ? b(0.5) : n <= 848 ? b(0.7) : n <= 1280 ? b(1) : n <= 1920 ? b(2) : Ge, Ns = "av1", As = (n) => ke(n, Ns), Rs = 0.6, ne = (n, e) => As(e) ? n * Rs : n, Is = (n) => ne($e, n), vs = (n) => ne(Ge, n), le = (n, e) => {
|
|
4837
4837
|
const t = ms(n);
|
|
4838
4838
|
return ne(t, e);
|
|
4839
4839
|
}, z = 1, fs = ({
|
|
@@ -4876,7 +4876,7 @@ class Ms {
|
|
|
4876
4876
|
if (!i?.track)
|
|
4877
4877
|
return { ...this.resultNoChanged, sender: i };
|
|
4878
4878
|
const r = await this.codecProvider.getCodecFromSender(i);
|
|
4879
|
-
if (
|
|
4879
|
+
if (ke(r, this.ignoreForCodec))
|
|
4880
4880
|
return { ...this.resultNoChanged, sender: i };
|
|
4881
4881
|
const { mainCam: a, resolutionMainCam: o } = t ?? {};
|
|
4882
4882
|
return this.processSender(
|
|
@@ -4928,7 +4928,7 @@ class Ms {
|
|
|
4928
4928
|
* @returns Promise с результатом
|
|
4929
4929
|
*/
|
|
4930
4930
|
async setBitrateByTrackResolution(e) {
|
|
4931
|
-
const { sender: t, videoTrack: s, codec: i } = e, a = s.getSettings().width, o = a === void 0 ? vs(i) :
|
|
4931
|
+
const { sender: t, videoTrack: s, codec: i } = e, a = s.getSettings().width, o = a === void 0 ? vs(i) : le(a, i);
|
|
4932
4932
|
return this.parametersSetter.setEncodingsToSender(t, {
|
|
4933
4933
|
scaleResolutionDownBy: 1,
|
|
4934
4934
|
maxBitrate: o
|
|
@@ -4947,7 +4947,7 @@ class Ms {
|
|
|
4947
4947
|
}, l = fs({
|
|
4948
4948
|
videoTrack: a,
|
|
4949
4949
|
targetSize: c
|
|
4950
|
-
}), T =
|
|
4950
|
+
}), T = le(c.width, o), u = {
|
|
4951
4951
|
scaleResolutionDownBy: l,
|
|
4952
4952
|
maxBitrate: T
|
|
4953
4953
|
};
|
|
@@ -4974,7 +4974,7 @@ class Os {
|
|
|
4974
4974
|
pollIntervalMs: e = 1e3,
|
|
4975
4975
|
maxPollIntervalMs: t
|
|
4976
4976
|
}) {
|
|
4977
|
-
this.pollIntervalMs = e, this.maxPollIntervalMs = t ?? e * 16, this.currentPollIntervalMs = this.pollIntervalMs, this.setTimeoutRequest = new
|
|
4977
|
+
this.pollIntervalMs = e, this.maxPollIntervalMs = t ?? e * 16, this.currentPollIntervalMs = this.pollIntervalMs, this.setTimeoutRequest = new ge();
|
|
4978
4978
|
}
|
|
4979
4979
|
/**
|
|
4980
4980
|
* Проверяет актуальный video-sender и (при необходимости) перенастраивает наблюдение.
|
|
@@ -5111,12 +5111,12 @@ class Ps {
|
|
|
5111
5111
|
});
|
|
5112
5112
|
};
|
|
5113
5113
|
}
|
|
5114
|
-
const
|
|
5114
|
+
const Ve = [
|
|
5115
5115
|
"balancing-scheduled",
|
|
5116
5116
|
"balancing-started",
|
|
5117
5117
|
"balancing-stopped",
|
|
5118
5118
|
"parameters-updated"
|
|
5119
|
-
], ys = () => new R(
|
|
5119
|
+
], ys = () => new R(Ve);
|
|
5120
5120
|
class Ls {
|
|
5121
5121
|
isBalancingActive = !1;
|
|
5122
5122
|
events;
|
|
@@ -5195,7 +5195,7 @@ class Ls {
|
|
|
5195
5195
|
this.startBalancingTimer && (clearTimeout(this.startBalancingTimer), this.startBalancingTimer = void 0);
|
|
5196
5196
|
}
|
|
5197
5197
|
}
|
|
5198
|
-
const
|
|
5198
|
+
const qe = "no-inbound-frames", He = [qe], ws = () => new R(He);
|
|
5199
5199
|
class Us {
|
|
5200
5200
|
events;
|
|
5201
5201
|
statsManager;
|
|
@@ -5214,7 +5214,7 @@ class Us {
|
|
|
5214
5214
|
return this.events.on(e, t);
|
|
5215
5215
|
}
|
|
5216
5216
|
handleStatsCollected = () => {
|
|
5217
|
-
this.hasNoIncomingFrames() && this.events.trigger(
|
|
5217
|
+
this.hasNoIncomingFrames() && this.events.trigger(qe, {});
|
|
5218
5218
|
};
|
|
5219
5219
|
hasNoIncomingFrames = () => this.statsManager.isInvalidInboundFrames && this.isMutedMainVideoTrack;
|
|
5220
5220
|
subscribe() {
|
|
@@ -5227,7 +5227,7 @@ class Bs {
|
|
|
5227
5227
|
renegotiateThrottled;
|
|
5228
5228
|
callManager;
|
|
5229
5229
|
constructor(e, t = Fs) {
|
|
5230
|
-
this.callManager = e, this.renegotiateRequester = new Y(e.renegotiate.bind(e)), this.renegotiateThrottled =
|
|
5230
|
+
this.callManager = e, this.renegotiateRequester = new Y(e.renegotiate.bind(e)), this.renegotiateThrottled = Ze.throttle(
|
|
5231
5231
|
this.requestRenegotiate.bind(this),
|
|
5232
5232
|
t
|
|
5233
5233
|
), this.subscribe();
|
|
@@ -5255,7 +5255,7 @@ class Bs {
|
|
|
5255
5255
|
d("cancel recover main stream"), this.renegotiateThrottled.cancel(), this.renegotiateRequester.cancelRequest();
|
|
5256
5256
|
}
|
|
5257
5257
|
}
|
|
5258
|
-
const ks = 1e6, $s =
|
|
5258
|
+
const ks = 1e6, $s = Pe.map((n) => `auto-connect:${n}`), Gs = _e.map((n) => `connection:${n}`), Vs = me.map((n) => `call:${n}`), qs = ye.map((n) => `conference-state:${n}`), Hs = Ce.map((n) => `api:${n}`), Ws = Le.map((n) => `incoming-call:${n}`), xs = fe.map((n) => `presentation:${n}`), Qs = Fe.map((n) => `stats:${n}`), Ys = Ve.map((n) => `video-balancer:${n}`), Xs = He.map((n) => `main-stream-health:${n}`), Js = Ue.map((n) => `session:${n}`), zs = [
|
|
5259
5259
|
"disconnected-from-out-of-call",
|
|
5260
5260
|
"connected-with-configuration-from-out-of-call",
|
|
5261
5261
|
"stopped-presentation-by-server-command"
|
|
@@ -5297,7 +5297,7 @@ class gi {
|
|
|
5297
5297
|
videoBalancerOptions: i,
|
|
5298
5298
|
autoConnectorOptions: r
|
|
5299
5299
|
} = {}) {
|
|
5300
|
-
this.preferredMimeTypesVideoCodecs = t, this.excludeMimeTypesVideoCodecs = s, this.events = Ks(), this.apiManager = new
|
|
5300
|
+
this.preferredMimeTypesVideoCodecs = t, this.excludeMimeTypesVideoCodecs = s, this.events = Ks(), this.apiManager = new ct(), this.connectionManager = new En({ JsSIP: e }), this.connectionQueueManager = new Sn({
|
|
5301
5301
|
connectionManager: this.connectionManager
|
|
5302
5302
|
}), this.conferenceStateManager = new yn(), this.contentedStreamManager = new Bn(), this.callManager = new Dt(this.conferenceStateManager, this.contentedStreamManager), this.incomingCallManager = new Wn(this.connectionManager), this.presentationManager = new Jt({
|
|
5303
5303
|
callManager: this.callManager,
|
|
@@ -5558,15 +5558,15 @@ class gi {
|
|
|
5558
5558
|
};
|
|
5559
5559
|
}
|
|
5560
5560
|
export {
|
|
5561
|
-
|
|
5562
|
-
|
|
5561
|
+
Ne as E,
|
|
5562
|
+
gt as O,
|
|
5563
5563
|
gi as S,
|
|
5564
5564
|
rn as a,
|
|
5565
|
-
|
|
5565
|
+
dt as b,
|
|
5566
5566
|
$n as c,
|
|
5567
|
-
|
|
5567
|
+
ve as d,
|
|
5568
5568
|
Vt as e,
|
|
5569
|
-
|
|
5569
|
+
Se as f,
|
|
5570
5570
|
hi as g,
|
|
5571
5571
|
gn as h,
|
|
5572
5572
|
di as i,
|