@vkontakte/calls-sdk 2.4.4-dev.1b4f7df.0 → 2.4.4-dev.9dfe59f.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 +16 -12
- package/abstract/BaseApi.d.ts +1 -1
- package/abstract/BaseSignaling.d.ts +8 -7
- package/calls-sdk.cjs.js +9 -8
- package/calls-sdk.esm.js +9 -8
- package/classes/Conversation.d.ts +17 -15
- package/classes/DebugInfo.d.ts +2 -2
- package/classes/MediaSource.d.ts +11 -0
- package/classes/SpeakerDetector.d.ts +2 -2
- package/classes/SpecListener.d.ts +3 -3
- package/classes/screenshare/BaseStreamBuilder.d.ts +25 -0
- package/classes/screenshare/ScreenCaptureReceiver.d.ts +2 -2
- package/classes/screenshare/StreamBuilder.d.ts +6 -10
- package/classes/screenshare/WebmBuilder.d.ts +19 -0
- package/classes/transport/DirectTransport.d.ts +2 -2
- package/classes/transport/ServerTransport.d.ts +2 -2
- package/classes/transport/Statistics.d.ts +2 -2
- package/classes/transport/Transport.d.ts +5 -5
- package/default/Api.d.ts +2 -2
- package/default/Signaling.d.ts +8 -7
- package/enums/HangupType.d.ts +2 -0
- package/package.json +4 -2
- package/static/External.d.ts +23 -18
- package/static/Params.d.ts +25 -22
- package/static/Utils.d.ts +13 -4
- package/types/ConversationParams.d.ts +1 -0
- package/types/ConversationResponse.d.ts +4 -0
- package/types/ExternalId.d.ts +30 -3
- package/types/MediaSettings.d.ts +6 -1
- package/types/Participant.d.ts +15 -3
- package/types/ParticipantLayout.d.ts +2 -2
- package/types/ParticipantPriority.d.ts +3 -3
- package/types/ParticipantStreamDescription.d.ts +2 -2
- package/types/SignalingMessage.d.ts +28 -22
- package/utils/Media.d.ts +4 -0
package/CallsSDK.d.ts
CHANGED
|
@@ -34,10 +34,10 @@ import Utils from './static/Utils';
|
|
|
34
34
|
import WebRTCUtils, { FacingMode } from './static/WebRTCUtils';
|
|
35
35
|
import ConversationParams from './types/ConversationParams';
|
|
36
36
|
import ConversationResponse from './types/ConversationResponse';
|
|
37
|
-
import { ExternalId, ExternalIdType, ExternalParticipant } from './types/ExternalId';
|
|
37
|
+
import { ExternalId, ExternalIdType, ExternalParticipant, ExternalParticipantId } from './types/ExternalId';
|
|
38
38
|
import IceServer from './types/IceServer';
|
|
39
39
|
import MediaModifiers from './types/MediaModifiers';
|
|
40
|
-
import { MediaSettings } from './types/MediaSettings';
|
|
40
|
+
import { IVideoDimentions, MediaSettings } from './types/MediaSettings';
|
|
41
41
|
import MuteStates from './types/MuteStates';
|
|
42
42
|
import { OkUserId, ParticipantStateMapped } from './types/Participant';
|
|
43
43
|
import ParticipantLayout, { Layout, StopStream } from './types/ParticipantLayout';
|
|
@@ -291,8 +291,11 @@ export declare function toggleLocalAudio(enabled: boolean): Promise<void>;
|
|
|
291
291
|
*
|
|
292
292
|
* @param width
|
|
293
293
|
* @param height
|
|
294
|
+
* @param params новые размеры видео эффекта
|
|
294
295
|
*/
|
|
295
|
-
export declare function setLocalResolution(width: number, height: number
|
|
296
|
+
export declare function setLocalResolution(width: number, height: number, params?: {
|
|
297
|
+
effect: IVideoDimentions;
|
|
298
|
+
}): Promise<void>;
|
|
296
299
|
/**
|
|
297
300
|
* Изменяет качество отображаемых стримов - чем выше приоритет, тем лучше качество.
|
|
298
301
|
* Не нужно передавать огромные числа - из приоритетов (0, 1, 2, 3) последний получит максимальное качество, а первый худшее.
|
|
@@ -328,17 +331,18 @@ export declare function grantRolesInternal(uid: OkUserId, roles: UserRole[], rev
|
|
|
328
331
|
*
|
|
329
332
|
* @param externalId Внешний ID пользователя (если не указано, сработает на всех)
|
|
330
333
|
* @param muteStates Состояние устройств пользователя
|
|
334
|
+
* @param requestedMedia Попросить пользователя включить устройство
|
|
331
335
|
*/
|
|
332
|
-
export declare function muteParticipant(externalId: string |
|
|
333
|
-
export declare function muteParticipantInternal(uid: OkUserId | null, muteStates: MuteStates): Promise<void>;
|
|
336
|
+
export declare function muteParticipant(externalId: string | ExternalParticipantId | null, muteStates: MuteStates, requestedMedia?: MediaOption[]): Promise<void>;
|
|
337
|
+
export declare function muteParticipantInternal(uid: OkUserId | null, muteStates: MuteStates, requestedMedia?: MediaOption[], deviceIdx?: number): Promise<void>;
|
|
334
338
|
/**
|
|
335
339
|
* Закрепить/открепить выбранного собеседника у всех (только если есть соответствующая роль)
|
|
336
340
|
*
|
|
337
341
|
* @param externalId Внешний ID пользователя
|
|
338
342
|
* @param unpin Открепить
|
|
339
343
|
*/
|
|
340
|
-
export declare function pinParticipant(externalId: string |
|
|
341
|
-
export declare function pinParticipantInternal(uid: OkUserId, unpin?: boolean): Promise<void>;
|
|
344
|
+
export declare function pinParticipant(externalId: string | ExternalParticipantId, unpin?: boolean): Promise<void>;
|
|
345
|
+
export declare function pinParticipantInternal(uid: OkUserId, unpin?: boolean, deviceIdx?: number): Promise<void>;
|
|
342
346
|
/**
|
|
343
347
|
* Устанавливает настройки пользовательского медиа
|
|
344
348
|
*
|
|
@@ -373,8 +377,8 @@ export declare function chatHistory(count?: number): Promise<void>;
|
|
|
373
377
|
* @param data Данные
|
|
374
378
|
* @param externalId Внешний ID пользователя (если не указано, отправит всем)
|
|
375
379
|
*/
|
|
376
|
-
export declare function customData(data: JSONObject, externalId?: string |
|
|
377
|
-
export declare function customDataInternal(data: JSONObject, uid?: OkUserId | null): Promise<void>;
|
|
380
|
+
export declare function customData(data: JSONObject, externalId?: string | ExternalParticipantId | null): Promise<void>;
|
|
381
|
+
export declare function customDataInternal(data: JSONObject, uid?: OkUserId | null, deviceIdx?: number): Promise<void>;
|
|
378
382
|
/**
|
|
379
383
|
* Создать токен комнаты для подключения по ссылке
|
|
380
384
|
*
|
|
@@ -424,7 +428,7 @@ export declare function stopStream(): Promise<SignalingMessage>;
|
|
|
424
428
|
* @param externalId Внешний ID пользователя
|
|
425
429
|
* @param role Роль, если null, то роль удалится
|
|
426
430
|
*/
|
|
427
|
-
export declare function recordSetRole(externalId: string |
|
|
431
|
+
export declare function recordSetRole(externalId: string | ExternalParticipantId, role: RecordRole | null): Promise<void>;
|
|
428
432
|
export declare function getStreamInfo(): Promise<{
|
|
429
433
|
movieId: any;
|
|
430
434
|
preview: any;
|
|
@@ -444,7 +448,7 @@ export declare function addMovie(movieId: string): Promise<{
|
|
|
444
448
|
* @param movieId
|
|
445
449
|
* @param gain
|
|
446
450
|
*/
|
|
447
|
-
export declare function updateMovie(movieId: string, gain?: number): Promise<void>;
|
|
451
|
+
export declare function updateMovie(movieId: string, gain?: number, offset?: string, pause?: boolean): Promise<void>;
|
|
448
452
|
/**
|
|
449
453
|
* Удалить видео/лайв из звонка
|
|
450
454
|
*
|
|
@@ -504,5 +508,5 @@ export declare function promoteParticipant(externalId: ExternalId, demote?: bool
|
|
|
504
508
|
* @param recordIds Идентификаторы записей истории
|
|
505
509
|
*/
|
|
506
510
|
export declare function removeHistoryRecords(recordIds: number[]): Promise<void>;
|
|
507
|
-
export type { AddParticipantParams, ConversationData, ConversationParams, ConversationResponse, ExternalId, ExternalParticipant, HangupReasonData, IceServer, JSONArray, JSONObject, JSONType, Layout, MediaModifiers, MediaSettings, MuteStates, OkUserId, ParamsObject, ParticipantLayout, ParticipantPriority, ParticipantStateMapped, ParticipantStreamDescription, SignalingMessage, StatResult, StopStream, WaitingHallResponse, };
|
|
511
|
+
export type { AddParticipantParams, ConversationData, ConversationParams, ConversationResponse, ExternalId, ExternalParticipant, ExternalParticipantId, HangupReasonData, IceServer, JSONArray, JSONObject, JSONType, Layout, MediaModifiers, MediaSettings, MuteStates, OkUserId, ParamsObject, ParticipantLayout, ParticipantPriority, ParticipantStateMapped, ParticipantStreamDescription, SignalingMessage, StatResult, StopStream, WaitingHallResponse, IVideoDimentions, };
|
|
508
512
|
export { Api, BaseApi, BaseLogger, BaseSignaling, CallDirection, CallType, ChatRoomEventType, ConversationOption, DebugMessageType, ExternalIdType, FacingMode, FatalError, HangupReason, HangupType, MediaOption, MediaTrackKind, MediaType, MuteState, ParticipantState, ParticipantStatus, RecordRole, Signaling, SignalingCommandType, SignalingConnectionType, SignalingNotification, UserRole, UserType, Utils, };
|
package/abstract/BaseApi.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export default abstract class BaseApi {
|
|
|
30
30
|
}>;
|
|
31
31
|
getAnonymTokenByLink(joinLink: string, username?: string): Promise<string>;
|
|
32
32
|
abstract joinConversationByLink(joinLink: string, isVideo?: boolean): Promise<ConversationResponse>;
|
|
33
|
-
abstract getConversationParams(): Promise<ConversationParams>;
|
|
33
|
+
abstract getConversationParams(conversationId?: string): Promise<ConversationParams>;
|
|
34
34
|
abstract getUserId(): OkUserId | null;
|
|
35
35
|
abstract setUserId(userId: OkUserId): void;
|
|
36
36
|
log(items: LogItem[]): void;
|
|
@@ -3,6 +3,7 @@ import { ParticipantIdRegistry } from '../classes/ParticipantIdRegistry';
|
|
|
3
3
|
import { PerfStatReport } from '../classes/transport/PerfStatReporter';
|
|
4
4
|
import { TransportTopology } from '../classes/transport/Transport';
|
|
5
5
|
import ConversationOption from '../enums/ConversationOption';
|
|
6
|
+
import MediaOption from '../enums/MediaOption';
|
|
6
7
|
import RecordRole from '../enums/RecordRole';
|
|
7
8
|
import SignalingConnectionType from '../enums/SignalingConnectionType';
|
|
8
9
|
import UserRole from '../enums/UserRole';
|
|
@@ -11,7 +12,7 @@ import ConversationResponse from '../types/ConversationResponse';
|
|
|
11
12
|
import MediaModifiers from '../types/MediaModifiers';
|
|
12
13
|
import MediaSettings from '../types/MediaSettings';
|
|
13
14
|
import MuteStates from '../types/MuteStates';
|
|
14
|
-
import { CompositeUserId } from '../types/Participant';
|
|
15
|
+
import { CompositeUserId, ParticipantId } from '../types/Participant';
|
|
15
16
|
import SignalingMessage from '../types/SignalingMessage';
|
|
16
17
|
import { WaitingParticipantId } from '../types/WaitingHall';
|
|
17
18
|
/**
|
|
@@ -35,8 +36,8 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
35
36
|
abstract close(): void;
|
|
36
37
|
abstract hangup(reason: string): Promise<SignalingMessage | void>;
|
|
37
38
|
abstract acceptCall(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
38
|
-
abstract sendSdp(participantId:
|
|
39
|
-
abstract sendCandidate(participantId:
|
|
39
|
+
abstract sendSdp(participantId: ParticipantId, sdp: RTCSessionDescription): Promise<SignalingMessage>;
|
|
40
|
+
abstract sendCandidate(participantId: ParticipantId, candidate: RTCIceCandidate): Promise<SignalingMessage>;
|
|
40
41
|
abstract changeMediaSettings(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
41
42
|
abstract changeParticipantState(state: {
|
|
42
43
|
[key: string]: string;
|
|
@@ -58,16 +59,16 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
58
59
|
abstract removeMovie(data: any): Promise<SignalingMessage>;
|
|
59
60
|
abstract startStream(data: any): Promise<SignalingMessage>;
|
|
60
61
|
abstract stopStream(): Promise<SignalingMessage>;
|
|
61
|
-
abstract recordSetRole(participantId:
|
|
62
|
+
abstract recordSetRole(participantId: ParticipantId, role: RecordRole | null): Promise<SignalingMessage>;
|
|
62
63
|
abstract getRecordStatus(): Promise<SignalingMessage>;
|
|
63
64
|
abstract switchTopology(topology: TransportTopology, force?: boolean): Promise<SignalingMessage>;
|
|
64
65
|
abstract reportPerfStat(report: PerfStatReport): Promise<SignalingMessage>;
|
|
65
66
|
abstract chatMessage(message: string, participantId: CompositeUserId | null): Promise<SignalingMessage>;
|
|
66
67
|
abstract chatHistory(count: number): Promise<SignalingMessage>;
|
|
67
|
-
abstract customData(data: JSONObject, participantId:
|
|
68
|
+
abstract customData(data: JSONObject, participantId: ParticipantId | null): Promise<SignalingMessage>;
|
|
68
69
|
abstract grantRoles(participantId: CompositeUserId, roles: UserRole[], revoke: boolean): Promise<SignalingMessage>;
|
|
69
|
-
abstract muteParticipant(participantId:
|
|
70
|
-
abstract pinParticipant(participantId:
|
|
70
|
+
abstract muteParticipant(participantId: ParticipantId | null, muteStates: MuteStates, requestedMedia: MediaOption[]): Promise<SignalingMessage>;
|
|
71
|
+
abstract pinParticipant(participantId: ParticipantId, unpin: boolean): Promise<SignalingMessage>;
|
|
71
72
|
abstract updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<SignalingMessage>;
|
|
72
73
|
abstract changeOptions(changes: {
|
|
73
74
|
[key in ConversationOption]?: boolean;
|