@vkontakte/calls-sdk 2.8.11-beta.1 → 2.8.11-dev.185dd9e4.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/CallsSDK.d.ts +1 -11
- package/abstract/BaseApi.d.ts +2 -3
- package/abstract/BaseSignaling.d.ts +1 -2
- package/calls-sdk.cjs.js +10 -10
- package/calls-sdk.esm.js +10 -10
- package/classes/Conversation.d.ts +0 -1
- package/classes/ExternalIdCache.d.ts +19 -0
- package/default/Api.d.ts +3 -11
- package/default/Signaling.d.ts +2 -2
- package/package.json +1 -1
- package/types/WebTransport.d.ts +1 -0
|
@@ -279,7 +279,6 @@ export default class Conversation extends EventEmitter {
|
|
|
279
279
|
startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null): Promise<undefined>;
|
|
280
280
|
stopStream(roomId?: number | null, remove?: boolean): Promise<undefined>;
|
|
281
281
|
publishStream(roomId?: number | null): Promise<undefined>;
|
|
282
|
-
recordSetConf(king?: ParticipantId, pawns?: ParticipantId[], hideParticipantCount?: boolean, roomId?: number | null): Promise<void>;
|
|
283
282
|
getStreamInfo(): Promise<{
|
|
284
283
|
movieId: any;
|
|
285
284
|
preview: any;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ExternalId, ExternalParticipantId } from '../types/ExternalId';
|
|
2
|
+
import { CompositeUserId, OkUserId, ParticipantId } from '../types/Participant';
|
|
3
|
+
export declare class ExternalIdCache {
|
|
4
|
+
private _okIdToExternalId;
|
|
5
|
+
private _externalIdToOkId;
|
|
6
|
+
private _decorativeIdToInitialId;
|
|
7
|
+
private _initialIdToDecorativeId;
|
|
8
|
+
getOkId(externalId: ExternalId): OkUserId | null;
|
|
9
|
+
getExternalId(okId: OkUserId): ExternalParticipantId | null;
|
|
10
|
+
hasByExternalId(externalId: ExternalId): boolean;
|
|
11
|
+
hasByOkId(okId: OkUserId): boolean;
|
|
12
|
+
cache(participantId: OkUserId | CompositeUserId | ParticipantId, externalId: ExternalParticipantId): void;
|
|
13
|
+
mapDecorativeId(decorativeId: OkUserId | CompositeUserId | ParticipantId, initialId: OkUserId | CompositeUserId | ParticipantId): void;
|
|
14
|
+
unmapDecorativeId(initialId: OkUserId | CompositeUserId | ParticipantId): void;
|
|
15
|
+
getDecorativeIdByInitialId(initialId: OkUserId | CompositeUserId | ParticipantId): OkUserId | undefined;
|
|
16
|
+
replaceByInitialIdIdIfExists(id: OkUserId | CompositeUserId | ParticipantId): OkUserId;
|
|
17
|
+
getParticipantIdByExternalId(externalId: ExternalId): ParticipantId | null;
|
|
18
|
+
clear(): void;
|
|
19
|
+
}
|
package/default/Api.d.ts
CHANGED
|
@@ -8,9 +8,7 @@ import { CompositeUserId, OkUserId, ParticipantId } from '../types/Participant';
|
|
|
8
8
|
export default class Api extends BaseApi {
|
|
9
9
|
private _userId;
|
|
10
10
|
private _uuid;
|
|
11
|
-
private
|
|
12
|
-
private _decorativeIdToInitialId;
|
|
13
|
-
private _initialIdToDecorativeId;
|
|
11
|
+
private _idCache;
|
|
14
12
|
private _callUnsafe;
|
|
15
13
|
protected _call(method: string, data?: any, noSession?: boolean): Promise<any>;
|
|
16
14
|
userId(participantId: ParticipantId): Promise<ExternalParticipantId>;
|
|
@@ -25,7 +23,7 @@ export default class Api extends BaseApi {
|
|
|
25
23
|
audioOnly?: boolean;
|
|
26
24
|
waitForAdmin?: boolean;
|
|
27
25
|
closedConversation?: boolean;
|
|
28
|
-
},
|
|
26
|
+
}, externalIds?: ExternalId[]): Promise<ConversationResponse>;
|
|
29
27
|
startConversation(conversationId: string, ids?: OkUserId[], type?: CallType, isVideo?: boolean, payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean, { onlyAdminCanShareMovie, waitForAdmin }?: {
|
|
30
28
|
onlyAdminCanShareMovie?: boolean;
|
|
31
29
|
waitForAdmin?: boolean;
|
|
@@ -42,19 +40,13 @@ export default class Api extends BaseApi {
|
|
|
42
40
|
}>;
|
|
43
41
|
getAnonymTokenByLink(joinLink: string, username?: string): Promise<string>;
|
|
44
42
|
joinConversationByLink(joinLink: string, isVideo?: boolean, observedIds?: ExternalUserId[], payload?: string): Promise<ConversationResponse>;
|
|
45
|
-
/**
|
|
46
|
-
* NB: Не сохраняет порядок возвращаемых ID
|
|
47
|
-
* Этот метод принимает именно ExternalId, т.к. для OkUserId не принципиально наличие deviceIdx
|
|
48
|
-
* @hidden
|
|
49
|
-
*/
|
|
50
|
-
getOkIdsByExternalIds(externalIds: ExternalId[]): Promise<OkUserId[]>;
|
|
51
|
-
getParticipantIdsByExternalIds(externalIds: ExternalId[]): Promise<Map<ExternalId, ParticipantId>>;
|
|
52
43
|
/**
|
|
53
44
|
* NB: Не сохраняет порядок возвращаемых ID
|
|
54
45
|
* @hidden
|
|
55
46
|
*/
|
|
56
47
|
getExternalIdsByOkIds(uids: OkUserId[]): Promise<ExternalParticipantId[]>;
|
|
57
48
|
getCachedOkIdByExternalId(externalId: ExternalId): ParticipantId | null;
|
|
49
|
+
getCachedRawOkIdByExternalId(externalId: ExternalId): OkUserId | null;
|
|
58
50
|
cacheExternalId(participantId: OkUserId | CompositeUserId | ParticipantId, externalId: ExternalParticipantId): void;
|
|
59
51
|
mapDecorativeId(decorativeId: OkUserId | CompositeUserId | ParticipantId, initialId: OkUserId | CompositeUserId | ParticipantId): void;
|
|
60
52
|
unmapDecorativeId(initialId: OkUserId | CompositeUserId | ParticipantId): void;
|
package/default/Signaling.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
|
|
|
22
22
|
import { StreamDescriptionString } from '../types/ParticipantStreamDescription';
|
|
23
23
|
import { PerfStatReport } from '../types/PerfStatReporter';
|
|
24
24
|
import SignalingMessage, { GetParticipantsSignalingResponse, GetRoomsSignalingResponse, SignalingSuccessResponse } from '../types/SignalingMessage';
|
|
25
|
-
import { IPublishStreamData,
|
|
25
|
+
import { IPublishStreamData, IStartStreamData, IStopStreamData } from '../types/Streams';
|
|
26
26
|
export default class Signaling extends BaseSignaling {
|
|
27
27
|
private socket;
|
|
28
28
|
protected sequence: number;
|
|
@@ -119,7 +119,6 @@ export default class Signaling extends BaseSignaling {
|
|
|
119
119
|
startStream(data: IStartStreamData): Promise<SignalingMessage>;
|
|
120
120
|
stopStream(data?: IStopStreamData): Promise<SignalingMessage>;
|
|
121
121
|
publishStream(data?: IPublishStreamData): Promise<SignalingMessage>;
|
|
122
|
-
recordSetConf(conf?: IRecordConfData): Promise<SignalingMessage>;
|
|
123
122
|
getRecordStatus(): Promise<SignalingMessage>;
|
|
124
123
|
switchTopology(topology: TransportTopology, force?: boolean): Promise<SignalingMessage>;
|
|
125
124
|
requestRealloc(): Promise<SignalingMessage>;
|
|
@@ -173,6 +172,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
173
172
|
protected _handleCachedMessages(): void;
|
|
174
173
|
private _throwError;
|
|
175
174
|
private _onError;
|
|
175
|
+
private _serializeErrorEvent;
|
|
176
176
|
protected _onClose(event: CloseEvent): void;
|
|
177
177
|
protected _closeSocket(error?: Error | null): void;
|
|
178
178
|
protected _reconnect(): void;
|
package/package.json
CHANGED
package/types/WebTransport.d.ts
CHANGED