sip-connector 21.0.0 → 22.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.
@@ -13,37 +13,36 @@ const z = "sip-connector", d = J(z), Qs = () => {
13
13
  }, Ys = () => {
14
14
  J.enable(`-${z}`);
15
15
  }, Je = "Error decline with 603", ze = 1006, Ke = (n) => typeof n == "object" && n !== null && "code" in n && n.code === ze, je = (n) => n.message === Je;
16
- var T = /* @__PURE__ */ ((n) => (n.CONTENT_TYPE = "content-type", n.CONTENT_ENTER_ROOM = "x-webrtc-enter-room", n.CONTENT_USE_LICENSE = "X-WEBRTC-USE-LICENSE", n.PARTICIPANT_NAME = "X-WEBRTC-PARTICIPANT-NAME", n.INPUT_CHANNELS = "X-WEBRTC-INPUT-CHANNELS", n.OUTPUT_CHANNELS = "X-WEBRTC-OUTPUT-CHANNELS", n.MAIN_CAM = "X-WEBRTC-MAINCAM", n.MIC = "X-WEBRTC-MIC", n.MEDIA_SYNC = "X-WEBRTC-SYNC", n.MAIN_CAM_RESOLUTION = "X-WEBRTC-MAINCAM-RESOLUTION", n.MEDIA_STATE = "X-WEBRTC-MEDIA-STATE", n.MEDIA_TYPE = "X-Vinteo-Media-Type", n.MAIN_CAM_STATE = "X-Vinteo-MainCam-State", n.MIC_STATE = "X-Vinteo-Mic-State", n.CONTENT_PARTICIPANT_STATE = "X-WEBRTC-PARTSTATE", n.NOTIFY = "X-VINTEO-NOTIFY", n.CONTENT_ENABLE_MEDIA_DEVICE = "X-WEBRTC-REQUEST-ENABLE-MEDIA-DEVICE", n.CONTENT_SHARE_STATE = "x-webrtc-share-state", n.MUST_STOP_PRESENTATION_P2P = "x-webrtc-share-state: YOUMUSTSTOPSENDCONTENT", n.START_PRESENTATION_P2P = "x-webrtc-share-state: YOUCANRECEIVECONTENT", n.STOP_PRESENTATION_P2P = "x-webrtc-share-state: CONTENTEND", n.STOP_PRESENTATION = "x-webrtc-share-state: STOPPRESENTATION", n.START_PRESENTATION = "x-webrtc-share-state: LETMESTARTPRESENTATION", n.ENABLE_MAIN_CAM = "X-WEBRTC-REQUEST-ENABLE-MEDIA-DEVICE: LETMESTARTMAINCAM", n.AVAILABLE_INCOMING_BITRATE = "X-WEBRTC-AVAILABLE-INCOMING-BITRATE", n.AUDIO_TRACK_COUNT = "X-WEBRTC-AUDIO-TRACK-COUNT", n.VIDEO_TRACK_COUNT = "X-WEBRTC-VIDEO-TRACK-COUNT", n.TRACKS_DIRECTION = "X-WEBRTC-TRACKS-DIRECTION", n.AUDIO_ID = "X-WEBRTC-AUDIOID", n))(T || {}), k = /* @__PURE__ */ ((n) => (n.AVAILABLE_SECOND_REMOTE_STREAM = "YOUCANRECEIVECONTENT", n.NOT_AVAILABLE_SECOND_REMOTE_STREAM = "CONTENTEND", n.MUST_STOP_PRESENTATION = "YOUMUSTSTOPSENDCONTENT", n))(k || {}), x = /* @__PURE__ */ ((n) => (n.SPECTATOR = "SPECTATOR", n.PARTICIPANT = "PARTICIPANT", n))(x || {}), D = /* @__PURE__ */ ((n) => (n.ENTER_ROOM = "application/vinteo.webrtc.roomname", n.MIC = "application/vinteo.webrtc.mic", n.USE_LICENSE = "application/vinteo.webrtc.uselic", n.PARTICIPANT_STATE = "application/vinteo.webrtc.partstate", n.NOTIFY = "application/vinteo.webrtc.notify", n.SHARE_STATE = "application/vinteo.webrtc.sharedesktop", n.MAIN_CAM = "application/vinteo.webrtc.maincam", n))(D || {}), I = /* @__PURE__ */ ((n) => (n.CHANNELS = "application/vinteo.webrtc.channels", n.MEDIA_STATE = "application/vinteo.webrtc.mediastate", n.REFUSAL = "application/vinteo.webrtc.refusal", n.SHARE_STATE = "application/vinteo.webrtc.sharedesktop", n.MAIN_CAM = "application/vinteo.webrtc.maincam", n.STATS = "application/vinteo.webrtc.stats", n))(I || {}), M = /* @__PURE__ */ ((n) => (n.PAUSE_MAIN_CAM = "PAUSEMAINCAM", n.RESUME_MAIN_CAM = "RESUMEMAINCAM", n.MAX_MAIN_CAM_RESOLUTION = "MAXMAINCAMRESOLUTION", n.ADMIN_STOP_MAIN_CAM = "ADMINSTOPMAINCAM", n.ADMIN_START_MAIN_CAM = "ADMINSTARTMAINCAM", n))(M || {}), Q = /* @__PURE__ */ ((n) => (n.ADMIN_STOP_MIC = "ADMINSTOPMIC", n.ADMIN_START_MIC = "ADMINSTARTMIC", n))(Q || {}), Y = /* @__PURE__ */ ((n) => (n.ADMIN_SYNC_FORCED = "1", n.ADMIN_SYNC_NOT_FORCED = "0", n))(Y || {}), Ze = /* @__PURE__ */ ((n) => (n.AUDIO = "AUDIO", n.VIDEO = "VIDEO", n.AUDIOPLUSPRESENTATION = "AUDIOPLUSPRESENTATION", n))(Ze || {}), g = /* @__PURE__ */ ((n) => (n.CHANNELS_NOTIFY = "channels:notify", n.PARTICIPANT_ADDED_TO_LIST_MODERATORS = "participant:added-to-list-moderators", n.PARTICIPANT_REMOVED_FROM_LIST_MODERATORS = "participant:removed-from-list-moderators", n.PARTICIPANT_MOVE_REQUEST_TO_STREAM = "participant:move-request-to-stream", n.PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS = "participant:move-request-to-spectators", n.PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS_SYNTHETIC = "participant:move-request-to-spectators-synthetic", n.PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS_WITH_AUDIO_ID = "participant:move-request-to-spectators-with-audio-id", n.PARTICIPANT_MOVE_REQUEST_TO_PARTICIPANTS = "participant:move-request-to-participants", n.PARTICIPATION_ACCEPTING_WORD_REQUEST = "participation:accepting-word-request", n.PARTICIPATION_CANCELLING_WORD_REQUEST = "participation:cancelling-word-request", n.WEBCAST_STARTED = "webcast:started", n.WEBCAST_STOPPED = "webcast:stopped", n.ACCOUNT_CHANGED = "account:changed", n.ACCOUNT_DELETED = "account:deleted", n.CONFERENCE_PARTICIPANT_TOKEN_ISSUED = "conference:participant-token-issued", n.CHANNELS = "channels", n.ENTER_ROOM = "enterRoom", n.SHARE_STATE = "shareState", n.MAIN_CAM_CONTROL = "main-cam-control", n.USE_LICENSE = "useLicense", n.ADMIN_START_MAIN_CAM = "admin-start-main-cam", n.ADMIN_STOP_MAIN_CAM = "admin-stop-main-cam", n.ADMIN_START_MIC = "admin-start-mic", n.ADMIN_STOP_MIC = "admin-stop-mic", n.ADMIN_FORCE_SYNC_MEDIA_STATE = "admin-force-sync-media-state", n.AVAILABLE_SECOND_REMOTE_STREAM = "availableSecondRemoteStream", n.NOT_AVAILABLE_SECOND_REMOTE_STREAM = "notAvailableSecondRemoteStream", n.MUST_STOP_PRESENTATION = "mustStopPresentation", n.NEW_DTMF = "newDTMF", n))(g || {});
16
+ var T = /* @__PURE__ */ ((n) => (n.CONTENT_TYPE = "content-type", n.CONTENT_ENTER_ROOM = "x-webrtc-enter-room", n.CONTENT_USE_LICENSE = "X-WEBRTC-USE-LICENSE", n.PARTICIPANT_NAME = "X-WEBRTC-PARTICIPANT-NAME", n.INPUT_CHANNELS = "X-WEBRTC-INPUT-CHANNELS", n.OUTPUT_CHANNELS = "X-WEBRTC-OUTPUT-CHANNELS", n.MAIN_CAM = "X-WEBRTC-MAINCAM", n.MIC = "X-WEBRTC-MIC", n.MEDIA_SYNC = "X-WEBRTC-SYNC", n.MAIN_CAM_RESOLUTION = "X-WEBRTC-MAINCAM-RESOLUTION", n.MEDIA_STATE = "X-WEBRTC-MEDIA-STATE", n.MEDIA_TYPE = "X-Vinteo-Media-Type", n.MAIN_CAM_STATE = "X-Vinteo-MainCam-State", n.MIC_STATE = "X-Vinteo-Mic-State", n.CONTENT_PARTICIPANT_STATE = "X-WEBRTC-PARTSTATE", n.NOTIFY = "X-VINTEO-NOTIFY", n.CONTENT_ENABLE_MEDIA_DEVICE = "X-WEBRTC-REQUEST-ENABLE-MEDIA-DEVICE", n.CONTENT_SHARE_STATE = "x-webrtc-share-state", n.MUST_STOP_PRESENTATION_P2P = "x-webrtc-share-state: YOUMUSTSTOPSENDCONTENT", n.START_PRESENTATION_P2P = "x-webrtc-share-state: YOUCANRECEIVECONTENT", n.STOP_PRESENTATION_P2P = "x-webrtc-share-state: CONTENTEND", n.STOP_PRESENTATION = "x-webrtc-share-state: STOPPRESENTATION", n.START_PRESENTATION = "x-webrtc-share-state: LETMESTARTPRESENTATION", n.ENABLE_MAIN_CAM = "X-WEBRTC-REQUEST-ENABLE-MEDIA-DEVICE: LETMESTARTMAINCAM", n.AVAILABLE_INCOMING_BITRATE = "X-WEBRTC-AVAILABLE-INCOMING-BITRATE", n.AUDIO_TRACK_COUNT = "X-WEBRTC-AUDIO-TRACK-COUNT", n.VIDEO_TRACK_COUNT = "X-WEBRTC-VIDEO-TRACK-COUNT", n.TRACKS_DIRECTION = "X-WEBRTC-TRACKS-DIRECTION", n.AUDIO_ID = "X-WEBRTC-AUDIOID", n))(T || {}), k = /* @__PURE__ */ ((n) => (n.AVAILABLE_SECOND_REMOTE_STREAM = "YOUCANRECEIVECONTENT", n.NOT_AVAILABLE_SECOND_REMOTE_STREAM = "CONTENTEND", n.MUST_STOP_PRESENTATION = "YOUMUSTSTOPSENDCONTENT", n))(k || {}), x = /* @__PURE__ */ ((n) => (n.SPECTATOR = "SPECTATOR", n.PARTICIPANT = "PARTICIPANT", n))(x || {}), D = /* @__PURE__ */ ((n) => (n.ENTER_ROOM = "application/vinteo.webrtc.roomname", n.MIC = "application/vinteo.webrtc.mic", n.USE_LICENSE = "application/vinteo.webrtc.uselic", n.PARTICIPANT_STATE = "application/vinteo.webrtc.partstate", n.NOTIFY = "application/vinteo.webrtc.notify", n.SHARE_STATE = "application/vinteo.webrtc.sharedesktop", n.MAIN_CAM = "application/vinteo.webrtc.maincam", n))(D || {}), I = /* @__PURE__ */ ((n) => (n.CHANNELS = "application/vinteo.webrtc.channels", n.MEDIA_STATE = "application/vinteo.webrtc.mediastate", n.REFUSAL = "application/vinteo.webrtc.refusal", n.SHARE_STATE = "application/vinteo.webrtc.sharedesktop", n.MAIN_CAM = "application/vinteo.webrtc.maincam", n.STATS = "application/vinteo.webrtc.stats", n))(I || {}), M = /* @__PURE__ */ ((n) => (n.PAUSE_MAIN_CAM = "PAUSEMAINCAM", n.RESUME_MAIN_CAM = "RESUMEMAINCAM", n.MAX_MAIN_CAM_RESOLUTION = "MAXMAINCAMRESOLUTION", n.ADMIN_STOP_MAIN_CAM = "ADMINSTOPMAINCAM", n.ADMIN_START_MAIN_CAM = "ADMINSTARTMAINCAM", n))(M || {}), Q = /* @__PURE__ */ ((n) => (n.ADMIN_STOP_MIC = "ADMINSTOPMIC", n.ADMIN_START_MIC = "ADMINSTARTMIC", n))(Q || {}), Y = /* @__PURE__ */ ((n) => (n.ADMIN_SYNC_FORCED = "1", n.ADMIN_SYNC_NOT_FORCED = "0", n))(Y || {}), Ze = /* @__PURE__ */ ((n) => (n.AUDIO = "AUDIO", n.VIDEO = "VIDEO", n.AUDIOPLUSPRESENTATION = "AUDIOPLUSPRESENTATION", n))(Ze || {}), l = /* @__PURE__ */ ((n) => (n.ENTER_ROOM = "enter-room", n.MAIN_CAM_CONTROL = "main-cam-control", n.USE_LICENSE = "use-license", n.NEW_DTMF = "new-dtmf", n.CONFERENCE_PARTICIPANT_TOKEN_ISSUED = "conference:participant-token-issued", n.CONTENTED_STREAM_AVAILABLE = "contented-stream:available", n.CONTENTED_STREAM_NOT_AVAILABLE = "contented-stream:not-available", n.PRESENTATION_MUST_STOP = "presentation:must-stop", n.CHANNELS_ALL = "channels:all", n.CHANNELS_NOTIFY = "channels:notify", n.PARTICIPANT_ADDED_TO_LIST_MODERATORS = "participant:added-to-list-moderators", n.PARTICIPANT_REMOVED_FROM_LIST_MODERATORS = "participant:removed-from-list-moderators", n.PARTICIPANT_MOVE_REQUEST_TO_STREAM = "participant:move-request-to-stream", n.PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS = "participant:move-request-to-spectators", n.PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS_SYNTHETIC = "participant:move-request-to-spectators-synthetic", n.PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS_WITH_AUDIO_ID = "participant:move-request-to-spectators-with-audio-id", n.PARTICIPANT_MOVE_REQUEST_TO_PARTICIPANTS = "participant:move-request-to-participants", n.PARTICIPATION_ACCEPTING_WORD_REQUEST = "participation:accepting-word-request", n.PARTICIPATION_CANCELLING_WORD_REQUEST = "participation:cancelling-word-request", n.WEBCAST_STARTED = "webcast:started", n.WEBCAST_STOPPED = "webcast:stopped", n.ACCOUNT_CHANGED = "account:changed", n.ACCOUNT_DELETED = "account:deleted", n.ADMIN_START_MAIN_CAM = "admin:start-main-cam", n.ADMIN_STOP_MAIN_CAM = "admin:stop-main-cam", n.ADMIN_START_MIC = "admin:start-mic", n.ADMIN_STOP_MIC = "admin:stop-mic", n.ADMIN_FORCE_SYNC_MEDIA_STATE = "admin:force-sync-media-state", n))(l || {});
17
17
  const ge = [
18
- "participation:accepting-word-request",
19
- "participation:cancelling-word-request",
20
- "participant:move-request-to-stream",
21
- "channels:notify",
18
+ "enter-room",
19
+ "main-cam-control",
20
+ "use-license",
21
+ "new-dtmf",
22
22
  "conference:participant-token-issued",
23
- "account:changed",
24
- "account:deleted",
25
- "webcast:started",
26
- "webcast:stopped",
23
+ "contented-stream:available",
24
+ "contented-stream:not-available",
25
+ "presentation:must-stop",
26
+ "channels:all",
27
+ "channels:notify",
27
28
  "participant:added-to-list-moderators",
28
29
  "participant:removed-from-list-moderators",
30
+ "participant:move-request-to-stream",
29
31
  "participant:move-request-to-spectators",
30
32
  "participant:move-request-to-spectators-synthetic",
31
33
  "participant:move-request-to-spectators-with-audio-id",
32
34
  "participant:move-request-to-participants",
33
- "channels",
34
- "enterRoom",
35
- "shareState",
36
- "main-cam-control",
37
- "useLicense",
38
- "admin-start-main-cam",
39
- "admin-stop-main-cam",
40
- "admin-start-mic",
41
- "admin-stop-mic",
42
- "admin-force-sync-media-state",
43
- "availableSecondRemoteStream",
44
- "notAvailableSecondRemoteStream",
45
- "mustStopPresentation",
46
- "newDTMF"
35
+ "participation:accepting-word-request",
36
+ "participation:cancelling-word-request",
37
+ "webcast:started",
38
+ "webcast:stopped",
39
+ "account:changed",
40
+ "account:deleted",
41
+ "admin:start-main-cam",
42
+ "admin:stop-main-cam",
43
+ "admin:start-mic",
44
+ "admin:stop-mic",
45
+ "admin:force-sync-media-state"
47
46
  ], et = () => new A(ge);
48
47
  var R = /* @__PURE__ */ ((n) => (n.CHANNELS = "channels", n.WEBCAST_STARTED = "WebcastStarted", n.WEBCAST_STOPPED = "WebcastStopped", n.ACCOUNT_CHANGED = "accountChanged", n.ACCOUNT_DELETED = "accountDeleted", n.ADDED_TO_LIST_MODERATORS = "addedToListModerators", n.REMOVED_FROM_LIST_MODERATORS = "removedFromListModerators", n.ACCEPTING_WORD_REQUEST = "ParticipationRequestAccepted", n.CANCELLING_WORD_REQUEST = "ParticipationRequestRejected", n.MOVE_REQUEST_TO_STREAM = "ParticipantMovedToWebcast", n.CONFERENCE_PARTICIPANT_TOKEN_ISSUED = "ConferenceParticipantTokenIssued", n))(R || {});
49
48
  class tt {
@@ -57,10 +56,10 @@ class tt {
57
56
  this.connectionManager = e, this.callManager = t, this.events = et(), this.subscribe();
58
57
  }
59
58
  async waitChannels() {
60
- return this.wait(g.CHANNELS);
59
+ return this.wait(l.CHANNELS_ALL);
61
60
  }
62
61
  async waitSyncMediaState() {
63
- return this.wait(g.ADMIN_FORCE_SYNC_MEDIA_STATE);
62
+ return this.wait(l.ADMIN_FORCE_SYNC_MEDIA_STATE);
64
63
  }
65
64
  async sendDTMF(e) {
66
65
  return new Promise((t, s) => {
@@ -179,7 +178,7 @@ class tt {
179
178
  };
180
179
  subscribe() {
181
180
  this.connectionManager.on("sipEvent", this.handleSipEvent), this.callManager.on("newInfo", this.handleNewInfo), this.callManager.on("newDTMF", (e) => {
182
- this.events.trigger("newDTMF", e);
181
+ this.events.trigger(l.NEW_DTMF, e);
183
182
  });
184
183
  }
185
184
  handleSipEvent = ({ request: e }) => {
@@ -297,7 +296,7 @@ class tt {
297
296
  inputChannels: t,
298
297
  outputChannels: s
299
298
  };
300
- this.events.trigger(g.CHANNELS_NOTIFY, i);
299
+ this.events.trigger(l.CHANNELS_NOTIFY, i);
301
300
  };
302
301
  triggerWebcastStartedNotify = ({
303
302
  body: { conference: e, type: t }
@@ -306,7 +305,7 @@ class tt {
306
305
  conference: e,
307
306
  type: t
308
307
  };
309
- this.events.trigger(g.WEBCAST_STARTED, s);
308
+ this.events.trigger(l.WEBCAST_STARTED, s);
310
309
  };
311
310
  triggerWebcastStoppedNotify = ({
312
311
  body: { conference: e, type: t }
@@ -315,7 +314,7 @@ class tt {
315
314
  conference: e,
316
315
  type: t
317
316
  };
318
- this.events.trigger(g.WEBCAST_STOPPED, s);
317
+ this.events.trigger(l.WEBCAST_STOPPED, s);
319
318
  };
320
319
  triggerAddedToListModeratorsNotify = ({
321
320
  conference: e
@@ -324,7 +323,7 @@ class tt {
324
323
  conference: e
325
324
  };
326
325
  this.events.trigger(
327
- g.PARTICIPANT_ADDED_TO_LIST_MODERATORS,
326
+ l.PARTICIPANT_ADDED_TO_LIST_MODERATORS,
328
327
  t
329
328
  );
330
329
  };
@@ -335,7 +334,7 @@ class tt {
335
334
  conference: e
336
335
  };
337
336
  this.events.trigger(
338
- g.PARTICIPANT_REMOVED_FROM_LIST_MODERATORS,
337
+ l.PARTICIPANT_REMOVED_FROM_LIST_MODERATORS,
339
338
  t
340
339
  );
341
340
  };
@@ -345,7 +344,7 @@ class tt {
345
344
  const t = {
346
345
  conference: e
347
346
  };
348
- this.events.trigger(g.PARTICIPATION_ACCEPTING_WORD_REQUEST, t);
347
+ this.events.trigger(l.PARTICIPATION_ACCEPTING_WORD_REQUEST, t);
349
348
  };
350
349
  triggerParticipationCancellingWordRequest = ({
351
350
  body: { conference: e }
@@ -353,7 +352,7 @@ class tt {
353
352
  const t = {
354
353
  conference: e
355
354
  };
356
- this.events.trigger(g.PARTICIPATION_CANCELLING_WORD_REQUEST, t);
355
+ this.events.trigger(l.PARTICIPATION_CANCELLING_WORD_REQUEST, t);
357
356
  };
358
357
  triggerParticipantMoveRequestToStream = ({
359
358
  body: { conference: e }
@@ -361,13 +360,13 @@ class tt {
361
360
  const t = {
362
361
  conference: e
363
362
  };
364
- this.events.trigger(g.PARTICIPANT_MOVE_REQUEST_TO_STREAM, t);
363
+ this.events.trigger(l.PARTICIPANT_MOVE_REQUEST_TO_STREAM, t);
365
364
  };
366
365
  triggerAccountChangedNotify = () => {
367
- this.events.trigger(g.ACCOUNT_CHANGED, {});
366
+ this.events.trigger(l.ACCOUNT_CHANGED, {});
368
367
  };
369
368
  triggerAccountDeletedNotify = () => {
370
- this.events.trigger(g.ACCOUNT_DELETED, {});
369
+ this.events.trigger(l.ACCOUNT_DELETED, {});
371
370
  };
372
371
  triggerConferenceParticipantTokenIssued = ({
373
372
  body: { conference: e, participant: t, jwt: s }
@@ -378,7 +377,7 @@ class tt {
378
377
  jwt: s
379
378
  };
380
379
  this.events.trigger(
381
- g.CONFERENCE_PARTICIPANT_TOKEN_ISSUED,
380
+ l.CONFERENCE_PARTICIPANT_TOKEN_ISSUED,
382
381
  i
383
382
  );
384
383
  };
@@ -389,64 +388,64 @@ class tt {
389
388
  inputChannels: t,
390
389
  outputChannels: s
391
390
  };
392
- this.events.trigger(g.CHANNELS, i);
391
+ this.events.trigger(l.CHANNELS_ALL, i);
393
392
  }
394
393
  };
395
394
  triggerEnterRoom = (e) => {
396
395
  const t = e.getHeader(T.CONTENT_ENTER_ROOM), s = e.getHeader(T.PARTICIPANT_NAME);
397
- this.events.trigger(g.ENTER_ROOM, { room: t, participantName: s });
396
+ this.events.trigger(l.ENTER_ROOM, { room: t, participantName: s });
398
397
  };
399
398
  triggerShareState = (e) => {
400
399
  const t = e.getHeader(T.CONTENT_SHARE_STATE);
401
400
  if (t !== void 0)
402
401
  switch (t) {
403
402
  case k.AVAILABLE_SECOND_REMOTE_STREAM: {
404
- this.events.trigger(g.AVAILABLE_SECOND_REMOTE_STREAM, {});
403
+ this.events.trigger(l.CONTENTED_STREAM_AVAILABLE, {});
405
404
  break;
406
405
  }
407
406
  case k.NOT_AVAILABLE_SECOND_REMOTE_STREAM: {
408
- this.events.trigger(g.NOT_AVAILABLE_SECOND_REMOTE_STREAM, {});
407
+ this.events.trigger(l.CONTENTED_STREAM_NOT_AVAILABLE, {});
409
408
  break;
410
409
  }
411
410
  case k.MUST_STOP_PRESENTATION: {
412
- this.events.trigger(g.MUST_STOP_PRESENTATION, {});
411
+ this.events.trigger(l.PRESENTATION_MUST_STOP, {});
413
412
  break;
414
413
  }
415
414
  }
416
415
  };
417
416
  maybeTriggerParticipantMoveRequest = (e) => {
418
417
  const t = e.getHeader(T.CONTENT_PARTICIPANT_STATE), s = e.getHeader(T.AUDIO_ID);
419
- t === x.SPECTATOR && (s ? (this.events.trigger(g.PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS_WITH_AUDIO_ID, {
418
+ t === x.SPECTATOR && (s ? (this.events.trigger(l.PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS_WITH_AUDIO_ID, {
420
419
  audioId: s
421
- }), this.events.trigger(g.PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS, {
420
+ }), this.events.trigger(l.PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS, {
422
421
  isSynthetic: !1,
423
422
  audioId: s
424
- })) : (this.events.trigger(g.PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS_SYNTHETIC, {}), this.events.trigger(g.PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS, { isSynthetic: !0 }))), t === x.PARTICIPANT && this.events.trigger(g.PARTICIPANT_MOVE_REQUEST_TO_PARTICIPANTS, {});
423
+ })) : (this.events.trigger(l.PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS_SYNTHETIC, {}), this.events.trigger(l.PARTICIPANT_MOVE_REQUEST_TO_SPECTATORS, { isSynthetic: !0 }))), t === x.PARTICIPANT && this.events.trigger(l.PARTICIPANT_MOVE_REQUEST_TO_PARTICIPANTS, {});
425
424
  };
426
425
  triggerMainCamControl = (e) => {
427
426
  const t = e.getHeader(T.MAIN_CAM), s = e.getHeader(T.MEDIA_SYNC), i = s === Y.ADMIN_SYNC_FORCED;
428
427
  if (t === M.ADMIN_START_MAIN_CAM) {
429
- this.events.trigger(g.ADMIN_START_MAIN_CAM, { isSyncForced: i });
428
+ this.events.trigger(l.ADMIN_START_MAIN_CAM, { isSyncForced: i });
430
429
  return;
431
430
  }
432
431
  if (t === M.ADMIN_STOP_MAIN_CAM) {
433
- this.events.trigger(g.ADMIN_STOP_MAIN_CAM, { isSyncForced: i });
432
+ this.events.trigger(l.ADMIN_STOP_MAIN_CAM, { isSyncForced: i });
434
433
  return;
435
434
  }
436
- (t === M.RESUME_MAIN_CAM || t === M.PAUSE_MAIN_CAM) && s !== void 0 && this.events.trigger(g.ADMIN_FORCE_SYNC_MEDIA_STATE, { isSyncForced: i });
435
+ (t === M.RESUME_MAIN_CAM || t === M.PAUSE_MAIN_CAM) && s !== void 0 && this.events.trigger(l.ADMIN_FORCE_SYNC_MEDIA_STATE, { isSyncForced: i });
437
436
  const r = e.getHeader(T.MAIN_CAM_RESOLUTION);
438
- this.events.trigger(g.MAIN_CAM_CONTROL, {
437
+ this.events.trigger(l.MAIN_CAM_CONTROL, {
439
438
  mainCam: t,
440
439
  resolutionMainCam: r
441
440
  });
442
441
  };
443
442
  triggerMicControl = (e) => {
444
443
  const t = e.getHeader(T.MIC), i = e.getHeader(T.MEDIA_SYNC) === Y.ADMIN_SYNC_FORCED;
445
- t === Q.ADMIN_START_MIC ? this.events.trigger(g.ADMIN_START_MIC, { isSyncForced: i }) : t === Q.ADMIN_STOP_MIC && this.events.trigger(g.ADMIN_STOP_MIC, { isSyncForced: i });
444
+ t === Q.ADMIN_START_MIC ? this.events.trigger(l.ADMIN_START_MIC, { isSyncForced: i }) : t === Q.ADMIN_STOP_MIC && this.events.trigger(l.ADMIN_STOP_MIC, { isSyncForced: i });
446
445
  };
447
446
  triggerUseLicense = (e) => {
448
447
  const t = e.getHeader(T.CONTENT_USE_LICENSE);
449
- this.events.trigger(g.USE_LICENSE, t);
448
+ this.events.trigger(l.USE_LICENSE, t);
450
449
  };
451
450
  }
452
451
  class q {
@@ -634,7 +633,7 @@ class it extends q {
634
633
  );
635
634
  }
636
635
  }
637
- var E = /* @__PURE__ */ ((n) => (n.PEER_CONNECTION = "peerconnection", n.CONNECTING = "connecting", n.SENDING = "sending", n.PROGRESS = "progress", n.ACCEPTED = "accepted", n.CONFIRMED = "confirmed", n.ENDED = "ended", n.FAILED = "failed", n.NEW_DTMF = "newDTMF", n.NEW_INFO = "newInfo", n.HOLD = "hold", n.UNHOLD = "unhold", n.MUTED = "muted", n.UNMUTED = "unmuted", n.REINVITE = "reinvite", n.UPDATE = "update", n.REFER = "refer", n.REPLACES = "replaces", n.SDP = "sdp", n.ICE_CANDIDATE = "icecandidate", n.GET_USER_MEDIA_FAILED = "getusermediafailed", n.PEER_CONNECTION_CREATE_OFFER_FAILED = "peerconnection:createofferfailed", n.PEER_CONNECTION_CREATE_ANSWER_FAILED = "peerconnection:createanswerfailed", n.PEER_CONNECTION_SET_LOCAL_DESCRIPTION_FAILED = "peerconnection:setlocaldescriptionfailed", n.PEER_CONNECTION_SET_REMOTE_DESCRIPTION_FAILED = "peerconnection:setremotedescriptionfailed", n.START_PRESENTATION = "presentation:start", n.STARTED_PRESENTATION = "presentation:started", n.END_PRESENTATION = "presentation:end", n.ENDED_PRESENTATION = "presentation:ended", n.FAILED_PRESENTATION = "presentation:failed", n.PEER_CONNECTION_CONFIRMED = "peerconnection:confirmed", n.PEER_CONNECTION_ONTRACK = "peerconnection:ontrack", n.ENDED_FROM_SERVER = "ended:fromserver", n.CALL_STATUS_CHANGED = "call-status-changed", n.REMOTE_TRACKS_CHANGED = "remote-tracks-changed", n.REMOTE_STREAMS_CHANGED = "remote-streams-changed", n))(E || {}), rt = /* @__PURE__ */ ((n) => (n.LOCAL = "local", n.REMOTE = "remote", n.SYSTEM = "system", n))(rt || {});
636
+ var S = /* @__PURE__ */ ((n) => (n.PEER_CONNECTION = "peerconnection", n.CONNECTING = "connecting", n.SENDING = "sending", n.PROGRESS = "progress", n.ACCEPTED = "accepted", n.CONFIRMED = "confirmed", n.ENDED = "ended", n.FAILED = "failed", n.NEW_DTMF = "newDTMF", n.NEW_INFO = "newInfo", n.HOLD = "hold", n.UNHOLD = "unhold", n.MUTED = "muted", n.UNMUTED = "unmuted", n.REINVITE = "reinvite", n.UPDATE = "update", n.REFER = "refer", n.REPLACES = "replaces", n.SDP = "sdp", n.ICE_CANDIDATE = "icecandidate", n.GET_USER_MEDIA_FAILED = "getusermediafailed", n.PEER_CONNECTION_CREATE_OFFER_FAILED = "peerconnection:createofferfailed", n.PEER_CONNECTION_CREATE_ANSWER_FAILED = "peerconnection:createanswerfailed", n.PEER_CONNECTION_SET_LOCAL_DESCRIPTION_FAILED = "peerconnection:setlocaldescriptionfailed", n.PEER_CONNECTION_SET_REMOTE_DESCRIPTION_FAILED = "peerconnection:setremotedescriptionfailed", n.START_PRESENTATION = "presentation:start", n.STARTED_PRESENTATION = "presentation:started", n.END_PRESENTATION = "presentation:end", n.ENDED_PRESENTATION = "presentation:ended", n.FAILED_PRESENTATION = "presentation:failed", n.PEER_CONNECTION_CONFIRMED = "peerconnection:confirmed", n.PEER_CONNECTION_ONTRACK = "peerconnection:ontrack", n.ENDED_FROM_SERVER = "ended:fromserver", n.CALL_STATUS_CHANGED = "call-status-changed", n.REMOTE_TRACKS_CHANGED = "remote-tracks-changed", n.REMOTE_STREAMS_CHANGED = "remote-streams-changed", n))(S || {}), rt = /* @__PURE__ */ ((n) => (n.LOCAL = "local", n.REMOTE = "remote", n.SYSTEM = "system", n))(rt || {});
638
637
  const ue = [
639
638
  "peerconnection",
640
639
  "connecting",
@@ -690,14 +689,14 @@ const ue = [
690
689
  const i = t === "recvonly" ? [] : n.getAudioTracks(), r = e === "recvonly" ? [] : n.getVideoTracks(), a = [...i, ...r], o = new MediaStream(a);
691
690
  return o.getTracks = () => [...o.getAudioTracks(), ...o.getVideoTracks()], s && s !== "none" && ct(o, s), o;
692
691
  };
693
- var Se = /* @__PURE__ */ ((n) => (n.BYE = "Terminated", n.WEBRTC_ERROR = "WebRTC Error", n.CANCELED = "Canceled", n.REQUEST_TIMEOUT = "Request Timeout", n.REJECTED = "Rejected", n.REDIRECTED = "Redirected", n.UNAVAILABLE = "Unavailable", n.NOT_FOUND = "Not Found", n.ADDRESS_INCOMPLETE = "Address Incomplete", n.INCOMPATIBLE_SDP = "Incompatible SDP", n.BAD_MEDIA_DESCRIPTION = "Bad Media Description", n))(Se || {});
692
+ var Ee = /* @__PURE__ */ ((n) => (n.BYE = "Terminated", n.WEBRTC_ERROR = "WebRTC Error", n.CANCELED = "Canceled", n.REQUEST_TIMEOUT = "Request Timeout", n.REJECTED = "Rejected", n.REDIRECTED = "Redirected", n.UNAVAILABLE = "Unavailable", n.NOT_FOUND = "Not Found", n.ADDRESS_INCOMPLETE = "Address Incomplete", n.INCOMPATIBLE_SDP = "Incompatible SDP", n.BAD_MEDIA_DESCRIPTION = "Bad Media Description", n))(Ee || {});
694
693
  class dt {
695
694
  events;
696
695
  rtcSession;
697
696
  disposers = /* @__PURE__ */ new Set();
698
697
  onReset;
699
698
  constructor(e, { onReset: t }) {
700
- this.events = e, this.onReset = t, e.on(E.FAILED, this.handleEnded), e.on(E.ENDED, this.handleEnded);
699
+ this.events = e, this.onReset = t, e.on(S.FAILED, this.handleEnded), e.on(S.ENDED, this.handleEnded);
701
700
  }
702
701
  get connection() {
703
702
  return this.rtcSession?.connection;
@@ -720,8 +719,8 @@ class dt {
720
719
  directionAudio: c,
721
720
  contentHint: h,
722
721
  offerToReceiveAudio: u = !0,
723
- offerToReceiveVideo: l = !0,
724
- degradationPreference: S,
722
+ offerToReceiveVideo: g = !0,
723
+ degradationPreference: E,
725
724
  sendEncodings: m,
726
725
  onAddedTransceiver: O
727
726
  }) => new Promise((N, y) => {
@@ -738,7 +737,7 @@ class dt {
738
737
  },
739
738
  rtcOfferConstraints: {
740
739
  offerToReceiveAudio: u,
741
- offerToReceiveVideo: l
740
+ offerToReceiveVideo: g
742
741
  },
743
742
  // необходимо передавать в методе call, чтобы подписаться на события peerconnection,
744
743
  // так как в методе call создается RTCSession
@@ -747,7 +746,7 @@ class dt {
747
746
  extraHeaders: r,
748
747
  directionVideo: o,
749
748
  directionAudio: c,
750
- degradationPreference: S,
749
+ degradationPreference: E,
751
750
  sendEncodings: m,
752
751
  onAddedTransceiver: O
753
752
  });
@@ -756,7 +755,7 @@ class dt {
756
755
  const { rtcSession: e } = this;
757
756
  if (e && !e.isEnded())
758
757
  return e.terminateAsync({
759
- cause: Se.CANCELED
758
+ cause: Ee.CANCELED
760
759
  }).finally(() => {
761
760
  this.reset();
762
761
  });
@@ -772,8 +771,8 @@ class dt {
772
771
  offerToReceiveVideo: c,
773
772
  contentHint: h,
774
773
  degradationPreference: u,
775
- sendEncodings: l,
776
- onAddedTransceiver: S
774
+ sendEncodings: g,
775
+ onAddedTransceiver: E
777
776
  }) => new Promise((m, O) => {
778
777
  try {
779
778
  this.rtcSession = e, this.subscribeToSessionEvents(e), this.handleCall().then(m).catch((N) => {
@@ -795,8 +794,8 @@ class dt {
795
794
  directionVideo: r,
796
795
  directionAudio: a,
797
796
  degradationPreference: u,
798
- sendEncodings: l,
799
- onAddedTransceiver: S
797
+ sendEncodings: g,
798
+ onAddedTransceiver: E
800
799
  });
801
800
  } catch (N) {
802
801
  O(N);
@@ -817,27 +816,27 @@ class dt {
817
816
  }
818
817
  handleCall = async () => new Promise((e, t) => {
819
818
  const s = () => {
820
- this.events.on(E.PEER_CONNECTION, h), this.events.on(E.CONFIRMED, u);
819
+ this.events.on(S.PEER_CONNECTION, h), this.events.on(S.CONFIRMED, u);
821
820
  }, i = () => {
822
- this.events.off(E.PEER_CONNECTION, h), this.events.off(E.CONFIRMED, u);
821
+ this.events.off(S.PEER_CONNECTION, h), this.events.off(S.CONFIRMED, u);
823
822
  }, r = () => {
824
- this.events.on(E.FAILED, o), this.events.on(E.ENDED, o);
823
+ this.events.on(S.FAILED, o), this.events.on(S.ENDED, o);
825
824
  }, a = () => {
826
- this.events.off(E.FAILED, o), this.events.off(E.ENDED, o);
827
- }, o = (l) => {
828
- i(), a(), t(l);
825
+ this.events.off(S.FAILED, o), this.events.off(S.ENDED, o);
826
+ }, o = (g) => {
827
+ i(), a(), t(g);
829
828
  };
830
829
  let c;
831
- const h = ({ peerconnection: l }) => {
832
- c = l;
833
- const S = (m) => {
834
- this.events.trigger(E.PEER_CONNECTION_ONTRACK, m);
830
+ const h = ({ peerconnection: g }) => {
831
+ c = g;
832
+ const E = (m) => {
833
+ this.events.trigger(S.PEER_CONNECTION_ONTRACK, m);
835
834
  };
836
- l.addEventListener("track", S), this.disposers.add(() => {
837
- l.removeEventListener("track", S);
835
+ g.addEventListener("track", E), this.disposers.add(() => {
836
+ g.removeEventListener("track", E);
838
837
  });
839
838
  }, u = () => {
840
- c !== void 0 && this.events.trigger(E.PEER_CONNECTION_CONFIRMED, c), i(), a(), e(c);
839
+ c !== void 0 && this.events.trigger(S.PEER_CONNECTION_CONFIRMED, c), i(), a(), e(c);
841
840
  };
842
841
  s(), r();
843
842
  });
@@ -856,7 +855,7 @@ class dt {
856
855
  }
857
856
  handleEnded = (e) => {
858
857
  const { originator: t } = e;
859
- t === "remote" && this.events.trigger(E.ENDED_FROM_SERVER, e), this.reset();
858
+ t === "remote" && this.events.trigger(S.ENDED_FROM_SERVER, e), this.reset();
860
859
  };
861
860
  reset = () => {
862
861
  delete this.rtcSession, this.unsubscribeFromSessionEvents(), this.onReset();
@@ -911,14 +910,14 @@ class ht {
911
910
  return this.connection.addTransceiver(e, t);
912
911
  }
913
912
  }
914
- const Ee = (n) => n.getSettings(), lt = (n, e) => {
915
- const t = Ee(n);
913
+ const Se = (n) => n.getSettings(), lt = (n, e) => {
914
+ const t = Se(n);
916
915
  let s = e;
917
916
  s ??= n.label;
918
917
  let i = t?.msid;
919
918
  return i ??= s, i ??= n.id, i;
920
919
  }, gt = (n, e) => {
921
- const t = Ee(n);
920
+ const t = Se(n);
922
921
  let s = e;
923
922
  return s ??= t?.msid, s ??= n.label, (s && s.length > 0 ? s : void 0) ?? n.id;
924
923
  };
@@ -952,11 +951,11 @@ class Z {
952
951
  }, a.set(r, h)), h.stream.addTrack(e), h.trackIds.add(e.id), this.trackToGroup.set(e.id, { participantId: i, groupId: r });
953
952
  const u = () => {
954
953
  this.disposeTrackListener(e.id);
955
- const l = this.removeTrack(e.id);
956
- l.isRemovedTrack && t?.({
954
+ const g = this.removeTrack(e.id);
955
+ g.isRemovedTrack && t?.({
957
956
  participantId: i,
958
957
  trackId: e.id,
959
- isRemovedStream: l.isRemovedStream
958
+ isRemovedStream: g.isRemovedStream
960
959
  });
961
960
  };
962
961
  return e.addEventListener("ended", u), this.trackDisposers.set(e.id, () => {
@@ -1067,8 +1066,8 @@ class _ {
1067
1066
  this.role = e, this.onRoleChanged?.({ previous: t, next: e });
1068
1067
  }
1069
1068
  }
1070
- const St = "default", Et = "dual", ee = (n) => [...n.getTracks()].some((e) => e.label.includes(Et));
1071
- class Ct {
1069
+ const Et = "default", St = "dual", ee = (n) => [...n.getTracks()].some((e) => e.label.includes(St));
1070
+ class pt {
1072
1071
  mainRemoteStreamsManager;
1073
1072
  recvRemoteStreamsManager;
1074
1073
  constructor(e, t) {
@@ -1086,11 +1085,11 @@ class Ct {
1086
1085
  }
1087
1086
  getRecvRemoteStreamsManagerTools() {
1088
1087
  const e = this.recvRemoteStreamsManager;
1089
- return { manager: e, getRemoteStreams: () => ({ mainStream: e.getStreams(St)[0], contentedStream: void 0 }) };
1088
+ return { manager: e, getRemoteStreams: () => ({ mainStream: e.getStreams(Et)[0], contentedStream: void 0 }) };
1090
1089
  }
1091
1090
  }
1092
1091
  const te = (n) => n.streams[0]?.id;
1093
- class pt {
1092
+ class Ct {
1094
1093
  events;
1095
1094
  callStateMachine;
1096
1095
  isPendingCall = !1;
@@ -1107,7 +1106,7 @@ class pt {
1107
1106
  recvSession;
1108
1107
  disposeRecvSessionTrackListener;
1109
1108
  constructor(e) {
1110
- this.conferenceStateManager = e, this.events = ot(), this.mcuSession = new dt(this.events, { onReset: this.reset }), this.callStateMachine = new it(this.events), this.streamsManagerProvider = new Ct(
1109
+ this.conferenceStateManager = e, this.events = ot(), this.mcuSession = new dt(this.events, { onReset: this.reset }), this.callStateMachine = new it(this.events), this.streamsManagerProvider = new pt(
1111
1110
  this.mainRemoteStreamsManager,
1112
1111
  this.recvRemoteStreamsManager
1113
1112
  ), this.subscribeCallStatusChange(), this.subscribeMcuRemoteTrackEvents();
@@ -1194,17 +1193,17 @@ class pt {
1194
1193
  };
1195
1194
  subscribeCallStatusChange() {
1196
1195
  let { isCallActive: e } = this;
1197
- const { ACCEPTED: t, CONFIRMED: s, ENDED: i, FAILED: r } = E;
1196
+ const { ACCEPTED: t, CONFIRMED: s, ENDED: i, FAILED: r } = S;
1198
1197
  this.onRace([t, s, i, r], () => {
1199
1198
  e = this.maybeTriggerCallStatus(e);
1200
1199
  });
1201
1200
  }
1202
1201
  maybeTriggerCallStatus(e) {
1203
1202
  const t = this.isCallActive;
1204
- return t !== e && this.events.trigger(E.CALL_STATUS_CHANGED, { isCallActive: t }), t;
1203
+ return t !== e && this.events.trigger(S.CALL_STATUS_CHANGED, { isCallActive: t }), t;
1205
1204
  }
1206
1205
  subscribeMcuRemoteTrackEvents() {
1207
- this.on(E.PEER_CONNECTION_ONTRACK, (e) => {
1206
+ this.on(S.PEER_CONNECTION_ONTRACK, (e) => {
1208
1207
  this.addRemoteTrack(this.mainRemoteStreamsManager, e.track, te(e));
1209
1208
  });
1210
1209
  }
@@ -1240,7 +1239,7 @@ class pt {
1240
1239
  this.emitEventChangedRemoteTracks(c, t, { trackId: s, participantId: i }), (a || r) && this.emitEventChangedRemoteStreams(c);
1241
1240
  }
1242
1241
  emitEventChangedRemoteTracks(e, t, { trackId: s, participantId: i }) {
1243
- this.events.trigger(E.REMOTE_TRACKS_CHANGED, {
1242
+ this.events.trigger(S.REMOTE_TRACKS_CHANGED, {
1244
1243
  streams: e,
1245
1244
  changeType: t,
1246
1245
  trackId: s,
@@ -1248,7 +1247,7 @@ class pt {
1248
1247
  });
1249
1248
  }
1250
1249
  emitEventChangedRemoteStreams(e) {
1251
- this.events.trigger(E.REMOTE_STREAMS_CHANGED, { streams: e });
1250
+ this.events.trigger(S.REMOTE_STREAMS_CHANGED, { streams: e });
1252
1251
  }
1253
1252
  getActiveStreamsManagerTools() {
1254
1253
  return this.streamsManagerProvider.getActiveStreamsManagerTools(
@@ -1294,16 +1293,16 @@ const mt = (n, e) => (n.degradationPreference = e.degradationPreference, n), Nt
1294
1293
  for (let t = n.encodings.length; t < e; t += 1)
1295
1294
  n.encodings.push({});
1296
1295
  return n;
1297
- }, Ce = (n) => (e, t) => t !== void 0 && e !== t || t === void 0 && e !== n, Rt = Ce(), At = (n, e) => {
1296
+ }, pe = (n) => (e, t) => t !== void 0 && e !== t || t === void 0 && e !== n, Rt = pe(), At = (n, e) => {
1298
1297
  if (Rt(n, e))
1299
1298
  return n;
1300
1299
  }, It = (n, e) => {
1301
1300
  const t = n.maxBitrate, s = At(e, t);
1302
1301
  return s !== void 0 && (n.maxBitrate = s), n;
1303
- }, pe = 1, ft = Ce(
1304
- pe
1302
+ }, Ce = 1, ft = pe(
1303
+ Ce
1305
1304
  ), vt = (n, e) => {
1306
- const t = n === void 0 ? void 0 : Math.max(n, pe);
1305
+ const t = n === void 0 ? void 0 : Math.max(n, Ce);
1307
1306
  if (t !== void 0 && ft(
1308
1307
  t,
1309
1308
  e
@@ -1736,31 +1735,31 @@ class Ut extends q {
1736
1735
  }
1737
1736
  subscribeCallEvents(e) {
1738
1737
  this.addSubscription(
1739
- e.on(E.START_PRESENTATION, () => {
1738
+ e.on(S.START_PRESENTATION, () => {
1740
1739
  this.send({ type: "SCREEN.STARTING" });
1741
1740
  })
1742
1741
  ), this.addSubscription(
1743
- e.on(E.STARTED_PRESENTATION, () => {
1742
+ e.on(S.STARTED_PRESENTATION, () => {
1744
1743
  this.send({ type: "SCREEN.STARTED" });
1745
1744
  })
1746
1745
  ), this.addSubscription(
1747
- e.on(E.END_PRESENTATION, () => {
1746
+ e.on(S.END_PRESENTATION, () => {
1748
1747
  this.send({ type: "SCREEN.ENDING" });
1749
1748
  })
1750
1749
  ), this.addSubscription(
1751
- e.on(E.ENDED_PRESENTATION, () => {
1750
+ e.on(S.ENDED_PRESENTATION, () => {
1752
1751
  this.send({ type: "SCREEN.ENDED" });
1753
1752
  })
1754
1753
  ), this.addSubscription(
1755
- e.on(E.FAILED_PRESENTATION, (t) => {
1754
+ e.on(S.FAILED_PRESENTATION, (t) => {
1756
1755
  this.send({ type: "SCREEN.FAILED", error: t });
1757
1756
  })
1758
1757
  ), this.addSubscription(
1759
- e.on(E.ENDED, () => {
1758
+ e.on(S.ENDED, () => {
1760
1759
  this.send({ type: "CALL.ENDED" });
1761
1760
  })
1762
1761
  ), this.addSubscription(
1763
- e.on(E.FAILED, (t) => {
1762
+ e.on(S.FAILED, (t) => {
1764
1763
  this.send({ type: "CALL.FAILED", error: t });
1765
1764
  })
1766
1765
  );
@@ -1910,10 +1909,10 @@ class kt {
1910
1909
  degradationPreference: a,
1911
1910
  sendEncodings: o,
1912
1911
  onAddedTransceiver: c
1913
- })).then(this.setMaxBitrate).then(() => s).catch((l) => {
1912
+ })).then(this.setMaxBitrate).then(() => s).catch((g) => {
1914
1913
  this.removeStreamPresentationCurrent();
1915
- const S = l instanceof Error ? l : new Error(String(l));
1916
- throw this.events.trigger(P.FAILED_PRESENTATION, S), l;
1914
+ const E = g instanceof Error ? g : new Error(String(g));
1915
+ throw this.events.trigger(P.FAILED_PRESENTATION, E), g;
1917
1916
  });
1918
1917
  return this.promisePendingStartPresentation = u, u.finally(() => {
1919
1918
  this.promisePendingStartPresentation = void 0;
@@ -2031,7 +2030,7 @@ class Bt {
2031
2030
  return this.data?.register === !0;
2032
2031
  }
2033
2032
  }
2034
- var C = /* @__PURE__ */ ((n) => (n.CONNECTING = "connecting", n.CONNECTED = "connected", n.DISCONNECTED = "disconnected", n.DISCONNECTING = "disconnecting", n.NEW_RTC_SESSION = "newRTCSession", n.REGISTERED = "registered", n.UNREGISTERED = "unregistered", n.REGISTRATION_FAILED = "registrationFailed", n.NEW_MESSAGE = "newMessage", n.SIP_EVENT = "sipEvent", n.CONNECT_STARTED = "connect-started", n.CONNECT_SUCCEEDED = "connect-succeeded", n.CONNECT_FAILED = "connect-failed", n.CONNECT_PARAMETERS_RESOLVE_SUCCESS = "connect-parameters-resolve-success", n.CONNECT_PARAMETERS_RESOLVE_FAILED = "connect-parameters-resolve-failed", n.CONNECTED_WITH_CONFIGURATION = "connected-with-configuration", n))(C || {});
2033
+ var p = /* @__PURE__ */ ((n) => (n.CONNECTING = "connecting", n.CONNECTED = "connected", n.DISCONNECTED = "disconnected", n.DISCONNECTING = "disconnecting", n.NEW_RTC_SESSION = "newRTCSession", n.REGISTERED = "registered", n.UNREGISTERED = "unregistered", n.REGISTRATION_FAILED = "registrationFailed", n.NEW_MESSAGE = "newMessage", n.SIP_EVENT = "sipEvent", n.CONNECT_STARTED = "connect-started", n.CONNECT_SUCCEEDED = "connect-succeeded", n.CONNECT_FAILED = "connect-failed", n.CONNECT_PARAMETERS_RESOLVE_SUCCESS = "connect-parameters-resolve-success", n.CONNECT_PARAMETERS_RESOLVE_FAILED = "connect-parameters-resolve-failed", n.CONNECTED_WITH_CONFIGURATION = "connected-with-configuration", n))(p || {});
2035
2034
  const Re = [
2036
2035
  "connecting",
2037
2036
  "connected",
@@ -2086,13 +2085,13 @@ class xt {
2086
2085
  o ? t(o) : s(new Error("nothing changed"));
2087
2086
  });
2088
2087
  disconnect = async () => {
2089
- this.events.trigger(C.DISCONNECTING, {});
2088
+ this.events.trigger(p.DISCONNECTING, {});
2090
2089
  const e = new Promise((s) => {
2091
- this.events.once(C.DISCONNECTED, () => {
2090
+ this.events.once(p.DISCONNECTED, () => {
2092
2091
  s();
2093
2092
  });
2094
2093
  }), t = this.getUa();
2095
- return t ? t.stop() : this.events.trigger(C.DISCONNECTED, { socket: {}, error: !1 }), e.finally(() => {
2094
+ return t ? t.stop() : this.events.trigger(p.DISCONNECTED, { socket: {}, error: !1 }), e.finally(() => {
2096
2095
  t?.removeAllListeners(), this.setUa(void 0), this.stateMachine.reset();
2097
2096
  });
2098
2097
  };
@@ -2140,15 +2139,15 @@ class xt {
2140
2139
  connectionRecoveryMinInterval: c,
2141
2140
  connectionRecoveryMaxInterval: h,
2142
2141
  userAgent: u,
2143
- displayName: l = "",
2144
- register: S = !1,
2142
+ displayName: g = "",
2143
+ register: E = !1,
2145
2144
  extraHeaders: m = []
2146
2145
  }) => {
2147
2146
  this.stateMachine.startInitUa(), this.setConnectionConfiguration({
2148
2147
  sipServerIp: s,
2149
2148
  sipServerUrl: i,
2150
- displayName: l,
2151
- register: S,
2149
+ displayName: g,
2150
+ register: E,
2152
2151
  user: e,
2153
2152
  password: t
2154
2153
  }), this.getUa() && await this.disconnect();
@@ -2158,8 +2157,8 @@ class xt {
2158
2157
  password: t,
2159
2158
  sipServerIp: s,
2160
2159
  sipServerUrl: i,
2161
- displayName: l,
2162
- register: S,
2160
+ displayName: g,
2161
+ register: E,
2163
2162
  sessionTimers: a,
2164
2163
  registerExpires: o,
2165
2164
  connectionRecoveryMinInterval: c,
@@ -2182,11 +2181,11 @@ class xt {
2182
2181
  i = ((c, h) => {
2183
2182
  if (this.getConnectionConfiguration()?.register === !0)
2184
2183
  return this.registrationManager.subscribeToStartEvents(c, h);
2185
- const l = C.CONNECTED, S = [C.DISCONNECTED];
2186
- return this.events.on(l, c), S.forEach((m) => {
2184
+ const g = p.CONNECTED, E = [p.DISCONNECTED];
2185
+ return this.events.on(g, c), E.forEach((m) => {
2187
2186
  this.events.on(m, h);
2188
2187
  }), () => {
2189
- this.events.off(l, c), S.forEach((m) => {
2188
+ this.events.off(g, c), E.forEach((m) => {
2190
2189
  this.events.off(m, h);
2191
2190
  });
2192
2191
  };
@@ -2200,9 +2199,9 @@ class xt {
2200
2199
  this.cancelableConnectWithRepeatedCalls?.cancel();
2201
2200
  }
2202
2201
  proxyEvents() {
2203
- this.events.on(C.CONNECTED, () => {
2202
+ this.events.on(p.CONNECTED, () => {
2204
2203
  const e = this.getConnectionConfiguration(), t = this.getUa();
2205
- e !== void 0 && t !== void 0 && this.events.trigger(C.CONNECTED_WITH_CONFIGURATION, {
2204
+ e !== void 0 && t !== void 0 && this.events.trigger(p.CONNECTED_WITH_CONFIGURATION, {
2206
2205
  ...e,
2207
2206
  ua: t
2208
2207
  });
@@ -2770,13 +2769,13 @@ class zt {
2770
2769
  async register() {
2771
2770
  const e = this.getUaProtected();
2772
2771
  return new Promise((t, s) => {
2773
- e.on(C.REGISTERED, t), e.on(C.REGISTRATION_FAILED, s), e.register();
2772
+ e.on(p.REGISTERED, t), e.on(p.REGISTRATION_FAILED, s), e.register();
2774
2773
  });
2775
2774
  }
2776
2775
  async unregister() {
2777
2776
  const e = this.getUaProtected();
2778
2777
  return new Promise((t) => {
2779
- e.on(C.UNREGISTERED, t), e.unregister();
2778
+ e.on(p.UNREGISTERED, t), e.unregister();
2780
2779
  });
2781
2780
  }
2782
2781
  async tryRegister() {
@@ -2788,7 +2787,7 @@ class zt {
2788
2787
  return this.register();
2789
2788
  }
2790
2789
  subscribeToStartEvents(e, t) {
2791
- const s = C.REGISTERED, i = [C.REGISTRATION_FAILED, C.DISCONNECTED];
2790
+ const s = p.REGISTERED, i = [p.REGISTRATION_FAILED, p.DISCONNECTED];
2792
2791
  return this.events.on(s, e), i.forEach((r) => {
2793
2792
  this.events.on(r, t);
2794
2793
  }), () => {
@@ -2849,17 +2848,17 @@ class Kt {
2849
2848
  displayName: t,
2850
2849
  userAgent: e,
2851
2850
  sipServerIp: s
2852
- }), u = this.uaFactory.createUA({ ...h, remoteAddress: r, extraHeaders: a }), l = () => {
2851
+ }), u = this.uaFactory.createUA({ ...h, remoteAddress: r, extraHeaders: a }), g = () => {
2853
2852
  const m = new Error("Telephony is not available");
2854
2853
  c(m);
2855
2854
  };
2856
- u.once(C.DISCONNECTED, l);
2857
- const S = () => {
2858
- u.removeAllListeners(), u.once(C.DISCONNECTED, () => {
2855
+ u.once(p.DISCONNECTED, g);
2856
+ const E = () => {
2857
+ u.removeAllListeners(), u.once(p.DISCONNECTED, () => {
2859
2858
  o();
2860
2859
  }), u.stop();
2861
2860
  };
2862
- u.once(C.CONNECTED, S), u.start();
2861
+ u.once(p.CONNECTED, E), u.start();
2863
2862
  });
2864
2863
  }
2865
2864
  }
@@ -2910,7 +2909,7 @@ class w {
2910
2909
  // 5 minutes in sec
2911
2910
  connectionRecoveryMinInterval: h = 2,
2912
2911
  connectionRecoveryMaxInterval: u = 6,
2913
- userAgent: l
2912
+ userAgent: g
2914
2913
  }) {
2915
2914
  w.validateParametersConnection({
2916
2915
  register: a,
@@ -2919,14 +2918,14 @@ class w {
2919
2918
  sipServerIp: r,
2920
2919
  sipServerUrl: s
2921
2920
  });
2922
- const S = w.resolveAuthorizationUser(a, e), m = qt(r), O = m(S), N = new this.JsSIP.WebSocketInterface(`wss://${s}/webrtc/wss/`);
2921
+ const E = w.resolveAuthorizationUser(a, e), m = qt(r), O = m(E), N = new this.JsSIP.WebSocketInterface(`wss://${s}/webrtc/wss/`);
2923
2922
  return {
2924
2923
  configuration: {
2925
2924
  password: t,
2926
2925
  register: a,
2927
2926
  uri: O,
2928
2927
  display_name: Ie(i),
2929
- user_agent: l,
2928
+ user_agent: g,
2930
2929
  sdpSemantics: "unified-plan",
2931
2930
  sockets: [N],
2932
2931
  session_timers: o,
@@ -3095,13 +3094,13 @@ class nn {
3095
3094
  });
3096
3095
  });
3097
3096
  };
3098
- processConnect = async (e, t) => (this.events.trigger(C.CONNECT_STARTED, {}), tn(e).then((s) => (this.events.trigger(C.CONNECT_PARAMETERS_RESOLVE_SUCCESS, s), s)).catch((s) => {
3099
- throw this.events.trigger(C.CONNECT_PARAMETERS_RESOLVE_FAILED, s), s;
3100
- }).then(async (s) => this.connectionFlow.connect(s, t)).then((s) => (this.events.trigger(C.CONNECT_SUCCEEDED, {
3097
+ processConnect = async (e, t) => (this.events.trigger(p.CONNECT_STARTED, {}), tn(e).then((s) => (this.events.trigger(p.CONNECT_PARAMETERS_RESOLVE_SUCCESS, s), s)).catch((s) => {
3098
+ throw this.events.trigger(p.CONNECT_PARAMETERS_RESOLVE_FAILED, s), s;
3099
+ }).then(async (s) => this.connectionFlow.connect(s, t)).then((s) => (this.events.trigger(p.CONNECT_SUCCEEDED, {
3101
3100
  ...s
3102
3101
  }), s)).catch((s) => {
3103
3102
  const i = s ?? new Error("Failed to connect to server");
3104
- throw this.events.trigger(C.CONNECT_FAILED, i), i;
3103
+ throw this.events.trigger(p.CONNECT_FAILED, i), i;
3105
3104
  }));
3106
3105
  }
3107
3106
  class sn {
@@ -3311,12 +3310,12 @@ class un {
3311
3310
  this.isRegistrationFailed = !1;
3312
3311
  }
3313
3312
  }
3314
- const Tn = 3e3, Sn = 15e3, se = {
3313
+ const Tn = 3e3, En = 15e3, se = {
3315
3314
  LIMIT_REACHED: "Limit reached",
3316
3315
  FAILED_TO_RECONNECT: "Failed to reconnect"
3317
- }, En = async () => {
3318
- }, Cn = (n) => !0;
3319
- class pn {
3316
+ }, Sn = async () => {
3317
+ }, pn = (n) => !0;
3318
+ class Cn {
3320
3319
  events;
3321
3320
  connectionManager;
3322
3321
  connectionQueueManager;
@@ -3336,10 +3335,10 @@ class pn {
3336
3335
  connectionManager: t,
3337
3336
  callManager: s
3338
3337
  }, i) {
3339
- const r = i?.onBeforeRetry ?? En, a = i?.canRetryOnError ?? Cn;
3338
+ const r = i?.onBeforeRetry ?? Sn, a = i?.canRetryOnError ?? pn;
3340
3339
  this.connectionQueueManager = e, this.connectionManager = t, this.onBeforeRetry = r, this.canRetryOnError = a, this.networkInterfacesSubscriber = i?.networkInterfacesSubscriber, this.resumeFromSleepModeSubscriber = i?.resumeFromSleepModeSubscriber, this.events = cn(), this.checkTelephonyRequester = new on({
3341
3340
  connectionManager: t,
3342
- interval: i?.checkTelephonyRequestInterval ?? Sn
3341
+ interval: i?.checkTelephonyRequestInterval ?? En
3343
3342
  }), this.pingServerIfNotActiveCallRequester = new gn({
3344
3343
  connectionManager: t,
3345
3344
  callManager: s
@@ -3969,15 +3968,15 @@ class fn extends q {
3969
3968
  }
3970
3969
  subscribeConnectionEvents(e) {
3971
3970
  this.addSubscription(
3972
- e.on(C.DISCONNECTED, () => {
3971
+ e.on(p.DISCONNECTED, () => {
3973
3972
  this.toClearIncoming();
3974
3973
  })
3975
3974
  ), this.addSubscription(
3976
- e.on(C.REGISTRATION_FAILED, () => {
3975
+ e.on(p.REGISTRATION_FAILED, () => {
3977
3976
  this.toClearIncoming();
3978
3977
  })
3979
3978
  ), this.addSubscription(
3980
- e.on(C.CONNECT_FAILED, () => {
3979
+ e.on(p.CONNECT_FAILED, () => {
3981
3980
  this.toClearIncoming();
3982
3981
  })
3983
3982
  );
@@ -4146,7 +4145,7 @@ class bn {
4146
4145
  };
4147
4146
  }
4148
4147
  const L = 1e3;
4149
- var p = /* @__PURE__ */ ((n) => (n.INBOUND_RTP = "inbound-rtp", n.REMOTE_OUTBOUND_RTP = "remote-outbound-rtp", n.MEDIA_SOURCE = "media-source", n.OUTBOUND_RTP = "outbound-rtp", n.REMOTE_INBOUND_RTP = "remote-inbound-rtp", n.CODEC = "codec", n.CANDIDATE_PAIR = "candidate-pair", n.CERTIFICATE = "certificate", n.TRANSPORT = "transport", n.LOCAL_CANDIDATE = "local-candidate", n.REMOTE_CANDIDATE = "remote-candidate", n))(p || {});
4148
+ var C = /* @__PURE__ */ ((n) => (n.INBOUND_RTP = "inbound-rtp", n.REMOTE_OUTBOUND_RTP = "remote-outbound-rtp", n.MEDIA_SOURCE = "media-source", n.OUTBOUND_RTP = "outbound-rtp", n.REMOTE_INBOUND_RTP = "remote-inbound-rtp", n.CODEC = "codec", n.CANDIDATE_PAIR = "candidate-pair", n.CERTIFICATE = "certificate", n.TRANSPORT = "transport", n.LOCAL_CANDIDATE = "local-candidate", n.REMOTE_CANDIDATE = "remote-candidate", n))(C || {});
4150
4149
  const De = ["collected"], Dn = () => new A(De), yn = "api/v2/rtp2webrtc/offer", wn = async ({
4151
4150
  serverUrl: n,
4152
4151
  conferenceNumber: e,
@@ -4192,10 +4191,10 @@ const De = ["collected"], Dn = () => new A(De), yn = "api/v2/rtp2webrtc/offer",
4192
4191
  };
4193
4192
  const e = F(n);
4194
4193
  return {
4195
- outboundRtp: e[p.OUTBOUND_RTP],
4196
- codec: e[p.CODEC],
4197
- mediaSource: e[p.MEDIA_SOURCE],
4198
- remoteInboundRtp: e[p.REMOTE_INBOUND_RTP]
4194
+ outboundRtp: e[C.OUTBOUND_RTP],
4195
+ codec: e[C.CODEC],
4196
+ mediaSource: e[C.MEDIA_SOURCE],
4197
+ remoteInboundRtp: e[C.REMOTE_INBOUND_RTP]
4199
4198
  };
4200
4199
  }, ae = (n) => {
4201
4200
  if (!n)
@@ -4207,10 +4206,10 @@ const De = ["collected"], Dn = () => new A(De), yn = "api/v2/rtp2webrtc/offer",
4207
4206
  };
4208
4207
  const e = F(n);
4209
4208
  return {
4210
- outboundRtp: e[p.OUTBOUND_RTP],
4211
- codec: e[p.CODEC],
4212
- mediaSource: e[p.MEDIA_SOURCE],
4213
- remoteInboundRtp: e[p.REMOTE_INBOUND_RTP]
4209
+ outboundRtp: e[C.OUTBOUND_RTP],
4210
+ codec: e[C.CODEC],
4211
+ mediaSource: e[C.MEDIA_SOURCE],
4212
+ remoteInboundRtp: e[C.REMOTE_INBOUND_RTP]
4214
4213
  };
4215
4214
  }, oe = ({
4216
4215
  videoReceiversStats: n,
@@ -4224,8 +4223,8 @@ const De = ["collected"], Dn = () => new A(De), yn = "api/v2/rtp2webrtc/offer",
4224
4223
  };
4225
4224
  const t = F(n);
4226
4225
  return {
4227
- inboundRtp: t[p.INBOUND_RTP],
4228
- codec: t[p.CODEC],
4226
+ inboundRtp: t[C.INBOUND_RTP],
4227
+ codec: t[C.CODEC],
4229
4228
  synchronizationSources: e
4230
4229
  };
4231
4230
  }, Un = ({
@@ -4241,9 +4240,9 @@ const De = ["collected"], Dn = () => new A(De), yn = "api/v2/rtp2webrtc/offer",
4241
4240
  };
4242
4241
  const t = F(n);
4243
4242
  return {
4244
- inboundRtp: t[p.INBOUND_RTP],
4245
- codec: t[p.CODEC],
4246
- remoteOutboundRtp: t[p.REMOTE_OUTBOUND_RTP],
4243
+ inboundRtp: t[C.INBOUND_RTP],
4244
+ codec: t[C.CODEC],
4245
+ remoteOutboundRtp: t[C.REMOTE_OUTBOUND_RTP],
4247
4246
  synchronizationSources: e
4248
4247
  };
4249
4248
  }, ye = (n) => {
@@ -4257,11 +4256,11 @@ const De = ["collected"], Dn = () => new A(De), yn = "api/v2/rtp2webrtc/offer",
4257
4256
  };
4258
4257
  const e = F(n);
4259
4258
  return {
4260
- candidatePair: e[p.CANDIDATE_PAIR],
4261
- certificate: e[p.CERTIFICATE],
4262
- localCandidate: e[p.LOCAL_CANDIDATE],
4263
- remoteCandidate: e[p.REMOTE_CANDIDATE],
4264
- transport: e[p.TRANSPORT]
4259
+ candidatePair: e[C.CANDIDATE_PAIR],
4260
+ certificate: e[C.CERTIFICATE],
4261
+ localCandidate: e[C.LOCAL_CANDIDATE],
4262
+ remoteCandidate: e[C.REMOTE_CANDIDATE],
4263
+ transport: e[C.TRANSPORT]
4265
4264
  };
4266
4265
  }, Fn = ({
4267
4266
  audioSenderStats: n,
@@ -4319,13 +4318,13 @@ const De = ["collected"], Dn = () => new A(De), yn = "api/v2/rtp2webrtc/offer",
4319
4318
  inbound: c
4320
4319
  };
4321
4320
  }, Gn = async (n) => {
4322
- const e = "audio", t = "video", s = n.getSenders(), i = s.find((S) => S.track?.kind === e), r = s.filter((S) => S.track?.kind === t), a = n.getReceivers(), o = a.find((S) => S.track.kind === e), c = a.filter((S) => S.track.kind === t), h = {
4321
+ const e = "audio", t = "video", s = n.getSenders(), i = s.find((E) => E.track?.kind === e), r = s.filter((E) => E.track?.kind === t), a = n.getReceivers(), o = a.find((E) => E.track.kind === e), c = a.filter((E) => E.track.kind === t), h = {
4323
4322
  trackIdentifier: o?.track.id,
4324
4323
  item: o?.getSynchronizationSources()[0]
4325
4324
  }, u = {
4326
4325
  trackIdentifier: c[0]?.track.id,
4327
4326
  item: c[0]?.getSynchronizationSources()[0]
4328
- }, l = {
4327
+ }, g = {
4329
4328
  audio: h,
4330
4329
  video: u
4331
4330
  };
@@ -4336,7 +4335,7 @@ const De = ["collected"], Dn = () => new A(De), yn = "api/v2/rtp2webrtc/offer",
4336
4335
  o?.getStats() ?? Promise.resolve(void 0),
4337
4336
  c[0]?.getStats() ?? Promise.resolve(void 0),
4338
4337
  c[1]?.getStats() ?? Promise.resolve(void 0)
4339
- ]).then((S) => {
4338
+ ]).then((E) => {
4340
4339
  const [
4341
4340
  m,
4342
4341
  O,
@@ -4344,9 +4343,9 @@ const De = ["collected"], Dn = () => new A(De), yn = "api/v2/rtp2webrtc/offer",
4344
4343
  y,
4345
4344
  H,
4346
4345
  Ge
4347
- ] = S;
4346
+ ] = E;
4348
4347
  return {
4349
- synchronizationSources: l,
4348
+ synchronizationSources: g,
4350
4349
  audioSenderStats: m,
4351
4350
  videoSenderFirstStats: O,
4352
4351
  videoSenderSecondStats: N,
@@ -4691,11 +4690,11 @@ class ds {
4691
4690
  }, h = cs({
4692
4691
  videoTrack: a,
4693
4692
  targetSize: c
4694
- }), u = ce(c.width, o), l = {
4693
+ }), u = ce(c.width, o), g = {
4695
4694
  scaleResolutionDownBy: h,
4696
4695
  maxBitrate: u
4697
4696
  };
4698
- return this.parametersSetter.setEncodingsToSender(r, l);
4697
+ return this.parametersSetter.setEncodingsToSender(r, g);
4699
4698
  }
4700
4699
  }
4701
4700
  const hs = (n) => n.find((e) => e.track?.kind === "video");
@@ -4860,8 +4859,8 @@ const Fe = [
4860
4859
  "balancing-started",
4861
4860
  "balancing-stopped",
4862
4861
  "parameters-updated"
4863
- ], Ss = () => new A(Fe);
4864
- class Es {
4862
+ ], Es = () => new A(Fe);
4863
+ class Ss {
4865
4864
  isBalancingActive = !1;
4866
4865
  events;
4867
4866
  callManager;
@@ -4869,7 +4868,7 @@ class Es {
4869
4868
  videoSendingBalancer;
4870
4869
  startBalancingTimer;
4871
4870
  constructor(e, t, s = {}) {
4872
- this.events = Ss(), this.callManager = e, this.balancingStartDelay = s.balancingStartDelay ?? 1e4, this.videoSendingBalancer = new Ts(
4871
+ this.events = Es(), this.callManager = e, this.balancingStartDelay = s.balancingStartDelay ?? 1e4, this.videoSendingBalancer = new Ts(
4873
4872
  t,
4874
4873
  () => e.connection,
4875
4874
  {
@@ -4939,13 +4938,13 @@ class Es {
4939
4938
  this.startBalancingTimer && (clearTimeout(this.startBalancingTimer), this.startBalancingTimer = void 0);
4940
4939
  }
4941
4940
  }
4942
- const ke = "no-inbound-frames", Be = [ke], Cs = () => new A(Be);
4943
- class ps {
4941
+ const ke = "no-inbound-frames", Be = [ke], ps = () => new A(Be);
4942
+ class Cs {
4944
4943
  events;
4945
4944
  statsManager;
4946
4945
  callManager;
4947
4946
  constructor(e, t) {
4948
- this.statsManager = e, this.callManager = t, this.events = Cs(), this.subscribe();
4947
+ this.statsManager = e, this.callManager = t, this.events = ps(), this.subscribe();
4949
4948
  }
4950
4949
  get mainVideoTrack() {
4951
4950
  return this.callManager.getMainRemoteStream()?.getVideoTracks()[0];
@@ -5042,7 +5041,7 @@ class Js {
5042
5041
  } = {}) {
5043
5042
  this.preferredMimeTypesVideoCodecs = t, this.excludeMimeTypesVideoCodecs = s, this.events = Us(), this.connectionManager = new nn({ JsSIP: e }), this.connectionQueueManager = new sn({
5044
5043
  connectionManager: this.connectionManager
5045
- }), this.conferenceStateManager = new Nn(), this.callManager = new pt(this.conferenceStateManager), this.apiManager = new tt({
5044
+ }), this.conferenceStateManager = new Nn(), this.callManager = new Ct(this.conferenceStateManager), this.apiManager = new tt({
5046
5045
  connectionManager: this.connectionManager,
5047
5046
  callManager: this.callManager
5048
5047
  }), this.incomingCallManager = new _n(this.connectionManager), this.presentationManager = new kt({
@@ -5051,18 +5050,18 @@ class Js {
5051
5050
  }), this.statsManager = new Vn({
5052
5051
  callManager: this.callManager,
5053
5052
  apiManager: this.apiManager
5054
- }), this.autoConnectorManager = new pn(
5053
+ }), this.autoConnectorManager = new Cn(
5055
5054
  {
5056
5055
  connectionQueueManager: this.connectionQueueManager,
5057
5056
  connectionManager: this.connectionManager,
5058
5057
  callManager: this.callManager
5059
5058
  },
5060
5059
  r
5061
- ), this.videoSendingBalancerManager = new Es(
5060
+ ), this.videoSendingBalancerManager = new Ss(
5062
5061
  this.callManager,
5063
5062
  this.apiManager,
5064
5063
  i
5065
- ), this.mainStreamHealthMonitor = new ps(this.statsManager, this.callManager), this.mainStreamRecovery = new Ns(this.callManager), this.sessionManager = new bn({
5064
+ ), this.mainStreamHealthMonitor = new Cs(this.statsManager, this.callManager), this.mainStreamRecovery = new Ns(this.callManager), this.sessionManager = new bn({
5066
5065
  connectionManager: this.connectionManager,
5067
5066
  callManager: this.callManager,
5068
5067
  incomingCallManager: this.incomingCallManager,
@@ -5263,16 +5262,16 @@ class Js {
5263
5262
  this.callManager.setCallRoleSpectatorSynthetic(), this.mayBeStopPresentationAndNotify();
5264
5263
  }), this.apiManager.on("participant:move-request-to-spectators-with-audio-id", ({ audioId: e }) => {
5265
5264
  this.callManager.setCallRoleSpectator({ audioId: e, sendOffer: this.sendOffer }), this.mayBeStopPresentationAndNotify();
5266
- }), this.apiManager.on("mustStopPresentation", () => {
5265
+ }), this.apiManager.on("presentation:must-stop", () => {
5267
5266
  this.mayBeStopPresentationAndNotify();
5268
- }), this.apiManager.on("enterRoom", ({ room: e, participantName: t }) => {
5267
+ }), this.apiManager.on("enter-room", ({ room: e, participantName: t }) => {
5269
5268
  this.conferenceStateManager.updateState({ room: e, participantName: t });
5270
5269
  }), this.apiManager.on(
5271
5270
  "conference:participant-token-issued",
5272
5271
  ({ jwt: e, conference: t, participant: s }) => {
5273
5272
  this.conferenceStateManager.updateState({ token: e, conference: t, participant: s });
5274
5273
  }
5275
- ), this.apiManager.on("channels", (e) => {
5274
+ ), this.apiManager.on("channels:all", (e) => {
5276
5275
  this.conferenceStateManager.updateState({ channels: e });
5277
5276
  });
5278
5277
  }
@@ -5316,7 +5315,7 @@ class Js {
5316
5315
  };
5317
5316
  }
5318
5317
  export {
5319
- Se as E,
5318
+ Ee as E,
5320
5319
  rt as O,
5321
5320
  Js as S,
5322
5321
  Qt as a,
@@ -5329,7 +5328,7 @@ export {
5329
5328
  Zt as h,
5330
5329
  Qs as i,
5331
5330
  Xs as j,
5332
- p as k,
5331
+ C as k,
5333
5332
  d as l,
5334
5333
  qn as m,
5335
5334
  Kn as n,