sip-connector 9.0.0 → 9.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-lgvJyyG7.cjs +1 -0
- package/dist/{SipConnector-DagL4rCl.js → SipConnector-xflR79mb.js} +354 -342
- package/dist/SipConnector.d.ts +12 -3
- package/dist/doMock.cjs +1 -1
- package/dist/doMock.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +197 -193
- package/dist/tools/answerIncomingCall.d.ts +2 -0
- package/dist/tools/callToServer.d.ts +2 -0
- package/dist/types.d.ts +1 -1
- package/package.json +14 -14
- package/dist/SipConnector-BCc5pokv.cjs +0 -1
|
@@ -1,170 +1,169 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var i = (r, e, t) =>
|
|
4
|
-
import { CancelableRequest as N, isCanceledError as
|
|
5
|
-
import
|
|
6
|
-
import { repeatedCallsAsync as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
1
|
+
var At = Object.defineProperty;
|
|
2
|
+
var Rt = (r, e, t) => e in r ? At(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var i = (r, e, t) => Rt(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { CancelableRequest as N, isCanceledError as It } from "@krivega/cancelable-promise";
|
|
5
|
+
import Oe from "events-constructor";
|
|
6
|
+
import { repeatedCallsAsync as De } from "repeated-calls";
|
|
7
|
+
import V from "debug";
|
|
8
|
+
const mt = "Connection Error", Le = "Request Timeout", pt = "SIP Failure Code", ft = "Internal Error", Pt = "Busy", He = "Rejected", Ot = "Redirected", Dt = "Unavailable", Mt = "Not Found", vt = "Address Incomplete", yt = "Incompatible SDP", bt = "Missing SDP", wt = "Authentication Error", We = "Terminated", Ut = "WebRTC Error", ke = "Canceled", Lt = "No Answer", Ht = "Expires", Wt = "No ACK", kt = "Dialog Error", qt = "User Denied Media Access", Ft = "Bad Media Description", Bt = "RTP Timeout", ts = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9
9
|
__proto__: null,
|
|
10
|
-
ADDRESS_INCOMPLETE:
|
|
11
|
-
AUTHENTICATION_ERROR:
|
|
12
|
-
BAD_MEDIA_DESCRIPTION:
|
|
13
|
-
BUSY:
|
|
14
|
-
BYE:
|
|
15
|
-
CANCELED:
|
|
16
|
-
CONNECTION_ERROR:
|
|
17
|
-
DIALOG_ERROR:
|
|
18
|
-
EXPIRES:
|
|
19
|
-
INCOMPATIBLE_SDP:
|
|
20
|
-
INTERNAL_ERROR:
|
|
21
|
-
MISSING_SDP:
|
|
22
|
-
NOT_FOUND:
|
|
23
|
-
NO_ACK:
|
|
24
|
-
NO_ANSWER:
|
|
25
|
-
REDIRECTED:
|
|
26
|
-
REJECTED:
|
|
27
|
-
REQUEST_TIMEOUT:
|
|
28
|
-
RTP_TIMEOUT:
|
|
29
|
-
SIP_FAILURE_CODE:
|
|
30
|
-
UNAVAILABLE:
|
|
31
|
-
USER_DENIED_MEDIA_ACCESS:
|
|
32
|
-
WEBRTC_ERROR:
|
|
33
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
10
|
+
ADDRESS_INCOMPLETE: vt,
|
|
11
|
+
AUTHENTICATION_ERROR: wt,
|
|
12
|
+
BAD_MEDIA_DESCRIPTION: Ft,
|
|
13
|
+
BUSY: Pt,
|
|
14
|
+
BYE: We,
|
|
15
|
+
CANCELED: ke,
|
|
16
|
+
CONNECTION_ERROR: mt,
|
|
17
|
+
DIALOG_ERROR: kt,
|
|
18
|
+
EXPIRES: Ht,
|
|
19
|
+
INCOMPATIBLE_SDP: yt,
|
|
20
|
+
INTERNAL_ERROR: ft,
|
|
21
|
+
MISSING_SDP: bt,
|
|
22
|
+
NOT_FOUND: Mt,
|
|
23
|
+
NO_ACK: Wt,
|
|
24
|
+
NO_ANSWER: Lt,
|
|
25
|
+
REDIRECTED: Ot,
|
|
26
|
+
REJECTED: He,
|
|
27
|
+
REQUEST_TIMEOUT: Le,
|
|
28
|
+
RTP_TIMEOUT: Bt,
|
|
29
|
+
SIP_FAILURE_CODE: pt,
|
|
30
|
+
UNAVAILABLE: Dt,
|
|
31
|
+
USER_DENIED_MEDIA_ACCESS: qt,
|
|
32
|
+
WEBRTC_ERROR: Ut
|
|
33
|
+
}, Symbol.toStringTag, { value: "Module" })), Y = "incomingCall", x = "declinedIncomingCall", G = "failedIncomingCall", $ = "terminatedIncomingCall", H = "connecting", m = "connected", u = "disconnected", M = "newRTCSession", p = "registered", X = "unregistered", f = "registrationFailed", qe = "newMessage", J = "sipEvent", z = "availableSecondRemoteStream", Q = "notAvailableSecondRemoteStream", j = "mustStopPresentation", v = "shareState", K = "enterRoom", Z = "useLicense", ee = "peerconnection:confirmed", te = "peerconnection:ontrack", y = "channels", ne = "channels:notify", se = "ended:fromserver", ie = "main-cam-control", re = "admin-stop-main-cam", oe = "admin-start-main-cam", ae = "admin-stop-mic", ce = "admin-start-mic", b = "admin-force-sync-media-state", _e = "participant:added-to-list-moderators", Ee = "participant:removed-from-list-moderators", he = "participant:move-request-to-stream", le = "participant:move-request-to-spectators", de = "participation:accepting-word-request", Te = "participation:cancelling-word-request", Se = "webcast:started", ue = "webcast:stopped", Ce = "account:changed", Ne = "account:deleted", ge = "conference:participant-token-issued", P = "ended", Fe = "sending", Be = "reinvite", Ve = "replaces", Ye = "refer", xe = "progress", Ge = "accepted", w = "confirmed", U = "peerconnection", A = "failed", $e = "muted", Xe = "unmuted", Ae = "newDTMF", Re = "newInfo", Je = "hold", ze = "unhold", Qe = "update", je = "sdp", Ke = "icecandidate", Ze = "getusermediafailed", et = "peerconnection:createofferfailed", tt = "peerconnection:createanswerfailed", nt = "peerconnection:setlocaldescriptionfailed", st = "peerconnection:setremotedescriptionfailed", it = "presentation:start", rt = "presentation:started", ot = "presentation:end", Ie = "presentation:ended", L = "presentation:failed", at = "SPECTATOR", ct = 1e6, ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
34
34
|
__proto__: null,
|
|
35
|
-
ACCEPTED:
|
|
36
|
-
ACCOUNT_CHANGED:
|
|
37
|
-
ACCOUNT_DELETED:
|
|
38
|
-
ADMIN_FORCE_SYNC_MEDIA_STATE:
|
|
39
|
-
ADMIN_START_MAIN_CAM:
|
|
40
|
-
ADMIN_START_MIC:
|
|
41
|
-
ADMIN_STOP_MAIN_CAM:
|
|
42
|
-
ADMIN_STOP_MIC:
|
|
43
|
-
AVAILABLE_SECOND_REMOTE_STREAM_EVENT:
|
|
44
|
-
CHANNELS:
|
|
45
|
-
CHANNELS_NOTIFY:
|
|
46
|
-
CONFERENCE_PARTICIPANT_TOKEN_ISSUED:
|
|
47
|
-
CONFIRMED:
|
|
35
|
+
ACCEPTED: Ge,
|
|
36
|
+
ACCOUNT_CHANGED: Ce,
|
|
37
|
+
ACCOUNT_DELETED: Ne,
|
|
38
|
+
ADMIN_FORCE_SYNC_MEDIA_STATE: b,
|
|
39
|
+
ADMIN_START_MAIN_CAM: oe,
|
|
40
|
+
ADMIN_START_MIC: ce,
|
|
41
|
+
ADMIN_STOP_MAIN_CAM: re,
|
|
42
|
+
ADMIN_STOP_MIC: ae,
|
|
43
|
+
AVAILABLE_SECOND_REMOTE_STREAM_EVENT: z,
|
|
44
|
+
CHANNELS: y,
|
|
45
|
+
CHANNELS_NOTIFY: ne,
|
|
46
|
+
CONFERENCE_PARTICIPANT_TOKEN_ISSUED: ge,
|
|
47
|
+
CONFIRMED: w,
|
|
48
48
|
CONNECTED: m,
|
|
49
|
-
CONNECTING:
|
|
50
|
-
DECLINED_INCOMING_CALL:
|
|
51
|
-
DISCONNECTED:
|
|
49
|
+
CONNECTING: H,
|
|
50
|
+
DECLINED_INCOMING_CALL: x,
|
|
51
|
+
DISCONNECTED: u,
|
|
52
52
|
ENDED: P,
|
|
53
|
-
ENDED_FROM_SERVER:
|
|
54
|
-
ENTER_ROOM:
|
|
53
|
+
ENDED_FROM_SERVER: se,
|
|
54
|
+
ENTER_ROOM: K,
|
|
55
55
|
FAILED: A,
|
|
56
|
-
FAILED_INCOMING_CALL:
|
|
57
|
-
GET_USER_MEDIA_FAILED:
|
|
58
|
-
HOLD:
|
|
59
|
-
ICE_CANDIDATE:
|
|
60
|
-
INCOMING_CALL:
|
|
61
|
-
MAIN_CAM_CONTROL:
|
|
62
|
-
MUST_STOP_PRESENTATION_EVENT:
|
|
63
|
-
MUTED:
|
|
64
|
-
NEW_DTMF:
|
|
65
|
-
NEW_INFO:
|
|
66
|
-
NEW_MESSAGE:
|
|
67
|
-
NEW_RTC_SESSION:
|
|
68
|
-
NOT_AVAILABLE_SECOND_REMOTE_STREAM_EVENT:
|
|
69
|
-
ONE_MEGABIT_IN_BITS:
|
|
70
|
-
PARTICIPANT_ADDED_TO_LIST_MODERATORS:
|
|
71
|
-
PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS:
|
|
72
|
-
PARTICIPANT_MOVE_REQUEST_TO_STREAM:
|
|
73
|
-
PARTICIPANT_REMOVED_FROM_LIST_MODERATORS:
|
|
56
|
+
FAILED_INCOMING_CALL: G,
|
|
57
|
+
GET_USER_MEDIA_FAILED: Ze,
|
|
58
|
+
HOLD: Je,
|
|
59
|
+
ICE_CANDIDATE: Ke,
|
|
60
|
+
INCOMING_CALL: Y,
|
|
61
|
+
MAIN_CAM_CONTROL: ie,
|
|
62
|
+
MUST_STOP_PRESENTATION_EVENT: j,
|
|
63
|
+
MUTED: $e,
|
|
64
|
+
NEW_DTMF: Ae,
|
|
65
|
+
NEW_INFO: Re,
|
|
66
|
+
NEW_MESSAGE: qe,
|
|
67
|
+
NEW_RTC_SESSION: M,
|
|
68
|
+
NOT_AVAILABLE_SECOND_REMOTE_STREAM_EVENT: Q,
|
|
69
|
+
ONE_MEGABIT_IN_BITS: ct,
|
|
70
|
+
PARTICIPANT_ADDED_TO_LIST_MODERATORS: _e,
|
|
71
|
+
PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS: le,
|
|
72
|
+
PARTICIPANT_MOVE_REQUEST_TO_STREAM: he,
|
|
73
|
+
PARTICIPANT_REMOVED_FROM_LIST_MODERATORS: Ee,
|
|
74
74
|
PARTICIPATION_ACCEPTING_WORD_REQUEST: de,
|
|
75
|
-
PARTICIPATION_CANCELLING_WORD_REQUEST:
|
|
76
|
-
PEER_CONNECTION:
|
|
77
|
-
PEER_CONNECTION_CONFIRMED:
|
|
78
|
-
PEER_CONNECTION_CREATE_ANSWER_FAILED:
|
|
79
|
-
PEER_CONNECTION_CREATE_OFFER_FAILED:
|
|
80
|
-
PEER_CONNECTION_ONTRACK:
|
|
81
|
-
PEER_CONNECTION_SET_LOCAL_DESCRIPTION_FAILED:
|
|
82
|
-
PEER_CONNECTION_SET_REMOTE_DESCRIPTION_FAILED:
|
|
83
|
-
PRESENTATION_END:
|
|
84
|
-
PRESENTATION_ENDED:
|
|
85
|
-
PRESENTATION_FAILED:
|
|
86
|
-
PRESENTATION_START:
|
|
87
|
-
PRESENTATION_STARTED:
|
|
88
|
-
PROGRESS:
|
|
89
|
-
REFER:
|
|
75
|
+
PARTICIPATION_CANCELLING_WORD_REQUEST: Te,
|
|
76
|
+
PEER_CONNECTION: U,
|
|
77
|
+
PEER_CONNECTION_CONFIRMED: ee,
|
|
78
|
+
PEER_CONNECTION_CREATE_ANSWER_FAILED: tt,
|
|
79
|
+
PEER_CONNECTION_CREATE_OFFER_FAILED: et,
|
|
80
|
+
PEER_CONNECTION_ONTRACK: te,
|
|
81
|
+
PEER_CONNECTION_SET_LOCAL_DESCRIPTION_FAILED: nt,
|
|
82
|
+
PEER_CONNECTION_SET_REMOTE_DESCRIPTION_FAILED: st,
|
|
83
|
+
PRESENTATION_END: ot,
|
|
84
|
+
PRESENTATION_ENDED: Ie,
|
|
85
|
+
PRESENTATION_FAILED: L,
|
|
86
|
+
PRESENTATION_START: it,
|
|
87
|
+
PRESENTATION_STARTED: rt,
|
|
88
|
+
PROGRESS: xe,
|
|
89
|
+
REFER: Ye,
|
|
90
90
|
REGISTERED: p,
|
|
91
91
|
REGISTRATION_FAILED: f,
|
|
92
|
-
REINVITE:
|
|
93
|
-
REPLACES:
|
|
94
|
-
SDP:
|
|
95
|
-
SENDING:
|
|
96
|
-
SHARE_STATE:
|
|
97
|
-
SIP_EVENT:
|
|
98
|
-
SPECTATOR:
|
|
99
|
-
TERMINATED_INCOMING_CALL:
|
|
100
|
-
UNHOLD:
|
|
101
|
-
UNMUTED:
|
|
102
|
-
UNREGISTERED:
|
|
103
|
-
UPDATE:
|
|
104
|
-
USE_LICENSE:
|
|
105
|
-
WEBCAST_STARTED:
|
|
106
|
-
WEBCAST_STOPPED:
|
|
107
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
108
|
-
V,
|
|
92
|
+
REINVITE: Be,
|
|
93
|
+
REPLACES: Ve,
|
|
94
|
+
SDP: je,
|
|
95
|
+
SENDING: Fe,
|
|
96
|
+
SHARE_STATE: v,
|
|
97
|
+
SIP_EVENT: J,
|
|
98
|
+
SPECTATOR: at,
|
|
99
|
+
TERMINATED_INCOMING_CALL: $,
|
|
100
|
+
UNHOLD: ze,
|
|
101
|
+
UNMUTED: Xe,
|
|
102
|
+
UNREGISTERED: X,
|
|
103
|
+
UPDATE: Qe,
|
|
104
|
+
USE_LICENSE: Z,
|
|
105
|
+
WEBCAST_STARTED: Se,
|
|
106
|
+
WEBCAST_STOPPED: ue
|
|
107
|
+
}, Symbol.toStringTag, { value: "Module" })), _t = [
|
|
109
108
|
Y,
|
|
110
|
-
G,
|
|
111
109
|
x,
|
|
110
|
+
$,
|
|
111
|
+
G,
|
|
112
112
|
de,
|
|
113
|
-
le,
|
|
114
|
-
Ee,
|
|
115
|
-
te,
|
|
116
|
-
Ne,
|
|
117
|
-
ue,
|
|
118
|
-
Ce,
|
|
119
113
|
Te,
|
|
114
|
+
he,
|
|
115
|
+
ne,
|
|
116
|
+
ge,
|
|
117
|
+
Ce,
|
|
118
|
+
Ne,
|
|
120
119
|
Se,
|
|
121
|
-
|
|
122
|
-
_e
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
ue,
|
|
121
|
+
_e,
|
|
122
|
+
Ee
|
|
123
|
+
], me = [
|
|
124
|
+
H,
|
|
125
125
|
m,
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
u,
|
|
127
|
+
M,
|
|
128
128
|
p,
|
|
129
|
-
|
|
129
|
+
X,
|
|
130
130
|
f,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
],
|
|
134
|
-
J,
|
|
131
|
+
qe,
|
|
132
|
+
J
|
|
133
|
+
], Et = [
|
|
135
134
|
z,
|
|
136
135
|
Q,
|
|
137
|
-
M,
|
|
138
136
|
j,
|
|
137
|
+
v,
|
|
139
138
|
K,
|
|
140
139
|
Z,
|
|
141
140
|
ee,
|
|
142
|
-
|
|
143
|
-
|
|
141
|
+
te,
|
|
142
|
+
y,
|
|
144
143
|
se,
|
|
145
|
-
re,
|
|
146
144
|
ie,
|
|
147
145
|
oe,
|
|
146
|
+
re,
|
|
148
147
|
ae,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
ce,
|
|
149
|
+
b,
|
|
150
|
+
le
|
|
151
|
+
], pe = [
|
|
152
152
|
P,
|
|
153
|
-
|
|
154
|
-
qe,
|
|
153
|
+
H,
|
|
155
154
|
Fe,
|
|
156
155
|
Be,
|
|
157
156
|
Ve,
|
|
158
157
|
Ye,
|
|
159
158
|
xe,
|
|
160
|
-
|
|
159
|
+
Ge,
|
|
161
160
|
w,
|
|
161
|
+
U,
|
|
162
162
|
A,
|
|
163
|
-
Ge,
|
|
164
163
|
$e,
|
|
165
|
-
ge,
|
|
166
|
-
Ae,
|
|
167
164
|
Xe,
|
|
165
|
+
Ae,
|
|
166
|
+
Re,
|
|
168
167
|
Je,
|
|
169
168
|
ze,
|
|
170
169
|
Qe,
|
|
@@ -177,31 +176,32 @@ const pt = "Connection Error", Ue = "Request Timeout", ft = "SIP Failure Code",
|
|
|
177
176
|
st,
|
|
178
177
|
it,
|
|
179
178
|
rt,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
...
|
|
185
|
-
|
|
179
|
+
ot,
|
|
180
|
+
Ie,
|
|
181
|
+
L
|
|
182
|
+
], ht = [...me, ..._t], lt = [
|
|
183
|
+
...pe,
|
|
184
|
+
...Et
|
|
185
|
+
], ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
186
186
|
__proto__: null,
|
|
187
|
-
SESSION_EVENT_NAMES:
|
|
188
|
-
SESSION_JSSIP_EVENT_NAMES:
|
|
189
|
-
SESSION_SYNTHETICS_EVENT_NAMES:
|
|
190
|
-
UA_EVENT_NAMES:
|
|
191
|
-
UA_JSSIP_EVENT_NAMES:
|
|
192
|
-
UA_SYNTHETICS_EVENT_NAMES:
|
|
193
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
187
|
+
SESSION_EVENT_NAMES: lt,
|
|
188
|
+
SESSION_JSSIP_EVENT_NAMES: pe,
|
|
189
|
+
SESSION_SYNTHETICS_EVENT_NAMES: Et,
|
|
190
|
+
UA_EVENT_NAMES: ht,
|
|
191
|
+
UA_JSSIP_EVENT_NAMES: me,
|
|
192
|
+
UA_SYNTHETICS_EVENT_NAMES: _t
|
|
193
|
+
}, Symbol.toStringTag, { value: "Module" })), Vt = (r) => {
|
|
194
194
|
const e = [];
|
|
195
195
|
return r && e.push(`X-Vinteo-Remote: ${r}`), e;
|
|
196
|
-
},
|
|
197
|
-
|
|
198
|
-
},
|
|
199
|
-
|
|
200
|
-
},
|
|
196
|
+
}, Yt = "content-type", xt = "x-webrtc-enter-room", O = "application/vinteo.webrtc.sharedesktop", Gt = "application/vinteo.webrtc.roomname", $t = "application/vinteo.webrtc.channels", Xt = "application/vinteo.webrtc.mediastate", Jt = "application/vinteo.webrtc.refusal", Me = "application/vinteo.webrtc.maincam", zt = "application/vinteo.webrtc.mic", Qt = "application/vinteo.webrtc.uselic", jt = "X-WEBRTC-USE-LICENSE", Kt = "X-WEBRTC-PARTICIPANT-NAME", ve = "X-WEBRTC-INPUT-CHANNELS", ye = "X-WEBRTC-OUTPUT-CHANNELS", Zt = "X-WEBRTC-MAINCAM", en = "X-WEBRTC-MIC", be = "X-WEBRTC-SYNC", tn = "X-WEBRTC-MAINCAM-RESOLUTION", nn = "X-WEBRTC-MEDIA-STATE", sn = "X-Vinteo-Media-Type", rn = "X-Vinteo-MainCam-State", on = "X-Vinteo-Mic-State", an = "application/vinteo.webrtc.partstate", cn = "X-WEBRTC-PARTSTATE", _n = "application/vinteo.webrtc.notify", En = "X-VINTEO-NOTIFY", R = "x-webrtc-share-state", hn = `${R}: LETMESTARTPRESENTATION`, ln = `${R}: STOPPRESENTATION`, dt = "YOUCANRECEIVECONTENT", Tt = "CONTENTEND", St = "YOUMUSTSTOPSENDCONTENT", dn = `${R}: ${St}`, Tn = `${R}: ${dt}`, Sn = `${R}: ${Tt}`, un = "X-WEBRTC-REQUEST-ENABLE-MEDIA-DEVICE", Cn = `${un}: LETMESTARTMAINCAM`, fe = "sip-connector", k = V(fe), is = () => {
|
|
197
|
+
V.enable(fe);
|
|
198
|
+
}, rs = () => {
|
|
199
|
+
V.enable(`-${fe}`);
|
|
200
|
+
}, Nn = (r, e) => {
|
|
201
201
|
r.getVideoTracks().forEach((n) => {
|
|
202
202
|
"contentHint" in n && n.contentHint !== e && (n.contentHint = e);
|
|
203
203
|
});
|
|
204
|
-
},
|
|
204
|
+
}, D = (r, {
|
|
205
205
|
videoMode: e,
|
|
206
206
|
audioMode: t,
|
|
207
207
|
contentHint: n
|
|
@@ -209,47 +209,47 @@ const pt = "Connection Error", Ue = "Request Timeout", ft = "SIP Failure Code",
|
|
|
209
209
|
if (!r || e === "recvonly" && t === "recvonly")
|
|
210
210
|
return;
|
|
211
211
|
const s = t === "recvonly" ? [] : r.getAudioTracks(), o = e === "recvonly" ? [] : r.getVideoTracks(), a = [...s, ...o], c = new MediaStream(a);
|
|
212
|
-
return c.getTracks = () => [...c.getAudioTracks(), ...c.getVideoTracks()], n && n !== "none" &&
|
|
212
|
+
return c.getTracks = () => [...c.getAudioTracks(), ...c.getVideoTracks()], n && n !== "none" && Nn(c, n), c;
|
|
213
213
|
};
|
|
214
|
-
var I = /* @__PURE__ */ ((r) => (r.PAUSE_MAIN_CAM = "PAUSEMAINCAM", r.RESUME_MAIN_CAM = "RESUMEMAINCAM", r.MAX_MAIN_CAM_RESOLUTION = "MAXMAINCAMRESOLUTION", r.ADMIN_STOP_MAIN_CAM = "ADMINSTOPMAINCAM", r.ADMIN_START_MAIN_CAM = "ADMINSTARTMAINCAM", r))(I || {}),
|
|
215
|
-
function
|
|
214
|
+
var I = /* @__PURE__ */ ((r) => (r.PAUSE_MAIN_CAM = "PAUSEMAINCAM", r.RESUME_MAIN_CAM = "RESUMEMAINCAM", r.MAX_MAIN_CAM_RESOLUTION = "MAXMAINCAMRESOLUTION", r.ADMIN_STOP_MAIN_CAM = "ADMINSTOPMAINCAM", r.ADMIN_START_MAIN_CAM = "ADMINSTARTMAINCAM", r))(I || {}), q = /* @__PURE__ */ ((r) => (r.ADMIN_STOP_MIC = "ADMINSTOPMIC", r.ADMIN_START_MIC = "ADMINSTARTMIC", r))(q || {}), F = /* @__PURE__ */ ((r) => (r.ADMIN_SYNC_FORCED = "1", r.ADMIN_SYNC_NOT_FORCED = "0", r))(F || {}), gn = /* @__PURE__ */ ((r) => (r.AUDIO = "AUDIO", r.VIDEO = "VIDEO", r.AUDIOPLUSPRESENTATION = "AUDIOPLUSPRESENTATION", r))(gn || {});
|
|
215
|
+
function An(r) {
|
|
216
216
|
return (e) => `sip:${e}@${r}`;
|
|
217
217
|
}
|
|
218
|
-
const
|
|
218
|
+
const Rn = (r, e) => () => Math.floor(Math.random() * (e - r)) + r, we = (r) => r.trim().replaceAll(" ", "_"), In = Rn(1e5, 99999999), mn = (r) => r.some((t) => {
|
|
219
219
|
const { kind: n } = t;
|
|
220
220
|
return n === "video";
|
|
221
|
-
}),
|
|
222
|
-
|
|
223
|
-
),
|
|
224
|
-
const t = r === void 0 ? void 0 : Math.max(r,
|
|
225
|
-
if (t !== void 0 &&
|
|
221
|
+
}), pn = "Error decline with 603", fn = 1006, Pn = (r) => typeof r == "object" && r !== null && "code" in r && r.code === fn, On = (r) => r.message === pn, Dn = (r, e) => r.find((t) => t.track && e.getTracks().includes(t.track)), ut = 1, Ct = (r) => (e, t) => t !== void 0 && e !== t || t === void 0 && e !== r, Mn = Ct(
|
|
222
|
+
ut
|
|
223
|
+
), vn = (r, e) => {
|
|
224
|
+
const t = r === void 0 ? void 0 : Math.max(r, ut);
|
|
225
|
+
if (t !== void 0 && Mn(
|
|
226
226
|
t,
|
|
227
227
|
e
|
|
228
228
|
))
|
|
229
229
|
return t;
|
|
230
|
-
},
|
|
231
|
-
if (
|
|
230
|
+
}, yn = Ct(), bn = (r, e) => {
|
|
231
|
+
if (yn(r, e))
|
|
232
232
|
return r;
|
|
233
|
-
},
|
|
233
|
+
}, wn = async (r, e, t) => {
|
|
234
234
|
const n = r.getParameters();
|
|
235
235
|
(n.encodings === void 0 || n.encodings.length === 0) && (n.encodings = [{}]);
|
|
236
|
-
const [s] = n.encodings, o = s.scaleResolutionDownBy, a =
|
|
236
|
+
const [s] = n.encodings, o = s.scaleResolutionDownBy, a = vn(
|
|
237
237
|
e.scaleResolutionDownBy,
|
|
238
238
|
o
|
|
239
239
|
);
|
|
240
240
|
let c = !1;
|
|
241
241
|
a !== void 0 && (n.encodings[0].scaleResolutionDownBy = a, c = !0);
|
|
242
|
-
const _ = s.maxBitrate, E =
|
|
242
|
+
const _ = s.maxBitrate, E = bn(e.maxBitrate, _);
|
|
243
243
|
return E !== void 0 && (n.encodings[0].maxBitrate = E, c = !0), c ? (t && t(n), r.setParameters(n).then(() => ({ parameters: n, isChanged: c }))) : { parameters: n, isChanged: c };
|
|
244
|
-
},
|
|
245
|
-
const n =
|
|
244
|
+
}, Un = async (r, e, t) => {
|
|
245
|
+
const n = Dn(r, e);
|
|
246
246
|
if (n)
|
|
247
|
-
return
|
|
248
|
-
},
|
|
247
|
+
return wn(n, { maxBitrate: t });
|
|
248
|
+
}, Ln = 486, Hn = 487, B = "local", Ue = "remote", Wn = 3, kn = 1, os = (r = new Error()) => {
|
|
249
249
|
const { originator: e, cause: t } = r;
|
|
250
|
-
return
|
|
251
|
-
}, g = "SipConnector",
|
|
252
|
-
class
|
|
250
|
+
return It(r) ? !0 : typeof t == "string" ? t === Le || t === He || e === B && (t === ke || t === We) : !1;
|
|
251
|
+
}, g = "SipConnector", qn = "channels", Fn = "WebcastStarted", Bn = "WebcastStopped", Vn = "accountChanged", Yn = "accountDeleted", xn = "addedToListModerators", Gn = "removedFromListModerators", $n = "ParticipationRequestAccepted", Xn = "ParticipationRequestRejected", Jn = "ParticipantMovedToWebcast", zn = "ConferenceParticipantTokenIssued";
|
|
252
|
+
class as {
|
|
253
253
|
constructor({ JsSIP: e }) {
|
|
254
254
|
i(this, "_isRegisterConfig", !1);
|
|
255
255
|
i(this, "_connectionConfiguration", {});
|
|
@@ -285,34 +285,34 @@ class _s {
|
|
|
285
285
|
i(this, "tryRegister", async () => {
|
|
286
286
|
if (!this.isRegisterConfig)
|
|
287
287
|
throw new Error("Config is not registered");
|
|
288
|
-
this._uaEvents.trigger(
|
|
288
|
+
this._uaEvents.trigger(H, void 0);
|
|
289
289
|
try {
|
|
290
290
|
await this.unregister();
|
|
291
291
|
} catch (e) {
|
|
292
|
-
|
|
292
|
+
k("tryRegister", e);
|
|
293
293
|
}
|
|
294
294
|
return this.register();
|
|
295
295
|
});
|
|
296
|
-
i(this, "declineToIncomingCall", async ({ statusCode: e =
|
|
296
|
+
i(this, "declineToIncomingCall", async ({ statusCode: e = Hn } = {}) => new Promise((t, n) => {
|
|
297
297
|
if (!this.isAvailableIncomingCall) {
|
|
298
298
|
n(new Error("no incomingSession"));
|
|
299
299
|
return;
|
|
300
300
|
}
|
|
301
301
|
const s = this.incomingSession, o = this.remoteCallerData;
|
|
302
|
-
this._cancelableCall.cancelRequest(), this._cancelableAnswer.cancelRequest(), this.removeIncomingSession(), this._uaEvents.trigger(
|
|
302
|
+
this._cancelableCall.cancelRequest(), this._cancelableAnswer.cancelRequest(), this.removeIncomingSession(), this._uaEvents.trigger(x, o), t(s.terminate({ status_code: e }));
|
|
303
303
|
}));
|
|
304
|
-
i(this, "busyIncomingCall", async () => this.declineToIncomingCall({ statusCode:
|
|
304
|
+
i(this, "busyIncomingCall", async () => this.declineToIncomingCall({ statusCode: Ln }));
|
|
305
305
|
i(this, "removeIncomingSession", () => {
|
|
306
306
|
delete this.incomingSession;
|
|
307
307
|
});
|
|
308
|
-
i(this, "_connectWithDuplicatedCalls", async (e, { callLimit: t =
|
|
308
|
+
i(this, "_connectWithDuplicatedCalls", async (e, { callLimit: t = Wn } = {}) => {
|
|
309
309
|
let n = !0;
|
|
310
310
|
const s = async () => (n = !1, this._cancelableConnect.request(e)), o = (a) => {
|
|
311
311
|
var h;
|
|
312
|
-
const c = !!((h = this.ua) != null && h.isConnected()), _ = !n && c && this.hasEqualConnectionConfiguration(e), E = !!a && !
|
|
312
|
+
const c = !!((h = this.ua) != null && h.isConnected()), _ = !n && c && this.hasEqualConnectionConfiguration(e), E = !!a && !Pn(a);
|
|
313
313
|
return _ || E;
|
|
314
314
|
};
|
|
315
|
-
return this._cancelableConnectWithRepeatedCalls =
|
|
315
|
+
return this._cancelableConnectWithRepeatedCalls = De({
|
|
316
316
|
targetFunction: s,
|
|
317
317
|
isComplete: o,
|
|
318
318
|
callLimit: t,
|
|
@@ -327,12 +327,12 @@ class _s {
|
|
|
327
327
|
});
|
|
328
328
|
});
|
|
329
329
|
i(this, "handleNewRTCSession", ({ originator: e, session: t }) => {
|
|
330
|
-
if (e ===
|
|
330
|
+
if (e === Ue) {
|
|
331
331
|
this.incomingSession = t;
|
|
332
332
|
const n = this.remoteCallerData;
|
|
333
333
|
t.on(A, (s) => {
|
|
334
|
-
this.removeIncomingSession(), s.originator ===
|
|
335
|
-
}), this._uaEvents.trigger(
|
|
334
|
+
this.removeIncomingSession(), s.originator === B ? this._uaEvents.trigger($, n) : this._uaEvents.trigger(G, n);
|
|
335
|
+
}), this._uaEvents.trigger(Y, n);
|
|
336
336
|
}
|
|
337
337
|
});
|
|
338
338
|
i(this, "_connect", async (e) => this.initUa(e).then(async () => this._start()));
|
|
@@ -366,7 +366,7 @@ class _s {
|
|
|
366
366
|
user: e,
|
|
367
367
|
password: t
|
|
368
368
|
};
|
|
369
|
-
const { configuration:
|
|
369
|
+
const { configuration: C, helpers: S } = this.createUaConfiguration({
|
|
370
370
|
user: e,
|
|
371
371
|
sipServerUrl: n,
|
|
372
372
|
sipWebSocketServerURL: s,
|
|
@@ -379,14 +379,19 @@ class _s {
|
|
|
379
379
|
connectionRecoveryMaxInterval: E,
|
|
380
380
|
userAgent: h
|
|
381
381
|
});
|
|
382
|
-
this.getSipServerUrl =
|
|
383
|
-
const
|
|
384
|
-
|
|
385
|
-
});
|
|
386
|
-
|
|
387
|
-
|
|
382
|
+
return this.getSipServerUrl = S.getSipServerUrl, this.socket = S.socket, this.ua && await this._disconnectWithoutCancelRequests(), this._isRegisterConfig = !!d, this.ua = this._createUa({ ...C, remoteAddress: o, extraHeaders: T }), this._uaEvents.eachTriggers((W, Nt) => {
|
|
383
|
+
const Pe = me.find((gt) => gt === Nt);
|
|
384
|
+
Pe && this.ua && this.ua.on(Pe, W);
|
|
385
|
+
}), this.ua;
|
|
386
|
+
});
|
|
387
|
+
i(this, "_createUa", ({
|
|
388
|
+
remoteAddress: e,
|
|
389
|
+
extraHeaders: t = [],
|
|
390
|
+
...n
|
|
391
|
+
}) => {
|
|
392
|
+
const s = new this.JsSIP.UA(n), a = [...e ? Vt(e) : [], ...t];
|
|
393
|
+
return a.length > 0 && s.registrator().setExtraHeaders(a), s;
|
|
388
394
|
});
|
|
389
|
-
i(this, "_createUa", (e) => new this.JsSIP.UA(e));
|
|
390
395
|
i(this, "_start", async () => new Promise((e, t) => {
|
|
391
396
|
const { ua: n } = this;
|
|
392
397
|
if (!n) {
|
|
@@ -398,11 +403,11 @@ class _s {
|
|
|
398
403
|
}, o = (_) => {
|
|
399
404
|
c(), t(_);
|
|
400
405
|
}, a = () => {
|
|
401
|
-
this.isRegisterConfig ? (this.on(p, s), this.on(f, o)) : this.on(m, s), this.on(
|
|
406
|
+
this.isRegisterConfig ? (this.on(p, s), this.on(f, o)) : this.on(m, s), this.on(u, o);
|
|
402
407
|
}, c = () => {
|
|
403
|
-
this.off(p, s), this.off(f, o), this.off(m, s), this.off(
|
|
408
|
+
this.off(p, s), this.off(f, o), this.off(m, s), this.off(u, o);
|
|
404
409
|
};
|
|
405
|
-
a(), this.on(
|
|
410
|
+
a(), this.on(M, this.handleNewRTCSession), n.start();
|
|
406
411
|
}));
|
|
407
412
|
i(this, "_set", async ({ displayName: e, password: t }) => new Promise((n, s) => {
|
|
408
413
|
const { ua: o } = this;
|
|
@@ -411,7 +416,7 @@ class _s {
|
|
|
411
416
|
return;
|
|
412
417
|
}
|
|
413
418
|
let a = !1, c = !1;
|
|
414
|
-
e !== void 0 && e !== this._connectionConfiguration.displayName && (a = o.set("display_name",
|
|
419
|
+
e !== void 0 && e !== this._connectionConfiguration.displayName && (a = o.set("display_name", we(e)), this._connectionConfiguration.displayName = e), t !== void 0 && t !== this._connectionConfiguration.password && (c = o.set("password", t), this._connectionConfiguration.password = t);
|
|
415
420
|
const _ = a || c;
|
|
416
421
|
c && this.isRegisterConfig ? this.register().then(() => {
|
|
417
422
|
n(_);
|
|
@@ -421,13 +426,13 @@ class _s {
|
|
|
421
426
|
}));
|
|
422
427
|
i(this, "_disconnectWithoutCancelRequests", async () => this._cancelableDisconnect.request());
|
|
423
428
|
i(this, "_disconnect", async () => {
|
|
424
|
-
this.off(
|
|
429
|
+
this.off(M, this.handleNewRTCSession);
|
|
425
430
|
const e = new Promise((t) => {
|
|
426
|
-
this.once(
|
|
431
|
+
this.once(u, () => {
|
|
427
432
|
delete this.ua, t();
|
|
428
433
|
});
|
|
429
434
|
});
|
|
430
|
-
return this.ua ? (await this._hangUpWithoutCancelRequests(), this.ua ? this.ua.stop() : this._uaEvents.trigger(
|
|
435
|
+
return this.ua ? (await this._hangUpWithoutCancelRequests(), this.ua ? this.ua.stop() : this._uaEvents.trigger(u, void 0)) : this._uaEvents.trigger(u, void 0), e;
|
|
431
436
|
});
|
|
432
437
|
i(this, "_call", async ({
|
|
433
438
|
number: e,
|
|
@@ -438,21 +443,23 @@ class _s {
|
|
|
438
443
|
videoMode: a,
|
|
439
444
|
audioMode: c,
|
|
440
445
|
degradationPreference: _,
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
446
|
+
contentHint: E,
|
|
447
|
+
offerToReceiveAudio: h = !0,
|
|
448
|
+
offerToReceiveVideo: l = !0
|
|
449
|
+
}) => new Promise((d, T) => {
|
|
450
|
+
const { ua: C } = this;
|
|
451
|
+
if (!C) {
|
|
452
|
+
T(new Error("this.ua is not initialized"));
|
|
447
453
|
return;
|
|
448
454
|
}
|
|
449
|
-
this._connectionConfiguration.number = e, this._connectionConfiguration.answer = !1, this._handleCall({ ontrack: s }).then(
|
|
450
|
-
|
|
451
|
-
}), this.session =
|
|
455
|
+
this._connectionConfiguration.number = e, this._connectionConfiguration.answer = !1, this._handleCall({ ontrack: s }).then(d).catch((S) => {
|
|
456
|
+
T(S);
|
|
457
|
+
}), this.session = C.call(this.getSipServerUrl(e), {
|
|
452
458
|
extraHeaders: n,
|
|
453
|
-
mediaStream:
|
|
459
|
+
mediaStream: D(t, {
|
|
454
460
|
videoMode: a,
|
|
455
|
-
audioMode: c
|
|
461
|
+
audioMode: c,
|
|
462
|
+
contentHint: E
|
|
456
463
|
}),
|
|
457
464
|
eventHandlers: this._sessionEvents.triggers,
|
|
458
465
|
videoMode: a,
|
|
@@ -462,8 +469,8 @@ class _s {
|
|
|
462
469
|
iceServers: o
|
|
463
470
|
},
|
|
464
471
|
rtcOfferConstraints: {
|
|
465
|
-
offerToReceiveAudio:
|
|
466
|
-
offerToReceiveVideo:
|
|
472
|
+
offerToReceiveAudio: h,
|
|
473
|
+
offerToReceiveVideo: l
|
|
467
474
|
}
|
|
468
475
|
});
|
|
469
476
|
}));
|
|
@@ -474,34 +481,36 @@ class _s {
|
|
|
474
481
|
iceServers: s,
|
|
475
482
|
videoMode: o,
|
|
476
483
|
audioMode: a,
|
|
477
|
-
degradationPreference: c
|
|
478
|
-
|
|
484
|
+
degradationPreference: c,
|
|
485
|
+
contentHint: _
|
|
486
|
+
}) => new Promise((E, h) => {
|
|
479
487
|
if (!this.isAvailableIncomingCall) {
|
|
480
|
-
|
|
488
|
+
h(new Error("no incomingSession"));
|
|
481
489
|
return;
|
|
482
490
|
}
|
|
483
491
|
this.session = this.incomingSession, this.removeIncomingSession();
|
|
484
|
-
const { session:
|
|
485
|
-
if (!
|
|
486
|
-
|
|
492
|
+
const { session: l } = this;
|
|
493
|
+
if (!l) {
|
|
494
|
+
h(new Error("No session established"));
|
|
487
495
|
return;
|
|
488
496
|
}
|
|
489
|
-
this._sessionEvents.eachTriggers((
|
|
490
|
-
const
|
|
491
|
-
|
|
492
|
-
}), this._connectionConfiguration.answer = !0, this._connectionConfiguration.number =
|
|
493
|
-
|
|
497
|
+
this._sessionEvents.eachTriggers((T, C) => {
|
|
498
|
+
const S = pe.find((W) => W === C);
|
|
499
|
+
S && l.on(S, T);
|
|
500
|
+
}), this._connectionConfiguration.answer = !0, this._connectionConfiguration.number = l.remote_identity.uri.user, this._handleCall({ ontrack: t }).then(E).catch((T) => {
|
|
501
|
+
h(T);
|
|
494
502
|
});
|
|
495
|
-
const
|
|
503
|
+
const d = D(e, {
|
|
496
504
|
videoMode: o,
|
|
497
|
-
audioMode: a
|
|
505
|
+
audioMode: a,
|
|
506
|
+
contentHint: _
|
|
498
507
|
});
|
|
499
|
-
|
|
508
|
+
l.answer({
|
|
500
509
|
extraHeaders: n,
|
|
501
510
|
videoMode: o,
|
|
502
511
|
audioMode: a,
|
|
503
512
|
degradationPreference: c,
|
|
504
|
-
mediaStream:
|
|
513
|
+
mediaStream: d,
|
|
505
514
|
pcConfig: {
|
|
506
515
|
iceServers: s
|
|
507
516
|
}
|
|
@@ -509,9 +518,9 @@ class _s {
|
|
|
509
518
|
}));
|
|
510
519
|
i(this, "_handleCall", async ({ ontrack: e }) => new Promise((t, n) => {
|
|
511
520
|
const s = () => {
|
|
512
|
-
this.onSession(
|
|
521
|
+
this.onSession(U, h), this.onSession(w, l);
|
|
513
522
|
}, o = () => {
|
|
514
|
-
this.offSession(
|
|
523
|
+
this.offSession(U, h), this.offSession(w, l);
|
|
515
524
|
}, a = () => {
|
|
516
525
|
this.onSession(A, _), this.onSession(P, _);
|
|
517
526
|
}, c = () => {
|
|
@@ -522,10 +531,10 @@ class _s {
|
|
|
522
531
|
let E;
|
|
523
532
|
const h = ({ peerconnection: d }) => {
|
|
524
533
|
E = d, E.ontrack = (T) => {
|
|
525
|
-
this._sessionEvents.trigger(
|
|
534
|
+
this._sessionEvents.trigger(te, E), e && e(T);
|
|
526
535
|
};
|
|
527
536
|
}, l = () => {
|
|
528
|
-
E && this._sessionEvents.trigger(
|
|
537
|
+
E && this._sessionEvents.trigger(ee, E), o(), c(), t(E);
|
|
529
538
|
};
|
|
530
539
|
s(), a();
|
|
531
540
|
}));
|
|
@@ -538,8 +547,8 @@ class _s {
|
|
|
538
547
|
n(new Error("No session established"));
|
|
539
548
|
return;
|
|
540
549
|
}
|
|
541
|
-
this.onceSession(
|
|
542
|
-
o ===
|
|
550
|
+
this.onceSession(Ae, ({ originator: o }) => {
|
|
551
|
+
o === B && t();
|
|
543
552
|
}), s.sendDTMF(e, {
|
|
544
553
|
duration: 120,
|
|
545
554
|
interToneGap: 600
|
|
@@ -552,7 +561,7 @@ class _s {
|
|
|
552
561
|
try {
|
|
553
562
|
await this.stopPresentation();
|
|
554
563
|
} catch (t) {
|
|
555
|
-
|
|
564
|
+
k("error stop presentation: ", t);
|
|
556
565
|
}
|
|
557
566
|
if (this._restoreSession(), !e.isEnded())
|
|
558
567
|
return e.terminateAsync();
|
|
@@ -561,10 +570,6 @@ class _s {
|
|
|
561
570
|
i(this, "_handleShareState", (e) => {
|
|
562
571
|
switch (e) {
|
|
563
572
|
case dt: {
|
|
564
|
-
this._sessionEvents.trigger(J, void 0);
|
|
565
|
-
break;
|
|
566
|
-
}
|
|
567
|
-
case lt: {
|
|
568
573
|
this._sessionEvents.trigger(z, void 0);
|
|
569
574
|
break;
|
|
570
575
|
}
|
|
@@ -572,75 +577,79 @@ class _s {
|
|
|
572
577
|
this._sessionEvents.trigger(Q, void 0);
|
|
573
578
|
break;
|
|
574
579
|
}
|
|
580
|
+
case St: {
|
|
581
|
+
this._sessionEvents.trigger(j, void 0);
|
|
582
|
+
break;
|
|
583
|
+
}
|
|
575
584
|
}
|
|
576
585
|
});
|
|
577
586
|
i(this, "_maybeTriggerChannels", (e) => {
|
|
578
|
-
const t = e.getHeader(
|
|
587
|
+
const t = e.getHeader(ve), n = e.getHeader(ye);
|
|
579
588
|
if (t && n) {
|
|
580
589
|
const s = {
|
|
581
590
|
inputChannels: t,
|
|
582
591
|
outputChannels: n
|
|
583
592
|
};
|
|
584
|
-
this._sessionEvents.trigger(
|
|
593
|
+
this._sessionEvents.trigger(y, s);
|
|
585
594
|
}
|
|
586
595
|
});
|
|
587
596
|
i(this, "_handleNotify", (e) => {
|
|
588
597
|
switch (e.cmd) {
|
|
589
|
-
case
|
|
598
|
+
case qn: {
|
|
590
599
|
const t = e;
|
|
591
600
|
this._triggerChannelsNotify(t);
|
|
592
601
|
break;
|
|
593
602
|
}
|
|
594
|
-
case
|
|
603
|
+
case Fn: {
|
|
595
604
|
const t = e;
|
|
596
605
|
this._triggerWebcastStartedNotify(t);
|
|
597
606
|
break;
|
|
598
607
|
}
|
|
599
|
-
case
|
|
608
|
+
case Bn: {
|
|
600
609
|
const t = e;
|
|
601
610
|
this._triggerWebcastStoppedNotify(t);
|
|
602
611
|
break;
|
|
603
612
|
}
|
|
604
|
-
case
|
|
613
|
+
case xn: {
|
|
605
614
|
const t = e;
|
|
606
615
|
this._triggerAddedToListModeratorsNotify(t);
|
|
607
616
|
break;
|
|
608
617
|
}
|
|
609
|
-
case
|
|
618
|
+
case Gn: {
|
|
610
619
|
const t = e;
|
|
611
620
|
this._triggerRemovedFromListModeratorsNotify(t);
|
|
612
621
|
break;
|
|
613
622
|
}
|
|
614
|
-
case
|
|
623
|
+
case $n: {
|
|
615
624
|
const t = e;
|
|
616
625
|
this._triggerParticipationAcceptingWordRequest(t);
|
|
617
626
|
break;
|
|
618
627
|
}
|
|
619
|
-
case
|
|
628
|
+
case Xn: {
|
|
620
629
|
const t = e;
|
|
621
630
|
this._triggerParticipationCancellingWordRequest(t);
|
|
622
631
|
break;
|
|
623
632
|
}
|
|
624
|
-
case
|
|
633
|
+
case Jn: {
|
|
625
634
|
const t = e;
|
|
626
635
|
this._triggerParticipantMoveRequestToStream(t);
|
|
627
636
|
break;
|
|
628
637
|
}
|
|
629
|
-
case
|
|
638
|
+
case Vn: {
|
|
630
639
|
this._triggerAccountChangedNotify();
|
|
631
640
|
break;
|
|
632
641
|
}
|
|
633
|
-
case
|
|
642
|
+
case Yn: {
|
|
634
643
|
this._triggerAccountDeletedNotify();
|
|
635
644
|
break;
|
|
636
645
|
}
|
|
637
|
-
case
|
|
646
|
+
case zn: {
|
|
638
647
|
const t = e;
|
|
639
648
|
this._triggerConferenceParticipantTokenIssued(t);
|
|
640
649
|
break;
|
|
641
650
|
}
|
|
642
651
|
default:
|
|
643
|
-
|
|
652
|
+
k("unknown cmd", e.cmd);
|
|
644
653
|
}
|
|
645
654
|
});
|
|
646
655
|
i(this, "_triggerRemovedFromListModeratorsNotify", ({
|
|
@@ -650,7 +659,7 @@ class _s {
|
|
|
650
659
|
conference: e
|
|
651
660
|
};
|
|
652
661
|
this._uaEvents.trigger(
|
|
653
|
-
|
|
662
|
+
Ee,
|
|
654
663
|
t
|
|
655
664
|
);
|
|
656
665
|
});
|
|
@@ -658,27 +667,27 @@ class _s {
|
|
|
658
667
|
const t = {
|
|
659
668
|
conference: e
|
|
660
669
|
};
|
|
661
|
-
this._uaEvents.trigger(
|
|
670
|
+
this._uaEvents.trigger(_e, t);
|
|
662
671
|
});
|
|
663
672
|
i(this, "_triggerWebcastStartedNotify", ({ body: { conference: e, type: t } }) => {
|
|
664
673
|
const n = {
|
|
665
674
|
conference: e,
|
|
666
675
|
type: t
|
|
667
676
|
};
|
|
668
|
-
this._uaEvents.trigger(
|
|
677
|
+
this._uaEvents.trigger(Se, n);
|
|
669
678
|
});
|
|
670
679
|
i(this, "_triggerWebcastStoppedNotify", ({ body: { conference: e, type: t } }) => {
|
|
671
680
|
const n = {
|
|
672
681
|
conference: e,
|
|
673
682
|
type: t
|
|
674
683
|
};
|
|
675
|
-
this._uaEvents.trigger(
|
|
684
|
+
this._uaEvents.trigger(ue, n);
|
|
676
685
|
});
|
|
677
686
|
i(this, "_triggerAccountChangedNotify", () => {
|
|
678
|
-
this._uaEvents.trigger(
|
|
687
|
+
this._uaEvents.trigger(Ce, void 0);
|
|
679
688
|
});
|
|
680
689
|
i(this, "_triggerAccountDeletedNotify", () => {
|
|
681
|
-
this._uaEvents.trigger(
|
|
690
|
+
this._uaEvents.trigger(Ne, void 0);
|
|
682
691
|
});
|
|
683
692
|
i(this, "_triggerConferenceParticipantTokenIssued", ({
|
|
684
693
|
body: { conference: e, participant: t, jwt: n }
|
|
@@ -689,7 +698,7 @@ class _s {
|
|
|
689
698
|
jwt: n
|
|
690
699
|
};
|
|
691
700
|
this._uaEvents.trigger(
|
|
692
|
-
|
|
701
|
+
ge,
|
|
693
702
|
s
|
|
694
703
|
);
|
|
695
704
|
});
|
|
@@ -698,7 +707,7 @@ class _s {
|
|
|
698
707
|
inputChannels: t,
|
|
699
708
|
outputChannels: n
|
|
700
709
|
};
|
|
701
|
-
this._uaEvents.trigger(
|
|
710
|
+
this._uaEvents.trigger(ne, s);
|
|
702
711
|
});
|
|
703
712
|
i(this, "_triggerParticipationAcceptingWordRequest", ({
|
|
704
713
|
body: { conference: e }
|
|
@@ -714,7 +723,7 @@ class _s {
|
|
|
714
723
|
const t = {
|
|
715
724
|
conference: e
|
|
716
725
|
};
|
|
717
|
-
this._uaEvents.trigger(
|
|
726
|
+
this._uaEvents.trigger(Te, t);
|
|
718
727
|
});
|
|
719
728
|
i(this, "_triggerParticipantMoveRequestToStream", ({
|
|
720
729
|
body: { conference: e }
|
|
@@ -722,56 +731,56 @@ class _s {
|
|
|
722
731
|
const t = {
|
|
723
732
|
conference: e
|
|
724
733
|
};
|
|
725
|
-
this._uaEvents.trigger(
|
|
734
|
+
this._uaEvents.trigger(he, t);
|
|
726
735
|
});
|
|
727
736
|
i(this, "_triggerEnterRoom", (e) => {
|
|
728
|
-
const t = e.getHeader(
|
|
729
|
-
this._sessionEvents.trigger(
|
|
737
|
+
const t = e.getHeader(xt), n = e.getHeader(Kt);
|
|
738
|
+
this._sessionEvents.trigger(K, { room: t, participantName: n });
|
|
730
739
|
});
|
|
731
740
|
i(this, "_triggerShareState", (e) => {
|
|
732
741
|
const t = e.getHeader(R);
|
|
733
|
-
this._sessionEvents.trigger(
|
|
742
|
+
this._sessionEvents.trigger(v, t);
|
|
734
743
|
});
|
|
735
744
|
i(this, "_maybeTriggerParticipantMoveRequestToSpectators", (e) => {
|
|
736
|
-
e.getHeader(
|
|
745
|
+
e.getHeader(cn) === at && this._sessionEvents.trigger(le, void 0);
|
|
737
746
|
});
|
|
738
747
|
i(this, "_triggerMainCamControl", (e) => {
|
|
739
|
-
const t = e.getHeader(
|
|
748
|
+
const t = e.getHeader(Zt), n = e.getHeader(be), s = n === F.ADMIN_SYNC_FORCED;
|
|
740
749
|
if (t === I.ADMIN_START_MAIN_CAM) {
|
|
741
|
-
this._sessionEvents.trigger(
|
|
750
|
+
this._sessionEvents.trigger(oe, { isSyncForced: s });
|
|
742
751
|
return;
|
|
743
752
|
}
|
|
744
753
|
if (t === I.ADMIN_STOP_MAIN_CAM) {
|
|
745
|
-
this._sessionEvents.trigger(
|
|
754
|
+
this._sessionEvents.trigger(re, { isSyncForced: s });
|
|
746
755
|
return;
|
|
747
756
|
}
|
|
748
|
-
(t === I.RESUME_MAIN_CAM || t === I.PAUSE_MAIN_CAM) && n && this._sessionEvents.trigger(
|
|
749
|
-
const o = e.getHeader(
|
|
750
|
-
this._sessionEvents.trigger(
|
|
757
|
+
(t === I.RESUME_MAIN_CAM || t === I.PAUSE_MAIN_CAM) && n && this._sessionEvents.trigger(b, { isSyncForced: s });
|
|
758
|
+
const o = e.getHeader(tn);
|
|
759
|
+
this._sessionEvents.trigger(ie, {
|
|
751
760
|
mainCam: t,
|
|
752
761
|
resolutionMainCam: o
|
|
753
762
|
});
|
|
754
763
|
});
|
|
755
764
|
i(this, "_triggerMicControl", (e) => {
|
|
756
|
-
const t = e.getHeader(
|
|
757
|
-
t ===
|
|
765
|
+
const t = e.getHeader(en), s = e.getHeader(be) === F.ADMIN_SYNC_FORCED;
|
|
766
|
+
t === q.ADMIN_START_MIC ? this._sessionEvents.trigger(ce, { isSyncForced: s }) : t === q.ADMIN_STOP_MIC && this._sessionEvents.trigger(ae, { isSyncForced: s });
|
|
758
767
|
});
|
|
759
768
|
i(this, "_triggerUseLicense", (e) => {
|
|
760
|
-
const t = e.getHeader(
|
|
761
|
-
this._sessionEvents.trigger(
|
|
769
|
+
const t = e.getHeader(jt);
|
|
770
|
+
this._sessionEvents.trigger(Z, t);
|
|
762
771
|
});
|
|
763
772
|
i(this, "_handleNewInfo", (e) => {
|
|
764
773
|
const { originator: t } = e;
|
|
765
774
|
if (t !== "remote")
|
|
766
775
|
return;
|
|
767
|
-
const { request: n } = e, s = n.getHeader(
|
|
776
|
+
const { request: n } = e, s = n.getHeader(Yt);
|
|
768
777
|
if (s)
|
|
769
778
|
switch (s) {
|
|
770
|
-
case
|
|
779
|
+
case Gt: {
|
|
771
780
|
this._triggerEnterRoom(n), this._maybeTriggerChannels(n);
|
|
772
781
|
break;
|
|
773
782
|
}
|
|
774
|
-
case
|
|
783
|
+
case _n: {
|
|
775
784
|
this._maybeHandleNotify(n);
|
|
776
785
|
break;
|
|
777
786
|
}
|
|
@@ -779,19 +788,19 @@ class _s {
|
|
|
779
788
|
this._triggerShareState(n);
|
|
780
789
|
break;
|
|
781
790
|
}
|
|
782
|
-
case
|
|
791
|
+
case Me: {
|
|
783
792
|
this._triggerMainCamControl(n);
|
|
784
793
|
break;
|
|
785
794
|
}
|
|
786
|
-
case
|
|
795
|
+
case zt: {
|
|
787
796
|
this._triggerMicControl(n);
|
|
788
797
|
break;
|
|
789
798
|
}
|
|
790
|
-
case
|
|
799
|
+
case Qt: {
|
|
791
800
|
this._triggerUseLicense(n);
|
|
792
801
|
break;
|
|
793
802
|
}
|
|
794
|
-
case
|
|
803
|
+
case an: {
|
|
795
804
|
this._maybeTriggerParticipantMoveRequestToSpectators(n);
|
|
796
805
|
break;
|
|
797
806
|
}
|
|
@@ -801,7 +810,7 @@ class _s {
|
|
|
801
810
|
this._maybeHandleNotify(e);
|
|
802
811
|
});
|
|
803
812
|
i(this, "_maybeHandleNotify", (e) => {
|
|
804
|
-
const t = e.getHeader(
|
|
813
|
+
const t = e.getHeader(En);
|
|
805
814
|
if (t) {
|
|
806
815
|
const n = JSON.parse(t);
|
|
807
816
|
this._handleNotify(n);
|
|
@@ -809,9 +818,9 @@ class _s {
|
|
|
809
818
|
});
|
|
810
819
|
i(this, "_handleEnded", (e) => {
|
|
811
820
|
const { originator: t } = e;
|
|
812
|
-
t ===
|
|
821
|
+
t === Ue && this._sessionEvents.trigger(se, e), this._restoreSession();
|
|
813
822
|
});
|
|
814
|
-
this.JsSIP = e, this._sessionEvents = new
|
|
823
|
+
this.JsSIP = e, this._sessionEvents = new Oe(lt), this._uaEvents = new Oe(ht), this._cancelableConnect = new N(
|
|
815
824
|
this._connect,
|
|
816
825
|
{
|
|
817
826
|
moduleName: g,
|
|
@@ -830,7 +839,7 @@ class _s {
|
|
|
830
839
|
}), this._cancelableCall = new N(
|
|
831
840
|
this._call,
|
|
832
841
|
{ moduleName: g }
|
|
833
|
-
), this._cancelableAnswer = new N(this._answer, { moduleName: g }), this._cancelableSendDTMF = new N(this._sendDTMF, { moduleName: g }), this.onSession(
|
|
842
|
+
), this._cancelableAnswer = new N(this._answer, { moduleName: g }), this._cancelableSendDTMF = new N(this._sendDTMF, { moduleName: g }), this.onSession(v, this._handleShareState), this.onSession(Re, this._handleNewInfo), this.on(J, this._handleSipEvent), this.onSession(A, this._handleEnded), this.onSession(P, this._handleEnded);
|
|
834
843
|
}
|
|
835
844
|
async register() {
|
|
836
845
|
return new Promise((e, t) => {
|
|
@@ -839,7 +848,7 @@ class _s {
|
|
|
839
848
|
}
|
|
840
849
|
async unregister() {
|
|
841
850
|
return new Promise((e, t) => {
|
|
842
|
-
this.isRegistered && this.ua ? (this.ua.on(
|
|
851
|
+
this.isRegistered && this.ua ? (this.ua.on(X, e), this.ua.unregister()) : t(new Error("ua is not registered"));
|
|
843
852
|
});
|
|
844
853
|
}
|
|
845
854
|
async sendOptions(e, t, n) {
|
|
@@ -872,40 +881,43 @@ class _s {
|
|
|
872
881
|
userAgent: e,
|
|
873
882
|
displayName: t,
|
|
874
883
|
sipServerUrl: n,
|
|
875
|
-
sipWebSocketServerURL: s
|
|
884
|
+
sipWebSocketServerURL: s,
|
|
885
|
+
remoteAddress: o,
|
|
886
|
+
extraHeaders: a
|
|
876
887
|
}) {
|
|
877
|
-
return new Promise((
|
|
878
|
-
const { configuration:
|
|
888
|
+
return new Promise((c, _) => {
|
|
889
|
+
const { configuration: E } = this.createUaConfiguration({
|
|
879
890
|
sipWebSocketServerURL: s,
|
|
880
891
|
displayName: t,
|
|
881
892
|
userAgent: e,
|
|
882
893
|
sipServerUrl: n
|
|
883
|
-
}),
|
|
884
|
-
const
|
|
885
|
-
|
|
894
|
+
}), h = this._createUa({ ...E, remoteAddress: o, extraHeaders: a }), l = () => {
|
|
895
|
+
const T = new Error("Telephony is not available");
|
|
896
|
+
_(T);
|
|
886
897
|
};
|
|
887
|
-
|
|
888
|
-
const
|
|
889
|
-
|
|
898
|
+
h.once(u, l);
|
|
899
|
+
const d = () => {
|
|
900
|
+
h.removeAllListeners(), h.once(u, c), h.stop();
|
|
890
901
|
};
|
|
891
|
-
|
|
902
|
+
h.once(m, d), h.start();
|
|
892
903
|
});
|
|
893
904
|
}
|
|
894
905
|
async replaceMediaStream(e, t) {
|
|
895
906
|
if (!this.session)
|
|
896
907
|
throw new Error("No session established");
|
|
897
|
-
|
|
908
|
+
const { contentHint: n } = t || {}, s = D(e, { contentHint: n });
|
|
909
|
+
return this.session.replaceMediaStream(s, t);
|
|
898
910
|
}
|
|
899
911
|
async askPermissionToEnableCam(e = {}) {
|
|
900
912
|
if (!this.session)
|
|
901
913
|
throw new Error("No session established");
|
|
902
|
-
const t = [
|
|
903
|
-
return this.session.sendInfo(
|
|
914
|
+
const t = [Cn];
|
|
915
|
+
return this.session.sendInfo(Me, void 0, {
|
|
904
916
|
noTerminateWhenError: !0,
|
|
905
917
|
...e,
|
|
906
918
|
extraHeaders: t
|
|
907
919
|
}).catch((n) => {
|
|
908
|
-
if (
|
|
920
|
+
if (On(n))
|
|
909
921
|
throw n;
|
|
910
922
|
});
|
|
911
923
|
}
|
|
@@ -917,11 +929,11 @@ class _s {
|
|
|
917
929
|
stream: t,
|
|
918
930
|
presentationOptions: n,
|
|
919
931
|
options: s = {
|
|
920
|
-
callLimit:
|
|
932
|
+
callLimit: kn
|
|
921
933
|
}
|
|
922
934
|
}) {
|
|
923
935
|
const o = async () => this._sendPresentation(e, t, n), a = () => !!this._streamPresentationCurrent;
|
|
924
|
-
return this._cancelableSendPresentationWithRepeatedCalls =
|
|
936
|
+
return this._cancelableSendPresentationWithRepeatedCalls = De({
|
|
925
937
|
targetFunction: o,
|
|
926
938
|
isComplete: a,
|
|
927
939
|
isRejectAsValid: !0,
|
|
@@ -949,37 +961,37 @@ class _s {
|
|
|
949
961
|
}) {
|
|
950
962
|
if (a && !t)
|
|
951
963
|
throw new Error("password is required for authorized connection");
|
|
952
|
-
const d = a && e ? e.trim() : `${
|
|
964
|
+
const d = a && e ? e.trim() : `${In()}`, T = An(o), C = T(d), S = new this.JsSIP.WebSocketInterface(n);
|
|
953
965
|
return {
|
|
954
966
|
configuration: {
|
|
955
967
|
password: t,
|
|
956
968
|
register: a,
|
|
957
|
-
uri:
|
|
958
|
-
display_name:
|
|
969
|
+
uri: C,
|
|
970
|
+
display_name: we(s),
|
|
959
971
|
user_agent: l,
|
|
960
972
|
sdp_semantics: "unified-plan",
|
|
961
|
-
sockets: [
|
|
973
|
+
sockets: [S],
|
|
962
974
|
session_timers: c,
|
|
963
975
|
register_expires: _,
|
|
964
976
|
connection_recovery_min_interval: E,
|
|
965
977
|
connection_recovery_max_interval: h
|
|
966
978
|
},
|
|
967
979
|
helpers: {
|
|
968
|
-
socket:
|
|
980
|
+
socket: S,
|
|
969
981
|
getSipServerUrl: T
|
|
970
982
|
}
|
|
971
983
|
};
|
|
972
984
|
}
|
|
973
985
|
async _sendPresentation(e, t, {
|
|
974
|
-
maxBitrate: n =
|
|
986
|
+
maxBitrate: n = ct,
|
|
975
987
|
degradationPreference: s = "maintain-resolution",
|
|
976
988
|
isNeedReinvite: o = !0,
|
|
977
989
|
isP2P: a = !1,
|
|
978
990
|
contentHint: c = "detail"
|
|
979
991
|
}) {
|
|
980
|
-
const _ =
|
|
992
|
+
const _ = D(t, { contentHint: c });
|
|
981
993
|
this._streamPresentationCurrent = _;
|
|
982
|
-
const E = a ? [
|
|
994
|
+
const E = a ? [Tn] : [hn], h = e.sendInfo(O, void 0, {
|
|
983
995
|
extraHeaders: E
|
|
984
996
|
}).then(async () => e.startPresentation(
|
|
985
997
|
_,
|
|
@@ -990,9 +1002,9 @@ class _s {
|
|
|
990
1002
|
if (!l || n === void 0)
|
|
991
1003
|
return;
|
|
992
1004
|
const d = l.getSenders();
|
|
993
|
-
await
|
|
1005
|
+
await Un(d, t, n);
|
|
994
1006
|
}).then(() => t).catch((l) => {
|
|
995
|
-
throw this._removeStreamPresentationCurrent(), this._sessionEvents.trigger(
|
|
1007
|
+
throw this._removeStreamPresentationCurrent(), this._sessionEvents.trigger(L, l), l;
|
|
996
1008
|
});
|
|
997
1009
|
return this.promisePendingStartPresentation = h, h.finally(() => {
|
|
998
1010
|
this.promisePendingStartPresentation = void 0;
|
|
@@ -1025,7 +1037,7 @@ class _s {
|
|
|
1025
1037
|
}
|
|
1026
1038
|
async sendMustStopPresentation(e) {
|
|
1027
1039
|
await e.sendInfo(O, void 0, {
|
|
1028
|
-
extraHeaders: [
|
|
1040
|
+
extraHeaders: [dn]
|
|
1029
1041
|
});
|
|
1030
1042
|
}
|
|
1031
1043
|
async stopPresentation({
|
|
@@ -1034,12 +1046,12 @@ class _s {
|
|
|
1034
1046
|
this._cancelSendPresentationWithRepeatedCalls();
|
|
1035
1047
|
const t = this._streamPresentationCurrent;
|
|
1036
1048
|
let n = this.promisePendingStartPresentation ?? Promise.resolve();
|
|
1037
|
-
const s = e ? [
|
|
1049
|
+
const s = e ? [Sn] : [ln], o = this.establishedSession;
|
|
1038
1050
|
return o && t && (n = n.then(async () => o.sendInfo(O, void 0, {
|
|
1039
1051
|
extraHeaders: s
|
|
1040
1052
|
})).then(async () => o.stopPresentation(t)).catch((a) => {
|
|
1041
|
-
throw this._sessionEvents.trigger(
|
|
1042
|
-
})), !o && t && this._sessionEvents.trigger(
|
|
1053
|
+
throw this._sessionEvents.trigger(L, a), a;
|
|
1054
|
+
})), !o && t && this._sessionEvents.trigger(Ie, t), this.promisePendingStopPresentation = n, n.finally(() => {
|
|
1043
1055
|
this._resetPresentation();
|
|
1044
1056
|
});
|
|
1045
1057
|
}
|
|
@@ -1111,7 +1123,7 @@ class _s {
|
|
|
1111
1123
|
if (!this.connection)
|
|
1112
1124
|
return;
|
|
1113
1125
|
const t = this.connection.getReceivers().map(({ track: n }) => n);
|
|
1114
|
-
return
|
|
1126
|
+
return mn(t) ? this._generateStreams(t) : this._generateAudioStreams(t);
|
|
1115
1127
|
}
|
|
1116
1128
|
get connection() {
|
|
1117
1129
|
var t;
|
|
@@ -1186,29 +1198,29 @@ class _s {
|
|
|
1186
1198
|
this._cancelableAnswer.cancelRequest(), this._cancelableSendDTMF.cancelRequest();
|
|
1187
1199
|
}
|
|
1188
1200
|
async waitChannels() {
|
|
1189
|
-
return this.waitSession(
|
|
1201
|
+
return this.waitSession(y);
|
|
1190
1202
|
}
|
|
1191
1203
|
async waitSyncMediaState() {
|
|
1192
|
-
return this.waitSession(
|
|
1204
|
+
return this.waitSession(b);
|
|
1193
1205
|
}
|
|
1194
1206
|
async sendChannels({ inputChannels: e, outputChannels: t }) {
|
|
1195
1207
|
if (!this.session)
|
|
1196
1208
|
throw new Error("No session established");
|
|
1197
|
-
const n = `${
|
|
1209
|
+
const n = `${ve}: ${e}`, s = `${ye}: ${t}`, o = [
|
|
1198
1210
|
n,
|
|
1199
1211
|
s
|
|
1200
1212
|
];
|
|
1201
|
-
return this.session.sendInfo(
|
|
1213
|
+
return this.session.sendInfo($t, void 0, { extraHeaders: o });
|
|
1202
1214
|
}
|
|
1203
1215
|
async sendMediaState({ cam: e, mic: t }, n = {}) {
|
|
1204
1216
|
if (!this.session)
|
|
1205
1217
|
throw new Error("No session established");
|
|
1206
|
-
const s = `${
|
|
1218
|
+
const s = `${nn}: currentstate`, o = `${rn}: ${Number(e)}`, a = `${on}: ${Number(t)}`, c = [
|
|
1207
1219
|
s,
|
|
1208
1220
|
o,
|
|
1209
1221
|
a
|
|
1210
1222
|
];
|
|
1211
|
-
return this.session.sendInfo(
|
|
1223
|
+
return this.session.sendInfo(Xt, void 0, {
|
|
1212
1224
|
noTerminateWhenError: !0,
|
|
1213
1225
|
...n,
|
|
1214
1226
|
extraHeaders: c
|
|
@@ -1217,8 +1229,8 @@ class _s {
|
|
|
1217
1229
|
async _sendRefusalToTurnOn(e, t = {}) {
|
|
1218
1230
|
if (!this.session)
|
|
1219
1231
|
throw new Error("No session established");
|
|
1220
|
-
const c = [`${
|
|
1221
|
-
return this.session.sendInfo(
|
|
1232
|
+
const c = [`${sn}: ${e === "mic" ? 0 : 1}`];
|
|
1233
|
+
return this.session.sendInfo(Jt, void 0, {
|
|
1222
1234
|
noTerminateWhenError: !0,
|
|
1223
1235
|
...t,
|
|
1224
1236
|
extraHeaders: c
|
|
@@ -1236,22 +1248,22 @@ class _s {
|
|
|
1236
1248
|
}
|
|
1237
1249
|
}
|
|
1238
1250
|
export {
|
|
1239
|
-
|
|
1251
|
+
Ft as B,
|
|
1240
1252
|
I as E,
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1253
|
+
Mt as N,
|
|
1254
|
+
He as R,
|
|
1255
|
+
as as S,
|
|
1256
|
+
ht as U,
|
|
1257
|
+
ns as a,
|
|
1258
|
+
is as b,
|
|
1259
|
+
ts as c,
|
|
1260
|
+
rs as d,
|
|
1261
|
+
ss as e,
|
|
1262
|
+
q as f,
|
|
1263
|
+
F as g,
|
|
1264
|
+
os as h,
|
|
1265
|
+
gn as i,
|
|
1266
|
+
lt as j,
|
|
1267
|
+
k as l,
|
|
1268
|
+
wn as s
|
|
1257
1269
|
};
|