sip-connector 12.2.0 → 13.0.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
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 Pt } from "@krivega/cancelable-promise";
5
- import Me from "events-constructor";
6
- import { repeatedCallsAsync as ve } from "repeated-calls";
7
- import V from "debug";
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({
4
+ import { CancelableRequest as C, isCanceledError as Pt } from "@krivega/cancelable-promise";
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({
9
9
  __proto__: null,
10
10
  ADDRESS_INCOMPLETE: wt,
11
11
  AUTHENTICATION_ERROR: Lt,
12
12
  BAD_MEDIA_DESCRIPTION: xt,
13
- BUSY: pt,
14
- BYE: Be,
15
- CANCELED: qe,
13
+ BUSY: Mt,
14
+ BYE: qe,
15
+ CANCELED: Fe,
16
16
  CONNECTION_ERROR: mt,
17
17
  DIALOG_ERROR: qt,
18
18
  EXPIRES: kt,
@@ -22,152 +22,151 @@ const mt = "Connection Error", We = "Request Timeout", Ot = "SIP Failure Code",
22
22
  NOT_FOUND: yt,
23
23
  NO_ACK: Bt,
24
24
  NO_ANSWER: Wt,
25
- REDIRECTED: Mt,
26
- REJECTED: ke,
27
- REQUEST_TIMEOUT: We,
25
+ REDIRECTED: pt,
26
+ REJECTED: Be,
27
+ REQUEST_TIMEOUT: ke,
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" })), 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({
33
+ }, Symbol.toStringTag, { value: "Module" })), $ = "incomingCall", J = "declinedIncomingCall", X = "failedIncomingCall", z = "terminatedIncomingCall", k = "connecting", m = "connected", N = "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", oe = "channels:notify", re = "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", Te = "participant:move-request-to-stream", ue = "participant:move-request-to-spectators", Se = "participant:move-request-to-participants", Ne = "participation:accepting-word-request", ge = "participation:cancelling-word-request", Ce = "webcast:started", Ae = "webcast:stopped", Re = "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", R = "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", ot = "peerconnection:setlocaldescriptionfailed", rt = "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({
34
34
  __proto__: null,
35
- ACCEPTED: Je,
36
- ACCOUNT_CHANGED: Ce,
37
- ACCOUNT_DELETED: Ae,
38
- ADMIN_FORCE_SYNC_MEDIA_STATE: b,
39
- ADMIN_START_MAIN_CAM: ae,
40
- ADMIN_START_MIC: _e,
41
- ADMIN_STOP_MAIN_CAM: re,
42
- ADMIN_STOP_MIC: ce,
43
- AVAILABLE_SECOND_REMOTE_STREAM_EVENT: Q,
44
- CHANNELS: w,
45
- CHANNELS_NOTIFY: se,
46
- CONFERENCE_PARTICIPANT_TOKEN_ISSUED: Re,
47
- CONFIRMED: U,
48
- CONNECTED: P,
49
- CONNECTING: W,
50
- DECLINED_INCOMING_CALL: G,
35
+ ACCEPTED: Xe,
36
+ ACCOUNT_CHANGED: Re,
37
+ ACCOUNT_DELETED: Ie,
38
+ ADMIN_FORCE_SYNC_MEDIA_STATE: U,
39
+ ADMIN_START_MAIN_CAM: _e,
40
+ ADMIN_START_MIC: he,
41
+ ADMIN_STOP_MAIN_CAM: ce,
42
+ ADMIN_STOP_MIC: Ee,
43
+ AVAILABLE_SECOND_REMOTE_STREAM_EVENT: K,
44
+ CHANNELS: b,
45
+ CHANNELS_NOTIFY: oe,
46
+ CONFERENCE_PARTICIPANT_TOKEN_ISSUED: fe,
47
+ CONFIRMED: L,
48
+ CONNECTED: m,
49
+ CONNECTING: k,
50
+ DECLINED_INCOMING_CALL: J,
51
51
  DISCONNECTED: N,
52
- ENDED: D,
53
- ENDED_FROM_SERVER: ie,
54
- ENTER_ROOM: Z,
52
+ ENDED: M,
53
+ ENDED_FROM_SERVER: re,
54
+ ENTER_ROOM: te,
55
55
  FAILED: R,
56
- FAILED_INCOMING_CALL: $,
57
- GET_USER_MEDIA_FAILED: tt,
58
- HOLD: Qe,
59
- ICE_CANDIDATE: et,
60
- INCOMING_CALL: Y,
61
- MAIN_CAM_CONTROL: oe,
62
- MUST_STOP_PRESENTATION_EVENT: K,
63
- MUTED: Xe,
64
- NEW_DTMF: Ie,
65
- NEW_INFO: fe,
66
- NEW_MESSAGE: Fe,
67
- NEW_RTC_SESSION: v,
68
- NOT_AVAILABLE_SECOND_REMOTE_STREAM_EVENT: j,
69
- ONE_MEGABIT_IN_BITS: ht,
70
- PARTICIPANT: Et,
71
- PARTICIPANT_ADDED_TO_LIST_MODERATORS: Ee,
72
- PARTICIPANT_MOVE_REQUEST_TO_PARTICIPANTS: Te,
73
- PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS: le,
74
- PARTICIPANT_MOVE_REQUEST_TO_STREAM: de,
75
- PARTICIPANT_REMOVED_FROM_LIST_MODERATORS: he,
76
- PARTICIPATION_ACCEPTING_WORD_REQUEST: ue,
77
- PARTICIPATION_CANCELLING_WORD_REQUEST: Se,
78
- PEER_CONNECTION: L,
79
- PEER_CONNECTION_CONFIRMED: te,
80
- PEER_CONNECTION_CREATE_ANSWER_FAILED: st,
81
- PEER_CONNECTION_CREATE_OFFER_FAILED: nt,
82
- PEER_CONNECTION_ONTRACK: ne,
83
- PEER_CONNECTION_SET_LOCAL_DESCRIPTION_FAILED: it,
84
- PEER_CONNECTION_SET_REMOTE_DESCRIPTION_FAILED: ot,
85
- PRESENTATION_END: ct,
86
- PRESENTATION_ENDED: Pe,
87
- PRESENTATION_FAILED: H,
88
- PRESENTATION_START: rt,
89
- PRESENTATION_STARTED: at,
90
- PROGRESS: $e,
91
- REFER: Ge,
92
- REGISTERED: m,
93
- REGISTRATION_FAILED: O,
94
- REINVITE: Ve,
95
- REPLACES: Ye,
96
- SDP: Ze,
97
- SENDING: xe,
98
- SHARE_STATE: y,
99
- SIP_EVENT: z,
100
- SPECTATOR: _t,
101
- TERMINATED_INCOMING_CALL: J,
102
- UNHOLD: je,
103
- UNMUTED: ze,
104
- UNREGISTERED: X,
105
- UPDATE: Ke,
106
- USE_LICENSE: ee,
107
- WEBCAST_STARTED: Ne,
108
- WEBCAST_STOPPED: ge
109
- }, Symbol.toStringTag, { value: "Module" })), dt = [
110
- Y,
111
- G,
112
- J,
56
+ FAILED_INCOMING_CALL: X,
57
+ GET_USER_MEDIA_FAILED: nt,
58
+ HOLD: je,
59
+ ICE_CANDIDATE: tt,
60
+ INCOMING_CALL: $,
61
+ MAIN_CAM_CONTROL: ae,
62
+ MUST_STOP_PRESENTATION_EVENT: ee,
63
+ MUTED: ze,
64
+ NEW_DTMF: Pe,
65
+ NEW_INFO: me,
66
+ NEW_MESSAGE: xe,
67
+ NEW_RTC_SESSION: y,
68
+ NOT_AVAILABLE_SECOND_REMOTE_STREAM_EVENT: Z,
69
+ ONE_MEGABIT_IN_BITS: dt,
70
+ PARTICIPANT: ht,
71
+ PARTICIPANT_ADDED_TO_LIST_MODERATORS: de,
72
+ PARTICIPANT_MOVE_REQUEST_TO_PARTICIPANTS: Se,
73
+ PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS: ue,
74
+ PARTICIPANT_MOVE_REQUEST_TO_STREAM: Te,
75
+ PARTICIPANT_REMOVED_FROM_LIST_MODERATORS: le,
76
+ PARTICIPATION_ACCEPTING_WORD_REQUEST: Ne,
77
+ PARTICIPATION_CANCELLING_WORD_REQUEST: ge,
78
+ PEER_CONNECTION: H,
79
+ PEER_CONNECTION_CONFIRMED: se,
80
+ PEER_CONNECTION_CREATE_ANSWER_FAILED: it,
81
+ PEER_CONNECTION_CREATE_OFFER_FAILED: st,
82
+ PEER_CONNECTION_ONTRACK: ie,
83
+ PEER_CONNECTION_SET_LOCAL_DESCRIPTION_FAILED: ot,
84
+ PEER_CONNECTION_SET_REMOTE_DESCRIPTION_FAILED: rt,
85
+ PRESENTATION_END: _t,
86
+ PRESENTATION_ENDED: Oe,
87
+ PRESENTATION_FAILED: W,
88
+ PRESENTATION_START: at,
89
+ PRESENTATION_STARTED: ct,
90
+ PROGRESS: Je,
91
+ 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,
99
+ SIP_EVENT: j,
100
+ SPECTATOR: Et,
101
+ TERMINATED_INCOMING_CALL: z,
102
+ UNHOLD: Ke,
103
+ UNMUTED: Qe,
104
+ UNREGISTERED: Q,
105
+ UPDATE: Ze,
106
+ USE_LICENSE: ne,
107
+ WEBCAST_STARTED: Ce,
108
+ WEBCAST_STOPPED: Ae
109
+ }, Symbol.toStringTag, { value: "Module" })), lt = [
113
110
  $,
114
- ue,
115
- Se,
116
- de,
117
- se,
111
+ J,
112
+ z,
113
+ X,
114
+ Ne,
115
+ ge,
116
+ Te,
117
+ oe,
118
+ fe,
118
119
  Re,
120
+ Ie,
119
121
  Ce,
120
122
  Ae,
121
- Ne,
122
- ge,
123
- Ee,
124
- he
125
- ], me = [
126
- W,
127
- P,
128
- N,
129
- v,
123
+ de,
124
+ le
125
+ ], De = [
126
+ k,
130
127
  m,
131
- X,
128
+ N,
129
+ y,
132
130
  O,
133
- Fe,
134
- z
135
- ], lt = [
136
131
  Q,
137
- j,
132
+ D,
133
+ xe,
134
+ j
135
+ ], Tt = [
138
136
  K,
139
- y,
140
137
  Z,
141
138
  ee,
139
+ w,
142
140
  te,
143
141
  ne,
144
- w,
142
+ se,
145
143
  ie,
146
- oe,
147
- ae,
144
+ b,
148
145
  re,
149
- ce,
146
+ ae,
150
147
  _e,
151
- b,
152
- le,
153
- Te
154
- ], Oe = [
155
- D,
156
- W,
157
- xe,
148
+ ce,
149
+ Ee,
150
+ he,
151
+ U,
152
+ ue,
153
+ Se
154
+ ], Me = [
155
+ M,
156
+ k,
158
157
  Ve,
159
158
  Ye,
160
159
  Ge,
161
160
  $e,
162
161
  Je,
163
- U,
162
+ Xe,
164
163
  L,
164
+ H,
165
165
  R,
166
- Xe,
167
166
  ze,
168
- Ie,
169
- fe,
170
167
  Qe,
168
+ Pe,
169
+ me,
171
170
  je,
172
171
  Ke,
173
172
  Ze,
@@ -180,33 +179,34 @@ const mt = "Connection Error", We = "Request Timeout", Ot = "SIP Failure Code",
180
179
  rt,
181
180
  at,
182
181
  ct,
183
- Pe,
184
- H
185
- ], Tt = [...me, ...dt], ut = [
186
- ...Oe,
187
- ...lt
182
+ _t,
183
+ Oe,
184
+ W
185
+ ], ut = [...De, ...lt], St = [
186
+ ...Me,
187
+ ...Tt
188
188
  ], ls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
189
189
  __proto__: null,
190
- SESSION_EVENT_NAMES: ut,
191
- SESSION_JSSIP_EVENT_NAMES: Oe,
192
- SESSION_SYNTHETICS_EVENT_NAMES: lt,
193
- UA_EVENT_NAMES: Tt,
194
- UA_JSSIP_EVENT_NAMES: me,
195
- UA_SYNTHETICS_EVENT_NAMES: dt
190
+ SESSION_EVENT_NAMES: St,
191
+ SESSION_JSSIP_EVENT_NAMES: Me,
192
+ SESSION_SYNTHETICS_EVENT_NAMES: Tt,
193
+ UA_EVENT_NAMES: ut,
194
+ UA_JSSIP_EVENT_NAMES: De,
195
+ UA_SYNTHETICS_EVENT_NAMES: lt
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", 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
- V.enable(De);
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", we = "application/vinteo.webrtc.maincam", jt = "application/vinteo.webrtc.mic", Kt = "application/vinteo.webrtc.uselic", Zt = "X-WEBRTC-USE-LICENSE", en = "X-WEBRTC-PARTICIPANT-NAME", be = "X-WEBRTC-INPUT-CHANNELS", Ue = "X-WEBRTC-OUTPUT-CHANNELS", tn = "X-WEBRTC-MAINCAM", nn = "X-WEBRTC-MIC", Le = "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`, Nt = "YOUCANRECEIVECONTENT", gt = "CONTENTEND", Ct = "YOUMUSTSTOPSENDCONTENT", un = `${I}: ${Ct}`, Sn = `${I}: ${Nt}`, Nn = `${I}: ${gt}`, gn = "X-WEBRTC-REQUEST-ENABLE-MEDIA-DEVICE", Cn = `${gn}: LETMESTARTMAINCAM`, pe = "sip-connector", F = G(pe), Ts = () => {
200
+ G.enable(pe);
201
201
  }, us = () => {
202
- V.enable(`-${De}`);
202
+ G.enable(`-${pe}`);
203
203
  }, An = (s, e) => {
204
204
  s.getVideoTracks().forEach((n) => {
205
205
  "contentHint" in n && n.contentHint !== e && (n.contentHint = e);
206
206
  });
207
- }, M = (s, {
208
- videoMode: e,
209
- audioMode: t,
207
+ }, v = (s, {
208
+ directionVideo: e,
209
+ directionAudio: t,
210
210
  contentHint: n
211
211
  } = {}) => {
212
212
  if (!s || e === "recvonly" && t === "recvonly")
@@ -214,28 +214,28 @@ const mt = "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 || {}), 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 || {});
217
+ 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 || {}), 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
218
  function fn(s) {
219
219
  return (e) => `sip:${e}@${s}`;
220
220
  }
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) => {
221
+ const Pn = (s, e) => () => Math.floor(Math.random() * (e - s)) + s, He = (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
- }), 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) => {
224
+ }), Dn = "Error decline with 603", Mn = 1006, pn = (s) => typeof s == "object" && s !== null && "code" in s && s.code === Mn, 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, Un = Ct(), Ln = (s, e) => {
229
+ }, At = (s) => (e, t) => t !== void 0 && e !== t || t === void 0 && e !== s, Un = At(), Ln = (s, e) => {
230
230
  if (Un(s, e))
231
231
  return s;
232
232
  }, Hn = (s, e) => {
233
233
  const t = s.maxBitrate, n = Ln(e, t);
234
234
  return n !== void 0 && (s.maxBitrate = n), s;
235
- }, At = 1, Wn = Ct(
236
- At
235
+ }, Rt = 1, Wn = At(
236
+ Rt
237
237
  ), kn = (s, e) => {
238
- const t = s === void 0 ? void 0 : Math.max(s, At);
238
+ const t = s === void 0 ? void 0 : Math.max(s, Rt);
239
239
  if (t !== void 0 && Wn(
240
240
  t,
241
241
  e
@@ -291,10 +291,10 @@ const Pn = (s, e) => () => Math.floor(Math.random() * (e - s)) + s, Le = (s) =>
291
291
  const n = yn(s, e);
292
292
  if (n)
293
293
  return Vn(n, { maxBitrate: t });
294
- }, Gn = 486, $n = 487, x = "local", He = "remote", Jn = 3, Xn = 1, Ss = (s = new Error()) => {
294
+ }, Gn = 486, $n = 487, Y = "local", We = "remote", Jn = 3, Xn = 1, Ss = (s = new Error()) => {
295
295
  const { originator: e, cause: t } = s;
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";
296
+ return Pt(s) ? !0 : typeof t == "string" ? t === ke || t === Be || e === Y && (t === Fe || t === qe) : !1;
297
+ }, A = "SipConnector", zn = "channels", Qn = "WebcastStarted", jn = "WebcastStopped", Kn = "accountChanged", Zn = "accountDeleted", es = "addedToListModerators", ts = "removedFromListModerators", ns = "ParticipationRequestAccepted", ss = "ParticipationRequestRejected", is = "ParticipantMovedToWebcast", os = "ConferenceParticipantTokenIssued";
298
298
  class Ns {
299
299
  constructor({ JsSIP: e }) {
300
300
  o(this, "_isRegisterConfig", !1);
@@ -331,11 +331,11 @@ class Ns {
331
331
  o(this, "tryRegister", async () => {
332
332
  if (!this.isRegisterConfig)
333
333
  throw new Error("Config is not registered");
334
- this._uaEvents.trigger(W, void 0);
334
+ this._uaEvents.trigger(k, void 0);
335
335
  try {
336
336
  await this.unregister();
337
337
  } catch (e) {
338
- B("tryRegister", e);
338
+ F("tryRegister", e);
339
339
  }
340
340
  return this.register();
341
341
  });
@@ -345,7 +345,7 @@ class Ns {
345
345
  return;
346
346
  }
347
347
  const i = this.incomingSession, r = this.remoteCallerData;
348
- this._cancelableCall.cancelRequest(), this._cancelableAnswer.cancelRequest(), this.removeIncomingSession(), this._uaEvents.trigger(G, r), t(i.terminate({ status_code: e }));
348
+ this._cancelableCall.cancelRequest(), this._cancelableAnswer.cancelRequest(), this.removeIncomingSession(), this._uaEvents.trigger(J, r), t(i.terminate({ status_code: e }));
349
349
  }));
350
350
  o(this, "busyIncomingCall", async () => this.declineToIncomingCall({ statusCode: Gn }));
351
351
  o(this, "removeIncomingSession", () => {
@@ -354,10 +354,10 @@ class Ns {
354
354
  o(this, "_connectWithDuplicatedCalls", async (e, { callLimit: t = Jn } = {}) => {
355
355
  const n = async () => this._cancelableConnect.request(e), i = (r) => {
356
356
  var h;
357
- const c = !!((h = this.ua) != null && h.isConnected()) && this.hasEqualConnectionConfiguration(e), E = !!r && !Mn(r);
357
+ const c = !!((h = this.ua) != null && h.isConnected()) && this.hasEqualConnectionConfiguration(e), E = !!r && !pn(r);
358
358
  return c || E;
359
359
  };
360
- return this._cancelableConnectWithRepeatedCalls = ve({
360
+ return this._cancelableConnectWithRepeatedCalls = ye({
361
361
  targetFunction: n,
362
362
  isComplete: i,
363
363
  callLimit: t,
@@ -373,12 +373,12 @@ class Ns {
373
373
  });
374
374
  });
375
375
  o(this, "handleNewRTCSession", ({ originator: e, session: t }) => {
376
- if (e === He) {
376
+ if (e === We) {
377
377
  this.incomingSession = t;
378
378
  const n = this.remoteCallerData;
379
379
  t.on(R, (i) => {
380
- this.removeIncomingSession(), i.originator === x ? this._uaEvents.trigger(J, n) : this._uaEvents.trigger($, n);
381
- }), this._uaEvents.trigger(Y, n);
380
+ this.removeIncomingSession(), i.originator === Y ? this._uaEvents.trigger(z, n) : this._uaEvents.trigger(X, n);
381
+ }), this._uaEvents.trigger($, n);
382
382
  }
383
383
  });
384
384
  o(this, "_connect", async (e) => this.initUa(e).then(async () => this._start()));
@@ -425,9 +425,9 @@ class Ns {
425
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 = !!d, this.ua = this._createUa({ ...u, remoteAddress: r, extraHeaders: T }), this._uaEvents.eachTriggers((A, k) => {
429
- const pe = me.find((Rt) => Rt === k);
430
- pe && this.ua && this.ua.on(pe, A);
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((g, B) => {
429
+ const f = De.find((q) => q === B);
430
+ f && this.ua && this.ua.on(f, g);
431
431
  }), this.ua;
432
432
  });
433
433
  o(this, "_createUa", ({
@@ -449,11 +449,11 @@ class Ns {
449
449
  }, r = (E) => {
450
450
  c(), t(E);
451
451
  }, a = () => {
452
- this.isRegisterConfig ? (this.on(m, i), this.on(O, r)) : this.on(P, i), this.on(N, r);
452
+ this.isRegisterConfig ? (this.on(O, i), this.on(D, r)) : this.on(m, i), this.on(N, r);
453
453
  }, c = () => {
454
- this.off(m, i), this.off(O, r), this.off(P, i), this.off(N, r);
454
+ this.off(O, i), this.off(D, r), this.off(m, i), this.off(N, r);
455
455
  };
456
- a(), this.on(v, this.handleNewRTCSession), n.start();
456
+ a(), this.on(y, this.handleNewRTCSession), n.start();
457
457
  }));
458
458
  o(this, "_set", async ({ displayName: e, password: t }) => new Promise((n, i) => {
459
459
  const { ua: r } = this;
@@ -462,7 +462,7 @@ class Ns {
462
462
  return;
463
463
  }
464
464
  let a = !1, c = !1;
465
- e !== void 0 && e !== this._connectionConfiguration.displayName && (a = r.set("display_name", Le(e)), this._connectionConfiguration.displayName = e), t !== void 0 && t !== this._connectionConfiguration.password && (c = r.set("password", t), this._connectionConfiguration.password = t);
465
+ e !== void 0 && e !== this._connectionConfiguration.displayName && (a = r.set("display_name", He(e)), this._connectionConfiguration.displayName = e), t !== void 0 && t !== this._connectionConfiguration.password && (c = r.set("password", t), this._connectionConfiguration.password = t);
466
466
  const E = a || c;
467
467
  c && this.isRegisterConfig ? this.register().then(() => {
468
468
  n(E);
@@ -472,7 +472,7 @@ class Ns {
472
472
  }));
473
473
  o(this, "_disconnectWithoutCancelRequests", async () => this._cancelableDisconnect.request());
474
474
  o(this, "_disconnect", async () => {
475
- this.off(v, this.handleNewRTCSession);
475
+ this.off(y, this.handleNewRTCSession);
476
476
  const e = new Promise((t) => {
477
477
  this.once(N, () => {
478
478
  delete this.ua, t();
@@ -486,8 +486,8 @@ class Ns {
486
486
  extraHeaders: n = [],
487
487
  ontrack: i,
488
488
  iceServers: r,
489
- videoMode: a,
490
- audioMode: c,
489
+ directionVideo: a,
490
+ directionAudio: c,
491
491
  contentHint: E,
492
492
  offerToReceiveAudio: h = !0,
493
493
  offerToReceiveVideo: _ = !0,
@@ -499,18 +499,18 @@ class Ns {
499
499
  u(new Error("this.ua is not initialized"));
500
500
  return;
501
501
  }
502
- this._connectionConfiguration.number = e, this._connectionConfiguration.answer = !1, this._handleCall({ ontrack: i }).then(T).catch((A) => {
503
- u(A);
502
+ this._connectionConfiguration.number = e, this._connectionConfiguration.answer = !1, this._handleCall({ ontrack: i }).then(T).catch((g) => {
503
+ u(g);
504
504
  }), this.session = S.call(this.getSipServerUrl(e), {
505
505
  extraHeaders: n,
506
- mediaStream: M(t, {
507
- videoMode: a,
508
- audioMode: c,
506
+ mediaStream: v(t, {
507
+ directionVideo: a,
508
+ directionAudio: c,
509
509
  contentHint: E
510
510
  }),
511
511
  eventHandlers: this._sessionEvents.triggers,
512
- videoMode: a,
513
- audioMode: c,
512
+ directionVideo: a,
513
+ directionAudio: c,
514
514
  pcConfig: {
515
515
  iceServers: r
516
516
  },
@@ -527,64 +527,70 @@ class Ns {
527
527
  ontrack: t,
528
528
  extraHeaders: n = [],
529
529
  iceServers: i,
530
- videoMode: r,
531
- audioMode: a,
532
- contentHint: c,
533
- sendEncodings: E,
534
- onAddedTransceiver: h
535
- }) => new Promise((_, l) => {
530
+ directionVideo: r,
531
+ directionAudio: a,
532
+ offerToReceiveAudio: c,
533
+ offerToReceiveVideo: E,
534
+ contentHint: h,
535
+ sendEncodings: _,
536
+ onAddedTransceiver: l
537
+ }) => new Promise((d, T) => {
536
538
  if (!this.isAvailableIncomingCall) {
537
- l(new Error("no incomingSession"));
539
+ T(new Error("no incomingSession"));
538
540
  return;
539
541
  }
540
542
  this.session = this.incomingSession, this.removeIncomingSession();
541
- const { session: d } = this;
542
- if (!d) {
543
- l(new Error("No session established"));
543
+ const { session: u } = this;
544
+ if (!u) {
545
+ T(new Error("No session established"));
544
546
  return;
545
547
  }
546
- this._sessionEvents.eachTriggers((u, S) => {
547
- const A = Oe.find((k) => k === S);
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
- l(u);
548
+ this._sessionEvents.eachTriggers((g, B) => {
549
+ const f = Me.find((q) => q === B);
550
+ f && u.on(f, g);
551
+ }), this._connectionConfiguration.answer = !0, this._connectionConfiguration.number = u.remote_identity.uri.user, this._handleCall({ ontrack: t }).then(d).catch((g) => {
552
+ T(g);
551
553
  });
552
- const T = M(e, {
553
- videoMode: r,
554
- audioMode: a,
555
- contentHint: c
554
+ const S = v(e, {
555
+ directionVideo: r,
556
+ directionAudio: a,
557
+ contentHint: h
556
558
  });
557
- d.answer({
559
+ u.answer({
558
560
  extraHeaders: n,
559
- videoMode: r,
560
- audioMode: a,
561
- mediaStream: T,
561
+ directionVideo: r,
562
+ directionAudio: a,
563
+ mediaStream: S,
562
564
  pcConfig: {
563
565
  iceServers: i
564
566
  },
565
- sendEncodings: E,
566
- onAddedTransceiver: h
567
+ rtcOfferConstraints: {
568
+ offerToReceiveAudio: c,
569
+ offerToReceiveVideo: E
570
+ },
571
+ sendEncodings: _,
572
+ onAddedTransceiver: l
567
573
  });
568
574
  }));
569
575
  o(this, "_handleCall", async ({ ontrack: e }) => new Promise((t, n) => {
570
576
  const i = () => {
571
- this.onSession(L, _), this.onSession(U, l);
577
+ this.onSession(H, _), this.onSession(L, l);
572
578
  }, r = () => {
573
- this.offSession(L, _), this.offSession(U, l);
579
+ this.offSession(H, _), this.offSession(L, l);
574
580
  }, a = () => {
575
- this.onSession(R, E), this.onSession(D, E);
581
+ this.onSession(R, E), this.onSession(M, E);
576
582
  }, c = () => {
577
- this.offSession(R, E), this.offSession(D, E);
583
+ this.offSession(R, E), this.offSession(M, E);
578
584
  }, E = (d) => {
579
585
  r(), c(), n(d);
580
586
  };
581
587
  let h;
582
588
  const _ = ({ peerconnection: d }) => {
583
589
  h = d, h.ontrack = (T) => {
584
- this._sessionEvents.trigger(ne, h), e && e(T);
590
+ this._sessionEvents.trigger(ie, h), e && e(T);
585
591
  };
586
592
  }, l = () => {
587
- h && this._sessionEvents.trigger(te, h), r(), c(), t(h);
593
+ h && this._sessionEvents.trigger(se, h), r(), c(), t(h);
588
594
  };
589
595
  i(), a();
590
596
  }));
@@ -597,8 +603,8 @@ class Ns {
597
603
  n(new Error("No session established"));
598
604
  return;
599
605
  }
600
- this.onceSession(Ie, ({ originator: r }) => {
601
- r === x && t();
606
+ this.onceSession(Pe, ({ originator: r }) => {
607
+ r === Y && t();
602
608
  }), i.sendDTMF(e, {
603
609
  duration: 120,
604
610
  interToneGap: 600
@@ -611,7 +617,7 @@ class Ns {
611
617
  try {
612
618
  await this.stopPresentation();
613
619
  } catch (t) {
614
- B("error stop presentation: ", t);
620
+ F("error stop presentation: ", t);
615
621
  }
616
622
  if (this._restoreSession(), !e.isEnded())
617
623
  return e.terminateAsync();
@@ -619,28 +625,28 @@ class Ns {
619
625
  });
620
626
  o(this, "_handleShareState", (e) => {
621
627
  switch (e) {
622
- case St: {
623
- this._sessionEvents.trigger(Q, void 0);
624
- break;
625
- }
626
628
  case Nt: {
627
- this._sessionEvents.trigger(j, void 0);
629
+ this._sessionEvents.trigger(K, void 0);
628
630
  break;
629
631
  }
630
632
  case gt: {
631
- this._sessionEvents.trigger(K, void 0);
633
+ this._sessionEvents.trigger(Z, void 0);
634
+ break;
635
+ }
636
+ case Ct: {
637
+ this._sessionEvents.trigger(ee, void 0);
632
638
  break;
633
639
  }
634
640
  }
635
641
  });
636
642
  o(this, "_maybeTriggerChannels", (e) => {
637
- const t = e.getHeader(we), n = e.getHeader(be);
643
+ const t = e.getHeader(be), n = e.getHeader(Ue);
638
644
  if (t && n) {
639
645
  const i = {
640
646
  inputChannels: t,
641
647
  outputChannels: n
642
648
  };
643
- this._sessionEvents.trigger(w, i);
649
+ this._sessionEvents.trigger(b, i);
644
650
  }
645
651
  });
646
652
  o(this, "_handleNotify", (e) => {
@@ -699,7 +705,7 @@ class Ns {
699
705
  break;
700
706
  }
701
707
  default:
702
- B("unknown cmd", e.cmd);
708
+ F("unknown cmd", e.cmd);
703
709
  }
704
710
  });
705
711
  o(this, "_triggerRemovedFromListModeratorsNotify", ({
@@ -709,7 +715,7 @@ class Ns {
709
715
  conference: e
710
716
  };
711
717
  this._uaEvents.trigger(
712
- he,
718
+ le,
713
719
  t
714
720
  );
715
721
  });
@@ -717,27 +723,27 @@ class Ns {
717
723
  const t = {
718
724
  conference: e
719
725
  };
720
- this._uaEvents.trigger(Ee, t);
726
+ this._uaEvents.trigger(de, t);
721
727
  });
722
728
  o(this, "_triggerWebcastStartedNotify", ({ body: { conference: e, type: t } }) => {
723
729
  const n = {
724
730
  conference: e,
725
731
  type: t
726
732
  };
727
- this._uaEvents.trigger(Ne, n);
733
+ this._uaEvents.trigger(Ce, n);
728
734
  });
729
735
  o(this, "_triggerWebcastStoppedNotify", ({ body: { conference: e, type: t } }) => {
730
736
  const n = {
731
737
  conference: e,
732
738
  type: t
733
739
  };
734
- this._uaEvents.trigger(ge, n);
740
+ this._uaEvents.trigger(Ae, n);
735
741
  });
736
742
  o(this, "_triggerAccountChangedNotify", () => {
737
- this._uaEvents.trigger(Ce, void 0);
743
+ this._uaEvents.trigger(Re, void 0);
738
744
  });
739
745
  o(this, "_triggerAccountDeletedNotify", () => {
740
- this._uaEvents.trigger(Ae, void 0);
746
+ this._uaEvents.trigger(Ie, void 0);
741
747
  });
742
748
  o(this, "_triggerConferenceParticipantTokenIssued", ({
743
749
  body: { conference: e, participant: t, jwt: n }
@@ -748,7 +754,7 @@ class Ns {
748
754
  jwt: n
749
755
  };
750
756
  this._uaEvents.trigger(
751
- Re,
757
+ fe,
752
758
  i
753
759
  );
754
760
  });
@@ -757,7 +763,7 @@ class Ns {
757
763
  inputChannels: t,
758
764
  outputChannels: n
759
765
  };
760
- this._uaEvents.trigger(se, i);
766
+ this._uaEvents.trigger(oe, i);
761
767
  });
762
768
  o(this, "_triggerParticipationAcceptingWordRequest", ({
763
769
  body: { conference: e }
@@ -765,7 +771,7 @@ class Ns {
765
771
  const t = {
766
772
  conference: e
767
773
  };
768
- this._uaEvents.trigger(ue, t);
774
+ this._uaEvents.trigger(Ne, t);
769
775
  });
770
776
  o(this, "_triggerParticipationCancellingWordRequest", ({
771
777
  body: { conference: e }
@@ -773,7 +779,7 @@ class Ns {
773
779
  const t = {
774
780
  conference: e
775
781
  };
776
- this._uaEvents.trigger(Se, t);
782
+ this._uaEvents.trigger(ge, t);
777
783
  });
778
784
  o(this, "_triggerParticipantMoveRequestToStream", ({
779
785
  body: { conference: e }
@@ -781,44 +787,44 @@ class Ns {
781
787
  const t = {
782
788
  conference: e
783
789
  };
784
- this._uaEvents.trigger(de, t);
790
+ this._uaEvents.trigger(Te, t);
785
791
  });
786
792
  o(this, "_triggerEnterRoom", (e) => {
787
793
  const t = e.getHeader($t), n = e.getHeader(en);
788
- this._sessionEvents.trigger(Z, { room: t, participantName: n });
794
+ this._sessionEvents.trigger(te, { room: t, participantName: n });
789
795
  });
790
796
  o(this, "_triggerShareState", (e) => {
791
797
  const t = e.getHeader(I);
792
- this._sessionEvents.trigger(y, t);
798
+ this._sessionEvents.trigger(w, t);
793
799
  });
794
800
  o(this, "_maybeTriggerParticipantMoveRequest", (e) => {
795
801
  const t = e.getHeader(En);
796
- t === _t && this._sessionEvents.trigger(le, void 0), t === Et && this._sessionEvents.trigger(Te, void 0);
802
+ t === Et && this._sessionEvents.trigger(ue, void 0), t === ht && this._sessionEvents.trigger(Se, void 0);
797
803
  });
798
804
  o(this, "_triggerMainCamControl", (e) => {
799
- const t = e.getHeader(tn), n = e.getHeader(Ue), i = n === F.ADMIN_SYNC_FORCED;
800
- if (t === f.ADMIN_START_MAIN_CAM) {
801
- this._sessionEvents.trigger(ae, { isSyncForced: i });
805
+ const t = e.getHeader(tn), n = e.getHeader(Le), i = n === V.ADMIN_SYNC_FORCED;
806
+ if (t === P.ADMIN_START_MAIN_CAM) {
807
+ this._sessionEvents.trigger(_e, { isSyncForced: i });
802
808
  return;
803
809
  }
804
- if (t === f.ADMIN_STOP_MAIN_CAM) {
805
- this._sessionEvents.trigger(re, { isSyncForced: i });
810
+ if (t === P.ADMIN_STOP_MAIN_CAM) {
811
+ this._sessionEvents.trigger(ce, { isSyncForced: i });
806
812
  return;
807
813
  }
808
- (t === f.RESUME_MAIN_CAM || t === f.PAUSE_MAIN_CAM) && n && this._sessionEvents.trigger(b, { isSyncForced: i });
814
+ (t === P.RESUME_MAIN_CAM || t === P.PAUSE_MAIN_CAM) && n && this._sessionEvents.trigger(U, { isSyncForced: i });
809
815
  const r = e.getHeader(sn);
810
- this._sessionEvents.trigger(oe, {
816
+ this._sessionEvents.trigger(ae, {
811
817
  mainCam: t,
812
818
  resolutionMainCam: r
813
819
  });
814
820
  });
815
821
  o(this, "_triggerMicControl", (e) => {
816
- const t = e.getHeader(nn), i = e.getHeader(Ue) === F.ADMIN_SYNC_FORCED;
817
- t === q.ADMIN_START_MIC ? this._sessionEvents.trigger(_e, { isSyncForced: i }) : t === q.ADMIN_STOP_MIC && this._sessionEvents.trigger(ce, { isSyncForced: i });
822
+ const t = e.getHeader(nn), i = e.getHeader(Le) === V.ADMIN_SYNC_FORCED;
823
+ t === x.ADMIN_START_MIC ? this._sessionEvents.trigger(he, { isSyncForced: i }) : t === x.ADMIN_STOP_MIC && this._sessionEvents.trigger(Ee, { isSyncForced: i });
818
824
  });
819
825
  o(this, "_triggerUseLicense", (e) => {
820
826
  const t = e.getHeader(Zt);
821
- this._sessionEvents.trigger(ee, t);
827
+ this._sessionEvents.trigger(ne, t);
822
828
  });
823
829
  o(this, "_handleNewInfo", (e) => {
824
830
  const { originator: t } = e;
@@ -839,7 +845,7 @@ class Ns {
839
845
  this._triggerShareState(n);
840
846
  break;
841
847
  }
842
- case ye: {
848
+ case we: {
843
849
  this._triggerMainCamControl(n);
844
850
  break;
845
851
  }
@@ -869,37 +875,37 @@ class Ns {
869
875
  });
870
876
  o(this, "_handleEnded", (e) => {
871
877
  const { originator: t } = e;
872
- t === He && this._sessionEvents.trigger(ie, e), this._restoreSession();
878
+ t === We && this._sessionEvents.trigger(re, e), this._restoreSession();
873
879
  });
874
- this.JsSIP = e, this._sessionEvents = new Me(ut), this._uaEvents = new Me(Tt), this._cancelableConnect = new g(
880
+ this.JsSIP = e, this._sessionEvents = new ve(St), this._uaEvents = new ve(ut), this._cancelableConnect = new C(
875
881
  this._connect,
876
882
  {
877
- moduleName: C,
883
+ moduleName: A,
878
884
  afterCancelRequest: () => {
879
885
  this._cancelableInitUa.cancelRequest(), this._cancelableDisconnect.cancelRequest();
880
886
  }
881
887
  }
882
- ), this._cancelableInitUa = new g(
888
+ ), this._cancelableInitUa = new C(
883
889
  this._initUa,
884
- { moduleName: C }
885
- ), this._cancelableDisconnect = new g(
890
+ { moduleName: A }
891
+ ), this._cancelableDisconnect = new C(
886
892
  this._disconnect,
887
- { moduleName: C }
888
- ), this._cancelableSet = new g(this._set, {
889
- moduleName: C
890
- }), this._cancelableCall = new g(
893
+ { moduleName: A }
894
+ ), this._cancelableSet = new C(this._set, {
895
+ moduleName: A
896
+ }), this._cancelableCall = new C(
891
897
  this._call,
892
- { moduleName: C }
893
- ), this._cancelableAnswer = new g(this._answer, { moduleName: C }), this._cancelableSendDTMF = new g(this._sendDTMF, { moduleName: C }), this.onSession(y, this._handleShareState), this.onSession(fe, this._handleNewInfo), this.on(z, this._handleSipEvent), this.onSession(R, this._handleEnded), this.onSession(D, this._handleEnded);
898
+ { moduleName: A }
899
+ ), this._cancelableAnswer = new C(this._answer, { moduleName: A }), this._cancelableSendDTMF = new C(this._sendDTMF, { moduleName: A }), this.onSession(w, this._handleShareState), this.onSession(me, this._handleNewInfo), this.on(j, this._handleSipEvent), this.onSession(R, this._handleEnded), this.onSession(M, this._handleEnded);
894
900
  }
895
901
  async register() {
896
902
  return new Promise((e, t) => {
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"));
903
+ this.isRegisterConfig && this.ua ? (this.ua.on(O, e), this.ua.on(D, t), this.ua.register()) : t(new Error("Config is not registered"));
898
904
  });
899
905
  }
900
906
  async unregister() {
901
907
  return new Promise((e, t) => {
902
- this.isRegistered && this.ua ? (this.ua.on(X, e), this.ua.unregister()) : t(new Error("ua is not registered"));
908
+ this.isRegistered && this.ua ? (this.ua.on(Q, e), this.ua.unregister()) : t(new Error("ua is not registered"));
903
909
  });
904
910
  }
905
911
  async sendOptions(e, t, n) {
@@ -950,20 +956,20 @@ class Ns {
950
956
  const d = () => {
951
957
  _.removeAllListeners(), _.once(N, c), _.stop();
952
958
  };
953
- _.once(P, d), _.start();
959
+ _.once(m, d), _.start();
954
960
  });
955
961
  }
956
962
  async replaceMediaStream(e, t) {
957
963
  if (!this.session)
958
964
  throw new Error("No session established");
959
- const { contentHint: n } = t ?? {}, i = M(e, { contentHint: n });
965
+ const { contentHint: n } = t ?? {}, i = v(e, { contentHint: n });
960
966
  return this.session.replaceMediaStream(i, t);
961
967
  }
962
968
  async askPermissionToEnableCam(e = {}) {
963
969
  if (!this.session)
964
970
  throw new Error("No session established");
965
971
  const t = [Cn];
966
- return this.session.sendInfo(ye, void 0, {
972
+ return this.session.sendInfo(we, void 0, {
967
973
  noTerminateWhenError: !0,
968
974
  ...e,
969
975
  extraHeaders: t
@@ -984,7 +990,7 @@ class Ns {
984
990
  }
985
991
  }) {
986
992
  const r = async () => this._sendPresentation(e, t, n), a = () => !!this._streamPresentationCurrent;
987
- return this._cancelableSendPresentationWithRepeatedCalls = ve({
993
+ return this._cancelableSendPresentationWithRepeatedCalls = ye({
988
994
  targetFunction: r,
989
995
  isComplete: a,
990
996
  isRejectAsValid: !0,
@@ -1018,7 +1024,7 @@ class Ns {
1018
1024
  password: t,
1019
1025
  register: a,
1020
1026
  uri: u,
1021
- display_name: Le(i),
1027
+ display_name: He(i),
1022
1028
  user_agent: l,
1023
1029
  sdp_semantics: "unified-plan",
1024
1030
  sockets: [S],
@@ -1034,14 +1040,14 @@ class Ns {
1034
1040
  };
1035
1041
  }
1036
1042
  async _sendPresentation(e, t, {
1037
- maxBitrate: n = ht,
1043
+ maxBitrate: n = dt,
1038
1044
  isNeedReinvite: i = !0,
1039
1045
  isP2P: r = !1,
1040
1046
  contentHint: a = "detail",
1041
1047
  sendEncodings: c,
1042
1048
  onAddedTransceiver: E
1043
1049
  }) {
1044
- const h = M(t, { contentHint: a });
1050
+ const h = v(t, { contentHint: a });
1045
1051
  this._streamPresentationCurrent = h;
1046
1052
  const _ = r ? [Sn] : [ln], l = e.sendInfo(p, void 0, {
1047
1053
  extraHeaders: _
@@ -1055,7 +1061,7 @@ class Ns {
1055
1061
  const T = d.getSenders();
1056
1062
  await Yn(T, t, n);
1057
1063
  }).then(() => t).catch((d) => {
1058
- throw this._removeStreamPresentationCurrent(), this._sessionEvents.trigger(H, d), d;
1064
+ throw this._removeStreamPresentationCurrent(), this._sessionEvents.trigger(W, d), d;
1059
1065
  });
1060
1066
  return this.promisePendingStartPresentation = l, l.finally(() => {
1061
1067
  this.promisePendingStartPresentation = void 0;
@@ -1103,8 +1109,8 @@ class Ns {
1103
1109
  return r && t && (n = n.then(async () => r.sendInfo(p, void 0, {
1104
1110
  extraHeaders: i
1105
1111
  })).then(async () => r.stopPresentation(t)).catch((a) => {
1106
- throw this._sessionEvents.trigger(H, a), a;
1107
- })), !r && t && this._sessionEvents.trigger(Pe, t), this.promisePendingStopPresentation = n, n.finally(() => {
1112
+ throw this._sessionEvents.trigger(W, a), a;
1113
+ })), !r && t && this._sessionEvents.trigger(Oe, t), this.promisePendingStopPresentation = n, n.finally(() => {
1108
1114
  this._resetPresentation();
1109
1115
  });
1110
1116
  }
@@ -1253,15 +1259,15 @@ class Ns {
1253
1259
  this._cancelableAnswer.cancelRequest(), this._cancelableSendDTMF.cancelRequest();
1254
1260
  }
1255
1261
  async waitChannels() {
1256
- return this.waitSession(w);
1262
+ return this.waitSession(b);
1257
1263
  }
1258
1264
  async waitSyncMediaState() {
1259
- return this.waitSession(b);
1265
+ return this.waitSession(U);
1260
1266
  }
1261
1267
  async sendChannels({ inputChannels: e, outputChannels: t }) {
1262
1268
  if (!this.session)
1263
1269
  throw new Error("No session established");
1264
- const n = `${we}: ${e}`, i = `${be}: ${t}`, r = [
1270
+ const n = `${be}: ${e}`, i = `${Ue}: ${t}`, r = [
1265
1271
  n,
1266
1272
  i
1267
1273
  ];
@@ -1304,25 +1310,25 @@ class Ns {
1304
1310
  }
1305
1311
  export {
1306
1312
  xt as B,
1307
- f as E,
1313
+ P as E,
1308
1314
  yt as N,
1309
- le as P,
1310
- ke as R,
1315
+ ue as P,
1316
+ Be as R,
1311
1317
  Ns as S,
1312
- Tt as U,
1318
+ ut as U,
1313
1319
  xn as a,
1314
- Te as b,
1320
+ Se as b,
1315
1321
  hs as c,
1316
1322
  ds as d,
1317
1323
  ls as e,
1318
1324
  us as f,
1319
1325
  Ts as g,
1320
1326
  Ss as h,
1321
- q as i,
1322
- F as j,
1327
+ x as i,
1328
+ V as j,
1323
1329
  Rn as k,
1324
- B as l,
1330
+ F as l,
1325
1331
  In as m,
1326
- ut as n,
1332
+ St as n,
1327
1333
  Vn as s
1328
1334
  };