@livekit/rtc-node 0.12.0 → 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.
- package/dist/audio_frame.d.cts +32 -0
- package/dist/audio_frame.d.ts +12 -5
- package/dist/audio_resampler.d.cts +60 -0
- package/dist/audio_resampler.d.ts +12 -3
- package/dist/audio_source.d.cts +37 -0
- package/dist/audio_source.d.ts +13 -5
- package/dist/audio_stream.d.cts +38 -0
- package/dist/audio_stream.d.ts +17 -5
- package/dist/e2ee.d.cts +48 -0
- package/dist/e2ee.d.ts +12 -8
- package/dist/ffi_client.cjs +0 -6
- package/dist/ffi_client.cjs.map +1 -1
- package/dist/ffi_client.d.cts +35 -0
- package/dist/ffi_client.d.ts +22 -10
- package/dist/ffi_client.d.ts.map +1 -1
- package/dist/ffi_client.js +0 -6
- package/dist/ffi_client.js.map +1 -1
- package/dist/index.cjs +0 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +57 -0
- package/dist/index.d.ts +27 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -20
- package/dist/index.js.map +1 -1
- package/dist/napi/native.d.cjs.map +1 -1
- package/dist/napi/native.d.d.cts +21 -0
- package/dist/napi/native.d.d.ts +21 -0
- package/dist/napi/native.d.ts +5 -5
- package/dist/native.d.ts +5 -5
- package/dist/participant.d.cts +126 -0
- package/dist/participant.d.ts +28 -14
- package/dist/proto/audio_frame_pb.d.cts +813 -0
- package/dist/proto/audio_frame_pb.d.ts +90 -86
- package/dist/proto/e2ee_pb.d.cts +585 -0
- package/dist/proto/e2ee_pb.d.ts +60 -58
- package/dist/proto/ffi_pb.d.cts +851 -0
- package/dist/proto/ffi_pb.d.ts +35 -30
- package/dist/proto/handle_pb.d.cts +33 -0
- package/dist/proto/handle_pb.d.ts +8 -6
- package/dist/proto/participant_pb.d.cts +93 -0
- package/dist/proto/participant_pb.d.ts +13 -11
- package/dist/proto/room_pb.d.cts +2072 -0
- package/dist/proto/room_pb.d.ts +198 -196
- package/dist/proto/rpc_pb.d.cts +237 -0
- package/dist/proto/rpc_pb.d.ts +28 -26
- package/dist/proto/stats_pb.d.cts +1653 -0
- package/dist/proto/stats_pb.d.ts +96 -94
- package/dist/proto/track_pb.d.cts +402 -0
- package/dist/proto/track_pb.d.ts +47 -45
- package/dist/proto/video_frame_pb.d.cts +617 -0
- package/dist/proto/video_frame_pb.d.ts +64 -60
- package/dist/room.d.cts +134 -0
- package/dist/room.d.ts +36 -22
- package/dist/rpc.d.cts +82 -0
- package/dist/rpc.d.ts +11 -7
- package/dist/track.d.cts +46 -0
- package/dist/track.d.ts +25 -14
- package/dist/track_publication.d.cts +48 -0
- package/dist/track_publication.d.ts +20 -8
- package/dist/transcription.d.cts +15 -0
- package/dist/transcription.d.ts +4 -3
- package/dist/types.d.cts +9 -0
- package/dist/types.d.ts +3 -2
- package/dist/version.cjs +1 -1
- package/dist/version.cjs.map +1 -1
- package/dist/version.d.cts +3 -0
- package/dist/version.d.ts +3 -2
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/video_frame.d.cts +25 -0
- package/dist/video_frame.d.ts +11 -4
- package/dist/video_source.d.cts +22 -0
- package/dist/video_source.d.ts +13 -6
- package/dist/video_stream.d.cts +41 -0
- package/dist/video_stream.d.ts +18 -6
- package/package.json +14 -9
- package/src/ffi_client.ts +4 -4
- package/src/index.ts +14 -8
- package/src/napi/native.d.ts +5 -5
- 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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
54
|
-
toProto():
|
|
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
|
-
|
|
81
|
+
|
|
82
|
+
export { type PerformRpcParams, RpcError, type RpcInvocationData };
|
package/dist/track.d.cts
ADDED
|
@@ -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
|
|
2
|
-
import { FfiHandle } from './
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
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
|
-
|
|
27
|
+
declare class LocalAudioTrack extends Track {
|
|
18
28
|
constructor(owned: OwnedTrack);
|
|
19
29
|
static createAudioTrack(name: string, source: AudioSource): LocalAudioTrack;
|
|
20
30
|
}
|
|
21
|
-
|
|
31
|
+
declare class LocalVideoTrack extends Track {
|
|
22
32
|
constructor(owned: OwnedTrack);
|
|
23
33
|
static createVideoTrack(name: string, source: VideoSource): LocalVideoTrack;
|
|
24
34
|
}
|
|
25
|
-
|
|
35
|
+
declare class RemoteVideoTrack extends Track {
|
|
26
36
|
constructor(owned: OwnedTrack);
|
|
27
37
|
}
|
|
28
|
-
|
|
38
|
+
declare class RemoteAudioTrack extends Track {
|
|
29
39
|
constructor(owned: OwnedTrack);
|
|
30
40
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
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
|
-
|
|
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
|
-
|
|
42
|
+
declare class RemoteTrackPublication extends TrackPublication {
|
|
32
43
|
subscribed: boolean;
|
|
33
44
|
constructor(ownedInfo: OwnedTrackPublication);
|
|
34
45
|
setSubscribed(subscribed: boolean): void;
|
|
35
46
|
}
|
|
36
|
-
|
|
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 };
|
package/dist/transcription.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
9
|
+
interface Transcription {
|
|
10
10
|
participantIdentity: string;
|
|
11
11
|
trackSid: string;
|
|
12
12
|
segments: TranscriptionSegment[];
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
export type { Transcription, TranscriptionSegment };
|
package/dist/types.d.cts
ADDED
package/dist/types.d.ts
CHANGED
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.
|
|
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
|
package/dist/version.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const SDK_VERSION = \"0.12.
|
|
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":[]}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const SDK_VERSION = "0.12.2";
|
|
2
|
+
|
|
3
|
+
export { SDK_VERSION };
|
package/dist/version.js
CHANGED
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const SDK_VERSION = \"0.12.
|
|
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 };
|
package/dist/video_frame.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
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
|
-
|
|
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 };
|
package/dist/video_source.d.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import { FfiHandle } from './
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
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
|
-
|
|
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 };
|
package/dist/video_stream.d.ts
CHANGED
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
import { Mutex } from '@livekit/mutex';
|
|
2
|
-
import { FfiHandle } from './
|
|
3
|
-
import
|
|
4
|
-
import
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
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.
|
|
58
|
-
"@livekit/rtc-node-darwin-x64": "0.12.
|
|
59
|
-
"@livekit/rtc-node-linux-arm64-gnu": "0.12.
|
|
60
|
-
"@livekit/rtc-node-linux-x64-gnu": "0.12.
|
|
61
|
-
"@livekit/rtc-node-win32-x64-msvc": "0.12.
|
|
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"
|