diff --git a/.changeset/forty-bottles-battle.md b/.changeset/forty-bottles-battle.md new file mode 100644 index 00000000..4c826933 --- /dev/null +++ b/.changeset/forty-bottles-battle.md @@ -0,0 +1,5 @@ +--- +"@livekit/rtc-node": patch +--- + +Enable strict type checking and update ffi to use proto2 syntax diff --git a/packages/livekit-rtc/generate_proto.sh b/packages/livekit-rtc/generate_proto.sh index f30dea72..5b799dd5 100755 --- a/packages/livekit-rtc/generate_proto.sh +++ b/packages/livekit-rtc/generate_proto.sh @@ -11,8 +11,8 @@ FFI_PROTOCOL=./rust-sdks/livekit-ffi/protocol FFI_OUT_NODE=./src/proto # ffi - -protoc \ +PATH=$PATH:$(pwd)/node_modules/.bin \ + protoc \ -I=$FFI_PROTOCOL \ --es_out $FFI_OUT_NODE \ --es_opt target=ts \ diff --git a/packages/livekit-rtc/package.json b/packages/livekit-rtc/package.json index 0d854481..afbe4f65 100644 --- a/packages/livekit-rtc/package.json +++ b/packages/livekit-rtc/package.json @@ -33,11 +33,12 @@ } }, "dependencies": { - "@bufbuild/protobuf": "^1.4.2", + "@bufbuild/protobuf": "^2.2.0", "@livekit/mutex": "^1.0.0", "@livekit/typed-emitter": "^3.0.0" }, "devDependencies": { + "@bufbuild/protoc-gen-es": "^2.2.0", "@napi-rs/cli": "^2.18.0", "@types/node": "^20.9.2", "prettier": "^3.0.3", diff --git a/packages/livekit-rtc/rust-sdks b/packages/livekit-rtc/rust-sdks index 0e4b9834..3de6fa60 160000 --- a/packages/livekit-rtc/rust-sdks +++ b/packages/livekit-rtc/rust-sdks @@ -1 +1 @@ -Subproject commit 0e4b9834598c32c52db0928f37e2d04db6c4cb45 +Subproject commit 3de6fa60f3cdafc2c106a7f370724eddf1e92fdc diff --git a/packages/livekit-rtc/src/audio_frame.ts b/packages/livekit-rtc/src/audio_frame.ts index 2b248fe0..1364014e 100644 --- a/packages/livekit-rtc/src/audio_frame.ts +++ b/packages/livekit-rtc/src/audio_frame.ts @@ -1,9 +1,10 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 +import { create } from '@bufbuild/protobuf'; import { FfiClient, FfiHandle } from './ffi_client.js'; import type { OwnedAudioFrameBuffer } from './proto/audio_frame_pb.js'; -import { AudioFrameBufferInfo } from './proto/audio_frame_pb.js'; +import { type AudioFrameBufferInfo, AudioFrameBufferInfoSchema } from './proto/audio_frame_pb.js'; export class AudioFrame { data: Int16Array; @@ -30,10 +31,10 @@ export class AudioFrame { /** @internal */ static fromOwnedInfo(owned: OwnedAudioFrameBuffer): AudioFrame { - const info = owned.info; + const info = owned.info!; const len = info.numChannels * info.samplesPerChannel * 2; // c_int16 const data = FfiClient.instance.copyBuffer(info.dataPtr, len); - new FfiHandle(owned.handle.id).dispose(); + new FfiHandle(owned.handle!.id).dispose(); return new AudioFrame( new Int16Array(data.buffer), info.sampleRate, @@ -44,7 +45,7 @@ export class AudioFrame { /** @internal */ protoInfo(): AudioFrameBufferInfo { - return new AudioFrameBufferInfo({ + return create(AudioFrameBufferInfoSchema, { dataPtr: FfiClient.instance.retrievePtr(new Uint8Array(this.data.buffer)), sampleRate: this.sampleRate, numChannels: this.channels, @@ -63,10 +64,9 @@ export class AudioFrame { * @param buffer - a single AudioFrame or list thereof */ export const combineAudioFrames = (buffer: AudioFrame | AudioFrame[]): AudioFrame => { - if (!buffer['length']) { + if (!Array.isArray(buffer)) { return buffer as AudioFrame; } - buffer = buffer as AudioFrame[]; if (buffer.length === 0) { throw new Error('buffer is empty'); diff --git a/packages/livekit-rtc/src/audio_resampler.ts b/packages/livekit-rtc/src/audio_resampler.ts index 22efb56a..fd6c1d08 100644 --- a/packages/livekit-rtc/src/audio_resampler.ts +++ b/packages/livekit-rtc/src/audio_resampler.ts @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 +import { create } from '@bufbuild/protobuf'; import { AudioFrame } from './audio_frame.js'; import { FfiClient, FfiHandle } from './ffi_client.js'; import type { @@ -9,9 +10,9 @@ import type { PushSoxResamplerResponse, } from './proto/audio_frame_pb.js'; import { - FlushSoxResamplerRequest, - NewSoxResamplerRequest, - PushSoxResamplerRequest, + FlushSoxResamplerRequestSchema, + NewSoxResamplerRequestSchema, + PushSoxResamplerRequestSchema, SoxQualityRecipe, SoxResamplerDataType, } from './proto/audio_frame_pb.js'; @@ -58,7 +59,7 @@ export class AudioResampler { this.#outputRate = outputRate; this.#channels = channels; - const req = new NewSoxResamplerRequest({ + const req = create(NewSoxResamplerRequestSchema, { inputRate, outputRate, numChannels: channels, @@ -75,11 +76,11 @@ export class AudioResampler { }, }); - if (res.error) { - throw new Error(res.error); + if (res.message.case !== 'resampler') { + throw new Error(res.message.value ?? 'Unknown Error'); } - this.#ffiHandle = new FfiHandle(res.resampler.handle.id); + this.#ffiHandle = new FfiHandle(res.message.value.handle!.id); } /** @@ -94,7 +95,7 @@ export class AudioResampler { * be empty if no output data is available yet. */ push(data: AudioFrame): AudioFrame[] { - const req = new PushSoxResamplerRequest({ + const req = create(PushSoxResamplerRequestSchema, { resamplerHandle: this.#ffiHandle.handle, dataPtr: data.protoInfo().dataPtr, size: data.data.byteLength, @@ -134,7 +135,7 @@ export class AudioResampler { * internal buffers are processed and all resampled data is output. */ flush(): AudioFrame[] { - const req = new FlushSoxResamplerRequest({ + const req = create(FlushSoxResamplerRequestSchema, { resamplerHandle: this.#ffiHandle.handle, }); diff --git a/packages/livekit-rtc/src/audio_source.ts b/packages/livekit-rtc/src/audio_source.ts index 9e071158..b9b1ec3c 100644 --- a/packages/livekit-rtc/src/audio_source.ts +++ b/packages/livekit-rtc/src/audio_source.ts @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 +import { create } from '@bufbuild/protobuf'; import type { AudioFrame } from './audio_frame.js'; import { FfiClient } from './ffi_client.js'; import { FfiHandle } from './napi/native.js'; @@ -13,9 +14,9 @@ import type { } from './proto/audio_frame_pb.js'; import { AudioSourceType, - CaptureAudioFrameRequest, - ClearAudioBufferRequest, - NewAudioSourceRequest, + CaptureAudioFrameRequestSchema, + ClearAudioBufferRequestSchema, + NewAudioSourceRequestSchema, } from './proto/audio_frame_pb.js'; export class AudioSource { @@ -45,7 +46,7 @@ export class AudioSource { this.lastCapture = 0; this.currentQueueSize = 0; - const req = new NewAudioSourceRequest({ + const req = create(NewAudioSourceRequestSchema, { type: AudioSourceType.AUDIO_SOURCE_NATIVE, sampleRate: sampleRate, numChannels: numChannels, @@ -59,8 +60,8 @@ export class AudioSource { }, }); - this.info = res.source.info; - this.ffiHandle = new FfiHandle(res.source.handle.id); + this.info = res.source!.info!; + this.ffiHandle = new FfiHandle(res.source!.handle!.id); } get queuedDuration(): number { @@ -71,7 +72,7 @@ export class AudioSource { } clearQueue() { - const req = new ClearAudioBufferRequest({ + const req = create(ClearAudioBufferRequestSchema, { sourceHandle: this.ffiHandle.handle, }); @@ -116,7 +117,7 @@ export class AudioSource { // (e.g. using wait_for_playout for very small chunks) this.timeout = setTimeout(this.release, this.currentQueueSize - 50); - const req = new CaptureAudioFrameRequest({ + const req = create(CaptureAudioFrameRequestSchema, { sourceHandle: this.ffiHandle.handle, buffer: frame.protoInfo(), }); diff --git a/packages/livekit-rtc/src/audio_stream.ts b/packages/livekit-rtc/src/audio_stream.ts index d012c9c2..3cb51ad3 100644 --- a/packages/livekit-rtc/src/audio_stream.ts +++ b/packages/livekit-rtc/src/audio_stream.ts @@ -1,12 +1,13 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 +import { create } from '@bufbuild/protobuf'; import { Mutex } from '@livekit/mutex'; import { AudioFrame } from './audio_frame.js'; import type { FfiEvent } from './ffi_client.js'; import { FfiClient, FfiClientEvent, FfiHandle } from './ffi_client.js'; import type { AudioStreamInfo, NewAudioStreamResponse } from './proto/audio_frame_pb.js'; -import { AudioStreamType, NewAudioStreamRequest } from './proto/audio_frame_pb.js'; +import { AudioStreamType, NewAudioStreamRequestSchema } from './proto/audio_frame_pb.js'; import type { Track } from './track.js'; export class AudioStream implements AsyncIterableIterator { @@ -30,7 +31,7 @@ export class AudioStream implements AsyncIterableIterator { this.sampleRate = sampleRate; this.numChannels = numChannels; - const req = new NewAudioStreamRequest({ + const req = create(NewAudioStreamRequestSchema, { type: AudioStreamType.AUDIO_STREAM_NATIVE, trackHandle: track.ffi_handle.handle, sampleRate: sampleRate, @@ -44,8 +45,8 @@ export class AudioStream implements AsyncIterableIterator { }, }); - this.info = res.stream.info; - this.ffiHandle = new FfiHandle(res.stream.handle.id); + this.info = res.stream!.info!; + this.ffiHandle = new FfiHandle(res.stream!.handle!.id); FfiClient.instance.on(FfiClientEvent.FfiEvent, this.onEvent); } @@ -61,7 +62,7 @@ export class AudioStream implements AsyncIterableIterator { const streamEvent = ev.message.value.message; switch (streamEvent.case) { case 'frameReceived': - const frame = AudioFrame.fromOwnedInfo(streamEvent.value.frame); + const frame = AudioFrame.fromOwnedInfo(streamEvent.value.frame!); if (this.queueResolve) { this.queueResolve({ done: false, value: frame }); } else { diff --git a/packages/livekit-rtc/src/e2ee.ts b/packages/livekit-rtc/src/e2ee.ts index a8441329..c4b1906a 100644 --- a/packages/livekit-rtc/src/e2ee.ts +++ b/packages/livekit-rtc/src/e2ee.ts @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 +import { create } from '@bufbuild/protobuf'; import { FfiClient } from './ffi_client.js'; import type { E2eeManagerGetFrameCryptorsResponse, @@ -11,17 +12,17 @@ import type { RatchetSharedKeyResponse, } from './proto/e2ee_pb.js'; import { - E2eeManagerSetEnabledRequest, - E2eeRequest, + E2eeManagerSetEnabledRequestSchema, + E2eeRequestSchema, EncryptionType, - FrameCryptorSetEnabledRequest, - FrameCryptorSetKeyIndexRequest, - GetKeyRequest, - GetSharedKeyRequest, - RatchetKeyRequest, - RatchetSharedKeyRequest, - SetKeyRequest, - SetSharedKeyRequest, + FrameCryptorSetEnabledRequestSchema, + FrameCryptorSetKeyIndexRequestSchema, + GetKeyRequestSchema, + GetSharedKeyRequestSchema, + RatchetKeyRequestSchema, + RatchetSharedKeyRequestSchema, + SetKeyRequestSchema, + SetSharedKeyRequestSchema, } from './proto/e2ee_pb.js'; const DEFAULT_RATCHET_SALT = new TextEncoder().encode('LKFrameEncryptionKey'); @@ -62,11 +63,11 @@ export class KeyProvider { } setSharedKey(sharedKey: Uint8Array, keyIndex: number) { - const req = new E2eeRequest({ + const req = create(E2eeRequestSchema, { roomHandle: this.roomHandle, message: { case: 'setSharedKey', - value: new SetSharedKeyRequest({ + value: create(SetSharedKeyRequestSchema, { keyIndex: keyIndex, sharedKey: sharedKey, }), @@ -82,11 +83,11 @@ export class KeyProvider { } exportSharedKey(keyIndex: number): Uint8Array { - const req = new E2eeRequest({ + const req = create(E2eeRequestSchema, { roomHandle: this.roomHandle, message: { case: 'getSharedKey', - value: new GetSharedKeyRequest({ + value: create(GetSharedKeyRequestSchema, { keyIndex: keyIndex, }), }, @@ -103,11 +104,11 @@ export class KeyProvider { } ratchetSharedKey(keyIndex: number): Uint8Array { - const req = new E2eeRequest({ + const req = create(E2eeRequestSchema, { roomHandle: this.roomHandle, message: { case: 'ratchetSharedKey', - value: new RatchetSharedKeyRequest({ + value: create(RatchetSharedKeyRequestSchema, { keyIndex: keyIndex, }), }, @@ -124,11 +125,11 @@ export class KeyProvider { } setKey(participantIdentity: string, keyIndex: number) { - const req = new E2eeRequest({ + const req = create(E2eeRequestSchema, { roomHandle: this.roomHandle, message: { case: 'setKey', - value: new SetKeyRequest({ + value: create(SetKeyRequestSchema, { keyIndex: keyIndex, participantIdentity: participantIdentity, }), @@ -144,11 +145,11 @@ export class KeyProvider { } exportKey(participantIdentity: string, keyIndex: number): Uint8Array { - const req = new E2eeRequest({ + const req = create(E2eeRequestSchema, { roomHandle: this.roomHandle, message: { case: 'getKey', - value: new GetKeyRequest({ + value: create(GetKeyRequestSchema, { keyIndex: keyIndex, participantIdentity: participantIdentity, }), @@ -166,11 +167,11 @@ export class KeyProvider { } ratchetKey(participantIdentity: string, keyIndex: number): Uint8Array { - const req = new E2eeRequest({ + const req = create(E2eeRequestSchema, { roomHandle: this.roomHandle, message: { case: 'ratchetKey', - value: new RatchetKeyRequest({ + value: create(RatchetKeyRequestSchema, { keyIndex: keyIndex, participantIdentity: participantIdentity, }), @@ -203,11 +204,11 @@ export class FrameCryptor { setEnabled(enabled: boolean) { this.enabled = enabled; - const req = new E2eeRequest({ + const req = create(E2eeRequestSchema, { roomHandle: this.roomHandle, message: { case: 'cryptorSetEnabled', - value: new FrameCryptorSetEnabledRequest({ + value: create(FrameCryptorSetEnabledRequestSchema, { participantIdentity: this.participantIdentity, enabled: this.enabled, }), @@ -224,11 +225,11 @@ export class FrameCryptor { setKeyIndex(keyIndex: number) { this.keyIndex = keyIndex; - const req = new E2eeRequest({ + const req = create(E2eeRequestSchema, { roomHandle: this.roomHandle, message: { case: 'cryptorSetKeyIndex', - value: new FrameCryptorSetKeyIndexRequest({ + value: create(FrameCryptorSetKeyIndexRequestSchema, { participantIdentity: this.participantIdentity, keyIndex: this.keyIndex, }), @@ -255,21 +256,20 @@ export class E2EEManager { this.roomHandle = roomHandle; this.enabled = opts !== undefined; - if (opts !== undefined) { - const options = { ...defaultE2EEOptions, ...opts }; + opts ??= defaultE2EEOptions; + const options = { ...defaultE2EEOptions, ...opts }; - this.options = options; - this.keyProvider = new KeyProvider(roomHandle, options.keyProviderOptions); - } + this.options = options; + this.keyProvider = new KeyProvider(roomHandle, options.keyProviderOptions); } setEnabled(enabled: boolean) { this.enabled = enabled; - const req = new E2eeRequest({ + const req = create(E2eeRequestSchema, { roomHandle: this.roomHandle, message: { case: 'managerSetEnabled', - value: new E2eeManagerSetEnabledRequest({ + value: create(E2eeManagerSetEnabledRequestSchema, { enabled: this.enabled, }), }, @@ -284,7 +284,7 @@ export class E2EEManager { } frameCryptors(): FrameCryptor[] { - const req = new E2eeRequest({ + const req = create(E2eeRequestSchema, { roomHandle: this.roomHandle, message: { case: 'managerGetFrameCryptors', diff --git a/packages/livekit-rtc/src/ffi_client.ts b/packages/livekit-rtc/src/ffi_client.ts index 148c58b2..982fbbb5 100644 --- a/packages/livekit-rtc/src/ffi_client.ts +++ b/packages/livekit-rtc/src/ffi_client.ts @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 -import type { PartialMessage } from '@bufbuild/protobuf'; +import { MessageInitShape, create, fromBinary, toBinary } from '@bufbuild/protobuf'; import type { TypedEventEmitter as TypedEmitter } from '@livekit/typed-emitter'; import EventEmitter from 'events'; import { @@ -12,7 +12,14 @@ import { livekitInitialize, livekitRetrievePtr, } from './napi/native.js'; -import { FfiEvent, FfiRequest, FfiResponse } from './proto/ffi_pb.js'; +import { + FfiEvent, + FfiEventSchema, + FfiRequest, + FfiRequestSchema, + FfiResponse, + FfiResponseSchema, +} from './proto/ffi_pb.js'; export { FfiHandle, FfiEvent, FfiResponse, FfiRequest, livekitDispose as dispose }; @@ -39,16 +46,16 @@ export class FfiClient extends (EventEmitter as new () => TypedEmitter { - const event = FfiEvent.fromBinary(event_data); + const event = fromBinary(FfiEventSchema, event_data); this.emit(FfiClientEvent.FfiEvent, event); }, true); } - request(req: PartialMessage): T { - const request = new FfiRequest(req); - const req_data = request.toBinary(); + request(req: MessageInitShape): T { + const request = create(FfiRequestSchema, req); + const req_data = toBinary(FfiRequestSchema, request); const res_data = livekitFfiRequest(req_data); - return FfiResponse.fromBinary(res_data).message.value as T; + return fromBinary(FfiResponseSchema, res_data).message.value as T; } copyBuffer(ptr: bigint, len: number): Uint8Array { diff --git a/packages/livekit-rtc/src/index.ts b/packages/livekit-rtc/src/index.ts index e8063d5b..c128f614 100644 --- a/packages/livekit-rtc/src/index.ts +++ b/packages/livekit-rtc/src/index.ts @@ -1,6 +1,19 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 +import { MessageInitShape, create } from '@bufbuild/protobuf'; +import { + AudioEncoding, + AudioEncodingSchema, + IceServerSchema, + type IceServer as IceServerType, + TrackPublishOptionsSchema, + type TrackPublishOptions as TrackPublishOptionsType, + VideoEncoding, + VideoEncodingSchema, +} from './proto/room_pb.js'; +import { TrackSource } from './proto/track_pb.js'; +import { VideoCodec } from './proto/video_frame_pb.js'; export { Room, RoomEvent, ConnectError, RoomOptions, RtcConfiguration } from './room.js'; export { Participant, RemoteParticipant, LocalParticipant } from './participant.js'; @@ -29,13 +42,12 @@ export { } from './track_publication.js'; export { Transcription, TranscriptionSegment } from './transcription.js'; export { E2EEManager, E2EEOptions, KeyProviderOptions, KeyProvider, FrameCryptor } from './e2ee.js'; + export { ConnectionQuality, - IceServer, IceTransportType, DataPacketKind, ContinualGatheringPolicy, - TrackPublishOptions, ConnectionState, } from './proto/room_pb.js'; export { EncryptionType, EncryptionState } from './proto/e2ee_pb.js'; @@ -44,3 +56,46 @@ export { VideoBufferType, VideoRotation, VideoCodec } from './proto/video_frame_ export { ParticipantKind } from './proto/participant_pb.js'; export { dispose } from './ffi_client.js'; export type { ChatMessage } from './types.js'; + +// exposing helpers for API compatibility with 1.x version of protobuf-es where these were class instances + +type IceServerInit = MessageInitShape & { + urls: string[]; +}; +export class IceServer implements IceServerType { + $typeName = 'livekit.proto.IceServer' as const; + urls: string[]; + username: string; + password: string; + constructor(init: IceServerInit) { + const { urls, username, password } = init; + this.urls = urls; + this.username = username ?? ''; + this.password = password ?? ''; + create(IceServerSchema, init); + } +} + +export class TrackPublishOptions implements TrackPublishOptionsType { + $typeName = 'livekit.proto.TrackPublishOptions' as const; + videoCodec: VideoCodec; + videoEncoding?: VideoEncoding | undefined; + audioEncoding?: AudioEncoding | undefined; + dtx: boolean; + simulcast: boolean; + source: TrackSource; + stream: string; + red: boolean; + + constructor(init: MessageInitShape) { + const { videoCodec, videoEncoding, audioEncoding, dtx, simulcast, source, stream, red } = init; + this.videoCodec = videoCodec ?? VideoCodec.VP8; + this.videoEncoding = create(VideoEncodingSchema, videoEncoding); + this.audioEncoding = create(AudioEncodingSchema, audioEncoding); + this.dtx = dtx ?? false; + this.simulcast = simulcast ?? false; + this.source = source ?? TrackSource.SOURCE_UNKNOWN; + this.stream = stream ?? ''; + this.red = red ?? false; + } +} diff --git a/packages/livekit-rtc/src/participant.ts b/packages/livekit-rtc/src/participant.ts index 18309396..81934385 100644 --- a/packages/livekit-rtc/src/participant.ts +++ b/packages/livekit-rtc/src/participant.ts @@ -1,10 +1,10 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 +import { create } from '@bufbuild/protobuf'; import { FfiClient, FfiHandle } from './ffi_client.js'; import type { OwnedParticipant, ParticipantInfo, ParticipantKind } from './proto/participant_pb.js'; -import { - ChatMessage as ChatMessageModel, +import type { PublishDataCallback, PublishDataResponse, PublishSipDtmfCallback, @@ -26,23 +26,24 @@ import { UnpublishTrackResponse, } from './proto/room_pb.js'; import { - EditChatMessageRequest, - TranscriptionSegment as ProtoTranscriptionSegment, - PublishDataRequest, - PublishSipDtmfRequest, - PublishTrackRequest, - PublishTranscriptionRequest, - SendChatMessageRequest, - SetLocalAttributesRequest, - SetLocalMetadataRequest, - SetLocalNameRequest, - UnpublishTrackRequest, + ChatMessageSchema, + EditChatMessageRequestSchema, + PublishDataRequestSchema, + PublishSipDtmfRequestSchema, + PublishTrackRequestSchema, + PublishTranscriptionRequestSchema, + SendChatMessageRequestSchema, + SetLocalAttributesRequestSchema, + SetLocalMetadataRequestSchema, + SetLocalNameRequestSchema, + UnpublishTrackRequestSchema, } from './proto/room_pb.js'; +import { TranscriptionSegmentSchema } from './proto/room_pb.js'; import type { LocalTrack } from './track.js'; import type { RemoteTrackPublication, TrackPublication } from './track_publication.js'; import { LocalTrackPublication } from './track_publication.js'; import type { Transcription } from './transcription.js'; -import { ChatMessage } from './types.js'; +import type { ChatMessage } from './types.js'; export abstract class Participant { /** @internal */ @@ -54,8 +55,8 @@ export abstract class Participant { trackPublications = new Map(); constructor(owned_info: OwnedParticipant) { - this.info = owned_info.info; - this.ffi_handle = new FfiHandle(owned_info.handle.id); + this.info = owned_info.info!; + this.ffi_handle = new FfiHandle(owned_info.handle!.id); } get sid(): string { @@ -103,7 +104,7 @@ export class LocalParticipant extends Participant { trackPublications: Map = new Map(); async publishData(data: Uint8Array, options: DataPublishOptions) { - const req = new PublishDataRequest({ + const req = create(PublishDataRequestSchema, { localParticipantHandle: this.ffi_handle.handle, dataPtr: FfiClient.instance.retrievePtr(data), dataLen: BigInt(data.byteLength), @@ -126,7 +127,7 @@ export class LocalParticipant extends Participant { } async publishDtmf(code: number, digit: string) { - const req = new PublishSipDtmfRequest({ + const req = create(PublishSipDtmfRequestSchema, { localParticipantHandle: this.ffi_handle.handle, code, digit, @@ -146,19 +147,18 @@ export class LocalParticipant extends Participant { } async publishTranscription(transcription: Transcription) { - const req = new PublishTranscriptionRequest({ + const req = create(PublishTranscriptionRequestSchema, { localParticipantHandle: this.ffi_handle.handle, participantIdentity: transcription.participantIdentity, - segments: transcription.segments.map( - (s) => - new ProtoTranscriptionSegment({ - id: s.id, - text: s.text, - startTime: s.startTime, - endTime: s.endTime, - final: s.final, - language: s.language, - }), + segments: transcription.segments.map((s) => + create(TranscriptionSegmentSchema, { + id: s.id, + text: s.text, + startTime: s.startTime, + endTime: s.endTime, + final: s.final, + language: s.language, + }), ), trackId: transcription.trackSid, }); @@ -177,7 +177,7 @@ export class LocalParticipant extends Participant { } async updateMetadata(metadata: string) { - const req = new SetLocalMetadataRequest({ + const req = create(SetLocalMetadataRequestSchema, { localParticipantHandle: this.ffi_handle.handle, metadata: metadata, }); @@ -204,7 +204,7 @@ export class LocalParticipant extends Participant { destinationIdentities?: Array, senderIdentity?: string, ): Promise { - const req = new SendChatMessageRequest({ + const req = create(SendChatMessageRequestSchema, { localParticipantHandle: this.ffi_handle.handle, message: text, destinationIdentities, @@ -219,10 +219,10 @@ export class LocalParticipant extends Participant { return ev.message.case == 'chatMessage' && ev.message.value.asyncId == res.asyncId; }); - if (cb.error) { - throw new Error(cb.error); + if (cb.message.case !== 'chatMessage') { + throw new Error(cb.message.value ?? 'Unknown Error'); } - const { id, timestamp, editTimestamp, message } = cb.chatMessage!; + const { id, timestamp, editTimestamp, message } = cb.message.value; return { id, timestamp: Number(timestamp), editTimestamp: Number(editTimestamp), message }; } @@ -235,10 +235,10 @@ export class LocalParticipant extends Participant { destinationIdentities?: Array, senderIdentity?: string, ): Promise { - const req = new EditChatMessageRequest({ + const req = create(EditChatMessageRequestSchema, { localParticipantHandle: this.ffi_handle.handle, editText, - originalMessage: new ChatMessageModel({ + originalMessage: create(ChatMessageSchema, { ...originalMessage, timestamp: BigInt(originalMessage.timestamp), editTimestamp: originalMessage.editTimestamp @@ -257,15 +257,15 @@ export class LocalParticipant extends Participant { return ev.message.case == 'chatMessage' && ev.message.value.asyncId == res.asyncId; }); - if (cb.error) { - throw new Error(cb.error); + if (cb.message.case !== 'chatMessage') { + throw new Error(cb.message.value ?? 'Unknown Error'); } - const { id, timestamp, editTimestamp, message } = cb.chatMessage!; + const { id, timestamp, editTimestamp, message } = cb.message.value; return { id, timestamp: Number(timestamp), editTimestamp: Number(editTimestamp), message }; } async updateName(name: string) { - const req = new SetLocalNameRequest({ + const req = create(SetLocalNameRequestSchema, { localParticipantHandle: this.ffi_handle.handle, name: name, }); @@ -280,9 +280,11 @@ export class LocalParticipant extends Participant { } async setAttributes(attributes: Record) { - const req = new SetLocalAttributesRequest({ + const req = create(SetLocalAttributesRequestSchema, { localParticipantHandle: this.ffi_handle.handle, - attributes: attributes, + attributes: Array.from(Object.entries(attributes)).map(([key, value]) => { + return { key, value }; + }), }); const res = FfiClient.instance.request({ @@ -298,7 +300,7 @@ export class LocalParticipant extends Participant { track: LocalTrack, options: TrackPublishOptions, ): Promise { - const req = new PublishTrackRequest({ + const req = create(PublishTrackRequestSchema, { localParticipantHandle: this.ffi_handle.handle, trackHandle: track.ffi_handle.handle, options: options, @@ -312,11 +314,11 @@ export class LocalParticipant extends Participant { return ev.message.case == 'publishTrack' && ev.message.value.asyncId == res.asyncId; }); - if (cb.error) { - throw new Error(cb.error); + if (cb.message.case !== 'publication') { + throw new Error(cb.message.value ?? 'Unknown Error'); } - const track_publication = new LocalTrackPublication(cb.publication!); + const track_publication = new LocalTrackPublication(cb.message.value!); track_publication.track = track; this.trackPublications.set(track_publication.sid, track_publication); @@ -324,7 +326,7 @@ export class LocalParticipant extends Participant { } async unpublishTrack(trackSid: string) { - const req = new UnpublishTrackRequest({ + const req = create(UnpublishTrackRequestSchema, { localParticipantHandle: this.ffi_handle.handle, trackSid: trackSid, }); diff --git a/packages/livekit-rtc/src/proto/audio_frame_pb.ts b/packages/livekit-rtc/src/proto/audio_frame_pb.ts index c6e0dba5..47000174 100644 --- a/packages/livekit-rtc/src/proto/audio_frame_pb.ts +++ b/packages/livekit-rtc/src/proto/audio_frame_pb.ts @@ -12,165 +12,23 @@ // 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" -// @generated from file audio_frame.proto (package livekit.proto, syntax proto3) +// @generated by protoc-gen-es v2.2.0 with parameter "target=ts" +// @generated from file audio_frame.proto (package livekit.proto, syntax proto2) /* eslint-disable */ -// @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; -import { TrackSource } from "./track_pb.js"; -import { FfiOwnedHandle } from "./handle_pb.js"; +import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { FfiOwnedHandle } from "./handle_pb"; +import { file_handle } from "./handle_pb"; +import type { TrackSource } from "./track_pb"; +import { file_track } from "./track_pb"; +import type { Message } from "@bufbuild/protobuf"; /** - * @generated from enum livekit.proto.SoxResamplerDataType + * Describes the file audio_frame.proto. */ -export enum SoxResamplerDataType { - /** - * TODO(theomonnom): support other datatypes (shouldn't really be needed) - * - * @generated from enum value: SOXR_DATATYPE_INT16I = 0; - */ - SOXR_DATATYPE_INT16I = 0, - - /** - * @generated from enum value: SOXR_DATATYPE_INT16S = 1; - */ - SOXR_DATATYPE_INT16S = 1, -} -// Retrieve enum metadata with: proto3.getEnumType(SoxResamplerDataType) -proto3.util.setEnumType(SoxResamplerDataType, "livekit.proto.SoxResamplerDataType", [ - { no: 0, name: "SOXR_DATATYPE_INT16I" }, - { no: 1, name: "SOXR_DATATYPE_INT16S" }, -]); - -/** - * @generated from enum livekit.proto.SoxQualityRecipe - */ -export enum SoxQualityRecipe { - /** - * @generated from enum value: SOXR_QUALITY_QUICK = 0; - */ - SOXR_QUALITY_QUICK = 0, - - /** - * @generated from enum value: SOXR_QUALITY_LOW = 1; - */ - SOXR_QUALITY_LOW = 1, - - /** - * @generated from enum value: SOXR_QUALITY_MEDIUM = 2; - */ - SOXR_QUALITY_MEDIUM = 2, - - /** - * @generated from enum value: SOXR_QUALITY_HIGH = 3; - */ - SOXR_QUALITY_HIGH = 3, - - /** - * @generated from enum value: SOXR_QUALITY_VERYHIGH = 4; - */ - SOXR_QUALITY_VERYHIGH = 4, -} -// Retrieve enum metadata with: proto3.getEnumType(SoxQualityRecipe) -proto3.util.setEnumType(SoxQualityRecipe, "livekit.proto.SoxQualityRecipe", [ - { no: 0, name: "SOXR_QUALITY_QUICK" }, - { no: 1, name: "SOXR_QUALITY_LOW" }, - { no: 2, name: "SOXR_QUALITY_MEDIUM" }, - { no: 3, name: "SOXR_QUALITY_HIGH" }, - { no: 4, name: "SOXR_QUALITY_VERYHIGH" }, -]); - -/** - * @generated from enum livekit.proto.SoxFlagBits - */ -export enum SoxFlagBits { - /** - * 1 << 0 - * - * @generated from enum value: SOXR_ROLLOFF_SMALL = 0; - */ - SOXR_ROLLOFF_SMALL = 0, - - /** - * 1 << 1 - * - * @generated from enum value: SOXR_ROLLOFF_MEDIUM = 1; - */ - SOXR_ROLLOFF_MEDIUM = 1, - - /** - * 1 << 2 - * - * @generated from enum value: SOXR_ROLLOFF_NONE = 2; - */ - SOXR_ROLLOFF_NONE = 2, - - /** - * 1 << 3 - * - * @generated from enum value: SOXR_HIGH_PREC_CLOCK = 3; - */ - SOXR_HIGH_PREC_CLOCK = 3, - - /** - * 1 << 4 - * - * @generated from enum value: SOXR_DOUBLE_PRECISION = 4; - */ - SOXR_DOUBLE_PRECISION = 4, - - /** - * 1 << 5 - * - * @generated from enum value: SOXR_VR = 5; - */ - SOXR_VR = 5, -} -// Retrieve enum metadata with: proto3.getEnumType(SoxFlagBits) -proto3.util.setEnumType(SoxFlagBits, "livekit.proto.SoxFlagBits", [ - { no: 0, name: "SOXR_ROLLOFF_SMALL" }, - { no: 1, name: "SOXR_ROLLOFF_MEDIUM" }, - { no: 2, name: "SOXR_ROLLOFF_NONE" }, - { no: 3, name: "SOXR_HIGH_PREC_CLOCK" }, - { no: 4, name: "SOXR_DOUBLE_PRECISION" }, - { no: 5, name: "SOXR_VR" }, -]); - -/** - * @generated from enum livekit.proto.AudioStreamType - */ -export enum AudioStreamType { - /** - * @generated from enum value: AUDIO_STREAM_NATIVE = 0; - */ - AUDIO_STREAM_NATIVE = 0, - - /** - * @generated from enum value: AUDIO_STREAM_HTML = 1; - */ - AUDIO_STREAM_HTML = 1, -} -// Retrieve enum metadata with: proto3.getEnumType(AudioStreamType) -proto3.util.setEnumType(AudioStreamType, "livekit.proto.AudioStreamType", [ - { no: 0, name: "AUDIO_STREAM_NATIVE" }, - { no: 1, name: "AUDIO_STREAM_HTML" }, -]); - -/** - * @generated from enum livekit.proto.AudioSourceType - */ -export enum AudioSourceType { - /** - * @generated from enum value: AUDIO_SOURCE_NATIVE = 0; - */ - AUDIO_SOURCE_NATIVE = 0, -} -// Retrieve enum metadata with: proto3.getEnumType(AudioSourceType) -proto3.util.setEnumType(AudioSourceType, "livekit.proto.AudioSourceType", [ - { no: 0, name: "AUDIO_SOURCE_NATIVE" }, -]); +export const file_audio_frame: GenFile = /*@__PURE__*/ + fileDesc("ChFhdWRpb19mcmFtZS5wcm90bxINbGl2ZWtpdC5wcm90byKGAQoVTmV3QXVkaW9TdHJlYW1SZXF1ZXN0EhQKDHRyYWNrX2hhbmRsZRgBIAIoBBIsCgR0eXBlGAIgAigOMh4ubGl2ZWtpdC5wcm90by5BdWRpb1N0cmVhbVR5cGUSEwoLc2FtcGxlX3JhdGUYAyACKA0SFAoMbnVtX2NoYW5uZWxzGAQgAigNIkkKFk5ld0F1ZGlvU3RyZWFtUmVzcG9uc2USLwoGc3RyZWFtGAEgAigLMh8ubGl2ZWtpdC5wcm90by5Pd25lZEF1ZGlvU3RyZWFtIsoBCiFBdWRpb1N0cmVhbUZyb21QYXJ0aWNpcGFudFJlcXVlc3QSGgoScGFydGljaXBhbnRfaGFuZGxlGAEgAigEEiwKBHR5cGUYAiACKA4yHi5saXZla2l0LnByb3RvLkF1ZGlvU3RyZWFtVHlwZRIwCgx0cmFja19zb3VyY2UYAyABKA4yGi5saXZla2l0LnByb3RvLlRyYWNrU291cmNlEhMKC3NhbXBsZV9yYXRlGAUgAigNEhQKDG51bV9jaGFubmVscxgGIAIoDSJVCiJBdWRpb1N0cmVhbUZyb21QYXJ0aWNpcGFudFJlc3BvbnNlEi8KBnN0cmVhbRgBIAIoCzIfLmxpdmVraXQucHJvdG8uT3duZWRBdWRpb1N0cmVhbSK7AQoVTmV3QXVkaW9Tb3VyY2VSZXF1ZXN0EiwKBHR5cGUYASACKA4yHi5saXZla2l0LnByb3RvLkF1ZGlvU291cmNlVHlwZRIyCgdvcHRpb25zGAIgASgLMiEubGl2ZWtpdC5wcm90by5BdWRpb1NvdXJjZU9wdGlvbnMSEwoLc2FtcGxlX3JhdGUYAyACKA0SFAoMbnVtX2NoYW5uZWxzGAQgAigNEhUKDXF1ZXVlX3NpemVfbXMY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QoGaGFuZGxlGAEgAigLMh0ubGl2ZWtpdC5wcm90by5GZmlPd25lZEhhbmRsZRIvCgRpbmZvGAIgAigLMiEubGl2ZWtpdC5wcm90by5BdWRpb1Jlc2FtcGxlckluZm8iEgoQU294UmVzYW1wbGVySW5mbyJxChFPd25lZFNveFJlc2FtcGxlchItCgZoYW5kbGUYASACKAsyHS5saXZla2l0LnByb3RvLkZmaU93bmVkSGFuZGxlEi0KBGluZm8YAiACKAsyHy5saXZla2l0LnByb3RvLlNveFJlc2FtcGxlckluZm8qSgoUU294UmVzYW1wbGVyRGF0YVR5cGUSGAoUU09YUl9EQVRBVFlQRV9JTlQxNkkQABIYChRTT1hSX0RBVEFUWVBFX0lOVDE2UxABKosBChBTb3hRdWFsaXR5UmVjaXBlEhYKElNPWFJfUVVBTElUWV9RVUlDSxAAEhQKEFNPWFJfUVVBTElUWV9MT1cQARIXChNTT1hSX1FVQUxJVFlfTUVESVVNEAISFQoRU09YUl9RVUFMSVRZX0hJR0gQAxIZChVTT1hSX1FVQUxJVFlfVkVSWUhJR0gQBCqXAQoLU294RmxhZ0JpdHMSFgoSU09YUl9ST0xMT0ZGX1NNQUxMEAASFwoTU09YUl9ST0xMT0ZGX01FRElVTRABEhUKEVNPWFJfUk9MTE9GRl9OT05FEAISGAoUU09YUl9ISUdIX1BSRUNfQ0xPQ0sQAxIZChVTT1hSX0RPVUJMRV9QUkVDSVNJT04QBBILCgdTT1hSX1ZSEAUqQQoPQXVkaW9TdHJlYW1UeXBlEhcKE0FVRElPX1NUUkVBTV9OQVRJVkUQABIVChFBVURJT19TVFJFQU1fSFRNTBABKioKD0F1ZGlvU291cmNlVHlwZRIXChNBVURJT19TT1VSQ0VfTkFUSVZFEABCEKoCDUxpdmVLaXQuUHJvdG8", [file_handle, file_track]); /** * Create a new AudioStream @@ -178,203 +36,116 @@ proto3.util.setEnumType(AudioSourceType, "livekit.proto.AudioSourceType", [ * * @generated from message livekit.proto.NewAudioStreamRequest */ -export class NewAudioStreamRequest extends Message { +export type NewAudioStreamRequest = Message<"livekit.proto.NewAudioStreamRequest"> & { /** - * @generated from field: uint64 track_handle = 1; + * @generated from field: required uint64 track_handle = 1; */ - trackHandle = protoInt64.zero; + trackHandle: bigint; /** - * @generated from field: livekit.proto.AudioStreamType type = 2; + * @generated from field: required livekit.proto.AudioStreamType type = 2; */ - type = AudioStreamType.AUDIO_STREAM_NATIVE; + type: AudioStreamType; /** - * @generated from field: uint32 sample_rate = 3; + * @generated from field: required uint32 sample_rate = 3; */ - sampleRate = 0; + sampleRate: number; /** - * @generated from field: uint32 num_channels = 4; + * @generated from field: required uint32 num_channels = 4; */ - numChannels = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.NewAudioStreamRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "type", kind: "enum", T: proto3.getEnumType(AudioStreamType) }, - { no: 3, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 4, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NewAudioStreamRequest { - return new NewAudioStreamRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NewAudioStreamRequest { - return new NewAudioStreamRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): NewAudioStreamRequest { - return new NewAudioStreamRequest().fromJsonString(jsonString, options); - } + numChannels: number; +}; - static equals(a: NewAudioStreamRequest | PlainMessage | undefined, b: NewAudioStreamRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(NewAudioStreamRequest, a, b); - } -} +/** + * Describes the message livekit.proto.NewAudioStreamRequest. + * Use `create(NewAudioStreamRequestSchema)` to create a new message. + */ +export const NewAudioStreamRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 0); /** * @generated from message livekit.proto.NewAudioStreamResponse */ -export class NewAudioStreamResponse extends Message { +export type NewAudioStreamResponse = Message<"livekit.proto.NewAudioStreamResponse"> & { /** - * @generated from field: livekit.proto.OwnedAudioStream stream = 1; + * @generated from field: required livekit.proto.OwnedAudioStream stream = 1; */ stream?: OwnedAudioStream; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.NewAudioStreamResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "stream", kind: "message", T: OwnedAudioStream }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NewAudioStreamResponse { - return new NewAudioStreamResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NewAudioStreamResponse { - return new NewAudioStreamResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): NewAudioStreamResponse { - return new NewAudioStreamResponse().fromJsonString(jsonString, options); - } - - static equals(a: NewAudioStreamResponse | PlainMessage | undefined, b: NewAudioStreamResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(NewAudioStreamResponse, a, b); - } -} +/** + * Describes the message livekit.proto.NewAudioStreamResponse. + * Use `create(NewAudioStreamResponseSchema)` to create a new message. + */ +export const NewAudioStreamResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 1); /** * @generated from message livekit.proto.AudioStreamFromParticipantRequest */ -export class AudioStreamFromParticipantRequest extends Message { +export type AudioStreamFromParticipantRequest = Message<"livekit.proto.AudioStreamFromParticipantRequest"> & { /** - * @generated from field: uint64 participant_handle = 1; + * @generated from field: required uint64 participant_handle = 1; */ - participantHandle = protoInt64.zero; + participantHandle: bigint; /** - * @generated from field: livekit.proto.AudioStreamType type = 2; + * @generated from field: required livekit.proto.AudioStreamType type = 2; */ - type = AudioStreamType.AUDIO_STREAM_NATIVE; + type: AudioStreamType; /** * @generated from field: optional livekit.proto.TrackSource track_source = 3; */ - trackSource?: TrackSource; + trackSource: TrackSource; /** - * @generated from field: uint32 sample_rate = 5; + * @generated from field: required uint32 sample_rate = 5; */ - sampleRate = 0; + sampleRate: number; /** - * @generated from field: uint32 num_channels = 6; + * @generated from field: required uint32 num_channels = 6; */ - numChannels = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.AudioStreamFromParticipantRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "type", kind: "enum", T: proto3.getEnumType(AudioStreamType) }, - { no: 3, name: "track_source", kind: "enum", T: proto3.getEnumType(TrackSource), opt: true }, - { no: 5, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 6, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AudioStreamFromParticipantRequest { - return new AudioStreamFromParticipantRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AudioStreamFromParticipantRequest { - return new AudioStreamFromParticipantRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AudioStreamFromParticipantRequest { - return new AudioStreamFromParticipantRequest().fromJsonString(jsonString, options); - } + numChannels: number; +}; - static equals(a: AudioStreamFromParticipantRequest | PlainMessage | undefined, b: AudioStreamFromParticipantRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(AudioStreamFromParticipantRequest, a, b); - } -} +/** + * Describes the message livekit.proto.AudioStreamFromParticipantRequest. + * Use `create(AudioStreamFromParticipantRequestSchema)` to create a new message. + */ +export const AudioStreamFromParticipantRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 2); /** * @generated from message livekit.proto.AudioStreamFromParticipantResponse */ -export class AudioStreamFromParticipantResponse extends Message { +export type AudioStreamFromParticipantResponse = Message<"livekit.proto.AudioStreamFromParticipantResponse"> & { /** - * @generated from field: livekit.proto.OwnedAudioStream stream = 1; + * @generated from field: required livekit.proto.OwnedAudioStream stream = 1; */ stream?: OwnedAudioStream; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.AudioStreamFromParticipantResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "stream", kind: "message", T: OwnedAudioStream }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AudioStreamFromParticipantResponse { - return new AudioStreamFromParticipantResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AudioStreamFromParticipantResponse { - return new AudioStreamFromParticipantResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AudioStreamFromParticipantResponse { - return new AudioStreamFromParticipantResponse().fromJsonString(jsonString, options); - } - - static equals(a: AudioStreamFromParticipantResponse | PlainMessage | undefined, b: AudioStreamFromParticipantResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(AudioStreamFromParticipantResponse, a, b); - } -} +/** + * Describes the message livekit.proto.AudioStreamFromParticipantResponse. + * Use `create(AudioStreamFromParticipantResponseSchema)` to create a new message. + */ +export const AudioStreamFromParticipantResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 3); /** * Create a new AudioSource * * @generated from message livekit.proto.NewAudioSourceRequest */ -export class NewAudioSourceRequest extends Message { +export type NewAudioSourceRequest = Message<"livekit.proto.NewAudioSourceRequest"> & { /** - * @generated from field: livekit.proto.AudioSourceType type = 1; + * @generated from field: required livekit.proto.AudioSourceType type = 1; */ - type = AudioSourceType.AUDIO_SOURCE_NATIVE; + type: AudioSourceType; /** * @generated from field: optional livekit.proto.AudioSourceOptions options = 2; @@ -382,88 +153,44 @@ export class NewAudioSourceRequest extends Message { options?: AudioSourceOptions; /** - * @generated from field: uint32 sample_rate = 3; + * @generated from field: required uint32 sample_rate = 3; */ - sampleRate = 0; + sampleRate: number; /** - * @generated from field: uint32 num_channels = 4; + * @generated from field: required uint32 num_channels = 4; */ - numChannels = 0; + numChannels: number; /** - * @generated from field: uint32 queue_size_ms = 5; + * @generated from field: required uint32 queue_size_ms = 5; */ - queueSizeMs = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.NewAudioSourceRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(AudioSourceType) }, - { no: 2, name: "options", kind: "message", T: AudioSourceOptions, opt: true }, - { no: 3, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 4, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 5, name: "queue_size_ms", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NewAudioSourceRequest { - return new NewAudioSourceRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NewAudioSourceRequest { - return new NewAudioSourceRequest().fromJson(jsonValue, options); - } + queueSizeMs: number; +}; - static fromJsonString(jsonString: string, options?: Partial): NewAudioSourceRequest { - return new NewAudioSourceRequest().fromJsonString(jsonString, options); - } - - static equals(a: NewAudioSourceRequest | PlainMessage | undefined, b: NewAudioSourceRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(NewAudioSourceRequest, a, b); - } -} +/** + * Describes the message livekit.proto.NewAudioSourceRequest. + * Use `create(NewAudioSourceRequestSchema)` to create a new message. + */ +export const NewAudioSourceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 4); /** * @generated from message livekit.proto.NewAudioSourceResponse */ -export class NewAudioSourceResponse extends Message { +export type NewAudioSourceResponse = Message<"livekit.proto.NewAudioSourceResponse"> & { /** - * @generated from field: livekit.proto.OwnedAudioSource source = 1; + * @generated from field: required livekit.proto.OwnedAudioSource source = 1; */ source?: OwnedAudioSource; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.NewAudioSourceResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "source", kind: "message", T: OwnedAudioSource }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NewAudioSourceResponse { - return new NewAudioSourceResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NewAudioSourceResponse { - return new NewAudioSourceResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): NewAudioSourceResponse { - return new NewAudioSourceResponse().fromJsonString(jsonString, options); - } - - static equals(a: NewAudioSourceResponse | PlainMessage | undefined, b: NewAudioSourceResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(NewAudioSourceResponse, a, b); - } -} +/** + * Describes the message livekit.proto.NewAudioSourceResponse. + * Use `create(NewAudioSourceResponseSchema)` to create a new message. + */ +export const NewAudioSourceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 5); /** * Push a frame to an AudioSource @@ -471,858 +198,466 @@ export class NewAudioSourceResponse extends Message { * * @generated from message livekit.proto.CaptureAudioFrameRequest */ -export class CaptureAudioFrameRequest extends Message { +export type CaptureAudioFrameRequest = Message<"livekit.proto.CaptureAudioFrameRequest"> & { /** - * @generated from field: uint64 source_handle = 1; + * @generated from field: required uint64 source_handle = 1; */ - sourceHandle = protoInt64.zero; + sourceHandle: bigint; /** - * @generated from field: livekit.proto.AudioFrameBufferInfo buffer = 2; + * @generated from field: required livekit.proto.AudioFrameBufferInfo buffer = 2; */ buffer?: AudioFrameBufferInfo; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.CaptureAudioFrameRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "source_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "buffer", kind: "message", T: AudioFrameBufferInfo }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CaptureAudioFrameRequest { - return new CaptureAudioFrameRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CaptureAudioFrameRequest { - return new CaptureAudioFrameRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CaptureAudioFrameRequest { - return new CaptureAudioFrameRequest().fromJsonString(jsonString, options); - } - - static equals(a: CaptureAudioFrameRequest | PlainMessage | undefined, b: CaptureAudioFrameRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CaptureAudioFrameRequest, a, b); - } -} +/** + * Describes the message livekit.proto.CaptureAudioFrameRequest. + * Use `create(CaptureAudioFrameRequestSchema)` to create a new message. + */ +export const CaptureAudioFrameRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 6); /** * @generated from message livekit.proto.CaptureAudioFrameResponse */ -export class CaptureAudioFrameResponse extends Message { +export type CaptureAudioFrameResponse = Message<"livekit.proto.CaptureAudioFrameResponse"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; + asyncId: bigint; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.CaptureAudioFrameResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CaptureAudioFrameResponse { - return new CaptureAudioFrameResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CaptureAudioFrameResponse { - return new CaptureAudioFrameResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CaptureAudioFrameResponse { - return new CaptureAudioFrameResponse().fromJsonString(jsonString, options); - } - - static equals(a: CaptureAudioFrameResponse | PlainMessage | undefined, b: CaptureAudioFrameResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CaptureAudioFrameResponse, a, b); - } -} +/** + * Describes the message livekit.proto.CaptureAudioFrameResponse. + * Use `create(CaptureAudioFrameResponseSchema)` to create a new message. + */ +export const CaptureAudioFrameResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 7); /** * @generated from message livekit.proto.CaptureAudioFrameCallback */ -export class CaptureAudioFrameCallback extends Message { +export type CaptureAudioFrameCallback = Message<"livekit.proto.CaptureAudioFrameCallback"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; + asyncId: bigint; /** * @generated from field: optional string error = 2; */ - error?: string; + error: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.CaptureAudioFrameCallback"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CaptureAudioFrameCallback { - return new CaptureAudioFrameCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CaptureAudioFrameCallback { - return new CaptureAudioFrameCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CaptureAudioFrameCallback { - return new CaptureAudioFrameCallback().fromJsonString(jsonString, options); - } - - static equals(a: CaptureAudioFrameCallback | PlainMessage | undefined, b: CaptureAudioFrameCallback | PlainMessage | undefined): boolean { - return proto3.util.equals(CaptureAudioFrameCallback, a, b); - } -} +/** + * Describes the message livekit.proto.CaptureAudioFrameCallback. + * Use `create(CaptureAudioFrameCallbackSchema)` to create a new message. + */ +export const CaptureAudioFrameCallbackSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 8); /** * @generated from message livekit.proto.ClearAudioBufferRequest */ -export class ClearAudioBufferRequest extends Message { +export type ClearAudioBufferRequest = Message<"livekit.proto.ClearAudioBufferRequest"> & { /** - * @generated from field: uint64 source_handle = 1; + * @generated from field: required uint64 source_handle = 1; */ - sourceHandle = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.ClearAudioBufferRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "source_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ClearAudioBufferRequest { - return new ClearAudioBufferRequest().fromBinary(bytes, options); - } + sourceHandle: bigint; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): ClearAudioBufferRequest { - return new ClearAudioBufferRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ClearAudioBufferRequest { - return new ClearAudioBufferRequest().fromJsonString(jsonString, options); - } - - static equals(a: ClearAudioBufferRequest | PlainMessage | undefined, b: ClearAudioBufferRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(ClearAudioBufferRequest, a, b); - } -} +/** + * Describes the message livekit.proto.ClearAudioBufferRequest. + * Use `create(ClearAudioBufferRequestSchema)` to create a new message. + */ +export const ClearAudioBufferRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 9); /** * @generated from message livekit.proto.ClearAudioBufferResponse */ -export class ClearAudioBufferResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.ClearAudioBufferResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ClearAudioBufferResponse { - return new ClearAudioBufferResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ClearAudioBufferResponse { - return new ClearAudioBufferResponse().fromJson(jsonValue, options); - } +export type ClearAudioBufferResponse = Message<"livekit.proto.ClearAudioBufferResponse"> & { +}; - static fromJsonString(jsonString: string, options?: Partial): ClearAudioBufferResponse { - return new ClearAudioBufferResponse().fromJsonString(jsonString, options); - } - - static equals(a: ClearAudioBufferResponse | PlainMessage | undefined, b: ClearAudioBufferResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(ClearAudioBufferResponse, a, b); - } -} +/** + * Describes the message livekit.proto.ClearAudioBufferResponse. + * Use `create(ClearAudioBufferResponseSchema)` to create a new message. + */ +export const ClearAudioBufferResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 10); /** * Create a new AudioResampler * * @generated from message livekit.proto.NewAudioResamplerRequest */ -export class NewAudioResamplerRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.NewAudioResamplerRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NewAudioResamplerRequest { - return new NewAudioResamplerRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NewAudioResamplerRequest { - return new NewAudioResamplerRequest().fromJson(jsonValue, options); - } +export type NewAudioResamplerRequest = Message<"livekit.proto.NewAudioResamplerRequest"> & { +}; - static fromJsonString(jsonString: string, options?: Partial): NewAudioResamplerRequest { - return new NewAudioResamplerRequest().fromJsonString(jsonString, options); - } - - static equals(a: NewAudioResamplerRequest | PlainMessage | undefined, b: NewAudioResamplerRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(NewAudioResamplerRequest, a, b); - } -} +/** + * Describes the message livekit.proto.NewAudioResamplerRequest. + * Use `create(NewAudioResamplerRequestSchema)` to create a new message. + */ +export const NewAudioResamplerRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 11); /** * @generated from message livekit.proto.NewAudioResamplerResponse */ -export class NewAudioResamplerResponse extends Message { +export type NewAudioResamplerResponse = Message<"livekit.proto.NewAudioResamplerResponse"> & { /** - * @generated from field: livekit.proto.OwnedAudioResampler resampler = 1; + * @generated from field: required livekit.proto.OwnedAudioResampler resampler = 1; */ resampler?: OwnedAudioResampler; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.NewAudioResamplerResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "resampler", kind: "message", T: OwnedAudioResampler }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NewAudioResamplerResponse { - return new NewAudioResamplerResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NewAudioResamplerResponse { - return new NewAudioResamplerResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): NewAudioResamplerResponse { - return new NewAudioResamplerResponse().fromJsonString(jsonString, options); - } - - static equals(a: NewAudioResamplerResponse | PlainMessage | undefined, b: NewAudioResamplerResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(NewAudioResamplerResponse, a, b); - } -} +/** + * Describes the message livekit.proto.NewAudioResamplerResponse. + * Use `create(NewAudioResamplerResponseSchema)` to create a new message. + */ +export const NewAudioResamplerResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 12); /** * Remix and resample an audio frame * * @generated from message livekit.proto.RemixAndResampleRequest */ -export class RemixAndResampleRequest extends Message { +export type RemixAndResampleRequest = Message<"livekit.proto.RemixAndResampleRequest"> & { /** - * @generated from field: uint64 resampler_handle = 1; + * @generated from field: required uint64 resampler_handle = 1; */ - resamplerHandle = protoInt64.zero; + resamplerHandle: bigint; /** - * @generated from field: livekit.proto.AudioFrameBufferInfo buffer = 2; + * @generated from field: required livekit.proto.AudioFrameBufferInfo buffer = 2; */ buffer?: AudioFrameBufferInfo; /** - * @generated from field: uint32 num_channels = 3; + * @generated from field: required uint32 num_channels = 3; */ - numChannels = 0; + numChannels: number; /** - * @generated from field: uint32 sample_rate = 4; + * @generated from field: required uint32 sample_rate = 4; */ - sampleRate = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RemixAndResampleRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "resampler_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "buffer", kind: "message", T: AudioFrameBufferInfo }, - { no: 3, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 4, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RemixAndResampleRequest { - return new RemixAndResampleRequest().fromBinary(bytes, options); - } + sampleRate: number; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): RemixAndResampleRequest { - return new RemixAndResampleRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RemixAndResampleRequest { - return new RemixAndResampleRequest().fromJsonString(jsonString, options); - } - - static equals(a: RemixAndResampleRequest | PlainMessage | undefined, b: RemixAndResampleRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(RemixAndResampleRequest, a, b); - } -} +/** + * Describes the message livekit.proto.RemixAndResampleRequest. + * Use `create(RemixAndResampleRequestSchema)` to create a new message. + */ +export const RemixAndResampleRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 13); /** * @generated from message livekit.proto.RemixAndResampleResponse */ -export class RemixAndResampleResponse extends Message { +export type RemixAndResampleResponse = Message<"livekit.proto.RemixAndResampleResponse"> & { /** - * @generated from field: livekit.proto.OwnedAudioFrameBuffer buffer = 1; + * @generated from field: required livekit.proto.OwnedAudioFrameBuffer buffer = 1; */ buffer?: OwnedAudioFrameBuffer; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RemixAndResampleResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "buffer", kind: "message", T: OwnedAudioFrameBuffer }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RemixAndResampleResponse { - return new RemixAndResampleResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RemixAndResampleResponse { - return new RemixAndResampleResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RemixAndResampleResponse { - return new RemixAndResampleResponse().fromJsonString(jsonString, options); - } - - static equals(a: RemixAndResampleResponse | PlainMessage | undefined, b: RemixAndResampleResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(RemixAndResampleResponse, a, b); - } -} +/** + * Describes the message livekit.proto.RemixAndResampleResponse. + * Use `create(RemixAndResampleResponseSchema)` to create a new message. + */ +export const RemixAndResampleResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 14); /** * @generated from message livekit.proto.NewSoxResamplerRequest */ -export class NewSoxResamplerRequest extends Message { +export type NewSoxResamplerRequest = Message<"livekit.proto.NewSoxResamplerRequest"> & { /** - * @generated from field: double input_rate = 1; + * @generated from field: required double input_rate = 1; */ - inputRate = 0; + inputRate: number; /** - * @generated from field: double output_rate = 2; + * @generated from field: required double output_rate = 2; */ - outputRate = 0; + outputRate: number; /** - * @generated from field: uint32 num_channels = 3; + * @generated from field: required uint32 num_channels = 3; */ - numChannels = 0; + numChannels: number; /** - * @generated from field: livekit.proto.SoxResamplerDataType input_data_type = 4; + * @generated from field: required livekit.proto.SoxResamplerDataType input_data_type = 4; */ - inputDataType = SoxResamplerDataType.SOXR_DATATYPE_INT16I; + inputDataType: SoxResamplerDataType; /** - * @generated from field: livekit.proto.SoxResamplerDataType output_data_type = 5; + * @generated from field: required livekit.proto.SoxResamplerDataType output_data_type = 5; */ - outputDataType = SoxResamplerDataType.SOXR_DATATYPE_INT16I; + outputDataType: SoxResamplerDataType; /** - * @generated from field: livekit.proto.SoxQualityRecipe quality_recipe = 6; + * @generated from field: required livekit.proto.SoxQualityRecipe quality_recipe = 6; */ - qualityRecipe = SoxQualityRecipe.SOXR_QUALITY_QUICK; + qualityRecipe: SoxQualityRecipe; /** - * @generated from field: uint32 flags = 7; + * @generated from field: required uint32 flags = 7; */ - flags = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.NewSoxResamplerRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "input_rate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 2, name: "output_rate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 3, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 4, name: "input_data_type", kind: "enum", T: proto3.getEnumType(SoxResamplerDataType) }, - { no: 5, name: "output_data_type", kind: "enum", T: proto3.getEnumType(SoxResamplerDataType) }, - { no: 6, name: "quality_recipe", kind: "enum", T: proto3.getEnumType(SoxQualityRecipe) }, - { no: 7, name: "flags", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); + flags: number; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): NewSoxResamplerRequest { - return new NewSoxResamplerRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NewSoxResamplerRequest { - return new NewSoxResamplerRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): NewSoxResamplerRequest { - return new NewSoxResamplerRequest().fromJsonString(jsonString, options); - } - - static equals(a: NewSoxResamplerRequest | PlainMessage | undefined, b: NewSoxResamplerRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(NewSoxResamplerRequest, a, b); - } -} +/** + * Describes the message livekit.proto.NewSoxResamplerRequest. + * Use `create(NewSoxResamplerRequestSchema)` to create a new message. + */ +export const NewSoxResamplerRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 15); /** * @generated from message livekit.proto.NewSoxResamplerResponse */ -export class NewSoxResamplerResponse extends Message { +export type NewSoxResamplerResponse = Message<"livekit.proto.NewSoxResamplerResponse"> & { /** - * @generated from field: livekit.proto.OwnedSoxResampler resampler = 1; + * @generated from oneof livekit.proto.NewSoxResamplerResponse.message */ - resampler?: OwnedSoxResampler; - - /** - * @generated from field: optional string error = 2; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.NewSoxResamplerResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "resampler", kind: "message", T: OwnedSoxResampler }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NewSoxResamplerResponse { - return new NewSoxResamplerResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NewSoxResamplerResponse { - return new NewSoxResamplerResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): NewSoxResamplerResponse { - return new NewSoxResamplerResponse().fromJsonString(jsonString, options); - } + message: { + /** + * @generated from field: livekit.proto.OwnedSoxResampler resampler = 1; + */ + value: OwnedSoxResampler; + case: "resampler"; + } | { + /** + * @generated from field: string error = 2; + */ + value: string; + case: "error"; + } | { case: undefined; value?: undefined }; +}; - static equals(a: NewSoxResamplerResponse | PlainMessage | undefined, b: NewSoxResamplerResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(NewSoxResamplerResponse, a, b); - } -} +/** + * Describes the message livekit.proto.NewSoxResamplerResponse. + * Use `create(NewSoxResamplerResponseSchema)` to create a new message. + */ +export const NewSoxResamplerResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 16); /** * @generated from message livekit.proto.PushSoxResamplerRequest */ -export class PushSoxResamplerRequest extends Message { +export type PushSoxResamplerRequest = Message<"livekit.proto.PushSoxResamplerRequest"> & { /** - * @generated from field: uint64 resampler_handle = 1; + * @generated from field: required uint64 resampler_handle = 1; */ - resamplerHandle = protoInt64.zero; + resamplerHandle: bigint; /** * *const i16 * - * @generated from field: uint64 data_ptr = 2; + * @generated from field: required uint64 data_ptr = 2; */ - dataPtr = protoInt64.zero; + dataPtr: bigint; /** * in bytes * - * @generated from field: uint32 size = 3; - */ - size = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.PushSoxResamplerRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "resampler_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "data_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 3, name: "size", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PushSoxResamplerRequest { - return new PushSoxResamplerRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PushSoxResamplerRequest { - return new PushSoxResamplerRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PushSoxResamplerRequest { - return new PushSoxResamplerRequest().fromJsonString(jsonString, options); - } - - static equals(a: PushSoxResamplerRequest | PlainMessage | undefined, b: PushSoxResamplerRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(PushSoxResamplerRequest, a, b); - } -} + * @generated from field: required uint32 size = 3; + */ + size: number; +}; + +/** + * Describes the message livekit.proto.PushSoxResamplerRequest. + * Use `create(PushSoxResamplerRequestSchema)` to create a new message. + */ +export const PushSoxResamplerRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 17); /** * @generated from message livekit.proto.PushSoxResamplerResponse */ -export class PushSoxResamplerResponse extends Message { +export type PushSoxResamplerResponse = Message<"livekit.proto.PushSoxResamplerResponse"> & { /** * *const i16 (could be null) * - * @generated from field: uint64 output_ptr = 1; + * @generated from field: required uint64 output_ptr = 1; */ - outputPtr = protoInt64.zero; + outputPtr: bigint; /** * in bytes * - * @generated from field: uint32 size = 2; + * @generated from field: required uint32 size = 2; */ - size = 0; + size: number; /** * @generated from field: optional string error = 3; */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.PushSoxResamplerResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "output_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "size", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 3, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); + error: string; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): PushSoxResamplerResponse { - return new PushSoxResamplerResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PushSoxResamplerResponse { - return new PushSoxResamplerResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PushSoxResamplerResponse { - return new PushSoxResamplerResponse().fromJsonString(jsonString, options); - } - - static equals(a: PushSoxResamplerResponse | PlainMessage | undefined, b: PushSoxResamplerResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(PushSoxResamplerResponse, a, b); - } -} +/** + * Describes the message livekit.proto.PushSoxResamplerResponse. + * Use `create(PushSoxResamplerResponseSchema)` to create a new message. + */ +export const PushSoxResamplerResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 18); /** * @generated from message livekit.proto.FlushSoxResamplerRequest */ -export class FlushSoxResamplerRequest extends Message { +export type FlushSoxResamplerRequest = Message<"livekit.proto.FlushSoxResamplerRequest"> & { /** - * @generated from field: uint64 resampler_handle = 1; + * @generated from field: required uint64 resampler_handle = 1; */ - resamplerHandle = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.FlushSoxResamplerRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "resampler_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): FlushSoxResamplerRequest { - return new FlushSoxResamplerRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): FlushSoxResamplerRequest { - return new FlushSoxResamplerRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): FlushSoxResamplerRequest { - return new FlushSoxResamplerRequest().fromJsonString(jsonString, options); - } + resamplerHandle: bigint; +}; - static equals(a: FlushSoxResamplerRequest | PlainMessage | undefined, b: FlushSoxResamplerRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(FlushSoxResamplerRequest, a, b); - } -} +/** + * Describes the message livekit.proto.FlushSoxResamplerRequest. + * Use `create(FlushSoxResamplerRequestSchema)` to create a new message. + */ +export const FlushSoxResamplerRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 19); /** * @generated from message livekit.proto.FlushSoxResamplerResponse */ -export class FlushSoxResamplerResponse extends Message { +export type FlushSoxResamplerResponse = Message<"livekit.proto.FlushSoxResamplerResponse"> & { /** * *const i16 (could be null) * - * @generated from field: uint64 output_ptr = 1; + * @generated from field: required uint64 output_ptr = 1; */ - outputPtr = protoInt64.zero; + outputPtr: bigint; /** * in bytes * - * @generated from field: uint32 size = 2; + * @generated from field: required uint32 size = 2; */ - size = 0; + size: number; /** * @generated from field: optional string error = 3; */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.FlushSoxResamplerResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "output_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "size", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 3, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): FlushSoxResamplerResponse { - return new FlushSoxResamplerResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): FlushSoxResamplerResponse { - return new FlushSoxResamplerResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): FlushSoxResamplerResponse { - return new FlushSoxResamplerResponse().fromJsonString(jsonString, options); - } + error: string; +}; - static equals(a: FlushSoxResamplerResponse | PlainMessage | undefined, b: FlushSoxResamplerResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(FlushSoxResamplerResponse, a, b); - } -} +/** + * Describes the message livekit.proto.FlushSoxResamplerResponse. + * Use `create(FlushSoxResamplerResponseSchema)` to create a new message. + */ +export const FlushSoxResamplerResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 20); /** * @generated from message livekit.proto.AudioFrameBufferInfo */ -export class AudioFrameBufferInfo extends Message { +export type AudioFrameBufferInfo = Message<"livekit.proto.AudioFrameBufferInfo"> & { /** * *const i16 * - * @generated from field: uint64 data_ptr = 1; + * @generated from field: required uint64 data_ptr = 1; */ - dataPtr = protoInt64.zero; + dataPtr: bigint; /** - * @generated from field: uint32 num_channels = 2; + * @generated from field: required uint32 num_channels = 2; */ - numChannels = 0; + numChannels: number; /** - * @generated from field: uint32 sample_rate = 3; + * @generated from field: required uint32 sample_rate = 3; */ - sampleRate = 0; + sampleRate: number; /** - * @generated from field: uint32 samples_per_channel = 4; + * @generated from field: required uint32 samples_per_channel = 4; */ - samplesPerChannel = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.AudioFrameBufferInfo"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "data_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 3, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 4, name: "samples_per_channel", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AudioFrameBufferInfo { - return new AudioFrameBufferInfo().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AudioFrameBufferInfo { - return new AudioFrameBufferInfo().fromJson(jsonValue, options); - } + samplesPerChannel: number; +}; - static fromJsonString(jsonString: string, options?: Partial): AudioFrameBufferInfo { - return new AudioFrameBufferInfo().fromJsonString(jsonString, options); - } - - static equals(a: AudioFrameBufferInfo | PlainMessage | undefined, b: AudioFrameBufferInfo | PlainMessage | undefined): boolean { - return proto3.util.equals(AudioFrameBufferInfo, a, b); - } -} +/** + * Describes the message livekit.proto.AudioFrameBufferInfo. + * Use `create(AudioFrameBufferInfoSchema)` to create a new message. + */ +export const AudioFrameBufferInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 21); /** * @generated from message livekit.proto.OwnedAudioFrameBuffer */ -export class OwnedAudioFrameBuffer extends Message { +export type OwnedAudioFrameBuffer = Message<"livekit.proto.OwnedAudioFrameBuffer"> & { /** - * @generated from field: livekit.proto.FfiOwnedHandle handle = 1; + * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; */ handle?: FfiOwnedHandle; /** - * @generated from field: livekit.proto.AudioFrameBufferInfo info = 2; + * @generated from field: required livekit.proto.AudioFrameBufferInfo info = 2; */ info?: AudioFrameBufferInfo; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.OwnedAudioFrameBuffer"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle }, - { no: 2, name: "info", kind: "message", T: AudioFrameBufferInfo }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OwnedAudioFrameBuffer { - return new OwnedAudioFrameBuffer().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OwnedAudioFrameBuffer { - return new OwnedAudioFrameBuffer().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OwnedAudioFrameBuffer { - return new OwnedAudioFrameBuffer().fromJsonString(jsonString, options); - } - - static equals(a: OwnedAudioFrameBuffer | PlainMessage | undefined, b: OwnedAudioFrameBuffer | PlainMessage | undefined): boolean { - return proto3.util.equals(OwnedAudioFrameBuffer, a, b); - } -} +/** + * Describes the message livekit.proto.OwnedAudioFrameBuffer. + * Use `create(OwnedAudioFrameBufferSchema)` to create a new message. + */ +export const OwnedAudioFrameBufferSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 22); /** * @generated from message livekit.proto.AudioStreamInfo */ -export class AudioStreamInfo extends Message { +export type AudioStreamInfo = Message<"livekit.proto.AudioStreamInfo"> & { /** - * @generated from field: livekit.proto.AudioStreamType type = 1; + * @generated from field: required livekit.proto.AudioStreamType type = 1; */ - type = AudioStreamType.AUDIO_STREAM_NATIVE; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + type: AudioStreamType; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.AudioStreamInfo"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(AudioStreamType) }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AudioStreamInfo { - return new AudioStreamInfo().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AudioStreamInfo { - return new AudioStreamInfo().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AudioStreamInfo { - return new AudioStreamInfo().fromJsonString(jsonString, options); - } - - static equals(a: AudioStreamInfo | PlainMessage | undefined, b: AudioStreamInfo | PlainMessage | undefined): boolean { - return proto3.util.equals(AudioStreamInfo, a, b); - } -} +/** + * Describes the message livekit.proto.AudioStreamInfo. + * Use `create(AudioStreamInfoSchema)` to create a new message. + */ +export const AudioStreamInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 23); /** * @generated from message livekit.proto.OwnedAudioStream */ -export class OwnedAudioStream extends Message { +export type OwnedAudioStream = Message<"livekit.proto.OwnedAudioStream"> & { /** - * @generated from field: livekit.proto.FfiOwnedHandle handle = 1; + * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; */ handle?: FfiOwnedHandle; /** - * @generated from field: livekit.proto.AudioStreamInfo info = 2; + * @generated from field: required livekit.proto.AudioStreamInfo info = 2; */ info?: AudioStreamInfo; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.OwnedAudioStream"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle }, - { no: 2, name: "info", kind: "message", T: AudioStreamInfo }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OwnedAudioStream { - return new OwnedAudioStream().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OwnedAudioStream { - return new OwnedAudioStream().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OwnedAudioStream { - return new OwnedAudioStream().fromJsonString(jsonString, options); - } - - static equals(a: OwnedAudioStream | PlainMessage | undefined, b: OwnedAudioStream | PlainMessage | undefined): boolean { - return proto3.util.equals(OwnedAudioStream, a, b); - } -} +/** + * Describes the message livekit.proto.OwnedAudioStream. + * Use `create(OwnedAudioStreamSchema)` to create a new message. + */ +export const OwnedAudioStreamSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 24); /** * @generated from message livekit.proto.AudioStreamEvent */ -export class AudioStreamEvent extends Message { +export type AudioStreamEvent = Message<"livekit.proto.AudioStreamEvent"> & { /** - * @generated from field: uint64 stream_handle = 1; + * @generated from field: required uint64 stream_handle = 1; */ - streamHandle = protoInt64.zero; + streamHandle: bigint; /** * @generated from oneof livekit.proto.AudioStreamEvent.message @@ -1339,380 +674,328 @@ export class AudioStreamEvent extends Message { */ value: AudioStreamEOS; case: "eos"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.AudioStreamEvent"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "stream_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "frame_received", kind: "message", T: AudioFrameReceived, oneof: "message" }, - { no: 3, name: "eos", kind: "message", T: AudioStreamEOS, oneof: "message" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AudioStreamEvent { - return new AudioStreamEvent().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AudioStreamEvent { - return new AudioStreamEvent().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AudioStreamEvent { - return new AudioStreamEvent().fromJsonString(jsonString, options); - } - - static equals(a: AudioStreamEvent | PlainMessage | undefined, b: AudioStreamEvent | PlainMessage | undefined): boolean { - return proto3.util.equals(AudioStreamEvent, a, b); - } -} + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message livekit.proto.AudioStreamEvent. + * Use `create(AudioStreamEventSchema)` to create a new message. + */ +export const AudioStreamEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 25); /** * @generated from message livekit.proto.AudioFrameReceived */ -export class AudioFrameReceived extends Message { +export type AudioFrameReceived = Message<"livekit.proto.AudioFrameReceived"> & { /** - * @generated from field: livekit.proto.OwnedAudioFrameBuffer frame = 1; + * @generated from field: required livekit.proto.OwnedAudioFrameBuffer frame = 1; */ frame?: OwnedAudioFrameBuffer; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.AudioFrameReceived"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "frame", kind: "message", T: OwnedAudioFrameBuffer }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AudioFrameReceived { - return new AudioFrameReceived().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AudioFrameReceived { - return new AudioFrameReceived().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AudioFrameReceived { - return new AudioFrameReceived().fromJsonString(jsonString, options); - } - - static equals(a: AudioFrameReceived | PlainMessage | undefined, b: AudioFrameReceived | PlainMessage | undefined): boolean { - return proto3.util.equals(AudioFrameReceived, a, b); - } -} +/** + * Describes the message livekit.proto.AudioFrameReceived. + * Use `create(AudioFrameReceivedSchema)` to create a new message. + */ +export const AudioFrameReceivedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 26); /** * @generated from message livekit.proto.AudioStreamEOS */ -export class AudioStreamEOS extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export type AudioStreamEOS = Message<"livekit.proto.AudioStreamEOS"> & { +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.AudioStreamEOS"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AudioStreamEOS { - return new AudioStreamEOS().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AudioStreamEOS { - return new AudioStreamEOS().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AudioStreamEOS { - return new AudioStreamEOS().fromJsonString(jsonString, options); - } - - static equals(a: AudioStreamEOS | PlainMessage | undefined, b: AudioStreamEOS | PlainMessage | undefined): boolean { - return proto3.util.equals(AudioStreamEOS, a, b); - } -} +/** + * Describes the message livekit.proto.AudioStreamEOS. + * Use `create(AudioStreamEOSSchema)` to create a new message. + */ +export const AudioStreamEOSSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 27); /** * @generated from message livekit.proto.AudioSourceOptions */ -export class AudioSourceOptions extends Message { +export type AudioSourceOptions = Message<"livekit.proto.AudioSourceOptions"> & { /** - * @generated from field: bool echo_cancellation = 1; + * @generated from field: required bool echo_cancellation = 1; */ - echoCancellation = false; + echoCancellation: boolean; /** - * @generated from field: bool noise_suppression = 2; + * @generated from field: required bool noise_suppression = 2; */ - noiseSuppression = false; + noiseSuppression: boolean; /** - * @generated from field: bool auto_gain_control = 3; + * @generated from field: required bool auto_gain_control = 3; */ - autoGainControl = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + autoGainControl: boolean; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.AudioSourceOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "echo_cancellation", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "noise_suppression", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 3, name: "auto_gain_control", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AudioSourceOptions { - return new AudioSourceOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AudioSourceOptions { - return new AudioSourceOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AudioSourceOptions { - return new AudioSourceOptions().fromJsonString(jsonString, options); - } - - static equals(a: AudioSourceOptions | PlainMessage | undefined, b: AudioSourceOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(AudioSourceOptions, a, b); - } -} +/** + * Describes the message livekit.proto.AudioSourceOptions. + * Use `create(AudioSourceOptionsSchema)` to create a new message. + */ +export const AudioSourceOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 28); /** * @generated from message livekit.proto.AudioSourceInfo */ -export class AudioSourceInfo extends Message { +export type AudioSourceInfo = Message<"livekit.proto.AudioSourceInfo"> & { /** - * @generated from field: livekit.proto.AudioSourceType type = 2; + * @generated from field: required livekit.proto.AudioSourceType type = 2; */ - type = AudioSourceType.AUDIO_SOURCE_NATIVE; + type: AudioSourceType; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +/** + * Describes the message livekit.proto.AudioSourceInfo. + * Use `create(AudioSourceInfoSchema)` to create a new message. + */ +export const AudioSourceInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 29); - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.AudioSourceInfo"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 2, name: "type", kind: "enum", T: proto3.getEnumType(AudioSourceType) }, - ]); +/** + * @generated from message livekit.proto.OwnedAudioSource + */ +export type OwnedAudioSource = Message<"livekit.proto.OwnedAudioSource"> & { + /** + * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; + */ + handle?: FfiOwnedHandle; - static fromBinary(bytes: Uint8Array, options?: Partial): AudioSourceInfo { - return new AudioSourceInfo().fromBinary(bytes, options); - } + /** + * @generated from field: required livekit.proto.AudioSourceInfo info = 2; + */ + info?: AudioSourceInfo; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): AudioSourceInfo { - return new AudioSourceInfo().fromJson(jsonValue, options); - } +/** + * Describes the message livekit.proto.OwnedAudioSource. + * Use `create(OwnedAudioSourceSchema)` to create a new message. + */ +export const OwnedAudioSourceSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 30); - static fromJsonString(jsonString: string, options?: Partial): AudioSourceInfo { - return new AudioSourceInfo().fromJsonString(jsonString, options); - } +/** + * @generated from message livekit.proto.AudioResamplerInfo + */ +export type AudioResamplerInfo = Message<"livekit.proto.AudioResamplerInfo"> & { +}; - static equals(a: AudioSourceInfo | PlainMessage | undefined, b: AudioSourceInfo | PlainMessage | undefined): boolean { - return proto3.util.equals(AudioSourceInfo, a, b); - } -} +/** + * Describes the message livekit.proto.AudioResamplerInfo. + * Use `create(AudioResamplerInfoSchema)` to create a new message. + */ +export const AudioResamplerInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 31); /** - * @generated from message livekit.proto.OwnedAudioSource + * @generated from message livekit.proto.OwnedAudioResampler */ -export class OwnedAudioSource extends Message { +export type OwnedAudioResampler = Message<"livekit.proto.OwnedAudioResampler"> & { /** - * @generated from field: livekit.proto.FfiOwnedHandle handle = 1; + * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; */ handle?: FfiOwnedHandle; /** - * @generated from field: livekit.proto.AudioSourceInfo info = 2; + * @generated from field: required livekit.proto.AudioResamplerInfo info = 2; */ - info?: AudioSourceInfo; + info?: AudioResamplerInfo; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.OwnedAudioSource"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle }, - { no: 2, name: "info", kind: "message", T: AudioSourceInfo }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OwnedAudioSource { - return new OwnedAudioSource().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OwnedAudioSource { - return new OwnedAudioSource().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OwnedAudioSource { - return new OwnedAudioSource().fromJsonString(jsonString, options); - } - - static equals(a: OwnedAudioSource | PlainMessage | undefined, b: OwnedAudioSource | PlainMessage | undefined): boolean { - return proto3.util.equals(OwnedAudioSource, a, b); - } -} +/** + * Describes the message livekit.proto.OwnedAudioResampler. + * Use `create(OwnedAudioResamplerSchema)` to create a new message. + */ +export const OwnedAudioResamplerSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 32); /** - * @generated from message livekit.proto.AudioResamplerInfo + * @generated from message livekit.proto.SoxResamplerInfo + */ +export type SoxResamplerInfo = Message<"livekit.proto.SoxResamplerInfo"> & { +}; + +/** + * Describes the message livekit.proto.SoxResamplerInfo. + * Use `create(SoxResamplerInfoSchema)` to create a new message. */ -export class AudioResamplerInfo extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export const SoxResamplerInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 33); - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.AudioResamplerInfo"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); +/** + * @generated from message livekit.proto.OwnedSoxResampler + */ +export type OwnedSoxResampler = Message<"livekit.proto.OwnedSoxResampler"> & { + /** + * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; + */ + handle?: FfiOwnedHandle; - static fromBinary(bytes: Uint8Array, options?: Partial): AudioResamplerInfo { - return new AudioResamplerInfo().fromBinary(bytes, options); - } + /** + * @generated from field: required livekit.proto.SoxResamplerInfo info = 2; + */ + info?: SoxResamplerInfo; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): AudioResamplerInfo { - return new AudioResamplerInfo().fromJson(jsonValue, options); - } +/** + * Describes the message livekit.proto.OwnedSoxResampler. + * Use `create(OwnedSoxResamplerSchema)` to create a new message. + */ +export const OwnedSoxResamplerSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_audio_frame, 34); - static fromJsonString(jsonString: string, options?: Partial): AudioResamplerInfo { - return new AudioResamplerInfo().fromJsonString(jsonString, options); - } +/** + * @generated from enum livekit.proto.SoxResamplerDataType + */ +export enum SoxResamplerDataType { + /** + * TODO(theomonnom): support other datatypes (shouldn't really be needed) + * + * @generated from enum value: SOXR_DATATYPE_INT16I = 0; + */ + SOXR_DATATYPE_INT16I = 0, - static equals(a: AudioResamplerInfo | PlainMessage | undefined, b: AudioResamplerInfo | PlainMessage | undefined): boolean { - return proto3.util.equals(AudioResamplerInfo, a, b); - } + /** + * @generated from enum value: SOXR_DATATYPE_INT16S = 1; + */ + SOXR_DATATYPE_INT16S = 1, } /** - * @generated from message livekit.proto.OwnedAudioResampler + * Describes the enum livekit.proto.SoxResamplerDataType. + */ +export const SoxResamplerDataTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_audio_frame, 0); + +/** + * @generated from enum livekit.proto.SoxQualityRecipe */ -export class OwnedAudioResampler extends Message { +export enum SoxQualityRecipe { /** - * @generated from field: livekit.proto.FfiOwnedHandle handle = 1; + * @generated from enum value: SOXR_QUALITY_QUICK = 0; */ - handle?: FfiOwnedHandle; + SOXR_QUALITY_QUICK = 0, /** - * @generated from field: livekit.proto.AudioResamplerInfo info = 2; + * @generated from enum value: SOXR_QUALITY_LOW = 1; */ - info?: AudioResamplerInfo; + SOXR_QUALITY_LOW = 1, + + /** + * @generated from enum value: SOXR_QUALITY_MEDIUM = 2; + */ + SOXR_QUALITY_MEDIUM = 2, + + /** + * @generated from enum value: SOXR_QUALITY_HIGH = 3; + */ + SOXR_QUALITY_HIGH = 3, - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.OwnedAudioResampler"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle }, - { no: 2, name: "info", kind: "message", T: AudioResamplerInfo }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OwnedAudioResampler { - return new OwnedAudioResampler().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OwnedAudioResampler { - return new OwnedAudioResampler().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OwnedAudioResampler { - return new OwnedAudioResampler().fromJsonString(jsonString, options); - } - - static equals(a: OwnedAudioResampler | PlainMessage | undefined, b: OwnedAudioResampler | PlainMessage | undefined): boolean { - return proto3.util.equals(OwnedAudioResampler, a, b); - } + /** + * @generated from enum value: SOXR_QUALITY_VERYHIGH = 4; + */ + SOXR_QUALITY_VERYHIGH = 4, } /** - * @generated from message livekit.proto.SoxResamplerInfo + * Describes the enum livekit.proto.SoxQualityRecipe. */ -export class SoxResamplerInfo extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export const SoxQualityRecipeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_audio_frame, 1); - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SoxResamplerInfo"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); +/** + * @generated from enum livekit.proto.SoxFlagBits + */ +export enum SoxFlagBits { + /** + * 1 << 0 + * + * @generated from enum value: SOXR_ROLLOFF_SMALL = 0; + */ + SOXR_ROLLOFF_SMALL = 0, - static fromBinary(bytes: Uint8Array, options?: Partial): SoxResamplerInfo { - return new SoxResamplerInfo().fromBinary(bytes, options); - } + /** + * 1 << 1 + * + * @generated from enum value: SOXR_ROLLOFF_MEDIUM = 1; + */ + SOXR_ROLLOFF_MEDIUM = 1, + + /** + * 1 << 2 + * + * @generated from enum value: SOXR_ROLLOFF_NONE = 2; + */ + SOXR_ROLLOFF_NONE = 2, - static fromJson(jsonValue: JsonValue, options?: Partial): SoxResamplerInfo { - return new SoxResamplerInfo().fromJson(jsonValue, options); - } + /** + * 1 << 3 + * + * @generated from enum value: SOXR_HIGH_PREC_CLOCK = 3; + */ + SOXR_HIGH_PREC_CLOCK = 3, - static fromJsonString(jsonString: string, options?: Partial): SoxResamplerInfo { - return new SoxResamplerInfo().fromJsonString(jsonString, options); - } + /** + * 1 << 4 + * + * @generated from enum value: SOXR_DOUBLE_PRECISION = 4; + */ + SOXR_DOUBLE_PRECISION = 4, - static equals(a: SoxResamplerInfo | PlainMessage | undefined, b: SoxResamplerInfo | PlainMessage | undefined): boolean { - return proto3.util.equals(SoxResamplerInfo, a, b); - } + /** + * 1 << 5 + * + * @generated from enum value: SOXR_VR = 5; + */ + SOXR_VR = 5, } /** - * @generated from message livekit.proto.OwnedSoxResampler + * Describes the enum livekit.proto.SoxFlagBits. + */ +export const SoxFlagBitsSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_audio_frame, 2); + +/** + * @generated from enum livekit.proto.AudioStreamType */ -export class OwnedSoxResampler extends Message { +export enum AudioStreamType { /** - * @generated from field: livekit.proto.FfiOwnedHandle handle = 1; + * @generated from enum value: AUDIO_STREAM_NATIVE = 0; */ - handle?: FfiOwnedHandle; + AUDIO_STREAM_NATIVE = 0, /** - * @generated from field: livekit.proto.SoxResamplerInfo info = 2; + * @generated from enum value: AUDIO_STREAM_HTML = 1; */ - info?: SoxResamplerInfo; + AUDIO_STREAM_HTML = 1, +} + +/** + * Describes the enum livekit.proto.AudioStreamType. + */ +export const AudioStreamTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_audio_frame, 3); - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.OwnedSoxResampler"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle }, - { no: 2, name: "info", kind: "message", T: SoxResamplerInfo }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OwnedSoxResampler { - return new OwnedSoxResampler().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OwnedSoxResampler { - return new OwnedSoxResampler().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OwnedSoxResampler { - return new OwnedSoxResampler().fromJsonString(jsonString, options); - } - - static equals(a: OwnedSoxResampler | PlainMessage | undefined, b: OwnedSoxResampler | PlainMessage | undefined): boolean { - return proto3.util.equals(OwnedSoxResampler, a, b); - } +/** + * @generated from enum livekit.proto.AudioSourceType + */ +export enum AudioSourceType { + /** + * @generated from enum value: AUDIO_SOURCE_NATIVE = 0; + */ + AUDIO_SOURCE_NATIVE = 0, } +/** + * Describes the enum livekit.proto.AudioSourceType. + */ +export const AudioSourceTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_audio_frame, 4); + diff --git a/packages/livekit-rtc/src/proto/e2ee_pb.ts b/packages/livekit-rtc/src/proto/e2ee_pb.ts index 73601aa1..78e1a83c 100644 --- a/packages/livekit-rtc/src/proto/e2ee_pb.ts +++ b/packages/livekit-rtc/src/proto/e2ee_pb.ts @@ -12,1013 +12,479 @@ // 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" -// @generated from file e2ee.proto (package livekit.proto, syntax proto3) +// @generated by protoc-gen-es v2.2.0 with parameter "target=ts" +// @generated from file e2ee.proto (package livekit.proto, syntax proto2) /* eslint-disable */ -// @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; +import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; /** - * @generated from enum livekit.proto.EncryptionType + * Describes the file e2ee.proto. */ -export enum EncryptionType { - /** - * @generated from enum value: NONE = 0; - */ - NONE = 0, - - /** - * @generated from enum value: GCM = 1; - */ - GCM = 1, - - /** - * @generated from enum value: CUSTOM = 2; - */ - CUSTOM = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(EncryptionType) -proto3.util.setEnumType(EncryptionType, "livekit.proto.EncryptionType", [ - { no: 0, name: "NONE" }, - { no: 1, name: "GCM" }, - { no: 2, name: "CUSTOM" }, -]); +export const file_e2ee: GenFile = /*@__PURE__*/ + fileDesc("CgplMmVlLnByb3RvEg1saXZla2l0LnByb3RvImMKDEZyYW1lQ3J5cHRvchIcChRwYXJ0aWNpcGFudF9pZGVudGl0eRgBIAIoCRIRCgl0cmFja19zaWQYAiACKAkSEQoJa2V5X2luZGV4GAMgAigFEg8KB2VuYWJsZWQYBCACKAgidgoSS2V5UHJvdmlkZXJPcHRpb25zEhIKCnNoYXJlZF9rZXkYASABKAwSGwoTcmF0Y2hldF93aW5kb3dfc2l6ZRgCIAIoBRIUCgxyYXRjaGV0X3NhbHQYAyACKAwSGQoRZmFpbHVyZV90b2xlcmFuY2UYBCACKAUihgEKC0UyZWVPcHRpb25zEjYKD2VuY3J5cHRpb25fdHlwZRgBIAIoDjIdLmxpdmVraXQucHJvdG8uRW5jcnlwdGlvblR5cGUSPwoUa2V5X3Byb3ZpZGVyX29wdGlvbnMYAiACKAsyIS5saXZla2l0LnByb3RvLktleVByb3ZpZGVyT3B0aW9ucyIvChxFMmVlTWFuYWdlclNldEVuYWJsZWRSZXF1ZXN0Eg8KB2VuYWJsZWQYASACKAgiHwodRTJlZU1hbmFnZXJTZXRFbmFibGVkUmVzcG9uc2UiJAoiRTJlZU1hbmFnZXJHZXRGcmFtZUNyeXB0b3JzUmVxdWVzdCJaCiNFMmVlTWFuYWdlckdldEZyYW1lQ3J5cHRvcnNSZXNwb25zZRIzCg5mcmFtZV9jcnlwdG9ycxgBIA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V9SQVRDSEVURUQQBRISCg5JTlRFUk5BTF9FUlJPUhAGQhCqAg1MaXZlS2l0LlByb3Rv"); /** - * @generated from enum livekit.proto.EncryptionState + * @generated from message livekit.proto.FrameCryptor */ -export enum EncryptionState { - /** - * @generated from enum value: NEW = 0; - */ - NEW = 0, - - /** - * @generated from enum value: OK = 1; - */ - OK = 1, - +export type FrameCryptor = Message<"livekit.proto.FrameCryptor"> & { /** - * @generated from enum value: ENCRYPTION_FAILED = 2; + * @generated from field: required string participant_identity = 1; */ - ENCRYPTION_FAILED = 2, + participantIdentity: string; /** - * @generated from enum value: DECRYPTION_FAILED = 3; + * @generated from field: required string track_sid = 2; */ - DECRYPTION_FAILED = 3, + trackSid: string; /** - * @generated from enum value: MISSING_KEY = 4; + * @generated from field: required int32 key_index = 3; */ - MISSING_KEY = 4, + keyIndex: number; /** - * @generated from enum value: KEY_RATCHETED = 5; + * @generated from field: required bool enabled = 4; */ - KEY_RATCHETED = 5, - - /** - * @generated from enum value: INTERNAL_ERROR = 6; - */ - INTERNAL_ERROR = 6, -} -// Retrieve enum metadata with: proto3.getEnumType(EncryptionState) -proto3.util.setEnumType(EncryptionState, "livekit.proto.EncryptionState", [ - { no: 0, name: "NEW" }, - { no: 1, name: "OK" }, - { no: 2, name: "ENCRYPTION_FAILED" }, - { no: 3, name: "DECRYPTION_FAILED" }, - { no: 4, name: "MISSING_KEY" }, - { no: 5, name: "KEY_RATCHETED" }, - { no: 6, name: "INTERNAL_ERROR" }, -]); + enabled: boolean; +}; /** - * @generated from message livekit.proto.FrameCryptor + * Describes the message livekit.proto.FrameCryptor. + * Use `create(FrameCryptorSchema)` to create a new message. */ -export class FrameCryptor extends Message { - /** - * @generated from field: string participant_identity = 1; - */ - participantIdentity = ""; - - /** - * @generated from field: string track_sid = 2; - */ - trackSid = ""; - - /** - * @generated from field: int32 key_index = 3; - */ - keyIndex = 0; - - /** - * @generated from field: bool enabled = 4; - */ - enabled = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.FrameCryptor"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "key_index", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 4, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): FrameCryptor { - return new FrameCryptor().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): FrameCryptor { - return new FrameCryptor().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): FrameCryptor { - return new FrameCryptor().fromJsonString(jsonString, options); - } - - static equals(a: FrameCryptor | PlainMessage | undefined, b: FrameCryptor | PlainMessage | undefined): boolean { - return proto3.util.equals(FrameCryptor, a, b); - } -} +export const FrameCryptorSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 0); /** * @generated from message livekit.proto.KeyProviderOptions */ -export class KeyProviderOptions extends Message { +export type KeyProviderOptions = Message<"livekit.proto.KeyProviderOptions"> & { /** * Only specify if you want to use a shared_key * * @generated from field: optional bytes shared_key = 1; */ - sharedKey?: Uint8Array; + sharedKey: Uint8Array; /** - * @generated from field: int32 ratchet_window_size = 2; + * @generated from field: required int32 ratchet_window_size = 2; */ - ratchetWindowSize = 0; + ratchetWindowSize: number; /** - * @generated from field: bytes ratchet_salt = 3; + * @generated from field: required bytes ratchet_salt = 3; */ - ratchetSalt = new Uint8Array(0); + ratchetSalt: Uint8Array; /** - * -1 = no tolerence + * -1 = no tolerance * - * @generated from field: int32 failure_tolerance = 4; + * @generated from field: required int32 failure_tolerance = 4; */ - failureTolerance = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.KeyProviderOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "shared_key", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 2, name: "ratchet_window_size", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 3, name: "ratchet_salt", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 4, name: "failure_tolerance", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): KeyProviderOptions { - return new KeyProviderOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): KeyProviderOptions { - return new KeyProviderOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): KeyProviderOptions { - return new KeyProviderOptions().fromJsonString(jsonString, options); - } - - static equals(a: KeyProviderOptions | PlainMessage | undefined, b: KeyProviderOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(KeyProviderOptions, a, b); - } -} + failureTolerance: number; +}; + +/** + * Describes the message livekit.proto.KeyProviderOptions. + * Use `create(KeyProviderOptionsSchema)` to create a new message. + */ +export const KeyProviderOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 1); /** * @generated from message livekit.proto.E2eeOptions */ -export class E2eeOptions extends Message { +export type E2eeOptions = Message<"livekit.proto.E2eeOptions"> & { /** - * @generated from field: livekit.proto.EncryptionType encryption_type = 1; + * @generated from field: required livekit.proto.EncryptionType encryption_type = 1; */ - encryptionType = EncryptionType.NONE; + encryptionType: EncryptionType; /** - * @generated from field: livekit.proto.KeyProviderOptions key_provider_options = 2; + * @generated from field: required livekit.proto.KeyProviderOptions key_provider_options = 2; */ keyProviderOptions?: KeyProviderOptions; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.E2eeOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "encryption_type", kind: "enum", T: proto3.getEnumType(EncryptionType) }, - { no: 2, name: "key_provider_options", kind: "message", T: KeyProviderOptions }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): E2eeOptions { - return new E2eeOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): E2eeOptions { - return new E2eeOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): E2eeOptions { - return new E2eeOptions().fromJsonString(jsonString, options); - } - - static equals(a: E2eeOptions | PlainMessage | undefined, b: E2eeOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(E2eeOptions, a, b); - } -} +/** + * Describes the message livekit.proto.E2eeOptions. + * Use `create(E2eeOptionsSchema)` to create a new message. + */ +export const E2eeOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 2); /** * @generated from message livekit.proto.E2eeManagerSetEnabledRequest */ -export class E2eeManagerSetEnabledRequest extends Message { +export type E2eeManagerSetEnabledRequest = Message<"livekit.proto.E2eeManagerSetEnabledRequest"> & { /** - * @generated from field: bool enabled = 1; + * @generated from field: required bool enabled = 1; */ - enabled = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.E2eeManagerSetEnabledRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): E2eeManagerSetEnabledRequest { - return new E2eeManagerSetEnabledRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): E2eeManagerSetEnabledRequest { - return new E2eeManagerSetEnabledRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): E2eeManagerSetEnabledRequest { - return new E2eeManagerSetEnabledRequest().fromJsonString(jsonString, options); - } - - static equals(a: E2eeManagerSetEnabledRequest | PlainMessage | undefined, b: E2eeManagerSetEnabledRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(E2eeManagerSetEnabledRequest, a, b); - } -} + enabled: boolean; +}; + +/** + * Describes the message livekit.proto.E2eeManagerSetEnabledRequest. + * Use `create(E2eeManagerSetEnabledRequestSchema)` to create a new message. + */ +export const E2eeManagerSetEnabledRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 3); /** * @generated from message livekit.proto.E2eeManagerSetEnabledResponse */ -export class E2eeManagerSetEnabledResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.E2eeManagerSetEnabledResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): E2eeManagerSetEnabledResponse { - return new E2eeManagerSetEnabledResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): E2eeManagerSetEnabledResponse { - return new E2eeManagerSetEnabledResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): E2eeManagerSetEnabledResponse { - return new E2eeManagerSetEnabledResponse().fromJsonString(jsonString, options); - } - - static equals(a: E2eeManagerSetEnabledResponse | PlainMessage | undefined, b: E2eeManagerSetEnabledResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(E2eeManagerSetEnabledResponse, a, b); - } -} +export type E2eeManagerSetEnabledResponse = Message<"livekit.proto.E2eeManagerSetEnabledResponse"> & { +}; + +/** + * Describes the message livekit.proto.E2eeManagerSetEnabledResponse. + * Use `create(E2eeManagerSetEnabledResponseSchema)` to create a new message. + */ +export const E2eeManagerSetEnabledResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 4); /** * @generated from message livekit.proto.E2eeManagerGetFrameCryptorsRequest */ -export class E2eeManagerGetFrameCryptorsRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.E2eeManagerGetFrameCryptorsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): E2eeManagerGetFrameCryptorsRequest { - return new E2eeManagerGetFrameCryptorsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): E2eeManagerGetFrameCryptorsRequest { - return new E2eeManagerGetFrameCryptorsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): E2eeManagerGetFrameCryptorsRequest { - return new E2eeManagerGetFrameCryptorsRequest().fromJsonString(jsonString, options); - } - - static equals(a: E2eeManagerGetFrameCryptorsRequest | PlainMessage | undefined, b: E2eeManagerGetFrameCryptorsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(E2eeManagerGetFrameCryptorsRequest, a, b); - } -} +export type E2eeManagerGetFrameCryptorsRequest = Message<"livekit.proto.E2eeManagerGetFrameCryptorsRequest"> & { +}; + +/** + * Describes the message livekit.proto.E2eeManagerGetFrameCryptorsRequest. + * Use `create(E2eeManagerGetFrameCryptorsRequestSchema)` to create a new message. + */ +export const E2eeManagerGetFrameCryptorsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 5); /** * @generated from message livekit.proto.E2eeManagerGetFrameCryptorsResponse */ -export class E2eeManagerGetFrameCryptorsResponse extends Message { +export type E2eeManagerGetFrameCryptorsResponse = Message<"livekit.proto.E2eeManagerGetFrameCryptorsResponse"> & { /** * @generated from field: repeated livekit.proto.FrameCryptor frame_cryptors = 1; */ - frameCryptors: FrameCryptor[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.E2eeManagerGetFrameCryptorsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "frame_cryptors", kind: "message", T: FrameCryptor, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): E2eeManagerGetFrameCryptorsResponse { - return new E2eeManagerGetFrameCryptorsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): E2eeManagerGetFrameCryptorsResponse { - return new E2eeManagerGetFrameCryptorsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): E2eeManagerGetFrameCryptorsResponse { - return new E2eeManagerGetFrameCryptorsResponse().fromJsonString(jsonString, options); - } - - static equals(a: E2eeManagerGetFrameCryptorsResponse | PlainMessage | undefined, b: E2eeManagerGetFrameCryptorsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(E2eeManagerGetFrameCryptorsResponse, a, b); - } -} + frameCryptors: FrameCryptor[]; +}; + +/** + * Describes the message livekit.proto.E2eeManagerGetFrameCryptorsResponse. + * Use `create(E2eeManagerGetFrameCryptorsResponseSchema)` to create a new message. + */ +export const E2eeManagerGetFrameCryptorsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 6); /** * @generated from message livekit.proto.FrameCryptorSetEnabledRequest */ -export class FrameCryptorSetEnabledRequest extends Message { +export type FrameCryptorSetEnabledRequest = Message<"livekit.proto.FrameCryptorSetEnabledRequest"> & { /** - * @generated from field: string participant_identity = 1; + * @generated from field: required string participant_identity = 1; */ - participantIdentity = ""; + participantIdentity: string; /** - * @generated from field: string track_sid = 2; + * @generated from field: required string track_sid = 2; */ - trackSid = ""; + trackSid: string; /** - * @generated from field: bool enabled = 3; + * @generated from field: required bool enabled = 3; */ - enabled = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.FrameCryptorSetEnabledRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): FrameCryptorSetEnabledRequest { - return new FrameCryptorSetEnabledRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): FrameCryptorSetEnabledRequest { - return new FrameCryptorSetEnabledRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): FrameCryptorSetEnabledRequest { - return new FrameCryptorSetEnabledRequest().fromJsonString(jsonString, options); - } - - static equals(a: FrameCryptorSetEnabledRequest | PlainMessage | undefined, b: FrameCryptorSetEnabledRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(FrameCryptorSetEnabledRequest, a, b); - } -} + enabled: boolean; +}; + +/** + * Describes the message livekit.proto.FrameCryptorSetEnabledRequest. + * Use `create(FrameCryptorSetEnabledRequestSchema)` to create a new message. + */ +export const FrameCryptorSetEnabledRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 7); /** * @generated from message livekit.proto.FrameCryptorSetEnabledResponse */ -export class FrameCryptorSetEnabledResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.FrameCryptorSetEnabledResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): FrameCryptorSetEnabledResponse { - return new FrameCryptorSetEnabledResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): FrameCryptorSetEnabledResponse { - return new FrameCryptorSetEnabledResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): FrameCryptorSetEnabledResponse { - return new FrameCryptorSetEnabledResponse().fromJsonString(jsonString, options); - } - - static equals(a: FrameCryptorSetEnabledResponse | PlainMessage | undefined, b: FrameCryptorSetEnabledResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(FrameCryptorSetEnabledResponse, a, b); - } -} +export type FrameCryptorSetEnabledResponse = Message<"livekit.proto.FrameCryptorSetEnabledResponse"> & { +}; + +/** + * Describes the message livekit.proto.FrameCryptorSetEnabledResponse. + * Use `create(FrameCryptorSetEnabledResponseSchema)` to create a new message. + */ +export const FrameCryptorSetEnabledResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 8); /** * @generated from message livekit.proto.FrameCryptorSetKeyIndexRequest */ -export class FrameCryptorSetKeyIndexRequest extends Message { +export type FrameCryptorSetKeyIndexRequest = Message<"livekit.proto.FrameCryptorSetKeyIndexRequest"> & { /** - * @generated from field: string participant_identity = 1; + * @generated from field: required string participant_identity = 1; */ - participantIdentity = ""; + participantIdentity: string; /** - * @generated from field: string track_sid = 2; + * @generated from field: required string track_sid = 2; */ - trackSid = ""; + trackSid: string; /** - * @generated from field: int32 key_index = 3; + * @generated from field: required int32 key_index = 3; */ - keyIndex = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.FrameCryptorSetKeyIndexRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "key_index", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): FrameCryptorSetKeyIndexRequest { - return new FrameCryptorSetKeyIndexRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): FrameCryptorSetKeyIndexRequest { - return new FrameCryptorSetKeyIndexRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): FrameCryptorSetKeyIndexRequest { - return new FrameCryptorSetKeyIndexRequest().fromJsonString(jsonString, options); - } - - static equals(a: FrameCryptorSetKeyIndexRequest | PlainMessage | undefined, b: FrameCryptorSetKeyIndexRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(FrameCryptorSetKeyIndexRequest, a, b); - } -} + keyIndex: number; +}; + +/** + * Describes the message livekit.proto.FrameCryptorSetKeyIndexRequest. + * Use `create(FrameCryptorSetKeyIndexRequestSchema)` to create a new message. + */ +export const FrameCryptorSetKeyIndexRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 9); /** * @generated from message livekit.proto.FrameCryptorSetKeyIndexResponse */ -export class FrameCryptorSetKeyIndexResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.FrameCryptorSetKeyIndexResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): FrameCryptorSetKeyIndexResponse { - return new FrameCryptorSetKeyIndexResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): FrameCryptorSetKeyIndexResponse { - return new FrameCryptorSetKeyIndexResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): FrameCryptorSetKeyIndexResponse { - return new FrameCryptorSetKeyIndexResponse().fromJsonString(jsonString, options); - } - - static equals(a: FrameCryptorSetKeyIndexResponse | PlainMessage | undefined, b: FrameCryptorSetKeyIndexResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(FrameCryptorSetKeyIndexResponse, a, b); - } -} +export type FrameCryptorSetKeyIndexResponse = Message<"livekit.proto.FrameCryptorSetKeyIndexResponse"> & { +}; + +/** + * Describes the message livekit.proto.FrameCryptorSetKeyIndexResponse. + * Use `create(FrameCryptorSetKeyIndexResponseSchema)` to create a new message. + */ +export const FrameCryptorSetKeyIndexResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 10); /** * @generated from message livekit.proto.SetSharedKeyRequest */ -export class SetSharedKeyRequest extends Message { +export type SetSharedKeyRequest = Message<"livekit.proto.SetSharedKeyRequest"> & { /** - * @generated from field: bytes shared_key = 1; + * @generated from field: required bytes shared_key = 1; */ - sharedKey = new Uint8Array(0); + sharedKey: Uint8Array; /** - * @generated from field: int32 key_index = 2; + * @generated from field: required int32 key_index = 2; */ - keyIndex = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SetSharedKeyRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "shared_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 2, name: "key_index", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetSharedKeyRequest { - return new SetSharedKeyRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetSharedKeyRequest { - return new SetSharedKeyRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetSharedKeyRequest { - return new SetSharedKeyRequest().fromJsonString(jsonString, options); - } - - static equals(a: SetSharedKeyRequest | PlainMessage | undefined, b: SetSharedKeyRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SetSharedKeyRequest, a, b); - } -} + keyIndex: number; +}; + +/** + * Describes the message livekit.proto.SetSharedKeyRequest. + * Use `create(SetSharedKeyRequestSchema)` to create a new message. + */ +export const SetSharedKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 11); /** * @generated from message livekit.proto.SetSharedKeyResponse */ -export class SetSharedKeyResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SetSharedKeyResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetSharedKeyResponse { - return new SetSharedKeyResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetSharedKeyResponse { - return new SetSharedKeyResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetSharedKeyResponse { - return new SetSharedKeyResponse().fromJsonString(jsonString, options); - } - - static equals(a: SetSharedKeyResponse | PlainMessage | undefined, b: SetSharedKeyResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SetSharedKeyResponse, a, b); - } -} +export type SetSharedKeyResponse = Message<"livekit.proto.SetSharedKeyResponse"> & { +}; + +/** + * Describes the message livekit.proto.SetSharedKeyResponse. + * Use `create(SetSharedKeyResponseSchema)` to create a new message. + */ +export const SetSharedKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 12); /** * @generated from message livekit.proto.RatchetSharedKeyRequest */ -export class RatchetSharedKeyRequest extends Message { +export type RatchetSharedKeyRequest = Message<"livekit.proto.RatchetSharedKeyRequest"> & { /** - * @generated from field: int32 key_index = 1; + * @generated from field: required int32 key_index = 1; */ - keyIndex = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RatchetSharedKeyRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "key_index", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RatchetSharedKeyRequest { - return new RatchetSharedKeyRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RatchetSharedKeyRequest { - return new RatchetSharedKeyRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RatchetSharedKeyRequest { - return new RatchetSharedKeyRequest().fromJsonString(jsonString, options); - } - - static equals(a: RatchetSharedKeyRequest | PlainMessage | undefined, b: RatchetSharedKeyRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(RatchetSharedKeyRequest, a, b); - } -} + keyIndex: number; +}; + +/** + * Describes the message livekit.proto.RatchetSharedKeyRequest. + * Use `create(RatchetSharedKeyRequestSchema)` to create a new message. + */ +export const RatchetSharedKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 13); /** * @generated from message livekit.proto.RatchetSharedKeyResponse */ -export class RatchetSharedKeyResponse extends Message { +export type RatchetSharedKeyResponse = Message<"livekit.proto.RatchetSharedKeyResponse"> & { /** * @generated from field: optional bytes new_key = 1; */ - newKey?: Uint8Array; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RatchetSharedKeyResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "new_key", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RatchetSharedKeyResponse { - return new RatchetSharedKeyResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RatchetSharedKeyResponse { - return new RatchetSharedKeyResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RatchetSharedKeyResponse { - return new RatchetSharedKeyResponse().fromJsonString(jsonString, options); - } - - static equals(a: RatchetSharedKeyResponse | PlainMessage | undefined, b: RatchetSharedKeyResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(RatchetSharedKeyResponse, a, b); - } -} + newKey: Uint8Array; +}; + +/** + * Describes the message livekit.proto.RatchetSharedKeyResponse. + * Use `create(RatchetSharedKeyResponseSchema)` to create a new message. + */ +export const RatchetSharedKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 14); /** * @generated from message livekit.proto.GetSharedKeyRequest */ -export class GetSharedKeyRequest extends Message { +export type GetSharedKeyRequest = Message<"livekit.proto.GetSharedKeyRequest"> & { /** - * @generated from field: int32 key_index = 1; + * @generated from field: required int32 key_index = 1; */ - keyIndex = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.GetSharedKeyRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "key_index", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetSharedKeyRequest { - return new GetSharedKeyRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetSharedKeyRequest { - return new GetSharedKeyRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetSharedKeyRequest { - return new GetSharedKeyRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetSharedKeyRequest | PlainMessage | undefined, b: GetSharedKeyRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetSharedKeyRequest, a, b); - } -} + keyIndex: number; +}; + +/** + * Describes the message livekit.proto.GetSharedKeyRequest. + * Use `create(GetSharedKeyRequestSchema)` to create a new message. + */ +export const GetSharedKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 15); /** * @generated from message livekit.proto.GetSharedKeyResponse */ -export class GetSharedKeyResponse extends Message { +export type GetSharedKeyResponse = Message<"livekit.proto.GetSharedKeyResponse"> & { /** * @generated from field: optional bytes key = 1; */ - key?: Uint8Array; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.GetSharedKeyResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "key", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetSharedKeyResponse { - return new GetSharedKeyResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetSharedKeyResponse { - return new GetSharedKeyResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetSharedKeyResponse { - return new GetSharedKeyResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetSharedKeyResponse | PlainMessage | undefined, b: GetSharedKeyResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetSharedKeyResponse, a, b); - } -} + key: Uint8Array; +}; + +/** + * Describes the message livekit.proto.GetSharedKeyResponse. + * Use `create(GetSharedKeyResponseSchema)` to create a new message. + */ +export const GetSharedKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 16); /** * @generated from message livekit.proto.SetKeyRequest */ -export class SetKeyRequest extends Message { +export type SetKeyRequest = Message<"livekit.proto.SetKeyRequest"> & { /** - * @generated from field: string participant_identity = 1; + * @generated from field: required string participant_identity = 1; */ - participantIdentity = ""; + participantIdentity: string; /** - * @generated from field: bytes key = 2; + * @generated from field: required bytes key = 2; */ - key = new Uint8Array(0); + key: Uint8Array; /** - * @generated from field: int32 key_index = 3; + * @generated from field: required int32 key_index = 3; */ - keyIndex = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SetKeyRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 3, name: "key_index", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetKeyRequest { - return new SetKeyRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetKeyRequest { - return new SetKeyRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetKeyRequest { - return new SetKeyRequest().fromJsonString(jsonString, options); - } - - static equals(a: SetKeyRequest | PlainMessage | undefined, b: SetKeyRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SetKeyRequest, a, b); - } -} + keyIndex: number; +}; + +/** + * Describes the message livekit.proto.SetKeyRequest. + * Use `create(SetKeyRequestSchema)` to create a new message. + */ +export const SetKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 17); /** * @generated from message livekit.proto.SetKeyResponse */ -export class SetKeyResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SetKeyResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetKeyResponse { - return new SetKeyResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetKeyResponse { - return new SetKeyResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetKeyResponse { - return new SetKeyResponse().fromJsonString(jsonString, options); - } - - static equals(a: SetKeyResponse | PlainMessage | undefined, b: SetKeyResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SetKeyResponse, a, b); - } -} +export type SetKeyResponse = Message<"livekit.proto.SetKeyResponse"> & { +}; + +/** + * Describes the message livekit.proto.SetKeyResponse. + * Use `create(SetKeyResponseSchema)` to create a new message. + */ +export const SetKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 18); /** * @generated from message livekit.proto.RatchetKeyRequest */ -export class RatchetKeyRequest extends Message { +export type RatchetKeyRequest = Message<"livekit.proto.RatchetKeyRequest"> & { /** - * @generated from field: string participant_identity = 1; + * @generated from field: required string participant_identity = 1; */ - participantIdentity = ""; + participantIdentity: string; /** - * @generated from field: int32 key_index = 2; + * @generated from field: required int32 key_index = 2; */ - keyIndex = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RatchetKeyRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "key_index", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RatchetKeyRequest { - return new RatchetKeyRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RatchetKeyRequest { - return new RatchetKeyRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RatchetKeyRequest { - return new RatchetKeyRequest().fromJsonString(jsonString, options); - } - - static equals(a: RatchetKeyRequest | PlainMessage | undefined, b: RatchetKeyRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(RatchetKeyRequest, a, b); - } -} + keyIndex: number; +}; + +/** + * Describes the message livekit.proto.RatchetKeyRequest. + * Use `create(RatchetKeyRequestSchema)` to create a new message. + */ +export const RatchetKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 19); /** * @generated from message livekit.proto.RatchetKeyResponse */ -export class RatchetKeyResponse extends Message { +export type RatchetKeyResponse = Message<"livekit.proto.RatchetKeyResponse"> & { /** * @generated from field: optional bytes new_key = 1; */ - newKey?: Uint8Array; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RatchetKeyResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "new_key", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RatchetKeyResponse { - return new RatchetKeyResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RatchetKeyResponse { - return new RatchetKeyResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RatchetKeyResponse { - return new RatchetKeyResponse().fromJsonString(jsonString, options); - } - - static equals(a: RatchetKeyResponse | PlainMessage | undefined, b: RatchetKeyResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(RatchetKeyResponse, a, b); - } -} + newKey: Uint8Array; +}; + +/** + * Describes the message livekit.proto.RatchetKeyResponse. + * Use `create(RatchetKeyResponseSchema)` to create a new message. + */ +export const RatchetKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 20); /** * @generated from message livekit.proto.GetKeyRequest */ -export class GetKeyRequest extends Message { +export type GetKeyRequest = Message<"livekit.proto.GetKeyRequest"> & { /** - * @generated from field: string participant_identity = 1; + * @generated from field: required string participant_identity = 1; */ - participantIdentity = ""; + participantIdentity: string; /** - * @generated from field: int32 key_index = 2; + * @generated from field: required int32 key_index = 2; */ - keyIndex = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.GetKeyRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "key_index", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyRequest { - return new GetKeyRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyRequest { - return new GetKeyRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetKeyRequest { - return new GetKeyRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetKeyRequest | PlainMessage | undefined, b: GetKeyRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetKeyRequest, a, b); - } -} + keyIndex: number; +}; + +/** + * Describes the message livekit.proto.GetKeyRequest. + * Use `create(GetKeyRequestSchema)` to create a new message. + */ +export const GetKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 21); /** * @generated from message livekit.proto.GetKeyResponse */ -export class GetKeyResponse extends Message { +export type GetKeyResponse = Message<"livekit.proto.GetKeyResponse"> & { /** * @generated from field: optional bytes key = 1; */ - key?: Uint8Array; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.GetKeyResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "key", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyResponse { - return new GetKeyResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyResponse { - return new GetKeyResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetKeyResponse { - return new GetKeyResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetKeyResponse | PlainMessage | undefined, b: GetKeyResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetKeyResponse, a, b); - } -} + key: Uint8Array; +}; + +/** + * Describes the message livekit.proto.GetKeyResponse. + * Use `create(GetKeyResponseSchema)` to create a new message. + */ +export const GetKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 22); /** * @generated from message livekit.proto.E2eeRequest */ -export class E2eeRequest extends Message { +export type E2eeRequest = Message<"livekit.proto.E2eeRequest"> & { /** - * @generated from field: uint64 room_handle = 1; + * @generated from field: required uint64 room_handle = 1; */ - roomHandle = protoInt64.zero; + roomHandle: bigint; /** * @generated from oneof livekit.proto.E2eeRequest.message @@ -1083,50 +549,20 @@ export class E2eeRequest extends Message { */ value: GetKeyRequest; case: "getKey"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.E2eeRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "room_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "manager_set_enabled", kind: "message", T: E2eeManagerSetEnabledRequest, oneof: "message" }, - { no: 3, name: "manager_get_frame_cryptors", kind: "message", T: E2eeManagerGetFrameCryptorsRequest, oneof: "message" }, - { no: 4, name: "cryptor_set_enabled", kind: "message", T: FrameCryptorSetEnabledRequest, oneof: "message" }, - { no: 5, name: "cryptor_set_key_index", kind: "message", T: FrameCryptorSetKeyIndexRequest, oneof: "message" }, - { no: 6, name: "set_shared_key", kind: "message", T: SetSharedKeyRequest, oneof: "message" }, - { no: 7, name: "ratchet_shared_key", kind: "message", T: RatchetSharedKeyRequest, oneof: "message" }, - { no: 8, name: "get_shared_key", kind: "message", T: GetSharedKeyRequest, oneof: "message" }, - { no: 9, name: "set_key", kind: "message", T: SetKeyRequest, oneof: "message" }, - { no: 10, name: "ratchet_key", kind: "message", T: RatchetKeyRequest, oneof: "message" }, - { no: 11, name: "get_key", kind: "message", T: GetKeyRequest, oneof: "message" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): E2eeRequest { - return new E2eeRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): E2eeRequest { - return new E2eeRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): E2eeRequest { - return new E2eeRequest().fromJsonString(jsonString, options); - } - - static equals(a: E2eeRequest | PlainMessage | undefined, b: E2eeRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(E2eeRequest, a, b); - } -} + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message livekit.proto.E2eeRequest. + * Use `create(E2eeRequestSchema)` to create a new message. + */ +export const E2eeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 23); /** * @generated from message livekit.proto.E2eeResponse */ -export class E2eeResponse extends Message { +export type E2eeResponse = Message<"livekit.proto.E2eeResponse"> & { /** * @generated from oneof livekit.proto.E2eeResponse.message */ @@ -1190,42 +626,85 @@ export class E2eeResponse extends Message { */ value: GetKeyResponse; case: "getKey"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.E2eeResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "manager_set_enabled", kind: "message", T: E2eeManagerSetEnabledResponse, oneof: "message" }, - { no: 2, name: "manager_get_frame_cryptors", kind: "message", T: E2eeManagerGetFrameCryptorsResponse, oneof: "message" }, - { no: 3, name: "cryptor_set_enabled", kind: "message", T: FrameCryptorSetEnabledResponse, oneof: "message" }, - { no: 4, name: "cryptor_set_key_index", kind: "message", T: FrameCryptorSetKeyIndexResponse, oneof: "message" }, - { no: 5, name: "set_shared_key", kind: "message", T: SetSharedKeyResponse, oneof: "message" }, - { no: 6, name: "ratchet_shared_key", kind: "message", T: RatchetSharedKeyResponse, oneof: "message" }, - { no: 7, name: "get_shared_key", kind: "message", T: GetSharedKeyResponse, oneof: "message" }, - { no: 8, name: "set_key", kind: "message", T: SetKeyResponse, oneof: "message" }, - { no: 9, name: "ratchet_key", kind: "message", T: RatchetKeyResponse, oneof: "message" }, - { no: 10, name: "get_key", kind: "message", T: GetKeyResponse, oneof: "message" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): E2eeResponse { - return new E2eeResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): E2eeResponse { - return new E2eeResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): E2eeResponse { - return new E2eeResponse().fromJsonString(jsonString, options); - } - - static equals(a: E2eeResponse | PlainMessage | undefined, b: E2eeResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(E2eeResponse, a, b); - } + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message livekit.proto.E2eeResponse. + * Use `create(E2eeResponseSchema)` to create a new message. + */ +export const E2eeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_e2ee, 24); + +/** + * @generated from enum livekit.proto.EncryptionType + */ +export enum EncryptionType { + /** + * @generated from enum value: NONE = 0; + */ + NONE = 0, + + /** + * @generated from enum value: GCM = 1; + */ + GCM = 1, + + /** + * @generated from enum value: CUSTOM = 2; + */ + CUSTOM = 2, +} + +/** + * Describes the enum livekit.proto.EncryptionType. + */ +export const EncryptionTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_e2ee, 0); + +/** + * @generated from enum livekit.proto.EncryptionState + */ +export enum EncryptionState { + /** + * @generated from enum value: NEW = 0; + */ + NEW = 0, + + /** + * @generated from enum value: OK = 1; + */ + OK = 1, + + /** + * @generated from enum value: ENCRYPTION_FAILED = 2; + */ + ENCRYPTION_FAILED = 2, + + /** + * @generated from enum value: DECRYPTION_FAILED = 3; + */ + DECRYPTION_FAILED = 3, + + /** + * @generated from enum value: MISSING_KEY = 4; + */ + MISSING_KEY = 4, + + /** + * @generated from enum value: KEY_RATCHETED = 5; + */ + KEY_RATCHETED = 5, + + /** + * @generated from enum value: INTERNAL_ERROR = 6; + */ + INTERNAL_ERROR = 6, } +/** + * Describes the enum livekit.proto.EncryptionState. + */ +export const EncryptionStateSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_e2ee, 1); + diff --git a/packages/livekit-rtc/src/proto/ffi_pb.ts b/packages/livekit-rtc/src/proto/ffi_pb.ts index 56924f6e..f1bfdd24 100644 --- a/packages/livekit-rtc/src/proto/ffi_pb.ts +++ b/packages/livekit-rtc/src/proto/ffi_pb.ts @@ -12,56 +12,29 @@ // 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" -// @generated from file ffi.proto (package livekit.proto, syntax proto3) +// @generated by protoc-gen-es v2.2.0 with parameter "target=ts" +// @generated from file ffi.proto (package livekit.proto, syntax proto2) /* eslint-disable */ -// @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; -import { ConnectCallback, ConnectRequest, ConnectResponse, DisconnectCallback, DisconnectRequest, DisconnectResponse, EditChatMessageRequest, GetSessionStatsCallback, GetSessionStatsRequest, GetSessionStatsResponse, PublishDataCallback, PublishDataRequest, PublishDataResponse, PublishSipDtmfCallback, PublishSipDtmfRequest, PublishSipDtmfResponse, PublishTrackCallback, PublishTrackRequest, PublishTrackResponse, PublishTranscriptionCallback, PublishTranscriptionRequest, PublishTranscriptionResponse, RoomEvent, SendChatMessageCallback, SendChatMessageRequest, SendChatMessageResponse, SetLocalAttributesCallback, SetLocalAttributesRequest, SetLocalAttributesResponse, SetLocalMetadataCallback, SetLocalMetadataRequest, SetLocalMetadataResponse, SetLocalNameCallback, SetLocalNameRequest, SetLocalNameResponse, SetSubscribedRequest, SetSubscribedResponse, UnpublishTrackCallback, UnpublishTrackRequest, UnpublishTrackResponse } from "./room_pb.js"; -import { CreateAudioTrackRequest, CreateAudioTrackResponse, CreateVideoTrackRequest, CreateVideoTrackResponse, EnableRemoteTrackRequest, EnableRemoteTrackResponse, GetStatsCallback, GetStatsRequest, GetStatsResponse, LocalTrackMuteRequest, LocalTrackMuteResponse, TrackEvent } from "./track_pb.js"; -import { CaptureVideoFrameRequest, CaptureVideoFrameResponse, NewVideoSourceRequest, NewVideoSourceResponse, NewVideoStreamRequest, NewVideoStreamResponse, VideoConvertRequest, VideoConvertResponse, VideoStreamEvent, VideoStreamFromParticipantRequest, VideoStreamFromParticipantResponse } from "./video_frame_pb.js"; -import { AudioStreamEvent, AudioStreamFromParticipantRequest, AudioStreamFromParticipantResponse, CaptureAudioFrameCallback, CaptureAudioFrameRequest, CaptureAudioFrameResponse, ClearAudioBufferRequest, ClearAudioBufferResponse, FlushSoxResamplerRequest, FlushSoxResamplerResponse, NewAudioResamplerRequest, NewAudioResamplerResponse, NewAudioSourceRequest, NewAudioSourceResponse, NewAudioStreamRequest, NewAudioStreamResponse, NewSoxResamplerRequest, NewSoxResamplerResponse, PushSoxResamplerRequest, PushSoxResamplerResponse, RemixAndResampleRequest, RemixAndResampleResponse } from "./audio_frame_pb.js"; -import { E2eeRequest, E2eeResponse } from "./e2ee_pb.js"; +import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { E2eeRequest, E2eeResponse } from "./e2ee_pb"; +import { file_e2ee } from "./e2ee_pb"; +import type { CreateAudioTrackRequest, CreateAudioTrackResponse, CreateVideoTrackRequest, CreateVideoTrackResponse, EnableRemoteTrackRequest, EnableRemoteTrackResponse, GetStatsCallback, GetStatsRequest, GetStatsResponse, LocalTrackMuteRequest, LocalTrackMuteResponse, TrackEvent } from "./track_pb"; +import { file_track } from "./track_pb"; +import type { ConnectCallback, ConnectRequest, ConnectResponse, DisconnectCallback, DisconnectRequest, DisconnectResponse, EditChatMessageRequest, GetSessionStatsCallback, GetSessionStatsRequest, GetSessionStatsResponse, PublishDataCallback, PublishDataRequest, PublishDataResponse, PublishSipDtmfCallback, PublishSipDtmfRequest, PublishSipDtmfResponse, PublishTrackCallback, PublishTrackRequest, PublishTrackResponse, PublishTranscriptionCallback, PublishTranscriptionRequest, PublishTranscriptionResponse, RoomEvent, SendChatMessageCallback, SendChatMessageRequest, SendChatMessageResponse, SetLocalAttributesCallback, SetLocalAttributesRequest, SetLocalAttributesResponse, SetLocalMetadataCallback, SetLocalMetadataRequest, SetLocalMetadataResponse, SetLocalNameCallback, SetLocalNameRequest, SetLocalNameResponse, SetSubscribedRequest, SetSubscribedResponse, UnpublishTrackCallback, UnpublishTrackRequest, UnpublishTrackResponse } from "./room_pb"; +import { file_room } from "./room_pb"; +import type { CaptureVideoFrameRequest, CaptureVideoFrameResponse, NewVideoSourceRequest, NewVideoSourceResponse, NewVideoStreamRequest, NewVideoStreamResponse, VideoConvertRequest, VideoConvertResponse, VideoStreamEvent, VideoStreamFromParticipantRequest, VideoStreamFromParticipantResponse } from "./video_frame_pb"; +import { file_video_frame } from "./video_frame_pb"; +import type { AudioStreamEvent, AudioStreamFromParticipantRequest, AudioStreamFromParticipantResponse, CaptureAudioFrameCallback, CaptureAudioFrameRequest, CaptureAudioFrameResponse, ClearAudioBufferRequest, ClearAudioBufferResponse, FlushSoxResamplerRequest, FlushSoxResamplerResponse, NewAudioResamplerRequest, NewAudioResamplerResponse, NewAudioSourceRequest, NewAudioSourceResponse, NewAudioStreamRequest, NewAudioStreamResponse, NewSoxResamplerRequest, NewSoxResamplerResponse, PushSoxResamplerRequest, PushSoxResamplerResponse, RemixAndResampleRequest, RemixAndResampleResponse } from "./audio_frame_pb"; +import { file_audio_frame } from "./audio_frame_pb"; +import type { Message } from "@bufbuild/protobuf"; /** - * @generated from enum livekit.proto.LogLevel + * Describes the file ffi.proto. */ -export enum LogLevel { - /** - * @generated from enum value: LOG_ERROR = 0; - */ - LOG_ERROR = 0, - - /** - * @generated from enum value: LOG_WARN = 1; - */ - LOG_WARN = 1, - - /** - * @generated from enum value: LOG_INFO = 2; - */ - LOG_INFO = 2, - - /** - * @generated from enum value: LOG_DEBUG = 3; - */ - LOG_DEBUG = 3, - - /** - * @generated from enum value: LOG_TRACE = 4; - */ - LOG_TRACE = 4, -} -// Retrieve enum metadata with: proto3.getEnumType(LogLevel) -proto3.util.setEnumType(LogLevel, "livekit.proto.LogLevel", [ - { no: 0, name: "LOG_ERROR" }, - { no: 1, name: "LOG_WARN" }, - { no: 2, name: "LOG_INFO" }, - { no: 3, name: "LOG_DEBUG" }, - { no: 4, name: "LOG_TRACE" }, -]); +export const file_ffi: GenFile = /*@__PURE__*/ + fileDesc("CglmZmkucHJvdG8SDWxpdmVraXQucHJvdG8i/BIKCkZmaVJlcXVlc3QSMAoHZGlzcG9zZRgCIAEoCzIdLmxpdmVraXQucHJvdG8uRGlzcG9zZVJlcXVlc3RIABIwCgdjb25uZWN0GAMgASgLMh0ubGl2ZWtpdC5wcm90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ABI0CglnZXRfc3RhdHMYESABKAsyHy5saXZla2l0LnByb3RvLkdldFN0YXRzQ2FsbGJhY2tIABInCgRsb2dzGBIgASgLMhcubGl2ZWtpdC5wcm90by5Mb2dCYXRjaEgAEkMKEWdldF9zZXNzaW9uX3N0YXRzGBMgASgLMiYubGl2ZWtpdC5wcm90by5HZXRTZXNzaW9uU3RhdHNDYWxsYmFja0gAEiUKBXBhbmljGBQgASgLMhQubGl2ZWtpdC5wcm90by5QYW5pY0gAEkEKEHB1Ymxpc2hfc2lwX2R0bWYYFSABKAsyJS5saXZla2l0LnByb3RvLlB1Ymxpc2hTaXBEdG1mQ2FsbGJhY2tIABI+CgxjaGF0X21lc3NhZ2UYFiABKAsyJi5saXZla2l0LnByb3RvLlNlbmRDaGF0TWVzc2FnZUNhbGxiYWNrSABCCQoHbWVzc2FnZSIfCg5EaXNwb3NlUmVxdWVzdBINCgVhc3luYxgBIAIoCCIjCg9EaXNwb3NlUmVzcG9uc2USEAoIYXN5bmNfaWQYASABKAQiIwoPRGlzcG9zZUNhbGxiYWNrEhAKCGFzeW5jX2lkGAEgAigEIoUBCglMb2dSZWNvcmQSJgoFbGV2ZWwYASACKA4yFy5saXZla2l0LnByb3RvLkxvZ0xldmVsEg4KBnRhcmdldBgCIAIoCRITCgttb2R1bGVfcGF0aBgDIAEoCRIMCgRmaWxlGAQgASgJEgwKBGxpbmUYBSABKA0SDwoHbWVzc2FnZRgGIAIoCSI1CghMb2dCYXRjaBIpCgdyZWNvcmRzGAEgAygLMhgubGl2ZWtpdC5wcm90by5Mb2dSZWNvcmQiGAoFUGFuaWMSDwoHbWVzc2FnZRgBIAIoCSpTCghMb2dMZXZlbBINCglMT0dfRVJST1IQABIMCghMT0dfV0FSThABEgwKCExPR19JTkZPEAISDQoJTE9HX0RFQlVHEAMSDQoJTE9HX1RSQUNFEARCEKoCDUxpdmVLaXQuUHJvdG8", [file_e2ee, file_track, file_room, file_video_frame, file_audio_frame]); /** * This is the input of livekit_ffi_request function @@ -69,7 +42,7 @@ proto3.util.setEnumType(LogLevel, "livekit.proto.LogLevel", [ * * @generated from message livekit.proto.FfiRequest */ -export class FfiRequest extends Message { +export type FfiRequest = Message<"livekit.proto.FfiRequest"> & { /** * @generated from oneof livekit.proto.FfiRequest.message */ @@ -297,77 +270,22 @@ export class FfiRequest extends Message { */ value: EditChatMessageRequest; case: "editChatMessage"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.FfiRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 2, name: "dispose", kind: "message", T: DisposeRequest, oneof: "message" }, - { no: 3, name: "connect", kind: "message", T: ConnectRequest, oneof: "message" }, - { no: 4, name: "disconnect", kind: "message", T: DisconnectRequest, oneof: "message" }, - { no: 5, name: "publish_track", kind: "message", T: PublishTrackRequest, oneof: "message" }, - { no: 6, name: "unpublish_track", kind: "message", T: UnpublishTrackRequest, oneof: "message" }, - { no: 7, name: "publish_data", kind: "message", T: PublishDataRequest, oneof: "message" }, - { no: 8, name: "set_subscribed", kind: "message", T: SetSubscribedRequest, oneof: "message" }, - { no: 9, name: "set_local_metadata", kind: "message", T: SetLocalMetadataRequest, oneof: "message" }, - { no: 10, name: "set_local_name", kind: "message", T: SetLocalNameRequest, oneof: "message" }, - { no: 11, name: "set_local_attributes", kind: "message", T: SetLocalAttributesRequest, oneof: "message" }, - { no: 12, name: "get_session_stats", kind: "message", T: GetSessionStatsRequest, oneof: "message" }, - { no: 13, name: "publish_transcription", kind: "message", T: PublishTranscriptionRequest, oneof: "message" }, - { no: 14, name: "publish_sip_dtmf", kind: "message", T: PublishSipDtmfRequest, oneof: "message" }, - { no: 15, name: "create_video_track", kind: "message", T: CreateVideoTrackRequest, oneof: "message" }, - { no: 16, name: "create_audio_track", kind: "message", T: CreateAudioTrackRequest, oneof: "message" }, - { no: 17, name: "local_track_mute", kind: "message", T: LocalTrackMuteRequest, oneof: "message" }, - { no: 18, name: "enable_remote_track", kind: "message", T: EnableRemoteTrackRequest, oneof: "message" }, - { no: 19, name: "get_stats", kind: "message", T: GetStatsRequest, oneof: "message" }, - { no: 20, name: "new_video_stream", kind: "message", T: NewVideoStreamRequest, oneof: "message" }, - { no: 21, name: "new_video_source", kind: "message", T: NewVideoSourceRequest, oneof: "message" }, - { no: 22, name: "capture_video_frame", kind: "message", T: CaptureVideoFrameRequest, oneof: "message" }, - { no: 23, name: "video_convert", kind: "message", T: VideoConvertRequest, oneof: "message" }, - { no: 24, name: "video_stream_from_participant", kind: "message", T: VideoStreamFromParticipantRequest, oneof: "message" }, - { no: 25, name: "new_audio_stream", kind: "message", T: NewAudioStreamRequest, oneof: "message" }, - { no: 26, name: "new_audio_source", kind: "message", T: NewAudioSourceRequest, oneof: "message" }, - { no: 27, name: "capture_audio_frame", kind: "message", T: CaptureAudioFrameRequest, oneof: "message" }, - { no: 28, name: "clear_audio_buffer", kind: "message", T: ClearAudioBufferRequest, oneof: "message" }, - { no: 29, name: "new_audio_resampler", kind: "message", T: NewAudioResamplerRequest, oneof: "message" }, - { no: 30, name: "remix_and_resample", kind: "message", T: RemixAndResampleRequest, oneof: "message" }, - { no: 31, name: "e2ee", kind: "message", T: E2eeRequest, oneof: "message" }, - { no: 32, name: "audio_stream_from_participant", kind: "message", T: AudioStreamFromParticipantRequest, oneof: "message" }, - { no: 33, name: "new_sox_resampler", kind: "message", T: NewSoxResamplerRequest, oneof: "message" }, - { no: 34, name: "push_sox_resampler", kind: "message", T: PushSoxResamplerRequest, oneof: "message" }, - { no: 35, name: "flush_sox_resampler", kind: "message", T: FlushSoxResamplerRequest, oneof: "message" }, - { no: 36, name: "send_chat_message", kind: "message", T: SendChatMessageRequest, oneof: "message" }, - { no: 37, name: "edit_chat_message", kind: "message", T: EditChatMessageRequest, oneof: "message" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): FfiRequest { - return new FfiRequest().fromBinary(bytes, options); - } + } | { case: undefined; value?: undefined }; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): FfiRequest { - return new FfiRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): FfiRequest { - return new FfiRequest().fromJsonString(jsonString, options); - } - - static equals(a: FfiRequest | PlainMessage | undefined, b: FfiRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(FfiRequest, a, b); - } -} +/** + * Describes the message livekit.proto.FfiRequest. + * Use `create(FfiRequestSchema)` to create a new message. + */ +export const FfiRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ffi, 0); /** * This is the output of livekit_ffi_request function. * * @generated from message livekit.proto.FfiResponse */ -export class FfiResponse extends Message { +export type FfiResponse = Message<"livekit.proto.FfiResponse"> & { /** * @generated from oneof livekit.proto.FfiResponse.message */ @@ -589,69 +507,15 @@ export class FfiResponse extends Message { */ value: SendChatMessageResponse; case: "sendChatMessage"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.FfiResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 2, name: "dispose", kind: "message", T: DisposeResponse, oneof: "message" }, - { no: 3, name: "connect", kind: "message", T: ConnectResponse, oneof: "message" }, - { no: 4, name: "disconnect", kind: "message", T: DisconnectResponse, oneof: "message" }, - { no: 5, name: "publish_track", kind: "message", T: PublishTrackResponse, oneof: "message" }, - { no: 6, name: "unpublish_track", kind: "message", T: UnpublishTrackResponse, oneof: "message" }, - { no: 7, name: "publish_data", kind: "message", T: PublishDataResponse, oneof: "message" }, - { no: 8, name: "set_subscribed", kind: "message", T: SetSubscribedResponse, oneof: "message" }, - { no: 9, name: "set_local_metadata", kind: "message", T: SetLocalMetadataResponse, oneof: "message" }, - { no: 10, name: "set_local_name", kind: "message", T: SetLocalNameResponse, oneof: "message" }, - { no: 11, name: "set_local_attributes", kind: "message", T: SetLocalAttributesResponse, oneof: "message" }, - { no: 12, name: "get_session_stats", kind: "message", T: GetSessionStatsResponse, oneof: "message" }, - { no: 13, name: "publish_transcription", kind: "message", T: PublishTranscriptionResponse, oneof: "message" }, - { no: 14, name: "publish_sip_dtmf", kind: "message", T: PublishSipDtmfResponse, oneof: "message" }, - { no: 15, name: "create_video_track", kind: "message", T: CreateVideoTrackResponse, oneof: "message" }, - { no: 16, name: "create_audio_track", kind: "message", T: CreateAudioTrackResponse, oneof: "message" }, - { no: 17, name: "local_track_mute", kind: "message", T: LocalTrackMuteResponse, oneof: "message" }, - { no: 18, name: "enable_remote_track", kind: "message", T: EnableRemoteTrackResponse, oneof: "message" }, - { no: 19, name: "get_stats", kind: "message", T: GetStatsResponse, oneof: "message" }, - { no: 20, name: "new_video_stream", kind: "message", T: NewVideoStreamResponse, oneof: "message" }, - { no: 21, name: "new_video_source", kind: "message", T: NewVideoSourceResponse, oneof: "message" }, - { no: 22, name: "capture_video_frame", kind: "message", T: CaptureVideoFrameResponse, oneof: "message" }, - { no: 23, name: "video_convert", kind: "message", T: VideoConvertResponse, oneof: "message" }, - { no: 24, name: "video_stream_from_participant", kind: "message", T: VideoStreamFromParticipantResponse, oneof: "message" }, - { no: 25, name: "new_audio_stream", kind: "message", T: NewAudioStreamResponse, oneof: "message" }, - { no: 26, name: "new_audio_source", kind: "message", T: NewAudioSourceResponse, oneof: "message" }, - { no: 27, name: "capture_audio_frame", kind: "message", T: CaptureAudioFrameResponse, oneof: "message" }, - { no: 28, name: "clear_audio_buffer", kind: "message", T: ClearAudioBufferResponse, oneof: "message" }, - { no: 29, name: "new_audio_resampler", kind: "message", T: NewAudioResamplerResponse, oneof: "message" }, - { no: 30, name: "remix_and_resample", kind: "message", T: RemixAndResampleResponse, oneof: "message" }, - { no: 31, name: "audio_stream_from_participant", kind: "message", T: AudioStreamFromParticipantResponse, oneof: "message" }, - { no: 32, name: "e2ee", kind: "message", T: E2eeResponse, oneof: "message" }, - { no: 33, name: "new_sox_resampler", kind: "message", T: NewSoxResamplerResponse, oneof: "message" }, - { no: 34, name: "push_sox_resampler", kind: "message", T: PushSoxResamplerResponse, oneof: "message" }, - { no: 35, name: "flush_sox_resampler", kind: "message", T: FlushSoxResamplerResponse, oneof: "message" }, - { no: 36, name: "send_chat_message", kind: "message", T: SendChatMessageResponse, oneof: "message" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): FfiResponse { - return new FfiResponse().fromBinary(bytes, options); - } + } | { case: undefined; value?: undefined }; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): FfiResponse { - return new FfiResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): FfiResponse { - return new FfiResponse().fromJsonString(jsonString, options); - } - - static equals(a: FfiResponse | PlainMessage | undefined, b: FfiResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(FfiResponse, a, b); - } -} +/** + * Describes the message livekit.proto.FfiResponse. + * Use `create(FfiResponseSchema)` to create a new message. + */ +export const FfiResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ffi, 1); /** * To minimize complexity, participant events are not included in the protocol. @@ -660,7 +524,7 @@ export class FfiResponse extends Message { * * @generated from message livekit.proto.FfiEvent */ -export class FfiEvent extends Message { +export type FfiEvent = Message<"livekit.proto.FfiEvent"> & { /** * @generated from oneof livekit.proto.FfiEvent.message */ @@ -790,55 +654,15 @@ export class FfiEvent extends Message { */ value: SendChatMessageCallback; case: "chatMessage"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.FfiEvent"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "room_event", kind: "message", T: RoomEvent, oneof: "message" }, - { no: 2, name: "track_event", kind: "message", T: TrackEvent, oneof: "message" }, - { no: 3, name: "video_stream_event", kind: "message", T: VideoStreamEvent, oneof: "message" }, - { no: 4, name: "audio_stream_event", kind: "message", T: AudioStreamEvent, oneof: "message" }, - { no: 5, name: "connect", kind: "message", T: ConnectCallback, oneof: "message" }, - { no: 7, name: "disconnect", kind: "message", T: DisconnectCallback, oneof: "message" }, - { no: 8, name: "dispose", kind: "message", T: DisposeCallback, oneof: "message" }, - { no: 9, name: "publish_track", kind: "message", T: PublishTrackCallback, oneof: "message" }, - { no: 10, name: "unpublish_track", kind: "message", T: UnpublishTrackCallback, oneof: "message" }, - { no: 11, name: "publish_data", kind: "message", T: PublishDataCallback, oneof: "message" }, - { no: 12, name: "publish_transcription", kind: "message", T: PublishTranscriptionCallback, oneof: "message" }, - { no: 13, name: "capture_audio_frame", kind: "message", T: CaptureAudioFrameCallback, oneof: "message" }, - { no: 14, name: "set_local_metadata", kind: "message", T: SetLocalMetadataCallback, oneof: "message" }, - { no: 15, name: "set_local_name", kind: "message", T: SetLocalNameCallback, oneof: "message" }, - { no: 16, name: "set_local_attributes", kind: "message", T: SetLocalAttributesCallback, oneof: "message" }, - { no: 17, name: "get_stats", kind: "message", T: GetStatsCallback, oneof: "message" }, - { no: 18, name: "logs", kind: "message", T: LogBatch, oneof: "message" }, - { no: 19, name: "get_session_stats", kind: "message", T: GetSessionStatsCallback, oneof: "message" }, - { no: 20, name: "panic", kind: "message", T: Panic, oneof: "message" }, - { no: 21, name: "publish_sip_dtmf", kind: "message", T: PublishSipDtmfCallback, oneof: "message" }, - { no: 22, name: "chat_message", kind: "message", T: SendChatMessageCallback, oneof: "message" }, - ]); + } | { case: undefined; value?: undefined }; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): FfiEvent { - return new FfiEvent().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): FfiEvent { - return new FfiEvent().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): FfiEvent { - return new FfiEvent().fromJsonString(jsonString, options); - } - - static equals(a: FfiEvent | PlainMessage | undefined, b: FfiEvent | PlainMessage | undefined): boolean { - return proto3.util.equals(FfiEvent, a, b); - } -} +/** + * Describes the message livekit.proto.FfiEvent. + * Use `create(FfiEventSchema)` to create a new message. + */ +export const FfiEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ffi, 2); /** * Stop all rooms synchronously (Do we need async here?). @@ -847,256 +671,167 @@ export class FfiEvent extends Message { * * @generated from message livekit.proto.DisposeRequest */ -export class DisposeRequest extends Message { +export type DisposeRequest = Message<"livekit.proto.DisposeRequest"> & { /** - * @generated from field: bool async = 1; + * @generated from field: required bool async = 1; */ - async = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.DisposeRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); + async: boolean; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): DisposeRequest { - return new DisposeRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DisposeRequest { - return new DisposeRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DisposeRequest { - return new DisposeRequest().fromJsonString(jsonString, options); - } - - static equals(a: DisposeRequest | PlainMessage | undefined, b: DisposeRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(DisposeRequest, a, b); - } -} +/** + * Describes the message livekit.proto.DisposeRequest. + * Use `create(DisposeRequestSchema)` to create a new message. + */ +export const DisposeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ffi, 3); /** * @generated from message livekit.proto.DisposeResponse */ -export class DisposeResponse extends Message { +export type DisposeResponse = Message<"livekit.proto.DisposeResponse"> & { /** * None if sync * * @generated from field: optional uint64 async_id = 1; */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + asyncId: bigint; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.DisposeResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DisposeResponse { - return new DisposeResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DisposeResponse { - return new DisposeResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DisposeResponse { - return new DisposeResponse().fromJsonString(jsonString, options); - } - - static equals(a: DisposeResponse | PlainMessage | undefined, b: DisposeResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(DisposeResponse, a, b); - } -} +/** + * Describes the message livekit.proto.DisposeResponse. + * Use `create(DisposeResponseSchema)` to create a new message. + */ +export const DisposeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ffi, 4); /** * @generated from message livekit.proto.DisposeCallback */ -export class DisposeCallback extends Message { +export type DisposeCallback = Message<"livekit.proto.DisposeCallback"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + asyncId: bigint; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.DisposeCallback"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DisposeCallback { - return new DisposeCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DisposeCallback { - return new DisposeCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DisposeCallback { - return new DisposeCallback().fromJsonString(jsonString, options); - } - - static equals(a: DisposeCallback | PlainMessage | undefined, b: DisposeCallback | PlainMessage | undefined): boolean { - return proto3.util.equals(DisposeCallback, a, b); - } -} +/** + * Describes the message livekit.proto.DisposeCallback. + * Use `create(DisposeCallbackSchema)` to create a new message. + */ +export const DisposeCallbackSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ffi, 5); /** * @generated from message livekit.proto.LogRecord */ -export class LogRecord extends Message { +export type LogRecord = Message<"livekit.proto.LogRecord"> & { /** - * @generated from field: livekit.proto.LogLevel level = 1; + * @generated from field: required livekit.proto.LogLevel level = 1; */ - level = LogLevel.LOG_ERROR; + level: LogLevel; /** * e.g "livekit", "libwebrtc", "tokio-tungstenite", etc... * - * @generated from field: string target = 2; + * @generated from field: required string target = 2; */ - target = ""; + target: string; /** * @generated from field: optional string module_path = 3; */ - modulePath?: string; + modulePath: string; /** * @generated from field: optional string file = 4; */ - file?: string; + file: string; /** * @generated from field: optional uint32 line = 5; */ - line?: number; + line: number; /** - * @generated from field: string message = 6; + * @generated from field: required string message = 6; */ - message = ""; + message: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.LogRecord"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "level", kind: "enum", T: proto3.getEnumType(LogLevel) }, - { no: 2, name: "target", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "module_path", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "file", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "line", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, - { no: 6, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): LogRecord { - return new LogRecord().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): LogRecord { - return new LogRecord().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): LogRecord { - return new LogRecord().fromJsonString(jsonString, options); - } - - static equals(a: LogRecord | PlainMessage | undefined, b: LogRecord | PlainMessage | undefined): boolean { - return proto3.util.equals(LogRecord, a, b); - } -} +/** + * Describes the message livekit.proto.LogRecord. + * Use `create(LogRecordSchema)` to create a new message. + */ +export const LogRecordSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ffi, 6); /** * @generated from message livekit.proto.LogBatch */ -export class LogBatch extends Message { +export type LogBatch = Message<"livekit.proto.LogBatch"> & { /** * @generated from field: repeated livekit.proto.LogRecord records = 1; */ - records: LogRecord[] = []; + records: LogRecord[]; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.LogBatch"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "records", kind: "message", T: LogRecord, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): LogBatch { - return new LogBatch().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): LogBatch { - return new LogBatch().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): LogBatch { - return new LogBatch().fromJsonString(jsonString, options); - } - - static equals(a: LogBatch | PlainMessage | undefined, b: LogBatch | PlainMessage | undefined): boolean { - return proto3.util.equals(LogBatch, a, b); - } -} +/** + * Describes the message livekit.proto.LogBatch. + * Use `create(LogBatchSchema)` to create a new message. + */ +export const LogBatchSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ffi, 7); /** * @generated from message livekit.proto.Panic */ -export class Panic extends Message { +export type Panic = Message<"livekit.proto.Panic"> & { /** - * @generated from field: string message = 1; + * @generated from field: required string message = 1; */ - message = ""; + message: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +/** + * Describes the message livekit.proto.Panic. + * Use `create(PanicSchema)` to create a new message. + */ +export const PanicSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ffi, 8); - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.Panic"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); +/** + * @generated from enum livekit.proto.LogLevel + */ +export enum LogLevel { + /** + * @generated from enum value: LOG_ERROR = 0; + */ + LOG_ERROR = 0, - static fromBinary(bytes: Uint8Array, options?: Partial): Panic { - return new Panic().fromBinary(bytes, options); - } + /** + * @generated from enum value: LOG_WARN = 1; + */ + LOG_WARN = 1, - static fromJson(jsonValue: JsonValue, options?: Partial): Panic { - return new Panic().fromJson(jsonValue, options); - } + /** + * @generated from enum value: LOG_INFO = 2; + */ + LOG_INFO = 2, - static fromJsonString(jsonString: string, options?: Partial): Panic { - return new Panic().fromJsonString(jsonString, options); - } + /** + * @generated from enum value: LOG_DEBUG = 3; + */ + LOG_DEBUG = 3, - static equals(a: Panic | PlainMessage | undefined, b: Panic | PlainMessage | undefined): boolean { - return proto3.util.equals(Panic, a, b); - } + /** + * @generated from enum value: LOG_TRACE = 4; + */ + LOG_TRACE = 4, } +/** + * Describes the enum livekit.proto.LogLevel. + */ +export const LogLevelSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_ffi, 0); + diff --git a/packages/livekit-rtc/src/proto/handle_pb.ts b/packages/livekit-rtc/src/proto/handle_pb.ts index cbb0bcef..ded2c866 100644 --- a/packages/livekit-rtc/src/proto/handle_pb.ts +++ b/packages/livekit-rtc/src/proto/handle_pb.ts @@ -12,13 +12,19 @@ // 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" -// @generated from file handle.proto (package livekit.proto, syntax proto3) +// @generated by protoc-gen-es v2.2.0 with parameter "target=ts" +// @generated from file handle.proto (package livekit.proto, syntax proto2) /* eslint-disable */ -// @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file handle.proto. + */ +export const file_handle: GenFile = /*@__PURE__*/ + fileDesc("CgxoYW5kbGUucHJvdG8SDWxpdmVraXQucHJvdG8iHAoORmZpT3duZWRIYW5kbGUSCgoCaWQYASACKARCEKoCDUxpdmVLaXQuUHJvdG8"); /** * # Safety @@ -33,37 +39,17 @@ import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; * * @generated from message livekit.proto.FfiOwnedHandle */ -export class FfiOwnedHandle extends Message { +export type FfiOwnedHandle = Message<"livekit.proto.FfiOwnedHandle"> & { /** - * @generated from field: uint64 id = 1; + * @generated from field: required uint64 id = 1; */ - id = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.FfiOwnedHandle"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); + id: bigint; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): FfiOwnedHandle { - return new FfiOwnedHandle().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): FfiOwnedHandle { - return new FfiOwnedHandle().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): FfiOwnedHandle { - return new FfiOwnedHandle().fromJsonString(jsonString, options); - } - - static equals(a: FfiOwnedHandle | PlainMessage | undefined, b: FfiOwnedHandle | PlainMessage | undefined): boolean { - return proto3.util.equals(FfiOwnedHandle, a, b); - } -} +/** + * Describes the message livekit.proto.FfiOwnedHandle. + * Use `create(FfiOwnedHandleSchema)` to create a new message. + */ +export const FfiOwnedHandleSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_handle, 0); diff --git a/packages/livekit-rtc/src/proto/participant_pb.ts b/packages/livekit-rtc/src/proto/participant_pb.ts index c0d03f9a..60497e9a 100644 --- a/packages/livekit-rtc/src/proto/participant_pb.ts +++ b/packages/livekit-rtc/src/proto/participant_pb.ts @@ -12,160 +12,119 @@ // 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" -// @generated from file participant.proto (package livekit.proto, syntax proto3) +// @generated by protoc-gen-es v2.2.0 with parameter "target=ts" +// @generated from file participant.proto (package livekit.proto, syntax proto2) /* eslint-disable */ -// @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; -import { FfiOwnedHandle } from "./handle_pb.js"; +import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { FfiOwnedHandle } from "./handle_pb"; +import { file_handle } from "./handle_pb"; +import type { Message } from "@bufbuild/protobuf"; /** - * @generated from enum livekit.proto.ParticipantKind + * Describes the file participant.proto. */ -export enum ParticipantKind { +export const file_participant: GenFile = /*@__PURE__*/ + fileDesc("ChFwYXJ0aWNpcGFudC5wcm90bxINbGl2ZWtpdC5wcm90byL1AQoPUGFydGljaXBhbnRJbmZvEgsKA3NpZBgBIAIoCRIMCgRuYW1lGAIgAigJEhAKCGlkZW50aXR5GAMgAigJEhAKCG1ldGFkYXRhGAQgAigJEkIKCmF0dHJpYnV0ZXMYBSADKAsyLi5saXZla2l0LnByb3RvLlBhcnRpY2lwYW50SW5mby5BdHRyaWJ1dGVzRW50cnkSLAoEa2luZBgGIAIoDjIeLmxpdmVraXQucHJvdG8uUGFydGljaXBhbnRLaW5kGjEKD0F0dHJpYnV0ZXNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBIm8KEE93bmVkUGFydGljaXBhbnQSLQoGaGFuZGxlGAEgAigLMh0ubGl2ZWtpdC5wcm90by5GZmlPd25lZEhhbmRsZRIsCgRpbmZvGAIgAigLMh4ubGl2ZWtpdC5wcm90by5QYXJ0aWNpcGFudEluZm8qoQEKD1BhcnRpY2lwYW50S2luZBIdChlQQVJUSUNJUEFOVF9LSU5EX1NUQU5EQVJEEAASHAoYUEFSVElDSVBBTlRfS0lORF9JTkdSRVNTEAESGwoXUEFSVElDSVBBTlRfS0lORF9FR1JFU1MQAhIYChRQQVJUSUNJUEFOVF9LSU5EX1NJUBADEhoKFlBBUlRJQ0lQQU5UX0tJTkRfQUdFTlQQBEIQqgINTGl2ZUtpdC5Qcm90bw", [file_handle]); + +/** + * @generated from message livekit.proto.ParticipantInfo + */ +export type ParticipantInfo = Message<"livekit.proto.ParticipantInfo"> & { /** - * @generated from enum value: PARTICIPANT_KIND_STANDARD = 0; + * @generated from field: required string sid = 1; */ - STANDARD = 0, + sid: string; /** - * @generated from enum value: PARTICIPANT_KIND_INGRESS = 1; + * @generated from field: required string name = 2; */ - INGRESS = 1, + name: string; /** - * @generated from enum value: PARTICIPANT_KIND_EGRESS = 2; + * @generated from field: required string identity = 3; */ - EGRESS = 2, + identity: string; /** - * @generated from enum value: PARTICIPANT_KIND_SIP = 3; + * @generated from field: required string metadata = 4; */ - SIP = 3, + metadata: string; /** - * @generated from enum value: PARTICIPANT_KIND_AGENT = 4; + * @generated from field: map attributes = 5; */ - AGENT = 4, -} -// Retrieve enum metadata with: proto3.getEnumType(ParticipantKind) -proto3.util.setEnumType(ParticipantKind, "livekit.proto.ParticipantKind", [ - { no: 0, name: "PARTICIPANT_KIND_STANDARD" }, - { no: 1, name: "PARTICIPANT_KIND_INGRESS" }, - { no: 2, name: "PARTICIPANT_KIND_EGRESS" }, - { no: 3, name: "PARTICIPANT_KIND_SIP" }, - { no: 4, name: "PARTICIPANT_KIND_AGENT" }, -]); + attributes: { [key: string]: string }; -/** - * @generated from message livekit.proto.ParticipantInfo - */ -export class ParticipantInfo extends Message { /** - * @generated from field: string sid = 1; + * @generated from field: required livekit.proto.ParticipantKind kind = 6; */ - sid = ""; + kind: ParticipantKind; +}; + +/** + * Describes the message livekit.proto.ParticipantInfo. + * Use `create(ParticipantInfoSchema)` to create a new message. + */ +export const ParticipantInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_participant, 0); +/** + * @generated from message livekit.proto.OwnedParticipant + */ +export type OwnedParticipant = Message<"livekit.proto.OwnedParticipant"> & { /** - * @generated from field: string name = 2; + * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; */ - name = ""; + handle?: FfiOwnedHandle; /** - * @generated from field: string identity = 3; + * @generated from field: required livekit.proto.ParticipantInfo info = 2; */ - identity = ""; + info?: ParticipantInfo; +}; +/** + * Describes the message livekit.proto.OwnedParticipant. + * Use `create(OwnedParticipantSchema)` to create a new message. + */ +export const OwnedParticipantSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_participant, 1); + +/** + * @generated from enum livekit.proto.ParticipantKind + */ +export enum ParticipantKind { /** - * @generated from field: string metadata = 4; + * @generated from enum value: PARTICIPANT_KIND_STANDARD = 0; */ - metadata = ""; + STANDARD = 0, /** - * @generated from field: map attributes = 5; + * @generated from enum value: PARTICIPANT_KIND_INGRESS = 1; */ - attributes: { [key: string]: string } = {}; + INGRESS = 1, /** - * @generated from field: livekit.proto.ParticipantKind kind = 6; + * @generated from enum value: PARTICIPANT_KIND_EGRESS = 2; */ - kind = ParticipantKind.STANDARD; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.ParticipantInfo"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - { no: 6, name: "kind", kind: "enum", T: proto3.getEnumType(ParticipantKind) }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantInfo { - return new ParticipantInfo().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantInfo { - return new ParticipantInfo().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ParticipantInfo { - return new ParticipantInfo().fromJsonString(jsonString, options); - } - - static equals(a: ParticipantInfo | PlainMessage | undefined, b: ParticipantInfo | PlainMessage | undefined): boolean { - return proto3.util.equals(ParticipantInfo, a, b); - } -} + EGRESS = 2, -/** - * @generated from message livekit.proto.OwnedParticipant - */ -export class OwnedParticipant extends Message { /** - * @generated from field: livekit.proto.FfiOwnedHandle handle = 1; + * @generated from enum value: PARTICIPANT_KIND_SIP = 3; */ - handle?: FfiOwnedHandle; + SIP = 3, /** - * @generated from field: livekit.proto.ParticipantInfo info = 2; + * @generated from enum value: PARTICIPANT_KIND_AGENT = 4; */ - info?: ParticipantInfo; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.OwnedParticipant"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle }, - { no: 2, name: "info", kind: "message", T: ParticipantInfo }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OwnedParticipant { - return new OwnedParticipant().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OwnedParticipant { - return new OwnedParticipant().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OwnedParticipant { - return new OwnedParticipant().fromJsonString(jsonString, options); - } - - static equals(a: OwnedParticipant | PlainMessage | undefined, b: OwnedParticipant | PlainMessage | undefined): boolean { - return proto3.util.equals(OwnedParticipant, a, b); - } + AGENT = 4, } +/** + * Describes the enum livekit.proto.ParticipantKind. + */ +export const ParticipantKindSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_participant, 0); + diff --git a/packages/livekit-rtc/src/proto/room_pb.ts b/packages/livekit-rtc/src/proto/room_pb.ts index 219f431c..a415ec5c 100644 --- a/packages/livekit-rtc/src/proto/room_pb.ts +++ b/packages/livekit-rtc/src/proto/room_pb.ts @@ -12,2305 +12,1225 @@ // 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" -// @generated from file room.proto (package livekit.proto, syntax proto3) +// @generated by protoc-gen-es v2.2.0 with parameter "target=ts" +// @generated from file room.proto (package livekit.proto, syntax proto2) /* eslint-disable */ -// @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; -import { OwnedParticipant } from "./participant_pb.js"; -import { OwnedTrack, OwnedTrackPublication, TrackSource } from "./track_pb.js"; -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 type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { E2eeOptions, EncryptionState } from "./e2ee_pb"; +import { file_e2ee } from "./e2ee_pb"; +import type { FfiOwnedHandle } from "./handle_pb"; +import { file_handle } from "./handle_pb"; +import type { OwnedParticipant } from "./participant_pb"; +import { file_participant } from "./participant_pb"; +import type { OwnedTrack, OwnedTrackPublication, TrackSource } from "./track_pb"; +import { file_track } from "./track_pb"; +import type { VideoCodec } from "./video_frame_pb"; +import { file_video_frame } from "./video_frame_pb"; +import type { RtcStats } from "./stats_pb"; +import { file_stats } from "./stats_pb"; +import type { Message } from "@bufbuild/protobuf"; /** - * @generated from enum livekit.proto.IceTransportType + * Describes the file room.proto. */ -export enum IceTransportType { +export const file_room: GenFile = /*@__PURE__*/ + fileDesc("Cgpyb29tLnByb3RvEg1saXZla2l0LnByb3RvIlkKDkNvbm5lY3RSZXF1ZXN0EgsKA3VybBgBIAIoCRINCgV0b2tlbhgCIAIoCRIrCgdvcHRpb25zGAMgAigLMhoubGl2ZWtpdC5wcm90by5Sb29tT3B0aW9ucyIjCg9Db25uZWN0UmVzcG9uc2USEAoIYXN5bmNfaWQYASACKAQivwMKD0Nvbm5lY3RDYWxsYmFjaxIQCghhc3luY19pZBgBIAIoBBIPCgVlcnJvchgCIAEoCUgAEjcKBnJlc3VsdBgDIAEoCzIlLmxpdmVraXQucHJvdG8uQ29ubmVjdENhbGxiYWNrLlJlc3VsdEgAGokBChVQYXJ0aWNpcGFudFdpdGhUcmFja3MSNAoLcGFydGljaXBhbnQYASACKAsyHy5saXZla2l0LnByb3RvLk93bmVkUGFydGljaXBhbnQSOgoMcHVibGljYXRpb25zGAIgAygLMiQubGl2ZWtpdC5wcm90by5Pd25lZFRyYWNrUHVibGljYXRpb24auAEKBlJlc3VsdBImCgRyb29tGAEgAigLMhgubGl2ZWtpdC5wcm90by5Pd25lZFJvb20SOgoRbG9jYWxfcGFydGljaXBhbnQYAiACKAsyHy5saXZla2l0LnByb3RvLk93bmVkUGFydGljaXBhbnQSSgoMcGFydGljaXBhbnRzGAMgAygLMjQubGl2ZWtpdC5wcm90by5Db25uZWN0Q2FsbGJhY2suUGFydGljaXBhbnRXaXRoVHJhY2tzQgkKB21lc3NhZ2UiKAoRRGlzY29ubmVjdFJlcXVlc3QSEwoLcm9vbV9oYW5kbGUYASACKAQiJgoSRGlzY29ubmVjdFJlc3BvbnNlEhAKCGFzeW5jX2lkGAEgAigEIiYKEkRpc2Nvbm5lY3RDYWxsYmFjaxIQCghhc3luY19pZBgBIAIoBCKCAQoTUHVibGlzaF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TSUdOQUxfQ0xPU0UQCRIPCgtST09NX0NMT1NFRBAKQhCqAg1MaXZlS2l0LlByb3Rv", [file_e2ee, file_handle, file_participant, file_track, file_video_frame, file_stats]); + +/** + * Connect to a new LiveKit room + * + * @generated from message livekit.proto.ConnectRequest + */ +export type ConnectRequest = Message<"livekit.proto.ConnectRequest"> & { /** - * @generated from enum value: TRANSPORT_RELAY = 0; + * @generated from field: required string url = 1; */ - TRANSPORT_RELAY = 0, + url: string; /** - * @generated from enum value: TRANSPORT_NOHOST = 1; + * @generated from field: required string token = 2; */ - TRANSPORT_NOHOST = 1, + token: string; /** - * @generated from enum value: TRANSPORT_ALL = 2; + * @generated from field: required livekit.proto.RoomOptions options = 3; */ - TRANSPORT_ALL = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(IceTransportType) -proto3.util.setEnumType(IceTransportType, "livekit.proto.IceTransportType", [ - { no: 0, name: "TRANSPORT_RELAY" }, - { no: 1, name: "TRANSPORT_NOHOST" }, - { no: 2, name: "TRANSPORT_ALL" }, -]); + options?: RoomOptions; +}; /** - * @generated from enum livekit.proto.ContinualGatheringPolicy + * Describes the message livekit.proto.ConnectRequest. + * Use `create(ConnectRequestSchema)` to create a new message. */ -export enum ContinualGatheringPolicy { - /** - * @generated from enum value: GATHER_ONCE = 0; - */ - GATHER_ONCE = 0, - - /** - * @generated from enum value: GATHER_CONTINUALLY = 1; - */ - GATHER_CONTINUALLY = 1, -} -// Retrieve enum metadata with: proto3.getEnumType(ContinualGatheringPolicy) -proto3.util.setEnumType(ContinualGatheringPolicy, "livekit.proto.ContinualGatheringPolicy", [ - { no: 0, name: "GATHER_ONCE" }, - { no: 1, name: "GATHER_CONTINUALLY" }, -]); +export const ConnectRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 0); /** - * @generated from enum livekit.proto.ConnectionQuality + * @generated from message livekit.proto.ConnectResponse */ -export enum ConnectionQuality { +export type ConnectResponse = Message<"livekit.proto.ConnectResponse"> & { /** - * @generated from enum value: QUALITY_POOR = 0; + * @generated from field: required uint64 async_id = 1; */ - QUALITY_POOR = 0, - - /** - * @generated from enum value: QUALITY_GOOD = 1; - */ - QUALITY_GOOD = 1, - - /** - * @generated from enum value: QUALITY_EXCELLENT = 2; - */ - QUALITY_EXCELLENT = 2, - - /** - * @generated from enum value: QUALITY_LOST = 3; - */ - QUALITY_LOST = 3, -} -// Retrieve enum metadata with: proto3.getEnumType(ConnectionQuality) -proto3.util.setEnumType(ConnectionQuality, "livekit.proto.ConnectionQuality", [ - { no: 0, name: "QUALITY_POOR" }, - { no: 1, name: "QUALITY_GOOD" }, - { no: 2, name: "QUALITY_EXCELLENT" }, - { no: 3, name: "QUALITY_LOST" }, -]); + asyncId: bigint; +}; /** - * @generated from enum livekit.proto.ConnectionState + * Describes the message livekit.proto.ConnectResponse. + * Use `create(ConnectResponseSchema)` to create a new message. */ -export enum ConnectionState { - /** - * @generated from enum value: CONN_DISCONNECTED = 0; - */ - CONN_DISCONNECTED = 0, - - /** - * @generated from enum value: CONN_CONNECTED = 1; - */ - CONN_CONNECTED = 1, - - /** - * @generated from enum value: CONN_RECONNECTING = 2; - */ - CONN_RECONNECTING = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(ConnectionState) -proto3.util.setEnumType(ConnectionState, "livekit.proto.ConnectionState", [ - { no: 0, name: "CONN_DISCONNECTED" }, - { no: 1, name: "CONN_CONNECTED" }, - { no: 2, name: "CONN_RECONNECTING" }, -]); +export const ConnectResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 1); /** - * @generated from enum livekit.proto.DataPacketKind + * @generated from message livekit.proto.ConnectCallback */ -export enum DataPacketKind { +export type ConnectCallback = Message<"livekit.proto.ConnectCallback"> & { /** - * @generated from enum value: KIND_LOSSY = 0; + * @generated from field: required uint64 async_id = 1; */ - KIND_LOSSY = 0, + asyncId: bigint; /** - * @generated from enum value: KIND_RELIABLE = 1; + * @generated from oneof livekit.proto.ConnectCallback.message */ - KIND_RELIABLE = 1, -} -// Retrieve enum metadata with: proto3.getEnumType(DataPacketKind) -proto3.util.setEnumType(DataPacketKind, "livekit.proto.DataPacketKind", [ - { no: 0, name: "KIND_LOSSY" }, - { no: 1, name: "KIND_RELIABLE" }, -]); + message: { + /** + * @generated from field: string error = 2; + */ + value: string; + case: "error"; + } | { + /** + * @generated from field: livekit.proto.ConnectCallback.Result result = 3; + */ + value: ConnectCallback_Result; + case: "result"; + } | { case: undefined; value?: undefined }; +}; /** - * @generated from enum livekit.proto.DisconnectReason + * Describes the message livekit.proto.ConnectCallback. + * Use `create(ConnectCallbackSchema)` to create a new message. */ -export enum DisconnectReason { - /** - * @generated from enum value: UNKNOWN_REASON = 0; - */ - UNKNOWN_REASON = 0, - - /** - * the client initiated the disconnect - * - * @generated from enum value: CLIENT_INITIATED = 1; - */ - CLIENT_INITIATED = 1, - - /** - * another participant with the same identity has joined the room - * - * @generated from enum value: DUPLICATE_IDENTITY = 2; - */ - DUPLICATE_IDENTITY = 2, - - /** - * the server instance is shutting down - * - * @generated from enum value: SERVER_SHUTDOWN = 3; - */ - SERVER_SHUTDOWN = 3, - - /** - * RoomService.RemoveParticipant was called - * - * @generated from enum value: PARTICIPANT_REMOVED = 4; - */ - PARTICIPANT_REMOVED = 4, - - /** - * RoomService.DeleteRoom was called - * - * @generated from enum value: ROOM_DELETED = 5; - */ - ROOM_DELETED = 5, - - /** - * the client is attempting to resume a session, but server is not aware of it - * - * @generated from enum value: STATE_MISMATCH = 6; - */ - STATE_MISMATCH = 6, - - /** - * client was unable to connect fully - * - * @generated from enum value: JOIN_FAILURE = 7; - */ - JOIN_FAILURE = 7, - - /** - * Cloud-only, the server requested Participant to migrate the connection elsewhere - * - * @generated from enum value: MIGRATION = 8; - */ - MIGRATION = 8, - - /** - * the signal websocket was closed unexpectedly - * - * @generated from enum value: SIGNAL_CLOSE = 9; - */ - SIGNAL_CLOSE = 9, - - /** - * the room was closed, due to all Standard and Ingress participants having left - * - * @generated from enum value: ROOM_CLOSED = 10; - */ - ROOM_CLOSED = 10, -} -// Retrieve enum metadata with: proto3.getEnumType(DisconnectReason) -proto3.util.setEnumType(DisconnectReason, "livekit.proto.DisconnectReason", [ - { no: 0, name: "UNKNOWN_REASON" }, - { no: 1, name: "CLIENT_INITIATED" }, - { no: 2, name: "DUPLICATE_IDENTITY" }, - { no: 3, name: "SERVER_SHUTDOWN" }, - { no: 4, name: "PARTICIPANT_REMOVED" }, - { no: 5, name: "ROOM_DELETED" }, - { no: 6, name: "STATE_MISMATCH" }, - { no: 7, name: "JOIN_FAILURE" }, - { no: 8, name: "MIGRATION" }, - { no: 9, name: "SIGNAL_CLOSE" }, - { no: 10, name: "ROOM_CLOSED" }, -]); +export const ConnectCallbackSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 2); /** - * Connect to a new LiveKit room - * - * @generated from message livekit.proto.ConnectRequest + * @generated from message livekit.proto.ConnectCallback.ParticipantWithTracks */ -export class ConnectRequest extends Message { +export type ConnectCallback_ParticipantWithTracks = Message<"livekit.proto.ConnectCallback.ParticipantWithTracks"> & { /** - * @generated from field: string url = 1; + * @generated from field: required livekit.proto.OwnedParticipant participant = 1; */ - url = ""; - - /** - * @generated from field: string token = 2; - */ - token = ""; + participant?: OwnedParticipant; /** - * @generated from field: livekit.proto.RoomOptions options = 3; + * TrackInfo are not needed here, if we're subscribed to a track, the FfiServer will send + * a TrackSubscribed event + * + * @generated from field: repeated livekit.proto.OwnedTrackPublication publications = 2; */ - options?: RoomOptions; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.ConnectRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "options", kind: "message", T: RoomOptions }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ConnectRequest { - return new ConnectRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ConnectRequest { - return new ConnectRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ConnectRequest { - return new ConnectRequest().fromJsonString(jsonString, options); - } - - static equals(a: ConnectRequest | PlainMessage | undefined, b: ConnectRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(ConnectRequest, a, b); - } -} + publications: OwnedTrackPublication[]; +}; /** - * @generated from message livekit.proto.ConnectResponse + * Describes the message livekit.proto.ConnectCallback.ParticipantWithTracks. + * Use `create(ConnectCallback_ParticipantWithTracksSchema)` to create a new message. */ -export class ConnectResponse extends Message { - /** - * @generated from field: uint64 async_id = 1; - */ - asyncId = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.ConnectResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ConnectResponse { - return new ConnectResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ConnectResponse { - return new ConnectResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ConnectResponse { - return new ConnectResponse().fromJsonString(jsonString, options); - } - - static equals(a: ConnectResponse | PlainMessage | undefined, b: ConnectResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(ConnectResponse, a, b); - } -} +export const ConnectCallback_ParticipantWithTracksSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 2, 0); /** - * @generated from message livekit.proto.ConnectCallback + * @generated from message livekit.proto.ConnectCallback.Result */ -export class ConnectCallback extends Message { +export type ConnectCallback_Result = Message<"livekit.proto.ConnectCallback.Result"> & { /** - * @generated from field: uint64 async_id = 1; - */ - asyncId = protoInt64.zero; - - /** - * @generated from field: optional string error = 2; - */ - error?: string; - - /** - * @generated from field: livekit.proto.OwnedRoom room = 3; + * @generated from field: required livekit.proto.OwnedRoom room = 1; */ room?: OwnedRoom; /** - * @generated from field: livekit.proto.OwnedParticipant local_participant = 4; + * @generated from field: required livekit.proto.OwnedParticipant local_participant = 2; */ localParticipant?: OwnedParticipant; /** - * @generated from field: repeated livekit.proto.ConnectCallback.ParticipantWithTracks participants = 5; + * @generated from field: repeated livekit.proto.ConnectCallback.ParticipantWithTracks participants = 3; */ - participants: ConnectCallback_ParticipantWithTracks[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.ConnectCallback"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "room", kind: "message", T: OwnedRoom }, - { no: 4, name: "local_participant", kind: "message", T: OwnedParticipant }, - { no: 5, name: "participants", kind: "message", T: ConnectCallback_ParticipantWithTracks, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ConnectCallback { - return new ConnectCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ConnectCallback { - return new ConnectCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ConnectCallback { - return new ConnectCallback().fromJsonString(jsonString, options); - } - - static equals(a: ConnectCallback | PlainMessage | undefined, b: ConnectCallback | PlainMessage | undefined): boolean { - return proto3.util.equals(ConnectCallback, a, b); - } -} + participants: ConnectCallback_ParticipantWithTracks[]; +}; /** - * @generated from message livekit.proto.ConnectCallback.ParticipantWithTracks + * Describes the message livekit.proto.ConnectCallback.Result. + * Use `create(ConnectCallback_ResultSchema)` to create a new message. */ -export class ConnectCallback_ParticipantWithTracks extends Message { - /** - * @generated from field: livekit.proto.OwnedParticipant participant = 1; - */ - participant?: OwnedParticipant; - - /** - * TrackInfo are not needed here, if we're subscribed to a track, the FfiServer will send - * a TrackSubscribed event - * - * @generated from field: repeated livekit.proto.OwnedTrackPublication publications = 2; - */ - publications: OwnedTrackPublication[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.ConnectCallback.ParticipantWithTracks"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant", kind: "message", T: OwnedParticipant }, - { no: 2, name: "publications", kind: "message", T: OwnedTrackPublication, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ConnectCallback_ParticipantWithTracks { - return new ConnectCallback_ParticipantWithTracks().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ConnectCallback_ParticipantWithTracks { - return new ConnectCallback_ParticipantWithTracks().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ConnectCallback_ParticipantWithTracks { - return new ConnectCallback_ParticipantWithTracks().fromJsonString(jsonString, options); - } - - static equals(a: ConnectCallback_ParticipantWithTracks | PlainMessage | undefined, b: ConnectCallback_ParticipantWithTracks | PlainMessage | undefined): boolean { - return proto3.util.equals(ConnectCallback_ParticipantWithTracks, a, b); - } -} +export const ConnectCallback_ResultSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 2, 1); /** * Disconnect from the a room * * @generated from message livekit.proto.DisconnectRequest */ -export class DisconnectRequest extends Message { +export type DisconnectRequest = Message<"livekit.proto.DisconnectRequest"> & { /** - * @generated from field: uint64 room_handle = 1; + * @generated from field: required uint64 room_handle = 1; */ - roomHandle = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + roomHandle: bigint; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.DisconnectRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "room_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DisconnectRequest { - return new DisconnectRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DisconnectRequest { - return new DisconnectRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DisconnectRequest { - return new DisconnectRequest().fromJsonString(jsonString, options); - } - - static equals(a: DisconnectRequest | PlainMessage | undefined, b: DisconnectRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(DisconnectRequest, a, b); - } -} +/** + * Describes the message livekit.proto.DisconnectRequest. + * Use `create(DisconnectRequestSchema)` to create a new message. + */ +export const DisconnectRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 3); /** * @generated from message livekit.proto.DisconnectResponse */ -export class DisconnectResponse extends Message { +export type DisconnectResponse = Message<"livekit.proto.DisconnectResponse"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; + asyncId: bigint; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.DisconnectResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DisconnectResponse { - return new DisconnectResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DisconnectResponse { - return new DisconnectResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DisconnectResponse { - return new DisconnectResponse().fromJsonString(jsonString, options); - } - - static equals(a: DisconnectResponse | PlainMessage | undefined, b: DisconnectResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(DisconnectResponse, a, b); - } -} +/** + * Describes the message livekit.proto.DisconnectResponse. + * Use `create(DisconnectResponseSchema)` to create a new message. + */ +export const DisconnectResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 4); /** * @generated from message livekit.proto.DisconnectCallback */ -export class DisconnectCallback extends Message { +export type DisconnectCallback = Message<"livekit.proto.DisconnectCallback"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.DisconnectCallback"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DisconnectCallback { - return new DisconnectCallback().fromBinary(bytes, options); - } + asyncId: bigint; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): DisconnectCallback { - return new DisconnectCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DisconnectCallback { - return new DisconnectCallback().fromJsonString(jsonString, options); - } - - static equals(a: DisconnectCallback | PlainMessage | undefined, b: DisconnectCallback | PlainMessage | undefined): boolean { - return proto3.util.equals(DisconnectCallback, a, b); - } -} +/** + * Describes the message livekit.proto.DisconnectCallback. + * Use `create(DisconnectCallbackSchema)` to create a new message. + */ +export const DisconnectCallbackSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 5); /** * Publish a track to the room * * @generated from message livekit.proto.PublishTrackRequest */ -export class PublishTrackRequest extends Message { +export type PublishTrackRequest = Message<"livekit.proto.PublishTrackRequest"> & { /** - * @generated from field: uint64 local_participant_handle = 1; + * @generated from field: required uint64 local_participant_handle = 1; */ - localParticipantHandle = protoInt64.zero; + localParticipantHandle: bigint; /** - * @generated from field: uint64 track_handle = 2; + * @generated from field: required uint64 track_handle = 2; */ - trackHandle = protoInt64.zero; + trackHandle: bigint; /** - * @generated from field: livekit.proto.TrackPublishOptions options = 3; + * @generated from field: required livekit.proto.TrackPublishOptions options = 3; */ options?: TrackPublishOptions; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.PublishTrackRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 3, name: "options", kind: "message", T: TrackPublishOptions }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PublishTrackRequest { - return new PublishTrackRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PublishTrackRequest { - return new PublishTrackRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PublishTrackRequest { - return new PublishTrackRequest().fromJsonString(jsonString, options); - } - - static equals(a: PublishTrackRequest | PlainMessage | undefined, b: PublishTrackRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(PublishTrackRequest, a, b); - } -} +/** + * Describes the message livekit.proto.PublishTrackRequest. + * Use `create(PublishTrackRequestSchema)` to create a new message. + */ +export const PublishTrackRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 6); /** * @generated from message livekit.proto.PublishTrackResponse */ -export class PublishTrackResponse extends Message { +export type PublishTrackResponse = Message<"livekit.proto.PublishTrackResponse"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.PublishTrackResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PublishTrackResponse { - return new PublishTrackResponse().fromBinary(bytes, options); - } + asyncId: bigint; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): PublishTrackResponse { - return new PublishTrackResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PublishTrackResponse { - return new PublishTrackResponse().fromJsonString(jsonString, options); - } - - static equals(a: PublishTrackResponse | PlainMessage | undefined, b: PublishTrackResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(PublishTrackResponse, a, b); - } -} +/** + * Describes the message livekit.proto.PublishTrackResponse. + * Use `create(PublishTrackResponseSchema)` to create a new message. + */ +export const PublishTrackResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 7); /** * @generated from message livekit.proto.PublishTrackCallback */ -export class PublishTrackCallback extends Message { - /** - * @generated from field: uint64 async_id = 1; - */ - asyncId = protoInt64.zero; - +export type PublishTrackCallback = Message<"livekit.proto.PublishTrackCallback"> & { /** - * @generated from field: optional string error = 2; + * @generated from field: required uint64 async_id = 1; */ - error?: string; + asyncId: bigint; /** - * @generated from field: livekit.proto.OwnedTrackPublication publication = 3; + * @generated from oneof livekit.proto.PublishTrackCallback.message */ - publication?: OwnedTrackPublication; + message: { + /** + * @generated from field: string error = 2; + */ + value: string; + case: "error"; + } | { + /** + * @generated from field: livekit.proto.OwnedTrackPublication publication = 3; + */ + value: OwnedTrackPublication; + case: "publication"; + } | { case: undefined; value?: undefined }; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.PublishTrackCallback"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "publication", kind: "message", T: OwnedTrackPublication }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PublishTrackCallback { - return new PublishTrackCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PublishTrackCallback { - return new PublishTrackCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PublishTrackCallback { - return new PublishTrackCallback().fromJsonString(jsonString, options); - } - - static equals(a: PublishTrackCallback | PlainMessage | undefined, b: PublishTrackCallback | PlainMessage | undefined): boolean { - return proto3.util.equals(PublishTrackCallback, a, b); - } -} +/** + * Describes the message livekit.proto.PublishTrackCallback. + * Use `create(PublishTrackCallbackSchema)` to create a new message. + */ +export const PublishTrackCallbackSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 8); /** * Unpublish a track from the room * * @generated from message livekit.proto.UnpublishTrackRequest */ -export class UnpublishTrackRequest extends Message { +export type UnpublishTrackRequest = Message<"livekit.proto.UnpublishTrackRequest"> & { /** - * @generated from field: uint64 local_participant_handle = 1; + * @generated from field: required uint64 local_participant_handle = 1; */ - localParticipantHandle = protoInt64.zero; + localParticipantHandle: bigint; /** - * @generated from field: string track_sid = 2; + * @generated from field: required string track_sid = 2; */ - trackSid = ""; + trackSid: string; /** - * @generated from field: bool stop_on_unpublish = 3; + * @generated from field: required bool stop_on_unpublish = 3; */ - stopOnUnpublish = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.UnpublishTrackRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "stop_on_unpublish", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UnpublishTrackRequest { - return new UnpublishTrackRequest().fromBinary(bytes, options); - } + stopOnUnpublish: boolean; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): UnpublishTrackRequest { - return new UnpublishTrackRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UnpublishTrackRequest { - return new UnpublishTrackRequest().fromJsonString(jsonString, options); - } - - static equals(a: UnpublishTrackRequest | PlainMessage | undefined, b: UnpublishTrackRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(UnpublishTrackRequest, a, b); - } -} +/** + * Describes the message livekit.proto.UnpublishTrackRequest. + * Use `create(UnpublishTrackRequestSchema)` to create a new message. + */ +export const UnpublishTrackRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 9); /** * @generated from message livekit.proto.UnpublishTrackResponse */ -export class UnpublishTrackResponse extends Message { +export type UnpublishTrackResponse = Message<"livekit.proto.UnpublishTrackResponse"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.UnpublishTrackResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); + asyncId: bigint; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): UnpublishTrackResponse { - return new UnpublishTrackResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UnpublishTrackResponse { - return new UnpublishTrackResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UnpublishTrackResponse { - return new UnpublishTrackResponse().fromJsonString(jsonString, options); - } - - static equals(a: UnpublishTrackResponse | PlainMessage | undefined, b: UnpublishTrackResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(UnpublishTrackResponse, a, b); - } -} +/** + * Describes the message livekit.proto.UnpublishTrackResponse. + * Use `create(UnpublishTrackResponseSchema)` to create a new message. + */ +export const UnpublishTrackResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 10); /** * @generated from message livekit.proto.UnpublishTrackCallback */ -export class UnpublishTrackCallback extends Message { +export type UnpublishTrackCallback = Message<"livekit.proto.UnpublishTrackCallback"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; + asyncId: bigint; /** * @generated from field: optional string error = 2; */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + error: string; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.UnpublishTrackCallback"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UnpublishTrackCallback { - return new UnpublishTrackCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UnpublishTrackCallback { - return new UnpublishTrackCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UnpublishTrackCallback { - return new UnpublishTrackCallback().fromJsonString(jsonString, options); - } - - static equals(a: UnpublishTrackCallback | PlainMessage | undefined, b: UnpublishTrackCallback | PlainMessage | undefined): boolean { - return proto3.util.equals(UnpublishTrackCallback, a, b); - } -} +/** + * Describes the message livekit.proto.UnpublishTrackCallback. + * Use `create(UnpublishTrackCallbackSchema)` to create a new message. + */ +export const UnpublishTrackCallbackSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 11); /** * Publish data to other participants * * @generated from message livekit.proto.PublishDataRequest */ -export class PublishDataRequest extends Message { +export type PublishDataRequest = Message<"livekit.proto.PublishDataRequest"> & { /** - * @generated from field: uint64 local_participant_handle = 1; + * @generated from field: required uint64 local_participant_handle = 1; */ - localParticipantHandle = protoInt64.zero; + localParticipantHandle: bigint; /** - * @generated from field: uint64 data_ptr = 2; + * @generated from field: required uint64 data_ptr = 2; */ - dataPtr = protoInt64.zero; + dataPtr: bigint; /** - * @generated from field: uint64 data_len = 3; + * @generated from field: required uint64 data_len = 3; */ - dataLen = protoInt64.zero; + dataLen: bigint; /** - * @generated from field: bool reliable = 4; + * @generated from field: required bool reliable = 4; */ - reliable = false; + reliable: boolean; /** * @generated from field: repeated string destination_sids = 5 [deprecated = true]; * @deprecated */ - destinationSids: string[] = []; + destinationSids: string[]; /** * @generated from field: optional string topic = 6; */ - topic?: string; + topic: string; /** * @generated from field: repeated string destination_identities = 7; */ - destinationIdentities: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.PublishDataRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "data_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 3, name: "data_len", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 4, name: "reliable", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 5, name: "destination_sids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 6, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "destination_identities", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PublishDataRequest { - return new PublishDataRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PublishDataRequest { - return new PublishDataRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PublishDataRequest { - return new PublishDataRequest().fromJsonString(jsonString, options); - } - - static equals(a: PublishDataRequest | PlainMessage | undefined, b: PublishDataRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(PublishDataRequest, a, b); - } -} + destinationIdentities: string[]; +}; + +/** + * Describes the message livekit.proto.PublishDataRequest. + * Use `create(PublishDataRequestSchema)` to create a new message. + */ +export const PublishDataRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 12); /** * @generated from message livekit.proto.PublishDataResponse */ -export class PublishDataResponse extends Message { +export type PublishDataResponse = Message<"livekit.proto.PublishDataResponse"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.PublishDataResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PublishDataResponse { - return new PublishDataResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PublishDataResponse { - return new PublishDataResponse().fromJson(jsonValue, options); - } + asyncId: bigint; +}; - static fromJsonString(jsonString: string, options?: Partial): PublishDataResponse { - return new PublishDataResponse().fromJsonString(jsonString, options); - } - - static equals(a: PublishDataResponse | PlainMessage | undefined, b: PublishDataResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(PublishDataResponse, a, b); - } -} +/** + * Describes the message livekit.proto.PublishDataResponse. + * Use `create(PublishDataResponseSchema)` to create a new message. + */ +export const PublishDataResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 13); /** * @generated from message livekit.proto.PublishDataCallback */ -export class PublishDataCallback extends Message { +export type PublishDataCallback = Message<"livekit.proto.PublishDataCallback"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; + asyncId: bigint; /** * @generated from field: optional string error = 2; */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.PublishDataCallback"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PublishDataCallback { - return new PublishDataCallback().fromBinary(bytes, options); - } + error: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): PublishDataCallback { - return new PublishDataCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PublishDataCallback { - return new PublishDataCallback().fromJsonString(jsonString, options); - } - - static equals(a: PublishDataCallback | PlainMessage | undefined, b: PublishDataCallback | PlainMessage | undefined): boolean { - return proto3.util.equals(PublishDataCallback, a, b); - } -} +/** + * Describes the message livekit.proto.PublishDataCallback. + * Use `create(PublishDataCallbackSchema)` to create a new message. + */ +export const PublishDataCallbackSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 14); /** * Publish transcription messages to room * * @generated from message livekit.proto.PublishTranscriptionRequest */ -export class PublishTranscriptionRequest extends Message { +export type PublishTranscriptionRequest = Message<"livekit.proto.PublishTranscriptionRequest"> & { /** - * @generated from field: uint64 local_participant_handle = 1; + * @generated from field: required uint64 local_participant_handle = 1; */ - localParticipantHandle = protoInt64.zero; + localParticipantHandle: bigint; /** - * @generated from field: string participant_identity = 2; + * @generated from field: required string participant_identity = 2; */ - participantIdentity = ""; + participantIdentity: string; /** - * @generated from field: string track_id = 3; + * @generated from field: required string track_id = 3; */ - trackId = ""; + trackId: string; /** * @generated from field: repeated livekit.proto.TranscriptionSegment segments = 4; */ - segments: TranscriptionSegment[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.PublishTranscriptionRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "track_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "segments", kind: "message", T: TranscriptionSegment, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PublishTranscriptionRequest { - return new PublishTranscriptionRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PublishTranscriptionRequest { - return new PublishTranscriptionRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PublishTranscriptionRequest { - return new PublishTranscriptionRequest().fromJsonString(jsonString, options); - } - - static equals(a: PublishTranscriptionRequest | PlainMessage | undefined, b: PublishTranscriptionRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(PublishTranscriptionRequest, a, b); - } -} + segments: TranscriptionSegment[]; +}; + +/** + * Describes the message livekit.proto.PublishTranscriptionRequest. + * Use `create(PublishTranscriptionRequestSchema)` to create a new message. + */ +export const PublishTranscriptionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 15); /** * @generated from message livekit.proto.PublishTranscriptionResponse */ -export class PublishTranscriptionResponse extends Message { +export type PublishTranscriptionResponse = Message<"livekit.proto.PublishTranscriptionResponse"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.PublishTranscriptionResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PublishTranscriptionResponse { - return new PublishTranscriptionResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PublishTranscriptionResponse { - return new PublishTranscriptionResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PublishTranscriptionResponse { - return new PublishTranscriptionResponse().fromJsonString(jsonString, options); - } + asyncId: bigint; +}; - static equals(a: PublishTranscriptionResponse | PlainMessage | undefined, b: PublishTranscriptionResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(PublishTranscriptionResponse, a, b); - } -} +/** + * Describes the message livekit.proto.PublishTranscriptionResponse. + * Use `create(PublishTranscriptionResponseSchema)` to create a new message. + */ +export const PublishTranscriptionResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 16); /** * @generated from message livekit.proto.PublishTranscriptionCallback */ -export class PublishTranscriptionCallback extends Message { +export type PublishTranscriptionCallback = Message<"livekit.proto.PublishTranscriptionCallback"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; + asyncId: bigint; /** * @generated from field: optional string error = 2; */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.PublishTranscriptionCallback"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PublishTranscriptionCallback { - return new PublishTranscriptionCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PublishTranscriptionCallback { - return new PublishTranscriptionCallback().fromJson(jsonValue, options); - } + error: string; +}; - static fromJsonString(jsonString: string, options?: Partial): PublishTranscriptionCallback { - return new PublishTranscriptionCallback().fromJsonString(jsonString, options); - } - - static equals(a: PublishTranscriptionCallback | PlainMessage | undefined, b: PublishTranscriptionCallback | PlainMessage | undefined): boolean { - return proto3.util.equals(PublishTranscriptionCallback, a, b); - } -} +/** + * Describes the message livekit.proto.PublishTranscriptionCallback. + * Use `create(PublishTranscriptionCallbackSchema)` to create a new message. + */ +export const PublishTranscriptionCallbackSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 17); /** * Publish Sip DTMF messages to other participants * * @generated from message livekit.proto.PublishSipDtmfRequest */ -export class PublishSipDtmfRequest extends Message { +export type PublishSipDtmfRequest = Message<"livekit.proto.PublishSipDtmfRequest"> & { /** - * @generated from field: uint64 local_participant_handle = 1; + * @generated from field: required uint64 local_participant_handle = 1; */ - localParticipantHandle = protoInt64.zero; + localParticipantHandle: bigint; /** - * @generated from field: uint32 code = 2; + * @generated from field: required uint32 code = 2; */ - code = 0; + code: number; /** - * @generated from field: string digit = 3; + * @generated from field: required string digit = 3; */ - digit = ""; + digit: string; /** * @generated from field: repeated string destination_identities = 4; */ - destinationIdentities: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.PublishSipDtmfRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "code", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 3, name: "digit", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "destination_identities", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PublishSipDtmfRequest { - return new PublishSipDtmfRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PublishSipDtmfRequest { - return new PublishSipDtmfRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PublishSipDtmfRequest { - return new PublishSipDtmfRequest().fromJsonString(jsonString, options); - } - - static equals(a: PublishSipDtmfRequest | PlainMessage | undefined, b: PublishSipDtmfRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(PublishSipDtmfRequest, a, b); - } -} + destinationIdentities: string[]; +}; + +/** + * Describes the message livekit.proto.PublishSipDtmfRequest. + * Use `create(PublishSipDtmfRequestSchema)` to create a new message. + */ +export const PublishSipDtmfRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 18); /** * @generated from message livekit.proto.PublishSipDtmfResponse */ -export class PublishSipDtmfResponse extends Message { +export type PublishSipDtmfResponse = Message<"livekit.proto.PublishSipDtmfResponse"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.PublishSipDtmfResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PublishSipDtmfResponse { - return new PublishSipDtmfResponse().fromBinary(bytes, options); - } + asyncId: bigint; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): PublishSipDtmfResponse { - return new PublishSipDtmfResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PublishSipDtmfResponse { - return new PublishSipDtmfResponse().fromJsonString(jsonString, options); - } - - static equals(a: PublishSipDtmfResponse | PlainMessage | undefined, b: PublishSipDtmfResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(PublishSipDtmfResponse, a, b); - } -} +/** + * Describes the message livekit.proto.PublishSipDtmfResponse. + * Use `create(PublishSipDtmfResponseSchema)` to create a new message. + */ +export const PublishSipDtmfResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 19); /** * @generated from message livekit.proto.PublishSipDtmfCallback */ -export class PublishSipDtmfCallback extends Message { +export type PublishSipDtmfCallback = Message<"livekit.proto.PublishSipDtmfCallback"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; + asyncId: bigint; /** * @generated from field: optional string error = 2; */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.PublishSipDtmfCallback"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PublishSipDtmfCallback { - return new PublishSipDtmfCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PublishSipDtmfCallback { - return new PublishSipDtmfCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PublishSipDtmfCallback { - return new PublishSipDtmfCallback().fromJsonString(jsonString, options); - } + error: string; +}; - static equals(a: PublishSipDtmfCallback | PlainMessage | undefined, b: PublishSipDtmfCallback | PlainMessage | undefined): boolean { - return proto3.util.equals(PublishSipDtmfCallback, a, b); - } -} +/** + * Describes the message livekit.proto.PublishSipDtmfCallback. + * Use `create(PublishSipDtmfCallbackSchema)` to create a new message. + */ +export const PublishSipDtmfCallbackSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 20); /** * Change the local participant's metadata * * @generated from message livekit.proto.SetLocalMetadataRequest */ -export class SetLocalMetadataRequest extends Message { +export type SetLocalMetadataRequest = Message<"livekit.proto.SetLocalMetadataRequest"> & { /** - * @generated from field: uint64 local_participant_handle = 1; + * @generated from field: required uint64 local_participant_handle = 1; */ - localParticipantHandle = protoInt64.zero; + localParticipantHandle: bigint; /** - * @generated from field: string metadata = 2; + * @generated from field: required string metadata = 2; */ - metadata = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SetLocalMetadataRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalMetadataRequest { - return new SetLocalMetadataRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalMetadataRequest { - return new SetLocalMetadataRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetLocalMetadataRequest { - return new SetLocalMetadataRequest().fromJsonString(jsonString, options); - } + metadata: string; +}; - static equals(a: SetLocalMetadataRequest | PlainMessage | undefined, b: SetLocalMetadataRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SetLocalMetadataRequest, a, b); - } -} +/** + * Describes the message livekit.proto.SetLocalMetadataRequest. + * Use `create(SetLocalMetadataRequestSchema)` to create a new message. + */ +export const SetLocalMetadataRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 21); /** * @generated from message livekit.proto.SetLocalMetadataResponse */ -export class SetLocalMetadataResponse extends Message { +export type SetLocalMetadataResponse = Message<"livekit.proto.SetLocalMetadataResponse"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SetLocalMetadataResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalMetadataResponse { - return new SetLocalMetadataResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalMetadataResponse { - return new SetLocalMetadataResponse().fromJson(jsonValue, options); - } + asyncId: bigint; +}; - static fromJsonString(jsonString: string, options?: Partial): SetLocalMetadataResponse { - return new SetLocalMetadataResponse().fromJsonString(jsonString, options); - } - - static equals(a: SetLocalMetadataResponse | PlainMessage | undefined, b: SetLocalMetadataResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SetLocalMetadataResponse, a, b); - } -} +/** + * Describes the message livekit.proto.SetLocalMetadataResponse. + * Use `create(SetLocalMetadataResponseSchema)` to create a new message. + */ +export const SetLocalMetadataResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 22); /** * @generated from message livekit.proto.SetLocalMetadataCallback */ -export class SetLocalMetadataCallback extends Message { +export type SetLocalMetadataCallback = Message<"livekit.proto.SetLocalMetadataCallback"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; + asyncId: bigint; /** * @generated from field: optional string error = 2; */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SetLocalMetadataCallback"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalMetadataCallback { - return new SetLocalMetadataCallback().fromBinary(bytes, options); - } + error: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalMetadataCallback { - return new SetLocalMetadataCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetLocalMetadataCallback { - return new SetLocalMetadataCallback().fromJsonString(jsonString, options); - } - - static equals(a: SetLocalMetadataCallback | PlainMessage | undefined, b: SetLocalMetadataCallback | PlainMessage | undefined): boolean { - return proto3.util.equals(SetLocalMetadataCallback, a, b); - } -} +/** + * Describes the message livekit.proto.SetLocalMetadataCallback. + * Use `create(SetLocalMetadataCallbackSchema)` to create a new message. + */ +export const SetLocalMetadataCallbackSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 23); /** * @generated from message livekit.proto.SendChatMessageRequest */ -export class SendChatMessageRequest extends Message { +export type SendChatMessageRequest = Message<"livekit.proto.SendChatMessageRequest"> & { /** - * @generated from field: uint64 local_participant_handle = 1; + * @generated from field: required uint64 local_participant_handle = 1; */ - localParticipantHandle = protoInt64.zero; + localParticipantHandle: bigint; /** - * @generated from field: string message = 2; + * @generated from field: required string message = 2; */ - message = ""; + message: string; /** * @generated from field: repeated string destination_identities = 3; */ - destinationIdentities: string[] = []; + destinationIdentities: string[]; /** * @generated from field: optional string sender_identity = 4; */ - senderIdentity?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SendChatMessageRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "destination_identities", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 4, name: "sender_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SendChatMessageRequest { - return new SendChatMessageRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SendChatMessageRequest { - return new SendChatMessageRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SendChatMessageRequest { - return new SendChatMessageRequest().fromJsonString(jsonString, options); - } - - static equals(a: SendChatMessageRequest | PlainMessage | undefined, b: SendChatMessageRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SendChatMessageRequest, a, b); - } -} + senderIdentity: string; +}; + +/** + * Describes the message livekit.proto.SendChatMessageRequest. + * Use `create(SendChatMessageRequestSchema)` to create a new message. + */ +export const SendChatMessageRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 24); /** * @generated from message livekit.proto.EditChatMessageRequest */ -export class EditChatMessageRequest extends Message { +export type EditChatMessageRequest = Message<"livekit.proto.EditChatMessageRequest"> & { /** - * @generated from field: uint64 local_participant_handle = 1; + * @generated from field: required uint64 local_participant_handle = 1; */ - localParticipantHandle = protoInt64.zero; + localParticipantHandle: bigint; /** - * @generated from field: string edit_text = 2; + * @generated from field: required string edit_text = 2; */ - editText = ""; + editText: string; /** - * @generated from field: livekit.proto.ChatMessage original_message = 3; + * @generated from field: required livekit.proto.ChatMessage original_message = 3; */ originalMessage?: ChatMessage; /** * @generated from field: repeated string destination_identities = 4; */ - destinationIdentities: string[] = []; + destinationIdentities: string[]; /** * @generated from field: optional string sender_identity = 5; */ - senderIdentity?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.EditChatMessageRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "edit_text", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "original_message", kind: "message", T: ChatMessage }, - { no: 4, name: "destination_identities", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 5, name: "sender_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): EditChatMessageRequest { - return new EditChatMessageRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): EditChatMessageRequest { - return new EditChatMessageRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): EditChatMessageRequest { - return new EditChatMessageRequest().fromJsonString(jsonString, options); - } - - static equals(a: EditChatMessageRequest | PlainMessage | undefined, b: EditChatMessageRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(EditChatMessageRequest, a, b); - } -} + senderIdentity: string; +}; + +/** + * Describes the message livekit.proto.EditChatMessageRequest. + * Use `create(EditChatMessageRequestSchema)` to create a new message. + */ +export const EditChatMessageRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 25); /** * @generated from message livekit.proto.SendChatMessageResponse */ -export class SendChatMessageResponse extends Message { +export type SendChatMessageResponse = Message<"livekit.proto.SendChatMessageResponse"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SendChatMessageResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); + asyncId: bigint; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): SendChatMessageResponse { - return new SendChatMessageResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SendChatMessageResponse { - return new SendChatMessageResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SendChatMessageResponse { - return new SendChatMessageResponse().fromJsonString(jsonString, options); - } - - static equals(a: SendChatMessageResponse | PlainMessage | undefined, b: SendChatMessageResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SendChatMessageResponse, a, b); - } -} +/** + * Describes the message livekit.proto.SendChatMessageResponse. + * Use `create(SendChatMessageResponseSchema)` to create a new message. + */ +export const SendChatMessageResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 26); /** * @generated from message livekit.proto.SendChatMessageCallback */ -export class SendChatMessageCallback extends Message { +export type SendChatMessageCallback = Message<"livekit.proto.SendChatMessageCallback"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; + asyncId: bigint; /** - * @generated from field: optional string error = 2; + * @generated from oneof livekit.proto.SendChatMessageCallback.message */ - error?: string; - - /** - * @generated from field: optional livekit.proto.ChatMessage chat_message = 3; - */ - chatMessage?: ChatMessage; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SendChatMessageCallback"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "chat_message", kind: "message", T: ChatMessage, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SendChatMessageCallback { - return new SendChatMessageCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SendChatMessageCallback { - return new SendChatMessageCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SendChatMessageCallback { - return new SendChatMessageCallback().fromJsonString(jsonString, options); - } + message: { + /** + * @generated from field: string error = 2; + */ + value: string; + case: "error"; + } | { + /** + * @generated from field: livekit.proto.ChatMessage chat_message = 3; + */ + value: ChatMessage; + case: "chatMessage"; + } | { case: undefined; value?: undefined }; +}; - static equals(a: SendChatMessageCallback | PlainMessage | undefined, b: SendChatMessageCallback | PlainMessage | undefined): boolean { - return proto3.util.equals(SendChatMessageCallback, a, b); - } -} +/** + * Describes the message livekit.proto.SendChatMessageCallback. + * Use `create(SendChatMessageCallbackSchema)` to create a new message. + */ +export const SendChatMessageCallbackSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 27); /** * Change the local participant's attributes * * @generated from message livekit.proto.SetLocalAttributesRequest */ -export class SetLocalAttributesRequest extends Message { +export type SetLocalAttributesRequest = Message<"livekit.proto.SetLocalAttributesRequest"> & { /** - * @generated from field: uint64 local_participant_handle = 1; + * @generated from field: required uint64 local_participant_handle = 1; */ - localParticipantHandle = protoInt64.zero; + localParticipantHandle: bigint; /** - * @generated from field: map attributes = 2; + * @generated from field: repeated livekit.proto.AttributesEntry attributes = 2; */ - attributes: { [key: string]: string } = {}; + attributes: AttributesEntry[]; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SetLocalAttributesRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalAttributesRequest { - return new SetLocalAttributesRequest().fromBinary(bytes, options); - } +/** + * Describes the message livekit.proto.SetLocalAttributesRequest. + * Use `create(SetLocalAttributesRequestSchema)` to create a new message. + */ +export const SetLocalAttributesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 28); - static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalAttributesRequest { - return new SetLocalAttributesRequest().fromJson(jsonValue, options); - } +/** + * @generated from message livekit.proto.AttributesEntry + */ +export type AttributesEntry = Message<"livekit.proto.AttributesEntry"> & { + /** + * @generated from field: required string key = 1; + */ + key: string; - static fromJsonString(jsonString: string, options?: Partial): SetLocalAttributesRequest { - return new SetLocalAttributesRequest().fromJsonString(jsonString, options); - } + /** + * @generated from field: required string value = 2; + */ + value: string; +}; - static equals(a: SetLocalAttributesRequest | PlainMessage | undefined, b: SetLocalAttributesRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SetLocalAttributesRequest, a, b); - } -} +/** + * Describes the message livekit.proto.AttributesEntry. + * Use `create(AttributesEntrySchema)` to create a new message. + */ +export const AttributesEntrySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 29); /** * @generated from message livekit.proto.SetLocalAttributesResponse */ -export class SetLocalAttributesResponse extends Message { +export type SetLocalAttributesResponse = Message<"livekit.proto.SetLocalAttributesResponse"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SetLocalAttributesResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalAttributesResponse { - return new SetLocalAttributesResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalAttributesResponse { - return new SetLocalAttributesResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetLocalAttributesResponse { - return new SetLocalAttributesResponse().fromJsonString(jsonString, options); - } + asyncId: bigint; +}; - static equals(a: SetLocalAttributesResponse | PlainMessage | undefined, b: SetLocalAttributesResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SetLocalAttributesResponse, a, b); - } -} +/** + * Describes the message livekit.proto.SetLocalAttributesResponse. + * Use `create(SetLocalAttributesResponseSchema)` to create a new message. + */ +export const SetLocalAttributesResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 30); /** * @generated from message livekit.proto.SetLocalAttributesCallback */ -export class SetLocalAttributesCallback extends Message { +export type SetLocalAttributesCallback = Message<"livekit.proto.SetLocalAttributesCallback"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; + asyncId: bigint; /** * @generated from field: optional string error = 2; */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SetLocalAttributesCallback"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalAttributesCallback { - return new SetLocalAttributesCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalAttributesCallback { - return new SetLocalAttributesCallback().fromJson(jsonValue, options); - } + error: string; +}; - static fromJsonString(jsonString: string, options?: Partial): SetLocalAttributesCallback { - return new SetLocalAttributesCallback().fromJsonString(jsonString, options); - } - - static equals(a: SetLocalAttributesCallback | PlainMessage | undefined, b: SetLocalAttributesCallback | PlainMessage | undefined): boolean { - return proto3.util.equals(SetLocalAttributesCallback, a, b); - } -} +/** + * Describes the message livekit.proto.SetLocalAttributesCallback. + * Use `create(SetLocalAttributesCallbackSchema)` to create a new message. + */ +export const SetLocalAttributesCallbackSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 31); /** * Change the local participant's name * * @generated from message livekit.proto.SetLocalNameRequest */ -export class SetLocalNameRequest extends Message { +export type SetLocalNameRequest = Message<"livekit.proto.SetLocalNameRequest"> & { /** - * @generated from field: uint64 local_participant_handle = 1; + * @generated from field: required uint64 local_participant_handle = 1; */ - localParticipantHandle = protoInt64.zero; + localParticipantHandle: bigint; /** - * @generated from field: string name = 2; + * @generated from field: required string name = 2; */ - name = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SetLocalNameRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalNameRequest { - return new SetLocalNameRequest().fromBinary(bytes, options); - } + name: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalNameRequest { - return new SetLocalNameRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetLocalNameRequest { - return new SetLocalNameRequest().fromJsonString(jsonString, options); - } - - static equals(a: SetLocalNameRequest | PlainMessage | undefined, b: SetLocalNameRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SetLocalNameRequest, a, b); - } -} +/** + * Describes the message livekit.proto.SetLocalNameRequest. + * Use `create(SetLocalNameRequestSchema)` to create a new message. + */ +export const SetLocalNameRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 32); /** * @generated from message livekit.proto.SetLocalNameResponse */ -export class SetLocalNameResponse extends Message { +export type SetLocalNameResponse = Message<"livekit.proto.SetLocalNameResponse"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SetLocalNameResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); + asyncId: bigint; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalNameResponse { - return new SetLocalNameResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalNameResponse { - return new SetLocalNameResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetLocalNameResponse { - return new SetLocalNameResponse().fromJsonString(jsonString, options); - } - - static equals(a: SetLocalNameResponse | PlainMessage | undefined, b: SetLocalNameResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SetLocalNameResponse, a, b); - } -} +/** + * Describes the message livekit.proto.SetLocalNameResponse. + * Use `create(SetLocalNameResponseSchema)` to create a new message. + */ +export const SetLocalNameResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 33); /** * @generated from message livekit.proto.SetLocalNameCallback */ -export class SetLocalNameCallback extends Message { +export type SetLocalNameCallback = Message<"livekit.proto.SetLocalNameCallback"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; + asyncId: bigint; /** * @generated from field: optional string error = 2; */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + error: string; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SetLocalNameCallback"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalNameCallback { - return new SetLocalNameCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalNameCallback { - return new SetLocalNameCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetLocalNameCallback { - return new SetLocalNameCallback().fromJsonString(jsonString, options); - } - - static equals(a: SetLocalNameCallback | PlainMessage | undefined, b: SetLocalNameCallback | PlainMessage | undefined): boolean { - return proto3.util.equals(SetLocalNameCallback, a, b); - } -} +/** + * Describes the message livekit.proto.SetLocalNameCallback. + * Use `create(SetLocalNameCallbackSchema)` to create a new message. + */ +export const SetLocalNameCallbackSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 34); /** * Change the "desire" to subs2ribe to a track * * @generated from message livekit.proto.SetSubscribedRequest */ -export class SetSubscribedRequest extends Message { +export type SetSubscribedRequest = Message<"livekit.proto.SetSubscribedRequest"> & { /** - * @generated from field: bool subscribe = 1; + * @generated from field: required bool subscribe = 1; */ - subscribe = false; + subscribe: boolean; /** - * @generated from field: uint64 publication_handle = 2; + * @generated from field: required uint64 publication_handle = 2; */ - publicationHandle = protoInt64.zero; + publicationHandle: bigint; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SetSubscribedRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "subscribe", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "publication_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetSubscribedRequest { - return new SetSubscribedRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetSubscribedRequest { - return new SetSubscribedRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetSubscribedRequest { - return new SetSubscribedRequest().fromJsonString(jsonString, options); - } - - static equals(a: SetSubscribedRequest | PlainMessage | undefined, b: SetSubscribedRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SetSubscribedRequest, a, b); - } -} +/** + * Describes the message livekit.proto.SetSubscribedRequest. + * Use `create(SetSubscribedRequestSchema)` to create a new message. + */ +export const SetSubscribedRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 35); /** * @generated from message livekit.proto.SetSubscribedResponse */ -export class SetSubscribedResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export type SetSubscribedResponse = Message<"livekit.proto.SetSubscribedResponse"> & { +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SetSubscribedResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetSubscribedResponse { - return new SetSubscribedResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetSubscribedResponse { - return new SetSubscribedResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetSubscribedResponse { - return new SetSubscribedResponse().fromJsonString(jsonString, options); - } - - static equals(a: SetSubscribedResponse | PlainMessage | undefined, b: SetSubscribedResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SetSubscribedResponse, a, b); - } -} +/** + * Describes the message livekit.proto.SetSubscribedResponse. + * Use `create(SetSubscribedResponseSchema)` to create a new message. + */ +export const SetSubscribedResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 36); /** * @generated from message livekit.proto.GetSessionStatsRequest */ -export class GetSessionStatsRequest extends Message { +export type GetSessionStatsRequest = Message<"livekit.proto.GetSessionStatsRequest"> & { /** - * @generated from field: uint64 room_handle = 1; + * @generated from field: required uint64 room_handle = 1; */ - roomHandle = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + roomHandle: bigint; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.GetSessionStatsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "room_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetSessionStatsRequest { - return new GetSessionStatsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetSessionStatsRequest { - return new GetSessionStatsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetSessionStatsRequest { - return new GetSessionStatsRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetSessionStatsRequest | PlainMessage | undefined, b: GetSessionStatsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetSessionStatsRequest, a, b); - } -} +/** + * Describes the message livekit.proto.GetSessionStatsRequest. + * Use `create(GetSessionStatsRequestSchema)` to create a new message. + */ +export const GetSessionStatsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 37); /** * @generated from message livekit.proto.GetSessionStatsResponse */ -export class GetSessionStatsResponse extends Message { +export type GetSessionStatsResponse = Message<"livekit.proto.GetSessionStatsResponse"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + asyncId: bigint; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.GetSessionStatsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetSessionStatsResponse { - return new GetSessionStatsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetSessionStatsResponse { - return new GetSessionStatsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetSessionStatsResponse { - return new GetSessionStatsResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetSessionStatsResponse | PlainMessage | undefined, b: GetSessionStatsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetSessionStatsResponse, a, b); - } -} +/** + * Describes the message livekit.proto.GetSessionStatsResponse. + * Use `create(GetSessionStatsResponseSchema)` to create a new message. + */ +export const GetSessionStatsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 38); /** * @generated from message livekit.proto.GetSessionStatsCallback */ -export class GetSessionStatsCallback extends Message { +export type GetSessionStatsCallback = Message<"livekit.proto.GetSessionStatsCallback"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; + asyncId: bigint; /** - * @generated from field: optional string error = 2; + * @generated from oneof livekit.proto.GetSessionStatsCallback.message */ - error?: string; + message: { + /** + * @generated from field: string error = 2; + */ + value: string; + case: "error"; + } | { + /** + * @generated from field: livekit.proto.GetSessionStatsCallback.Result result = 3; + */ + value: GetSessionStatsCallback_Result; + case: "result"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message livekit.proto.GetSessionStatsCallback. + * Use `create(GetSessionStatsCallbackSchema)` to create a new message. + */ +export const GetSessionStatsCallbackSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 39); +/** + * @generated from message livekit.proto.GetSessionStatsCallback.Result + */ +export type GetSessionStatsCallback_Result = Message<"livekit.proto.GetSessionStatsCallback.Result"> & { /** - * @generated from field: repeated livekit.proto.RtcStats publisher_stats = 3; + * @generated from field: repeated livekit.proto.RtcStats publisher_stats = 1; */ - publisherStats: RtcStats[] = []; + publisherStats: RtcStats[]; /** - * @generated from field: repeated livekit.proto.RtcStats subscriber_stats = 4; + * @generated from field: repeated livekit.proto.RtcStats subscriber_stats = 2; */ - subscriberStats: RtcStats[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.GetSessionStatsCallback"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "publisher_stats", kind: "message", T: RtcStats, repeated: true }, - { no: 4, name: "subscriber_stats", kind: "message", T: RtcStats, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetSessionStatsCallback { - return new GetSessionStatsCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetSessionStatsCallback { - return new GetSessionStatsCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetSessionStatsCallback { - return new GetSessionStatsCallback().fromJsonString(jsonString, options); - } + subscriberStats: RtcStats[]; +}; - static equals(a: GetSessionStatsCallback | PlainMessage | undefined, b: GetSessionStatsCallback | PlainMessage | undefined): boolean { - return proto3.util.equals(GetSessionStatsCallback, a, b); - } -} +/** + * Describes the message livekit.proto.GetSessionStatsCallback.Result. + * Use `create(GetSessionStatsCallback_ResultSchema)` to create a new message. + */ +export const GetSessionStatsCallback_ResultSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 39, 0); /** * @generated from message livekit.proto.VideoEncoding */ -export class VideoEncoding extends Message { +export type VideoEncoding = Message<"livekit.proto.VideoEncoding"> & { /** - * @generated from field: uint64 max_bitrate = 1; + * @generated from field: required uint64 max_bitrate = 1; */ - maxBitrate = protoInt64.zero; + maxBitrate: bigint; /** - * @generated from field: double max_framerate = 2; + * @generated from field: required double max_framerate = 2; */ - maxFramerate = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.VideoEncoding"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "max_bitrate", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "max_framerate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VideoEncoding { - return new VideoEncoding().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): VideoEncoding { - return new VideoEncoding().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): VideoEncoding { - return new VideoEncoding().fromJsonString(jsonString, options); - } + maxFramerate: number; +}; - static equals(a: VideoEncoding | PlainMessage | undefined, b: VideoEncoding | PlainMessage | undefined): boolean { - return proto3.util.equals(VideoEncoding, a, b); - } -} +/** + * Describes the message livekit.proto.VideoEncoding. + * Use `create(VideoEncodingSchema)` to create a new message. + */ +export const VideoEncodingSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 40); /** * @generated from message livekit.proto.AudioEncoding */ -export class AudioEncoding extends Message { +export type AudioEncoding = Message<"livekit.proto.AudioEncoding"> & { /** - * @generated from field: uint64 max_bitrate = 1; + * @generated from field: required uint64 max_bitrate = 1; */ - maxBitrate = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.AudioEncoding"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "max_bitrate", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AudioEncoding { - return new AudioEncoding().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AudioEncoding { - return new AudioEncoding().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AudioEncoding { - return new AudioEncoding().fromJsonString(jsonString, options); - } + maxBitrate: bigint; +}; - static equals(a: AudioEncoding | PlainMessage | undefined, b: AudioEncoding | PlainMessage | undefined): boolean { - return proto3.util.equals(AudioEncoding, a, b); - } -} +/** + * Describes the message livekit.proto.AudioEncoding. + * Use `create(AudioEncodingSchema)` to create a new message. + */ +export const AudioEncodingSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 41); /** * @generated from message livekit.proto.TrackPublishOptions */ -export class TrackPublishOptions extends Message { +export type TrackPublishOptions = Message<"livekit.proto.TrackPublishOptions"> & { /** * encodings are optional * - * @generated from field: livekit.proto.VideoEncoding video_encoding = 1; + * @generated from field: optional livekit.proto.VideoEncoding video_encoding = 1; */ videoEncoding?: VideoEncoding; /** - * @generated from field: livekit.proto.AudioEncoding audio_encoding = 2; + * @generated from field: optional livekit.proto.AudioEncoding audio_encoding = 2; */ audioEncoding?: AudioEncoding; /** - * @generated from field: livekit.proto.VideoCodec video_codec = 3; + * @generated from field: required livekit.proto.VideoCodec video_codec = 3; */ - videoCodec = VideoCodec.VP8; + videoCodec: VideoCodec; /** - * @generated from field: bool dtx = 4; + * @generated from field: required bool dtx = 4; */ - dtx = false; + dtx: boolean; /** - * @generated from field: bool red = 5; + * @generated from field: required bool red = 5; */ - red = false; + red: boolean; /** - * @generated from field: bool simulcast = 6; + * @generated from field: required bool simulcast = 6; */ - simulcast = false; + simulcast: boolean; /** - * @generated from field: livekit.proto.TrackSource source = 7; + * @generated from field: required livekit.proto.TrackSource source = 7; */ - source = TrackSource.SOURCE_UNKNOWN; + source: TrackSource; /** - * @generated from field: string stream = 8; + * @generated from field: required string stream = 8; */ - stream = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.TrackPublishOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "video_encoding", kind: "message", T: VideoEncoding }, - { no: 2, name: "audio_encoding", kind: "message", T: AudioEncoding }, - { no: 3, name: "video_codec", kind: "enum", T: proto3.getEnumType(VideoCodec) }, - { no: 4, name: "dtx", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 5, name: "red", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 6, name: "simulcast", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 7, name: "source", kind: "enum", T: proto3.getEnumType(TrackSource) }, - { no: 8, name: "stream", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TrackPublishOptions { - return new TrackPublishOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TrackPublishOptions { - return new TrackPublishOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TrackPublishOptions { - return new TrackPublishOptions().fromJsonString(jsonString, options); - } + stream: string; +}; - static equals(a: TrackPublishOptions | PlainMessage | undefined, b: TrackPublishOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(TrackPublishOptions, a, b); - } -} +/** + * Describes the message livekit.proto.TrackPublishOptions. + * Use `create(TrackPublishOptionsSchema)` to create a new message. + */ +export const TrackPublishOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 42); /** * @generated from message livekit.proto.IceServer */ -export class IceServer extends Message { +export type IceServer = Message<"livekit.proto.IceServer"> & { /** * @generated from field: repeated string urls = 1; */ - urls: string[] = []; + urls: string[]; /** - * @generated from field: string username = 2; + * @generated from field: optional string username = 2; */ - username = ""; + username: string; /** - * @generated from field: string password = 3; + * @generated from field: optional string password = 3; */ - password = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.IceServer"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "urls", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 2, name: "username", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "password", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): IceServer { - return new IceServer().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): IceServer { - return new IceServer().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): IceServer { - return new IceServer().fromJsonString(jsonString, options); - } + password: string; +}; - static equals(a: IceServer | PlainMessage | undefined, b: IceServer | PlainMessage | undefined): boolean { - return proto3.util.equals(IceServer, a, b); - } -} +/** + * Describes the message livekit.proto.IceServer. + * Use `create(IceServerSchema)` to create a new message. + */ +export const IceServerSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 43); /** * @generated from message livekit.proto.RtcConfig */ -export class RtcConfig extends Message { +export type RtcConfig = Message<"livekit.proto.RtcConfig"> & { /** * @generated from field: optional livekit.proto.IceTransportType ice_transport_type = 1; */ - iceTransportType?: IceTransportType; + iceTransportType: IceTransportType; /** * @generated from field: optional livekit.proto.ContinualGatheringPolicy continual_gathering_policy = 2; */ - continualGatheringPolicy?: ContinualGatheringPolicy; + continualGatheringPolicy: ContinualGatheringPolicy; /** * empty fallback to default * * @generated from field: repeated livekit.proto.IceServer ice_servers = 3; */ - iceServers: IceServer[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RtcConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "ice_transport_type", kind: "enum", T: proto3.getEnumType(IceTransportType), opt: true }, - { no: 2, name: "continual_gathering_policy", kind: "enum", T: proto3.getEnumType(ContinualGatheringPolicy), opt: true }, - { no: 3, name: "ice_servers", kind: "message", T: IceServer, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtcConfig { - return new RtcConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RtcConfig { - return new RtcConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RtcConfig { - return new RtcConfig().fromJsonString(jsonString, options); - } + iceServers: IceServer[]; +}; - static equals(a: RtcConfig | PlainMessage | undefined, b: RtcConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(RtcConfig, a, b); - } -} +/** + * Describes the message livekit.proto.RtcConfig. + * Use `create(RtcConfigSchema)` to create a new message. + */ +export const RtcConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 44); /** * @generated from message livekit.proto.RoomOptions */ -export class RoomOptions extends Message { +export type RoomOptions = Message<"livekit.proto.RoomOptions"> & { /** - * @generated from field: bool auto_subscribe = 1; + * @generated from field: required bool auto_subscribe = 1; */ - autoSubscribe = false; + autoSubscribe: boolean; /** - * @generated from field: bool adaptive_stream = 2; + * @generated from field: required bool adaptive_stream = 2; */ - adaptiveStream = false; + adaptiveStream: boolean; /** - * @generated from field: bool dynacast = 3; + * @generated from field: required bool dynacast = 3; */ - dynacast = false; + dynacast: boolean; /** * @generated from field: optional livekit.proto.E2eeOptions e2ee = 4; @@ -2325,204 +1245,112 @@ export class RoomOptions extends Message { rtcConfig?: RtcConfig; /** - * @generated from field: uint32 join_retries = 6; + * @generated from field: required uint32 join_retries = 6; */ - joinRetries = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RoomOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "auto_subscribe", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "adaptive_stream", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 3, name: "dynacast", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 4, name: "e2ee", kind: "message", T: E2eeOptions, opt: true }, - { no: 5, name: "rtc_config", kind: "message", T: RtcConfig, opt: true }, - { no: 6, name: "join_retries", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RoomOptions { - return new RoomOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RoomOptions { - return new RoomOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RoomOptions { - return new RoomOptions().fromJsonString(jsonString, options); - } + joinRetries: number; +}; - static equals(a: RoomOptions | PlainMessage | undefined, b: RoomOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(RoomOptions, a, b); - } -} +/** + * Describes the message livekit.proto.RoomOptions. + * Use `create(RoomOptionsSchema)` to create a new message. + */ +export const RoomOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 45); /** * @generated from message livekit.proto.TranscriptionSegment */ -export class TranscriptionSegment extends Message { +export type TranscriptionSegment = Message<"livekit.proto.TranscriptionSegment"> & { /** - * @generated from field: string id = 1; + * @generated from field: required string id = 1; */ - id = ""; + id: string; /** - * @generated from field: string text = 2; + * @generated from field: required string text = 2; */ - text = ""; + text: string; /** - * @generated from field: uint64 start_time = 3; + * @generated from field: required uint64 start_time = 3; */ - startTime = protoInt64.zero; + startTime: bigint; /** - * @generated from field: uint64 end_time = 4; + * @generated from field: required uint64 end_time = 4; */ - endTime = protoInt64.zero; + endTime: bigint; /** - * @generated from field: bool final = 5; + * @generated from field: required bool final = 5; */ - final = false; + final: boolean; /** - * @generated from field: string language = 6; + * @generated from field: required string language = 6; */ - language = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.TranscriptionSegment"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "start_time", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 4, name: "end_time", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 5, name: "final", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 6, name: "language", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TranscriptionSegment { - return new TranscriptionSegment().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TranscriptionSegment { - return new TranscriptionSegment().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TranscriptionSegment { - return new TranscriptionSegment().fromJsonString(jsonString, options); - } + language: string; +}; - static equals(a: TranscriptionSegment | PlainMessage | undefined, b: TranscriptionSegment | PlainMessage | undefined): boolean { - return proto3.util.equals(TranscriptionSegment, a, b); - } -} +/** + * Describes the message livekit.proto.TranscriptionSegment. + * Use `create(TranscriptionSegmentSchema)` to create a new message. + */ +export const TranscriptionSegmentSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 46); /** * @generated from message livekit.proto.BufferInfo */ -export class BufferInfo extends Message { +export type BufferInfo = Message<"livekit.proto.BufferInfo"> & { /** - * @generated from field: uint64 data_ptr = 1; + * @generated from field: required uint64 data_ptr = 1; */ - dataPtr = protoInt64.zero; + dataPtr: bigint; /** - * @generated from field: uint64 data_len = 2; + * @generated from field: required uint64 data_len = 2; */ - dataLen = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.BufferInfo"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "data_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "data_len", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): BufferInfo { - return new BufferInfo().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): BufferInfo { - return new BufferInfo().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): BufferInfo { - return new BufferInfo().fromJsonString(jsonString, options); - } + dataLen: bigint; +}; - static equals(a: BufferInfo | PlainMessage | undefined, b: BufferInfo | PlainMessage | undefined): boolean { - return proto3.util.equals(BufferInfo, a, b); - } -} +/** + * Describes the message livekit.proto.BufferInfo. + * Use `create(BufferInfoSchema)` to create a new message. + */ +export const BufferInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 47); /** * @generated from message livekit.proto.OwnedBuffer */ -export class OwnedBuffer extends Message { +export type OwnedBuffer = Message<"livekit.proto.OwnedBuffer"> & { /** - * @generated from field: livekit.proto.FfiOwnedHandle handle = 1; + * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; */ handle?: FfiOwnedHandle; /** - * @generated from field: livekit.proto.BufferInfo data = 2; + * @generated from field: required livekit.proto.BufferInfo data = 2; */ data?: BufferInfo; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.OwnedBuffer"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle }, - { no: 2, name: "data", kind: "message", T: BufferInfo }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OwnedBuffer { - return new OwnedBuffer().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OwnedBuffer { - return new OwnedBuffer().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OwnedBuffer { - return new OwnedBuffer().fromJsonString(jsonString, options); - } - - static equals(a: OwnedBuffer | PlainMessage | undefined, b: OwnedBuffer | PlainMessage | undefined): boolean { - return proto3.util.equals(OwnedBuffer, a, b); - } -} +/** + * Describes the message livekit.proto.OwnedBuffer. + * Use `create(OwnedBufferSchema)` to create a new message. + */ +export const OwnedBufferSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 48); /** * @generated from message livekit.proto.RoomEvent */ -export class RoomEvent extends Message { +export type RoomEvent = Message<"livekit.proto.RoomEvent"> & { /** - * @generated from field: uint64 room_handle = 1; + * @generated from field: required uint64 room_handle = 1; */ - roomHandle = protoInt64.zero; + roomHandle: bigint; /** * @generated from oneof livekit.proto.RoomEvent.message @@ -2699,429 +1527,196 @@ export class RoomEvent extends Message { */ value: ChatMessageReceived; case: "chatMessage"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RoomEvent"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "room_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "participant_connected", kind: "message", T: ParticipantConnected, oneof: "message" }, - { no: 3, name: "participant_disconnected", kind: "message", T: ParticipantDisconnected, oneof: "message" }, - { no: 4, name: "local_track_published", kind: "message", T: LocalTrackPublished, oneof: "message" }, - { no: 5, name: "local_track_unpublished", kind: "message", T: LocalTrackUnpublished, oneof: "message" }, - { no: 6, name: "local_track_subscribed", kind: "message", T: LocalTrackSubscribed, oneof: "message" }, - { no: 7, name: "track_published", kind: "message", T: TrackPublished, oneof: "message" }, - { no: 8, name: "track_unpublished", kind: "message", T: TrackUnpublished, oneof: "message" }, - { no: 9, name: "track_subscribed", kind: "message", T: TrackSubscribed, oneof: "message" }, - { no: 10, name: "track_unsubscribed", kind: "message", T: TrackUnsubscribed, oneof: "message" }, - { no: 11, name: "track_subscription_failed", kind: "message", T: TrackSubscriptionFailed, oneof: "message" }, - { no: 12, name: "track_muted", kind: "message", T: TrackMuted, oneof: "message" }, - { no: 13, name: "track_unmuted", kind: "message", T: TrackUnmuted, oneof: "message" }, - { no: 14, name: "active_speakers_changed", kind: "message", T: ActiveSpeakersChanged, oneof: "message" }, - { no: 15, name: "room_metadata_changed", kind: "message", T: RoomMetadataChanged, oneof: "message" }, - { no: 16, name: "room_sid_changed", kind: "message", T: RoomSidChanged, oneof: "message" }, - { no: 17, name: "participant_metadata_changed", kind: "message", T: ParticipantMetadataChanged, oneof: "message" }, - { no: 18, name: "participant_name_changed", kind: "message", T: ParticipantNameChanged, oneof: "message" }, - { no: 19, name: "participant_attributes_changed", kind: "message", T: ParticipantAttributesChanged, oneof: "message" }, - { no: 20, name: "connection_quality_changed", kind: "message", T: ConnectionQualityChanged, oneof: "message" }, - { no: 21, name: "connection_state_changed", kind: "message", T: ConnectionStateChanged, oneof: "message" }, - { no: 22, name: "disconnected", kind: "message", T: Disconnected, oneof: "message" }, - { no: 23, name: "reconnecting", kind: "message", T: Reconnecting, oneof: "message" }, - { no: 24, name: "reconnected", kind: "message", T: Reconnected, oneof: "message" }, - { no: 25, name: "e2ee_state_changed", kind: "message", T: E2eeStateChanged, oneof: "message" }, - { no: 26, name: "eos", kind: "message", T: RoomEOS, oneof: "message" }, - { no: 27, name: "data_packet_received", kind: "message", T: DataPacketReceived, oneof: "message" }, - { no: 28, name: "transcription_received", kind: "message", T: TranscriptionReceived, oneof: "message" }, - { no: 29, name: "chat_message", kind: "message", T: ChatMessageReceived, oneof: "message" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RoomEvent { - return new RoomEvent().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RoomEvent { - return new RoomEvent().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RoomEvent { - return new RoomEvent().fromJsonString(jsonString, options); - } - - static equals(a: RoomEvent | PlainMessage | undefined, b: RoomEvent | PlainMessage | undefined): boolean { - return proto3.util.equals(RoomEvent, a, b); - } -} + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message livekit.proto.RoomEvent. + * Use `create(RoomEventSchema)` to create a new message. + */ +export const RoomEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 49); /** * @generated from message livekit.proto.RoomInfo */ -export class RoomInfo extends Message { +export type RoomInfo = Message<"livekit.proto.RoomInfo"> & { /** * @generated from field: optional string sid = 1; */ - sid?: string; + sid: string; /** - * @generated from field: string name = 2; + * @generated from field: required string name = 2; */ - name = ""; + name: string; /** - * @generated from field: string metadata = 3; + * @generated from field: required string metadata = 3; */ - metadata = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RoomInfo"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + metadata: string; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): RoomInfo { - return new RoomInfo().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RoomInfo { - return new RoomInfo().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RoomInfo { - return new RoomInfo().fromJsonString(jsonString, options); - } - - static equals(a: RoomInfo | PlainMessage | undefined, b: RoomInfo | PlainMessage | undefined): boolean { - return proto3.util.equals(RoomInfo, a, b); - } -} +/** + * Describes the message livekit.proto.RoomInfo. + * Use `create(RoomInfoSchema)` to create a new message. + */ +export const RoomInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 50); /** * @generated from message livekit.proto.OwnedRoom */ -export class OwnedRoom extends Message { +export type OwnedRoom = Message<"livekit.proto.OwnedRoom"> & { /** - * @generated from field: livekit.proto.FfiOwnedHandle handle = 1; + * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; */ handle?: FfiOwnedHandle; /** - * @generated from field: livekit.proto.RoomInfo info = 2; + * @generated from field: required livekit.proto.RoomInfo info = 2; */ info?: RoomInfo; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.OwnedRoom"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle }, - { no: 2, name: "info", kind: "message", T: RoomInfo }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OwnedRoom { - return new OwnedRoom().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OwnedRoom { - return new OwnedRoom().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OwnedRoom { - return new OwnedRoom().fromJsonString(jsonString, options); - } - - static equals(a: OwnedRoom | PlainMessage | undefined, b: OwnedRoom | PlainMessage | undefined): boolean { - return proto3.util.equals(OwnedRoom, a, b); - } -} +/** + * Describes the message livekit.proto.OwnedRoom. + * Use `create(OwnedRoomSchema)` to create a new message. + */ +export const OwnedRoomSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 51); /** * @generated from message livekit.proto.ParticipantConnected */ -export class ParticipantConnected extends Message { +export type ParticipantConnected = Message<"livekit.proto.ParticipantConnected"> & { /** - * @generated from field: livekit.proto.OwnedParticipant info = 1; + * @generated from field: required livekit.proto.OwnedParticipant info = 1; */ info?: OwnedParticipant; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.ParticipantConnected"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "info", kind: "message", T: OwnedParticipant }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantConnected { - return new ParticipantConnected().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantConnected { - return new ParticipantConnected().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ParticipantConnected { - return new ParticipantConnected().fromJsonString(jsonString, options); - } - - static equals(a: ParticipantConnected | PlainMessage | undefined, b: ParticipantConnected | PlainMessage | undefined): boolean { - return proto3.util.equals(ParticipantConnected, a, b); - } -} +/** + * Describes the message livekit.proto.ParticipantConnected. + * Use `create(ParticipantConnectedSchema)` to create a new message. + */ +export const ParticipantConnectedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 52); /** * @generated from message livekit.proto.ParticipantDisconnected */ -export class ParticipantDisconnected extends Message { +export type ParticipantDisconnected = Message<"livekit.proto.ParticipantDisconnected"> & { /** - * @generated from field: string participant_identity = 1; + * @generated from field: required string participant_identity = 1; */ - participantIdentity = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.ParticipantDisconnected"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantDisconnected { - return new ParticipantDisconnected().fromBinary(bytes, options); - } + participantIdentity: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantDisconnected { - return new ParticipantDisconnected().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ParticipantDisconnected { - return new ParticipantDisconnected().fromJsonString(jsonString, options); - } - - static equals(a: ParticipantDisconnected | PlainMessage | undefined, b: ParticipantDisconnected | PlainMessage | undefined): boolean { - return proto3.util.equals(ParticipantDisconnected, a, b); - } -} +/** + * Describes the message livekit.proto.ParticipantDisconnected. + * Use `create(ParticipantDisconnectedSchema)` to create a new message. + */ +export const ParticipantDisconnectedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 53); /** * @generated from message livekit.proto.LocalTrackPublished */ -export class LocalTrackPublished extends Message { +export type LocalTrackPublished = Message<"livekit.proto.LocalTrackPublished"> & { /** * The TrackPublicationInfo comes from the PublishTrack response * and the FfiClient musts wait for it before firing this event * - * @generated from field: string track_sid = 1; + * @generated from field: required string track_sid = 1; */ - trackSid = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.LocalTrackPublished"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): LocalTrackPublished { - return new LocalTrackPublished().fromBinary(bytes, options); - } + trackSid: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): LocalTrackPublished { - return new LocalTrackPublished().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): LocalTrackPublished { - return new LocalTrackPublished().fromJsonString(jsonString, options); - } - - static equals(a: LocalTrackPublished | PlainMessage | undefined, b: LocalTrackPublished | PlainMessage | undefined): boolean { - return proto3.util.equals(LocalTrackPublished, a, b); - } -} +/** + * Describes the message livekit.proto.LocalTrackPublished. + * Use `create(LocalTrackPublishedSchema)` to create a new message. + */ +export const LocalTrackPublishedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 54); /** * @generated from message livekit.proto.LocalTrackUnpublished */ -export class LocalTrackUnpublished extends Message { +export type LocalTrackUnpublished = Message<"livekit.proto.LocalTrackUnpublished"> & { /** - * @generated from field: string publication_sid = 1; + * @generated from field: required string publication_sid = 1; */ - publicationSid = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.LocalTrackUnpublished"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "publication_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): LocalTrackUnpublished { - return new LocalTrackUnpublished().fromBinary(bytes, options); - } + publicationSid: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): LocalTrackUnpublished { - return new LocalTrackUnpublished().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): LocalTrackUnpublished { - return new LocalTrackUnpublished().fromJsonString(jsonString, options); - } - - static equals(a: LocalTrackUnpublished | PlainMessage | undefined, b: LocalTrackUnpublished | PlainMessage | undefined): boolean { - return proto3.util.equals(LocalTrackUnpublished, a, b); - } -} +/** + * Describes the message livekit.proto.LocalTrackUnpublished. + * Use `create(LocalTrackUnpublishedSchema)` to create a new message. + */ +export const LocalTrackUnpublishedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 55); /** * @generated from message livekit.proto.LocalTrackSubscribed */ -export class LocalTrackSubscribed extends Message { +export type LocalTrackSubscribed = Message<"livekit.proto.LocalTrackSubscribed"> & { /** - * @generated from field: string track_sid = 2; + * @generated from field: required string track_sid = 2; */ - trackSid = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.LocalTrackSubscribed"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): LocalTrackSubscribed { - return new LocalTrackSubscribed().fromBinary(bytes, options); - } + trackSid: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): LocalTrackSubscribed { - return new LocalTrackSubscribed().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): LocalTrackSubscribed { - return new LocalTrackSubscribed().fromJsonString(jsonString, options); - } - - static equals(a: LocalTrackSubscribed | PlainMessage | undefined, b: LocalTrackSubscribed | PlainMessage | undefined): boolean { - return proto3.util.equals(LocalTrackSubscribed, a, b); - } -} +/** + * Describes the message livekit.proto.LocalTrackSubscribed. + * Use `create(LocalTrackSubscribedSchema)` to create a new message. + */ +export const LocalTrackSubscribedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 56); /** * @generated from message livekit.proto.TrackPublished */ -export class TrackPublished extends Message { +export type TrackPublished = Message<"livekit.proto.TrackPublished"> & { /** - * @generated from field: string participant_identity = 1; + * @generated from field: required string participant_identity = 1; */ - participantIdentity = ""; + participantIdentity: string; /** - * @generated from field: livekit.proto.OwnedTrackPublication publication = 2; + * @generated from field: required livekit.proto.OwnedTrackPublication publication = 2; */ publication?: OwnedTrackPublication; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.TrackPublished"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "publication", kind: "message", T: OwnedTrackPublication }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TrackPublished { - return new TrackPublished().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TrackPublished { - return new TrackPublished().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TrackPublished { - return new TrackPublished().fromJsonString(jsonString, options); - } - - static equals(a: TrackPublished | PlainMessage | undefined, b: TrackPublished | PlainMessage | undefined): boolean { - return proto3.util.equals(TrackPublished, a, b); - } -} +/** + * Describes the message livekit.proto.TrackPublished. + * Use `create(TrackPublishedSchema)` to create a new message. + */ +export const TrackPublishedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 57); /** * @generated from message livekit.proto.TrackUnpublished */ -export class TrackUnpublished extends Message { +export type TrackUnpublished = Message<"livekit.proto.TrackUnpublished"> & { /** - * @generated from field: string participant_identity = 1; + * @generated from field: required string participant_identity = 1; */ - participantIdentity = ""; + participantIdentity: string; /** - * @generated from field: string publication_sid = 2; + * @generated from field: required string publication_sid = 2; */ - publicationSid = ""; + publicationSid: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.TrackUnpublished"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "publication_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TrackUnpublished { - return new TrackUnpublished().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TrackUnpublished { - return new TrackUnpublished().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TrackUnpublished { - return new TrackUnpublished().fromJsonString(jsonString, options); - } - - static equals(a: TrackUnpublished | PlainMessage | undefined, b: TrackUnpublished | PlainMessage | undefined): boolean { - return proto3.util.equals(TrackUnpublished, a, b); - } -} +/** + * Describes the message livekit.proto.TrackUnpublished. + * Use `create(TrackUnpublishedSchema)` to create a new message. + */ +export const TrackUnpublishedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 58); /** * Publication isn't needed for subscription events on the FFI @@ -3129,771 +1724,411 @@ export class TrackUnpublished extends Message { * * @generated from message livekit.proto.TrackSubscribed */ -export class TrackSubscribed extends Message { +export type TrackSubscribed = Message<"livekit.proto.TrackSubscribed"> & { /** - * @generated from field: string participant_identity = 1; + * @generated from field: required string participant_identity = 1; */ - participantIdentity = ""; + participantIdentity: string; /** - * @generated from field: livekit.proto.OwnedTrack track = 2; + * @generated from field: required livekit.proto.OwnedTrack track = 2; */ track?: OwnedTrack; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.TrackSubscribed"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "track", kind: "message", T: OwnedTrack }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TrackSubscribed { - return new TrackSubscribed().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TrackSubscribed { - return new TrackSubscribed().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TrackSubscribed { - return new TrackSubscribed().fromJsonString(jsonString, options); - } - - static equals(a: TrackSubscribed | PlainMessage | undefined, b: TrackSubscribed | PlainMessage | undefined): boolean { - return proto3.util.equals(TrackSubscribed, a, b); - } -} +/** + * Describes the message livekit.proto.TrackSubscribed. + * Use `create(TrackSubscribedSchema)` to create a new message. + */ +export const TrackSubscribedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 59); /** * @generated from message livekit.proto.TrackUnsubscribed */ -export class TrackUnsubscribed extends Message { +export type TrackUnsubscribed = Message<"livekit.proto.TrackUnsubscribed"> & { /** * The FFI language can dispose/remove the VideoSink here * - * @generated from field: string participant_identity = 1; + * @generated from field: required string participant_identity = 1; */ - participantIdentity = ""; + participantIdentity: string; /** - * @generated from field: string track_sid = 2; + * @generated from field: required string track_sid = 2; */ - trackSid = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.TrackUnsubscribed"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TrackUnsubscribed { - return new TrackUnsubscribed().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TrackUnsubscribed { - return new TrackUnsubscribed().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TrackUnsubscribed { - return new TrackUnsubscribed().fromJsonString(jsonString, options); - } + trackSid: string; +}; - static equals(a: TrackUnsubscribed | PlainMessage | undefined, b: TrackUnsubscribed | PlainMessage | undefined): boolean { - return proto3.util.equals(TrackUnsubscribed, a, b); - } -} +/** + * Describes the message livekit.proto.TrackUnsubscribed. + * Use `create(TrackUnsubscribedSchema)` to create a new message. + */ +export const TrackUnsubscribedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 60); /** * @generated from message livekit.proto.TrackSubscriptionFailed */ -export class TrackSubscriptionFailed extends Message { +export type TrackSubscriptionFailed = Message<"livekit.proto.TrackSubscriptionFailed"> & { /** - * @generated from field: string participant_identity = 1; + * @generated from field: required string participant_identity = 1; */ - participantIdentity = ""; + participantIdentity: string; /** - * @generated from field: string track_sid = 2; + * @generated from field: required string track_sid = 2; */ - trackSid = ""; + trackSid: string; /** - * @generated from field: string error = 3; + * @generated from field: required string error = 3; */ - error = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.TrackSubscriptionFailed"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TrackSubscriptionFailed { - return new TrackSubscriptionFailed().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TrackSubscriptionFailed { - return new TrackSubscriptionFailed().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TrackSubscriptionFailed { - return new TrackSubscriptionFailed().fromJsonString(jsonString, options); - } + error: string; +}; - static equals(a: TrackSubscriptionFailed | PlainMessage | undefined, b: TrackSubscriptionFailed | PlainMessage | undefined): boolean { - return proto3.util.equals(TrackSubscriptionFailed, a, b); - } -} +/** + * Describes the message livekit.proto.TrackSubscriptionFailed. + * Use `create(TrackSubscriptionFailedSchema)` to create a new message. + */ +export const TrackSubscriptionFailedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 61); /** * @generated from message livekit.proto.TrackMuted */ -export class TrackMuted extends Message { +export type TrackMuted = Message<"livekit.proto.TrackMuted"> & { /** - * @generated from field: string participant_identity = 1; + * @generated from field: required string participant_identity = 1; */ - participantIdentity = ""; + participantIdentity: string; /** - * @generated from field: string track_sid = 2; + * @generated from field: required string track_sid = 2; */ - trackSid = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.TrackMuted"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TrackMuted { - return new TrackMuted().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TrackMuted { - return new TrackMuted().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TrackMuted { - return new TrackMuted().fromJsonString(jsonString, options); - } + trackSid: string; +}; - static equals(a: TrackMuted | PlainMessage | undefined, b: TrackMuted | PlainMessage | undefined): boolean { - return proto3.util.equals(TrackMuted, a, b); - } -} +/** + * Describes the message livekit.proto.TrackMuted. + * Use `create(TrackMutedSchema)` to create a new message. + */ +export const TrackMutedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 62); /** * @generated from message livekit.proto.TrackUnmuted */ -export class TrackUnmuted extends Message { +export type TrackUnmuted = Message<"livekit.proto.TrackUnmuted"> & { /** - * @generated from field: string participant_identity = 1; + * @generated from field: required string participant_identity = 1; */ - participantIdentity = ""; + participantIdentity: string; /** - * @generated from field: string track_sid = 2; + * @generated from field: required string track_sid = 2; */ - trackSid = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.TrackUnmuted"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TrackUnmuted { - return new TrackUnmuted().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TrackUnmuted { - return new TrackUnmuted().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TrackUnmuted { - return new TrackUnmuted().fromJsonString(jsonString, options); - } + trackSid: string; +}; - static equals(a: TrackUnmuted | PlainMessage | undefined, b: TrackUnmuted | PlainMessage | undefined): boolean { - return proto3.util.equals(TrackUnmuted, a, b); - } -} +/** + * Describes the message livekit.proto.TrackUnmuted. + * Use `create(TrackUnmutedSchema)` to create a new message. + */ +export const TrackUnmutedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 63); /** * @generated from message livekit.proto.E2eeStateChanged */ -export class E2eeStateChanged extends Message { +export type E2eeStateChanged = Message<"livekit.proto.E2eeStateChanged"> & { /** * Using sid instead of identity for ffi communication * - * @generated from field: string participant_identity = 1; + * @generated from field: required string participant_identity = 1; */ - participantIdentity = ""; + participantIdentity: string; /** - * @generated from field: livekit.proto.EncryptionState state = 2; + * @generated from field: required livekit.proto.EncryptionState state = 2; */ - state = EncryptionState.NEW; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.E2eeStateChanged"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "state", kind: "enum", T: proto3.getEnumType(EncryptionState) }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): E2eeStateChanged { - return new E2eeStateChanged().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): E2eeStateChanged { - return new E2eeStateChanged().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): E2eeStateChanged { - return new E2eeStateChanged().fromJsonString(jsonString, options); - } + state: EncryptionState; +}; - static equals(a: E2eeStateChanged | PlainMessage | undefined, b: E2eeStateChanged | PlainMessage | undefined): boolean { - return proto3.util.equals(E2eeStateChanged, a, b); - } -} +/** + * Describes the message livekit.proto.E2eeStateChanged. + * Use `create(E2eeStateChangedSchema)` to create a new message. + */ +export const E2eeStateChangedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 64); /** * @generated from message livekit.proto.ActiveSpeakersChanged */ -export class ActiveSpeakersChanged extends Message { +export type ActiveSpeakersChanged = Message<"livekit.proto.ActiveSpeakersChanged"> & { /** * @generated from field: repeated string participant_identities = 1; */ - participantIdentities: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.ActiveSpeakersChanged"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identities", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ActiveSpeakersChanged { - return new ActiveSpeakersChanged().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ActiveSpeakersChanged { - return new ActiveSpeakersChanged().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ActiveSpeakersChanged { - return new ActiveSpeakersChanged().fromJsonString(jsonString, options); - } + participantIdentities: string[]; +}; - static equals(a: ActiveSpeakersChanged | PlainMessage | undefined, b: ActiveSpeakersChanged | PlainMessage | undefined): boolean { - return proto3.util.equals(ActiveSpeakersChanged, a, b); - } -} +/** + * Describes the message livekit.proto.ActiveSpeakersChanged. + * Use `create(ActiveSpeakersChangedSchema)` to create a new message. + */ +export const ActiveSpeakersChangedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 65); /** * @generated from message livekit.proto.RoomMetadataChanged */ -export class RoomMetadataChanged extends Message { +export type RoomMetadataChanged = Message<"livekit.proto.RoomMetadataChanged"> & { /** - * @generated from field: string metadata = 1; + * @generated from field: required string metadata = 1; */ - metadata = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RoomMetadataChanged"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RoomMetadataChanged { - return new RoomMetadataChanged().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RoomMetadataChanged { - return new RoomMetadataChanged().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RoomMetadataChanged { - return new RoomMetadataChanged().fromJsonString(jsonString, options); - } + metadata: string; +}; - static equals(a: RoomMetadataChanged | PlainMessage | undefined, b: RoomMetadataChanged | PlainMessage | undefined): boolean { - return proto3.util.equals(RoomMetadataChanged, a, b); - } -} +/** + * Describes the message livekit.proto.RoomMetadataChanged. + * Use `create(RoomMetadataChangedSchema)` to create a new message. + */ +export const RoomMetadataChangedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 66); /** * @generated from message livekit.proto.RoomSidChanged */ -export class RoomSidChanged extends Message { +export type RoomSidChanged = Message<"livekit.proto.RoomSidChanged"> & { /** - * @generated from field: string sid = 1; + * @generated from field: required string sid = 1; */ - sid = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RoomSidChanged"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RoomSidChanged { - return new RoomSidChanged().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RoomSidChanged { - return new RoomSidChanged().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RoomSidChanged { - return new RoomSidChanged().fromJsonString(jsonString, options); - } + sid: string; +}; - static equals(a: RoomSidChanged | PlainMessage | undefined, b: RoomSidChanged | PlainMessage | undefined): boolean { - return proto3.util.equals(RoomSidChanged, a, b); - } -} +/** + * Describes the message livekit.proto.RoomSidChanged. + * Use `create(RoomSidChangedSchema)` to create a new message. + */ +export const RoomSidChangedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 67); /** * @generated from message livekit.proto.ParticipantMetadataChanged */ -export class ParticipantMetadataChanged extends Message { +export type ParticipantMetadataChanged = Message<"livekit.proto.ParticipantMetadataChanged"> & { /** - * @generated from field: string participant_identity = 1; + * @generated from field: required string participant_identity = 1; */ - participantIdentity = ""; + participantIdentity: string; /** - * @generated from field: string metadata = 2; + * @generated from field: required string metadata = 2; */ - metadata = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.ParticipantMetadataChanged"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantMetadataChanged { - return new ParticipantMetadataChanged().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantMetadataChanged { - return new ParticipantMetadataChanged().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ParticipantMetadataChanged { - return new ParticipantMetadataChanged().fromJsonString(jsonString, options); - } + metadata: string; +}; - static equals(a: ParticipantMetadataChanged | PlainMessage | undefined, b: ParticipantMetadataChanged | PlainMessage | undefined): boolean { - return proto3.util.equals(ParticipantMetadataChanged, a, b); - } -} +/** + * Describes the message livekit.proto.ParticipantMetadataChanged. + * Use `create(ParticipantMetadataChangedSchema)` to create a new message. + */ +export const ParticipantMetadataChangedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 68); /** * @generated from message livekit.proto.ParticipantAttributesChanged */ -export class ParticipantAttributesChanged extends Message { +export type ParticipantAttributesChanged = Message<"livekit.proto.ParticipantAttributesChanged"> & { /** - * @generated from field: string participant_identity = 1; + * @generated from field: required string participant_identity = 1; */ - participantIdentity = ""; + participantIdentity: string; /** - * @generated from field: map attributes = 2; + * @generated from field: repeated livekit.proto.AttributesEntry attributes = 2; */ - attributes: { [key: string]: string } = {}; + attributes: AttributesEntry[]; /** - * @generated from field: map changed_attributes = 3; + * @generated from field: repeated livekit.proto.AttributesEntry changed_attributes = 3; */ - changedAttributes: { [key: string]: string } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.ParticipantAttributesChanged"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - { no: 3, name: "changed_attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantAttributesChanged { - return new ParticipantAttributesChanged().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantAttributesChanged { - return new ParticipantAttributesChanged().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ParticipantAttributesChanged { - return new ParticipantAttributesChanged().fromJsonString(jsonString, options); - } + changedAttributes: AttributesEntry[]; +}; - static equals(a: ParticipantAttributesChanged | PlainMessage | undefined, b: ParticipantAttributesChanged | PlainMessage | undefined): boolean { - return proto3.util.equals(ParticipantAttributesChanged, a, b); - } -} +/** + * Describes the message livekit.proto.ParticipantAttributesChanged. + * Use `create(ParticipantAttributesChangedSchema)` to create a new message. + */ +export const ParticipantAttributesChangedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 69); /** * @generated from message livekit.proto.ParticipantNameChanged */ -export class ParticipantNameChanged extends Message { +export type ParticipantNameChanged = Message<"livekit.proto.ParticipantNameChanged"> & { /** - * @generated from field: string participant_identity = 1; + * @generated from field: required string participant_identity = 1; */ - participantIdentity = ""; + participantIdentity: string; /** - * @generated from field: string name = 2; + * @generated from field: required string name = 2; */ - name = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.ParticipantNameChanged"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantNameChanged { - return new ParticipantNameChanged().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantNameChanged { - return new ParticipantNameChanged().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ParticipantNameChanged { - return new ParticipantNameChanged().fromJsonString(jsonString, options); - } + name: string; +}; - static equals(a: ParticipantNameChanged | PlainMessage | undefined, b: ParticipantNameChanged | PlainMessage | undefined): boolean { - return proto3.util.equals(ParticipantNameChanged, a, b); - } -} +/** + * Describes the message livekit.proto.ParticipantNameChanged. + * Use `create(ParticipantNameChangedSchema)` to create a new message. + */ +export const ParticipantNameChangedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 70); /** * @generated from message livekit.proto.ConnectionQualityChanged */ -export class ConnectionQualityChanged extends Message { +export type ConnectionQualityChanged = Message<"livekit.proto.ConnectionQualityChanged"> & { /** - * @generated from field: string participant_identity = 1; + * @generated from field: required string participant_identity = 1; */ - participantIdentity = ""; + participantIdentity: string; /** - * @generated from field: livekit.proto.ConnectionQuality quality = 2; + * @generated from field: required livekit.proto.ConnectionQuality quality = 2; */ - quality = ConnectionQuality.QUALITY_POOR; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.ConnectionQualityChanged"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "quality", kind: "enum", T: proto3.getEnumType(ConnectionQuality) }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ConnectionQualityChanged { - return new ConnectionQualityChanged().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ConnectionQualityChanged { - return new ConnectionQualityChanged().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ConnectionQualityChanged { - return new ConnectionQualityChanged().fromJsonString(jsonString, options); - } + quality: ConnectionQuality; +}; - static equals(a: ConnectionQualityChanged | PlainMessage | undefined, b: ConnectionQualityChanged | PlainMessage | undefined): boolean { - return proto3.util.equals(ConnectionQualityChanged, a, b); - } -} +/** + * Describes the message livekit.proto.ConnectionQualityChanged. + * Use `create(ConnectionQualityChangedSchema)` to create a new message. + */ +export const ConnectionQualityChangedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 71); /** * @generated from message livekit.proto.UserPacket */ -export class UserPacket extends Message { +export type UserPacket = Message<"livekit.proto.UserPacket"> & { /** - * @generated from field: livekit.proto.OwnedBuffer data = 1; + * @generated from field: required livekit.proto.OwnedBuffer data = 1; */ data?: OwnedBuffer; /** * @generated from field: optional string topic = 2; */ - topic?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.UserPacket"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "data", kind: "message", T: OwnedBuffer }, - { no: 2, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UserPacket { - return new UserPacket().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UserPacket { - return new UserPacket().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UserPacket { - return new UserPacket().fromJsonString(jsonString, options); - } + topic: string; +}; - static equals(a: UserPacket | PlainMessage | undefined, b: UserPacket | PlainMessage | undefined): boolean { - return proto3.util.equals(UserPacket, a, b); - } -} +/** + * Describes the message livekit.proto.UserPacket. + * Use `create(UserPacketSchema)` to create a new message. + */ +export const UserPacketSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 72); /** * @generated from message livekit.proto.ChatMessage */ -export class ChatMessage extends Message { +export type ChatMessage = Message<"livekit.proto.ChatMessage"> & { /** - * @generated from field: string id = 1; + * @generated from field: required string id = 1; */ - id = ""; + id: string; /** - * @generated from field: int64 timestamp = 2; + * @generated from field: required int64 timestamp = 2; */ - timestamp = protoInt64.zero; + timestamp: bigint; /** - * @generated from field: string message = 3; + * @generated from field: required string message = 3; */ - message = ""; + message: string; /** * @generated from field: optional int64 edit_timestamp = 4; */ - editTimestamp?: bigint; + editTimestamp: bigint; /** * @generated from field: optional bool deleted = 5; */ - deleted?: boolean; + deleted: boolean; /** * @generated from field: optional bool generated = 6; */ - generated?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.ChatMessage"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 3, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "edit_timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 5, name: "deleted", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 6, name: "generated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ChatMessage { - return new ChatMessage().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ChatMessage { - return new ChatMessage().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ChatMessage { - return new ChatMessage().fromJsonString(jsonString, options); - } - - static equals(a: ChatMessage | PlainMessage | undefined, b: ChatMessage | PlainMessage | undefined): boolean { - return proto3.util.equals(ChatMessage, a, b); - } -} + generated: boolean; +}; + +/** + * Describes the message livekit.proto.ChatMessage. + * Use `create(ChatMessageSchema)` to create a new message. + */ +export const ChatMessageSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 73); /** * @generated from message livekit.proto.ChatMessageReceived */ -export class ChatMessageReceived extends Message { +export type ChatMessageReceived = Message<"livekit.proto.ChatMessageReceived"> & { /** - * @generated from field: livekit.proto.ChatMessage message = 1; + * @generated from field: required livekit.proto.ChatMessage message = 1; */ message?: ChatMessage; /** - * @generated from field: string participant_identity = 2; + * @generated from field: required string participant_identity = 2; */ - participantIdentity = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + participantIdentity: string; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.ChatMessageReceived"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "message", kind: "message", T: ChatMessage }, - { no: 2, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ChatMessageReceived { - return new ChatMessageReceived().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ChatMessageReceived { - return new ChatMessageReceived().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ChatMessageReceived { - return new ChatMessageReceived().fromJsonString(jsonString, options); - } - - static equals(a: ChatMessageReceived | PlainMessage | undefined, b: ChatMessageReceived | PlainMessage | undefined): boolean { - return proto3.util.equals(ChatMessageReceived, a, b); - } -} +/** + * Describes the message livekit.proto.ChatMessageReceived. + * Use `create(ChatMessageReceivedSchema)` to create a new message. + */ +export const ChatMessageReceivedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 74); /** * @generated from message livekit.proto.SipDTMF */ -export class SipDTMF extends Message { +export type SipDTMF = Message<"livekit.proto.SipDTMF"> & { /** - * @generated from field: uint32 code = 1; + * @generated from field: required uint32 code = 1; */ - code = 0; + code: number; /** * @generated from field: optional string digit = 2; */ - digit?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + digit: string; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SipDTMF"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "code", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 2, name: "digit", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SipDTMF { - return new SipDTMF().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SipDTMF { - return new SipDTMF().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SipDTMF { - return new SipDTMF().fromJsonString(jsonString, options); - } - - static equals(a: SipDTMF | PlainMessage | undefined, b: SipDTMF | PlainMessage | undefined): boolean { - return proto3.util.equals(SipDTMF, a, b); - } -} +/** + * Describes the message livekit.proto.SipDTMF. + * Use `create(SipDTMFSchema)` to create a new message. + */ +export const SipDTMFSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 75); /** * @generated from message livekit.proto.DataPacketReceived */ -export class DataPacketReceived extends Message { +export type DataPacketReceived = Message<"livekit.proto.DataPacketReceived"> & { /** - * @generated from field: livekit.proto.DataPacketKind kind = 1; + * @generated from field: required livekit.proto.DataPacketKind kind = 1; */ - kind = DataPacketKind.KIND_LOSSY; + kind: DataPacketKind; /** * Can be empty if the data is sent a server SDK * - * @generated from field: string participant_identity = 2; + * @generated from field: required string participant_identity = 2; */ - participantIdentity = ""; + participantIdentity: string; /** * @generated from oneof livekit.proto.DataPacketReceived.value @@ -3910,283 +2145,337 @@ export class DataPacketReceived extends Message { */ value: SipDTMF; case: "sipDtmf"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.DataPacketReceived"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "kind", kind: "enum", T: proto3.getEnumType(DataPacketKind) }, - { no: 2, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "user", kind: "message", T: UserPacket, oneof: "value" }, - { no: 5, name: "sip_dtmf", kind: "message", T: SipDTMF, oneof: "value" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DataPacketReceived { - return new DataPacketReceived().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DataPacketReceived { - return new DataPacketReceived().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DataPacketReceived { - return new DataPacketReceived().fromJsonString(jsonString, options); - } - - static equals(a: DataPacketReceived | PlainMessage | undefined, b: DataPacketReceived | PlainMessage | undefined): boolean { - return proto3.util.equals(DataPacketReceived, a, b); - } -} + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message livekit.proto.DataPacketReceived. + * Use `create(DataPacketReceivedSchema)` to create a new message. + */ +export const DataPacketReceivedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 76); /** * @generated from message livekit.proto.TranscriptionReceived */ -export class TranscriptionReceived extends Message { +export type TranscriptionReceived = Message<"livekit.proto.TranscriptionReceived"> & { /** * @generated from field: optional string participant_identity = 1; */ - participantIdentity?: string; + participantIdentity: string; /** * @generated from field: optional string track_sid = 2; */ - trackSid?: string; + trackSid: string; /** * @generated from field: repeated livekit.proto.TranscriptionSegment segments = 3; */ - segments: TranscriptionSegment[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + segments: TranscriptionSegment[]; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.TranscriptionReceived"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "segments", kind: "message", T: TranscriptionSegment, repeated: true }, - ]); +/** + * Describes the message livekit.proto.TranscriptionReceived. + * Use `create(TranscriptionReceivedSchema)` to create a new message. + */ +export const TranscriptionReceivedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 77); - static fromBinary(bytes: Uint8Array, options?: Partial): TranscriptionReceived { - return new TranscriptionReceived().fromBinary(bytes, options); - } +/** + * @generated from message livekit.proto.ConnectionStateChanged + */ +export type ConnectionStateChanged = Message<"livekit.proto.ConnectionStateChanged"> & { + /** + * @generated from field: required livekit.proto.ConnectionState state = 1; + */ + state: ConnectionState; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): TranscriptionReceived { - return new TranscriptionReceived().fromJson(jsonValue, options); - } +/** + * Describes the message livekit.proto.ConnectionStateChanged. + * Use `create(ConnectionStateChangedSchema)` to create a new message. + */ +export const ConnectionStateChangedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 78); - static fromJsonString(jsonString: string, options?: Partial): TranscriptionReceived { - return new TranscriptionReceived().fromJsonString(jsonString, options); - } +/** + * @generated from message livekit.proto.Connected + */ +export type Connected = Message<"livekit.proto.Connected"> & { +}; - static equals(a: TranscriptionReceived | PlainMessage | undefined, b: TranscriptionReceived | PlainMessage | undefined): boolean { - return proto3.util.equals(TranscriptionReceived, a, b); - } -} +/** + * Describes the message livekit.proto.Connected. + * Use `create(ConnectedSchema)` to create a new message. + */ +export const ConnectedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 79); /** - * @generated from message livekit.proto.ConnectionStateChanged + * @generated from message livekit.proto.Disconnected */ -export class ConnectionStateChanged extends Message { +export type Disconnected = Message<"livekit.proto.Disconnected"> & { /** - * @generated from field: livekit.proto.ConnectionState state = 1; + * @generated from field: required livekit.proto.DisconnectReason reason = 1; */ - state = ConnectionState.CONN_DISCONNECTED; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + reason: DisconnectReason; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.ConnectionStateChanged"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "state", kind: "enum", T: proto3.getEnumType(ConnectionState) }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ConnectionStateChanged { - return new ConnectionStateChanged().fromBinary(bytes, options); - } +/** + * Describes the message livekit.proto.Disconnected. + * Use `create(DisconnectedSchema)` to create a new message. + */ +export const DisconnectedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 80); - static fromJson(jsonValue: JsonValue, options?: Partial): ConnectionStateChanged { - return new ConnectionStateChanged().fromJson(jsonValue, options); - } +/** + * @generated from message livekit.proto.Reconnecting + */ +export type Reconnecting = Message<"livekit.proto.Reconnecting"> & { +}; - static fromJsonString(jsonString: string, options?: Partial): ConnectionStateChanged { - return new ConnectionStateChanged().fromJsonString(jsonString, options); - } +/** + * Describes the message livekit.proto.Reconnecting. + * Use `create(ReconnectingSchema)` to create a new message. + */ +export const ReconnectingSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 81); - static equals(a: ConnectionStateChanged | PlainMessage | undefined, b: ConnectionStateChanged | PlainMessage | undefined): boolean { - return proto3.util.equals(ConnectionStateChanged, a, b); - } -} +/** + * @generated from message livekit.proto.Reconnected + */ +export type Reconnected = Message<"livekit.proto.Reconnected"> & { +}; /** - * @generated from message livekit.proto.Connected + * Describes the message livekit.proto.Reconnected. + * Use `create(ReconnectedSchema)` to create a new message. */ -export class Connected extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export const ReconnectedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 82); - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.Connected"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); +/** + * @generated from message livekit.proto.RoomEOS + */ +export type RoomEOS = Message<"livekit.proto.RoomEOS"> & { +}; - static fromBinary(bytes: Uint8Array, options?: Partial): Connected { - return new Connected().fromBinary(bytes, options); - } +/** + * Describes the message livekit.proto.RoomEOS. + * Use `create(RoomEOSSchema)` to create a new message. + */ +export const RoomEOSSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_room, 83); - static fromJson(jsonValue: JsonValue, options?: Partial): Connected { - return new Connected().fromJson(jsonValue, options); - } +/** + * @generated from enum livekit.proto.IceTransportType + */ +export enum IceTransportType { + /** + * @generated from enum value: TRANSPORT_RELAY = 0; + */ + TRANSPORT_RELAY = 0, - static fromJsonString(jsonString: string, options?: Partial): Connected { - return new Connected().fromJsonString(jsonString, options); - } + /** + * @generated from enum value: TRANSPORT_NOHOST = 1; + */ + TRANSPORT_NOHOST = 1, - static equals(a: Connected | PlainMessage | undefined, b: Connected | PlainMessage | undefined): boolean { - return proto3.util.equals(Connected, a, b); - } + /** + * @generated from enum value: TRANSPORT_ALL = 2; + */ + TRANSPORT_ALL = 2, } /** - * @generated from message livekit.proto.Disconnected + * Describes the enum livekit.proto.IceTransportType. + */ +export const IceTransportTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_room, 0); + +/** + * @generated from enum livekit.proto.ContinualGatheringPolicy */ -export class Disconnected extends Message { +export enum ContinualGatheringPolicy { /** - * @generated from field: livekit.proto.DisconnectReason reason = 1; + * @generated from enum value: GATHER_ONCE = 0; */ - reason = DisconnectReason.UNKNOWN_REASON; + GATHER_ONCE = 0, - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + /** + * @generated from enum value: GATHER_CONTINUALLY = 1; + */ + GATHER_CONTINUALLY = 1, +} - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.Disconnected"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "reason", kind: "enum", T: proto3.getEnumType(DisconnectReason) }, - ]); +/** + * Describes the enum livekit.proto.ContinualGatheringPolicy. + */ +export const ContinualGatheringPolicySchema: GenEnum = /*@__PURE__*/ + enumDesc(file_room, 1); - static fromBinary(bytes: Uint8Array, options?: Partial): Disconnected { - return new Disconnected().fromBinary(bytes, options); - } +/** + * @generated from enum livekit.proto.ConnectionQuality + */ +export enum ConnectionQuality { + /** + * @generated from enum value: QUALITY_POOR = 0; + */ + QUALITY_POOR = 0, - static fromJson(jsonValue: JsonValue, options?: Partial): Disconnected { - return new Disconnected().fromJson(jsonValue, options); - } + /** + * @generated from enum value: QUALITY_GOOD = 1; + */ + QUALITY_GOOD = 1, - static fromJsonString(jsonString: string, options?: Partial): Disconnected { - return new Disconnected().fromJsonString(jsonString, options); - } + /** + * @generated from enum value: QUALITY_EXCELLENT = 2; + */ + QUALITY_EXCELLENT = 2, - static equals(a: Disconnected | PlainMessage | undefined, b: Disconnected | PlainMessage | undefined): boolean { - return proto3.util.equals(Disconnected, a, b); - } + /** + * @generated from enum value: QUALITY_LOST = 3; + */ + QUALITY_LOST = 3, } /** - * @generated from message livekit.proto.Reconnecting + * Describes the enum livekit.proto.ConnectionQuality. + */ +export const ConnectionQualitySchema: GenEnum = /*@__PURE__*/ + enumDesc(file_room, 2); + +/** + * @generated from enum livekit.proto.ConnectionState */ -export class Reconnecting extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export enum ConnectionState { + /** + * @generated from enum value: CONN_DISCONNECTED = 0; + */ + CONN_DISCONNECTED = 0, - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.Reconnecting"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); + /** + * @generated from enum value: CONN_CONNECTED = 1; + */ + CONN_CONNECTED = 1, - static fromBinary(bytes: Uint8Array, options?: Partial): Reconnecting { - return new Reconnecting().fromBinary(bytes, options); - } + /** + * @generated from enum value: CONN_RECONNECTING = 2; + */ + CONN_RECONNECTING = 2, +} - static fromJson(jsonValue: JsonValue, options?: Partial): Reconnecting { - return new Reconnecting().fromJson(jsonValue, options); - } +/** + * Describes the enum livekit.proto.ConnectionState. + */ +export const ConnectionStateSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_room, 3); - static fromJsonString(jsonString: string, options?: Partial): Reconnecting { - return new Reconnecting().fromJsonString(jsonString, options); - } +/** + * @generated from enum livekit.proto.DataPacketKind + */ +export enum DataPacketKind { + /** + * @generated from enum value: KIND_LOSSY = 0; + */ + KIND_LOSSY = 0, - static equals(a: Reconnecting | PlainMessage | undefined, b: Reconnecting | PlainMessage | undefined): boolean { - return proto3.util.equals(Reconnecting, a, b); - } + /** + * @generated from enum value: KIND_RELIABLE = 1; + */ + KIND_RELIABLE = 1, } /** - * @generated from message livekit.proto.Reconnected + * Describes the enum livekit.proto.DataPacketKind. */ -export class Reconnected extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export const DataPacketKindSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_room, 4); - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.Reconnected"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); +/** + * @generated from enum livekit.proto.DisconnectReason + */ +export enum DisconnectReason { + /** + * @generated from enum value: UNKNOWN_REASON = 0; + */ + UNKNOWN_REASON = 0, - static fromBinary(bytes: Uint8Array, options?: Partial): Reconnected { - return new Reconnected().fromBinary(bytes, options); - } + /** + * the client initiated the disconnect + * + * @generated from enum value: CLIENT_INITIATED = 1; + */ + CLIENT_INITIATED = 1, - static fromJson(jsonValue: JsonValue, options?: Partial): Reconnected { - return new Reconnected().fromJson(jsonValue, options); - } + /** + * another participant with the same identity has joined the room + * + * @generated from enum value: DUPLICATE_IDENTITY = 2; + */ + DUPLICATE_IDENTITY = 2, - static fromJsonString(jsonString: string, options?: Partial): Reconnected { - return new Reconnected().fromJsonString(jsonString, options); - } + /** + * the server instance is shutting down + * + * @generated from enum value: SERVER_SHUTDOWN = 3; + */ + SERVER_SHUTDOWN = 3, - static equals(a: Reconnected | PlainMessage | undefined, b: Reconnected | PlainMessage | undefined): boolean { - return proto3.util.equals(Reconnected, a, b); - } -} + /** + * RoomService.RemoveParticipant was called + * + * @generated from enum value: PARTICIPANT_REMOVED = 4; + */ + PARTICIPANT_REMOVED = 4, -/** - * @generated from message livekit.proto.RoomEOS - */ -export class RoomEOS extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + /** + * RoomService.DeleteRoom was called + * + * @generated from enum value: ROOM_DELETED = 5; + */ + ROOM_DELETED = 5, - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RoomEOS"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); + /** + * the client is attempting to resume a session, but server is not aware of it + * + * @generated from enum value: STATE_MISMATCH = 6; + */ + STATE_MISMATCH = 6, - static fromBinary(bytes: Uint8Array, options?: Partial): RoomEOS { - return new RoomEOS().fromBinary(bytes, options); - } + /** + * client was unable to connect fully + * + * @generated from enum value: JOIN_FAILURE = 7; + */ + JOIN_FAILURE = 7, - static fromJson(jsonValue: JsonValue, options?: Partial): RoomEOS { - return new RoomEOS().fromJson(jsonValue, options); - } + /** + * Cloud-only, the server requested Participant to migrate the connection elsewhere + * + * @generated from enum value: MIGRATION = 8; + */ + MIGRATION = 8, - static fromJsonString(jsonString: string, options?: Partial): RoomEOS { - return new RoomEOS().fromJsonString(jsonString, options); - } + /** + * the signal websocket was closed unexpectedly + * + * @generated from enum value: SIGNAL_CLOSE = 9; + */ + SIGNAL_CLOSE = 9, - static equals(a: RoomEOS | PlainMessage | undefined, b: RoomEOS | PlainMessage | undefined): boolean { - return proto3.util.equals(RoomEOS, a, b); - } + /** + * the room was closed, due to all Standard and Ingress participants having left + * + * @generated from enum value: ROOM_CLOSED = 10; + */ + ROOM_CLOSED = 10, } +/** + * Describes the enum livekit.proto.DisconnectReason. + */ +export const DisconnectReasonSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_room, 5); + diff --git a/packages/livekit-rtc/src/proto/stats_pb.ts b/packages/livekit-rtc/src/proto/stats_pb.ts index ee7a001f..f1a9e809 100644 --- a/packages/livekit-rtc/src/proto/stats_pb.ts +++ b/packages/livekit-rtc/src/proto/stats_pb.ts @@ -12,344 +12,24 @@ // 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" -// @generated from file stats.proto (package livekit.proto, syntax proto3) +// @generated by protoc-gen-es v2.2.0 with parameter "target=ts" +// @generated from file stats.proto (package livekit.proto, syntax proto2) /* eslint-disable */ -// @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; +import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; /** - * @generated from enum livekit.proto.DataChannelState - */ -export enum DataChannelState { - /** - * @generated from enum value: DC_CONNECTING = 0; - */ - DC_CONNECTING = 0, - - /** - * @generated from enum value: DC_OPEN = 1; - */ - DC_OPEN = 1, - - /** - * @generated from enum value: DC_CLOSING = 2; - */ - DC_CLOSING = 2, - - /** - * @generated from enum value: DC_CLOSED = 3; - */ - DC_CLOSED = 3, -} -// Retrieve enum metadata with: proto3.getEnumType(DataChannelState) -proto3.util.setEnumType(DataChannelState, "livekit.proto.DataChannelState", [ - { no: 0, name: "DC_CONNECTING" }, - { no: 1, name: "DC_OPEN" }, - { no: 2, name: "DC_CLOSING" }, - { no: 3, name: "DC_CLOSED" }, -]); - -/** - * @generated from enum livekit.proto.QualityLimitationReason - */ -export enum QualityLimitationReason { - /** - * @generated from enum value: LIMITATION_NONE = 0; - */ - LIMITATION_NONE = 0, - - /** - * @generated from enum value: LIMITATION_CPU = 1; - */ - LIMITATION_CPU = 1, - - /** - * @generated from enum value: LIMITATION_BANDWIDTH = 2; - */ - LIMITATION_BANDWIDTH = 2, - - /** - * @generated from enum value: LIMITATION_OTHER = 3; - */ - LIMITATION_OTHER = 3, -} -// Retrieve enum metadata with: proto3.getEnumType(QualityLimitationReason) -proto3.util.setEnumType(QualityLimitationReason, "livekit.proto.QualityLimitationReason", [ - { no: 0, name: "LIMITATION_NONE" }, - { no: 1, name: "LIMITATION_CPU" }, - { no: 2, name: "LIMITATION_BANDWIDTH" }, - { no: 3, name: "LIMITATION_OTHER" }, -]); - -/** - * @generated from enum livekit.proto.IceRole + * Describes the file stats.proto. */ -export enum IceRole { - /** - * @generated from enum value: ICE_UNKNOWN = 0; - */ - ICE_UNKNOWN = 0, - - /** - * @generated from enum value: ICE_CONTROLLING = 1; - */ - ICE_CONTROLLING = 1, - - /** - * @generated from enum value: ICE_CONTROLLED = 2; - */ - ICE_CONTROLLED = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(IceRole) -proto3.util.setEnumType(IceRole, "livekit.proto.IceRole", [ - { no: 0, name: "ICE_UNKNOWN" }, - { no: 1, name: "ICE_CONTROLLING" }, - { no: 2, name: "ICE_CONTROLLED" }, -]); - -/** - * @generated from enum livekit.proto.DtlsTransportState - */ -export enum DtlsTransportState { - /** - * @generated from enum value: DTLS_TRANSPORT_NEW = 0; - */ - DTLS_TRANSPORT_NEW = 0, - - /** - * @generated from enum value: DTLS_TRANSPORT_CONNECTING = 1; - */ - DTLS_TRANSPORT_CONNECTING = 1, - - /** - * @generated from enum value: DTLS_TRANSPORT_CONNECTED = 2; - */ - DTLS_TRANSPORT_CONNECTED = 2, - - /** - * @generated from enum value: DTLS_TRANSPORT_CLOSED = 3; - */ - DTLS_TRANSPORT_CLOSED = 3, - - /** - * @generated from enum value: DTLS_TRANSPORT_FAILED = 4; - */ - DTLS_TRANSPORT_FAILED = 4, -} -// Retrieve enum metadata with: proto3.getEnumType(DtlsTransportState) -proto3.util.setEnumType(DtlsTransportState, "livekit.proto.DtlsTransportState", [ - { no: 0, name: "DTLS_TRANSPORT_NEW" }, - { no: 1, name: "DTLS_TRANSPORT_CONNECTING" }, - { no: 2, name: "DTLS_TRANSPORT_CONNECTED" }, - { no: 3, name: "DTLS_TRANSPORT_CLOSED" }, - { no: 4, name: "DTLS_TRANSPORT_FAILED" }, -]); - -/** - * @generated from enum livekit.proto.IceTransportState - */ -export enum IceTransportState { - /** - * @generated from enum value: ICE_TRANSPORT_NEW = 0; - */ - ICE_TRANSPORT_NEW = 0, - - /** - * @generated from enum value: ICE_TRANSPORT_CHECKING = 1; - */ - ICE_TRANSPORT_CHECKING = 1, - - /** - * @generated from enum value: ICE_TRANSPORT_CONNECTED = 2; - */ - ICE_TRANSPORT_CONNECTED = 2, - - /** - * @generated from enum value: ICE_TRANSPORT_COMPLETED = 3; - */ - ICE_TRANSPORT_COMPLETED = 3, - - /** - * @generated from enum value: ICE_TRANSPORT_DISCONNECTED = 4; - */ - ICE_TRANSPORT_DISCONNECTED = 4, - - /** - * @generated from enum value: ICE_TRANSPORT_FAILED = 5; - */ - ICE_TRANSPORT_FAILED = 5, - - /** - * @generated from enum value: ICE_TRANSPORT_CLOSED = 6; - */ - ICE_TRANSPORT_CLOSED = 6, -} -// Retrieve enum metadata with: proto3.getEnumType(IceTransportState) -proto3.util.setEnumType(IceTransportState, "livekit.proto.IceTransportState", [ - { no: 0, name: "ICE_TRANSPORT_NEW" }, - { no: 1, name: "ICE_TRANSPORT_CHECKING" }, - { no: 2, name: "ICE_TRANSPORT_CONNECTED" }, - { no: 3, name: "ICE_TRANSPORT_COMPLETED" }, - { no: 4, name: "ICE_TRANSPORT_DISCONNECTED" }, - { no: 5, name: "ICE_TRANSPORT_FAILED" }, - { no: 6, name: "ICE_TRANSPORT_CLOSED" }, -]); - -/** - * @generated from enum livekit.proto.DtlsRole - */ -export enum DtlsRole { - /** - * @generated from enum value: DTLS_CLIENT = 0; - */ - DTLS_CLIENT = 0, - - /** - * @generated from enum value: DTLS_SERVER = 1; - */ - DTLS_SERVER = 1, - - /** - * @generated from enum value: DTLS_UNKNOWN = 2; - */ - DTLS_UNKNOWN = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(DtlsRole) -proto3.util.setEnumType(DtlsRole, "livekit.proto.DtlsRole", [ - { no: 0, name: "DTLS_CLIENT" }, - { no: 1, name: "DTLS_SERVER" }, - { no: 2, name: "DTLS_UNKNOWN" }, -]); - -/** - * @generated from enum livekit.proto.IceCandidatePairState - */ -export enum IceCandidatePairState { - /** - * @generated from enum value: PAIR_FROZEN = 0; - */ - PAIR_FROZEN = 0, - - /** - * @generated from enum value: PAIR_WAITING = 1; - */ - PAIR_WAITING = 1, - - /** - * @generated from enum value: PAIR_IN_PROGRESS = 2; - */ - PAIR_IN_PROGRESS = 2, - - /** - * @generated from enum value: PAIR_FAILED = 3; - */ - PAIR_FAILED = 3, - - /** - * @generated from enum value: PAIR_SUCCEEDED = 4; - */ - PAIR_SUCCEEDED = 4, -} -// Retrieve enum metadata with: proto3.getEnumType(IceCandidatePairState) -proto3.util.setEnumType(IceCandidatePairState, "livekit.proto.IceCandidatePairState", [ - { no: 0, name: "PAIR_FROZEN" }, - { no: 1, name: "PAIR_WAITING" }, - { no: 2, name: "PAIR_IN_PROGRESS" }, - { no: 3, name: "PAIR_FAILED" }, - { no: 4, name: "PAIR_SUCCEEDED" }, -]); - -/** - * @generated from enum livekit.proto.IceCandidateType - */ -export enum IceCandidateType { - /** - * @generated from enum value: HOST = 0; - */ - HOST = 0, - - /** - * @generated from enum value: SRFLX = 1; - */ - SRFLX = 1, - - /** - * @generated from enum value: PRFLX = 2; - */ - PRFLX = 2, - - /** - * @generated from enum value: RELAY = 3; - */ - RELAY = 3, -} -// Retrieve enum metadata with: proto3.getEnumType(IceCandidateType) -proto3.util.setEnumType(IceCandidateType, "livekit.proto.IceCandidateType", [ - { no: 0, name: "HOST" }, - { no: 1, name: "SRFLX" }, - { no: 2, name: "PRFLX" }, - { no: 3, name: "RELAY" }, -]); - -/** - * @generated from enum livekit.proto.IceServerTransportProtocol - */ -export enum IceServerTransportProtocol { - /** - * @generated from enum value: TRANSPORT_UDP = 0; - */ - TRANSPORT_UDP = 0, - - /** - * @generated from enum value: TRANSPORT_TCP = 1; - */ - TRANSPORT_TCP = 1, - - /** - * @generated from enum value: TRANSPORT_TLS = 2; - */ - TRANSPORT_TLS = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(IceServerTransportProtocol) -proto3.util.setEnumType(IceServerTransportProtocol, "livekit.proto.IceServerTransportProtocol", [ - { no: 0, name: "TRANSPORT_UDP" }, - { no: 1, name: "TRANSPORT_TCP" }, - { no: 2, name: "TRANSPORT_TLS" }, -]); - -/** - * @generated from enum livekit.proto.IceTcpCandidateType - */ -export enum IceTcpCandidateType { - /** - * @generated from enum value: CANDIDATE_ACTIVE = 0; - */ - CANDIDATE_ACTIVE = 0, - - /** - * @generated from enum value: CANDIDATE_PASSIVE = 1; - */ - CANDIDATE_PASSIVE = 1, - - /** - * @generated from enum value: CANDIDATE_SO = 2; - */ - CANDIDATE_SO = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(IceTcpCandidateType) -proto3.util.setEnumType(IceTcpCandidateType, "livekit.proto.IceTcpCandidateType", [ - { no: 0, name: "CANDIDATE_ACTIVE" }, - { no: 1, name: "CANDIDATE_PASSIVE" }, - { no: 2, name: "CANDIDATE_SO" }, -]); +export const file_stats: GenFile = /*@__PURE__*/ + fileDesc("CgtzdGF0cy5wcm90bxINbGl2ZWtpdC5wcm90byLZFwoIUnRjU3RhdHMSLgoFY29kZWMYAyABKAsyHS5saXZla2l0LnByb3RvLlJ0Y1N0YXRzLkNvZGVjSAASOQoLaW5ib3VuZF9ydHAYBCABKAsyIi5saXZla2l0LnByb3RvLlJ0Y1N0YXRzLkluYm91bmRSdHBIABI7CgxvdXRib3VuZF9ydHAYBSABKAsyIy5saXZla2l0LnByb3RvLlJ0Y1N0YXRzLk91dGJvdW5kUnRwSAASRgoScmVtb3RlX2luYm91bmRfcnRwGAYgASgLMigubGl2ZWtpdC5wcm90by5SdGNTdGF0cy5SZW1vdGVJbmJvdW5kUnRwSAASSAoTcmVtb3RlX291dGJvdW5kX3J0cBgHIAEoCzIpLmxpdmVraXQucHJvdG8uUnRjU3RhdHMuUmVtb3RlT3V0Ym91bmRSdHBIABI7CgxtZWRpYV9zb3VyY2UYCCABKAsyIy5saXZla2l0LnByb3RvLlJ0Y1N0YXRzLk1lZGlhU291cmNlSAASPQoNbWVkaWFfcGxheW91dBgJIAEoCzIkLmxpdmVraXQucHJvdG8uUnRjU3RhdHMuTWVkaWFQbGF5b3V0SAASQQoPcGVlcl9jb25uZWN0aW9uGAogASgLMiYubGl2ZWtpdC5wcm90by5SdGNTdGF0cy5QZWVyQ29ubmVjdGlvbkgAE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kVDVElORxABEhwKGERUTFNfVFJBTlNQT1JUX0NPTk5FQ1RFRBACEhkKFURUTFNfVFJBTlNQT1JUX0NMT1NFRBADEhkKFURUTFNfVFJBTlNQT1JUX0ZBSUxFRBAEKtQBChFJY2VUcmFuc3BvcnRTdGF0ZRIVChFJQ0VfVFJBTlNQT1JUX05FVxAAEhoKFklDRV9UUkFOU1BPUlRfQ0hFQ0tJTkcQARIbChdJQ0VfVFJBTlNQT1JUX0NPTk5FQ1RFRBACEhsKF0lDRV9UUkFOU1BPUlRfQ09NUExFVEVEEAMSHgoaSUNFX1RSQU5TUE9SVF9ESVNDT05ORUNURUQQBBIYChRJQ0VfVFJBTlNQT1JUX0ZBSUxFRBAFEhgKFElDRV9UUkFOU1BPUlRfQ0xPU0VEEAYqPgoIRHRsc1JvbGUSDwoLRFRMU19DTElFTlQQABIPCgtEVExTX1NFUlZFUhABEhAKDERUTFNfVU5LTk9XThACKnUKFUljZUNhbmRpZGF0ZVBhaXJTdGF0ZRIPCgtQQUlSX0ZST1pFThAAEhAKDFBBSVJfV0FJVElORxABEhQKEFBBSVJfSU5fUFJPR1JFU1MQAhIPCgtQQUlSX0ZBSUxFRBADEhIKDlBBSVJfU1VDQ0VFREVEEAQqPQoQSWNlQ2FuZGlkYXRlVHlwZRIICgRIT1NUEAASCQoFU1JGTFgQARIJCgVQUkZMWBACEgkKBVJFTEFZEAMqVQoaSWNlU2VydmVyVHJhbnNwb3J0UHJvdG9jb2wSEQoNVFJBTlNQT1JUX1VEUBAAEhEKDVRSQU5TUE9SVF9UQ1AQARIRCg1UUkFOU1BPUlRfVExTEAIqVAoTSWNlVGNwQ2FuZGlkYXRlVHlwZRIUChBDQU5ESURBVEVfQUNUSVZFEAASFQoRQ0FORElEQVRFX1BBU1NJVkUQARIQCgxDQU5ESURBVEVfU08QAkIQqgINTGl2ZUtpdC5Qcm90bw"); /** * @generated from message livekit.proto.RtcStats */ -export class RtcStats extends Message { +export type RtcStats = Message<"livekit.proto.RtcStats"> & { /** * @generated from oneof livekit.proto.RtcStats.stats */ @@ -443,2513 +123,1914 @@ export class RtcStats extends Message { */ value: RtcStats_Track; case: "track"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RtcStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 3, name: "codec", kind: "message", T: RtcStats_Codec, oneof: "stats" }, - { no: 4, name: "inbound_rtp", kind: "message", T: RtcStats_InboundRtp, oneof: "stats" }, - { no: 5, name: "outbound_rtp", kind: "message", T: RtcStats_OutboundRtp, oneof: "stats" }, - { no: 6, name: "remote_inbound_rtp", kind: "message", T: RtcStats_RemoteInboundRtp, oneof: "stats" }, - { no: 7, name: "remote_outbound_rtp", kind: "message", T: RtcStats_RemoteOutboundRtp, oneof: "stats" }, - { no: 8, name: "media_source", kind: "message", T: RtcStats_MediaSource, oneof: "stats" }, - { no: 9, name: "media_playout", kind: "message", T: RtcStats_MediaPlayout, oneof: "stats" }, - { no: 10, name: "peer_connection", kind: "message", T: RtcStats_PeerConnection, oneof: "stats" }, - { no: 11, name: "data_channel", kind: "message", T: RtcStats_DataChannel, oneof: "stats" }, - { no: 12, name: "transport", kind: "message", T: RtcStats_Transport, oneof: "stats" }, - { no: 13, name: "candidate_pair", kind: "message", T: RtcStats_CandidatePair, oneof: "stats" }, - { no: 14, name: "local_candidate", kind: "message", T: RtcStats_LocalCandidate, oneof: "stats" }, - { no: 15, name: "remote_candidate", kind: "message", T: RtcStats_RemoteCandidate, oneof: "stats" }, - { no: 16, name: "certificate", kind: "message", T: RtcStats_Certificate, oneof: "stats" }, - { no: 17, name: "track", kind: "message", T: RtcStats_Track, oneof: "stats" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats { - return new RtcStats().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats { - return new RtcStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RtcStats { - return new RtcStats().fromJsonString(jsonString, options); - } - - static equals(a: RtcStats | PlainMessage | undefined, b: RtcStats | PlainMessage | undefined): boolean { - return proto3.util.equals(RtcStats, a, b); - } -} + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message livekit.proto.RtcStats. + * Use `create(RtcStatsSchema)` to create a new message. + */ +export const RtcStatsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 0); /** * @generated from message livekit.proto.RtcStats.Codec */ -export class RtcStats_Codec extends Message { +export type RtcStats_Codec = Message<"livekit.proto.RtcStats.Codec"> & { /** - * @generated from field: livekit.proto.RtcStatsData rtc = 1; + * @generated from field: required livekit.proto.RtcStatsData rtc = 1; */ rtc?: RtcStatsData; /** - * @generated from field: livekit.proto.CodecStats codec = 2; + * @generated from field: required livekit.proto.CodecStats codec = 2; */ codec?: CodecStats; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RtcStats.Codec"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData }, - { no: 2, name: "codec", kind: "message", T: CodecStats }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_Codec { - return new RtcStats_Codec().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_Codec { - return new RtcStats_Codec().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RtcStats_Codec { - return new RtcStats_Codec().fromJsonString(jsonString, options); - } - - static equals(a: RtcStats_Codec | PlainMessage | undefined, b: RtcStats_Codec | PlainMessage | undefined): boolean { - return proto3.util.equals(RtcStats_Codec, a, b); - } -} +/** + * Describes the message livekit.proto.RtcStats.Codec. + * Use `create(RtcStats_CodecSchema)` to create a new message. + */ +export const RtcStats_CodecSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 0, 0); /** * @generated from message livekit.proto.RtcStats.InboundRtp */ -export class RtcStats_InboundRtp extends Message { +export type RtcStats_InboundRtp = Message<"livekit.proto.RtcStats.InboundRtp"> & { /** - * @generated from field: livekit.proto.RtcStatsData rtc = 1; + * @generated from field: required livekit.proto.RtcStatsData rtc = 1; */ rtc?: RtcStatsData; /** - * @generated from field: livekit.proto.RtpStreamStats stream = 2; + * @generated from field: required livekit.proto.RtpStreamStats stream = 2; */ stream?: RtpStreamStats; /** - * @generated from field: livekit.proto.ReceivedRtpStreamStats received = 3; + * @generated from field: required livekit.proto.ReceivedRtpStreamStats received = 3; */ received?: ReceivedRtpStreamStats; /** - * @generated from field: livekit.proto.InboundRtpStreamStats inbound = 4; + * @generated from field: required livekit.proto.InboundRtpStreamStats inbound = 4; */ inbound?: InboundRtpStreamStats; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RtcStats.InboundRtp"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData }, - { no: 2, name: "stream", kind: "message", T: RtpStreamStats }, - { no: 3, name: "received", kind: "message", T: ReceivedRtpStreamStats }, - { no: 4, name: "inbound", kind: "message", T: InboundRtpStreamStats }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_InboundRtp { - return new RtcStats_InboundRtp().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_InboundRtp { - return new RtcStats_InboundRtp().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RtcStats_InboundRtp { - return new RtcStats_InboundRtp().fromJsonString(jsonString, options); - } - - static equals(a: RtcStats_InboundRtp | PlainMessage | undefined, b: RtcStats_InboundRtp | PlainMessage | undefined): boolean { - return proto3.util.equals(RtcStats_InboundRtp, a, b); - } -} +/** + * Describes the message livekit.proto.RtcStats.InboundRtp. + * Use `create(RtcStats_InboundRtpSchema)` to create a new message. + */ +export const RtcStats_InboundRtpSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 0, 1); /** * @generated from message livekit.proto.RtcStats.OutboundRtp */ -export class RtcStats_OutboundRtp extends Message { +export type RtcStats_OutboundRtp = Message<"livekit.proto.RtcStats.OutboundRtp"> & { /** - * @generated from field: livekit.proto.RtcStatsData rtc = 1; + * @generated from field: required livekit.proto.RtcStatsData rtc = 1; */ rtc?: RtcStatsData; /** - * @generated from field: livekit.proto.RtpStreamStats stream = 2; + * @generated from field: required livekit.proto.RtpStreamStats stream = 2; */ stream?: RtpStreamStats; /** - * @generated from field: livekit.proto.SentRtpStreamStats sent = 3; + * @generated from field: required livekit.proto.SentRtpStreamStats sent = 3; */ sent?: SentRtpStreamStats; /** - * @generated from field: livekit.proto.OutboundRtpStreamStats outbound = 4; + * @generated from field: required livekit.proto.OutboundRtpStreamStats outbound = 4; */ outbound?: OutboundRtpStreamStats; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RtcStats.OutboundRtp"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData }, - { no: 2, name: "stream", kind: "message", T: RtpStreamStats }, - { no: 3, name: "sent", kind: "message", T: SentRtpStreamStats }, - { no: 4, name: "outbound", kind: "message", T: OutboundRtpStreamStats }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_OutboundRtp { - return new RtcStats_OutboundRtp().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_OutboundRtp { - return new RtcStats_OutboundRtp().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RtcStats_OutboundRtp { - return new RtcStats_OutboundRtp().fromJsonString(jsonString, options); - } - - static equals(a: RtcStats_OutboundRtp | PlainMessage | undefined, b: RtcStats_OutboundRtp | PlainMessage | undefined): boolean { - return proto3.util.equals(RtcStats_OutboundRtp, a, b); - } -} +/** + * Describes the message livekit.proto.RtcStats.OutboundRtp. + * Use `create(RtcStats_OutboundRtpSchema)` to create a new message. + */ +export const RtcStats_OutboundRtpSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 0, 2); /** * @generated from message livekit.proto.RtcStats.RemoteInboundRtp */ -export class RtcStats_RemoteInboundRtp extends Message { +export type RtcStats_RemoteInboundRtp = Message<"livekit.proto.RtcStats.RemoteInboundRtp"> & { /** - * @generated from field: livekit.proto.RtcStatsData rtc = 1; + * @generated from field: required livekit.proto.RtcStatsData rtc = 1; */ rtc?: RtcStatsData; /** - * @generated from field: livekit.proto.RtpStreamStats stream = 2; + * @generated from field: required livekit.proto.RtpStreamStats stream = 2; */ stream?: RtpStreamStats; /** - * @generated from field: livekit.proto.ReceivedRtpStreamStats received = 3; + * @generated from field: required livekit.proto.ReceivedRtpStreamStats received = 3; */ received?: ReceivedRtpStreamStats; /** - * @generated from field: livekit.proto.RemoteInboundRtpStreamStats remote_inbound = 4; + * @generated from field: required livekit.proto.RemoteInboundRtpStreamStats remote_inbound = 4; */ remoteInbound?: RemoteInboundRtpStreamStats; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RtcStats.RemoteInboundRtp"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData }, - { no: 2, name: "stream", kind: "message", T: RtpStreamStats }, - { no: 3, name: "received", kind: "message", T: ReceivedRtpStreamStats }, - { no: 4, name: "remote_inbound", kind: "message", T: RemoteInboundRtpStreamStats }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_RemoteInboundRtp { - return new RtcStats_RemoteInboundRtp().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_RemoteInboundRtp { - return new RtcStats_RemoteInboundRtp().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RtcStats_RemoteInboundRtp { - return new RtcStats_RemoteInboundRtp().fromJsonString(jsonString, options); - } - - static equals(a: RtcStats_RemoteInboundRtp | PlainMessage | undefined, b: RtcStats_RemoteInboundRtp | PlainMessage | undefined): boolean { - return proto3.util.equals(RtcStats_RemoteInboundRtp, a, b); - } -} +/** + * Describes the message livekit.proto.RtcStats.RemoteInboundRtp. + * Use `create(RtcStats_RemoteInboundRtpSchema)` to create a new message. + */ +export const RtcStats_RemoteInboundRtpSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 0, 3); /** * @generated from message livekit.proto.RtcStats.RemoteOutboundRtp */ -export class RtcStats_RemoteOutboundRtp extends Message { +export type RtcStats_RemoteOutboundRtp = Message<"livekit.proto.RtcStats.RemoteOutboundRtp"> & { /** - * @generated from field: livekit.proto.RtcStatsData rtc = 1; + * @generated from field: required livekit.proto.RtcStatsData rtc = 1; */ rtc?: RtcStatsData; /** - * @generated from field: livekit.proto.RtpStreamStats stream = 2; + * @generated from field: required livekit.proto.RtpStreamStats stream = 2; */ stream?: RtpStreamStats; /** - * @generated from field: livekit.proto.SentRtpStreamStats sent = 3; + * @generated from field: required livekit.proto.SentRtpStreamStats sent = 3; */ sent?: SentRtpStreamStats; /** - * @generated from field: livekit.proto.RemoteOutboundRtpStreamStats remote_outbound = 4; + * @generated from field: required livekit.proto.RemoteOutboundRtpStreamStats remote_outbound = 4; */ remoteOutbound?: RemoteOutboundRtpStreamStats; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RtcStats.RemoteOutboundRtp"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData }, - { no: 2, name: "stream", kind: "message", T: RtpStreamStats }, - { no: 3, name: "sent", kind: "message", T: SentRtpStreamStats }, - { no: 4, name: "remote_outbound", kind: "message", T: RemoteOutboundRtpStreamStats }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_RemoteOutboundRtp { - return new RtcStats_RemoteOutboundRtp().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_RemoteOutboundRtp { - return new RtcStats_RemoteOutboundRtp().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RtcStats_RemoteOutboundRtp { - return new RtcStats_RemoteOutboundRtp().fromJsonString(jsonString, options); - } - - static equals(a: RtcStats_RemoteOutboundRtp | PlainMessage | undefined, b: RtcStats_RemoteOutboundRtp | PlainMessage | undefined): boolean { - return proto3.util.equals(RtcStats_RemoteOutboundRtp, a, b); - } -} +/** + * Describes the message livekit.proto.RtcStats.RemoteOutboundRtp. + * Use `create(RtcStats_RemoteOutboundRtpSchema)` to create a new message. + */ +export const RtcStats_RemoteOutboundRtpSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 0, 4); /** * @generated from message livekit.proto.RtcStats.MediaSource */ -export class RtcStats_MediaSource extends Message { +export type RtcStats_MediaSource = Message<"livekit.proto.RtcStats.MediaSource"> & { /** - * @generated from field: livekit.proto.RtcStatsData rtc = 1; + * @generated from field: required livekit.proto.RtcStatsData rtc = 1; */ rtc?: RtcStatsData; /** - * @generated from field: livekit.proto.MediaSourceStats source = 2; + * @generated from field: required livekit.proto.MediaSourceStats source = 2; */ source?: MediaSourceStats; /** - * @generated from field: livekit.proto.AudioSourceStats audio = 3; + * @generated from field: required livekit.proto.AudioSourceStats audio = 3; */ audio?: AudioSourceStats; /** - * @generated from field: livekit.proto.VideoSourceStats video = 4; + * @generated from field: required livekit.proto.VideoSourceStats video = 4; */ video?: VideoSourceStats; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RtcStats.MediaSource"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData }, - { no: 2, name: "source", kind: "message", T: MediaSourceStats }, - { no: 3, name: "audio", kind: "message", T: AudioSourceStats }, - { no: 4, name: "video", kind: "message", T: VideoSourceStats }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_MediaSource { - return new RtcStats_MediaSource().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_MediaSource { - return new RtcStats_MediaSource().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RtcStats_MediaSource { - return new RtcStats_MediaSource().fromJsonString(jsonString, options); - } - - static equals(a: RtcStats_MediaSource | PlainMessage | undefined, b: RtcStats_MediaSource | PlainMessage | undefined): boolean { - return proto3.util.equals(RtcStats_MediaSource, a, b); - } -} +/** + * Describes the message livekit.proto.RtcStats.MediaSource. + * Use `create(RtcStats_MediaSourceSchema)` to create a new message. + */ +export const RtcStats_MediaSourceSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 0, 5); /** * @generated from message livekit.proto.RtcStats.MediaPlayout */ -export class RtcStats_MediaPlayout extends Message { +export type RtcStats_MediaPlayout = Message<"livekit.proto.RtcStats.MediaPlayout"> & { /** - * @generated from field: livekit.proto.RtcStatsData rtc = 1; + * @generated from field: required livekit.proto.RtcStatsData rtc = 1; */ rtc?: RtcStatsData; /** - * @generated from field: livekit.proto.AudioPlayoutStats audio_playout = 2; + * @generated from field: required livekit.proto.AudioPlayoutStats audio_playout = 2; */ audioPlayout?: AudioPlayoutStats; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RtcStats.MediaPlayout"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData }, - { no: 2, name: "audio_playout", kind: "message", T: AudioPlayoutStats }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_MediaPlayout { - return new RtcStats_MediaPlayout().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_MediaPlayout { - return new RtcStats_MediaPlayout().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RtcStats_MediaPlayout { - return new RtcStats_MediaPlayout().fromJsonString(jsonString, options); - } - - static equals(a: RtcStats_MediaPlayout | PlainMessage | undefined, b: RtcStats_MediaPlayout | PlainMessage | undefined): boolean { - return proto3.util.equals(RtcStats_MediaPlayout, a, b); - } -} +/** + * Describes the message livekit.proto.RtcStats.MediaPlayout. + * Use `create(RtcStats_MediaPlayoutSchema)` to create a new message. + */ +export const RtcStats_MediaPlayoutSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 0, 6); /** * @generated from message livekit.proto.RtcStats.PeerConnection */ -export class RtcStats_PeerConnection extends Message { +export type RtcStats_PeerConnection = Message<"livekit.proto.RtcStats.PeerConnection"> & { /** - * @generated from field: livekit.proto.RtcStatsData rtc = 1; + * @generated from field: required livekit.proto.RtcStatsData rtc = 1; */ rtc?: RtcStatsData; /** - * @generated from field: livekit.proto.PeerConnectionStats pc = 2; + * @generated from field: required livekit.proto.PeerConnectionStats pc = 2; */ pc?: PeerConnectionStats; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RtcStats.PeerConnection"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData }, - { no: 2, name: "pc", kind: "message", T: PeerConnectionStats }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_PeerConnection { - return new RtcStats_PeerConnection().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_PeerConnection { - return new RtcStats_PeerConnection().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RtcStats_PeerConnection { - return new RtcStats_PeerConnection().fromJsonString(jsonString, options); - } - - static equals(a: RtcStats_PeerConnection | PlainMessage | undefined, b: RtcStats_PeerConnection | PlainMessage | undefined): boolean { - return proto3.util.equals(RtcStats_PeerConnection, a, b); - } -} +/** + * Describes the message livekit.proto.RtcStats.PeerConnection. + * Use `create(RtcStats_PeerConnectionSchema)` to create a new message. + */ +export const RtcStats_PeerConnectionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 0, 7); /** * @generated from message livekit.proto.RtcStats.DataChannel */ -export class RtcStats_DataChannel extends Message { +export type RtcStats_DataChannel = Message<"livekit.proto.RtcStats.DataChannel"> & { /** - * @generated from field: livekit.proto.RtcStatsData rtc = 1; + * @generated from field: required livekit.proto.RtcStatsData rtc = 1; */ rtc?: RtcStatsData; /** - * @generated from field: livekit.proto.DataChannelStats dc = 2; + * @generated from field: required livekit.proto.DataChannelStats dc = 2; */ dc?: DataChannelStats; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RtcStats.DataChannel"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData }, - { no: 2, name: "dc", kind: "message", T: DataChannelStats }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_DataChannel { - return new RtcStats_DataChannel().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_DataChannel { - return new RtcStats_DataChannel().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RtcStats_DataChannel { - return new RtcStats_DataChannel().fromJsonString(jsonString, options); - } - - static equals(a: RtcStats_DataChannel | PlainMessage | undefined, b: RtcStats_DataChannel | PlainMessage | undefined): boolean { - return proto3.util.equals(RtcStats_DataChannel, a, b); - } -} +/** + * Describes the message livekit.proto.RtcStats.DataChannel. + * Use `create(RtcStats_DataChannelSchema)` to create a new message. + */ +export const RtcStats_DataChannelSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 0, 8); /** * @generated from message livekit.proto.RtcStats.Transport */ -export class RtcStats_Transport extends Message { +export type RtcStats_Transport = Message<"livekit.proto.RtcStats.Transport"> & { /** - * @generated from field: livekit.proto.RtcStatsData rtc = 1; + * @generated from field: required livekit.proto.RtcStatsData rtc = 1; */ rtc?: RtcStatsData; /** - * @generated from field: livekit.proto.TransportStats transport = 2; + * @generated from field: required livekit.proto.TransportStats transport = 2; */ transport?: TransportStats; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RtcStats.Transport"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData }, - { no: 2, name: "transport", kind: "message", T: TransportStats }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_Transport { - return new RtcStats_Transport().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_Transport { - return new RtcStats_Transport().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RtcStats_Transport { - return new RtcStats_Transport().fromJsonString(jsonString, options); - } - - static equals(a: RtcStats_Transport | PlainMessage | undefined, b: RtcStats_Transport | PlainMessage | undefined): boolean { - return proto3.util.equals(RtcStats_Transport, a, b); - } -} +/** + * Describes the message livekit.proto.RtcStats.Transport. + * Use `create(RtcStats_TransportSchema)` to create a new message. + */ +export const RtcStats_TransportSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 0, 9); /** * @generated from message livekit.proto.RtcStats.CandidatePair */ -export class RtcStats_CandidatePair extends Message { +export type RtcStats_CandidatePair = Message<"livekit.proto.RtcStats.CandidatePair"> & { /** - * @generated from field: livekit.proto.RtcStatsData rtc = 1; + * @generated from field: required livekit.proto.RtcStatsData rtc = 1; */ rtc?: RtcStatsData; /** - * @generated from field: livekit.proto.CandidatePairStats candidate_pair = 2; + * @generated from field: required livekit.proto.CandidatePairStats candidate_pair = 2; */ candidatePair?: CandidatePairStats; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RtcStats.CandidatePair"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData }, - { no: 2, name: "candidate_pair", kind: "message", T: CandidatePairStats }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_CandidatePair { - return new RtcStats_CandidatePair().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_CandidatePair { - return new RtcStats_CandidatePair().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RtcStats_CandidatePair { - return new RtcStats_CandidatePair().fromJsonString(jsonString, options); - } - - static equals(a: RtcStats_CandidatePair | PlainMessage | undefined, b: RtcStats_CandidatePair | PlainMessage | undefined): boolean { - return proto3.util.equals(RtcStats_CandidatePair, a, b); - } -} +/** + * Describes the message livekit.proto.RtcStats.CandidatePair. + * Use `create(RtcStats_CandidatePairSchema)` to create a new message. + */ +export const RtcStats_CandidatePairSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 0, 10); /** * @generated from message livekit.proto.RtcStats.LocalCandidate */ -export class RtcStats_LocalCandidate extends Message { +export type RtcStats_LocalCandidate = Message<"livekit.proto.RtcStats.LocalCandidate"> & { /** - * @generated from field: livekit.proto.RtcStatsData rtc = 1; + * @generated from field: required livekit.proto.RtcStatsData rtc = 1; */ rtc?: RtcStatsData; /** - * @generated from field: livekit.proto.IceCandidateStats candidate = 2; + * @generated from field: required livekit.proto.IceCandidateStats candidate = 2; */ candidate?: IceCandidateStats; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RtcStats.LocalCandidate"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData }, - { no: 2, name: "candidate", kind: "message", T: IceCandidateStats }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_LocalCandidate { - return new RtcStats_LocalCandidate().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_LocalCandidate { - return new RtcStats_LocalCandidate().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RtcStats_LocalCandidate { - return new RtcStats_LocalCandidate().fromJsonString(jsonString, options); - } - - static equals(a: RtcStats_LocalCandidate | PlainMessage | undefined, b: RtcStats_LocalCandidate | PlainMessage | undefined): boolean { - return proto3.util.equals(RtcStats_LocalCandidate, a, b); - } -} +/** + * Describes the message livekit.proto.RtcStats.LocalCandidate. + * Use `create(RtcStats_LocalCandidateSchema)` to create a new message. + */ +export const RtcStats_LocalCandidateSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 0, 11); /** * @generated from message livekit.proto.RtcStats.RemoteCandidate */ -export class RtcStats_RemoteCandidate extends Message { +export type RtcStats_RemoteCandidate = Message<"livekit.proto.RtcStats.RemoteCandidate"> & { /** - * @generated from field: livekit.proto.RtcStatsData rtc = 1; + * @generated from field: required livekit.proto.RtcStatsData rtc = 1; */ rtc?: RtcStatsData; /** - * @generated from field: livekit.proto.IceCandidateStats candidate = 2; + * @generated from field: required livekit.proto.IceCandidateStats candidate = 2; */ candidate?: IceCandidateStats; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RtcStats.RemoteCandidate"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData }, - { no: 2, name: "candidate", kind: "message", T: IceCandidateStats }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_RemoteCandidate { - return new RtcStats_RemoteCandidate().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_RemoteCandidate { - return new RtcStats_RemoteCandidate().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RtcStats_RemoteCandidate { - return new RtcStats_RemoteCandidate().fromJsonString(jsonString, options); - } - - static equals(a: RtcStats_RemoteCandidate | PlainMessage | undefined, b: RtcStats_RemoteCandidate | PlainMessage | undefined): boolean { - return proto3.util.equals(RtcStats_RemoteCandidate, a, b); - } -} +/** + * Describes the message livekit.proto.RtcStats.RemoteCandidate. + * Use `create(RtcStats_RemoteCandidateSchema)` to create a new message. + */ +export const RtcStats_RemoteCandidateSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 0, 12); /** * @generated from message livekit.proto.RtcStats.Certificate */ -export class RtcStats_Certificate extends Message { +export type RtcStats_Certificate = Message<"livekit.proto.RtcStats.Certificate"> & { /** - * @generated from field: livekit.proto.RtcStatsData rtc = 1; + * @generated from field: required livekit.proto.RtcStatsData rtc = 1; */ rtc?: RtcStatsData; /** - * @generated from field: livekit.proto.CertificateStats certificate = 2; + * @generated from field: required livekit.proto.CertificateStats certificate = 2; */ certificate?: CertificateStats; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RtcStats.Certificate"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData }, - { no: 2, name: "certificate", kind: "message", T: CertificateStats }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_Certificate { - return new RtcStats_Certificate().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_Certificate { - return new RtcStats_Certificate().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RtcStats_Certificate { - return new RtcStats_Certificate().fromJsonString(jsonString, options); - } - - static equals(a: RtcStats_Certificate | PlainMessage | undefined, b: RtcStats_Certificate | PlainMessage | undefined): boolean { - return proto3.util.equals(RtcStats_Certificate, a, b); - } -} +/** + * Describes the message livekit.proto.RtcStats.Certificate. + * Use `create(RtcStats_CertificateSchema)` to create a new message. + */ +export const RtcStats_CertificateSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 0, 13); /** * Deprecated * * @generated from message livekit.proto.RtcStats.Track */ -export class RtcStats_Track extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RtcStats.Track"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_Track { - return new RtcStats_Track().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_Track { - return new RtcStats_Track().fromJson(jsonValue, options); - } +export type RtcStats_Track = Message<"livekit.proto.RtcStats.Track"> & { +}; - static fromJsonString(jsonString: string, options?: Partial): RtcStats_Track { - return new RtcStats_Track().fromJsonString(jsonString, options); - } - - static equals(a: RtcStats_Track | PlainMessage | undefined, b: RtcStats_Track | PlainMessage | undefined): boolean { - return proto3.util.equals(RtcStats_Track, a, b); - } -} +/** + * Describes the message livekit.proto.RtcStats.Track. + * Use `create(RtcStats_TrackSchema)` to create a new message. + */ +export const RtcStats_TrackSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 0, 14); /** * @generated from message livekit.proto.RtcStatsData */ -export class RtcStatsData extends Message { +export type RtcStatsData = Message<"livekit.proto.RtcStatsData"> & { /** - * @generated from field: string id = 1; + * @generated from field: required string id = 1; */ - id = ""; + id: string; /** - * @generated from field: int64 timestamp = 2; + * @generated from field: required int64 timestamp = 2; */ - timestamp = protoInt64.zero; + timestamp: bigint; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RtcStatsData"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtcStatsData { - return new RtcStatsData().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RtcStatsData { - return new RtcStatsData().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RtcStatsData { - return new RtcStatsData().fromJsonString(jsonString, options); - } - - static equals(a: RtcStatsData | PlainMessage | undefined, b: RtcStatsData | PlainMessage | undefined): boolean { - return proto3.util.equals(RtcStatsData, a, b); - } -} +/** + * Describes the message livekit.proto.RtcStatsData. + * Use `create(RtcStatsDataSchema)` to create a new message. + */ +export const RtcStatsDataSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 1); /** * @generated from message livekit.proto.CodecStats */ -export class CodecStats extends Message { +export type CodecStats = Message<"livekit.proto.CodecStats"> & { /** - * @generated from field: uint32 payload_type = 1; + * @generated from field: required uint32 payload_type = 1; */ - payloadType = 0; + payloadType: number; /** - * @generated from field: string transport_id = 2; + * @generated from field: required string transport_id = 2; */ - transportId = ""; + transportId: string; /** - * @generated from field: string mime_type = 3; + * @generated from field: required string mime_type = 3; */ - mimeType = ""; + mimeType: string; /** - * @generated from field: uint32 clock_rate = 4; + * @generated from field: required uint32 clock_rate = 4; */ - clockRate = 0; + clockRate: number; /** - * @generated from field: uint32 channels = 5; + * @generated from field: required uint32 channels = 5; */ - channels = 0; + channels: number; /** - * @generated from field: string sdp_fmtp_line = 6; + * @generated from field: required string sdp_fmtp_line = 6; */ - sdpFmtpLine = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.CodecStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "payload_type", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 2, name: "transport_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "clock_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 5, name: "channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 6, name: "sdp_fmtp_line", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CodecStats { - return new CodecStats().fromBinary(bytes, options); - } + sdpFmtpLine: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): CodecStats { - return new CodecStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CodecStats { - return new CodecStats().fromJsonString(jsonString, options); - } - - static equals(a: CodecStats | PlainMessage | undefined, b: CodecStats | PlainMessage | undefined): boolean { - return proto3.util.equals(CodecStats, a, b); - } -} +/** + * Describes the message livekit.proto.CodecStats. + * Use `create(CodecStatsSchema)` to create a new message. + */ +export const CodecStatsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 2); /** * @generated from message livekit.proto.RtpStreamStats */ -export class RtpStreamStats extends Message { +export type RtpStreamStats = Message<"livekit.proto.RtpStreamStats"> & { /** - * @generated from field: uint32 ssrc = 1; + * @generated from field: required uint32 ssrc = 1; */ - ssrc = 0; + ssrc: number; /** - * @generated from field: string kind = 2; + * @generated from field: required string kind = 2; */ - kind = ""; + kind: string; /** - * @generated from field: string transport_id = 3; + * @generated from field: required string transport_id = 3; */ - transportId = ""; + transportId: string; /** - * @generated from field: string codec_id = 4; + * @generated from field: required string codec_id = 4; */ - codecId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RtpStreamStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "ssrc", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "transport_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "codec_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtpStreamStats { - return new RtpStreamStats().fromBinary(bytes, options); - } + codecId: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): RtpStreamStats { - return new RtpStreamStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RtpStreamStats { - return new RtpStreamStats().fromJsonString(jsonString, options); - } - - static equals(a: RtpStreamStats | PlainMessage | undefined, b: RtpStreamStats | PlainMessage | undefined): boolean { - return proto3.util.equals(RtpStreamStats, a, b); - } -} +/** + * Describes the message livekit.proto.RtpStreamStats. + * Use `create(RtpStreamStatsSchema)` to create a new message. + */ +export const RtpStreamStatsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 3); /** * @generated from message livekit.proto.ReceivedRtpStreamStats */ -export class ReceivedRtpStreamStats extends Message { +export type ReceivedRtpStreamStats = Message<"livekit.proto.ReceivedRtpStreamStats"> & { /** - * @generated from field: uint64 packets_received = 1; + * @generated from field: required uint64 packets_received = 1; */ - packetsReceived = protoInt64.zero; + packetsReceived: bigint; /** - * @generated from field: int64 packets_lost = 2; + * @generated from field: required int64 packets_lost = 2; */ - packetsLost = protoInt64.zero; + packetsLost: bigint; /** - * @generated from field: double jitter = 3; + * @generated from field: required double jitter = 3; */ - jitter = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.ReceivedRtpStreamStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "packets_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "packets_lost", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 3, name: "jitter", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - ]); + jitter: number; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): ReceivedRtpStreamStats { - return new ReceivedRtpStreamStats().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ReceivedRtpStreamStats { - return new ReceivedRtpStreamStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ReceivedRtpStreamStats { - return new ReceivedRtpStreamStats().fromJsonString(jsonString, options); - } - - static equals(a: ReceivedRtpStreamStats | PlainMessage | undefined, b: ReceivedRtpStreamStats | PlainMessage | undefined): boolean { - return proto3.util.equals(ReceivedRtpStreamStats, a, b); - } -} +/** + * Describes the message livekit.proto.ReceivedRtpStreamStats. + * Use `create(ReceivedRtpStreamStatsSchema)` to create a new message. + */ +export const ReceivedRtpStreamStatsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 4); /** * @generated from message livekit.proto.InboundRtpStreamStats */ -export class InboundRtpStreamStats extends Message { +export type InboundRtpStreamStats = Message<"livekit.proto.InboundRtpStreamStats"> & { /** - * @generated from field: string track_identifier = 1; + * @generated from field: required string track_identifier = 1; */ - trackIdentifier = ""; + trackIdentifier: string; /** - * @generated from field: string mid = 2; + * @generated from field: required string mid = 2; */ - mid = ""; + mid: string; /** - * @generated from field: string remote_id = 3; + * @generated from field: required string remote_id = 3; */ - remoteId = ""; + remoteId: string; /** - * @generated from field: uint32 frames_decoded = 4; + * @generated from field: required uint32 frames_decoded = 4; */ - framesDecoded = 0; + framesDecoded: number; /** - * @generated from field: uint32 key_frames_decoded = 5; + * @generated from field: required uint32 key_frames_decoded = 5; */ - keyFramesDecoded = 0; + keyFramesDecoded: number; /** - * @generated from field: uint32 frames_rendered = 6; + * @generated from field: required uint32 frames_rendered = 6; */ - framesRendered = 0; + framesRendered: number; /** - * @generated from field: uint32 frames_dropped = 7; + * @generated from field: required uint32 frames_dropped = 7; */ - framesDropped = 0; + framesDropped: number; /** - * @generated from field: uint32 frame_width = 8; + * @generated from field: required uint32 frame_width = 8; */ - frameWidth = 0; + frameWidth: number; /** - * @generated from field: uint32 frame_height = 9; + * @generated from field: required uint32 frame_height = 9; */ - frameHeight = 0; + frameHeight: number; /** - * @generated from field: double frames_per_second = 10; + * @generated from field: required double frames_per_second = 10; */ - framesPerSecond = 0; + framesPerSecond: number; /** - * @generated from field: uint64 qp_sum = 11; + * @generated from field: required uint64 qp_sum = 11; */ - qpSum = protoInt64.zero; + qpSum: bigint; /** - * @generated from field: double total_decode_time = 12; + * @generated from field: required double total_decode_time = 12; */ - totalDecodeTime = 0; + totalDecodeTime: number; /** - * @generated from field: double total_inter_frame_delay = 13; + * @generated from field: required double total_inter_frame_delay = 13; */ - totalInterFrameDelay = 0; + totalInterFrameDelay: number; /** - * @generated from field: double total_squared_inter_frame_delay = 14; + * @generated from field: required double total_squared_inter_frame_delay = 14; */ - totalSquaredInterFrameDelay = 0; + totalSquaredInterFrameDelay: number; /** - * @generated from field: uint32 pause_count = 15; + * @generated from field: required uint32 pause_count = 15; */ - pauseCount = 0; + pauseCount: number; /** - * @generated from field: double total_pause_duration = 16; + * @generated from field: required double total_pause_duration = 16; */ - totalPauseDuration = 0; + totalPauseDuration: number; /** - * @generated from field: uint32 freeze_count = 17; + * @generated from field: required uint32 freeze_count = 17; */ - freezeCount = 0; + freezeCount: number; /** - * @generated from field: double total_freeze_duration = 18; + * @generated from field: required double total_freeze_duration = 18; */ - totalFreezeDuration = 0; + totalFreezeDuration: number; /** - * @generated from field: double last_packet_received_timestamp = 19; + * @generated from field: required double last_packet_received_timestamp = 19; */ - lastPacketReceivedTimestamp = 0; + lastPacketReceivedTimestamp: number; /** - * @generated from field: uint64 header_bytes_received = 20; + * @generated from field: required uint64 header_bytes_received = 20; */ - headerBytesReceived = protoInt64.zero; + headerBytesReceived: bigint; /** - * @generated from field: uint64 packets_discarded = 21; + * @generated from field: required uint64 packets_discarded = 21; */ - packetsDiscarded = protoInt64.zero; + packetsDiscarded: bigint; /** - * @generated from field: uint64 fec_bytes_received = 22; + * @generated from field: required uint64 fec_bytes_received = 22; */ - fecBytesReceived = protoInt64.zero; + fecBytesReceived: bigint; /** - * @generated from field: uint64 fec_packets_received = 23; + * @generated from field: required uint64 fec_packets_received = 23; */ - fecPacketsReceived = protoInt64.zero; + fecPacketsReceived: bigint; /** - * @generated from field: uint64 fec_packets_discarded = 24; + * @generated from field: required uint64 fec_packets_discarded = 24; */ - fecPacketsDiscarded = protoInt64.zero; + fecPacketsDiscarded: bigint; /** - * @generated from field: uint64 bytes_received = 25; + * @generated from field: required uint64 bytes_received = 25; */ - bytesReceived = protoInt64.zero; + bytesReceived: bigint; /** - * @generated from field: uint32 nack_count = 26; + * @generated from field: required uint32 nack_count = 26; */ - nackCount = 0; + nackCount: number; /** - * @generated from field: uint32 fir_count = 27; + * @generated from field: required uint32 fir_count = 27; */ - firCount = 0; + firCount: number; /** - * @generated from field: uint32 pli_count = 28; + * @generated from field: required uint32 pli_count = 28; */ - pliCount = 0; + pliCount: number; /** - * @generated from field: double total_processing_delay = 29; + * @generated from field: required double total_processing_delay = 29; */ - totalProcessingDelay = 0; + totalProcessingDelay: number; /** - * @generated from field: double estimated_playout_timestamp = 30; + * @generated from field: required double estimated_playout_timestamp = 30; */ - estimatedPlayoutTimestamp = 0; + estimatedPlayoutTimestamp: number; /** - * @generated from field: double jitter_buffer_delay = 31; + * @generated from field: required double jitter_buffer_delay = 31; */ - jitterBufferDelay = 0; + jitterBufferDelay: number; /** - * @generated from field: double jitter_buffer_target_delay = 32; + * @generated from field: required double jitter_buffer_target_delay = 32; */ - jitterBufferTargetDelay = 0; + jitterBufferTargetDelay: number; /** - * @generated from field: uint64 jitter_buffer_emitted_count = 33; + * @generated from field: required uint64 jitter_buffer_emitted_count = 33; */ - jitterBufferEmittedCount = protoInt64.zero; + jitterBufferEmittedCount: bigint; /** - * @generated from field: double jitter_buffer_minimum_delay = 34; + * @generated from field: required double jitter_buffer_minimum_delay = 34; */ - jitterBufferMinimumDelay = 0; + jitterBufferMinimumDelay: number; /** - * @generated from field: uint64 total_samples_received = 35; + * @generated from field: required uint64 total_samples_received = 35; */ - totalSamplesReceived = protoInt64.zero; + totalSamplesReceived: bigint; /** - * @generated from field: uint64 concealed_samples = 36; + * @generated from field: required uint64 concealed_samples = 36; */ - concealedSamples = protoInt64.zero; + concealedSamples: bigint; /** - * @generated from field: uint64 silent_concealed_samples = 37; + * @generated from field: required uint64 silent_concealed_samples = 37; */ - silentConcealedSamples = protoInt64.zero; + silentConcealedSamples: bigint; /** - * @generated from field: uint64 concealment_events = 38; + * @generated from field: required uint64 concealment_events = 38; */ - concealmentEvents = protoInt64.zero; + concealmentEvents: bigint; /** - * @generated from field: uint64 inserted_samples_for_deceleration = 39; + * @generated from field: required uint64 inserted_samples_for_deceleration = 39; */ - insertedSamplesForDeceleration = protoInt64.zero; + insertedSamplesForDeceleration: bigint; /** - * @generated from field: uint64 removed_samples_for_acceleration = 40; + * @generated from field: required uint64 removed_samples_for_acceleration = 40; */ - removedSamplesForAcceleration = protoInt64.zero; + removedSamplesForAcceleration: bigint; /** - * @generated from field: double audio_level = 41; + * @generated from field: required double audio_level = 41; */ - audioLevel = 0; + audioLevel: number; /** - * @generated from field: double total_audio_energy = 42; + * @generated from field: required double total_audio_energy = 42; */ - totalAudioEnergy = 0; + totalAudioEnergy: number; /** - * @generated from field: double total_samples_duration = 43; + * @generated from field: required double total_samples_duration = 43; */ - totalSamplesDuration = 0; + totalSamplesDuration: number; /** - * @generated from field: uint64 frames_received = 44; + * @generated from field: required uint64 frames_received = 44; */ - framesReceived = protoInt64.zero; + framesReceived: bigint; /** - * @generated from field: string decoder_implementation = 45; + * @generated from field: required string decoder_implementation = 45; */ - decoderImplementation = ""; + decoderImplementation: string; /** - * @generated from field: string playout_id = 46; + * @generated from field: required string playout_id = 46; */ - playoutId = ""; + playoutId: string; /** - * @generated from field: bool power_efficient_decoder = 47; + * @generated from field: required bool power_efficient_decoder = 47; */ - powerEfficientDecoder = false; + powerEfficientDecoder: boolean; /** - * @generated from field: uint64 frames_assembled_from_multiple_packets = 48; + * @generated from field: required uint64 frames_assembled_from_multiple_packets = 48; */ - framesAssembledFromMultiplePackets = protoInt64.zero; + framesAssembledFromMultiplePackets: bigint; /** - * @generated from field: double total_assembly_time = 49; + * @generated from field: required double total_assembly_time = 49; */ - totalAssemblyTime = 0; + totalAssemblyTime: number; /** - * @generated from field: uint64 retransmitted_packets_received = 50; + * @generated from field: required uint64 retransmitted_packets_received = 50; */ - retransmittedPacketsReceived = protoInt64.zero; + retransmittedPacketsReceived: bigint; /** - * @generated from field: uint64 retransmitted_bytes_received = 51; + * @generated from field: required uint64 retransmitted_bytes_received = 51; */ - retransmittedBytesReceived = protoInt64.zero; + retransmittedBytesReceived: bigint; /** - * @generated from field: uint32 rtx_ssrc = 52; + * @generated from field: required uint32 rtx_ssrc = 52; */ - rtxSsrc = 0; + rtxSsrc: number; /** - * @generated from field: uint32 fec_ssrc = 53; + * @generated from field: required uint32 fec_ssrc = 53; */ - fecSsrc = 0; + fecSsrc: number; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.InboundRtpStreamStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "track_identifier", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "mid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "remote_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "frames_decoded", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 5, name: "key_frames_decoded", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 6, name: "frames_rendered", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 7, name: "frames_dropped", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 8, name: "frame_width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 9, name: "frame_height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 10, name: "frames_per_second", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 11, name: "qp_sum", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 12, name: "total_decode_time", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 13, name: "total_inter_frame_delay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 14, name: "total_squared_inter_frame_delay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 15, name: "pause_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 16, name: "total_pause_duration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 17, name: "freeze_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 18, name: "total_freeze_duration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 19, name: "last_packet_received_timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 20, name: "header_bytes_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 21, name: "packets_discarded", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 22, name: "fec_bytes_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 23, name: "fec_packets_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 24, name: "fec_packets_discarded", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 25, name: "bytes_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 26, name: "nack_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 27, name: "fir_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 28, name: "pli_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 29, name: "total_processing_delay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 30, name: "estimated_playout_timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 31, name: "jitter_buffer_delay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 32, name: "jitter_buffer_target_delay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 33, name: "jitter_buffer_emitted_count", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 34, name: "jitter_buffer_minimum_delay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 35, name: "total_samples_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 36, name: "concealed_samples", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 37, name: "silent_concealed_samples", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 38, name: "concealment_events", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 39, name: "inserted_samples_for_deceleration", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 40, name: "removed_samples_for_acceleration", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 41, name: "audio_level", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 42, name: "total_audio_energy", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 43, name: "total_samples_duration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 44, name: "frames_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 45, name: "decoder_implementation", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 46, name: "playout_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 47, name: "power_efficient_decoder", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 48, name: "frames_assembled_from_multiple_packets", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 49, name: "total_assembly_time", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 50, name: "retransmitted_packets_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 51, name: "retransmitted_bytes_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 52, name: "rtx_ssrc", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 53, name: "fec_ssrc", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): InboundRtpStreamStats { - return new InboundRtpStreamStats().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): InboundRtpStreamStats { - return new InboundRtpStreamStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): InboundRtpStreamStats { - return new InboundRtpStreamStats().fromJsonString(jsonString, options); - } - - static equals(a: InboundRtpStreamStats | PlainMessage | undefined, b: InboundRtpStreamStats | PlainMessage | undefined): boolean { - return proto3.util.equals(InboundRtpStreamStats, a, b); - } -} +/** + * Describes the message livekit.proto.InboundRtpStreamStats. + * Use `create(InboundRtpStreamStatsSchema)` to create a new message. + */ +export const InboundRtpStreamStatsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 5); /** * @generated from message livekit.proto.SentRtpStreamStats */ -export class SentRtpStreamStats extends Message { +export type SentRtpStreamStats = Message<"livekit.proto.SentRtpStreamStats"> & { /** - * @generated from field: uint64 packets_sent = 1; + * @generated from field: required uint64 packets_sent = 1; */ - packetsSent = protoInt64.zero; + packetsSent: bigint; /** - * @generated from field: uint64 bytes_sent = 2; + * @generated from field: required uint64 bytes_sent = 2; */ - bytesSent = protoInt64.zero; + bytesSent: bigint; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +/** + * Describes the message livekit.proto.SentRtpStreamStats. + * Use `create(SentRtpStreamStatsSchema)` to create a new message. + */ +export const SentRtpStreamStatsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 6); - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.SentRtpStreamStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "packets_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "bytes_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); +/** + * @generated from message livekit.proto.OutboundRtpStreamStats + */ +export type OutboundRtpStreamStats = Message<"livekit.proto.OutboundRtpStreamStats"> & { + /** + * @generated from field: required string mid = 1; + */ + mid: string; - static fromBinary(bytes: Uint8Array, options?: Partial): SentRtpStreamStats { - return new SentRtpStreamStats().fromBinary(bytes, options); - } + /** + * @generated from field: required string media_source_id = 2; + */ + mediaSourceId: string; - static fromJson(jsonValue: JsonValue, options?: Partial): SentRtpStreamStats { - return new SentRtpStreamStats().fromJson(jsonValue, options); - } + /** + * @generated from field: required string remote_id = 3; + */ + remoteId: string; - static fromJsonString(jsonString: string, options?: Partial): SentRtpStreamStats { - return new SentRtpStreamStats().fromJsonString(jsonString, options); - } + /** + * @generated from field: required string rid = 4; + */ + rid: string; - static equals(a: SentRtpStreamStats | PlainMessage | undefined, b: SentRtpStreamStats | PlainMessage | undefined): boolean { - return proto3.util.equals(SentRtpStreamStats, a, b); - } -} + /** + * @generated from field: required uint64 header_bytes_sent = 5; + */ + headerBytesSent: bigint; -/** - * @generated from message livekit.proto.OutboundRtpStreamStats - */ -export class OutboundRtpStreamStats extends Message { /** - * @generated from field: string mid = 1; + * @generated from field: required uint64 retransmitted_packets_sent = 6; */ - mid = ""; + retransmittedPacketsSent: bigint; /** - * @generated from field: string media_source_id = 2; + * @generated from field: required uint64 retransmitted_bytes_sent = 7; */ - mediaSourceId = ""; + retransmittedBytesSent: bigint; /** - * @generated from field: string remote_id = 3; + * @generated from field: required uint32 rtx_ssrc = 8; */ - remoteId = ""; + rtxSsrc: number; /** - * @generated from field: string rid = 4; + * @generated from field: required double target_bitrate = 9; */ - rid = ""; + targetBitrate: number; /** - * @generated from field: uint64 header_bytes_sent = 5; + * @generated from field: required uint64 total_encoded_bytes_target = 10; */ - headerBytesSent = protoInt64.zero; + totalEncodedBytesTarget: bigint; /** - * @generated from field: uint64 retransmitted_packets_sent = 6; + * @generated from field: required uint32 frame_width = 11; */ - retransmittedPacketsSent = protoInt64.zero; + frameWidth: number; /** - * @generated from field: uint64 retransmitted_bytes_sent = 7; + * @generated from field: required uint32 frame_height = 12; */ - retransmittedBytesSent = protoInt64.zero; + frameHeight: number; /** - * @generated from field: uint32 rtx_ssrc = 8; + * @generated from field: required double frames_per_second = 13; */ - rtxSsrc = 0; + framesPerSecond: number; /** - * @generated from field: double target_bitrate = 9; + * @generated from field: required uint32 frames_sent = 14; */ - targetBitrate = 0; + framesSent: number; /** - * @generated from field: uint64 total_encoded_bytes_target = 10; + * @generated from field: required uint32 huge_frames_sent = 15; */ - totalEncodedBytesTarget = protoInt64.zero; + hugeFramesSent: number; /** - * @generated from field: uint32 frame_width = 11; + * @generated from field: required uint32 frames_encoded = 16; */ - frameWidth = 0; + framesEncoded: number; /** - * @generated from field: uint32 frame_height = 12; + * @generated from field: required uint32 key_frames_encoded = 17; */ - frameHeight = 0; + keyFramesEncoded: number; /** - * @generated from field: double frames_per_second = 13; + * @generated from field: required uint64 qp_sum = 18; */ - framesPerSecond = 0; + qpSum: bigint; /** - * @generated from field: uint32 frames_sent = 14; + * @generated from field: required double total_encode_time = 19; */ - framesSent = 0; + totalEncodeTime: number; /** - * @generated from field: uint32 huge_frames_sent = 15; + * @generated from field: required double total_packet_send_delay = 20; */ - hugeFramesSent = 0; + totalPacketSendDelay: number; /** - * @generated from field: uint32 frames_encoded = 16; + * @generated from field: required livekit.proto.QualityLimitationReason quality_limitation_reason = 21; */ - framesEncoded = 0; + qualityLimitationReason: QualityLimitationReason; /** - * @generated from field: uint32 key_frames_encoded = 17; + * @generated from field: map quality_limitation_durations = 22; */ - keyFramesEncoded = 0; + qualityLimitationDurations: { [key: string]: number }; /** - * @generated from field: uint64 qp_sum = 18; + * @generated from field: required uint32 quality_limitation_resolution_changes = 23; */ - qpSum = protoInt64.zero; + qualityLimitationResolutionChanges: number; /** - * @generated from field: double total_encode_time = 19; + * @generated from field: required uint32 nack_count = 24; */ - totalEncodeTime = 0; + nackCount: number; /** - * @generated from field: double total_packet_send_delay = 20; + * @generated from field: required uint32 fir_count = 25; */ - totalPacketSendDelay = 0; + firCount: number; /** - * @generated from field: livekit.proto.QualityLimitationReason quality_limitation_reason = 21; + * @generated from field: required uint32 pli_count = 26; */ - qualityLimitationReason = QualityLimitationReason.LIMITATION_NONE; + pliCount: number; /** - * @generated from field: map quality_limitation_durations = 22; + * @generated from field: required string encoder_implementation = 27; */ - qualityLimitationDurations: { [key: string]: number } = {}; + encoderImplementation: string; /** - * @generated from field: uint32 quality_limitation_resolution_changes = 23; + * @generated from field: required bool power_efficient_encoder = 28; */ - qualityLimitationResolutionChanges = 0; + powerEfficientEncoder: boolean; /** - * @generated from field: uint32 nack_count = 24; + * @generated from field: required bool active = 29; */ - nackCount = 0; + active: boolean; /** - * @generated from field: uint32 fir_count = 25; + * @generated from field: required string scalability_mode = 30; */ - firCount = 0; + scalabilityMode: string; +}; +/** + * Describes the message livekit.proto.OutboundRtpStreamStats. + * Use `create(OutboundRtpStreamStatsSchema)` to create a new message. + */ +export const OutboundRtpStreamStatsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 7); + +/** + * @generated from message livekit.proto.RemoteInboundRtpStreamStats + */ +export type RemoteInboundRtpStreamStats = Message<"livekit.proto.RemoteInboundRtpStreamStats"> & { /** - * @generated from field: uint32 pli_count = 26; + * @generated from field: required string local_id = 1; */ - pliCount = 0; + localId: string; /** - * @generated from field: string encoder_implementation = 27; + * @generated from field: required double round_trip_time = 2; */ - encoderImplementation = ""; + roundTripTime: number; /** - * @generated from field: bool power_efficient_encoder = 28; + * @generated from field: required double total_round_trip_time = 3; */ - powerEfficientEncoder = false; + totalRoundTripTime: number; /** - * @generated from field: bool active = 29; + * @generated from field: required double fraction_lost = 4; */ - active = false; + fractionLost: number; /** - * @generated from field: string scalibility_mode = 30; + * @generated from field: required uint64 round_trip_time_measurements = 5; */ - scalibilityMode = ""; + roundTripTimeMeasurements: bigint; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +/** + * Describes the message livekit.proto.RemoteInboundRtpStreamStats. + * Use `create(RemoteInboundRtpStreamStatsSchema)` to create a new message. + */ +export const RemoteInboundRtpStreamStatsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 8); - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.OutboundRtpStreamStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "mid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "media_source_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "remote_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "rid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "header_bytes_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 6, name: "retransmitted_packets_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 7, name: "retransmitted_bytes_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 8, name: "rtx_ssrc", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 9, name: "target_bitrate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 10, name: "total_encoded_bytes_target", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 11, name: "frame_width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 12, name: "frame_height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 13, name: "frames_per_second", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 14, name: "frames_sent", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 15, name: "huge_frames_sent", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 16, name: "frames_encoded", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 17, name: "key_frames_encoded", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 18, name: "qp_sum", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 19, name: "total_encode_time", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 20, name: "total_packet_send_delay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 21, name: "quality_limitation_reason", kind: "enum", T: proto3.getEnumType(QualityLimitationReason) }, - { no: 22, name: "quality_limitation_durations", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 1 /* ScalarType.DOUBLE */} }, - { no: 23, name: "quality_limitation_resolution_changes", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 24, name: "nack_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 25, name: "fir_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 26, name: "pli_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 27, name: "encoder_implementation", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 28, name: "power_efficient_encoder", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 29, name: "active", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 30, name: "scalibility_mode", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); +/** + * @generated from message livekit.proto.RemoteOutboundRtpStreamStats + */ +export type RemoteOutboundRtpStreamStats = Message<"livekit.proto.RemoteOutboundRtpStreamStats"> & { + /** + * @generated from field: required string local_id = 1; + */ + localId: string; - static fromBinary(bytes: Uint8Array, options?: Partial): OutboundRtpStreamStats { - return new OutboundRtpStreamStats().fromBinary(bytes, options); - } + /** + * @generated from field: required double remote_timestamp = 2; + */ + remoteTimestamp: number; - static fromJson(jsonValue: JsonValue, options?: Partial): OutboundRtpStreamStats { - return new OutboundRtpStreamStats().fromJson(jsonValue, options); - } + /** + * @generated from field: required uint64 reports_sent = 3; + */ + reportsSent: bigint; - static fromJsonString(jsonString: string, options?: Partial): OutboundRtpStreamStats { - return new OutboundRtpStreamStats().fromJsonString(jsonString, options); - } + /** + * @generated from field: required double round_trip_time = 4; + */ + roundTripTime: number; - static equals(a: OutboundRtpStreamStats | PlainMessage | undefined, b: OutboundRtpStreamStats | PlainMessage | undefined): boolean { - return proto3.util.equals(OutboundRtpStreamStats, a, b); - } -} + /** + * @generated from field: required double total_round_trip_time = 5; + */ + totalRoundTripTime: number; + + /** + * @generated from field: required uint64 round_trip_time_measurements = 6; + */ + roundTripTimeMeasurements: bigint; +}; /** - * @generated from message livekit.proto.RemoteInboundRtpStreamStats + * Describes the message livekit.proto.RemoteOutboundRtpStreamStats. + * Use `create(RemoteOutboundRtpStreamStatsSchema)` to create a new message. + */ +export const RemoteOutboundRtpStreamStatsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 9); + +/** + * @generated from message livekit.proto.MediaSourceStats */ -export class RemoteInboundRtpStreamStats extends Message { +export type MediaSourceStats = Message<"livekit.proto.MediaSourceStats"> & { /** - * @generated from field: string local_id = 1; + * @generated from field: required string track_identifier = 1; */ - localId = ""; + trackIdentifier: string; /** - * @generated from field: double round_trip_time = 2; + * @generated from field: required string kind = 2; */ - roundTripTime = 0; + kind: string; +}; +/** + * Describes the message livekit.proto.MediaSourceStats. + * Use `create(MediaSourceStatsSchema)` to create a new message. + */ +export const MediaSourceStatsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 10); + +/** + * @generated from message livekit.proto.AudioSourceStats + */ +export type AudioSourceStats = Message<"livekit.proto.AudioSourceStats"> & { /** - * @generated from field: double total_round_trip_time = 3; + * @generated from field: required double audio_level = 1; */ - totalRoundTripTime = 0; + audioLevel: number; /** - * @generated from field: double fraction_lost = 4; + * @generated from field: required double total_audio_energy = 2; */ - fractionLost = 0; + totalAudioEnergy: number; /** - * @generated from field: uint64 round_trip_time_measurements = 5; + * @generated from field: required double total_samples_duration = 3; */ - roundTripTimeMeasurements = protoInt64.zero; + totalSamplesDuration: number; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + /** + * @generated from field: required double echo_return_loss = 4; + */ + echoReturnLoss: number; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RemoteInboundRtpStreamStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "local_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "round_trip_time", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 3, name: "total_round_trip_time", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 4, name: "fraction_lost", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 5, name: "round_trip_time_measurements", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); + /** + * @generated from field: required double echo_return_loss_enhancement = 5; + */ + echoReturnLossEnhancement: number; - static fromBinary(bytes: Uint8Array, options?: Partial): RemoteInboundRtpStreamStats { - return new RemoteInboundRtpStreamStats().fromBinary(bytes, options); - } + /** + * @generated from field: required double dropped_samples_duration = 6; + */ + droppedSamplesDuration: number; - static fromJson(jsonValue: JsonValue, options?: Partial): RemoteInboundRtpStreamStats { - return new RemoteInboundRtpStreamStats().fromJson(jsonValue, options); - } + /** + * @generated from field: required uint32 dropped_samples_events = 7; + */ + droppedSamplesEvents: number; + + /** + * @generated from field: required double total_capture_delay = 8; + */ + totalCaptureDelay: number; - static fromJsonString(jsonString: string, options?: Partial): RemoteInboundRtpStreamStats { - return new RemoteInboundRtpStreamStats().fromJsonString(jsonString, options); - } + /** + * @generated from field: required uint64 total_samples_captured = 9; + */ + totalSamplesCaptured: bigint; +}; - static equals(a: RemoteInboundRtpStreamStats | PlainMessage | undefined, b: RemoteInboundRtpStreamStats | PlainMessage | undefined): boolean { - return proto3.util.equals(RemoteInboundRtpStreamStats, a, b); - } -} +/** + * Describes the message livekit.proto.AudioSourceStats. + * Use `create(AudioSourceStatsSchema)` to create a new message. + */ +export const AudioSourceStatsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 11); /** - * @generated from message livekit.proto.RemoteOutboundRtpStreamStats + * @generated from message livekit.proto.VideoSourceStats */ -export class RemoteOutboundRtpStreamStats extends Message { +export type VideoSourceStats = Message<"livekit.proto.VideoSourceStats"> & { /** - * @generated from field: string local_id = 1; + * @generated from field: required uint32 width = 1; */ - localId = ""; + width: number; /** - * @generated from field: double remote_timestamp = 2; + * @generated from field: required uint32 height = 2; */ - remoteTimestamp = 0; + height: number; /** - * @generated from field: uint64 reports_sent = 3; + * @generated from field: required uint32 frames = 3; */ - reportsSent = protoInt64.zero; + frames: number; /** - * @generated from field: double round_trip_time = 4; + * @generated from field: required double frames_per_second = 4; */ - roundTripTime = 0; + framesPerSecond: number; +}; + +/** + * Describes the message livekit.proto.VideoSourceStats. + * Use `create(VideoSourceStatsSchema)` to create a new message. + */ +export const VideoSourceStatsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 12); +/** + * @generated from message livekit.proto.AudioPlayoutStats + */ +export type AudioPlayoutStats = Message<"livekit.proto.AudioPlayoutStats"> & { /** - * @generated from field: double total_round_trip_time = 5; + * @generated from field: required string kind = 1; */ - totalRoundTripTime = 0; + kind: string; /** - * @generated from field: uint64 round_trip_time_measurements = 6; + * @generated from field: required double synthesized_samples_duration = 2; */ - roundTripTimeMeasurements = protoInt64.zero; + synthesizedSamplesDuration: number; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + /** + * @generated from field: required uint32 synthesized_samples_events = 3; + */ + synthesizedSamplesEvents: number; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.RemoteOutboundRtpStreamStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "local_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "remote_timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 3, name: "reports_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 4, name: "round_trip_time", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 5, name: "total_round_trip_time", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 6, name: "round_trip_time_measurements", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); + /** + * @generated from field: required double total_samples_duration = 4; + */ + totalSamplesDuration: number; - static fromBinary(bytes: Uint8Array, options?: Partial): RemoteOutboundRtpStreamStats { - return new RemoteOutboundRtpStreamStats().fromBinary(bytes, options); - } + /** + * @generated from field: required double total_playout_delay = 5; + */ + totalPlayoutDelay: number; + + /** + * @generated from field: required uint64 total_samples_count = 6; + */ + totalSamplesCount: bigint; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): RemoteOutboundRtpStreamStats { - return new RemoteOutboundRtpStreamStats().fromJson(jsonValue, options); - } +/** + * Describes the message livekit.proto.AudioPlayoutStats. + * Use `create(AudioPlayoutStatsSchema)` to create a new message. + */ +export const AudioPlayoutStatsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 13); - static fromJsonString(jsonString: string, options?: Partial): RemoteOutboundRtpStreamStats { - return new RemoteOutboundRtpStreamStats().fromJsonString(jsonString, options); - } +/** + * @generated from message livekit.proto.PeerConnectionStats + */ +export type PeerConnectionStats = Message<"livekit.proto.PeerConnectionStats"> & { + /** + * @generated from field: required uint32 data_channels_opened = 1; + */ + dataChannelsOpened: number; - static equals(a: RemoteOutboundRtpStreamStats | PlainMessage | undefined, b: RemoteOutboundRtpStreamStats | PlainMessage | undefined): boolean { - return proto3.util.equals(RemoteOutboundRtpStreamStats, a, b); - } -} + /** + * @generated from field: required uint32 data_channels_closed = 2; + */ + dataChannelsClosed: number; +}; /** - * @generated from message livekit.proto.MediaSourceStats + * Describes the message livekit.proto.PeerConnectionStats. + * Use `create(PeerConnectionStatsSchema)` to create a new message. */ -export class MediaSourceStats extends Message { +export const PeerConnectionStatsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 14); + +/** + * @generated from message livekit.proto.DataChannelStats + */ +export type DataChannelStats = Message<"livekit.proto.DataChannelStats"> & { /** - * @generated from field: string track_identifier = 1; + * @generated from field: required string label = 1; */ - trackIdentifier = ""; + label: string; /** - * @generated from field: string kind = 2; + * @generated from field: required string protocol = 2; */ - kind = ""; + protocol: string; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + /** + * @generated from field: required int32 data_channel_identifier = 3; + */ + dataChannelIdentifier: number; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.MediaSourceStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "track_identifier", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + /** + * @generated from field: optional livekit.proto.DataChannelState state = 4; + */ + state: DataChannelState; - static fromBinary(bytes: Uint8Array, options?: Partial): MediaSourceStats { - return new MediaSourceStats().fromBinary(bytes, options); - } + /** + * @generated from field: required uint32 messages_sent = 5; + */ + messagesSent: number; - static fromJson(jsonValue: JsonValue, options?: Partial): MediaSourceStats { - return new MediaSourceStats().fromJson(jsonValue, options); - } + /** + * @generated from field: required uint64 bytes_sent = 6; + */ + bytesSent: bigint; - static fromJsonString(jsonString: string, options?: Partial): MediaSourceStats { - return new MediaSourceStats().fromJsonString(jsonString, options); - } + /** + * @generated from field: required uint32 messages_received = 7; + */ + messagesReceived: number; - static equals(a: MediaSourceStats | PlainMessage | undefined, b: MediaSourceStats | PlainMessage | undefined): boolean { - return proto3.util.equals(MediaSourceStats, a, b); - } -} + /** + * @generated from field: required uint64 bytes_received = 8; + */ + bytesReceived: bigint; +}; /** - * @generated from message livekit.proto.AudioSourceStats + * Describes the message livekit.proto.DataChannelStats. + * Use `create(DataChannelStatsSchema)` to create a new message. */ -export class AudioSourceStats extends Message { +export const DataChannelStatsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 15); + +/** + * @generated from message livekit.proto.TransportStats + */ +export type TransportStats = Message<"livekit.proto.TransportStats"> & { + /** + * @generated from field: required uint64 packets_sent = 1; + */ + packetsSent: bigint; + + /** + * @generated from field: required uint64 packets_received = 2; + */ + packetsReceived: bigint; + + /** + * @generated from field: required uint64 bytes_sent = 3; + */ + bytesSent: bigint; + /** - * @generated from field: double audio_level = 1; + * @generated from field: required uint64 bytes_received = 4; */ - audioLevel = 0; + bytesReceived: bigint; /** - * @generated from field: double total_audio_energy = 2; + * @generated from field: required livekit.proto.IceRole ice_role = 5; */ - totalAudioEnergy = 0; + iceRole: IceRole; /** - * @generated from field: double total_samples_duration = 3; + * @generated from field: required string ice_local_username_fragment = 6; */ - totalSamplesDuration = 0; + iceLocalUsernameFragment: string; /** - * @generated from field: double echo_return_loss = 4; + * @generated from field: optional livekit.proto.DtlsTransportState dtls_state = 7; */ - echoReturnLoss = 0; + dtlsState: DtlsTransportState; /** - * @generated from field: double echo_return_loss_enhancement = 5; + * @generated from field: optional livekit.proto.IceTransportState ice_state = 8; */ - echoReturnLossEnhancement = 0; + iceState: IceTransportState; /** - * @generated from field: double dropped_samples_duration = 6; + * @generated from field: required string selected_candidate_pair_id = 9; */ - droppedSamplesDuration = 0; + selectedCandidatePairId: string; /** - * @generated from field: uint32 dropped_samples_events = 7; + * @generated from field: required string local_certificate_id = 10; */ - droppedSamplesEvents = 0; + localCertificateId: string; /** - * @generated from field: double total_capture_delay = 8; + * @generated from field: required string remote_certificate_id = 11; */ - totalCaptureDelay = 0; + remoteCertificateId: string; /** - * @generated from field: uint64 total_samples_captured = 9; + * @generated from field: required string tls_version = 12; */ - totalSamplesCaptured = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.AudioSourceStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "audio_level", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 2, name: "total_audio_energy", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 3, name: "total_samples_duration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 4, name: "echo_return_loss", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 5, name: "echo_return_loss_enhancement", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 6, name: "dropped_samples_duration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 7, name: "dropped_samples_events", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 8, name: "total_capture_delay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 9, name: "total_samples_captured", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AudioSourceStats { - return new AudioSourceStats().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AudioSourceStats { - return new AudioSourceStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AudioSourceStats { - return new AudioSourceStats().fromJsonString(jsonString, options); - } - - static equals(a: AudioSourceStats | PlainMessage | undefined, b: AudioSourceStats | PlainMessage | undefined): boolean { - return proto3.util.equals(AudioSourceStats, a, b); - } -} + tlsVersion: string; -/** - * @generated from message livekit.proto.VideoSourceStats - */ -export class VideoSourceStats extends Message { /** - * @generated from field: uint32 width = 1; + * @generated from field: required string dtls_cipher = 13; */ - width = 0; + dtlsCipher: string; /** - * @generated from field: uint32 height = 2; + * @generated from field: required livekit.proto.DtlsRole dtls_role = 14; */ - height = 0; + dtlsRole: DtlsRole; /** - * @generated from field: uint32 frames = 3; + * @generated from field: required string srtp_cipher = 15; */ - frames = 0; + srtpCipher: string; /** - * @generated from field: double frames_per_second = 4; + * @generated from field: required uint32 selected_candidate_pair_changes = 16; */ - framesPerSecond = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.VideoSourceStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 2, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 3, name: "frames", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 4, name: "frames_per_second", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VideoSourceStats { - return new VideoSourceStats().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): VideoSourceStats { - return new VideoSourceStats().fromJson(jsonValue, options); - } + selectedCandidatePairChanges: number; +}; - static fromJsonString(jsonString: string, options?: Partial): VideoSourceStats { - return new VideoSourceStats().fromJsonString(jsonString, options); - } - - static equals(a: VideoSourceStats | PlainMessage | undefined, b: VideoSourceStats | PlainMessage | undefined): boolean { - return proto3.util.equals(VideoSourceStats, a, b); - } -} +/** + * Describes the message livekit.proto.TransportStats. + * Use `create(TransportStatsSchema)` to create a new message. + */ +export const TransportStatsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 16); /** - * @generated from message livekit.proto.AudioPlayoutStats + * @generated from message livekit.proto.CandidatePairStats */ -export class AudioPlayoutStats extends Message { +export type CandidatePairStats = Message<"livekit.proto.CandidatePairStats"> & { /** - * @generated from field: string kind = 1; + * @generated from field: required string transport_id = 1; */ - kind = ""; + transportId: string; /** - * @generated from field: double synthesized_samples_duration = 2; + * @generated from field: required string local_candidate_id = 2; */ - synthesizedSamplesDuration = 0; + localCandidateId: string; /** - * @generated from field: uint32 synthesized_samples_events = 3; + * @generated from field: required string remote_candidate_id = 3; */ - synthesizedSamplesEvents = 0; + remoteCandidateId: string; /** - * @generated from field: double total_samples_duration = 4; + * @generated from field: optional livekit.proto.IceCandidatePairState state = 4; */ - totalSamplesDuration = 0; + state: IceCandidatePairState; /** - * @generated from field: double total_playout_delay = 5; + * @generated from field: required bool nominated = 5; */ - totalPlayoutDelay = 0; + nominated: boolean; /** - * @generated from field: uint64 total_samples_count = 6; + * @generated from field: required uint64 packets_sent = 6; */ - totalSamplesCount = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + packetsSent: bigint; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.AudioPlayoutStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "synthesized_samples_duration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 3, name: "synthesized_samples_events", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 4, name: "total_samples_duration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 5, name: "total_playout_delay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 6, name: "total_samples_count", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AudioPlayoutStats { - return new AudioPlayoutStats().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AudioPlayoutStats { - return new AudioPlayoutStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AudioPlayoutStats { - return new AudioPlayoutStats().fromJsonString(jsonString, options); - } - - static equals(a: AudioPlayoutStats | PlainMessage | undefined, b: AudioPlayoutStats | PlainMessage | undefined): boolean { - return proto3.util.equals(AudioPlayoutStats, a, b); - } -} - -/** - * @generated from message livekit.proto.PeerConnectionStats - */ -export class PeerConnectionStats extends Message { /** - * @generated from field: uint32 data_channels_opened = 1; + * @generated from field: required uint64 packets_received = 7; */ - dataChannelsOpened = 0; + packetsReceived: bigint; /** - * @generated from field: uint32 data_channels_closed = 2; + * @generated from field: required uint64 bytes_sent = 8; */ - dataChannelsClosed = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.PeerConnectionStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "data_channels_opened", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 2, name: "data_channels_closed", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PeerConnectionStats { - return new PeerConnectionStats().fromBinary(bytes, options); - } + bytesSent: bigint; - static fromJson(jsonValue: JsonValue, options?: Partial): PeerConnectionStats { - return new PeerConnectionStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PeerConnectionStats { - return new PeerConnectionStats().fromJsonString(jsonString, options); - } - - static equals(a: PeerConnectionStats | PlainMessage | undefined, b: PeerConnectionStats | PlainMessage | undefined): boolean { - return proto3.util.equals(PeerConnectionStats, a, b); - } -} + /** + * @generated from field: required uint64 bytes_received = 9; + */ + bytesReceived: bigint; -/** - * @generated from message livekit.proto.DataChannelStats - */ -export class DataChannelStats extends Message { /** - * @generated from field: string label = 1; + * @generated from field: required double last_packet_sent_timestamp = 10; */ - label = ""; + lastPacketSentTimestamp: number; /** - * @generated from field: string protocol = 2; + * @generated from field: required double last_packet_received_timestamp = 11; */ - protocol = ""; + lastPacketReceivedTimestamp: number; /** - * @generated from field: int32 data_channel_identifier = 3; + * @generated from field: required double total_round_trip_time = 12; */ - dataChannelIdentifier = 0; + totalRoundTripTime: number; /** - * @generated from field: optional livekit.proto.DataChannelState state = 4; + * @generated from field: required double current_round_trip_time = 13; */ - state?: DataChannelState; + currentRoundTripTime: number; /** - * @generated from field: uint32 messages_sent = 5; + * @generated from field: required double available_outgoing_bitrate = 14; */ - messagesSent = 0; + availableOutgoingBitrate: number; /** - * @generated from field: uint64 bytes_sent = 6; + * @generated from field: required double available_incoming_bitrate = 15; */ - bytesSent = protoInt64.zero; + availableIncomingBitrate: number; /** - * @generated from field: uint32 messages_received = 7; + * @generated from field: required uint64 requests_received = 16; */ - messagesReceived = 0; + requestsReceived: bigint; /** - * @generated from field: uint64 bytes_received = 8; + * @generated from field: required uint64 requests_sent = 17; */ - bytesReceived = protoInt64.zero; + requestsSent: bigint; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + /** + * @generated from field: required uint64 responses_received = 18; + */ + responsesReceived: bigint; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.DataChannelStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "protocol", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "data_channel_identifier", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 4, name: "state", kind: "enum", T: proto3.getEnumType(DataChannelState), opt: true }, - { no: 5, name: "messages_sent", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 6, name: "bytes_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 7, name: "messages_received", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 8, name: "bytes_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); + /** + * @generated from field: required uint64 responses_sent = 19; + */ + responsesSent: bigint; - static fromBinary(bytes: Uint8Array, options?: Partial): DataChannelStats { - return new DataChannelStats().fromBinary(bytes, options); - } + /** + * @generated from field: required uint64 consent_requests_sent = 20; + */ + consentRequestsSent: bigint; - static fromJson(jsonValue: JsonValue, options?: Partial): DataChannelStats { - return new DataChannelStats().fromJson(jsonValue, options); - } + /** + * @generated from field: required uint32 packets_discarded_on_send = 21; + */ + packetsDiscardedOnSend: number; - static fromJsonString(jsonString: string, options?: Partial): DataChannelStats { - return new DataChannelStats().fromJsonString(jsonString, options); - } + /** + * @generated from field: required uint64 bytes_discarded_on_send = 22; + */ + bytesDiscardedOnSend: bigint; +}; - static equals(a: DataChannelStats | PlainMessage | undefined, b: DataChannelStats | PlainMessage | undefined): boolean { - return proto3.util.equals(DataChannelStats, a, b); - } -} +/** + * Describes the message livekit.proto.CandidatePairStats. + * Use `create(CandidatePairStatsSchema)` to create a new message. + */ +export const CandidatePairStatsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 17); /** - * @generated from message livekit.proto.TransportStats + * @generated from message livekit.proto.IceCandidateStats */ -export class TransportStats extends Message { +export type IceCandidateStats = Message<"livekit.proto.IceCandidateStats"> & { /** - * @generated from field: uint64 packets_sent = 1; + * @generated from field: required string transport_id = 1; */ - packetsSent = protoInt64.zero; + transportId: string; /** - * @generated from field: uint64 packets_received = 2; + * @generated from field: required string address = 2; */ - packetsReceived = protoInt64.zero; + address: string; /** - * @generated from field: uint64 bytes_sent = 3; + * @generated from field: required int32 port = 3; */ - bytesSent = protoInt64.zero; + port: number; /** - * @generated from field: uint64 bytes_received = 4; + * @generated from field: required string protocol = 4; */ - bytesReceived = protoInt64.zero; + protocol: string; /** - * @generated from field: livekit.proto.IceRole ice_role = 5; + * @generated from field: optional livekit.proto.IceCandidateType candidate_type = 5; */ - iceRole = IceRole.ICE_UNKNOWN; + candidateType: IceCandidateType; /** - * @generated from field: string ice_local_username_fragment = 6; + * @generated from field: required int32 priority = 6; */ - iceLocalUsernameFragment = ""; + priority: number; /** - * @generated from field: optional livekit.proto.DtlsTransportState dtls_state = 7; + * @generated from field: required string url = 7; */ - dtlsState?: DtlsTransportState; + url: string; /** - * @generated from field: optional livekit.proto.IceTransportState ice_state = 8; + * @generated from field: optional livekit.proto.IceServerTransportProtocol relay_protocol = 8; */ - iceState?: IceTransportState; + relayProtocol: IceServerTransportProtocol; /** - * @generated from field: string selected_candidate_pair_id = 9; + * @generated from field: required string foundation = 9; */ - selectedCandidatePairId = ""; + foundation: string; /** - * @generated from field: string local_certificate_id = 10; + * @generated from field: required string related_address = 10; */ - localCertificateId = ""; + relatedAddress: string; /** - * @generated from field: string remote_certificate_id = 11; + * @generated from field: required int32 related_port = 11; */ - remoteCertificateId = ""; + relatedPort: number; /** - * @generated from field: string tls_version = 12; + * @generated from field: required string username_fragment = 12; */ - tlsVersion = ""; + usernameFragment: string; /** - * @generated from field: string dtls_cipher = 13; + * @generated from field: optional livekit.proto.IceTcpCandidateType tcp_type = 13; */ - dtlsCipher = ""; + tcpType: IceTcpCandidateType; +}; + +/** + * Describes the message livekit.proto.IceCandidateStats. + * Use `create(IceCandidateStatsSchema)` to create a new message. + */ +export const IceCandidateStatsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 18); +/** + * @generated from message livekit.proto.CertificateStats + */ +export type CertificateStats = Message<"livekit.proto.CertificateStats"> & { /** - * @generated from field: livekit.proto.DtlsRole dtls_role = 14; + * @generated from field: required string fingerprint = 1; */ - dtlsRole = DtlsRole.DTLS_CLIENT; + fingerprint: string; /** - * @generated from field: string srtp_cipher = 15; + * @generated from field: required string fingerprint_algorithm = 2; */ - srtpCipher = ""; + fingerprintAlgorithm: string; /** - * @generated from field: uint32 selected_candidate_pair_changes = 16; + * @generated from field: required string base64_certificate = 3; */ - selectedCandidatePairChanges = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + base64Certificate: string; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.TransportStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "packets_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "packets_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 3, name: "bytes_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 4, name: "bytes_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 5, name: "ice_role", kind: "enum", T: proto3.getEnumType(IceRole) }, - { no: 6, name: "ice_local_username_fragment", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "dtls_state", kind: "enum", T: proto3.getEnumType(DtlsTransportState), opt: true }, - { no: 8, name: "ice_state", kind: "enum", T: proto3.getEnumType(IceTransportState), opt: true }, - { no: 9, name: "selected_candidate_pair_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 10, name: "local_certificate_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 11, name: "remote_certificate_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 12, name: "tls_version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 13, name: "dtls_cipher", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 14, name: "dtls_role", kind: "enum", T: proto3.getEnumType(DtlsRole) }, - { no: 15, name: "srtp_cipher", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 16, name: "selected_candidate_pair_changes", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TransportStats { - return new TransportStats().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TransportStats { - return new TransportStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TransportStats { - return new TransportStats().fromJsonString(jsonString, options); - } + /** + * @generated from field: required string issuer_certificate_id = 4; + */ + issuerCertificateId: string; +}; - static equals(a: TransportStats | PlainMessage | undefined, b: TransportStats | PlainMessage | undefined): boolean { - return proto3.util.equals(TransportStats, a, b); - } -} +/** + * Describes the message livekit.proto.CertificateStats. + * Use `create(CertificateStatsSchema)` to create a new message. + */ +export const CertificateStatsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_stats, 19); /** - * @generated from message livekit.proto.CandidatePairStats + * @generated from enum livekit.proto.DataChannelState */ -export class CandidatePairStats extends Message { +export enum DataChannelState { /** - * @generated from field: string transport_id = 1; + * @generated from enum value: DC_CONNECTING = 0; */ - transportId = ""; + DC_CONNECTING = 0, /** - * @generated from field: string local_candidate_id = 2; + * @generated from enum value: DC_OPEN = 1; */ - localCandidateId = ""; + DC_OPEN = 1, /** - * @generated from field: string remote_candidate_id = 3; + * @generated from enum value: DC_CLOSING = 2; */ - remoteCandidateId = ""; + DC_CLOSING = 2, /** - * @generated from field: optional livekit.proto.IceCandidatePairState state = 4; + * @generated from enum value: DC_CLOSED = 3; */ - state?: IceCandidatePairState; + DC_CLOSED = 3, +} + +/** + * Describes the enum livekit.proto.DataChannelState. + */ +export const DataChannelStateSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_stats, 0); +/** + * @generated from enum livekit.proto.QualityLimitationReason + */ +export enum QualityLimitationReason { /** - * @generated from field: bool nominated = 5; + * @generated from enum value: LIMITATION_NONE = 0; */ - nominated = false; + LIMITATION_NONE = 0, /** - * @generated from field: uint64 packets_sent = 6; + * @generated from enum value: LIMITATION_CPU = 1; */ - packetsSent = protoInt64.zero; + LIMITATION_CPU = 1, /** - * @generated from field: uint64 packets_received = 7; + * @generated from enum value: LIMITATION_BANDWIDTH = 2; */ - packetsReceived = protoInt64.zero; + LIMITATION_BANDWIDTH = 2, /** - * @generated from field: uint64 bytes_sent = 8; + * @generated from enum value: LIMITATION_OTHER = 3; */ - bytesSent = protoInt64.zero; + LIMITATION_OTHER = 3, +} + +/** + * Describes the enum livekit.proto.QualityLimitationReason. + */ +export const QualityLimitationReasonSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_stats, 1); +/** + * @generated from enum livekit.proto.IceRole + */ +export enum IceRole { /** - * @generated from field: uint64 bytes_received = 9; + * @generated from enum value: ICE_UNKNOWN = 0; */ - bytesReceived = protoInt64.zero; + ICE_UNKNOWN = 0, /** - * @generated from field: double last_packet_sent_timestamp = 10; + * @generated from enum value: ICE_CONTROLLING = 1; */ - lastPacketSentTimestamp = 0; + ICE_CONTROLLING = 1, /** - * @generated from field: double last_packet_received_timestamp = 11; + * @generated from enum value: ICE_CONTROLLED = 2; */ - lastPacketReceivedTimestamp = 0; + ICE_CONTROLLED = 2, +} + +/** + * Describes the enum livekit.proto.IceRole. + */ +export const IceRoleSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_stats, 2); +/** + * @generated from enum livekit.proto.DtlsTransportState + */ +export enum DtlsTransportState { /** - * @generated from field: double total_round_trip_time = 12; + * @generated from enum value: DTLS_TRANSPORT_NEW = 0; */ - totalRoundTripTime = 0; + DTLS_TRANSPORT_NEW = 0, /** - * @generated from field: double current_round_trip_time = 13; + * @generated from enum value: DTLS_TRANSPORT_CONNECTING = 1; */ - currentRoundTripTime = 0; + DTLS_TRANSPORT_CONNECTING = 1, /** - * @generated from field: double available_outgoing_bitrate = 14; + * @generated from enum value: DTLS_TRANSPORT_CONNECTED = 2; */ - availableOutgoingBitrate = 0; + DTLS_TRANSPORT_CONNECTED = 2, /** - * @generated from field: double available_incoming_bitrate = 15; + * @generated from enum value: DTLS_TRANSPORT_CLOSED = 3; */ - availableIncomingBitrate = 0; + DTLS_TRANSPORT_CLOSED = 3, /** - * @generated from field: uint64 requests_received = 16; + * @generated from enum value: DTLS_TRANSPORT_FAILED = 4; */ - requestsReceived = protoInt64.zero; + DTLS_TRANSPORT_FAILED = 4, +} + +/** + * Describes the enum livekit.proto.DtlsTransportState. + */ +export const DtlsTransportStateSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_stats, 3); +/** + * @generated from enum livekit.proto.IceTransportState + */ +export enum IceTransportState { /** - * @generated from field: uint64 requests_sent = 17; + * @generated from enum value: ICE_TRANSPORT_NEW = 0; */ - requestsSent = protoInt64.zero; + ICE_TRANSPORT_NEW = 0, /** - * @generated from field: uint64 responses_received = 18; + * @generated from enum value: ICE_TRANSPORT_CHECKING = 1; */ - responsesReceived = protoInt64.zero; + ICE_TRANSPORT_CHECKING = 1, /** - * @generated from field: uint64 responses_sent = 19; + * @generated from enum value: ICE_TRANSPORT_CONNECTED = 2; */ - responsesSent = protoInt64.zero; + ICE_TRANSPORT_CONNECTED = 2, /** - * @generated from field: uint64 consent_requests_sent = 20; + * @generated from enum value: ICE_TRANSPORT_COMPLETED = 3; */ - consentRequestsSent = protoInt64.zero; + ICE_TRANSPORT_COMPLETED = 3, /** - * @generated from field: uint32 packets_discarded_on_send = 21; + * @generated from enum value: ICE_TRANSPORT_DISCONNECTED = 4; */ - packetsDiscardedOnSend = 0; + ICE_TRANSPORT_DISCONNECTED = 4, /** - * @generated from field: uint64 bytes_discarded_on_send = 22; + * @generated from enum value: ICE_TRANSPORT_FAILED = 5; */ - bytesDiscardedOnSend = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.CandidatePairStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "transport_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "local_candidate_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "remote_candidate_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "state", kind: "enum", T: proto3.getEnumType(IceCandidatePairState), opt: true }, - { no: 5, name: "nominated", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 6, name: "packets_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 7, name: "packets_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 8, name: "bytes_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 9, name: "bytes_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 10, name: "last_packet_sent_timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 11, name: "last_packet_received_timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 12, name: "total_round_trip_time", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 13, name: "current_round_trip_time", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 14, name: "available_outgoing_bitrate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 15, name: "available_incoming_bitrate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - { no: 16, name: "requests_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 17, name: "requests_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 18, name: "responses_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 19, name: "responses_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 20, name: "consent_requests_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 21, name: "packets_discarded_on_send", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 22, name: "bytes_discarded_on_send", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CandidatePairStats { - return new CandidatePairStats().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CandidatePairStats { - return new CandidatePairStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CandidatePairStats { - return new CandidatePairStats().fromJsonString(jsonString, options); - } + ICE_TRANSPORT_FAILED = 5, - static equals(a: CandidatePairStats | PlainMessage | undefined, b: CandidatePairStats | PlainMessage | undefined): boolean { - return proto3.util.equals(CandidatePairStats, a, b); - } + /** + * @generated from enum value: ICE_TRANSPORT_CLOSED = 6; + */ + ICE_TRANSPORT_CLOSED = 6, } /** - * @generated from message livekit.proto.IceCandidateStats + * Describes the enum livekit.proto.IceTransportState. */ -export class IceCandidateStats extends Message { - /** - * @generated from field: string transport_id = 1; - */ - transportId = ""; +export const IceTransportStateSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_stats, 4); +/** + * @generated from enum livekit.proto.DtlsRole + */ +export enum DtlsRole { /** - * @generated from field: string address = 2; + * @generated from enum value: DTLS_CLIENT = 0; */ - address = ""; + DTLS_CLIENT = 0, /** - * @generated from field: int32 port = 3; + * @generated from enum value: DTLS_SERVER = 1; */ - port = 0; + DTLS_SERVER = 1, /** - * @generated from field: string protocol = 4; + * @generated from enum value: DTLS_UNKNOWN = 2; */ - protocol = ""; + DTLS_UNKNOWN = 2, +} + +/** + * Describes the enum livekit.proto.DtlsRole. + */ +export const DtlsRoleSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_stats, 5); +/** + * @generated from enum livekit.proto.IceCandidatePairState + */ +export enum IceCandidatePairState { /** - * @generated from field: optional livekit.proto.IceCandidateType candidate_type = 5; + * @generated from enum value: PAIR_FROZEN = 0; */ - candidateType?: IceCandidateType; + PAIR_FROZEN = 0, /** - * @generated from field: int32 priority = 6; + * @generated from enum value: PAIR_WAITING = 1; */ - priority = 0; + PAIR_WAITING = 1, /** - * @generated from field: string url = 7; + * @generated from enum value: PAIR_IN_PROGRESS = 2; */ - url = ""; + PAIR_IN_PROGRESS = 2, /** - * @generated from field: optional livekit.proto.IceServerTransportProtocol relay_protocol = 8; + * @generated from enum value: PAIR_FAILED = 3; */ - relayProtocol?: IceServerTransportProtocol; + PAIR_FAILED = 3, /** - * @generated from field: string foundation = 9; + * @generated from enum value: PAIR_SUCCEEDED = 4; */ - foundation = ""; + PAIR_SUCCEEDED = 4, +} + +/** + * Describes the enum livekit.proto.IceCandidatePairState. + */ +export const IceCandidatePairStateSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_stats, 6); +/** + * @generated from enum livekit.proto.IceCandidateType + */ +export enum IceCandidateType { /** - * @generated from field: string related_address = 10; + * @generated from enum value: HOST = 0; */ - relatedAddress = ""; + HOST = 0, /** - * @generated from field: int32 related_port = 11; + * @generated from enum value: SRFLX = 1; */ - relatedPort = 0; + SRFLX = 1, /** - * @generated from field: string username_fragment = 12; + * @generated from enum value: PRFLX = 2; */ - usernameFragment = ""; + PRFLX = 2, /** - * @generated from field: optional livekit.proto.IceTcpCandidateType tcp_type = 13; + * @generated from enum value: RELAY = 3; */ - tcpType?: IceTcpCandidateType; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.IceCandidateStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "transport_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "port", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 4, name: "protocol", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "candidate_type", kind: "enum", T: proto3.getEnumType(IceCandidateType), opt: true }, - { no: 6, name: "priority", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 7, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 8, name: "relay_protocol", kind: "enum", T: proto3.getEnumType(IceServerTransportProtocol), opt: true }, - { no: 9, name: "foundation", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 10, name: "related_address", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 11, name: "related_port", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 12, name: "username_fragment", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 13, name: "tcp_type", kind: "enum", T: proto3.getEnumType(IceTcpCandidateType), opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): IceCandidateStats { - return new IceCandidateStats().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): IceCandidateStats { - return new IceCandidateStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): IceCandidateStats { - return new IceCandidateStats().fromJsonString(jsonString, options); - } - - static equals(a: IceCandidateStats | PlainMessage | undefined, b: IceCandidateStats | PlainMessage | undefined): boolean { - return proto3.util.equals(IceCandidateStats, a, b); - } + RELAY = 3, } /** - * @generated from message livekit.proto.CertificateStats + * Describes the enum livekit.proto.IceCandidateType. */ -export class CertificateStats extends Message { - /** - * @generated from field: string fingerprint = 1; - */ - fingerprint = ""; +export const IceCandidateTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_stats, 7); +/** + * @generated from enum livekit.proto.IceServerTransportProtocol + */ +export enum IceServerTransportProtocol { /** - * @generated from field: string fingerprint_algorithm = 2; + * @generated from enum value: TRANSPORT_UDP = 0; */ - fingerprintAlgorithm = ""; + TRANSPORT_UDP = 0, /** - * @generated from field: string base64_certificate = 3; + * @generated from enum value: TRANSPORT_TCP = 1; */ - base64Certificate = ""; + TRANSPORT_TCP = 1, /** - * @generated from field: string issuer_certificate_id = 4; + * @generated from enum value: TRANSPORT_TLS = 2; */ - issuerCertificateId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.CertificateStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "fingerprint", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "fingerprint_algorithm", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "base64_certificate", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "issuer_certificate_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + TRANSPORT_TLS = 2, +} - static fromBinary(bytes: Uint8Array, options?: Partial): CertificateStats { - return new CertificateStats().fromBinary(bytes, options); - } +/** + * Describes the enum livekit.proto.IceServerTransportProtocol. + */ +export const IceServerTransportProtocolSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_stats, 8); - static fromJson(jsonValue: JsonValue, options?: Partial): CertificateStats { - return new CertificateStats().fromJson(jsonValue, options); - } +/** + * @generated from enum livekit.proto.IceTcpCandidateType + */ +export enum IceTcpCandidateType { + /** + * @generated from enum value: CANDIDATE_ACTIVE = 0; + */ + CANDIDATE_ACTIVE = 0, - static fromJsonString(jsonString: string, options?: Partial): CertificateStats { - return new CertificateStats().fromJsonString(jsonString, options); - } + /** + * @generated from enum value: CANDIDATE_PASSIVE = 1; + */ + CANDIDATE_PASSIVE = 1, - static equals(a: CertificateStats | PlainMessage | undefined, b: CertificateStats | PlainMessage | undefined): boolean { - return proto3.util.equals(CertificateStats, a, b); - } + /** + * @generated from enum value: CANDIDATE_SO = 2; + */ + CANDIDATE_SO = 2, } +/** + * Describes the enum livekit.proto.IceTcpCandidateType. + */ +export const IceTcpCandidateTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_stats, 9); + diff --git a/packages/livekit-rtc/src/proto/track_pb.ts b/packages/livekit-rtc/src/proto/track_pb.ts index c7a87d65..d5e159d7 100644 --- a/packages/livekit-rtc/src/proto/track_pb.ts +++ b/packages/livekit-rtc/src/proto/track_pb.ts @@ -12,836 +12,502 @@ // 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" -// @generated from file track.proto (package livekit.proto, syntax proto3) +// @generated by protoc-gen-es v2.2.0 with parameter "target=ts" +// @generated from file track.proto (package livekit.proto, syntax proto2) /* eslint-disable */ -// @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; -import { RtcStats } from "./stats_pb.js"; -import { EncryptionType } from "./e2ee_pb.js"; -import { FfiOwnedHandle } from "./handle_pb.js"; +import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { EncryptionType } from "./e2ee_pb"; +import { file_e2ee } from "./e2ee_pb"; +import type { FfiOwnedHandle } from "./handle_pb"; +import { file_handle } from "./handle_pb"; +import type { RtcStats } from "./stats_pb"; +import { file_stats } from "./stats_pb"; +import type { Message } from "@bufbuild/protobuf"; /** - * @generated from enum livekit.proto.TrackKind + * Describes the file track.proto. */ -export enum TrackKind { - /** - * @generated from enum value: KIND_UNKNOWN = 0; - */ - KIND_UNKNOWN = 0, - - /** - * @generated from enum value: KIND_AUDIO = 1; - */ - KIND_AUDIO = 1, - - /** - * @generated from enum value: KIND_VIDEO = 2; - */ - KIND_VIDEO = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(TrackKind) -proto3.util.setEnumType(TrackKind, "livekit.proto.TrackKind", [ - { no: 0, name: "KIND_UNKNOWN" }, - { no: 1, name: "KIND_AUDIO" }, - { no: 2, name: "KIND_VIDEO" }, -]); - -/** - * @generated from enum livekit.proto.TrackSource - */ -export enum TrackSource { - /** - * @generated from enum value: SOURCE_UNKNOWN = 0; - */ - SOURCE_UNKNOWN = 0, - - /** - * @generated from enum value: SOURCE_CAMERA = 1; - */ - SOURCE_CAMERA = 1, - - /** - * @generated from enum value: SOURCE_MICROPHONE = 2; - */ - SOURCE_MICROPHONE = 2, - - /** - * @generated from enum value: SOURCE_SCREENSHARE = 3; - */ - SOURCE_SCREENSHARE = 3, - - /** - * @generated from enum value: SOURCE_SCREENSHARE_AUDIO = 4; - */ - SOURCE_SCREENSHARE_AUDIO = 4, -} -// Retrieve enum metadata with: proto3.getEnumType(TrackSource) -proto3.util.setEnumType(TrackSource, "livekit.proto.TrackSource", [ - { no: 0, name: "SOURCE_UNKNOWN" }, - { no: 1, name: "SOURCE_CAMERA" }, - { no: 2, name: "SOURCE_MICROPHONE" }, - { no: 3, name: "SOURCE_SCREENSHARE" }, - { no: 4, name: "SOURCE_SCREENSHARE_AUDIO" }, -]); - -/** - * @generated from enum livekit.proto.StreamState - */ -export enum StreamState { - /** - * @generated from enum value: STATE_UNKNOWN = 0; - */ - STATE_UNKNOWN = 0, - - /** - * @generated from enum value: STATE_ACTIVE = 1; - */ - STATE_ACTIVE = 1, - - /** - * @generated from enum value: STATE_PAUSED = 2; - */ - STATE_PAUSED = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(StreamState) -proto3.util.setEnumType(StreamState, "livekit.proto.StreamState", [ - { no: 0, name: "STATE_UNKNOWN" }, - { no: 1, name: "STATE_ACTIVE" }, - { no: 2, name: "STATE_PAUSED" }, -]); +export const file_track: GenFile = /*@__PURE__*/ + fileDesc("Cgt0cmFjay5wcm90bxINbGl2ZWtpdC5wcm90byI+ChdDcmVhdGVWaWRlb1RyYWNrUmVxdWVzdBIMCgRuYW1lGAEgAigJEhUKDXNvdXJjZV9oYW5kbGUYAiACKAQiRAoYQ3JlYXRlVmlkZW9UcmFja1Jlc3BvbnNlEigKBXRyYWNrGAEgAigLMhkubGl2ZWtpdC5wcm90by5Pd25lZFRyYWNrIj4KF0NyZWF0ZUF1ZGlvVHJhY2tSZXF1ZXN0EgwKBG5hbWUYASACKAkSFQoNc291cmNlX2hhbmRsZRgCIAIoBCJEChhDcmVhdGVBdWRpb1RyYWNrUmVzcG9uc2USKAoFdHJhY2sYASACKAsyGS5saXZla2l0LnByb3RvLk93bmVkVHJhY2siJwoPR2V0U3RhdHNSZXF1ZXN0EhQKDHRyYWNrX2hhbmRsZRgBIAIoBCIkChBHZXRTdGF0c1Jlc3BvbnNlEhAKCGFzeW5jX2lkGAEgAigEIlsKEEdldFN0YXRzQ2FsbGJhY2sSEAoIYXN5bmNfaWQYASACKAQSDQoFZXJyb3IYAiABKAkSJgoFc3RhdHMYAyADKAsyFy5saXZla2l0LnByb3RvLlJ0Y1N0YXRzIgwKClRyYWNrRXZlbnQiowIKFFRyYWNrUHVibGljYXRpb25JbmZvEgsKA3NpZBgBIAIoCRIMCgRuYW1lGAIgAigJEiYKBGtpbmQYAyACKA4yGC5saXZla2l0LnByb3RvLlRyYWNrS2luZBIqCgZzb3VyY2UYBCACKA4yGi5saXZla2l0LnByb3RvLlRyYWNrU291cmNlEhMKC3NpbXVsY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1NvdXJjZRISCg5TT1VSQ0VfVU5LTk9XThAAEhEKDVNPVVJDRV9DQU1FUkEQARIVChFTT1VSQ0VfTUlDUk9QSE9ORRACEhYKElNPVVJDRV9TQ1JFRU5TSEFSRRADEhwKGFNPVVJDRV9TQ1JFRU5TSEFSRV9BVURJTxAEKkQKC1N0cmVhbVN0YXRlEhEKDVNUQVRFX1VOS05PV04QABIQCgxTVEFURV9BQ1RJVkUQARIQCgxTVEFURV9QQVVTRUQQAkIQqgINTGl2ZUtpdC5Qcm90bw", [file_e2ee, file_handle, file_stats]); /** * Create a new VideoTrack from a VideoSource * * @generated from message livekit.proto.CreateVideoTrackRequest */ -export class CreateVideoTrackRequest extends Message { +export type CreateVideoTrackRequest = Message<"livekit.proto.CreateVideoTrackRequest"> & { /** - * @generated from field: string name = 1; + * @generated from field: required string name = 1; */ - name = ""; + name: string; /** - * @generated from field: uint64 source_handle = 2; + * @generated from field: required uint64 source_handle = 2; */ - sourceHandle = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.CreateVideoTrackRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "source_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); + sourceHandle: bigint; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): CreateVideoTrackRequest { - return new CreateVideoTrackRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateVideoTrackRequest { - return new CreateVideoTrackRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateVideoTrackRequest { - return new CreateVideoTrackRequest().fromJsonString(jsonString, options); - } - - static equals(a: CreateVideoTrackRequest | PlainMessage | undefined, b: CreateVideoTrackRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateVideoTrackRequest, a, b); - } -} +/** + * Describes the message livekit.proto.CreateVideoTrackRequest. + * Use `create(CreateVideoTrackRequestSchema)` to create a new message. + */ +export const CreateVideoTrackRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_track, 0); /** * @generated from message livekit.proto.CreateVideoTrackResponse */ -export class CreateVideoTrackResponse extends Message { +export type CreateVideoTrackResponse = Message<"livekit.proto.CreateVideoTrackResponse"> & { /** - * @generated from field: livekit.proto.OwnedTrack track = 1; + * @generated from field: required livekit.proto.OwnedTrack track = 1; */ track?: OwnedTrack; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.CreateVideoTrackResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "track", kind: "message", T: OwnedTrack }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateVideoTrackResponse { - return new CreateVideoTrackResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateVideoTrackResponse { - return new CreateVideoTrackResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateVideoTrackResponse { - return new CreateVideoTrackResponse().fromJsonString(jsonString, options); - } - - static equals(a: CreateVideoTrackResponse | PlainMessage | undefined, b: CreateVideoTrackResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateVideoTrackResponse, a, b); - } -} +/** + * Describes the message livekit.proto.CreateVideoTrackResponse. + * Use `create(CreateVideoTrackResponseSchema)` to create a new message. + */ +export const CreateVideoTrackResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_track, 1); /** * Create a new AudioTrack from a AudioSource * * @generated from message livekit.proto.CreateAudioTrackRequest */ -export class CreateAudioTrackRequest extends Message { +export type CreateAudioTrackRequest = Message<"livekit.proto.CreateAudioTrackRequest"> & { /** - * @generated from field: string name = 1; + * @generated from field: required string name = 1; */ - name = ""; + name: string; /** - * @generated from field: uint64 source_handle = 2; + * @generated from field: required uint64 source_handle = 2; */ - sourceHandle = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + sourceHandle: bigint; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.CreateAudioTrackRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "source_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateAudioTrackRequest { - return new CreateAudioTrackRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateAudioTrackRequest { - return new CreateAudioTrackRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateAudioTrackRequest { - return new CreateAudioTrackRequest().fromJsonString(jsonString, options); - } - - static equals(a: CreateAudioTrackRequest | PlainMessage | undefined, b: CreateAudioTrackRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateAudioTrackRequest, a, b); - } -} +/** + * Describes the message livekit.proto.CreateAudioTrackRequest. + * Use `create(CreateAudioTrackRequestSchema)` to create a new message. + */ +export const CreateAudioTrackRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_track, 2); /** * @generated from message livekit.proto.CreateAudioTrackResponse */ -export class CreateAudioTrackResponse extends Message { +export type CreateAudioTrackResponse = Message<"livekit.proto.CreateAudioTrackResponse"> & { /** - * @generated from field: livekit.proto.OwnedTrack track = 1; + * @generated from field: required livekit.proto.OwnedTrack track = 1; */ track?: OwnedTrack; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.CreateAudioTrackResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "track", kind: "message", T: OwnedTrack }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateAudioTrackResponse { - return new CreateAudioTrackResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateAudioTrackResponse { - return new CreateAudioTrackResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateAudioTrackResponse { - return new CreateAudioTrackResponse().fromJsonString(jsonString, options); - } - - static equals(a: CreateAudioTrackResponse | PlainMessage | undefined, b: CreateAudioTrackResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateAudioTrackResponse, a, b); - } -} +/** + * Describes the message livekit.proto.CreateAudioTrackResponse. + * Use `create(CreateAudioTrackResponseSchema)` to create a new message. + */ +export const CreateAudioTrackResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_track, 3); /** * @generated from message livekit.proto.GetStatsRequest */ -export class GetStatsRequest extends Message { +export type GetStatsRequest = Message<"livekit.proto.GetStatsRequest"> & { /** - * @generated from field: uint64 track_handle = 1; + * @generated from field: required uint64 track_handle = 1; */ - trackHandle = protoInt64.zero; + trackHandle: bigint; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.GetStatsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetStatsRequest { - return new GetStatsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetStatsRequest { - return new GetStatsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetStatsRequest { - return new GetStatsRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetStatsRequest | PlainMessage | undefined, b: GetStatsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetStatsRequest, a, b); - } -} +/** + * Describes the message livekit.proto.GetStatsRequest. + * Use `create(GetStatsRequestSchema)` to create a new message. + */ +export const GetStatsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_track, 4); /** * @generated from message livekit.proto.GetStatsResponse */ -export class GetStatsResponse extends Message { +export type GetStatsResponse = Message<"livekit.proto.GetStatsResponse"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.GetStatsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetStatsResponse { - return new GetStatsResponse().fromBinary(bytes, options); - } + asyncId: bigint; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetStatsResponse { - return new GetStatsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetStatsResponse { - return new GetStatsResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetStatsResponse | PlainMessage | undefined, b: GetStatsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetStatsResponse, a, b); - } -} +/** + * Describes the message livekit.proto.GetStatsResponse. + * Use `create(GetStatsResponseSchema)` to create a new message. + */ +export const GetStatsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_track, 5); /** * @generated from message livekit.proto.GetStatsCallback */ -export class GetStatsCallback extends Message { +export type GetStatsCallback = Message<"livekit.proto.GetStatsCallback"> & { /** - * @generated from field: uint64 async_id = 1; + * @generated from field: required uint64 async_id = 1; */ - asyncId = protoInt64.zero; + asyncId: bigint; /** * @generated from field: optional string error = 2; */ - error?: string; + error: string; /** * @generated from field: repeated livekit.proto.RtcStats stats = 3; */ - stats: RtcStats[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.GetStatsCallback"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "stats", kind: "message", T: RtcStats, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetStatsCallback { - return new GetStatsCallback().fromBinary(bytes, options); - } + stats: RtcStats[]; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetStatsCallback { - return new GetStatsCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetStatsCallback { - return new GetStatsCallback().fromJsonString(jsonString, options); - } - - static equals(a: GetStatsCallback | PlainMessage | undefined, b: GetStatsCallback | PlainMessage | undefined): boolean { - return proto3.util.equals(GetStatsCallback, a, b); - } -} +/** + * Describes the message livekit.proto.GetStatsCallback. + * Use `create(GetStatsCallbackSchema)` to create a new message. + */ +export const GetStatsCallbackSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_track, 6); /** * @generated from message livekit.proto.TrackEvent */ -export class TrackEvent extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.TrackEvent"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TrackEvent { - return new TrackEvent().fromBinary(bytes, options); - } +export type TrackEvent = Message<"livekit.proto.TrackEvent"> & { +}; - static fromJson(jsonValue: JsonValue, options?: Partial): TrackEvent { - return new TrackEvent().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TrackEvent { - return new TrackEvent().fromJsonString(jsonString, options); - } - - static equals(a: TrackEvent | PlainMessage | undefined, b: TrackEvent | PlainMessage | undefined): boolean { - return proto3.util.equals(TrackEvent, a, b); - } -} +/** + * Describes the message livekit.proto.TrackEvent. + * Use `create(TrackEventSchema)` to create a new message. + */ +export const TrackEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_track, 7); /** * @generated from message livekit.proto.TrackPublicationInfo */ -export class TrackPublicationInfo extends Message { +export type TrackPublicationInfo = Message<"livekit.proto.TrackPublicationInfo"> & { /** - * @generated from field: string sid = 1; + * @generated from field: required string sid = 1; */ - sid = ""; + sid: string; /** - * @generated from field: string name = 2; + * @generated from field: required string name = 2; */ - name = ""; + name: string; /** - * @generated from field: livekit.proto.TrackKind kind = 3; + * @generated from field: required livekit.proto.TrackKind kind = 3; */ - kind = TrackKind.KIND_UNKNOWN; + kind: TrackKind; /** - * @generated from field: livekit.proto.TrackSource source = 4; + * @generated from field: required livekit.proto.TrackSource source = 4; */ - source = TrackSource.SOURCE_UNKNOWN; + source: TrackSource; /** - * @generated from field: bool simulcasted = 5; + * @generated from field: required bool simulcasted = 5; */ - simulcasted = false; + simulcasted: boolean; /** - * @generated from field: uint32 width = 6; + * @generated from field: required uint32 width = 6; */ - width = 0; + width: number; /** - * @generated from field: uint32 height = 7; + * @generated from field: required uint32 height = 7; */ - height = 0; + height: number; /** - * @generated from field: string mime_type = 8; + * @generated from field: required string mime_type = 8; */ - mimeType = ""; + mimeType: string; /** - * @generated from field: bool muted = 9; + * @generated from field: required bool muted = 9; */ - muted = false; + muted: boolean; /** - * @generated from field: bool remote = 10; + * @generated from field: required bool remote = 10; */ - remote = false; + remote: boolean; /** - * @generated from field: livekit.proto.EncryptionType encryption_type = 11; + * @generated from field: required livekit.proto.EncryptionType encryption_type = 11; */ - encryptionType = EncryptionType.NONE; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.TrackPublicationInfo"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "kind", kind: "enum", T: proto3.getEnumType(TrackKind) }, - { no: 4, name: "source", kind: "enum", T: proto3.getEnumType(TrackSource) }, - { no: 5, name: "simulcasted", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 6, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 7, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 8, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 9, name: "muted", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 10, name: "remote", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 11, name: "encryption_type", kind: "enum", T: proto3.getEnumType(EncryptionType) }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TrackPublicationInfo { - return new TrackPublicationInfo().fromBinary(bytes, options); - } + encryptionType: EncryptionType; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): TrackPublicationInfo { - return new TrackPublicationInfo().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TrackPublicationInfo { - return new TrackPublicationInfo().fromJsonString(jsonString, options); - } - - static equals(a: TrackPublicationInfo | PlainMessage | undefined, b: TrackPublicationInfo | PlainMessage | undefined): boolean { - return proto3.util.equals(TrackPublicationInfo, a, b); - } -} +/** + * Describes the message livekit.proto.TrackPublicationInfo. + * Use `create(TrackPublicationInfoSchema)` to create a new message. + */ +export const TrackPublicationInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_track, 8); /** * @generated from message livekit.proto.OwnedTrackPublication */ -export class OwnedTrackPublication extends Message { +export type OwnedTrackPublication = Message<"livekit.proto.OwnedTrackPublication"> & { /** - * @generated from field: livekit.proto.FfiOwnedHandle handle = 1; + * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; */ handle?: FfiOwnedHandle; /** - * @generated from field: livekit.proto.TrackPublicationInfo info = 2; + * @generated from field: required livekit.proto.TrackPublicationInfo info = 2; */ info?: TrackPublicationInfo; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.OwnedTrackPublication"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle }, - { no: 2, name: "info", kind: "message", T: TrackPublicationInfo }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OwnedTrackPublication { - return new OwnedTrackPublication().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OwnedTrackPublication { - return new OwnedTrackPublication().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OwnedTrackPublication { - return new OwnedTrackPublication().fromJsonString(jsonString, options); - } - - static equals(a: OwnedTrackPublication | PlainMessage | undefined, b: OwnedTrackPublication | PlainMessage | undefined): boolean { - return proto3.util.equals(OwnedTrackPublication, a, b); - } -} +/** + * Describes the message livekit.proto.OwnedTrackPublication. + * Use `create(OwnedTrackPublicationSchema)` to create a new message. + */ +export const OwnedTrackPublicationSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_track, 9); /** * @generated from message livekit.proto.TrackInfo */ -export class TrackInfo extends Message { +export type TrackInfo = Message<"livekit.proto.TrackInfo"> & { /** - * @generated from field: string sid = 1; + * @generated from field: required string sid = 1; */ - sid = ""; + sid: string; /** - * @generated from field: string name = 2; + * @generated from field: required string name = 2; */ - name = ""; + name: string; /** - * @generated from field: livekit.proto.TrackKind kind = 3; + * @generated from field: required livekit.proto.TrackKind kind = 3; */ - kind = TrackKind.KIND_UNKNOWN; + kind: TrackKind; /** - * @generated from field: livekit.proto.StreamState stream_state = 4; + * @generated from field: required livekit.proto.StreamState stream_state = 4; */ - streamState = StreamState.STATE_UNKNOWN; + streamState: StreamState; /** - * @generated from field: bool muted = 5; + * @generated from field: required bool muted = 5; */ - muted = false; + muted: boolean; /** - * @generated from field: bool remote = 6; + * @generated from field: required bool remote = 6; */ - remote = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.TrackInfo"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "kind", kind: "enum", T: proto3.getEnumType(TrackKind) }, - { no: 4, name: "stream_state", kind: "enum", T: proto3.getEnumType(StreamState) }, - { no: 5, name: "muted", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 6, name: "remote", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TrackInfo { - return new TrackInfo().fromBinary(bytes, options); - } + remote: boolean; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): TrackInfo { - return new TrackInfo().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TrackInfo { - return new TrackInfo().fromJsonString(jsonString, options); - } - - static equals(a: TrackInfo | PlainMessage | undefined, b: TrackInfo | PlainMessage | undefined): boolean { - return proto3.util.equals(TrackInfo, a, b); - } -} +/** + * Describes the message livekit.proto.TrackInfo. + * Use `create(TrackInfoSchema)` to create a new message. + */ +export const TrackInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_track, 10); /** * @generated from message livekit.proto.OwnedTrack */ -export class OwnedTrack extends Message { +export type OwnedTrack = Message<"livekit.proto.OwnedTrack"> & { /** - * @generated from field: livekit.proto.FfiOwnedHandle handle = 1; + * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; */ handle?: FfiOwnedHandle; /** - * @generated from field: livekit.proto.TrackInfo info = 2; + * @generated from field: required livekit.proto.TrackInfo info = 2; */ info?: TrackInfo; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.OwnedTrack"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle }, - { no: 2, name: "info", kind: "message", T: TrackInfo }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OwnedTrack { - return new OwnedTrack().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OwnedTrack { - return new OwnedTrack().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OwnedTrack { - return new OwnedTrack().fromJsonString(jsonString, options); - } - - static equals(a: OwnedTrack | PlainMessage | undefined, b: OwnedTrack | PlainMessage | undefined): boolean { - return proto3.util.equals(OwnedTrack, a, b); - } -} +/** + * Describes the message livekit.proto.OwnedTrack. + * Use `create(OwnedTrackSchema)` to create a new message. + */ +export const OwnedTrackSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_track, 11); /** * Mute/UnMute a track * * @generated from message livekit.proto.LocalTrackMuteRequest */ -export class LocalTrackMuteRequest extends Message { +export type LocalTrackMuteRequest = Message<"livekit.proto.LocalTrackMuteRequest"> & { /** - * @generated from field: uint64 track_handle = 1; + * @generated from field: required uint64 track_handle = 1; */ - trackHandle = protoInt64.zero; + trackHandle: bigint; /** - * @generated from field: bool mute = 2; + * @generated from field: required bool mute = 2; */ - mute = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.LocalTrackMuteRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "mute", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): LocalTrackMuteRequest { - return new LocalTrackMuteRequest().fromBinary(bytes, options); - } + mute: boolean; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): LocalTrackMuteRequest { - return new LocalTrackMuteRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): LocalTrackMuteRequest { - return new LocalTrackMuteRequest().fromJsonString(jsonString, options); - } - - static equals(a: LocalTrackMuteRequest | PlainMessage | undefined, b: LocalTrackMuteRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(LocalTrackMuteRequest, a, b); - } -} +/** + * Describes the message livekit.proto.LocalTrackMuteRequest. + * Use `create(LocalTrackMuteRequestSchema)` to create a new message. + */ +export const LocalTrackMuteRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_track, 12); /** * @generated from message livekit.proto.LocalTrackMuteResponse */ -export class LocalTrackMuteResponse extends Message { +export type LocalTrackMuteResponse = Message<"livekit.proto.LocalTrackMuteResponse"> & { /** - * @generated from field: bool muted = 1; + * @generated from field: required bool muted = 1; */ - muted = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.LocalTrackMuteResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "muted", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): LocalTrackMuteResponse { - return new LocalTrackMuteResponse().fromBinary(bytes, options); - } + muted: boolean; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): LocalTrackMuteResponse { - return new LocalTrackMuteResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): LocalTrackMuteResponse { - return new LocalTrackMuteResponse().fromJsonString(jsonString, options); - } - - static equals(a: LocalTrackMuteResponse | PlainMessage | undefined, b: LocalTrackMuteResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(LocalTrackMuteResponse, a, b); - } -} +/** + * Describes the message livekit.proto.LocalTrackMuteResponse. + * Use `create(LocalTrackMuteResponseSchema)` to create a new message. + */ +export const LocalTrackMuteResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_track, 13); /** * Enable/Disable a remote track * * @generated from message livekit.proto.EnableRemoteTrackRequest */ -export class EnableRemoteTrackRequest extends Message { +export type EnableRemoteTrackRequest = Message<"livekit.proto.EnableRemoteTrackRequest"> & { /** - * @generated from field: uint64 track_handle = 1; + * @generated from field: required uint64 track_handle = 1; */ - trackHandle = protoInt64.zero; + trackHandle: bigint; /** - * @generated from field: bool enabled = 2; + * @generated from field: required bool enabled = 2; */ - enabled = false; + enabled: boolean; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +/** + * Describes the message livekit.proto.EnableRemoteTrackRequest. + * Use `create(EnableRemoteTrackRequestSchema)` to create a new message. + */ +export const EnableRemoteTrackRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_track, 14); - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.EnableRemoteTrackRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); +/** + * @generated from message livekit.proto.EnableRemoteTrackResponse + */ +export type EnableRemoteTrackResponse = Message<"livekit.proto.EnableRemoteTrackResponse"> & { + /** + * @generated from field: required bool enabled = 1; + */ + enabled: boolean; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): EnableRemoteTrackRequest { - return new EnableRemoteTrackRequest().fromBinary(bytes, options); - } +/** + * Describes the message livekit.proto.EnableRemoteTrackResponse. + * Use `create(EnableRemoteTrackResponseSchema)` to create a new message. + */ +export const EnableRemoteTrackResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_track, 15); - static fromJson(jsonValue: JsonValue, options?: Partial): EnableRemoteTrackRequest { - return new EnableRemoteTrackRequest().fromJson(jsonValue, options); - } +/** + * @generated from enum livekit.proto.TrackKind + */ +export enum TrackKind { + /** + * @generated from enum value: KIND_UNKNOWN = 0; + */ + KIND_UNKNOWN = 0, - static fromJsonString(jsonString: string, options?: Partial): EnableRemoteTrackRequest { - return new EnableRemoteTrackRequest().fromJsonString(jsonString, options); - } + /** + * @generated from enum value: KIND_AUDIO = 1; + */ + KIND_AUDIO = 1, - static equals(a: EnableRemoteTrackRequest | PlainMessage | undefined, b: EnableRemoteTrackRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(EnableRemoteTrackRequest, a, b); - } + /** + * @generated from enum value: KIND_VIDEO = 2; + */ + KIND_VIDEO = 2, } /** - * @generated from message livekit.proto.EnableRemoteTrackResponse + * Describes the enum livekit.proto.TrackKind. + */ +export const TrackKindSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_track, 0); + +/** + * @generated from enum livekit.proto.TrackSource */ -export class EnableRemoteTrackResponse extends Message { +export enum TrackSource { /** - * @generated from field: bool enabled = 1; + * @generated from enum value: SOURCE_UNKNOWN = 0; */ - enabled = false; + SOURCE_UNKNOWN = 0, + + /** + * @generated from enum value: SOURCE_CAMERA = 1; + */ + SOURCE_CAMERA = 1, + + /** + * @generated from enum value: SOURCE_MICROPHONE = 2; + */ + SOURCE_MICROPHONE = 2, - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + /** + * @generated from enum value: SOURCE_SCREENSHARE = 3; + */ + SOURCE_SCREENSHARE = 3, - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.EnableRemoteTrackResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); + /** + * @generated from enum value: SOURCE_SCREENSHARE_AUDIO = 4; + */ + SOURCE_SCREENSHARE_AUDIO = 4, +} - static fromBinary(bytes: Uint8Array, options?: Partial): EnableRemoteTrackResponse { - return new EnableRemoteTrackResponse().fromBinary(bytes, options); - } +/** + * Describes the enum livekit.proto.TrackSource. + */ +export const TrackSourceSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_track, 1); - static fromJson(jsonValue: JsonValue, options?: Partial): EnableRemoteTrackResponse { - return new EnableRemoteTrackResponse().fromJson(jsonValue, options); - } +/** + * @generated from enum livekit.proto.StreamState + */ +export enum StreamState { + /** + * @generated from enum value: STATE_UNKNOWN = 0; + */ + STATE_UNKNOWN = 0, - static fromJsonString(jsonString: string, options?: Partial): EnableRemoteTrackResponse { - return new EnableRemoteTrackResponse().fromJsonString(jsonString, options); - } + /** + * @generated from enum value: STATE_ACTIVE = 1; + */ + STATE_ACTIVE = 1, - static equals(a: EnableRemoteTrackResponse | PlainMessage | undefined, b: EnableRemoteTrackResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(EnableRemoteTrackResponse, a, b); - } + /** + * @generated from enum value: STATE_PAUSED = 2; + */ + STATE_PAUSED = 2, } +/** + * Describes the enum livekit.proto.StreamState. + */ +export const StreamStateSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_track, 2); + diff --git a/packages/livekit-rtc/src/proto/video_frame_pb.ts b/packages/livekit-rtc/src/proto/video_frame_pb.ts index 4727a87b..a6d9dd39 100644 --- a/packages/livekit-rtc/src/proto/video_frame_pb.ts +++ b/packages/livekit-rtc/src/proto/video_frame_pb.ts @@ -12,193 +12,23 @@ // 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" -// @generated from file video_frame.proto (package livekit.proto, syntax proto3) +// @generated by protoc-gen-es v2.2.0 with parameter "target=ts" +// @generated from file video_frame.proto (package livekit.proto, syntax proto2) /* eslint-disable */ -// @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; -import { TrackSource } from "./track_pb.js"; -import { FfiOwnedHandle } from "./handle_pb.js"; +import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { FfiOwnedHandle } from "./handle_pb"; +import { file_handle } from "./handle_pb"; +import type { TrackSource } from "./track_pb"; +import { file_track } from "./track_pb"; +import type { Message } from "@bufbuild/protobuf"; /** - * @generated from enum livekit.proto.VideoCodec - */ -export enum VideoCodec { - /** - * @generated from enum value: VP8 = 0; - */ - VP8 = 0, - - /** - * @generated from enum value: H264 = 1; - */ - H264 = 1, - - /** - * @generated from enum value: AV1 = 2; - */ - AV1 = 2, - - /** - * @generated from enum value: VP9 = 3; - */ - VP9 = 3, -} -// Retrieve enum metadata with: proto3.getEnumType(VideoCodec) -proto3.util.setEnumType(VideoCodec, "livekit.proto.VideoCodec", [ - { no: 0, name: "VP8" }, - { no: 1, name: "H264" }, - { no: 2, name: "AV1" }, - { no: 3, name: "VP9" }, -]); - -/** - * @generated from enum livekit.proto.VideoRotation + * Describes the file video_frame.proto. */ -export enum VideoRotation { - /** - * @generated from enum value: VIDEO_ROTATION_0 = 0; - */ - VIDEO_ROTATION_0 = 0, - - /** - * @generated from enum value: VIDEO_ROTATION_90 = 1; - */ - VIDEO_ROTATION_90 = 1, - - /** - * @generated from enum value: VIDEO_ROTATION_180 = 2; - */ - VIDEO_ROTATION_180 = 2, - - /** - * @generated from enum value: VIDEO_ROTATION_270 = 3; - */ - VIDEO_ROTATION_270 = 3, -} -// Retrieve enum metadata with: proto3.getEnumType(VideoRotation) -proto3.util.setEnumType(VideoRotation, "livekit.proto.VideoRotation", [ - { no: 0, name: "VIDEO_ROTATION_0" }, - { no: 1, name: "VIDEO_ROTATION_90" }, - { no: 2, name: "VIDEO_ROTATION_180" }, - { no: 3, name: "VIDEO_ROTATION_270" }, -]); - -/** - * @generated from enum livekit.proto.VideoBufferType - */ -export enum VideoBufferType { - /** - * @generated from enum value: RGBA = 0; - */ - RGBA = 0, - - /** - * @generated from enum value: ABGR = 1; - */ - ABGR = 1, - - /** - * @generated from enum value: ARGB = 2; - */ - ARGB = 2, - - /** - * @generated from enum value: BGRA = 3; - */ - BGRA = 3, - - /** - * @generated from enum value: RGB24 = 4; - */ - RGB24 = 4, - - /** - * @generated from enum value: I420 = 5; - */ - I420 = 5, - - /** - * @generated from enum value: I420A = 6; - */ - I420A = 6, - - /** - * @generated from enum value: I422 = 7; - */ - I422 = 7, - - /** - * @generated from enum value: I444 = 8; - */ - I444 = 8, - - /** - * @generated from enum value: I010 = 9; - */ - I010 = 9, - - /** - * @generated from enum value: NV12 = 10; - */ - NV12 = 10, -} -// Retrieve enum metadata with: proto3.getEnumType(VideoBufferType) -proto3.util.setEnumType(VideoBufferType, "livekit.proto.VideoBufferType", [ - { no: 0, name: "RGBA" }, - { no: 1, name: "ABGR" }, - { no: 2, name: "ARGB" }, - { no: 3, name: "BGRA" }, - { no: 4, name: "RGB24" }, - { no: 5, name: "I420" }, - { no: 6, name: "I420A" }, - { no: 7, name: "I422" }, - { no: 8, name: "I444" }, - { no: 9, name: "I010" }, - { no: 10, name: "NV12" }, -]); - -/** - * @generated from enum livekit.proto.VideoStreamType - */ -export enum VideoStreamType { - /** - * @generated from enum value: VIDEO_STREAM_NATIVE = 0; - */ - VIDEO_STREAM_NATIVE = 0, - - /** - * @generated from enum value: VIDEO_STREAM_WEBGL = 1; - */ - VIDEO_STREAM_WEBGL = 1, - - /** - * @generated from enum value: VIDEO_STREAM_HTML = 2; - */ - VIDEO_STREAM_HTML = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(VideoStreamType) -proto3.util.setEnumType(VideoStreamType, "livekit.proto.VideoStreamType", [ - { no: 0, name: "VIDEO_STREAM_NATIVE" }, - { no: 1, name: "VIDEO_STREAM_WEBGL" }, - { no: 2, name: "VIDEO_STREAM_HTML" }, -]); - -/** - * @generated from enum livekit.proto.VideoSourceType - */ -export enum VideoSourceType { - /** - * @generated from enum value: VIDEO_SOURCE_NATIVE = 0; - */ - VIDEO_SOURCE_NATIVE = 0, -} -// Retrieve enum metadata with: proto3.getEnumType(VideoSourceType) -proto3.util.setEnumType(VideoSourceType, "livekit.proto.VideoSourceType", [ -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lPd25lZEhhbmRsZRIsCgRpbmZvGAIgAigLMh4ubGl2ZWtpdC5wcm90by5WaWRlb1NvdXJjZUluZm8qMQoKVmlkZW9Db2RlYxIHCgNWUDgQABIICgRIMjY0EAESBwoDQVYxEAISBwoDVlA5EAMqbAoNVmlkZW9Sb3RhdGlvbhIUChBWSURFT19ST1RBVElPTl8wEAASFQoRVklERU9fUk9UQVRJT05fOTAQARIWChJWSURFT19ST1RBVElPTl8xODAQAhIWChJWSURFT19ST1RBVElPTl8yNzAQAyqBAQoPVmlkZW9CdWZmZXJUeXBlEggKBFJHQkEQABIICgRBQkdSEAESCAoEQVJHQhACEggKBEJHUkEQAxIJCgVSR0IyNBAEEggKBEk0MjAQBRIJCgVJNDIwQRAGEggKBEk0MjIQBxIICgRJNDQ0EAgSCAoESTAxMBAJEggKBE5WMTIQCipZCg9WaWRlb1N0cmVhbVR5cGUSFwoTVklERU9fU1RSRUFNX05BVElWRRAAEhYKElZJREVPX1NUUkVBTV9XRUJHTBABEhUKEVZJREVPX1NUUkVBTV9IVE1MEAIqKgoPVmlkZW9Tb3VyY2VUeXBlEhcKE1ZJREVPX1NPVVJDRV9OQVRJVkUQAEIQqgINTGl2ZUtpdC5Qcm90bw", [file_handle, file_track]); /** * Create a new VideoStream @@ -206,198 +36,111 @@ proto3.util.setEnumType(VideoSourceType, "livekit.proto.VideoSourceType", [ * * @generated from message livekit.proto.NewVideoStreamRequest */ -export class NewVideoStreamRequest extends Message { +export type NewVideoStreamRequest = Message<"livekit.proto.NewVideoStreamRequest"> & { /** - * @generated from field: uint64 track_handle = 1; + * @generated from field: required uint64 track_handle = 1; */ - trackHandle = protoInt64.zero; + trackHandle: bigint; /** - * @generated from field: livekit.proto.VideoStreamType type = 2; + * @generated from field: required livekit.proto.VideoStreamType type = 2; */ - type = VideoStreamType.VIDEO_STREAM_NATIVE; + type: VideoStreamType; /** * Get the frame on a specific format * * @generated from field: optional livekit.proto.VideoBufferType format = 3; */ - format?: VideoBufferType; + format: VideoBufferType; /** * if true, stride will be set to width/chroma_width * - * @generated from field: bool normalize_stride = 4; - */ - normalizeStride = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.NewVideoStreamRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "type", kind: "enum", T: proto3.getEnumType(VideoStreamType) }, - { no: 3, name: "format", kind: "enum", T: proto3.getEnumType(VideoBufferType), opt: true }, - { no: 4, name: "normalize_stride", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NewVideoStreamRequest { - return new NewVideoStreamRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NewVideoStreamRequest { - return new NewVideoStreamRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): NewVideoStreamRequest { - return new NewVideoStreamRequest().fromJsonString(jsonString, options); - } - - static equals(a: NewVideoStreamRequest | PlainMessage | undefined, b: NewVideoStreamRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(NewVideoStreamRequest, a, b); - } -} + * @generated from field: required bool normalize_stride = 4; + */ + normalizeStride: boolean; +}; + +/** + * Describes the message livekit.proto.NewVideoStreamRequest. + * Use `create(NewVideoStreamRequestSchema)` to create a new message. + */ +export const NewVideoStreamRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 0); /** * @generated from message livekit.proto.NewVideoStreamResponse */ -export class NewVideoStreamResponse extends Message { +export type NewVideoStreamResponse = Message<"livekit.proto.NewVideoStreamResponse"> & { /** - * @generated from field: livekit.proto.OwnedVideoStream stream = 1; + * @generated from field: required livekit.proto.OwnedVideoStream stream = 1; */ stream?: OwnedVideoStream; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.NewVideoStreamResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "stream", kind: "message", T: OwnedVideoStream }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NewVideoStreamResponse { - return new NewVideoStreamResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NewVideoStreamResponse { - return new NewVideoStreamResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): NewVideoStreamResponse { - return new NewVideoStreamResponse().fromJsonString(jsonString, options); - } - - static equals(a: NewVideoStreamResponse | PlainMessage | undefined, b: NewVideoStreamResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(NewVideoStreamResponse, a, b); - } -} +/** + * Describes the message livekit.proto.NewVideoStreamResponse. + * Use `create(NewVideoStreamResponseSchema)` to create a new message. + */ +export const NewVideoStreamResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 1); /** * Request a video stream from a participant * * @generated from message livekit.proto.VideoStreamFromParticipantRequest */ -export class VideoStreamFromParticipantRequest extends Message { +export type VideoStreamFromParticipantRequest = Message<"livekit.proto.VideoStreamFromParticipantRequest"> & { /** - * @generated from field: uint64 participant_handle = 1; + * @generated from field: required uint64 participant_handle = 1; */ - participantHandle = protoInt64.zero; + participantHandle: bigint; /** - * @generated from field: livekit.proto.VideoStreamType type = 2; + * @generated from field: required livekit.proto.VideoStreamType type = 2; */ - type = VideoStreamType.VIDEO_STREAM_NATIVE; + type: VideoStreamType; /** - * @generated from field: livekit.proto.TrackSource track_source = 3; + * @generated from field: required livekit.proto.TrackSource track_source = 3; */ - trackSource = TrackSource.SOURCE_UNKNOWN; + trackSource: TrackSource; /** * @generated from field: optional livekit.proto.VideoBufferType format = 4; */ - format?: VideoBufferType; + format: VideoBufferType; /** - * @generated from field: bool normalize_stride = 5; + * @generated from field: required bool normalize_stride = 5; */ - normalizeStride = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.VideoStreamFromParticipantRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "type", kind: "enum", T: proto3.getEnumType(VideoStreamType) }, - { no: 3, name: "track_source", kind: "enum", T: proto3.getEnumType(TrackSource) }, - { no: 4, name: "format", kind: "enum", T: proto3.getEnumType(VideoBufferType), opt: true }, - { no: 5, name: "normalize_stride", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VideoStreamFromParticipantRequest { - return new VideoStreamFromParticipantRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): VideoStreamFromParticipantRequest { - return new VideoStreamFromParticipantRequest().fromJson(jsonValue, options); - } + normalizeStride: boolean; +}; - static fromJsonString(jsonString: string, options?: Partial): VideoStreamFromParticipantRequest { - return new VideoStreamFromParticipantRequest().fromJsonString(jsonString, options); - } - - static equals(a: VideoStreamFromParticipantRequest | PlainMessage | undefined, b: VideoStreamFromParticipantRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(VideoStreamFromParticipantRequest, a, b); - } -} +/** + * Describes the message livekit.proto.VideoStreamFromParticipantRequest. + * Use `create(VideoStreamFromParticipantRequestSchema)` to create a new message. + */ +export const VideoStreamFromParticipantRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 2); /** * @generated from message livekit.proto.VideoStreamFromParticipantResponse */ -export class VideoStreamFromParticipantResponse extends Message { +export type VideoStreamFromParticipantResponse = Message<"livekit.proto.VideoStreamFromParticipantResponse"> & { /** - * @generated from field: livekit.proto.OwnedVideoStream stream = 1; + * @generated from field: required livekit.proto.OwnedVideoStream stream = 1; */ stream?: OwnedVideoStream; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.VideoStreamFromParticipantResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "stream", kind: "message", T: OwnedVideoStream }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VideoStreamFromParticipantResponse { - return new VideoStreamFromParticipantResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): VideoStreamFromParticipantResponse { - return new VideoStreamFromParticipantResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): VideoStreamFromParticipantResponse { - return new VideoStreamFromParticipantResponse().fromJsonString(jsonString, options); - } - - static equals(a: VideoStreamFromParticipantResponse | PlainMessage | undefined, b: VideoStreamFromParticipantResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(VideoStreamFromParticipantResponse, a, b); - } -} +/** + * Describes the message livekit.proto.VideoStreamFromParticipantResponse. + * Use `create(VideoStreamFromParticipantResponseSchema)` to create a new message. + */ +export const VideoStreamFromParticipantResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 3); /** * Create a new VideoSource @@ -405,566 +148,317 @@ export class VideoStreamFromParticipantResponse extends Message { +export type NewVideoSourceRequest = Message<"livekit.proto.NewVideoSourceRequest"> & { /** - * @generated from field: livekit.proto.VideoSourceType type = 1; + * @generated from field: required livekit.proto.VideoSourceType type = 1; */ - type = VideoSourceType.VIDEO_SOURCE_NATIVE; + type: VideoSourceType; /** * Used to determine which encodings to use + simulcast layers * Most of the time it corresponds to the source resolution * - * @generated from field: livekit.proto.VideoSourceResolution resolution = 2; + * @generated from field: required livekit.proto.VideoSourceResolution resolution = 2; */ resolution?: VideoSourceResolution; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.NewVideoSourceRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(VideoSourceType) }, - { no: 2, name: "resolution", kind: "message", T: VideoSourceResolution }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NewVideoSourceRequest { - return new NewVideoSourceRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NewVideoSourceRequest { - return new NewVideoSourceRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): NewVideoSourceRequest { - return new NewVideoSourceRequest().fromJsonString(jsonString, options); - } - - static equals(a: NewVideoSourceRequest | PlainMessage | undefined, b: NewVideoSourceRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(NewVideoSourceRequest, a, b); - } -} +/** + * Describes the message livekit.proto.NewVideoSourceRequest. + * Use `create(NewVideoSourceRequestSchema)` to create a new message. + */ +export const NewVideoSourceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 4); /** * @generated from message livekit.proto.NewVideoSourceResponse */ -export class NewVideoSourceResponse extends Message { +export type NewVideoSourceResponse = Message<"livekit.proto.NewVideoSourceResponse"> & { /** - * @generated from field: livekit.proto.OwnedVideoSource source = 1; + * @generated from field: required livekit.proto.OwnedVideoSource source = 1; */ source?: OwnedVideoSource; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.NewVideoSourceResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "source", kind: "message", T: OwnedVideoSource }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NewVideoSourceResponse { - return new NewVideoSourceResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NewVideoSourceResponse { - return new NewVideoSourceResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): NewVideoSourceResponse { - return new NewVideoSourceResponse().fromJsonString(jsonString, options); - } - - static equals(a: NewVideoSourceResponse | PlainMessage | undefined, b: NewVideoSourceResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(NewVideoSourceResponse, a, b); - } -} +/** + * Describes the message livekit.proto.NewVideoSourceResponse. + * Use `create(NewVideoSourceResponseSchema)` to create a new message. + */ +export const NewVideoSourceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 5); /** * Push a frame to a VideoSource * * @generated from message livekit.proto.CaptureVideoFrameRequest */ -export class CaptureVideoFrameRequest extends Message { +export type CaptureVideoFrameRequest = Message<"livekit.proto.CaptureVideoFrameRequest"> & { /** - * @generated from field: uint64 source_handle = 1; + * @generated from field: required uint64 source_handle = 1; */ - sourceHandle = protoInt64.zero; + sourceHandle: bigint; /** - * @generated from field: livekit.proto.VideoBufferInfo buffer = 2; + * @generated from field: required livekit.proto.VideoBufferInfo buffer = 2; */ buffer?: VideoBufferInfo; /** * In microseconds * - * @generated from field: int64 timestamp_us = 3; + * @generated from field: required int64 timestamp_us = 3; */ - timestampUs = protoInt64.zero; + timestampUs: bigint; /** - * @generated from field: livekit.proto.VideoRotation rotation = 4; + * @generated from field: required livekit.proto.VideoRotation rotation = 4; */ - rotation = VideoRotation.VIDEO_ROTATION_0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.CaptureVideoFrameRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "source_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "buffer", kind: "message", T: VideoBufferInfo }, - { no: 3, name: "timestamp_us", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 4, name: "rotation", kind: "enum", T: proto3.getEnumType(VideoRotation) }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CaptureVideoFrameRequest { - return new CaptureVideoFrameRequest().fromBinary(bytes, options); - } + rotation: VideoRotation; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): CaptureVideoFrameRequest { - return new CaptureVideoFrameRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CaptureVideoFrameRequest { - return new CaptureVideoFrameRequest().fromJsonString(jsonString, options); - } - - static equals(a: CaptureVideoFrameRequest | PlainMessage | undefined, b: CaptureVideoFrameRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CaptureVideoFrameRequest, a, b); - } -} +/** + * Describes the message livekit.proto.CaptureVideoFrameRequest. + * Use `create(CaptureVideoFrameRequestSchema)` to create a new message. + */ +export const CaptureVideoFrameRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 6); /** * @generated from message livekit.proto.CaptureVideoFrameResponse */ -export class CaptureVideoFrameResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.CaptureVideoFrameResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CaptureVideoFrameResponse { - return new CaptureVideoFrameResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CaptureVideoFrameResponse { - return new CaptureVideoFrameResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CaptureVideoFrameResponse { - return new CaptureVideoFrameResponse().fromJsonString(jsonString, options); - } - - static equals(a: CaptureVideoFrameResponse | PlainMessage | undefined, b: CaptureVideoFrameResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CaptureVideoFrameResponse, a, b); - } -} +export type CaptureVideoFrameResponse = Message<"livekit.proto.CaptureVideoFrameResponse"> & { +}; + +/** + * Describes the message livekit.proto.CaptureVideoFrameResponse. + * Use `create(CaptureVideoFrameResponseSchema)` to create a new message. + */ +export const CaptureVideoFrameResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 7); /** * @generated from message livekit.proto.VideoConvertRequest */ -export class VideoConvertRequest extends Message { +export type VideoConvertRequest = Message<"livekit.proto.VideoConvertRequest"> & { /** - * @generated from field: bool flip_y = 1; + * @generated from field: required bool flip_y = 1; */ - flipY = false; + flipY: boolean; /** - * @generated from field: livekit.proto.VideoBufferInfo buffer = 2; + * @generated from field: required livekit.proto.VideoBufferInfo buffer = 2; */ buffer?: VideoBufferInfo; /** - * @generated from field: livekit.proto.VideoBufferType dst_type = 3; + * @generated from field: required livekit.proto.VideoBufferType dst_type = 3; */ - dstType = VideoBufferType.RGBA; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.VideoConvertRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "flip_y", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "buffer", kind: "message", T: VideoBufferInfo }, - { no: 3, name: "dst_type", kind: "enum", T: proto3.getEnumType(VideoBufferType) }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VideoConvertRequest { - return new VideoConvertRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): VideoConvertRequest { - return new VideoConvertRequest().fromJson(jsonValue, options); - } + dstType: VideoBufferType; +}; - static fromJsonString(jsonString: string, options?: Partial): VideoConvertRequest { - return new VideoConvertRequest().fromJsonString(jsonString, options); - } - - static equals(a: VideoConvertRequest | PlainMessage | undefined, b: VideoConvertRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(VideoConvertRequest, a, b); - } -} +/** + * Describes the message livekit.proto.VideoConvertRequest. + * Use `create(VideoConvertRequestSchema)` to create a new message. + */ +export const VideoConvertRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 8); /** * @generated from message livekit.proto.VideoConvertResponse */ -export class VideoConvertResponse extends Message { - /** - * @generated from field: optional string error = 1; - */ - error?: string; - +export type VideoConvertResponse = Message<"livekit.proto.VideoConvertResponse"> & { /** - * @generated from field: livekit.proto.OwnedVideoBuffer buffer = 2; + * @generated from oneof livekit.proto.VideoConvertResponse.message */ - buffer?: OwnedVideoBuffer; + message: { + /** + * @generated from field: string error = 1; + */ + value: string; + case: "error"; + } | { + /** + * @generated from field: livekit.proto.OwnedVideoBuffer buffer = 2; + */ + value: OwnedVideoBuffer; + case: "buffer"; + } | { case: undefined; value?: undefined }; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.VideoConvertResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "buffer", kind: "message", T: OwnedVideoBuffer }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VideoConvertResponse { - return new VideoConvertResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): VideoConvertResponse { - return new VideoConvertResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): VideoConvertResponse { - return new VideoConvertResponse().fromJsonString(jsonString, options); - } - - static equals(a: VideoConvertResponse | PlainMessage | undefined, b: VideoConvertResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(VideoConvertResponse, a, b); - } -} +/** + * Describes the message livekit.proto.VideoConvertResponse. + * Use `create(VideoConvertResponseSchema)` to create a new message. + */ +export const VideoConvertResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 9); /** * @generated from message livekit.proto.VideoResolution */ -export class VideoResolution extends Message { +export type VideoResolution = Message<"livekit.proto.VideoResolution"> & { /** - * @generated from field: uint32 width = 1; + * @generated from field: required uint32 width = 1; */ - width = 0; + width: number; /** - * @generated from field: uint32 height = 2; + * @generated from field: required uint32 height = 2; */ - height = 0; + height: number; /** - * @generated from field: double frame_rate = 3; + * @generated from field: required double frame_rate = 3; */ - frameRate = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.VideoResolution"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 2, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 3, name: "frame_rate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, - ]); + frameRate: number; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): VideoResolution { - return new VideoResolution().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): VideoResolution { - return new VideoResolution().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): VideoResolution { - return new VideoResolution().fromJsonString(jsonString, options); - } - - static equals(a: VideoResolution | PlainMessage | undefined, b: VideoResolution | PlainMessage | undefined): boolean { - return proto3.util.equals(VideoResolution, a, b); - } -} +/** + * Describes the message livekit.proto.VideoResolution. + * Use `create(VideoResolutionSchema)` to create a new message. + */ +export const VideoResolutionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 10); /** * @generated from message livekit.proto.VideoBufferInfo */ -export class VideoBufferInfo extends Message { +export type VideoBufferInfo = Message<"livekit.proto.VideoBufferInfo"> & { /** - * @generated from field: livekit.proto.VideoBufferType type = 1; + * @generated from field: required livekit.proto.VideoBufferType type = 1; */ - type = VideoBufferType.RGBA; + type: VideoBufferType; /** - * @generated from field: uint32 width = 2; + * @generated from field: required uint32 width = 2; */ - width = 0; + width: number; /** - * @generated from field: uint32 height = 3; + * @generated from field: required uint32 height = 3; */ - height = 0; + height: number; /** - * @generated from field: uint64 data_ptr = 4; + * @generated from field: required uint64 data_ptr = 4; */ - dataPtr = protoInt64.zero; + dataPtr: bigint; /** * only for packed formats * - * @generated from field: uint32 stride = 6; + * @generated from field: required uint32 stride = 6; */ - stride = 0; + stride: number; /** * @generated from field: repeated livekit.proto.VideoBufferInfo.ComponentInfo components = 7; */ - components: VideoBufferInfo_ComponentInfo[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.VideoBufferInfo"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(VideoBufferType) }, - { no: 2, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 3, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 4, name: "data_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 6, name: "stride", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 7, name: "components", kind: "message", T: VideoBufferInfo_ComponentInfo, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VideoBufferInfo { - return new VideoBufferInfo().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): VideoBufferInfo { - return new VideoBufferInfo().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): VideoBufferInfo { - return new VideoBufferInfo().fromJsonString(jsonString, options); - } - - static equals(a: VideoBufferInfo | PlainMessage | undefined, b: VideoBufferInfo | PlainMessage | undefined): boolean { - return proto3.util.equals(VideoBufferInfo, a, b); - } -} + components: VideoBufferInfo_ComponentInfo[]; +}; + +/** + * Describes the message livekit.proto.VideoBufferInfo. + * Use `create(VideoBufferInfoSchema)` to create a new message. + */ +export const VideoBufferInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 11); /** * @generated from message livekit.proto.VideoBufferInfo.ComponentInfo */ -export class VideoBufferInfo_ComponentInfo extends Message { +export type VideoBufferInfo_ComponentInfo = Message<"livekit.proto.VideoBufferInfo.ComponentInfo"> & { /** - * @generated from field: uint64 data_ptr = 1; + * @generated from field: required uint64 data_ptr = 1; */ - dataPtr = protoInt64.zero; + dataPtr: bigint; /** - * @generated from field: uint32 stride = 2; + * @generated from field: required uint32 stride = 2; */ - stride = 0; + stride: number; /** - * @generated from field: uint32 size = 3; + * @generated from field: required uint32 size = 3; */ - size = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.VideoBufferInfo.ComponentInfo"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "data_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "stride", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 3, name: "size", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VideoBufferInfo_ComponentInfo { - return new VideoBufferInfo_ComponentInfo().fromBinary(bytes, options); - } + size: number; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): VideoBufferInfo_ComponentInfo { - return new VideoBufferInfo_ComponentInfo().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): VideoBufferInfo_ComponentInfo { - return new VideoBufferInfo_ComponentInfo().fromJsonString(jsonString, options); - } - - static equals(a: VideoBufferInfo_ComponentInfo | PlainMessage | undefined, b: VideoBufferInfo_ComponentInfo | PlainMessage | undefined): boolean { - return proto3.util.equals(VideoBufferInfo_ComponentInfo, a, b); - } -} +/** + * Describes the message livekit.proto.VideoBufferInfo.ComponentInfo. + * Use `create(VideoBufferInfo_ComponentInfoSchema)` to create a new message. + */ +export const VideoBufferInfo_ComponentInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 11, 0); /** * @generated from message livekit.proto.OwnedVideoBuffer */ -export class OwnedVideoBuffer extends Message { +export type OwnedVideoBuffer = Message<"livekit.proto.OwnedVideoBuffer"> & { /** - * @generated from field: livekit.proto.FfiOwnedHandle handle = 1; + * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; */ handle?: FfiOwnedHandle; /** - * @generated from field: livekit.proto.VideoBufferInfo info = 2; + * @generated from field: required livekit.proto.VideoBufferInfo info = 2; */ info?: VideoBufferInfo; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.OwnedVideoBuffer"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle }, - { no: 2, name: "info", kind: "message", T: VideoBufferInfo }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OwnedVideoBuffer { - return new OwnedVideoBuffer().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OwnedVideoBuffer { - return new OwnedVideoBuffer().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OwnedVideoBuffer { - return new OwnedVideoBuffer().fromJsonString(jsonString, options); - } - - static equals(a: OwnedVideoBuffer | PlainMessage | undefined, b: OwnedVideoBuffer | PlainMessage | undefined): boolean { - return proto3.util.equals(OwnedVideoBuffer, a, b); - } -} +/** + * Describes the message livekit.proto.OwnedVideoBuffer. + * Use `create(OwnedVideoBufferSchema)` to create a new message. + */ +export const OwnedVideoBufferSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 12); /** * @generated from message livekit.proto.VideoStreamInfo */ -export class VideoStreamInfo extends Message { +export type VideoStreamInfo = Message<"livekit.proto.VideoStreamInfo"> & { /** - * @generated from field: livekit.proto.VideoStreamType type = 1; + * @generated from field: required livekit.proto.VideoStreamType type = 1; */ - type = VideoStreamType.VIDEO_STREAM_NATIVE; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.VideoStreamInfo"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(VideoStreamType) }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VideoStreamInfo { - return new VideoStreamInfo().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): VideoStreamInfo { - return new VideoStreamInfo().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): VideoStreamInfo { - return new VideoStreamInfo().fromJsonString(jsonString, options); - } + type: VideoStreamType; +}; - static equals(a: VideoStreamInfo | PlainMessage | undefined, b: VideoStreamInfo | PlainMessage | undefined): boolean { - return proto3.util.equals(VideoStreamInfo, a, b); - } -} +/** + * Describes the message livekit.proto.VideoStreamInfo. + * Use `create(VideoStreamInfoSchema)` to create a new message. + */ +export const VideoStreamInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 13); /** * @generated from message livekit.proto.OwnedVideoStream */ -export class OwnedVideoStream extends Message { +export type OwnedVideoStream = Message<"livekit.proto.OwnedVideoStream"> & { /** - * @generated from field: livekit.proto.FfiOwnedHandle handle = 1; + * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; */ handle?: FfiOwnedHandle; /** - * @generated from field: livekit.proto.VideoStreamInfo info = 2; + * @generated from field: required livekit.proto.VideoStreamInfo info = 2; */ info?: VideoStreamInfo; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.OwnedVideoStream"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle }, - { no: 2, name: "info", kind: "message", T: VideoStreamInfo }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OwnedVideoStream { - return new OwnedVideoStream().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OwnedVideoStream { - return new OwnedVideoStream().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OwnedVideoStream { - return new OwnedVideoStream().fromJsonString(jsonString, options); - } - - static equals(a: OwnedVideoStream | PlainMessage | undefined, b: OwnedVideoStream | PlainMessage | undefined): boolean { - return proto3.util.equals(OwnedVideoStream, a, b); - } -} +/** + * Describes the message livekit.proto.OwnedVideoStream. + * Use `create(OwnedVideoStreamSchema)` to create a new message. + */ +export const OwnedVideoStreamSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 14); /** * @generated from message livekit.proto.VideoStreamEvent */ -export class VideoStreamEvent extends Message { +export type VideoStreamEvent = Message<"livekit.proto.VideoStreamEvent"> & { /** - * @generated from field: uint64 stream_handle = 1; + * @generated from field: required uint64 stream_handle = 1; */ - streamHandle = protoInt64.zero; + streamHandle: bigint; /** * @generated from oneof livekit.proto.VideoStreamEvent.message @@ -981,240 +475,286 @@ export class VideoStreamEvent extends Message { */ value: VideoStreamEOS; case: "eos"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.VideoStreamEvent"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "stream_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "frame_received", kind: "message", T: VideoFrameReceived, oneof: "message" }, - { no: 3, name: "eos", kind: "message", T: VideoStreamEOS, oneof: "message" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VideoStreamEvent { - return new VideoStreamEvent().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): VideoStreamEvent { - return new VideoStreamEvent().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): VideoStreamEvent { - return new VideoStreamEvent().fromJsonString(jsonString, options); - } - - static equals(a: VideoStreamEvent | PlainMessage | undefined, b: VideoStreamEvent | PlainMessage | undefined): boolean { - return proto3.util.equals(VideoStreamEvent, a, b); - } -} + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message livekit.proto.VideoStreamEvent. + * Use `create(VideoStreamEventSchema)` to create a new message. + */ +export const VideoStreamEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 15); /** * @generated from message livekit.proto.VideoFrameReceived */ -export class VideoFrameReceived extends Message { +export type VideoFrameReceived = Message<"livekit.proto.VideoFrameReceived"> & { /** - * @generated from field: livekit.proto.OwnedVideoBuffer buffer = 1; + * @generated from field: required livekit.proto.OwnedVideoBuffer buffer = 1; */ buffer?: OwnedVideoBuffer; /** * In microseconds * - * @generated from field: int64 timestamp_us = 2; + * @generated from field: required int64 timestamp_us = 2; */ - timestampUs = protoInt64.zero; + timestampUs: bigint; /** - * @generated from field: livekit.proto.VideoRotation rotation = 3; + * @generated from field: required livekit.proto.VideoRotation rotation = 3; */ - rotation = VideoRotation.VIDEO_ROTATION_0; + rotation: VideoRotation; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +/** + * Describes the message livekit.proto.VideoFrameReceived. + * Use `create(VideoFrameReceivedSchema)` to create a new message. + */ +export const VideoFrameReceivedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 16); - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.VideoFrameReceived"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "buffer", kind: "message", T: OwnedVideoBuffer }, - { no: 2, name: "timestamp_us", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 3, name: "rotation", kind: "enum", T: proto3.getEnumType(VideoRotation) }, - ]); +/** + * @generated from message livekit.proto.VideoStreamEOS + */ +export type VideoStreamEOS = Message<"livekit.proto.VideoStreamEOS"> & { +}; - static fromBinary(bytes: Uint8Array, options?: Partial): VideoFrameReceived { - return new VideoFrameReceived().fromBinary(bytes, options); - } +/** + * Describes the message livekit.proto.VideoStreamEOS. + * Use `create(VideoStreamEOSSchema)` to create a new message. + */ +export const VideoStreamEOSSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 17); - static fromJson(jsonValue: JsonValue, options?: Partial): VideoFrameReceived { - return new VideoFrameReceived().fromJson(jsonValue, options); - } +/** + * @generated from message livekit.proto.VideoSourceResolution + */ +export type VideoSourceResolution = Message<"livekit.proto.VideoSourceResolution"> & { + /** + * @generated from field: required uint32 width = 1; + */ + width: number; - static fromJsonString(jsonString: string, options?: Partial): VideoFrameReceived { - return new VideoFrameReceived().fromJsonString(jsonString, options); - } + /** + * @generated from field: required uint32 height = 2; + */ + height: number; +}; - static equals(a: VideoFrameReceived | PlainMessage | undefined, b: VideoFrameReceived | PlainMessage | undefined): boolean { - return proto3.util.equals(VideoFrameReceived, a, b); - } -} +/** + * Describes the message livekit.proto.VideoSourceResolution. + * Use `create(VideoSourceResolutionSchema)` to create a new message. + */ +export const VideoSourceResolutionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 18); /** - * @generated from message livekit.proto.VideoStreamEOS + * @generated from message livekit.proto.VideoSourceInfo */ -export class VideoStreamEOS extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.VideoStreamEOS"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VideoStreamEOS { - return new VideoStreamEOS().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): VideoStreamEOS { - return new VideoStreamEOS().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): VideoStreamEOS { - return new VideoStreamEOS().fromJsonString(jsonString, options); - } - - static equals(a: VideoStreamEOS | PlainMessage | undefined, b: VideoStreamEOS | PlainMessage | undefined): boolean { - return proto3.util.equals(VideoStreamEOS, a, b); - } -} +export type VideoSourceInfo = Message<"livekit.proto.VideoSourceInfo"> & { + /** + * @generated from field: required livekit.proto.VideoSourceType type = 1; + */ + type: VideoSourceType; +}; /** - * @generated from message livekit.proto.VideoSourceResolution + * Describes the message livekit.proto.VideoSourceInfo. + * Use `create(VideoSourceInfoSchema)` to create a new message. */ -export class VideoSourceResolution extends Message { +export const VideoSourceInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 19); + +/** + * @generated from message livekit.proto.OwnedVideoSource + */ +export type OwnedVideoSource = Message<"livekit.proto.OwnedVideoSource"> & { /** - * @generated from field: uint32 width = 1; + * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; */ - width = 0; + handle?: FfiOwnedHandle; /** - * @generated from field: uint32 height = 2; + * @generated from field: required livekit.proto.VideoSourceInfo info = 2; */ - height = 0; + info?: VideoSourceInfo; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +/** + * Describes the message livekit.proto.OwnedVideoSource. + * Use `create(OwnedVideoSourceSchema)` to create a new message. + */ +export const OwnedVideoSourceSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_video_frame, 20); - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.VideoSourceResolution"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 2, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); +/** + * @generated from enum livekit.proto.VideoCodec + */ +export enum VideoCodec { + /** + * @generated from enum value: VP8 = 0; + */ + VP8 = 0, - static fromBinary(bytes: Uint8Array, options?: Partial): VideoSourceResolution { - return new VideoSourceResolution().fromBinary(bytes, options); - } + /** + * @generated from enum value: H264 = 1; + */ + H264 = 1, - static fromJson(jsonValue: JsonValue, options?: Partial): VideoSourceResolution { - return new VideoSourceResolution().fromJson(jsonValue, options); - } + /** + * @generated from enum value: AV1 = 2; + */ + AV1 = 2, - static fromJsonString(jsonString: string, options?: Partial): VideoSourceResolution { - return new VideoSourceResolution().fromJsonString(jsonString, options); - } + /** + * @generated from enum value: VP9 = 3; + */ + VP9 = 3, +} + +/** + * Describes the enum livekit.proto.VideoCodec. + */ +export const VideoCodecSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_video_frame, 0); - static equals(a: VideoSourceResolution | PlainMessage | undefined, b: VideoSourceResolution | PlainMessage | undefined): boolean { - return proto3.util.equals(VideoSourceResolution, a, b); - } +/** + * @generated from enum livekit.proto.VideoRotation + */ +export enum VideoRotation { + /** + * @generated from enum value: VIDEO_ROTATION_0 = 0; + */ + VIDEO_ROTATION_0 = 0, + + /** + * @generated from enum value: VIDEO_ROTATION_90 = 1; + */ + VIDEO_ROTATION_90 = 1, + + /** + * @generated from enum value: VIDEO_ROTATION_180 = 2; + */ + VIDEO_ROTATION_180 = 2, + + /** + * @generated from enum value: VIDEO_ROTATION_270 = 3; + */ + VIDEO_ROTATION_270 = 3, } /** - * @generated from message livekit.proto.VideoSourceInfo + * Describes the enum livekit.proto.VideoRotation. */ -export class VideoSourceInfo extends Message { +export const VideoRotationSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_video_frame, 1); + +/** + * @generated from enum livekit.proto.VideoBufferType + */ +export enum VideoBufferType { /** - * @generated from field: livekit.proto.VideoSourceType type = 1; + * @generated from enum value: RGBA = 0; */ - type = VideoSourceType.VIDEO_SOURCE_NATIVE; + RGBA = 0, - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + /** + * @generated from enum value: ABGR = 1; + */ + ABGR = 1, - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.VideoSourceInfo"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(VideoSourceType) }, - ]); + /** + * @generated from enum value: ARGB = 2; + */ + ARGB = 2, + + /** + * @generated from enum value: BGRA = 3; + */ + BGRA = 3, + + /** + * @generated from enum value: RGB24 = 4; + */ + RGB24 = 4, + + /** + * @generated from enum value: I420 = 5; + */ + I420 = 5, + + /** + * @generated from enum value: I420A = 6; + */ + I420A = 6, - static fromBinary(bytes: Uint8Array, options?: Partial): VideoSourceInfo { - return new VideoSourceInfo().fromBinary(bytes, options); - } + /** + * @generated from enum value: I422 = 7; + */ + I422 = 7, - static fromJson(jsonValue: JsonValue, options?: Partial): VideoSourceInfo { - return new VideoSourceInfo().fromJson(jsonValue, options); - } + /** + * @generated from enum value: I444 = 8; + */ + I444 = 8, - static fromJsonString(jsonString: string, options?: Partial): VideoSourceInfo { - return new VideoSourceInfo().fromJsonString(jsonString, options); - } + /** + * @generated from enum value: I010 = 9; + */ + I010 = 9, - static equals(a: VideoSourceInfo | PlainMessage | undefined, b: VideoSourceInfo | PlainMessage | undefined): boolean { - return proto3.util.equals(VideoSourceInfo, a, b); - } + /** + * @generated from enum value: NV12 = 10; + */ + NV12 = 10, } /** - * @generated from message livekit.proto.OwnedVideoSource + * Describes the enum livekit.proto.VideoBufferType. */ -export class OwnedVideoSource extends Message { +export const VideoBufferTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_video_frame, 2); + +/** + * @generated from enum livekit.proto.VideoStreamType + */ +export enum VideoStreamType { /** - * @generated from field: livekit.proto.FfiOwnedHandle handle = 1; + * @generated from enum value: VIDEO_STREAM_NATIVE = 0; */ - handle?: FfiOwnedHandle; + VIDEO_STREAM_NATIVE = 0, /** - * @generated from field: livekit.proto.VideoSourceInfo info = 2; + * @generated from enum value: VIDEO_STREAM_WEBGL = 1; */ - info?: VideoSourceInfo; + VIDEO_STREAM_WEBGL = 1, - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "livekit.proto.OwnedVideoSource"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle }, - { no: 2, name: "info", kind: "message", T: VideoSourceInfo }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OwnedVideoSource { - return new OwnedVideoSource().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OwnedVideoSource { - return new OwnedVideoSource().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OwnedVideoSource { - return new OwnedVideoSource().fromJsonString(jsonString, options); - } - - static equals(a: OwnedVideoSource | PlainMessage | undefined, b: OwnedVideoSource | PlainMessage | undefined): boolean { - return proto3.util.equals(OwnedVideoSource, a, b); - } + /** + * @generated from enum value: VIDEO_STREAM_HTML = 2; + */ + VIDEO_STREAM_HTML = 2, } +/** + * Describes the enum livekit.proto.VideoStreamType. + */ +export const VideoStreamTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_video_frame, 3); + +/** + * @generated from enum livekit.proto.VideoSourceType + */ +export enum VideoSourceType { + /** + * @generated from enum value: VIDEO_SOURCE_NATIVE = 0; + */ + VIDEO_SOURCE_NATIVE = 0, +} + +/** + * Describes the enum livekit.proto.VideoSourceType. + */ +export const VideoSourceTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_video_frame, 4); + diff --git a/packages/livekit-rtc/src/room.ts b/packages/livekit-rtc/src/room.ts index 369ddaab..676086bf 100644 --- a/packages/livekit-rtc/src/room.ts +++ b/packages/livekit-rtc/src/room.ts @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 +import { create } from '@bufbuild/protobuf'; import type { TypedEventEmitter as TypedEmitter } from '@livekit/typed-emitter'; import EventEmitter from 'events'; import type { E2EEOptions } from './e2ee.js'; @@ -22,7 +23,7 @@ import type { RoomInfo, } from './proto/room_pb.js'; import { - ConnectRequest, + ConnectRequestSchema, ConnectionState, ContinualGatheringPolicy, IceTransportType, @@ -61,10 +62,10 @@ export const defaultRoomOptions: RoomOptions = { }; export class Room extends (EventEmitter as new () => TypedEmitter) { - private info: RoomInfo; + private info?: RoomInfo; private ffiHandle?: FfiHandle; - e2eeManager: E2EEManager; + e2eeManager?: E2EEManager; connectionState: ConnectionState = ConnectionState.CONN_DISCONNECTED; remoteParticipants: Map = new Map(); @@ -74,12 +75,12 @@ export class Room extends (EventEmitter as new () => TypedEmitter super(); } - get name(): string { - return this.info.name; + get name(): string | undefined { + return this.info?.name; } - get metadata(): string { - return this.info.metadata; + get metadata(): string | undefined { + return this.info?.metadata; } get isConnected(): boolean { @@ -87,13 +88,31 @@ export class Room extends (EventEmitter as new () => TypedEmitter } async getSid(): Promise { - return this.info.sid; // TODO update this to handle async room updates once rust protocol has been updated + if (!this.isConnected) { + return ''; + } + if (this.info && this.info.sid !== '') { + return this.info.sid; + } + return new Promise((resolve, reject) => { + const handleRoomUpdate = (sid: string) => { + if (sid !== '') { + this.off(RoomEvent.RoomSidChanged, handleRoomUpdate); + resolve(sid); + } + }; + this.on(RoomEvent.RoomSidChanged, handleRoomUpdate); + this.once(RoomEvent.Disconnected, () => { + this.off(RoomEvent.RoomSidChanged, handleRoomUpdate); + reject('Room disconnected before room server id was available'); + }); + }); } async connect(url: string, token: string, opts?: RoomOptions) { const options = { ...defaultRoomOptions, ...opts }; - const req = new ConnectRequest({ + const req = create(ConnectRequestSchema, { url: url, token: token, options: { @@ -122,19 +141,21 @@ export class Room extends (EventEmitter as new () => TypedEmitter return ev.message.case == 'connect' && ev.message.value.asyncId == res.asyncId; }); - if (cb.error) { - throw new ConnectError(cb.error); + if (cb.message.case !== 'result') { + throw new ConnectError(cb.message.value ?? 'Unknown error'); } - this.ffiHandle = new FfiHandle(cb.room.handle.id); + const { room, localParticipant, participants } = cb.message.value; + + this.ffiHandle = new FfiHandle(room!.handle!.id); this.e2eeManager = new E2EEManager(this.ffiHandle.handle, options.e2ee); - this.info = cb.room.info; + this.info = room!.info; this.connectionState = ConnectionState.CONN_CONNECTED; - this.localParticipant = new LocalParticipant(cb.localParticipant); + this.localParticipant = new LocalParticipant(localParticipant!); - for (const pt of cb.participants) { - const rp = this.createRemoteParticipant(pt.participant); + for (const pt of participants) { + const rp = this.createRemoteParticipant(pt.participant!); for (const pub of pt.publications) { const publication = new RemoteTrackPublication(pub); @@ -146,7 +167,7 @@ export class Room extends (EventEmitter as new () => TypedEmitter } async disconnect() { - if (!this.isConnected) { + if (!this.isConnected || !this.ffiHandle) { return; } @@ -164,6 +185,10 @@ export class Room extends (EventEmitter as new () => TypedEmitter } private onFfiEvent = (ffiEvent: FfiEvent) => { + if (!this.localParticipant || !this.ffiHandle || !this.info) { + throw TypeError('cannot handle ffi events before connectCallback'); + } + if ( ffiEvent.message.case != 'roomEvent' || ffiEvent.message.value.roomHandle != this.ffiHandle.handle @@ -173,66 +198,88 @@ export class Room extends (EventEmitter as new () => TypedEmitter const ev = ffiEvent.message.value.message; if (ev.case == 'participantConnected') { - const participant = this.createRemoteParticipant(ev.value.info); + const participant = this.createRemoteParticipant(ev.value.info!); this.remoteParticipants.set(participant.identity, participant); this.emit(RoomEvent.ParticipantConnected, participant); } else if (ev.case == 'participantDisconnected') { const participant = this.remoteParticipants.get(ev.value.participantIdentity); - this.remoteParticipants.delete(participant.identity); - this.emit(RoomEvent.ParticipantDisconnected, participant); + if (participant) { + this.remoteParticipants.delete(participant.identity); + this.emit(RoomEvent.ParticipantDisconnected, participant); + } } else if (ev.case == 'localTrackPublished') { const publication = this.localParticipant.trackPublications.get(ev.value.trackSid); + if (!publication) { + throw new TypeError('local track publication not found'); + } this.emit(RoomEvent.LocalTrackPublished, publication, this.localParticipant); } else if (ev.case == 'localTrackUnpublished') { const publication = this.localParticipant.trackPublications.get(ev.value.publicationSid); this.localParticipant.trackPublications.delete(ev.value.publicationSid); - this.emit(RoomEvent.LocalTrackUnpublished, publication, this.localParticipant); + if (publication) { + this.emit(RoomEvent.LocalTrackUnpublished, publication, this.localParticipant); + } } else if (ev.case == 'localTrackSubscribed') { const publication = this.localParticipant.trackPublications.get(ev.value.trackSid); + if (!publication) { + throw new TypeError('local track publication not found'); + } publication.resolveFirstSubscription(); - this.emit(RoomEvent.LocalTrackSubscribed, publication.track); + this.emit(RoomEvent.LocalTrackSubscribed, publication.track!); } else if (ev.case == 'trackPublished') { - const participant = this.remoteParticipants.get(ev.value.participantIdentity); - const publication = new RemoteTrackPublication(ev.value.publication); + const participant = this.requireRemoteParticipant(ev.value.participantIdentity); + const publication = new RemoteTrackPublication(ev.value.publication!); participant.trackPublications.set(publication.sid, publication); this.emit(RoomEvent.TrackPublished, publication, participant); } else if (ev.case == 'trackUnpublished') { - const participant = this.remoteParticipants.get(ev.value.participantIdentity); + const participant = this.requireRemoteParticipant(ev.value.participantIdentity); const publication = participant.trackPublications.get(ev.value.publicationSid); participant.trackPublications.delete(ev.value.publicationSid); - this.emit(RoomEvent.TrackUnpublished, publication, participant); + if (publication) { + this.emit(RoomEvent.TrackUnpublished, publication, participant); + } } else if (ev.case == 'trackSubscribed') { - const ownedTrack = ev.value.track; - const participant = this.remoteParticipants.get(ev.value.participantIdentity); - const publication = participant.trackPublications.get(ownedTrack.info.sid); + const ownedTrack = ev.value.track!; + const trackInfo = ownedTrack.info!; + const { participant, publication } = this.requirePublicationOfRemoteParticipant( + ev.value.participantIdentity, + trackInfo.sid, + ); publication.subscribed = true; - if (ownedTrack.info.kind == TrackKind.KIND_VIDEO) { + if (trackInfo.kind == TrackKind.KIND_VIDEO) { publication.track = new RemoteVideoTrack(ownedTrack); - } else if (ownedTrack.info.kind == TrackKind.KIND_AUDIO) { + } else if (trackInfo.kind == TrackKind.KIND_AUDIO) { publication.track = new RemoteAudioTrack(ownedTrack); } - this.emit(RoomEvent.TrackSubscribed, publication.track, publication, participant); + this.emit(RoomEvent.TrackSubscribed, publication.track!, publication, participant); } else if (ev.case == 'trackUnsubscribed') { - const participant = this.remoteParticipants.get(ev.value.participantIdentity); - const publication = participant.trackPublications.get(ev.value.trackSid); + const { participant, publication } = this.requirePublicationOfRemoteParticipant( + ev.value.participantIdentity, + ev.value.trackSid, + ); + const track = publication.track!; publication.track = undefined; publication.subscribed = false; - this.emit(RoomEvent.TrackUnsubscribed, publication.track, publication, participant); + this.emit(RoomEvent.TrackUnsubscribed, track, publication, participant); } else if (ev.case == 'trackSubscriptionFailed') { - const participant = this.remoteParticipants.get(ev.value.participantIdentity); + const participant = this.requireRemoteParticipant(ev.value.participantIdentity); this.emit(RoomEvent.TrackSubscriptionFailed, ev.value.trackSid, participant, ev.value.error); } else if (ev.case == 'trackMuted') { - const participant = this.remoteParticipants.get(ev.value.participantIdentity); - const publication = participant.trackPublications.get(ev.value.trackSid); + const { participant, publication } = this.requirePublicationOfRemoteParticipant( + ev.value.participantIdentity, + ev.value.trackSid, + ); publication.info.muted = true; if (publication.track) { publication.track.info.muted = true; } this.emit(RoomEvent.TrackMuted, publication, participant); } else if (ev.case == 'trackUnmuted') { - const participant = this.retrieveParticipantByIdentity(ev.value.participantIdentity); - const publication = participant.trackPublications.get(ev.value.trackSid); + const { participant, publication } = this.requirePublicationOfRemoteParticipant( + ev.value.participantIdentity, + ev.value.trackSid, + ); publication.info.muted = false; if (publication.track) { publication.track.info.muted = false; @@ -240,32 +287,45 @@ export class Room extends (EventEmitter as new () => TypedEmitter this.emit(RoomEvent.TrackUnmuted, publication, participant); } else if (ev.case == 'activeSpeakersChanged') { const activeSpeakers = ev.value.participantIdentities.map((identity) => - this.retrieveParticipantByIdentity(identity), + this.requireRemoteParticipant(identity), ); this.emit(RoomEvent.ActiveSpeakersChanged, activeSpeakers); } else if (ev.case == 'roomMetadataChanged') { this.info.metadata = ev.value.metadata; this.emit(RoomEvent.RoomMetadataChanged, this.info.metadata); } else if (ev.case == 'participantMetadataChanged') { - const participant = this.retrieveParticipantByIdentity(ev.value.participantIdentity); + const participant = this.requireRemoteParticipant(ev.value.participantIdentity); participant.info.metadata = ev.value.metadata; this.emit(RoomEvent.ParticipantMetadataChanged, participant.metadata, participant); } else if (ev.case == 'participantNameChanged') { - const participant = this.retrieveParticipantByIdentity(ev.value.participantIdentity); + const participant = this.requireRemoteParticipant(ev.value.participantIdentity); participant.info.name = ev.value.name; this.emit(RoomEvent.ParticipantNameChanged, participant.name, participant); } else if (ev.case == 'participantAttributesChanged') { - const participant = this.retrieveParticipantByIdentity(ev.value.participantIdentity); - participant.info.attributes = ev.value.attributes; + const participant = this.requireRemoteParticipant(ev.value.participantIdentity); + participant.info.attributes = ev.value.attributes.reduce( + (acc, value) => { + acc[value.key] = value.value; + return acc; + }, + {} as Record, + ); if (Object.keys(ev.value.changedAttributes).length > 0) { - this.emit(RoomEvent.ParticipantAttributesChanged, ev.value.changedAttributes, participant); + const changedAttributes = ev.value.changedAttributes.reduce( + (acc, value) => { + acc[value.key] = value.value; + return acc; + }, + {} as Record, + ); + this.emit(RoomEvent.ParticipantAttributesChanged, changedAttributes, participant); } } else if (ev.case == 'connectionQualityChanged') { - const participant = this.retrieveParticipantByIdentity(ev.value.participantIdentity); + const participant = this.requireRemoteParticipant(ev.value.participantIdentity); this.emit(RoomEvent.ConnectionQualityChanged, ev.value.quality, participant); } else if (ev.case == 'chatMessage') { const participant = this.retrieveParticipantByIdentity(ev.value.participantIdentity); - const { id, message: messageText, timestamp, editTimestamp, generated } = ev.value.message; + const { id, message: messageText, timestamp, editTimestamp, generated } = ev.value.message!; const message: ChatMessage = { id, message: messageText, @@ -280,11 +340,9 @@ export class Room extends (EventEmitter as new () => TypedEmitter const dataPacket = ev.value.value; switch (dataPacket.case) { case 'user': - const buffer = FfiClient.instance.copyBuffer( - dataPacket.value.data.data.dataPtr, - Number(dataPacket.value.data.data.dataLen), - ); - new FfiHandle(dataPacket.value.data.handle.id).dispose(); + const data = dataPacket.value.data!.data!; + const buffer = FfiClient.instance.copyBuffer(data.dataPtr, Number(data.dataLen)); + new FfiHandle(dataPacket.value.data!.handle!.id).dispose(); this.emit( RoomEvent.DataReceived, buffer, @@ -316,24 +374,43 @@ export class Room extends (EventEmitter as new () => TypedEmitter this.emit(RoomEvent.Reconnecting); } else if (ev.case == 'reconnected') { this.emit(RoomEvent.Reconnected); + } else if (ev.case == 'roomSidChanged') { + this.emit(RoomEvent.RoomSidChanged, ev.value.sid); } }; - private retrieveParticipantByIdentity(identity: string): Participant { - if (this.localParticipant.identity === identity) { + private retrieveParticipantByIdentity(identity: string): Participant | undefined { + if (this.localParticipant?.identity === identity) { return this.localParticipant; } else { return this.remoteParticipants.get(identity); } } + private requireRemoteParticipant(identity: string) { + const participant = this.remoteParticipants.get(identity); + if (!participant) { + throw new TypeError(`participant ${identity} not found`); + } + return participant; + } + + private requirePublicationOfRemoteParticipant(identity: string, trackSid: string) { + const participant = this.requireRemoteParticipant(identity); + const publication = participant.trackPublications.get(trackSid); + if (!publication) { + throw new TypeError(`publication ${trackSid} not found`); + } + return { participant, publication }; + } + private createRemoteParticipant(ownedInfo: OwnedParticipant) { - if (this.remoteParticipants.has(ownedInfo.info.identity)) { + if (this.remoteParticipants.has(ownedInfo.info!.identity)) { throw new Error('Participant already exists'); } const participant = new RemoteParticipant(ownedInfo); - this.remoteParticipants.set(ownedInfo.info.identity, participant); + this.remoteParticipants.set(ownedInfo.info!.identity, participant); return participant; } } @@ -374,6 +451,7 @@ export type RoomCallbacks = { trackUnmuted: (publication: TrackPublication, participant: Participant) => void; activeSpeakersChanged: (speakers: Participant[]) => void; roomMetadataChanged: (metadata: string) => void; + roomInfoUpdated: (info: RoomInfo) => void; participantMetadataChanged: (metadata: string | undefined, participant: Participant) => void; participantNameChanged: (name: string, participant: Participant) => void; participantAttributesChanged: ( @@ -388,13 +466,14 @@ export type RoomCallbacks = { topic?: string, ) => void; chatMessage: (message: ChatMessage, participant?: Participant) => void; - dtmfReceived: (code: number, digit: string, participant: RemoteParticipant) => void; + dtmfReceived: (code: number, digit: string, participant?: RemoteParticipant) => void; encryptionError: (error: Error) => void; connectionStateChanged: (state: ConnectionState) => void; connected: () => void; disconnected: (reason: DisconnectReason) => void; reconnecting: () => void; reconnected: () => void; + roomSidChanged: (sid: string) => void; }; export enum RoomEvent { @@ -412,6 +491,7 @@ export enum RoomEvent { TrackUnmuted = 'trackUnmuted', ActiveSpeakersChanged = 'activeSpeakersChanged', RoomMetadataChanged = 'roomMetadataChanged', + RoomSidChanged = 'roomSidChanged', ParticipantMetadataChanged = 'participantMetadataChanged', ParticipantNameChanged = 'participantNameChanged', ParticipantAttributesChanged = 'participantAttributesChanged', diff --git a/packages/livekit-rtc/src/track.ts b/packages/livekit-rtc/src/track.ts index 9b4e11cb..caf51e74 100644 --- a/packages/livekit-rtc/src/track.ts +++ b/packages/livekit-rtc/src/track.ts @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 +import { create } from '@bufbuild/protobuf'; import type { AudioSource } from './audio_source.js'; import { FfiClient, FfiHandle } from './ffi_client.js'; import type { @@ -11,7 +12,7 @@ import type { TrackInfo, TrackKind, } from './proto/track_pb.js'; -import { CreateAudioTrackRequest, CreateVideoTrackRequest } from './proto/track_pb.js'; +import { CreateAudioTrackRequestSchema, CreateVideoTrackRequestSchema } from './proto/track_pb.js'; import type { VideoSource } from './video_source.js'; export abstract class Track { @@ -22,8 +23,8 @@ export abstract class Track { ffi_handle: FfiHandle; constructor(owned: OwnedTrack) { - this.info = owned.info; - this.ffi_handle = new FfiHandle(owned.handle.id); + this.info = owned.info!; + this.ffi_handle = new FfiHandle(owned.handle!.id); } get sid(): string { @@ -53,7 +54,7 @@ export class LocalAudioTrack extends Track { } static createAudioTrack(name: string, source: AudioSource): LocalAudioTrack { - const req = new CreateAudioTrackRequest({ + const req = create(CreateAudioTrackRequestSchema, { name: name, sourceHandle: source.ffiHandle.handle, }); @@ -62,7 +63,7 @@ export class LocalAudioTrack extends Track { message: { case: 'createAudioTrack', value: req }, }); - return new LocalAudioTrack(res.track); + return new LocalAudioTrack(res.track!); } } @@ -72,7 +73,7 @@ export class LocalVideoTrack extends Track { } static createVideoTrack(name: string, source: VideoSource): LocalVideoTrack { - const req = new CreateVideoTrackRequest({ + const req = create(CreateVideoTrackRequestSchema, { name: name, sourceHandle: source.ffiHandle.handle, }); @@ -81,7 +82,7 @@ export class LocalVideoTrack extends Track { message: { case: 'createVideoTrack', value: req }, }); - return new LocalVideoTrack(res.track); + return new LocalVideoTrack(res.track!); } } diff --git a/packages/livekit-rtc/src/track_publication.ts b/packages/livekit-rtc/src/track_publication.ts index eed08f66..8fc61ca6 100644 --- a/packages/livekit-rtc/src/track_publication.ts +++ b/packages/livekit-rtc/src/track_publication.ts @@ -1,11 +1,12 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 +import { create } from '@bufbuild/protobuf'; import { FfiClient } from './ffi_client.js'; import { FfiHandle } from './napi/native.js'; import type { EncryptionType } from './proto/e2ee_pb.js'; import type { SetSubscribedResponse } from './proto/room_pb.js'; -import { SetSubscribedRequest } from './proto/room_pb.js'; +import { SetSubscribedRequestSchema } from './proto/room_pb.js'; import type { OwnedTrackPublication, TrackKind, @@ -23,8 +24,8 @@ export abstract class TrackPublication { track?: Track; constructor(ownedInfo: OwnedTrackPublication) { - this.info = ownedInfo.info; - this.ffiHandle = new FfiHandle(ownedInfo.handle.id); + this.info = ownedInfo.info!; + this.ffiHandle = new FfiHandle(ownedInfo!.handle!.id); } get sid(): string { @@ -100,7 +101,7 @@ export class RemoteTrackPublication extends TrackPublication { } setSubscribed(subscribed: boolean) { - const req = new SetSubscribedRequest({ + const req = create(SetSubscribedRequestSchema, { subscribe: subscribed, publicationHandle: this.ffiHandle.handle, }); diff --git a/packages/livekit-rtc/src/video_frame.ts b/packages/livekit-rtc/src/video_frame.ts index aa3e20fb..fc835299 100644 --- a/packages/livekit-rtc/src/video_frame.ts +++ b/packages/livekit-rtc/src/video_frame.ts @@ -1,11 +1,15 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 -import { FfiClient, FfiRequest } from './ffi_client.js'; +import { create } from '@bufbuild/protobuf'; +import { FfiClient } from './ffi_client.js'; +import { FfiRequestSchema } from './proto/ffi_pb.js'; import type { OwnedVideoBuffer, VideoConvertResponse } from './proto/video_frame_pb.js'; import { VideoBufferInfo, + VideoBufferInfoSchema, VideoBufferInfo_ComponentInfo, + VideoBufferInfo_ComponentInfoSchema, VideoBufferType, } from './proto/video_frame_pb.js'; @@ -29,7 +33,7 @@ export class VideoFrame { /** @internal */ protoInfo(): VideoBufferInfo { - const info = new VideoBufferInfo({ + const info = create(VideoBufferInfoSchema, { width: this.width, height: this.height, type: this.type, @@ -55,7 +59,7 @@ export class VideoFrame { /** @internal */ static fromOwnedInfo(owned: OwnedVideoBuffer): VideoFrame { - const info = owned.info; + const info = owned.info!; return new VideoFrame( FfiClient.instance.copyBuffer( info.dataPtr, @@ -76,7 +80,7 @@ export class VideoFrame { } convert(dstType: VideoBufferType, flipY = false): VideoFrame { - const req = new FfiRequest({ + const req = create(FfiRequestSchema, { message: { case: 'videoConvert', value: { @@ -87,11 +91,11 @@ export class VideoFrame { }, }); const resp = FfiClient.instance.request(req); - if (resp.error) { - throw resp.error; + if (resp.message.case !== 'buffer') { + throw new Error(resp.message.value ?? 'Unknown Error'); } - return VideoFrame.fromOwnedInfo(resp.buffer); + return VideoFrame.fromOwnedInfo(resp.message.value); } } @@ -130,13 +134,17 @@ const getPlaneInfos = ( const chromaHeight = Math.trunc((height + 1) / 2); switch (type) { case VideoBufferType.I420: { - const y = new VideoBufferInfo_ComponentInfo({ dataPtr, stride: width, size: width * height }); - const u = new VideoBufferInfo_ComponentInfo({ + const y = create(VideoBufferInfo_ComponentInfoSchema, { + dataPtr, + stride: width, + size: width * height, + }); + const u = create(VideoBufferInfo_ComponentInfoSchema, { dataPtr: y.dataPtr + BigInt(y.size), stride: chromaWidth, size: chromaWidth * chromaHeight, }); - const v = new VideoBufferInfo_ComponentInfo({ + const v = create(VideoBufferInfo_ComponentInfoSchema, { dataPtr: u.dataPtr + BigInt(u.size), stride: chromaWidth, size: chromaWidth * chromaHeight, @@ -144,18 +152,22 @@ const getPlaneInfos = ( return [y, u, v]; } case VideoBufferType.I420A: { - const y = new VideoBufferInfo_ComponentInfo({ dataPtr, stride: width, size: width * height }); - const u = new VideoBufferInfo_ComponentInfo({ + const y = create(VideoBufferInfo_ComponentInfoSchema, { + dataPtr, + stride: width, + size: width * height, + }); + const u = create(VideoBufferInfo_ComponentInfoSchema, { dataPtr: y.dataPtr + BigInt(y.size), stride: chromaWidth, size: chromaWidth * chromaHeight, }); - const v = new VideoBufferInfo_ComponentInfo({ + const v = create(VideoBufferInfo_ComponentInfoSchema, { dataPtr: u.dataPtr + BigInt(u.size), stride: chromaWidth, size: chromaWidth * chromaHeight, }); - const a = new VideoBufferInfo_ComponentInfo({ + const a = create(VideoBufferInfo_ComponentInfoSchema, { dataPtr: v.dataPtr + BigInt(v.size), stride: width, size: width * height, @@ -163,13 +175,17 @@ const getPlaneInfos = ( return [y, u, v, a]; } case VideoBufferType.I422: { - const y = new VideoBufferInfo_ComponentInfo({ dataPtr, stride: width, size: width * height }); - const u = new VideoBufferInfo_ComponentInfo({ + const y = create(VideoBufferInfo_ComponentInfoSchema, { + dataPtr, + stride: width, + size: width * height, + }); + const u = create(VideoBufferInfo_ComponentInfoSchema, { dataPtr: y.dataPtr + BigInt(y.size), stride: chromaWidth, size: chromaWidth * height, }); - const v = new VideoBufferInfo_ComponentInfo({ + const v = create(VideoBufferInfo_ComponentInfoSchema, { dataPtr: u.dataPtr + BigInt(u.size), stride: chromaWidth, size: chromaWidth * height, @@ -177,13 +193,17 @@ const getPlaneInfos = ( return [y, u, v]; } case VideoBufferType.I444: { - const y = new VideoBufferInfo_ComponentInfo({ dataPtr, stride: width, size: width * height }); - const u = new VideoBufferInfo_ComponentInfo({ + const y = create(VideoBufferInfo_ComponentInfoSchema, { + dataPtr, + stride: width, + size: width * height, + }); + const u = create(VideoBufferInfo_ComponentInfoSchema, { dataPtr: y.dataPtr + BigInt(y.size), stride: width, size: width * height, }); - const v = new VideoBufferInfo_ComponentInfo({ + const v = create(VideoBufferInfo_ComponentInfoSchema, { dataPtr: u.dataPtr + BigInt(u.size), stride: width, size: width * height, @@ -191,17 +211,17 @@ const getPlaneInfos = ( return [y, u, v]; } case VideoBufferType.I010: { - const y = new VideoBufferInfo_ComponentInfo({ + const y = create(VideoBufferInfo_ComponentInfoSchema, { dataPtr, stride: width * 2, size: width * height * 2, }); - const u = new VideoBufferInfo_ComponentInfo({ + const u = create(VideoBufferInfo_ComponentInfoSchema, { dataPtr: y.dataPtr + BigInt(y.size), stride: chromaWidth * 2, size: chromaWidth * chromaHeight * 2, }); - const v = new VideoBufferInfo_ComponentInfo({ + const v = create(VideoBufferInfo_ComponentInfoSchema, { dataPtr: u.dataPtr + BigInt(u.size), stride: chromaWidth * 2, size: chromaWidth * chromaHeight * 2, @@ -209,8 +229,12 @@ const getPlaneInfos = ( return [y, u, v]; } case VideoBufferType.NV12: { - const y = new VideoBufferInfo_ComponentInfo({ dataPtr, stride: width, size: width * height }); - const uv = new VideoBufferInfo_ComponentInfo({ + const y = create(VideoBufferInfo_ComponentInfoSchema, { + dataPtr, + stride: width, + size: width * height, + }); + const uv = create(VideoBufferInfo_ComponentInfoSchema, { dataPtr: y.dataPtr + BigInt(y.size), stride: chromaWidth * 2, size: chromaWidth * chromaHeight * 2, diff --git a/packages/livekit-rtc/src/video_source.ts b/packages/livekit-rtc/src/video_source.ts index dbc7958c..c9884811 100644 --- a/packages/livekit-rtc/src/video_source.ts +++ b/packages/livekit-rtc/src/video_source.ts @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 +import { create } from '@bufbuild/protobuf'; import { FfiClient, FfiHandle } from './ffi_client.js'; import type { CaptureVideoFrameResponse, @@ -8,8 +9,8 @@ import type { VideoSourceInfo, } from './proto/video_frame_pb.js'; import { - CaptureVideoFrameRequest, - NewVideoSourceRequest, + CaptureVideoFrameRequestSchema, + NewVideoSourceRequestSchema, VideoRotation, VideoSourceType, } from './proto/video_frame_pb.js'; @@ -28,7 +29,7 @@ export class VideoSource { this.width = width; this.height = height; - const req = new NewVideoSourceRequest({ + const req = create(NewVideoSourceRequestSchema, { type: VideoSourceType.VIDEO_SOURCE_NATIVE, resolution: { width: width, @@ -43,12 +44,12 @@ export class VideoSource { }, }); - this.info = res.source.info; - this.ffiHandle = new FfiHandle(res.source.handle.id); + this.info = res.source!.info!; + this.ffiHandle = new FfiHandle(res.source!.handle!.id); } captureFrame(frame: VideoFrame, timestampUs = 0n, rotation = VideoRotation.VIDEO_ROTATION_0) { - const req = new CaptureVideoFrameRequest({ + const req = create(CaptureVideoFrameRequestSchema, { sourceHandle: this.ffiHandle.handle, buffer: frame.protoInfo(), rotation, diff --git a/packages/livekit-rtc/src/video_stream.ts b/packages/livekit-rtc/src/video_stream.ts index aaf57162..b032aa7e 100644 --- a/packages/livekit-rtc/src/video_stream.ts +++ b/packages/livekit-rtc/src/video_stream.ts @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 +import { create } from '@bufbuild/protobuf'; import { Mutex } from '@livekit/mutex'; import type { FfiEvent } from './ffi_client.js'; import { FfiClient, FfiClientEvent, FfiHandle } from './ffi_client.js'; @@ -9,7 +10,7 @@ import type { VideoRotation, VideoStreamInfo, } from './proto/video_frame_pb.js'; -import { NewVideoStreamRequest, VideoStreamType } from './proto/video_frame_pb.js'; +import { NewVideoStreamRequestSchema, VideoStreamType } from './proto/video_frame_pb.js'; import type { Track } from './track.js'; import { VideoFrame } from './video_frame.js'; @@ -36,7 +37,7 @@ export class VideoStream implements AsyncIterableIterator { constructor(track: Track) { this.track = track; - const req = new NewVideoStreamRequest({ + const req = create(NewVideoStreamRequestSchema, { type: VideoStreamType.VIDEO_STREAM_NATIVE, trackHandle: track.ffi_handle.handle, }); @@ -48,8 +49,8 @@ export class VideoStream implements AsyncIterableIterator { }, }); - this.info = res.stream.info; - this.ffiHandle = new FfiHandle(res.stream.handle.id); + this.info = res.stream!.info!; + this.ffiHandle = new FfiHandle(res.stream!.handle!.id); FfiClient.instance.on(FfiClientEvent.FfiEvent, this.onEvent); } @@ -67,7 +68,7 @@ export class VideoStream implements AsyncIterableIterator { case 'frameReceived': const rotation = streamEvent.value.rotation; const timestampUs = streamEvent.value.timestampUs; - const frame = VideoFrame.fromOwnedInfo(streamEvent.value.buffer); + const frame = VideoFrame.fromOwnedInfo(streamEvent.value.buffer!); const value = { rotation, timestampUs, frame }; if (this.queueResolve) { this.queueResolve({ done: false, value }); diff --git a/packages/livekit-rtc/tsconfig.json b/packages/livekit-rtc/tsconfig.json index be3fdf45..e8483375 100644 --- a/packages/livekit-rtc/tsconfig.json +++ b/packages/livekit-rtc/tsconfig.json @@ -9,7 +9,8 @@ "lib": ["es2020"], "moduleResolution": "node", "sourceMap": true, - "outDir": "dist" + "outDir": "dist", + "strict": true }, "include": ["src/**/*.ts"], "exclude": ["src/**/*.test.ts", "vite.config.ts"] diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c83e7bf0..933fe2c8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -147,8 +147,8 @@ importers: packages/livekit-rtc: dependencies: '@bufbuild/protobuf': - specifier: ^1.4.2 - version: 1.10.0 + specifier: ^2.2.0 + version: 2.2.0 '@livekit/mutex': specifier: ^1.0.0 version: 1.0.0 @@ -172,6 +172,9 @@ importers: specifier: workspace:* version: link:npm/win32-x64-msvc devDependencies: + '@bufbuild/protoc-gen-es': + specifier: ^2.2.0 + version: 2.2.0(@bufbuild/protobuf@2.2.0) '@napi-rs/cli': specifier: ^2.18.0 version: 2.18.4 @@ -311,6 +314,22 @@ packages: '@bufbuild/protobuf@1.10.0': resolution: {integrity: sha512-QDdVFLoN93Zjg36NoQPZfsVH9tZew7wKDKyV5qRdj8ntT4wQCOradQjRaTdwMhWUYsgKsvCINKKm87FdEk96Ag==} + '@bufbuild/protobuf@2.2.0': + resolution: {integrity: sha512-+imAQkHf7U/Rwvu0wk1XWgsP3WnpCWmK7B48f0XqSNzgk64+grljTKC7pnO/xBiEMUziF7vKRfbBnOQhg126qQ==} + + '@bufbuild/protoc-gen-es@2.2.0': + resolution: {integrity: sha512-PmUTtbJJfgcabTsoF59W0bsAr7xO5aGcMe69G8vOq0ogYV1aWmvFKhHKHDtn295pOLhTXmfrDSUNi/OTHuDdpw==} + engines: {node: '>=14'} + hasBin: true + peerDependencies: + '@bufbuild/protobuf': 2.2.0 + peerDependenciesMeta: + '@bufbuild/protobuf': + optional: true + + '@bufbuild/protoplugin@2.2.0': + resolution: {integrity: sha512-ijsCHuhtXbfTiffoBRve2uCPR7gy6cwJsMe8z5bYQtczGiZVVfiyAze55gk1J/1ruqkr40oZ9BwKAGOzz69f0g==} + '@changesets/apply-release-plan@7.0.5': resolution: {integrity: sha512-1cWCk+ZshEkSVEZrm2fSj1Gz8sYvxgUL4Q78+1ZZqeqfuevPTPk033/yUZ3df8BKMohkqqHfzj0HOOrG0KtXTw==} @@ -1106,6 +1125,11 @@ packages: resolution: {integrity: sha512-0/TdC3aeRAsW7MDvYRwEc1Uwm0TIBfzjPFgg60UU2Haj5qsCs9cc3zNgY71edqE3LbWfF/WoZQd3lJoDXFQpag==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript/vfs@1.6.0': + resolution: {integrity: sha512-hvJUjNVeBMp77qPINuUvYXj4FyWeeMMKZkxEATEU3hqBAQ7qdTBCUFT7Sp0Zu0faeEtFf+ldXxMEDr/bk73ISg==} + peerDependencies: + typescript: '*' + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -2860,6 +2884,11 @@ packages: peerDependencies: typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x + typescript@5.4.5: + resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + engines: {node: '>=14.17'} + hasBin: true + typescript@5.6.2: resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} engines: {node: '>=14.17'} @@ -3138,6 +3167,24 @@ snapshots: '@bufbuild/protobuf@1.10.0': {} + '@bufbuild/protobuf@2.2.0': {} + + '@bufbuild/protoc-gen-es@2.2.0(@bufbuild/protobuf@2.2.0)': + dependencies: + '@bufbuild/protoplugin': 2.2.0 + optionalDependencies: + '@bufbuild/protobuf': 2.2.0 + transitivePeerDependencies: + - supports-color + + '@bufbuild/protoplugin@2.2.0': + dependencies: + '@bufbuild/protobuf': 2.2.0 + '@typescript/vfs': 1.6.0(typescript@5.4.5) + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + '@changesets/apply-release-plan@7.0.5': dependencies: '@changesets/config': 3.0.3 @@ -3892,6 +3939,13 @@ snapshots: '@typescript-eslint/types': 8.8.1 eslint-visitor-keys: 3.4.3 + '@typescript/vfs@1.6.0(typescript@5.4.5)': + dependencies: + debug: 4.3.7 + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + '@ungap/structured-clone@1.2.0': {} '@vitest/expect@2.1.2': @@ -5887,6 +5941,8 @@ snapshots: typescript: 5.6.2 yaml: 2.5.1 + typescript@5.4.5: {} + typescript@5.6.2: {} uc.micro@2.1.0: {}