@vkontakte/calls-sdk 2.8.12-dev.d4d61806.0 → 2.8.12-dev.d694e8d3.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.
@@ -114,7 +114,7 @@ export default class Conversation extends EventEmitter {
114
114
  private _allocateParticipantTransport;
115
115
  private _cleanupRegistry;
116
116
  private _close;
117
- destroy(): Promise<void>;
117
+ destroy(): void;
118
118
  private _getConversationParams;
119
119
  private _setConversationParams;
120
120
  private _buildSignalingEndpoint;
@@ -156,6 +156,7 @@ export default class Conversation extends EventEmitter {
156
156
  private _getExistedParticipantByIdOrCreate;
157
157
  private _getExternalIdByParticipantId;
158
158
  private _getExternalIdsByOkIdsFromCache;
159
+ private _getOrCacheExternalIdByCompositeId;
159
160
  private _registerParticipantAndSetMarkersIfChunkEnabled;
160
161
  private _warnParticipantNotInConversation;
161
162
  private _denormalizeMarkers;
@@ -360,7 +361,7 @@ export default class Conversation extends EventEmitter {
360
361
  private _onRecordInfo;
361
362
  private _onStopRecordInfo;
362
363
  private _changePinnedParticipantForRoom;
363
- _changeRecordInfoForRoom(): Promise<void>;
364
+ _changeRecordInfoForRoom(): void;
364
365
  private _changeAsrInfoForRoom;
365
366
  private _changeUrlSharingInfoForRoom;
366
367
  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;
@@ -0,0 +1,11 @@
1
+ export type SemanticCallFinishReason = 'hangup' | 'canceled' | 'rejected' | 'busy' | 'missed' | 'timeout' | 'another_device' | 'removed' | 'banned' | 'initially_closed' | 'call_timeout' | 'socket_closed' | 'killed' | 'killed_without_delete' | 'obsolete_client' | 'unavailable';
2
+ export type ClassifiedCallFinish = {
3
+ reason: SemanticCallFinishReason;
4
+ string_value?: string;
5
+ } | {
6
+ reason: 'error';
7
+ string_value: string;
8
+ } | {
9
+ reason: 'failed';
10
+ };
11
+ export declare function classifyCallFinish(error: unknown): ClassifiedCallFinish;
@@ -1,4 +1,3 @@
1
- import HangupReason from '../HangupReason';
2
1
  import StatsLogger from '../StatsLogger';
3
2
  export type CallLifecycleSource = 'outgoing' | 'incoming' | 'join' | 'anonym_join';
4
3
  export interface CallLifecycleInitializationParams {
@@ -34,7 +33,7 @@ export declare class CallLifecycleStats {
34
33
  markOutgoingAccepted(): void;
35
34
  markIncomingAccepted(concurrent: boolean): void;
36
35
  markFirstMediaSent(): void;
37
- markFinished(reason: HangupReason): void;
36
+ markFinished(reason: unknown): void;
38
37
  markTerminated(): void;
39
38
  destroy(): void;
40
39
  private _canRecord;
@@ -43,7 +43,6 @@ export default class ServerTransport extends BaseTransport {
43
43
  private _producerSessionId;
44
44
  private _newAudioShareTrack;
45
45
  private _simulcastInfo;
46
- private _isSimulcastNegotiated;
47
46
  private readonly _debug;
48
47
  private readonly _logger;
49
48
  private readonly _statAggregator;
package/default/Api.d.ts CHANGED
@@ -10,8 +10,8 @@ export default class Api extends BaseApi {
10
10
  private _uuid;
11
11
  private _idCache;
12
12
  private _callUnsafe;
13
- protected _call(method: string, data?: any, noSession?: boolean): Promise<any>;
14
- userId(participantId: ParticipantId): Promise<ExternalParticipantId>;
13
+ protected _call(method: string, data?: any, noSession?: boolean, allowReauthorize?: boolean): Promise<any>;
14
+ userId(participantId: ParticipantId): ExternalParticipantId;
15
15
  authorize(): Promise<void>;
16
16
  private _getAnonymLoginCacheKey;
17
17
  private _getCachedAnonymLogin;
@@ -187,6 +187,8 @@ export default class Signaling extends BaseSignaling {
187
187
  private _onTransportFailed;
188
188
  private _onTransportReconnectScheduled;
189
189
  private _onTransportConnectionDead;
190
+ private _attachNotificationCallError;
191
+ private _createSignalingCallError;
190
192
  private _getSocketType;
191
193
  private _markTransportStat;
192
194
  private _logTransportStat;
@@ -9,6 +9,7 @@ export declare enum SignalingTransportFailure {
9
9
  export type SignalingTransportFailedEvent = {
10
10
  failure: SignalingTransportFailure;
11
11
  message: string;
12
+ source: SignalingTransportType;
12
13
  remote?: boolean;
13
14
  };
14
15
  export type SignalingTransportReconnectEvent = {
@@ -20,7 +20,6 @@ declare enum HangupType {
20
20
  CALLER_IS_REJECTED = "CALLER_IS_REJECTED",
21
21
  UNKNOWN_ERROR = "UNKNOWN_ERROR",
22
22
  UNSUPPORTED = "UNSUPPORTED",
23
- OLD_VERSION = "OLD_VERSION",
24
23
  SERVICE_DISABLED = "SERVICE_DISABLED",
25
24
  SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE",
26
25
  EXTERNAL_API_ERROR = "EXTERNAL_API_ERROR",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/calls-sdk",
3
- "version": "2.8.12-dev.d4d61806.0",
3
+ "version": "2.8.12-dev.d694e8d3.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",
@@ -22,6 +22,6 @@
22
22
  "fflate": "^0.8.2",
23
23
  "messagepack": "1.1.12",
24
24
  "simple-ebml-builder": "0.2.2",
25
- "webrtc-adapter": "7.7.0"
25
+ "webrtc-adapter": "9.0.5"
26
26
  }
27
27
  }
@@ -637,6 +637,6 @@ declare namespace External {
637
637
  /**
638
638
  * Собеседник подключился к сигналлингу
639
639
  */
640
- function onPeerRegistered(conversationId?: string): void;
640
+ function onPeerRegistered(conversationId?: string, externalIds?: ExternalId[]): void;
641
641
  }
642
642
  export default External;
@@ -892,7 +892,7 @@ export type ParamsObject = {
892
892
  /**
893
893
  * Собеседник подключился к сигналлингу
894
894
  */
895
- onPeerRegistered?: (conversationId?: string) => void;
895
+ onPeerRegistered?: (conversationId?: string, externalIds?: ExternalId[]) => void;
896
896
  };
897
897
  export default abstract class Params {
898
898
  private static _params;
@@ -122,6 +122,10 @@ declare namespace WebRTCUtils {
122
122
  * Проверяет поддержку WebRTC браузером
123
123
  */
124
124
  function isBrowserSupported(): boolean;
125
+ /**
126
+ * Возвращает первую отсутствующую capability в стабильном порядке.
127
+ */
128
+ function getBrowserSupportFailure(): BrowserSupportFailure | null;
125
129
  /**
126
130
  * Проверяет поддержку шаринга экрана браузером
127
131
  */
@@ -34,8 +34,11 @@ export type RecordInfo = {
34
34
  recordExternalOwnerId?: string;
35
35
  };
36
36
  export interface SignalingResponse extends SignalingMessage {
37
- response?: SignalingCommandType;
38
37
  error?: string;
38
+ errorCode?: string;
39
+ errorMessage?: string;
40
+ message?: string;
41
+ response?: SignalingCommandType;
39
42
  reason?: HangupType | FatalError;
40
43
  sequence?: number;
41
44
  type: 'response' | 'error' | 'timeout';