@vkontakte/calls-sdk 2.8.12-dev.dd8ab07d.0 → 2.8.12-dev.dfea6e89.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.
@@ -57,6 +57,8 @@ export default class Conversation extends EventEmitter {
57
57
  private _serverSettings;
58
58
  private _serverTimeOffset;
59
59
  private _delayedHangup;
60
+ private _hangupEmitted;
61
+ private _hangupPromise;
60
62
  private _abortController;
61
63
  private _registeredPeerReceived;
62
64
  private _calleeUnavailableTimer;
@@ -113,8 +115,9 @@ export default class Conversation extends EventEmitter {
113
115
  private _openTransport;
114
116
  private _allocateParticipantTransport;
115
117
  private _cleanupRegistry;
118
+ private _emitHangupOnce;
116
119
  private _close;
117
- destroy(): Promise<void>;
120
+ destroy(): void;
118
121
  private _getConversationParams;
119
122
  private _setConversationParams;
120
123
  private _buildSignalingEndpoint;
@@ -156,6 +159,7 @@ export default class Conversation extends EventEmitter {
156
159
  private _getExistedParticipantByIdOrCreate;
157
160
  private _getExternalIdByParticipantId;
158
161
  private _getExternalIdsByOkIdsFromCache;
162
+ private _getOrCacheExternalIdByCompositeId;
159
163
  private _registerParticipantAndSetMarkersIfChunkEnabled;
160
164
  private _warnParticipantNotInConversation;
161
165
  private _denormalizeMarkers;
@@ -198,7 +202,7 @@ export default class Conversation extends EventEmitter {
198
202
  private _cleanupTransportForHold;
199
203
  private _cleanupSpeakerDetector;
200
204
  private _cleanupSpecListener;
201
- private _cleanupSignaling;
205
+ private _disposeSignaling;
202
206
  private _onAddParticipant;
203
207
  private _onRemoveParticipant;
204
208
  changeDevice(kind: MediaDeviceKind): Promise<void>;
@@ -231,7 +235,7 @@ export default class Conversation extends EventEmitter {
231
235
  private _getWaitingForPromotionStatus;
232
236
  putHandsDown(): Promise<void>;
233
237
  requestKeyFrame(participantStreamDescription: ParticipantStreamDescription): Promise<void | SignalingMessage>;
234
- requestTestMode(consumerCommand: string, producerCommand: string): Promise<void>;
238
+ requestTestMode(consumerCommand: string, producerCommand: string): Promise<void | SignalingMessage>;
235
239
  updateDisplayLayout(layouts: ParticipantLayout[]): Promise<void>;
236
240
  requestDisplayLayout(requests: DisplayLayoutRequest[]): Promise<void>;
237
241
  feedback(key: string): Promise<SignalingMessage>;
@@ -360,7 +364,7 @@ export default class Conversation extends EventEmitter {
360
364
  private _onRecordInfo;
361
365
  private _onStopRecordInfo;
362
366
  private _changePinnedParticipantForRoom;
363
- _changeRecordInfoForRoom(): Promise<void>;
367
+ _changeRecordInfoForRoom(): void;
364
368
  private _changeAsrInfoForRoom;
365
369
  private _changeUrlSharingInfoForRoom;
366
370
  private _onParticipantAnimojiChanged;
@@ -5,7 +5,7 @@ import { Participant, ParticipantId } from '../types/Participant';
5
5
  type DisplayLayoutRequesterParams = {
6
6
  api: BaseApi;
7
7
  debug: DebugLogger;
8
- getParticipants: () => Promise<Record<ParticipantId, Participant>>;
8
+ getParticipants: () => Record<ParticipantId, Participant>;
9
9
  isMe: (participantId: ParticipantId) => boolean;
10
10
  updateDisplayLayout: (layouts: ParticipantLayout[]) => Promise<void>;
11
11
  };
@@ -1,6 +1,7 @@
1
1
  import { ExternalId, ExternalParticipantId } from '../types/ExternalId';
2
2
  import { CompositeUserId, OkUserId, ParticipantId } from '../types/Participant';
3
3
  export declare class ExternalIdCache {
4
+ private static _normalizeType;
4
5
  private _okIdToExternalId;
5
6
  private _externalIdToOkId;
6
7
  private _decorativeIdToInitialId;
package/default/Api.d.ts CHANGED
@@ -11,7 +11,7 @@ export default class Api extends BaseApi {
11
11
  private _idCache;
12
12
  private _callUnsafe;
13
13
  protected _call(method: string, data?: any, noSession?: boolean, allowReauthorize?: boolean): Promise<any>;
14
- userId(participantId: ParticipantId): Promise<ExternalParticipantId>;
14
+ userId(participantId: ParticipantId): ExternalParticipantId;
15
15
  authorize(): Promise<void>;
16
16
  private _getAnonymLoginCacheKey;
17
17
  private _getCachedAnonymLogin;
@@ -35,13 +35,13 @@ export default class Signaling extends BaseSignaling {
35
35
  private datachannelCommandsQueue;
36
36
  private incomingCache;
37
37
  private responseHandlers;
38
+ private disposed;
38
39
  private connectionType;
39
40
  private conversationResolve;
40
41
  private conversationReject;
41
42
  private connected;
42
43
  private listenersReady;
43
44
  private peerId;
44
- private conversationId;
45
45
  private connectionMessageWaitTimer;
46
46
  private participantIdRegistry;
47
47
  private producerNotificationDataChannel;
@@ -60,21 +60,16 @@ export default class Signaling extends BaseSignaling {
60
60
  setAbortSignal(signal: AbortSignal | undefined): void;
61
61
  setEndpoint(endpoint: string): void;
62
62
  setWebTransportEndpoint(endpoint: string | null): void;
63
- setConversationId(conversationId: string): void;
64
63
  setParticipantIdRegistry(participantIdRegistry: ParticipantIdRegistry): void;
65
64
  setProducerNotificationDataChannel(dataChannel: RTCDataChannel): void;
66
65
  setProducerCommandDataChannel(dataChannel: RTCDataChannel): void;
67
66
  useCommandDataChannel(status: boolean): void;
68
- /**
69
- * Free used resources
70
- */
71
- cleanup(): void;
72
67
  /**
73
68
  * Open a connection with a signaling server
74
69
  */
75
70
  connect(connectionType: SignalingConnectionType): Promise<SignalingMessage.Connection>;
76
71
  getNextCommandSequenceNumber(): number;
77
- hangup(reason: string): Promise<SignalingMessage | void>;
72
+ hangup(reason: string): Promise<SignalingMessage>;
78
73
  sendCandidate(participantId: ParticipantId, candidate: RTCIceCandidate): Promise<SignalingMessage>;
79
74
  requestTestMode(consumerCommand: string, producerCommand: string | null): Promise<SignalingMessage>;
80
75
  sendSdp(participantId: ParticipantId, sdp: RTCSessionDescriptionInit, extraPayload?: Record<string, any>): Promise<SignalingMessage>;
@@ -138,10 +133,7 @@ export default class Signaling extends BaseSignaling {
138
133
  acceptPromotion(reject?: boolean): Promise<SignalingMessage>;
139
134
  feedback(key: string): Promise<SignalingMessage>;
140
135
  getHandQueue(): Promise<SignalingMessage>;
141
- /**
142
- * Close a connection with a signaling server
143
- */
144
- close(): void;
136
+ dispose(cause?: Error): void;
145
137
  /**
146
138
  * Этот метод нужен т.к. после получения сообщения "connected" устанавливается транспорт
147
139
  * и подписывается на сигналинг. Данные приходят очень быстро и транспорт пропускает
@@ -173,7 +165,8 @@ export default class Signaling extends BaseSignaling {
173
165
  private _onError;
174
166
  private _serializeErrorEvent;
175
167
  private _onClose;
176
- private _closeSocket;
168
+ private _terminate;
169
+ private _fail;
177
170
  private _isRecordCommand;
178
171
  private _resolvePendingRecordCommands;
179
172
  private _handleCommandResponse;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/calls-sdk",
3
- "version": "2.8.12-dev.dd8ab07d.0",
3
+ "version": "2.8.12-dev.dfea6e89.0",
4
4
  "author": "vk.com",
5
5
  "description": "Library for video calls based on the vk.com platform",
6
6
  "homepage": "https://vk.com",