@vkontakte/calls-sdk 2.5.3-dev.d006735.0 → 2.6.1
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 +15 -4
- package/abstract/BaseSignaling.d.ts +4 -1
- package/calls-sdk.cjs.js +9 -9
- package/calls-sdk.esm.js +9 -9
- package/classes/Conversation.d.ts +21 -3
- package/classes/Conversation.test.d.ts +1 -0
- package/classes/SpeakerDetector.d.ts +4 -5
- package/classes/VolumesDetector.d.ts +1 -1
- package/classes/codec/IDecoder.d.ts +1 -1
- package/classes/codec/WebCodecsDecoder.d.ts +1 -1
- package/classes/screenshare/BaseRenderer.d.ts +8 -0
- package/classes/screenshare/CanvasRenderer.d.ts +16 -0
- package/classes/screenshare/StreamBuilder.d.ts +1 -9
- package/classes/screenshare/TrackGeneratorRenderer.d.ts +10 -0
- package/classes/transport/DirectTransport.d.ts +1 -1
- package/classes/transport/Transport.d.ts +2 -4
- package/default/Signaling.d.ts +4 -1
- package/enums/CallDirection.d.ts +1 -1
- package/enums/HangupType.d.ts +2 -1
- package/enums/MuteState.d.ts +1 -1
- package/enums/ParticipantState.d.ts +1 -1
- package/enums/SignalingCommandType.d.ts +2 -0
- package/enums/SignalingNotification.d.ts +1 -1
- package/enums/UserType.d.ts +1 -1
- package/package.json +1 -2
- package/static/External.d.ts +34 -7
- package/static/Params.d.ts +60 -9
- package/static/Utils.d.ts +7 -10
- package/static/Utils.test.d.ts +1 -0
- package/types/ConversationParams.d.ts +4 -0
- package/types/ExternalId.d.ts +21 -1
- package/types/Participant.d.ts +13 -1
- package/types/ParticipantListChunk.d.ts +13 -0
- package/types/SignalingMessage.d.ts +26 -8
- package/types/WaitingHall.d.ts +13 -0
- package/worker/WebCodecsDecoderWorker.d.ts +1 -1
package/types/ExternalId.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import MediaOption from '../enums/MediaOption';
|
|
|
2
2
|
import { ParticipantStatus } from '../static/External';
|
|
3
3
|
import MediaSettings from './MediaSettings';
|
|
4
4
|
import MuteStates from './MuteStates';
|
|
5
|
-
import { ParticipantStateMapped } from './Participant';
|
|
5
|
+
import { ParticipantListMarker, ParticipantListType, ParticipantStateMapped } from './Participant';
|
|
6
6
|
import SignalingMessage from './SignalingMessage';
|
|
7
7
|
/**
|
|
8
8
|
* Тип внешнего пользователя
|
|
@@ -42,6 +42,11 @@ export interface ExternalId {
|
|
|
42
42
|
* Тип пользователя
|
|
43
43
|
*/
|
|
44
44
|
type: ExternalIdType;
|
|
45
|
+
/**
|
|
46
|
+
* Пользователь является наблюдателем звонка
|
|
47
|
+
* @hidden
|
|
48
|
+
*/
|
|
49
|
+
observer?: boolean;
|
|
45
50
|
}
|
|
46
51
|
/**
|
|
47
52
|
* Идентификатор участника звонка
|
|
@@ -52,6 +57,14 @@ export interface ExternalParticipantId extends ExternalId {
|
|
|
52
57
|
*/
|
|
53
58
|
deviceIdx: number;
|
|
54
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Маркер определяющий положение участника в списке
|
|
62
|
+
*/
|
|
63
|
+
export declare type ExternalParticipantListMarker = Required<ParticipantListMarker>;
|
|
64
|
+
/**
|
|
65
|
+
* Словарь сопоставляющий тип списка участников с маркером (положением участника в списке)
|
|
66
|
+
*/
|
|
67
|
+
export declare type ExternalParticipantListMarkers = Record<ParticipantListType, ExternalParticipantListMarker>;
|
|
55
68
|
/**
|
|
56
69
|
* Участник звонка
|
|
57
70
|
*/
|
|
@@ -80,4 +93,11 @@ export interface ExternalParticipant {
|
|
|
80
93
|
* Разрешения на включение устройств
|
|
81
94
|
*/
|
|
82
95
|
unmuteOptions: MediaOption[];
|
|
96
|
+
markers?: ExternalParticipantListMarkers;
|
|
97
|
+
}
|
|
98
|
+
export interface ExternalParticipantListChunk {
|
|
99
|
+
participants: ExternalParticipant[];
|
|
100
|
+
countBefore: number;
|
|
101
|
+
countAfter: number;
|
|
102
|
+
markerFound: boolean;
|
|
83
103
|
}
|
package/types/Participant.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import ParticipantState from '../enums/ParticipantState';
|
|
|
3
3
|
import UserRole from '../enums/UserRole';
|
|
4
4
|
import { ParticipantStatus } from '../static/External';
|
|
5
5
|
import MediaSettings from '../types/MediaSettings';
|
|
6
|
-
import { ExternalParticipantId } from './ExternalId';
|
|
6
|
+
import { ExternalId, ExternalParticipantId, ExternalParticipantListMarkers } from './ExternalId';
|
|
7
7
|
import MuteStates from './MuteStates';
|
|
8
8
|
import ParticipantLayout from './ParticipantLayout';
|
|
9
9
|
/**
|
|
@@ -16,6 +16,13 @@ export declare type CompositeUserId = string;
|
|
|
16
16
|
*/
|
|
17
17
|
export declare type ParticipantId = string;
|
|
18
18
|
export declare type OkUserId = number;
|
|
19
|
+
export declare type ParticipantListType = 'GRID' | 'SIDE' | 'ADMIN';
|
|
20
|
+
export interface ParticipantListMarker {
|
|
21
|
+
rank?: number;
|
|
22
|
+
ts?: number;
|
|
23
|
+
id?: CompositeUserId;
|
|
24
|
+
}
|
|
25
|
+
export declare type ParticipantListMarkers = Record<ParticipantListType, ParticipantListMarker>;
|
|
19
26
|
/**
|
|
20
27
|
* Стейт участника звонка
|
|
21
28
|
*/
|
|
@@ -46,4 +53,9 @@ export interface Participant {
|
|
|
46
53
|
};
|
|
47
54
|
muteStates: MuteStates;
|
|
48
55
|
unmuteOptions: MediaOption[];
|
|
56
|
+
observedIds: CompositeUserId[];
|
|
57
|
+
markers?: ExternalParticipantListMarkers;
|
|
58
|
+
}
|
|
59
|
+
export interface IGetParticipantsParameters {
|
|
60
|
+
externalIds: ExternalId[];
|
|
49
61
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ParticipantListMarker, ParticipantListType } from './Participant';
|
|
2
|
+
export interface ParticipantListChunkParameters {
|
|
3
|
+
listType: ParticipantListType;
|
|
4
|
+
count: number;
|
|
5
|
+
/** Anchor in sorted list to start from. Mutually exclusive with "fromIdx" */
|
|
6
|
+
fromMarker?: ParticipantListMarker;
|
|
7
|
+
/** Position in sorted list to start from (0-based). Mutually exclusive with "fromMarker" */
|
|
8
|
+
fromIdx?: number;
|
|
9
|
+
/** If true then list is to be iterated in reverse order */
|
|
10
|
+
backward?: boolean;
|
|
11
|
+
/** If true then resulting chunk will start from Participant with specified marker, if such Participant (still) exists */
|
|
12
|
+
includeMarker?: boolean;
|
|
13
|
+
}
|
|
@@ -10,9 +10,9 @@ import UserType from '../enums/UserType';
|
|
|
10
10
|
import MediaModifiers from './MediaModifiers';
|
|
11
11
|
import MediaSettings from './MediaSettings';
|
|
12
12
|
import MuteStates from './MuteStates';
|
|
13
|
-
import { OkUserId, ParticipantId } from './Participant';
|
|
13
|
+
import { CompositeUserId, OkUserId, ParticipantId, ParticipantListMarker as ParticipantParticipantListMarker, ParticipantListMarkers, ParticipantListType as ParticipantParticipantListType } from './Participant';
|
|
14
14
|
import VideoSettings from './VideoSettings';
|
|
15
|
-
import {
|
|
15
|
+
import { ChatRoom } from './WaitingHall';
|
|
16
16
|
declare type SignalingMessage = Record<string, any>;
|
|
17
17
|
export declare type RecordInfo = {
|
|
18
18
|
initiator: ParticipantId;
|
|
@@ -31,6 +31,8 @@ declare namespace SignalingMessage {
|
|
|
31
31
|
id: number;
|
|
32
32
|
type?: string;
|
|
33
33
|
}
|
|
34
|
+
export type ParticipantListType = ParticipantParticipantListType;
|
|
35
|
+
export type ParticipantListMarker = ParticipantParticipantListMarker;
|
|
34
36
|
export interface Participant {
|
|
35
37
|
id: OkUserId;
|
|
36
38
|
idType?: UserType;
|
|
@@ -50,6 +52,14 @@ declare namespace SignalingMessage {
|
|
|
50
52
|
restricted?: boolean;
|
|
51
53
|
muteStates?: MuteStates;
|
|
52
54
|
unmuteOptions?: MediaOption[];
|
|
55
|
+
markers?: ParticipantListMarkers;
|
|
56
|
+
observedIds?: CompositeUserId[];
|
|
57
|
+
}
|
|
58
|
+
export interface ParticipantListChunk extends Notification {
|
|
59
|
+
participants: (Participant & Required<Pick<Participant, 'markers'>>)[];
|
|
60
|
+
countBefore: number;
|
|
61
|
+
countAfter: number;
|
|
62
|
+
markerFound: boolean;
|
|
53
63
|
}
|
|
54
64
|
interface Conversation {
|
|
55
65
|
id: string;
|
|
@@ -76,7 +86,10 @@ declare namespace SignalingMessage {
|
|
|
76
86
|
participantType: UserType;
|
|
77
87
|
deviceIdx?: number;
|
|
78
88
|
peerId: PeerId;
|
|
79
|
-
data:
|
|
89
|
+
data: {
|
|
90
|
+
candidate?: RTCIceCandidateInit;
|
|
91
|
+
sdp?: RTCSessionDescriptionInit;
|
|
92
|
+
};
|
|
80
93
|
}
|
|
81
94
|
export interface RegisteredPeer extends Notification {
|
|
82
95
|
participantId: OkUserId;
|
|
@@ -99,6 +112,7 @@ declare namespace SignalingMessage {
|
|
|
99
112
|
deviceIdx?: number;
|
|
100
113
|
peerId: PeerId;
|
|
101
114
|
reason: HangupType;
|
|
115
|
+
markers?: ParticipantListMarkers;
|
|
102
116
|
}
|
|
103
117
|
export interface ClosedConversation extends Notification {
|
|
104
118
|
reason: HangupType;
|
|
@@ -109,6 +123,7 @@ declare namespace SignalingMessage {
|
|
|
109
123
|
deviceIdx?: number;
|
|
110
124
|
peerId: PeerId;
|
|
111
125
|
mediaSettings: Partial<MediaSettings>;
|
|
126
|
+
markers?: ParticipantListMarkers;
|
|
112
127
|
}
|
|
113
128
|
export interface ParticipantStateChanged extends Notification {
|
|
114
129
|
participantId: OkUserId;
|
|
@@ -120,6 +135,7 @@ declare namespace SignalingMessage {
|
|
|
120
135
|
state: Record<string, string>;
|
|
121
136
|
stateUpdateTs: Record<string, number>;
|
|
122
137
|
};
|
|
138
|
+
markers?: ParticipantListMarkers;
|
|
123
139
|
}
|
|
124
140
|
export interface RolesChanged extends Notification {
|
|
125
141
|
adminId: ParticipantId;
|
|
@@ -227,11 +243,11 @@ declare namespace SignalingMessage {
|
|
|
227
243
|
}
|
|
228
244
|
export interface ChatRoomUpdated extends Notification {
|
|
229
245
|
eventType: ChatRoomEventType;
|
|
230
|
-
totalCount:
|
|
231
|
-
firstParticipants
|
|
232
|
-
addedParticipantIds
|
|
233
|
-
removedParticipantIds
|
|
234
|
-
feedback
|
|
246
|
+
totalCount: ChatRoom['totalCount'];
|
|
247
|
+
firstParticipants?: ChatRoom['firstParticipants'];
|
|
248
|
+
addedParticipantIds?: ParticipantId[];
|
|
249
|
+
removedParticipantIds?: ParticipantId[];
|
|
250
|
+
feedback?: ChatRoom['feedback'];
|
|
235
251
|
}
|
|
236
252
|
export interface VideoQualityUpdate extends Notification {
|
|
237
253
|
quality: {
|
|
@@ -254,6 +270,8 @@ declare namespace SignalingMessage {
|
|
|
254
270
|
isConcurrent: boolean;
|
|
255
271
|
peerId: PeerId;
|
|
256
272
|
mediaModifiers: MediaModifiers;
|
|
273
|
+
participants?: ParticipantListChunk;
|
|
274
|
+
chatRoom?: ChatRoom;
|
|
257
275
|
}
|
|
258
276
|
export {};
|
|
259
277
|
}
|
package/types/WaitingHall.d.ts
CHANGED
|
@@ -9,6 +9,19 @@ export declare type WaitingParticipant = {
|
|
|
9
9
|
id: WaitingParticipantId;
|
|
10
10
|
externalId?: SignalingMessage.ExternalId;
|
|
11
11
|
};
|
|
12
|
+
export declare type Feedback = {
|
|
13
|
+
key: string;
|
|
14
|
+
totalCount: number;
|
|
15
|
+
currentCount: number;
|
|
16
|
+
timeout: number;
|
|
17
|
+
participantIds: CompositeUserId[];
|
|
18
|
+
};
|
|
19
|
+
export declare type ChatRoom = {
|
|
20
|
+
totalCount: number;
|
|
21
|
+
firstParticipants?: WaitingParticipant[];
|
|
22
|
+
handCount?: number;
|
|
23
|
+
feedback?: Feedback[];
|
|
24
|
+
};
|
|
12
25
|
/**
|
|
13
26
|
* Ответ на запрос `getWaitingHall`
|
|
14
27
|
*/
|