diff --git a/packages/livekit-rtc/generate_proto.sh b/packages/livekit-rtc/generate_proto.sh index de709e9a..8727585e 100755 --- a/packages/livekit-rtc/generate_proto.sh +++ b/packages/livekit-rtc/generate_proto.sh @@ -28,4 +28,5 @@ PATH=$PATH:$(pwd)/node_modules/.bin \ $FFI_PROTOCOL/e2ee.proto \ $FFI_PROTOCOL/stats.proto \ $FFI_PROTOCOL/rpc.proto \ - $FFI_PROTOCOL/track_publication.proto + $FFI_PROTOCOL/track_publication.proto \ + $FFI_PROTOCOL/data_stream.proto diff --git a/packages/livekit-rtc/rust-sdks b/packages/livekit-rtc/rust-sdks index 696ea4a1..fd7866cc 160000 --- a/packages/livekit-rtc/rust-sdks +++ b/packages/livekit-rtc/rust-sdks @@ -1 +1 @@ -Subproject commit 696ea4a1e98fcd81b43ffba7d07484ae0a2fae82 +Subproject commit fd7866cc4823f31282d34f00231b5b527a2878e8 diff --git a/packages/livekit-rtc/src/audio_stream.ts b/packages/livekit-rtc/src/audio_stream.ts index be0d2483..bafdddb2 100644 --- a/packages/livekit-rtc/src/audio_stream.ts +++ b/packages/livekit-rtc/src/audio_stream.ts @@ -13,6 +13,7 @@ export interface AudioStreamOptions { noiseCancellation?: NoiseCancellationOptions; sampleRate?: number; numChannels?: number; + frameSizeMs?: number; } export interface NoiseCancellationOptions { @@ -26,6 +27,7 @@ class AudioStreamSource implements UnderlyingSource { private sampleRate: number; private numChannels: number; private ncOptions?: NoiseCancellationOptions; + private frameSizeMs?: number; constructor( track: Track, @@ -36,6 +38,7 @@ class AudioStreamSource implements UnderlyingSource { this.sampleRate = sampleRateOrOptions.sampleRate ?? 48000; this.numChannels = sampleRateOrOptions.numChannels ?? 1; this.ncOptions = sampleRateOrOptions.noiseCancellation; + this.frameSizeMs = sampleRateOrOptions.frameSizeMs; } else { this.sampleRate = (sampleRateOrOptions as number) ?? 48000; this.numChannels = numChannels ?? 1; @@ -46,6 +49,7 @@ class AudioStreamSource implements UnderlyingSource { trackHandle: track.ffi_handle.handle, sampleRate: this.sampleRate, numChannels: this.numChannels, + frameSizeMs: this.frameSizeMs, ...(this.ncOptions ? { audioFilterModuleId: this.ncOptions.moduleId, diff --git a/packages/livekit-rtc/src/proto/audio_frame_pb.ts b/packages/livekit-rtc/src/proto/audio_frame_pb.ts index 56423a6c..42075eb9 100644 --- a/packages/livekit-rtc/src/proto/audio_frame_pb.ts +++ b/packages/livekit-rtc/src/proto/audio_frame_pb.ts @@ -211,6 +211,11 @@ export class NewAudioStreamRequest extends Message { */ audioFilterOptions?: string; + /** + * @generated from field: optional uint32 frame_size_ms = 7; + */ + frameSizeMs?: number; + constructor(data?: PartialMessage) { super(); proto2.util.initPartial(data, this); @@ -225,6 +230,7 @@ export class NewAudioStreamRequest extends Message { { no: 4, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, { no: 5, name: "audio_filter_module_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, { no: 6, name: "audio_filter_options", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 7, name: "frame_size_ms", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): NewAudioStreamRequest { @@ -320,6 +326,11 @@ export class AudioStreamFromParticipantRequest extends Message) { super(); proto2.util.initPartial(data, this); @@ -335,6 +346,7 @@ export class AudioStreamFromParticipantRequest extends Message): AudioStreamFromParticipantRequest { diff --git a/packages/livekit-rtc/src/proto/data_stream_pb.ts b/packages/livekit-rtc/src/proto/data_stream_pb.ts new file mode 100644 index 00000000..60ac009f --- /dev/null +++ b/packages/livekit-rtc/src/proto/data_stream_pb.ts @@ -0,0 +1,2515 @@ +// Copyright 2025 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=.js" +// @generated from file data_stream.proto (package livekit.proto, syntax proto2) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto2 } from "@bufbuild/protobuf"; +import { FfiOwnedHandle } from "./handle_pb.js"; + +/** + * A reader for an incoming stream. + * + * @generated from message livekit.proto.OwnedTextStreamReader + */ +export class OwnedTextStreamReader extends Message { + /** + * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; + */ + handle?: FfiOwnedHandle; + + /** + * @generated from field: required livekit.proto.TextStreamInfo info = 2; + */ + info?: TextStreamInfo; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.OwnedTextStreamReader"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: TextStreamInfo, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedTextStreamReader { + return new OwnedTextStreamReader().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedTextStreamReader { + return new OwnedTextStreamReader().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): OwnedTextStreamReader { + return new OwnedTextStreamReader().fromJsonString(jsonString, options); + } + + static equals(a: OwnedTextStreamReader | PlainMessage | undefined, b: OwnedTextStreamReader | PlainMessage | undefined): boolean { + return proto2.util.equals(OwnedTextStreamReader, a, b); + } +} + +/** + * Reads an incoming text stream incrementally. + * + * @generated from message livekit.proto.TextStreamReaderReadIncrementalRequest + */ +export class TextStreamReaderReadIncrementalRequest extends Message { + /** + * @generated from field: required uint64 reader_handle = 1; + */ + readerHandle?: bigint; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.TextStreamReaderReadIncrementalRequest"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderReadIncrementalRequest { + return new TextStreamReaderReadIncrementalRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderReadIncrementalRequest { + return new TextStreamReaderReadIncrementalRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderReadIncrementalRequest { + return new TextStreamReaderReadIncrementalRequest().fromJsonString(jsonString, options); + } + + static equals(a: TextStreamReaderReadIncrementalRequest | PlainMessage | undefined, b: TextStreamReaderReadIncrementalRequest | PlainMessage | undefined): boolean { + return proto2.util.equals(TextStreamReaderReadIncrementalRequest, a, b); + } +} + +/** + * @generated from message livekit.proto.TextStreamReaderReadIncrementalResponse + */ +export class TextStreamReaderReadIncrementalResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.TextStreamReaderReadIncrementalResponse"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderReadIncrementalResponse { + return new TextStreamReaderReadIncrementalResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderReadIncrementalResponse { + return new TextStreamReaderReadIncrementalResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderReadIncrementalResponse { + return new TextStreamReaderReadIncrementalResponse().fromJsonString(jsonString, options); + } + + static equals(a: TextStreamReaderReadIncrementalResponse | PlainMessage | undefined, b: TextStreamReaderReadIncrementalResponse | PlainMessage | undefined): boolean { + return proto2.util.equals(TextStreamReaderReadIncrementalResponse, a, b); + } +} + +/** + * Reads an incoming text stream in its entirety. + * + * @generated from message livekit.proto.TextStreamReaderReadAllRequest + */ +export class TextStreamReaderReadAllRequest extends Message { + /** + * @generated from field: required uint64 reader_handle = 1; + */ + readerHandle?: bigint; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.TextStreamReaderReadAllRequest"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderReadAllRequest { + return new TextStreamReaderReadAllRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderReadAllRequest { + return new TextStreamReaderReadAllRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderReadAllRequest { + return new TextStreamReaderReadAllRequest().fromJsonString(jsonString, options); + } + + static equals(a: TextStreamReaderReadAllRequest | PlainMessage | undefined, b: TextStreamReaderReadAllRequest | PlainMessage | undefined): boolean { + return proto2.util.equals(TextStreamReaderReadAllRequest, a, b); + } +} + +/** + * @generated from message livekit.proto.TextStreamReaderReadAllResponse + */ +export class TextStreamReaderReadAllResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.TextStreamReaderReadAllResponse"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderReadAllResponse { + return new TextStreamReaderReadAllResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderReadAllResponse { + return new TextStreamReaderReadAllResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderReadAllResponse { + return new TextStreamReaderReadAllResponse().fromJsonString(jsonString, options); + } + + static equals(a: TextStreamReaderReadAllResponse | PlainMessage | undefined, b: TextStreamReaderReadAllResponse | PlainMessage | undefined): boolean { + return proto2.util.equals(TextStreamReaderReadAllResponse, a, b); + } +} + +/** + * @generated from message livekit.proto.TextStreamReaderReadAllCallback + */ +export class TextStreamReaderReadAllCallback extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + /** + * @generated from oneof livekit.proto.TextStreamReaderReadAllCallback.result + */ + result: { + /** + * @generated from field: string content = 2; + */ + value: string; + case: "content"; + } | { + /** + * @generated from field: livekit.proto.StreamError error = 3; + */ + value: StreamError; + case: "error"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.TextStreamReaderReadAllCallback"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "content", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "result" }, + { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderReadAllCallback { + return new TextStreamReaderReadAllCallback().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderReadAllCallback { + return new TextStreamReaderReadAllCallback().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderReadAllCallback { + return new TextStreamReaderReadAllCallback().fromJsonString(jsonString, options); + } + + static equals(a: TextStreamReaderReadAllCallback | PlainMessage | undefined, b: TextStreamReaderReadAllCallback | PlainMessage | undefined): boolean { + return proto2.util.equals(TextStreamReaderReadAllCallback, a, b); + } +} + +/** + * @generated from message livekit.proto.TextStreamReaderEvent + */ +export class TextStreamReaderEvent extends Message { + /** + * @generated from field: required uint64 reader_handle = 1; + */ + readerHandle?: bigint; + + /** + * @generated from oneof livekit.proto.TextStreamReaderEvent.detail + */ + detail: { + /** + * @generated from field: livekit.proto.TextStreamReaderChunkReceived chunk_received = 2; + */ + value: TextStreamReaderChunkReceived; + case: "chunkReceived"; + } | { + /** + * @generated from field: livekit.proto.TextStreamReaderEOS eos = 3; + */ + value: TextStreamReaderEOS; + case: "eos"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.TextStreamReaderEvent"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "chunk_received", kind: "message", T: TextStreamReaderChunkReceived, oneof: "detail" }, + { no: 3, name: "eos", kind: "message", T: TextStreamReaderEOS, oneof: "detail" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderEvent { + return new TextStreamReaderEvent().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderEvent { + return new TextStreamReaderEvent().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderEvent { + return new TextStreamReaderEvent().fromJsonString(jsonString, options); + } + + static equals(a: TextStreamReaderEvent | PlainMessage | undefined, b: TextStreamReaderEvent | PlainMessage | undefined): boolean { + return proto2.util.equals(TextStreamReaderEvent, a, b); + } +} + +/** + * @generated from message livekit.proto.TextStreamReaderChunkReceived + */ +export class TextStreamReaderChunkReceived extends Message { + /** + * @generated from field: required string content = 1; + */ + content?: string; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.TextStreamReaderChunkReceived"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "content", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderChunkReceived { + return new TextStreamReaderChunkReceived().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderChunkReceived { + return new TextStreamReaderChunkReceived().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderChunkReceived { + return new TextStreamReaderChunkReceived().fromJsonString(jsonString, options); + } + + static equals(a: TextStreamReaderChunkReceived | PlainMessage | undefined, b: TextStreamReaderChunkReceived | PlainMessage | undefined): boolean { + return proto2.util.equals(TextStreamReaderChunkReceived, a, b); + } +} + +/** + * @generated from message livekit.proto.TextStreamReaderEOS + */ +export class TextStreamReaderEOS extends Message { + /** + * @generated from field: optional livekit.proto.StreamError error = 1; + */ + error?: StreamError; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.TextStreamReaderEOS"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "error", kind: "message", T: StreamError, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderEOS { + return new TextStreamReaderEOS().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderEOS { + return new TextStreamReaderEOS().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderEOS { + return new TextStreamReaderEOS().fromJsonString(jsonString, options); + } + + static equals(a: TextStreamReaderEOS | PlainMessage | undefined, b: TextStreamReaderEOS | PlainMessage | undefined): boolean { + return proto2.util.equals(TextStreamReaderEOS, a, b); + } +} + +/** + * A reader for an incoming stream. + * + * @generated from message livekit.proto.OwnedByteStreamReader + */ +export class OwnedByteStreamReader extends Message { + /** + * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; + */ + handle?: FfiOwnedHandle; + + /** + * @generated from field: required livekit.proto.ByteStreamInfo info = 2; + */ + info?: ByteStreamInfo; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.OwnedByteStreamReader"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: ByteStreamInfo, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedByteStreamReader { + return new OwnedByteStreamReader().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedByteStreamReader { + return new OwnedByteStreamReader().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): OwnedByteStreamReader { + return new OwnedByteStreamReader().fromJsonString(jsonString, options); + } + + static equals(a: OwnedByteStreamReader | PlainMessage | undefined, b: OwnedByteStreamReader | PlainMessage | undefined): boolean { + return proto2.util.equals(OwnedByteStreamReader, a, b); + } +} + +/** + * Reads an incoming byte stream incrementally. + * + * @generated from message livekit.proto.ByteStreamReaderReadIncrementalRequest + */ +export class ByteStreamReaderReadIncrementalRequest extends Message { + /** + * @generated from field: required uint64 reader_handle = 1; + */ + readerHandle?: bigint; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderReadIncrementalRequest"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderReadIncrementalRequest { + return new ByteStreamReaderReadIncrementalRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderReadIncrementalRequest { + return new ByteStreamReaderReadIncrementalRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderReadIncrementalRequest { + return new ByteStreamReaderReadIncrementalRequest().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamReaderReadIncrementalRequest | PlainMessage | undefined, b: ByteStreamReaderReadIncrementalRequest | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamReaderReadIncrementalRequest, a, b); + } +} + +/** + * @generated from message livekit.proto.ByteStreamReaderReadIncrementalResponse + */ +export class ByteStreamReaderReadIncrementalResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderReadIncrementalResponse"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderReadIncrementalResponse { + return new ByteStreamReaderReadIncrementalResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderReadIncrementalResponse { + return new ByteStreamReaderReadIncrementalResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderReadIncrementalResponse { + return new ByteStreamReaderReadIncrementalResponse().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamReaderReadIncrementalResponse | PlainMessage | undefined, b: ByteStreamReaderReadIncrementalResponse | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamReaderReadIncrementalResponse, a, b); + } +} + +/** + * Reads an incoming byte stream in its entirety. + * + * @generated from message livekit.proto.ByteStreamReaderReadAllRequest + */ +export class ByteStreamReaderReadAllRequest extends Message { + /** + * @generated from field: required uint64 reader_handle = 1; + */ + readerHandle?: bigint; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderReadAllRequest"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderReadAllRequest { + return new ByteStreamReaderReadAllRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderReadAllRequest { + return new ByteStreamReaderReadAllRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderReadAllRequest { + return new ByteStreamReaderReadAllRequest().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamReaderReadAllRequest | PlainMessage | undefined, b: ByteStreamReaderReadAllRequest | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamReaderReadAllRequest, a, b); + } +} + +/** + * @generated from message livekit.proto.ByteStreamReaderReadAllResponse + */ +export class ByteStreamReaderReadAllResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderReadAllResponse"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderReadAllResponse { + return new ByteStreamReaderReadAllResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderReadAllResponse { + return new ByteStreamReaderReadAllResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderReadAllResponse { + return new ByteStreamReaderReadAllResponse().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamReaderReadAllResponse | PlainMessage | undefined, b: ByteStreamReaderReadAllResponse | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamReaderReadAllResponse, a, b); + } +} + +/** + * @generated from message livekit.proto.ByteStreamReaderReadAllCallback + */ +export class ByteStreamReaderReadAllCallback extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + /** + * @generated from oneof livekit.proto.ByteStreamReaderReadAllCallback.result + */ + result: { + /** + * @generated from field: bytes content = 2; + */ + value: Uint8Array; + case: "content"; + } | { + /** + * @generated from field: livekit.proto.StreamError error = 3; + */ + value: StreamError; + case: "error"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderReadAllCallback"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "content", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "result" }, + { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderReadAllCallback { + return new ByteStreamReaderReadAllCallback().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderReadAllCallback { + return new ByteStreamReaderReadAllCallback().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderReadAllCallback { + return new ByteStreamReaderReadAllCallback().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamReaderReadAllCallback | PlainMessage | undefined, b: ByteStreamReaderReadAllCallback | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamReaderReadAllCallback, a, b); + } +} + +/** + * Writes data from an incoming stream to a file as it arrives. + * + * @generated from message livekit.proto.ByteStreamReaderWriteToFileRequest + */ +export class ByteStreamReaderWriteToFileRequest extends Message { + /** + * @generated from field: required uint64 reader_handle = 1; + */ + readerHandle?: bigint; + + /** + * Directory to write the file in (must be writable by the current process). + * If not provided, the file will be written to the system's temp directory. + * + * @generated from field: optional string directory = 3; + */ + directory?: string; + + /** + * Name to use for the written file. + * If not provided, the file's name and extension will be inferred from + * the stream's info. + * + * @generated from field: optional string name_override = 4; + */ + nameOverride?: string; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderWriteToFileRequest"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 3, name: "directory", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 4, name: "name_override", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderWriteToFileRequest { + return new ByteStreamReaderWriteToFileRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderWriteToFileRequest { + return new ByteStreamReaderWriteToFileRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderWriteToFileRequest { + return new ByteStreamReaderWriteToFileRequest().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamReaderWriteToFileRequest | PlainMessage | undefined, b: ByteStreamReaderWriteToFileRequest | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamReaderWriteToFileRequest, a, b); + } +} + +/** + * @generated from message livekit.proto.ByteStreamReaderWriteToFileResponse + */ +export class ByteStreamReaderWriteToFileResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderWriteToFileResponse"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderWriteToFileResponse { + return new ByteStreamReaderWriteToFileResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderWriteToFileResponse { + return new ByteStreamReaderWriteToFileResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderWriteToFileResponse { + return new ByteStreamReaderWriteToFileResponse().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamReaderWriteToFileResponse | PlainMessage | undefined, b: ByteStreamReaderWriteToFileResponse | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamReaderWriteToFileResponse, a, b); + } +} + +/** + * @generated from message livekit.proto.ByteStreamReaderWriteToFileCallback + */ +export class ByteStreamReaderWriteToFileCallback extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + /** + * @generated from oneof livekit.proto.ByteStreamReaderWriteToFileCallback.result + */ + result: { + /** + * Path the file was written to. + * + * @generated from field: string file_path = 2; + */ + value: string; + case: "filePath"; + } | { + /** + * @generated from field: livekit.proto.StreamError error = 3; + */ + value: StreamError; + case: "error"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderWriteToFileCallback"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "file_path", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "result" }, + { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderWriteToFileCallback { + return new ByteStreamReaderWriteToFileCallback().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderWriteToFileCallback { + return new ByteStreamReaderWriteToFileCallback().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderWriteToFileCallback { + return new ByteStreamReaderWriteToFileCallback().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamReaderWriteToFileCallback | PlainMessage | undefined, b: ByteStreamReaderWriteToFileCallback | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamReaderWriteToFileCallback, a, b); + } +} + +/** + * @generated from message livekit.proto.ByteStreamReaderEvent + */ +export class ByteStreamReaderEvent extends Message { + /** + * @generated from field: required uint64 reader_handle = 1; + */ + readerHandle?: bigint; + + /** + * @generated from oneof livekit.proto.ByteStreamReaderEvent.detail + */ + detail: { + /** + * @generated from field: livekit.proto.ByteStreamReaderChunkReceived chunk_received = 2; + */ + value: ByteStreamReaderChunkReceived; + case: "chunkReceived"; + } | { + /** + * @generated from field: livekit.proto.ByteStreamReaderEOS eos = 3; + */ + value: ByteStreamReaderEOS; + case: "eos"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderEvent"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "chunk_received", kind: "message", T: ByteStreamReaderChunkReceived, oneof: "detail" }, + { no: 3, name: "eos", kind: "message", T: ByteStreamReaderEOS, oneof: "detail" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderEvent { + return new ByteStreamReaderEvent().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderEvent { + return new ByteStreamReaderEvent().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderEvent { + return new ByteStreamReaderEvent().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamReaderEvent | PlainMessage | undefined, b: ByteStreamReaderEvent | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamReaderEvent, a, b); + } +} + +/** + * @generated from message livekit.proto.ByteStreamReaderChunkReceived + */ +export class ByteStreamReaderChunkReceived extends Message { + /** + * @generated from field: required bytes content = 1; + */ + content?: Uint8Array; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderChunkReceived"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "content", kind: "scalar", T: 12 /* ScalarType.BYTES */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderChunkReceived { + return new ByteStreamReaderChunkReceived().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderChunkReceived { + return new ByteStreamReaderChunkReceived().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderChunkReceived { + return new ByteStreamReaderChunkReceived().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamReaderChunkReceived | PlainMessage | undefined, b: ByteStreamReaderChunkReceived | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamReaderChunkReceived, a, b); + } +} + +/** + * @generated from message livekit.proto.ByteStreamReaderEOS + */ +export class ByteStreamReaderEOS extends Message { + /** + * @generated from field: optional livekit.proto.StreamError error = 1; + */ + error?: StreamError; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderEOS"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "error", kind: "message", T: StreamError, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderEOS { + return new ByteStreamReaderEOS().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderEOS { + return new ByteStreamReaderEOS().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderEOS { + return new ByteStreamReaderEOS().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamReaderEOS | PlainMessage | undefined, b: ByteStreamReaderEOS | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamReaderEOS, a, b); + } +} + +/** + * Sends the contents of a file over a data stream. + * + * @generated from message livekit.proto.StreamSendFileRequest + */ +export class StreamSendFileRequest extends Message { + /** + * @generated from field: required uint64 local_participant_handle = 1; + */ + localParticipantHandle?: bigint; + + /** + * @generated from field: required livekit.proto.StreamByteOptions options = 2; + */ + options?: StreamByteOptions; + + /** + * Path of the file to send (must be readable by the current process). + * + * @generated from field: required string file_path = 3; + */ + filePath?: string; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.StreamSendFileRequest"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "options", kind: "message", T: StreamByteOptions, req: true }, + { no: 3, name: "file_path", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendFileRequest { + return new StreamSendFileRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendFileRequest { + return new StreamSendFileRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StreamSendFileRequest { + return new StreamSendFileRequest().fromJsonString(jsonString, options); + } + + static equals(a: StreamSendFileRequest | PlainMessage | undefined, b: StreamSendFileRequest | PlainMessage | undefined): boolean { + return proto2.util.equals(StreamSendFileRequest, a, b); + } +} + +/** + * @generated from message livekit.proto.StreamSendFileResponse + */ +export class StreamSendFileResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.StreamSendFileResponse"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendFileResponse { + return new StreamSendFileResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendFileResponse { + return new StreamSendFileResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StreamSendFileResponse { + return new StreamSendFileResponse().fromJsonString(jsonString, options); + } + + static equals(a: StreamSendFileResponse | PlainMessage | undefined, b: StreamSendFileResponse | PlainMessage | undefined): boolean { + return proto2.util.equals(StreamSendFileResponse, a, b); + } +} + +/** + * @generated from message livekit.proto.StreamSendFileCallback + */ +export class StreamSendFileCallback extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + /** + * @generated from oneof livekit.proto.StreamSendFileCallback.result + */ + result: { + /** + * @generated from field: livekit.proto.ByteStreamInfo info = 2; + */ + value: ByteStreamInfo; + case: "info"; + } | { + /** + * @generated from field: livekit.proto.StreamError error = 3; + */ + value: StreamError; + case: "error"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.StreamSendFileCallback"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "info", kind: "message", T: ByteStreamInfo, oneof: "result" }, + { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendFileCallback { + return new StreamSendFileCallback().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendFileCallback { + return new StreamSendFileCallback().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StreamSendFileCallback { + return new StreamSendFileCallback().fromJsonString(jsonString, options); + } + + static equals(a: StreamSendFileCallback | PlainMessage | undefined, b: StreamSendFileCallback | PlainMessage | undefined): boolean { + return proto2.util.equals(StreamSendFileCallback, a, b); + } +} + +/** + * Sends text over a data stream. + * + * @generated from message livekit.proto.StreamSendTextRequest + */ +export class StreamSendTextRequest extends Message { + /** + * @generated from field: required uint64 local_participant_handle = 1; + */ + localParticipantHandle?: bigint; + + /** + * @generated from field: required livekit.proto.StreamTextOptions options = 2; + */ + options?: StreamTextOptions; + + /** + * Text to send. + * + * @generated from field: required string text = 3; + */ + text?: string; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.StreamSendTextRequest"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "options", kind: "message", T: StreamTextOptions, req: true }, + { no: 3, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendTextRequest { + return new StreamSendTextRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendTextRequest { + return new StreamSendTextRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StreamSendTextRequest { + return new StreamSendTextRequest().fromJsonString(jsonString, options); + } + + static equals(a: StreamSendTextRequest | PlainMessage | undefined, b: StreamSendTextRequest | PlainMessage | undefined): boolean { + return proto2.util.equals(StreamSendTextRequest, a, b); + } +} + +/** + * @generated from message livekit.proto.StreamSendTextResponse + */ +export class StreamSendTextResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.StreamSendTextResponse"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendTextResponse { + return new StreamSendTextResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendTextResponse { + return new StreamSendTextResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StreamSendTextResponse { + return new StreamSendTextResponse().fromJsonString(jsonString, options); + } + + static equals(a: StreamSendTextResponse | PlainMessage | undefined, b: StreamSendTextResponse | PlainMessage | undefined): boolean { + return proto2.util.equals(StreamSendTextResponse, a, b); + } +} + +/** + * @generated from message livekit.proto.StreamSendTextCallback + */ +export class StreamSendTextCallback extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + /** + * @generated from oneof livekit.proto.StreamSendTextCallback.result + */ + result: { + /** + * @generated from field: livekit.proto.TextStreamInfo info = 2; + */ + value: TextStreamInfo; + case: "info"; + } | { + /** + * @generated from field: livekit.proto.StreamError error = 3; + */ + value: StreamError; + case: "error"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.StreamSendTextCallback"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "info", kind: "message", T: TextStreamInfo, oneof: "result" }, + { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendTextCallback { + return new StreamSendTextCallback().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendTextCallback { + return new StreamSendTextCallback().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StreamSendTextCallback { + return new StreamSendTextCallback().fromJsonString(jsonString, options); + } + + static equals(a: StreamSendTextCallback | PlainMessage | undefined, b: StreamSendTextCallback | PlainMessage | undefined): boolean { + return proto2.util.equals(StreamSendTextCallback, a, b); + } +} + +/** + * @generated from message livekit.proto.OwnedByteStreamWriter + */ +export class OwnedByteStreamWriter extends Message { + /** + * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; + */ + handle?: FfiOwnedHandle; + + /** + * @generated from field: required livekit.proto.ByteStreamInfo info = 2; + */ + info?: ByteStreamInfo; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.OwnedByteStreamWriter"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: ByteStreamInfo, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedByteStreamWriter { + return new OwnedByteStreamWriter().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedByteStreamWriter { + return new OwnedByteStreamWriter().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): OwnedByteStreamWriter { + return new OwnedByteStreamWriter().fromJsonString(jsonString, options); + } + + static equals(a: OwnedByteStreamWriter | PlainMessage | undefined, b: OwnedByteStreamWriter | PlainMessage | undefined): boolean { + return proto2.util.equals(OwnedByteStreamWriter, a, b); + } +} + +/** + * Opens an outgoing stream. + * Call must be balanced with a StreamCloseRequest. + * + * @generated from message livekit.proto.ByteStreamOpenRequest + */ +export class ByteStreamOpenRequest extends Message { + /** + * @generated from field: required uint64 local_participant_handle = 1; + */ + localParticipantHandle?: bigint; + + /** + * Options to use for opening the stream. + * + * @generated from field: required livekit.proto.StreamByteOptions options = 2; + */ + options?: StreamByteOptions; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamOpenRequest"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "options", kind: "message", T: StreamByteOptions, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamOpenRequest { + return new ByteStreamOpenRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamOpenRequest { + return new ByteStreamOpenRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamOpenRequest { + return new ByteStreamOpenRequest().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamOpenRequest | PlainMessage | undefined, b: ByteStreamOpenRequest | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamOpenRequest, a, b); + } +} + +/** + * @generated from message livekit.proto.ByteStreamOpenResponse + */ +export class ByteStreamOpenResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamOpenResponse"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamOpenResponse { + return new ByteStreamOpenResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamOpenResponse { + return new ByteStreamOpenResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamOpenResponse { + return new ByteStreamOpenResponse().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamOpenResponse | PlainMessage | undefined, b: ByteStreamOpenResponse | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamOpenResponse, a, b); + } +} + +/** + * @generated from message livekit.proto.ByteStreamOpenCallback + */ +export class ByteStreamOpenCallback extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + /** + * @generated from oneof livekit.proto.ByteStreamOpenCallback.result + */ + result: { + /** + * @generated from field: livekit.proto.OwnedByteStreamWriter writer = 2; + */ + value: OwnedByteStreamWriter; + case: "writer"; + } | { + /** + * @generated from field: livekit.proto.StreamError error = 3; + */ + value: StreamError; + case: "error"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamOpenCallback"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "writer", kind: "message", T: OwnedByteStreamWriter, oneof: "result" }, + { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamOpenCallback { + return new ByteStreamOpenCallback().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamOpenCallback { + return new ByteStreamOpenCallback().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamOpenCallback { + return new ByteStreamOpenCallback().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamOpenCallback | PlainMessage | undefined, b: ByteStreamOpenCallback | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamOpenCallback, a, b); + } +} + +/** + * Writes data to a stream writer. + * + * @generated from message livekit.proto.ByteStreamWriterWriteRequest + */ +export class ByteStreamWriterWriteRequest extends Message { + /** + * @generated from field: required uint64 writer_handle = 1; + */ + writerHandle?: bigint; + + /** + * @generated from field: required bytes bytes = 2; + */ + bytes?: Uint8Array; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamWriterWriteRequest"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "writer_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "bytes", kind: "scalar", T: 12 /* ScalarType.BYTES */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamWriterWriteRequest { + return new ByteStreamWriterWriteRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamWriterWriteRequest { + return new ByteStreamWriterWriteRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamWriterWriteRequest { + return new ByteStreamWriterWriteRequest().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamWriterWriteRequest | PlainMessage | undefined, b: ByteStreamWriterWriteRequest | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamWriterWriteRequest, a, b); + } +} + +/** + * @generated from message livekit.proto.ByteStreamWriterWriteResponse + */ +export class ByteStreamWriterWriteResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamWriterWriteResponse"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamWriterWriteResponse { + return new ByteStreamWriterWriteResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamWriterWriteResponse { + return new ByteStreamWriterWriteResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamWriterWriteResponse { + return new ByteStreamWriterWriteResponse().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamWriterWriteResponse | PlainMessage | undefined, b: ByteStreamWriterWriteResponse | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamWriterWriteResponse, a, b); + } +} + +/** + * @generated from message livekit.proto.ByteStreamWriterWriteCallback + */ +export class ByteStreamWriterWriteCallback extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + /** + * @generated from field: optional livekit.proto.StreamError error = 2; + */ + error?: StreamError; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamWriterWriteCallback"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "error", kind: "message", T: StreamError, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamWriterWriteCallback { + return new ByteStreamWriterWriteCallback().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamWriterWriteCallback { + return new ByteStreamWriterWriteCallback().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamWriterWriteCallback { + return new ByteStreamWriterWriteCallback().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamWriterWriteCallback | PlainMessage | undefined, b: ByteStreamWriterWriteCallback | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamWriterWriteCallback, a, b); + } +} + +/** + * Closes a stream writer. + * + * @generated from message livekit.proto.ByteStreamWriterCloseRequest + */ +export class ByteStreamWriterCloseRequest extends Message { + /** + * @generated from field: required uint64 writer_handle = 1; + */ + writerHandle?: bigint; + + /** + * @generated from field: optional string reason = 2; + */ + reason?: string; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamWriterCloseRequest"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "writer_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "reason", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamWriterCloseRequest { + return new ByteStreamWriterCloseRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamWriterCloseRequest { + return new ByteStreamWriterCloseRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamWriterCloseRequest { + return new ByteStreamWriterCloseRequest().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamWriterCloseRequest | PlainMessage | undefined, b: ByteStreamWriterCloseRequest | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamWriterCloseRequest, a, b); + } +} + +/** + * @generated from message livekit.proto.ByteStreamWriterCloseResponse + */ +export class ByteStreamWriterCloseResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamWriterCloseResponse"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamWriterCloseResponse { + return new ByteStreamWriterCloseResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamWriterCloseResponse { + return new ByteStreamWriterCloseResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamWriterCloseResponse { + return new ByteStreamWriterCloseResponse().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamWriterCloseResponse | PlainMessage | undefined, b: ByteStreamWriterCloseResponse | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamWriterCloseResponse, a, b); + } +} + +/** + * @generated from message livekit.proto.ByteStreamWriterCloseCallback + */ +export class ByteStreamWriterCloseCallback extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + /** + * @generated from field: optional livekit.proto.StreamError error = 2; + */ + error?: StreamError; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamWriterCloseCallback"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "error", kind: "message", T: StreamError, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamWriterCloseCallback { + return new ByteStreamWriterCloseCallback().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamWriterCloseCallback { + return new ByteStreamWriterCloseCallback().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamWriterCloseCallback { + return new ByteStreamWriterCloseCallback().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamWriterCloseCallback | PlainMessage | undefined, b: ByteStreamWriterCloseCallback | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamWriterCloseCallback, a, b); + } +} + +/** + * @generated from message livekit.proto.OwnedTextStreamWriter + */ +export class OwnedTextStreamWriter extends Message { + /** + * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; + */ + handle?: FfiOwnedHandle; + + /** + * @generated from field: required livekit.proto.TextStreamInfo info = 2; + */ + info?: TextStreamInfo; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.OwnedTextStreamWriter"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: TextStreamInfo, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedTextStreamWriter { + return new OwnedTextStreamWriter().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedTextStreamWriter { + return new OwnedTextStreamWriter().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): OwnedTextStreamWriter { + return new OwnedTextStreamWriter().fromJsonString(jsonString, options); + } + + static equals(a: OwnedTextStreamWriter | PlainMessage | undefined, b: OwnedTextStreamWriter | PlainMessage | undefined): boolean { + return proto2.util.equals(OwnedTextStreamWriter, a, b); + } +} + +/** + * Opens an outgoing text stream. + * Call must be balanced with a TextStreamCloseRequest. + * + * @generated from message livekit.proto.TextStreamOpenRequest + */ +export class TextStreamOpenRequest extends Message { + /** + * @generated from field: required uint64 local_participant_handle = 1; + */ + localParticipantHandle?: bigint; + + /** + * Options to use for opening the stream. + * + * @generated from field: required livekit.proto.StreamTextOptions options = 2; + */ + options?: StreamTextOptions; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.TextStreamOpenRequest"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "options", kind: "message", T: StreamTextOptions, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamOpenRequest { + return new TextStreamOpenRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamOpenRequest { + return new TextStreamOpenRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TextStreamOpenRequest { + return new TextStreamOpenRequest().fromJsonString(jsonString, options); + } + + static equals(a: TextStreamOpenRequest | PlainMessage | undefined, b: TextStreamOpenRequest | PlainMessage | undefined): boolean { + return proto2.util.equals(TextStreamOpenRequest, a, b); + } +} + +/** + * @generated from message livekit.proto.TextStreamOpenResponse + */ +export class TextStreamOpenResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.TextStreamOpenResponse"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamOpenResponse { + return new TextStreamOpenResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamOpenResponse { + return new TextStreamOpenResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TextStreamOpenResponse { + return new TextStreamOpenResponse().fromJsonString(jsonString, options); + } + + static equals(a: TextStreamOpenResponse | PlainMessage | undefined, b: TextStreamOpenResponse | PlainMessage | undefined): boolean { + return proto2.util.equals(TextStreamOpenResponse, a, b); + } +} + +/** + * @generated from message livekit.proto.TextStreamOpenCallback + */ +export class TextStreamOpenCallback extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + /** + * @generated from oneof livekit.proto.TextStreamOpenCallback.result + */ + result: { + /** + * @generated from field: livekit.proto.OwnedTextStreamWriter writer = 2; + */ + value: OwnedTextStreamWriter; + case: "writer"; + } | { + /** + * @generated from field: livekit.proto.StreamError error = 3; + */ + value: StreamError; + case: "error"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.TextStreamOpenCallback"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "writer", kind: "message", T: OwnedTextStreamWriter, oneof: "result" }, + { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamOpenCallback { + return new TextStreamOpenCallback().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamOpenCallback { + return new TextStreamOpenCallback().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TextStreamOpenCallback { + return new TextStreamOpenCallback().fromJsonString(jsonString, options); + } + + static equals(a: TextStreamOpenCallback | PlainMessage | undefined, b: TextStreamOpenCallback | PlainMessage | undefined): boolean { + return proto2.util.equals(TextStreamOpenCallback, a, b); + } +} + +/** + * Writes text to a text stream writer. + * + * @generated from message livekit.proto.TextStreamWriterWriteRequest + */ +export class TextStreamWriterWriteRequest extends Message { + /** + * @generated from field: required uint64 writer_handle = 1; + */ + writerHandle?: bigint; + + /** + * @generated from field: required string text = 2; + */ + text?: string; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.TextStreamWriterWriteRequest"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "writer_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamWriterWriteRequest { + return new TextStreamWriterWriteRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamWriterWriteRequest { + return new TextStreamWriterWriteRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TextStreamWriterWriteRequest { + return new TextStreamWriterWriteRequest().fromJsonString(jsonString, options); + } + + static equals(a: TextStreamWriterWriteRequest | PlainMessage | undefined, b: TextStreamWriterWriteRequest | PlainMessage | undefined): boolean { + return proto2.util.equals(TextStreamWriterWriteRequest, a, b); + } +} + +/** + * @generated from message livekit.proto.TextStreamWriterWriteResponse + */ +export class TextStreamWriterWriteResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.TextStreamWriterWriteResponse"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamWriterWriteResponse { + return new TextStreamWriterWriteResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamWriterWriteResponse { + return new TextStreamWriterWriteResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TextStreamWriterWriteResponse { + return new TextStreamWriterWriteResponse().fromJsonString(jsonString, options); + } + + static equals(a: TextStreamWriterWriteResponse | PlainMessage | undefined, b: TextStreamWriterWriteResponse | PlainMessage | undefined): boolean { + return proto2.util.equals(TextStreamWriterWriteResponse, a, b); + } +} + +/** + * @generated from message livekit.proto.TextStreamWriterWriteCallback + */ +export class TextStreamWriterWriteCallback extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + /** + * @generated from field: optional livekit.proto.StreamError error = 2; + */ + error?: StreamError; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.TextStreamWriterWriteCallback"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "error", kind: "message", T: StreamError, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamWriterWriteCallback { + return new TextStreamWriterWriteCallback().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamWriterWriteCallback { + return new TextStreamWriterWriteCallback().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TextStreamWriterWriteCallback { + return new TextStreamWriterWriteCallback().fromJsonString(jsonString, options); + } + + static equals(a: TextStreamWriterWriteCallback | PlainMessage | undefined, b: TextStreamWriterWriteCallback | PlainMessage | undefined): boolean { + return proto2.util.equals(TextStreamWriterWriteCallback, a, b); + } +} + +/** + * Closes a text stream writer. + * + * @generated from message livekit.proto.TextStreamWriterCloseRequest + */ +export class TextStreamWriterCloseRequest extends Message { + /** + * @generated from field: required uint64 writer_handle = 1; + */ + writerHandle?: bigint; + + /** + * @generated from field: optional string reason = 2; + */ + reason?: string; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.TextStreamWriterCloseRequest"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "writer_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "reason", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamWriterCloseRequest { + return new TextStreamWriterCloseRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamWriterCloseRequest { + return new TextStreamWriterCloseRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TextStreamWriterCloseRequest { + return new TextStreamWriterCloseRequest().fromJsonString(jsonString, options); + } + + static equals(a: TextStreamWriterCloseRequest | PlainMessage | undefined, b: TextStreamWriterCloseRequest | PlainMessage | undefined): boolean { + return proto2.util.equals(TextStreamWriterCloseRequest, a, b); + } +} + +/** + * @generated from message livekit.proto.TextStreamWriterCloseResponse + */ +export class TextStreamWriterCloseResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.TextStreamWriterCloseResponse"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamWriterCloseResponse { + return new TextStreamWriterCloseResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamWriterCloseResponse { + return new TextStreamWriterCloseResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TextStreamWriterCloseResponse { + return new TextStreamWriterCloseResponse().fromJsonString(jsonString, options); + } + + static equals(a: TextStreamWriterCloseResponse | PlainMessage | undefined, b: TextStreamWriterCloseResponse | PlainMessage | undefined): boolean { + return proto2.util.equals(TextStreamWriterCloseResponse, a, b); + } +} + +/** + * @generated from message livekit.proto.TextStreamWriterCloseCallback + */ +export class TextStreamWriterCloseCallback extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + /** + * @generated from field: optional livekit.proto.StreamError error = 2; + */ + error?: StreamError; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.TextStreamWriterCloseCallback"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "error", kind: "message", T: StreamError, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamWriterCloseCallback { + return new TextStreamWriterCloseCallback().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamWriterCloseCallback { + return new TextStreamWriterCloseCallback().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TextStreamWriterCloseCallback { + return new TextStreamWriterCloseCallback().fromJsonString(jsonString, options); + } + + static equals(a: TextStreamWriterCloseCallback | PlainMessage | undefined, b: TextStreamWriterCloseCallback | PlainMessage | undefined): boolean { + return proto2.util.equals(TextStreamWriterCloseCallback, a, b); + } +} + +/** + * @generated from message livekit.proto.TextStreamInfo + */ +export class TextStreamInfo extends Message { + /** + * unique identifier for this data stream + * + * @generated from field: required string stream_id = 1; + */ + streamId?: string; + + /** + * using int64 for Unix timestamp + * + * @generated from field: required int64 timestamp = 2; + */ + timestamp?: bigint; + + /** + * @generated from field: required string mime_type = 3; + */ + mimeType?: string; + + /** + * @generated from field: required string topic = 4; + */ + topic?: string; + + /** + * only populated for finite streams, if it's a stream of unknown size this stays empty + * + * @generated from field: optional uint64 total_length = 5; + */ + totalLength?: bigint; + + /** + * user defined attributes map that can carry additional info + * + * @generated from field: map attributes = 6; + */ + attributes: { [key: string]: string } = {}; + + /** + * @generated from field: required livekit.proto.TextStreamInfo.OperationType operation_type = 7; + */ + operationType?: TextStreamInfo_OperationType; + + /** + * Optional: Version for updates/edits + * + * @generated from field: optional int32 version = 8; + */ + version?: number; + + /** + * Optional: Reply to specific message + * + * @generated from field: optional string reply_to_stream_id = 9; + */ + replyToStreamId?: string; + + /** + * file attachments for text streams + * + * @generated from field: repeated string attached_stream_ids = 10; + */ + attachedStreamIds: string[] = []; + + /** + * true if the text has been generated by an agent from a participant's audio transcription + * + * @generated from field: optional bool generated = 11; + */ + generated?: boolean; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.TextStreamInfo"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "stream_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + { no: 2, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, req: true }, + { no: 3, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + { no: 4, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + { no: 5, name: "total_length", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + { no: 6, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, + { no: 7, name: "operation_type", kind: "enum", T: proto2.getEnumType(TextStreamInfo_OperationType), req: true }, + { no: 8, name: "version", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 9, name: "reply_to_stream_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 10, name: "attached_stream_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 11, name: "generated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamInfo { + return new TextStreamInfo().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamInfo { + return new TextStreamInfo().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TextStreamInfo { + return new TextStreamInfo().fromJsonString(jsonString, options); + } + + static equals(a: TextStreamInfo | PlainMessage | undefined, b: TextStreamInfo | PlainMessage | undefined): boolean { + return proto2.util.equals(TextStreamInfo, a, b); + } +} + +/** + * @generated from enum livekit.proto.TextStreamInfo.OperationType + */ +export enum TextStreamInfo_OperationType { + /** + * @generated from enum value: CREATE = 0; + */ + CREATE = 0, + + /** + * @generated from enum value: UPDATE = 1; + */ + UPDATE = 1, + + /** + * @generated from enum value: DELETE = 2; + */ + DELETE = 2, + + /** + * @generated from enum value: REACTION = 3; + */ + REACTION = 3, +} +// Retrieve enum metadata with: proto2.getEnumType(TextStreamInfo_OperationType) +proto2.util.setEnumType(TextStreamInfo_OperationType, "livekit.proto.TextStreamInfo.OperationType", [ + { no: 0, name: "CREATE" }, + { no: 1, name: "UPDATE" }, + { no: 2, name: "DELETE" }, + { no: 3, name: "REACTION" }, +]); + +/** + * @generated from message livekit.proto.ByteStreamInfo + */ +export class ByteStreamInfo extends Message { + /** + * unique identifier for this data stream + * + * @generated from field: required string stream_id = 1; + */ + streamId?: string; + + /** + * using int64 for Unix timestamp + * + * @generated from field: required int64 timestamp = 2; + */ + timestamp?: bigint; + + /** + * @generated from field: required string mime_type = 3; + */ + mimeType?: string; + + /** + * @generated from field: required string topic = 4; + */ + topic?: string; + + /** + * only populated for finite streams, if it's a stream of unknown size this stays empty + * + * @generated from field: optional uint64 total_length = 5; + */ + totalLength?: bigint; + + /** + * user defined attributes map that can carry additional info + * + * @generated from field: map attributes = 6; + */ + attributes: { [key: string]: string } = {}; + + /** + * @generated from field: required string name = 7; + */ + name?: string; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamInfo"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "stream_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + { no: 2, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, req: true }, + { no: 3, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + { no: 4, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + { no: 5, name: "total_length", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + { no: 6, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, + { no: 7, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamInfo { + return new ByteStreamInfo().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamInfo { + return new ByteStreamInfo().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamInfo { + return new ByteStreamInfo().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamInfo | PlainMessage | undefined, b: ByteStreamInfo | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamInfo, a, b); + } +} + +/** + * @generated from message livekit.proto.StreamTextOptions + */ +export class StreamTextOptions extends Message { + /** + * @generated from field: required string topic = 1; + */ + topic?: string; + + /** + * @generated from field: map attributes = 2; + */ + attributes: { [key: string]: string } = {}; + + /** + * @generated from field: repeated string destination_identities = 3; + */ + destinationIdentities: string[] = []; + + /** + * @generated from field: optional string id = 4; + */ + id?: string; + + /** + * @generated from field: optional livekit.proto.TextStreamInfo.OperationType operation_type = 5; + */ + operationType?: TextStreamInfo_OperationType; + + /** + * @generated from field: optional int32 version = 6; + */ + version?: number; + + /** + * @generated from field: optional string reply_to_stream_id = 7; + */ + replyToStreamId?: string; + + /** + * @generated from field: repeated string attached_stream_ids = 8; + */ + attachedStreamIds: string[] = []; + + /** + * @generated from field: optional bool generated = 9; + */ + generated?: boolean; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.StreamTextOptions"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + { no: 2, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, + { no: 3, name: "destination_identities", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 4, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 5, name: "operation_type", kind: "enum", T: proto2.getEnumType(TextStreamInfo_OperationType), opt: true }, + { no: 6, name: "version", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 7, name: "reply_to_stream_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 8, name: "attached_stream_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 9, name: "generated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamTextOptions { + return new StreamTextOptions().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamTextOptions { + return new StreamTextOptions().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StreamTextOptions { + return new StreamTextOptions().fromJsonString(jsonString, options); + } + + static equals(a: StreamTextOptions | PlainMessage | undefined, b: StreamTextOptions | PlainMessage | undefined): boolean { + return proto2.util.equals(StreamTextOptions, a, b); + } +} + +/** + * @generated from message livekit.proto.StreamByteOptions + */ +export class StreamByteOptions extends Message { + /** + * @generated from field: required string topic = 1; + */ + topic?: string; + + /** + * @generated from field: map attributes = 2; + */ + attributes: { [key: string]: string } = {}; + + /** + * @generated from field: repeated string destination_identities = 3; + */ + destinationIdentities: string[] = []; + + /** + * @generated from field: optional string id = 4; + */ + id?: string; + + /** + * @generated from field: optional string name = 5; + */ + name?: string; + + /** + * @generated from field: optional string mime_type = 6; + */ + mimeType?: string; + + /** + * @generated from field: optional uint64 total_length = 7; + */ + totalLength?: bigint; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.StreamByteOptions"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + { no: 2, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, + { no: 3, name: "destination_identities", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 4, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 5, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 6, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 7, name: "total_length", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamByteOptions { + return new StreamByteOptions().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamByteOptions { + return new StreamByteOptions().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StreamByteOptions { + return new StreamByteOptions().fromJsonString(jsonString, options); + } + + static equals(a: StreamByteOptions | PlainMessage | undefined, b: StreamByteOptions | PlainMessage | undefined): boolean { + return proto2.util.equals(StreamByteOptions, a, b); + } +} + +/** + * Error pertaining to a stream. + * + * @generated from message livekit.proto.StreamError + */ +export class StreamError extends Message { + /** + * TODO(ladvoc): make this an enum. + * + * @generated from field: required string description = 1; + */ + description?: string; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.StreamError"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamError { + return new StreamError().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamError { + return new StreamError().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StreamError { + return new StreamError().fromJsonString(jsonString, options); + } + + static equals(a: StreamError | PlainMessage | undefined, b: StreamError | PlainMessage | undefined): boolean { + return proto2.util.equals(StreamError, a, b); + } +} + diff --git a/packages/livekit-rtc/src/proto/ffi_pb.ts b/packages/livekit-rtc/src/proto/ffi_pb.ts index b28669ea..3836996e 100644 --- a/packages/livekit-rtc/src/proto/ffi_pb.ts +++ b/packages/livekit-rtc/src/proto/ffi_pb.ts @@ -26,6 +26,7 @@ import { ApmProcessReverseStreamRequest, ApmProcessReverseStreamResponse, ApmPro import { E2eeRequest, E2eeResponse } from "./e2ee_pb.js"; import { PerformRpcCallback, PerformRpcRequest, PerformRpcResponse, RegisterRpcMethodRequest, RegisterRpcMethodResponse, RpcMethodInvocationEvent, RpcMethodInvocationResponseRequest, RpcMethodInvocationResponseResponse, UnregisterRpcMethodRequest, UnregisterRpcMethodResponse } from "./rpc_pb.js"; import { EnableRemoteTrackPublicationRequest, EnableRemoteTrackPublicationResponse, UpdateRemoteTrackPublicationDimensionRequest, UpdateRemoteTrackPublicationDimensionResponse } from "./track_publication_pb.js"; +import { ByteStreamOpenCallback, ByteStreamOpenRequest, ByteStreamOpenResponse, ByteStreamReaderEvent, ByteStreamReaderReadAllCallback, ByteStreamReaderReadAllRequest, ByteStreamReaderReadAllResponse, ByteStreamReaderReadIncrementalRequest, ByteStreamReaderReadIncrementalResponse, ByteStreamReaderWriteToFileCallback, ByteStreamReaderWriteToFileRequest, ByteStreamReaderWriteToFileResponse, ByteStreamWriterCloseCallback, ByteStreamWriterCloseRequest, ByteStreamWriterCloseResponse, ByteStreamWriterWriteCallback, ByteStreamWriterWriteRequest, ByteStreamWriterWriteResponse, StreamSendFileCallback, StreamSendFileRequest, StreamSendFileResponse, StreamSendTextCallback, StreamSendTextRequest, StreamSendTextResponse, TextStreamOpenCallback, TextStreamOpenRequest, TextStreamOpenResponse, TextStreamReaderEvent, TextStreamReaderReadAllCallback, TextStreamReaderReadAllRequest, TextStreamReaderReadAllResponse, TextStreamReaderReadIncrementalRequest, TextStreamReaderReadIncrementalResponse, TextStreamWriterCloseCallback, TextStreamWriterCloseRequest, TextStreamWriterCloseResponse, TextStreamWriterWriteCallback, TextStreamWriterWriteRequest, TextStreamWriterWriteResponse } from "./data_stream_pb.js"; /** * @generated from enum livekit.proto.LogLevel @@ -347,7 +348,7 @@ export class FfiRequest extends Message { case: "updateRemoteTrackPublicationDimension"; } | { /** - * Data Streams + * Data Streams (low level) * * @generated from field: livekit.proto.SendStreamHeaderRequest send_stream_header = 44; */ @@ -405,6 +406,86 @@ export class FfiRequest extends Message { */ value: ApmSetStreamDelayRequest; case: "apmSetStreamDelay"; + } | { + /** + * Data Streams (high level) + * + * @generated from field: livekit.proto.ByteStreamReaderReadIncrementalRequest byte_read_incremental = 54; + */ + value: ByteStreamReaderReadIncrementalRequest; + case: "byteReadIncremental"; + } | { + /** + * @generated from field: livekit.proto.ByteStreamReaderReadAllRequest byte_read_all = 55; + */ + value: ByteStreamReaderReadAllRequest; + case: "byteReadAll"; + } | { + /** + * @generated from field: livekit.proto.ByteStreamReaderWriteToFileRequest byte_write_to_file = 56; + */ + value: ByteStreamReaderWriteToFileRequest; + case: "byteWriteToFile"; + } | { + /** + * @generated from field: livekit.proto.TextStreamReaderReadIncrementalRequest text_read_incremental = 57; + */ + value: TextStreamReaderReadIncrementalRequest; + case: "textReadIncremental"; + } | { + /** + * @generated from field: livekit.proto.TextStreamReaderReadAllRequest text_read_all = 58; + */ + value: TextStreamReaderReadAllRequest; + case: "textReadAll"; + } | { + /** + * @generated from field: livekit.proto.StreamSendFileRequest send_file = 59; + */ + value: StreamSendFileRequest; + case: "sendFile"; + } | { + /** + * @generated from field: livekit.proto.StreamSendTextRequest send_text = 60; + */ + value: StreamSendTextRequest; + case: "sendText"; + } | { + /** + * @generated from field: livekit.proto.ByteStreamOpenRequest byte_stream_open = 61; + */ + value: ByteStreamOpenRequest; + case: "byteStreamOpen"; + } | { + /** + * @generated from field: livekit.proto.ByteStreamWriterWriteRequest byte_stream_write = 62; + */ + value: ByteStreamWriterWriteRequest; + case: "byteStreamWrite"; + } | { + /** + * @generated from field: livekit.proto.ByteStreamWriterCloseRequest byte_stream_close = 63; + */ + value: ByteStreamWriterCloseRequest; + case: "byteStreamClose"; + } | { + /** + * @generated from field: livekit.proto.TextStreamOpenRequest text_stream_open = 64; + */ + value: TextStreamOpenRequest; + case: "textStreamOpen"; + } | { + /** + * @generated from field: livekit.proto.TextStreamWriterWriteRequest text_stream_write = 65; + */ + value: TextStreamWriterWriteRequest; + case: "textStreamWrite"; + } | { + /** + * @generated from field: livekit.proto.TextStreamWriterCloseRequest text_stream_close = 66; + */ + value: TextStreamWriterCloseRequest; + case: "textStreamClose"; } | { case: undefined; value?: undefined } = { case: undefined }; constructor(data?: PartialMessage) { @@ -467,6 +548,19 @@ export class FfiRequest extends Message { { no: 51, name: "apm_process_stream", kind: "message", T: ApmProcessStreamRequest, oneof: "message" }, { no: 52, name: "apm_process_reverse_stream", kind: "message", T: ApmProcessReverseStreamRequest, oneof: "message" }, { no: 53, name: "apm_set_stream_delay", kind: "message", T: ApmSetStreamDelayRequest, oneof: "message" }, + { no: 54, name: "byte_read_incremental", kind: "message", T: ByteStreamReaderReadIncrementalRequest, oneof: "message" }, + { no: 55, name: "byte_read_all", kind: "message", T: ByteStreamReaderReadAllRequest, oneof: "message" }, + { no: 56, name: "byte_write_to_file", kind: "message", T: ByteStreamReaderWriteToFileRequest, oneof: "message" }, + { no: 57, name: "text_read_incremental", kind: "message", T: TextStreamReaderReadIncrementalRequest, oneof: "message" }, + { no: 58, name: "text_read_all", kind: "message", T: TextStreamReaderReadAllRequest, oneof: "message" }, + { no: 59, name: "send_file", kind: "message", T: StreamSendFileRequest, oneof: "message" }, + { no: 60, name: "send_text", kind: "message", T: StreamSendTextRequest, oneof: "message" }, + { no: 61, name: "byte_stream_open", kind: "message", T: ByteStreamOpenRequest, oneof: "message" }, + { no: 62, name: "byte_stream_write", kind: "message", T: ByteStreamWriterWriteRequest, oneof: "message" }, + { no: 63, name: "byte_stream_close", kind: "message", T: ByteStreamWriterCloseRequest, oneof: "message" }, + { no: 64, name: "text_stream_open", kind: "message", T: TextStreamOpenRequest, oneof: "message" }, + { no: 65, name: "text_stream_write", kind: "message", T: TextStreamWriterWriteRequest, oneof: "message" }, + { no: 66, name: "text_stream_close", kind: "message", T: TextStreamWriterCloseRequest, oneof: "message" }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): FfiRequest { @@ -819,6 +913,86 @@ export class FfiResponse extends Message { */ value: ApmSetStreamDelayResponse; case: "apmSetStreamDelay"; + } | { + /** + * Data Streams (high level) + * + * @generated from field: livekit.proto.ByteStreamReaderReadIncrementalResponse byte_read_incremental = 53; + */ + value: ByteStreamReaderReadIncrementalResponse; + case: "byteReadIncremental"; + } | { + /** + * @generated from field: livekit.proto.ByteStreamReaderReadAllResponse byte_read_all = 54; + */ + value: ByteStreamReaderReadAllResponse; + case: "byteReadAll"; + } | { + /** + * @generated from field: livekit.proto.ByteStreamReaderWriteToFileResponse byte_write_to_file = 55; + */ + value: ByteStreamReaderWriteToFileResponse; + case: "byteWriteToFile"; + } | { + /** + * @generated from field: livekit.proto.TextStreamReaderReadIncrementalResponse text_read_incremental = 56; + */ + value: TextStreamReaderReadIncrementalResponse; + case: "textReadIncremental"; + } | { + /** + * @generated from field: livekit.proto.TextStreamReaderReadAllResponse text_read_all = 57; + */ + value: TextStreamReaderReadAllResponse; + case: "textReadAll"; + } | { + /** + * @generated from field: livekit.proto.StreamSendFileResponse send_file = 58; + */ + value: StreamSendFileResponse; + case: "sendFile"; + } | { + /** + * @generated from field: livekit.proto.StreamSendTextResponse send_text = 59; + */ + value: StreamSendTextResponse; + case: "sendText"; + } | { + /** + * @generated from field: livekit.proto.ByteStreamOpenResponse byte_stream_open = 60; + */ + value: ByteStreamOpenResponse; + case: "byteStreamOpen"; + } | { + /** + * @generated from field: livekit.proto.ByteStreamWriterWriteResponse byte_stream_write = 61; + */ + value: ByteStreamWriterWriteResponse; + case: "byteStreamWrite"; + } | { + /** + * @generated from field: livekit.proto.ByteStreamWriterCloseResponse byte_stream_close = 62; + */ + value: ByteStreamWriterCloseResponse; + case: "byteStreamClose"; + } | { + /** + * @generated from field: livekit.proto.TextStreamOpenResponse text_stream_open = 63; + */ + value: TextStreamOpenResponse; + case: "textStreamOpen"; + } | { + /** + * @generated from field: livekit.proto.TextStreamWriterWriteResponse text_stream_write = 64; + */ + value: TextStreamWriterWriteResponse; + case: "textStreamWrite"; + } | { + /** + * @generated from field: livekit.proto.TextStreamWriterCloseResponse text_stream_close = 65; + */ + value: TextStreamWriterCloseResponse; + case: "textStreamClose"; } | { case: undefined; value?: undefined } = { case: undefined }; constructor(data?: PartialMessage) { @@ -880,6 +1054,19 @@ export class FfiResponse extends Message { { no: 50, name: "apm_process_stream", kind: "message", T: ApmProcessStreamResponse, oneof: "message" }, { no: 51, name: "apm_process_reverse_stream", kind: "message", T: ApmProcessReverseStreamResponse, oneof: "message" }, { no: 52, name: "apm_set_stream_delay", kind: "message", T: ApmSetStreamDelayResponse, oneof: "message" }, + { no: 53, name: "byte_read_incremental", kind: "message", T: ByteStreamReaderReadIncrementalResponse, oneof: "message" }, + { no: 54, name: "byte_read_all", kind: "message", T: ByteStreamReaderReadAllResponse, oneof: "message" }, + { no: 55, name: "byte_write_to_file", kind: "message", T: ByteStreamReaderWriteToFileResponse, oneof: "message" }, + { no: 56, name: "text_read_incremental", kind: "message", T: TextStreamReaderReadIncrementalResponse, oneof: "message" }, + { no: 57, name: "text_read_all", kind: "message", T: TextStreamReaderReadAllResponse, oneof: "message" }, + { no: 58, name: "send_file", kind: "message", T: StreamSendFileResponse, oneof: "message" }, + { no: 59, name: "send_text", kind: "message", T: StreamSendTextResponse, oneof: "message" }, + { no: 60, name: "byte_stream_open", kind: "message", T: ByteStreamOpenResponse, oneof: "message" }, + { no: 61, name: "byte_stream_write", kind: "message", T: ByteStreamWriterWriteResponse, oneof: "message" }, + { no: 62, name: "byte_stream_close", kind: "message", T: ByteStreamWriterCloseResponse, oneof: "message" }, + { no: 63, name: "text_stream_open", kind: "message", T: TextStreamOpenResponse, oneof: "message" }, + { no: 64, name: "text_stream_write", kind: "message", T: TextStreamWriterWriteResponse, oneof: "message" }, + { no: 65, name: "text_stream_close", kind: "message", T: TextStreamWriterCloseResponse, oneof: "message" }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): FfiResponse { @@ -1050,6 +1237,8 @@ export class FfiEvent extends Message { case: "rpcMethodInvocation"; } | { /** + * Data Streams (low level) + * * @generated from field: livekit.proto.SendStreamHeaderCallback send_stream_header = 25; */ value: SendStreamHeaderCallback; @@ -1066,6 +1255,86 @@ export class FfiEvent extends Message { */ value: SendStreamTrailerCallback; case: "sendStreamTrailer"; + } | { + /** + * Data Streams (high level) + * + * @generated from field: livekit.proto.ByteStreamReaderEvent byte_stream_reader_event = 28; + */ + value: ByteStreamReaderEvent; + case: "byteStreamReaderEvent"; + } | { + /** + * @generated from field: livekit.proto.ByteStreamReaderReadAllCallback byte_stream_reader_read_all = 29; + */ + value: ByteStreamReaderReadAllCallback; + case: "byteStreamReaderReadAll"; + } | { + /** + * @generated from field: livekit.proto.ByteStreamReaderWriteToFileCallback byte_stream_reader_write_to_file = 30; + */ + value: ByteStreamReaderWriteToFileCallback; + case: "byteStreamReaderWriteToFile"; + } | { + /** + * @generated from field: livekit.proto.ByteStreamOpenCallback byte_stream_open = 31; + */ + value: ByteStreamOpenCallback; + case: "byteStreamOpen"; + } | { + /** + * @generated from field: livekit.proto.ByteStreamWriterWriteCallback byte_stream_writer_write = 32; + */ + value: ByteStreamWriterWriteCallback; + case: "byteStreamWriterWrite"; + } | { + /** + * @generated from field: livekit.proto.ByteStreamWriterCloseCallback byte_stream_writer_close = 33; + */ + value: ByteStreamWriterCloseCallback; + case: "byteStreamWriterClose"; + } | { + /** + * @generated from field: livekit.proto.StreamSendFileCallback send_file = 34; + */ + value: StreamSendFileCallback; + case: "sendFile"; + } | { + /** + * @generated from field: livekit.proto.TextStreamReaderEvent text_stream_reader_event = 35; + */ + value: TextStreamReaderEvent; + case: "textStreamReaderEvent"; + } | { + /** + * @generated from field: livekit.proto.TextStreamReaderReadAllCallback text_stream_reader_read_all = 36; + */ + value: TextStreamReaderReadAllCallback; + case: "textStreamReaderReadAll"; + } | { + /** + * @generated from field: livekit.proto.TextStreamOpenCallback text_stream_open = 37; + */ + value: TextStreamOpenCallback; + case: "textStreamOpen"; + } | { + /** + * @generated from field: livekit.proto.TextStreamWriterWriteCallback text_stream_writer_write = 38; + */ + value: TextStreamWriterWriteCallback; + case: "textStreamWriterWrite"; + } | { + /** + * @generated from field: livekit.proto.TextStreamWriterCloseCallback text_stream_writer_close = 39; + */ + value: TextStreamWriterCloseCallback; + case: "textStreamWriterClose"; + } | { + /** + * @generated from field: livekit.proto.StreamSendTextCallback send_text = 40; + */ + value: StreamSendTextCallback; + case: "sendText"; } | { case: undefined; value?: undefined } = { case: undefined }; constructor(data?: PartialMessage) { @@ -1102,6 +1371,19 @@ export class FfiEvent extends Message { { no: 25, name: "send_stream_header", kind: "message", T: SendStreamHeaderCallback, oneof: "message" }, { no: 26, name: "send_stream_chunk", kind: "message", T: SendStreamChunkCallback, oneof: "message" }, { no: 27, name: "send_stream_trailer", kind: "message", T: SendStreamTrailerCallback, oneof: "message" }, + { no: 28, name: "byte_stream_reader_event", kind: "message", T: ByteStreamReaderEvent, oneof: "message" }, + { no: 29, name: "byte_stream_reader_read_all", kind: "message", T: ByteStreamReaderReadAllCallback, oneof: "message" }, + { no: 30, name: "byte_stream_reader_write_to_file", kind: "message", T: ByteStreamReaderWriteToFileCallback, oneof: "message" }, + { no: 31, name: "byte_stream_open", kind: "message", T: ByteStreamOpenCallback, oneof: "message" }, + { no: 32, name: "byte_stream_writer_write", kind: "message", T: ByteStreamWriterWriteCallback, oneof: "message" }, + { no: 33, name: "byte_stream_writer_close", kind: "message", T: ByteStreamWriterCloseCallback, oneof: "message" }, + { no: 34, name: "send_file", kind: "message", T: StreamSendFileCallback, oneof: "message" }, + { no: 35, name: "text_stream_reader_event", kind: "message", T: TextStreamReaderEvent, oneof: "message" }, + { no: 36, name: "text_stream_reader_read_all", kind: "message", T: TextStreamReaderReadAllCallback, oneof: "message" }, + { no: 37, name: "text_stream_open", kind: "message", T: TextStreamOpenCallback, oneof: "message" }, + { no: 38, name: "text_stream_writer_write", kind: "message", T: TextStreamWriterWriteCallback, oneof: "message" }, + { no: 39, name: "text_stream_writer_close", kind: "message", T: TextStreamWriterCloseCallback, oneof: "message" }, + { no: 40, name: "send_text", kind: "message", T: StreamSendTextCallback, oneof: "message" }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): FfiEvent { diff --git a/packages/livekit-rtc/src/proto/participant_pb.ts b/packages/livekit-rtc/src/proto/participant_pb.ts index fa48904f..9d15ce3c 100644 --- a/packages/livekit-rtc/src/proto/participant_pb.ts +++ b/packages/livekit-rtc/src/proto/participant_pb.ts @@ -158,6 +158,11 @@ export enum DisconnectReason { * @generated from enum value: SIP_TRUNK_FAILURE = 13; */ SIP_TRUNK_FAILURE = 13, + + /** + * @generated from enum value: CONNECTION_TIMEOUT = 14; + */ + CONNECTION_TIMEOUT = 14, } // Retrieve enum metadata with: proto2.getEnumType(DisconnectReason) proto2.util.setEnumType(DisconnectReason, "livekit.proto.DisconnectReason", [ @@ -175,6 +180,7 @@ proto2.util.setEnumType(DisconnectReason, "livekit.proto.DisconnectReason", [ { no: 11, name: "USER_UNAVAILABLE" }, { no: 12, name: "USER_REJECTED" }, { no: 13, name: "SIP_TRUNK_FAILURE" }, + { no: 14, name: "CONNECTION_TIMEOUT" }, ]); /** diff --git a/packages/livekit-rtc/src/proto/room_pb.ts b/packages/livekit-rtc/src/proto/room_pb.ts index d0bf0147..b6eba2a4 100644 --- a/packages/livekit-rtc/src/proto/room_pb.ts +++ b/packages/livekit-rtc/src/proto/room_pb.ts @@ -25,6 +25,7 @@ import { RtcStats } from "./stats_pb.js"; import { VideoCodec } from "./video_frame_pb.js"; import { E2eeOptions, EncryptionState } from "./e2ee_pb.js"; import { FfiOwnedHandle } from "./handle_pb.js"; +import { OwnedByteStreamReader, OwnedTextStreamReader } from "./data_stream_pb.js"; /** * @generated from enum livekit.proto.IceTransportType @@ -2752,6 +2753,8 @@ export class RoomEvent extends Message { case: "chatMessage"; } | { /** + * Data stream (low level) + * * @generated from field: livekit.proto.DataStreamHeaderReceived stream_header_received = 30; */ value: DataStreamHeaderReceived; @@ -2774,6 +2777,20 @@ export class RoomEvent extends Message { */ value: DataChannelBufferedAmountLowThresholdChanged; case: "dataChannelLowThresholdChanged"; + } | { + /** + * Data stream (high level) + * + * @generated from field: livekit.proto.ByteStreamOpened byte_stream_opened = 34; + */ + value: ByteStreamOpened; + case: "byteStreamOpened"; + } | { + /** + * @generated from field: livekit.proto.TextStreamOpened text_stream_opened = 35; + */ + value: TextStreamOpened; + case: "textStreamOpened"; } | { case: undefined; value?: undefined } = { case: undefined }; constructor(data?: PartialMessage) { @@ -2817,6 +2834,8 @@ export class RoomEvent extends Message { { no: 31, name: "stream_chunk_received", kind: "message", T: DataStreamChunkReceived, oneof: "message" }, { no: 32, name: "stream_trailer_received", kind: "message", T: DataStreamTrailerReceived, oneof: "message" }, { no: 33, name: "data_channel_low_threshold_changed", kind: "message", T: DataChannelBufferedAmountLowThresholdChanged, oneof: "message" }, + { no: 34, name: "byte_stream_opened", kind: "message", T: ByteStreamOpened, oneof: "message" }, + { no: 35, name: "text_stream_opened", kind: "message", T: TextStreamOpened, oneof: "message" }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): RoomEvent { @@ -5341,3 +5360,89 @@ export class DataChannelBufferedAmountLowThresholdChanged extends Message { + /** + * @generated from field: required livekit.proto.OwnedByteStreamReader reader = 1; + */ + reader?: OwnedByteStreamReader; + + /** + * @generated from field: required string participant_identity = 2; + */ + participantIdentity?: string; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.ByteStreamOpened"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "reader", kind: "message", T: OwnedByteStreamReader, req: true }, + { no: 2, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamOpened { + return new ByteStreamOpened().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamOpened { + return new ByteStreamOpened().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamOpened { + return new ByteStreamOpened().fromJsonString(jsonString, options); + } + + static equals(a: ByteStreamOpened | PlainMessage | undefined, b: ByteStreamOpened | PlainMessage | undefined): boolean { + return proto2.util.equals(ByteStreamOpened, a, b); + } +} + +/** + * @generated from message livekit.proto.TextStreamOpened + */ +export class TextStreamOpened extends Message { + /** + * @generated from field: required livekit.proto.OwnedTextStreamReader reader = 1; + */ + reader?: OwnedTextStreamReader; + + /** + * @generated from field: required string participant_identity = 2; + */ + participantIdentity?: string; + + constructor(data?: PartialMessage) { + super(); + proto2.util.initPartial(data, this); + } + + static readonly runtime: typeof proto2 = proto2; + static readonly typeName = "livekit.proto.TextStreamOpened"; + static readonly fields: FieldList = proto2.util.newFieldList(() => [ + { no: 1, name: "reader", kind: "message", T: OwnedTextStreamReader, req: true }, + { no: 2, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamOpened { + return new TextStreamOpened().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamOpened { + return new TextStreamOpened().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TextStreamOpened { + return new TextStreamOpened().fromJsonString(jsonString, options); + } + + static equals(a: TextStreamOpened | PlainMessage | undefined, b: TextStreamOpened | PlainMessage | undefined): boolean { + return proto2.util.equals(TextStreamOpened, a, b); + } +} + diff --git a/packages/livekit-rtc/src/proto/track_pb.ts b/packages/livekit-rtc/src/proto/track_pb.ts index b78dd46f..234560c0 100644 --- a/packages/livekit-rtc/src/proto/track_pb.ts +++ b/packages/livekit-rtc/src/proto/track_pb.ts @@ -113,6 +113,58 @@ proto2.util.setEnumType(StreamState, "livekit.proto.StreamState", [ { no: 2, name: "STATE_PAUSED" }, ]); +/** + * @generated from enum livekit.proto.AudioTrackFeature + */ +export enum AudioTrackFeature { + /** + * @generated from enum value: TF_STEREO = 0; + */ + TF_STEREO = 0, + + /** + * @generated from enum value: TF_NO_DTX = 1; + */ + TF_NO_DTX = 1, + + /** + * @generated from enum value: TF_AUTO_GAIN_CONTROL = 2; + */ + TF_AUTO_GAIN_CONTROL = 2, + + /** + * @generated from enum value: TF_ECHO_CANCELLATION = 3; + */ + TF_ECHO_CANCELLATION = 3, + + /** + * @generated from enum value: TF_NOISE_SUPPRESSION = 4; + */ + TF_NOISE_SUPPRESSION = 4, + + /** + * @generated from enum value: TF_ENHANCED_NOISE_CANCELLATION = 5; + */ + TF_ENHANCED_NOISE_CANCELLATION = 5, + + /** + * client will buffer audio once available and send it to the server via bytes stream once connected + * + * @generated from enum value: TF_PRECONNECT_BUFFER = 6; + */ + TF_PRECONNECT_BUFFER = 6, +} +// Retrieve enum metadata with: proto2.getEnumType(AudioTrackFeature) +proto2.util.setEnumType(AudioTrackFeature, "livekit.proto.AudioTrackFeature", [ + { no: 0, name: "TF_STEREO" }, + { no: 1, name: "TF_NO_DTX" }, + { no: 2, name: "TF_AUTO_GAIN_CONTROL" }, + { no: 3, name: "TF_ECHO_CANCELLATION" }, + { no: 4, name: "TF_NOISE_SUPPRESSION" }, + { no: 5, name: "TF_ENHANCED_NOISE_CANCELLATION" }, + { no: 6, name: "TF_PRECONNECT_BUFFER" }, +]); + /** * Create a new VideoTrack from a VideoSource * @@ -490,6 +542,11 @@ export class TrackPublicationInfo extends Message { */ encryptionType?: EncryptionType; + /** + * @generated from field: repeated livekit.proto.AudioTrackFeature audio_features = 12; + */ + audioFeatures: AudioTrackFeature[] = []; + constructor(data?: PartialMessage) { super(); proto2.util.initPartial(data, this); @@ -509,6 +566,7 @@ export class TrackPublicationInfo extends Message { { no: 9, name: "muted", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, { no: 10, name: "remote", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, { no: 11, name: "encryption_type", kind: "enum", T: proto2.getEnumType(EncryptionType), req: true }, + { no: 12, name: "audio_features", kind: "enum", T: proto2.getEnumType(AudioTrackFeature), repeated: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): TrackPublicationInfo {