@livekit/rtc-node 0.0.1

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.
@@ -0,0 +1,69 @@
1
+ // Copyright 2023 LiveKit, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ // @generated by protoc-gen-es v1.4.2 with parameter "target=ts"
16
+ // @generated from file handle.proto (package livekit.proto, syntax proto3)
17
+ /* eslint-disable */
18
+ // @ts-nocheck
19
+
20
+ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
21
+ import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
22
+
23
+ /**
24
+ * # Safety
25
+ * The foreign language is responsable for disposing handles
26
+ * Forgetting to dispose the handle may lead to memory leaks
27
+ *
28
+ * Dropping a handle doesn't necessarily mean that the object is destroyed if it is still used
29
+ * on the FfiServer (Atomic reference counting)
30
+ *
31
+ * When refering to a handle without owning it, we just use a uint32 without this message.
32
+ * (the variable name is suffixed with "_handle")
33
+ *
34
+ * @generated from message livekit.proto.FfiOwnedHandle
35
+ */
36
+ export class FfiOwnedHandle extends Message<FfiOwnedHandle> {
37
+ /**
38
+ * @generated from field: uint64 id = 1;
39
+ */
40
+ id = protoInt64.zero;
41
+
42
+ constructor(data?: PartialMessage<FfiOwnedHandle>) {
43
+ super();
44
+ proto3.util.initPartial(data, this);
45
+ }
46
+
47
+ static readonly runtime: typeof proto3 = proto3;
48
+ static readonly typeName = "livekit.proto.FfiOwnedHandle";
49
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
50
+ { no: 1, name: "id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
51
+ ]);
52
+
53
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): FfiOwnedHandle {
54
+ return new FfiOwnedHandle().fromBinary(bytes, options);
55
+ }
56
+
57
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): FfiOwnedHandle {
58
+ return new FfiOwnedHandle().fromJson(jsonValue, options);
59
+ }
60
+
61
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): FfiOwnedHandle {
62
+ return new FfiOwnedHandle().fromJsonString(jsonString, options);
63
+ }
64
+
65
+ static equals(a: FfiOwnedHandle | PlainMessage<FfiOwnedHandle> | undefined, b: FfiOwnedHandle | PlainMessage<FfiOwnedHandle> | undefined): boolean {
66
+ return proto3.util.equals(FfiOwnedHandle, a, b);
67
+ }
68
+ }
69
+
@@ -0,0 +1,121 @@
1
+ // Copyright 2023 LiveKit, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ // @generated by protoc-gen-es v1.4.2 with parameter "target=ts"
16
+ // @generated from file participant.proto (package livekit.proto, syntax proto3)
17
+ /* eslint-disable */
18
+ // @ts-nocheck
19
+
20
+ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
21
+ import { Message, proto3 } from "@bufbuild/protobuf";
22
+ import { FfiOwnedHandle } from "./handle_pb.js";
23
+
24
+ /**
25
+ * @generated from message livekit.proto.ParticipantInfo
26
+ */
27
+ export class ParticipantInfo extends Message<ParticipantInfo> {
28
+ /**
29
+ * @generated from field: string sid = 1;
30
+ */
31
+ sid = "";
32
+
33
+ /**
34
+ * @generated from field: string name = 2;
35
+ */
36
+ name = "";
37
+
38
+ /**
39
+ * @generated from field: string identity = 3;
40
+ */
41
+ identity = "";
42
+
43
+ /**
44
+ * @generated from field: string metadata = 4;
45
+ */
46
+ metadata = "";
47
+
48
+ constructor(data?: PartialMessage<ParticipantInfo>) {
49
+ super();
50
+ proto3.util.initPartial(data, this);
51
+ }
52
+
53
+ static readonly runtime: typeof proto3 = proto3;
54
+ static readonly typeName = "livekit.proto.ParticipantInfo";
55
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
56
+ { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
57
+ { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
58
+ { no: 3, name: "identity", kind: "scalar", T: 9 /* ScalarType.STRING */ },
59
+ { no: 4, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */ },
60
+ ]);
61
+
62
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ParticipantInfo {
63
+ return new ParticipantInfo().fromBinary(bytes, options);
64
+ }
65
+
66
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ParticipantInfo {
67
+ return new ParticipantInfo().fromJson(jsonValue, options);
68
+ }
69
+
70
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ParticipantInfo {
71
+ return new ParticipantInfo().fromJsonString(jsonString, options);
72
+ }
73
+
74
+ static equals(a: ParticipantInfo | PlainMessage<ParticipantInfo> | undefined, b: ParticipantInfo | PlainMessage<ParticipantInfo> | undefined): boolean {
75
+ return proto3.util.equals(ParticipantInfo, a, b);
76
+ }
77
+ }
78
+
79
+ /**
80
+ * @generated from message livekit.proto.OwnedParticipant
81
+ */
82
+ export class OwnedParticipant extends Message<OwnedParticipant> {
83
+ /**
84
+ * @generated from field: livekit.proto.FfiOwnedHandle handle = 1;
85
+ */
86
+ handle?: FfiOwnedHandle;
87
+
88
+ /**
89
+ * @generated from field: livekit.proto.ParticipantInfo info = 2;
90
+ */
91
+ info?: ParticipantInfo;
92
+
93
+ constructor(data?: PartialMessage<OwnedParticipant>) {
94
+ super();
95
+ proto3.util.initPartial(data, this);
96
+ }
97
+
98
+ static readonly runtime: typeof proto3 = proto3;
99
+ static readonly typeName = "livekit.proto.OwnedParticipant";
100
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
101
+ { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle },
102
+ { no: 2, name: "info", kind: "message", T: ParticipantInfo },
103
+ ]);
104
+
105
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedParticipant {
106
+ return new OwnedParticipant().fromBinary(bytes, options);
107
+ }
108
+
109
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedParticipant {
110
+ return new OwnedParticipant().fromJson(jsonValue, options);
111
+ }
112
+
113
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedParticipant {
114
+ return new OwnedParticipant().fromJsonString(jsonString, options);
115
+ }
116
+
117
+ static equals(a: OwnedParticipant | PlainMessage<OwnedParticipant> | undefined, b: OwnedParticipant | PlainMessage<OwnedParticipant> | undefined): boolean {
118
+ return proto3.util.equals(OwnedParticipant, a, b);
119
+ }
120
+ }
121
+