@vkontakte/calls-sdk 2.8.2-dev.638a3c6.0 → 2.8.2-dev.6410270.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.
@@ -6,6 +6,7 @@ import CallType from '../enums/CallType';
6
6
  import ConversationFeature from '../enums/ConversationFeature';
7
7
  import ConversationOption from '../enums/ConversationOption';
8
8
  import MediaOption from '../enums/MediaOption';
9
+ import RecordRole from '../enums/RecordRole';
9
10
  import UpdateDisplayLayoutErrorReason from '../enums/UpdateDisplayLayoutErrorReason';
10
11
  import UserRole from '../enums/UserRole';
11
12
  import UserType from '../enums/UserType';
@@ -128,6 +129,7 @@ export default class Conversation extends EventEmitter {
128
129
  private _registerParticipantInCache;
129
130
  private _getExistedParticipantByIdOrCreate;
130
131
  private _getExternalIdByParticipantId;
132
+ private _isSameExternalId;
131
133
  private _registerParticipantAndSetMarkersIfChunkEnabled;
132
134
  private _warnParticipantNotInConversation;
133
135
  private _denormalizeMarkers;
@@ -263,7 +265,7 @@ export default class Conversation extends EventEmitter {
263
265
  removeRooms(roomIds: number[]): Promise<void>;
264
266
  startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null): Promise<undefined>;
265
267
  stopStream(roomId?: number | null): Promise<undefined>;
266
- recordSetConf(king?: ParticipantId, pawns?: ParticipantId[], hideParticipantCount?: boolean, roomId?: number | null): Promise<void>;
268
+ recordSetRole(participantId: ParticipantId, role: RecordRole | null, roomId?: number | null): Promise<void>;
267
269
  getStreamInfo(): Promise<{
268
270
  movieId: any;
269
271
  preview: any;
@@ -89,7 +89,6 @@ export declare class Transport extends EventEmitter {
89
89
  private _onServerRemoteTrackAdded;
90
90
  private _onServerRemoteTrackRemoved;
91
91
  private _onAsrTranscription;
92
- private _onSourceChanged;
93
92
  private _onAnimojiStream;
94
93
  /** Обработчик, досылающий MediaSourceEvent.SOURCE_CHANGED событие до аллокации транспортов */
95
94
  private _onAnimojiStatus;
package/default/Api.d.ts CHANGED
@@ -38,14 +38,13 @@ export default class Api extends BaseApi {
38
38
  * Этот метод принимает именно ExternalId, т.к. для OkUserId не принципиально наличие deviceIdx
39
39
  * @hidden
40
40
  */
41
- getOkIdsByExternalIds(externalIds: ExternalId[]): Promise<OkUserId[]>;
42
- getParticipantIdsByExternalIds(externalIds: ExternalId[]): Promise<Map<ExternalId, ParticipantId>>;
41
+ getOkIdsByExternalIds(externalIds: string[] | ExternalId[]): Promise<OkUserId[]>;
43
42
  /**
44
43
  * NB: Не сохраняет порядок возвращаемых ID
45
44
  * @hidden
46
45
  */
47
46
  getExternalIdsByOkIds(uids: OkUserId[]): Promise<ExternalParticipantId[]>;
48
- getCachedOkIdByExternalId(externalId: ExternalId): ParticipantId | null;
47
+ getCachedOkIdByExternalId(externalId: ExternalParticipantId): CompositeUserId | null;
49
48
  cacheExternalId(participantId: CompositeUserId, externalId: ExternalParticipantId): void;
50
49
  getConversationParams(conversationId?: string): Promise<ConversationParams>;
51
50
  getUserId(): OkUserId | null;
@@ -7,6 +7,7 @@ import { TransportTopology } from '../classes/transport/Transport';
7
7
  import ConversationFeature from '../enums/ConversationFeature';
8
8
  import ConversationOption from '../enums/ConversationOption';
9
9
  import MediaOption from '../enums/MediaOption';
10
+ import RecordRole from '../enums/RecordRole';
10
11
  import SignalingCommandType from '../enums/SignalingCommandType';
11
12
  import SignalingConnectionType from '../enums/SignalingConnectionType';
12
13
  import UserRole from '../enums/UserRole';
@@ -20,7 +21,7 @@ import { CompositeUserId, ParticipantId } from '../types/Participant';
20
21
  import ParticipantLayout, { RequestKeyFrame, StopStream } from '../types/ParticipantLayout';
21
22
  import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
22
23
  import SignalingMessage from '../types/SignalingMessage';
23
- import { IRecordConfData, IStartStreamData, IStopStreamData } from '../types/Streams';
24
+ import { IStartStreamData, IStopStreamData } from '../types/Streams';
24
25
  import { WaitingParticipantId } from '../types/WaitingHall';
25
26
  export default class Signaling extends BaseSignaling {
26
27
  private socket;
@@ -117,7 +118,7 @@ export default class Signaling extends BaseSignaling {
117
118
  removeRooms(roomIds: number[]): Promise<SignalingMessage>;
118
119
  startStream(data: IStartStreamData): Promise<SignalingMessage>;
119
120
  stopStream(data?: IStopStreamData): Promise<SignalingMessage>;
120
- recordSetConf(conf?: IRecordConfData): Promise<SignalingMessage>;
121
+ recordSetRole(participantId: ParticipantId, role: RecordRole | null, roomId?: number | null): Promise<SignalingMessage>;
121
122
  getRecordStatus(): Promise<SignalingMessage>;
122
123
  switchTopology(topology: TransportTopology, force?: boolean): Promise<SignalingMessage>;
123
124
  requestRealloc(): Promise<SignalingMessage>;
@@ -15,7 +15,7 @@ declare enum SignalingCommandType {
15
15
  REPORT_SHARING_STAT = "report-sharing-stat",
16
16
  RECORD_START = "record-start",
17
17
  RECORD_STOP = "record-stop",
18
- RECORD_SET_CONF = "record-set-conf",
18
+ RECORD_SET_ROLE = "record-set-role",
19
19
  RECORD_GET_STATUS = "record-get-status",
20
20
  SWITCH_MICRO = "switch-micro",
21
21
  SWITCH_TOPOLOGY = "switch-topology",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/calls-sdk",
3
- "version": "2.8.2-dev.638a3c6.0",
3
+ "version": "2.8.2-dev.6410270.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",
@@ -14,8 +14,8 @@
14
14
  "**/*.d.ts"
15
15
  ],
16
16
  "dependencies": {
17
- "@vkontakte/calls-video-effects": "2.0.1-beta.4",
18
- "@vkontakte/calls-vmoji": "1.0.8-beta.5",
17
+ "@vkontakte/calls-video-effects": "1.1.4",
18
+ "@vkontakte/calls-vmoji": "1.0.7-beta.3",
19
19
  "@vkontakte/libvpx": "2.0.9",
20
20
  "bit-buffer": "0.2.5",
21
21
  "messagepack": "1.1.12",
@@ -434,7 +434,7 @@ export type ParamsObject = {
434
434
  /**
435
435
  * Изменились данные стрима собеседника
436
436
  */
437
- onRemoteMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings, markers: ExternalParticipantListMarkers | null) => void;
437
+ onRemoteMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings, markers?: ExternalParticipantListMarkers) => void;
438
438
  /**
439
439
  * Изменились данные стрима собеседника
440
440
  */
@@ -458,15 +458,15 @@ export type ParamsObject = {
458
458
  /**
459
459
  * Добавили участника
460
460
  */
461
- onParticipantAdded?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null) => void;
461
+ onParticipantAdded?: (userId: ExternalParticipantId, markers?: ExternalParticipantListMarkers) => void;
462
462
  /**
463
463
  * Участник присоединился к звонку
464
464
  */
465
- onParticipantJoined?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers) => void;
465
+ onParticipantJoined?: (userId: ExternalParticipantId, markers?: ExternalParticipantListMarkers) => void;
466
466
  /**
467
467
  * Изменились данные состояний собеседника
468
468
  */
469
- onRemoteParticipantState?: (userId: ExternalParticipantId, participantState: ParticipantStateMapped, markers: ExternalParticipantListMarkers | null) => void;
469
+ onRemoteParticipantState?: (userId: ExternalParticipantId, participantState: ParticipantStateMapped, markers?: ExternalParticipantListMarkers) => void;
470
470
  /**
471
471
  * Изменился статус соединения собеседников
472
472
  */
@@ -482,7 +482,7 @@ export type ParamsObject = {
482
482
  /**
483
483
  * Пользователь отключился от звонка
484
484
  */
485
- onRemoteRemoved?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null) => void;
485
+ onRemoteRemoved?: (userId: ExternalParticipantId, markers?: ExternalParticipantListMarkers) => void;
486
486
  /**
487
487
  * Изменилось состояние звонка
488
488
  */
@@ -506,7 +506,7 @@ export type ParamsObject = {
506
506
  /**
507
507
  * Закрепляет/открепляет собеседника для всех
508
508
  */
509
- onPinnedParticipant?: (userId: ExternalParticipantId, unpin: boolean, markers: ExternalParticipantListMarkers | null, roomId?: number | null) => void;
509
+ onPinnedParticipant?: (userId: ExternalParticipantId, unpin: boolean, markers?: ExternalParticipantListMarkers, roomId?: number | null) => void;
510
510
  /**
511
511
  * Закрепляет/открепляет текущего пользователя у других собеседников
512
512
  */
package/static/Utils.d.ts CHANGED
@@ -17,7 +17,7 @@ declare namespace Utils {
17
17
  port: any;
18
18
  } | null>;
19
19
  function composeUserId(id: CompositeUserId | OkUserId, type: UserType): CompositeUserId;
20
- function composeParticipantId(id: CompositeUserId | OkUserId, type: UserType, deviceIdx?: number): ParticipantId;
20
+ function composeParticipantId(id: CompositeUserId | OkUserId, type: UserType, deviceIdx: number): ParticipantId;
21
21
  function compose(compositeId: CompositeUserId, deviceIdx?: number): ParticipantId;
22
22
  function composeId(participant: SignalingMessage.Participant): ParticipantId;
23
23
  function composeMessageId(message: SignalingMessage): ParticipantId;
@@ -15,11 +15,11 @@ export declare enum ExternalIdType {
15
15
  }
16
16
  export type ExternalUserId = string;
17
17
  export declare namespace ExternalIdUtils {
18
- function fromIds(ids: ExternalUserId[] | ExternalId[]): ExternalId[];
19
- function fromId(id: ExternalUserId, type?: ExternalIdType, deviceIdx?: number): ExternalParticipantId;
18
+ function fromIds(ids: string[] | ExternalId[]): ExternalId[];
19
+ function fromId(id: string, type?: ExternalIdType, deviceIdx?: number): ExternalParticipantId;
20
20
  function fromSignaling(signalingId: SignalingMessage.ExternalId, deviceIdx?: number): ExternalParticipantId;
21
21
  function toString(externalId: ExternalId): ExternalIdString;
22
- function fromIdToString(id: ExternalUserId, type?: ExternalIdType, deviceIdx?: number): ExternalIdString;
22
+ function fromIdToString(id: string, type?: ExternalIdType, deviceIdx?: number): ExternalIdString;
23
23
  function fromString(stringId: ExternalIdString): ExternalParticipantId;
24
24
  function compare(id1: ExternalParticipantId, id2: ExternalParticipantId): boolean;
25
25
  function getDeviceIdx(externalId: ExternalId | null): number;
@@ -32,7 +32,7 @@ export interface ExternalId {
32
32
  /**
33
33
  * ID пользователя
34
34
  */
35
- id: ExternalUserId;
35
+ id: string;
36
36
  /**
37
37
  * Тип пользователя
38
38
  */
@@ -92,7 +92,7 @@ export interface ExternalParticipant {
92
92
  * Разрешения на включение устройств
93
93
  */
94
94
  unmuteOptions: MediaOption[];
95
- markers: ExternalParticipantListMarkers | null;
95
+ markers?: ExternalParticipantListMarkers | null;
96
96
  movieShareInfos?: ISharedMovieInfo[];
97
97
  }
98
98
  /**
@@ -1,4 +1,3 @@
1
- import { ParticipantId } from './Participant';
2
1
  export interface IStartStreamData {
3
2
  movieId: string | null;
4
3
  name: string | null;
@@ -10,9 +9,3 @@ export interface IStartStreamData {
10
9
  export interface IStopStreamData {
11
10
  roomId: number | null;
12
11
  }
13
- export interface IRecordConfData {
14
- king?: ParticipantId;
15
- pawns?: ParticipantId[];
16
- hideParticipantCount: boolean;
17
- roomId: number | null;
18
- }