@vkontakte/calls-sdk 2.8.5-dev.15448543.0 → 2.8.5-dev.16bee4a1.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 (38) hide show
  1. package/CallsSDK.d.ts +23 -4
  2. package/abstract/BaseApi.d.ts +1 -0
  3. package/abstract/BaseSignaling.d.ts +8 -1
  4. package/calls-sdk.cjs.js +8 -8
  5. package/calls-sdk.esm.js +8 -8
  6. package/classes/AudioFix.d.ts +4 -0
  7. package/classes/AudioOutput.d.ts +3 -0
  8. package/classes/Conversation.d.ts +10 -14
  9. package/classes/HangupReason.d.ts +13 -0
  10. package/classes/MediaSource.d.ts +18 -5
  11. package/classes/VideoEffectsFpsLimiter.d.ts +23 -0
  12. package/classes/codec/IDecoder.d.ts +1 -1
  13. package/classes/codec/LibVPxDecoder.d.ts +1 -1
  14. package/classes/codec/LibVPxEncoder.d.ts +0 -3
  15. package/classes/codec/WebCodecsDecoder.d.ts +1 -1
  16. package/classes/stat/StatFirstMediaReceived.d.ts +6 -5
  17. package/classes/transport/DirectTransport.d.ts +5 -0
  18. package/default/Api.d.ts +1 -0
  19. package/default/Signaling.d.ts +1 -1
  20. package/enums/FatalError.d.ts +2 -1
  21. package/enums/HangupType.d.ts +2 -1
  22. package/package.json +4 -3
  23. package/static/ApiTransport.d.ts +1 -0
  24. package/static/ConversationDebugLogger.d.ts +13 -0
  25. package/static/External.d.ts +4 -2
  26. package/static/Params.d.ts +51 -24
  27. package/static/Utils.d.ts +2 -2
  28. package/static/WebRTCUtils.d.ts +4 -3
  29. package/types/Conversation.d.ts +2 -14
  30. package/types/GetLogUploadUrlParams.d.ts +6 -0
  31. package/types/GetLogUploadUrlResponse.d.ts +3 -0
  32. package/types/Params.d.ts +1 -1
  33. package/types/SignalingMessage.d.ts +5 -0
  34. package/types/VideoSettings.d.ts +1 -1
  35. package/utils/Conversation.d.ts +4 -0
  36. package/utils/DebugStorage.d.ts +6 -0
  37. package/utils/Media.d.ts +1 -2
  38. package/utils/NavigatorPermissions.d.ts +13 -0
@@ -0,0 +1,6 @@
1
+ export type GetLogUploadUrlParams = {
2
+ conversationId: string;
3
+ webrtcPlatform: string;
4
+ startTime: number;
5
+ endTime: number;
6
+ };
@@ -0,0 +1,3 @@
1
+ export type GetLogUploadUrlResponse = {
2
+ upload_url: string;
3
+ };
package/types/Params.d.ts CHANGED
@@ -1 +1 @@
1
- export type IApiEnv = 'AUTO' | 'PROD' | 'PROD_OK' | 'TEST' | 'VIDEOTEST' | string;
1
+ export type IApiEnv = 'AUTO' | 'PROD' | 'CALLS' | 'PROD_OK' | 'TEST' | 'VIDEOTEST' | 'CALLSTEST' | string;
@@ -6,6 +6,7 @@ import ConversationOption from '../enums/ConversationOption';
6
6
  import FatalError from '../enums/FatalError';
7
7
  import HangupType from '../enums/HangupType';
8
8
  import MediaOption from '../enums/MediaOption';
9
+ import MuteState from '../enums/MuteState';
9
10
  import ParticipantState from '../enums/ParticipantState';
10
11
  import RoomsEventType from '../enums/RoomsEventType';
11
12
  import SignalingCommandType from '../enums/SignalingCommandType';
@@ -332,6 +333,8 @@ declare namespace SignalingMessage {
332
333
  mediaModifiers: MediaModifiers;
333
334
  conversation: Conversation;
334
335
  participants?: ParticipantListChunk;
336
+ muteState?: MuteState;
337
+ muteOptions?: MediaOption[];
335
338
  }
336
339
  export interface ChatRoomUpdated extends Notification {
337
340
  eventType: ChatRoomEventType;
@@ -368,6 +371,8 @@ declare namespace SignalingMessage {
368
371
  rooms: Room[];
369
372
  roomId?: number;
370
373
  };
374
+ muteState?: MuteState;
375
+ muteOptions?: MediaOption[];
371
376
  }
372
377
  export interface Feedback extends Notification {
373
378
  feedback: IFeedback[];
@@ -19,7 +19,7 @@ export type VideoSettings = {
19
19
  * Настройка деградации - понижаем фпс или разрешение
20
20
  * https://www.w3.org/TR/mst-content-hint/#dom-rtcdegradationpreference
21
21
  */
22
- degradationPreference: string;
22
+ degradationPreference: RTCDegradationPreference;
23
23
  /**
24
24
  * Настройка временных слоев
25
25
  * https://www.w3.org/TR/webrtc-svc/
@@ -1,4 +1,8 @@
1
1
  import MediaOption from '../enums/MediaOption';
2
2
  import MuteState from '../enums/MuteState';
3
3
  import MuteStates from '../types/MuteStates';
4
+ import SignalingMessage from '../types/SignalingMessage';
4
5
  export declare const getMediaOptionsByMuteState: (muteStates: MuteStates, value: MuteState) => MediaOption[];
6
+ export declare function extractConnectionMuteStates(connection: SignalingMessage.Connection | SignalingMessage.PromoteParticipant): MuteStates | undefined;
7
+ export declare function filterReconnectedParticipantMuteStates(participant: SignalingMessage.Participant): MuteStates;
8
+ export declare function filterReconnectedConversationMuteStates(connection: SignalingMessage.Connection | SignalingMessage.PromoteParticipant, muteStates: MuteStates): MuteStates;
@@ -1,2 +1,8 @@
1
+ export type CurrentLogItem = {
2
+ readonly t: number;
3
+ readonly l: string;
4
+ readonly d: any[];
5
+ readonly h: string;
6
+ };
1
7
  export declare function add(level: string, args: any[]): void;
2
8
  export declare function init(): void;
package/utils/Media.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { IVideoDimentions } from '../types/MediaSettings';
2
1
  export declare const stopMediaStreamTrack: (track: MediaStreamTrack) => void;
3
2
  export declare const stopMediaStreamTracks: (stream: MediaStream) => void;
4
3
  export declare const stopMediaStreamVideoTracks: (stream: MediaStream) => void;
5
4
  export declare const cloneVideoTrack: (stream: MediaStream) => MediaStreamTrack;
6
- export declare function setVideoResolution(track: MediaStreamTrack, { width, height }: IVideoDimentions): Promise<void>;
5
+ export declare function setVideoConstraints(track: MediaStreamTrack, constraints: MediaTrackConstraints): Promise<void>;
@@ -0,0 +1,13 @@
1
+ type Device = 'camera' | 'microphone';
2
+ type PermissionStatusState = typeof PermissionStatus.prototype.state;
3
+ type EventListener = (name: Device, state: PermissionStatusState) => void;
4
+ export declare class NavigatorPermissions {
5
+ private _cameraPermissionStatus;
6
+ private _microphonePermissionStatus;
7
+ private _listener;
8
+ static isSupported(): boolean;
9
+ init(listener: EventListener): Promise<void>;
10
+ private handlePermissionChange;
11
+ getPermissionState(device: Device): PermissionState | null;
12
+ }
13
+ export {};