@vkontakte/calls-sdk 2.6.3-dev.e77d93a.0 → 2.7.1

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 (47) hide show
  1. package/CallsSDK.d.ts +19 -23
  2. package/abstract/BaseApi.d.ts +1 -3
  3. package/abstract/BaseSignaling.d.ts +1 -1
  4. package/calls-sdk.cjs.js +9 -9
  5. package/calls-sdk.esm.js +9 -9
  6. package/classes/Conversation.d.ts +12 -3
  7. package/classes/MediaSource.d.ts +7 -1
  8. package/classes/VolumeDetector.d.ts +1 -1
  9. package/classes/codec/Types.d.ts +3 -3
  10. package/classes/screenshare/PacketHistory.d.ts +1 -1
  11. package/classes/screenshare/SharingStatReport.d.ts +1 -1
  12. package/classes/transport/DirectTransport.d.ts +1 -1
  13. package/classes/transport/PerfStatReporter.d.ts +2 -2
  14. package/classes/transport/Statistics.d.ts +4 -4
  15. package/default/Api.d.ts +0 -2
  16. package/default/Signaling.d.ts +1 -1
  17. package/enums/ConversationFeature.d.ts +3 -0
  18. package/enums/RoomsEventType.d.ts +3 -0
  19. package/package.json +2 -2
  20. package/static/External.d.ts +15 -0
  21. package/static/Json.d.ts +1 -1
  22. package/static/Params.d.ts +23 -5
  23. package/static/Utils.d.ts +3 -0
  24. package/static/WebRTCUtils.d.ts +19 -5
  25. package/types/ConversationFeature.d.ts +4 -1
  26. package/types/ConversationParams.d.ts +1 -1
  27. package/types/ConversationResponse.d.ts +1 -1
  28. package/types/ExternalId.d.ts +8 -5
  29. package/types/Feedback.d.ts +6 -0
  30. package/types/IceServer.d.ts +1 -1
  31. package/types/MediaDeviceType.d.ts +1 -1
  32. package/types/MediaModifiers.d.ts +1 -1
  33. package/types/MediaSettings.d.ts +8 -2
  34. package/types/MovieShare.d.ts +1 -1
  35. package/types/MuteStates.d.ts +4 -1
  36. package/types/Participant.d.ts +14 -5
  37. package/types/ParticipantLayout.d.ts +4 -4
  38. package/types/ParticipantPriority.d.ts +1 -1
  39. package/types/ParticipantStreamDescription.d.ts +1 -1
  40. package/types/PushData.d.ts +1 -1
  41. package/types/Room.d.ts +9 -0
  42. package/types/ScreenCaptureSettings.d.ts +3 -0
  43. package/types/ServerSettings.d.ts +1 -1
  44. package/types/SignalingCommand.d.ts +1 -1
  45. package/types/SignalingMessage.d.ts +2 -2
  46. package/types/VideoSettings.d.ts +1 -1
  47. package/types/WaitingHall.d.ts +4 -4
package/CallsSDK.d.ts CHANGED
@@ -36,23 +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
51
  import { ScreenCaptureSettings } from './types/ScreenCaptureSettings';
52
52
  import SignalingMessage from './types/SignalingMessage';
53
53
  import { WaitingHallResponse } from './types/WaitingHall';
54
54
  import { IFeedbackExternal } from './types/Feedback';
55
- 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';
56
56
  import { IStartStreamData, IStopStreamData } from './types/Streams';
57
57
  import ConversationFeature from './enums/ConversationFeature';
58
58
  import { IFeaturesPerRole } from './types/ConversationFeature';
@@ -73,6 +73,10 @@ export declare const browser: {
73
73
  * Возвращает все подключенные устройства вывода звука
74
74
  */
75
75
  getOutput: typeof WebRTCUtils.getOutput;
76
+ /**
77
+ * Возвращает тип используемой камеры (передняя или задняя)
78
+ */
79
+ getVideoFacingMode: typeof WebRTCUtils.getVideoFacingMode;
76
80
  /**
77
81
  * Есть ли у пользователя камера
78
82
  */
@@ -224,16 +228,6 @@ export declare function callInternal(ids: OkUserId[], type: CallType, mediaOptio
224
228
  */
225
229
  export declare function processPush(conversationId: string): Promise<void>;
226
230
  export declare function processPushInternal(conversationId: string, type?: UserType, peerId?: number): Promise<void>;
227
- export declare function getTokenForAnonym(userId: string, appKey?: string): Promise<string>;
228
- export declare function apiCall(method: string, data?: any): Promise<any>;
229
- /**
230
- * Посылает тестовую команду request-test-mode на сервер, дабы ограничить сеть
231
- * Команда вида: {command:"data-set-link-params", params:{"bandwidth-kbps":"700"} }
232
- * @param consumerCommand - команда для текущего приемника
233
- * @param producerCommand - команда для текущего отсылателя
234
- * @hidden
235
- */
236
- export declare function requestTestMode(consumerCommand: string, producerCommand: string): Promise<void>;
237
231
  /**
238
232
  * Авторизоваться для совершения звонков
239
233
  *
@@ -288,6 +282,13 @@ export declare function addParticipantInternal(uid: OkUserId, params?: AddPartic
288
282
  */
289
283
  export declare function removeParticipant(externalId: string | ExternalId, ban?: boolean): Promise<void>;
290
284
  export declare function removeParticipantInternal(uid: OkUserId, ban?: boolean): Promise<void>;
285
+ /**
286
+ * Изменить камеру на фронтальную или заднюю (для мобильных устройств)
287
+ *
288
+ * @param kind
289
+ * @param facingMode
290
+ */
291
+ export declare function changeDevice(kind: 'videoinput', facingMode: FacingMode): Promise<void>;
291
292
  /**
292
293
  * Изменить камеру, микрофон или динамик
293
294
  *
@@ -508,12 +509,7 @@ export declare function removeMovie(movieId: number): Promise<void>;
508
509
  * @param rooms id в случае обновления сессионного зала
509
510
  * @param assignRandomly рандомно назначить участников залов из свободных в соответствии с participantCount
510
511
  */
511
- export declare function updateRooms(rooms: {
512
- id?: number;
513
- name?: string;
514
- participantCount?: number;
515
- active?: boolean;
516
- }[], assignRandomly: boolean): Promise<void>;
512
+ export declare function updateRooms(rooms: Partial<Room>[], assignRandomly?: boolean): Promise<void>;
517
513
  /**
518
514
  * Активировать сессионные залы
519
515
  * @param roomIds
@@ -589,7 +585,7 @@ export declare function getWaitingHall(pageMarker?: string | null, count?: numbe
589
585
  * @param demote Запретить вход
590
586
  */
591
587
  export declare function promoteParticipant(externalId: ExternalId, demote?: boolean): Promise<void>;
592
- export declare function getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<import("./types/ExternalId").ExternalParticipantListChunk>;
588
+ export declare function getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<ExternalParticipantListChunk>;
593
589
  export declare function getParticipants(parameters: IGetParticipantsParameters): Promise<ExternalParticipant[]>;
594
590
  export declare function feedback(key: string): Promise<SignalingMessage>;
595
591
  export declare function enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<void>;
@@ -615,5 +611,5 @@ export declare function requestAsr(request: boolean): Promise<void>;
615
611
  * Версия SDK
616
612
  */
617
613
  export declare function version(): string;
618
- 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, ScreenCaptureSettings, SignalingMessage, StatResult, StopStream, WaitingHallResponse, IVideoDimentions, IFeedbackExternal, ISharedMovieInfo, ISharedMovieStoppedInfo, ISharedMovieState, ISharedMovieStateResponse, IAddMovieParams, IOnRemoteMovieData, IMoviePreview, Room, RoomsUpdate, RoomParticipantUpdate, IUpdateMovieData, IFeaturesPerRole, IMuteParticipantParams, IMuteParticipantInternalParams, IStartStreamData, IStopStreamData, };
614
+ 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, };
619
615
  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[];
@@ -46,6 +46,4 @@ export default abstract class BaseApi {
46
46
  hangupConversation(conversationId: string): void;
47
47
  removeHistoryRecords(recordIds: number[]): Promise<void>;
48
48
  cleanup(): void;
49
- getTokenForAnonym(userId: string, appKey?: string): Promise<string>;
50
- call(method: string, data?: any): Promise<any>;
51
49
  }
@@ -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>;