sip-connector 14.0.0 → 14.1.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.
@@ -1,18 +1,18 @@
1
- var It = Object.defineProperty;
2
- var ft = (s, e, t) => e in s ? It(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var r = (s, e, t) => ft(s, typeof e != "symbol" ? e + "" : e, t);
4
- import { CancelableRequest as g, isCanceledError as Pt } from "@krivega/cancelable-promise";
1
+ var Rt = Object.defineProperty;
2
+ var It = (s, e, t) => e in s ? Rt(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
+ var r = (s, e, t) => It(s, typeof e != "symbol" ? e + "" : e, t);
4
+ import { CancelableRequest as g, isCanceledError as ft } from "@krivega/cancelable-promise";
5
5
  import ve from "events-constructor";
6
- import { repeatedCallsAsync as ye } from "repeated-calls";
7
- import G from "debug";
8
- const mt = "Connection Error", ke = "Request Timeout", Ot = "SIP Failure Code", Dt = "Internal Error", Mt = "Busy", Be = "Rejected", pt = "Redirected", vt = "Unavailable", yt = "Not Found", wt = "Address Incomplete", bt = "Incompatible SDP", Ut = "Missing SDP", Lt = "Authentication Error", qe = "Terminated", Ht = "WebRTC Error", Fe = "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({
6
+ import { repeatedCallsAsync as ye, hasCanceledError as Pt } from "repeated-calls";
7
+ import $ from "debug";
8
+ const mt = "Connection Error", We = "Request Timeout", Ot = "SIP Failure Code", Dt = "Internal Error", Mt = "Busy", ke = "Rejected", pt = "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", ds = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9
9
  __proto__: null,
10
10
  ADDRESS_INCOMPLETE: wt,
11
11
  AUTHENTICATION_ERROR: Lt,
12
12
  BAD_MEDIA_DESCRIPTION: xt,
13
13
  BUSY: Mt,
14
- BYE: qe,
15
- CANCELED: Fe,
14
+ BYE: Be,
15
+ CANCELED: qe,
16
16
  CONNECTION_ERROR: mt,
17
17
  DIALOG_ERROR: qt,
18
18
  EXPIRES: kt,
@@ -23,51 +23,54 @@ const mt = "Connection Error", ke = "Request Timeout", Ot = "SIP Failure Code",
23
23
  NO_ACK: Bt,
24
24
  NO_ANSWER: Wt,
25
25
  REDIRECTED: pt,
26
- REJECTED: Be,
27
- REQUEST_TIMEOUT: ke,
26
+ REJECTED: ke,
27
+ REQUEST_TIMEOUT: We,
28
28
  RTP_TIMEOUT: Vt,
29
29
  SIP_FAILURE_CODE: Ot,
30
30
  UNAVAILABLE: vt,
31
31
  USER_DENIED_MEDIA_ACCESS: Ft,
32
32
  WEBRTC_ERROR: Ht
33
- }, Symbol.toStringTag, { value: "Module" })), $ = "incomingCall", J = "declinedIncomingCall", X = "failedIncomingCall", z = "terminatedIncomingCall", k = "connecting", m = "connected", C = "disconnected", y = "newRTCSession", O = "registered", Q = "unregistered", D = "registrationFailed", xe = "newMessage", j = "sipEvent", K = "availableSecondRemoteStream", Z = "notAvailableSecondRemoteStream", ee = "mustStopPresentation", w = "shareState", te = "enterRoom", ne = "useLicense", se = "peerconnection:confirmed", ie = "peerconnection:ontrack", b = "channels", re = "channels:notify", oe = "ended:fromserver", ae = "main-cam-control", ce = "admin-stop-main-cam", _e = "admin-start-main-cam", Ee = "admin-stop-mic", he = "admin-start-mic", U = "admin-force-sync-media-state", de = "participant:added-to-list-moderators", le = "participant:removed-from-list-moderators", Se = "participant:move-request-to-stream", Te = "participant:move-request-to-spectators", ue = "participant:move-request-to-participants", Ce = "participation:accepting-word-request", Ne = "participation:cancelling-word-request", ge = "webcast:started", Re = "webcast:stopped", Ae = "account:changed", Ie = "account:deleted", fe = "conference:participant-token-issued", M = "ended", Ve = "sending", Ye = "reinvite", Ge = "replaces", $e = "refer", Je = "progress", Xe = "accepted", L = "confirmed", H = "peerconnection", A = "failed", ze = "muted", Qe = "unmuted", Pe = "newDTMF", me = "newInfo", je = "hold", Ke = "unhold", Ze = "update", et = "sdp", tt = "icecandidate", nt = "getusermediafailed", st = "peerconnection:createofferfailed", it = "peerconnection:createanswerfailed", rt = "peerconnection:setlocaldescriptionfailed", ot = "peerconnection:setremotedescriptionfailed", at = "presentation:start", ct = "presentation:started", _t = "presentation:end", Oe = "presentation:ended", W = "presentation:failed", Et = "SPECTATOR", ht = "PARTICIPANT", dt = 1e6, ds = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
33
+ }, Symbol.toStringTag, { value: "Module" })), G = "incomingCall", J = "declinedIncomingCall", X = "failedIncomingCall", z = "terminatedIncomingCall", B = "connecting", O = "connected", C = "disconnected", w = "newRTCSession", D = "registered", Q = "unregistered", M = "registrationFailed", Fe = "newMessage", j = "sipEvent", K = "availableSecondRemoteStream", Z = "notAvailableSecondRemoteStream", ee = "mustStopPresentation", b = "shareState", te = "enterRoom", ne = "useLicense", se = "peerconnection:confirmed", ie = "peerconnection:ontrack", U = "channels", re = "channels:notify", oe = "ended:fromserver", ae = "main-cam-control", ce = "admin-stop-main-cam", _e = "admin-start-main-cam", Ee = "admin-stop-mic", he = "admin-start-mic", L = "admin-force-sync-media-state", de = "participant:added-to-list-moderators", le = "participant:removed-from-list-moderators", Se = "participant:move-request-to-stream", Te = "participant:move-request-to-spectators", ue = "participant:move-request-to-participants", Ce = "participation:accepting-word-request", Ne = "participation:cancelling-word-request", ge = "webcast:started", Ae = "webcast:stopped", Re = "account:changed", Ie = "account:deleted", fe = "conference:participant-token-issued", p = "ended", xe = "sending", Ve = "reinvite", Ye = "replaces", $e = "refer", Ge = "progress", Je = "accepted", H = "confirmed", W = "peerconnection", I = "failed", Xe = "muted", ze = "unmuted", Pe = "newDTMF", me = "newInfo", Qe = "hold", je = "unhold", Ke = "update", Ze = "sdp", et = "icecandidate", tt = "getusermediafailed", nt = "peerconnection:createofferfailed", st = "peerconnection:createanswerfailed", it = "peerconnection:setlocaldescriptionfailed", rt = "peerconnection:setremotedescriptionfailed", ot = "presentation:start", at = "presentation:started", ct = "presentation:end", Oe = "presentation:ended", k = "presentation:failed", _t = "SPECTATOR", Et = "PARTICIPANT", ht = 1e6;
34
+ var R = /* @__PURE__ */ ((s) => (s.LOCAL = "local", s.REMOTE = "remote", s.SYSTEM = "system", s))(R || {});
35
+ const ls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
34
36
  __proto__: null,
35
- ACCEPTED: Xe,
36
- ACCOUNT_CHANGED: Ae,
37
+ ACCEPTED: Je,
38
+ ACCOUNT_CHANGED: Re,
37
39
  ACCOUNT_DELETED: Ie,
38
- ADMIN_FORCE_SYNC_MEDIA_STATE: U,
40
+ ADMIN_FORCE_SYNC_MEDIA_STATE: L,
39
41
  ADMIN_START_MAIN_CAM: _e,
40
42
  ADMIN_START_MIC: he,
41
43
  ADMIN_STOP_MAIN_CAM: ce,
42
44
  ADMIN_STOP_MIC: Ee,
43
45
  AVAILABLE_SECOND_REMOTE_STREAM_EVENT: K,
44
- CHANNELS: b,
46
+ CHANNELS: U,
45
47
  CHANNELS_NOTIFY: re,
46
48
  CONFERENCE_PARTICIPANT_TOKEN_ISSUED: fe,
47
- CONFIRMED: L,
48
- CONNECTED: m,
49
- CONNECTING: k,
49
+ CONFIRMED: H,
50
+ CONNECTED: O,
51
+ CONNECTING: B,
50
52
  DECLINED_INCOMING_CALL: J,
51
53
  DISCONNECTED: C,
52
- ENDED: M,
54
+ ENDED: p,
53
55
  ENDED_FROM_SERVER: oe,
54
56
  ENTER_ROOM: te,
55
- FAILED: A,
57
+ FAILED: I,
56
58
  FAILED_INCOMING_CALL: X,
57
- GET_USER_MEDIA_FAILED: nt,
58
- HOLD: je,
59
- ICE_CANDIDATE: tt,
60
- INCOMING_CALL: $,
59
+ GET_USER_MEDIA_FAILED: tt,
60
+ HOLD: Qe,
61
+ ICE_CANDIDATE: et,
62
+ INCOMING_CALL: G,
61
63
  MAIN_CAM_CONTROL: ae,
62
64
  MUST_STOP_PRESENTATION_EVENT: ee,
63
- MUTED: ze,
65
+ MUTED: Xe,
64
66
  NEW_DTMF: Pe,
65
67
  NEW_INFO: me,
66
- NEW_MESSAGE: xe,
67
- NEW_RTC_SESSION: y,
68
+ NEW_MESSAGE: Fe,
69
+ NEW_RTC_SESSION: w,
68
70
  NOT_AVAILABLE_SECOND_REMOTE_STREAM_EVENT: Z,
69
- ONE_MEGABIT_IN_BITS: dt,
70
- PARTICIPANT: ht,
71
+ ONE_MEGABIT_IN_BITS: ht,
72
+ Originator: R,
73
+ PARTICIPANT: Et,
71
74
  PARTICIPANT_ADDED_TO_LIST_MODERATORS: de,
72
75
  PARTICIPANT_MOVE_REQUEST_TO_PARTICIPANTS: ue,
73
76
  PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS: Te,
@@ -75,39 +78,39 @@ const mt = "Connection Error", ke = "Request Timeout", Ot = "SIP Failure Code",
75
78
  PARTICIPANT_REMOVED_FROM_LIST_MODERATORS: le,
76
79
  PARTICIPATION_ACCEPTING_WORD_REQUEST: Ce,
77
80
  PARTICIPATION_CANCELLING_WORD_REQUEST: Ne,
78
- PEER_CONNECTION: H,
81
+ PEER_CONNECTION: W,
79
82
  PEER_CONNECTION_CONFIRMED: se,
80
- PEER_CONNECTION_CREATE_ANSWER_FAILED: it,
81
- PEER_CONNECTION_CREATE_OFFER_FAILED: st,
83
+ PEER_CONNECTION_CREATE_ANSWER_FAILED: st,
84
+ PEER_CONNECTION_CREATE_OFFER_FAILED: nt,
82
85
  PEER_CONNECTION_ONTRACK: ie,
83
- PEER_CONNECTION_SET_LOCAL_DESCRIPTION_FAILED: rt,
84
- PEER_CONNECTION_SET_REMOTE_DESCRIPTION_FAILED: ot,
85
- PRESENTATION_END: _t,
86
+ PEER_CONNECTION_SET_LOCAL_DESCRIPTION_FAILED: it,
87
+ PEER_CONNECTION_SET_REMOTE_DESCRIPTION_FAILED: rt,
88
+ PRESENTATION_END: ct,
86
89
  PRESENTATION_ENDED: Oe,
87
- PRESENTATION_FAILED: W,
88
- PRESENTATION_START: at,
89
- PRESENTATION_STARTED: ct,
90
- PROGRESS: Je,
90
+ PRESENTATION_FAILED: k,
91
+ PRESENTATION_START: ot,
92
+ PRESENTATION_STARTED: at,
93
+ PROGRESS: Ge,
91
94
  REFER: $e,
92
- REGISTERED: O,
93
- REGISTRATION_FAILED: D,
94
- REINVITE: Ye,
95
- REPLACES: Ge,
96
- SDP: et,
97
- SENDING: Ve,
98
- SHARE_STATE: w,
95
+ REGISTERED: D,
96
+ REGISTRATION_FAILED: M,
97
+ REINVITE: Ve,
98
+ REPLACES: Ye,
99
+ SDP: Ze,
100
+ SENDING: xe,
101
+ SHARE_STATE: b,
99
102
  SIP_EVENT: j,
100
- SPECTATOR: Et,
103
+ SPECTATOR: _t,
101
104
  TERMINATED_INCOMING_CALL: z,
102
- UNHOLD: Ke,
103
- UNMUTED: Qe,
105
+ UNHOLD: je,
106
+ UNMUTED: ze,
104
107
  UNREGISTERED: Q,
105
- UPDATE: Ze,
108
+ UPDATE: Ke,
106
109
  USE_LICENSE: ne,
107
110
  WEBCAST_STARTED: ge,
108
- WEBCAST_STOPPED: Re
109
- }, Symbol.toStringTag, { value: "Module" })), lt = [
110
- $,
111
+ WEBCAST_STOPPED: Ae
112
+ }, Symbol.toStringTag, { value: "Module" })), dt = [
113
+ G,
111
114
  J,
112
115
  z,
113
116
  X,
@@ -116,57 +119,58 @@ const mt = "Connection Error", ke = "Request Timeout", Ot = "SIP Failure Code",
116
119
  Se,
117
120
  re,
118
121
  fe,
119
- Ae,
122
+ Re,
120
123
  Ie,
121
124
  ge,
122
- Re,
125
+ Ae,
123
126
  de,
124
127
  le
125
128
  ], De = [
126
- k,
127
- m,
128
- C,
129
- y,
129
+ B,
130
130
  O,
131
- Q,
131
+ C,
132
+ w,
132
133
  D,
133
- xe,
134
+ Q,
135
+ M,
136
+ Fe,
134
137
  j
135
- ], St = [
138
+ ], lt = [
136
139
  K,
137
140
  Z,
138
141
  ee,
139
- w,
142
+ b,
140
143
  te,
141
144
  ne,
142
145
  se,
143
146
  ie,
144
- b,
147
+ U,
145
148
  oe,
146
149
  ae,
147
150
  _e,
148
151
  ce,
149
152
  Ee,
150
153
  he,
151
- U,
154
+ L,
152
155
  Te,
153
156
  ue
154
157
  ], Me = [
155
- M,
156
- k,
158
+ p,
159
+ B,
160
+ xe,
157
161
  Ve,
158
162
  Ye,
159
- Ge,
160
163
  $e,
164
+ Ge,
161
165
  Je,
162
- Xe,
163
- L,
164
166
  H,
165
- A,
167
+ W,
168
+ I,
169
+ Xe,
166
170
  ze,
167
- Qe,
168
171
  Pe,
169
172
  me,
173
+ Qe,
170
174
  je,
171
175
  Ke,
172
176
  Ze,
@@ -179,39 +183,38 @@ const mt = "Connection Error", ke = "Request Timeout", Ot = "SIP Failure Code",
179
183
  ot,
180
184
  at,
181
185
  ct,
182
- _t,
183
186
  Oe,
184
- W
185
- ], Tt = [...De, ...lt], ut = [
187
+ k
188
+ ], St = [...De, ...dt], Tt = [
186
189
  ...Me,
187
- ...St
188
- ], ls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
190
+ ...lt
191
+ ], Ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
189
192
  __proto__: null,
190
- SESSION_EVENT_NAMES: ut,
193
+ SESSION_EVENT_NAMES: Tt,
191
194
  SESSION_JSSIP_EVENT_NAMES: Me,
192
- SESSION_SYNTHETICS_EVENT_NAMES: St,
193
- UA_EVENT_NAMES: Tt,
195
+ SESSION_SYNTHETICS_EVENT_NAMES: lt,
196
+ UA_EVENT_NAMES: St,
194
197
  UA_JSSIP_EVENT_NAMES: De,
195
- UA_SYNTHETICS_EVENT_NAMES: lt
196
- }, Symbol.toStringTag, { value: "Module" })), pe = "sip-connector", F = G(pe), Ss = () => {
197
- G.enable(pe);
198
- }, Ts = () => {
199
- G.enable(`-${pe}`);
200
- }, Yt = (s, e) => (s.degradationPreference = e.degradationPreference, s), Gt = (s, e) => {
198
+ UA_SYNTHETICS_EVENT_NAMES: dt
199
+ }, Symbol.toStringTag, { value: "Module" })), pe = "sip-connector", x = $(pe), Ts = () => {
200
+ $.enable(pe);
201
+ }, us = () => {
202
+ $.enable(`-${pe}`);
203
+ }, Yt = (s, e) => (s.degradationPreference = e.degradationPreference, s), $t = (s, e) => {
201
204
  s.encodings === void 0 && (s.encodings = []);
202
205
  for (let t = s.encodings.length; t < e; t += 1)
203
206
  s.encodings.push({});
204
207
  return s;
205
- }, Ct = (s) => (e, t) => t !== void 0 && e !== t || t === void 0 && e !== s, $t = Ct(), Jt = (s, e) => {
206
- if ($t(s, e))
208
+ }, ut = (s) => (e, t) => t !== void 0 && e !== t || t === void 0 && e !== s, Gt = ut(), Jt = (s, e) => {
209
+ if (Gt(s, e))
207
210
  return s;
208
211
  }, Xt = (s, e) => {
209
212
  const t = s.maxBitrate, n = Jt(e, t);
210
213
  return n !== void 0 && (s.maxBitrate = n), s;
211
- }, Nt = 1, zt = Ct(
212
- Nt
214
+ }, Ct = 1, zt = ut(
215
+ Ct
213
216
  ), Qt = (s, e) => {
214
- const t = s === void 0 ? void 0 : Math.max(s, Nt);
217
+ const t = s === void 0 ? void 0 : Math.max(s, Ct);
215
218
  if (t !== void 0 && zt(
216
219
  t,
217
220
  e
@@ -226,7 +229,7 @@ const mt = "Connection Error", ke = "Request Timeout", Ot = "SIP Failure Code",
226
229
  }, Kt = (s, e) => {
227
230
  var n;
228
231
  const t = ((n = e.encodings) == null ? void 0 : n.length) ?? 0;
229
- return Gt(s, t), s.encodings.forEach((i, o) => {
232
+ return $t(s, t), s.encodings.forEach((i, o) => {
230
233
  const a = ((e == null ? void 0 : e.encodings) ?? [])[o], c = a == null ? void 0 : a.maxBitrate, _ = a == null ? void 0 : a.scaleResolutionDownBy;
231
234
  Xt(i, c), jt(i, _);
232
235
  }), s;
@@ -254,7 +257,7 @@ const mt = "Connection Error", ke = "Request Timeout", Ot = "SIP Failure Code",
254
257
  const i = Zt(n, t);
255
258
  return i && await s.setParameters(t), { parameters: t, isChanged: i };
256
259
  };
257
- var P = /* @__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))(P || {}), x = /* @__PURE__ */ ((s) => (s.ADMIN_STOP_MIC = "ADMINSTOPMIC", s.ADMIN_START_MIC = "ADMINSTARTMIC", s))(x || {}), V = /* @__PURE__ */ ((s) => (s.ADMIN_SYNC_FORCED = "1", s.ADMIN_SYNC_NOT_FORCED = "0", s))(V || {}), tn = /* @__PURE__ */ ((s) => (s.AUDIO = "AUDIO", s.VIDEO = "VIDEO", s.AUDIOPLUSPRESENTATION = "AUDIOPLUSPRESENTATION", s))(tn || {}), nn = /* @__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))(nn || {});
260
+ var m = /* @__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))(m || {}), V = /* @__PURE__ */ ((s) => (s.ADMIN_STOP_MIC = "ADMINSTOPMIC", s.ADMIN_START_MIC = "ADMINSTARTMIC", s))(V || {}), Y = /* @__PURE__ */ ((s) => (s.ADMIN_SYNC_FORCED = "1", s.ADMIN_SYNC_NOT_FORCED = "0", s))(Y || {}), tn = /* @__PURE__ */ ((s) => (s.AUDIO = "AUDIO", s.VIDEO = "VIDEO", s.AUDIOPLUSPRESENTATION = "AUDIOPLUSPRESENTATION", s))(tn || {}), nn = /* @__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))(nn || {});
258
261
  const sn = async (s, e, t) => {
259
262
  const { isChanged: n, parameters: i } = await en(s, {
260
263
  encodings: [
@@ -268,11 +271,11 @@ const sn = async (s, e, t) => {
268
271
  }, rn = (s) => {
269
272
  const e = [];
270
273
  return s && e.push(`X-Vinteo-Remote: ${s}`), e;
271
- }, on = "content-type", an = "x-webrtc-enter-room", p = "application/vinteo.webrtc.sharedesktop", cn = "application/vinteo.webrtc.roomname", _n = "application/vinteo.webrtc.channels", En = "application/vinteo.webrtc.mediastate", hn = "application/vinteo.webrtc.refusal", we = "application/vinteo.webrtc.maincam", dn = "application/vinteo.webrtc.mic", ln = "application/vinteo.webrtc.uselic", Sn = "X-WEBRTC-USE-LICENSE", Tn = "X-WEBRTC-PARTICIPANT-NAME", be = "X-WEBRTC-INPUT-CHANNELS", Ue = "X-WEBRTC-OUTPUT-CHANNELS", un = "X-WEBRTC-MAINCAM", Cn = "X-WEBRTC-MIC", Le = "X-WEBRTC-SYNC", Nn = "X-WEBRTC-MAINCAM-RESOLUTION", gn = "X-WEBRTC-MEDIA-STATE", Rn = "X-Vinteo-Media-Type", An = "X-Vinteo-MainCam-State", In = "X-Vinteo-Mic-State", fn = "application/vinteo.webrtc.partstate", Pn = "X-WEBRTC-PARTSTATE", mn = "application/vinteo.webrtc.notify", On = "X-VINTEO-NOTIFY", I = "x-webrtc-share-state", Dn = `${I}: LETMESTARTPRESENTATION`, Mn = `${I}: STOPPRESENTATION`, gt = "YOUCANRECEIVECONTENT", Rt = "CONTENTEND", At = "YOUMUSTSTOPSENDCONTENT", pn = `${I}: ${At}`, vn = `${I}: ${gt}`, yn = `${I}: ${Rt}`, wn = "X-WEBRTC-REQUEST-ENABLE-MEDIA-DEVICE", bn = `${wn}: LETMESTARTMAINCAM`, Un = (s, e) => {
274
+ }, on = "content-type", an = "x-webrtc-enter-room", v = "application/vinteo.webrtc.sharedesktop", cn = "application/vinteo.webrtc.roomname", _n = "application/vinteo.webrtc.channels", En = "application/vinteo.webrtc.mediastate", hn = "application/vinteo.webrtc.refusal", we = "application/vinteo.webrtc.maincam", dn = "application/vinteo.webrtc.mic", ln = "application/vinteo.webrtc.uselic", Sn = "X-WEBRTC-USE-LICENSE", Tn = "X-WEBRTC-PARTICIPANT-NAME", be = "X-WEBRTC-INPUT-CHANNELS", Ue = "X-WEBRTC-OUTPUT-CHANNELS", un = "X-WEBRTC-MAINCAM", Cn = "X-WEBRTC-MIC", Le = "X-WEBRTC-SYNC", Nn = "X-WEBRTC-MAINCAM-RESOLUTION", gn = "X-WEBRTC-MEDIA-STATE", An = "X-Vinteo-Media-Type", Rn = "X-Vinteo-MainCam-State", In = "X-Vinteo-Mic-State", fn = "application/vinteo.webrtc.partstate", Pn = "X-WEBRTC-PARTSTATE", mn = "application/vinteo.webrtc.notify", On = "X-VINTEO-NOTIFY", f = "x-webrtc-share-state", Dn = `${f}: LETMESTARTPRESENTATION`, Mn = `${f}: STOPPRESENTATION`, Nt = "YOUCANRECEIVECONTENT", gt = "CONTENTEND", At = "YOUMUSTSTOPSENDCONTENT", pn = `${f}: ${At}`, vn = `${f}: ${Nt}`, yn = `${f}: ${gt}`, wn = "X-WEBRTC-REQUEST-ENABLE-MEDIA-DEVICE", bn = `${wn}: LETMESTARTMAINCAM`, Un = (s, e) => {
272
275
  s.getVideoTracks().forEach((n) => {
273
276
  "contentHint" in n && n.contentHint !== e && (n.contentHint = e);
274
277
  });
275
- }, v = (s, {
278
+ }, y = (s, {
276
279
  directionVideo: e,
277
280
  directionAudio: t,
278
281
  contentHint: n
@@ -292,11 +295,15 @@ const Hn = (s, e) => () => Math.floor(Math.random() * (e - s)) + s, He = (s) =>
292
295
  const n = Vn(s, e);
293
296
  if (n)
294
297
  return sn(n, { maxBitrate: t });
295
- }, Gn = 486, $n = 487, Y = "local", We = "remote", Jn = 3, Xn = 1, us = (s = new Error()) => {
298
+ }, $n = 486, Gn = 487, Jn = 3, Xn = 1, zn = (s) => s instanceof Object && ("originator" in s || "cause" in s), Cs = (s) => {
299
+ if (ft(s))
300
+ return !0;
301
+ if (!zn(s))
302
+ return !1;
296
303
  const { originator: e, cause: t } = s;
297
- return Pt(s) ? !0 : typeof t == "string" ? t === ke || t === Be || e === Y && (t === Fe || t === qe) : !1;
298
- }, R = "SipConnector", zn = "channels", Qn = "WebcastStarted", jn = "WebcastStopped", Kn = "accountChanged", Zn = "accountDeleted", es = "addedToListModerators", ts = "removedFromListModerators", ns = "ParticipationRequestAccepted", ss = "ParticipationRequestRejected", is = "ParticipantMovedToWebcast", rs = "ConferenceParticipantTokenIssued";
299
- class Cs {
304
+ return typeof t == "string" ? t === We || t === ke || e === R.LOCAL && (t === qe || t === Be) : !1;
305
+ }, Ns = (s) => Pt(s), A = "SipConnector", Qn = "channels", jn = "WebcastStarted", Kn = "WebcastStopped", Zn = "accountChanged", es = "accountDeleted", ts = "addedToListModerators", ns = "removedFromListModerators", ss = "ParticipationRequestAccepted", is = "ParticipationRequestRejected", rs = "ParticipantMovedToWebcast", os = "ConferenceParticipantTokenIssued";
306
+ class gs {
300
307
  constructor({ JsSIP: e }) {
301
308
  r(this, "_isRegisterConfig", !1);
302
309
  r(this, "_connectionConfiguration", {});
@@ -332,15 +339,15 @@ class Cs {
332
339
  r(this, "tryRegister", async () => {
333
340
  if (!this.isRegisterConfig)
334
341
  throw new Error("Config is not registered");
335
- this._uaEvents.trigger(k, void 0);
342
+ this._uaEvents.trigger(B, void 0);
336
343
  try {
337
344
  await this.unregister();
338
345
  } catch (e) {
339
- F("tryRegister", e);
346
+ x("tryRegister", e);
340
347
  }
341
348
  return this.register();
342
349
  });
343
- r(this, "declineToIncomingCall", async ({ statusCode: e = $n } = {}) => new Promise((t, n) => {
350
+ r(this, "declineToIncomingCall", async ({ statusCode: e = Gn } = {}) => new Promise((t, n) => {
344
351
  if (!this.isAvailableIncomingCall) {
345
352
  n(new Error("no incomingRTCSession"));
346
353
  return;
@@ -348,7 +355,7 @@ class Cs {
348
355
  const i = this.incomingRTCSession, o = this.remoteCallerData;
349
356
  this._cancelableCall.cancelRequest(), this._cancelableAnswer.cancelRequest(), this.removeIncomingSession(), this._uaEvents.trigger(J, o), t(i.terminate({ status_code: e }));
350
357
  }));
351
- r(this, "busyIncomingCall", async () => this.declineToIncomingCall({ statusCode: Gn }));
358
+ r(this, "busyIncomingCall", async () => this.declineToIncomingCall({ statusCode: $n }));
352
359
  r(this, "removeIncomingSession", () => {
353
360
  delete this.incomingRTCSession;
354
361
  });
@@ -374,12 +381,12 @@ class Cs {
374
381
  });
375
382
  });
376
383
  r(this, "handleNewRTCSession", ({ originator: e, session: t }) => {
377
- if (e === We) {
384
+ if (e === R.REMOTE) {
378
385
  this.incomingRTCSession = t;
379
386
  const n = this.remoteCallerData;
380
- t.on(A, (i) => {
381
- this.removeIncomingSession(), i.originator === Y ? this._uaEvents.trigger(z, n) : this._uaEvents.trigger(X, n);
382
- }), this._uaEvents.trigger($, n);
387
+ t.on(I, (i) => {
388
+ this.removeIncomingSession(), i.originator === R.LOCAL ? this._uaEvents.trigger(z, n) : this._uaEvents.trigger(X, n);
389
+ }), this._uaEvents.trigger(G, n);
383
390
  }
384
391
  });
385
392
  r(this, "_connect", async (e) => this.initUa(e).then(async () => this._start()));
@@ -426,9 +433,9 @@ class Cs {
426
433
  connectionRecoveryMaxInterval: E,
427
434
  userAgent: l
428
435
  });
429
- return this.getSipServerUrl = u.getSipServerUrl, this.socket = u.socket, this.ua && await this._disconnectWithoutCancelRequests(), this._isRegisterConfig = !!h, this.ua = this._createUa({ ...d, remoteAddress: o, extraHeaders: T }), this._uaEvents.eachTriggers((N, B) => {
430
- const f = De.find((q) => q === B);
431
- f && this.ua && this.ua.on(f, N);
436
+ return this.getSipServerUrl = u.getSipServerUrl, this.socket = u.socket, this.ua && await this._disconnectWithoutCancelRequests(), this._isRegisterConfig = !!h, this.ua = this._createUa({ ...d, remoteAddress: o, extraHeaders: T }), this._uaEvents.eachTriggers((N, q) => {
437
+ const P = De.find((F) => F === q);
438
+ P && this.ua && this.ua.on(P, N);
432
439
  }), this.ua;
433
440
  });
434
441
  r(this, "_createUa", ({
@@ -450,11 +457,11 @@ class Cs {
450
457
  }, o = (_) => {
451
458
  c(), t(_);
452
459
  }, a = () => {
453
- this.isRegisterConfig ? (this.on(O, i), this.on(D, o)) : this.on(m, i), this.on(C, o);
460
+ this.isRegisterConfig ? (this.on(D, i), this.on(M, o)) : this.on(O, i), this.on(C, o);
454
461
  }, c = () => {
455
- this.off(O, i), this.off(D, o), this.off(m, i), this.off(C, o);
462
+ this.off(D, i), this.off(M, o), this.off(O, i), this.off(C, o);
456
463
  };
457
- a(), this.on(y, this.handleNewRTCSession), n.start();
464
+ a(), this.on(w, this.handleNewRTCSession), n.start();
458
465
  }));
459
466
  r(this, "_set", async ({ displayName: e, password: t }) => new Promise((n, i) => {
460
467
  const { ua: o } = this;
@@ -473,7 +480,7 @@ class Cs {
473
480
  }));
474
481
  r(this, "_disconnectWithoutCancelRequests", async () => this._cancelableDisconnect.request());
475
482
  r(this, "_disconnect", async () => {
476
- this.off(y, this.handleNewRTCSession);
483
+ this.off(w, this.handleNewRTCSession);
477
484
  const e = new Promise((t) => {
478
485
  this.once(C, () => {
479
486
  delete this.ua, t();
@@ -504,7 +511,7 @@ class Cs {
504
511
  d(N);
505
512
  }), this.rtcSession = u.call(this.getSipServerUrl(e), {
506
513
  extraHeaders: n,
507
- mediaStream: v(t, {
514
+ mediaStream: y(t, {
508
515
  directionVideo: a,
509
516
  directionAudio: c,
510
517
  contentHint: _
@@ -546,13 +553,13 @@ class Cs {
546
553
  T(new Error("No rtcSession established"));
547
554
  return;
548
555
  }
549
- this._sessionEvents.eachTriggers((N, B) => {
550
- const f = Me.find((q) => q === B);
551
- f && d.on(f, N);
556
+ this._sessionEvents.eachTriggers((N, q) => {
557
+ const P = Me.find((F) => F === q);
558
+ P && d.on(P, N);
552
559
  }), this._connectionConfiguration.answer = !0, this._connectionConfiguration.number = d.remote_identity.uri.user, this._handleCall({ ontrack: t }).then(h).catch((N) => {
553
560
  T(N);
554
561
  });
555
- const u = v(e, {
562
+ const u = y(e, {
556
563
  directionVideo: o,
557
564
  directionAudio: a,
558
565
  contentHint: E
@@ -575,13 +582,13 @@ class Cs {
575
582
  }));
576
583
  r(this, "_handleCall", async ({ ontrack: e }) => new Promise((t, n) => {
577
584
  const i = () => {
578
- this.onSession(H, l), this.onSession(L, S);
585
+ this.onSession(W, l), this.onSession(H, S);
579
586
  }, o = () => {
580
- this.offSession(H, l), this.offSession(L, S);
587
+ this.offSession(W, l), this.offSession(H, S);
581
588
  }, a = () => {
582
- this.onSession(A, _), this.onSession(M, _);
589
+ this.onSession(I, _), this.onSession(p, _);
583
590
  }, c = () => {
584
- this.offSession(A, _), this.offSession(M, _);
591
+ this.offSession(I, _), this.offSession(p, _);
585
592
  }, _ = (h) => {
586
593
  o(), c(), n(h);
587
594
  };
@@ -605,7 +612,7 @@ class Cs {
605
612
  return;
606
613
  }
607
614
  this.onceSession(Pe, ({ originator: o }) => {
608
- o === Y && t();
615
+ o === R.LOCAL && t();
609
616
  }), i.sendDTMF(e, {
610
617
  duration: 120,
611
618
  interToneGap: 600
@@ -618,7 +625,7 @@ class Cs {
618
625
  try {
619
626
  await this.stopPresentation();
620
627
  } catch (t) {
621
- F("error stop presentation: ", t);
628
+ x("error stop presentation: ", t);
622
629
  }
623
630
  if (this._restoreSession(), !e.isEnded())
624
631
  return e.terminateAsync();
@@ -626,11 +633,11 @@ class Cs {
626
633
  });
627
634
  r(this, "_handleShareState", (e) => {
628
635
  switch (e) {
629
- case gt: {
636
+ case Nt: {
630
637
  this._sessionEvents.trigger(K, void 0);
631
638
  break;
632
639
  }
633
- case Rt: {
640
+ case gt: {
634
641
  this._sessionEvents.trigger(Z, void 0);
635
642
  break;
636
643
  }
@@ -647,66 +654,66 @@ class Cs {
647
654
  inputChannels: t,
648
655
  outputChannels: n
649
656
  };
650
- this._sessionEvents.trigger(b, i);
657
+ this._sessionEvents.trigger(U, i);
651
658
  }
652
659
  });
653
660
  r(this, "_handleNotify", (e) => {
654
661
  switch (e.cmd) {
655
- case zn: {
662
+ case Qn: {
656
663
  const t = e;
657
664
  this._triggerChannelsNotify(t);
658
665
  break;
659
666
  }
660
- case Qn: {
667
+ case jn: {
661
668
  const t = e;
662
669
  this._triggerWebcastStartedNotify(t);
663
670
  break;
664
671
  }
665
- case jn: {
672
+ case Kn: {
666
673
  const t = e;
667
674
  this._triggerWebcastStoppedNotify(t);
668
675
  break;
669
676
  }
670
- case es: {
677
+ case ts: {
671
678
  const t = e;
672
679
  this._triggerAddedToListModeratorsNotify(t);
673
680
  break;
674
681
  }
675
- case ts: {
682
+ case ns: {
676
683
  const t = e;
677
684
  this._triggerRemovedFromListModeratorsNotify(t);
678
685
  break;
679
686
  }
680
- case ns: {
687
+ case ss: {
681
688
  const t = e;
682
689
  this._triggerParticipationAcceptingWordRequest(t);
683
690
  break;
684
691
  }
685
- case ss: {
692
+ case is: {
686
693
  const t = e;
687
694
  this._triggerParticipationCancellingWordRequest(t);
688
695
  break;
689
696
  }
690
- case is: {
697
+ case rs: {
691
698
  const t = e;
692
699
  this._triggerParticipantMoveRequestToStream(t);
693
700
  break;
694
701
  }
695
- case Kn: {
702
+ case Zn: {
696
703
  this._triggerAccountChangedNotify();
697
704
  break;
698
705
  }
699
- case Zn: {
706
+ case es: {
700
707
  this._triggerAccountDeletedNotify();
701
708
  break;
702
709
  }
703
- case rs: {
710
+ case os: {
704
711
  const t = e;
705
712
  this._triggerConferenceParticipantTokenIssued(t);
706
713
  break;
707
714
  }
708
715
  default:
709
- F("unknown cmd", e.cmd);
716
+ x("unknown cmd", e.cmd);
710
717
  }
711
718
  });
712
719
  r(this, "_triggerRemovedFromListModeratorsNotify", ({
@@ -738,10 +745,10 @@ class Cs {
738
745
  conference: e,
739
746
  type: t
740
747
  };
741
- this._uaEvents.trigger(Re, n);
748
+ this._uaEvents.trigger(Ae, n);
742
749
  });
743
750
  r(this, "_triggerAccountChangedNotify", () => {
744
- this._uaEvents.trigger(Ae, void 0);
751
+ this._uaEvents.trigger(Re, void 0);
745
752
  });
746
753
  r(this, "_triggerAccountDeletedNotify", () => {
747
754
  this._uaEvents.trigger(Ie, void 0);
@@ -795,24 +802,24 @@ class Cs {
795
802
  this._sessionEvents.trigger(te, { room: t, participantName: n });
796
803
  });
797
804
  r(this, "_triggerShareState", (e) => {
798
- const t = e.getHeader(I);
799
- this._sessionEvents.trigger(w, t);
805
+ const t = e.getHeader(f);
806
+ this._sessionEvents.trigger(b, t);
800
807
  });
801
808
  r(this, "_maybeTriggerParticipantMoveRequest", (e) => {
802
809
  const t = e.getHeader(Pn);
803
- t === Et && this._sessionEvents.trigger(Te, void 0), t === ht && this._sessionEvents.trigger(ue, void 0);
810
+ t === _t && this._sessionEvents.trigger(Te, void 0), t === Et && this._sessionEvents.trigger(ue, void 0);
804
811
  });
805
812
  r(this, "_triggerMainCamControl", (e) => {
806
- const t = e.getHeader(un), n = e.getHeader(Le), i = n === V.ADMIN_SYNC_FORCED;
807
- if (t === P.ADMIN_START_MAIN_CAM) {
813
+ const t = e.getHeader(un), n = e.getHeader(Le), i = n === Y.ADMIN_SYNC_FORCED;
814
+ if (t === m.ADMIN_START_MAIN_CAM) {
808
815
  this._sessionEvents.trigger(_e, { isSyncForced: i });
809
816
  return;
810
817
  }
811
- if (t === P.ADMIN_STOP_MAIN_CAM) {
818
+ if (t === m.ADMIN_STOP_MAIN_CAM) {
812
819
  this._sessionEvents.trigger(ce, { isSyncForced: i });
813
820
  return;
814
821
  }
815
- (t === P.RESUME_MAIN_CAM || t === P.PAUSE_MAIN_CAM) && n && this._sessionEvents.trigger(U, { isSyncForced: i });
822
+ (t === m.RESUME_MAIN_CAM || t === m.PAUSE_MAIN_CAM) && n && this._sessionEvents.trigger(L, { isSyncForced: i });
816
823
  const o = e.getHeader(Nn);
817
824
  this._sessionEvents.trigger(ae, {
818
825
  mainCam: t,
@@ -820,8 +827,8 @@ class Cs {
820
827
  });
821
828
  });
822
829
  r(this, "_triggerMicControl", (e) => {
823
- const t = e.getHeader(Cn), i = e.getHeader(Le) === V.ADMIN_SYNC_FORCED;
824
- t === x.ADMIN_START_MIC ? this._sessionEvents.trigger(he, { isSyncForced: i }) : t === x.ADMIN_STOP_MIC && this._sessionEvents.trigger(Ee, { isSyncForced: i });
830
+ const t = e.getHeader(Cn), i = e.getHeader(Le) === Y.ADMIN_SYNC_FORCED;
831
+ t === V.ADMIN_START_MIC ? this._sessionEvents.trigger(he, { isSyncForced: i }) : t === V.ADMIN_STOP_MIC && this._sessionEvents.trigger(Ee, { isSyncForced: i });
825
832
  });
826
833
  r(this, "_triggerUseLicense", (e) => {
827
834
  const t = e.getHeader(Sn);
@@ -842,7 +849,7 @@ class Cs {
842
849
  this._maybeHandleNotify(n);
843
850
  break;
844
851
  }
845
- case p: {
852
+ case v: {
846
853
  this._triggerShareState(n);
847
854
  break;
848
855
  }
@@ -876,32 +883,32 @@ class Cs {
876
883
  });
877
884
  r(this, "_handleEnded", (e) => {
878
885
  const { originator: t } = e;
879
- t === We && this._sessionEvents.trigger(oe, e), this._restoreSession();
886
+ t === R.REMOTE && this._sessionEvents.trigger(oe, e), this._restoreSession();
880
887
  });
881
- this.JsSIP = e, this._sessionEvents = new ve(ut), this._uaEvents = new ve(Tt), this._cancelableConnect = new g(
888
+ this.JsSIP = e, this._sessionEvents = new ve(Tt), this._uaEvents = new ve(St), this._cancelableConnect = new g(
882
889
  this._connect,
883
890
  {
884
- moduleName: R,
891
+ moduleName: A,
885
892
  afterCancelRequest: () => {
886
893
  this._cancelableInitUa.cancelRequest(), this._cancelableDisconnect.cancelRequest();
887
894
  }
888
895
  }
889
896
  ), this._cancelableInitUa = new g(
890
897
  this._initUa,
891
- { moduleName: R }
898
+ { moduleName: A }
892
899
  ), this._cancelableDisconnect = new g(
893
900
  this._disconnect,
894
- { moduleName: R }
901
+ { moduleName: A }
895
902
  ), this._cancelableSet = new g(this._set, {
896
- moduleName: R
903
+ moduleName: A
897
904
  }), this._cancelableCall = new g(
898
905
  this._call,
899
- { moduleName: R }
900
- ), this._cancelableAnswer = new g(this._answer, { moduleName: R }), this._cancelableSendDTMF = new g(this._sendDTMF, { moduleName: R }), this.onSession(w, this._handleShareState), this.onSession(me, this._handleNewInfo), this.on(j, this._handleSipEvent), this.onSession(A, this._handleEnded), this.onSession(M, this._handleEnded);
906
+ { moduleName: A }
907
+ ), this._cancelableAnswer = new g(this._answer, { moduleName: A }), this._cancelableSendDTMF = new g(this._sendDTMF, { moduleName: A }), this.onSession(b, this._handleShareState), this.onSession(me, this._handleNewInfo), this.on(j, this._handleSipEvent), this.onSession(I, this._handleEnded), this.onSession(p, this._handleEnded);
901
908
  }
902
909
  async register() {
903
910
  return new Promise((e, t) => {
904
- this.isRegisterConfig && this.ua ? (this.ua.on(O, e), this.ua.on(D, t), this.ua.register()) : t(new Error("Config is not registered"));
911
+ this.isRegisterConfig && this.ua ? (this.ua.on(D, e), this.ua.on(M, t), this.ua.register()) : t(new Error("Config is not registered"));
905
912
  });
906
913
  }
907
914
  async unregister() {
@@ -957,13 +964,13 @@ class Cs {
957
964
  const h = () => {
958
965
  l.removeAllListeners(), l.once(C, c), l.stop();
959
966
  };
960
- l.once(m, h), l.start();
967
+ l.once(O, h), l.start();
961
968
  });
962
969
  }
963
970
  async replaceMediaStream(e, t) {
964
971
  if (!this.rtcSession)
965
972
  throw new Error("No rtcSession established");
966
- const { contentHint: n } = t ?? {}, i = v(e, { contentHint: n });
973
+ const { contentHint: n } = t ?? {}, i = y(e, { contentHint: n });
967
974
  return this.rtcSession.replaceMediaStream(i, t);
968
975
  }
969
976
  async askPermissionToEnableCam(e = {}) {
@@ -1041,16 +1048,16 @@ class Cs {
1041
1048
  };
1042
1049
  }
1043
1050
  async _sendPresentation(e, t, {
1044
- maxBitrate: n = dt,
1051
+ maxBitrate: n = ht,
1045
1052
  isNeedReinvite: i = !0,
1046
1053
  isP2P: o = !1,
1047
1054
  contentHint: a = "detail",
1048
1055
  sendEncodings: c,
1049
1056
  onAddedTransceiver: _
1050
1057
  }) {
1051
- const E = v(t, { contentHint: a });
1058
+ const E = y(t, { contentHint: a });
1052
1059
  this._streamPresentationCurrent = E;
1053
- const l = o ? [vn] : [Dn], S = e.sendInfo(p, void 0, {
1060
+ const l = o ? [vn] : [Dn], S = e.sendInfo(v, void 0, {
1054
1061
  extraHeaders: l
1055
1062
  }).then(async () => e.startPresentation(E, i, {
1056
1063
  sendEncodings: c,
@@ -1062,7 +1069,7 @@ class Cs {
1062
1069
  const T = h.getSenders();
1063
1070
  await Yn(T, t, n);
1064
1071
  }).then(() => t).catch((h) => {
1065
- throw this._removeStreamPresentationCurrent(), this._sessionEvents.trigger(W, h), h;
1072
+ throw this._removeStreamPresentationCurrent(), this._sessionEvents.trigger(k, h), h;
1066
1073
  });
1067
1074
  return this.promisePendingStartPresentation = S, S.finally(() => {
1068
1075
  this.promisePendingStartPresentation = void 0;
@@ -1096,7 +1103,7 @@ class Cs {
1096
1103
  });
1097
1104
  }
1098
1105
  async sendMustStopPresentation(e) {
1099
- await e.sendInfo(p, void 0, {
1106
+ await e.sendInfo(v, void 0, {
1100
1107
  extraHeaders: [pn]
1101
1108
  });
1102
1109
  }
@@ -1107,10 +1114,10 @@ class Cs {
1107
1114
  const t = this._streamPresentationCurrent;
1108
1115
  let n = this.promisePendingStartPresentation ?? Promise.resolve();
1109
1116
  const i = e ? [yn] : [Mn], o = this.establishedRTCSession;
1110
- return o && t && (n = n.then(async () => o.sendInfo(p, void 0, {
1117
+ return o && t && (n = n.then(async () => o.sendInfo(v, void 0, {
1111
1118
  extraHeaders: i
1112
1119
  })).then(async () => o.stopPresentation(t)).catch((a) => {
1113
- throw this._sessionEvents.trigger(W, a), a;
1120
+ throw this._sessionEvents.trigger(k, a), a;
1114
1121
  })), !o && t && this._sessionEvents.trigger(Oe, t), this.promisePendingStopPresentation = n, n.finally(() => {
1115
1122
  this._resetPresentation();
1116
1123
  });
@@ -1260,10 +1267,10 @@ class Cs {
1260
1267
  this._cancelableAnswer.cancelRequest(), this._cancelableSendDTMF.cancelRequest();
1261
1268
  }
1262
1269
  async waitChannels() {
1263
- return this.waitSession(b);
1270
+ return this.waitSession(U);
1264
1271
  }
1265
1272
  async waitSyncMediaState() {
1266
- return this.waitSession(U);
1273
+ return this.waitSession(L);
1267
1274
  }
1268
1275
  async sendChannels({ inputChannels: e, outputChannels: t }) {
1269
1276
  if (!this.rtcSession)
@@ -1277,7 +1284,7 @@ class Cs {
1277
1284
  async sendMediaState({ cam: e, mic: t }, n = {}) {
1278
1285
  if (!this.rtcSession)
1279
1286
  throw new Error("No rtcSession established");
1280
- const i = `${gn}: currentstate`, o = `${An}: ${Number(e)}`, a = `${In}: ${Number(t)}`, c = [
1287
+ const i = `${gn}: currentstate`, o = `${Rn}: ${Number(e)}`, a = `${In}: ${Number(t)}`, c = [
1281
1288
  i,
1282
1289
  o,
1283
1290
  a
@@ -1291,7 +1298,7 @@ class Cs {
1291
1298
  async _sendRefusalToTurnOn(e, t = {}) {
1292
1299
  if (!this.rtcSession)
1293
1300
  throw new Error("No rtcSession established");
1294
- const c = [`${Rn}: ${e === "mic" ? 0 : 1}`];
1301
+ const c = [`${An}: ${e === "mic" ? 0 : 1}`];
1295
1302
  return this.rtcSession.sendInfo(hn, void 0, {
1296
1303
  noTerminateWhenError: !0,
1297
1304
  ...t,
@@ -1311,25 +1318,26 @@ class Cs {
1311
1318
  }
1312
1319
  export {
1313
1320
  xt as B,
1314
- P as E,
1321
+ m as E,
1315
1322
  yt as N,
1316
1323
  Te as P,
1317
- Be as R,
1318
- Cs as S,
1319
- Tt as U,
1324
+ ke as R,
1325
+ gs as S,
1326
+ St as U,
1320
1327
  en as a,
1321
1328
  ue as b,
1322
- hs as c,
1323
- ds as d,
1324
- ls as e,
1325
- Ts as f,
1326
- Ss as g,
1327
- us as h,
1328
- x as i,
1329
+ ds as c,
1330
+ ls as d,
1331
+ Ss as e,
1332
+ us as f,
1333
+ Ts as g,
1334
+ Cs as h,
1335
+ Ns as i,
1329
1336
  V as j,
1330
- tn as k,
1331
- F as l,
1332
- nn as m,
1333
- ut as n,
1337
+ Y as k,
1338
+ x as l,
1339
+ tn as m,
1340
+ nn as n,
1341
+ Tt as o,
1334
1342
  sn as s
1335
1343
  };