@vkontakte/calls-sdk 2.6.2-dev.e7984c3.0 → 2.6.2-dev.ea88167.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.
@@ -15,7 +15,6 @@ import { JSONObject } from '../static/Json';
15
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';
19
18
  import MuteStates from '../types/MuteStates';
20
19
  import { CompositeUserId, IGetParticipantsParameters, OkUserId, ParticipantId } from '../types/Participant';
21
20
  import { ParticipantLayout } from '../types/ParticipantLayout';
@@ -155,6 +154,8 @@ export default class Conversation extends EventEmitter {
155
154
  private _participantListChunkToExternalChunk;
156
155
  private _registerConnectionParticipants;
157
156
  private _registerParticipants;
157
+ /** Установим состояние локальных мьютов */
158
+ private _registerParticipantLocalMuteState;
158
159
  private _getClientType;
159
160
  private _getStatusByTransportState;
160
161
  private _registerParticipantInCache;
@@ -204,14 +205,9 @@ export default class Conversation extends EventEmitter {
204
205
  private _stopStreaming;
205
206
  private _sendUpdateDisplayLayout;
206
207
  private _cleanupCooldownQueue;
207
- private static _isStopStreaming;
208
- private static _layoutToString;
209
208
  private _onParticipantSourcesUpdate;
210
209
  private _onParticipantPromoted;
211
210
  private _onChatRoomUpdated;
212
- private _onSharedMovieUpdate;
213
- private _onSharedMovieInfoStarted;
214
- private _onSharedMovieInfoStopped;
215
211
  private _waitForStreamIfNeeded;
216
212
  private _matchStreamDescription;
217
213
  private _getWaitingTime;
@@ -235,11 +231,11 @@ export default class Conversation extends EventEmitter {
235
231
  customData(data: JSONObject, participantId?: ParticipantId | null): Promise<void>;
236
232
  createJoinLink(): Promise<string>;
237
233
  removeJoinLink(): Promise<never>;
238
- addMovie({ movieId, gain }: IAddMovieParams): Promise<{
234
+ addMovie(movieId: string): Promise<{
239
235
  movieId: string;
240
236
  streamType: string;
241
237
  }>;
242
- updateMovie(movieId: string, gain?: number, offset?: number, pause?: boolean): Promise<void>;
238
+ updateMovie(movieId: string, gain?: number, offset?: string, pause?: boolean): Promise<void>;
243
239
  removeMovie(movieId: string): Promise<void>;
244
240
  startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null): Promise<SignalingMessage>;
245
241
  stopStream(): Promise<SignalingMessage>;
@@ -2,7 +2,9 @@ import { ParticipantStreamDescription } from '../types/ParticipantStreamDescript
2
2
  import SignalingMessage from '../types/SignalingMessage';
3
3
  export declare class ParticipantIdRegistry {
4
4
  private streamDescriptionByCompactId;
5
+ private compactIdByStreamDescription;
5
6
  getStreamDescription(compactedId: number): ParticipantStreamDescription | undefined;
7
+ getCompactId(streamDescription: string): number | undefined;
6
8
  handleMessage(data: ArrayBuffer): SignalingMessage | null;
7
9
  private _createParticipantSourcesUpdateNotification;
8
10
  }
@@ -0,0 +1,17 @@
1
+ import ParticipantLayout, { RequestKeyFrame, StopStream } from '../types/ParticipantLayout';
2
+ import SignalingMessage from '../types/SignalingMessage';
3
+ import { ParticipantIdRegistry } from './ParticipantIdRegistry';
4
+ import { PerfStatReport } from './transport/PerfStatReporter';
5
+ export declare class ProducerCommandSerializationService {
6
+ private participantIdRegistry;
7
+ setParticipantIdRegistry(participantIdRegistry: ParticipantIdRegistry): void;
8
+ serializeUpdateDisplayLayout(sequenceNumber: number, layouts: {
9
+ [key: string]: ParticipantLayout | StopStream | RequestKeyFrame;
10
+ }): ArrayBuffer;
11
+ private writeLayout;
12
+ private writeStreamDesc;
13
+ serializePerfStatReport(sequenceNumber: number, report: PerfStatReport): ArrayBuffer;
14
+ deserializeCommandResponse(data: BufferSource): SignalingMessage | undefined;
15
+ private deserializeUpdateDisplayLayoutResponse;
16
+ private deserializeReportPerfStatResponse;
17
+ }
@@ -3,6 +3,7 @@ export default class ScreenCaptureSender {
3
3
  private readonly _datachannel;
4
4
  private _destroyed;
5
5
  private _needKeyframe;
6
+ private readonly DATA_SIZE;
6
7
  constructor(track: MediaStreamTrack, datachannel: RTCDataChannel);
7
8
  private _requestFrame;
8
9
  private _wrapHeader;
@@ -1,3 +1,4 @@
1
+ export declare const HEADER_SIZE = 11;
1
2
  export interface FrameChunkHeader {
2
3
  timestamp: number;
3
4
  start: boolean;
@@ -11,9 +11,9 @@ import UserRole from '../enums/UserRole';
11
11
  import { JSONObject } from '../static/Json';
12
12
  import MediaModifiers from '../types/MediaModifiers';
13
13
  import MediaSettings from '../types/MediaSettings';
14
- import { IAddMovieParams, ISharedMovieState } from '../types/MovieShare';
15
14
  import MuteStates from '../types/MuteStates';
16
15
  import { CompositeUserId, ParticipantId } from '../types/Participant';
16
+ import ParticipantLayout, { RequestKeyFrame, StopStream } from '../types/ParticipantLayout';
17
17
  import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
18
18
  import SignalingMessage from '../types/SignalingMessage';
19
19
  import { WaitingParticipantId } from '../types/WaitingHall';
@@ -41,6 +41,7 @@ export default class Signaling extends BaseSignaling {
41
41
  private producerNotificationDataChannel;
42
42
  private producerCommandDataChannel;
43
43
  private producerCommandDataChannelEnabled;
44
+ private producerCommandSerializationService;
44
45
  private static readonly RECONNECT_DELAY;
45
46
  private static readonly RECONNECT_MAX_DELAY;
46
47
  private static readonly RECONNECT_MAX_COUNT;
@@ -92,11 +93,11 @@ export default class Signaling extends BaseSignaling {
92
93
  changePriorities(priorities: {
93
94
  [key: string]: number;
94
95
  }): Promise<SignalingMessage | void>;
95
- updateDisplayLayout(layout: {
96
- [key: string]: string;
96
+ updateDisplayLayout(layouts: {
97
+ [streamDesc: string]: ParticipantLayout | StopStream | RequestKeyFrame;
97
98
  }): Promise<SignalingMessage>;
98
- addMovie(data: IAddMovieParams): Promise<SignalingMessage>;
99
- updateMovie(data: ISharedMovieState): Promise<SignalingMessage>;
99
+ addMovie(data: any): Promise<SignalingMessage>;
100
+ updateMovie(data: any): Promise<SignalingMessage>;
100
101
  removeMovie(data: any): Promise<SignalingMessage>;
101
102
  startStream(data: any): Promise<SignalingMessage>;
102
103
  stopStream(): Promise<SignalingMessage>;
@@ -143,6 +144,9 @@ export default class Signaling extends BaseSignaling {
143
144
  protected _reconnect(): void;
144
145
  private _handleCommandResponse;
145
146
  private _handleCommandsQueue;
147
+ private _serializeBinary;
148
+ private _serializeJson;
149
+ private _convertDisplayLayout;
146
150
  protected _waitConnectionMessage(): void;
147
151
  protected _stopWaitConnectionMessage(): void;
148
152
  private _startDoctor;
@@ -35,10 +35,6 @@ 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",
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"
38
+ JOIN_LINK_CHANGED = "join-link-changed"
43
39
  }
44
40
  export default SignalingNotification;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/calls-sdk",
3
- "version": "2.6.2-dev.e7984c3.0",
3
+ "version": "2.6.2-dev.ea88167.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",
@@ -1,7 +1,7 @@
1
1
  export declare function init(): void;
2
2
  export declare function sendBeakon(method: string, params?: {
3
3
  [key: string]: any;
4
- }, noSession?: boolean): void;
4
+ }, noSession?: boolean): Promise<void>;
5
5
  export declare function request(method: string, params?: {
6
6
  [key: string]: any;
7
7
  }, noSession?: boolean): Promise<unknown>;
@@ -10,7 +10,6 @@ import UserRole from '../enums/UserRole';
10
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';
14
13
  import MuteStates from '../types/MuteStates';
15
14
  import { ParticipantStateMapped } from '../types/Participant';
16
15
  import { DebugMessageType } from './Debug';
@@ -77,29 +76,6 @@ declare namespace External {
77
76
  * @param stream
78
77
  */
79
78
  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;
103
79
  /**
104
80
  * Получен стрим с экрана собеседника.
105
81
  * Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
@@ -130,41 +106,6 @@ declare namespace External {
130
106
  * @param markers
131
107
  */
132
108
  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
109
  /**
169
110
  * Добавили участника
170
111
  *
@@ -246,8 +187,10 @@ declare namespace External {
246
187
  * @param unmute Разрешение включить устройство
247
188
  * @param userId Пользователь, для которого изменились разрешения или `null` для текущего пользователя
248
189
  * @param adminId Пользователь, который изменил разрешения
190
+ * @param stateUpdated Если `true`, значит глобальное/персональное состояние изменилось и поля `muteStates`/`unmuteOptions` содержат обновления, если `false`, значит, эти поля не имеют значения
191
+ * @param requestedMedia Какие устройства попросили влючить участника
249
192
  */
250
- function onMuteStates(muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll?: boolean, unmute?: boolean, userId?: ExternalParticipantId | null, adminId?: ExternalParticipantId | null): void;
193
+ function onMuteStates(muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll?: boolean, unmute?: boolean, userId?: ExternalParticipantId | null, adminId?: ExternalParticipantId | null, stateUpdated?: boolean, requestedMedia?: MediaOption[]): void;
251
194
  /**
252
195
  * Изменились роли собеседника в звонке
253
196
  *
@@ -11,7 +11,6 @@ import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalPartici
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';
15
14
  import MuteStates from '../types/MuteStates';
16
15
  import { ParticipantStateMapped } from '../types/Participant';
17
16
  import AuthData from './AuthData';
@@ -187,6 +186,7 @@ export declare type ParamsObject = {
187
186
  * Работает только при приёме экрана через дата-канал.
188
187
  *
189
188
  * _По умолчанию: `true`_
189
+ * @deprecated
190
190
  */
191
191
  producerScreenTrack: boolean;
192
192
  /**
@@ -194,12 +194,19 @@ export declare type ParamsObject = {
194
194
  * Работает только при отправке экрана через дата-канал.
195
195
  *
196
196
  * _По умолчанию: `true`_
197
+ * @deprecated
197
198
  */
198
199
  consumerScreenTrack: boolean;
199
200
  producerNotificationDataChannel: boolean;
200
201
  producerCommandDataChannel: boolean;
201
202
  consumerScreenDataChannel: boolean;
202
203
  producerScreenDataChannel: boolean;
204
+ /**
205
+ * Размер пакета для отправки трансляции экрана в датаканал в байтах.
206
+ * Максимальный размер пакета 65536 bytes в хроме, но по стандарту лучше максимум 16 Кб.
207
+ * @hidden
208
+ */
209
+ consumerScreenDataChannelPacketSize: number;
203
210
  screenShareWebmBuilder: boolean;
204
211
  noiseSuppression: boolean;
205
212
  /**
@@ -294,19 +301,6 @@ export declare type ParamsObject = {
294
301
  * Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
295
302
  */
296
303
  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;
310
304
  /**
311
305
  * Начат звонок
312
306
  */
@@ -319,26 +313,6 @@ export declare type ParamsObject = {
319
313
  * Изменились данные стрима собеседника
320
314
  */
321
315
  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
316
  /**
343
317
  * Добавили участника
344
318
  */
@@ -383,7 +357,7 @@ export declare type ParamsObject = {
383
357
  /**
384
358
  * Изменились состояния устройств пользователя или разрешения включать камеру/микрофон
385
359
  */
386
- onMuteStates?: (muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll: boolean, unmute: boolean, userId: ExternalParticipantId | null, adminId: ExternalParticipantId | null) => void;
360
+ onMuteStates?: (muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll: boolean, unmute: boolean, userId: ExternalParticipantId | null, adminId: ExternalParticipantId | null, stateUpdated?: boolean, requestedMedia?: MediaOption[]) => void;
387
361
  /**
388
362
  * Изменились роли собеседника в звонке
389
363
  */
@@ -578,6 +552,7 @@ export default abstract class Params {
578
552
  static get producerCommandDataChannel(): boolean;
579
553
  static get consumerScreenDataChannel(): boolean;
580
554
  static get producerScreenDataChannel(): boolean;
555
+ static get consumerScreenDataChannelPacketSize(): number;
581
556
  static get screenShareWebmBuilder(): boolean;
582
557
  static get noiseSuppression(): boolean;
583
558
  static set noiseSuppression(value: boolean);
package/static/Utils.d.ts CHANGED
@@ -60,5 +60,9 @@ declare namespace Utils {
60
60
  * https://stash.odkl.ru/projects/ODKL/repos/odnoklassniki-webrtc/browse/src/main/java/one/webrtc/domain/conversation/ParticipantIndex.java#67-78
61
61
  */
62
62
  function participantMarkerCompare(marker1: ExternalParticipantListMarker | undefined, marker2: ExternalParticipantListMarker | undefined): number;
63
+ /** убирает все ключи со значением `V` на 1 уровне */
64
+ function objectFilterOutValues<T extends Record<string, V>, V = unknown>(obj: T, value?: V | V[]): Partial<T>;
65
+ function objectReduce<R, T extends Object>(obj: T, callback: (acc: R, value: T[keyof T], key: keyof T) => R, initialValue: R): R;
66
+ const setImmediate: (fn: VoidFunction) => VoidFunction;
63
67
  }
64
68
  export default Utils;
@@ -0,0 +1,12 @@
1
+ import MediaOption from '../enums/MediaOption';
2
+ import MediaSettings from './MediaSettings';
3
+ import { Participant } from './Participant';
4
+ export interface IProcessMuteStateParams {
5
+ mediaOptions?: MediaOption[];
6
+ muteAll?: boolean;
7
+ unmute?: boolean;
8
+ serverSettings?: MediaSettings | null;
9
+ admin?: Participant | null;
10
+ stateUpdated?: boolean;
11
+ requestedMedia?: MediaOption[];
12
+ }
@@ -1,7 +1,6 @@
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';
5
4
  import MuteStates from './MuteStates';
6
5
  import { ParticipantListMarker, ParticipantListType, ParticipantStateMapped } from './Participant';
7
6
  import SignalingMessage from './SignalingMessage';
@@ -95,7 +94,6 @@ export interface ExternalParticipant {
95
94
  */
96
95
  unmuteOptions: MediaOption[];
97
96
  markers?: ExternalParticipantListMarkers;
98
- movieShareInfos?: ISharedMovieInfo[];
99
97
  }
100
98
  export interface ExternalParticipantListChunk {
101
99
  participants: ExternalParticipant[];
@@ -0,0 +1,5 @@
1
+ import { Layout, RequestKeyFrame, StopStream } from './ParticipantLayout';
2
+ export declare const REQUEST_KEY_FRAME_CODE = "kf";
3
+ export declare function isStopStreaming(layout: Layout | StopStream | RequestKeyFrame): layout is StopStream;
4
+ export declare function isRequestKeyFrame(layout: Layout | StopStream | RequestKeyFrame): layout is RequestKeyFrame;
5
+ export declare function layoutToString(layout: Layout | StopStream | RequestKeyFrame): string;
@@ -19,7 +19,7 @@ export declare type MediaSettings = {
19
19
  export declare type VideoStreamInfo = {
20
20
  id: string;
21
21
  source: string;
22
- externalMovieId?: string;
22
+ vkMovieId?: string;
23
23
  };
24
24
  export default MediaSettings;
25
25
  export declare function compareMediaSettings(ms1: MediaSettings, ms2: MediaSettings): boolean;
@@ -4,7 +4,6 @@ import UserRole from '../enums/UserRole';
4
4
  import { ParticipantStatus } from '../static/External';
5
5
  import MediaSettings from '../types/MediaSettings';
6
6
  import { ExternalId, ExternalParticipantId, ExternalParticipantListMarkers } from './ExternalId';
7
- import { ISharedMovieInfo } from './MovieShare';
8
7
  import MuteStates from './MuteStates';
9
8
  import ParticipantLayout from './ParticipantLayout';
10
9
  /**
@@ -56,7 +55,6 @@ export interface Participant {
56
55
  unmuteOptions: MediaOption[];
57
56
  observedIds: CompositeUserId[];
58
57
  markers?: ExternalParticipantListMarkers;
59
- movieShareInfos?: ISharedMovieInfo[];
60
58
  }
61
59
  export interface IGetParticipantsParameters {
62
60
  externalIds: ExternalId[];
@@ -31,10 +31,16 @@ export declare type StopStream = {
31
31
  */
32
32
  stopStream: true;
33
33
  };
34
+ /**
35
+ * Request key frame from source. Should not be called often, negatively impacts video quality.
36
+ */
37
+ export declare type RequestKeyFrame = {
38
+ keyFrameRequested: true;
39
+ };
34
40
  /**
35
41
  * Лейаут собеседника в звонке
36
42
  */
37
- export declare type ParticipantLayout = (Layout | StopStream) & {
43
+ export declare type ParticipantLayout = (Layout | StopStream | RequestKeyFrame) & {
38
44
  /**
39
45
  * Внешний ID пользователя
40
46
  */
@@ -9,7 +9,6 @@ import UserRole from '../enums/UserRole';
9
9
  import UserType from '../enums/UserType';
10
10
  import MediaModifiers from './MediaModifiers';
11
11
  import MediaSettings from './MediaSettings';
12
- import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from './MovieShare';
13
12
  import MuteStates from './MuteStates';
14
13
  import { CompositeUserId, OkUserId, ParticipantId, ParticipantListMarker as ParticipantParticipantListMarker, ParticipantListMarkers, ParticipantListType as ParticipantParticipantListType } from './Participant';
15
14
  import VideoSettings from './VideoSettings';
@@ -55,7 +54,6 @@ declare namespace SignalingMessage {
55
54
  unmuteOptions?: MediaOption[];
56
55
  markers?: ParticipantListMarkers;
57
56
  observedIds?: CompositeUserId[];
58
- movieShareInfos?: ISharedMovieInfo[];
59
57
  }
60
58
  export interface ParticipantListChunk extends Notification {
61
59
  participants: (Participant & Required<Pick<Participant, 'markers'>>)[];
@@ -150,6 +148,8 @@ declare namespace SignalingMessage {
150
148
  muteStates: MuteStates;
151
149
  unmuteOptions?: MediaOption[];
152
150
  mediaOptions: MediaOption[];
151
+ requestedMedia?: MediaOption[];
152
+ stateUpdated?: boolean;
153
153
  unmute?: boolean;
154
154
  muteAll?: boolean;
155
155
  }
@@ -279,14 +279,6 @@ declare namespace SignalingMessage {
279
279
  export interface JoinLinkChanged extends Notification {
280
280
  joinLink: string;
281
281
  }
282
- export interface SharedMovieState extends Notification {
283
- data: ISharedMovieState[];
284
- }
285
- export interface SharedMovieInfo extends Notification {
286
- movieShareInfo: ISharedMovieInfo;
287
- }
288
- export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
289
- }
290
282
  export {};
291
283
  }
292
284
  export default SignalingMessage;
@@ -0,0 +1,2 @@
1
+ import { MuteState, MediaOption, MuteStates } from '../CallsSDK';
2
+ export declare const getMediaOptionsByMuteState: (muteStates: MuteStates, value: MuteState) => MediaOption[];
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Fork from messagepack internals.
3
+ * Package messagepack doesn't export createWriteBuffer and createReadBuffer methods.
4
+ */
5
+ export declare function createWriteBuffer(): {
6
+ put(v: BufferSource): void;
7
+ putI8(v: number): void;
8
+ putI16(v: number): void;
9
+ putI32(v: number): void;
10
+ putI64(v: number): void;
11
+ putUi8(v: number): void;
12
+ putUi16(v: number): void;
13
+ putUi32(v: number): void;
14
+ putUi64(v: number): void;
15
+ putF(v: number): void;
16
+ ui8array(): Uint8Array;
17
+ };
18
+ export declare function createReadBuffer(buf: BufferSource): {
19
+ peek(): number;
20
+ get(len: number): ArrayBuffer;
21
+ getI8(): number;
22
+ getI16(): number;
23
+ getI32(): number;
24
+ getI64(): number;
25
+ getUi8(): number;
26
+ getUi16(): number;
27
+ getUi32(): number;
28
+ getUi64(): number;
29
+ getF32(): number;
30
+ getF64(): number;
31
+ };
@@ -1,32 +0,0 @@
1
- import { OkUserId, CompositeUserId } from './Participant';
2
- import { MediaType } from './ParticipantStreamDescription';
3
- export interface IAddMovieParams {
4
- movieId: string;
5
- gain?: number;
6
- }
7
- export declare type ISharedMovieStateResponse = [number, number, boolean, number, number];
8
- export interface ISharedMovieState {
9
- participantId: CompositeUserId;
10
- gain?: number;
11
- pause?: boolean;
12
- offset?: number;
13
- duration?: number;
14
- }
15
- export interface ISharedMovieInfo {
16
- movieId: OkUserId;
17
- initiatorId: CompositeUserId;
18
- title: string;
19
- source: MediaType;
20
- externalMovieId: string;
21
- duration: number;
22
- thumbnailNormal: string;
23
- thumbnailMedium: string;
24
- thumbnailBig: string;
25
- thumbnailHigh: string;
26
- thumbnailHd: string;
27
- }
28
- export interface ISharedMovieStoppedInfo {
29
- movieId: OkUserId;
30
- initiatorId: CompositeUserId;
31
- source: MediaType;
32
- }