@vkontakte/calls-sdk 2.5.3-beta.9 → 2.5.3-dev.18fb1f2.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.
@@ -12,12 +12,14 @@ import UpdateDisplayLayoutErrorReason from '../enums/UpdateDisplayLayoutErrorRea
12
12
  import UserRole from '../enums/UserRole';
13
13
  import UserType from '../enums/UserType';
14
14
  import { JSONObject } from '../static/Json';
15
- import { ExternalParticipantId, ExternalUserId } from '../types/ExternalId';
15
+ import { ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalUserId } from '../types/ExternalId';
16
16
  import MediaModifiers from '../types/MediaModifiers';
17
17
  import { IVideoDimentions } from '../types/MediaSettings';
18
+ import { IAddMovieParams } from '../types/MovieShare';
18
19
  import MuteStates from '../types/MuteStates';
19
- import { CompositeUserId, OkUserId, ParticipantId } from '../types/Participant';
20
+ import { CompositeUserId, IGetParticipantsParameters, OkUserId, ParticipantId } from '../types/Participant';
20
21
  import { ParticipantLayout } from '../types/ParticipantLayout';
22
+ import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
21
23
  import ParticipantPriority from '../types/ParticipantPriority';
22
24
  import { ParticipantStreamDescription } from '../types/ParticipantStreamDescription';
23
25
  import SignalingMessage, { RecordInfo } from '../types/SignalingMessage';
@@ -128,6 +130,7 @@ export default class Conversation extends EventEmitter {
128
130
  private _close;
129
131
  destroy(): void;
130
132
  private _getConversationParams;
133
+ private _addGeoParamsToEndpoint;
131
134
  /**
132
135
  * @throws ErrorEvent
133
136
  */
@@ -146,7 +149,21 @@ export default class Conversation extends EventEmitter {
146
149
  private _updateConversation;
147
150
  private _createMediaSource;
148
151
  private _connectSignaling;
152
+ private _processConnection;
153
+ private _prepareParticipants;
154
+ private _onConversationParticipantListChunk;
155
+ private _participantListChunkToExternalChunk;
156
+ private _registerConnectionParticipants;
149
157
  private _registerParticipants;
158
+ private _getClientType;
159
+ private _getStatusByTransportState;
160
+ private _registerParticipantInCache;
161
+ private _getExistedParticipantByIdOrCreate;
162
+ private _getExternalIdByParticipantId;
163
+ private _registerParticipantAndSetMarkersIfChunkEnabled;
164
+ private _warnParticipantNotInConversation;
165
+ private _setParticipantMarkers;
166
+ private _denormalizeMarkers;
150
167
  /**
151
168
  * Обрабатывает данные connection из сигналинга. Должен вызываться после `_registerParticipants`
152
169
  *
@@ -182,6 +199,7 @@ export default class Conversation extends EventEmitter {
182
199
  [key: string]: string;
183
200
  }): Promise<void>;
184
201
  requestKeyFrame(participantStreamDescription: ParticipantStreamDescription): Promise<void | SignalingMessage>;
202
+ requestTestMode(consumerCommand: string, producerCommand: string): Promise<void>;
185
203
  updateDisplayLayout(layouts: ParticipantLayout[]): Promise<void>;
186
204
  private _stopStreaming;
187
205
  private _sendUpdateDisplayLayout;
@@ -191,6 +209,9 @@ export default class Conversation extends EventEmitter {
191
209
  private _onParticipantSourcesUpdate;
192
210
  private _onParticipantPromoted;
193
211
  private _onChatRoomUpdated;
212
+ private _onSharedMovieUpdate;
213
+ private _onSharedMovieInfoStarted;
214
+ private _onSharedMovieInfoStopped;
194
215
  private _waitForStreamIfNeeded;
195
216
  private _matchStreamDescription;
196
217
  private _getWaitingTime;
@@ -214,11 +235,11 @@ export default class Conversation extends EventEmitter {
214
235
  customData(data: JSONObject, participantId?: ParticipantId | null): Promise<void>;
215
236
  createJoinLink(): Promise<string>;
216
237
  removeJoinLink(): Promise<never>;
217
- addMovie(movieId: string): Promise<{
238
+ addMovie({ movieId, gain }: IAddMovieParams): Promise<{
218
239
  movieId: string;
219
240
  streamType: string;
220
241
  }>;
221
- updateMovie(movieId: string, gain?: number, offset?: string, pause?: boolean): Promise<void>;
242
+ updateMovie(movieId: string, gain?: number, offset?: number, pause?: boolean): Promise<void>;
222
243
  removeMovie(movieId: string): Promise<void>;
223
244
  startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null): Promise<SignalingMessage>;
224
245
  stopStream(): Promise<SignalingMessage>;
@@ -231,6 +252,8 @@ export default class Conversation extends EventEmitter {
231
252
  effect: IVideoDimentions;
232
253
  }): Promise<void>;
233
254
  videoEffect(effect: IEffect | null): Promise<void>;
255
+ getParticipants(parameters: IGetParticipantsParameters): Promise<ExternalParticipant[]>;
256
+ getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<ExternalParticipantListChunk>;
234
257
  private _onLocalMediaStreamChanged;
235
258
  private _onScreenSharingStatus;
236
259
  private _changeRemoteMediaSettings;
@@ -0,0 +1 @@
1
+ import 'jasmine-ajax';
@@ -55,6 +55,7 @@ export declare class Transport extends EventEmitter {
55
55
  isAllocated(participantId: ParticipantId): boolean;
56
56
  allocated(): string[];
57
57
  opened(): string[];
58
+ getState(): TransportState;
58
59
  private _setStates;
59
60
  private _setState;
60
61
  private _setLocalState;
@@ -13,6 +13,7 @@ import MediaModifiers from '../types/MediaModifiers';
13
13
  import MediaSettings from '../types/MediaSettings';
14
14
  import MuteStates from '../types/MuteStates';
15
15
  import { CompositeUserId, ParticipantId } from '../types/Participant';
16
+ import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
16
17
  import SignalingMessage from '../types/SignalingMessage';
17
18
  import { WaitingParticipantId } from '../types/WaitingHall';
18
19
  export default class Signaling extends BaseSignaling {
@@ -72,7 +73,7 @@ export default class Signaling extends BaseSignaling {
72
73
  getNextCommandSequenceNumber(): number;
73
74
  hangup(reason: string): Promise<SignalingMessage | void>;
74
75
  sendCandidate(participantId: ParticipantId, candidate: RTCIceCandidate): Promise<SignalingMessage>;
75
- requestTestMode(command: string): Promise<SignalingMessage>;
76
+ requestTestMode(consumerCommand: string, producerCommand: string): Promise<SignalingMessage>;
76
77
  sendSdp(participantId: ParticipantId, sdp: RTCSessionDescription): Promise<SignalingMessage>;
77
78
  acceptCall(mediaSettings: MediaSettings): Promise<SignalingMessage>;
78
79
  changeMediaSettings(mediaSettings: MediaSettings): Promise<SignalingMessage>;
@@ -124,6 +125,8 @@ export default class Signaling extends BaseSignaling {
124
125
  * что все подписчики готовы принимать сообщения от сигналинга.
125
126
  */
126
127
  readyToSend(): void;
128
+ getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<SignalingMessage>;
129
+ getParticipants(externalIds: SignalingMessage.ExternalId[]): Promise<SignalingMessage>;
127
130
  protected _connect(connectionType: SignalingConnectionType): void;
128
131
  protected _disconnect(): void;
129
132
  private _onOpen;
@@ -22,6 +22,7 @@ declare enum HangupType {
22
22
  SERVICE_DISABLED = "SERVICE_DISABLED",
23
23
  EXTERNAL_API_ERROR = "EXTERNAL_API_ERROR",
24
24
  SOCKET_CLOSED = "SOCKET_CLOSED",
25
- ENDED = "ENDED"
25
+ ENDED = "ENDED",
26
+ KILLED_WITHOUT_DELETE = "KILLED_WITHOUT_DELETE"
26
27
  }
27
28
  export default HangupType;
@@ -28,6 +28,8 @@ declare enum SignalingCommandType {
28
28
  UPDATE_MEDIA_MODIFIERS = "update-media-modifiers",
29
29
  CHANGE_OPTIONS = "change-options",
30
30
  GET_WAITING_HALL = "get-waiting-hall",
31
+ GET_PARTICIPANT_LIST_CHUNK = "get-participant-list-chunk",
32
+ GET_PARTICIPANTS = "get-participants",
31
33
  PROMOTE_PARTICIPANT = "promote-participant",
32
34
  REQUEST_TEST_MODE = "request-test-mode",
33
35
  ADD_MOVIE = "add-movie",
@@ -35,6 +35,10 @@ declare enum SignalingNotification {
35
35
  PROMOTE_PARTICIPANT = "promote-participant",
36
36
  CHAT_ROOM_UPDATED = "chat-room-updated",
37
37
  PROMOTION_APPROVED = "promotion-approved",
38
- JOIN_LINK_CHANGED = "join-link-changed"
38
+ JOIN_LINK_CHANGED = "join-link-changed",
39
+ MOVIE_UPDATE_NOTIFICATION = "movie-update-notification",
40
+ MOVIE_SHARE_INFO = "movie-share-info",
41
+ MOVIE_SHARE_STARTED = "movie-share-started",
42
+ MOVIE_SHARE_STOPPED = "movie-share-stopped"
39
43
  }
40
44
  export default SignalingNotification;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/calls-sdk",
3
- "version": "2.5.3-beta.9",
3
+ "version": "2.5.3-dev.18fb1f2.0",
4
4
  "author": "vk.com",
5
5
  "description": "Library for video calls based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -7,9 +7,10 @@ import ConversationOption from '../enums/ConversationOption';
7
7
  import FatalError from '../enums/FatalError';
8
8
  import MediaOption from '../enums/MediaOption';
9
9
  import UserRole from '../enums/UserRole';
10
- import { ExternalId, ExternalParticipant, ExternalParticipantId } from '../types/ExternalId';
10
+ import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalParticipantListMarkers } from '../types/ExternalId';
11
11
  import MediaModifiers from '../types/MediaModifiers';
12
12
  import MediaSettings from '../types/MediaSettings';
13
+ import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
13
14
  import MuteStates from '../types/MuteStates';
14
15
  import { ParticipantStateMapped } from '../types/Participant';
15
16
  import { DebugMessageType } from './Debug';
@@ -76,6 +77,29 @@ declare namespace External {
76
77
  * @param stream
77
78
  */
78
79
  function onRemoteLive(userId: ExternalParticipantId, streamName: string, stream: MediaStream | null): void;
80
+ /**
81
+ * Получен собственный стрим лайв.
82
+ * Если сервер закончил стримить собеседника, вместо стрима будет передан null
83
+ *
84
+ * @param userId
85
+ * @param streamName
86
+ * @param stream
87
+ */
88
+ function onLocalLive(userId: ExternalParticipantId, streamName: string, stream: MediaStream | null): void;
89
+ /**
90
+ * Получено обновление стрима или лайва от собеседника.
91
+ *
92
+ * @param userId
93
+ * @param data
94
+ */
95
+ function onRemoteLiveUpdate(userId: ExternalParticipantId, data: ISharedMovieState): void;
96
+ /**
97
+ * Получено обновление собственного стрима или лайва.
98
+ *
99
+ * @param userId
100
+ * @param data
101
+ */
102
+ function onLocalLiveUpdate(userId: ExternalParticipantId, data: ISharedMovieState): void;
79
103
  /**
80
104
  * Получен стрим с экрана собеседника.
81
105
  * Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
@@ -93,20 +117,76 @@ declare namespace External {
93
117
  * @param participants Список участников звонка (при `Params.batchParticipantsOnStart = true`)
94
118
  */
95
119
  function onConversation(userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[]): void;
120
+ /**
121
+ * Постраничные данные про участников при начале звонка
122
+ * @param chunk
123
+ */
124
+ function onConversationParticipantListChunk(chunk: ExternalParticipantListChunk): void;
96
125
  /**
97
126
  * Изменились данные стрима собеседника
98
127
  *
99
128
  * @param userId
100
129
  * @param mediaSettings
130
+ * @param markers
101
131
  */
102
- function onRemoteMediaSettings(userId: ExternalParticipantId, mediaSettings: MediaSettings): void;
132
+ function onRemoteMediaSettings(userId: ExternalParticipantId, mediaSettings: MediaSettings, markers?: ExternalParticipantListMarkers): void;
133
+ /**
134
+ * Изменились данные собственного стрима
135
+ *
136
+ * @param userId
137
+ * @param mediaSettings
138
+ */
139
+ function onLocalMediaSettings(userId: ExternalParticipantId, mediaSettings: MediaSettings): void;
140
+ /**
141
+ * Полученны данные по стримам (лайв/мувик) от собеседника
142
+ *
143
+ * @param userId
144
+ * @param sharedMovieInfo
145
+ */
146
+ function onRemoteSharedMovieInfo(userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo): void;
147
+ /**
148
+ * Полученны данные по остановленным стримам (лайв/мувик) от собеседника
149
+ *
150
+ * @param userId
151
+ * @param sharedMovieStoppedInfo
152
+ */
153
+ function onRemoteSharedMovieStoppedInfo(userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo): void;
154
+ /**
155
+ * Полученны данные по собственным стримам (лайв/мувик)
156
+ *
157
+ * @param userId
158
+ * @param sharedMovieInfo
159
+ */
160
+ function onLocalSharedMovieInfo(userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo): void;
161
+ /**
162
+ * Полученны данные по собственным остановленным стримам (лайв/мувик)
163
+ *
164
+ * @param userId
165
+ * @param sharedMovieStoppedInfo
166
+ */
167
+ function onLocalSharedMovieStoppedInfo(userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo): void;
168
+ /**
169
+ * Добавили участника
170
+ *
171
+ * @param userId
172
+ * @param markers
173
+ */
174
+ function onParticipantAdded(userId: ExternalId, markers?: ExternalParticipantListMarkers): void;
175
+ /**
176
+ * Участник подключился
177
+ *
178
+ * @param userId
179
+ * @param markers
180
+ */
181
+ function onParticipantJoined(userId: ExternalId, markers?: ExternalParticipantListMarkers): void;
103
182
  /**
104
183
  * Изменились данные состояний собеседника
105
184
  *
106
185
  * @param userId
107
186
  * @param participantState
187
+ * @param markers
108
188
  */
109
- function onRemoteParticipantState(userId: ExternalParticipantId, participantState: ParticipantStateMapped): void;
189
+ function onRemoteParticipantState(userId: ExternalParticipantId, participantState: ParticipantStateMapped, markers?: ExternalParticipantListMarkers): void;
110
190
  /**
111
191
  * Изменился статус соединения собеседников
112
192
  *
@@ -138,8 +218,9 @@ declare namespace External {
138
218
  * Пользователь отключился от звонка
139
219
  *
140
220
  * @param userId
221
+ * @param markers
141
222
  */
142
- function onRemoteRemoved(userId: ExternalParticipantId): void;
223
+ function onRemoteRemoved(userId: ExternalParticipantId, markers?: ExternalParticipantListMarkers): void;
143
224
  /**
144
225
  * Изменилось состояние звонка
145
226
  *
@@ -185,8 +266,9 @@ declare namespace External {
185
266
  *
186
267
  * @param userId Внешний ID пользователя
187
268
  * @param unpin Открепить или закрепить
269
+ * @param markers
188
270
  */
189
- function onPinnedParticipant(userId: ExternalParticipantId, unpin: boolean): void;
271
+ function onPinnedParticipant(userId: ExternalParticipantId, unpin: boolean, markers?: ExternalParticipantListMarkers): void;
190
272
  /**
191
273
  * Закрепляет/открепляет текущего пользователя у других собеседников
192
274
  *
@@ -319,5 +401,11 @@ declare namespace External {
319
401
  * @param firstParticipants Первые несколько ожидающих в зале
320
402
  */
321
403
  function onChatRoomUpdated(eventType: ChatRoomEventType, totalCount: number, firstParticipants: ExternalId[]): void;
404
+ /**
405
+ * Получен микшированный аудио стрим.
406
+ *
407
+ * @param stream стрим от WebRTC
408
+ */
409
+ function onRemoteMixedAudioStream(stream: MediaStream): void;
322
410
  }
323
411
  export default External;
@@ -7,10 +7,11 @@ import ConversationOption from '../enums/ConversationOption';
7
7
  import FatalError from '../enums/FatalError';
8
8
  import MediaOption from '../enums/MediaOption';
9
9
  import UserRole from '../enums/UserRole';
10
- import { ExternalId, ExternalParticipant, ExternalParticipantId } from '../types/ExternalId';
10
+ import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalParticipantListMarkers } from '../types/ExternalId';
11
11
  import IceServer from '../types/IceServer';
12
12
  import MediaModifiers from '../types/MediaModifiers';
13
13
  import MediaSettings from '../types/MediaSettings';
14
+ import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
14
15
  import MuteStates from '../types/MuteStates';
15
16
  import { ParticipantStateMapped } from '../types/Participant';
16
17
  import AuthData from './AuthData';
@@ -218,6 +219,19 @@ export declare type ParamsObject = {
218
219
  movieShare: boolean;
219
220
  filteredMessages: boolean;
220
221
  breakVideoPayloadTypes: boolean;
222
+ /**
223
+ * Включить постраничный вывод участников. Работает только если включено videoTracksCount (слоты)
224
+ */
225
+ useParticipantListChunk: boolean;
226
+ /**
227
+ * Индекс участника для первого chunk'а который придет при установки соединения с сервером
228
+ */
229
+ participantListChunkInitIndex: number;
230
+ /**
231
+ * Количество участников которые придут в первом chunk'е при установки соединения с сервером
232
+ * если параметр не проставлен то будет использоваться значение по умолчанию установленное на сервере
233
+ */
234
+ participantListChunkInitCount: number | null;
221
235
  /**
222
236
  * Включать RED-extension (redundancy) для групповых звонков
223
237
  */
@@ -242,6 +256,13 @@ export declare type ParamsObject = {
242
256
  * @hidden
243
257
  */
244
258
  muteMode: boolean;
259
+ /**
260
+ * Сохранять (не удалять) аудио дорожки в стримах, поступающих клиенту
261
+ * Позволяет клиенту получать и сохранять аудио данные
262
+ * Внимание: может привести к "двойному" звуку при проигрывании
263
+ * @hidden
264
+ */
265
+ preserveAudioTracks: boolean;
245
266
  /**
246
267
  * Получен локальный стрим с камеры/микрофона
247
268
  */
@@ -273,18 +294,63 @@ export declare type ParamsObject = {
273
294
  * Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
274
295
  */
275
296
  onRemoteLive?: (userId: ExternalParticipantId, streamId: string, stream: MediaStream | null) => void;
297
+ /**
298
+ * Получен собственный стрим трансляция или мувик.
299
+ * Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
300
+ */
301
+ onLocalLive?: (userId: ExternalParticipantId, streamId: string, stream: MediaStream | null) => void;
302
+ /**
303
+ * Получено обновление стрима или лайва от собеседника.
304
+ */
305
+ onRemoteLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState) => void;
306
+ /**
307
+ * Получено обновление собственного стрима или лайва.
308
+ */
309
+ onLocalLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState) => void;
276
310
  /**
277
311
  * Начат звонок
278
312
  */
279
313
  onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[]) => void;
314
+ /**
315
+ * Начальный список участников для постраничного звонка
316
+ */
317
+ onConversationParticipantListChunk?: (chunk: ExternalParticipantListChunk) => void;
280
318
  /**
281
319
  * Изменились данные стрима собеседника
282
320
  */
283
- onRemoteMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings) => void;
321
+ onRemoteMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings, markers?: ExternalParticipantListMarkers) => void;
322
+ /**
323
+ * Изменились данные стрима собеседника
324
+ */
325
+ onLocalMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings) => void;
326
+ /**
327
+ * Полученны данные по стримам (лайв/мувик) от собеседника
328
+ */
329
+ onRemoteSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo) => void;
330
+ /**
331
+ * Полученны данные по остановленным стримам (лайв/мувик) от собеседника
332
+ */
333
+ onRemoteSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo) => void;
334
+ /**
335
+ * Полученны данные по собственным стримам (лайв/мувик)
336
+ */
337
+ onLocalSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo) => void;
338
+ /**
339
+ * Полученны данные по собственным остановленным стримам (лайв/мувик)
340
+ */
341
+ onLocalSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo) => void;
342
+ /**
343
+ * Добавили участника
344
+ */
345
+ onParticipantAdded?: (userId: ExternalParticipantId, markers?: ExternalParticipantListMarkers) => void;
346
+ /**
347
+ * Участник присоединился к звонку
348
+ */
349
+ onParticipantJoined?: (userId: ExternalParticipantId, markers?: ExternalParticipantListMarkers) => void;
284
350
  /**
285
351
  * Изменились данные состояний собеседника
286
352
  */
287
- onRemoteParticipantState?: (userId: ExternalParticipantId, participantState: ParticipantStateMapped) => void;
353
+ onRemoteParticipantState?: (userId: ExternalParticipantId, participantState: ParticipantStateMapped, markers?: ExternalParticipantListMarkers) => void;
288
354
  /**
289
355
  * Изменился статус соединения собеседников
290
356
  */
@@ -305,7 +371,7 @@ export declare type ParamsObject = {
305
371
  /**
306
372
  * Пользователь отключился от звонка
307
373
  */
308
- onRemoteRemoved?: (userId: ExternalParticipantId) => void;
374
+ onRemoteRemoved?: (userId: ExternalParticipantId, markers?: ExternalParticipantListMarkers) => void;
309
375
  /**
310
376
  * Изменилось состояние звонка
311
377
  */
@@ -329,7 +395,7 @@ export declare type ParamsObject = {
329
395
  /**
330
396
  * Закрепляет/открепляет собеседника для всех
331
397
  */
332
- onPinnedParticipant?: (userId: ExternalParticipantId, unpin: boolean) => void;
398
+ onPinnedParticipant?: (userId: ExternalParticipantId, unpin: boolean, markers?: ExternalParticipantListMarkers) => void;
333
399
  /**
334
400
  * Закрепляет/открепляет текущего пользователя у других собеседников
335
401
  */
@@ -427,6 +493,12 @@ export declare type ParamsObject = {
427
493
  * @param firstParticipants Первые несколько ожидающих в зале
428
494
  */
429
495
  onChatRoomUpdated?: (eventType: ChatRoomEventType, totalCount: number, firstParticipants: ExternalId[]) => void;
496
+ /**
497
+ * Получен микшированный аудио стрим.
498
+ * @hidden
499
+ * @param stream стрим от WebRTC
500
+ */
501
+ onRemoteMixedAudioStream?: (stream: MediaStream) => void;
430
502
  };
431
503
  export default abstract class Params {
432
504
  private static _params;
@@ -514,9 +586,13 @@ export default abstract class Params {
514
586
  static get videoTracksCount(): number;
515
587
  static get breakVideoPayloadTypes(): boolean;
516
588
  static get filteredMessages(): boolean;
589
+ static get useParticipantListChunk(): boolean;
590
+ static get participantListChunkInitIndex(): number;
591
+ static get participantListChunkInitCount(): number;
517
592
  static get serverAudioRed(): boolean;
518
593
  static get p2pAudioRed(): boolean;
519
594
  static get batchParticipantsOnStart(): boolean;
520
595
  static get filterObservers(): boolean;
521
596
  static get muteMode(): boolean;
597
+ static get preserveAudioTracks(): boolean;
522
598
  }
@@ -6,5 +6,9 @@ declare type ConversationParams = {
6
6
  stun_server?: IceServer;
7
7
  client_type?: string;
8
8
  device_idx?: number;
9
+ isp_as_no?: number;
10
+ isp_as_org?: string;
11
+ loc_cc?: string;
12
+ loc_reg?: string;
9
13
  };
10
14
  export default ConversationParams;
@@ -1,8 +1,9 @@
1
1
  import MediaOption from '../enums/MediaOption';
2
2
  import { ParticipantStatus } from '../static/External';
3
3
  import MediaSettings from './MediaSettings';
4
+ import { ISharedMovieInfo } from './MovieShare';
4
5
  import MuteStates from './MuteStates';
5
- import { ParticipantStateMapped } from './Participant';
6
+ import { ParticipantListMarker, ParticipantListType, ParticipantStateMapped } from './Participant';
6
7
  import SignalingMessage from './SignalingMessage';
7
8
  /**
8
9
  * Тип внешнего пользователя
@@ -57,6 +58,14 @@ export interface ExternalParticipantId extends ExternalId {
57
58
  */
58
59
  deviceIdx: number;
59
60
  }
61
+ /**
62
+ * Маркер определяющий положение участника в списке
63
+ */
64
+ export declare type ExternalParticipantListMarker = Required<ParticipantListMarker>;
65
+ /**
66
+ * Словарь сопоставляющий тип списка участников с маркером (положением участника в списке)
67
+ */
68
+ export declare type ExternalParticipantListMarkers = Record<ParticipantListType, ExternalParticipantListMarker>;
60
69
  /**
61
70
  * Участник звонка
62
71
  */
@@ -85,4 +94,12 @@ export interface ExternalParticipant {
85
94
  * Разрешения на включение устройств
86
95
  */
87
96
  unmuteOptions: MediaOption[];
97
+ markers?: ExternalParticipantListMarkers;
98
+ movieShareInfos?: ISharedMovieInfo[];
99
+ }
100
+ export interface ExternalParticipantListChunk {
101
+ participants: ExternalParticipant[];
102
+ countBefore: number;
103
+ countAfter: number;
104
+ markerFound: boolean;
88
105
  }
@@ -19,7 +19,7 @@ export declare type MediaSettings = {
19
19
  export declare type VideoStreamInfo = {
20
20
  id: string;
21
21
  source: string;
22
- vkMovieId?: string;
22
+ externalMovieId?: string;
23
23
  };
24
24
  export default MediaSettings;
25
25
  export declare function compareMediaSettings(ms1: MediaSettings, ms2: MediaSettings): boolean;
@@ -0,0 +1,31 @@
1
+ import { ParticipantId } from './Participant';
2
+ export interface IAddMovieParams {
3
+ movieId: string;
4
+ gain?: number;
5
+ }
6
+ export declare type ISharedMovieStateResponse = [number, number, boolean, number, number];
7
+ export interface ISharedMovieState {
8
+ participantId: ParticipantId;
9
+ gain?: number;
10
+ pause?: boolean;
11
+ offset?: number;
12
+ duration?: number;
13
+ }
14
+ export interface ISharedMovieInfo {
15
+ movieId: string;
16
+ initiatorId: ParticipantId;
17
+ title: string;
18
+ source: string;
19
+ externalMovieId: string;
20
+ duration: number;
21
+ thumbnailNormal: string;
22
+ thumbnailMedium: string;
23
+ thumbnailBig: string;
24
+ thumbnailHigh: string;
25
+ thumbnailHd: string;
26
+ }
27
+ export interface ISharedMovieStoppedInfo {
28
+ movieId: string;
29
+ initiatorId: ParticipantId;
30
+ source: string;
31
+ }
@@ -3,7 +3,8 @@ 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
+ import { ISharedMovieInfo } from './MovieShare';
7
8
  import MuteStates from './MuteStates';
8
9
  import ParticipantLayout from './ParticipantLayout';
9
10
  /**
@@ -16,6 +17,13 @@ export declare type CompositeUserId = string;
16
17
  */
17
18
  export declare type ParticipantId = string;
18
19
  export declare type OkUserId = number;
20
+ export declare type ParticipantListType = 'GRID' | 'SIDE' | 'ADMIN';
21
+ export interface ParticipantListMarker {
22
+ rank?: number;
23
+ ts?: number;
24
+ id?: CompositeUserId;
25
+ }
26
+ export declare type ParticipantListMarkers = Record<ParticipantListType, ParticipantListMarker>;
19
27
  /**
20
28
  * Стейт участника звонка
21
29
  */
@@ -47,4 +55,9 @@ export interface Participant {
47
55
  muteStates: MuteStates;
48
56
  unmuteOptions: MediaOption[];
49
57
  observedIds: CompositeUserId[];
58
+ markers?: ExternalParticipantListMarkers;
59
+ movieShareInfos?: ISharedMovieInfo[];
60
+ }
61
+ export interface IGetParticipantsParameters {
62
+ externalIds: ExternalId[];
50
63
  }
@@ -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
+ }