@vkontakte/calls-sdk 2.8.11-dev.89ba1e7f.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 +46 -18
- package/abstract/BaseApi.d.ts +2 -3
- package/abstract/BaseSignaling.d.ts +5 -5
- package/calls-sdk.cjs.js +9 -9
- package/calls-sdk.esm.js +4330 -4340
- package/classes/Conversation.d.ts +7 -12
- package/classes/ExternalIdCache.d.ts +19 -0
- package/classes/MediaSource.d.ts +0 -7
- package/classes/SpecListener.d.ts +0 -2
- package/default/Api.d.ts +3 -11
- package/default/Signaling.d.ts +1 -2
- package/enums/SignalingNotification.d.ts +1 -2
- package/package.json +1 -1
- package/static/External.d.ts +71 -143
- package/static/Params.d.ts +70 -84
- package/types/SignalingMessage.d.ts +0 -4
- package/utils/DebugStorage.d.ts +101 -1
- package/classes/CallRegistry.d.ts +0 -22
- package/static/Capabilities.d.ts +0 -5
- package/static/ConversationDebugLogger.d.ts +0 -13
- package/types/Capabilities.d.ts +0 -24
|
@@ -16,7 +16,7 @@ import { ConversationData, ConversationOnStartParams } from '../types/Conversati
|
|
|
16
16
|
import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalUserId } from '../types/ExternalId';
|
|
17
17
|
import type { FastJoinHandler } from '../types/FastJoin';
|
|
18
18
|
import MediaModifiers from '../types/MediaModifiers';
|
|
19
|
-
import
|
|
19
|
+
import { IVideoDimentions } from '../types/MediaSettings';
|
|
20
20
|
import { IAddMovieParams, IUpdateMovieData } from '../types/MovieShare';
|
|
21
21
|
import MuteStates from '../types/MuteStates';
|
|
22
22
|
import { CompositeUserId, IGetParticipantsParameters, ParticipantId, ParticipantStateData } from '../types/Participant';
|
|
@@ -36,12 +36,12 @@ export default class Conversation extends EventEmitter {
|
|
|
36
36
|
private _conversation;
|
|
37
37
|
private _myLastRequestedLayouts;
|
|
38
38
|
private _state;
|
|
39
|
-
private _previousState;
|
|
40
39
|
private _participantState;
|
|
41
40
|
private _participants;
|
|
42
41
|
private _pendingParticipants;
|
|
43
42
|
private _transport;
|
|
44
43
|
private _debugInfo;
|
|
44
|
+
private _debugSessionId;
|
|
45
45
|
private _volumesDetector;
|
|
46
46
|
private _speakerDetector;
|
|
47
47
|
private _localVolumeDetector;
|
|
@@ -51,8 +51,10 @@ export default class Conversation extends EventEmitter {
|
|
|
51
51
|
private _isRealTimeAsrRequested;
|
|
52
52
|
private _serverSettings;
|
|
53
53
|
private _serverTimeOffset;
|
|
54
|
-
private
|
|
55
|
-
private
|
|
54
|
+
private static _current;
|
|
55
|
+
private static _activationMutex;
|
|
56
|
+
private static _delayedHangup;
|
|
57
|
+
private static _abortController;
|
|
56
58
|
private readonly _onUnload;
|
|
57
59
|
private readonly _audioOutput;
|
|
58
60
|
private _lastStalled;
|
|
@@ -69,11 +71,8 @@ export default class Conversation extends EventEmitter {
|
|
|
69
71
|
static current(): Conversation | null;
|
|
70
72
|
static hangupAfterInit(): void;
|
|
71
73
|
static id(): string | null;
|
|
72
|
-
get id(): string;
|
|
73
|
-
get externalId(): ExternalParticipantId | undefined;
|
|
74
|
-
get mediaSettings(): MediaSettings | undefined;
|
|
75
|
-
get isCallHeld(): boolean;
|
|
76
74
|
static getSyncedTime(): number;
|
|
75
|
+
get debugSessionId(): string | null;
|
|
77
76
|
onStart({ opponentIds, opponentType, mediaOptions, payload, joiningAllowed, requireAuthToJoin, onlyAdminCanShareMovie, externalIds, onFastStart, conversationId, }: ConversationOnStartParams): Promise<ConversationData>;
|
|
78
77
|
onJoin(joinArgs: {
|
|
79
78
|
conversationId?: string;
|
|
@@ -284,7 +283,6 @@ export default class Conversation extends EventEmitter {
|
|
|
284
283
|
startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null): Promise<undefined>;
|
|
285
284
|
stopStream(roomId?: number | null, remove?: boolean): Promise<undefined>;
|
|
286
285
|
publishStream(roomId?: number | null): Promise<undefined>;
|
|
287
|
-
recordSetConf(king?: ParticipantId, pawns?: ParticipantId[], hideParticipantCount?: boolean, roomId?: number | null): Promise<void>;
|
|
288
286
|
getStreamInfo(): Promise<{
|
|
289
287
|
movieId: any;
|
|
290
288
|
preview: any;
|
|
@@ -398,7 +396,6 @@ export default class Conversation extends EventEmitter {
|
|
|
398
396
|
private _onFeedback;
|
|
399
397
|
private _onDecorativeParticipantIdChanged;
|
|
400
398
|
private _onVideoSuspendSuggest;
|
|
401
|
-
private _onParticipantHold;
|
|
402
399
|
private _isMe;
|
|
403
400
|
private _getMuteStatesForRoomId;
|
|
404
401
|
private _getMuteStatesForCurrentRoom;
|
|
@@ -408,8 +405,6 @@ export default class Conversation extends EventEmitter {
|
|
|
408
405
|
private _getParticipants;
|
|
409
406
|
private _getParticipant;
|
|
410
407
|
}
|
|
411
|
-
declare function _resetPendingInstance(): void;
|
|
412
|
-
export { _resetPendingInstance };
|
|
413
408
|
export declare class UpdateDisplayLayoutError extends Error {
|
|
414
409
|
readonly participantErrors: {
|
|
415
410
|
externalId: ExternalParticipantId;
|
|
@@ -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/classes/MediaSource.d.ts
CHANGED
|
@@ -45,7 +45,6 @@ export declare class MediaSource extends EventEmitter {
|
|
|
45
45
|
/** Трек аудио эффектов. Не изменяется на протяжении всего времени */
|
|
46
46
|
private _audioEffectsTrack;
|
|
47
47
|
private _mediaSettings;
|
|
48
|
-
private _lastMediaSettings;
|
|
49
48
|
private _videoStatusOnScreenCapturingEnabled;
|
|
50
49
|
private _effect;
|
|
51
50
|
private _audioEffectParams;
|
|
@@ -64,11 +63,7 @@ export declare class MediaSource extends EventEmitter {
|
|
|
64
63
|
getSendAudioTrack(): MediaStreamTrack | null;
|
|
65
64
|
get isAnimojiRequested(): boolean;
|
|
66
65
|
addTrackToPeerConnection(pc: RTCPeerConnection, observer: boolean, noDataChannel: boolean): void;
|
|
67
|
-
/**
|
|
68
|
-
* @deprecated Используйте гетер mediaSettings
|
|
69
|
-
*/
|
|
70
66
|
getMediaSettings(): MediaSettings;
|
|
71
|
-
get mediaSettings(): MediaSettings;
|
|
72
67
|
changeDevice(kind: MediaDeviceKind): Promise<void>;
|
|
73
68
|
/**
|
|
74
69
|
* Установка кастомного стрима для видео, например внешний шаринг экрана
|
|
@@ -96,8 +91,6 @@ export declare class MediaSource extends EventEmitter {
|
|
|
96
91
|
private _setEffect;
|
|
97
92
|
private _stopEffect;
|
|
98
93
|
destroy(): void;
|
|
99
|
-
stopLocalMedia(): Promise<void>;
|
|
100
|
-
resumeLocalMedia(): Promise<void>;
|
|
101
94
|
toggleScreenCapturing(settings: ScreenCaptureSettings): Promise<void>;
|
|
102
95
|
disableScreenCapturing(): Promise<void>;
|
|
103
96
|
private videoTrackMuteHandler;
|
|
@@ -12,8 +12,6 @@ export default class SpecListener extends EventEmitter {
|
|
|
12
12
|
constructor(transport: Transport, volumesDetector: VolumesDetector, participants: Record<ParticipantId, Participant>);
|
|
13
13
|
destroy(): void;
|
|
14
14
|
onChangeRemoteMediaSettings(participantId: ParticipantId, mediaSettings: MediaSettings): void;
|
|
15
|
-
private _getConnectionTimeout;
|
|
16
|
-
private _getVolumeTimeout;
|
|
17
15
|
private _onTransportStateChanged;
|
|
18
16
|
private _onVolumesDetected;
|
|
19
17
|
private _onConnectionTimeout;
|
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>;
|
|
@@ -50,7 +50,6 @@ declare enum SignalingNotification {
|
|
|
50
50
|
ASR_STARTED = "asr-started",
|
|
51
51
|
ASR_STOPPED = "asr-stopped",
|
|
52
52
|
DECORATIVE_PARTICIPANT_ID_CHANGED = "decorative-participant-id-changed",
|
|
53
|
-
VIDEO_SUSPEND_SUGGEST = "video-suspend-suggest"
|
|
54
|
-
HOLD = "hold"
|
|
53
|
+
VIDEO_SUSPEND_SUGGEST = "video-suspend-suggest"
|
|
55
54
|
}
|
|
56
55
|
export default SignalingNotification;
|