@vkontakte/calls-sdk 2.8.11-dev.553e9358.0 → 2.8.11-dev.6637565d.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 +13 -9
- package/abstract/BaseApi.d.ts +1 -1
- package/abstract/BaseSignaling.d.ts +4 -3
- package/calls-sdk.cjs.js +9 -9
- package/calls-sdk.esm.js +2480 -2549
- package/classes/Conversation.d.ts +9 -15
- package/classes/MediaSource.d.ts +0 -7
- package/classes/SpecListener.d.ts +0 -5
- package/classes/codec/WorkerBase.d.ts +2 -0
- package/default/Api.d.ts +6 -6
- 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/Participant.d.ts +0 -1
- package/types/SignalingMessage.d.ts +0 -4
- package/classes/CallRegistry.d.ts +0 -25
|
@@ -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';
|
|
@@ -37,7 +37,6 @@ export default class Conversation extends EventEmitter {
|
|
|
37
37
|
private _conversation;
|
|
38
38
|
private _myLastRequestedLayouts;
|
|
39
39
|
private _state;
|
|
40
|
-
private _previousState;
|
|
41
40
|
private _participantState;
|
|
42
41
|
private _participants;
|
|
43
42
|
private _pendingParticipants;
|
|
@@ -53,8 +52,10 @@ export default class Conversation extends EventEmitter {
|
|
|
53
52
|
private _isRealTimeAsrRequested;
|
|
54
53
|
private _serverSettings;
|
|
55
54
|
private _serverTimeOffset;
|
|
56
|
-
private
|
|
57
|
-
private
|
|
55
|
+
private static _current;
|
|
56
|
+
private static _activationMutex;
|
|
57
|
+
private static _delayedHangup;
|
|
58
|
+
private static _abortController;
|
|
58
59
|
private readonly _onUnload;
|
|
59
60
|
private readonly _audioOutput;
|
|
60
61
|
private readonly _stats;
|
|
@@ -72,10 +73,6 @@ export default class Conversation extends EventEmitter {
|
|
|
72
73
|
static current(): Conversation | null;
|
|
73
74
|
static hangupAfterInit(): void;
|
|
74
75
|
static id(): string | null;
|
|
75
|
-
get id(): string;
|
|
76
|
-
get externalId(): ExternalParticipantId | undefined;
|
|
77
|
-
get mediaSettings(): MediaSettings | undefined;
|
|
78
|
-
get isCallHeld(): boolean;
|
|
79
76
|
static debugSessionId(): string | null;
|
|
80
77
|
static getSyncedTime(): number;
|
|
81
78
|
get debugSessionId(): string | null;
|
|
@@ -115,7 +112,7 @@ export default class Conversation extends EventEmitter {
|
|
|
115
112
|
destroy(): Promise<void>;
|
|
116
113
|
private _getConversationParams;
|
|
117
114
|
private _setConversationParams;
|
|
118
|
-
private
|
|
115
|
+
private _buildSignalingEndpoint;
|
|
119
116
|
/**
|
|
120
117
|
* @throws ErrorEvent
|
|
121
118
|
*/
|
|
@@ -130,6 +127,7 @@ export default class Conversation extends EventEmitter {
|
|
|
130
127
|
private _prepareConversation;
|
|
131
128
|
private _createParticipant;
|
|
132
129
|
private _getParticipantId;
|
|
130
|
+
private _cacheParticipantExternalIds;
|
|
133
131
|
private _setConversation;
|
|
134
132
|
private _updateConversation;
|
|
135
133
|
private _createMediaSource;
|
|
@@ -146,6 +144,7 @@ export default class Conversation extends EventEmitter {
|
|
|
146
144
|
private _registerParticipantInCache;
|
|
147
145
|
private _getExistedParticipantByIdOrCreate;
|
|
148
146
|
private _getExternalIdByParticipantId;
|
|
147
|
+
private _getExternalIdsByOkIdsFromCache;
|
|
149
148
|
private _registerParticipantAndSetMarkersIfChunkEnabled;
|
|
150
149
|
private _warnParticipantNotInConversation;
|
|
151
150
|
private _denormalizeMarkers;
|
|
@@ -209,7 +208,7 @@ export default class Conversation extends EventEmitter {
|
|
|
209
208
|
*/
|
|
210
209
|
changePriorities(priorities: ParticipantPriority[]): Promise<void>;
|
|
211
210
|
changeParticipantState(state: ParticipantStateData, compositeUserId?: CompositeUserId): Promise<void>;
|
|
212
|
-
hold(hold: boolean
|
|
211
|
+
hold(hold: boolean): Promise<void>;
|
|
213
212
|
putHandsDown(): Promise<void>;
|
|
214
213
|
requestKeyFrame(participantStreamDescription: ParticipantStreamDescription): Promise<void | SignalingMessage>;
|
|
215
214
|
requestTestMode(consumerCommand: string, producerCommand: string): Promise<void>;
|
|
@@ -354,7 +353,6 @@ export default class Conversation extends EventEmitter {
|
|
|
354
353
|
private _onPinParticipant;
|
|
355
354
|
private _onOptionsChanged;
|
|
356
355
|
private _onNetworkStatus;
|
|
357
|
-
private _emitHeldParticipantsStatus;
|
|
358
356
|
private _onRemoteStreamSecond;
|
|
359
357
|
/**
|
|
360
358
|
* Коллбек, вызывающийся при получении/остановке стрима от AnimojiReceiver
|
|
@@ -375,7 +373,6 @@ export default class Conversation extends EventEmitter {
|
|
|
375
373
|
private _onSpeakerChanged;
|
|
376
374
|
private _onTransportStateChanged;
|
|
377
375
|
private _onTransportLocalStateChanged;
|
|
378
|
-
private _areTransportParticipantsOnHold;
|
|
379
376
|
private _onRemoteTrackAdded;
|
|
380
377
|
private _onRemoteTrackRemoved;
|
|
381
378
|
private _removeAudioTrack;
|
|
@@ -405,7 +402,6 @@ export default class Conversation extends EventEmitter {
|
|
|
405
402
|
private _onFeedback;
|
|
406
403
|
private _onDecorativeParticipantIdChanged;
|
|
407
404
|
private _onVideoSuspendSuggest;
|
|
408
|
-
private _onParticipantHold;
|
|
409
405
|
private _isMe;
|
|
410
406
|
private _getMuteStatesForRoomId;
|
|
411
407
|
private _getMuteStatesForCurrentRoom;
|
|
@@ -415,8 +411,6 @@ export default class Conversation extends EventEmitter {
|
|
|
415
411
|
private _getParticipants;
|
|
416
412
|
private _getParticipant;
|
|
417
413
|
}
|
|
418
|
-
declare function _resetPendingInstance(): void;
|
|
419
|
-
export { _resetPendingInstance };
|
|
420
414
|
export declare class UpdateDisplayLayoutError extends Error {
|
|
421
415
|
readonly participantErrors: {
|
|
422
416
|
externalId: ExternalParticipantId;
|
package/classes/MediaSource.d.ts
CHANGED
|
@@ -47,7 +47,6 @@ export declare class MediaSource extends EventEmitter {
|
|
|
47
47
|
/** Трек аудио эффектов. Не изменяется на протяжении всего времени */
|
|
48
48
|
private _audioEffectsTrack;
|
|
49
49
|
private _mediaSettings;
|
|
50
|
-
private _lastMediaSettings;
|
|
51
50
|
private _videoStatusOnScreenCapturingEnabled;
|
|
52
51
|
private _effect;
|
|
53
52
|
private _audioEffectParams;
|
|
@@ -68,11 +67,7 @@ export declare class MediaSource extends EventEmitter {
|
|
|
68
67
|
getSendAudioTrack(): MediaStreamTrack | null;
|
|
69
68
|
get isAnimojiRequested(): boolean;
|
|
70
69
|
addTrackToPeerConnection(pc: RTCPeerConnection, observer: boolean, noDataChannel: boolean): void;
|
|
71
|
-
/**
|
|
72
|
-
* @deprecated Используйте гетер mediaSettings
|
|
73
|
-
*/
|
|
74
70
|
getMediaSettings(): MediaSettings;
|
|
75
|
-
get mediaSettings(): MediaSettings;
|
|
76
71
|
changeDevice(kind: MediaDeviceKind): Promise<void>;
|
|
77
72
|
/**
|
|
78
73
|
* Установка кастомного стрима для видео, например внешний шаринг экрана
|
|
@@ -100,8 +95,6 @@ export declare class MediaSource extends EventEmitter {
|
|
|
100
95
|
private _setEffect;
|
|
101
96
|
private _stopEffect;
|
|
102
97
|
destroy(): void;
|
|
103
|
-
stopLocalMedia(): Promise<void>;
|
|
104
|
-
resumeLocalMedia(lastActiveMediaSettings?: MediaSettings): Promise<void>;
|
|
105
98
|
toggleScreenCapturing(settings: ScreenCaptureSettings): Promise<void>;
|
|
106
99
|
disableScreenCapturing(): Promise<void>;
|
|
107
100
|
private videoTrackMuteHandler;
|
|
@@ -12,17 +12,12 @@ export default class SpecListener extends EventEmitter {
|
|
|
12
12
|
private readonly _debug;
|
|
13
13
|
private readonly _logger;
|
|
14
14
|
private _connectionTimeout;
|
|
15
|
-
private _connectionTimeoutSuppressed;
|
|
16
15
|
private _volumeTimeout;
|
|
17
16
|
constructor(transport: Transport, volumesDetector: VolumesDetector, participants: Record<ParticipantId, Participant>, debug?: DebugLogger, logger?: StatsLogger | null);
|
|
18
17
|
destroy(): void;
|
|
19
18
|
onChangeRemoteMediaSettings(participantId: ParticipantId, mediaSettings: MediaSettings): void;
|
|
20
|
-
onParticipantHoldChanged(): void;
|
|
21
|
-
private _getConnectionTimeout;
|
|
22
|
-
private _getVolumeTimeout;
|
|
23
19
|
private _onTransportStateChanged;
|
|
24
20
|
private _onVolumesDetected;
|
|
25
21
|
private _onConnectionTimeout;
|
|
26
|
-
private _reportConnectionTimeout;
|
|
27
22
|
private _onVolumeTimeout;
|
|
28
23
|
}
|
package/default/Api.d.ts
CHANGED
|
@@ -13,6 +13,11 @@ export default class Api extends BaseApi {
|
|
|
13
13
|
protected _call(method: string, data?: any, noSession?: boolean): Promise<any>;
|
|
14
14
|
userId(participantId: ParticipantId): Promise<ExternalParticipantId>;
|
|
15
15
|
authorize(): Promise<void>;
|
|
16
|
+
private _getAnonymLoginCacheKey;
|
|
17
|
+
private _getCachedAnonymLogin;
|
|
18
|
+
private _setCachedAnonymLogin;
|
|
19
|
+
private _removeCachedAnonymLogin;
|
|
20
|
+
private _applyAnonymLogin;
|
|
16
21
|
logClientStats(items: ClientStats[]): void;
|
|
17
22
|
logClientEvents(items: ClientEvent[]): void;
|
|
18
23
|
uploadDebugLogs(conversationId: string, startTime: number, endTime: number, log: string): Promise<void>;
|
|
@@ -40,13 +45,9 @@ export default class Api extends BaseApi {
|
|
|
40
45
|
}>;
|
|
41
46
|
getAnonymTokenByLink(joinLink: string, username?: string): Promise<string>;
|
|
42
47
|
joinConversationByLink(joinLink: string, isVideo?: boolean, observedIds?: ExternalUserId[], payload?: string): Promise<ConversationResponse>;
|
|
43
|
-
/**
|
|
44
|
-
* NB: Не сохраняет порядок возвращаемых ID
|
|
45
|
-
* @hidden
|
|
46
|
-
*/
|
|
47
|
-
getExternalIdsByOkIds(uids: OkUserId[]): Promise<ExternalParticipantId[]>;
|
|
48
48
|
getCachedOkIdByExternalId(externalId: ExternalId): ParticipantId | null;
|
|
49
49
|
getCachedRawOkIdByExternalId(externalId: ExternalId): OkUserId | null;
|
|
50
|
+
getCachedExternalIdByOkId(okId: OkUserId): ExternalParticipantId | null;
|
|
50
51
|
cacheExternalId(participantId: OkUserId | CompositeUserId | ParticipantId, externalId: ExternalParticipantId): void;
|
|
51
52
|
mapDecorativeId(decorativeId: OkUserId | CompositeUserId | ParticipantId, initialId: OkUserId | CompositeUserId | ParticipantId): void;
|
|
52
53
|
unmapDecorativeId(initialId: OkUserId | CompositeUserId | ParticipantId): void;
|
|
@@ -58,6 +59,5 @@ export default class Api extends BaseApi {
|
|
|
58
59
|
hangupConversation(conversationId: string, reason?: HangupType): void;
|
|
59
60
|
removeHistoryRecords(recordIds: number[]): Promise<void>;
|
|
60
61
|
cleanup(): void;
|
|
61
|
-
private _getExternalIdsByOkIds;
|
|
62
62
|
getServerTime(): Promise<number>;
|
|
63
63
|
}
|
|
@@ -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;
|