@livekit/rtc-node 0.12.1 → 0.12.2

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 (64) hide show
  1. package/dist/audio_frame.d.cts +32 -0
  2. package/dist/audio_frame.d.ts +12 -5
  3. package/dist/audio_resampler.d.cts +60 -0
  4. package/dist/audio_resampler.d.ts +12 -3
  5. package/dist/audio_source.d.cts +37 -0
  6. package/dist/audio_source.d.ts +13 -5
  7. package/dist/audio_stream.d.cts +38 -0
  8. package/dist/audio_stream.d.ts +17 -5
  9. package/dist/e2ee.d.cts +48 -0
  10. package/dist/e2ee.d.ts +12 -8
  11. package/dist/ffi_client.d.cts +35 -0
  12. package/dist/ffi_client.d.ts +22 -10
  13. package/dist/index.d.cts +57 -0
  14. package/dist/index.d.ts +28 -20
  15. package/dist/napi/native.d.d.cts +21 -0
  16. package/dist/napi/native.d.d.ts +21 -0
  17. package/dist/participant.d.cts +126 -0
  18. package/dist/participant.d.ts +28 -14
  19. package/dist/proto/audio_frame_pb.d.cts +813 -0
  20. package/dist/proto/audio_frame_pb.d.ts +90 -86
  21. package/dist/proto/e2ee_pb.d.cts +585 -0
  22. package/dist/proto/e2ee_pb.d.ts +60 -58
  23. package/dist/proto/ffi_pb.d.cts +851 -0
  24. package/dist/proto/ffi_pb.d.ts +35 -30
  25. package/dist/proto/handle_pb.d.cts +33 -0
  26. package/dist/proto/handle_pb.d.ts +8 -6
  27. package/dist/proto/participant_pb.d.cts +93 -0
  28. package/dist/proto/participant_pb.d.ts +13 -11
  29. package/dist/proto/room_pb.d.cts +2072 -0
  30. package/dist/proto/room_pb.d.ts +198 -196
  31. package/dist/proto/rpc_pb.d.cts +237 -0
  32. package/dist/proto/rpc_pb.d.ts +28 -26
  33. package/dist/proto/stats_pb.d.cts +1653 -0
  34. package/dist/proto/stats_pb.d.ts +96 -94
  35. package/dist/proto/track_pb.d.cts +402 -0
  36. package/dist/proto/track_pb.d.ts +47 -45
  37. package/dist/proto/video_frame_pb.d.cts +617 -0
  38. package/dist/proto/video_frame_pb.d.ts +64 -60
  39. package/dist/room.d.cts +134 -0
  40. package/dist/room.d.ts +36 -22
  41. package/dist/rpc.d.cts +82 -0
  42. package/dist/rpc.d.ts +11 -7
  43. package/dist/track.d.cts +46 -0
  44. package/dist/track.d.ts +25 -14
  45. package/dist/track_publication.d.cts +48 -0
  46. package/dist/track_publication.d.ts +20 -8
  47. package/dist/transcription.d.cts +15 -0
  48. package/dist/transcription.d.ts +4 -3
  49. package/dist/types.d.cts +9 -0
  50. package/dist/types.d.ts +3 -2
  51. package/dist/version.cjs +1 -1
  52. package/dist/version.cjs.map +1 -1
  53. package/dist/version.d.cts +3 -0
  54. package/dist/version.d.ts +3 -2
  55. package/dist/version.js +1 -1
  56. package/dist/version.js.map +1 -1
  57. package/dist/video_frame.d.cts +25 -0
  58. package/dist/video_frame.d.ts +11 -4
  59. package/dist/video_source.d.cts +22 -0
  60. package/dist/video_source.d.ts +13 -6
  61. package/dist/video_stream.d.cts +41 -0
  62. package/dist/video_stream.d.ts +18 -6
  63. package/package.json +14 -9
  64. package/src/version.ts +1 -1
package/dist/rpc.d.cts ADDED
@@ -0,0 +1,82 @@
1
+ import { RpcError as RpcError$1 } from './proto/rpc_pb.cjs';
2
+ import '@bufbuild/protobuf/codegenv1';
3
+ import '@bufbuild/protobuf';
4
+
5
+ /** Parameters for initiating an RPC call */
6
+ interface PerformRpcParams {
7
+ /** The `identity` of the destination participant */
8
+ destinationIdentity: string;
9
+ /** The method name to call */
10
+ method: string;
11
+ /** The method payload */
12
+ payload: string;
13
+ /** Timeout for receiving a response after initial connection (milliseconds). Default: 10000 */
14
+ responseTimeout?: number;
15
+ }
16
+ /**
17
+ * Data passed to method handler for incoming RPC invocations
18
+ */
19
+ interface RpcInvocationData {
20
+ /**
21
+ * The unique request ID. Will match at both sides of the call, useful for debugging or logging.
22
+ */
23
+ requestId: string;
24
+ /**
25
+ * The unique participant identity of the caller.
26
+ */
27
+ callerIdentity: string;
28
+ /**
29
+ * The payload of the request. User-definable format, typically JSON.
30
+ */
31
+ payload: string;
32
+ /**
33
+ * The maximum time the caller will wait for a response.
34
+ */
35
+ responseTimeout: number;
36
+ }
37
+ /**
38
+ * Specialized error handling for RPC methods.
39
+ *
40
+ * Instances of this type, when thrown in a method handler, will have their `message`
41
+ * serialized and sent across the wire. The caller will receive an equivalent error on the other side.
42
+ *
43
+ * Built-in types are included but developers may use any string, with a max length of 256 bytes.
44
+ */
45
+ declare class RpcError extends Error {
46
+ code: typeof RpcError.ErrorCode | number;
47
+ data?: string;
48
+ /**
49
+ * Creates an error object with the given code and message, plus an optional data payload.
50
+ *
51
+ * If thrown in an RPC method handler, the error will be sent back to the caller.
52
+ *
53
+ * Error codes 1001-1999 are reserved for built-in errors (see RpcError.ErrorCode for their meanings).
54
+ */
55
+ constructor(code: number, message: string, data?: string);
56
+ static fromProto(proto: RpcError$1): RpcError;
57
+ toProto(): RpcError$1;
58
+ static ErrorCode: {
59
+ readonly APPLICATION_ERROR: 1500;
60
+ readonly CONNECTION_TIMEOUT: 1501;
61
+ readonly RESPONSE_TIMEOUT: 1502;
62
+ readonly RECIPIENT_DISCONNECTED: 1503;
63
+ readonly RESPONSE_PAYLOAD_TOO_LARGE: 1504;
64
+ readonly SEND_FAILED: 1505;
65
+ readonly UNSUPPORTED_METHOD: 1400;
66
+ readonly RECIPIENT_NOT_FOUND: 1401;
67
+ readonly REQUEST_PAYLOAD_TOO_LARGE: 1402;
68
+ readonly UNSUPPORTED_SERVER: 1403;
69
+ };
70
+ /**
71
+ * @internal
72
+ */
73
+ static ErrorMessage: Record<keyof typeof RpcError.ErrorCode, string>;
74
+ /**
75
+ * Creates an error object from the code, with an auto-populated message.
76
+ *
77
+ * @internal
78
+ */
79
+ static builtIn(key: keyof typeof RpcError.ErrorCode, data?: string): RpcError;
80
+ }
81
+
82
+ export { type PerformRpcParams, RpcError, type RpcInvocationData };
package/dist/rpc.d.ts CHANGED
@@ -1,6 +1,9 @@
1
- import type { RpcError as RpcError_Proto } from './proto/rpc_pb.js';
1
+ import { RpcError as RpcError$1 } from './proto/rpc_pb.js';
2
+ import '@bufbuild/protobuf/codegenv1';
3
+ import '@bufbuild/protobuf';
4
+
2
5
  /** Parameters for initiating an RPC call */
3
- export interface PerformRpcParams {
6
+ interface PerformRpcParams {
4
7
  /** The `identity` of the destination participant */
5
8
  destinationIdentity: string;
6
9
  /** The method name to call */
@@ -13,7 +16,7 @@ export interface PerformRpcParams {
13
16
  /**
14
17
  * Data passed to method handler for incoming RPC invocations
15
18
  */
16
- export interface RpcInvocationData {
19
+ interface RpcInvocationData {
17
20
  /**
18
21
  * The unique request ID. Will match at both sides of the call, useful for debugging or logging.
19
22
  */
@@ -39,7 +42,7 @@ export interface RpcInvocationData {
39
42
  *
40
43
  * Built-in types are included but developers may use any string, with a max length of 256 bytes.
41
44
  */
42
- export declare class RpcError extends Error {
45
+ declare class RpcError extends Error {
43
46
  code: typeof RpcError.ErrorCode | number;
44
47
  data?: string;
45
48
  /**
@@ -50,8 +53,8 @@ export declare class RpcError extends Error {
50
53
  * Error codes 1001-1999 are reserved for built-in errors (see RpcError.ErrorCode for their meanings).
51
54
  */
52
55
  constructor(code: number, message: string, data?: string);
53
- static fromProto(proto: RpcError_Proto): RpcError;
54
- toProto(): RpcError_Proto;
56
+ static fromProto(proto: RpcError$1): RpcError;
57
+ toProto(): RpcError$1;
55
58
  static ErrorCode: {
56
59
  readonly APPLICATION_ERROR: 1500;
57
60
  readonly CONNECTION_TIMEOUT: 1501;
@@ -75,4 +78,5 @@ export declare class RpcError extends Error {
75
78
  */
76
79
  static builtIn(key: keyof typeof RpcError.ErrorCode, data?: string): RpcError;
77
80
  }
78
- //# sourceMappingURL=rpc.d.ts.map
81
+
82
+ export { type PerformRpcParams, RpcError, type RpcInvocationData };
@@ -0,0 +1,46 @@
1
+ import { AudioSource } from './audio_source.cjs';
2
+ import { FfiHandle } from './napi/native.d.cjs';
3
+ import { TrackInfo, OwnedTrack, TrackKind, StreamState } from './proto/track_pb.cjs';
4
+ import { VideoSource } from './video_source.cjs';
5
+ import './audio_frame.cjs';
6
+ import './proto/audio_frame_pb.cjs';
7
+ import '@bufbuild/protobuf/codegenv1';
8
+ import './proto/handle_pb.cjs';
9
+ import '@bufbuild/protobuf';
10
+ import './proto/e2ee_pb.cjs';
11
+ import './proto/stats_pb.cjs';
12
+ import './proto/video_frame_pb.cjs';
13
+ import './video_frame.cjs';
14
+
15
+ declare abstract class Track {
16
+ /** @internal */
17
+ info: TrackInfo;
18
+ /** @internal */
19
+ ffi_handle: FfiHandle;
20
+ constructor(owned: OwnedTrack);
21
+ get sid(): string;
22
+ get name(): string;
23
+ get kind(): TrackKind;
24
+ get stream_state(): StreamState;
25
+ get muted(): boolean;
26
+ }
27
+ declare class LocalAudioTrack extends Track {
28
+ constructor(owned: OwnedTrack);
29
+ static createAudioTrack(name: string, source: AudioSource): LocalAudioTrack;
30
+ }
31
+ declare class LocalVideoTrack extends Track {
32
+ constructor(owned: OwnedTrack);
33
+ static createVideoTrack(name: string, source: VideoSource): LocalVideoTrack;
34
+ }
35
+ declare class RemoteVideoTrack extends Track {
36
+ constructor(owned: OwnedTrack);
37
+ }
38
+ declare class RemoteAudioTrack extends Track {
39
+ constructor(owned: OwnedTrack);
40
+ }
41
+ type LocalTrack = LocalVideoTrack | LocalAudioTrack;
42
+ type RemoteTrack = RemoteVideoTrack | RemoteAudioTrack;
43
+ type AudioTrack = LocalAudioTrack | RemoteAudioTrack;
44
+ type VideoTrack = LocalVideoTrack | RemoteVideoTrack;
45
+
46
+ export { type AudioTrack, LocalAudioTrack, type LocalTrack, LocalVideoTrack, RemoteAudioTrack, type RemoteTrack, RemoteVideoTrack, Track, type VideoTrack };
package/dist/track.d.ts CHANGED
@@ -1,8 +1,18 @@
1
- import type { AudioSource } from './audio_source.js';
2
- import { FfiHandle } from './ffi_client.js';
3
- import type { OwnedTrack, StreamState, TrackInfo, TrackKind } from './proto/track_pb.js';
4
- import type { VideoSource } from './video_source.js';
5
- export declare abstract class Track {
1
+ import { AudioSource } from './audio_source.js';
2
+ import { FfiHandle } from './napi/native.d.js';
3
+ import { TrackInfo, OwnedTrack, TrackKind, StreamState } from './proto/track_pb.js';
4
+ import { VideoSource } from './video_source.js';
5
+ import './audio_frame.js';
6
+ import './proto/audio_frame_pb.js';
7
+ import '@bufbuild/protobuf/codegenv1';
8
+ import './proto/handle_pb.js';
9
+ import '@bufbuild/protobuf';
10
+ import './proto/e2ee_pb.js';
11
+ import './proto/stats_pb.js';
12
+ import './proto/video_frame_pb.js';
13
+ import './video_frame.js';
14
+
15
+ declare abstract class Track {
6
16
  /** @internal */
7
17
  info: TrackInfo;
8
18
  /** @internal */
@@ -14,22 +24,23 @@ export declare abstract class Track {
14
24
  get stream_state(): StreamState;
15
25
  get muted(): boolean;
16
26
  }
17
- export declare class LocalAudioTrack extends Track {
27
+ declare class LocalAudioTrack extends Track {
18
28
  constructor(owned: OwnedTrack);
19
29
  static createAudioTrack(name: string, source: AudioSource): LocalAudioTrack;
20
30
  }
21
- export declare class LocalVideoTrack extends Track {
31
+ declare class LocalVideoTrack extends Track {
22
32
  constructor(owned: OwnedTrack);
23
33
  static createVideoTrack(name: string, source: VideoSource): LocalVideoTrack;
24
34
  }
25
- export declare class RemoteVideoTrack extends Track {
35
+ declare class RemoteVideoTrack extends Track {
26
36
  constructor(owned: OwnedTrack);
27
37
  }
28
- export declare class RemoteAudioTrack extends Track {
38
+ declare class RemoteAudioTrack extends Track {
29
39
  constructor(owned: OwnedTrack);
30
40
  }
31
- export type LocalTrack = LocalVideoTrack | LocalAudioTrack;
32
- export type RemoteTrack = RemoteVideoTrack | RemoteAudioTrack;
33
- export type AudioTrack = LocalAudioTrack | RemoteAudioTrack;
34
- export type VideoTrack = LocalVideoTrack | RemoteVideoTrack;
35
- //# sourceMappingURL=track.d.ts.map
41
+ type LocalTrack = LocalVideoTrack | LocalAudioTrack;
42
+ type RemoteTrack = RemoteVideoTrack | RemoteAudioTrack;
43
+ type AudioTrack = LocalAudioTrack | RemoteAudioTrack;
44
+ type VideoTrack = LocalVideoTrack | RemoteVideoTrack;
45
+
46
+ export { type AudioTrack, LocalAudioTrack, type LocalTrack, LocalVideoTrack, RemoteAudioTrack, type RemoteTrack, RemoteVideoTrack, Track, type VideoTrack };
@@ -0,0 +1,48 @@
1
+ import { FfiHandle } from './napi/native.d.cjs';
2
+ import { EncryptionType } from './proto/e2ee_pb.cjs';
3
+ import { TrackPublicationInfo, OwnedTrackPublication, TrackKind, TrackSource } from './proto/track_pb.cjs';
4
+ import { Track } from './track.cjs';
5
+ import '@bufbuild/protobuf/codegenv1';
6
+ import '@bufbuild/protobuf';
7
+ import './proto/handle_pb.cjs';
8
+ import './proto/stats_pb.cjs';
9
+ import './audio_source.cjs';
10
+ import './audio_frame.cjs';
11
+ import './proto/audio_frame_pb.cjs';
12
+ import './video_source.cjs';
13
+ import './proto/video_frame_pb.cjs';
14
+ import './video_frame.cjs';
15
+
16
+ declare abstract class TrackPublication {
17
+ /** @internal */
18
+ ffiHandle: FfiHandle;
19
+ /** @internal */
20
+ info: TrackPublicationInfo;
21
+ track?: Track;
22
+ constructor(ownedInfo: OwnedTrackPublication);
23
+ get sid(): string;
24
+ get name(): string;
25
+ get kind(): TrackKind;
26
+ get source(): TrackSource;
27
+ get simulcasted(): boolean;
28
+ get width(): number;
29
+ get height(): number;
30
+ get mimeType(): string;
31
+ get muted(): boolean;
32
+ get encryptionType(): EncryptionType;
33
+ }
34
+ declare class LocalTrackPublication extends TrackPublication {
35
+ private firstSubscription;
36
+ private firstSubscriptionResolver;
37
+ constructor(ownedInfo: OwnedTrackPublication);
38
+ waitForSubscription(): Promise<void>;
39
+ /** @internal */
40
+ resolveFirstSubscription(): void;
41
+ }
42
+ declare class RemoteTrackPublication extends TrackPublication {
43
+ subscribed: boolean;
44
+ constructor(ownedInfo: OwnedTrackPublication);
45
+ setSubscribed(subscribed: boolean): void;
46
+ }
47
+
48
+ export { LocalTrackPublication, RemoteTrackPublication, TrackPublication };
@@ -1,8 +1,19 @@
1
- import { FfiHandle } from './napi/native.js';
2
- import type { EncryptionType } from './proto/e2ee_pb.js';
3
- import type { OwnedTrackPublication, TrackKind, TrackPublicationInfo, TrackSource } from './proto/track_pb.js';
4
- import type { Track } from './track.js';
5
- export declare abstract class TrackPublication {
1
+ import { FfiHandle } from './napi/native.d.js';
2
+ import { EncryptionType } from './proto/e2ee_pb.js';
3
+ import { TrackPublicationInfo, OwnedTrackPublication, TrackKind, TrackSource } from './proto/track_pb.js';
4
+ import { Track } from './track.js';
5
+ import '@bufbuild/protobuf/codegenv1';
6
+ import '@bufbuild/protobuf';
7
+ import './proto/handle_pb.js';
8
+ import './proto/stats_pb.js';
9
+ import './audio_source.js';
10
+ import './audio_frame.js';
11
+ import './proto/audio_frame_pb.js';
12
+ import './video_source.js';
13
+ import './proto/video_frame_pb.js';
14
+ import './video_frame.js';
15
+
16
+ declare abstract class TrackPublication {
6
17
  /** @internal */
7
18
  ffiHandle: FfiHandle;
8
19
  /** @internal */
@@ -20,7 +31,7 @@ export declare abstract class TrackPublication {
20
31
  get muted(): boolean;
21
32
  get encryptionType(): EncryptionType;
22
33
  }
23
- export declare class LocalTrackPublication extends TrackPublication {
34
+ declare class LocalTrackPublication extends TrackPublication {
24
35
  private firstSubscription;
25
36
  private firstSubscriptionResolver;
26
37
  constructor(ownedInfo: OwnedTrackPublication);
@@ -28,9 +39,10 @@ export declare class LocalTrackPublication extends TrackPublication {
28
39
  /** @internal */
29
40
  resolveFirstSubscription(): void;
30
41
  }
31
- export declare class RemoteTrackPublication extends TrackPublication {
42
+ declare class RemoteTrackPublication extends TrackPublication {
32
43
  subscribed: boolean;
33
44
  constructor(ownedInfo: OwnedTrackPublication);
34
45
  setSubscribed(subscribed: boolean): void;
35
46
  }
36
- //# sourceMappingURL=track_publication.d.ts.map
47
+
48
+ export { LocalTrackPublication, RemoteTrackPublication, TrackPublication };
@@ -0,0 +1,15 @@
1
+ interface TranscriptionSegment {
2
+ id: string;
3
+ text: string;
4
+ startTime: bigint;
5
+ endTime: bigint;
6
+ language: string;
7
+ final: boolean;
8
+ }
9
+ interface Transcription {
10
+ participantIdentity: string;
11
+ trackSid: string;
12
+ segments: TranscriptionSegment[];
13
+ }
14
+
15
+ export type { Transcription, TranscriptionSegment };
@@ -1,4 +1,4 @@
1
- export interface TranscriptionSegment {
1
+ interface TranscriptionSegment {
2
2
  id: string;
3
3
  text: string;
4
4
  startTime: bigint;
@@ -6,9 +6,10 @@ export interface TranscriptionSegment {
6
6
  language: string;
7
7
  final: boolean;
8
8
  }
9
- export interface Transcription {
9
+ interface Transcription {
10
10
  participantIdentity: string;
11
11
  trackSid: string;
12
12
  segments: TranscriptionSegment[];
13
13
  }
14
- //# sourceMappingURL=transcription.d.ts.map
14
+
15
+ export type { Transcription, TranscriptionSegment };
@@ -0,0 +1,9 @@
1
+ interface ChatMessage {
2
+ id: string;
3
+ timestamp: number;
4
+ message: string;
5
+ editTimestamp?: number;
6
+ generated?: boolean;
7
+ }
8
+
9
+ export type { ChatMessage };
package/dist/types.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- export interface ChatMessage {
1
+ interface ChatMessage {
2
2
  id: string;
3
3
  timestamp: number;
4
4
  message: string;
5
5
  editTimestamp?: number;
6
6
  generated?: boolean;
7
7
  }
8
- //# sourceMappingURL=types.d.ts.map
8
+
9
+ export type { ChatMessage };
package/dist/version.cjs CHANGED
@@ -21,7 +21,7 @@ __export(version_exports, {
21
21
  SDK_VERSION: () => SDK_VERSION
22
22
  });
23
23
  module.exports = __toCommonJS(version_exports);
24
- const SDK_VERSION = "0.12.1";
24
+ const SDK_VERSION = "0.12.2";
25
25
  // Annotate the CommonJS export names for ESM import in node:
26
26
  0 && (module.exports = {
27
27
  SDK_VERSION
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const SDK_VERSION = \"0.12.1\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const SDK_VERSION = \"0.12.2\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,cAAc;","names":[]}
@@ -0,0 +1,3 @@
1
+ declare const SDK_VERSION = "0.12.2";
2
+
3
+ export { SDK_VERSION };
package/dist/version.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- export declare const SDK_VERSION = "0.12.1";
2
- //# sourceMappingURL=version.d.ts.map
1
+ declare const SDK_VERSION = "0.12.2";
2
+
3
+ export { SDK_VERSION };
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
- const SDK_VERSION = "0.12.1";
1
+ const SDK_VERSION = "0.12.2";
2
2
  export {
3
3
  SDK_VERSION
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const SDK_VERSION = \"0.12.1\";\n"],"mappings":"AAAO,MAAM,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const SDK_VERSION = \"0.12.2\";\n"],"mappings":"AAAO,MAAM,cAAc;","names":[]}
@@ -0,0 +1,25 @@
1
+ import { VideoBufferType, VideoBufferInfo, OwnedVideoBuffer } from './proto/video_frame_pb.cjs';
2
+ import '@bufbuild/protobuf/codegenv1';
3
+ import './proto/handle_pb.cjs';
4
+ import '@bufbuild/protobuf';
5
+ import './proto/track_pb.cjs';
6
+ import './proto/e2ee_pb.cjs';
7
+ import './proto/stats_pb.cjs';
8
+
9
+ declare class VideoFrame {
10
+ data: Uint8Array;
11
+ width: number;
12
+ height: number;
13
+ type: VideoBufferType;
14
+ constructor(data: Uint8Array, width: number, height: number, type: VideoBufferType);
15
+ /** @internal */
16
+ get dataPtr(): bigint;
17
+ /** @internal */
18
+ protoInfo(): VideoBufferInfo;
19
+ /** @internal */
20
+ static fromOwnedInfo(owned: OwnedVideoBuffer): VideoFrame;
21
+ getPlane(planeNth: number): Uint8Array | void;
22
+ convert(dstType: VideoBufferType, flipY?: boolean): VideoFrame;
23
+ }
24
+
25
+ export { VideoFrame };
@@ -1,6 +1,12 @@
1
- import type { OwnedVideoBuffer, VideoBufferInfo } from './proto/video_frame_pb.js';
2
- import { VideoBufferType } from './proto/video_frame_pb.js';
3
- export declare class VideoFrame {
1
+ import { VideoBufferType, VideoBufferInfo, OwnedVideoBuffer } from './proto/video_frame_pb.js';
2
+ import '@bufbuild/protobuf/codegenv1';
3
+ import './proto/handle_pb.js';
4
+ import '@bufbuild/protobuf';
5
+ import './proto/track_pb.js';
6
+ import './proto/e2ee_pb.js';
7
+ import './proto/stats_pb.js';
8
+
9
+ declare class VideoFrame {
4
10
  data: Uint8Array;
5
11
  width: number;
6
12
  height: number;
@@ -15,4 +21,5 @@ export declare class VideoFrame {
15
21
  getPlane(planeNth: number): Uint8Array | void;
16
22
  convert(dstType: VideoBufferType, flipY?: boolean): VideoFrame;
17
23
  }
18
- //# sourceMappingURL=video_frame.d.ts.map
24
+
25
+ export { VideoFrame };
@@ -0,0 +1,22 @@
1
+ import { FfiHandle } from './napi/native.d.cjs';
2
+ import { VideoSourceInfo, VideoRotation } from './proto/video_frame_pb.cjs';
3
+ import { VideoFrame } from './video_frame.cjs';
4
+ import '@bufbuild/protobuf/codegenv1';
5
+ import './proto/handle_pb.cjs';
6
+ import '@bufbuild/protobuf';
7
+ import './proto/track_pb.cjs';
8
+ import './proto/e2ee_pb.cjs';
9
+ import './proto/stats_pb.cjs';
10
+
11
+ declare class VideoSource {
12
+ /** @internal */
13
+ info: VideoSourceInfo;
14
+ /** @internal */
15
+ ffiHandle: FfiHandle;
16
+ width: number;
17
+ height: number;
18
+ constructor(width: number, height: number);
19
+ captureFrame(frame: VideoFrame, timestampUs?: bigint, rotation?: VideoRotation): void;
20
+ }
21
+
22
+ export { VideoSource };
@@ -1,8 +1,14 @@
1
- import { FfiHandle } from './ffi_client.js';
2
- import type { VideoSourceInfo } from './proto/video_frame_pb.js';
3
- import { VideoRotation } from './proto/video_frame_pb.js';
4
- import type { VideoFrame } from './video_frame.js';
5
- export declare class VideoSource {
1
+ import { FfiHandle } from './napi/native.d.js';
2
+ import { VideoSourceInfo, VideoRotation } from './proto/video_frame_pb.js';
3
+ import { VideoFrame } from './video_frame.js';
4
+ import '@bufbuild/protobuf/codegenv1';
5
+ import './proto/handle_pb.js';
6
+ import '@bufbuild/protobuf';
7
+ import './proto/track_pb.js';
8
+ import './proto/e2ee_pb.js';
9
+ import './proto/stats_pb.js';
10
+
11
+ declare class VideoSource {
6
12
  /** @internal */
7
13
  info: VideoSourceInfo;
8
14
  /** @internal */
@@ -12,4 +18,5 @@ export declare class VideoSource {
12
18
  constructor(width: number, height: number);
13
19
  captureFrame(frame: VideoFrame, timestampUs?: bigint, rotation?: VideoRotation): void;
14
20
  }
15
- //# sourceMappingURL=video_source.d.ts.map
21
+
22
+ export { VideoSource };
@@ -0,0 +1,41 @@
1
+ import { Mutex } from '@livekit/mutex';
2
+ import { FfiHandle } from './napi/native.d.cjs';
3
+ import { VideoRotation, VideoStreamInfo } from './proto/video_frame_pb.cjs';
4
+ import { Track } from './track.cjs';
5
+ import { VideoFrame } from './video_frame.cjs';
6
+ import '@bufbuild/protobuf/codegenv1';
7
+ import './proto/handle_pb.cjs';
8
+ import '@bufbuild/protobuf';
9
+ import './proto/track_pb.cjs';
10
+ import './proto/e2ee_pb.cjs';
11
+ import './proto/stats_pb.cjs';
12
+ import './audio_source.cjs';
13
+ import './audio_frame.cjs';
14
+ import './proto/audio_frame_pb.cjs';
15
+ import './video_source.cjs';
16
+
17
+ type VideoFrameEvent = {
18
+ frame: VideoFrame;
19
+ timestampUs: bigint;
20
+ rotation: VideoRotation;
21
+ };
22
+ declare class VideoStream implements AsyncIterableIterator<VideoFrameEvent> {
23
+ /** @internal */
24
+ info: VideoStreamInfo;
25
+ /** @internal */
26
+ ffiHandle: FfiHandle;
27
+ /** @internal */
28
+ eventQueue: (VideoFrameEvent | null)[];
29
+ /** @internal */
30
+ queueResolve: ((value: IteratorResult<VideoFrameEvent>) => void) | null;
31
+ /** @internal */
32
+ mutex: Mutex;
33
+ track: Track;
34
+ constructor(track: Track);
35
+ private onEvent;
36
+ next(): Promise<IteratorResult<VideoFrameEvent>>;
37
+ close(): void;
38
+ [Symbol.asyncIterator](): VideoStream;
39
+ }
40
+
41
+ export { type VideoFrameEvent, VideoStream };
@@ -1,14 +1,25 @@
1
1
  import { Mutex } from '@livekit/mutex';
2
- import { FfiHandle } from './ffi_client.js';
3
- import type { VideoRotation, VideoStreamInfo } from './proto/video_frame_pb.js';
4
- import type { Track } from './track.js';
2
+ import { FfiHandle } from './napi/native.d.js';
3
+ import { VideoRotation, VideoStreamInfo } from './proto/video_frame_pb.js';
4
+ import { Track } from './track.js';
5
5
  import { VideoFrame } from './video_frame.js';
6
- export type VideoFrameEvent = {
6
+ import '@bufbuild/protobuf/codegenv1';
7
+ import './proto/handle_pb.js';
8
+ import '@bufbuild/protobuf';
9
+ import './proto/track_pb.js';
10
+ import './proto/e2ee_pb.js';
11
+ import './proto/stats_pb.js';
12
+ import './audio_source.js';
13
+ import './audio_frame.js';
14
+ import './proto/audio_frame_pb.js';
15
+ import './video_source.js';
16
+
17
+ type VideoFrameEvent = {
7
18
  frame: VideoFrame;
8
19
  timestampUs: bigint;
9
20
  rotation: VideoRotation;
10
21
  };
11
- export declare class VideoStream implements AsyncIterableIterator<VideoFrameEvent> {
22
+ declare class VideoStream implements AsyncIterableIterator<VideoFrameEvent> {
12
23
  /** @internal */
13
24
  info: VideoStreamInfo;
14
25
  /** @internal */
@@ -26,4 +37,5 @@ export declare class VideoStream implements AsyncIterableIterator<VideoFrameEven
26
37
  close(): void;
27
38
  [Symbol.asyncIterator](): VideoStream;
28
39
  }
29
- //# sourceMappingURL=video_stream.d.ts.map
40
+
41
+ export { type VideoFrameEvent, VideoStream };
package/package.json CHANGED
@@ -3,15 +3,20 @@
3
3
  "description": "LiveKit RTC Node",
4
4
  "license": "Apache-2.0",
5
5
  "author": "LiveKit",
6
- "version": "0.12.1",
6
+ "version": "0.12.2",
7
7
  "main": "dist/index.js",
8
8
  "require": "dist/index.cjs",
9
9
  "types": "dist/index.d.ts",
10
10
  "exports": {
11
11
  ".": {
12
- "types": "./dist/index.d.ts",
13
- "import": "./dist/index.js",
14
- "require": "./dist/index.cjs"
12
+ "import": {
13
+ "types": "./dist/index.d.ts",
14
+ "default": "./dist/index.js"
15
+ },
16
+ "require": {
17
+ "types": "./dist/index.d.cts",
18
+ "default": "./dist/index.cjs"
19
+ }
15
20
  }
16
21
  },
17
22
  "type": "module",
@@ -54,11 +59,11 @@
54
59
  "typescript": "^5.2.2"
55
60
  },
56
61
  "optionalDependencies": {
57
- "@livekit/rtc-node-darwin-arm64": "0.12.1",
58
- "@livekit/rtc-node-darwin-x64": "0.12.1",
59
- "@livekit/rtc-node-linux-arm64-gnu": "0.12.1",
60
- "@livekit/rtc-node-linux-x64-gnu": "0.12.1",
61
- "@livekit/rtc-node-win32-x64-msvc": "0.12.1"
62
+ "@livekit/rtc-node-darwin-arm64": "0.12.2",
63
+ "@livekit/rtc-node-darwin-x64": "0.12.2",
64
+ "@livekit/rtc-node-linux-arm64-gnu": "0.12.2",
65
+ "@livekit/rtc-node-linux-x64-gnu": "0.12.2",
66
+ "@livekit/rtc-node-win32-x64-msvc": "0.12.2"
62
67
  },
63
68
  "engines": {
64
69
  "node": ">= 18"
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.12.1";
1
+ export const SDK_VERSION = "0.12.2";