@vkontakte/calls-sdk 2.8.11-beta.6 → 2.8.11-beta.7

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.11-beta.6
3
- * Wed, 08 Jul 2026 11:33:54 GMT
2
+ * @vkontakte/calls-sdk v2.8.11-beta.7
3
+ * Thu, 09 Jul 2026 07:50:09 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.11-beta.6";
2162
+ return "2.8.11-beta.7";
2163
2163
  }
2164
2164
  static get debug() {
2165
2165
  return e._params.debug;
@@ -3174,9 +3174,8 @@ var R = vn, z = new class {
3174
3174
  getActive() {
3175
3175
  return this._activeId ? this._conversations.get(this._activeId) ?? null : null;
3176
3176
  }
3177
- getFirstHeld() {
3178
- for (let e of this._conversations.values()) if (e.isCallHeld) return e;
3179
- return null;
3177
+ getFirst() {
3178
+ return this._conversations.values().next().value ?? null;
3180
3179
  }
3181
3180
  getActiveId() {
3182
3181
  return this._activeId;
@@ -8464,7 +8463,7 @@ var to = 90, no = 3, ro = class extends y {
8464
8463
  }, window.addEventListener("pagehide", this._onUnload), this._statFirstMediaReceived = new Eo(this._stats.statAggregator), this._audioOutput = new Za(this._statFirstMediaReceived, M.transparentAudio, this._debug, this._stats.logger), M.videoTracksCount > 0 && (this._cooldownQueueCleanupTimer = window.setInterval(this._cleanupCooldownQueue.bind(this), Do));
8465
8464
  }
8466
8465
  static current() {
8467
- return z.getActive();
8466
+ return z.getActive() ?? (M.hold ? null : z.getFirst());
8468
8467
  }
8469
8468
  static hangupAfterInit() {
8470
8469
  let e = Ao;
@@ -9558,7 +9557,7 @@ var to = 90, no = 3, ro = class extends y {
9558
9557
  }
9559
9558
  }
9560
9559
  async _onParticipantPromoted(e) {
9561
- this._conversation && this._conversation.audienceMode ? (this._debug.log("Promoted in audience mode", !e.demote), this._conversation.restricted = e.demote, this._processRecordInfos(e), !e.demote && this._mediaSource && this._changeMediaSettings(this._mediaSource.mediaSettings)) : (this._debug.log("Promoted in waiting hall", !e.demote), e.demote ? (this._debug.log("Kicked from waiting hall"), this._close(new O(D.REMOVED))) : (this._updateConversation(e), this._waitingHallHoldPending ? (await this._signaling.hold(!0), await this._onJoinPart2(e, !1), this._waitingHallHoldPending = !1) : z.getActive() ? (await this._signaling.hold(!0), await this._onJoinPart2(e, !0, !0), this._waitingHallHoldPending = !1) : await this._onJoinPart2(e))), L.onPromoted(e.demote, this.id);
9560
+ this._conversation && this._conversation.audienceMode ? (this._debug.log("Promoted in audience mode", !e.demote), this._conversation.restricted = e.demote, this._processRecordInfos(e), !e.demote && this._mediaSource && this._changeMediaSettings(this._mediaSource.mediaSettings)) : (this._debug.log("Promoted in waiting hall", !e.demote), e.demote ? (this._debug.log("Kicked from waiting hall"), this._close(new O(D.REMOVED))) : (this._updateConversation(e), this._waitingHallHoldPending ? (await this._signaling.hold(!0), await this._onJoinPart2(e, !1), this._waitingHallHoldPending = !1) : z.getActive() && M.hold ? (await this._signaling.hold(!0), await this._onJoinPart2(e, !0, !0), this._waitingHallHoldPending = !1) : await this._onJoinPart2(e))), L.onPromoted(e.demote, this.id);
9562
9561
  }
9563
9562
  async _onChatRoomUpdated(e, t = 0, n = [], r, i) {
9564
9563
  this._debug.log(`Chat room updated: ${e}`);
@@ -10670,7 +10669,7 @@ var to = 90, no = 3, ro = class extends y {
10670
10669
  this._state !== "HELD" && ((e === K.CONNECTING || e === K.RECONNECTING) && await this._areTransportParticipantsOnHold() || (e === K.CONNECTING && L.onLocalStatus(N.CONNECTING, this.id), e === K.RECONNECTING && L.onLocalStatus(N.RECONNECT, this.id), e === K.FAILED && this._transport && this._transport.allocated().length === 0 && (this._signaling.ready && await this._signaling.hangup(D.FAILED), this._close(new O(D.FAILED), "Transport failed"))));
10671
10670
  }
10672
10671
  async _areTransportParticipantsOnHold() {
10673
- if (!this._transport) return !1;
10672
+ if (!M.hold || !this._transport) return !1;
10674
10673
  let e = this._transport.opened().length ? this._transport.opened() : this._transport.allocated();
10675
10674
  if (!e.length) return !1;
10676
10675
  let t = await this._getParticipants();
@@ -12031,7 +12030,7 @@ async function Ic(e, t, n) {
12031
12030
  return Rc(n).enableFeatureForRoles(e, t);
12032
12031
  }
12033
12032
  function Lc(e) {
12034
- return e ? z.get(e) ?? null : Q.current() ?? z.getFirstHeld();
12033
+ return e ? z.get(e) ?? null : Q.current() ?? z.getFirst();
12035
12034
  }
12036
12035
  function Rc(e) {
12037
12036
  let t = Lc(e);
@@ -12,7 +12,7 @@ export declare class CallRegistry {
12
12
  remove(id: string | null): void;
13
13
  get(id: string): HoldableConversation | undefined;
14
14
  getActive(): HoldableConversation | null;
15
- getFirstHeld(): HoldableConversation | null;
15
+ getFirst(): HoldableConversation | null;
16
16
  getActiveId(): string | null;
17
17
  has(id: string): boolean;
18
18
  getAll(): HoldableConversation[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/calls-sdk",
3
- "version": "2.8.11-beta.6",
3
+ "version": "2.8.11-beta.7",
4
4
  "author": "vk.com",
5
5
  "description": "Library for video calls based on the vk.com platform",
6
6
  "homepage": "https://vk.com",