@vkontakte/calls-sdk 2.8.12-beta.0 → 2.8.12-beta.2

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/calls-sdk.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * @vkontakte/calls-sdk v2.8.12-beta.0
3
- * Thu, 23 Jul 2026 09:58:50 GMT
2
+ * @vkontakte/calls-sdk v2.8.12-beta.2
3
+ * Mon, 27 Jul 2026 10:20:34 GMT
4
4
  * https://calls-sdk.cdn-vk.ru/doc/latest/index.html
5
5
  */
6
6
 
@@ -2159,7 +2159,7 @@ var mn = pn.getInstance(), M = class e {
2159
2159
  return 1.1;
2160
2160
  }
2161
2161
  static get sdkVersion() {
2162
- return "2.8.12-beta.0";
2162
+ return "2.8.12-beta.2";
2163
2163
  }
2164
2164
  static get debug() {
2165
2165
  return e._params.debug;
@@ -3151,6 +3151,7 @@ var L = gn, _n = /* @__PURE__ */ function(e) {
3151
3151
  setConversationId(e) {
3152
3152
  n = e, t && Ne(n, t);
3153
3153
  },
3154
+ send: (e, ...t) => u(e, t, i),
3154
3155
  debug: (...e) => u("DEBUG", e, i),
3155
3156
  log: (...e) => u("LOG", e, i),
3156
3157
  warn: (...e) => u("WARN", e, i),
@@ -8752,6 +8753,14 @@ var Eo = class {
8752
8753
  static debugSessionId() {
8753
8754
  return e.current()?.debugSessionId ?? null;
8754
8755
  }
8756
+ static debugMessage(t, ...n) {
8757
+ let r = e.current();
8758
+ return r ? (r._debug.send(t, ...n), !0) : !1;
8759
+ }
8760
+ static debugMessageWithContext(e, t, ...n) {
8761
+ let r = z.get(t);
8762
+ return r ? (r._debug.send(e, ...n), !0) : !1;
8763
+ }
8755
8764
  static getSyncedTime() {
8756
8765
  return Date.now() + (e.current()?._serverTimeOffset ?? 0);
8757
8766
  }
@@ -11964,10 +11973,10 @@ async function Cs(e, t) {
11964
11973
  return e && (M.authToken = e), t !== void 0 && M.apiBaseUrl !== t && (M.apiBaseUrl = t, Uo()), $.authorize();
11965
11974
  }
11966
11975
  async function ws(e = [x.AUDIO], t) {
11967
- return Kc(t).accept(e);
11976
+ return qc(t).accept(e);
11968
11977
  }
11969
11978
  async function Ts(e) {
11970
- let t = Gc(e);
11979
+ let t = Kc(e);
11971
11980
  if (t) return t.decline();
11972
11981
  }
11973
11982
  async function Es(e, t = [x.AUDIO]) {
@@ -11993,7 +12002,7 @@ async function Os(e, t = [x.AUDIO], n, r, i, a) {
11993
12002
  });
11994
12003
  }
11995
12004
  async function ks(e) {
11996
- let t = Gc(e);
12005
+ let t = Kc(e);
11997
12006
  if (t) return t.hangup();
11998
12007
  Q.hangupAfterInit();
11999
12008
  }
@@ -12039,7 +12048,7 @@ async function Fs(e, t) {
12039
12048
  captureScreen: e,
12040
12049
  fastScreenSharing: !1,
12041
12050
  captureAudio: !1
12042
- }, r = Gc(t);
12051
+ }, r = Kc(t);
12043
12052
  return r ? r.toggleScreenCapturing(n) : Promise.reject();
12044
12053
  }
12045
12054
  function Is(e) {
@@ -12051,11 +12060,11 @@ async function Ls(e, t = !1) {
12051
12060
  n && await n.setVideoStream(e, t);
12052
12061
  }
12053
12062
  async function Rs(e, t) {
12054
- let n = Gc(t);
12063
+ let n = Kc(t);
12055
12064
  n && await n.toggleLocalVideo(e);
12056
12065
  }
12057
12066
  async function zs(e, t) {
12058
- let n = Gc(t);
12067
+ let n = Kc(t);
12059
12068
  n && await n.toggleLocalAudio(e);
12060
12069
  }
12061
12070
  async function Bs(e) {
@@ -12294,9 +12303,12 @@ function Ec(t) {
12294
12303
  e.disableLog(!t), R.toggle(t);
12295
12304
  }
12296
12305
  function Dc(e, ...t) {
12297
- M.debugLog && R.send(e, "[external]", ...t);
12306
+ M.debugLog && (Q.debugMessage(e, "[external]", ...t) || R.send(e, "[external]", ...t));
12307
+ }
12308
+ function Oc(e, t, ...n) {
12309
+ M.debugLog && (Q.debugMessageWithContext(e, t, "[external]", ...n) || R.send(e, "[external]", ...n));
12298
12310
  }
12299
- var Oc = {
12311
+ var kc = {
12300
12312
  list: Pe,
12301
12313
  get: Fe,
12302
12314
  getJson: Ie,
@@ -12304,7 +12316,7 @@ var Oc = {
12304
12316
  clear: Re,
12305
12317
  stats: ze
12306
12318
  };
12307
- function kc() {
12319
+ function Ac() {
12308
12320
  let e = [
12309
12321
  [`Calls SDK ${M.sdkVersion}`, M.toJSON()],
12310
12322
  ["UserAgent:", navigator.userAgent],
@@ -12321,31 +12333,31 @@ function kc() {
12321
12333
  d: e
12322
12334
  }));
12323
12335
  }
12324
- async function Ac() {
12336
+ async function jc() {
12325
12337
  let e = Q.id(), t = Q.debugSessionId();
12326
12338
  if (!t || !e) throw R.error("[uploadDebugLogs]", "No conversation id found"), Error("No conversation id found");
12327
12339
  let n = await Fe({ sessionId: t });
12328
12340
  if (n.length === 0) throw R.error("[uploadDebugLogs]", "No logs found"), Error("No logs found");
12329
12341
  let r = n[0].t, i = n[n.length - 1].t;
12330
12342
  try {
12331
- return $?.uploadDebugLogs(e, r, i, JSON.stringify([...kc(), ...n]));
12343
+ return $?.uploadDebugLogs(e, r, i, JSON.stringify([...Ac(), ...n]));
12332
12344
  } catch (e) {
12333
12345
  throw R.error("[uploadDebugLogs]", "Error while uploading logs", e), Error("Error while uploading logs", { cause: e });
12334
12346
  }
12335
12347
  }
12336
- async function jc(e) {
12348
+ async function Mc(e) {
12337
12349
  let t = Q.current();
12338
12350
  if (t) return t.videoEffect(e);
12339
12351
  }
12340
- async function Mc(e, t) {
12352
+ async function Nc(e, t) {
12341
12353
  let n = Q.current();
12342
12354
  if (n) return n.audioEffect(e.length > 0 ? e : null, t);
12343
12355
  }
12344
- async function Nc(e) {
12356
+ async function Pc(e) {
12345
12357
  let t = Q.current();
12346
12358
  t && await t.setAudioStream(e);
12347
12359
  }
12348
- async function Pc(e, t = null, n = null) {
12360
+ async function Fc(e, t = null, n = null) {
12349
12361
  let r = Q.current();
12350
12362
  if (!r) return;
12351
12363
  let i = n ?? t?.id, a = null;
@@ -12356,18 +12368,18 @@ async function Pc(e, t = null, n = null) {
12356
12368
  }
12357
12369
  r.setAnimojiSvg(e, a, i);
12358
12370
  }
12359
- function Fc(e) {
12371
+ function Ic(e) {
12360
12372
  let t = Q.current();
12361
12373
  t && t.setAnimojiFill(e);
12362
12374
  }
12363
- async function Ic(e = null, t, n = !1) {
12364
- return Kc().getWaitingHall(e, t, n);
12375
+ async function Lc(e = null, t, n = !1) {
12376
+ return qc().getWaitingHall(e, t, n);
12365
12377
  }
12366
- async function Lc() {
12367
- return Kc().getAudienceModeHands();
12378
+ async function Rc() {
12379
+ return qc().getAudienceModeHands();
12368
12380
  }
12369
- async function Rc(e, t = !1) {
12370
- let n = Kc(), r;
12381
+ async function zc(e, t = !1) {
12382
+ let n = qc(), r;
12371
12383
  if (e) {
12372
12384
  let t = $.getCachedRawOkIdByExternalId(e);
12373
12385
  if (!t) {
@@ -12378,67 +12390,67 @@ async function Rc(e, t = !1) {
12378
12390
  }
12379
12391
  return n.promoteParticipant(r, t);
12380
12392
  }
12381
- async function zc(e = !1) {
12382
- return Kc().requestPromotion(e);
12383
- }
12384
12393
  async function Bc(e = !1) {
12385
- return Kc().acceptPromotion(e);
12394
+ return qc().requestPromotion(e);
12386
12395
  }
12387
- async function Vc(e) {
12388
- return Kc().getParticipantListChunk(e);
12396
+ async function Vc(e = !1) {
12397
+ return qc().acceptPromotion(e);
12389
12398
  }
12390
12399
  async function Hc(e) {
12391
- return Kc().getParticipants(e);
12400
+ return qc().getParticipantListChunk(e);
12392
12401
  }
12393
12402
  async function Uc(e) {
12394
- return Kc().feedback(e);
12403
+ return qc().getParticipants(e);
12395
12404
  }
12396
- async function Wc(e, t, n) {
12397
- return Kc(n).enableFeatureForRoles(e, t);
12405
+ async function Wc(e) {
12406
+ return qc().feedback(e);
12398
12407
  }
12399
- function Gc(e) {
12400
- return e ? z.get(e) ?? null : Q.current() ?? z.getFirst();
12408
+ async function Gc(e, t, n) {
12409
+ return qc(n).enableFeatureForRoles(e, t);
12401
12410
  }
12402
12411
  function Kc(e) {
12403
- let t = Gc(e);
12412
+ return e ? z.get(e) ?? null : Q.current() ?? z.getFirst();
12413
+ }
12414
+ function qc(e) {
12415
+ let t = Kc(e);
12404
12416
  if (!t) throw Error("Conversation not found");
12405
12417
  return t;
12406
12418
  }
12407
- async function qc(e) {
12419
+ async function Jc(e) {
12408
12420
  await $.removeHistoryRecords(e);
12409
12421
  }
12410
- async function Jc(e) {
12422
+ async function Yc(e) {
12411
12423
  let t = Q.current() ?? z.getFirst();
12412
12424
  t && await t.startAsr(e);
12413
12425
  }
12414
- async function Yc(e) {
12426
+ async function Xc(e) {
12415
12427
  let t = Q.current() ?? z.getFirst();
12416
12428
  t && await t.stopAsr(e);
12417
12429
  }
12418
- async function Xc(e) {
12430
+ async function Zc(e) {
12419
12431
  let t = Q.current() ?? z.getFirst();
12420
12432
  t && await t.requestAsr(e);
12421
12433
  }
12422
- async function Zc(e) {
12434
+ async function Qc(e) {
12423
12435
  let t = Q.current();
12424
12436
  return t ? t.startUrlSharing(e) : Promise.reject();
12425
12437
  }
12426
- async function Qc() {
12438
+ async function $c() {
12427
12439
  let e = Q.current();
12428
12440
  return e ? e.stopUrlSharing() : Promise.reject();
12429
12441
  }
12430
- async function $c(e) {
12442
+ async function el(e) {
12431
12443
  await z.switchCall(e);
12432
12444
  }
12433
- function el() {
12445
+ function tl() {
12434
12446
  return z.getActiveId();
12435
12447
  }
12436
- function tl() {
12448
+ function nl() {
12437
12449
  return Q.getSyncedTime();
12438
12450
  }
12439
- function nl() {
12451
+ function rl() {
12440
12452
  return M.sdkVersion;
12441
12453
  }
12442
12454
  typeof window < "u" && (window.__CALLS_SDK = mn);
12443
12455
  //#endregion
12444
- export { rs as Api, ls as ApiExternal, cs as ArrayDequeue, v as AuthData, f as BaseLogger, Aa as CallDirection, ja as CallType, Ma as ChatRoomEventType, Na as ConversationFeature, Pa as ConversationOption, _n as DebugMessageType, Ga as ExternalIdType, At as FacingMode, b as FatalError, O as HangupReason, D as HangupType, x as MediaOption, k as MediaTrackKind, V as MediaType, La as MuteState, X as ParticipantState, ss as ParticipantStateDataValue, N as ParticipantStatus, os as RecordRole, Ra as RoomsEventType, ka as Signaling, B as SignalingCommandType, dr as SignalingConnectionType, K as SignalingNotification, J as TransportTopology, Va as UserRole, A as UserType, fo as VolumeDetector, ws as acceptCall, Bc as acceptPromotion, Sc as activateRooms, vc as addMovie, As as addParticipant, js as addParticipantInternal, Cs as authorize, ds as browser, ys as callInternal, vs as callTo, Fs as captureScreen, Is as captureVmoji, Mc as changeAudioEffect, tc as changeConversationOptions, Ps as changeDevice, Hs as changeParticipantState, Vs as changePriorities, jc as changeVideoEffect, ic as chatHistory, nc as chatMessage, rc as chatMessageInternal, lc as createJoinLink, ac as customData, oc as customDataInternal, Ec as debug, Oc as debugLogs, Dc as debugMessage, Ts as declineCall, Wc as enableFeatureForRoles, $s as enableVideoSuspend, ec as enableVideoSuspendSuggest, Uc as feedback, pc as forceRelayPolicy, el as getActiveCallId, dc as getAnonymTokenByLink, Lc as getAudienceModeHands, Ss as getInbounds, Vc as getParticipantListChunk, Hc as getParticipants, _c as getStreamInfo, tl as getSyncedTime, Ic as getWaitingHall, Ks as grantRoles, qs as grantRolesInternal, ks as hangup, _s as init, Es as joinCall, Os as joinCallByLink, Ds as joinCallInternal, Js as muteParticipant, Ys as muteParticipantInternal, Xs as pinParticipant, Zs as pinParticipantInternal, bs as processPush, xs as processPushInternal, Rc as promoteParticipant, gc as publishStream, Us as putHandsDown, qc as removeHistoryRecords, uc as removeJoinLink, bc as removeMovie, Ms as removeParticipant, Ns as removeParticipantInternal, wc as removeRooms, Xc as requestAsr, Gs as requestDisplayLayout, zc as requestPromotion, hs as setAudioEffects, Nc as setAudioStream, Bs as setLocalResolution, ps as setLogger, Qs as setMediaModifiers, Tc as setStatisticsInterval, ms as setVideoEffects, Ls as setVideoStream, gs as setVmoji, Fc as setVmojiFill, Pc as setVmojiSvg, fc as setVolume, Jc as startAsr, cc as startAudienceConversation, sc as startConversation, mc as startStream, Zc as startUrlSharing, Yc as stopAsr, hc as stopStream, Qc as stopUrlSharing, $c as switchCall, Cc as switchRoom, zs as toggleLocalAudio, Rs as toggleLocalVideo, Ws as updateDisplayLayout, yc as updateMovie, xc as updateRooms, Ac as uploadDebugLogs, fs as utils, nl as version };
12456
+ export { rs as Api, ls as ApiExternal, cs as ArrayDequeue, v as AuthData, f as BaseLogger, Aa as CallDirection, ja as CallType, Ma as ChatRoomEventType, Na as ConversationFeature, Pa as ConversationOption, _n as DebugMessageType, Ga as ExternalIdType, At as FacingMode, b as FatalError, O as HangupReason, D as HangupType, x as MediaOption, k as MediaTrackKind, V as MediaType, La as MuteState, X as ParticipantState, ss as ParticipantStateDataValue, N as ParticipantStatus, os as RecordRole, Ra as RoomsEventType, ka as Signaling, B as SignalingCommandType, dr as SignalingConnectionType, K as SignalingNotification, J as TransportTopology, Va as UserRole, A as UserType, fo as VolumeDetector, ws as acceptCall, Vc as acceptPromotion, Sc as activateRooms, vc as addMovie, As as addParticipant, js as addParticipantInternal, Cs as authorize, ds as browser, ys as callInternal, vs as callTo, Fs as captureScreen, Is as captureVmoji, Nc as changeAudioEffect, tc as changeConversationOptions, Ps as changeDevice, Hs as changeParticipantState, Vs as changePriorities, Mc as changeVideoEffect, ic as chatHistory, nc as chatMessage, rc as chatMessageInternal, lc as createJoinLink, ac as customData, oc as customDataInternal, Ec as debug, kc as debugLogs, Dc as debugMessage, Oc as debugMessageWithContext, Ts as declineCall, Gc as enableFeatureForRoles, $s as enableVideoSuspend, ec as enableVideoSuspendSuggest, Wc as feedback, pc as forceRelayPolicy, tl as getActiveCallId, dc as getAnonymTokenByLink, Rc as getAudienceModeHands, Ss as getInbounds, Hc as getParticipantListChunk, Uc as getParticipants, _c as getStreamInfo, nl as getSyncedTime, Lc as getWaitingHall, Ks as grantRoles, qs as grantRolesInternal, ks as hangup, _s as init, Es as joinCall, Os as joinCallByLink, Ds as joinCallInternal, Js as muteParticipant, Ys as muteParticipantInternal, Xs as pinParticipant, Zs as pinParticipantInternal, bs as processPush, xs as processPushInternal, zc as promoteParticipant, gc as publishStream, Us as putHandsDown, Jc as removeHistoryRecords, uc as removeJoinLink, bc as removeMovie, Ms as removeParticipant, Ns as removeParticipantInternal, wc as removeRooms, Zc as requestAsr, Gs as requestDisplayLayout, Bc as requestPromotion, hs as setAudioEffects, Pc as setAudioStream, Bs as setLocalResolution, ps as setLogger, Qs as setMediaModifiers, Tc as setStatisticsInterval, ms as setVideoEffects, Ls as setVideoStream, gs as setVmoji, Ic as setVmojiFill, Fc as setVmojiSvg, fc as setVolume, Yc as startAsr, cc as startAudienceConversation, sc as startConversation, mc as startStream, Qc as startUrlSharing, Xc as stopAsr, hc as stopStream, $c as stopUrlSharing, el as switchCall, Cc as switchRoom, zs as toggleLocalAudio, Rs as toggleLocalVideo, Ws as updateDisplayLayout, yc as updateMovie, xc as updateRooms, jc as uploadDebugLogs, fs as utils, rl as version };
@@ -9,6 +9,7 @@ import MediaOption from '../enums/MediaOption';
9
9
  import UpdateDisplayLayoutErrorReason from '../enums/UpdateDisplayLayoutErrorReason';
10
10
  import UserRole from '../enums/UserRole';
11
11
  import UserType from '../enums/UserType';
12
+ import { DebugMessageType } from '../static/Debug';
12
13
  import { JSONObject } from '../static/Json';
13
14
  import { IAsrStartParams, IAsrStopParams } from '../types/Asr';
14
15
  import { AudienceModeHandsResponse } from '../types/AudienceMode';
@@ -81,6 +82,8 @@ export default class Conversation extends EventEmitter {
81
82
  get mediaSettings(): MediaSettings | undefined;
82
83
  get isCallHeld(): boolean;
83
84
  static debugSessionId(): string | null;
85
+ static debugMessage(type: DebugMessageType, ...args: any[]): boolean;
86
+ static debugMessageWithContext(type: DebugMessageType, conversationId: string, ...args: any[]): boolean;
84
87
  static getSyncedTime(): number;
85
88
  get debugSessionId(): string | null;
86
89
  onStart({ opponentIds, opponentType, mediaOptions, payload, joiningAllowed, requireAuthToJoin, onlyAdminCanShareMovie, externalIds, onFastStart, conversationId, }: ConversationOnStartParams): Promise<ConversationData>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/calls-sdk",
3
- "version": "2.8.12-beta.0",
3
+ "version": "2.8.12-beta.2",
4
4
  "author": "vk.com",
5
5
  "description": "Library for video calls based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
package/static/Debug.d.ts CHANGED
@@ -21,6 +21,7 @@ export type DebugSessionLogger = DebugLogger & {
21
21
  readonly sessionId: string | null;
22
22
  readonly conversationId: string | null;
23
23
  setConversationId(conversationId: string | null): void;
24
+ send(type: DebugMessageType, ...args: any[]): void;
24
25
  };
25
26
  declare namespace Debug {
26
27
  type ContextProvider = () => DebugMessageContext;