@vkontakte/calls-sdk 2.6.3-dev.cd0dd8d.0 → 2.6.3-dev.dea4ecd.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.
Files changed (49) hide show
  1. package/CallsSDK.d.ts +25 -23
  2. package/abstract/BaseApi.d.ts +1 -1
  3. package/abstract/BaseSignaling.d.ts +1 -1
  4. package/calls-sdk.cjs.js +8 -8
  5. package/calls-sdk.esm.js +8 -8
  6. package/classes/Conversation.d.ts +15 -4
  7. package/classes/MediaSource.d.ts +10 -2
  8. package/classes/VolumeDetector.d.ts +1 -1
  9. package/classes/codec/Types.d.ts +3 -3
  10. package/classes/codec/WebCodecsEncoder.d.ts +3 -1
  11. package/classes/screenshare/PacketHistory.d.ts +1 -1
  12. package/classes/screenshare/ScreenCaptureSender.d.ts +2 -1
  13. package/classes/screenshare/ScreenCongestionControl.d.ts +3 -1
  14. package/classes/screenshare/SharingStatReport.d.ts +1 -1
  15. package/classes/transport/DirectTransport.d.ts +1 -1
  16. package/classes/transport/PerfStatReporter.d.ts +2 -2
  17. package/classes/transport/Statistics.d.ts +4 -4
  18. package/default/Signaling.d.ts +1 -1
  19. package/enums/ConversationFeature.d.ts +3 -0
  20. package/enums/RoomsEventType.d.ts +3 -0
  21. package/package.json +2 -2
  22. package/static/External.d.ts +15 -0
  23. package/static/Json.d.ts +1 -1
  24. package/static/Params.d.ts +22 -6
  25. package/static/Utils.d.ts +3 -0
  26. package/static/WebRTCUtils.d.ts +21 -7
  27. package/types/ConversationFeature.d.ts +4 -1
  28. package/types/ConversationParams.d.ts +1 -1
  29. package/types/ConversationResponse.d.ts +1 -1
  30. package/types/ExternalId.d.ts +8 -5
  31. package/types/Feedback.d.ts +6 -0
  32. package/types/IceServer.d.ts +1 -1
  33. package/types/MediaDeviceType.d.ts +1 -1
  34. package/types/MediaModifiers.d.ts +1 -1
  35. package/types/MediaSettings.d.ts +12 -2
  36. package/types/MovieShare.d.ts +1 -1
  37. package/types/MuteStates.d.ts +4 -1
  38. package/types/Participant.d.ts +14 -5
  39. package/types/ParticipantLayout.d.ts +4 -4
  40. package/types/ParticipantPriority.d.ts +1 -1
  41. package/types/ParticipantStreamDescription.d.ts +1 -1
  42. package/types/PushData.d.ts +1 -1
  43. package/types/Room.d.ts +9 -0
  44. package/types/ScreenCaptureSettings.d.ts +17 -0
  45. package/types/ServerSettings.d.ts +1 -1
  46. package/types/SignalingCommand.d.ts +1 -1
  47. package/types/SignalingMessage.d.ts +2 -2
  48. package/types/VideoSettings.d.ts +1 -1
  49. package/types/WaitingHall.d.ts +4 -4
package/CallsSDK.d.ts CHANGED
@@ -36,22 +36,23 @@ import Utils from './static/Utils';
36
36
  import WebRTCUtils, { FacingMode } from './static/WebRTCUtils';
37
37
  import ConversationParams from './types/ConversationParams';
38
38
  import ConversationResponse from './types/ConversationResponse';
39
- import { ExternalId, ExternalIdType, ExternalParticipant, ExternalParticipantId, ExternalParticipantListMarkers, ExternalUserId } from './types/ExternalId';
39
+ import { ExternalId, ExternalIdType, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers, ExternalUserId } from './types/ExternalId';
40
40
  import IceServer from './types/IceServer';
41
41
  import MediaModifiers from './types/MediaModifiers';
42
42
  import { IVideoDimentions, MediaSettings } from './types/MediaSettings';
43
43
  import MuteStates, { IMuteParticipantInternalParams, IMuteParticipantParams } from './types/MuteStates';
44
- import { IGetParticipantsParameters, OkUserId, ParticipantStateMapped } from './types/Participant';
45
- import ParticipantLayout, { Layout, StopStream } from './types/ParticipantLayout';
44
+ import { IGetParticipantsParameters, OkUserId, ParticipantListMarker, ParticipantListMarkers, ParticipantListType, ParticipantStateMapped } from './types/Participant';
45
+ import ParticipantLayout, { Layout, RequestKeyFrame, StopStream } from './types/ParticipantLayout';
46
46
  import { ParticipantListChunkParameters } from './types/ParticipantListChunk';
47
47
  import ParticipantPriority from './types/ParticipantPriority';
48
48
  import { MediaType, ParticipantStreamDescription } from './types/ParticipantStreamDescription';
49
- import { Room, RoomsUpdate, RoomParticipantUpdate } from './types/Room';
49
+ import { Room, RoomsUpdate, RoomParticipantUpdate, Rooms } from './types/Room';
50
50
  import RoomsEventType from './enums/RoomsEventType';
51
+ import { ScreenCaptureSettings } from './types/ScreenCaptureSettings';
51
52
  import SignalingMessage from './types/SignalingMessage';
52
53
  import { WaitingHallResponse } from './types/WaitingHall';
53
54
  import { IFeedbackExternal } from './types/Feedback';
54
- import { ISharedMovieInfo, ISharedMovieStoppedInfo, ISharedMovieState, ISharedMovieStateResponse, IAddMovieParams, IOnRemoteMovieData, IMoviePreview, IUpdateMovieData } from './types/MovieShare';
55
+ import { ISharedMovieInfo, ISharedMovieStoppedInfo, ISharedMovieState, ISharedMovieStateResponse, IAddMovieParams, IOnRemoteMovieData, IMoviePreview, IUpdateMovieData, IMovieMetaData } from './types/MovieShare';
55
56
  import { IStartStreamData, IStopStreamData } from './types/Streams';
56
57
  import ConversationFeature from './enums/ConversationFeature';
57
58
  import { IFeaturesPerRole } from './types/ConversationFeature';
@@ -72,6 +73,10 @@ export declare const browser: {
72
73
  * Возвращает все подключенные устройства вывода звука
73
74
  */
74
75
  getOutput: typeof WebRTCUtils.getOutput;
76
+ /**
77
+ * Возвращает тип используемой камеры (передняя или задняя)
78
+ */
79
+ getVideoFacingMode: typeof WebRTCUtils.getVideoFacingMode;
75
80
  /**
76
81
  * Есть ли у пользователя камера
77
82
  */
@@ -227,7 +232,7 @@ export declare function getTokenForAnonym(userId: string, appKey?: string): Prom
227
232
  export declare function apiCall(method: string, data?: any): Promise<any>;
228
233
  /**
229
234
  * Посылает тестовую команду request-test-mode на сервер, дабы ограничить сеть
230
- * Команда вида: {command:"data-set-link-params", params:{"bandwidth-kbps":"700"} }
235
+ * Команда вида: \{command:"data-set-link-params", params:\{"bandwidth-kbps":"700"\}\}
231
236
  * @param consumerCommand - команда для текущего приемника
232
237
  * @param producerCommand - команда для текущего отсылателя
233
238
  * @hidden
@@ -287,6 +292,13 @@ export declare function addParticipantInternal(uid: OkUserId, params?: AddPartic
287
292
  */
288
293
  export declare function removeParticipant(externalId: string | ExternalId, ban?: boolean): Promise<void>;
289
294
  export declare function removeParticipantInternal(uid: OkUserId, ban?: boolean): Promise<void>;
295
+ /**
296
+ * Изменить камеру на фронтальную или заднюю (для мобильных устройств)
297
+ *
298
+ * @param kind
299
+ * @param facingMode
300
+ */
301
+ export declare function changeDevice(kind: 'videoinput', facingMode: FacingMode): Promise<void>;
290
302
  /**
291
303
  * Изменить камеру, микрофон или динамик
292
304
  *
@@ -297,16 +309,11 @@ export declare function changeDevice(kind: MediaDeviceKind, deviceId: string): P
297
309
  /**
298
310
  * Включить/выключить захват экрана
299
311
  *
300
- * @param state Включить или выключить
301
- */
302
- export declare function captureScreen(state: boolean): Promise<void>;
303
- /**
304
- * Включить/выключить захват экрана
305
- *
306
- * @param screenState Включить или выключить захват экрана.
307
- * @param audioShareState Включить или выключить захват звука. Может быть использован только вместе с захватом экрана.
312
+ * @param stateOrSettings
313
+ * state Включить или выключить захват экрана
314
+ * settings Параметры захваты экрана
308
315
  */
309
- export declare function captureScreenAndAudio(screenState: boolean, audioShareState?: boolean): Promise<void>;
316
+ export declare function captureScreen(stateOrSettings: boolean | ScreenCaptureSettings): Promise<void>;
310
317
  /**
311
318
  * Включить/выключить передачу точек вимоджи
312
319
  *
@@ -512,12 +519,7 @@ export declare function removeMovie(movieId: number): Promise<void>;
512
519
  * @param rooms id в случае обновления сессионного зала
513
520
  * @param assignRandomly рандомно назначить участников залов из свободных в соответствии с participantCount
514
521
  */
515
- export declare function updateRooms(rooms: {
516
- id?: number;
517
- name?: string;
518
- participantCount?: number;
519
- active?: boolean;
520
- }[], assignRandomly: boolean): Promise<void>;
522
+ export declare function updateRooms(rooms: Partial<Room>[], assignRandomly?: boolean): Promise<void>;
521
523
  /**
522
524
  * Активировать сессионные залы
523
525
  * @param roomIds
@@ -593,7 +595,7 @@ export declare function getWaitingHall(pageMarker?: string | null, count?: numbe
593
595
  * @param demote Запретить вход
594
596
  */
595
597
  export declare function promoteParticipant(externalId: ExternalId, demote?: boolean): Promise<void>;
596
- export declare function getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<import("./types/ExternalId").ExternalParticipantListChunk>;
598
+ export declare function getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<ExternalParticipantListChunk>;
597
599
  export declare function getParticipants(parameters: IGetParticipantsParameters): Promise<ExternalParticipant[]>;
598
600
  export declare function feedback(key: string): Promise<SignalingMessage>;
599
601
  export declare function enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<void>;
@@ -619,5 +621,5 @@ export declare function requestAsr(request: boolean): Promise<void>;
619
621
  * Версия SDK
620
622
  */
621
623
  export declare function version(): string;
622
- export type { AddParticipantParams, ConversationData, ConversationParams, ConversationResponse, ExternalId, ExternalParticipant, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, HangupReasonData, IceServer, JSONArray, JSONObject, JSONType, Layout, MediaModifiers, MediaSettings, MuteStates, OkUserId, ParamsObject, ParticipantLayout, ParticipantPriority, ParticipantStateMapped, ParticipantStreamDescription, ParticipantListChunkParameters, IGetParticipantsParameters, SignalingMessage, StatResult, StopStream, WaitingHallResponse, IVideoDimentions, IFeedbackExternal, ISharedMovieInfo, ISharedMovieStoppedInfo, ISharedMovieState, ISharedMovieStateResponse, IAddMovieParams, IOnRemoteMovieData, IMoviePreview, Room, RoomsUpdate, RoomParticipantUpdate, IUpdateMovieData, IFeaturesPerRole, IMuteParticipantParams, IMuteParticipantInternalParams, IStartStreamData, IStopStreamData, };
624
+ export type { AddParticipantParams, ConversationData, ConversationParams, ConversationResponse, ExternalId, ExternalParticipant, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, HangupReasonData, IceServer, JSONArray, JSONObject, JSONType, Layout, MediaModifiers, MediaSettings, MuteStates, OkUserId, ParamsObject, ParticipantLayout, ParticipantListMarkers, ParticipantListType, ParticipantPriority, ParticipantStateMapped, ParticipantStreamDescription, ParticipantListChunkParameters, ParticipantListMarker, RequestKeyFrame, Rooms, IGetParticipantsParameters, ScreenCaptureSettings, SignalingMessage, StatResult, StopStream, WaitingHallResponse, IMovieMetaData, IVideoDimentions, IFeedbackExternal, ISharedMovieInfo, ISharedMovieStoppedInfo, ISharedMovieState, ISharedMovieStateResponse, IAddMovieParams, IOnRemoteMovieData, IMoviePreview, Room, RoomsUpdate, RoomParticipantUpdate, IUpdateMovieData, IFeaturesPerRole, IMuteParticipantParams, IMuteParticipantInternalParams, IStartStreamData, IStopStreamData, };
623
625
  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, TransportTopology, RoomsEventType, ConversationFeature, ArrayDequeue, };
@@ -3,7 +3,7 @@ import ConversationParams from '../types/ConversationParams';
3
3
  import ConversationResponse from '../types/ConversationResponse';
4
4
  import { ExternalId, ExternalUserId } from '../types/ExternalId';
5
5
  import { CompositeUserId, OkUserId } from '../types/Participant';
6
- export declare type LogItem = {
6
+ export type LogItem = {
7
7
  count?: number;
8
8
  custom: Record<string, string | number>;
9
9
  data?: string[];
@@ -63,7 +63,7 @@ export default abstract class BaseSignaling extends EventEmitter {
63
63
  abstract addMovie(data: IAddMovieParams): Promise<SignalingMessage>;
64
64
  abstract updateMovie(data: IUpdateMovieData): Promise<SignalingMessage>;
65
65
  abstract removeMovie(data: any): Promise<SignalingMessage>;
66
- abstract updateRooms(rooms: Record<any, any>[], assignRandomly: boolean): Promise<SignalingMessage>;
66
+ abstract updateRooms(rooms: Record<any, any>[], assignRandomly?: boolean): Promise<SignalingMessage>;
67
67
  abstract activateRooms(roomIds: number[], deactivate: boolean): Promise<SignalingMessage>;
68
68
  abstract switchRoom(toRoomId: number | null, participantId?: ParticipantId): Promise<SignalingMessage>;
69
69
  abstract getRooms(withParticipants: boolean): Promise<SignalingMessage>;