@vkontakte/calls-sdk 2.8.11-dev.aeebd796.0 → 2.8.11-dev.af7eda54.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 +6 -10
- package/abstract/BaseApi.d.ts +2 -3
- package/abstract/BaseSignaling.d.ts +1 -2
- package/calls-sdk.cjs.js +5 -5
- package/calls-sdk.esm.js +171 -178
- package/classes/Conversation.d.ts +2 -1
- package/classes/ExternalIdCache.d.ts +19 -0
- package/default/Api.d.ts +3 -11
- package/default/Signaling.d.ts +1 -2
- package/package.json +1 -1
- package/types/SignalingMessage.d.ts +3 -0
|
@@ -50,6 +50,7 @@ export default class Conversation extends EventEmitter {
|
|
|
50
50
|
private _lastSignalledActiveSpeakerId;
|
|
51
51
|
private _isRealTimeAsrRequested;
|
|
52
52
|
private _serverSettings;
|
|
53
|
+
private _serverTimeOffset;
|
|
53
54
|
private static _current;
|
|
54
55
|
private static _activationMutex;
|
|
55
56
|
private static _delayedHangup;
|
|
@@ -70,6 +71,7 @@ export default class Conversation extends EventEmitter {
|
|
|
70
71
|
static current(): Conversation | null;
|
|
71
72
|
static hangupAfterInit(): void;
|
|
72
73
|
static id(): string | null;
|
|
74
|
+
static getSyncedTime(): number;
|
|
73
75
|
get debugSessionId(): string | null;
|
|
74
76
|
onStart({ opponentIds, opponentType, mediaOptions, payload, joiningAllowed, requireAuthToJoin, onlyAdminCanShareMovie, externalIds, onFastStart, conversationId, }: ConversationOnStartParams): Promise<ConversationData>;
|
|
75
77
|
onJoin(joinArgs: {
|
|
@@ -281,7 +283,6 @@ export default class Conversation extends EventEmitter {
|
|
|
281
283
|
startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null): Promise<undefined>;
|
|
282
284
|
stopStream(roomId?: number | null, remove?: boolean): Promise<undefined>;
|
|
283
285
|
publishStream(roomId?: number | null): Promise<undefined>;
|
|
284
|
-
recordSetConf(king?: ParticipantId, pawns?: ParticipantId[], hideParticipantCount?: boolean, roomId?: number | null): Promise<void>;
|
|
285
286
|
getStreamInfo(): Promise<{
|
|
286
287
|
movieId: any;
|
|
287
288
|
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>;
|
package/package.json
CHANGED
|
@@ -366,6 +366,9 @@ declare namespace SignalingMessage {
|
|
|
366
366
|
export interface Connection extends Notification {
|
|
367
367
|
endpoint: string;
|
|
368
368
|
conversation: Conversation;
|
|
369
|
+
conversationParams: {
|
|
370
|
+
serverTime: number;
|
|
371
|
+
};
|
|
369
372
|
isConcurrent: boolean;
|
|
370
373
|
peerId: PeerId;
|
|
371
374
|
mediaModifiers: MediaModifiers;
|