@vkontakte/calls-sdk 2.8.6-dev.5b48b898.0 → 2.8.6-dev.64c0084a.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 (37) hide show
  1. package/CallsSDK.d.ts +6 -5
  2. package/abstract/BaseSignaling.d.ts +1 -0
  3. package/calls-sdk.cjs.js +8 -8
  4. package/calls-sdk.esm.js +8 -8
  5. package/classes/Conversation.d.ts +12 -5
  6. package/classes/Logger.d.ts +3 -0
  7. package/classes/MediaSource.d.ts +3 -0
  8. package/classes/SignalingActor.d.ts +9 -0
  9. package/classes/codec/IEncoder.d.ts +0 -1
  10. package/classes/screenshare/BaseStreamBuilder.d.ts +1 -1
  11. package/classes/transport/Statistics.d.ts +23 -10
  12. package/default/Signaling.d.ts +16 -9
  13. package/enums/ChatRoomEventType.d.ts +1 -1
  14. package/enums/ConversationOption.d.ts +3 -3
  15. package/enums/RecordRole.d.ts +1 -1
  16. package/enums/SignalingTransportStat.d.ts +17 -0
  17. package/enums/Stat.d.ts +35 -23
  18. package/package.json +2 -1
  19. package/static/ApiTransport.d.ts +1 -1
  20. package/static/External.d.ts +2 -2
  21. package/static/Params.d.ts +48 -17
  22. package/static/SimulcastInfo.d.ts +1 -1
  23. package/static/Utils.d.ts +1 -1
  24. package/types/ConversationParams.d.ts +2 -0
  25. package/types/ConversationResponse.d.ts +4 -0
  26. package/types/ExternalId.d.ts +2 -0
  27. package/types/SignalingMessage.d.ts +1 -1
  28. package/types/Streams.d.ts +1 -0
  29. package/types/WebTransport.d.ts +25 -0
  30. package/utils/LengthPrefixed.d.ts +48 -0
  31. package/utils/Lz4.d.ts +1 -1
  32. package/utils/MsgPackerBufferUtils.d.ts +1 -1
  33. package/utils/VariableLengthInteger.d.ts +18 -0
  34. package/worker/LibVPxDecoderWorker.d.ts +0 -1
  35. package/worker/LibVPxEncoderWorker.d.ts +0 -1
  36. package/worker/WebCodecsDecoderWorker.d.ts +0 -1
  37. package/worker/WebCodecsEncoderWorker.d.ts +0 -1
@@ -0,0 +1,25 @@
1
+ import { WebTransportOptions } from '@fails-components/webtransport';
2
+ declare class WebTransportEventual {
3
+ private webTransport;
4
+ private stream;
5
+ private writer;
6
+ private reader;
7
+ private readonly url;
8
+ private readonly options;
9
+ private readonly compression;
10
+ private encoder;
11
+ private decoder;
12
+ onopen: ((this: WebTransportEventual, ev: Event) => any) | null;
13
+ onmessage: ((this: WebTransportEventual, ev: MessageEvent) => any) | null;
14
+ onerror: ((this: WebTransportEventual, ev: Event) => any) | null;
15
+ onclose: ((this: WebTransportEventual, ev: CloseEvent) => any) | null;
16
+ readyState: number;
17
+ constructor(url: string, options?: WebTransportOptions);
18
+ private getCompressionTypeFromUrl;
19
+ private connect;
20
+ private readLoop;
21
+ send(data: string): Promise<void>;
22
+ close(code?: number, reason?: string): void;
23
+ static isBrowserSupported(): boolean;
24
+ }
25
+ export { WebTransportEventual as WebTransport };
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Encodes a string into a Uint8Array, prepending the length of the string as a variable-length integer and optionally compressing it.
3
+ */
4
+ declare class LengthPrefixedTextEncoder {
5
+ private readonly encoder;
6
+ private readonly compression;
7
+ private readonly lengthEncoder;
8
+ constructor(compression?: 'gzip' | 'deflate' | 'deflate-raw' | null);
9
+ /**
10
+ * Encodes the given string into a Uint8Array.
11
+ *
12
+ * @param data The string to encode.
13
+ * @returns A Uint8Array containing the length-prefixed and optionally compressed encoded string.
14
+ * @throws {RangeError} If the string length exceeds the maximum representable value.
15
+ */
16
+ encode(data: string): Uint8Array;
17
+ private compress;
18
+ }
19
+ /**
20
+ * Decodes a stream of Uint8Arrays into strings, where each string
21
+ * is prefixed by its length as a variable-length integer and optionally decompressed.
22
+ */
23
+ declare class LengthPrefixedTextDecoder {
24
+ private readonly decoder;
25
+ private readonly compression;
26
+ private readonly lengthDecoder;
27
+ private buffer;
28
+ private expectedLength;
29
+ private offset;
30
+ private lengthPrefixLength;
31
+ constructor(compression?: 'gzip' | 'deflate' | 'deflate-raw' | null);
32
+ /**
33
+ * Decodes a Uint8Array into a list of strings.
34
+ *
35
+ * @param data The Uint8Array to decode.
36
+ * @returns An array of decoded strings.
37
+ */
38
+ decode(data: Uint8Array): string[];
39
+ /**
40
+ * Reads the length prefix from the beginning of the data.
41
+ *
42
+ * @param data The Uint8Array containing the length prefix.
43
+ * @returns The length of the message, or null if there's not enough data to read the length.
44
+ */
45
+ private readLength;
46
+ private decompress;
47
+ }
48
+ export { LengthPrefixedTextEncoder, LengthPrefixedTextDecoder };
package/utils/Lz4.d.ts CHANGED
@@ -1 +1 @@
1
- export declare function lz4Decompress(input: Uint8Array, outputLength: number): Uint8Array;
1
+ export declare function lz4Decompress(input: Uint8Array, outputLength: number): Uint8Array<ArrayBuffer>;
@@ -13,7 +13,7 @@ export declare function createWriteBuffer(): {
13
13
  putUi32(v: number): void;
14
14
  putUi64(v: number): void;
15
15
  putF(v: number): void;
16
- ui8array(): Uint8Array;
16
+ ui8array(): Uint8Array<ArrayBuffer>;
17
17
  };
18
18
  export declare function createReadBuffer(buf: BufferSource): {
19
19
  peek(): number;
@@ -0,0 +1,18 @@
1
+ declare class VariableLengthIntegerEncoder {
2
+ /**
3
+ * Encodes an integer using a variable-length integer encoding.
4
+ * @param num The number to encode.
5
+ * @returns A Uint8Array representing the encoded integer.
6
+ */
7
+ encode(num: number | bigint): Uint8Array;
8
+ }
9
+ declare class VariableLengthIntegerDecoder {
10
+ /**
11
+ * Decodes an integer from a Uint8Array using variable-length integer encoding.
12
+ * @param data The Uint8Array to decode.
13
+ * @returns The decoded integer.
14
+ */
15
+ decode(data: Uint8Array): bigint | null;
16
+ getNumBytesForLengthInteger(data: Uint8Array): number;
17
+ }
18
+ export { VariableLengthIntegerEncoder, VariableLengthIntegerDecoder };
@@ -1,4 +1,3 @@
1
- /// <reference lib="webworker" />
2
1
  import type libvpx from '@vkontakte/libvpx';
3
2
  declare const _default: (vpx: typeof libvpx, urlResolver: (url: string) => string) => void;
4
3
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference lib="webworker" />
2
1
  import type libvpx from '@vkontakte/libvpx';
3
2
  declare const _default: (vpx: typeof libvpx, urlResolver: (url: string) => string, useCongestionControl: boolean, maxBitrate: number) => void;
4
3
  export default _default;
@@ -1,3 +1,2 @@
1
- /// <reference lib="webworker" />
2
1
  declare const _default: (videoFrameTransferable: boolean) => void;
3
2
  export default _default;
@@ -1,3 +1,2 @@
1
- /// <reference lib="webworker" />
2
1
  declare const _default: () => void;
3
2
  export default _default;