@vkontakte/calls-sdk 2.8.12-dev.26c45af4.0 → 2.8.12-dev.2d04df5e.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 (54) hide show
  1. package/CallsSDK.d.ts +28 -7
  2. package/abstract/BaseApi.d.ts +3 -1
  3. package/abstract/BaseSignaling.d.ts +6 -5
  4. package/calls-sdk.cjs.js +7 -13
  5. package/calls-sdk.esm.js +3295 -2345
  6. package/classes/CallRegistry.d.ts +5 -1
  7. package/classes/ExternalIdCache.d.ts +1 -0
  8. package/classes/MediaSource.d.ts +4 -0
  9. package/classes/StatsLogger.d.ts +17 -2
  10. package/classes/{Conversation.d.ts → conversation/Conversation.d.ts} +52 -45
  11. package/classes/conversation/Conversation.testUtils.d.ts +148 -0
  12. package/classes/{ConversationResponseValidator.d.ts → conversation/ConversationResponseValidator.d.ts} +1 -1
  13. package/classes/{DisplayLayoutRequester.d.ts → conversation/DisplayLayoutRequester.d.ts} +4 -4
  14. package/classes/conversation/index.d.ts +1 -0
  15. package/classes/stat/CallFinishClassifier.d.ts +11 -0
  16. package/classes/stat/CallLifecycleStats.d.ts +42 -0
  17. package/classes/stat/ConversationStats.d.ts +5 -4
  18. package/classes/stat/FirstMediaSentProbe.d.ts +13 -0
  19. package/classes/stat/StatAggregator.d.ts +4 -0
  20. package/classes/stat/StatPings.d.ts +1 -2
  21. package/classes/stat/StatSignalingCommands.d.ts +1 -2
  22. package/classes/transport/BaseTransport.d.ts +7 -1
  23. package/classes/transport/DirectTransport.d.ts +2 -1
  24. package/classes/transport/ServerTransport.d.ts +2 -5
  25. package/classes/transport/SimulcastSender.d.ts +27 -0
  26. package/classes/transport/Transport.d.ts +9 -1
  27. package/default/Api.d.ts +5 -3
  28. package/default/ApiExternal.d.ts +2 -1
  29. package/default/Signaling.d.ts +12 -15
  30. package/default/SignalingTransport.d.ts +10 -2
  31. package/enums/ClientHangupReason.d.ts +7 -0
  32. package/enums/HangupType.d.ts +0 -1
  33. package/enums/Stat.d.ts +5 -1
  34. package/package.json +3 -3
  35. package/static/ApiTransport.d.ts +3 -0
  36. package/static/AuthData.d.ts +10 -0
  37. package/static/Debug.d.ts +1 -0
  38. package/static/External.d.ts +1 -1
  39. package/static/Params.d.ts +28 -11
  40. package/static/ParticipantConnectionStatusUtils.d.ts +1 -0
  41. package/static/Sdp.d.ts +3 -0
  42. package/static/SignalingCapabilities.d.ts +1 -1
  43. package/static/SimulcastInfo.d.ts +5 -3
  44. package/static/Utils.d.ts +1 -2
  45. package/static/WebRTCUtils.d.ts +8 -7
  46. package/types/Api.d.ts +9 -0
  47. package/types/Capabilities.d.ts +1 -0
  48. package/types/Conversation.d.ts +12 -2
  49. package/types/Participant.d.ts +1 -0
  50. package/types/SignalingMessage.d.ts +5 -1
  51. package/types/WebTransport.d.ts +17 -16
  52. package/utils/IceServers.d.ts +2 -0
  53. package/utils/NavigatorPermissions.d.ts +2 -2
  54. package/utils/SerializeLatest.d.ts +5 -0
@@ -49,6 +49,7 @@ export interface ParticipantSessionState {
49
49
  }
50
50
  export interface ParticipantConnectionStatus {
51
51
  transport: ParticipantStatus;
52
+ stalled: boolean;
52
53
  sessionState?: ParticipantSessionState;
53
54
  sessionStateApplicable: boolean;
54
55
  sessionStateConnectedBySpeaker: boolean;
@@ -34,8 +34,11 @@ export type RecordInfo = {
34
34
  recordExternalOwnerId?: string;
35
35
  };
36
36
  export interface SignalingResponse extends SignalingMessage {
37
- response?: SignalingCommandType;
38
37
  error?: string;
38
+ errorCode?: string;
39
+ errorMessage?: string;
40
+ message?: string;
41
+ response?: SignalingCommandType;
39
42
  reason?: HangupType | FatalError;
40
43
  sequence?: number;
41
44
  type: 'response' | 'error' | 'timeout';
@@ -185,6 +188,7 @@ declare namespace SignalingMessage {
185
188
  peerId: PeerId;
186
189
  mediaSettings: Partial<MediaSettings>;
187
190
  capabilities?: string;
191
+ externalId?: ExternalId;
188
192
  }
189
193
  export interface Hungup extends Notification {
190
194
  participantId: OkUserId;
@@ -1,31 +1,32 @@
1
1
  import { WebTransportOptions } from '@fails-components/webtransport';
2
+ import { DebugLogger } from '../static/Debug';
2
3
  declare class WebTransportEventual {
4
+ static isBrowserSupported(): boolean;
5
+ onopen: ((this: WebTransportEventual, ev: Event) => any) | null;
6
+ onmessage: ((this: WebTransportEventual, ev: MessageEvent) => any) | null;
7
+ onerror: ((this: WebTransportEventual, ev: Event) => any) | null;
8
+ onclose: ((this: WebTransportEventual, ev: CloseEvent) => any) | null;
9
+ readyState: number;
3
10
  private webTransport;
4
- private stream;
5
11
  private writer;
6
- private reader;
7
12
  private readonly url;
8
13
  private readonly options;
9
14
  private readonly compression;
10
- private closeRequested;
11
- private closeEventEmitted;
12
15
  private encoder;
13
16
  private decoder;
14
- onopen: ((this: WebTransportEventual, ev: Event) => any) | null;
15
- onmessage: ((this: WebTransportEventual, ev: MessageEvent) => any) | null;
16
- onerror: ((this: WebTransportEventual, ev: Event) => any) | null;
17
- onclose: ((this: WebTransportEventual, ev: CloseEvent) => any) | null;
18
- readyState: number;
19
- constructor(url: string, options?: WebTransportOptions);
17
+ private readonly _debug;
18
+ constructor(url: string, options?: WebTransportOptions, debug?: DebugLogger);
19
+ send(data: string): Promise<void>;
20
+ close(code?: number, reason?: string): void;
20
21
  private getCompressionTypeFromUrl;
21
22
  private connect;
22
- private readChunks;
23
+ private observeClosed;
23
24
  private readLoop;
24
- send(data: string): Promise<void>;
25
+ private fail;
26
+ private handleStreamError;
27
+ private requestNativeClose;
28
+ private finishClose;
29
+ private emitEvent;
25
30
  private createErrorEvent;
26
- close(code?: number, reason?: string): void;
27
- private closeConnectedTransport;
28
- private emitClose;
29
- static isBrowserSupported(): boolean;
30
31
  }
31
32
  export { WebTransportEventual as WebTransport };
@@ -0,0 +1,2 @@
1
+ import IceServer from '../types/IceServer';
2
+ export declare function createIceServers(stunServer?: IceServer, turnServer?: IceServer): IceServer[];
@@ -2,8 +2,8 @@ type Device = 'camera' | 'microphone';
2
2
  type PermissionStatusState = typeof PermissionStatus.prototype.state;
3
3
  type EventListener = (name: Device, state: PermissionStatusState) => void;
4
4
  export declare class NavigatorPermissions {
5
- private _cameraPermissionStatus;
6
- private _microphonePermissionStatus;
5
+ private _cameraPermissionStatus?;
6
+ private _microphonePermissionStatus?;
7
7
  private _listener;
8
8
  static isSupported(): boolean;
9
9
  init(listener: EventListener): Promise<void>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Последовательно выполняет операции, оставляя в очереди только последнее запрошенное значение.
3
+ * Возвращает ошибку, только если не удалось применить итоговое состояние.
4
+ */
5
+ export declare function serializeLatest<T>(run: (value: T) => Promise<void> | undefined): (value: T) => Promise<void>;