@vkontakte/calls-sdk 2.4.4-beta.9 → 2.4.4-dev.23d413b.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 +15 -12
- package/abstract/BaseSignaling.d.ts +7 -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 +1 -1
- package/default/Signaling.d.ts +7 -7
- package/enums/HangupType.d.ts +2 -0
- package/package.json +4 -2
- package/static/External.d.ts +18 -18
- package/static/Params.d.ts +25 -22
- package/static/Utils.d.ts +12 -4
- package/types/ConversationParams.d.ts +1 -0
- package/types/ConversationResponse.d.ts +4 -0
- package/types/ExternalId.d.ts +17 -1
- package/types/MediaSettings.d.ts +6 -1
- package/types/Participant.d.ts +11 -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 +25 -17
- 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) последний получит максимальное качество, а первый худшее.
|
|
@@ -330,16 +333,16 @@ export declare function grantRolesInternal(uid: OkUserId, roles: UserRole[], rev
|
|
|
330
333
|
* @param muteStates Состояние устройств пользователя
|
|
331
334
|
* @param requestedMedia Попросить пользователя включить устройство
|
|
332
335
|
*/
|
|
333
|
-
export declare function muteParticipant(externalId: string |
|
|
334
|
-
export declare function muteParticipantInternal(uid: OkUserId | null, muteStates: MuteStates, requestedMedia?: MediaOption[]): 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>;
|
|
335
338
|
/**
|
|
336
339
|
* Закрепить/открепить выбранного собеседника у всех (только если есть соответствующая роль)
|
|
337
340
|
*
|
|
338
341
|
* @param externalId Внешний ID пользователя
|
|
339
342
|
* @param unpin Открепить
|
|
340
343
|
*/
|
|
341
|
-
export declare function pinParticipant(externalId: string |
|
|
342
|
-
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>;
|
|
343
346
|
/**
|
|
344
347
|
* Устанавливает настройки пользовательского медиа
|
|
345
348
|
*
|
|
@@ -374,8 +377,8 @@ export declare function chatHistory(count?: number): Promise<void>;
|
|
|
374
377
|
* @param data Данные
|
|
375
378
|
* @param externalId Внешний ID пользователя (если не указано, отправит всем)
|
|
376
379
|
*/
|
|
377
|
-
export declare function customData(data: JSONObject, externalId?: string |
|
|
378
|
-
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>;
|
|
379
382
|
/**
|
|
380
383
|
* Создать токен комнаты для подключения по ссылке
|
|
381
384
|
*
|
|
@@ -425,7 +428,7 @@ export declare function stopStream(): Promise<SignalingMessage>;
|
|
|
425
428
|
* @param externalId Внешний ID пользователя
|
|
426
429
|
* @param role Роль, если null, то роль удалится
|
|
427
430
|
*/
|
|
428
|
-
export declare function recordSetRole(externalId: string |
|
|
431
|
+
export declare function recordSetRole(externalId: string | ExternalParticipantId, role: RecordRole | null): Promise<void>;
|
|
429
432
|
export declare function getStreamInfo(): Promise<{
|
|
430
433
|
movieId: any;
|
|
431
434
|
preview: any;
|
|
@@ -445,7 +448,7 @@ export declare function addMovie(movieId: string): Promise<{
|
|
|
445
448
|
* @param movieId
|
|
446
449
|
* @param gain
|
|
447
450
|
*/
|
|
448
|
-
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>;
|
|
449
452
|
/**
|
|
450
453
|
* Удалить видео/лайв из звонка
|
|
451
454
|
*
|
|
@@ -505,5 +508,5 @@ export declare function promoteParticipant(externalId: ExternalId, demote?: bool
|
|
|
505
508
|
* @param recordIds Идентификаторы записей истории
|
|
506
509
|
*/
|
|
507
510
|
export declare function removeHistoryRecords(recordIds: number[]): Promise<void>;
|
|
508
|
-
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, HangupReasonData, IceServer, JSONArray, JSONObject, JSONType, Layout, MediaModifiers, MediaSettings, MuteStates, OkUserId, ParamsObject, ParticipantLayout, ParticipantPriority, ParticipantStateMapped, ParticipantStreamDescription, SignalingMessage, StatResult, StopStream, WaitingHallResponse, IVideoDimentions, };
|
|
509
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, };
|
|
@@ -12,7 +12,7 @@ import ConversationResponse from '../types/ConversationResponse';
|
|
|
12
12
|
import MediaModifiers from '../types/MediaModifiers';
|
|
13
13
|
import MediaSettings from '../types/MediaSettings';
|
|
14
14
|
import MuteStates from '../types/MuteStates';
|
|
15
|
-
import { CompositeUserId } from '../types/Participant';
|
|
15
|
+
import { CompositeUserId, ParticipantId } from '../types/Participant';
|
|
16
16
|
import SignalingMessage from '../types/SignalingMessage';
|
|
17
17
|
import { WaitingParticipantId } from '../types/WaitingHall';
|
|
18
18
|
/**
|
|
@@ -36,8 +36,8 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
36
36
|
abstract close(): void;
|
|
37
37
|
abstract hangup(reason: string): Promise<SignalingMessage | void>;
|
|
38
38
|
abstract acceptCall(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
39
|
-
abstract sendSdp(participantId:
|
|
40
|
-
abstract sendCandidate(participantId:
|
|
39
|
+
abstract sendSdp(participantId: ParticipantId, sdp: RTCSessionDescription): Promise<SignalingMessage>;
|
|
40
|
+
abstract sendCandidate(participantId: ParticipantId, candidate: RTCIceCandidate): Promise<SignalingMessage>;
|
|
41
41
|
abstract changeMediaSettings(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
42
42
|
abstract changeParticipantState(state: {
|
|
43
43
|
[key: string]: string;
|
|
@@ -59,16 +59,16 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
59
59
|
abstract removeMovie(data: any): Promise<SignalingMessage>;
|
|
60
60
|
abstract startStream(data: any): Promise<SignalingMessage>;
|
|
61
61
|
abstract stopStream(): Promise<SignalingMessage>;
|
|
62
|
-
abstract recordSetRole(participantId:
|
|
62
|
+
abstract recordSetRole(participantId: ParticipantId, role: RecordRole | null): Promise<SignalingMessage>;
|
|
63
63
|
abstract getRecordStatus(): Promise<SignalingMessage>;
|
|
64
64
|
abstract switchTopology(topology: TransportTopology, force?: boolean): Promise<SignalingMessage>;
|
|
65
65
|
abstract reportPerfStat(report: PerfStatReport): Promise<SignalingMessage>;
|
|
66
66
|
abstract chatMessage(message: string, participantId: CompositeUserId | null): Promise<SignalingMessage>;
|
|
67
67
|
abstract chatHistory(count: number): Promise<SignalingMessage>;
|
|
68
|
-
abstract customData(data: JSONObject, participantId:
|
|
68
|
+
abstract customData(data: JSONObject, participantId: ParticipantId | null): Promise<SignalingMessage>;
|
|
69
69
|
abstract grantRoles(participantId: CompositeUserId, roles: UserRole[], revoke: boolean): Promise<SignalingMessage>;
|
|
70
|
-
abstract muteParticipant(participantId:
|
|
71
|
-
abstract pinParticipant(participantId:
|
|
70
|
+
abstract muteParticipant(participantId: ParticipantId | null, muteStates: MuteStates, requestedMedia: MediaOption[]): Promise<SignalingMessage>;
|
|
71
|
+
abstract pinParticipant(participantId: ParticipantId, unpin: boolean): Promise<SignalingMessage>;
|
|
72
72
|
abstract updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<SignalingMessage>;
|
|
73
73
|
abstract changeOptions(changes: {
|
|
74
74
|
[key in ConversationOption]?: boolean;
|