sip-connector 12.0.0 → 12.2.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/dist/{SipConnector-Dq5DrJxd.js → SipConnector-BxDInUHC.js} +141 -140
- package/dist/SipConnector-Ds1fhzNg.cjs +1 -0
- package/dist/SipConnectorFacade/SipConnectorFacade.d.ts +6 -6
- package/dist/doMock.cjs +1 -1
- package/dist/doMock.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +95 -92
- package/dist/tools/generateSimulcastEncodings.d.ts +2 -2
- package/dist/types.d.ts +13 -1
- package/package.json +12 -12
- package/dist/SipConnector-BWx586hI.cjs +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var It = Object.defineProperty;
|
|
2
2
|
var ft = (s, e, t) => e in s ? It(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
3
|
var o = (s, e, t) => ft(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { CancelableRequest as g, isCanceledError as
|
|
4
|
+
import { CancelableRequest as g, isCanceledError as Pt } from "@krivega/cancelable-promise";
|
|
5
5
|
import Me from "events-constructor";
|
|
6
6
|
import { repeatedCallsAsync as ve } from "repeated-calls";
|
|
7
7
|
import V from "debug";
|
|
8
|
-
const
|
|
8
|
+
const mt = "Connection Error", We = "Request Timeout", Ot = "SIP Failure Code", Dt = "Internal Error", pt = "Busy", ke = "Rejected", Mt = "Redirected", vt = "Unavailable", yt = "Not Found", wt = "Address Incomplete", bt = "Incompatible SDP", Ut = "Missing SDP", Lt = "Authentication Error", Be = "Terminated", Ht = "WebRTC Error", qe = "Canceled", Wt = "No Answer", kt = "Expires", Bt = "No ACK", qt = "Dialog Error", Ft = "User Denied Media Access", xt = "Bad Media Description", Vt = "RTP Timeout", hs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9
9
|
__proto__: null,
|
|
10
10
|
ADDRESS_INCOMPLETE: wt,
|
|
11
11
|
AUTHENTICATION_ERROR: Lt,
|
|
@@ -13,7 +13,7 @@ const Pt = "Connection Error", We = "Request Timeout", Ot = "SIP Failure Code",
|
|
|
13
13
|
BUSY: pt,
|
|
14
14
|
BYE: Be,
|
|
15
15
|
CANCELED: qe,
|
|
16
|
-
CONNECTION_ERROR:
|
|
16
|
+
CONNECTION_ERROR: mt,
|
|
17
17
|
DIALOG_ERROR: qt,
|
|
18
18
|
EXPIRES: kt,
|
|
19
19
|
INCOMPATIBLE_SDP: bt,
|
|
@@ -30,7 +30,7 @@ const Pt = "Connection Error", We = "Request Timeout", Ot = "SIP Failure Code",
|
|
|
30
30
|
UNAVAILABLE: vt,
|
|
31
31
|
USER_DENIED_MEDIA_ACCESS: Ft,
|
|
32
32
|
WEBRTC_ERROR: Ht
|
|
33
|
-
}, Symbol.toStringTag, { value: "Module" })), Y = "incomingCall", G = "declinedIncomingCall", $ = "failedIncomingCall", J = "terminatedIncomingCall", W = "connecting",
|
|
33
|
+
}, Symbol.toStringTag, { value: "Module" })), Y = "incomingCall", G = "declinedIncomingCall", $ = "failedIncomingCall", J = "terminatedIncomingCall", W = "connecting", P = "connected", N = "disconnected", v = "newRTCSession", m = "registered", X = "unregistered", O = "registrationFailed", Fe = "newMessage", z = "sipEvent", Q = "availableSecondRemoteStream", j = "notAvailableSecondRemoteStream", K = "mustStopPresentation", y = "shareState", Z = "enterRoom", ee = "useLicense", te = "peerconnection:confirmed", ne = "peerconnection:ontrack", w = "channels", se = "channels:notify", ie = "ended:fromserver", oe = "main-cam-control", re = "admin-stop-main-cam", ae = "admin-start-main-cam", ce = "admin-stop-mic", _e = "admin-start-mic", b = "admin-force-sync-media-state", Ee = "participant:added-to-list-moderators", he = "participant:removed-from-list-moderators", de = "participant:move-request-to-stream", le = "participant:move-request-to-spectators", Te = "participant:move-request-to-participants", ue = "participation:accepting-word-request", Se = "participation:cancelling-word-request", Ne = "webcast:started", ge = "webcast:stopped", Ce = "account:changed", Ae = "account:deleted", Re = "conference:participant-token-issued", D = "ended", xe = "sending", Ve = "reinvite", Ye = "replaces", Ge = "refer", $e = "progress", Je = "accepted", U = "confirmed", L = "peerconnection", R = "failed", Xe = "muted", ze = "unmuted", Ie = "newDTMF", fe = "newInfo", Qe = "hold", je = "unhold", Ke = "update", Ze = "sdp", et = "icecandidate", tt = "getusermediafailed", nt = "peerconnection:createofferfailed", st = "peerconnection:createanswerfailed", it = "peerconnection:setlocaldescriptionfailed", ot = "peerconnection:setremotedescriptionfailed", rt = "presentation:start", at = "presentation:started", ct = "presentation:end", Pe = "presentation:ended", H = "presentation:failed", _t = "SPECTATOR", Et = "PARTICIPANT", ht = 1e6, ds = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
34
34
|
__proto__: null,
|
|
35
35
|
ACCEPTED: Je,
|
|
36
36
|
ACCOUNT_CHANGED: Ce,
|
|
@@ -45,7 +45,7 @@ const Pt = "Connection Error", We = "Request Timeout", Ot = "SIP Failure Code",
|
|
|
45
45
|
CHANNELS_NOTIFY: se,
|
|
46
46
|
CONFERENCE_PARTICIPANT_TOKEN_ISSUED: Re,
|
|
47
47
|
CONFIRMED: U,
|
|
48
|
-
CONNECTED:
|
|
48
|
+
CONNECTED: P,
|
|
49
49
|
CONNECTING: W,
|
|
50
50
|
DECLINED_INCOMING_CALL: G,
|
|
51
51
|
DISCONNECTED: N,
|
|
@@ -66,13 +66,13 @@ const Pt = "Connection Error", We = "Request Timeout", Ot = "SIP Failure Code",
|
|
|
66
66
|
NEW_MESSAGE: Fe,
|
|
67
67
|
NEW_RTC_SESSION: v,
|
|
68
68
|
NOT_AVAILABLE_SECOND_REMOTE_STREAM_EVENT: j,
|
|
69
|
-
ONE_MEGABIT_IN_BITS:
|
|
69
|
+
ONE_MEGABIT_IN_BITS: ht,
|
|
70
70
|
PARTICIPANT: Et,
|
|
71
71
|
PARTICIPANT_ADDED_TO_LIST_MODERATORS: Ee,
|
|
72
72
|
PARTICIPANT_MOVE_REQUEST_TO_PARTICIPANTS: Te,
|
|
73
73
|
PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS: le,
|
|
74
|
-
PARTICIPANT_MOVE_REQUEST_TO_STREAM:
|
|
75
|
-
PARTICIPANT_REMOVED_FROM_LIST_MODERATORS:
|
|
74
|
+
PARTICIPANT_MOVE_REQUEST_TO_STREAM: de,
|
|
75
|
+
PARTICIPANT_REMOVED_FROM_LIST_MODERATORS: he,
|
|
76
76
|
PARTICIPATION_ACCEPTING_WORD_REQUEST: ue,
|
|
77
77
|
PARTICIPATION_CANCELLING_WORD_REQUEST: Se,
|
|
78
78
|
PEER_CONNECTION: L,
|
|
@@ -83,13 +83,13 @@ const Pt = "Connection Error", We = "Request Timeout", Ot = "SIP Failure Code",
|
|
|
83
83
|
PEER_CONNECTION_SET_LOCAL_DESCRIPTION_FAILED: it,
|
|
84
84
|
PEER_CONNECTION_SET_REMOTE_DESCRIPTION_FAILED: ot,
|
|
85
85
|
PRESENTATION_END: ct,
|
|
86
|
-
PRESENTATION_ENDED:
|
|
86
|
+
PRESENTATION_ENDED: Pe,
|
|
87
87
|
PRESENTATION_FAILED: H,
|
|
88
88
|
PRESENTATION_START: rt,
|
|
89
89
|
PRESENTATION_STARTED: at,
|
|
90
90
|
PROGRESS: $e,
|
|
91
91
|
REFER: Ge,
|
|
92
|
-
REGISTERED:
|
|
92
|
+
REGISTERED: m,
|
|
93
93
|
REGISTRATION_FAILED: O,
|
|
94
94
|
REINVITE: Ve,
|
|
95
95
|
REPLACES: Ye,
|
|
@@ -106,14 +106,14 @@ const Pt = "Connection Error", We = "Request Timeout", Ot = "SIP Failure Code",
|
|
|
106
106
|
USE_LICENSE: ee,
|
|
107
107
|
WEBCAST_STARTED: Ne,
|
|
108
108
|
WEBCAST_STOPPED: ge
|
|
109
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
109
|
+
}, Symbol.toStringTag, { value: "Module" })), dt = [
|
|
110
110
|
Y,
|
|
111
111
|
G,
|
|
112
112
|
J,
|
|
113
113
|
$,
|
|
114
114
|
ue,
|
|
115
115
|
Se,
|
|
116
|
-
|
|
116
|
+
de,
|
|
117
117
|
se,
|
|
118
118
|
Re,
|
|
119
119
|
Ce,
|
|
@@ -121,13 +121,13 @@ const Pt = "Connection Error", We = "Request Timeout", Ot = "SIP Failure Code",
|
|
|
121
121
|
Ne,
|
|
122
122
|
ge,
|
|
123
123
|
Ee,
|
|
124
|
-
|
|
125
|
-
],
|
|
124
|
+
he
|
|
125
|
+
], me = [
|
|
126
126
|
W,
|
|
127
|
-
|
|
127
|
+
P,
|
|
128
128
|
N,
|
|
129
129
|
v,
|
|
130
|
-
|
|
130
|
+
m,
|
|
131
131
|
X,
|
|
132
132
|
O,
|
|
133
133
|
Fe,
|
|
@@ -180,25 +180,25 @@ const Pt = "Connection Error", We = "Request Timeout", Ot = "SIP Failure Code",
|
|
|
180
180
|
rt,
|
|
181
181
|
at,
|
|
182
182
|
ct,
|
|
183
|
-
|
|
183
|
+
Pe,
|
|
184
184
|
H
|
|
185
|
-
], Tt = [...
|
|
185
|
+
], Tt = [...me, ...dt], ut = [
|
|
186
186
|
...Oe,
|
|
187
187
|
...lt
|
|
188
|
-
],
|
|
188
|
+
], ls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
189
189
|
__proto__: null,
|
|
190
190
|
SESSION_EVENT_NAMES: ut,
|
|
191
191
|
SESSION_JSSIP_EVENT_NAMES: Oe,
|
|
192
192
|
SESSION_SYNTHETICS_EVENT_NAMES: lt,
|
|
193
193
|
UA_EVENT_NAMES: Tt,
|
|
194
|
-
UA_JSSIP_EVENT_NAMES:
|
|
195
|
-
UA_SYNTHETICS_EVENT_NAMES:
|
|
194
|
+
UA_JSSIP_EVENT_NAMES: me,
|
|
195
|
+
UA_SYNTHETICS_EVENT_NAMES: dt
|
|
196
196
|
}, Symbol.toStringTag, { value: "Module" })), Yt = (s) => {
|
|
197
197
|
const e = [];
|
|
198
198
|
return s && e.push(`X-Vinteo-Remote: ${s}`), e;
|
|
199
|
-
}, Gt = "content-type", $t = "x-webrtc-enter-room", p = "application/vinteo.webrtc.sharedesktop", Jt = "application/vinteo.webrtc.roomname", Xt = "application/vinteo.webrtc.channels", zt = "application/vinteo.webrtc.mediastate", Qt = "application/vinteo.webrtc.refusal", ye = "application/vinteo.webrtc.maincam", jt = "application/vinteo.webrtc.mic", Kt = "application/vinteo.webrtc.uselic", Zt = "X-WEBRTC-USE-LICENSE", en = "X-WEBRTC-PARTICIPANT-NAME", we = "X-WEBRTC-INPUT-CHANNELS", be = "X-WEBRTC-OUTPUT-CHANNELS", tn = "X-WEBRTC-MAINCAM", nn = "X-WEBRTC-MIC", Ue = "X-WEBRTC-SYNC", sn = "X-WEBRTC-MAINCAM-RESOLUTION", on = "X-WEBRTC-MEDIA-STATE", rn = "X-Vinteo-Media-Type", an = "X-Vinteo-MainCam-State", cn = "X-Vinteo-Mic-State", _n = "application/vinteo.webrtc.partstate", En = "X-WEBRTC-PARTSTATE",
|
|
199
|
+
}, Gt = "content-type", $t = "x-webrtc-enter-room", p = "application/vinteo.webrtc.sharedesktop", Jt = "application/vinteo.webrtc.roomname", Xt = "application/vinteo.webrtc.channels", zt = "application/vinteo.webrtc.mediastate", Qt = "application/vinteo.webrtc.refusal", ye = "application/vinteo.webrtc.maincam", jt = "application/vinteo.webrtc.mic", Kt = "application/vinteo.webrtc.uselic", Zt = "X-WEBRTC-USE-LICENSE", en = "X-WEBRTC-PARTICIPANT-NAME", we = "X-WEBRTC-INPUT-CHANNELS", be = "X-WEBRTC-OUTPUT-CHANNELS", tn = "X-WEBRTC-MAINCAM", nn = "X-WEBRTC-MIC", Ue = "X-WEBRTC-SYNC", sn = "X-WEBRTC-MAINCAM-RESOLUTION", on = "X-WEBRTC-MEDIA-STATE", rn = "X-Vinteo-Media-Type", an = "X-Vinteo-MainCam-State", cn = "X-Vinteo-Mic-State", _n = "application/vinteo.webrtc.partstate", En = "X-WEBRTC-PARTSTATE", hn = "application/vinteo.webrtc.notify", dn = "X-VINTEO-NOTIFY", I = "x-webrtc-share-state", ln = `${I}: LETMESTARTPRESENTATION`, Tn = `${I}: STOPPRESENTATION`, St = "YOUCANRECEIVECONTENT", Nt = "CONTENTEND", gt = "YOUMUSTSTOPSENDCONTENT", un = `${I}: ${gt}`, Sn = `${I}: ${St}`, Nn = `${I}: ${Nt}`, gn = "X-WEBRTC-REQUEST-ENABLE-MEDIA-DEVICE", Cn = `${gn}: LETMESTARTMAINCAM`, De = "sip-connector", B = V(De), Ts = () => {
|
|
200
200
|
V.enable(De);
|
|
201
|
-
},
|
|
201
|
+
}, us = () => {
|
|
202
202
|
V.enable(`-${De}`);
|
|
203
203
|
}, An = (s, e) => {
|
|
204
204
|
s.getVideoTracks().forEach((n) => {
|
|
@@ -214,48 +214,48 @@ const Pt = "Connection Error", We = "Request Timeout", Ot = "SIP Failure Code",
|
|
|
214
214
|
const i = t === "recvonly" ? [] : s.getAudioTracks(), r = e === "recvonly" ? [] : s.getVideoTracks(), a = [...i, ...r], c = new MediaStream(a);
|
|
215
215
|
return c.getTracks = () => [...c.getAudioTracks(), ...c.getVideoTracks()], n && n !== "none" && An(c, n), c;
|
|
216
216
|
};
|
|
217
|
-
var f = /* @__PURE__ */ ((s) => (s.PAUSE_MAIN_CAM = "PAUSEMAINCAM", s.RESUME_MAIN_CAM = "RESUMEMAINCAM", s.MAX_MAIN_CAM_RESOLUTION = "MAXMAINCAMRESOLUTION", s.ADMIN_STOP_MAIN_CAM = "ADMINSTOPMAINCAM", s.ADMIN_START_MAIN_CAM = "ADMINSTARTMAINCAM", s))(f || {}), q = /* @__PURE__ */ ((s) => (s.ADMIN_STOP_MIC = "ADMINSTOPMIC", s.ADMIN_START_MIC = "ADMINSTARTMIC", s))(q || {}), F = /* @__PURE__ */ ((s) => (s.ADMIN_SYNC_FORCED = "1", s.ADMIN_SYNC_NOT_FORCED = "0", s))(F || {}), Rn = /* @__PURE__ */ ((s) => (s.AUDIO = "AUDIO", s.VIDEO = "VIDEO", s.AUDIOPLUSPRESENTATION = "AUDIOPLUSPRESENTATION", s))(Rn || {});
|
|
218
|
-
function
|
|
217
|
+
var f = /* @__PURE__ */ ((s) => (s.PAUSE_MAIN_CAM = "PAUSEMAINCAM", s.RESUME_MAIN_CAM = "RESUMEMAINCAM", s.MAX_MAIN_CAM_RESOLUTION = "MAXMAINCAMRESOLUTION", s.ADMIN_STOP_MAIN_CAM = "ADMINSTOPMAINCAM", s.ADMIN_START_MAIN_CAM = "ADMINSTARTMAINCAM", s))(f || {}), q = /* @__PURE__ */ ((s) => (s.ADMIN_STOP_MIC = "ADMINSTOPMIC", s.ADMIN_START_MIC = "ADMINSTARTMIC", s))(q || {}), F = /* @__PURE__ */ ((s) => (s.ADMIN_SYNC_FORCED = "1", s.ADMIN_SYNC_NOT_FORCED = "0", s))(F || {}), Rn = /* @__PURE__ */ ((s) => (s.AUDIO = "AUDIO", s.VIDEO = "VIDEO", s.AUDIOPLUSPRESENTATION = "AUDIOPLUSPRESENTATION", s))(Rn || {}), In = /* @__PURE__ */ ((s) => (s.VP8 = "video/VP8", s.VP9 = "video/VP9", s.H264 = "video/H264", s.AV1 = "video/AV1", s.rtx = "video/rtx", s.red = "video/red", s.flexfec03 = "video/flexfec-03", s))(In || {});
|
|
218
|
+
function fn(s) {
|
|
219
219
|
return (e) => `sip:${e}@${s}`;
|
|
220
220
|
}
|
|
221
|
-
const
|
|
221
|
+
const Pn = (s, e) => () => Math.floor(Math.random() * (e - s)) + s, Le = (s) => s.trim().replaceAll(" ", "_"), mn = Pn(1e5, 99999999), On = (s) => s.some((t) => {
|
|
222
222
|
const { kind: n } = t;
|
|
223
223
|
return n === "video";
|
|
224
|
-
}),
|
|
224
|
+
}), Dn = "Error decline with 603", pn = 1006, Mn = (s) => typeof s == "object" && s !== null && "code" in s && s.code === pn, vn = (s) => s.message === Dn, yn = (s, e) => s.find((t) => t.track && e.getTracks().includes(t.track)), wn = (s, e) => (s.degradationPreference = e.degradationPreference, s), bn = (s, e) => {
|
|
225
225
|
s.encodings === void 0 && (s.encodings = []);
|
|
226
226
|
for (let t = s.encodings.length; t < e; t += 1)
|
|
227
227
|
s.encodings.push({});
|
|
228
228
|
return s;
|
|
229
|
-
}, Ct = (s) => (e, t) => t !== void 0 && e !== t || t === void 0 && e !== s,
|
|
230
|
-
if (
|
|
229
|
+
}, Ct = (s) => (e, t) => t !== void 0 && e !== t || t === void 0 && e !== s, Un = Ct(), Ln = (s, e) => {
|
|
230
|
+
if (Un(s, e))
|
|
231
231
|
return s;
|
|
232
|
-
},
|
|
233
|
-
const t = s.maxBitrate, n =
|
|
232
|
+
}, Hn = (s, e) => {
|
|
233
|
+
const t = s.maxBitrate, n = Ln(e, t);
|
|
234
234
|
return n !== void 0 && (s.maxBitrate = n), s;
|
|
235
|
-
}, At = 1,
|
|
235
|
+
}, At = 1, Wn = Ct(
|
|
236
236
|
At
|
|
237
|
-
),
|
|
237
|
+
), kn = (s, e) => {
|
|
238
238
|
const t = s === void 0 ? void 0 : Math.max(s, At);
|
|
239
|
-
if (t !== void 0 &&
|
|
239
|
+
if (t !== void 0 && Wn(
|
|
240
240
|
t,
|
|
241
241
|
e
|
|
242
242
|
))
|
|
243
243
|
return t;
|
|
244
|
-
},
|
|
245
|
-
const t = s.scaleResolutionDownBy, n =
|
|
244
|
+
}, Bn = (s, e) => {
|
|
245
|
+
const t = s.scaleResolutionDownBy, n = kn(
|
|
246
246
|
e,
|
|
247
247
|
t
|
|
248
248
|
);
|
|
249
249
|
return n !== void 0 && (s.scaleResolutionDownBy = n), s;
|
|
250
|
-
},
|
|
250
|
+
}, qn = (s, e) => {
|
|
251
251
|
var n;
|
|
252
252
|
const t = ((n = e.encodings) == null ? void 0 : n.length) ?? 0;
|
|
253
|
-
return
|
|
253
|
+
return bn(s, t), s.encodings.forEach((i, r) => {
|
|
254
254
|
const a = ((e == null ? void 0 : e.encodings) ?? [])[r], c = a == null ? void 0 : a.maxBitrate, E = a == null ? void 0 : a.scaleResolutionDownBy;
|
|
255
|
-
|
|
255
|
+
Hn(i, c), Bn(i, E);
|
|
256
256
|
}), s;
|
|
257
|
-
},
|
|
258
|
-
var t, n, i, r, a, c, E,
|
|
257
|
+
}, Fn = (s, e) => {
|
|
258
|
+
var t, n, i, r, a, c, E, h;
|
|
259
259
|
if (((t = s.codecs) == null ? void 0 : t.length) !== ((n = e.codecs) == null ? void 0 : n.length))
|
|
260
260
|
return !0;
|
|
261
261
|
for (let _ = 0; _ < (((i = s.codecs) == null ? void 0 : i.length) ?? 0); _++)
|
|
@@ -266,19 +266,19 @@ const fn = (s, e) => () => Math.floor(Math.random() * (e - s)) + s, Le = (s) =>
|
|
|
266
266
|
for (let _ = 0; _ < (((c = s.headerExtensions) == null ? void 0 : c.length) ?? 0); _++)
|
|
267
267
|
if (JSON.stringify(s.headerExtensions[_]) !== JSON.stringify(e.headerExtensions[_]))
|
|
268
268
|
return !0;
|
|
269
|
-
if (((E = s.encodings) == null ? void 0 : E.length) !== ((
|
|
269
|
+
if (((E = s.encodings) == null ? void 0 : E.length) !== ((h = e.encodings) == null ? void 0 : h.length))
|
|
270
270
|
return !0;
|
|
271
271
|
for (let _ = 0; _ < (s.encodings.length ?? 0); _++)
|
|
272
272
|
if (JSON.stringify(s.encodings[_]) !== JSON.stringify(e.encodings[_]))
|
|
273
273
|
return !0;
|
|
274
274
|
return s.rtcp.cname !== e.rtcp.cname || s.rtcp.reducedSize !== e.rtcp.reducedSize || s.degradationPreference !== e.degradationPreference;
|
|
275
|
-
},
|
|
275
|
+
}, xn = async (s, e) => {
|
|
276
276
|
const t = s.getParameters(), n = JSON.parse(JSON.stringify(t));
|
|
277
|
-
|
|
278
|
-
const i =
|
|
277
|
+
qn(t, e), wn(t, e);
|
|
278
|
+
const i = Fn(n, t);
|
|
279
279
|
return i && await s.setParameters(t), { parameters: t, isChanged: i };
|
|
280
|
-
},
|
|
281
|
-
const { isChanged: n, parameters: i } = await
|
|
280
|
+
}, Vn = async (s, e, t) => {
|
|
281
|
+
const { isChanged: n, parameters: i } = await xn(s, {
|
|
282
282
|
encodings: [
|
|
283
283
|
{
|
|
284
284
|
scaleResolutionDownBy: e.scaleResolutionDownBy,
|
|
@@ -287,15 +287,15 @@ const fn = (s, e) => () => Math.floor(Math.random() * (e - s)) + s, Le = (s) =>
|
|
|
287
287
|
]
|
|
288
288
|
});
|
|
289
289
|
return n && t && t(i), { isChanged: n, parameters: i };
|
|
290
|
-
},
|
|
291
|
-
const n =
|
|
290
|
+
}, Yn = async (s, e, t) => {
|
|
291
|
+
const n = yn(s, e);
|
|
292
292
|
if (n)
|
|
293
|
-
return
|
|
294
|
-
},
|
|
293
|
+
return Vn(n, { maxBitrate: t });
|
|
294
|
+
}, Gn = 486, $n = 487, x = "local", He = "remote", Jn = 3, Xn = 1, Ss = (s = new Error()) => {
|
|
295
295
|
const { originator: e, cause: t } = s;
|
|
296
|
-
return
|
|
297
|
-
}, C = "SipConnector",
|
|
298
|
-
class
|
|
296
|
+
return Pt(s) ? !0 : typeof t == "string" ? t === We || t === ke || e === x && (t === qe || t === Be) : !1;
|
|
297
|
+
}, C = "SipConnector", zn = "channels", Qn = "WebcastStarted", jn = "WebcastStopped", Kn = "accountChanged", Zn = "accountDeleted", es = "addedToListModerators", ts = "removedFromListModerators", ns = "ParticipationRequestAccepted", ss = "ParticipationRequestRejected", is = "ParticipantMovedToWebcast", os = "ConferenceParticipantTokenIssued";
|
|
298
|
+
class Ns {
|
|
299
299
|
constructor({ JsSIP: e }) {
|
|
300
300
|
o(this, "_isRegisterConfig", !1);
|
|
301
301
|
o(this, "_connectionConfiguration", {});
|
|
@@ -339,7 +339,7 @@ class Ss {
|
|
|
339
339
|
}
|
|
340
340
|
return this.register();
|
|
341
341
|
});
|
|
342
|
-
o(this, "declineToIncomingCall", async ({ statusCode: e =
|
|
342
|
+
o(this, "declineToIncomingCall", async ({ statusCode: e = $n } = {}) => new Promise((t, n) => {
|
|
343
343
|
if (!this.isAvailableIncomingCall) {
|
|
344
344
|
n(new Error("no incomingSession"));
|
|
345
345
|
return;
|
|
@@ -347,14 +347,14 @@ class Ss {
|
|
|
347
347
|
const i = this.incomingSession, r = this.remoteCallerData;
|
|
348
348
|
this._cancelableCall.cancelRequest(), this._cancelableAnswer.cancelRequest(), this.removeIncomingSession(), this._uaEvents.trigger(G, r), t(i.terminate({ status_code: e }));
|
|
349
349
|
}));
|
|
350
|
-
o(this, "busyIncomingCall", async () => this.declineToIncomingCall({ statusCode:
|
|
350
|
+
o(this, "busyIncomingCall", async () => this.declineToIncomingCall({ statusCode: Gn }));
|
|
351
351
|
o(this, "removeIncomingSession", () => {
|
|
352
352
|
delete this.incomingSession;
|
|
353
353
|
});
|
|
354
|
-
o(this, "_connectWithDuplicatedCalls", async (e, { callLimit: t =
|
|
354
|
+
o(this, "_connectWithDuplicatedCalls", async (e, { callLimit: t = Jn } = {}) => {
|
|
355
355
|
const n = async () => this._cancelableConnect.request(e), i = (r) => {
|
|
356
|
-
var
|
|
357
|
-
const c = !!((
|
|
356
|
+
var h;
|
|
357
|
+
const c = !!((h = this.ua) != null && h.isConnected()) && this.hasEqualConnectionConfiguration(e), E = !!r && !Mn(r);
|
|
358
358
|
return c || E;
|
|
359
359
|
};
|
|
360
360
|
return this._cancelableConnectWithRepeatedCalls = ve({
|
|
@@ -391,24 +391,24 @@ class Ss {
|
|
|
391
391
|
sessionTimers: a,
|
|
392
392
|
registerExpires: c,
|
|
393
393
|
connectionRecoveryMinInterval: E,
|
|
394
|
-
connectionRecoveryMaxInterval:
|
|
394
|
+
connectionRecoveryMaxInterval: h,
|
|
395
395
|
userAgent: _,
|
|
396
396
|
displayName: l = "",
|
|
397
|
-
register:
|
|
397
|
+
register: d = !1,
|
|
398
398
|
extraHeaders: T = []
|
|
399
399
|
}) => {
|
|
400
400
|
if (!n)
|
|
401
401
|
throw new Error("sipServerUrl is required");
|
|
402
402
|
if (!i)
|
|
403
403
|
throw new Error("sipWebSocketServerURL is required");
|
|
404
|
-
if (
|
|
404
|
+
if (d && !e)
|
|
405
405
|
throw new Error("user is required for authorized connection");
|
|
406
|
-
if (
|
|
406
|
+
if (d && !t)
|
|
407
407
|
throw new Error("password is required for authorized connection");
|
|
408
408
|
this._connectionConfiguration = {
|
|
409
409
|
sipServerUrl: n,
|
|
410
410
|
displayName: l,
|
|
411
|
-
register:
|
|
411
|
+
register: d,
|
|
412
412
|
user: e,
|
|
413
413
|
password: t
|
|
414
414
|
};
|
|
@@ -418,15 +418,15 @@ class Ss {
|
|
|
418
418
|
sipWebSocketServerURL: i,
|
|
419
419
|
password: t,
|
|
420
420
|
displayName: l,
|
|
421
|
-
register:
|
|
421
|
+
register: d,
|
|
422
422
|
sessionTimers: a,
|
|
423
423
|
registerExpires: c,
|
|
424
424
|
connectionRecoveryMinInterval: E,
|
|
425
|
-
connectionRecoveryMaxInterval:
|
|
425
|
+
connectionRecoveryMaxInterval: h,
|
|
426
426
|
userAgent: _
|
|
427
427
|
});
|
|
428
|
-
return this.getSipServerUrl = S.getSipServerUrl, this.socket = S.socket, this.ua && await this._disconnectWithoutCancelRequests(), this._isRegisterConfig = !!
|
|
429
|
-
const pe =
|
|
428
|
+
return this.getSipServerUrl = S.getSipServerUrl, this.socket = S.socket, this.ua && await this._disconnectWithoutCancelRequests(), this._isRegisterConfig = !!d, this.ua = this._createUa({ ...u, remoteAddress: r, extraHeaders: T }), this._uaEvents.eachTriggers((A, k) => {
|
|
429
|
+
const pe = me.find((Rt) => Rt === k);
|
|
430
430
|
pe && this.ua && this.ua.on(pe, A);
|
|
431
431
|
}), this.ua;
|
|
432
432
|
});
|
|
@@ -449,9 +449,9 @@ class Ss {
|
|
|
449
449
|
}, r = (E) => {
|
|
450
450
|
c(), t(E);
|
|
451
451
|
}, a = () => {
|
|
452
|
-
this.isRegisterConfig ? (this.on(
|
|
452
|
+
this.isRegisterConfig ? (this.on(m, i), this.on(O, r)) : this.on(P, i), this.on(N, r);
|
|
453
453
|
}, c = () => {
|
|
454
|
-
this.off(
|
|
454
|
+
this.off(m, i), this.off(O, r), this.off(P, i), this.off(N, r);
|
|
455
455
|
};
|
|
456
456
|
a(), this.on(v, this.handleNewRTCSession), n.start();
|
|
457
457
|
}));
|
|
@@ -466,8 +466,8 @@ class Ss {
|
|
|
466
466
|
const E = a || c;
|
|
467
467
|
c && this.isRegisterConfig ? this.register().then(() => {
|
|
468
468
|
n(E);
|
|
469
|
-
}).catch((
|
|
470
|
-
i(
|
|
469
|
+
}).catch((h) => {
|
|
470
|
+
i(h);
|
|
471
471
|
}) : E ? n(E) : i(new Error("nothing changed"));
|
|
472
472
|
}));
|
|
473
473
|
o(this, "_disconnectWithoutCancelRequests", async () => this._cancelableDisconnect.request());
|
|
@@ -489,10 +489,10 @@ class Ss {
|
|
|
489
489
|
videoMode: a,
|
|
490
490
|
audioMode: c,
|
|
491
491
|
contentHint: E,
|
|
492
|
-
offerToReceiveAudio:
|
|
492
|
+
offerToReceiveAudio: h = !0,
|
|
493
493
|
offerToReceiveVideo: _ = !0,
|
|
494
494
|
sendEncodings: l,
|
|
495
|
-
onAddedTransceiver:
|
|
495
|
+
onAddedTransceiver: d
|
|
496
496
|
}) => new Promise((T, u) => {
|
|
497
497
|
const { ua: S } = this;
|
|
498
498
|
if (!S) {
|
|
@@ -515,11 +515,11 @@ class Ss {
|
|
|
515
515
|
iceServers: r
|
|
516
516
|
},
|
|
517
517
|
rtcOfferConstraints: {
|
|
518
|
-
offerToReceiveAudio:
|
|
518
|
+
offerToReceiveAudio: h,
|
|
519
519
|
offerToReceiveVideo: _
|
|
520
520
|
},
|
|
521
521
|
sendEncodings: l,
|
|
522
|
-
onAddedTransceiver:
|
|
522
|
+
onAddedTransceiver: d
|
|
523
523
|
});
|
|
524
524
|
}));
|
|
525
525
|
o(this, "_answer", async ({
|
|
@@ -531,22 +531,22 @@ class Ss {
|
|
|
531
531
|
audioMode: a,
|
|
532
532
|
contentHint: c,
|
|
533
533
|
sendEncodings: E,
|
|
534
|
-
onAddedTransceiver:
|
|
534
|
+
onAddedTransceiver: h
|
|
535
535
|
}) => new Promise((_, l) => {
|
|
536
536
|
if (!this.isAvailableIncomingCall) {
|
|
537
537
|
l(new Error("no incomingSession"));
|
|
538
538
|
return;
|
|
539
539
|
}
|
|
540
540
|
this.session = this.incomingSession, this.removeIncomingSession();
|
|
541
|
-
const { session:
|
|
542
|
-
if (!
|
|
541
|
+
const { session: d } = this;
|
|
542
|
+
if (!d) {
|
|
543
543
|
l(new Error("No session established"));
|
|
544
544
|
return;
|
|
545
545
|
}
|
|
546
546
|
this._sessionEvents.eachTriggers((u, S) => {
|
|
547
547
|
const A = Oe.find((k) => k === S);
|
|
548
|
-
A &&
|
|
549
|
-
}), this._connectionConfiguration.answer = !0, this._connectionConfiguration.number =
|
|
548
|
+
A && d.on(A, u);
|
|
549
|
+
}), this._connectionConfiguration.answer = !0, this._connectionConfiguration.number = d.remote_identity.uri.user, this._handleCall({ ontrack: t }).then(_).catch((u) => {
|
|
550
550
|
l(u);
|
|
551
551
|
});
|
|
552
552
|
const T = M(e, {
|
|
@@ -554,7 +554,7 @@ class Ss {
|
|
|
554
554
|
audioMode: a,
|
|
555
555
|
contentHint: c
|
|
556
556
|
});
|
|
557
|
-
|
|
557
|
+
d.answer({
|
|
558
558
|
extraHeaders: n,
|
|
559
559
|
videoMode: r,
|
|
560
560
|
audioMode: a,
|
|
@@ -563,7 +563,7 @@ class Ss {
|
|
|
563
563
|
iceServers: i
|
|
564
564
|
},
|
|
565
565
|
sendEncodings: E,
|
|
566
|
-
onAddedTransceiver:
|
|
566
|
+
onAddedTransceiver: h
|
|
567
567
|
});
|
|
568
568
|
}));
|
|
569
569
|
o(this, "_handleCall", async ({ ontrack: e }) => new Promise((t, n) => {
|
|
@@ -575,16 +575,16 @@ class Ss {
|
|
|
575
575
|
this.onSession(R, E), this.onSession(D, E);
|
|
576
576
|
}, c = () => {
|
|
577
577
|
this.offSession(R, E), this.offSession(D, E);
|
|
578
|
-
}, E = (
|
|
579
|
-
r(), c(), n(
|
|
578
|
+
}, E = (d) => {
|
|
579
|
+
r(), c(), n(d);
|
|
580
580
|
};
|
|
581
|
-
let
|
|
582
|
-
const _ = ({ peerconnection:
|
|
583
|
-
|
|
584
|
-
this._sessionEvents.trigger(ne,
|
|
581
|
+
let h;
|
|
582
|
+
const _ = ({ peerconnection: d }) => {
|
|
583
|
+
h = d, h.ontrack = (T) => {
|
|
584
|
+
this._sessionEvents.trigger(ne, h), e && e(T);
|
|
585
585
|
};
|
|
586
586
|
}, l = () => {
|
|
587
|
-
|
|
587
|
+
h && this._sessionEvents.trigger(te, h), r(), c(), t(h);
|
|
588
588
|
};
|
|
589
589
|
i(), a();
|
|
590
590
|
}));
|
|
@@ -645,55 +645,55 @@ class Ss {
|
|
|
645
645
|
});
|
|
646
646
|
o(this, "_handleNotify", (e) => {
|
|
647
647
|
switch (e.cmd) {
|
|
648
|
-
case
|
|
648
|
+
case zn: {
|
|
649
649
|
const t = e;
|
|
650
650
|
this._triggerChannelsNotify(t);
|
|
651
651
|
break;
|
|
652
652
|
}
|
|
653
|
-
case
|
|
653
|
+
case Qn: {
|
|
654
654
|
const t = e;
|
|
655
655
|
this._triggerWebcastStartedNotify(t);
|
|
656
656
|
break;
|
|
657
657
|
}
|
|
658
|
-
case
|
|
658
|
+
case jn: {
|
|
659
659
|
const t = e;
|
|
660
660
|
this._triggerWebcastStoppedNotify(t);
|
|
661
661
|
break;
|
|
662
662
|
}
|
|
663
|
-
case
|
|
663
|
+
case es: {
|
|
664
664
|
const t = e;
|
|
665
665
|
this._triggerAddedToListModeratorsNotify(t);
|
|
666
666
|
break;
|
|
667
667
|
}
|
|
668
|
-
case
|
|
668
|
+
case ts: {
|
|
669
669
|
const t = e;
|
|
670
670
|
this._triggerRemovedFromListModeratorsNotify(t);
|
|
671
671
|
break;
|
|
672
672
|
}
|
|
673
|
-
case
|
|
673
|
+
case ns: {
|
|
674
674
|
const t = e;
|
|
675
675
|
this._triggerParticipationAcceptingWordRequest(t);
|
|
676
676
|
break;
|
|
677
677
|
}
|
|
678
|
-
case
|
|
678
|
+
case ss: {
|
|
679
679
|
const t = e;
|
|
680
680
|
this._triggerParticipationCancellingWordRequest(t);
|
|
681
681
|
break;
|
|
682
682
|
}
|
|
683
|
-
case
|
|
683
|
+
case is: {
|
|
684
684
|
const t = e;
|
|
685
685
|
this._triggerParticipantMoveRequestToStream(t);
|
|
686
686
|
break;
|
|
687
687
|
}
|
|
688
|
-
case
|
|
688
|
+
case Kn: {
|
|
689
689
|
this._triggerAccountChangedNotify();
|
|
690
690
|
break;
|
|
691
691
|
}
|
|
692
|
-
case
|
|
692
|
+
case Zn: {
|
|
693
693
|
this._triggerAccountDeletedNotify();
|
|
694
694
|
break;
|
|
695
695
|
}
|
|
696
|
-
case
|
|
696
|
+
case os: {
|
|
697
697
|
const t = e;
|
|
698
698
|
this._triggerConferenceParticipantTokenIssued(t);
|
|
699
699
|
break;
|
|
@@ -709,7 +709,7 @@ class Ss {
|
|
|
709
709
|
conference: e
|
|
710
710
|
};
|
|
711
711
|
this._uaEvents.trigger(
|
|
712
|
-
|
|
712
|
+
he,
|
|
713
713
|
t
|
|
714
714
|
);
|
|
715
715
|
});
|
|
@@ -781,7 +781,7 @@ class Ss {
|
|
|
781
781
|
const t = {
|
|
782
782
|
conference: e
|
|
783
783
|
};
|
|
784
|
-
this._uaEvents.trigger(
|
|
784
|
+
this._uaEvents.trigger(de, t);
|
|
785
785
|
});
|
|
786
786
|
o(this, "_triggerEnterRoom", (e) => {
|
|
787
787
|
const t = e.getHeader($t), n = e.getHeader(en);
|
|
@@ -831,7 +831,7 @@ class Ss {
|
|
|
831
831
|
this._triggerEnterRoom(n), this._maybeTriggerChannels(n);
|
|
832
832
|
break;
|
|
833
833
|
}
|
|
834
|
-
case
|
|
834
|
+
case hn: {
|
|
835
835
|
this._maybeHandleNotify(n);
|
|
836
836
|
break;
|
|
837
837
|
}
|
|
@@ -861,7 +861,7 @@ class Ss {
|
|
|
861
861
|
this._maybeHandleNotify(e);
|
|
862
862
|
});
|
|
863
863
|
o(this, "_maybeHandleNotify", (e) => {
|
|
864
|
-
const t = e.getHeader(
|
|
864
|
+
const t = e.getHeader(dn);
|
|
865
865
|
if (t) {
|
|
866
866
|
const n = JSON.parse(t);
|
|
867
867
|
this._handleNotify(n);
|
|
@@ -894,7 +894,7 @@ class Ss {
|
|
|
894
894
|
}
|
|
895
895
|
async register() {
|
|
896
896
|
return new Promise((e, t) => {
|
|
897
|
-
this.isRegisterConfig && this.ua ? (this.ua.on(
|
|
897
|
+
this.isRegisterConfig && this.ua ? (this.ua.on(m, e), this.ua.on(O, t), this.ua.register()) : t(new Error("Config is not registered"));
|
|
898
898
|
});
|
|
899
899
|
}
|
|
900
900
|
async unregister() {
|
|
@@ -937,20 +937,20 @@ class Ss {
|
|
|
937
937
|
extraHeaders: a
|
|
938
938
|
}) {
|
|
939
939
|
return new Promise((c, E) => {
|
|
940
|
-
const { configuration:
|
|
940
|
+
const { configuration: h } = this.createUaConfiguration({
|
|
941
941
|
sipWebSocketServerURL: i,
|
|
942
942
|
displayName: t,
|
|
943
943
|
userAgent: e,
|
|
944
944
|
sipServerUrl: n
|
|
945
|
-
}), _ = this._createUa({ ...
|
|
945
|
+
}), _ = this._createUa({ ...h, remoteAddress: r, extraHeaders: a }), l = () => {
|
|
946
946
|
const T = new Error("Telephony is not available");
|
|
947
947
|
E(T);
|
|
948
948
|
};
|
|
949
949
|
_.once(N, l);
|
|
950
|
-
const
|
|
950
|
+
const d = () => {
|
|
951
951
|
_.removeAllListeners(), _.once(N, c), _.stop();
|
|
952
952
|
};
|
|
953
|
-
_.once(
|
|
953
|
+
_.once(P, d), _.start();
|
|
954
954
|
});
|
|
955
955
|
}
|
|
956
956
|
async replaceMediaStream(e, t) {
|
|
@@ -968,7 +968,7 @@ class Ss {
|
|
|
968
968
|
...e,
|
|
969
969
|
extraHeaders: t
|
|
970
970
|
}).catch((n) => {
|
|
971
|
-
if (
|
|
971
|
+
if (vn(n))
|
|
972
972
|
throw n;
|
|
973
973
|
});
|
|
974
974
|
}
|
|
@@ -980,7 +980,7 @@ class Ss {
|
|
|
980
980
|
stream: t,
|
|
981
981
|
presentationOptions: n,
|
|
982
982
|
options: i = {
|
|
983
|
-
callLimit:
|
|
983
|
+
callLimit: Xn
|
|
984
984
|
}
|
|
985
985
|
}) {
|
|
986
986
|
const r = async () => this._sendPresentation(e, t, n), a = () => !!this._streamPresentationCurrent;
|
|
@@ -1006,13 +1006,13 @@ class Ss {
|
|
|
1006
1006
|
sessionTimers: c = !1,
|
|
1007
1007
|
registerExpires: E = 60 * 5,
|
|
1008
1008
|
// 5 minutes in sec
|
|
1009
|
-
connectionRecoveryMinInterval:
|
|
1009
|
+
connectionRecoveryMinInterval: h = 2,
|
|
1010
1010
|
connectionRecoveryMaxInterval: _ = 6,
|
|
1011
1011
|
userAgent: l
|
|
1012
1012
|
}) {
|
|
1013
1013
|
if (a && !t)
|
|
1014
1014
|
throw new Error("password is required for authorized connection");
|
|
1015
|
-
const
|
|
1015
|
+
const d = a && e ? e.trim() : `${mn()}`, T = fn(r), u = T(d), S = new this.JsSIP.WebSocketInterface(n);
|
|
1016
1016
|
return {
|
|
1017
1017
|
configuration: {
|
|
1018
1018
|
password: t,
|
|
@@ -1024,7 +1024,7 @@ class Ss {
|
|
|
1024
1024
|
sockets: [S],
|
|
1025
1025
|
session_timers: c,
|
|
1026
1026
|
register_expires: E,
|
|
1027
|
-
connection_recovery_min_interval:
|
|
1027
|
+
connection_recovery_min_interval: h,
|
|
1028
1028
|
connection_recovery_max_interval: _
|
|
1029
1029
|
},
|
|
1030
1030
|
helpers: {
|
|
@@ -1034,28 +1034,28 @@ class Ss {
|
|
|
1034
1034
|
};
|
|
1035
1035
|
}
|
|
1036
1036
|
async _sendPresentation(e, t, {
|
|
1037
|
-
maxBitrate: n =
|
|
1037
|
+
maxBitrate: n = ht,
|
|
1038
1038
|
isNeedReinvite: i = !0,
|
|
1039
1039
|
isP2P: r = !1,
|
|
1040
1040
|
contentHint: a = "detail",
|
|
1041
1041
|
sendEncodings: c,
|
|
1042
1042
|
onAddedTransceiver: E
|
|
1043
1043
|
}) {
|
|
1044
|
-
const
|
|
1045
|
-
this._streamPresentationCurrent =
|
|
1044
|
+
const h = M(t, { contentHint: a });
|
|
1045
|
+
this._streamPresentationCurrent = h;
|
|
1046
1046
|
const _ = r ? [Sn] : [ln], l = e.sendInfo(p, void 0, {
|
|
1047
1047
|
extraHeaders: _
|
|
1048
|
-
}).then(async () => e.startPresentation(
|
|
1048
|
+
}).then(async () => e.startPresentation(h, i, {
|
|
1049
1049
|
sendEncodings: c,
|
|
1050
1050
|
onAddedTransceiver: E
|
|
1051
1051
|
})).then(async () => {
|
|
1052
|
-
const { connection:
|
|
1053
|
-
if (!
|
|
1052
|
+
const { connection: d } = this;
|
|
1053
|
+
if (!d || n === void 0)
|
|
1054
1054
|
return;
|
|
1055
|
-
const T =
|
|
1056
|
-
await
|
|
1057
|
-
}).then(() => t).catch((
|
|
1058
|
-
throw this._removeStreamPresentationCurrent(), this._sessionEvents.trigger(H,
|
|
1055
|
+
const T = d.getSenders();
|
|
1056
|
+
await Yn(T, t, n);
|
|
1057
|
+
}).then(() => t).catch((d) => {
|
|
1058
|
+
throw this._removeStreamPresentationCurrent(), this._sessionEvents.trigger(H, d), d;
|
|
1059
1059
|
});
|
|
1060
1060
|
return this.promisePendingStartPresentation = l, l.finally(() => {
|
|
1061
1061
|
this.promisePendingStartPresentation = void 0;
|
|
@@ -1069,13 +1069,13 @@ class Ss {
|
|
|
1069
1069
|
sendEncodings: a,
|
|
1070
1070
|
onAddedTransceiver: c
|
|
1071
1071
|
} = {}, E) {
|
|
1072
|
-
const
|
|
1073
|
-
if (!
|
|
1072
|
+
const h = this.establishedSession;
|
|
1073
|
+
if (!h)
|
|
1074
1074
|
throw new Error("No session established");
|
|
1075
1075
|
if (this._streamPresentationCurrent)
|
|
1076
1076
|
throw new Error("Presentation is already started");
|
|
1077
|
-
return n && await this.sendMustStopPresentation(
|
|
1078
|
-
session:
|
|
1077
|
+
return n && await this.sendMustStopPresentation(h), this._sendPresentationWithDuplicatedCalls({
|
|
1078
|
+
session: h,
|
|
1079
1079
|
stream: e,
|
|
1080
1080
|
presentationOptions: {
|
|
1081
1081
|
isNeedReinvite: t,
|
|
@@ -1104,7 +1104,7 @@ class Ss {
|
|
|
1104
1104
|
extraHeaders: i
|
|
1105
1105
|
})).then(async () => r.stopPresentation(t)).catch((a) => {
|
|
1106
1106
|
throw this._sessionEvents.trigger(H, a), a;
|
|
1107
|
-
})), !r && t && this._sessionEvents.trigger(
|
|
1107
|
+
})), !r && t && this._sessionEvents.trigger(Pe, t), this.promisePendingStopPresentation = n, n.finally(() => {
|
|
1108
1108
|
this._resetPresentation();
|
|
1109
1109
|
});
|
|
1110
1110
|
}
|
|
@@ -1178,7 +1178,7 @@ class Ss {
|
|
|
1178
1178
|
if (!this.connection)
|
|
1179
1179
|
return;
|
|
1180
1180
|
const t = this.connection.getReceivers().map(({ track: n }) => n);
|
|
1181
|
-
return
|
|
1181
|
+
return On(t) ? this._generateStreams(t) : this._generateAudioStreams(t);
|
|
1182
1182
|
}
|
|
1183
1183
|
get connection() {
|
|
1184
1184
|
var t;
|
|
@@ -1308,20 +1308,21 @@ export {
|
|
|
1308
1308
|
yt as N,
|
|
1309
1309
|
le as P,
|
|
1310
1310
|
ke as R,
|
|
1311
|
-
|
|
1311
|
+
Ns as S,
|
|
1312
1312
|
Tt as U,
|
|
1313
|
-
|
|
1313
|
+
xn as a,
|
|
1314
1314
|
Te as b,
|
|
1315
|
-
|
|
1315
|
+
hs as c,
|
|
1316
1316
|
ds as d,
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1317
|
+
ls as e,
|
|
1318
|
+
us as f,
|
|
1319
|
+
Ts as g,
|
|
1320
|
+
Ss as h,
|
|
1321
1321
|
q as i,
|
|
1322
1322
|
F as j,
|
|
1323
1323
|
Rn as k,
|
|
1324
1324
|
B as l,
|
|
1325
|
-
|
|
1326
|
-
|
|
1325
|
+
In as m,
|
|
1326
|
+
ut as n,
|
|
1327
|
+
Vn as s
|
|
1327
1328
|
};
|