@livekit/rtc-node 0.0.7 → 0.2.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.
- package/build.rs +4 -0
- package/dist/audio_frame.d.ts +1 -1
- package/dist/audio_frame.d.ts.map +1 -1
- package/dist/audio_frame.js +10 -11
- package/dist/audio_frame.js.map +1 -1
- package/dist/audio_source.d.ts +3 -3
- package/dist/audio_source.d.ts.map +1 -1
- package/dist/audio_source.js +14 -15
- package/dist/audio_source.js.map +1 -1
- package/dist/audio_stream.d.ts +8 -5
- package/dist/audio_stream.d.ts.map +1 -1
- package/dist/audio_stream.js +18 -22
- package/dist/audio_stream.js.map +1 -1
- package/dist/e2ee.d.ts +1 -1
- package/dist/e2ee.d.ts.map +1 -1
- package/dist/e2ee.js +42 -45
- package/dist/e2ee.js.map +1 -1
- package/dist/ffi_client.d.ts +2 -2
- package/dist/ffi_client.d.ts.map +1 -1
- package/dist/ffi_client.js +17 -24
- package/dist/ffi_client.js.map +1 -1
- package/dist/index.d.ts +15 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -70
- package/dist/index.js.map +1 -1
- package/{src/native.js → dist/napi/native.cjs} +12 -0
- package/dist/napi/native.js +15 -0
- package/dist/participant.d.ts +24 -9
- package/dist/participant.d.ts.map +1 -1
- package/dist/participant.js +45 -45
- package/dist/participant.js.map +1 -1
- package/dist/proto/audio_frame_pb.d.ts +0 -46
- package/dist/proto/audio_frame_pb.d.ts.map +1 -1
- package/dist/proto/audio_frame_pb.js +138 -236
- package/dist/proto/audio_frame_pb.js.map +1 -1
- package/dist/proto/e2ee_pb.js +134 -162
- package/dist/proto/e2ee_pb.js.map +1 -1
- package/dist/proto/ffi_pb.d.ts +31 -44
- package/dist/proto/ffi_pb.d.ts.map +1 -1
- package/dist/proto/ffi_pb.js +140 -126
- package/dist/proto/ffi_pb.js.map +1 -1
- package/dist/proto/handle_pb.js +7 -11
- package/dist/proto/handle_pb.js.map +1 -1
- package/dist/proto/participant_pb.js +13 -18
- package/dist/proto/participant_pb.js.map +1 -1
- package/dist/proto/room_pb.d.ts +5 -1
- package/dist/proto/room_pb.d.ts.map +1 -1
- package/dist/proto/room_pb.js +393 -454
- package/dist/proto/room_pb.js.map +1 -1
- package/dist/proto/stats_pb.js +265 -303
- package/dist/proto/stats_pb.js.map +1 -1
- package/dist/proto/track_pb.js +87 -102
- package/dist/proto/track_pb.js.map +1 -1
- package/dist/proto/video_frame_pb.d.ts +124 -390
- package/dist/proto/video_frame_pb.d.ts.map +1 -1
- package/dist/proto/video_frame_pb.js +252 -620
- package/dist/proto/video_frame_pb.js.map +1 -1
- package/dist/room.d.ts +10 -9
- package/dist/room.d.ts.map +1 -1
- package/dist/room.js +74 -76
- package/dist/room.js.map +1 -1
- package/dist/track.d.ts +4 -4
- package/dist/track.d.ts.map +1 -1
- package/dist/track.js +15 -20
- package/dist/track.js.map +1 -1
- package/dist/track_publication.d.ts +4 -4
- package/dist/track_publication.d.ts.map +1 -1
- package/dist/track_publication.js +12 -15
- package/dist/track_publication.js.map +1 -1
- package/dist/video_frame.d.ts +8 -103
- package/dist/video_frame.d.ts.map +1 -1
- package/dist/video_frame.js +161 -341
- package/dist/video_frame.js.map +1 -1
- package/dist/video_source.d.ts +4 -4
- package/dist/video_source.d.ts.map +1 -1
- package/dist/video_source.js +16 -22
- package/dist/video_source.js.map +1 -1
- package/dist/video_stream.d.ts +10 -5
- package/dist/video_stream.d.ts.map +1 -1
- package/dist/video_stream.js +20 -24
- package/dist/video_stream.js.map +1 -1
- package/package.json +14 -14
- package/src/audio_frame.ts +6 -2
- package/src/audio_source.ts +8 -4
- package/src/audio_stream.ts +15 -7
- package/src/e2ee.ts +6 -2
- package/src/ffi_client.ts +6 -2
- package/src/index.ts +19 -28
- package/src/lib.rs +4 -0
- package/src/napi/native.cjs +281 -0
- package/src/napi/native.js +15 -0
- package/src/nodejs.rs +4 -0
- package/src/participant.ts +45 -22
- package/src/proto/audio_frame_pb.ts +1 -91
- package/src/proto/e2ee_pb.ts +1 -1
- package/src/proto/ffi_pb.ts +55 -53
- package/src/proto/handle_pb.ts +1 -1
- package/src/proto/participant_pb.ts +1 -1
- package/src/proto/room_pb.ts +7 -1
- package/src/proto/stats_pb.ts +1 -1
- package/src/proto/track_pb.ts +1 -1
- package/src/proto/video_frame_pb.ts +186 -641
- package/src/room.ts +56 -48
- package/src/track.ts +8 -4
- package/src/track_publication.ts +10 -6
- package/src/video_frame.ts +186 -579
- package/src/video_source.ts +12 -12
- package/src/video_stream.ts +21 -10
- package/dist/native.d.ts.map +0 -1
- package/dist/native.js +0 -297
- package/dist/native.js.map +0 -1
- /package/dist/{native.d.ts → napi/native.d.ts} +0 -0
- /package/src/{native.d.ts → napi/native.d.ts} +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2024 LiveKit, Inc.
|
|
2
|
+
//
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
// this file exists to smoothly translate the autogenerated CommonJS code
|
|
6
|
+
// to an ES module that plays better with TypeScript.
|
|
7
|
+
|
|
8
|
+
import native from './native.cjs';
|
|
9
|
+
export const {
|
|
10
|
+
livekitInitialize,
|
|
11
|
+
livekitCopyBuffer,
|
|
12
|
+
livekitRetrievePtr,
|
|
13
|
+
livekitFfiRequest,
|
|
14
|
+
FfiHandle,
|
|
15
|
+
} = native;
|
package/src/nodejs.rs
CHANGED
package/src/participant.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// SPDX-FileCopyrightText: 2024 LiveKit, Inc.
|
|
2
|
+
//
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
import { FfiClient, FfiClientEvent, FfiHandle, FfiRequest } from './ffi_client.js';
|
|
6
|
+
import { ParticipantInfo, OwnedParticipant } from './proto/participant_pb.js';
|
|
3
7
|
import {
|
|
4
8
|
DataPacketKind,
|
|
5
9
|
PublishDataCallback,
|
|
@@ -18,9 +22,13 @@ import {
|
|
|
18
22
|
UpdateLocalNameCallback,
|
|
19
23
|
UpdateLocalNameRequest,
|
|
20
24
|
UpdateLocalNameResponse,
|
|
21
|
-
} from './proto/room_pb';
|
|
22
|
-
import {
|
|
23
|
-
|
|
25
|
+
} from './proto/room_pb.js';
|
|
26
|
+
import {
|
|
27
|
+
LocalTrackPublication,
|
|
28
|
+
RemoteTrackPublication,
|
|
29
|
+
TrackPublication,
|
|
30
|
+
} from './track_publication.js';
|
|
31
|
+
import { LocalTrack } from './track.js';
|
|
24
32
|
|
|
25
33
|
export abstract class Participant {
|
|
26
34
|
/** @internal */
|
|
@@ -29,7 +37,7 @@ export abstract class Participant {
|
|
|
29
37
|
/** @internal */
|
|
30
38
|
ffi_handle: FfiHandle;
|
|
31
39
|
|
|
32
|
-
|
|
40
|
+
trackPublications = new Map<string, TrackPublication>();
|
|
33
41
|
|
|
34
42
|
constructor(owned_info: OwnedParticipant) {
|
|
35
43
|
this.info = owned_info.info;
|
|
@@ -53,26 +61,41 @@ export abstract class Participant {
|
|
|
53
61
|
}
|
|
54
62
|
}
|
|
55
63
|
|
|
64
|
+
export type DataPublishOptions = {
|
|
65
|
+
/**
|
|
66
|
+
* whether to send this as reliable or lossy.
|
|
67
|
+
* For data that you need delivery guarantee (such as chat messages), use Reliable.
|
|
68
|
+
* For data that should arrive as quickly as possible, but you are ok with dropped
|
|
69
|
+
* packets, use Lossy.
|
|
70
|
+
*/
|
|
71
|
+
reliable?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* the sids of participants who will receive the message, will be sent to every one if empty
|
|
74
|
+
*/
|
|
75
|
+
destination?: string[] | RemoteParticipant[];
|
|
76
|
+
/** the topic under which the message gets published */
|
|
77
|
+
topic?: string;
|
|
78
|
+
};
|
|
79
|
+
|
|
56
80
|
export class LocalParticipant extends Participant {
|
|
57
|
-
|
|
81
|
+
trackPublications: Map<string, LocalTrackPublication> = new Map();
|
|
58
82
|
|
|
59
|
-
async publishData(
|
|
60
|
-
data: Uint8Array,
|
|
61
|
-
kind: DataPacketKind,
|
|
62
|
-
destination_sids: Array<string | RemoteParticipant> = [], // empty = broadcast
|
|
63
|
-
) {
|
|
83
|
+
async publishData(data: Uint8Array, options: DataPublishOptions) {
|
|
64
84
|
let req = new PublishDataRequest({
|
|
65
85
|
localParticipantHandle: this.ffi_handle.handle,
|
|
66
86
|
dataPtr: FfiClient.instance.retrievePtr(data),
|
|
67
87
|
dataLen: BigInt(data.byteLength),
|
|
68
|
-
kind:
|
|
88
|
+
kind: options.reliable ? DataPacketKind.KIND_RELIABLE : DataPacketKind.KIND_LOSSY,
|
|
89
|
+
topic: options.topic,
|
|
69
90
|
});
|
|
70
91
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
92
|
+
if (options.destination) {
|
|
93
|
+
const sids = options.destination.map((sid: string | RemoteParticipant) => {
|
|
94
|
+
if (typeof sid == 'string') return sid;
|
|
95
|
+
return sid.sid;
|
|
96
|
+
});
|
|
97
|
+
req.destinationSids = sids;
|
|
98
|
+
}
|
|
76
99
|
|
|
77
100
|
let res = FfiClient.instance.request<PublishDataResponse>({
|
|
78
101
|
message: { case: 'publishData', value: req },
|
|
@@ -137,7 +160,7 @@ export class LocalParticipant extends Participant {
|
|
|
137
160
|
|
|
138
161
|
let track_publication = new LocalTrackPublication(cb.publication);
|
|
139
162
|
track_publication.track = track;
|
|
140
|
-
this.
|
|
163
|
+
this.trackPublications.set(track_publication.sid, track_publication);
|
|
141
164
|
|
|
142
165
|
return track_publication;
|
|
143
166
|
}
|
|
@@ -156,14 +179,14 @@ export class LocalParticipant extends Participant {
|
|
|
156
179
|
return ev.message.case == 'unpublishTrack' && ev.message.value.asyncId == res.asyncId;
|
|
157
180
|
});
|
|
158
181
|
|
|
159
|
-
let pub = this.
|
|
182
|
+
let pub = this.trackPublications.get(trackSid);
|
|
160
183
|
pub.track = undefined;
|
|
161
|
-
this.
|
|
184
|
+
this.trackPublications.delete(trackSid);
|
|
162
185
|
}
|
|
163
186
|
}
|
|
164
187
|
|
|
165
188
|
export class RemoteParticipant extends Participant {
|
|
166
|
-
|
|
189
|
+
trackPublications: Map<string, RemoteTrackPublication> = new Map();
|
|
167
190
|
|
|
168
191
|
constructor(owned_info: OwnedParticipant) {
|
|
169
192
|
super(owned_info);
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
|
|
15
|
-
// @generated by protoc-gen-es v1.
|
|
15
|
+
// @generated by protoc-gen-es v1.7.2 with parameter "target=ts"
|
|
16
16
|
// @generated from file audio_frame.proto (package livekit.proto, syntax proto3)
|
|
17
17
|
/* eslint-disable */
|
|
18
18
|
// @ts-nocheck
|
|
@@ -55,96 +55,6 @@ proto3.util.setEnumType(AudioSourceType, "livekit.proto.AudioSourceType", [
|
|
|
55
55
|
{ no: 0, name: "AUDIO_SOURCE_NATIVE" },
|
|
56
56
|
]);
|
|
57
57
|
|
|
58
|
-
/**
|
|
59
|
-
* Allocate a new AudioFrameBuffer
|
|
60
|
-
* This is not necessary required because the data structure is fairly simple
|
|
61
|
-
* But keep the API consistent with VideoFrame
|
|
62
|
-
*
|
|
63
|
-
* @generated from message livekit.proto.AllocAudioBufferRequest
|
|
64
|
-
*/
|
|
65
|
-
export class AllocAudioBufferRequest extends Message<AllocAudioBufferRequest> {
|
|
66
|
-
/**
|
|
67
|
-
* @generated from field: uint32 sample_rate = 1;
|
|
68
|
-
*/
|
|
69
|
-
sampleRate = 0;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* @generated from field: uint32 num_channels = 2;
|
|
73
|
-
*/
|
|
74
|
-
numChannels = 0;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* @generated from field: uint32 samples_per_channel = 3;
|
|
78
|
-
*/
|
|
79
|
-
samplesPerChannel = 0;
|
|
80
|
-
|
|
81
|
-
constructor(data?: PartialMessage<AllocAudioBufferRequest>) {
|
|
82
|
-
super();
|
|
83
|
-
proto3.util.initPartial(data, this);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
static readonly runtime: typeof proto3 = proto3;
|
|
87
|
-
static readonly typeName = "livekit.proto.AllocAudioBufferRequest";
|
|
88
|
-
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
89
|
-
{ no: 1, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
|
|
90
|
-
{ no: 2, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
|
|
91
|
-
{ no: 3, name: "samples_per_channel", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
|
|
92
|
-
]);
|
|
93
|
-
|
|
94
|
-
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AllocAudioBufferRequest {
|
|
95
|
-
return new AllocAudioBufferRequest().fromBinary(bytes, options);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AllocAudioBufferRequest {
|
|
99
|
-
return new AllocAudioBufferRequest().fromJson(jsonValue, options);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AllocAudioBufferRequest {
|
|
103
|
-
return new AllocAudioBufferRequest().fromJsonString(jsonString, options);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
static equals(a: AllocAudioBufferRequest | PlainMessage<AllocAudioBufferRequest> | undefined, b: AllocAudioBufferRequest | PlainMessage<AllocAudioBufferRequest> | undefined): boolean {
|
|
107
|
-
return proto3.util.equals(AllocAudioBufferRequest, a, b);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* @generated from message livekit.proto.AllocAudioBufferResponse
|
|
113
|
-
*/
|
|
114
|
-
export class AllocAudioBufferResponse extends Message<AllocAudioBufferResponse> {
|
|
115
|
-
/**
|
|
116
|
-
* @generated from field: livekit.proto.OwnedAudioFrameBuffer buffer = 1;
|
|
117
|
-
*/
|
|
118
|
-
buffer?: OwnedAudioFrameBuffer;
|
|
119
|
-
|
|
120
|
-
constructor(data?: PartialMessage<AllocAudioBufferResponse>) {
|
|
121
|
-
super();
|
|
122
|
-
proto3.util.initPartial(data, this);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
static readonly runtime: typeof proto3 = proto3;
|
|
126
|
-
static readonly typeName = "livekit.proto.AllocAudioBufferResponse";
|
|
127
|
-
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
128
|
-
{ no: 1, name: "buffer", kind: "message", T: OwnedAudioFrameBuffer },
|
|
129
|
-
]);
|
|
130
|
-
|
|
131
|
-
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AllocAudioBufferResponse {
|
|
132
|
-
return new AllocAudioBufferResponse().fromBinary(bytes, options);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AllocAudioBufferResponse {
|
|
136
|
-
return new AllocAudioBufferResponse().fromJson(jsonValue, options);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AllocAudioBufferResponse {
|
|
140
|
-
return new AllocAudioBufferResponse().fromJsonString(jsonString, options);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
static equals(a: AllocAudioBufferResponse | PlainMessage<AllocAudioBufferResponse> | undefined, b: AllocAudioBufferResponse | PlainMessage<AllocAudioBufferResponse> | undefined): boolean {
|
|
144
|
-
return proto3.util.equals(AllocAudioBufferResponse, a, b);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
58
|
/**
|
|
149
59
|
* Create a new AudioStream
|
|
150
60
|
* AudioStream is used to receive audio frames from a track
|
package/src/proto/e2ee_pb.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
|
|
15
|
-
// @generated by protoc-gen-es v1.
|
|
15
|
+
// @generated by protoc-gen-es v1.7.2 with parameter "target=ts"
|
|
16
16
|
// @generated from file e2ee.proto (package livekit.proto, syntax proto3)
|
|
17
17
|
/* eslint-disable */
|
|
18
18
|
// @ts-nocheck
|
package/src/proto/ffi_pb.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
|
|
15
|
-
// @generated by protoc-gen-es v1.
|
|
15
|
+
// @generated by protoc-gen-es v1.7.2 with parameter "target=ts"
|
|
16
16
|
// @generated from file ffi.proto (package livekit.proto, syntax proto3)
|
|
17
17
|
/* eslint-disable */
|
|
18
18
|
// @ts-nocheck
|
|
@@ -21,8 +21,8 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialM
|
|
|
21
21
|
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
|
|
22
22
|
import { ConnectCallback, ConnectRequest, ConnectResponse, DisconnectCallback, DisconnectRequest, DisconnectResponse, GetSessionStatsCallback, GetSessionStatsRequest, GetSessionStatsResponse, PublishDataCallback, PublishDataRequest, PublishDataResponse, PublishTrackCallback, PublishTrackRequest, PublishTrackResponse, RoomEvent, SetSubscribedRequest, SetSubscribedResponse, UnpublishTrackCallback, UnpublishTrackRequest, UnpublishTrackResponse, UpdateLocalMetadataCallback, UpdateLocalMetadataRequest, UpdateLocalMetadataResponse, UpdateLocalNameCallback, UpdateLocalNameRequest, UpdateLocalNameResponse } from "./room_pb.js";
|
|
23
23
|
import { CreateAudioTrackRequest, CreateAudioTrackResponse, CreateVideoTrackRequest, CreateVideoTrackResponse, GetStatsCallback, GetStatsRequest, GetStatsResponse, TrackEvent } from "./track_pb.js";
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
24
|
+
import { CaptureVideoFrameRequest, CaptureVideoFrameResponse, NewVideoSourceRequest, NewVideoSourceResponse, NewVideoStreamRequest, NewVideoStreamResponse, VideoConvertRequest, VideoConvertResponse, VideoStreamEvent } from "./video_frame_pb.js";
|
|
25
|
+
import { AudioStreamEvent, CaptureAudioFrameCallback, CaptureAudioFrameRequest, CaptureAudioFrameResponse, NewAudioResamplerRequest, NewAudioResamplerResponse, NewAudioSourceRequest, NewAudioSourceResponse, NewAudioStreamRequest, NewAudioStreamResponse, RemixAndResampleRequest, RemixAndResampleResponse } from "./audio_frame_pb.js";
|
|
26
26
|
import { E2eeRequest, E2eeResponse } from "./e2ee_pb.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
@@ -159,12 +159,6 @@ export class FfiRequest extends Message<FfiRequest> {
|
|
|
159
159
|
/**
|
|
160
160
|
* Video
|
|
161
161
|
*
|
|
162
|
-
* @generated from field: livekit.proto.AllocVideoBufferRequest alloc_video_buffer = 15;
|
|
163
|
-
*/
|
|
164
|
-
value: AllocVideoBufferRequest;
|
|
165
|
-
case: "allocVideoBuffer";
|
|
166
|
-
} | {
|
|
167
|
-
/**
|
|
168
162
|
* @generated from field: livekit.proto.NewVideoStreamRequest new_video_stream = 16;
|
|
169
163
|
*/
|
|
170
164
|
value: NewVideoStreamRequest;
|
|
@@ -183,26 +177,14 @@ export class FfiRequest extends Message<FfiRequest> {
|
|
|
183
177
|
case: "captureVideoFrame";
|
|
184
178
|
} | {
|
|
185
179
|
/**
|
|
186
|
-
* @generated from field: livekit.proto.
|
|
187
|
-
*/
|
|
188
|
-
value: ToI420Request;
|
|
189
|
-
case: "toI420";
|
|
190
|
-
} | {
|
|
191
|
-
/**
|
|
192
|
-
* @generated from field: livekit.proto.ToArgbRequest to_argb = 20;
|
|
180
|
+
* @generated from field: livekit.proto.VideoConvertRequest video_convert = 19;
|
|
193
181
|
*/
|
|
194
|
-
value:
|
|
195
|
-
case: "
|
|
182
|
+
value: VideoConvertRequest;
|
|
183
|
+
case: "videoConvert";
|
|
196
184
|
} | {
|
|
197
185
|
/**
|
|
198
186
|
* Audio
|
|
199
187
|
*
|
|
200
|
-
* @generated from field: livekit.proto.AllocAudioBufferRequest alloc_audio_buffer = 21;
|
|
201
|
-
*/
|
|
202
|
-
value: AllocAudioBufferRequest;
|
|
203
|
-
case: "allocAudioBuffer";
|
|
204
|
-
} | {
|
|
205
|
-
/**
|
|
206
188
|
* @generated from field: livekit.proto.NewAudioStreamRequest new_audio_stream = 22;
|
|
207
189
|
*/
|
|
208
190
|
value: NewAudioStreamRequest;
|
|
@@ -260,13 +242,10 @@ export class FfiRequest extends Message<FfiRequest> {
|
|
|
260
242
|
{ no: 12, name: "create_video_track", kind: "message", T: CreateVideoTrackRequest, oneof: "message" },
|
|
261
243
|
{ no: 13, name: "create_audio_track", kind: "message", T: CreateAudioTrackRequest, oneof: "message" },
|
|
262
244
|
{ no: 14, name: "get_stats", kind: "message", T: GetStatsRequest, oneof: "message" },
|
|
263
|
-
{ no: 15, name: "alloc_video_buffer", kind: "message", T: AllocVideoBufferRequest, oneof: "message" },
|
|
264
245
|
{ no: 16, name: "new_video_stream", kind: "message", T: NewVideoStreamRequest, oneof: "message" },
|
|
265
246
|
{ no: 17, name: "new_video_source", kind: "message", T: NewVideoSourceRequest, oneof: "message" },
|
|
266
247
|
{ no: 18, name: "capture_video_frame", kind: "message", T: CaptureVideoFrameRequest, oneof: "message" },
|
|
267
|
-
{ no: 19, name: "
|
|
268
|
-
{ no: 20, name: "to_argb", kind: "message", T: ToArgbRequest, oneof: "message" },
|
|
269
|
-
{ no: 21, name: "alloc_audio_buffer", kind: "message", T: AllocAudioBufferRequest, oneof: "message" },
|
|
248
|
+
{ no: 19, name: "video_convert", kind: "message", T: VideoConvertRequest, oneof: "message" },
|
|
270
249
|
{ no: 22, name: "new_audio_stream", kind: "message", T: NewAudioStreamRequest, oneof: "message" },
|
|
271
250
|
{ no: 23, name: "new_audio_source", kind: "message", T: NewAudioSourceRequest, oneof: "message" },
|
|
272
251
|
{ no: 24, name: "capture_audio_frame", kind: "message", T: CaptureAudioFrameRequest, oneof: "message" },
|
|
@@ -387,12 +366,6 @@ export class FfiResponse extends Message<FfiResponse> {
|
|
|
387
366
|
/**
|
|
388
367
|
* Video
|
|
389
368
|
*
|
|
390
|
-
* @generated from field: livekit.proto.AllocVideoBufferResponse alloc_video_buffer = 15;
|
|
391
|
-
*/
|
|
392
|
-
value: AllocVideoBufferResponse;
|
|
393
|
-
case: "allocVideoBuffer";
|
|
394
|
-
} | {
|
|
395
|
-
/**
|
|
396
369
|
* @generated from field: livekit.proto.NewVideoStreamResponse new_video_stream = 16;
|
|
397
370
|
*/
|
|
398
371
|
value: NewVideoStreamResponse;
|
|
@@ -411,26 +384,14 @@ export class FfiResponse extends Message<FfiResponse> {
|
|
|
411
384
|
case: "captureVideoFrame";
|
|
412
385
|
} | {
|
|
413
386
|
/**
|
|
414
|
-
* @generated from field: livekit.proto.
|
|
415
|
-
*/
|
|
416
|
-
value: ToI420Response;
|
|
417
|
-
case: "toI420";
|
|
418
|
-
} | {
|
|
419
|
-
/**
|
|
420
|
-
* @generated from field: livekit.proto.ToArgbResponse to_argb = 20;
|
|
387
|
+
* @generated from field: livekit.proto.VideoConvertResponse video_convert = 19;
|
|
421
388
|
*/
|
|
422
|
-
value:
|
|
423
|
-
case: "
|
|
389
|
+
value: VideoConvertResponse;
|
|
390
|
+
case: "videoConvert";
|
|
424
391
|
} | {
|
|
425
392
|
/**
|
|
426
393
|
* Audio
|
|
427
394
|
*
|
|
428
|
-
* @generated from field: livekit.proto.AllocAudioBufferResponse alloc_audio_buffer = 21;
|
|
429
|
-
*/
|
|
430
|
-
value: AllocAudioBufferResponse;
|
|
431
|
-
case: "allocAudioBuffer";
|
|
432
|
-
} | {
|
|
433
|
-
/**
|
|
434
395
|
* @generated from field: livekit.proto.NewAudioStreamResponse new_audio_stream = 22;
|
|
435
396
|
*/
|
|
436
397
|
value: NewAudioStreamResponse;
|
|
@@ -488,13 +449,10 @@ export class FfiResponse extends Message<FfiResponse> {
|
|
|
488
449
|
{ no: 12, name: "create_video_track", kind: "message", T: CreateVideoTrackResponse, oneof: "message" },
|
|
489
450
|
{ no: 13, name: "create_audio_track", kind: "message", T: CreateAudioTrackResponse, oneof: "message" },
|
|
490
451
|
{ no: 14, name: "get_stats", kind: "message", T: GetStatsResponse, oneof: "message" },
|
|
491
|
-
{ no: 15, name: "alloc_video_buffer", kind: "message", T: AllocVideoBufferResponse, oneof: "message" },
|
|
492
452
|
{ no: 16, name: "new_video_stream", kind: "message", T: NewVideoStreamResponse, oneof: "message" },
|
|
493
453
|
{ no: 17, name: "new_video_source", kind: "message", T: NewVideoSourceResponse, oneof: "message" },
|
|
494
454
|
{ no: 18, name: "capture_video_frame", kind: "message", T: CaptureVideoFrameResponse, oneof: "message" },
|
|
495
|
-
{ no: 19, name: "
|
|
496
|
-
{ no: 20, name: "to_argb", kind: "message", T: ToArgbResponse, oneof: "message" },
|
|
497
|
-
{ no: 21, name: "alloc_audio_buffer", kind: "message", T: AllocAudioBufferResponse, oneof: "message" },
|
|
455
|
+
{ no: 19, name: "video_convert", kind: "message", T: VideoConvertResponse, oneof: "message" },
|
|
498
456
|
{ no: 22, name: "new_audio_stream", kind: "message", T: NewAudioStreamResponse, oneof: "message" },
|
|
499
457
|
{ no: 23, name: "new_audio_source", kind: "message", T: NewAudioSourceResponse, oneof: "message" },
|
|
500
458
|
{ no: 24, name: "capture_audio_frame", kind: "message", T: CaptureAudioFrameResponse, oneof: "message" },
|
|
@@ -627,6 +585,12 @@ export class FfiEvent extends Message<FfiEvent> {
|
|
|
627
585
|
*/
|
|
628
586
|
value: GetSessionStatsCallback;
|
|
629
587
|
case: "getSessionStats";
|
|
588
|
+
} | {
|
|
589
|
+
/**
|
|
590
|
+
* @generated from field: livekit.proto.Panic panic = 17;
|
|
591
|
+
*/
|
|
592
|
+
value: Panic;
|
|
593
|
+
case: "panic";
|
|
630
594
|
} | { case: undefined; value?: undefined } = { case: undefined };
|
|
631
595
|
|
|
632
596
|
constructor(data?: PartialMessage<FfiEvent>) {
|
|
@@ -653,6 +617,7 @@ export class FfiEvent extends Message<FfiEvent> {
|
|
|
653
617
|
{ no: 14, name: "get_stats", kind: "message", T: GetStatsCallback, oneof: "message" },
|
|
654
618
|
{ no: 15, name: "logs", kind: "message", T: LogBatch, oneof: "message" },
|
|
655
619
|
{ no: 16, name: "get_session_stats", kind: "message", T: GetSessionStatsCallback, oneof: "message" },
|
|
620
|
+
{ no: 17, name: "panic", kind: "message", T: Panic, oneof: "message" },
|
|
656
621
|
]);
|
|
657
622
|
|
|
658
623
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): FfiEvent {
|
|
@@ -895,3 +860,40 @@ export class LogBatch extends Message<LogBatch> {
|
|
|
895
860
|
}
|
|
896
861
|
}
|
|
897
862
|
|
|
863
|
+
/**
|
|
864
|
+
* @generated from message livekit.proto.Panic
|
|
865
|
+
*/
|
|
866
|
+
export class Panic extends Message<Panic> {
|
|
867
|
+
/**
|
|
868
|
+
* @generated from field: string message = 1;
|
|
869
|
+
*/
|
|
870
|
+
message = "";
|
|
871
|
+
|
|
872
|
+
constructor(data?: PartialMessage<Panic>) {
|
|
873
|
+
super();
|
|
874
|
+
proto3.util.initPartial(data, this);
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
878
|
+
static readonly typeName = "livekit.proto.Panic";
|
|
879
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
880
|
+
{ no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
881
|
+
]);
|
|
882
|
+
|
|
883
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Panic {
|
|
884
|
+
return new Panic().fromBinary(bytes, options);
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Panic {
|
|
888
|
+
return new Panic().fromJson(jsonValue, options);
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Panic {
|
|
892
|
+
return new Panic().fromJsonString(jsonString, options);
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
static equals(a: Panic | PlainMessage<Panic> | undefined, b: Panic | PlainMessage<Panic> | undefined): boolean {
|
|
896
|
+
return proto3.util.equals(Panic, a, b);
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
|
package/src/proto/handle_pb.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
|
|
15
|
-
// @generated by protoc-gen-es v1.
|
|
15
|
+
// @generated by protoc-gen-es v1.7.2 with parameter "target=ts"
|
|
16
16
|
// @generated from file handle.proto (package livekit.proto, syntax proto3)
|
|
17
17
|
/* eslint-disable */
|
|
18
18
|
// @ts-nocheck
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
|
|
15
|
-
// @generated by protoc-gen-es v1.
|
|
15
|
+
// @generated by protoc-gen-es v1.7.2 with parameter "target=ts"
|
|
16
16
|
// @generated from file participant.proto (package livekit.proto, syntax proto3)
|
|
17
17
|
/* eslint-disable */
|
|
18
18
|
// @ts-nocheck
|
package/src/proto/room_pb.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
|
|
15
|
-
// @generated by protoc-gen-es v1.
|
|
15
|
+
// @generated by protoc-gen-es v1.7.2 with parameter "target=ts"
|
|
16
16
|
// @generated from file room.proto (package livekit.proto, syntax proto3)
|
|
17
17
|
/* eslint-disable */
|
|
18
18
|
// @ts-nocheck
|
|
@@ -90,12 +90,18 @@ export enum ConnectionQuality {
|
|
|
90
90
|
* @generated from enum value: QUALITY_EXCELLENT = 2;
|
|
91
91
|
*/
|
|
92
92
|
QUALITY_EXCELLENT = 2,
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @generated from enum value: QUALITY_LOST = 3;
|
|
96
|
+
*/
|
|
97
|
+
QUALITY_LOST = 3,
|
|
93
98
|
}
|
|
94
99
|
// Retrieve enum metadata with: proto3.getEnumType(ConnectionQuality)
|
|
95
100
|
proto3.util.setEnumType(ConnectionQuality, "livekit.proto.ConnectionQuality", [
|
|
96
101
|
{ no: 0, name: "QUALITY_POOR" },
|
|
97
102
|
{ no: 1, name: "QUALITY_GOOD" },
|
|
98
103
|
{ no: 2, name: "QUALITY_EXCELLENT" },
|
|
104
|
+
{ no: 3, name: "QUALITY_LOST" },
|
|
99
105
|
]);
|
|
100
106
|
|
|
101
107
|
/**
|
package/src/proto/stats_pb.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
|
|
15
|
-
// @generated by protoc-gen-es v1.
|
|
15
|
+
// @generated by protoc-gen-es v1.7.2 with parameter "target=ts"
|
|
16
16
|
// @generated from file stats.proto (package livekit.proto, syntax proto3)
|
|
17
17
|
/* eslint-disable */
|
|
18
18
|
// @ts-nocheck
|
package/src/proto/track_pb.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
|
|
15
|
-
// @generated by protoc-gen-es v1.
|
|
15
|
+
// @generated by protoc-gen-es v1.7.2 with parameter "target=ts"
|
|
16
16
|
// @generated from file track.proto (package livekit.proto, syntax proto3)
|
|
17
17
|
/* eslint-disable */
|
|
18
18
|
// @ts-nocheck
|