@vkontakte/calls-sdk 2.8.12-beta.1 → 2.8.12-dev.8c2bbcbf.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.
- package/calls-sdk.cjs.js +9 -9
- package/calls-sdk.esm.js +603 -563
- package/classes/CallRegistry.d.ts +4 -0
- package/classes/Conversation.d.ts +5 -2
- package/default/Api.d.ts +0 -1
- package/package.json +1 -1
- package/static/AuthData.d.ts +10 -0
|
@@ -6,8 +6,11 @@ export interface HoldableConversation extends Conversation {
|
|
|
6
6
|
}
|
|
7
7
|
export declare class CallRegistry {
|
|
8
8
|
private _conversations;
|
|
9
|
+
private _reserved;
|
|
9
10
|
private _activeId;
|
|
10
11
|
private _mutex;
|
|
12
|
+
private _pendingRemovals;
|
|
13
|
+
reserve(id: string): void;
|
|
11
14
|
add(conversation: HoldableConversation): void;
|
|
12
15
|
remove(id: string | null): void;
|
|
13
16
|
get(id: string): HoldableConversation | undefined;
|
|
@@ -21,6 +24,7 @@ export declare class CallRegistry {
|
|
|
21
24
|
setHold(id: string): Promise<void>;
|
|
22
25
|
switchCall(id: string): Promise<void>;
|
|
23
26
|
clear(): void;
|
|
27
|
+
private _flushPendingRemovals;
|
|
24
28
|
}
|
|
25
29
|
declare const callRegistry: CallRegistry;
|
|
26
30
|
export { callRegistry };
|
|
@@ -19,7 +19,7 @@ import MediaModifiers from '../types/MediaModifiers';
|
|
|
19
19
|
import MediaSettings, { IVideoDimentions } from '../types/MediaSettings';
|
|
20
20
|
import { IAddMovieParams, IUpdateMovieData } from '../types/MovieShare';
|
|
21
21
|
import MuteStates from '../types/MuteStates';
|
|
22
|
-
import { CompositeUserId, IGetParticipantsParameters, ParticipantId, ParticipantStateData } from '../types/Participant';
|
|
22
|
+
import { CompositeUserId, IGetParticipantsParameters, OkUserId, ParticipantId, ParticipantStateData } from '../types/Participant';
|
|
23
23
|
import { DisplayLayoutRequest, ParticipantLayout } from '../types/ParticipantLayout';
|
|
24
24
|
import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
|
|
25
25
|
import ParticipantPriority from '../types/ParticipantPriority';
|
|
@@ -60,6 +60,7 @@ export default class Conversation extends EventEmitter {
|
|
|
60
60
|
private _abortController;
|
|
61
61
|
private _registeredPeerReceived;
|
|
62
62
|
private _calleeUnavailableTimer;
|
|
63
|
+
private _reservedId;
|
|
63
64
|
private readonly _onUnload;
|
|
64
65
|
private readonly _audioOutput;
|
|
65
66
|
private readonly _stats;
|
|
@@ -86,12 +87,13 @@ export default class Conversation extends EventEmitter {
|
|
|
86
87
|
static debugMessageWithContext(type: DebugMessageType, conversationId: string, ...args: any[]): boolean;
|
|
87
88
|
static getSyncedTime(): number;
|
|
88
89
|
get debugSessionId(): string | null;
|
|
90
|
+
getCachedRawOkIdByExternalId(externalId: ExternalId): OkUserId | null;
|
|
89
91
|
onStart({ opponentIds, opponentType, mediaOptions, payload, joiningAllowed, requireAuthToJoin, onlyAdminCanShareMovie, externalIds, onFastStart, conversationId, }: ConversationOnStartParams): Promise<ConversationData>;
|
|
90
92
|
onJoin(joinArgs: ConversationOnJoinParams): Promise<ConversationData>;
|
|
91
93
|
private _onJoinPart2;
|
|
92
94
|
private _extractExternalRooms;
|
|
93
95
|
private _extractExternalRoomsData;
|
|
94
|
-
onPush(conversationId: string, type?: UserType, peerId?: number, conversationParams?: string, wsEndpoint?: string): Promise<void>;
|
|
96
|
+
onPush(conversationId: string, type?: UserType, peerId?: number, conversationParams?: string, wsEndpoint?: string, userId?: number): Promise<void>;
|
|
95
97
|
private _isInWaitingHall;
|
|
96
98
|
private _isWaitForAdmin;
|
|
97
99
|
private _isRestricted;
|
|
@@ -110,6 +112,7 @@ export default class Conversation extends EventEmitter {
|
|
|
110
112
|
updateStatisticsInterval(): void;
|
|
111
113
|
private _openTransport;
|
|
112
114
|
private _allocateParticipantTransport;
|
|
115
|
+
private _cleanupRegistry;
|
|
113
116
|
private _close;
|
|
114
117
|
destroy(): Promise<void>;
|
|
115
118
|
private _getConversationParams;
|
package/default/Api.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { ExternalId, ExternalParticipantId, ExternalUserId } from '../types/Exte
|
|
|
7
7
|
import { CompositeUserId, OkUserId, ParticipantId } from '../types/Participant';
|
|
8
8
|
import PushData from '../types/PushData';
|
|
9
9
|
export default class Api extends BaseApi {
|
|
10
|
-
private _userId;
|
|
11
10
|
private _uuid;
|
|
12
11
|
private _idCache;
|
|
13
12
|
private _callUnsafe;
|
package/package.json
CHANGED
package/static/AuthData.d.ts
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
|
+
import type { OkUserId } from '../types/Participant';
|
|
1
2
|
export default abstract class AuthData {
|
|
2
3
|
private static _sessionKey;
|
|
3
4
|
private static _sessionSecretKey;
|
|
4
5
|
private static _accessToken;
|
|
6
|
+
private static _userId;
|
|
7
|
+
private static _reauthorizePromise;
|
|
5
8
|
static get sessionKey(): string | undefined;
|
|
6
9
|
static set sessionKey(value: string | undefined);
|
|
7
10
|
static get sessionSecretKey(): string | undefined;
|
|
8
11
|
static set sessionSecretKey(value: string | undefined);
|
|
9
12
|
static get accessToken(): string | undefined;
|
|
10
13
|
static set accessToken(value: string | undefined);
|
|
14
|
+
static get userId(): OkUserId | null;
|
|
15
|
+
static set userId(value: OkUserId | null);
|
|
11
16
|
static isEmpty(): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Дедуплицирует одновременные попытки реавторизации из разных инстансов Api.
|
|
19
|
+
* Первый вызов выполняет authorizeFn, остальные ждут того же промиса.
|
|
20
|
+
*/
|
|
21
|
+
static reauthorize(authorizeFn: () => Promise<void>): Promise<void>;
|
|
12
22
|
}
|