@vkontakte/calls-sdk 2.8.11-dev.a36ba1d7.0 → 2.8.11-dev.a9627477.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 +9 -13
- package/abstract/BaseSignaling.d.ts +3 -4
- package/calls-sdk.cjs.js +9 -9
- package/calls-sdk.esm.js +5514 -5343
- package/classes/CallRegistry.d.ts +26 -0
- package/classes/Conversation.d.ts +21 -6
- package/classes/MediaSource.d.ts +7 -0
- package/classes/SpecListener.d.ts +5 -0
- package/default/Api.d.ts +0 -5
- package/enums/SignalingNotification.d.ts +2 -1
- package/package.json +1 -1
- package/static/Capabilities.d.ts +5 -0
- package/static/External.d.ts +143 -71
- package/static/Params.d.ts +84 -70
- package/types/Capabilities.d.ts +24 -0
- package/types/Participant.d.ts +1 -0
- package/types/SignalingMessage.d.ts +5 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import Conversation from './Conversation';
|
|
2
|
+
import MediaSettings from '../types/MediaSettings';
|
|
3
|
+
export interface HoldableConversation extends Conversation {
|
|
4
|
+
id: string;
|
|
5
|
+
hold(hold: boolean, lastActiveMediaSettings?: MediaSettings): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export declare class CallRegistry {
|
|
8
|
+
private _conversations;
|
|
9
|
+
private _activeId;
|
|
10
|
+
private _mutex;
|
|
11
|
+
add(conversation: HoldableConversation): void;
|
|
12
|
+
remove(id: string | null): void;
|
|
13
|
+
get(id: string): HoldableConversation | undefined;
|
|
14
|
+
getActive(): HoldableConversation | null;
|
|
15
|
+
getFirstHeld(): HoldableConversation | null;
|
|
16
|
+
getActiveId(): string | null;
|
|
17
|
+
has(id: string): boolean;
|
|
18
|
+
getAll(): HoldableConversation[];
|
|
19
|
+
get callsLength(): number;
|
|
20
|
+
setActive(id: string): Promise<void>;
|
|
21
|
+
setHold(id: string): Promise<void>;
|
|
22
|
+
switchCall(id: string): Promise<void>;
|
|
23
|
+
clear(): void;
|
|
24
|
+
}
|
|
25
|
+
declare const callRegistry: CallRegistry;
|
|
26
|
+
export { callRegistry };
|
|
@@ -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 { IVideoDimentions } from '../types/MediaSettings';
|
|
19
|
+
import MediaSettings, { 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,6 +37,9 @@ export default class Conversation extends EventEmitter {
|
|
|
37
37
|
private _conversation;
|
|
38
38
|
private _myLastRequestedLayouts;
|
|
39
39
|
private _state;
|
|
40
|
+
private _previousState;
|
|
41
|
+
/** Если пользователь в зале ожидания, холд должен вызываться после промоута */
|
|
42
|
+
private _waitingHallHoldPending;
|
|
40
43
|
private _participantState;
|
|
41
44
|
private _participants;
|
|
42
45
|
private _pendingParticipants;
|
|
@@ -52,10 +55,8 @@ export default class Conversation extends EventEmitter {
|
|
|
52
55
|
private _isRealTimeAsrRequested;
|
|
53
56
|
private _serverSettings;
|
|
54
57
|
private _serverTimeOffset;
|
|
55
|
-
private
|
|
56
|
-
private
|
|
57
|
-
private static _delayedHangup;
|
|
58
|
-
private static _abortController;
|
|
58
|
+
private _delayedHangup;
|
|
59
|
+
private _abortController;
|
|
59
60
|
private readonly _onUnload;
|
|
60
61
|
private readonly _audioOutput;
|
|
61
62
|
private readonly _stats;
|
|
@@ -73,6 +74,10 @@ export default class Conversation extends EventEmitter {
|
|
|
73
74
|
static current(): Conversation | null;
|
|
74
75
|
static hangupAfterInit(): void;
|
|
75
76
|
static id(): string | null;
|
|
77
|
+
get id(): string;
|
|
78
|
+
get externalId(): ExternalParticipantId | undefined;
|
|
79
|
+
get mediaSettings(): MediaSettings | undefined;
|
|
80
|
+
get isCallHeld(): boolean;
|
|
76
81
|
static debugSessionId(): string | null;
|
|
77
82
|
static getSyncedTime(): number;
|
|
78
83
|
get debugSessionId(): string | null;
|
|
@@ -206,7 +211,12 @@ export default class Conversation extends EventEmitter {
|
|
|
206
211
|
*/
|
|
207
212
|
changePriorities(priorities: ParticipantPriority[]): Promise<void>;
|
|
208
213
|
changeParticipantState(state: ParticipantStateData, compositeUserId?: CompositeUserId): Promise<void>;
|
|
209
|
-
hold(hold: boolean): Promise<void>;
|
|
214
|
+
hold(hold: boolean, lastActiveMediaSettings?: MediaSettings): Promise<void>;
|
|
215
|
+
private _holdLocally;
|
|
216
|
+
private _resumeLocalMedia;
|
|
217
|
+
private _restoreStateAfterHold;
|
|
218
|
+
private _isWaitingForPromotion;
|
|
219
|
+
private _getWaitingForPromotionStatus;
|
|
210
220
|
putHandsDown(): Promise<void>;
|
|
211
221
|
requestKeyFrame(participantStreamDescription: ParticipantStreamDescription): Promise<void | SignalingMessage>;
|
|
212
222
|
requestTestMode(consumerCommand: string, producerCommand: string): Promise<void>;
|
|
@@ -351,6 +361,7 @@ export default class Conversation extends EventEmitter {
|
|
|
351
361
|
private _onPinParticipant;
|
|
352
362
|
private _onOptionsChanged;
|
|
353
363
|
private _onNetworkStatus;
|
|
364
|
+
private _emitHeldParticipantsStatus;
|
|
354
365
|
private _onRemoteStreamSecond;
|
|
355
366
|
/**
|
|
356
367
|
* Коллбек, вызывающийся при получении/остановке стрима от AnimojiReceiver
|
|
@@ -371,6 +382,7 @@ export default class Conversation extends EventEmitter {
|
|
|
371
382
|
private _onSpeakerChanged;
|
|
372
383
|
private _onTransportStateChanged;
|
|
373
384
|
private _onTransportLocalStateChanged;
|
|
385
|
+
private _areTransportParticipantsOnHold;
|
|
374
386
|
private _onRemoteTrackAdded;
|
|
375
387
|
private _onRemoteTrackRemoved;
|
|
376
388
|
private _removeAudioTrack;
|
|
@@ -400,6 +412,7 @@ export default class Conversation extends EventEmitter {
|
|
|
400
412
|
private _onFeedback;
|
|
401
413
|
private _onDecorativeParticipantIdChanged;
|
|
402
414
|
private _onVideoSuspendSuggest;
|
|
415
|
+
private _onParticipantHold;
|
|
403
416
|
private _isMe;
|
|
404
417
|
private _getMuteStatesForRoomId;
|
|
405
418
|
private _getMuteStatesForCurrentRoom;
|
|
@@ -409,6 +422,8 @@ export default class Conversation extends EventEmitter {
|
|
|
409
422
|
private _getParticipants;
|
|
410
423
|
private _getParticipant;
|
|
411
424
|
}
|
|
425
|
+
declare function _resetPendingInstance(): void;
|
|
426
|
+
export { _resetPendingInstance };
|
|
412
427
|
export declare class UpdateDisplayLayoutError extends Error {
|
|
413
428
|
readonly participantErrors: {
|
|
414
429
|
externalId: ExternalParticipantId;
|
package/classes/MediaSource.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export declare class MediaSource extends EventEmitter {
|
|
|
47
47
|
/** Трек аудио эффектов. Не изменяется на протяжении всего времени */
|
|
48
48
|
private _audioEffectsTrack;
|
|
49
49
|
private _mediaSettings;
|
|
50
|
+
private _lastMediaSettings;
|
|
50
51
|
private _videoStatusOnScreenCapturingEnabled;
|
|
51
52
|
private _effect;
|
|
52
53
|
private _audioEffectParams;
|
|
@@ -67,7 +68,11 @@ export declare class MediaSource extends EventEmitter {
|
|
|
67
68
|
getSendAudioTrack(): MediaStreamTrack | null;
|
|
68
69
|
get isAnimojiRequested(): boolean;
|
|
69
70
|
addTrackToPeerConnection(pc: RTCPeerConnection, observer: boolean, noDataChannel: boolean): void;
|
|
71
|
+
/**
|
|
72
|
+
* @deprecated Используйте гетер mediaSettings
|
|
73
|
+
*/
|
|
70
74
|
getMediaSettings(): MediaSettings;
|
|
75
|
+
get mediaSettings(): MediaSettings;
|
|
71
76
|
changeDevice(kind: MediaDeviceKind): Promise<void>;
|
|
72
77
|
/**
|
|
73
78
|
* Установка кастомного стрима для видео, например внешний шаринг экрана
|
|
@@ -95,6 +100,8 @@ export declare class MediaSource extends EventEmitter {
|
|
|
95
100
|
private _setEffect;
|
|
96
101
|
private _stopEffect;
|
|
97
102
|
destroy(): void;
|
|
103
|
+
stopLocalMedia(): Promise<void>;
|
|
104
|
+
resumeLocalMedia(lastActiveMediaSettings?: MediaSettings): Promise<void>;
|
|
98
105
|
toggleScreenCapturing(settings: ScreenCaptureSettings): Promise<void>;
|
|
99
106
|
disableScreenCapturing(): Promise<void>;
|
|
100
107
|
private videoTrackMuteHandler;
|
|
@@ -12,12 +12,17 @@ export default class SpecListener extends EventEmitter {
|
|
|
12
12
|
private readonly _debug;
|
|
13
13
|
private readonly _logger;
|
|
14
14
|
private _connectionTimeout;
|
|
15
|
+
private _connectionTimeoutSuppressed;
|
|
15
16
|
private _volumeTimeout;
|
|
16
17
|
constructor(transport: Transport, volumesDetector: VolumesDetector, participants: Record<ParticipantId, Participant>, debug?: DebugLogger, logger?: StatsLogger | null);
|
|
17
18
|
destroy(): void;
|
|
18
19
|
onChangeRemoteMediaSettings(participantId: ParticipantId, mediaSettings: MediaSettings): void;
|
|
20
|
+
onParticipantHoldChanged(): void;
|
|
21
|
+
private _getConnectionTimeout;
|
|
22
|
+
private _getVolumeTimeout;
|
|
19
23
|
private _onTransportStateChanged;
|
|
20
24
|
private _onVolumesDetected;
|
|
21
25
|
private _onConnectionTimeout;
|
|
26
|
+
private _reportConnectionTimeout;
|
|
22
27
|
private _onVolumeTimeout;
|
|
23
28
|
}
|
package/default/Api.d.ts
CHANGED
|
@@ -13,11 +13,6 @@ 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;
|
|
21
16
|
logClientStats(items: ClientStats[]): void;
|
|
22
17
|
logClientEvents(items: ClientEvent[]): void;
|
|
23
18
|
uploadDebugLogs(conversationId: string, startTime: number, endTime: number, log: string): Promise<void>;
|
|
@@ -50,6 +50,7 @@ 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"
|
|
53
|
+
VIDEO_SUSPEND_SUGGEST = "video-suspend-suggest",
|
|
54
|
+
HOLD = "hold"
|
|
54
55
|
}
|
|
55
56
|
export default SignalingNotification;
|
package/package.json
CHANGED