@vkontakte/calls-sdk 2.8.5-dev.086cc589.0 → 2.8.5-dev.0c1f6988.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 (42) hide show
  1. package/CallsSDK.d.ts +23 -4
  2. package/abstract/BaseApi.d.ts +1 -0
  3. package/abstract/BaseSignaling.d.ts +10 -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 +5 -15
  9. package/classes/MediaSource.d.ts +26 -5
  10. package/classes/ProducerCommandSerializationService.d.ts +2 -0
  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/ServerTransport.d.ts +5 -0
  18. package/classes/transport/Transport.d.ts +1 -0
  19. package/default/Api.d.ts +1 -0
  20. package/default/Signaling.d.ts +3 -1
  21. package/enums/FatalError.d.ts +2 -1
  22. package/enums/SignalingCommandType.d.ts +2 -1
  23. package/package.json +4 -3
  24. package/static/ApiTransport.d.ts +1 -0
  25. package/static/ConversationDebugLogger.d.ts +13 -0
  26. package/static/External.d.ts +2 -1
  27. package/static/Params.d.ts +51 -2
  28. package/static/SimulcastInfo.d.ts +13 -0
  29. package/static/Utils.d.ts +4 -3
  30. package/static/WebRTCUtils.d.ts +5 -3
  31. package/types/ChangeSimulcast.d.ts +6 -0
  32. package/types/Conversation.d.ts +2 -14
  33. package/types/GetLogUploadUrlParams.d.ts +6 -0
  34. package/types/GetLogUploadUrlResponse.d.ts +3 -0
  35. package/types/Params.d.ts +1 -1
  36. package/types/SimulcastInfo.d.ts +10 -0
  37. package/types/Statistics.d.ts +11 -4
  38. package/types/VideoSettings.d.ts +12 -0
  39. package/utils/Conversation.d.ts +4 -0
  40. package/utils/DebugStorage.d.ts +6 -0
  41. package/utils/Media.d.ts +1 -2
  42. package/utils/NavigatorPermissions.d.ts +13 -0
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;
@@ -0,0 +1,10 @@
1
+ export type SimulcastStreamInfo = {
2
+ rid: string;
3
+ width: number;
4
+ height: number;
5
+ fps: number;
6
+ bitrate: number;
7
+ };
8
+ export type SimulcastInfo = {
9
+ streams: SimulcastStreamInfo[];
10
+ };
@@ -24,7 +24,15 @@ export interface ILocalIceCandidateStat extends IRemoteIceCandidateStat {
24
24
  relayProtocol: string;
25
25
  networkType: RTCNetworkType;
26
26
  }
27
- export type StatRtp = {
27
+ interface StatRtpOutboundVideo {
28
+ frameHeight?: number;
29
+ frameWidth?: number;
30
+ rid?: string;
31
+ framesSent?: number;
32
+ framesPerSecond?: number;
33
+ targetBitrate?: number;
34
+ }
35
+ export interface StatRtp extends StatRtpOutboundVideo {
28
36
  ssrc: number;
29
37
  type: string;
30
38
  kind: string;
@@ -45,8 +53,6 @@ export type StatRtp = {
45
53
  packetLoss?: number;
46
54
  clockRate?: number;
47
55
  mimeType?: string;
48
- frameHeight?: number;
49
- frameWidth?: number;
50
56
  framesDecoded?: number;
51
57
  framesReceived?: number;
52
58
  framesDropped?: number;
@@ -63,7 +69,7 @@ export type StatRtp = {
63
69
  totalFreezesDurationDelta?: number;
64
70
  freezeCount: number;
65
71
  freezeCountDelta?: number;
66
- };
72
+ }
67
73
  export type StatItem = {
68
74
  timestamp: number;
69
75
  transport: StatTransport;
@@ -87,3 +93,4 @@ export type StatResult = {
87
93
  rtps: StatRtp[];
88
94
  };
89
95
  };
96
+ export {};
@@ -25,6 +25,10 @@ export type VideoSettings = {
25
25
  * https://www.w3.org/TR/webrtc-svc/
26
26
  */
27
27
  scalabilityMode: string;
28
+ /**
29
+ * Таблица с битрейтами в зависимости от разрешения
30
+ */
31
+ bitrates?: Record<'generic' | string, VideoBitrateSettings[]>;
28
32
  };
29
33
  export default VideoSettings;
30
34
  export declare function compareVideoSettings(vs1: VideoSettings | null, vs2: VideoSettings | null): boolean;
@@ -38,3 +42,11 @@ export declare enum VideoScalability {
38
42
  L1T2 = "L1T2",
39
43
  L1T3 = "L1T3"
40
44
  }
45
+ /**
46
+ * Настройка битрейта под конкретное разрешение
47
+ * @hidden
48
+ */
49
+ export type VideoBitrateSettings = {
50
+ dimension: number;
51
+ bitrate: number;
52
+ };
@@ -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 {};