diff --git a/packages/livekit-rtc/.cargo/config.toml b/packages/livekit-rtc/.cargo/config.toml deleted file mode 100644 index 2dc4a504..00000000 --- a/packages/livekit-rtc/.cargo/config.toml +++ /dev/null @@ -1,17 +0,0 @@ -[target.x86_64-pc-windows-msvc] -rustflags = ["-C", "target-feature=+crt-static"] - -[target.aarch64-pc-windows-msvc] -rustflags = ["-C", "target-feature=+crt-static"] - -[target.x86_64-apple-darwin] -rustflags = ["-C", "link-args=-ObjC"] - -[target.aarch64-apple-darwin] -rustflags = ["-C", "link-args=-ObjC"] - -[target.aarch64-apple-ios] -rustflags = ["-C", "link-args=-ObjC"] - -[target.aarch64-apple-ios-sim] -rustflags = ["-C", "link-args=-ObjC"] \ No newline at end of file diff --git a/packages/livekit-rtc/Cargo.toml b/packages/livekit-rtc/Cargo.toml deleted file mode 100644 index e6585bd0..00000000 --- a/packages/livekit-rtc/Cargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -[package] -edition = "2021" -name = "rtc-node" -version = "0.0.1" - -[lib] -crate-type = ["cdylib"] - -[dependencies] -napi = { version = "2.12.2", default-features = false, features = [ - "async", - "napi6", -] } -napi-derive = "2.12.2" -livekit-ffi = { path = "./rust-sdks/livekit-ffi" } -prost = "0.14" -prost-types = "0.14" -log = "0.4.20" -tokio = { version = "1.37.0", features = ["full"] } - -[build-dependencies] -napi-build = "2.0.1" - -[profile.release] -lto = true diff --git a/packages/livekit-rtc/build.rs b/packages/livekit-rtc/build.rs deleted file mode 100644 index ac4fd9d0..00000000 --- a/packages/livekit-rtc/build.rs +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-FileCopyrightText: 2024 LiveKit, Inc. -// -// SPDX-License-Identifier: Apache-2.0 - -extern crate napi_build; - -fn main() { - napi_build::setup(); -} diff --git a/packages/livekit-rtc/generate_proto.sh b/packages/livekit-rtc/generate_proto.sh deleted file mode 100755 index 8727585e..00000000 --- a/packages/livekit-rtc/generate_proto.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -# SPDX-FileCopyrightText: 2024 LiveKit, Inc. -# -# SPDX-License-Identifier: Apache-2.0 - -# This script requires protobuf-compiler and https://www.npmjs.com/package/@bufbuild/protoc-gen-es -# `brew install protobuf-c && npm install -g @bufbuild/protoc-gen-es@2.2.0` - -FFI_PROTOCOL=./rust-sdks/livekit-ffi/protocol -FFI_OUT_NODE=./src/proto - -# ffi -PATH=$PATH:$(pwd)/node_modules/.bin \ - protoc \ - -I=$FFI_PROTOCOL \ - --es_out $FFI_OUT_NODE \ - --es_opt target=ts \ - --es_opt import_extension=.js \ - $FFI_PROTOCOL/audio_frame.proto \ - $FFI_PROTOCOL/ffi.proto \ - $FFI_PROTOCOL/handle.proto \ - $FFI_PROTOCOL/participant.proto \ - $FFI_PROTOCOL/room.proto \ - $FFI_PROTOCOL/track.proto \ - $FFI_PROTOCOL/track_publication.proto \ - $FFI_PROTOCOL/video_frame.proto \ - $FFI_PROTOCOL/e2ee.proto \ - $FFI_PROTOCOL/stats.proto \ - $FFI_PROTOCOL/rpc.proto \ - $FFI_PROTOCOL/track_publication.proto \ - $FFI_PROTOCOL/data_stream.proto diff --git a/packages/livekit-rtc/npm/darwin-arm64/CHANGELOG.md b/packages/livekit-rtc/npm/darwin-arm64/CHANGELOG.md deleted file mode 100644 index 3b986752..00000000 --- a/packages/livekit-rtc/npm/darwin-arm64/CHANGELOG.md +++ /dev/null @@ -1,101 +0,0 @@ -# @livekit/rtc-node-darwin-arm64 - -## 0.13.23 - -## 0.13.22 - -## 0.13.21 - -## 0.13.20 - -## 0.13.19 - -## 0.13.18 - -## 0.13.17 - -## 0.13.16 - -## 0.13.15 - -## 0.13.14 - -## 0.13.13 - -## 0.13.12 - -## 0.13.11 - -## 0.13.10 - -## 0.13.9 - -## 0.13.8 - -## 0.13.7 - -## 0.13.6 - -## 0.13.5 - -## 0.13.4 - -## 0.13.3 - -## 0.13.2 - -## 0.13.1 - -## 0.13.0 - -## 0.12.2 - -## 0.12.1 - -## 0.12.0 - -## 0.11.1 - -## 0.11.0 - -## 0.10.4 - -## 0.10.3 - -## 0.10.2 - -## 0.10.1 - -## 0.10.0 - -## 0.9.2 - -## 0.9.1 - -## 0.9.0 - -## 0.8.1 - -## 0.8.0 - -## 0.7.0 - -## 0.6.2 - -## 0.6.1 - -## 0.6.0 - -## 0.5.1 - -## 0.5.0 - -## 0.4.4 - -## 0.4.3 - -## 0.4.2 - -## 0.4.1 - -## 0.4.0 diff --git a/packages/livekit-rtc/npm/darwin-arm64/README.md b/packages/livekit-rtc/npm/darwin-arm64/README.md deleted file mode 100644 index 0eab86b1..00000000 --- a/packages/livekit-rtc/npm/darwin-arm64/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@livekit/rtc-node-darwin-arm64` - -This is the **aarch64-apple-darwin** binary for `@livekit/rtc-node` diff --git a/packages/livekit-rtc/npm/darwin-arm64/package.json b/packages/livekit-rtc/npm/darwin-arm64/package.json deleted file mode 100644 index 2ccb5499..00000000 --- a/packages/livekit-rtc/npm/darwin-arm64/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@livekit/rtc-node-darwin-arm64", - "version": "0.13.23", - "repository": { - "type": "git", - "url": "https://github.com/livekit/node-sdks.git", - "directory": "packages/livekit-rtc/darwin-arm64" - }, - "os": [ - "darwin" - ], - "cpu": [ - "arm64" - ], - "main": "rtc-node.darwin-arm64.node", - "files": [ - "rtc-node.darwin-arm64.node" - ], - "license": "Apache-2.0", - "engines": { - "node": ">= 10" - } -} \ No newline at end of file diff --git a/packages/livekit-rtc/npm/darwin-x64/CHANGELOG.md b/packages/livekit-rtc/npm/darwin-x64/CHANGELOG.md deleted file mode 100644 index 60d09bf3..00000000 --- a/packages/livekit-rtc/npm/darwin-x64/CHANGELOG.md +++ /dev/null @@ -1,101 +0,0 @@ -# @livekit/rtc-node-darwin-x64 - -## 0.13.23 - -## 0.13.22 - -## 0.13.21 - -## 0.13.20 - -## 0.13.19 - -## 0.13.18 - -## 0.13.17 - -## 0.13.16 - -## 0.13.15 - -## 0.13.14 - -## 0.13.13 - -## 0.13.12 - -## 0.13.11 - -## 0.13.10 - -## 0.13.9 - -## 0.13.8 - -## 0.13.7 - -## 0.13.6 - -## 0.13.5 - -## 0.13.4 - -## 0.13.3 - -## 0.13.2 - -## 0.13.1 - -## 0.13.0 - -## 0.12.2 - -## 0.12.1 - -## 0.12.0 - -## 0.11.1 - -## 0.11.0 - -## 0.10.4 - -## 0.10.3 - -## 0.10.2 - -## 0.10.1 - -## 0.10.0 - -## 0.9.2 - -## 0.9.1 - -## 0.9.0 - -## 0.8.1 - -## 0.8.0 - -## 0.7.0 - -## 0.6.2 - -## 0.6.1 - -## 0.6.0 - -## 0.5.1 - -## 0.5.0 - -## 0.4.4 - -## 0.4.3 - -## 0.4.2 - -## 0.4.1 - -## 0.4.0 diff --git a/packages/livekit-rtc/npm/darwin-x64/README.md b/packages/livekit-rtc/npm/darwin-x64/README.md deleted file mode 100644 index d0da2076..00000000 --- a/packages/livekit-rtc/npm/darwin-x64/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@livekit/rtc-node-darwin-x64` - -This is the **x86_64-apple-darwin** binary for `@livekit/rtc-node` diff --git a/packages/livekit-rtc/npm/darwin-x64/package.json b/packages/livekit-rtc/npm/darwin-x64/package.json deleted file mode 100644 index 6de94597..00000000 --- a/packages/livekit-rtc/npm/darwin-x64/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@livekit/rtc-node-darwin-x64", - "author": "LiveKit", - "version": "0.13.23", - "repository": { - "type": "git", - "url": "https://github.com/livekit/node-sdks.git", - "directory": "packages/livekit-rtc/darwin-x64" - }, - "os": [ - "darwin" - ], - "cpu": [ - "x64" - ], - "main": "rtc-node.darwin-x64.node", - "files": [ - "rtc-node.darwin-x64.node" - ], - "license": "Apache-2.0", - "engines": { - "node": ">= 10" - } -} \ No newline at end of file diff --git a/packages/livekit-rtc/npm/linux-arm64-gnu/CHANGELOG.md b/packages/livekit-rtc/npm/linux-arm64-gnu/CHANGELOG.md deleted file mode 100644 index 56c5c2ba..00000000 --- a/packages/livekit-rtc/npm/linux-arm64-gnu/CHANGELOG.md +++ /dev/null @@ -1,101 +0,0 @@ -# @livekit/rtc-node-linux-arm64-gnu - -## 0.13.23 - -## 0.13.22 - -## 0.13.21 - -## 0.13.20 - -## 0.13.19 - -## 0.13.18 - -## 0.13.17 - -## 0.13.16 - -## 0.13.15 - -## 0.13.14 - -## 0.13.13 - -## 0.13.12 - -## 0.13.11 - -## 0.13.10 - -## 0.13.9 - -## 0.13.8 - -## 0.13.7 - -## 0.13.6 - -## 0.13.5 - -## 0.13.4 - -## 0.13.3 - -## 0.13.2 - -## 0.13.1 - -## 0.13.0 - -## 0.12.2 - -## 0.12.1 - -## 0.12.0 - -## 0.11.1 - -## 0.11.0 - -## 0.10.4 - -## 0.10.3 - -## 0.10.2 - -## 0.10.1 - -## 0.10.0 - -## 0.9.2 - -## 0.9.1 - -## 0.9.0 - -## 0.8.1 - -## 0.8.0 - -## 0.7.0 - -## 0.6.2 - -## 0.6.1 - -## 0.6.0 - -## 0.5.1 - -## 0.5.0 - -## 0.4.4 - -## 0.4.3 - -## 0.4.2 - -## 0.4.1 - -## 0.4.0 diff --git a/packages/livekit-rtc/npm/linux-arm64-gnu/README.md b/packages/livekit-rtc/npm/linux-arm64-gnu/README.md deleted file mode 100644 index 0969fffb..00000000 --- a/packages/livekit-rtc/npm/linux-arm64-gnu/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@livekit/rtc-node-linux-arm64-gnu` - -This is the **aarch64-unknown-linux-gnu** binary for `@livekit/rtc-node` diff --git a/packages/livekit-rtc/npm/linux-arm64-gnu/package.json b/packages/livekit-rtc/npm/linux-arm64-gnu/package.json deleted file mode 100644 index 41e76148..00000000 --- a/packages/livekit-rtc/npm/linux-arm64-gnu/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "@livekit/rtc-node-linux-arm64-gnu", - "author": "LiveKit", - "version": "0.13.23", - "repository": { - "type": "git", - "url": "https://github.com/livekit/node-sdks.git", - "directory": "packages/livekit-rtc/linux-arm64-gnu" - }, - "os": [ - "linux" - ], - "cpu": [ - "arm64" - ], - "main": "rtc-node.linux-arm64-gnu.node", - "files": [ - "rtc-node.linux-arm64-gnu.node" - ], - "license": "Apache-2.0", - "engines": { - "node": ">= 10" - }, - "libc": [ - "glibc" - ] -} \ No newline at end of file diff --git a/packages/livekit-rtc/npm/linux-x64-gnu/CHANGELOG.md b/packages/livekit-rtc/npm/linux-x64-gnu/CHANGELOG.md deleted file mode 100644 index e45315d3..00000000 --- a/packages/livekit-rtc/npm/linux-x64-gnu/CHANGELOG.md +++ /dev/null @@ -1,101 +0,0 @@ -# @livekit/rtc-node-linux-x64-gnu - -## 0.13.23 - -## 0.13.22 - -## 0.13.21 - -## 0.13.20 - -## 0.13.19 - -## 0.13.18 - -## 0.13.17 - -## 0.13.16 - -## 0.13.15 - -## 0.13.14 - -## 0.13.13 - -## 0.13.12 - -## 0.13.11 - -## 0.13.10 - -## 0.13.9 - -## 0.13.8 - -## 0.13.7 - -## 0.13.6 - -## 0.13.5 - -## 0.13.4 - -## 0.13.3 - -## 0.13.2 - -## 0.13.1 - -## 0.13.0 - -## 0.12.2 - -## 0.12.1 - -## 0.12.0 - -## 0.11.1 - -## 0.11.0 - -## 0.10.4 - -## 0.10.3 - -## 0.10.2 - -## 0.10.1 - -## 0.10.0 - -## 0.9.2 - -## 0.9.1 - -## 0.9.0 - -## 0.8.1 - -## 0.8.0 - -## 0.7.0 - -## 0.6.2 - -## 0.6.1 - -## 0.6.0 - -## 0.5.1 - -## 0.5.0 - -## 0.4.4 - -## 0.4.3 - -## 0.4.2 - -## 0.4.1 - -## 0.4.0 diff --git a/packages/livekit-rtc/npm/linux-x64-gnu/README.md b/packages/livekit-rtc/npm/linux-x64-gnu/README.md deleted file mode 100644 index 0d42861f..00000000 --- a/packages/livekit-rtc/npm/linux-x64-gnu/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@livekit/rtc-node-linux-x64-gnu` - -This is the **x86_64-unknown-linux-gnu** binary for `@livekit/rtc-node` diff --git a/packages/livekit-rtc/npm/linux-x64-gnu/package.json b/packages/livekit-rtc/npm/linux-x64-gnu/package.json deleted file mode 100644 index 040d86bc..00000000 --- a/packages/livekit-rtc/npm/linux-x64-gnu/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "@livekit/rtc-node-linux-x64-gnu", - "author": "LiveKit", - "version": "0.13.23", - "repository": { - "type": "git", - "url": "https://github.com/livekit/node-sdks.git", - "directory": "packages/livekit-rtc/linux-x64-gnu" - }, - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "main": "rtc-node.linux-x64-gnu.node", - "files": [ - "rtc-node.linux-x64-gnu.node" - ], - "license": "Apache-2.0", - "engines": { - "node": ">= 10" - }, - "libc": [ - "glibc" - ] -} \ No newline at end of file diff --git a/packages/livekit-rtc/npm/win32-x64-msvc/CHANGELOG.md b/packages/livekit-rtc/npm/win32-x64-msvc/CHANGELOG.md deleted file mode 100644 index a6c17a3d..00000000 --- a/packages/livekit-rtc/npm/win32-x64-msvc/CHANGELOG.md +++ /dev/null @@ -1,101 +0,0 @@ -# @livekit/rtc-node-win32-x64-msvc - -## 0.13.23 - -## 0.13.22 - -## 0.13.21 - -## 0.13.20 - -## 0.13.19 - -## 0.13.18 - -## 0.13.17 - -## 0.13.16 - -## 0.13.15 - -## 0.13.14 - -## 0.13.13 - -## 0.13.12 - -## 0.13.11 - -## 0.13.10 - -## 0.13.9 - -## 0.13.8 - -## 0.13.7 - -## 0.13.6 - -## 0.13.5 - -## 0.13.4 - -## 0.13.3 - -## 0.13.2 - -## 0.13.1 - -## 0.13.0 - -## 0.12.2 - -## 0.12.1 - -## 0.12.0 - -## 0.11.1 - -## 0.11.0 - -## 0.10.4 - -## 0.10.3 - -## 0.10.2 - -## 0.10.1 - -## 0.10.0 - -## 0.9.2 - -## 0.9.1 - -## 0.9.0 - -## 0.8.1 - -## 0.8.0 - -## 0.7.0 - -## 0.6.2 - -## 0.6.1 - -## 0.6.0 - -## 0.5.1 - -## 0.5.0 - -## 0.4.4 - -## 0.4.3 - -## 0.4.2 - -## 0.4.1 - -## 0.4.0 diff --git a/packages/livekit-rtc/npm/win32-x64-msvc/README.md b/packages/livekit-rtc/npm/win32-x64-msvc/README.md deleted file mode 100644 index ed317839..00000000 --- a/packages/livekit-rtc/npm/win32-x64-msvc/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@livekit/rtc-node-win32-x64-msvc` - -This is the **x86_64-pc-windows-msvc** binary for `@livekit/rtc-node` diff --git a/packages/livekit-rtc/npm/win32-x64-msvc/package.json b/packages/livekit-rtc/npm/win32-x64-msvc/package.json deleted file mode 100644 index caac4df7..00000000 --- a/packages/livekit-rtc/npm/win32-x64-msvc/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@livekit/rtc-node-win32-x64-msvc", - "author": "LiveKit", - "version": "0.13.23", - "repository": { - "type": "git", - "url": "https://github.com/livekit/node-sdks.git", - "directory": "packages/livekit-rtc/win32-x64-msvc" - }, - "os": [ - "win32" - ], - "cpu": [ - "x64" - ], - "main": "rtc-node.win32-x64-msvc.node", - "files": [ - "rtc-node.win32-x64-msvc.node" - ], - "license": "Apache-2.0", - "engines": { - "node": ">= 10" - } -} \ No newline at end of file diff --git a/packages/livekit-rtc/package.json b/packages/livekit-rtc/package.json index 2ffce480..4a712379 100644 --- a/packages/livekit-rtc/package.json +++ b/packages/livekit-rtc/package.json @@ -32,53 +32,27 @@ "Cargo.toml", "Cargo.lock" ], - "napi": { - "name": "rtc-node", - "triples": { - "defaults": false, - "additional": [ - "aarch64-apple-darwin", - "x86_64-apple-darwin", - "aarch64-unknown-linux-gnu", - "x86_64-unknown-linux-gnu", - "x86_64-pc-windows-msvc" - ] - } - }, "dependencies": { - "@bufbuild/protobuf": "^1.10.1", "@datastructures-js/deque": "1.0.8", "@livekit/mutex": "^1.0.0", "@livekit/typed-emitter": "^3.0.0", + "@livekit/node-rtc-ffi-bindings": "latest", "pino": "^9.0.0", "pino-pretty": "^13.0.0" }, "devDependencies": { - "@bufbuild/protoc-gen-es": "^1.10.1", - "@napi-rs/cli": "^2.18.0", + "@bufbuild/protobuf": "^1.10.1", "@types/node": "^22.13.10", "prettier": "^3.0.3", "tsup": "^8.3.5", "typescript": "5.8.2" }, - "optionalDependencies": { - "@livekit/rtc-node-darwin-arm64": "workspace:*", - "@livekit/rtc-node-darwin-x64": "workspace:*", - "@livekit/rtc-node-linux-arm64-gnu": "workspace:*", - "@livekit/rtc-node-linux-x64-gnu": "workspace:*", - "@livekit/rtc-node-win32-x64-msvc": "workspace:*" - }, "engines": { "node": ">= 18" }, "scripts": { "prebuild": "node -p \"'export const SDK_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts", - "build:ts": "pnpm prebuild && tsup --onSuccess \"tsc --declaration --emitDeclarationOnly\" && cp -r src/napi dist/ && cp -r src/napi/* dist/", - "build": "pnpm build:ts && napi build --platform --release --dts native.d.ts --js native.cjs --pipe \"prettier -w\" src/napi", - "artifacts": "pnpm build:ts && napi artifacts", - "build:debug": "napi build --platform", - "lint": "eslint -f unix \"src/**/*.ts\" --ignore-pattern \"src/proto/*\"", - "universal": "napi universal", - "version": "napi version" + "build": "pnpm prebuild && tsup --onSuccess \"tsc --declaration --emitDeclarationOnly\"", + "lint": "eslint -f unix \"src/**/*.ts\" --ignore-pattern \"src/proto/*\"" } } diff --git a/packages/livekit-rtc/rust-sdks b/packages/livekit-rtc/rust-sdks deleted file mode 160000 index 36caec5a..00000000 --- a/packages/livekit-rtc/rust-sdks +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 36caec5a581106e9aa4b7c9b1f4245a5602d761f diff --git a/packages/livekit-rtc/src/audio_filter.ts b/packages/livekit-rtc/src/audio_filter.ts index 2f73fe92..1155cafe 100644 --- a/packages/livekit-rtc/src/audio_filter.ts +++ b/packages/livekit-rtc/src/audio_filter.ts @@ -1,9 +1,9 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 +import type { LoadAudioFilterPluginResponse } from '@livekit/node-rtc-ffi-bindings'; +import { LoadAudioFilterPluginRequest } from '@livekit/node-rtc-ffi-bindings'; import { FfiClient } from './ffi_client.js'; -import type { LoadAudioFilterPluginResponse } from './proto/audio_frame_pb.js'; -import { LoadAudioFilterPluginRequest } from './proto/audio_frame_pb.js'; export class AudioFilter { constructor(moduleId: string, path: string, dependencies: string[] = []) { diff --git a/packages/livekit-rtc/src/audio_frame.ts b/packages/livekit-rtc/src/audio_frame.ts index 75b18f22..6c6041d8 100644 --- a/packages/livekit-rtc/src/audio_frame.ts +++ b/packages/livekit-rtc/src/audio_frame.ts @@ -1,9 +1,9 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 +import type { OwnedAudioFrameBuffer } from '@livekit/node-rtc-ffi-bindings'; +import { AudioFrameBufferInfo } from '@livekit/node-rtc-ffi-bindings'; import { FfiClient, FfiHandle } from './ffi_client.js'; -import type { OwnedAudioFrameBuffer } from './proto/audio_frame_pb.js'; -import { AudioFrameBufferInfo } from './proto/audio_frame_pb.js'; export class AudioFrame { data: Int16Array; diff --git a/packages/livekit-rtc/src/audio_resampler.ts b/packages/livekit-rtc/src/audio_resampler.ts index 82dfe0fc..767d99af 100644 --- a/packages/livekit-rtc/src/audio_resampler.ts +++ b/packages/livekit-rtc/src/audio_resampler.ts @@ -1,20 +1,20 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 -import { AudioFrame } from './audio_frame.js'; -import { FfiClient, FfiHandle } from './ffi_client.js'; import type { FlushSoxResamplerResponse, NewSoxResamplerResponse, PushSoxResamplerResponse, -} from './proto/audio_frame_pb.js'; +} from '@livekit/node-rtc-ffi-bindings'; import { FlushSoxResamplerRequest, NewSoxResamplerRequest, PushSoxResamplerRequest, SoxQualityRecipe, SoxResamplerDataType, -} from './proto/audio_frame_pb.js'; +} from '@livekit/node-rtc-ffi-bindings'; +import { AudioFrame } from './audio_frame.js'; +import { FfiClient, FfiHandle } from './ffi_client.js'; /** * Resampler quality. Higher quality settings result in better audio quality but require more diff --git a/packages/livekit-rtc/src/audio_source.ts b/packages/livekit-rtc/src/audio_source.ts index db3e98db..cbb4d1f5 100644 --- a/packages/livekit-rtc/src/audio_source.ts +++ b/packages/livekit-rtc/src/audio_source.ts @@ -1,22 +1,22 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 -import type { AudioFrame } from './audio_frame.js'; -import { FfiClient } from './ffi_client.js'; -import { FfiHandle } from './napi/native.js'; import type { AudioSourceInfo, CaptureAudioFrameCallback, CaptureAudioFrameResponse, ClearAudioBufferResponse, NewAudioSourceResponse, -} from './proto/audio_frame_pb.js'; +} from '@livekit/node-rtc-ffi-bindings'; import { AudioSourceType, CaptureAudioFrameRequest, ClearAudioBufferRequest, + FfiHandle, NewAudioSourceRequest, -} from './proto/audio_frame_pb.js'; +} from '@livekit/node-rtc-ffi-bindings'; +import type { AudioFrame } from './audio_frame.js'; +import { FfiClient } from './ffi_client.js'; export class AudioSource { /** @internal */ diff --git a/packages/livekit-rtc/src/audio_stream.ts b/packages/livekit-rtc/src/audio_stream.ts index 16aac433..3322a3a1 100644 --- a/packages/livekit-rtc/src/audio_stream.ts +++ b/packages/livekit-rtc/src/audio_stream.ts @@ -1,14 +1,14 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 +import type { NewAudioStreamResponse } from '@livekit/node-rtc-ffi-bindings'; +import { AudioStreamType, NewAudioStreamRequest } from '@livekit/node-rtc-ffi-bindings'; import type { UnderlyingSource } from 'node:stream/web'; import { AudioFrame } from './audio_frame.js'; import type { FfiEvent } from './ffi_client.js'; import { FfiClient, FfiClientEvent, FfiHandle } from './ffi_client.js'; import { FrameProcessor } from './frame_processor.js'; import { log } from './log.js'; -import type { NewAudioStreamResponse } from './proto/audio_frame_pb.js'; -import { AudioStreamType, NewAudioStreamRequest } from './proto/audio_frame_pb.js'; import type { Track } from './track.js'; export interface AudioStreamOptions { diff --git a/packages/livekit-rtc/src/data_streams/stream_reader.ts b/packages/livekit-rtc/src/data_streams/stream_reader.ts index 8e0528c0..9cc475a4 100644 --- a/packages/livekit-rtc/src/data_streams/stream_reader.ts +++ b/packages/livekit-rtc/src/data_streams/stream_reader.ts @@ -1,8 +1,8 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 +import type { DataStream_Chunk } from '@livekit/node-rtc-ffi-bindings'; import { log } from '../log.js'; -import type { DataStream_Chunk } from '../proto/room_pb.js'; import { bigIntToNumber } from '../utils.js'; import type { BaseStreamInfo, ByteStreamInfo, TextStreamInfo } from './types.js'; diff --git a/packages/livekit-rtc/src/data_streams/types.ts b/packages/livekit-rtc/src/data_streams/types.ts index c7064fbc..30ac1d95 100644 --- a/packages/livekit-rtc/src/data_streams/types.ts +++ b/packages/livekit-rtc/src/data_streams/types.ts @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 -import type { DataStream_Chunk, DataStream_Header } from '../proto/room_pb.js'; +import type { DataStream_Chunk, DataStream_Header } from '@livekit/node-rtc-ffi-bindings'; import type { ByteStreamReader, TextStreamReader } from './stream_reader.js'; export interface StreamController { diff --git a/packages/livekit-rtc/src/e2ee.ts b/packages/livekit-rtc/src/e2ee.ts index 2de00256..3b611693 100644 --- a/packages/livekit-rtc/src/e2ee.ts +++ b/packages/livekit-rtc/src/e2ee.ts @@ -1,7 +1,6 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 -import { FfiClient } from './ffi_client.js'; import type { E2eeManagerGetFrameCryptorsResponse, E2eeResponse, @@ -9,7 +8,7 @@ import type { GetSharedKeyResponse, RatchetKeyResponse, RatchetSharedKeyResponse, -} from './proto/e2ee_pb.js'; +} from '@livekit/node-rtc-ffi-bindings'; import { E2eeManagerSetEnabledRequest, E2eeRequest, @@ -22,7 +21,8 @@ import { RatchetSharedKeyRequest, SetKeyRequest, SetSharedKeyRequest, -} from './proto/e2ee_pb.js'; +} from '@livekit/node-rtc-ffi-bindings'; +import { FfiClient } from './ffi_client.js'; const DEFAULT_RATCHET_SALT = new TextEncoder().encode('LKFrameEncryptionKey'); const DEFAULT_RATCHET_WINDOW_SIZE = 16; diff --git a/packages/livekit-rtc/src/ffi_client.ts b/packages/livekit-rtc/src/ffi_client.ts index 857b712b..0c891f8c 100644 --- a/packages/livekit-rtc/src/ffi_client.ts +++ b/packages/livekit-rtc/src/ffi_client.ts @@ -2,8 +2,6 @@ // // SPDX-License-Identifier: Apache-2.0 import type { PartialMessage } from '@bufbuild/protobuf'; -import type { TypedEventEmitter as TypedEmitter } from '@livekit/typed-emitter'; -import EventEmitter from 'events'; import { FfiHandle, livekitCopyBuffer, @@ -11,8 +9,10 @@ import { livekitFfiRequest, livekitInitialize, livekitRetrievePtr, -} from './napi/native.js'; -import { FfiEvent, FfiRequest, FfiResponse } from './proto/ffi_pb.js'; +} from '@livekit/node-rtc-ffi-bindings'; +import { FfiEvent, FfiRequest, FfiResponse } from '@livekit/node-rtc-ffi-bindings'; +import type { TypedEventEmitter as TypedEmitter } from '@livekit/typed-emitter'; +import EventEmitter from 'events'; import { SDK_VERSION } from './version.js'; export { FfiHandle, type FfiEvent, type FfiResponse, FfiRequest, livekitDispose as dispose }; diff --git a/packages/livekit-rtc/src/index.ts b/packages/livekit-rtc/src/index.ts index d60dc5a7..602f67c6 100644 --- a/packages/livekit-rtc/src/index.ts +++ b/packages/livekit-rtc/src/index.ts @@ -14,8 +14,8 @@ export { E2EEManager, FrameCryptor, KeyProvider } from './e2ee.js'; export type { E2EEOptions, KeyProviderOptions } from './e2ee.js'; export { dispose } from './ffi_client.js'; export { LocalParticipant, Participant, RemoteParticipant } from './participant.js'; -export { EncryptionState, EncryptionType } from './proto/e2ee_pb.js'; -export { DisconnectReason, ParticipantKind } from './proto/participant_pb.js'; +export { EncryptionState, EncryptionType } from '@livekit/node-rtc-ffi-bindings'; +export { DisconnectReason, ParticipantKind } from '@livekit/node-rtc-ffi-bindings'; export { ConnectionQuality, ConnectionState, @@ -24,9 +24,9 @@ export { IceServer, IceTransportType, TrackPublishOptions, -} from './proto/room_pb.js'; -export { StreamState, TrackKind, TrackSource } from './proto/track_pb.js'; -export { VideoBufferType, VideoCodec, VideoRotation } from './proto/video_frame_pb.js'; +} from '@livekit/node-rtc-ffi-bindings'; +export { StreamState, TrackKind, TrackSource } from '@livekit/node-rtc-ffi-bindings'; +export { VideoBufferType, VideoCodec, VideoRotation } from '@livekit/node-rtc-ffi-bindings'; export { ConnectError, Room, RoomEvent, type RoomOptions, type RtcConfiguration } from './room.js'; export { RpcError, type PerformRpcParams, type RpcInvocationData } from './rpc.js'; export { diff --git a/packages/livekit-rtc/src/lib.rs b/packages/livekit-rtc/src/lib.rs deleted file mode 100644 index e398ddd2..00000000 --- a/packages/livekit-rtc/src/lib.rs +++ /dev/null @@ -1,9 +0,0 @@ -#![deny(clippy::all)] - -// SPDX-FileCopyrightText: 2024 LiveKit, Inc. -// -// SPDX-License-Identifier: Apache-2.0 - -extern crate napi_derive; - -pub mod nodejs; diff --git a/packages/livekit-rtc/src/napi/native.cjs b/packages/livekit-rtc/src/napi/native.cjs deleted file mode 100644 index 7b914871..00000000 --- a/packages/livekit-rtc/src/napi/native.cjs +++ /dev/null @@ -1,301 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/* prettier-ignore */ - -/* auto-generated by NAPI-RS */ - -const { existsSync, readFileSync } = require('fs') -const { join } = require('path'); - -const { platform, arch } = process; - -let nativeBinding = null; -let localFileExisted = false; -let loadError = null; - -function isMusl() { - // For Node 10 - if (!process.report || typeof process.report.getReport !== 'function') { - try { - const lddPath = require('child_process').execSync('which ldd').toString().trim(); - return readFileSync(lddPath, 'utf8').includes('musl'); - } catch (e) { - return true; - } - } else { - const { glibcVersionRuntime } = process.report.getReport().header; - return !glibcVersionRuntime; - } -} - -switch (platform) { - case 'android': - switch (arch) { - case 'arm64': - localFileExisted = existsSync(join(__dirname, 'rtc-node.android-arm64.node')); - try { - if (localFileExisted) { - nativeBinding = require('./rtc-node.android-arm64.node'); - } else { - nativeBinding = require('@livekit/rtc-node-android-arm64'); - } - } catch (e) { - loadError = e; - } - break; - case 'arm': - localFileExisted = existsSync(join(__dirname, 'rtc-node.android-arm-eabi.node')); - try { - if (localFileExisted) { - nativeBinding = require('./rtc-node.android-arm-eabi.node'); - } else { - nativeBinding = require('@livekit/rtc-node-android-arm-eabi'); - } - } catch (e) { - loadError = e; - } - break; - default: - throw new Error(`Unsupported architecture on Android ${arch}`); - } - break; - case 'win32': - switch (arch) { - case 'x64': - localFileExisted = existsSync(join(__dirname, 'rtc-node.win32-x64-msvc.node')); - try { - if (localFileExisted) { - nativeBinding = require('./rtc-node.win32-x64-msvc.node'); - } else { - nativeBinding = require('@livekit/rtc-node-win32-x64-msvc'); - } - } catch (e) { - loadError = e; - } - break; - case 'ia32': - localFileExisted = existsSync(join(__dirname, 'rtc-node.win32-ia32-msvc.node')); - try { - if (localFileExisted) { - nativeBinding = require('./rtc-node.win32-ia32-msvc.node'); - } else { - nativeBinding = require('@livekit/rtc-node-win32-ia32-msvc'); - } - } catch (e) { - loadError = e; - } - break; - case 'arm64': - localFileExisted = existsSync(join(__dirname, 'rtc-node.win32-arm64-msvc.node')); - try { - if (localFileExisted) { - nativeBinding = require('./rtc-node.win32-arm64-msvc.node'); - } else { - nativeBinding = require('@livekit/rtc-node-win32-arm64-msvc'); - } - } catch (e) { - loadError = e; - } - break; - default: - throw new Error(`Unsupported architecture on Windows: ${arch}`); - } - break; - case 'darwin': - localFileExisted = existsSync(join(__dirname, 'rtc-node.darwin-universal.node')); - try { - if (localFileExisted) { - nativeBinding = require('./rtc-node.darwin-universal.node'); - } else { - nativeBinding = require('@livekit/rtc-node-darwin-universal'); - } - break; - } catch {} - switch (arch) { - case 'x64': - localFileExisted = existsSync(join(__dirname, 'rtc-node.darwin-x64.node')); - try { - if (localFileExisted) { - nativeBinding = require('./rtc-node.darwin-x64.node'); - } else { - nativeBinding = require('@livekit/rtc-node-darwin-x64'); - } - } catch (e) { - loadError = e; - } - break; - case 'arm64': - localFileExisted = existsSync(join(__dirname, 'rtc-node.darwin-arm64.node')); - try { - if (localFileExisted) { - nativeBinding = require('./rtc-node.darwin-arm64.node'); - } else { - nativeBinding = require('@livekit/rtc-node-darwin-arm64'); - } - } catch (e) { - loadError = e; - } - break; - default: - throw new Error(`Unsupported architecture on macOS: ${arch}`); - } - break; - case 'freebsd': - if (arch !== 'x64') { - throw new Error(`Unsupported architecture on FreeBSD: ${arch}`); - } - localFileExisted = existsSync(join(__dirname, 'rtc-node.freebsd-x64.node')); - try { - if (localFileExisted) { - nativeBinding = require('./rtc-node.freebsd-x64.node'); - } else { - nativeBinding = require('@livekit/rtc-node-freebsd-x64'); - } - } catch (e) { - loadError = e; - } - break; - case 'linux': - switch (arch) { - case 'x64': - if (isMusl()) { - localFileExisted = existsSync(join(__dirname, 'rtc-node.linux-x64-musl.node')); - try { - if (localFileExisted) { - nativeBinding = require('./rtc-node.linux-x64-musl.node'); - } else { - nativeBinding = require('@livekit/rtc-node-linux-x64-musl'); - } - } catch (e) { - loadError = e; - } - } else { - localFileExisted = existsSync(join(__dirname, 'rtc-node.linux-x64-gnu.node')); - try { - if (localFileExisted) { - nativeBinding = require('./rtc-node.linux-x64-gnu.node'); - } else { - nativeBinding = require('@livekit/rtc-node-linux-x64-gnu'); - } - } catch (e) { - loadError = e; - } - } - break; - case 'arm64': - if (isMusl()) { - localFileExisted = existsSync(join(__dirname, 'rtc-node.linux-arm64-musl.node')); - try { - if (localFileExisted) { - nativeBinding = require('./rtc-node.linux-arm64-musl.node'); - } else { - nativeBinding = require('@livekit/rtc-node-linux-arm64-musl'); - } - } catch (e) { - loadError = e; - } - } else { - localFileExisted = existsSync(join(__dirname, 'rtc-node.linux-arm64-gnu.node')); - try { - if (localFileExisted) { - nativeBinding = require('./rtc-node.linux-arm64-gnu.node'); - } else { - nativeBinding = require('@livekit/rtc-node-linux-arm64-gnu'); - } - } catch (e) { - loadError = e; - } - } - break; - case 'arm': - if (isMusl()) { - localFileExisted = existsSync(join(__dirname, 'rtc-node.linux-arm-musleabihf.node')); - try { - if (localFileExisted) { - nativeBinding = require('./rtc-node.linux-arm-musleabihf.node'); - } else { - nativeBinding = require('@livekit/rtc-node-linux-arm-musleabihf'); - } - } catch (e) { - loadError = e; - } - } else { - localFileExisted = existsSync(join(__dirname, 'rtc-node.linux-arm-gnueabihf.node')); - try { - if (localFileExisted) { - nativeBinding = require('./rtc-node.linux-arm-gnueabihf.node'); - } else { - nativeBinding = require('@livekit/rtc-node-linux-arm-gnueabihf'); - } - } catch (e) { - loadError = e; - } - } - break; - case 'riscv64': - if (isMusl()) { - localFileExisted = existsSync(join(__dirname, 'rtc-node.linux-riscv64-musl.node')); - try { - if (localFileExisted) { - nativeBinding = require('./rtc-node.linux-riscv64-musl.node'); - } else { - nativeBinding = require('@livekit/rtc-node-linux-riscv64-musl'); - } - } catch (e) { - loadError = e; - } - } else { - localFileExisted = existsSync(join(__dirname, 'rtc-node.linux-riscv64-gnu.node')); - try { - if (localFileExisted) { - nativeBinding = require('./rtc-node.linux-riscv64-gnu.node'); - } else { - nativeBinding = require('@livekit/rtc-node-linux-riscv64-gnu'); - } - } catch (e) { - loadError = e; - } - } - break; - case 's390x': - localFileExisted = existsSync(join(__dirname, 'rtc-node.linux-s390x-gnu.node')); - try { - if (localFileExisted) { - nativeBinding = require('./rtc-node.linux-s390x-gnu.node'); - } else { - nativeBinding = require('@livekit/rtc-node-linux-s390x-gnu'); - } - } catch (e) { - loadError = e; - } - break; - default: - throw new Error(`Unsupported architecture on Linux: ${arch}`); - } - break; - default: - throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`); -} - -if (!nativeBinding) { - if (loadError) { - throw loadError; - } - throw new Error(`Failed to load native binding`); -} - -const { - livekitInitialize, - livekitFfiRequest, - livekitRetrievePtr, - livekitCopyBuffer, - livekitDispose, - FfiHandle, -} = nativeBinding; - -module.exports.livekitInitialize = livekitInitialize; -module.exports.livekitFfiRequest = livekitFfiRequest; -module.exports.livekitRetrievePtr = livekitRetrievePtr; -module.exports.livekitCopyBuffer = livekitCopyBuffer; -module.exports.livekitDispose = livekitDispose; -module.exports.FfiHandle = FfiHandle; diff --git a/packages/livekit-rtc/src/napi/native.d.ts b/packages/livekit-rtc/src/napi/native.d.ts deleted file mode 100644 index 2483dafa..00000000 --- a/packages/livekit-rtc/src/napi/native.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ - -/* auto-generated by NAPI-RS */ - -export declare function livekitInitialize( - callback: (data: Uint8Array) => void, - captureLogs: boolean, - sdkVersion: string, -): void; -export declare function livekitFfiRequest(data: Uint8Array): Uint8Array; -export declare function livekitRetrievePtr(handle: Uint8Array): bigint; -export declare function livekitCopyBuffer(ptr: bigint, len: number): Uint8Array; -export declare function livekitDispose(): Promise; -export declare class FfiHandle { - constructor(handle: bigint); - dispose(): void; - get handle(): bigint; -} diff --git a/packages/livekit-rtc/src/napi/native.js b/packages/livekit-rtc/src/napi/native.js deleted file mode 100644 index e2603ad5..00000000 --- a/packages/livekit-rtc/src/napi/native.js +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-FileCopyrightText: 2024 LiveKit, Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// this file exists to smoothly translate the autogenerated CommonJS code -// to an ES module that plays better with TypeScript. -import native from './native.cjs'; - -export const { - livekitDispose, - livekitInitialize, - livekitCopyBuffer, - livekitRetrievePtr, - livekitFfiRequest, - FfiHandle, -} = native; diff --git a/packages/livekit-rtc/src/nodejs.rs b/packages/livekit-rtc/src/nodejs.rs deleted file mode 100644 index 21c247af..00000000 --- a/packages/livekit-rtc/src/nodejs.rs +++ /dev/null @@ -1,134 +0,0 @@ -// SPDX-FileCopyrightText: 2024 LiveKit, Inc. -// -// SPDX-License-Identifier: Apache-2.0 - -use livekit_ffi::{proto, server, FFI_SERVER}; -use napi::{ - bindgen_prelude::*, - threadsafe_function::{ - ErrorStrategy, ThreadSafeCallContext, ThreadsafeFunction, ThreadsafeFunctionCallMode, - }, - JsFunction, Status, -}; -use napi_derive::napi; -use prost::Message; -use std::sync::Arc; - -#[napi( - ts_args_type = "callback: (data: Uint8Array) => void, captureLogs: boolean, sdkVersion: string" -)] -fn livekit_initialize(cb: JsFunction, capture_logs: bool, sdk_version: String) { - let tsfn: ThreadsafeFunction = cb - .create_threadsafe_function(0, |ctx: ThreadSafeCallContext| { - let data = ctx.value.encode_to_vec(); - let buf = Uint8Array::new(data); - Ok(vec![buf]) - }) - .unwrap(); - - FFI_SERVER.setup(server::FfiConfig { - callback_fn: Arc::new(move |event| { - let status = tsfn.call(event, ThreadsafeFunctionCallMode::NonBlocking); - if status != Status::Ok { - eprintln!("error calling callback status: {}", status); - } - }), - capture_logs, - sdk: "node".to_string(), - sdk_version, - }); -} - -#[napi] -fn livekit_ffi_request(data: Uint8Array) -> Result { - let data = data.to_vec(); - let res = match proto::FfiRequest::decode(data.as_slice()) { - Ok(res) => res, - Err(err) => { - return Err(Error::from_reason(format!( - "failed to decode request: {}", - err.to_string() - ))); - } - }; - - let res = match server::requests::handle_request(&FFI_SERVER, res.clone()) { - Ok(res) => res, - Err(err) => { - return Err(Error::from_reason(format!( - "failed to handle request: {} ({:?})", - err.to_string(), - res - ))); - } - } - .encode_to_vec(); - Ok(Uint8Array::new(res)) -} - -// FfiHandle must be used instead -//#[napi] -//fn livekit_drop_handle(handle: BigInt) -> bool { -// let (_, handle, _) = handle.get_u64(); -// FFI_SERVER.drop_handle(handle) -//} - -#[napi] -fn livekit_retrieve_ptr(handle: Uint8Array) -> BigInt { - BigInt::from(handle.as_ptr() as u64) -} - -#[napi] -fn livekit_copy_buffer(ptr: BigInt, len: u32) -> Uint8Array { - let (_, ptr, _) = ptr.get_u64(); - let data = unsafe { std::slice::from_raw_parts(ptr as *const u8, len as usize) }; - Uint8Array::with_data_copied(data) -} - -#[napi] -async fn livekit_dispose() { - FFI_SERVER.dispose().await; -} - -#[napi(custom_finalize)] -pub struct FfiHandle { - handle: BigInt, - disposed: bool, - // TODO(theomonnom): add gc pressure memory -} - -#[napi] -impl FfiHandle { - #[napi(constructor)] - pub fn new(handle: BigInt) -> Self { - Self { - handle, - disposed: false, - } - } - - #[napi] - pub fn dispose(&mut self) -> Result<()> { - if self.disposed { - return Ok(()); - } - self.disposed = true; - let (_, handle, _) = self.handle.get_u64(); - if !FFI_SERVER.drop_handle(handle) { - return Err(Error::from_reason("trying to drop an invalid handle")); - } - - Ok(()) - } - - #[napi(getter)] - pub fn handle(&self) -> BigInt { - self.handle.clone() - } -} - -impl ObjectFinalize for FfiHandle { - fn finalize(mut self, env: Env) -> Result<()> { - self.dispose() - } -} diff --git a/packages/livekit-rtc/src/participant.ts b/packages/livekit-rtc/src/participant.ts index 66ddda39..d8a8f814 100644 --- a/packages/livekit-rtc/src/participant.ts +++ b/packages/livekit-rtc/src/participant.ts @@ -2,23 +2,12 @@ // // SPDX-License-Identifier: Apache-2.0 import { Mutex } from '@livekit/mutex'; -import type { PathLike } from 'node:fs'; -import { open, stat } from 'node:fs/promises'; -import { - type ByteStreamInfo, - type ByteStreamOptions, - ByteStreamWriter, - type TextStreamInfo, - TextStreamWriter, -} from './data_streams/index.js'; -import { FfiClient, FfiHandle } from './ffi_client.js'; -import { log } from './log.js'; import { DisconnectReason, type OwnedParticipant, type ParticipantInfo, ParticipantKind, -} from './proto/participant_pb.js'; +} from '@livekit/node-rtc-ffi-bindings'; import { ChatMessage as ChatMessageModel, DataStream_ByteHeader, @@ -66,20 +55,31 @@ import { type UnpublishTrackCallback, UnpublishTrackRequest, type UnpublishTrackResponse, -} from './proto/room_pb.js'; +} from '@livekit/node-rtc-ffi-bindings'; import type { PerformRpcCallback, PerformRpcResponse, RegisterRpcMethodResponse, RpcMethodInvocationResponseResponse, UnregisterRpcMethodResponse, -} from './proto/rpc_pb.js'; +} from '@livekit/node-rtc-ffi-bindings'; import { PerformRpcRequest, RegisterRpcMethodRequest, RpcMethodInvocationResponseRequest, UnregisterRpcMethodRequest, -} from './proto/rpc_pb.js'; +} from '@livekit/node-rtc-ffi-bindings'; +import type { PathLike } from 'node:fs'; +import { open, stat } from 'node:fs/promises'; +import { + type ByteStreamInfo, + type ByteStreamOptions, + ByteStreamWriter, + type TextStreamInfo, + TextStreamWriter, +} from './data_streams/index.js'; +import { FfiClient, FfiHandle } from './ffi_client.js'; +import { log } from './log.js'; import { type PerformRpcParams, RpcError, type RpcInvocationData } from './rpc.js'; import type { LocalTrack } from './track.js'; import type { RemoteTrackPublication, TrackPublication } from './track_publication.js'; diff --git a/packages/livekit-rtc/src/proto/audio_frame_pb.ts b/packages/livekit-rtc/src/proto/audio_frame_pb.ts deleted file mode 100644 index 94b0da88..00000000 --- a/packages/livekit-rtc/src/proto/audio_frame_pb.ts +++ /dev/null @@ -1,2270 +0,0 @@ -// Copyright 2025 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=.js" -// @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, proto2 } from "@bufbuild/protobuf"; -import { TrackSource } from "./track_pb.js"; -import { FfiOwnedHandle } from "./handle_pb.js"; - -/** - * @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, - - /** - * @generated from enum value: SOXR_DATATYPE_INT16S = 1; - */ - SOXR_DATATYPE_INT16S = 1, -} -// Retrieve enum metadata with: proto2.getEnumType(SoxResamplerDataType) -proto2.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: proto2.getEnumType(SoxQualityRecipe) -proto2.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: proto2.getEnumType(SoxFlagBits) -proto2.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: proto2.getEnumType(AudioStreamType) -proto2.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: proto2.getEnumType(AudioSourceType) -proto2.util.setEnumType(AudioSourceType, "livekit.proto.AudioSourceType", [ - { no: 0, name: "AUDIO_SOURCE_NATIVE" }, -]); - -/** - * Create a new AudioStream - * AudioStream is used to receive audio frames from a track - * - * @generated from message livekit.proto.NewAudioStreamRequest - */ -export class NewAudioStreamRequest extends Message { - /** - * @generated from field: required uint64 track_handle = 1; - */ - trackHandle?: bigint; - - /** - * @generated from field: required livekit.proto.AudioStreamType type = 2; - */ - type?: AudioStreamType; - - /** - * @generated from field: optional uint32 sample_rate = 3; - */ - sampleRate?: number; - - /** - * @generated from field: optional uint32 num_channels = 4; - */ - numChannels?: number; - - /** - * Unique identifier passed in LoadAudioFilterPluginRequest - * - * @generated from field: optional string audio_filter_module_id = 5; - */ - audioFilterModuleId?: string; - - /** - * @generated from field: optional string audio_filter_options = 6; - */ - audioFilterOptions?: string; - - /** - * @generated from field: optional uint32 frame_size_ms = 7; - */ - frameSizeMs?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.NewAudioStreamRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "type", kind: "enum", T: proto2.getEnumType(AudioStreamType), req: true }, - { no: 3, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, - { no: 4, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, - { no: 5, name: "audio_filter_module_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "audio_filter_options", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "frame_size_ms", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NewAudioStreamRequest { - 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); - } - - static equals(a: NewAudioStreamRequest | PlainMessage | undefined, b: NewAudioStreamRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(NewAudioStreamRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.NewAudioStreamResponse - */ -export class NewAudioStreamResponse extends Message { - /** - * @generated from field: required livekit.proto.OwnedAudioStream stream = 1; - */ - stream?: OwnedAudioStream; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.NewAudioStreamResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "stream", kind: "message", T: OwnedAudioStream, req: true }, - ]); - - 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 proto2.util.equals(NewAudioStreamResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.AudioStreamFromParticipantRequest - */ -export class AudioStreamFromParticipantRequest extends Message { - /** - * @generated from field: required uint64 participant_handle = 1; - */ - participantHandle?: bigint; - - /** - * @generated from field: required livekit.proto.AudioStreamType type = 2; - */ - type?: AudioStreamType; - - /** - * @generated from field: optional livekit.proto.TrackSource track_source = 3; - */ - trackSource?: TrackSource; - - /** - * @generated from field: optional uint32 sample_rate = 5; - */ - sampleRate?: number; - - /** - * @generated from field: optional uint32 num_channels = 6; - */ - numChannels?: number; - - /** - * @generated from field: optional string audio_filter_module_id = 7; - */ - audioFilterModuleId?: string; - - /** - * @generated from field: optional string audio_filter_options = 8; - */ - audioFilterOptions?: string; - - /** - * @generated from field: optional uint32 frame_size_ms = 9; - */ - frameSizeMs?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.AudioStreamFromParticipantRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "type", kind: "enum", T: proto2.getEnumType(AudioStreamType), req: true }, - { no: 3, name: "track_source", kind: "enum", T: proto2.getEnumType(TrackSource), opt: true }, - { no: 5, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, - { no: 6, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, - { no: 7, name: "audio_filter_module_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 8, name: "audio_filter_options", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 9, name: "frame_size_ms", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, - ]); - - 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); - } - - static equals(a: AudioStreamFromParticipantRequest | PlainMessage | undefined, b: AudioStreamFromParticipantRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(AudioStreamFromParticipantRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.AudioStreamFromParticipantResponse - */ -export class AudioStreamFromParticipantResponse extends Message { - /** - * @generated from field: required livekit.proto.OwnedAudioStream stream = 1; - */ - stream?: OwnedAudioStream; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.AudioStreamFromParticipantResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "stream", kind: "message", T: OwnedAudioStream, req: true }, - ]); - - 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 proto2.util.equals(AudioStreamFromParticipantResponse, a, b); - } -} - -/** - * Create a new AudioSource - * - * @generated from message livekit.proto.NewAudioSourceRequest - */ -export class NewAudioSourceRequest extends Message { - /** - * @generated from field: required livekit.proto.AudioSourceType type = 1; - */ - type?: AudioSourceType; - - /** - * @generated from field: optional livekit.proto.AudioSourceOptions options = 2; - */ - options?: AudioSourceOptions; - - /** - * @generated from field: required uint32 sample_rate = 3; - */ - sampleRate?: number; - - /** - * @generated from field: required uint32 num_channels = 4; - */ - numChannels?: number; - - /** - * @generated from field: optional uint32 queue_size_ms = 5; - */ - queueSizeMs?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.NewAudioSourceRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "type", kind: "enum", T: proto2.getEnumType(AudioSourceType), req: true }, - { no: 2, name: "options", kind: "message", T: AudioSourceOptions, opt: true }, - { no: 3, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 4, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 5, name: "queue_size_ms", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, - ]); - - 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); - } - - 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 proto2.util.equals(NewAudioSourceRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.NewAudioSourceResponse - */ -export class NewAudioSourceResponse extends Message { - /** - * @generated from field: required livekit.proto.OwnedAudioSource source = 1; - */ - source?: OwnedAudioSource; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.NewAudioSourceResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "source", kind: "message", T: OwnedAudioSource, req: true }, - ]); - - 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 proto2.util.equals(NewAudioSourceResponse, a, b); - } -} - -/** - * Push a frame to an AudioSource - * The data provided must be available as long as the client receive the callback. - * - * @generated from message livekit.proto.CaptureAudioFrameRequest - */ -export class CaptureAudioFrameRequest extends Message { - /** - * @generated from field: required uint64 source_handle = 1; - */ - sourceHandle?: bigint; - - /** - * @generated from field: required livekit.proto.AudioFrameBufferInfo buffer = 2; - */ - buffer?: AudioFrameBufferInfo; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.CaptureAudioFrameRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "source_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "buffer", kind: "message", T: AudioFrameBufferInfo, req: true }, - ]); - - 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 proto2.util.equals(CaptureAudioFrameRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.CaptureAudioFrameResponse - */ -export class CaptureAudioFrameResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.CaptureAudioFrameResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): 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 proto2.util.equals(CaptureAudioFrameResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.CaptureAudioFrameCallback - */ -export class CaptureAudioFrameCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from field: optional string error = 2; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.CaptureAudioFrameCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "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 proto2.util.equals(CaptureAudioFrameCallback, a, b); - } -} - -/** - * @generated from message livekit.proto.ClearAudioBufferRequest - */ -export class ClearAudioBufferRequest extends Message { - /** - * @generated from field: required uint64 source_handle = 1; - */ - sourceHandle?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ClearAudioBufferRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "source_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ClearAudioBufferRequest { - return new ClearAudioBufferRequest().fromBinary(bytes, options); - } - - 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 proto2.util.equals(ClearAudioBufferRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.ClearAudioBufferResponse - */ -export class ClearAudioBufferResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ClearAudioBufferResponse"; - static readonly fields: FieldList = proto2.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); - } - - 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 proto2.util.equals(ClearAudioBufferResponse, a, b); - } -} - -/** - * Create a new AudioResampler - * - * @generated from message livekit.proto.NewAudioResamplerRequest - */ -export class NewAudioResamplerRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.NewAudioResamplerRequest"; - static readonly fields: FieldList = proto2.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); - } - - 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 proto2.util.equals(NewAudioResamplerRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.NewAudioResamplerResponse - */ -export class NewAudioResamplerResponse extends Message { - /** - * @generated from field: required livekit.proto.OwnedAudioResampler resampler = 1; - */ - resampler?: OwnedAudioResampler; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.NewAudioResamplerResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "resampler", kind: "message", T: OwnedAudioResampler, req: true }, - ]); - - 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 proto2.util.equals(NewAudioResamplerResponse, a, b); - } -} - -/** - * Remix and resample an audio frame - * - * @generated from message livekit.proto.RemixAndResampleRequest - */ -export class RemixAndResampleRequest extends Message { - /** - * @generated from field: required uint64 resampler_handle = 1; - */ - resamplerHandle?: bigint; - - /** - * @generated from field: required livekit.proto.AudioFrameBufferInfo buffer = 2; - */ - buffer?: AudioFrameBufferInfo; - - /** - * @generated from field: required uint32 num_channels = 3; - */ - numChannels?: number; - - /** - * @generated from field: required uint32 sample_rate = 4; - */ - sampleRate?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RemixAndResampleRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "resampler_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "buffer", kind: "message", T: AudioFrameBufferInfo, req: true }, - { no: 3, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 4, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RemixAndResampleRequest { - return new RemixAndResampleRequest().fromBinary(bytes, options); - } - - 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 proto2.util.equals(RemixAndResampleRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.RemixAndResampleResponse - */ -export class RemixAndResampleResponse extends Message { - /** - * @generated from field: required livekit.proto.OwnedAudioFrameBuffer buffer = 1; - */ - buffer?: OwnedAudioFrameBuffer; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RemixAndResampleResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "buffer", kind: "message", T: OwnedAudioFrameBuffer, req: true }, - ]); - - 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 proto2.util.equals(RemixAndResampleResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.NewApmRequest - */ -export class NewApmRequest extends Message { - /** - * @generated from field: required bool echo_canceller_enabled = 1; - */ - echoCancellerEnabled?: boolean; - - /** - * @generated from field: required bool gain_controller_enabled = 2; - */ - gainControllerEnabled?: boolean; - - /** - * @generated from field: required bool high_pass_filter_enabled = 3; - */ - highPassFilterEnabled?: boolean; - - /** - * @generated from field: required bool noise_suppression_enabled = 4; - */ - noiseSuppressionEnabled?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.NewApmRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "echo_canceller_enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 2, name: "gain_controller_enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 3, name: "high_pass_filter_enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 4, name: "noise_suppression_enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NewApmRequest { - return new NewApmRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NewApmRequest { - return new NewApmRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): NewApmRequest { - return new NewApmRequest().fromJsonString(jsonString, options); - } - - static equals(a: NewApmRequest | PlainMessage | undefined, b: NewApmRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(NewApmRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.NewApmResponse - */ -export class NewApmResponse extends Message { - /** - * @generated from field: required livekit.proto.OwnedApm apm = 1; - */ - apm?: OwnedApm; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.NewApmResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "apm", kind: "message", T: OwnedApm, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NewApmResponse { - return new NewApmResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NewApmResponse { - return new NewApmResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): NewApmResponse { - return new NewApmResponse().fromJsonString(jsonString, options); - } - - static equals(a: NewApmResponse | PlainMessage | undefined, b: NewApmResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(NewApmResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.ApmProcessStreamRequest - */ -export class ApmProcessStreamRequest extends Message { - /** - * @generated from field: required uint64 apm_handle = 1; - */ - apmHandle?: bigint; - - /** - * *mut i16 - * - * @generated from field: required uint64 data_ptr = 2; - */ - dataPtr?: bigint; - - /** - * in bytes - * - * @generated from field: required uint32 size = 3; - */ - size?: number; - - /** - * @generated from field: required uint32 sample_rate = 4; - */ - sampleRate?: number; - - /** - * @generated from field: required uint32 num_channels = 5; - */ - numChannels?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ApmProcessStreamRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "apm_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "data_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 3, name: "size", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 4, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 5, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ApmProcessStreamRequest { - return new ApmProcessStreamRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ApmProcessStreamRequest { - return new ApmProcessStreamRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ApmProcessStreamRequest { - return new ApmProcessStreamRequest().fromJsonString(jsonString, options); - } - - static equals(a: ApmProcessStreamRequest | PlainMessage | undefined, b: ApmProcessStreamRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(ApmProcessStreamRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.ApmProcessStreamResponse - */ -export class ApmProcessStreamResponse extends Message { - /** - * @generated from field: optional string error = 1; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ApmProcessStreamResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ApmProcessStreamResponse { - return new ApmProcessStreamResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ApmProcessStreamResponse { - return new ApmProcessStreamResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ApmProcessStreamResponse { - return new ApmProcessStreamResponse().fromJsonString(jsonString, options); - } - - static equals(a: ApmProcessStreamResponse | PlainMessage | undefined, b: ApmProcessStreamResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(ApmProcessStreamResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.ApmProcessReverseStreamRequest - */ -export class ApmProcessReverseStreamRequest extends Message { - /** - * @generated from field: required uint64 apm_handle = 1; - */ - apmHandle?: bigint; - - /** - * *mut i16 - * - * @generated from field: required uint64 data_ptr = 2; - */ - dataPtr?: bigint; - - /** - * in bytes - * - * @generated from field: required uint32 size = 3; - */ - size?: number; - - /** - * @generated from field: required uint32 sample_rate = 4; - */ - sampleRate?: number; - - /** - * @generated from field: required uint32 num_channels = 5; - */ - numChannels?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ApmProcessReverseStreamRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "apm_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "data_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 3, name: "size", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 4, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 5, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ApmProcessReverseStreamRequest { - return new ApmProcessReverseStreamRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ApmProcessReverseStreamRequest { - return new ApmProcessReverseStreamRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ApmProcessReverseStreamRequest { - return new ApmProcessReverseStreamRequest().fromJsonString(jsonString, options); - } - - static equals(a: ApmProcessReverseStreamRequest | PlainMessage | undefined, b: ApmProcessReverseStreamRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(ApmProcessReverseStreamRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.ApmProcessReverseStreamResponse - */ -export class ApmProcessReverseStreamResponse extends Message { - /** - * @generated from field: optional string error = 1; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ApmProcessReverseStreamResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ApmProcessReverseStreamResponse { - return new ApmProcessReverseStreamResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ApmProcessReverseStreamResponse { - return new ApmProcessReverseStreamResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ApmProcessReverseStreamResponse { - return new ApmProcessReverseStreamResponse().fromJsonString(jsonString, options); - } - - static equals(a: ApmProcessReverseStreamResponse | PlainMessage | undefined, b: ApmProcessReverseStreamResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(ApmProcessReverseStreamResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.ApmSetStreamDelayRequest - */ -export class ApmSetStreamDelayRequest extends Message { - /** - * @generated from field: required uint64 apm_handle = 1; - */ - apmHandle?: bigint; - - /** - * @generated from field: required int32 delay_ms = 2; - */ - delayMs?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ApmSetStreamDelayRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "apm_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "delay_ms", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ApmSetStreamDelayRequest { - return new ApmSetStreamDelayRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ApmSetStreamDelayRequest { - return new ApmSetStreamDelayRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ApmSetStreamDelayRequest { - return new ApmSetStreamDelayRequest().fromJsonString(jsonString, options); - } - - static equals(a: ApmSetStreamDelayRequest | PlainMessage | undefined, b: ApmSetStreamDelayRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(ApmSetStreamDelayRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.ApmSetStreamDelayResponse - */ -export class ApmSetStreamDelayResponse extends Message { - /** - * @generated from field: optional string error = 1; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ApmSetStreamDelayResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ApmSetStreamDelayResponse { - return new ApmSetStreamDelayResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ApmSetStreamDelayResponse { - return new ApmSetStreamDelayResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ApmSetStreamDelayResponse { - return new ApmSetStreamDelayResponse().fromJsonString(jsonString, options); - } - - static equals(a: ApmSetStreamDelayResponse | PlainMessage | undefined, b: ApmSetStreamDelayResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(ApmSetStreamDelayResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.NewSoxResamplerRequest - */ -export class NewSoxResamplerRequest extends Message { - /** - * @generated from field: required double input_rate = 1; - */ - inputRate?: number; - - /** - * @generated from field: required double output_rate = 2; - */ - outputRate?: number; - - /** - * @generated from field: required uint32 num_channels = 3; - */ - numChannels?: number; - - /** - * @generated from field: required livekit.proto.SoxResamplerDataType input_data_type = 4; - */ - inputDataType?: SoxResamplerDataType; - - /** - * @generated from field: required livekit.proto.SoxResamplerDataType output_data_type = 5; - */ - outputDataType?: SoxResamplerDataType; - - /** - * @generated from field: required livekit.proto.SoxQualityRecipe quality_recipe = 6; - */ - qualityRecipe?: SoxQualityRecipe; - - /** - * @generated from field: optional uint32 flags = 7; - */ - flags?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.NewSoxResamplerRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "input_rate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 2, name: "output_rate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 3, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 4, name: "input_data_type", kind: "enum", T: proto2.getEnumType(SoxResamplerDataType), req: true }, - { no: 5, name: "output_data_type", kind: "enum", T: proto2.getEnumType(SoxResamplerDataType), req: true }, - { no: 6, name: "quality_recipe", kind: "enum", T: proto2.getEnumType(SoxQualityRecipe), req: true }, - { no: 7, name: "flags", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, - ]); - - 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 proto2.util.equals(NewSoxResamplerRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.NewSoxResamplerResponse - */ -export class NewSoxResamplerResponse extends Message { - /** - * @generated from oneof livekit.proto.NewSoxResamplerResponse.message - */ - 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 } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.NewSoxResamplerResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "resampler", kind: "message", T: OwnedSoxResampler, oneof: "message" }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "message" }, - ]); - - 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); - } - - static equals(a: NewSoxResamplerResponse | PlainMessage | undefined, b: NewSoxResamplerResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(NewSoxResamplerResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.PushSoxResamplerRequest - */ -export class PushSoxResamplerRequest extends Message { - /** - * @generated from field: required uint64 resampler_handle = 1; - */ - resamplerHandle?: bigint; - - /** - * *const i16 - * - * @generated from field: required uint64 data_ptr = 2; - */ - dataPtr?: bigint; - - /** - * in bytes - * - * @generated from field: required uint32 size = 3; - */ - size?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.PushSoxResamplerRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "resampler_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "data_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 3, name: "size", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - ]); - - 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 proto2.util.equals(PushSoxResamplerRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.PushSoxResamplerResponse - */ -export class PushSoxResamplerResponse extends Message { - /** - * *const i16 (could be null) - * - * @generated from field: required uint64 output_ptr = 1; - */ - outputPtr?: bigint; - - /** - * in bytes - * - * @generated from field: required uint32 size = 2; - */ - size?: number; - - /** - * @generated from field: optional string error = 3; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.PushSoxResamplerResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "output_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "size", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 3, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - 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 proto2.util.equals(PushSoxResamplerResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.FlushSoxResamplerRequest - */ -export class FlushSoxResamplerRequest extends Message { - /** - * @generated from field: required uint64 resampler_handle = 1; - */ - resamplerHandle?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.FlushSoxResamplerRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "resampler_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - 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); - } - - static equals(a: FlushSoxResamplerRequest | PlainMessage | undefined, b: FlushSoxResamplerRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(FlushSoxResamplerRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.FlushSoxResamplerResponse - */ -export class FlushSoxResamplerResponse extends Message { - /** - * *const i16 (could be null) - * - * @generated from field: required uint64 output_ptr = 1; - */ - outputPtr?: bigint; - - /** - * in bytes - * - * @generated from field: required uint32 size = 2; - */ - size?: number; - - /** - * @generated from field: optional string error = 3; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.FlushSoxResamplerResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "output_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "size", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { 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); - } - - static equals(a: FlushSoxResamplerResponse | PlainMessage | undefined, b: FlushSoxResamplerResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(FlushSoxResamplerResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.AudioFrameBufferInfo - */ -export class AudioFrameBufferInfo extends Message { - /** - * *const i16 - * - * @generated from field: required uint64 data_ptr = 1; - */ - dataPtr?: bigint; - - /** - * @generated from field: required uint32 num_channels = 2; - */ - numChannels?: number; - - /** - * @generated from field: required uint32 sample_rate = 3; - */ - sampleRate?: number; - - /** - * @generated from field: required uint32 samples_per_channel = 4; - */ - samplesPerChannel?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.AudioFrameBufferInfo"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "data_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 3, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 4, name: "samples_per_channel", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - ]); - - 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); - } - - 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 proto2.util.equals(AudioFrameBufferInfo, a, b); - } -} - -/** - * @generated from message livekit.proto.OwnedAudioFrameBuffer - */ -export class OwnedAudioFrameBuffer extends Message { - /** - * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; - */ - handle?: FfiOwnedHandle; - - /** - * @generated from field: required livekit.proto.AudioFrameBufferInfo info = 2; - */ - info?: AudioFrameBufferInfo; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.OwnedAudioFrameBuffer"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, - { no: 2, name: "info", kind: "message", T: AudioFrameBufferInfo, req: true }, - ]); - - 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 proto2.util.equals(OwnedAudioFrameBuffer, a, b); - } -} - -/** - * @generated from message livekit.proto.AudioStreamInfo - */ -export class AudioStreamInfo extends Message { - /** - * @generated from field: required livekit.proto.AudioStreamType type = 1; - */ - type?: AudioStreamType; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.AudioStreamInfo"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "type", kind: "enum", T: proto2.getEnumType(AudioStreamType), req: true }, - ]); - - 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 proto2.util.equals(AudioStreamInfo, a, b); - } -} - -/** - * @generated from message livekit.proto.OwnedAudioStream - */ -export class OwnedAudioStream extends Message { - /** - * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; - */ - handle?: FfiOwnedHandle; - - /** - * @generated from field: required livekit.proto.AudioStreamInfo info = 2; - */ - info?: AudioStreamInfo; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.OwnedAudioStream"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, - { no: 2, name: "info", kind: "message", T: AudioStreamInfo, req: true }, - ]); - - 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 proto2.util.equals(OwnedAudioStream, a, b); - } -} - -/** - * @generated from message livekit.proto.AudioStreamEvent - */ -export class AudioStreamEvent extends Message { - /** - * @generated from field: required uint64 stream_handle = 1; - */ - streamHandle?: bigint; - - /** - * @generated from oneof livekit.proto.AudioStreamEvent.message - */ - message: { - /** - * @generated from field: livekit.proto.AudioFrameReceived frame_received = 2; - */ - value: AudioFrameReceived; - case: "frameReceived"; - } | { - /** - * @generated from field: livekit.proto.AudioStreamEOS eos = 3; - */ - value: AudioStreamEOS; - case: "eos"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.AudioStreamEvent"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "stream_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { 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 proto2.util.equals(AudioStreamEvent, a, b); - } -} - -/** - * @generated from message livekit.proto.AudioFrameReceived - */ -export class AudioFrameReceived extends Message { - /** - * @generated from field: required livekit.proto.OwnedAudioFrameBuffer frame = 1; - */ - frame?: OwnedAudioFrameBuffer; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.AudioFrameReceived"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "frame", kind: "message", T: OwnedAudioFrameBuffer, req: true }, - ]); - - 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 proto2.util.equals(AudioFrameReceived, a, b); - } -} - -/** - * @generated from message livekit.proto.AudioStreamEOS - */ -export class AudioStreamEOS extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.AudioStreamEOS"; - static readonly fields: FieldList = proto2.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 proto2.util.equals(AudioStreamEOS, a, b); - } -} - -/** - * @generated from message livekit.proto.AudioSourceOptions - */ -export class AudioSourceOptions extends Message { - /** - * @generated from field: required bool echo_cancellation = 1; - */ - echoCancellation?: boolean; - - /** - * @generated from field: required bool noise_suppression = 2; - */ - noiseSuppression?: boolean; - - /** - * @generated from field: required bool auto_gain_control = 3; - */ - autoGainControl?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.AudioSourceOptions"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "echo_cancellation", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 2, name: "noise_suppression", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 3, name: "auto_gain_control", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - ]); - - 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 proto2.util.equals(AudioSourceOptions, a, b); - } -} - -/** - * @generated from message livekit.proto.AudioSourceInfo - */ -export class AudioSourceInfo extends Message { - /** - * @generated from field: required livekit.proto.AudioSourceType type = 2; - */ - type?: AudioSourceType; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.AudioSourceInfo"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 2, name: "type", kind: "enum", T: proto2.getEnumType(AudioSourceType), req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AudioSourceInfo { - return new AudioSourceInfo().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AudioSourceInfo { - return new AudioSourceInfo().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AudioSourceInfo { - return new AudioSourceInfo().fromJsonString(jsonString, options); - } - - static equals(a: AudioSourceInfo | PlainMessage | undefined, b: AudioSourceInfo | PlainMessage | undefined): boolean { - return proto2.util.equals(AudioSourceInfo, a, b); - } -} - -/** - * @generated from message livekit.proto.OwnedAudioSource - */ -export class OwnedAudioSource extends Message { - /** - * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; - */ - handle?: FfiOwnedHandle; - - /** - * @generated from field: required livekit.proto.AudioSourceInfo info = 2; - */ - info?: AudioSourceInfo; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.OwnedAudioSource"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, - { no: 2, name: "info", kind: "message", T: AudioSourceInfo, req: true }, - ]); - - 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 proto2.util.equals(OwnedAudioSource, a, b); - } -} - -/** - * @generated from message livekit.proto.AudioResamplerInfo - */ -export class AudioResamplerInfo extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.AudioResamplerInfo"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AudioResamplerInfo { - return new AudioResamplerInfo().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AudioResamplerInfo { - return new AudioResamplerInfo().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AudioResamplerInfo { - return new AudioResamplerInfo().fromJsonString(jsonString, options); - } - - static equals(a: AudioResamplerInfo | PlainMessage | undefined, b: AudioResamplerInfo | PlainMessage | undefined): boolean { - return proto2.util.equals(AudioResamplerInfo, a, b); - } -} - -/** - * @generated from message livekit.proto.OwnedAudioResampler - */ -export class OwnedAudioResampler extends Message { - /** - * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; - */ - handle?: FfiOwnedHandle; - - /** - * @generated from field: required livekit.proto.AudioResamplerInfo info = 2; - */ - info?: AudioResamplerInfo; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.OwnedAudioResampler"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, - { no: 2, name: "info", kind: "message", T: AudioResamplerInfo, req: true }, - ]); - - 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 proto2.util.equals(OwnedAudioResampler, a, b); - } -} - -/** - * @generated from message livekit.proto.OwnedApm - */ -export class OwnedApm extends Message { - /** - * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; - */ - handle?: FfiOwnedHandle; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.OwnedApm"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OwnedApm { - return new OwnedApm().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OwnedApm { - return new OwnedApm().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OwnedApm { - return new OwnedApm().fromJsonString(jsonString, options); - } - - static equals(a: OwnedApm | PlainMessage | undefined, b: OwnedApm | PlainMessage | undefined): boolean { - return proto2.util.equals(OwnedApm, a, b); - } -} - -/** - * @generated from message livekit.proto.SoxResamplerInfo - */ -export class SoxResamplerInfo extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SoxResamplerInfo"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SoxResamplerInfo { - return new SoxResamplerInfo().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SoxResamplerInfo { - return new SoxResamplerInfo().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SoxResamplerInfo { - return new SoxResamplerInfo().fromJsonString(jsonString, options); - } - - static equals(a: SoxResamplerInfo | PlainMessage | undefined, b: SoxResamplerInfo | PlainMessage | undefined): boolean { - return proto2.util.equals(SoxResamplerInfo, a, b); - } -} - -/** - * @generated from message livekit.proto.OwnedSoxResampler - */ -export class OwnedSoxResampler extends Message { - /** - * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; - */ - handle?: FfiOwnedHandle; - - /** - * @generated from field: required livekit.proto.SoxResamplerInfo info = 2; - */ - info?: SoxResamplerInfo; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.OwnedSoxResampler"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, - { no: 2, name: "info", kind: "message", T: SoxResamplerInfo, req: true }, - ]); - - 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 proto2.util.equals(OwnedSoxResampler, a, b); - } -} - -/** - * Audio Filter Plugin - * - * @generated from message livekit.proto.LoadAudioFilterPluginRequest - */ -export class LoadAudioFilterPluginRequest extends Message { - /** - * path for ffi audio filter plugin - * - * @generated from field: required string plugin_path = 1; - */ - pluginPath?: string; - - /** - * Optional: paths for dependency dylibs - * - * @generated from field: repeated string dependencies = 2; - */ - dependencies: string[] = []; - - /** - * Unique identifier of the plugin - * - * @generated from field: required string module_id = 3; - */ - moduleId?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.LoadAudioFilterPluginRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "plugin_path", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "dependencies", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 3, name: "module_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): LoadAudioFilterPluginRequest { - return new LoadAudioFilterPluginRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): LoadAudioFilterPluginRequest { - return new LoadAudioFilterPluginRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): LoadAudioFilterPluginRequest { - return new LoadAudioFilterPluginRequest().fromJsonString(jsonString, options); - } - - static equals(a: LoadAudioFilterPluginRequest | PlainMessage | undefined, b: LoadAudioFilterPluginRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(LoadAudioFilterPluginRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.LoadAudioFilterPluginResponse - */ -export class LoadAudioFilterPluginResponse extends Message { - /** - * @generated from field: optional string error = 1; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.LoadAudioFilterPluginResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): LoadAudioFilterPluginResponse { - return new LoadAudioFilterPluginResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): LoadAudioFilterPluginResponse { - return new LoadAudioFilterPluginResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): LoadAudioFilterPluginResponse { - return new LoadAudioFilterPluginResponse().fromJsonString(jsonString, options); - } - - static equals(a: LoadAudioFilterPluginResponse | PlainMessage | undefined, b: LoadAudioFilterPluginResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(LoadAudioFilterPluginResponse, a, b); - } -} - diff --git a/packages/livekit-rtc/src/proto/data_stream_pb.ts b/packages/livekit-rtc/src/proto/data_stream_pb.ts deleted file mode 100644 index 11d114e9..00000000 --- a/packages/livekit-rtc/src/proto/data_stream_pb.ts +++ /dev/null @@ -1,2674 +0,0 @@ -// Copyright 2025 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=.js" -// @generated from file data_stream.proto (package livekit.proto, syntax proto2) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto2 } from "@bufbuild/protobuf"; -import { FfiOwnedHandle } from "./handle_pb.js"; -import { EncryptionType } from "./e2ee_pb.js"; - -/** - * A reader for an incoming stream. - * - * @generated from message livekit.proto.OwnedTextStreamReader - */ -export class OwnedTextStreamReader extends Message { - /** - * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; - */ - handle?: FfiOwnedHandle; - - /** - * @generated from field: required livekit.proto.TextStreamInfo info = 2; - */ - info?: TextStreamInfo; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.OwnedTextStreamReader"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, - { no: 2, name: "info", kind: "message", T: TextStreamInfo, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OwnedTextStreamReader { - return new OwnedTextStreamReader().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OwnedTextStreamReader { - return new OwnedTextStreamReader().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OwnedTextStreamReader { - return new OwnedTextStreamReader().fromJsonString(jsonString, options); - } - - static equals(a: OwnedTextStreamReader | PlainMessage | undefined, b: OwnedTextStreamReader | PlainMessage | undefined): boolean { - return proto2.util.equals(OwnedTextStreamReader, a, b); - } -} - -/** - * Reads an incoming text stream incrementally. - * - * @generated from message livekit.proto.TextStreamReaderReadIncrementalRequest - */ -export class TextStreamReaderReadIncrementalRequest extends Message { - /** - * @generated from field: required uint64 reader_handle = 1; - */ - readerHandle?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TextStreamReaderReadIncrementalRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderReadIncrementalRequest { - return new TextStreamReaderReadIncrementalRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderReadIncrementalRequest { - return new TextStreamReaderReadIncrementalRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderReadIncrementalRequest { - return new TextStreamReaderReadIncrementalRequest().fromJsonString(jsonString, options); - } - - static equals(a: TextStreamReaderReadIncrementalRequest | PlainMessage | undefined, b: TextStreamReaderReadIncrementalRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(TextStreamReaderReadIncrementalRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.TextStreamReaderReadIncrementalResponse - */ -export class TextStreamReaderReadIncrementalResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TextStreamReaderReadIncrementalResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderReadIncrementalResponse { - return new TextStreamReaderReadIncrementalResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderReadIncrementalResponse { - return new TextStreamReaderReadIncrementalResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderReadIncrementalResponse { - return new TextStreamReaderReadIncrementalResponse().fromJsonString(jsonString, options); - } - - static equals(a: TextStreamReaderReadIncrementalResponse | PlainMessage | undefined, b: TextStreamReaderReadIncrementalResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(TextStreamReaderReadIncrementalResponse, a, b); - } -} - -/** - * Reads an incoming text stream in its entirety. - * - * @generated from message livekit.proto.TextStreamReaderReadAllRequest - */ -export class TextStreamReaderReadAllRequest extends Message { - /** - * @generated from field: required uint64 reader_handle = 1; - */ - readerHandle?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TextStreamReaderReadAllRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderReadAllRequest { - return new TextStreamReaderReadAllRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderReadAllRequest { - return new TextStreamReaderReadAllRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderReadAllRequest { - return new TextStreamReaderReadAllRequest().fromJsonString(jsonString, options); - } - - static equals(a: TextStreamReaderReadAllRequest | PlainMessage | undefined, b: TextStreamReaderReadAllRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(TextStreamReaderReadAllRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.TextStreamReaderReadAllResponse - */ -export class TextStreamReaderReadAllResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TextStreamReaderReadAllResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderReadAllResponse { - return new TextStreamReaderReadAllResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderReadAllResponse { - return new TextStreamReaderReadAllResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderReadAllResponse { - return new TextStreamReaderReadAllResponse().fromJsonString(jsonString, options); - } - - static equals(a: TextStreamReaderReadAllResponse | PlainMessage | undefined, b: TextStreamReaderReadAllResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(TextStreamReaderReadAllResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.TextStreamReaderReadAllCallback - */ -export class TextStreamReaderReadAllCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from oneof livekit.proto.TextStreamReaderReadAllCallback.result - */ - result: { - /** - * @generated from field: string content = 2; - */ - value: string; - case: "content"; - } | { - /** - * @generated from field: livekit.proto.StreamError error = 3; - */ - value: StreamError; - case: "error"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TextStreamReaderReadAllCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "content", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "result" }, - { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderReadAllCallback { - return new TextStreamReaderReadAllCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderReadAllCallback { - return new TextStreamReaderReadAllCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderReadAllCallback { - return new TextStreamReaderReadAllCallback().fromJsonString(jsonString, options); - } - - static equals(a: TextStreamReaderReadAllCallback | PlainMessage | undefined, b: TextStreamReaderReadAllCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(TextStreamReaderReadAllCallback, a, b); - } -} - -/** - * @generated from message livekit.proto.TextStreamReaderEvent - */ -export class TextStreamReaderEvent extends Message { - /** - * @generated from field: required uint64 reader_handle = 1; - */ - readerHandle?: bigint; - - /** - * @generated from oneof livekit.proto.TextStreamReaderEvent.detail - */ - detail: { - /** - * @generated from field: livekit.proto.TextStreamReaderChunkReceived chunk_received = 2; - */ - value: TextStreamReaderChunkReceived; - case: "chunkReceived"; - } | { - /** - * @generated from field: livekit.proto.TextStreamReaderEOS eos = 3; - */ - value: TextStreamReaderEOS; - case: "eos"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TextStreamReaderEvent"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "chunk_received", kind: "message", T: TextStreamReaderChunkReceived, oneof: "detail" }, - { no: 3, name: "eos", kind: "message", T: TextStreamReaderEOS, oneof: "detail" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderEvent { - return new TextStreamReaderEvent().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderEvent { - return new TextStreamReaderEvent().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderEvent { - return new TextStreamReaderEvent().fromJsonString(jsonString, options); - } - - static equals(a: TextStreamReaderEvent | PlainMessage | undefined, b: TextStreamReaderEvent | PlainMessage | undefined): boolean { - return proto2.util.equals(TextStreamReaderEvent, a, b); - } -} - -/** - * @generated from message livekit.proto.TextStreamReaderChunkReceived - */ -export class TextStreamReaderChunkReceived extends Message { - /** - * @generated from field: required string content = 1; - */ - content?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TextStreamReaderChunkReceived"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "content", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderChunkReceived { - return new TextStreamReaderChunkReceived().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderChunkReceived { - return new TextStreamReaderChunkReceived().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderChunkReceived { - return new TextStreamReaderChunkReceived().fromJsonString(jsonString, options); - } - - static equals(a: TextStreamReaderChunkReceived | PlainMessage | undefined, b: TextStreamReaderChunkReceived | PlainMessage | undefined): boolean { - return proto2.util.equals(TextStreamReaderChunkReceived, a, b); - } -} - -/** - * @generated from message livekit.proto.TextStreamReaderEOS - */ -export class TextStreamReaderEOS extends Message { - /** - * @generated from field: optional livekit.proto.StreamError error = 1; - */ - error?: StreamError; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TextStreamReaderEOS"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "error", kind: "message", T: StreamError, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderEOS { - return new TextStreamReaderEOS().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderEOS { - return new TextStreamReaderEOS().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderEOS { - return new TextStreamReaderEOS().fromJsonString(jsonString, options); - } - - static equals(a: TextStreamReaderEOS | PlainMessage | undefined, b: TextStreamReaderEOS | PlainMessage | undefined): boolean { - return proto2.util.equals(TextStreamReaderEOS, a, b); - } -} - -/** - * A reader for an incoming stream. - * - * @generated from message livekit.proto.OwnedByteStreamReader - */ -export class OwnedByteStreamReader extends Message { - /** - * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; - */ - handle?: FfiOwnedHandle; - - /** - * @generated from field: required livekit.proto.ByteStreamInfo info = 2; - */ - info?: ByteStreamInfo; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.OwnedByteStreamReader"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, - { no: 2, name: "info", kind: "message", T: ByteStreamInfo, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OwnedByteStreamReader { - return new OwnedByteStreamReader().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OwnedByteStreamReader { - return new OwnedByteStreamReader().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OwnedByteStreamReader { - return new OwnedByteStreamReader().fromJsonString(jsonString, options); - } - - static equals(a: OwnedByteStreamReader | PlainMessage | undefined, b: OwnedByteStreamReader | PlainMessage | undefined): boolean { - return proto2.util.equals(OwnedByteStreamReader, a, b); - } -} - -/** - * Reads an incoming byte stream incrementally. - * - * @generated from message livekit.proto.ByteStreamReaderReadIncrementalRequest - */ -export class ByteStreamReaderReadIncrementalRequest extends Message { - /** - * @generated from field: required uint64 reader_handle = 1; - */ - readerHandle?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamReaderReadIncrementalRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderReadIncrementalRequest { - return new ByteStreamReaderReadIncrementalRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderReadIncrementalRequest { - return new ByteStreamReaderReadIncrementalRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderReadIncrementalRequest { - return new ByteStreamReaderReadIncrementalRequest().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamReaderReadIncrementalRequest | PlainMessage | undefined, b: ByteStreamReaderReadIncrementalRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamReaderReadIncrementalRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.ByteStreamReaderReadIncrementalResponse - */ -export class ByteStreamReaderReadIncrementalResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamReaderReadIncrementalResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderReadIncrementalResponse { - return new ByteStreamReaderReadIncrementalResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderReadIncrementalResponse { - return new ByteStreamReaderReadIncrementalResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderReadIncrementalResponse { - return new ByteStreamReaderReadIncrementalResponse().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamReaderReadIncrementalResponse | PlainMessage | undefined, b: ByteStreamReaderReadIncrementalResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamReaderReadIncrementalResponse, a, b); - } -} - -/** - * Reads an incoming byte stream in its entirety. - * - * @generated from message livekit.proto.ByteStreamReaderReadAllRequest - */ -export class ByteStreamReaderReadAllRequest extends Message { - /** - * @generated from field: required uint64 reader_handle = 1; - */ - readerHandle?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamReaderReadAllRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderReadAllRequest { - return new ByteStreamReaderReadAllRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderReadAllRequest { - return new ByteStreamReaderReadAllRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderReadAllRequest { - return new ByteStreamReaderReadAllRequest().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamReaderReadAllRequest | PlainMessage | undefined, b: ByteStreamReaderReadAllRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamReaderReadAllRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.ByteStreamReaderReadAllResponse - */ -export class ByteStreamReaderReadAllResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamReaderReadAllResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderReadAllResponse { - return new ByteStreamReaderReadAllResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderReadAllResponse { - return new ByteStreamReaderReadAllResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderReadAllResponse { - return new ByteStreamReaderReadAllResponse().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamReaderReadAllResponse | PlainMessage | undefined, b: ByteStreamReaderReadAllResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamReaderReadAllResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.ByteStreamReaderReadAllCallback - */ -export class ByteStreamReaderReadAllCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from oneof livekit.proto.ByteStreamReaderReadAllCallback.result - */ - result: { - /** - * @generated from field: bytes content = 2; - */ - value: Uint8Array; - case: "content"; - } | { - /** - * @generated from field: livekit.proto.StreamError error = 3; - */ - value: StreamError; - case: "error"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamReaderReadAllCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "content", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "result" }, - { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderReadAllCallback { - return new ByteStreamReaderReadAllCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderReadAllCallback { - return new ByteStreamReaderReadAllCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderReadAllCallback { - return new ByteStreamReaderReadAllCallback().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamReaderReadAllCallback | PlainMessage | undefined, b: ByteStreamReaderReadAllCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamReaderReadAllCallback, a, b); - } -} - -/** - * Writes data from an incoming stream to a file as it arrives. - * - * @generated from message livekit.proto.ByteStreamReaderWriteToFileRequest - */ -export class ByteStreamReaderWriteToFileRequest extends Message { - /** - * @generated from field: required uint64 reader_handle = 1; - */ - readerHandle?: bigint; - - /** - * Directory to write the file in (must be writable by the current process). - * If not provided, the file will be written to the system's temp directory. - * - * @generated from field: optional string directory = 3; - */ - directory?: string; - - /** - * Name to use for the written file. - * If not provided, the file's name and extension will be inferred from - * the stream's info. - * - * @generated from field: optional string name_override = 4; - */ - nameOverride?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamReaderWriteToFileRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 3, name: "directory", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "name_override", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderWriteToFileRequest { - return new ByteStreamReaderWriteToFileRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderWriteToFileRequest { - return new ByteStreamReaderWriteToFileRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderWriteToFileRequest { - return new ByteStreamReaderWriteToFileRequest().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamReaderWriteToFileRequest | PlainMessage | undefined, b: ByteStreamReaderWriteToFileRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamReaderWriteToFileRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.ByteStreamReaderWriteToFileResponse - */ -export class ByteStreamReaderWriteToFileResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamReaderWriteToFileResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderWriteToFileResponse { - return new ByteStreamReaderWriteToFileResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderWriteToFileResponse { - return new ByteStreamReaderWriteToFileResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderWriteToFileResponse { - return new ByteStreamReaderWriteToFileResponse().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamReaderWriteToFileResponse | PlainMessage | undefined, b: ByteStreamReaderWriteToFileResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamReaderWriteToFileResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.ByteStreamReaderWriteToFileCallback - */ -export class ByteStreamReaderWriteToFileCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from oneof livekit.proto.ByteStreamReaderWriteToFileCallback.result - */ - result: { - /** - * Path the file was written to. - * - * @generated from field: string file_path = 2; - */ - value: string; - case: "filePath"; - } | { - /** - * @generated from field: livekit.proto.StreamError error = 3; - */ - value: StreamError; - case: "error"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamReaderWriteToFileCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "file_path", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "result" }, - { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderWriteToFileCallback { - return new ByteStreamReaderWriteToFileCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderWriteToFileCallback { - return new ByteStreamReaderWriteToFileCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderWriteToFileCallback { - return new ByteStreamReaderWriteToFileCallback().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamReaderWriteToFileCallback | PlainMessage | undefined, b: ByteStreamReaderWriteToFileCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamReaderWriteToFileCallback, a, b); - } -} - -/** - * @generated from message livekit.proto.ByteStreamReaderEvent - */ -export class ByteStreamReaderEvent extends Message { - /** - * @generated from field: required uint64 reader_handle = 1; - */ - readerHandle?: bigint; - - /** - * @generated from oneof livekit.proto.ByteStreamReaderEvent.detail - */ - detail: { - /** - * @generated from field: livekit.proto.ByteStreamReaderChunkReceived chunk_received = 2; - */ - value: ByteStreamReaderChunkReceived; - case: "chunkReceived"; - } | { - /** - * @generated from field: livekit.proto.ByteStreamReaderEOS eos = 3; - */ - value: ByteStreamReaderEOS; - case: "eos"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamReaderEvent"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "chunk_received", kind: "message", T: ByteStreamReaderChunkReceived, oneof: "detail" }, - { no: 3, name: "eos", kind: "message", T: ByteStreamReaderEOS, oneof: "detail" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderEvent { - return new ByteStreamReaderEvent().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderEvent { - return new ByteStreamReaderEvent().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderEvent { - return new ByteStreamReaderEvent().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamReaderEvent | PlainMessage | undefined, b: ByteStreamReaderEvent | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamReaderEvent, a, b); - } -} - -/** - * @generated from message livekit.proto.ByteStreamReaderChunkReceived - */ -export class ByteStreamReaderChunkReceived extends Message { - /** - * @generated from field: required bytes content = 1; - */ - content?: Uint8Array; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamReaderChunkReceived"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "content", kind: "scalar", T: 12 /* ScalarType.BYTES */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderChunkReceived { - return new ByteStreamReaderChunkReceived().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderChunkReceived { - return new ByteStreamReaderChunkReceived().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderChunkReceived { - return new ByteStreamReaderChunkReceived().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamReaderChunkReceived | PlainMessage | undefined, b: ByteStreamReaderChunkReceived | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamReaderChunkReceived, a, b); - } -} - -/** - * @generated from message livekit.proto.ByteStreamReaderEOS - */ -export class ByteStreamReaderEOS extends Message { - /** - * @generated from field: optional livekit.proto.StreamError error = 1; - */ - error?: StreamError; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamReaderEOS"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "error", kind: "message", T: StreamError, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderEOS { - return new ByteStreamReaderEOS().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderEOS { - return new ByteStreamReaderEOS().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderEOS { - return new ByteStreamReaderEOS().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamReaderEOS | PlainMessage | undefined, b: ByteStreamReaderEOS | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamReaderEOS, a, b); - } -} - -/** - * Sends the contents of a file over a data stream. - * - * @generated from message livekit.proto.StreamSendFileRequest - */ -export class StreamSendFileRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required livekit.proto.StreamByteOptions options = 2; - */ - options?: StreamByteOptions; - - /** - * Path of the file to send (must be readable by the current process). - * - * @generated from field: required string file_path = 3; - */ - filePath?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.StreamSendFileRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "options", kind: "message", T: StreamByteOptions, req: true }, - { no: 3, name: "file_path", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendFileRequest { - return new StreamSendFileRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendFileRequest { - return new StreamSendFileRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): StreamSendFileRequest { - return new StreamSendFileRequest().fromJsonString(jsonString, options); - } - - static equals(a: StreamSendFileRequest | PlainMessage | undefined, b: StreamSendFileRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(StreamSendFileRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.StreamSendFileResponse - */ -export class StreamSendFileResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.StreamSendFileResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendFileResponse { - return new StreamSendFileResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendFileResponse { - return new StreamSendFileResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): StreamSendFileResponse { - return new StreamSendFileResponse().fromJsonString(jsonString, options); - } - - static equals(a: StreamSendFileResponse | PlainMessage | undefined, b: StreamSendFileResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(StreamSendFileResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.StreamSendFileCallback - */ -export class StreamSendFileCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from oneof livekit.proto.StreamSendFileCallback.result - */ - result: { - /** - * @generated from field: livekit.proto.ByteStreamInfo info = 2; - */ - value: ByteStreamInfo; - case: "info"; - } | { - /** - * @generated from field: livekit.proto.StreamError error = 3; - */ - value: StreamError; - case: "error"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.StreamSendFileCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "info", kind: "message", T: ByteStreamInfo, oneof: "result" }, - { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendFileCallback { - return new StreamSendFileCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendFileCallback { - return new StreamSendFileCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): StreamSendFileCallback { - return new StreamSendFileCallback().fromJsonString(jsonString, options); - } - - static equals(a: StreamSendFileCallback | PlainMessage | undefined, b: StreamSendFileCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(StreamSendFileCallback, a, b); - } -} - -/** - * Sends bytes over a data stream. - * - * @generated from message livekit.proto.StreamSendBytesRequest - */ -export class StreamSendBytesRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required livekit.proto.StreamByteOptions options = 2; - */ - options?: StreamByteOptions; - - /** - * Bytes to send. - * - * @generated from field: required bytes bytes = 3; - */ - bytes?: Uint8Array; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.StreamSendBytesRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "options", kind: "message", T: StreamByteOptions, req: true }, - { no: 3, name: "bytes", kind: "scalar", T: 12 /* ScalarType.BYTES */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendBytesRequest { - return new StreamSendBytesRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendBytesRequest { - return new StreamSendBytesRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): StreamSendBytesRequest { - return new StreamSendBytesRequest().fromJsonString(jsonString, options); - } - - static equals(a: StreamSendBytesRequest | PlainMessage | undefined, b: StreamSendBytesRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(StreamSendBytesRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.StreamSendBytesResponse - */ -export class StreamSendBytesResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.StreamSendBytesResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendBytesResponse { - return new StreamSendBytesResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendBytesResponse { - return new StreamSendBytesResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): StreamSendBytesResponse { - return new StreamSendBytesResponse().fromJsonString(jsonString, options); - } - - static equals(a: StreamSendBytesResponse | PlainMessage | undefined, b: StreamSendBytesResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(StreamSendBytesResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.StreamSendBytesCallback - */ -export class StreamSendBytesCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from oneof livekit.proto.StreamSendBytesCallback.result - */ - result: { - /** - * @generated from field: livekit.proto.ByteStreamInfo info = 2; - */ - value: ByteStreamInfo; - case: "info"; - } | { - /** - * @generated from field: livekit.proto.StreamError error = 3; - */ - value: StreamError; - case: "error"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.StreamSendBytesCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "info", kind: "message", T: ByteStreamInfo, oneof: "result" }, - { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendBytesCallback { - return new StreamSendBytesCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendBytesCallback { - return new StreamSendBytesCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): StreamSendBytesCallback { - return new StreamSendBytesCallback().fromJsonString(jsonString, options); - } - - static equals(a: StreamSendBytesCallback | PlainMessage | undefined, b: StreamSendBytesCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(StreamSendBytesCallback, a, b); - } -} - -/** - * Sends text over a data stream. - * - * @generated from message livekit.proto.StreamSendTextRequest - */ -export class StreamSendTextRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required livekit.proto.StreamTextOptions options = 2; - */ - options?: StreamTextOptions; - - /** - * Text to send. - * - * @generated from field: required string text = 3; - */ - text?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.StreamSendTextRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "options", kind: "message", T: StreamTextOptions, req: true }, - { no: 3, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendTextRequest { - return new StreamSendTextRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendTextRequest { - return new StreamSendTextRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): StreamSendTextRequest { - return new StreamSendTextRequest().fromJsonString(jsonString, options); - } - - static equals(a: StreamSendTextRequest | PlainMessage | undefined, b: StreamSendTextRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(StreamSendTextRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.StreamSendTextResponse - */ -export class StreamSendTextResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.StreamSendTextResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendTextResponse { - return new StreamSendTextResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendTextResponse { - return new StreamSendTextResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): StreamSendTextResponse { - return new StreamSendTextResponse().fromJsonString(jsonString, options); - } - - static equals(a: StreamSendTextResponse | PlainMessage | undefined, b: StreamSendTextResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(StreamSendTextResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.StreamSendTextCallback - */ -export class StreamSendTextCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from oneof livekit.proto.StreamSendTextCallback.result - */ - result: { - /** - * @generated from field: livekit.proto.TextStreamInfo info = 2; - */ - value: TextStreamInfo; - case: "info"; - } | { - /** - * @generated from field: livekit.proto.StreamError error = 3; - */ - value: StreamError; - case: "error"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.StreamSendTextCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "info", kind: "message", T: TextStreamInfo, oneof: "result" }, - { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendTextCallback { - return new StreamSendTextCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendTextCallback { - return new StreamSendTextCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): StreamSendTextCallback { - return new StreamSendTextCallback().fromJsonString(jsonString, options); - } - - static equals(a: StreamSendTextCallback | PlainMessage | undefined, b: StreamSendTextCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(StreamSendTextCallback, a, b); - } -} - -/** - * @generated from message livekit.proto.OwnedByteStreamWriter - */ -export class OwnedByteStreamWriter extends Message { - /** - * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; - */ - handle?: FfiOwnedHandle; - - /** - * @generated from field: required livekit.proto.ByteStreamInfo info = 2; - */ - info?: ByteStreamInfo; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.OwnedByteStreamWriter"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, - { no: 2, name: "info", kind: "message", T: ByteStreamInfo, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OwnedByteStreamWriter { - return new OwnedByteStreamWriter().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OwnedByteStreamWriter { - return new OwnedByteStreamWriter().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OwnedByteStreamWriter { - return new OwnedByteStreamWriter().fromJsonString(jsonString, options); - } - - static equals(a: OwnedByteStreamWriter | PlainMessage | undefined, b: OwnedByteStreamWriter | PlainMessage | undefined): boolean { - return proto2.util.equals(OwnedByteStreamWriter, a, b); - } -} - -/** - * Opens an outgoing stream. - * Call must be balanced with a StreamCloseRequest. - * - * @generated from message livekit.proto.ByteStreamOpenRequest - */ -export class ByteStreamOpenRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * Options to use for opening the stream. - * - * @generated from field: required livekit.proto.StreamByteOptions options = 2; - */ - options?: StreamByteOptions; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamOpenRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "options", kind: "message", T: StreamByteOptions, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamOpenRequest { - return new ByteStreamOpenRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamOpenRequest { - return new ByteStreamOpenRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamOpenRequest { - return new ByteStreamOpenRequest().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamOpenRequest | PlainMessage | undefined, b: ByteStreamOpenRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamOpenRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.ByteStreamOpenResponse - */ -export class ByteStreamOpenResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamOpenResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamOpenResponse { - return new ByteStreamOpenResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamOpenResponse { - return new ByteStreamOpenResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamOpenResponse { - return new ByteStreamOpenResponse().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamOpenResponse | PlainMessage | undefined, b: ByteStreamOpenResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamOpenResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.ByteStreamOpenCallback - */ -export class ByteStreamOpenCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from oneof livekit.proto.ByteStreamOpenCallback.result - */ - result: { - /** - * @generated from field: livekit.proto.OwnedByteStreamWriter writer = 2; - */ - value: OwnedByteStreamWriter; - case: "writer"; - } | { - /** - * @generated from field: livekit.proto.StreamError error = 3; - */ - value: StreamError; - case: "error"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamOpenCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "writer", kind: "message", T: OwnedByteStreamWriter, oneof: "result" }, - { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamOpenCallback { - return new ByteStreamOpenCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamOpenCallback { - return new ByteStreamOpenCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamOpenCallback { - return new ByteStreamOpenCallback().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamOpenCallback | PlainMessage | undefined, b: ByteStreamOpenCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamOpenCallback, a, b); - } -} - -/** - * Writes data to a stream writer. - * - * @generated from message livekit.proto.ByteStreamWriterWriteRequest - */ -export class ByteStreamWriterWriteRequest extends Message { - /** - * @generated from field: required uint64 writer_handle = 1; - */ - writerHandle?: bigint; - - /** - * @generated from field: required bytes bytes = 2; - */ - bytes?: Uint8Array; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamWriterWriteRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "writer_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "bytes", kind: "scalar", T: 12 /* ScalarType.BYTES */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamWriterWriteRequest { - return new ByteStreamWriterWriteRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamWriterWriteRequest { - return new ByteStreamWriterWriteRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamWriterWriteRequest { - return new ByteStreamWriterWriteRequest().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamWriterWriteRequest | PlainMessage | undefined, b: ByteStreamWriterWriteRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamWriterWriteRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.ByteStreamWriterWriteResponse - */ -export class ByteStreamWriterWriteResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamWriterWriteResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamWriterWriteResponse { - return new ByteStreamWriterWriteResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamWriterWriteResponse { - return new ByteStreamWriterWriteResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamWriterWriteResponse { - return new ByteStreamWriterWriteResponse().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamWriterWriteResponse | PlainMessage | undefined, b: ByteStreamWriterWriteResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamWriterWriteResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.ByteStreamWriterWriteCallback - */ -export class ByteStreamWriterWriteCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from field: optional livekit.proto.StreamError error = 2; - */ - error?: StreamError; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamWriterWriteCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "message", T: StreamError, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamWriterWriteCallback { - return new ByteStreamWriterWriteCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamWriterWriteCallback { - return new ByteStreamWriterWriteCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamWriterWriteCallback { - return new ByteStreamWriterWriteCallback().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamWriterWriteCallback | PlainMessage | undefined, b: ByteStreamWriterWriteCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamWriterWriteCallback, a, b); - } -} - -/** - * Closes a stream writer. - * - * @generated from message livekit.proto.ByteStreamWriterCloseRequest - */ -export class ByteStreamWriterCloseRequest extends Message { - /** - * @generated from field: required uint64 writer_handle = 1; - */ - writerHandle?: bigint; - - /** - * @generated from field: optional string reason = 2; - */ - reason?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamWriterCloseRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "writer_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "reason", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamWriterCloseRequest { - return new ByteStreamWriterCloseRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamWriterCloseRequest { - return new ByteStreamWriterCloseRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamWriterCloseRequest { - return new ByteStreamWriterCloseRequest().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamWriterCloseRequest | PlainMessage | undefined, b: ByteStreamWriterCloseRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamWriterCloseRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.ByteStreamWriterCloseResponse - */ -export class ByteStreamWriterCloseResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamWriterCloseResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamWriterCloseResponse { - return new ByteStreamWriterCloseResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamWriterCloseResponse { - return new ByteStreamWriterCloseResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamWriterCloseResponse { - return new ByteStreamWriterCloseResponse().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamWriterCloseResponse | PlainMessage | undefined, b: ByteStreamWriterCloseResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamWriterCloseResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.ByteStreamWriterCloseCallback - */ -export class ByteStreamWriterCloseCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from field: optional livekit.proto.StreamError error = 2; - */ - error?: StreamError; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamWriterCloseCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "message", T: StreamError, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamWriterCloseCallback { - return new ByteStreamWriterCloseCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamWriterCloseCallback { - return new ByteStreamWriterCloseCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamWriterCloseCallback { - return new ByteStreamWriterCloseCallback().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamWriterCloseCallback | PlainMessage | undefined, b: ByteStreamWriterCloseCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamWriterCloseCallback, a, b); - } -} - -/** - * @generated from message livekit.proto.OwnedTextStreamWriter - */ -export class OwnedTextStreamWriter extends Message { - /** - * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; - */ - handle?: FfiOwnedHandle; - - /** - * @generated from field: required livekit.proto.TextStreamInfo info = 2; - */ - info?: TextStreamInfo; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.OwnedTextStreamWriter"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, - { no: 2, name: "info", kind: "message", T: TextStreamInfo, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OwnedTextStreamWriter { - return new OwnedTextStreamWriter().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OwnedTextStreamWriter { - return new OwnedTextStreamWriter().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OwnedTextStreamWriter { - return new OwnedTextStreamWriter().fromJsonString(jsonString, options); - } - - static equals(a: OwnedTextStreamWriter | PlainMessage | undefined, b: OwnedTextStreamWriter | PlainMessage | undefined): boolean { - return proto2.util.equals(OwnedTextStreamWriter, a, b); - } -} - -/** - * Opens an outgoing text stream. - * Call must be balanced with a TextStreamCloseRequest. - * - * @generated from message livekit.proto.TextStreamOpenRequest - */ -export class TextStreamOpenRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * Options to use for opening the stream. - * - * @generated from field: required livekit.proto.StreamTextOptions options = 2; - */ - options?: StreamTextOptions; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TextStreamOpenRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "options", kind: "message", T: StreamTextOptions, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamOpenRequest { - return new TextStreamOpenRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamOpenRequest { - return new TextStreamOpenRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextStreamOpenRequest { - return new TextStreamOpenRequest().fromJsonString(jsonString, options); - } - - static equals(a: TextStreamOpenRequest | PlainMessage | undefined, b: TextStreamOpenRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(TextStreamOpenRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.TextStreamOpenResponse - */ -export class TextStreamOpenResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TextStreamOpenResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamOpenResponse { - return new TextStreamOpenResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamOpenResponse { - return new TextStreamOpenResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextStreamOpenResponse { - return new TextStreamOpenResponse().fromJsonString(jsonString, options); - } - - static equals(a: TextStreamOpenResponse | PlainMessage | undefined, b: TextStreamOpenResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(TextStreamOpenResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.TextStreamOpenCallback - */ -export class TextStreamOpenCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from oneof livekit.proto.TextStreamOpenCallback.result - */ - result: { - /** - * @generated from field: livekit.proto.OwnedTextStreamWriter writer = 2; - */ - value: OwnedTextStreamWriter; - case: "writer"; - } | { - /** - * @generated from field: livekit.proto.StreamError error = 3; - */ - value: StreamError; - case: "error"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TextStreamOpenCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "writer", kind: "message", T: OwnedTextStreamWriter, oneof: "result" }, - { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamOpenCallback { - return new TextStreamOpenCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamOpenCallback { - return new TextStreamOpenCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextStreamOpenCallback { - return new TextStreamOpenCallback().fromJsonString(jsonString, options); - } - - static equals(a: TextStreamOpenCallback | PlainMessage | undefined, b: TextStreamOpenCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(TextStreamOpenCallback, a, b); - } -} - -/** - * Writes text to a text stream writer. - * - * @generated from message livekit.proto.TextStreamWriterWriteRequest - */ -export class TextStreamWriterWriteRequest extends Message { - /** - * @generated from field: required uint64 writer_handle = 1; - */ - writerHandle?: bigint; - - /** - * @generated from field: required string text = 2; - */ - text?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TextStreamWriterWriteRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "writer_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamWriterWriteRequest { - return new TextStreamWriterWriteRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamWriterWriteRequest { - return new TextStreamWriterWriteRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextStreamWriterWriteRequest { - return new TextStreamWriterWriteRequest().fromJsonString(jsonString, options); - } - - static equals(a: TextStreamWriterWriteRequest | PlainMessage | undefined, b: TextStreamWriterWriteRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(TextStreamWriterWriteRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.TextStreamWriterWriteResponse - */ -export class TextStreamWriterWriteResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TextStreamWriterWriteResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamWriterWriteResponse { - return new TextStreamWriterWriteResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamWriterWriteResponse { - return new TextStreamWriterWriteResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextStreamWriterWriteResponse { - return new TextStreamWriterWriteResponse().fromJsonString(jsonString, options); - } - - static equals(a: TextStreamWriterWriteResponse | PlainMessage | undefined, b: TextStreamWriterWriteResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(TextStreamWriterWriteResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.TextStreamWriterWriteCallback - */ -export class TextStreamWriterWriteCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from field: optional livekit.proto.StreamError error = 2; - */ - error?: StreamError; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TextStreamWriterWriteCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "message", T: StreamError, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamWriterWriteCallback { - return new TextStreamWriterWriteCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamWriterWriteCallback { - return new TextStreamWriterWriteCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextStreamWriterWriteCallback { - return new TextStreamWriterWriteCallback().fromJsonString(jsonString, options); - } - - static equals(a: TextStreamWriterWriteCallback | PlainMessage | undefined, b: TextStreamWriterWriteCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(TextStreamWriterWriteCallback, a, b); - } -} - -/** - * Closes a text stream writer. - * - * @generated from message livekit.proto.TextStreamWriterCloseRequest - */ -export class TextStreamWriterCloseRequest extends Message { - /** - * @generated from field: required uint64 writer_handle = 1; - */ - writerHandle?: bigint; - - /** - * @generated from field: optional string reason = 2; - */ - reason?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TextStreamWriterCloseRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "writer_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "reason", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamWriterCloseRequest { - return new TextStreamWriterCloseRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamWriterCloseRequest { - return new TextStreamWriterCloseRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextStreamWriterCloseRequest { - return new TextStreamWriterCloseRequest().fromJsonString(jsonString, options); - } - - static equals(a: TextStreamWriterCloseRequest | PlainMessage | undefined, b: TextStreamWriterCloseRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(TextStreamWriterCloseRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.TextStreamWriterCloseResponse - */ -export class TextStreamWriterCloseResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TextStreamWriterCloseResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamWriterCloseResponse { - return new TextStreamWriterCloseResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamWriterCloseResponse { - return new TextStreamWriterCloseResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextStreamWriterCloseResponse { - return new TextStreamWriterCloseResponse().fromJsonString(jsonString, options); - } - - static equals(a: TextStreamWriterCloseResponse | PlainMessage | undefined, b: TextStreamWriterCloseResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(TextStreamWriterCloseResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.TextStreamWriterCloseCallback - */ -export class TextStreamWriterCloseCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from field: optional livekit.proto.StreamError error = 2; - */ - error?: StreamError; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TextStreamWriterCloseCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "message", T: StreamError, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamWriterCloseCallback { - return new TextStreamWriterCloseCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamWriterCloseCallback { - return new TextStreamWriterCloseCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextStreamWriterCloseCallback { - return new TextStreamWriterCloseCallback().fromJsonString(jsonString, options); - } - - static equals(a: TextStreamWriterCloseCallback | PlainMessage | undefined, b: TextStreamWriterCloseCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(TextStreamWriterCloseCallback, a, b); - } -} - -/** - * @generated from message livekit.proto.TextStreamInfo - */ -export class TextStreamInfo extends Message { - /** - * unique identifier for this data stream - * - * @generated from field: required string stream_id = 1; - */ - streamId?: string; - - /** - * using int64 for Unix timestamp - * - * @generated from field: required int64 timestamp = 2; - */ - timestamp?: bigint; - - /** - * @generated from field: required string mime_type = 3; - */ - mimeType?: string; - - /** - * @generated from field: required string topic = 4; - */ - topic?: string; - - /** - * only populated for finite streams, if it's a stream of unknown size this stays empty - * - * @generated from field: optional uint64 total_length = 5; - */ - totalLength?: bigint; - - /** - * user defined attributes map that can carry additional info - * - * @generated from field: map attributes = 6; - */ - attributes: { [key: string]: string } = {}; - - /** - * @generated from field: required livekit.proto.TextStreamInfo.OperationType operation_type = 7; - */ - operationType?: TextStreamInfo_OperationType; - - /** - * Optional: Version for updates/edits - * - * @generated from field: optional int32 version = 8; - */ - version?: number; - - /** - * Optional: Reply to specific message - * - * @generated from field: optional string reply_to_stream_id = 9; - */ - replyToStreamId?: string; - - /** - * file attachments for text streams - * - * @generated from field: repeated string attached_stream_ids = 10; - */ - attachedStreamIds: string[] = []; - - /** - * true if the text has been generated by an agent from a participant's audio transcription - * - * @generated from field: optional bool generated = 11; - */ - generated?: boolean; - - /** - * @generated from field: required livekit.proto.EncryptionType encryption_type = 12; - */ - encryptionType?: EncryptionType; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TextStreamInfo"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "stream_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, req: true }, - { no: 3, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 4, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 5, name: "total_length", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, - { no: 6, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - { no: 7, name: "operation_type", kind: "enum", T: proto2.getEnumType(TextStreamInfo_OperationType), req: true }, - { no: 8, name: "version", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 9, name: "reply_to_stream_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 10, name: "attached_stream_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 11, name: "generated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 12, name: "encryption_type", kind: "enum", T: proto2.getEnumType(EncryptionType), req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamInfo { - return new TextStreamInfo().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamInfo { - return new TextStreamInfo().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextStreamInfo { - return new TextStreamInfo().fromJsonString(jsonString, options); - } - - static equals(a: TextStreamInfo | PlainMessage | undefined, b: TextStreamInfo | PlainMessage | undefined): boolean { - return proto2.util.equals(TextStreamInfo, a, b); - } -} - -/** - * @generated from enum livekit.proto.TextStreamInfo.OperationType - */ -export enum TextStreamInfo_OperationType { - /** - * @generated from enum value: CREATE = 0; - */ - CREATE = 0, - - /** - * @generated from enum value: UPDATE = 1; - */ - UPDATE = 1, - - /** - * @generated from enum value: DELETE = 2; - */ - DELETE = 2, - - /** - * @generated from enum value: REACTION = 3; - */ - REACTION = 3, -} -// Retrieve enum metadata with: proto2.getEnumType(TextStreamInfo_OperationType) -proto2.util.setEnumType(TextStreamInfo_OperationType, "livekit.proto.TextStreamInfo.OperationType", [ - { no: 0, name: "CREATE" }, - { no: 1, name: "UPDATE" }, - { no: 2, name: "DELETE" }, - { no: 3, name: "REACTION" }, -]); - -/** - * @generated from message livekit.proto.ByteStreamInfo - */ -export class ByteStreamInfo extends Message { - /** - * unique identifier for this data stream - * - * @generated from field: required string stream_id = 1; - */ - streamId?: string; - - /** - * using int64 for Unix timestamp - * - * @generated from field: required int64 timestamp = 2; - */ - timestamp?: bigint; - - /** - * @generated from field: required string mime_type = 3; - */ - mimeType?: string; - - /** - * @generated from field: required string topic = 4; - */ - topic?: string; - - /** - * only populated for finite streams, if it's a stream of unknown size this stays empty - * - * @generated from field: optional uint64 total_length = 5; - */ - totalLength?: bigint; - - /** - * user defined attributes map that can carry additional info - * - * @generated from field: map attributes = 6; - */ - attributes: { [key: string]: string } = {}; - - /** - * @generated from field: required string name = 7; - */ - name?: string; - - /** - * @generated from field: required livekit.proto.EncryptionType encryption_type = 8; - */ - encryptionType?: EncryptionType; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamInfo"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "stream_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, req: true }, - { no: 3, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 4, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 5, name: "total_length", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, - { no: 6, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - { no: 7, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 8, name: "encryption_type", kind: "enum", T: proto2.getEnumType(EncryptionType), req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamInfo { - return new ByteStreamInfo().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamInfo { - return new ByteStreamInfo().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamInfo { - return new ByteStreamInfo().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamInfo | PlainMessage | undefined, b: ByteStreamInfo | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamInfo, a, b); - } -} - -/** - * @generated from message livekit.proto.StreamTextOptions - */ -export class StreamTextOptions extends Message { - /** - * @generated from field: required string topic = 1; - */ - topic?: string; - - /** - * @generated from field: map attributes = 2; - */ - attributes: { [key: string]: string } = {}; - - /** - * @generated from field: repeated string destination_identities = 3; - */ - destinationIdentities: string[] = []; - - /** - * @generated from field: optional string id = 4; - */ - id?: string; - - /** - * @generated from field: optional livekit.proto.TextStreamInfo.OperationType operation_type = 5; - */ - operationType?: TextStreamInfo_OperationType; - - /** - * @generated from field: optional int32 version = 6; - */ - version?: number; - - /** - * @generated from field: optional string reply_to_stream_id = 7; - */ - replyToStreamId?: string; - - /** - * @generated from field: repeated string attached_stream_ids = 8; - */ - attachedStreamIds: string[] = []; - - /** - * @generated from field: optional bool generated = 9; - */ - generated?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.StreamTextOptions"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - { no: 3, name: "destination_identities", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 4, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "operation_type", kind: "enum", T: proto2.getEnumType(TextStreamInfo_OperationType), opt: true }, - { no: 6, name: "version", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 7, name: "reply_to_stream_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 8, name: "attached_stream_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 9, name: "generated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): StreamTextOptions { - return new StreamTextOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): StreamTextOptions { - return new StreamTextOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): StreamTextOptions { - return new StreamTextOptions().fromJsonString(jsonString, options); - } - - static equals(a: StreamTextOptions | PlainMessage | undefined, b: StreamTextOptions | PlainMessage | undefined): boolean { - return proto2.util.equals(StreamTextOptions, a, b); - } -} - -/** - * @generated from message livekit.proto.StreamByteOptions - */ -export class StreamByteOptions extends Message { - /** - * @generated from field: required string topic = 1; - */ - topic?: string; - - /** - * @generated from field: map attributes = 2; - */ - attributes: { [key: string]: string } = {}; - - /** - * @generated from field: repeated string destination_identities = 3; - */ - destinationIdentities: string[] = []; - - /** - * @generated from field: optional string id = 4; - */ - id?: string; - - /** - * @generated from field: optional string name = 5; - */ - name?: string; - - /** - * @generated from field: optional string mime_type = 6; - */ - mimeType?: string; - - /** - * @generated from field: optional uint64 total_length = 7; - */ - totalLength?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.StreamByteOptions"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - { no: 3, name: "destination_identities", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 4, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "total_length", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): StreamByteOptions { - return new StreamByteOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): StreamByteOptions { - return new StreamByteOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): StreamByteOptions { - return new StreamByteOptions().fromJsonString(jsonString, options); - } - - static equals(a: StreamByteOptions | PlainMessage | undefined, b: StreamByteOptions | PlainMessage | undefined): boolean { - return proto2.util.equals(StreamByteOptions, a, b); - } -} - -/** - * Error pertaining to a stream. - * - * @generated from message livekit.proto.StreamError - */ -export class StreamError extends Message { - /** - * TODO(ladvoc): make this an enum. - * - * @generated from field: required string description = 1; - */ - description?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.StreamError"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): StreamError { - return new StreamError().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): StreamError { - return new StreamError().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): StreamError { - return new StreamError().fromJsonString(jsonString, options); - } - - static equals(a: StreamError | PlainMessage | undefined, b: StreamError | PlainMessage | undefined): boolean { - return proto2.util.equals(StreamError, a, b); - } -} - diff --git a/packages/livekit-rtc/src/proto/e2ee_pb.ts b/packages/livekit-rtc/src/proto/e2ee_pb.ts deleted file mode 100644 index 9994f3d6..00000000 --- a/packages/livekit-rtc/src/proto/e2ee_pb.ts +++ /dev/null @@ -1,1231 +0,0 @@ -// Copyright 2025 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=.js" -// @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, proto2 } from "@bufbuild/protobuf"; - -/** - * @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, -} -// Retrieve enum metadata with: proto2.getEnumType(EncryptionType) -proto2.util.setEnumType(EncryptionType, "livekit.proto.EncryptionType", [ - { no: 0, name: "NONE" }, - { no: 1, name: "GCM" }, - { no: 2, name: "CUSTOM" }, -]); - -/** - * @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, -} -// Retrieve enum metadata with: proto2.getEnumType(EncryptionState) -proto2.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" }, -]); - -/** - * @generated from message livekit.proto.FrameCryptor - */ -export class FrameCryptor extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required string track_sid = 2; - */ - trackSid?: string; - - /** - * @generated from field: required int32 key_index = 3; - */ - keyIndex?: number; - - /** - * @generated from field: required bool enabled = 4; - */ - enabled?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.FrameCryptor"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "key_index", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true }, - { no: 4, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - ]); - - 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 proto2.util.equals(FrameCryptor, a, b); - } -} - -/** - * @generated from message livekit.proto.KeyProviderOptions - */ -export class KeyProviderOptions extends Message { - /** - * Only specify if you want to use a shared_key - * - * @generated from field: optional bytes shared_key = 1; - */ - sharedKey?: Uint8Array; - - /** - * @generated from field: required int32 ratchet_window_size = 2; - */ - ratchetWindowSize?: number; - - /** - * @generated from field: required bytes ratchet_salt = 3; - */ - ratchetSalt?: Uint8Array; - - /** - * -1 = no tolerance - * - * @generated from field: required int32 failure_tolerance = 4; - */ - failureTolerance?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.KeyProviderOptions"; - static readonly fields: FieldList = proto2.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 */, req: true }, - { no: 3, name: "ratchet_salt", kind: "scalar", T: 12 /* ScalarType.BYTES */, req: true }, - { no: 4, name: "failure_tolerance", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true }, - ]); - - 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 proto2.util.equals(KeyProviderOptions, a, b); - } -} - -/** - * @generated from message livekit.proto.E2eeOptions - */ -export class E2eeOptions extends Message { - /** - * @generated from field: required livekit.proto.EncryptionType encryption_type = 1; - */ - encryptionType?: EncryptionType; - - /** - * @generated from field: required livekit.proto.KeyProviderOptions key_provider_options = 2; - */ - keyProviderOptions?: KeyProviderOptions; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.E2eeOptions"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "encryption_type", kind: "enum", T: proto2.getEnumType(EncryptionType), req: true }, - { no: 2, name: "key_provider_options", kind: "message", T: KeyProviderOptions, req: true }, - ]); - - 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 proto2.util.equals(E2eeOptions, a, b); - } -} - -/** - * @generated from message livekit.proto.E2eeManagerSetEnabledRequest - */ -export class E2eeManagerSetEnabledRequest extends Message { - /** - * @generated from field: required bool enabled = 1; - */ - enabled?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.E2eeManagerSetEnabledRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - ]); - - 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 proto2.util.equals(E2eeManagerSetEnabledRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.E2eeManagerSetEnabledResponse - */ -export class E2eeManagerSetEnabledResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.E2eeManagerSetEnabledResponse"; - static readonly fields: FieldList = proto2.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 proto2.util.equals(E2eeManagerSetEnabledResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.E2eeManagerGetFrameCryptorsRequest - */ -export class E2eeManagerGetFrameCryptorsRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.E2eeManagerGetFrameCryptorsRequest"; - static readonly fields: FieldList = proto2.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 proto2.util.equals(E2eeManagerGetFrameCryptorsRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.E2eeManagerGetFrameCryptorsResponse - */ -export class E2eeManagerGetFrameCryptorsResponse extends Message { - /** - * @generated from field: repeated livekit.proto.FrameCryptor frame_cryptors = 1; - */ - frameCryptors: FrameCryptor[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.E2eeManagerGetFrameCryptorsResponse"; - static readonly fields: FieldList = proto2.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 proto2.util.equals(E2eeManagerGetFrameCryptorsResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.FrameCryptorSetEnabledRequest - */ -export class FrameCryptorSetEnabledRequest extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required string track_sid = 2; - */ - trackSid?: string; - - /** - * @generated from field: required bool enabled = 3; - */ - enabled?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.FrameCryptorSetEnabledRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - ]); - - 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 proto2.util.equals(FrameCryptorSetEnabledRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.FrameCryptorSetEnabledResponse - */ -export class FrameCryptorSetEnabledResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.FrameCryptorSetEnabledResponse"; - static readonly fields: FieldList = proto2.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 proto2.util.equals(FrameCryptorSetEnabledResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.FrameCryptorSetKeyIndexRequest - */ -export class FrameCryptorSetKeyIndexRequest extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required string track_sid = 2; - */ - trackSid?: string; - - /** - * @generated from field: required int32 key_index = 3; - */ - keyIndex?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.FrameCryptorSetKeyIndexRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "key_index", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true }, - ]); - - 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 proto2.util.equals(FrameCryptorSetKeyIndexRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.FrameCryptorSetKeyIndexResponse - */ -export class FrameCryptorSetKeyIndexResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.FrameCryptorSetKeyIndexResponse"; - static readonly fields: FieldList = proto2.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 proto2.util.equals(FrameCryptorSetKeyIndexResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.SetSharedKeyRequest - */ -export class SetSharedKeyRequest extends Message { - /** - * @generated from field: required bytes shared_key = 1; - */ - sharedKey?: Uint8Array; - - /** - * @generated from field: required int32 key_index = 2; - */ - keyIndex?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetSharedKeyRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "shared_key", kind: "scalar", T: 12 /* ScalarType.BYTES */, req: true }, - { no: 2, name: "key_index", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true }, - ]); - - 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 proto2.util.equals(SetSharedKeyRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.SetSharedKeyResponse - */ -export class SetSharedKeyResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetSharedKeyResponse"; - static readonly fields: FieldList = proto2.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 proto2.util.equals(SetSharedKeyResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.RatchetSharedKeyRequest - */ -export class RatchetSharedKeyRequest extends Message { - /** - * @generated from field: required int32 key_index = 1; - */ - keyIndex?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RatchetSharedKeyRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "key_index", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true }, - ]); - - 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 proto2.util.equals(RatchetSharedKeyRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.RatchetSharedKeyResponse - */ -export class RatchetSharedKeyResponse extends Message { - /** - * @generated from field: optional bytes new_key = 1; - */ - newKey?: Uint8Array; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RatchetSharedKeyResponse"; - static readonly fields: FieldList = proto2.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 proto2.util.equals(RatchetSharedKeyResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.GetSharedKeyRequest - */ -export class GetSharedKeyRequest extends Message { - /** - * @generated from field: required int32 key_index = 1; - */ - keyIndex?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.GetSharedKeyRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "key_index", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true }, - ]); - - 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 proto2.util.equals(GetSharedKeyRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.GetSharedKeyResponse - */ -export class GetSharedKeyResponse extends Message { - /** - * @generated from field: optional bytes key = 1; - */ - key?: Uint8Array; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.GetSharedKeyResponse"; - static readonly fields: FieldList = proto2.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 proto2.util.equals(GetSharedKeyResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.SetKeyRequest - */ -export class SetKeyRequest extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required bytes key = 2; - */ - key?: Uint8Array; - - /** - * @generated from field: required int32 key_index = 3; - */ - keyIndex?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetKeyRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "key", kind: "scalar", T: 12 /* ScalarType.BYTES */, req: true }, - { no: 3, name: "key_index", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true }, - ]); - - 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 proto2.util.equals(SetKeyRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.SetKeyResponse - */ -export class SetKeyResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetKeyResponse"; - static readonly fields: FieldList = proto2.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 proto2.util.equals(SetKeyResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.RatchetKeyRequest - */ -export class RatchetKeyRequest extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required int32 key_index = 2; - */ - keyIndex?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RatchetKeyRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "key_index", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true }, - ]); - - 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 proto2.util.equals(RatchetKeyRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.RatchetKeyResponse - */ -export class RatchetKeyResponse extends Message { - /** - * @generated from field: optional bytes new_key = 1; - */ - newKey?: Uint8Array; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RatchetKeyResponse"; - static readonly fields: FieldList = proto2.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 proto2.util.equals(RatchetKeyResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.GetKeyRequest - */ -export class GetKeyRequest extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required int32 key_index = 2; - */ - keyIndex?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.GetKeyRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "key_index", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true }, - ]); - - 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 proto2.util.equals(GetKeyRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.GetKeyResponse - */ -export class GetKeyResponse extends Message { - /** - * @generated from field: optional bytes key = 1; - */ - key?: Uint8Array; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.GetKeyResponse"; - static readonly fields: FieldList = proto2.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 proto2.util.equals(GetKeyResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.E2eeRequest - */ -export class E2eeRequest extends Message { - /** - * @generated from field: required uint64 room_handle = 1; - */ - roomHandle?: bigint; - - /** - * @generated from oneof livekit.proto.E2eeRequest.message - */ - message: { - /** - * @generated from field: livekit.proto.E2eeManagerSetEnabledRequest manager_set_enabled = 2; - */ - value: E2eeManagerSetEnabledRequest; - case: "managerSetEnabled"; - } | { - /** - * @generated from field: livekit.proto.E2eeManagerGetFrameCryptorsRequest manager_get_frame_cryptors = 3; - */ - value: E2eeManagerGetFrameCryptorsRequest; - case: "managerGetFrameCryptors"; - } | { - /** - * @generated from field: livekit.proto.FrameCryptorSetEnabledRequest cryptor_set_enabled = 4; - */ - value: FrameCryptorSetEnabledRequest; - case: "cryptorSetEnabled"; - } | { - /** - * @generated from field: livekit.proto.FrameCryptorSetKeyIndexRequest cryptor_set_key_index = 5; - */ - value: FrameCryptorSetKeyIndexRequest; - case: "cryptorSetKeyIndex"; - } | { - /** - * @generated from field: livekit.proto.SetSharedKeyRequest set_shared_key = 6; - */ - value: SetSharedKeyRequest; - case: "setSharedKey"; - } | { - /** - * @generated from field: livekit.proto.RatchetSharedKeyRequest ratchet_shared_key = 7; - */ - value: RatchetSharedKeyRequest; - case: "ratchetSharedKey"; - } | { - /** - * @generated from field: livekit.proto.GetSharedKeyRequest get_shared_key = 8; - */ - value: GetSharedKeyRequest; - case: "getSharedKey"; - } | { - /** - * @generated from field: livekit.proto.SetKeyRequest set_key = 9; - */ - value: SetKeyRequest; - case: "setKey"; - } | { - /** - * @generated from field: livekit.proto.RatchetKeyRequest ratchet_key = 10; - */ - value: RatchetKeyRequest; - case: "ratchetKey"; - } | { - /** - * @generated from field: livekit.proto.GetKeyRequest get_key = 11; - */ - value: GetKeyRequest; - case: "getKey"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.E2eeRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "room_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { 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 proto2.util.equals(E2eeRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.E2eeResponse - */ -export class E2eeResponse extends Message { - /** - * @generated from oneof livekit.proto.E2eeResponse.message - */ - message: { - /** - * @generated from field: livekit.proto.E2eeManagerSetEnabledResponse manager_set_enabled = 1; - */ - value: E2eeManagerSetEnabledResponse; - case: "managerSetEnabled"; - } | { - /** - * @generated from field: livekit.proto.E2eeManagerGetFrameCryptorsResponse manager_get_frame_cryptors = 2; - */ - value: E2eeManagerGetFrameCryptorsResponse; - case: "managerGetFrameCryptors"; - } | { - /** - * @generated from field: livekit.proto.FrameCryptorSetEnabledResponse cryptor_set_enabled = 3; - */ - value: FrameCryptorSetEnabledResponse; - case: "cryptorSetEnabled"; - } | { - /** - * @generated from field: livekit.proto.FrameCryptorSetKeyIndexResponse cryptor_set_key_index = 4; - */ - value: FrameCryptorSetKeyIndexResponse; - case: "cryptorSetKeyIndex"; - } | { - /** - * @generated from field: livekit.proto.SetSharedKeyResponse set_shared_key = 5; - */ - value: SetSharedKeyResponse; - case: "setSharedKey"; - } | { - /** - * @generated from field: livekit.proto.RatchetSharedKeyResponse ratchet_shared_key = 6; - */ - value: RatchetSharedKeyResponse; - case: "ratchetSharedKey"; - } | { - /** - * @generated from field: livekit.proto.GetSharedKeyResponse get_shared_key = 7; - */ - value: GetSharedKeyResponse; - case: "getSharedKey"; - } | { - /** - * @generated from field: livekit.proto.SetKeyResponse set_key = 8; - */ - value: SetKeyResponse; - case: "setKey"; - } | { - /** - * @generated from field: livekit.proto.RatchetKeyResponse ratchet_key = 9; - */ - value: RatchetKeyResponse; - case: "ratchetKey"; - } | { - /** - * @generated from field: livekit.proto.GetKeyResponse get_key = 10; - */ - value: GetKeyResponse; - case: "getKey"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.E2eeResponse"; - static readonly fields: FieldList = proto2.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 proto2.util.equals(E2eeResponse, a, b); - } -} - diff --git a/packages/livekit-rtc/src/proto/ffi_pb.ts b/packages/livekit-rtc/src/proto/ffi_pb.ts deleted file mode 100644 index 844e3917..00000000 --- a/packages/livekit-rtc/src/proto/ffi_pb.ts +++ /dev/null @@ -1,1700 +0,0 @@ -// Copyright 2025 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=.js" -// @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, proto2 } 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, SendStreamChunkCallback, SendStreamChunkRequest, SendStreamChunkResponse, SendStreamHeaderCallback, SendStreamHeaderRequest, SendStreamHeaderResponse, SendStreamTrailerCallback, SendStreamTrailerRequest, SendStreamTrailerResponse, SetDataChannelBufferedAmountLowThresholdRequest, SetDataChannelBufferedAmountLowThresholdResponse, 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, SetTrackSubscriptionPermissionsRequest, SetTrackSubscriptionPermissionsResponse, TrackEvent } from "./track_pb.js"; -import { CaptureVideoFrameRequest, CaptureVideoFrameResponse, NewVideoSourceRequest, NewVideoSourceResponse, NewVideoStreamRequest, NewVideoStreamResponse, VideoConvertRequest, VideoConvertResponse, VideoStreamEvent, VideoStreamFromParticipantRequest, VideoStreamFromParticipantResponse } from "./video_frame_pb.js"; -import { ApmProcessReverseStreamRequest, ApmProcessReverseStreamResponse, ApmProcessStreamRequest, ApmProcessStreamResponse, ApmSetStreamDelayRequest, ApmSetStreamDelayResponse, AudioStreamEvent, AudioStreamFromParticipantRequest, AudioStreamFromParticipantResponse, CaptureAudioFrameCallback, CaptureAudioFrameRequest, CaptureAudioFrameResponse, ClearAudioBufferRequest, ClearAudioBufferResponse, FlushSoxResamplerRequest, FlushSoxResamplerResponse, LoadAudioFilterPluginRequest, LoadAudioFilterPluginResponse, NewApmRequest, NewApmResponse, 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 { PerformRpcCallback, PerformRpcRequest, PerformRpcResponse, RegisterRpcMethodRequest, RegisterRpcMethodResponse, RpcMethodInvocationEvent, RpcMethodInvocationResponseRequest, RpcMethodInvocationResponseResponse, UnregisterRpcMethodRequest, UnregisterRpcMethodResponse } from "./rpc_pb.js"; -import { EnableRemoteTrackPublicationRequest, EnableRemoteTrackPublicationResponse, SetRemoteTrackPublicationQualityRequest, SetRemoteTrackPublicationQualityResponse, UpdateRemoteTrackPublicationDimensionRequest, UpdateRemoteTrackPublicationDimensionResponse } from "./track_publication_pb.js"; -import { ByteStreamOpenCallback, ByteStreamOpenRequest, ByteStreamOpenResponse, ByteStreamReaderEvent, ByteStreamReaderReadAllCallback, ByteStreamReaderReadAllRequest, ByteStreamReaderReadAllResponse, ByteStreamReaderReadIncrementalRequest, ByteStreamReaderReadIncrementalResponse, ByteStreamReaderWriteToFileCallback, ByteStreamReaderWriteToFileRequest, ByteStreamReaderWriteToFileResponse, ByteStreamWriterCloseCallback, ByteStreamWriterCloseRequest, ByteStreamWriterCloseResponse, ByteStreamWriterWriteCallback, ByteStreamWriterWriteRequest, ByteStreamWriterWriteResponse, StreamSendBytesCallback, StreamSendBytesRequest, StreamSendBytesResponse, StreamSendFileCallback, StreamSendFileRequest, StreamSendFileResponse, StreamSendTextCallback, StreamSendTextRequest, StreamSendTextResponse, TextStreamOpenCallback, TextStreamOpenRequest, TextStreamOpenResponse, TextStreamReaderEvent, TextStreamReaderReadAllCallback, TextStreamReaderReadAllRequest, TextStreamReaderReadAllResponse, TextStreamReaderReadIncrementalRequest, TextStreamReaderReadIncrementalResponse, TextStreamWriterCloseCallback, TextStreamWriterCloseRequest, TextStreamWriterCloseResponse, TextStreamWriterWriteCallback, TextStreamWriterWriteRequest, TextStreamWriterWriteResponse } from "./data_stream_pb.js"; - -/** - * @generated from enum livekit.proto.LogLevel - */ -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: proto2.getEnumType(LogLevel) -proto2.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" }, -]); - -/** - * This is the input of livekit_ffi_request function - * We always expect a response (FFIResponse, even if it's empty) - * - * @generated from message livekit.proto.FfiRequest - */ -export class FfiRequest extends Message { - /** - * @generated from oneof livekit.proto.FfiRequest.message - */ - message: { - /** - * @generated from field: livekit.proto.DisposeRequest dispose = 2; - */ - value: DisposeRequest; - case: "dispose"; - } | { - /** - * Room - * - * @generated from field: livekit.proto.ConnectRequest connect = 3; - */ - value: ConnectRequest; - case: "connect"; - } | { - /** - * @generated from field: livekit.proto.DisconnectRequest disconnect = 4; - */ - value: DisconnectRequest; - case: "disconnect"; - } | { - /** - * @generated from field: livekit.proto.PublishTrackRequest publish_track = 5; - */ - value: PublishTrackRequest; - case: "publishTrack"; - } | { - /** - * @generated from field: livekit.proto.UnpublishTrackRequest unpublish_track = 6; - */ - value: UnpublishTrackRequest; - case: "unpublishTrack"; - } | { - /** - * @generated from field: livekit.proto.PublishDataRequest publish_data = 7; - */ - value: PublishDataRequest; - case: "publishData"; - } | { - /** - * @generated from field: livekit.proto.SetSubscribedRequest set_subscribed = 8; - */ - value: SetSubscribedRequest; - case: "setSubscribed"; - } | { - /** - * @generated from field: livekit.proto.SetLocalMetadataRequest set_local_metadata = 9; - */ - value: SetLocalMetadataRequest; - case: "setLocalMetadata"; - } | { - /** - * @generated from field: livekit.proto.SetLocalNameRequest set_local_name = 10; - */ - value: SetLocalNameRequest; - case: "setLocalName"; - } | { - /** - * @generated from field: livekit.proto.SetLocalAttributesRequest set_local_attributes = 11; - */ - value: SetLocalAttributesRequest; - case: "setLocalAttributes"; - } | { - /** - * @generated from field: livekit.proto.GetSessionStatsRequest get_session_stats = 12; - */ - value: GetSessionStatsRequest; - case: "getSessionStats"; - } | { - /** - * @generated from field: livekit.proto.PublishTranscriptionRequest publish_transcription = 13; - */ - value: PublishTranscriptionRequest; - case: "publishTranscription"; - } | { - /** - * @generated from field: livekit.proto.PublishSipDtmfRequest publish_sip_dtmf = 14; - */ - value: PublishSipDtmfRequest; - case: "publishSipDtmf"; - } | { - /** - * Track - * - * @generated from field: livekit.proto.CreateVideoTrackRequest create_video_track = 15; - */ - value: CreateVideoTrackRequest; - case: "createVideoTrack"; - } | { - /** - * @generated from field: livekit.proto.CreateAudioTrackRequest create_audio_track = 16; - */ - value: CreateAudioTrackRequest; - case: "createAudioTrack"; - } | { - /** - * @generated from field: livekit.proto.LocalTrackMuteRequest local_track_mute = 17; - */ - value: LocalTrackMuteRequest; - case: "localTrackMute"; - } | { - /** - * @generated from field: livekit.proto.EnableRemoteTrackRequest enable_remote_track = 18; - */ - value: EnableRemoteTrackRequest; - case: "enableRemoteTrack"; - } | { - /** - * @generated from field: livekit.proto.GetStatsRequest get_stats = 19; - */ - value: GetStatsRequest; - case: "getStats"; - } | { - /** - * @generated from field: livekit.proto.SetTrackSubscriptionPermissionsRequest set_track_subscription_permissions = 48; - */ - value: SetTrackSubscriptionPermissionsRequest; - case: "setTrackSubscriptionPermissions"; - } | { - /** - * Video - * - * @generated from field: livekit.proto.NewVideoStreamRequest new_video_stream = 20; - */ - value: NewVideoStreamRequest; - case: "newVideoStream"; - } | { - /** - * @generated from field: livekit.proto.NewVideoSourceRequest new_video_source = 21; - */ - value: NewVideoSourceRequest; - case: "newVideoSource"; - } | { - /** - * @generated from field: livekit.proto.CaptureVideoFrameRequest capture_video_frame = 22; - */ - value: CaptureVideoFrameRequest; - case: "captureVideoFrame"; - } | { - /** - * @generated from field: livekit.proto.VideoConvertRequest video_convert = 23; - */ - value: VideoConvertRequest; - case: "videoConvert"; - } | { - /** - * @generated from field: livekit.proto.VideoStreamFromParticipantRequest video_stream_from_participant = 24; - */ - value: VideoStreamFromParticipantRequest; - case: "videoStreamFromParticipant"; - } | { - /** - * Audio - * - * @generated from field: livekit.proto.NewAudioStreamRequest new_audio_stream = 25; - */ - value: NewAudioStreamRequest; - case: "newAudioStream"; - } | { - /** - * @generated from field: livekit.proto.NewAudioSourceRequest new_audio_source = 26; - */ - value: NewAudioSourceRequest; - case: "newAudioSource"; - } | { - /** - * @generated from field: livekit.proto.CaptureAudioFrameRequest capture_audio_frame = 27; - */ - value: CaptureAudioFrameRequest; - case: "captureAudioFrame"; - } | { - /** - * @generated from field: livekit.proto.ClearAudioBufferRequest clear_audio_buffer = 28; - */ - value: ClearAudioBufferRequest; - case: "clearAudioBuffer"; - } | { - /** - * @generated from field: livekit.proto.NewAudioResamplerRequest new_audio_resampler = 29; - */ - value: NewAudioResamplerRequest; - case: "newAudioResampler"; - } | { - /** - * @generated from field: livekit.proto.RemixAndResampleRequest remix_and_resample = 30; - */ - value: RemixAndResampleRequest; - case: "remixAndResample"; - } | { - /** - * @generated from field: livekit.proto.E2eeRequest e2ee = 31; - */ - value: E2eeRequest; - case: "e2ee"; - } | { - /** - * @generated from field: livekit.proto.AudioStreamFromParticipantRequest audio_stream_from_participant = 32; - */ - value: AudioStreamFromParticipantRequest; - case: "audioStreamFromParticipant"; - } | { - /** - * @generated from field: livekit.proto.NewSoxResamplerRequest new_sox_resampler = 33; - */ - value: NewSoxResamplerRequest; - case: "newSoxResampler"; - } | { - /** - * @generated from field: livekit.proto.PushSoxResamplerRequest push_sox_resampler = 34; - */ - value: PushSoxResamplerRequest; - case: "pushSoxResampler"; - } | { - /** - * @generated from field: livekit.proto.FlushSoxResamplerRequest flush_sox_resampler = 35; - */ - value: FlushSoxResamplerRequest; - case: "flushSoxResampler"; - } | { - /** - * @generated from field: livekit.proto.SendChatMessageRequest send_chat_message = 36; - */ - value: SendChatMessageRequest; - case: "sendChatMessage"; - } | { - /** - * @generated from field: livekit.proto.EditChatMessageRequest edit_chat_message = 37; - */ - value: EditChatMessageRequest; - case: "editChatMessage"; - } | { - /** - * RPC - * - * @generated from field: livekit.proto.PerformRpcRequest perform_rpc = 38; - */ - value: PerformRpcRequest; - case: "performRpc"; - } | { - /** - * @generated from field: livekit.proto.RegisterRpcMethodRequest register_rpc_method = 39; - */ - value: RegisterRpcMethodRequest; - case: "registerRpcMethod"; - } | { - /** - * @generated from field: livekit.proto.UnregisterRpcMethodRequest unregister_rpc_method = 40; - */ - value: UnregisterRpcMethodRequest; - case: "unregisterRpcMethod"; - } | { - /** - * @generated from field: livekit.proto.RpcMethodInvocationResponseRequest rpc_method_invocation_response = 41; - */ - value: RpcMethodInvocationResponseRequest; - case: "rpcMethodInvocationResponse"; - } | { - /** - * Track Publication - * - * @generated from field: livekit.proto.EnableRemoteTrackPublicationRequest enable_remote_track_publication = 42; - */ - value: EnableRemoteTrackPublicationRequest; - case: "enableRemoteTrackPublication"; - } | { - /** - * @generated from field: livekit.proto.UpdateRemoteTrackPublicationDimensionRequest update_remote_track_publication_dimension = 43; - */ - value: UpdateRemoteTrackPublicationDimensionRequest; - case: "updateRemoteTrackPublicationDimension"; - } | { - /** - * Data Streams (low level) - * - * @generated from field: livekit.proto.SendStreamHeaderRequest send_stream_header = 44; - */ - value: SendStreamHeaderRequest; - case: "sendStreamHeader"; - } | { - /** - * @generated from field: livekit.proto.SendStreamChunkRequest send_stream_chunk = 45; - */ - value: SendStreamChunkRequest; - case: "sendStreamChunk"; - } | { - /** - * @generated from field: livekit.proto.SendStreamTrailerRequest send_stream_trailer = 46; - */ - value: SendStreamTrailerRequest; - case: "sendStreamTrailer"; - } | { - /** - * Data Channel - * - * @generated from field: livekit.proto.SetDataChannelBufferedAmountLowThresholdRequest set_data_channel_buffered_amount_low_threshold = 47; - */ - value: SetDataChannelBufferedAmountLowThresholdRequest; - case: "setDataChannelBufferedAmountLowThreshold"; - } | { - /** - * Audio Filter Plugin - * - * @generated from field: livekit.proto.LoadAudioFilterPluginRequest load_audio_filter_plugin = 49; - */ - value: LoadAudioFilterPluginRequest; - case: "loadAudioFilterPlugin"; - } | { - /** - * @generated from field: livekit.proto.NewApmRequest new_apm = 50; - */ - value: NewApmRequest; - case: "newApm"; - } | { - /** - * @generated from field: livekit.proto.ApmProcessStreamRequest apm_process_stream = 51; - */ - value: ApmProcessStreamRequest; - case: "apmProcessStream"; - } | { - /** - * @generated from field: livekit.proto.ApmProcessReverseStreamRequest apm_process_reverse_stream = 52; - */ - value: ApmProcessReverseStreamRequest; - case: "apmProcessReverseStream"; - } | { - /** - * @generated from field: livekit.proto.ApmSetStreamDelayRequest apm_set_stream_delay = 53; - */ - value: ApmSetStreamDelayRequest; - case: "apmSetStreamDelay"; - } | { - /** - * Data Streams (high level) - * - * @generated from field: livekit.proto.ByteStreamReaderReadIncrementalRequest byte_read_incremental = 54; - */ - value: ByteStreamReaderReadIncrementalRequest; - case: "byteReadIncremental"; - } | { - /** - * @generated from field: livekit.proto.ByteStreamReaderReadAllRequest byte_read_all = 55; - */ - value: ByteStreamReaderReadAllRequest; - case: "byteReadAll"; - } | { - /** - * @generated from field: livekit.proto.ByteStreamReaderWriteToFileRequest byte_write_to_file = 56; - */ - value: ByteStreamReaderWriteToFileRequest; - case: "byteWriteToFile"; - } | { - /** - * @generated from field: livekit.proto.TextStreamReaderReadIncrementalRequest text_read_incremental = 57; - */ - value: TextStreamReaderReadIncrementalRequest; - case: "textReadIncremental"; - } | { - /** - * @generated from field: livekit.proto.TextStreamReaderReadAllRequest text_read_all = 58; - */ - value: TextStreamReaderReadAllRequest; - case: "textReadAll"; - } | { - /** - * @generated from field: livekit.proto.StreamSendFileRequest send_file = 59; - */ - value: StreamSendFileRequest; - case: "sendFile"; - } | { - /** - * @generated from field: livekit.proto.StreamSendTextRequest send_text = 60; - */ - value: StreamSendTextRequest; - case: "sendText"; - } | { - /** - * @generated from field: livekit.proto.ByteStreamOpenRequest byte_stream_open = 61; - */ - value: ByteStreamOpenRequest; - case: "byteStreamOpen"; - } | { - /** - * @generated from field: livekit.proto.ByteStreamWriterWriteRequest byte_stream_write = 62; - */ - value: ByteStreamWriterWriteRequest; - case: "byteStreamWrite"; - } | { - /** - * @generated from field: livekit.proto.ByteStreamWriterCloseRequest byte_stream_close = 63; - */ - value: ByteStreamWriterCloseRequest; - case: "byteStreamClose"; - } | { - /** - * @generated from field: livekit.proto.TextStreamOpenRequest text_stream_open = 64; - */ - value: TextStreamOpenRequest; - case: "textStreamOpen"; - } | { - /** - * @generated from field: livekit.proto.TextStreamWriterWriteRequest text_stream_write = 65; - */ - value: TextStreamWriterWriteRequest; - case: "textStreamWrite"; - } | { - /** - * @generated from field: livekit.proto.TextStreamWriterCloseRequest text_stream_close = 66; - */ - value: TextStreamWriterCloseRequest; - case: "textStreamClose"; - } | { - /** - * @generated from field: livekit.proto.StreamSendBytesRequest send_bytes = 67; - */ - value: StreamSendBytesRequest; - case: "sendBytes"; - } | { - /** - * @generated from field: livekit.proto.SetRemoteTrackPublicationQualityRequest set_remote_track_publication_quality = 68; - */ - value: SetRemoteTrackPublicationQualityRequest; - case: "setRemoteTrackPublicationQuality"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.FfiRequest"; - static readonly fields: FieldList = proto2.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: 48, name: "set_track_subscription_permissions", kind: "message", T: SetTrackSubscriptionPermissionsRequest, 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" }, - { no: 38, name: "perform_rpc", kind: "message", T: PerformRpcRequest, oneof: "message" }, - { no: 39, name: "register_rpc_method", kind: "message", T: RegisterRpcMethodRequest, oneof: "message" }, - { no: 40, name: "unregister_rpc_method", kind: "message", T: UnregisterRpcMethodRequest, oneof: "message" }, - { no: 41, name: "rpc_method_invocation_response", kind: "message", T: RpcMethodInvocationResponseRequest, oneof: "message" }, - { no: 42, name: "enable_remote_track_publication", kind: "message", T: EnableRemoteTrackPublicationRequest, oneof: "message" }, - { no: 43, name: "update_remote_track_publication_dimension", kind: "message", T: UpdateRemoteTrackPublicationDimensionRequest, oneof: "message" }, - { no: 44, name: "send_stream_header", kind: "message", T: SendStreamHeaderRequest, oneof: "message" }, - { no: 45, name: "send_stream_chunk", kind: "message", T: SendStreamChunkRequest, oneof: "message" }, - { no: 46, name: "send_stream_trailer", kind: "message", T: SendStreamTrailerRequest, oneof: "message" }, - { no: 47, name: "set_data_channel_buffered_amount_low_threshold", kind: "message", T: SetDataChannelBufferedAmountLowThresholdRequest, oneof: "message" }, - { no: 49, name: "load_audio_filter_plugin", kind: "message", T: LoadAudioFilterPluginRequest, oneof: "message" }, - { no: 50, name: "new_apm", kind: "message", T: NewApmRequest, oneof: "message" }, - { no: 51, name: "apm_process_stream", kind: "message", T: ApmProcessStreamRequest, oneof: "message" }, - { no: 52, name: "apm_process_reverse_stream", kind: "message", T: ApmProcessReverseStreamRequest, oneof: "message" }, - { no: 53, name: "apm_set_stream_delay", kind: "message", T: ApmSetStreamDelayRequest, oneof: "message" }, - { no: 54, name: "byte_read_incremental", kind: "message", T: ByteStreamReaderReadIncrementalRequest, oneof: "message" }, - { no: 55, name: "byte_read_all", kind: "message", T: ByteStreamReaderReadAllRequest, oneof: "message" }, - { no: 56, name: "byte_write_to_file", kind: "message", T: ByteStreamReaderWriteToFileRequest, oneof: "message" }, - { no: 57, name: "text_read_incremental", kind: "message", T: TextStreamReaderReadIncrementalRequest, oneof: "message" }, - { no: 58, name: "text_read_all", kind: "message", T: TextStreamReaderReadAllRequest, oneof: "message" }, - { no: 59, name: "send_file", kind: "message", T: StreamSendFileRequest, oneof: "message" }, - { no: 60, name: "send_text", kind: "message", T: StreamSendTextRequest, oneof: "message" }, - { no: 61, name: "byte_stream_open", kind: "message", T: ByteStreamOpenRequest, oneof: "message" }, - { no: 62, name: "byte_stream_write", kind: "message", T: ByteStreamWriterWriteRequest, oneof: "message" }, - { no: 63, name: "byte_stream_close", kind: "message", T: ByteStreamWriterCloseRequest, oneof: "message" }, - { no: 64, name: "text_stream_open", kind: "message", T: TextStreamOpenRequest, oneof: "message" }, - { no: 65, name: "text_stream_write", kind: "message", T: TextStreamWriterWriteRequest, oneof: "message" }, - { no: 66, name: "text_stream_close", kind: "message", T: TextStreamWriterCloseRequest, oneof: "message" }, - { no: 67, name: "send_bytes", kind: "message", T: StreamSendBytesRequest, oneof: "message" }, - { no: 68, name: "set_remote_track_publication_quality", kind: "message", T: SetRemoteTrackPublicationQualityRequest, oneof: "message" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): FfiRequest { - return new FfiRequest().fromBinary(bytes, options); - } - - 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 proto2.util.equals(FfiRequest, a, b); - } -} - -/** - * This is the output of livekit_ffi_request function. - * - * @generated from message livekit.proto.FfiResponse - */ -export class FfiResponse extends Message { - /** - * @generated from oneof livekit.proto.FfiResponse.message - */ - message: { - /** - * @generated from field: livekit.proto.DisposeResponse dispose = 2; - */ - value: DisposeResponse; - case: "dispose"; - } | { - /** - * Room - * - * @generated from field: livekit.proto.ConnectResponse connect = 3; - */ - value: ConnectResponse; - case: "connect"; - } | { - /** - * @generated from field: livekit.proto.DisconnectResponse disconnect = 4; - */ - value: DisconnectResponse; - case: "disconnect"; - } | { - /** - * @generated from field: livekit.proto.PublishTrackResponse publish_track = 5; - */ - value: PublishTrackResponse; - case: "publishTrack"; - } | { - /** - * @generated from field: livekit.proto.UnpublishTrackResponse unpublish_track = 6; - */ - value: UnpublishTrackResponse; - case: "unpublishTrack"; - } | { - /** - * @generated from field: livekit.proto.PublishDataResponse publish_data = 7; - */ - value: PublishDataResponse; - case: "publishData"; - } | { - /** - * @generated from field: livekit.proto.SetSubscribedResponse set_subscribed = 8; - */ - value: SetSubscribedResponse; - case: "setSubscribed"; - } | { - /** - * @generated from field: livekit.proto.SetLocalMetadataResponse set_local_metadata = 9; - */ - value: SetLocalMetadataResponse; - case: "setLocalMetadata"; - } | { - /** - * @generated from field: livekit.proto.SetLocalNameResponse set_local_name = 10; - */ - value: SetLocalNameResponse; - case: "setLocalName"; - } | { - /** - * @generated from field: livekit.proto.SetLocalAttributesResponse set_local_attributes = 11; - */ - value: SetLocalAttributesResponse; - case: "setLocalAttributes"; - } | { - /** - * @generated from field: livekit.proto.GetSessionStatsResponse get_session_stats = 12; - */ - value: GetSessionStatsResponse; - case: "getSessionStats"; - } | { - /** - * @generated from field: livekit.proto.PublishTranscriptionResponse publish_transcription = 13; - */ - value: PublishTranscriptionResponse; - case: "publishTranscription"; - } | { - /** - * @generated from field: livekit.proto.PublishSipDtmfResponse publish_sip_dtmf = 14; - */ - value: PublishSipDtmfResponse; - case: "publishSipDtmf"; - } | { - /** - * Track - * - * @generated from field: livekit.proto.CreateVideoTrackResponse create_video_track = 15; - */ - value: CreateVideoTrackResponse; - case: "createVideoTrack"; - } | { - /** - * @generated from field: livekit.proto.CreateAudioTrackResponse create_audio_track = 16; - */ - value: CreateAudioTrackResponse; - case: "createAudioTrack"; - } | { - /** - * @generated from field: livekit.proto.LocalTrackMuteResponse local_track_mute = 17; - */ - value: LocalTrackMuteResponse; - case: "localTrackMute"; - } | { - /** - * @generated from field: livekit.proto.EnableRemoteTrackResponse enable_remote_track = 18; - */ - value: EnableRemoteTrackResponse; - case: "enableRemoteTrack"; - } | { - /** - * @generated from field: livekit.proto.GetStatsResponse get_stats = 19; - */ - value: GetStatsResponse; - case: "getStats"; - } | { - /** - * @generated from field: livekit.proto.SetTrackSubscriptionPermissionsResponse set_track_subscription_permissions = 47; - */ - value: SetTrackSubscriptionPermissionsResponse; - case: "setTrackSubscriptionPermissions"; - } | { - /** - * Video - * - * @generated from field: livekit.proto.NewVideoStreamResponse new_video_stream = 20; - */ - value: NewVideoStreamResponse; - case: "newVideoStream"; - } | { - /** - * @generated from field: livekit.proto.NewVideoSourceResponse new_video_source = 21; - */ - value: NewVideoSourceResponse; - case: "newVideoSource"; - } | { - /** - * @generated from field: livekit.proto.CaptureVideoFrameResponse capture_video_frame = 22; - */ - value: CaptureVideoFrameResponse; - case: "captureVideoFrame"; - } | { - /** - * @generated from field: livekit.proto.VideoConvertResponse video_convert = 23; - */ - value: VideoConvertResponse; - case: "videoConvert"; - } | { - /** - * @generated from field: livekit.proto.VideoStreamFromParticipantResponse video_stream_from_participant = 24; - */ - value: VideoStreamFromParticipantResponse; - case: "videoStreamFromParticipant"; - } | { - /** - * Audio - * - * @generated from field: livekit.proto.NewAudioStreamResponse new_audio_stream = 25; - */ - value: NewAudioStreamResponse; - case: "newAudioStream"; - } | { - /** - * @generated from field: livekit.proto.NewAudioSourceResponse new_audio_source = 26; - */ - value: NewAudioSourceResponse; - case: "newAudioSource"; - } | { - /** - * @generated from field: livekit.proto.CaptureAudioFrameResponse capture_audio_frame = 27; - */ - value: CaptureAudioFrameResponse; - case: "captureAudioFrame"; - } | { - /** - * @generated from field: livekit.proto.ClearAudioBufferResponse clear_audio_buffer = 28; - */ - value: ClearAudioBufferResponse; - case: "clearAudioBuffer"; - } | { - /** - * @generated from field: livekit.proto.NewAudioResamplerResponse new_audio_resampler = 29; - */ - value: NewAudioResamplerResponse; - case: "newAudioResampler"; - } | { - /** - * @generated from field: livekit.proto.RemixAndResampleResponse remix_and_resample = 30; - */ - value: RemixAndResampleResponse; - case: "remixAndResample"; - } | { - /** - * @generated from field: livekit.proto.AudioStreamFromParticipantResponse audio_stream_from_participant = 31; - */ - value: AudioStreamFromParticipantResponse; - case: "audioStreamFromParticipant"; - } | { - /** - * @generated from field: livekit.proto.E2eeResponse e2ee = 32; - */ - value: E2eeResponse; - case: "e2ee"; - } | { - /** - * @generated from field: livekit.proto.NewSoxResamplerResponse new_sox_resampler = 33; - */ - value: NewSoxResamplerResponse; - case: "newSoxResampler"; - } | { - /** - * @generated from field: livekit.proto.PushSoxResamplerResponse push_sox_resampler = 34; - */ - value: PushSoxResamplerResponse; - case: "pushSoxResampler"; - } | { - /** - * @generated from field: livekit.proto.FlushSoxResamplerResponse flush_sox_resampler = 35; - */ - value: FlushSoxResamplerResponse; - case: "flushSoxResampler"; - } | { - /** - * @generated from field: livekit.proto.SendChatMessageResponse send_chat_message = 36; - */ - value: SendChatMessageResponse; - case: "sendChatMessage"; - } | { - /** - * RPC - * - * @generated from field: livekit.proto.PerformRpcResponse perform_rpc = 37; - */ - value: PerformRpcResponse; - case: "performRpc"; - } | { - /** - * @generated from field: livekit.proto.RegisterRpcMethodResponse register_rpc_method = 38; - */ - value: RegisterRpcMethodResponse; - case: "registerRpcMethod"; - } | { - /** - * @generated from field: livekit.proto.UnregisterRpcMethodResponse unregister_rpc_method = 39; - */ - value: UnregisterRpcMethodResponse; - case: "unregisterRpcMethod"; - } | { - /** - * @generated from field: livekit.proto.RpcMethodInvocationResponseResponse rpc_method_invocation_response = 40; - */ - value: RpcMethodInvocationResponseResponse; - case: "rpcMethodInvocationResponse"; - } | { - /** - * Track Publication - * - * @generated from field: livekit.proto.EnableRemoteTrackPublicationResponse enable_remote_track_publication = 41; - */ - value: EnableRemoteTrackPublicationResponse; - case: "enableRemoteTrackPublication"; - } | { - /** - * @generated from field: livekit.proto.UpdateRemoteTrackPublicationDimensionResponse update_remote_track_publication_dimension = 42; - */ - value: UpdateRemoteTrackPublicationDimensionResponse; - case: "updateRemoteTrackPublicationDimension"; - } | { - /** - * Data Streams - * - * @generated from field: livekit.proto.SendStreamHeaderResponse send_stream_header = 43; - */ - value: SendStreamHeaderResponse; - case: "sendStreamHeader"; - } | { - /** - * @generated from field: livekit.proto.SendStreamChunkResponse send_stream_chunk = 44; - */ - value: SendStreamChunkResponse; - case: "sendStreamChunk"; - } | { - /** - * @generated from field: livekit.proto.SendStreamTrailerResponse send_stream_trailer = 45; - */ - value: SendStreamTrailerResponse; - case: "sendStreamTrailer"; - } | { - /** - * Data Channel - * - * @generated from field: livekit.proto.SetDataChannelBufferedAmountLowThresholdResponse set_data_channel_buffered_amount_low_threshold = 46; - */ - value: SetDataChannelBufferedAmountLowThresholdResponse; - case: "setDataChannelBufferedAmountLowThreshold"; - } | { - /** - * Audio Filter Plugin - * - * @generated from field: livekit.proto.LoadAudioFilterPluginResponse load_audio_filter_plugin = 48; - */ - value: LoadAudioFilterPluginResponse; - case: "loadAudioFilterPlugin"; - } | { - /** - * @generated from field: livekit.proto.NewApmResponse new_apm = 49; - */ - value: NewApmResponse; - case: "newApm"; - } | { - /** - * @generated from field: livekit.proto.ApmProcessStreamResponse apm_process_stream = 50; - */ - value: ApmProcessStreamResponse; - case: "apmProcessStream"; - } | { - /** - * @generated from field: livekit.proto.ApmProcessReverseStreamResponse apm_process_reverse_stream = 51; - */ - value: ApmProcessReverseStreamResponse; - case: "apmProcessReverseStream"; - } | { - /** - * @generated from field: livekit.proto.ApmSetStreamDelayResponse apm_set_stream_delay = 52; - */ - value: ApmSetStreamDelayResponse; - case: "apmSetStreamDelay"; - } | { - /** - * Data Streams (high level) - * - * @generated from field: livekit.proto.ByteStreamReaderReadIncrementalResponse byte_read_incremental = 53; - */ - value: ByteStreamReaderReadIncrementalResponse; - case: "byteReadIncremental"; - } | { - /** - * @generated from field: livekit.proto.ByteStreamReaderReadAllResponse byte_read_all = 54; - */ - value: ByteStreamReaderReadAllResponse; - case: "byteReadAll"; - } | { - /** - * @generated from field: livekit.proto.ByteStreamReaderWriteToFileResponse byte_write_to_file = 55; - */ - value: ByteStreamReaderWriteToFileResponse; - case: "byteWriteToFile"; - } | { - /** - * @generated from field: livekit.proto.TextStreamReaderReadIncrementalResponse text_read_incremental = 56; - */ - value: TextStreamReaderReadIncrementalResponse; - case: "textReadIncremental"; - } | { - /** - * @generated from field: livekit.proto.TextStreamReaderReadAllResponse text_read_all = 57; - */ - value: TextStreamReaderReadAllResponse; - case: "textReadAll"; - } | { - /** - * @generated from field: livekit.proto.StreamSendFileResponse send_file = 58; - */ - value: StreamSendFileResponse; - case: "sendFile"; - } | { - /** - * @generated from field: livekit.proto.StreamSendTextResponse send_text = 59; - */ - value: StreamSendTextResponse; - case: "sendText"; - } | { - /** - * @generated from field: livekit.proto.ByteStreamOpenResponse byte_stream_open = 60; - */ - value: ByteStreamOpenResponse; - case: "byteStreamOpen"; - } | { - /** - * @generated from field: livekit.proto.ByteStreamWriterWriteResponse byte_stream_write = 61; - */ - value: ByteStreamWriterWriteResponse; - case: "byteStreamWrite"; - } | { - /** - * @generated from field: livekit.proto.ByteStreamWriterCloseResponse byte_stream_close = 62; - */ - value: ByteStreamWriterCloseResponse; - case: "byteStreamClose"; - } | { - /** - * @generated from field: livekit.proto.TextStreamOpenResponse text_stream_open = 63; - */ - value: TextStreamOpenResponse; - case: "textStreamOpen"; - } | { - /** - * @generated from field: livekit.proto.TextStreamWriterWriteResponse text_stream_write = 64; - */ - value: TextStreamWriterWriteResponse; - case: "textStreamWrite"; - } | { - /** - * @generated from field: livekit.proto.TextStreamWriterCloseResponse text_stream_close = 65; - */ - value: TextStreamWriterCloseResponse; - case: "textStreamClose"; - } | { - /** - * @generated from field: livekit.proto.StreamSendBytesResponse send_bytes = 66; - */ - value: StreamSendBytesResponse; - case: "sendBytes"; - } | { - /** - * @generated from field: livekit.proto.SetRemoteTrackPublicationQualityResponse set_remote_track_publication_quality = 67; - */ - value: SetRemoteTrackPublicationQualityResponse; - case: "setRemoteTrackPublicationQuality"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.FfiResponse"; - static readonly fields: FieldList = proto2.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: 47, name: "set_track_subscription_permissions", kind: "message", T: SetTrackSubscriptionPermissionsResponse, 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" }, - { no: 37, name: "perform_rpc", kind: "message", T: PerformRpcResponse, oneof: "message" }, - { no: 38, name: "register_rpc_method", kind: "message", T: RegisterRpcMethodResponse, oneof: "message" }, - { no: 39, name: "unregister_rpc_method", kind: "message", T: UnregisterRpcMethodResponse, oneof: "message" }, - { no: 40, name: "rpc_method_invocation_response", kind: "message", T: RpcMethodInvocationResponseResponse, oneof: "message" }, - { no: 41, name: "enable_remote_track_publication", kind: "message", T: EnableRemoteTrackPublicationResponse, oneof: "message" }, - { no: 42, name: "update_remote_track_publication_dimension", kind: "message", T: UpdateRemoteTrackPublicationDimensionResponse, oneof: "message" }, - { no: 43, name: "send_stream_header", kind: "message", T: SendStreamHeaderResponse, oneof: "message" }, - { no: 44, name: "send_stream_chunk", kind: "message", T: SendStreamChunkResponse, oneof: "message" }, - { no: 45, name: "send_stream_trailer", kind: "message", T: SendStreamTrailerResponse, oneof: "message" }, - { no: 46, name: "set_data_channel_buffered_amount_low_threshold", kind: "message", T: SetDataChannelBufferedAmountLowThresholdResponse, oneof: "message" }, - { no: 48, name: "load_audio_filter_plugin", kind: "message", T: LoadAudioFilterPluginResponse, oneof: "message" }, - { no: 49, name: "new_apm", kind: "message", T: NewApmResponse, oneof: "message" }, - { no: 50, name: "apm_process_stream", kind: "message", T: ApmProcessStreamResponse, oneof: "message" }, - { no: 51, name: "apm_process_reverse_stream", kind: "message", T: ApmProcessReverseStreamResponse, oneof: "message" }, - { no: 52, name: "apm_set_stream_delay", kind: "message", T: ApmSetStreamDelayResponse, oneof: "message" }, - { no: 53, name: "byte_read_incremental", kind: "message", T: ByteStreamReaderReadIncrementalResponse, oneof: "message" }, - { no: 54, name: "byte_read_all", kind: "message", T: ByteStreamReaderReadAllResponse, oneof: "message" }, - { no: 55, name: "byte_write_to_file", kind: "message", T: ByteStreamReaderWriteToFileResponse, oneof: "message" }, - { no: 56, name: "text_read_incremental", kind: "message", T: TextStreamReaderReadIncrementalResponse, oneof: "message" }, - { no: 57, name: "text_read_all", kind: "message", T: TextStreamReaderReadAllResponse, oneof: "message" }, - { no: 58, name: "send_file", kind: "message", T: StreamSendFileResponse, oneof: "message" }, - { no: 59, name: "send_text", kind: "message", T: StreamSendTextResponse, oneof: "message" }, - { no: 60, name: "byte_stream_open", kind: "message", T: ByteStreamOpenResponse, oneof: "message" }, - { no: 61, name: "byte_stream_write", kind: "message", T: ByteStreamWriterWriteResponse, oneof: "message" }, - { no: 62, name: "byte_stream_close", kind: "message", T: ByteStreamWriterCloseResponse, oneof: "message" }, - { no: 63, name: "text_stream_open", kind: "message", T: TextStreamOpenResponse, oneof: "message" }, - { no: 64, name: "text_stream_write", kind: "message", T: TextStreamWriterWriteResponse, oneof: "message" }, - { no: 65, name: "text_stream_close", kind: "message", T: TextStreamWriterCloseResponse, oneof: "message" }, - { no: 66, name: "send_bytes", kind: "message", T: StreamSendBytesResponse, oneof: "message" }, - { no: 67, name: "set_remote_track_publication_quality", kind: "message", T: SetRemoteTrackPublicationQualityResponse, oneof: "message" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): FfiResponse { - return new FfiResponse().fromBinary(bytes, options); - } - - 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 proto2.util.equals(FfiResponse, a, b); - } -} - -/** - * To minimize complexity, participant events are not included in the protocol. - * It is easily deducible from the room events and it turned out that is is easier to implement - * on the ffi client side. - * - * @generated from message livekit.proto.FfiEvent - */ -export class FfiEvent extends Message { - /** - * @generated from oneof livekit.proto.FfiEvent.message - */ - message: { - /** - * @generated from field: livekit.proto.RoomEvent room_event = 1; - */ - value: RoomEvent; - case: "roomEvent"; - } | { - /** - * @generated from field: livekit.proto.TrackEvent track_event = 2; - */ - value: TrackEvent; - case: "trackEvent"; - } | { - /** - * @generated from field: livekit.proto.VideoStreamEvent video_stream_event = 3; - */ - value: VideoStreamEvent; - case: "videoStreamEvent"; - } | { - /** - * @generated from field: livekit.proto.AudioStreamEvent audio_stream_event = 4; - */ - value: AudioStreamEvent; - case: "audioStreamEvent"; - } | { - /** - * @generated from field: livekit.proto.ConnectCallback connect = 5; - */ - value: ConnectCallback; - case: "connect"; - } | { - /** - * @generated from field: livekit.proto.DisconnectCallback disconnect = 7; - */ - value: DisconnectCallback; - case: "disconnect"; - } | { - /** - * @generated from field: livekit.proto.DisposeCallback dispose = 8; - */ - value: DisposeCallback; - case: "dispose"; - } | { - /** - * @generated from field: livekit.proto.PublishTrackCallback publish_track = 9; - */ - value: PublishTrackCallback; - case: "publishTrack"; - } | { - /** - * @generated from field: livekit.proto.UnpublishTrackCallback unpublish_track = 10; - */ - value: UnpublishTrackCallback; - case: "unpublishTrack"; - } | { - /** - * @generated from field: livekit.proto.PublishDataCallback publish_data = 11; - */ - value: PublishDataCallback; - case: "publishData"; - } | { - /** - * @generated from field: livekit.proto.PublishTranscriptionCallback publish_transcription = 12; - */ - value: PublishTranscriptionCallback; - case: "publishTranscription"; - } | { - /** - * @generated from field: livekit.proto.CaptureAudioFrameCallback capture_audio_frame = 13; - */ - value: CaptureAudioFrameCallback; - case: "captureAudioFrame"; - } | { - /** - * @generated from field: livekit.proto.SetLocalMetadataCallback set_local_metadata = 14; - */ - value: SetLocalMetadataCallback; - case: "setLocalMetadata"; - } | { - /** - * @generated from field: livekit.proto.SetLocalNameCallback set_local_name = 15; - */ - value: SetLocalNameCallback; - case: "setLocalName"; - } | { - /** - * @generated from field: livekit.proto.SetLocalAttributesCallback set_local_attributes = 16; - */ - value: SetLocalAttributesCallback; - case: "setLocalAttributes"; - } | { - /** - * @generated from field: livekit.proto.GetStatsCallback get_stats = 17; - */ - value: GetStatsCallback; - case: "getStats"; - } | { - /** - * @generated from field: livekit.proto.LogBatch logs = 18; - */ - value: LogBatch; - case: "logs"; - } | { - /** - * @generated from field: livekit.proto.GetSessionStatsCallback get_session_stats = 19; - */ - value: GetSessionStatsCallback; - case: "getSessionStats"; - } | { - /** - * @generated from field: livekit.proto.Panic panic = 20; - */ - value: Panic; - case: "panic"; - } | { - /** - * @generated from field: livekit.proto.PublishSipDtmfCallback publish_sip_dtmf = 21; - */ - value: PublishSipDtmfCallback; - case: "publishSipDtmf"; - } | { - /** - * @generated from field: livekit.proto.SendChatMessageCallback chat_message = 22; - */ - value: SendChatMessageCallback; - case: "chatMessage"; - } | { - /** - * @generated from field: livekit.proto.PerformRpcCallback perform_rpc = 23; - */ - value: PerformRpcCallback; - case: "performRpc"; - } | { - /** - * @generated from field: livekit.proto.RpcMethodInvocationEvent rpc_method_invocation = 24; - */ - value: RpcMethodInvocationEvent; - case: "rpcMethodInvocation"; - } | { - /** - * Data Streams (low level) - * - * @generated from field: livekit.proto.SendStreamHeaderCallback send_stream_header = 25; - */ - value: SendStreamHeaderCallback; - case: "sendStreamHeader"; - } | { - /** - * @generated from field: livekit.proto.SendStreamChunkCallback send_stream_chunk = 26; - */ - value: SendStreamChunkCallback; - case: "sendStreamChunk"; - } | { - /** - * @generated from field: livekit.proto.SendStreamTrailerCallback send_stream_trailer = 27; - */ - value: SendStreamTrailerCallback; - case: "sendStreamTrailer"; - } | { - /** - * Data Streams (high level) - * - * @generated from field: livekit.proto.ByteStreamReaderEvent byte_stream_reader_event = 28; - */ - value: ByteStreamReaderEvent; - case: "byteStreamReaderEvent"; - } | { - /** - * @generated from field: livekit.proto.ByteStreamReaderReadAllCallback byte_stream_reader_read_all = 29; - */ - value: ByteStreamReaderReadAllCallback; - case: "byteStreamReaderReadAll"; - } | { - /** - * @generated from field: livekit.proto.ByteStreamReaderWriteToFileCallback byte_stream_reader_write_to_file = 30; - */ - value: ByteStreamReaderWriteToFileCallback; - case: "byteStreamReaderWriteToFile"; - } | { - /** - * @generated from field: livekit.proto.ByteStreamOpenCallback byte_stream_open = 31; - */ - value: ByteStreamOpenCallback; - case: "byteStreamOpen"; - } | { - /** - * @generated from field: livekit.proto.ByteStreamWriterWriteCallback byte_stream_writer_write = 32; - */ - value: ByteStreamWriterWriteCallback; - case: "byteStreamWriterWrite"; - } | { - /** - * @generated from field: livekit.proto.ByteStreamWriterCloseCallback byte_stream_writer_close = 33; - */ - value: ByteStreamWriterCloseCallback; - case: "byteStreamWriterClose"; - } | { - /** - * @generated from field: livekit.proto.StreamSendFileCallback send_file = 34; - */ - value: StreamSendFileCallback; - case: "sendFile"; - } | { - /** - * @generated from field: livekit.proto.TextStreamReaderEvent text_stream_reader_event = 35; - */ - value: TextStreamReaderEvent; - case: "textStreamReaderEvent"; - } | { - /** - * @generated from field: livekit.proto.TextStreamReaderReadAllCallback text_stream_reader_read_all = 36; - */ - value: TextStreamReaderReadAllCallback; - case: "textStreamReaderReadAll"; - } | { - /** - * @generated from field: livekit.proto.TextStreamOpenCallback text_stream_open = 37; - */ - value: TextStreamOpenCallback; - case: "textStreamOpen"; - } | { - /** - * @generated from field: livekit.proto.TextStreamWriterWriteCallback text_stream_writer_write = 38; - */ - value: TextStreamWriterWriteCallback; - case: "textStreamWriterWrite"; - } | { - /** - * @generated from field: livekit.proto.TextStreamWriterCloseCallback text_stream_writer_close = 39; - */ - value: TextStreamWriterCloseCallback; - case: "textStreamWriterClose"; - } | { - /** - * @generated from field: livekit.proto.StreamSendTextCallback send_text = 40; - */ - value: StreamSendTextCallback; - case: "sendText"; - } | { - /** - * @generated from field: livekit.proto.StreamSendBytesCallback send_bytes = 41; - */ - value: StreamSendBytesCallback; - case: "sendBytes"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.FfiEvent"; - static readonly fields: FieldList = proto2.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" }, - { no: 23, name: "perform_rpc", kind: "message", T: PerformRpcCallback, oneof: "message" }, - { no: 24, name: "rpc_method_invocation", kind: "message", T: RpcMethodInvocationEvent, oneof: "message" }, - { no: 25, name: "send_stream_header", kind: "message", T: SendStreamHeaderCallback, oneof: "message" }, - { no: 26, name: "send_stream_chunk", kind: "message", T: SendStreamChunkCallback, oneof: "message" }, - { no: 27, name: "send_stream_trailer", kind: "message", T: SendStreamTrailerCallback, oneof: "message" }, - { no: 28, name: "byte_stream_reader_event", kind: "message", T: ByteStreamReaderEvent, oneof: "message" }, - { no: 29, name: "byte_stream_reader_read_all", kind: "message", T: ByteStreamReaderReadAllCallback, oneof: "message" }, - { no: 30, name: "byte_stream_reader_write_to_file", kind: "message", T: ByteStreamReaderWriteToFileCallback, oneof: "message" }, - { no: 31, name: "byte_stream_open", kind: "message", T: ByteStreamOpenCallback, oneof: "message" }, - { no: 32, name: "byte_stream_writer_write", kind: "message", T: ByteStreamWriterWriteCallback, oneof: "message" }, - { no: 33, name: "byte_stream_writer_close", kind: "message", T: ByteStreamWriterCloseCallback, oneof: "message" }, - { no: 34, name: "send_file", kind: "message", T: StreamSendFileCallback, oneof: "message" }, - { no: 35, name: "text_stream_reader_event", kind: "message", T: TextStreamReaderEvent, oneof: "message" }, - { no: 36, name: "text_stream_reader_read_all", kind: "message", T: TextStreamReaderReadAllCallback, oneof: "message" }, - { no: 37, name: "text_stream_open", kind: "message", T: TextStreamOpenCallback, oneof: "message" }, - { no: 38, name: "text_stream_writer_write", kind: "message", T: TextStreamWriterWriteCallback, oneof: "message" }, - { no: 39, name: "text_stream_writer_close", kind: "message", T: TextStreamWriterCloseCallback, oneof: "message" }, - { no: 40, name: "send_text", kind: "message", T: StreamSendTextCallback, oneof: "message" }, - { no: 41, name: "send_bytes", kind: "message", T: StreamSendBytesCallback, oneof: "message" }, - ]); - - 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 proto2.util.equals(FfiEvent, a, b); - } -} - -/** - * Stop all rooms synchronously (Do we need async here?). - * e.g: This is used for the Unity Editor after each assemblies reload. - * TODO(theomonnom): Implement a debug mode where we can find all leaked handles? - * - * @generated from message livekit.proto.DisposeRequest - */ -export class DisposeRequest extends Message { - /** - * @generated from field: required bool async = 1; - */ - async?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.DisposeRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - ]); - - 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 proto2.util.equals(DisposeRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.DisposeResponse - */ -export class DisposeResponse extends Message { - /** - * None if sync - * - * @generated from field: optional uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.DisposeResponse"; - static readonly fields: FieldList = proto2.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 proto2.util.equals(DisposeResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.DisposeCallback - */ -export class DisposeCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.DisposeCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): 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 proto2.util.equals(DisposeCallback, a, b); - } -} - -/** - * @generated from message livekit.proto.LogRecord - */ -export class LogRecord extends Message { - /** - * @generated from field: required livekit.proto.LogLevel level = 1; - */ - level?: LogLevel; - - /** - * e.g "livekit", "libwebrtc", "tokio-tungstenite", etc... - * - * @generated from field: required string target = 2; - */ - target?: string; - - /** - * @generated from field: optional string module_path = 3; - */ - modulePath?: string; - - /** - * @generated from field: optional string file = 4; - */ - file?: string; - - /** - * @generated from field: optional uint32 line = 5; - */ - line?: number; - - /** - * @generated from field: required string message = 6; - */ - message?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.LogRecord"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "level", kind: "enum", T: proto2.getEnumType(LogLevel), req: true }, - { no: 2, name: "target", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { 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 */, req: true }, - ]); - - 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 proto2.util.equals(LogRecord, a, b); - } -} - -/** - * @generated from message livekit.proto.LogBatch - */ -export class LogBatch extends Message { - /** - * @generated from field: repeated livekit.proto.LogRecord records = 1; - */ - records: LogRecord[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.LogBatch"; - static readonly fields: FieldList = proto2.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 proto2.util.equals(LogBatch, a, b); - } -} - -/** - * @generated from message livekit.proto.Panic - */ -export class Panic extends Message { - /** - * @generated from field: required string message = 1; - */ - message?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.Panic"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Panic { - return new Panic().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Panic { - return new Panic().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Panic { - return new Panic().fromJsonString(jsonString, options); - } - - static equals(a: Panic | PlainMessage | undefined, b: Panic | PlainMessage | undefined): boolean { - return proto2.util.equals(Panic, a, b); - } -} - diff --git a/packages/livekit-rtc/src/proto/handle_pb.ts b/packages/livekit-rtc/src/proto/handle_pb.ts deleted file mode 100644 index 597ad383..00000000 --- a/packages/livekit-rtc/src/proto/handle_pb.ts +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2025 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=.js" -// @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, proto2 } from "@bufbuild/protobuf"; - -/** - * # Safety - * The foreign language is responsable for disposing handles - * Forgetting to dispose the handle may lead to memory leaks - * - * Dropping a handle doesn't necessarily mean that the object is destroyed if it is still used - * on the FfiServer (Atomic reference counting) - * - * When refering to a handle without owning it, we just use a uint32 without this message. - * (the variable name is suffixed with "_handle") - * - * @generated from message livekit.proto.FfiOwnedHandle - */ -export class FfiOwnedHandle extends Message { - /** - * @generated from field: required uint64 id = 1; - */ - id?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.FfiOwnedHandle"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - 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 proto2.util.equals(FfiOwnedHandle, a, b); - } -} - diff --git a/packages/livekit-rtc/src/proto/participant_pb.ts b/packages/livekit-rtc/src/proto/participant_pb.ts deleted file mode 100644 index de89ecc1..00000000 --- a/packages/livekit-rtc/src/proto/participant_pb.ts +++ /dev/null @@ -1,351 +0,0 @@ -// Copyright 2025 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=.js" -// @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, proto2 } from "@bufbuild/protobuf"; -import { FfiOwnedHandle } from "./handle_pb.js"; - -/** - * @generated from enum livekit.proto.ParticipantKind - */ -export enum ParticipantKind { - /** - * @generated from enum value: PARTICIPANT_KIND_STANDARD = 0; - */ - STANDARD = 0, - - /** - * @generated from enum value: PARTICIPANT_KIND_INGRESS = 1; - */ - INGRESS = 1, - - /** - * @generated from enum value: PARTICIPANT_KIND_EGRESS = 2; - */ - EGRESS = 2, - - /** - * @generated from enum value: PARTICIPANT_KIND_SIP = 3; - */ - SIP = 3, - - /** - * @generated from enum value: PARTICIPANT_KIND_AGENT = 4; - */ - AGENT = 4, - - /** - * @generated from enum value: PARTICIPANT_KIND_CONNECTOR = 5; - */ - CONNECTOR = 5, -} -// Retrieve enum metadata with: proto2.getEnumType(ParticipantKind) -proto2.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" }, - { no: 5, name: "PARTICIPANT_KIND_CONNECTOR" }, -]); - -/** - * @generated from enum livekit.proto.ParticipantKindDetail - */ -export enum ParticipantKindDetail { - /** - * @generated from enum value: PARTICIPANT_KIND_DETAIL_CLOUD_AGENT = 0; - */ - CLOUD_AGENT = 0, - - /** - * @generated from enum value: PARTICIPANT_KIND_DETAIL_FORWARDED = 1; - */ - FORWARDED = 1, - - /** - * @generated from enum value: PARTICIPANT_KIND_DETAIL_CONNECTOR_WHATSAPP = 2; - */ - CONNECTOR_WHATSAPP = 2, - - /** - * @generated from enum value: PARTICIPANT_KIND_DETAIL_CONNECTOR_TWILIO = 3; - */ - CONNECTOR_TWILIO = 3, -} -// Retrieve enum metadata with: proto2.getEnumType(ParticipantKindDetail) -proto2.util.setEnumType(ParticipantKindDetail, "livekit.proto.ParticipantKindDetail", [ - { no: 0, name: "PARTICIPANT_KIND_DETAIL_CLOUD_AGENT" }, - { no: 1, name: "PARTICIPANT_KIND_DETAIL_FORWARDED" }, - { no: 2, name: "PARTICIPANT_KIND_DETAIL_CONNECTOR_WHATSAPP" }, - { no: 3, name: "PARTICIPANT_KIND_DETAIL_CONNECTOR_TWILIO" }, -]); - -/** - * @generated from enum livekit.proto.DisconnectReason - */ -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, - - /** - * SIP callee did not respond in time - * - * @generated from enum value: USER_UNAVAILABLE = 11; - */ - USER_UNAVAILABLE = 11, - - /** - * SIP callee rejected the call (busy) - * - * @generated from enum value: USER_REJECTED = 12; - */ - USER_REJECTED = 12, - - /** - * SIP protocol failure or unexpected response - * - * @generated from enum value: SIP_TRUNK_FAILURE = 13; - */ - SIP_TRUNK_FAILURE = 13, - - /** - * @generated from enum value: CONNECTION_TIMEOUT = 14; - */ - CONNECTION_TIMEOUT = 14, - - /** - * @generated from enum value: MEDIA_FAILURE = 15; - */ - MEDIA_FAILURE = 15, -} -// Retrieve enum metadata with: proto2.getEnumType(DisconnectReason) -proto2.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" }, - { no: 11, name: "USER_UNAVAILABLE" }, - { no: 12, name: "USER_REJECTED" }, - { no: 13, name: "SIP_TRUNK_FAILURE" }, - { no: 14, name: "CONNECTION_TIMEOUT" }, - { no: 15, name: "MEDIA_FAILURE" }, -]); - -/** - * @generated from message livekit.proto.ParticipantInfo - */ -export class ParticipantInfo extends Message { - /** - * @generated from field: required string sid = 1; - */ - sid?: string; - - /** - * @generated from field: required string name = 2; - */ - name?: string; - - /** - * @generated from field: required string identity = 3; - */ - identity?: string; - - /** - * @generated from field: required string metadata = 4; - */ - metadata?: string; - - /** - * @generated from field: map attributes = 5; - */ - attributes: { [key: string]: string } = {}; - - /** - * @generated from field: required livekit.proto.ParticipantKind kind = 6; - */ - kind?: ParticipantKind; - - /** - * @generated from field: required livekit.proto.DisconnectReason disconnect_reason = 7; - */ - disconnectReason?: DisconnectReason; - - /** - * @generated from field: repeated livekit.proto.ParticipantKindDetail kind_details = 8; - */ - kindDetails: ParticipantKindDetail[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ParticipantInfo"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 4, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 5, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - { no: 6, name: "kind", kind: "enum", T: proto2.getEnumType(ParticipantKind), req: true }, - { no: 7, name: "disconnect_reason", kind: "enum", T: proto2.getEnumType(DisconnectReason), req: true }, - { no: 8, name: "kind_details", kind: "enum", T: proto2.getEnumType(ParticipantKindDetail), repeated: true }, - ]); - - 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 proto2.util.equals(ParticipantInfo, a, b); - } -} - -/** - * @generated from message livekit.proto.OwnedParticipant - */ -export class OwnedParticipant extends Message { - /** - * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; - */ - handle?: FfiOwnedHandle; - - /** - * @generated from field: required livekit.proto.ParticipantInfo info = 2; - */ - info?: ParticipantInfo; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.OwnedParticipant"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, - { no: 2, name: "info", kind: "message", T: ParticipantInfo, req: true }, - ]); - - 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 proto2.util.equals(OwnedParticipant, a, b); - } -} - diff --git a/packages/livekit-rtc/src/proto/room_pb.ts b/packages/livekit-rtc/src/proto/room_pb.ts deleted file mode 100644 index 2aadcdd7..00000000 --- a/packages/livekit-rtc/src/proto/room_pb.ts +++ /dev/null @@ -1,5661 +0,0 @@ -// Copyright 2025 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=.js" -// @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, proto2 } from "@bufbuild/protobuf"; -import { DisconnectReason, OwnedParticipant, ParticipantInfo } 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 { OwnedByteStreamReader, OwnedTextStreamReader } from "./data_stream_pb.js"; - -/** - * @generated from enum livekit.proto.IceTransportType - */ -export enum IceTransportType { - /** - * @generated from enum value: TRANSPORT_RELAY = 0; - */ - TRANSPORT_RELAY = 0, - - /** - * @generated from enum value: TRANSPORT_NOHOST = 1; - */ - TRANSPORT_NOHOST = 1, - - /** - * @generated from enum value: TRANSPORT_ALL = 2; - */ - TRANSPORT_ALL = 2, -} -// Retrieve enum metadata with: proto2.getEnumType(IceTransportType) -proto2.util.setEnumType(IceTransportType, "livekit.proto.IceTransportType", [ - { no: 0, name: "TRANSPORT_RELAY" }, - { no: 1, name: "TRANSPORT_NOHOST" }, - { no: 2, name: "TRANSPORT_ALL" }, -]); - -/** - * @generated from enum livekit.proto.ContinualGatheringPolicy - */ -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: proto2.getEnumType(ContinualGatheringPolicy) -proto2.util.setEnumType(ContinualGatheringPolicy, "livekit.proto.ContinualGatheringPolicy", [ - { no: 0, name: "GATHER_ONCE" }, - { no: 1, name: "GATHER_CONTINUALLY" }, -]); - -/** - * @generated from enum livekit.proto.ConnectionQuality - */ -export enum ConnectionQuality { - /** - * @generated from enum value: QUALITY_POOR = 0; - */ - 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: proto2.getEnumType(ConnectionQuality) -proto2.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" }, -]); - -/** - * @generated from enum livekit.proto.ConnectionState - */ -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: proto2.getEnumType(ConnectionState) -proto2.util.setEnumType(ConnectionState, "livekit.proto.ConnectionState", [ - { no: 0, name: "CONN_DISCONNECTED" }, - { no: 1, name: "CONN_CONNECTED" }, - { no: 2, name: "CONN_RECONNECTING" }, -]); - -/** - * @generated from enum livekit.proto.DataPacketKind - */ -export enum DataPacketKind { - /** - * @generated from enum value: KIND_LOSSY = 0; - */ - KIND_LOSSY = 0, - - /** - * @generated from enum value: KIND_RELIABLE = 1; - */ - KIND_RELIABLE = 1, -} -// Retrieve enum metadata with: proto2.getEnumType(DataPacketKind) -proto2.util.setEnumType(DataPacketKind, "livekit.proto.DataPacketKind", [ - { no: 0, name: "KIND_LOSSY" }, - { no: 1, name: "KIND_RELIABLE" }, -]); - -/** - * Connect to a new LiveKit room - * - * @generated from message livekit.proto.ConnectRequest - */ -export class ConnectRequest extends Message { - /** - * @generated from field: required string url = 1; - */ - url?: string; - - /** - * @generated from field: required string token = 2; - */ - token?: string; - - /** - * @generated from field: required livekit.proto.RoomOptions options = 3; - */ - options?: RoomOptions; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ConnectRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "options", kind: "message", T: RoomOptions, req: true }, - ]); - - 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 proto2.util.equals(ConnectRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.ConnectResponse - */ -export class ConnectResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ConnectResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): 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 proto2.util.equals(ConnectResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.ConnectCallback - */ -export class ConnectCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from oneof livekit.proto.ConnectCallback.message - */ - 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 } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ConnectCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "message" }, - { no: 3, name: "result", kind: "message", T: ConnectCallback_Result, oneof: "message" }, - ]); - - 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 proto2.util.equals(ConnectCallback, a, b); - } -} - -/** - * @generated from message livekit.proto.ConnectCallback.ParticipantWithTracks - */ -export class ConnectCallback_ParticipantWithTracks extends Message { - /** - * @generated from field: required 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(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ConnectCallback.ParticipantWithTracks"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant", kind: "message", T: OwnedParticipant, req: true }, - { 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 proto2.util.equals(ConnectCallback_ParticipantWithTracks, a, b); - } -} - -/** - * @generated from message livekit.proto.ConnectCallback.Result - */ -export class ConnectCallback_Result extends Message { - /** - * @generated from field: required livekit.proto.OwnedRoom room = 1; - */ - room?: OwnedRoom; - - /** - * @generated from field: required livekit.proto.OwnedParticipant local_participant = 2; - */ - localParticipant?: OwnedParticipant; - - /** - * @generated from field: repeated livekit.proto.ConnectCallback.ParticipantWithTracks participants = 3; - */ - participants: ConnectCallback_ParticipantWithTracks[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ConnectCallback.Result"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "room", kind: "message", T: OwnedRoom, req: true }, - { no: 2, name: "local_participant", kind: "message", T: OwnedParticipant, req: true }, - { no: 3, name: "participants", kind: "message", T: ConnectCallback_ParticipantWithTracks, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ConnectCallback_Result { - return new ConnectCallback_Result().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ConnectCallback_Result { - return new ConnectCallback_Result().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ConnectCallback_Result { - return new ConnectCallback_Result().fromJsonString(jsonString, options); - } - - static equals(a: ConnectCallback_Result | PlainMessage | undefined, b: ConnectCallback_Result | PlainMessage | undefined): boolean { - return proto2.util.equals(ConnectCallback_Result, a, b); - } -} - -/** - * Disconnect from the a room - * - * @generated from message livekit.proto.DisconnectRequest - */ -export class DisconnectRequest extends Message { - /** - * @generated from field: required uint64 room_handle = 1; - */ - roomHandle?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.DisconnectRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "room_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - 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 proto2.util.equals(DisconnectRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.DisconnectResponse - */ -export class DisconnectResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.DisconnectResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): 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 proto2.util.equals(DisconnectResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.DisconnectCallback - */ -export class DisconnectCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.DisconnectCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DisconnectCallback { - return new DisconnectCallback().fromBinary(bytes, options); - } - - 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 proto2.util.equals(DisconnectCallback, a, b); - } -} - -/** - * Publish a track to the room - * - * @generated from message livekit.proto.PublishTrackRequest - */ -export class PublishTrackRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required uint64 track_handle = 2; - */ - trackHandle?: bigint; - - /** - * @generated from field: required livekit.proto.TrackPublishOptions options = 3; - */ - options?: TrackPublishOptions; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.PublishTrackRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 3, name: "options", kind: "message", T: TrackPublishOptions, req: true }, - ]); - - 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 proto2.util.equals(PublishTrackRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.PublishTrackResponse - */ -export class PublishTrackResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.PublishTrackResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PublishTrackResponse { - return new PublishTrackResponse().fromBinary(bytes, options); - } - - 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 proto2.util.equals(PublishTrackResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.PublishTrackCallback - */ -export class PublishTrackCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from oneof livekit.proto.PublishTrackCallback.message - */ - 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 } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.PublishTrackCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "message" }, - { no: 3, name: "publication", kind: "message", T: OwnedTrackPublication, oneof: "message" }, - ]); - - 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 proto2.util.equals(PublishTrackCallback, a, b); - } -} - -/** - * Unpublish a track from the room - * - * @generated from message livekit.proto.UnpublishTrackRequest - */ -export class UnpublishTrackRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required string track_sid = 2; - */ - trackSid?: string; - - /** - * @generated from field: required bool stop_on_unpublish = 3; - */ - stopOnUnpublish?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.UnpublishTrackRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "stop_on_unpublish", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UnpublishTrackRequest { - return new UnpublishTrackRequest().fromBinary(bytes, options); - } - - 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 proto2.util.equals(UnpublishTrackRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.UnpublishTrackResponse - */ -export class UnpublishTrackResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.UnpublishTrackResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): 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 proto2.util.equals(UnpublishTrackResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.UnpublishTrackCallback - */ -export class UnpublishTrackCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from field: optional string error = 2; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.UnpublishTrackCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "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 proto2.util.equals(UnpublishTrackCallback, a, b); - } -} - -/** - * Publish data to other participants - * - * @generated from message livekit.proto.PublishDataRequest - */ -export class PublishDataRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required uint64 data_ptr = 2; - */ - dataPtr?: bigint; - - /** - * @generated from field: required uint64 data_len = 3; - */ - dataLen?: bigint; - - /** - * @generated from field: required bool reliable = 4; - */ - reliable?: boolean; - - /** - * @generated from field: repeated string destination_sids = 5 [deprecated = true]; - * @deprecated - */ - destinationSids: string[] = []; - - /** - * @generated from field: optional string topic = 6; - */ - topic?: string; - - /** - * @generated from field: repeated string destination_identities = 7; - */ - destinationIdentities: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.PublishDataRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "data_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 3, name: "data_len", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 4, name: "reliable", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { 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 proto2.util.equals(PublishDataRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.PublishDataResponse - */ -export class PublishDataResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.PublishDataResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PublishDataResponse { - return new PublishDataResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PublishDataResponse { - return new PublishDataResponse().fromJson(jsonValue, options); - } - - 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 proto2.util.equals(PublishDataResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.PublishDataCallback - */ -export class PublishDataCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from field: optional string error = 2; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.PublishDataCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PublishDataCallback { - return new PublishDataCallback().fromBinary(bytes, options); - } - - 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 proto2.util.equals(PublishDataCallback, a, b); - } -} - -/** - * Publish transcription messages to room - * - * @generated from message livekit.proto.PublishTranscriptionRequest - */ -export class PublishTranscriptionRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required string participant_identity = 2; - */ - participantIdentity?: string; - - /** - * @generated from field: required string track_id = 3; - */ - trackId?: string; - - /** - * @generated from field: repeated livekit.proto.TranscriptionSegment segments = 4; - */ - segments: TranscriptionSegment[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.PublishTranscriptionRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "track_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { 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 proto2.util.equals(PublishTranscriptionRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.PublishTranscriptionResponse - */ -export class PublishTranscriptionResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.PublishTranscriptionResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): 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); - } - - static equals(a: PublishTranscriptionResponse | PlainMessage | undefined, b: PublishTranscriptionResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(PublishTranscriptionResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.PublishTranscriptionCallback - */ -export class PublishTranscriptionCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from field: optional string error = 2; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.PublishTranscriptionCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "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); - } - - 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 proto2.util.equals(PublishTranscriptionCallback, a, b); - } -} - -/** - * Publish Sip DTMF messages to other participants - * - * @generated from message livekit.proto.PublishSipDtmfRequest - */ -export class PublishSipDtmfRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required uint32 code = 2; - */ - code?: number; - - /** - * @generated from field: required string digit = 3; - */ - digit?: string; - - /** - * @generated from field: repeated string destination_identities = 4; - */ - destinationIdentities: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.PublishSipDtmfRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "code", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 3, name: "digit", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { 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 proto2.util.equals(PublishSipDtmfRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.PublishSipDtmfResponse - */ -export class PublishSipDtmfResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.PublishSipDtmfResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PublishSipDtmfResponse { - return new PublishSipDtmfResponse().fromBinary(bytes, options); - } - - 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 proto2.util.equals(PublishSipDtmfResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.PublishSipDtmfCallback - */ -export class PublishSipDtmfCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from field: optional string error = 2; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.PublishSipDtmfCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "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); - } - - static equals(a: PublishSipDtmfCallback | PlainMessage | undefined, b: PublishSipDtmfCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(PublishSipDtmfCallback, a, b); - } -} - -/** - * Change the local participant's metadata - * - * @generated from message livekit.proto.SetLocalMetadataRequest - */ -export class SetLocalMetadataRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required string metadata = 2; - */ - metadata?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetLocalMetadataRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - 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); - } - - static equals(a: SetLocalMetadataRequest | PlainMessage | undefined, b: SetLocalMetadataRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(SetLocalMetadataRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.SetLocalMetadataResponse - */ -export class SetLocalMetadataResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetLocalMetadataResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalMetadataResponse { - return new SetLocalMetadataResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalMetadataResponse { - return new SetLocalMetadataResponse().fromJson(jsonValue, options); - } - - 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 proto2.util.equals(SetLocalMetadataResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.SetLocalMetadataCallback - */ -export class SetLocalMetadataCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from field: optional string error = 2; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetLocalMetadataCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalMetadataCallback { - return new SetLocalMetadataCallback().fromBinary(bytes, options); - } - - 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 proto2.util.equals(SetLocalMetadataCallback, a, b); - } -} - -/** - * @generated from message livekit.proto.SendChatMessageRequest - */ -export class SendChatMessageRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required string message = 2; - */ - message?: string; - - /** - * @generated from field: repeated string destination_identities = 3; - */ - destinationIdentities: string[] = []; - - /** - * @generated from field: optional string sender_identity = 4; - */ - senderIdentity?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SendChatMessageRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { 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 proto2.util.equals(SendChatMessageRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.EditChatMessageRequest - */ -export class EditChatMessageRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required string edit_text = 2; - */ - editText?: string; - - /** - * @generated from field: required livekit.proto.ChatMessage original_message = 3; - */ - originalMessage?: ChatMessage; - - /** - * @generated from field: repeated string destination_identities = 4; - */ - destinationIdentities: string[] = []; - - /** - * @generated from field: optional string sender_identity = 5; - */ - senderIdentity?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.EditChatMessageRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "edit_text", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "original_message", kind: "message", T: ChatMessage, req: true }, - { 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 proto2.util.equals(EditChatMessageRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.SendChatMessageResponse - */ -export class SendChatMessageResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SendChatMessageResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): 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 proto2.util.equals(SendChatMessageResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.SendChatMessageCallback - */ -export class SendChatMessageCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from oneof livekit.proto.SendChatMessageCallback.message - */ - 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 } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SendChatMessageCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "message" }, - { no: 3, name: "chat_message", kind: "message", T: ChatMessage, oneof: "message" }, - ]); - - 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); - } - - static equals(a: SendChatMessageCallback | PlainMessage | undefined, b: SendChatMessageCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(SendChatMessageCallback, a, b); - } -} - -/** - * Change the local participant's attributes - * - * @generated from message livekit.proto.SetLocalAttributesRequest - */ -export class SetLocalAttributesRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: repeated livekit.proto.AttributesEntry attributes = 2; - */ - attributes: AttributesEntry[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetLocalAttributesRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "attributes", kind: "message", T: AttributesEntry, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalAttributesRequest { - return new SetLocalAttributesRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalAttributesRequest { - return new SetLocalAttributesRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetLocalAttributesRequest { - return new SetLocalAttributesRequest().fromJsonString(jsonString, options); - } - - static equals(a: SetLocalAttributesRequest | PlainMessage | undefined, b: SetLocalAttributesRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(SetLocalAttributesRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.AttributesEntry - */ -export class AttributesEntry extends Message { - /** - * @generated from field: required string key = 1; - */ - key?: string; - - /** - * @generated from field: required string value = 2; - */ - value?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.AttributesEntry"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AttributesEntry { - return new AttributesEntry().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AttributesEntry { - return new AttributesEntry().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AttributesEntry { - return new AttributesEntry().fromJsonString(jsonString, options); - } - - static equals(a: AttributesEntry | PlainMessage | undefined, b: AttributesEntry | PlainMessage | undefined): boolean { - return proto2.util.equals(AttributesEntry, a, b); - } -} - -/** - * @generated from message livekit.proto.SetLocalAttributesResponse - */ -export class SetLocalAttributesResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetLocalAttributesResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): 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); - } - - static equals(a: SetLocalAttributesResponse | PlainMessage | undefined, b: SetLocalAttributesResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(SetLocalAttributesResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.SetLocalAttributesCallback - */ -export class SetLocalAttributesCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from field: optional string error = 2; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetLocalAttributesCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "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); - } - - 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 proto2.util.equals(SetLocalAttributesCallback, a, b); - } -} - -/** - * Change the local participant's name - * - * @generated from message livekit.proto.SetLocalNameRequest - */ -export class SetLocalNameRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required string name = 2; - */ - name?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetLocalNameRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalNameRequest { - return new SetLocalNameRequest().fromBinary(bytes, options); - } - - 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 proto2.util.equals(SetLocalNameRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.SetLocalNameResponse - */ -export class SetLocalNameResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetLocalNameResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): 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 proto2.util.equals(SetLocalNameResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.SetLocalNameCallback - */ -export class SetLocalNameCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from field: optional string error = 2; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetLocalNameCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "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 proto2.util.equals(SetLocalNameCallback, a, b); - } -} - -/** - * Change the "desire" to subs2ribe to a track - * - * @generated from message livekit.proto.SetSubscribedRequest - */ -export class SetSubscribedRequest extends Message { - /** - * @generated from field: required bool subscribe = 1; - */ - subscribe?: boolean; - - /** - * @generated from field: required uint64 publication_handle = 2; - */ - publicationHandle?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetSubscribedRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "subscribe", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 2, name: "publication_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - 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 proto2.util.equals(SetSubscribedRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.SetSubscribedResponse - */ -export class SetSubscribedResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetSubscribedResponse"; - static readonly fields: FieldList = proto2.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 proto2.util.equals(SetSubscribedResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.GetSessionStatsRequest - */ -export class GetSessionStatsRequest extends Message { - /** - * @generated from field: required uint64 room_handle = 1; - */ - roomHandle?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.GetSessionStatsRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "room_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - 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 proto2.util.equals(GetSessionStatsRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.GetSessionStatsResponse - */ -export class GetSessionStatsResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.GetSessionStatsResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): 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 proto2.util.equals(GetSessionStatsResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.GetSessionStatsCallback - */ -export class GetSessionStatsCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from oneof livekit.proto.GetSessionStatsCallback.message - */ - 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 } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.GetSessionStatsCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "message" }, - { no: 3, name: "result", kind: "message", T: GetSessionStatsCallback_Result, oneof: "message" }, - ]); - - 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); - } - - static equals(a: GetSessionStatsCallback | PlainMessage | undefined, b: GetSessionStatsCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(GetSessionStatsCallback, a, b); - } -} - -/** - * @generated from message livekit.proto.GetSessionStatsCallback.Result - */ -export class GetSessionStatsCallback_Result extends Message { - /** - * @generated from field: repeated livekit.proto.RtcStats publisher_stats = 1; - */ - publisherStats: RtcStats[] = []; - - /** - * @generated from field: repeated livekit.proto.RtcStats subscriber_stats = 2; - */ - subscriberStats: RtcStats[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.GetSessionStatsCallback.Result"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "publisher_stats", kind: "message", T: RtcStats, repeated: true }, - { no: 2, name: "subscriber_stats", kind: "message", T: RtcStats, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetSessionStatsCallback_Result { - return new GetSessionStatsCallback_Result().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetSessionStatsCallback_Result { - return new GetSessionStatsCallback_Result().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetSessionStatsCallback_Result { - return new GetSessionStatsCallback_Result().fromJsonString(jsonString, options); - } - - static equals(a: GetSessionStatsCallback_Result | PlainMessage | undefined, b: GetSessionStatsCallback_Result | PlainMessage | undefined): boolean { - return proto2.util.equals(GetSessionStatsCallback_Result, a, b); - } -} - -/** - * @generated from message livekit.proto.VideoEncoding - */ -export class VideoEncoding extends Message { - /** - * @generated from field: required uint64 max_bitrate = 1; - */ - maxBitrate?: bigint; - - /** - * @generated from field: required double max_framerate = 2; - */ - maxFramerate?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.VideoEncoding"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "max_bitrate", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "max_framerate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - ]); - - 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); - } - - static equals(a: VideoEncoding | PlainMessage | undefined, b: VideoEncoding | PlainMessage | undefined): boolean { - return proto2.util.equals(VideoEncoding, a, b); - } -} - -/** - * @generated from message livekit.proto.AudioEncoding - */ -export class AudioEncoding extends Message { - /** - * @generated from field: required uint64 max_bitrate = 1; - */ - maxBitrate?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.AudioEncoding"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "max_bitrate", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - 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); - } - - static equals(a: AudioEncoding | PlainMessage | undefined, b: AudioEncoding | PlainMessage | undefined): boolean { - return proto2.util.equals(AudioEncoding, a, b); - } -} - -/** - * @generated from message livekit.proto.TrackPublishOptions - */ -export class TrackPublishOptions extends Message { - /** - * encodings are optional - * - * @generated from field: optional livekit.proto.VideoEncoding video_encoding = 1; - */ - videoEncoding?: VideoEncoding; - - /** - * @generated from field: optional livekit.proto.AudioEncoding audio_encoding = 2; - */ - audioEncoding?: AudioEncoding; - - /** - * @generated from field: optional livekit.proto.VideoCodec video_codec = 3; - */ - videoCodec?: VideoCodec; - - /** - * @generated from field: optional bool dtx = 4; - */ - dtx?: boolean; - - /** - * @generated from field: optional bool red = 5; - */ - red?: boolean; - - /** - * @generated from field: optional bool simulcast = 6; - */ - simulcast?: boolean; - - /** - * @generated from field: optional livekit.proto.TrackSource source = 7; - */ - source?: TrackSource; - - /** - * @generated from field: optional string stream = 8; - */ - stream?: string; - - /** - * @generated from field: optional bool preconnect_buffer = 9; - */ - preconnectBuffer?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TrackPublishOptions"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "video_encoding", kind: "message", T: VideoEncoding, opt: true }, - { no: 2, name: "audio_encoding", kind: "message", T: AudioEncoding, opt: true }, - { no: 3, name: "video_codec", kind: "enum", T: proto2.getEnumType(VideoCodec), opt: true }, - { no: 4, name: "dtx", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 5, name: "red", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 6, name: "simulcast", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 7, name: "source", kind: "enum", T: proto2.getEnumType(TrackSource), opt: true }, - { no: 8, name: "stream", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 9, name: "preconnect_buffer", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); - - 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); - } - - static equals(a: TrackPublishOptions | PlainMessage | undefined, b: TrackPublishOptions | PlainMessage | undefined): boolean { - return proto2.util.equals(TrackPublishOptions, a, b); - } -} - -/** - * @generated from message livekit.proto.IceServer - */ -export class IceServer extends Message { - /** - * @generated from field: repeated string urls = 1; - */ - urls: string[] = []; - - /** - * @generated from field: optional string username = 2; - */ - username?: string; - - /** - * @generated from field: optional string password = 3; - */ - password?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.IceServer"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "urls", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 2, name: "username", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "password", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - 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); - } - - static equals(a: IceServer | PlainMessage | undefined, b: IceServer | PlainMessage | undefined): boolean { - return proto2.util.equals(IceServer, a, b); - } -} - -/** - * @generated from message livekit.proto.RtcConfig - */ -export class RtcConfig extends Message { - /** - * @generated from field: optional livekit.proto.IceTransportType ice_transport_type = 1; - */ - iceTransportType?: IceTransportType; - - /** - * @generated from field: optional livekit.proto.ContinualGatheringPolicy continual_gathering_policy = 2; - */ - continualGatheringPolicy?: ContinualGatheringPolicy; - - /** - * empty fallback to default - * - * @generated from field: repeated livekit.proto.IceServer ice_servers = 3; - */ - iceServers: IceServer[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtcConfig"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "ice_transport_type", kind: "enum", T: proto2.getEnumType(IceTransportType), opt: true }, - { no: 2, name: "continual_gathering_policy", kind: "enum", T: proto2.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); - } - - static equals(a: RtcConfig | PlainMessage | undefined, b: RtcConfig | PlainMessage | undefined): boolean { - return proto2.util.equals(RtcConfig, a, b); - } -} - -/** - * @generated from message livekit.proto.RoomOptions - */ -export class RoomOptions extends Message { - /** - * @generated from field: optional bool auto_subscribe = 1; - */ - autoSubscribe?: boolean; - - /** - * @generated from field: optional bool adaptive_stream = 2; - */ - adaptiveStream?: boolean; - - /** - * @generated from field: optional bool dynacast = 3; - */ - dynacast?: boolean; - - /** - * @generated from field: optional livekit.proto.E2eeOptions e2ee = 4 [deprecated = true]; - * @deprecated - */ - e2ee?: E2eeOptions; - - /** - * allow to setup a custom RtcConfiguration - * - * @generated from field: optional livekit.proto.RtcConfig rtc_config = 5; - */ - rtcConfig?: RtcConfig; - - /** - * @generated from field: optional uint32 join_retries = 6; - */ - joinRetries?: number; - - /** - * @generated from field: optional livekit.proto.E2eeOptions encryption = 7; - */ - encryption?: E2eeOptions; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RoomOptions"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "auto_subscribe", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 2, name: "adaptive_stream", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 3, name: "dynacast", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { 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 */, opt: true }, - { no: 7, name: "encryption", kind: "message", T: E2eeOptions, opt: true }, - ]); - - 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); - } - - static equals(a: RoomOptions | PlainMessage | undefined, b: RoomOptions | PlainMessage | undefined): boolean { - return proto2.util.equals(RoomOptions, a, b); - } -} - -/** - * @generated from message livekit.proto.TranscriptionSegment - */ -export class TranscriptionSegment extends Message { - /** - * @generated from field: required string id = 1; - */ - id?: string; - - /** - * @generated from field: required string text = 2; - */ - text?: string; - - /** - * @generated from field: required uint64 start_time = 3; - */ - startTime?: bigint; - - /** - * @generated from field: required uint64 end_time = 4; - */ - endTime?: bigint; - - /** - * @generated from field: required bool final = 5; - */ - final?: boolean; - - /** - * @generated from field: required string language = 6; - */ - language?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TranscriptionSegment"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "start_time", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 4, name: "end_time", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 5, name: "final", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 6, name: "language", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - 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); - } - - static equals(a: TranscriptionSegment | PlainMessage | undefined, b: TranscriptionSegment | PlainMessage | undefined): boolean { - return proto2.util.equals(TranscriptionSegment, a, b); - } -} - -/** - * @generated from message livekit.proto.BufferInfo - */ -export class BufferInfo extends Message { - /** - * @generated from field: required uint64 data_ptr = 1; - */ - dataPtr?: bigint; - - /** - * @generated from field: required uint64 data_len = 2; - */ - dataLen?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.BufferInfo"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "data_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "data_len", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - 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); - } - - static equals(a: BufferInfo | PlainMessage | undefined, b: BufferInfo | PlainMessage | undefined): boolean { - return proto2.util.equals(BufferInfo, a, b); - } -} - -/** - * @generated from message livekit.proto.OwnedBuffer - */ -export class OwnedBuffer extends Message { - /** - * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; - */ - handle?: FfiOwnedHandle; - - /** - * @generated from field: required livekit.proto.BufferInfo data = 2; - */ - data?: BufferInfo; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.OwnedBuffer"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, - { no: 2, name: "data", kind: "message", T: BufferInfo, req: true }, - ]); - - 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 proto2.util.equals(OwnedBuffer, a, b); - } -} - -/** - * @generated from message livekit.proto.RoomEvent - */ -export class RoomEvent extends Message { - /** - * @generated from field: required uint64 room_handle = 1; - */ - roomHandle?: bigint; - - /** - * @generated from oneof livekit.proto.RoomEvent.message - */ - message: { - /** - * @generated from field: livekit.proto.ParticipantConnected participant_connected = 2; - */ - value: ParticipantConnected; - case: "participantConnected"; - } | { - /** - * @generated from field: livekit.proto.ParticipantDisconnected participant_disconnected = 3; - */ - value: ParticipantDisconnected; - case: "participantDisconnected"; - } | { - /** - * @generated from field: livekit.proto.LocalTrackPublished local_track_published = 4; - */ - value: LocalTrackPublished; - case: "localTrackPublished"; - } | { - /** - * @generated from field: livekit.proto.LocalTrackUnpublished local_track_unpublished = 5; - */ - value: LocalTrackUnpublished; - case: "localTrackUnpublished"; - } | { - /** - * @generated from field: livekit.proto.LocalTrackSubscribed local_track_subscribed = 6; - */ - value: LocalTrackSubscribed; - case: "localTrackSubscribed"; - } | { - /** - * @generated from field: livekit.proto.TrackPublished track_published = 7; - */ - value: TrackPublished; - case: "trackPublished"; - } | { - /** - * @generated from field: livekit.proto.TrackUnpublished track_unpublished = 8; - */ - value: TrackUnpublished; - case: "trackUnpublished"; - } | { - /** - * @generated from field: livekit.proto.TrackSubscribed track_subscribed = 9; - */ - value: TrackSubscribed; - case: "trackSubscribed"; - } | { - /** - * @generated from field: livekit.proto.TrackUnsubscribed track_unsubscribed = 10; - */ - value: TrackUnsubscribed; - case: "trackUnsubscribed"; - } | { - /** - * @generated from field: livekit.proto.TrackSubscriptionFailed track_subscription_failed = 11; - */ - value: TrackSubscriptionFailed; - case: "trackSubscriptionFailed"; - } | { - /** - * @generated from field: livekit.proto.TrackMuted track_muted = 12; - */ - value: TrackMuted; - case: "trackMuted"; - } | { - /** - * @generated from field: livekit.proto.TrackUnmuted track_unmuted = 13; - */ - value: TrackUnmuted; - case: "trackUnmuted"; - } | { - /** - * @generated from field: livekit.proto.ActiveSpeakersChanged active_speakers_changed = 14; - */ - value: ActiveSpeakersChanged; - case: "activeSpeakersChanged"; - } | { - /** - * @generated from field: livekit.proto.RoomMetadataChanged room_metadata_changed = 15; - */ - value: RoomMetadataChanged; - case: "roomMetadataChanged"; - } | { - /** - * @generated from field: livekit.proto.RoomSidChanged room_sid_changed = 16; - */ - value: RoomSidChanged; - case: "roomSidChanged"; - } | { - /** - * @generated from field: livekit.proto.ParticipantMetadataChanged participant_metadata_changed = 17; - */ - value: ParticipantMetadataChanged; - case: "participantMetadataChanged"; - } | { - /** - * @generated from field: livekit.proto.ParticipantNameChanged participant_name_changed = 18; - */ - value: ParticipantNameChanged; - case: "participantNameChanged"; - } | { - /** - * @generated from field: livekit.proto.ParticipantAttributesChanged participant_attributes_changed = 19; - */ - value: ParticipantAttributesChanged; - case: "participantAttributesChanged"; - } | { - /** - * @generated from field: livekit.proto.ConnectionQualityChanged connection_quality_changed = 20; - */ - value: ConnectionQualityChanged; - case: "connectionQualityChanged"; - } | { - /** - * @generated from field: livekit.proto.ConnectionStateChanged connection_state_changed = 21; - */ - value: ConnectionStateChanged; - case: "connectionStateChanged"; - } | { - /** - * Connected connected = 21; - * - * @generated from field: livekit.proto.Disconnected disconnected = 22; - */ - value: Disconnected; - case: "disconnected"; - } | { - /** - * @generated from field: livekit.proto.Reconnecting reconnecting = 23; - */ - value: Reconnecting; - case: "reconnecting"; - } | { - /** - * @generated from field: livekit.proto.Reconnected reconnected = 24; - */ - value: Reconnected; - case: "reconnected"; - } | { - /** - * @generated from field: livekit.proto.E2eeStateChanged e2ee_state_changed = 25; - */ - value: E2eeStateChanged; - case: "e2eeStateChanged"; - } | { - /** - * The stream of room events has ended - * - * @generated from field: livekit.proto.RoomEOS eos = 26; - */ - value: RoomEOS; - case: "eos"; - } | { - /** - * @generated from field: livekit.proto.DataPacketReceived data_packet_received = 27; - */ - value: DataPacketReceived; - case: "dataPacketReceived"; - } | { - /** - * @generated from field: livekit.proto.TranscriptionReceived transcription_received = 28; - */ - value: TranscriptionReceived; - case: "transcriptionReceived"; - } | { - /** - * @generated from field: livekit.proto.ChatMessageReceived chat_message = 29; - */ - value: ChatMessageReceived; - case: "chatMessage"; - } | { - /** - * Data stream (low level) - * - * @generated from field: livekit.proto.DataStreamHeaderReceived stream_header_received = 30; - */ - value: DataStreamHeaderReceived; - case: "streamHeaderReceived"; - } | { - /** - * @generated from field: livekit.proto.DataStreamChunkReceived stream_chunk_received = 31; - */ - value: DataStreamChunkReceived; - case: "streamChunkReceived"; - } | { - /** - * @generated from field: livekit.proto.DataStreamTrailerReceived stream_trailer_received = 32; - */ - value: DataStreamTrailerReceived; - case: "streamTrailerReceived"; - } | { - /** - * @generated from field: livekit.proto.DataChannelBufferedAmountLowThresholdChanged data_channel_low_threshold_changed = 33; - */ - value: DataChannelBufferedAmountLowThresholdChanged; - case: "dataChannelLowThresholdChanged"; - } | { - /** - * Data stream (high level) - * - * @generated from field: livekit.proto.ByteStreamOpened byte_stream_opened = 34; - */ - value: ByteStreamOpened; - case: "byteStreamOpened"; - } | { - /** - * @generated from field: livekit.proto.TextStreamOpened text_stream_opened = 35; - */ - value: TextStreamOpened; - case: "textStreamOpened"; - } | { - /** - * Room info updated - * - * @generated from field: livekit.proto.RoomInfo room_updated = 36; - */ - value: RoomInfo; - case: "roomUpdated"; - } | { - /** - * Participant moved to new room - * - * @generated from field: livekit.proto.RoomInfo moved = 37; - */ - value: RoomInfo; - case: "moved"; - } | { - /** - * carry over all participant info updates, including sid - * - * @generated from field: livekit.proto.ParticipantsUpdated participants_updated = 38; - */ - value: ParticipantsUpdated; - case: "participantsUpdated"; - } | { - /** - * @generated from field: livekit.proto.ParticipantEncryptionStatusChanged participant_encryption_status_changed = 39; - */ - value: ParticipantEncryptionStatusChanged; - case: "participantEncryptionStatusChanged"; - } | { - /** - * @generated from field: livekit.proto.TokenRefreshed token_refreshed = 40; - */ - value: TokenRefreshed; - case: "tokenRefreshed"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RoomEvent"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "room_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { 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" }, - { no: 30, name: "stream_header_received", kind: "message", T: DataStreamHeaderReceived, oneof: "message" }, - { no: 31, name: "stream_chunk_received", kind: "message", T: DataStreamChunkReceived, oneof: "message" }, - { no: 32, name: "stream_trailer_received", kind: "message", T: DataStreamTrailerReceived, oneof: "message" }, - { no: 33, name: "data_channel_low_threshold_changed", kind: "message", T: DataChannelBufferedAmountLowThresholdChanged, oneof: "message" }, - { no: 34, name: "byte_stream_opened", kind: "message", T: ByteStreamOpened, oneof: "message" }, - { no: 35, name: "text_stream_opened", kind: "message", T: TextStreamOpened, oneof: "message" }, - { no: 36, name: "room_updated", kind: "message", T: RoomInfo, oneof: "message" }, - { no: 37, name: "moved", kind: "message", T: RoomInfo, oneof: "message" }, - { no: 38, name: "participants_updated", kind: "message", T: ParticipantsUpdated, oneof: "message" }, - { no: 39, name: "participant_encryption_status_changed", kind: "message", T: ParticipantEncryptionStatusChanged, oneof: "message" }, - { no: 40, name: "token_refreshed", kind: "message", T: TokenRefreshed, 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 proto2.util.equals(RoomEvent, a, b); - } -} - -/** - * @generated from message livekit.proto.RoomInfo - */ -export class RoomInfo extends Message { - /** - * @generated from field: optional string sid = 1; - */ - sid?: string; - - /** - * @generated from field: required string name = 2; - */ - name?: string; - - /** - * @generated from field: required string metadata = 3; - */ - metadata?: string; - - /** - * @generated from field: required uint64 lossy_dc_buffered_amount_low_threshold = 4; - */ - lossyDcBufferedAmountLowThreshold?: bigint; - - /** - * @generated from field: required uint64 reliable_dc_buffered_amount_low_threshold = 5; - */ - reliableDcBufferedAmountLowThreshold?: bigint; - - /** - * @generated from field: required uint32 empty_timeout = 6; - */ - emptyTimeout?: number; - - /** - * @generated from field: required uint32 departure_timeout = 7; - */ - departureTimeout?: number; - - /** - * @generated from field: required uint32 max_participants = 8; - */ - maxParticipants?: number; - - /** - * @generated from field: required int64 creation_time = 9; - */ - creationTime?: bigint; - - /** - * @generated from field: required uint32 num_participants = 10; - */ - numParticipants?: number; - - /** - * @generated from field: required uint32 num_publishers = 11; - */ - numPublishers?: number; - - /** - * @generated from field: required bool active_recording = 12; - */ - activeRecording?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RoomInfo"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 4, name: "lossy_dc_buffered_amount_low_threshold", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 5, name: "reliable_dc_buffered_amount_low_threshold", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 6, name: "empty_timeout", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 7, name: "departure_timeout", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 8, name: "max_participants", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 9, name: "creation_time", kind: "scalar", T: 3 /* ScalarType.INT64 */, req: true }, - { no: 10, name: "num_participants", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 11, name: "num_publishers", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 12, name: "active_recording", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - ]); - - 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 proto2.util.equals(RoomInfo, a, b); - } -} - -/** - * @generated from message livekit.proto.OwnedRoom - */ -export class OwnedRoom extends Message { - /** - * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; - */ - handle?: FfiOwnedHandle; - - /** - * @generated from field: required livekit.proto.RoomInfo info = 2; - */ - info?: RoomInfo; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.OwnedRoom"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, - { no: 2, name: "info", kind: "message", T: RoomInfo, req: true }, - ]); - - 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 proto2.util.equals(OwnedRoom, a, b); - } -} - -/** - * @generated from message livekit.proto.ParticipantsUpdated - */ -export class ParticipantsUpdated extends Message { - /** - * @generated from field: repeated livekit.proto.ParticipantInfo participants = 1; - */ - participants: ParticipantInfo[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ParticipantsUpdated"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participants", kind: "message", T: ParticipantInfo, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantsUpdated { - return new ParticipantsUpdated().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantsUpdated { - return new ParticipantsUpdated().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ParticipantsUpdated { - return new ParticipantsUpdated().fromJsonString(jsonString, options); - } - - static equals(a: ParticipantsUpdated | PlainMessage | undefined, b: ParticipantsUpdated | PlainMessage | undefined): boolean { - return proto2.util.equals(ParticipantsUpdated, a, b); - } -} - -/** - * @generated from message livekit.proto.ParticipantConnected - */ -export class ParticipantConnected extends Message { - /** - * @generated from field: required livekit.proto.OwnedParticipant info = 1; - */ - info?: OwnedParticipant; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ParticipantConnected"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "info", kind: "message", T: OwnedParticipant, req: true }, - ]); - - 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 proto2.util.equals(ParticipantConnected, a, b); - } -} - -/** - * @generated from message livekit.proto.ParticipantDisconnected - */ -export class ParticipantDisconnected extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required livekit.proto.DisconnectReason disconnect_reason = 2; - */ - disconnectReason?: DisconnectReason; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ParticipantDisconnected"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "disconnect_reason", kind: "enum", T: proto2.getEnumType(DisconnectReason), req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantDisconnected { - return new ParticipantDisconnected().fromBinary(bytes, options); - } - - 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 proto2.util.equals(ParticipantDisconnected, a, b); - } -} - -/** - * @generated from message livekit.proto.LocalTrackPublished - */ -export class LocalTrackPublished extends Message { - /** - * The TrackPublicationInfo comes from the PublishTrack response - * and the FfiClient musts wait for it before firing this event - * - * @generated from field: required string track_sid = 1; - */ - trackSid?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.LocalTrackPublished"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): LocalTrackPublished { - return new LocalTrackPublished().fromBinary(bytes, options); - } - - 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 proto2.util.equals(LocalTrackPublished, a, b); - } -} - -/** - * @generated from message livekit.proto.LocalTrackUnpublished - */ -export class LocalTrackUnpublished extends Message { - /** - * @generated from field: required string publication_sid = 1; - */ - publicationSid?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.LocalTrackUnpublished"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "publication_sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): LocalTrackUnpublished { - return new LocalTrackUnpublished().fromBinary(bytes, options); - } - - 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 proto2.util.equals(LocalTrackUnpublished, a, b); - } -} - -/** - * @generated from message livekit.proto.LocalTrackSubscribed - */ -export class LocalTrackSubscribed extends Message { - /** - * @generated from field: required string track_sid = 2; - */ - trackSid?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.LocalTrackSubscribed"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): LocalTrackSubscribed { - return new LocalTrackSubscribed().fromBinary(bytes, options); - } - - 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 proto2.util.equals(LocalTrackSubscribed, a, b); - } -} - -/** - * @generated from message livekit.proto.TrackPublished - */ -export class TrackPublished extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required livekit.proto.OwnedTrackPublication publication = 2; - */ - publication?: OwnedTrackPublication; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TrackPublished"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "publication", kind: "message", T: OwnedTrackPublication, req: true }, - ]); - - 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 proto2.util.equals(TrackPublished, a, b); - } -} - -/** - * @generated from message livekit.proto.TrackUnpublished - */ -export class TrackUnpublished extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required string publication_sid = 2; - */ - publicationSid?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TrackUnpublished"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "publication_sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - 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 proto2.util.equals(TrackUnpublished, a, b); - } -} - -/** - * Publication isn't needed for subscription events on the FFI - * The FFI will retrieve the publication using the Track sid - * - * @generated from message livekit.proto.TrackSubscribed - */ -export class TrackSubscribed extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required livekit.proto.OwnedTrack track = 2; - */ - track?: OwnedTrack; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TrackSubscribed"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "track", kind: "message", T: OwnedTrack, req: true }, - ]); - - 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 proto2.util.equals(TrackSubscribed, a, b); - } -} - -/** - * @generated from message livekit.proto.TrackUnsubscribed - */ -export class TrackUnsubscribed extends Message { - /** - * The FFI language can dispose/remove the VideoSink here - * - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required string track_sid = 2; - */ - trackSid?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TrackUnsubscribed"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - 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); - } - - static equals(a: TrackUnsubscribed | PlainMessage | undefined, b: TrackUnsubscribed | PlainMessage | undefined): boolean { - return proto2.util.equals(TrackUnsubscribed, a, b); - } -} - -/** - * @generated from message livekit.proto.TrackSubscriptionFailed - */ -export class TrackSubscriptionFailed extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required string track_sid = 2; - */ - trackSid?: string; - - /** - * @generated from field: required string error = 3; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TrackSubscriptionFailed"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - 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); - } - - static equals(a: TrackSubscriptionFailed | PlainMessage | undefined, b: TrackSubscriptionFailed | PlainMessage | undefined): boolean { - return proto2.util.equals(TrackSubscriptionFailed, a, b); - } -} - -/** - * @generated from message livekit.proto.TrackMuted - */ -export class TrackMuted extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required string track_sid = 2; - */ - trackSid?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TrackMuted"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - 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); - } - - static equals(a: TrackMuted | PlainMessage | undefined, b: TrackMuted | PlainMessage | undefined): boolean { - return proto2.util.equals(TrackMuted, a, b); - } -} - -/** - * @generated from message livekit.proto.TrackUnmuted - */ -export class TrackUnmuted extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required string track_sid = 2; - */ - trackSid?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TrackUnmuted"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - 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); - } - - static equals(a: TrackUnmuted | PlainMessage | undefined, b: TrackUnmuted | PlainMessage | undefined): boolean { - return proto2.util.equals(TrackUnmuted, a, b); - } -} - -/** - * @generated from message livekit.proto.E2eeStateChanged - */ -export class E2eeStateChanged extends Message { - /** - * Using sid instead of identity for ffi communication - * - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required livekit.proto.EncryptionState state = 2; - */ - state?: EncryptionState; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.E2eeStateChanged"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "state", kind: "enum", T: proto2.getEnumType(EncryptionState), req: true }, - ]); - - 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); - } - - static equals(a: E2eeStateChanged | PlainMessage | undefined, b: E2eeStateChanged | PlainMessage | undefined): boolean { - return proto2.util.equals(E2eeStateChanged, a, b); - } -} - -/** - * @generated from message livekit.proto.ActiveSpeakersChanged - */ -export class ActiveSpeakersChanged extends Message { - /** - * @generated from field: repeated string participant_identities = 1; - */ - participantIdentities: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ActiveSpeakersChanged"; - static readonly fields: FieldList = proto2.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); - } - - static equals(a: ActiveSpeakersChanged | PlainMessage | undefined, b: ActiveSpeakersChanged | PlainMessage | undefined): boolean { - return proto2.util.equals(ActiveSpeakersChanged, a, b); - } -} - -/** - * @generated from message livekit.proto.RoomMetadataChanged - */ -export class RoomMetadataChanged extends Message { - /** - * @generated from field: required string metadata = 1; - */ - metadata?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RoomMetadataChanged"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - 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); - } - - static equals(a: RoomMetadataChanged | PlainMessage | undefined, b: RoomMetadataChanged | PlainMessage | undefined): boolean { - return proto2.util.equals(RoomMetadataChanged, a, b); - } -} - -/** - * @generated from message livekit.proto.RoomSidChanged - */ -export class RoomSidChanged extends Message { - /** - * @generated from field: required string sid = 1; - */ - sid?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RoomSidChanged"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - 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); - } - - static equals(a: RoomSidChanged | PlainMessage | undefined, b: RoomSidChanged | PlainMessage | undefined): boolean { - return proto2.util.equals(RoomSidChanged, a, b); - } -} - -/** - * @generated from message livekit.proto.ParticipantMetadataChanged - */ -export class ParticipantMetadataChanged extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required string metadata = 2; - */ - metadata?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ParticipantMetadataChanged"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - 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); - } - - static equals(a: ParticipantMetadataChanged | PlainMessage | undefined, b: ParticipantMetadataChanged | PlainMessage | undefined): boolean { - return proto2.util.equals(ParticipantMetadataChanged, a, b); - } -} - -/** - * @generated from message livekit.proto.ParticipantAttributesChanged - */ -export class ParticipantAttributesChanged extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: repeated livekit.proto.AttributesEntry attributes = 2; - */ - attributes: AttributesEntry[] = []; - - /** - * @generated from field: repeated livekit.proto.AttributesEntry changed_attributes = 3; - */ - changedAttributes: AttributesEntry[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ParticipantAttributesChanged"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "attributes", kind: "message", T: AttributesEntry, repeated: true }, - { no: 3, name: "changed_attributes", kind: "message", T: AttributesEntry, repeated: true }, - ]); - - 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); - } - - static equals(a: ParticipantAttributesChanged | PlainMessage | undefined, b: ParticipantAttributesChanged | PlainMessage | undefined): boolean { - return proto2.util.equals(ParticipantAttributesChanged, a, b); - } -} - -/** - * @generated from message livekit.proto.ParticipantEncryptionStatusChanged - */ -export class ParticipantEncryptionStatusChanged extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required bool is_encrypted = 2; - */ - isEncrypted?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ParticipantEncryptionStatusChanged"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "is_encrypted", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantEncryptionStatusChanged { - return new ParticipantEncryptionStatusChanged().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantEncryptionStatusChanged { - return new ParticipantEncryptionStatusChanged().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ParticipantEncryptionStatusChanged { - return new ParticipantEncryptionStatusChanged().fromJsonString(jsonString, options); - } - - static equals(a: ParticipantEncryptionStatusChanged | PlainMessage | undefined, b: ParticipantEncryptionStatusChanged | PlainMessage | undefined): boolean { - return proto2.util.equals(ParticipantEncryptionStatusChanged, a, b); - } -} - -/** - * @generated from message livekit.proto.ParticipantNameChanged - */ -export class ParticipantNameChanged extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required string name = 2; - */ - name?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ParticipantNameChanged"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - 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); - } - - static equals(a: ParticipantNameChanged | PlainMessage | undefined, b: ParticipantNameChanged | PlainMessage | undefined): boolean { - return proto2.util.equals(ParticipantNameChanged, a, b); - } -} - -/** - * @generated from message livekit.proto.ConnectionQualityChanged - */ -export class ConnectionQualityChanged extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required livekit.proto.ConnectionQuality quality = 2; - */ - quality?: ConnectionQuality; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ConnectionQualityChanged"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "quality", kind: "enum", T: proto2.getEnumType(ConnectionQuality), req: true }, - ]); - - 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); - } - - static equals(a: ConnectionQualityChanged | PlainMessage | undefined, b: ConnectionQualityChanged | PlainMessage | undefined): boolean { - return proto2.util.equals(ConnectionQualityChanged, a, b); - } -} - -/** - * @generated from message livekit.proto.UserPacket - */ -export class UserPacket extends Message { - /** - * @generated from field: required livekit.proto.OwnedBuffer data = 1; - */ - data?: OwnedBuffer; - - /** - * @generated from field: optional string topic = 2; - */ - topic?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.UserPacket"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "data", kind: "message", T: OwnedBuffer, req: true }, - { 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); - } - - static equals(a: UserPacket | PlainMessage | undefined, b: UserPacket | PlainMessage | undefined): boolean { - return proto2.util.equals(UserPacket, a, b); - } -} - -/** - * @generated from message livekit.proto.ChatMessage - */ -export class ChatMessage extends Message { - /** - * @generated from field: required string id = 1; - */ - id?: string; - - /** - * @generated from field: required int64 timestamp = 2; - */ - timestamp?: bigint; - - /** - * @generated from field: required string message = 3; - */ - message?: string; - - /** - * @generated from field: optional int64 edit_timestamp = 4; - */ - editTimestamp?: bigint; - - /** - * @generated from field: optional bool deleted = 5; - */ - deleted?: boolean; - - /** - * @generated from field: optional bool generated = 6; - */ - generated?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ChatMessage"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, req: true }, - { no: 3, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { 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 proto2.util.equals(ChatMessage, a, b); - } -} - -/** - * @generated from message livekit.proto.ChatMessageReceived - */ -export class ChatMessageReceived extends Message { - /** - * @generated from field: required livekit.proto.ChatMessage message = 1; - */ - message?: ChatMessage; - - /** - * @generated from field: required string participant_identity = 2; - */ - participantIdentity?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ChatMessageReceived"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "message", kind: "message", T: ChatMessage, req: true }, - { no: 2, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - 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 proto2.util.equals(ChatMessageReceived, a, b); - } -} - -/** - * @generated from message livekit.proto.SipDTMF - */ -export class SipDTMF extends Message { - /** - * @generated from field: required uint32 code = 1; - */ - code?: number; - - /** - * @generated from field: optional string digit = 2; - */ - digit?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SipDTMF"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "code", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { 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 proto2.util.equals(SipDTMF, a, b); - } -} - -/** - * @generated from message livekit.proto.DataPacketReceived - */ -export class DataPacketReceived extends Message { - /** - * @generated from field: required livekit.proto.DataPacketKind kind = 1; - */ - kind?: DataPacketKind; - - /** - * Can be empty if the data is sent a server SDK - * - * @generated from field: required string participant_identity = 2; - */ - participantIdentity?: string; - - /** - * @generated from oneof livekit.proto.DataPacketReceived.value - */ - value: { - /** - * @generated from field: livekit.proto.UserPacket user = 4; - */ - value: UserPacket; - case: "user"; - } | { - /** - * @generated from field: livekit.proto.SipDTMF sip_dtmf = 5; - */ - value: SipDTMF; - case: "sipDtmf"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.DataPacketReceived"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "kind", kind: "enum", T: proto2.getEnumType(DataPacketKind), req: true }, - { no: 2, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { 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 proto2.util.equals(DataPacketReceived, a, b); - } -} - -/** - * @generated from message livekit.proto.TranscriptionReceived - */ -export class TranscriptionReceived extends Message { - /** - * @generated from field: optional string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: optional string track_sid = 2; - */ - trackSid?: string; - - /** - * @generated from field: repeated livekit.proto.TranscriptionSegment segments = 3; - */ - segments: TranscriptionSegment[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TranscriptionReceived"; - static readonly fields: FieldList = proto2.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 }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TranscriptionReceived { - return new TranscriptionReceived().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TranscriptionReceived { - return new TranscriptionReceived().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TranscriptionReceived { - return new TranscriptionReceived().fromJsonString(jsonString, options); - } - - static equals(a: TranscriptionReceived | PlainMessage | undefined, b: TranscriptionReceived | PlainMessage | undefined): boolean { - return proto2.util.equals(TranscriptionReceived, a, b); - } -} - -/** - * @generated from message livekit.proto.ConnectionStateChanged - */ -export class ConnectionStateChanged extends Message { - /** - * @generated from field: required livekit.proto.ConnectionState state = 1; - */ - state?: ConnectionState; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ConnectionStateChanged"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "state", kind: "enum", T: proto2.getEnumType(ConnectionState), req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ConnectionStateChanged { - return new ConnectionStateChanged().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ConnectionStateChanged { - return new ConnectionStateChanged().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ConnectionStateChanged { - return new ConnectionStateChanged().fromJsonString(jsonString, options); - } - - static equals(a: ConnectionStateChanged | PlainMessage | undefined, b: ConnectionStateChanged | PlainMessage | undefined): boolean { - return proto2.util.equals(ConnectionStateChanged, a, b); - } -} - -/** - * @generated from message livekit.proto.Connected - */ -export class Connected extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.Connected"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Connected { - return new Connected().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Connected { - return new Connected().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Connected { - return new Connected().fromJsonString(jsonString, options); - } - - static equals(a: Connected | PlainMessage | undefined, b: Connected | PlainMessage | undefined): boolean { - return proto2.util.equals(Connected, a, b); - } -} - -/** - * @generated from message livekit.proto.Disconnected - */ -export class Disconnected extends Message { - /** - * @generated from field: required livekit.proto.DisconnectReason reason = 1; - */ - reason?: DisconnectReason; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.Disconnected"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "reason", kind: "enum", T: proto2.getEnumType(DisconnectReason), req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Disconnected { - return new Disconnected().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Disconnected { - return new Disconnected().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Disconnected { - return new Disconnected().fromJsonString(jsonString, options); - } - - static equals(a: Disconnected | PlainMessage | undefined, b: Disconnected | PlainMessage | undefined): boolean { - return proto2.util.equals(Disconnected, a, b); - } -} - -/** - * @generated from message livekit.proto.Reconnecting - */ -export class Reconnecting extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.Reconnecting"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Reconnecting { - return new Reconnecting().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Reconnecting { - return new Reconnecting().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Reconnecting { - return new Reconnecting().fromJsonString(jsonString, options); - } - - static equals(a: Reconnecting | PlainMessage | undefined, b: Reconnecting | PlainMessage | undefined): boolean { - return proto2.util.equals(Reconnecting, a, b); - } -} - -/** - * @generated from message livekit.proto.Reconnected - */ -export class Reconnected extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.Reconnected"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Reconnected { - return new Reconnected().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Reconnected { - return new Reconnected().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Reconnected { - return new Reconnected().fromJsonString(jsonString, options); - } - - static equals(a: Reconnected | PlainMessage | undefined, b: Reconnected | PlainMessage | undefined): boolean { - return proto2.util.equals(Reconnected, a, b); - } -} - -/** - * @generated from message livekit.proto.TokenRefreshed - */ -export class TokenRefreshed extends Message { - /** - * @generated from field: required string token = 1; - */ - token?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TokenRefreshed"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TokenRefreshed { - return new TokenRefreshed().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TokenRefreshed { - return new TokenRefreshed().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TokenRefreshed { - return new TokenRefreshed().fromJsonString(jsonString, options); - } - - static equals(a: TokenRefreshed | PlainMessage | undefined, b: TokenRefreshed | PlainMessage | undefined): boolean { - return proto2.util.equals(TokenRefreshed, a, b); - } -} - -/** - * @generated from message livekit.proto.RoomEOS - */ -export class RoomEOS extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RoomEOS"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RoomEOS { - return new RoomEOS().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RoomEOS { - return new RoomEOS().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RoomEOS { - return new RoomEOS().fromJsonString(jsonString, options); - } - - static equals(a: RoomEOS | PlainMessage | undefined, b: RoomEOS | PlainMessage | undefined): boolean { - return proto2.util.equals(RoomEOS, a, b); - } -} - -/** - * @generated from message livekit.proto.DataStream - */ -export class DataStream extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.DataStream"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DataStream { - return new DataStream().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DataStream { - return new DataStream().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DataStream { - return new DataStream().fromJsonString(jsonString, options); - } - - static equals(a: DataStream | PlainMessage | undefined, b: DataStream | PlainMessage | undefined): boolean { - return proto2.util.equals(DataStream, a, b); - } -} - -/** - * enum for operation types (specific to TextHeader) - * - * @generated from enum livekit.proto.DataStream.OperationType - */ -export enum DataStream_OperationType { - /** - * @generated from enum value: CREATE = 0; - */ - CREATE = 0, - - /** - * @generated from enum value: UPDATE = 1; - */ - UPDATE = 1, - - /** - * @generated from enum value: DELETE = 2; - */ - DELETE = 2, - - /** - * @generated from enum value: REACTION = 3; - */ - REACTION = 3, -} -// Retrieve enum metadata with: proto2.getEnumType(DataStream_OperationType) -proto2.util.setEnumType(DataStream_OperationType, "livekit.proto.DataStream.OperationType", [ - { no: 0, name: "CREATE" }, - { no: 1, name: "UPDATE" }, - { no: 2, name: "DELETE" }, - { no: 3, name: "REACTION" }, -]); - -/** - * header properties specific to text streams - * - * @generated from message livekit.proto.DataStream.TextHeader - */ -export class DataStream_TextHeader extends Message { - /** - * @generated from field: required livekit.proto.DataStream.OperationType operation_type = 1; - */ - operationType?: DataStream_OperationType; - - /** - * Optional: Version for updates/edits - * - * @generated from field: optional int32 version = 2; - */ - version?: number; - - /** - * Optional: Reply to specific message - * - * @generated from field: optional string reply_to_stream_id = 3; - */ - replyToStreamId?: string; - - /** - * file attachments for text streams - * - * @generated from field: repeated string attached_stream_ids = 4; - */ - attachedStreamIds: string[] = []; - - /** - * true if the text has been generated by an agent from a participant's audio transcription - * - * @generated from field: optional bool generated = 5; - */ - generated?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.DataStream.TextHeader"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "operation_type", kind: "enum", T: proto2.getEnumType(DataStream_OperationType), req: true }, - { no: 2, name: "version", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 3, name: "reply_to_stream_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "attached_stream_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 5, name: "generated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DataStream_TextHeader { - return new DataStream_TextHeader().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DataStream_TextHeader { - return new DataStream_TextHeader().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DataStream_TextHeader { - return new DataStream_TextHeader().fromJsonString(jsonString, options); - } - - static equals(a: DataStream_TextHeader | PlainMessage | undefined, b: DataStream_TextHeader | PlainMessage | undefined): boolean { - return proto2.util.equals(DataStream_TextHeader, a, b); - } -} - -/** - * header properties specific to byte or file streams - * - * @generated from message livekit.proto.DataStream.ByteHeader - */ -export class DataStream_ByteHeader extends Message { - /** - * @generated from field: required string name = 1; - */ - name?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.DataStream.ByteHeader"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DataStream_ByteHeader { - return new DataStream_ByteHeader().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DataStream_ByteHeader { - return new DataStream_ByteHeader().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DataStream_ByteHeader { - return new DataStream_ByteHeader().fromJsonString(jsonString, options); - } - - static equals(a: DataStream_ByteHeader | PlainMessage | undefined, b: DataStream_ByteHeader | PlainMessage | undefined): boolean { - return proto2.util.equals(DataStream_ByteHeader, a, b); - } -} - -/** - * main DataStream.Header that contains a oneof for specific headers - * - * @generated from message livekit.proto.DataStream.Header - */ -export class DataStream_Header extends Message { - /** - * unique identifier for this data stream - * - * @generated from field: required string stream_id = 1; - */ - streamId?: string; - - /** - * using int64 for Unix timestamp - * - * @generated from field: required int64 timestamp = 2; - */ - timestamp?: bigint; - - /** - * @generated from field: required string mime_type = 3; - */ - mimeType?: string; - - /** - * @generated from field: required string topic = 4; - */ - topic?: string; - - /** - * only populated for finite streams, if it's a stream of unknown size this stays empty - * - * @generated from field: optional uint64 total_length = 5; - */ - totalLength?: bigint; - - /** - * user defined attributes map that can carry additional info - * - * @generated from field: map attributes = 6; - */ - attributes: { [key: string]: string } = {}; - - /** - * oneof to choose between specific header types - * - * @generated from oneof livekit.proto.DataStream.Header.content_header - */ - contentHeader: { - /** - * @generated from field: livekit.proto.DataStream.TextHeader text_header = 7; - */ - value: DataStream_TextHeader; - case: "textHeader"; - } | { - /** - * @generated from field: livekit.proto.DataStream.ByteHeader byte_header = 8; - */ - value: DataStream_ByteHeader; - case: "byteHeader"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.DataStream.Header"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "stream_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, req: true }, - { no: 3, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 4, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 5, name: "total_length", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, - { no: 6, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - { no: 7, name: "text_header", kind: "message", T: DataStream_TextHeader, oneof: "content_header" }, - { no: 8, name: "byte_header", kind: "message", T: DataStream_ByteHeader, oneof: "content_header" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DataStream_Header { - return new DataStream_Header().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DataStream_Header { - return new DataStream_Header().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DataStream_Header { - return new DataStream_Header().fromJsonString(jsonString, options); - } - - static equals(a: DataStream_Header | PlainMessage | undefined, b: DataStream_Header | PlainMessage | undefined): boolean { - return proto2.util.equals(DataStream_Header, a, b); - } -} - -/** - * @generated from message livekit.proto.DataStream.Chunk - */ -export class DataStream_Chunk extends Message { - /** - * unique identifier for this data stream to map it to the correct header - * - * @generated from field: required string stream_id = 1; - */ - streamId?: string; - - /** - * @generated from field: required uint64 chunk_index = 2; - */ - chunkIndex?: bigint; - - /** - * content as binary (bytes) - * - * @generated from field: required bytes content = 3; - */ - content?: Uint8Array; - - /** - * a version indicating that this chunk_index has been retroactively modified and the original one needs to be replaced - * - * @generated from field: optional int32 version = 4; - */ - version?: number; - - /** - * optional, initialization vector for AES-GCM encryption - * - * @generated from field: optional bytes iv = 5; - */ - iv?: Uint8Array; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.DataStream.Chunk"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "stream_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "chunk_index", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 3, name: "content", kind: "scalar", T: 12 /* ScalarType.BYTES */, req: true }, - { no: 4, name: "version", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 5, name: "iv", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DataStream_Chunk { - return new DataStream_Chunk().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DataStream_Chunk { - return new DataStream_Chunk().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DataStream_Chunk { - return new DataStream_Chunk().fromJsonString(jsonString, options); - } - - static equals(a: DataStream_Chunk | PlainMessage | undefined, b: DataStream_Chunk | PlainMessage | undefined): boolean { - return proto2.util.equals(DataStream_Chunk, a, b); - } -} - -/** - * @generated from message livekit.proto.DataStream.Trailer - */ -export class DataStream_Trailer extends Message { - /** - * unique identifier for this data stream - * - * @generated from field: required string stream_id = 1; - */ - streamId?: string; - - /** - * reason why the stream was closed (could contain "error" / "interrupted" / empty for expected end) - * - * @generated from field: required string reason = 2; - */ - reason?: string; - - /** - * finalizing updates for the stream, can also include additional insights for errors or endTime for transcription - * - * @generated from field: map attributes = 3; - */ - attributes: { [key: string]: string } = {}; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.DataStream.Trailer"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "stream_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "reason", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DataStream_Trailer { - return new DataStream_Trailer().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DataStream_Trailer { - return new DataStream_Trailer().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DataStream_Trailer { - return new DataStream_Trailer().fromJsonString(jsonString, options); - } - - static equals(a: DataStream_Trailer | PlainMessage | undefined, b: DataStream_Trailer | PlainMessage | undefined): boolean { - return proto2.util.equals(DataStream_Trailer, a, b); - } -} - -/** - * @generated from message livekit.proto.DataStreamHeaderReceived - */ -export class DataStreamHeaderReceived extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required livekit.proto.DataStream.Header header = 2; - */ - header?: DataStream_Header; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.DataStreamHeaderReceived"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "header", kind: "message", T: DataStream_Header, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DataStreamHeaderReceived { - return new DataStreamHeaderReceived().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DataStreamHeaderReceived { - return new DataStreamHeaderReceived().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DataStreamHeaderReceived { - return new DataStreamHeaderReceived().fromJsonString(jsonString, options); - } - - static equals(a: DataStreamHeaderReceived | PlainMessage | undefined, b: DataStreamHeaderReceived | PlainMessage | undefined): boolean { - return proto2.util.equals(DataStreamHeaderReceived, a, b); - } -} - -/** - * @generated from message livekit.proto.DataStreamChunkReceived - */ -export class DataStreamChunkReceived extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required livekit.proto.DataStream.Chunk chunk = 2; - */ - chunk?: DataStream_Chunk; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.DataStreamChunkReceived"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "chunk", kind: "message", T: DataStream_Chunk, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DataStreamChunkReceived { - return new DataStreamChunkReceived().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DataStreamChunkReceived { - return new DataStreamChunkReceived().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DataStreamChunkReceived { - return new DataStreamChunkReceived().fromJsonString(jsonString, options); - } - - static equals(a: DataStreamChunkReceived | PlainMessage | undefined, b: DataStreamChunkReceived | PlainMessage | undefined): boolean { - return proto2.util.equals(DataStreamChunkReceived, a, b); - } -} - -/** - * @generated from message livekit.proto.DataStreamTrailerReceived - */ -export class DataStreamTrailerReceived extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: required livekit.proto.DataStream.Trailer trailer = 2; - */ - trailer?: DataStream_Trailer; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.DataStreamTrailerReceived"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "trailer", kind: "message", T: DataStream_Trailer, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DataStreamTrailerReceived { - return new DataStreamTrailerReceived().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DataStreamTrailerReceived { - return new DataStreamTrailerReceived().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DataStreamTrailerReceived { - return new DataStreamTrailerReceived().fromJsonString(jsonString, options); - } - - static equals(a: DataStreamTrailerReceived | PlainMessage | undefined, b: DataStreamTrailerReceived | PlainMessage | undefined): boolean { - return proto2.util.equals(DataStreamTrailerReceived, a, b); - } -} - -/** - * @generated from message livekit.proto.SendStreamHeaderRequest - */ -export class SendStreamHeaderRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required livekit.proto.DataStream.Header header = 2; - */ - header?: DataStream_Header; - - /** - * @generated from field: repeated string destination_identities = 3; - */ - destinationIdentities: string[] = []; - - /** - * @generated from field: required string sender_identity = 4; - */ - senderIdentity?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SendStreamHeaderRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "header", kind: "message", T: DataStream_Header, req: true }, - { no: 3, name: "destination_identities", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 4, name: "sender_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SendStreamHeaderRequest { - return new SendStreamHeaderRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SendStreamHeaderRequest { - return new SendStreamHeaderRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SendStreamHeaderRequest { - return new SendStreamHeaderRequest().fromJsonString(jsonString, options); - } - - static equals(a: SendStreamHeaderRequest | PlainMessage | undefined, b: SendStreamHeaderRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(SendStreamHeaderRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.SendStreamChunkRequest - */ -export class SendStreamChunkRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required livekit.proto.DataStream.Chunk chunk = 2; - */ - chunk?: DataStream_Chunk; - - /** - * @generated from field: repeated string destination_identities = 3; - */ - destinationIdentities: string[] = []; - - /** - * @generated from field: required string sender_identity = 4; - */ - senderIdentity?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SendStreamChunkRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "chunk", kind: "message", T: DataStream_Chunk, req: true }, - { no: 3, name: "destination_identities", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 4, name: "sender_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SendStreamChunkRequest { - return new SendStreamChunkRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SendStreamChunkRequest { - return new SendStreamChunkRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SendStreamChunkRequest { - return new SendStreamChunkRequest().fromJsonString(jsonString, options); - } - - static equals(a: SendStreamChunkRequest | PlainMessage | undefined, b: SendStreamChunkRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(SendStreamChunkRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.SendStreamTrailerRequest - */ -export class SendStreamTrailerRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required livekit.proto.DataStream.Trailer trailer = 2; - */ - trailer?: DataStream_Trailer; - - /** - * @generated from field: repeated string destination_identities = 3; - */ - destinationIdentities: string[] = []; - - /** - * @generated from field: required string sender_identity = 4; - */ - senderIdentity?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SendStreamTrailerRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "trailer", kind: "message", T: DataStream_Trailer, req: true }, - { no: 3, name: "destination_identities", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 4, name: "sender_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SendStreamTrailerRequest { - return new SendStreamTrailerRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SendStreamTrailerRequest { - return new SendStreamTrailerRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SendStreamTrailerRequest { - return new SendStreamTrailerRequest().fromJsonString(jsonString, options); - } - - static equals(a: SendStreamTrailerRequest | PlainMessage | undefined, b: SendStreamTrailerRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(SendStreamTrailerRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.SendStreamHeaderResponse - */ -export class SendStreamHeaderResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SendStreamHeaderResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SendStreamHeaderResponse { - return new SendStreamHeaderResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SendStreamHeaderResponse { - return new SendStreamHeaderResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SendStreamHeaderResponse { - return new SendStreamHeaderResponse().fromJsonString(jsonString, options); - } - - static equals(a: SendStreamHeaderResponse | PlainMessage | undefined, b: SendStreamHeaderResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(SendStreamHeaderResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.SendStreamChunkResponse - */ -export class SendStreamChunkResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SendStreamChunkResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SendStreamChunkResponse { - return new SendStreamChunkResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SendStreamChunkResponse { - return new SendStreamChunkResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SendStreamChunkResponse { - return new SendStreamChunkResponse().fromJsonString(jsonString, options); - } - - static equals(a: SendStreamChunkResponse | PlainMessage | undefined, b: SendStreamChunkResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(SendStreamChunkResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.SendStreamTrailerResponse - */ -export class SendStreamTrailerResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SendStreamTrailerResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SendStreamTrailerResponse { - return new SendStreamTrailerResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SendStreamTrailerResponse { - return new SendStreamTrailerResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SendStreamTrailerResponse { - return new SendStreamTrailerResponse().fromJsonString(jsonString, options); - } - - static equals(a: SendStreamTrailerResponse | PlainMessage | undefined, b: SendStreamTrailerResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(SendStreamTrailerResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.SendStreamHeaderCallback - */ -export class SendStreamHeaderCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from field: optional string error = 2; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SendStreamHeaderCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SendStreamHeaderCallback { - return new SendStreamHeaderCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SendStreamHeaderCallback { - return new SendStreamHeaderCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SendStreamHeaderCallback { - return new SendStreamHeaderCallback().fromJsonString(jsonString, options); - } - - static equals(a: SendStreamHeaderCallback | PlainMessage | undefined, b: SendStreamHeaderCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(SendStreamHeaderCallback, a, b); - } -} - -/** - * @generated from message livekit.proto.SendStreamChunkCallback - */ -export class SendStreamChunkCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from field: optional string error = 2; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SendStreamChunkCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SendStreamChunkCallback { - return new SendStreamChunkCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SendStreamChunkCallback { - return new SendStreamChunkCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SendStreamChunkCallback { - return new SendStreamChunkCallback().fromJsonString(jsonString, options); - } - - static equals(a: SendStreamChunkCallback | PlainMessage | undefined, b: SendStreamChunkCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(SendStreamChunkCallback, a, b); - } -} - -/** - * @generated from message livekit.proto.SendStreamTrailerCallback - */ -export class SendStreamTrailerCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from field: optional string error = 2; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SendStreamTrailerCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SendStreamTrailerCallback { - return new SendStreamTrailerCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SendStreamTrailerCallback { - return new SendStreamTrailerCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SendStreamTrailerCallback { - return new SendStreamTrailerCallback().fromJsonString(jsonString, options); - } - - static equals(a: SendStreamTrailerCallback | PlainMessage | undefined, b: SendStreamTrailerCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(SendStreamTrailerCallback, a, b); - } -} - -/** - * @generated from message livekit.proto.SetDataChannelBufferedAmountLowThresholdRequest - */ -export class SetDataChannelBufferedAmountLowThresholdRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required uint64 threshold = 2; - */ - threshold?: bigint; - - /** - * @generated from field: required livekit.proto.DataPacketKind kind = 3; - */ - kind?: DataPacketKind; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetDataChannelBufferedAmountLowThresholdRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "threshold", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 3, name: "kind", kind: "enum", T: proto2.getEnumType(DataPacketKind), req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetDataChannelBufferedAmountLowThresholdRequest { - return new SetDataChannelBufferedAmountLowThresholdRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetDataChannelBufferedAmountLowThresholdRequest { - return new SetDataChannelBufferedAmountLowThresholdRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetDataChannelBufferedAmountLowThresholdRequest { - return new SetDataChannelBufferedAmountLowThresholdRequest().fromJsonString(jsonString, options); - } - - static equals(a: SetDataChannelBufferedAmountLowThresholdRequest | PlainMessage | undefined, b: SetDataChannelBufferedAmountLowThresholdRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(SetDataChannelBufferedAmountLowThresholdRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.SetDataChannelBufferedAmountLowThresholdResponse - */ -export class SetDataChannelBufferedAmountLowThresholdResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetDataChannelBufferedAmountLowThresholdResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetDataChannelBufferedAmountLowThresholdResponse { - return new SetDataChannelBufferedAmountLowThresholdResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetDataChannelBufferedAmountLowThresholdResponse { - return new SetDataChannelBufferedAmountLowThresholdResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetDataChannelBufferedAmountLowThresholdResponse { - return new SetDataChannelBufferedAmountLowThresholdResponse().fromJsonString(jsonString, options); - } - - static equals(a: SetDataChannelBufferedAmountLowThresholdResponse | PlainMessage | undefined, b: SetDataChannelBufferedAmountLowThresholdResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(SetDataChannelBufferedAmountLowThresholdResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.DataChannelBufferedAmountLowThresholdChanged - */ -export class DataChannelBufferedAmountLowThresholdChanged extends Message { - /** - * @generated from field: required livekit.proto.DataPacketKind kind = 1; - */ - kind?: DataPacketKind; - - /** - * @generated from field: required uint64 threshold = 2; - */ - threshold?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.DataChannelBufferedAmountLowThresholdChanged"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "kind", kind: "enum", T: proto2.getEnumType(DataPacketKind), req: true }, - { no: 2, name: "threshold", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DataChannelBufferedAmountLowThresholdChanged { - return new DataChannelBufferedAmountLowThresholdChanged().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DataChannelBufferedAmountLowThresholdChanged { - return new DataChannelBufferedAmountLowThresholdChanged().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DataChannelBufferedAmountLowThresholdChanged { - return new DataChannelBufferedAmountLowThresholdChanged().fromJsonString(jsonString, options); - } - - static equals(a: DataChannelBufferedAmountLowThresholdChanged | PlainMessage | undefined, b: DataChannelBufferedAmountLowThresholdChanged | PlainMessage | undefined): boolean { - return proto2.util.equals(DataChannelBufferedAmountLowThresholdChanged, a, b); - } -} - -/** - * @generated from message livekit.proto.ByteStreamOpened - */ -export class ByteStreamOpened extends Message { - /** - * @generated from field: required livekit.proto.OwnedByteStreamReader reader = 1; - */ - reader?: OwnedByteStreamReader; - - /** - * @generated from field: required string participant_identity = 2; - */ - participantIdentity?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ByteStreamOpened"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "reader", kind: "message", T: OwnedByteStreamReader, req: true }, - { no: 2, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamOpened { - return new ByteStreamOpened().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamOpened { - return new ByteStreamOpened().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ByteStreamOpened { - return new ByteStreamOpened().fromJsonString(jsonString, options); - } - - static equals(a: ByteStreamOpened | PlainMessage | undefined, b: ByteStreamOpened | PlainMessage | undefined): boolean { - return proto2.util.equals(ByteStreamOpened, a, b); - } -} - -/** - * @generated from message livekit.proto.TextStreamOpened - */ -export class TextStreamOpened extends Message { - /** - * @generated from field: required livekit.proto.OwnedTextStreamReader reader = 1; - */ - reader?: OwnedTextStreamReader; - - /** - * @generated from field: required string participant_identity = 2; - */ - participantIdentity?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TextStreamOpened"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "reader", kind: "message", T: OwnedTextStreamReader, req: true }, - { no: 2, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamOpened { - return new TextStreamOpened().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamOpened { - return new TextStreamOpened().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextStreamOpened { - return new TextStreamOpened().fromJsonString(jsonString, options); - } - - static equals(a: TextStreamOpened | PlainMessage | undefined, b: TextStreamOpened | PlainMessage | undefined): boolean { - return proto2.util.equals(TextStreamOpened, a, b); - } -} - diff --git a/packages/livekit-rtc/src/proto/rpc_pb.ts b/packages/livekit-rtc/src/proto/rpc_pb.ts deleted file mode 100644 index 92277841..00000000 --- a/packages/livekit-rtc/src/proto/rpc_pb.ts +++ /dev/null @@ -1,539 +0,0 @@ -// Copyright 2025 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=.js" -// @generated from file rpc.proto (package livekit.proto, syntax proto2) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto2 } from "@bufbuild/protobuf"; - -/** - * @generated from message livekit.proto.RpcError - */ -export class RpcError extends Message { - /** - * @generated from field: required uint32 code = 1; - */ - code?: number; - - /** - * @generated from field: required string message = 2; - */ - message?: string; - - /** - * @generated from field: optional string data = 3; - */ - data?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RpcError"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "code", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "data", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RpcError { - return new RpcError().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RpcError { - return new RpcError().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RpcError { - return new RpcError().fromJsonString(jsonString, options); - } - - static equals(a: RpcError | PlainMessage | undefined, b: RpcError | PlainMessage | undefined): boolean { - return proto2.util.equals(RpcError, a, b); - } -} - -/** - * FFI Requests - * - * @generated from message livekit.proto.PerformRpcRequest - */ -export class PerformRpcRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required string destination_identity = 2; - */ - destinationIdentity?: string; - - /** - * @generated from field: required string method = 3; - */ - method?: string; - - /** - * @generated from field: required string payload = 4; - */ - payload?: string; - - /** - * @generated from field: optional uint32 response_timeout_ms = 5; - */ - responseTimeoutMs?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.PerformRpcRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "destination_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "method", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 4, name: "payload", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 5, name: "response_timeout_ms", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PerformRpcRequest { - return new PerformRpcRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PerformRpcRequest { - return new PerformRpcRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PerformRpcRequest { - return new PerformRpcRequest().fromJsonString(jsonString, options); - } - - static equals(a: PerformRpcRequest | PlainMessage | undefined, b: PerformRpcRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(PerformRpcRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.RegisterRpcMethodRequest - */ -export class RegisterRpcMethodRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required string method = 2; - */ - method?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RegisterRpcMethodRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "method", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RegisterRpcMethodRequest { - return new RegisterRpcMethodRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RegisterRpcMethodRequest { - return new RegisterRpcMethodRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RegisterRpcMethodRequest { - return new RegisterRpcMethodRequest().fromJsonString(jsonString, options); - } - - static equals(a: RegisterRpcMethodRequest | PlainMessage | undefined, b: RegisterRpcMethodRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(RegisterRpcMethodRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.UnregisterRpcMethodRequest - */ -export class UnregisterRpcMethodRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required string method = 2; - */ - method?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.UnregisterRpcMethodRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "method", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UnregisterRpcMethodRequest { - return new UnregisterRpcMethodRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UnregisterRpcMethodRequest { - return new UnregisterRpcMethodRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UnregisterRpcMethodRequest { - return new UnregisterRpcMethodRequest().fromJsonString(jsonString, options); - } - - static equals(a: UnregisterRpcMethodRequest | PlainMessage | undefined, b: UnregisterRpcMethodRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(UnregisterRpcMethodRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.RpcMethodInvocationResponseRequest - */ -export class RpcMethodInvocationResponseRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required uint64 invocation_id = 2; - */ - invocationId?: bigint; - - /** - * @generated from field: optional string payload = 3; - */ - payload?: string; - - /** - * @generated from field: optional livekit.proto.RpcError error = 4; - */ - error?: RpcError; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RpcMethodInvocationResponseRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "invocation_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 3, name: "payload", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "error", kind: "message", T: RpcError, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RpcMethodInvocationResponseRequest { - return new RpcMethodInvocationResponseRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RpcMethodInvocationResponseRequest { - return new RpcMethodInvocationResponseRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RpcMethodInvocationResponseRequest { - return new RpcMethodInvocationResponseRequest().fromJsonString(jsonString, options); - } - - static equals(a: RpcMethodInvocationResponseRequest | PlainMessage | undefined, b: RpcMethodInvocationResponseRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(RpcMethodInvocationResponseRequest, a, b); - } -} - -/** - * FFI Responses - * - * @generated from message livekit.proto.PerformRpcResponse - */ -export class PerformRpcResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.PerformRpcResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PerformRpcResponse { - return new PerformRpcResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PerformRpcResponse { - return new PerformRpcResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PerformRpcResponse { - return new PerformRpcResponse().fromJsonString(jsonString, options); - } - - static equals(a: PerformRpcResponse | PlainMessage | undefined, b: PerformRpcResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(PerformRpcResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.RegisterRpcMethodResponse - */ -export class RegisterRpcMethodResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RegisterRpcMethodResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RegisterRpcMethodResponse { - return new RegisterRpcMethodResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RegisterRpcMethodResponse { - return new RegisterRpcMethodResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RegisterRpcMethodResponse { - return new RegisterRpcMethodResponse().fromJsonString(jsonString, options); - } - - static equals(a: RegisterRpcMethodResponse | PlainMessage | undefined, b: RegisterRpcMethodResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(RegisterRpcMethodResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.UnregisterRpcMethodResponse - */ -export class UnregisterRpcMethodResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.UnregisterRpcMethodResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UnregisterRpcMethodResponse { - return new UnregisterRpcMethodResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UnregisterRpcMethodResponse { - return new UnregisterRpcMethodResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UnregisterRpcMethodResponse { - return new UnregisterRpcMethodResponse().fromJsonString(jsonString, options); - } - - static equals(a: UnregisterRpcMethodResponse | PlainMessage | undefined, b: UnregisterRpcMethodResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(UnregisterRpcMethodResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.RpcMethodInvocationResponseResponse - */ -export class RpcMethodInvocationResponseResponse extends Message { - /** - * @generated from field: optional string error = 1; - */ - error?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RpcMethodInvocationResponseResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RpcMethodInvocationResponseResponse { - return new RpcMethodInvocationResponseResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RpcMethodInvocationResponseResponse { - return new RpcMethodInvocationResponseResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RpcMethodInvocationResponseResponse { - return new RpcMethodInvocationResponseResponse().fromJsonString(jsonString, options); - } - - static equals(a: RpcMethodInvocationResponseResponse | PlainMessage | undefined, b: RpcMethodInvocationResponseResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(RpcMethodInvocationResponseResponse, a, b); - } -} - -/** - * FFI Callbacks - * - * @generated from message livekit.proto.PerformRpcCallback - */ -export class PerformRpcCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from field: optional string payload = 2; - */ - payload?: string; - - /** - * @generated from field: optional livekit.proto.RpcError error = 3; - */ - error?: RpcError; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.PerformRpcCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "payload", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "error", kind: "message", T: RpcError, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PerformRpcCallback { - return new PerformRpcCallback().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PerformRpcCallback { - return new PerformRpcCallback().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PerformRpcCallback { - return new PerformRpcCallback().fromJsonString(jsonString, options); - } - - static equals(a: PerformRpcCallback | PlainMessage | undefined, b: PerformRpcCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(PerformRpcCallback, a, b); - } -} - -/** - * FFI Events - * - * @generated from message livekit.proto.RpcMethodInvocationEvent - */ -export class RpcMethodInvocationEvent extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required uint64 invocation_id = 2; - */ - invocationId?: bigint; - - /** - * @generated from field: required string method = 3; - */ - method?: string; - - /** - * @generated from field: required string request_id = 4; - */ - requestId?: string; - - /** - * @generated from field: required string caller_identity = 5; - */ - callerIdentity?: string; - - /** - * @generated from field: required string payload = 6; - */ - payload?: string; - - /** - * @generated from field: required uint32 response_timeout_ms = 7; - */ - responseTimeoutMs?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RpcMethodInvocationEvent"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "invocation_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 3, name: "method", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 4, name: "request_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 5, name: "caller_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 6, name: "payload", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 7, name: "response_timeout_ms", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RpcMethodInvocationEvent { - return new RpcMethodInvocationEvent().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RpcMethodInvocationEvent { - return new RpcMethodInvocationEvent().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RpcMethodInvocationEvent { - return new RpcMethodInvocationEvent().fromJsonString(jsonString, options); - } - - static equals(a: RpcMethodInvocationEvent | PlainMessage | undefined, b: RpcMethodInvocationEvent | PlainMessage | undefined): boolean { - return proto2.util.equals(RpcMethodInvocationEvent, a, b); - } -} - diff --git a/packages/livekit-rtc/src/proto/stats_pb.ts b/packages/livekit-rtc/src/proto/stats_pb.ts deleted file mode 100644 index 3315e83b..00000000 --- a/packages/livekit-rtc/src/proto/stats_pb.ts +++ /dev/null @@ -1,3050 +0,0 @@ -// Copyright 2025 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=.js" -// @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, proto2 } 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: proto2.getEnumType(DataChannelState) -proto2.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: proto2.getEnumType(QualityLimitationReason) -proto2.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 - */ -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: proto2.getEnumType(IceRole) -proto2.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: proto2.getEnumType(DtlsTransportState) -proto2.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: proto2.getEnumType(IceTransportState) -proto2.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: proto2.getEnumType(DtlsRole) -proto2.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: proto2.getEnumType(IceCandidatePairState) -proto2.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: proto2.getEnumType(IceCandidateType) -proto2.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: proto2.getEnumType(IceServerTransportProtocol) -proto2.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: proto2.getEnumType(IceTcpCandidateType) -proto2.util.setEnumType(IceTcpCandidateType, "livekit.proto.IceTcpCandidateType", [ - { no: 0, name: "CANDIDATE_ACTIVE" }, - { no: 1, name: "CANDIDATE_PASSIVE" }, - { no: 2, name: "CANDIDATE_SO" }, -]); - -/** - * @generated from message livekit.proto.RtcStats - */ -export class RtcStats extends Message { - /** - * @generated from oneof livekit.proto.RtcStats.stats - */ - stats: { - /** - * @generated from field: livekit.proto.RtcStats.Codec codec = 3; - */ - value: RtcStats_Codec; - case: "codec"; - } | { - /** - * @generated from field: livekit.proto.RtcStats.InboundRtp inbound_rtp = 4; - */ - value: RtcStats_InboundRtp; - case: "inboundRtp"; - } | { - /** - * @generated from field: livekit.proto.RtcStats.OutboundRtp outbound_rtp = 5; - */ - value: RtcStats_OutboundRtp; - case: "outboundRtp"; - } | { - /** - * @generated from field: livekit.proto.RtcStats.RemoteInboundRtp remote_inbound_rtp = 6; - */ - value: RtcStats_RemoteInboundRtp; - case: "remoteInboundRtp"; - } | { - /** - * @generated from field: livekit.proto.RtcStats.RemoteOutboundRtp remote_outbound_rtp = 7; - */ - value: RtcStats_RemoteOutboundRtp; - case: "remoteOutboundRtp"; - } | { - /** - * @generated from field: livekit.proto.RtcStats.MediaSource media_source = 8; - */ - value: RtcStats_MediaSource; - case: "mediaSource"; - } | { - /** - * @generated from field: livekit.proto.RtcStats.MediaPlayout media_playout = 9; - */ - value: RtcStats_MediaPlayout; - case: "mediaPlayout"; - } | { - /** - * @generated from field: livekit.proto.RtcStats.PeerConnection peer_connection = 10; - */ - value: RtcStats_PeerConnection; - case: "peerConnection"; - } | { - /** - * @generated from field: livekit.proto.RtcStats.DataChannel data_channel = 11; - */ - value: RtcStats_DataChannel; - case: "dataChannel"; - } | { - /** - * @generated from field: livekit.proto.RtcStats.Transport transport = 12; - */ - value: RtcStats_Transport; - case: "transport"; - } | { - /** - * @generated from field: livekit.proto.RtcStats.CandidatePair candidate_pair = 13; - */ - value: RtcStats_CandidatePair; - case: "candidatePair"; - } | { - /** - * @generated from field: livekit.proto.RtcStats.LocalCandidate local_candidate = 14; - */ - value: RtcStats_LocalCandidate; - case: "localCandidate"; - } | { - /** - * @generated from field: livekit.proto.RtcStats.RemoteCandidate remote_candidate = 15; - */ - value: RtcStats_RemoteCandidate; - case: "remoteCandidate"; - } | { - /** - * @generated from field: livekit.proto.RtcStats.Certificate certificate = 16; - */ - value: RtcStats_Certificate; - case: "certificate"; - } | { - /** - * @generated from field: livekit.proto.RtcStats.Stream stream = 17; - */ - value: RtcStats_Stream; - case: "stream"; - } | { - /** - * @generated from field: livekit.proto.RtcStats.Track track = 18; - */ - value: RtcStats_Track; - case: "track"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtcStats"; - static readonly fields: FieldList = proto2.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: "stream", kind: "message", T: RtcStats_Stream, oneof: "stats" }, - { no: 18, 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 proto2.util.equals(RtcStats, a, b); - } -} - -/** - * @generated from message livekit.proto.RtcStats.Codec - */ -export class RtcStats_Codec extends Message { - /** - * @generated from field: required livekit.proto.RtcStatsData rtc = 1; - */ - rtc?: RtcStatsData; - - /** - * @generated from field: required livekit.proto.CodecStats codec = 2; - */ - codec?: CodecStats; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtcStats.Codec"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, - { no: 2, name: "codec", kind: "message", T: CodecStats, req: true }, - ]); - - 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 proto2.util.equals(RtcStats_Codec, a, b); - } -} - -/** - * @generated from message livekit.proto.RtcStats.InboundRtp - */ -export class RtcStats_InboundRtp extends Message { - /** - * @generated from field: required livekit.proto.RtcStatsData rtc = 1; - */ - rtc?: RtcStatsData; - - /** - * @generated from field: required livekit.proto.RtpStreamStats stream = 2; - */ - stream?: RtpStreamStats; - - /** - * @generated from field: required livekit.proto.ReceivedRtpStreamStats received = 3; - */ - received?: ReceivedRtpStreamStats; - - /** - * @generated from field: required livekit.proto.InboundRtpStreamStats inbound = 4; - */ - inbound?: InboundRtpStreamStats; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtcStats.InboundRtp"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, - { no: 2, name: "stream", kind: "message", T: RtpStreamStats, req: true }, - { no: 3, name: "received", kind: "message", T: ReceivedRtpStreamStats, req: true }, - { no: 4, name: "inbound", kind: "message", T: InboundRtpStreamStats, req: true }, - ]); - - 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 proto2.util.equals(RtcStats_InboundRtp, a, b); - } -} - -/** - * @generated from message livekit.proto.RtcStats.OutboundRtp - */ -export class RtcStats_OutboundRtp extends Message { - /** - * @generated from field: required livekit.proto.RtcStatsData rtc = 1; - */ - rtc?: RtcStatsData; - - /** - * @generated from field: required livekit.proto.RtpStreamStats stream = 2; - */ - stream?: RtpStreamStats; - - /** - * @generated from field: required livekit.proto.SentRtpStreamStats sent = 3; - */ - sent?: SentRtpStreamStats; - - /** - * @generated from field: required livekit.proto.OutboundRtpStreamStats outbound = 4; - */ - outbound?: OutboundRtpStreamStats; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtcStats.OutboundRtp"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, - { no: 2, name: "stream", kind: "message", T: RtpStreamStats, req: true }, - { no: 3, name: "sent", kind: "message", T: SentRtpStreamStats, req: true }, - { no: 4, name: "outbound", kind: "message", T: OutboundRtpStreamStats, req: true }, - ]); - - 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 proto2.util.equals(RtcStats_OutboundRtp, a, b); - } -} - -/** - * @generated from message livekit.proto.RtcStats.RemoteInboundRtp - */ -export class RtcStats_RemoteInboundRtp extends Message { - /** - * @generated from field: required livekit.proto.RtcStatsData rtc = 1; - */ - rtc?: RtcStatsData; - - /** - * @generated from field: required livekit.proto.RtpStreamStats stream = 2; - */ - stream?: RtpStreamStats; - - /** - * @generated from field: required livekit.proto.ReceivedRtpStreamStats received = 3; - */ - received?: ReceivedRtpStreamStats; - - /** - * @generated from field: required livekit.proto.RemoteInboundRtpStreamStats remote_inbound = 4; - */ - remoteInbound?: RemoteInboundRtpStreamStats; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtcStats.RemoteInboundRtp"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, - { no: 2, name: "stream", kind: "message", T: RtpStreamStats, req: true }, - { no: 3, name: "received", kind: "message", T: ReceivedRtpStreamStats, req: true }, - { no: 4, name: "remote_inbound", kind: "message", T: RemoteInboundRtpStreamStats, req: true }, - ]); - - 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 proto2.util.equals(RtcStats_RemoteInboundRtp, a, b); - } -} - -/** - * @generated from message livekit.proto.RtcStats.RemoteOutboundRtp - */ -export class RtcStats_RemoteOutboundRtp extends Message { - /** - * @generated from field: required livekit.proto.RtcStatsData rtc = 1; - */ - rtc?: RtcStatsData; - - /** - * @generated from field: required livekit.proto.RtpStreamStats stream = 2; - */ - stream?: RtpStreamStats; - - /** - * @generated from field: required livekit.proto.SentRtpStreamStats sent = 3; - */ - sent?: SentRtpStreamStats; - - /** - * @generated from field: required livekit.proto.RemoteOutboundRtpStreamStats remote_outbound = 4; - */ - remoteOutbound?: RemoteOutboundRtpStreamStats; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtcStats.RemoteOutboundRtp"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, - { no: 2, name: "stream", kind: "message", T: RtpStreamStats, req: true }, - { no: 3, name: "sent", kind: "message", T: SentRtpStreamStats, req: true }, - { no: 4, name: "remote_outbound", kind: "message", T: RemoteOutboundRtpStreamStats, req: true }, - ]); - - 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 proto2.util.equals(RtcStats_RemoteOutboundRtp, a, b); - } -} - -/** - * @generated from message livekit.proto.RtcStats.MediaSource - */ -export class RtcStats_MediaSource extends Message { - /** - * @generated from field: required livekit.proto.RtcStatsData rtc = 1; - */ - rtc?: RtcStatsData; - - /** - * @generated from field: required livekit.proto.MediaSourceStats source = 2; - */ - source?: MediaSourceStats; - - /** - * @generated from field: required livekit.proto.AudioSourceStats audio = 3; - */ - audio?: AudioSourceStats; - - /** - * @generated from field: required livekit.proto.VideoSourceStats video = 4; - */ - video?: VideoSourceStats; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtcStats.MediaSource"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, - { no: 2, name: "source", kind: "message", T: MediaSourceStats, req: true }, - { no: 3, name: "audio", kind: "message", T: AudioSourceStats, req: true }, - { no: 4, name: "video", kind: "message", T: VideoSourceStats, req: true }, - ]); - - 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 proto2.util.equals(RtcStats_MediaSource, a, b); - } -} - -/** - * @generated from message livekit.proto.RtcStats.MediaPlayout - */ -export class RtcStats_MediaPlayout extends Message { - /** - * @generated from field: required livekit.proto.RtcStatsData rtc = 1; - */ - rtc?: RtcStatsData; - - /** - * @generated from field: required livekit.proto.AudioPlayoutStats audio_playout = 2; - */ - audioPlayout?: AudioPlayoutStats; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtcStats.MediaPlayout"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, - { no: 2, name: "audio_playout", kind: "message", T: AudioPlayoutStats, req: true }, - ]); - - 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 proto2.util.equals(RtcStats_MediaPlayout, a, b); - } -} - -/** - * @generated from message livekit.proto.RtcStats.PeerConnection - */ -export class RtcStats_PeerConnection extends Message { - /** - * @generated from field: required livekit.proto.RtcStatsData rtc = 1; - */ - rtc?: RtcStatsData; - - /** - * @generated from field: required livekit.proto.PeerConnectionStats pc = 2; - */ - pc?: PeerConnectionStats; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtcStats.PeerConnection"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, - { no: 2, name: "pc", kind: "message", T: PeerConnectionStats, req: true }, - ]); - - 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 proto2.util.equals(RtcStats_PeerConnection, a, b); - } -} - -/** - * @generated from message livekit.proto.RtcStats.DataChannel - */ -export class RtcStats_DataChannel extends Message { - /** - * @generated from field: required livekit.proto.RtcStatsData rtc = 1; - */ - rtc?: RtcStatsData; - - /** - * @generated from field: required livekit.proto.DataChannelStats dc = 2; - */ - dc?: DataChannelStats; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtcStats.DataChannel"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, - { no: 2, name: "dc", kind: "message", T: DataChannelStats, req: true }, - ]); - - 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 proto2.util.equals(RtcStats_DataChannel, a, b); - } -} - -/** - * @generated from message livekit.proto.RtcStats.Transport - */ -export class RtcStats_Transport extends Message { - /** - * @generated from field: required livekit.proto.RtcStatsData rtc = 1; - */ - rtc?: RtcStatsData; - - /** - * @generated from field: required livekit.proto.TransportStats transport = 2; - */ - transport?: TransportStats; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtcStats.Transport"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, - { no: 2, name: "transport", kind: "message", T: TransportStats, req: true }, - ]); - - 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 proto2.util.equals(RtcStats_Transport, a, b); - } -} - -/** - * @generated from message livekit.proto.RtcStats.CandidatePair - */ -export class RtcStats_CandidatePair extends Message { - /** - * @generated from field: required livekit.proto.RtcStatsData rtc = 1; - */ - rtc?: RtcStatsData; - - /** - * @generated from field: required livekit.proto.CandidatePairStats candidate_pair = 2; - */ - candidatePair?: CandidatePairStats; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtcStats.CandidatePair"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, - { no: 2, name: "candidate_pair", kind: "message", T: CandidatePairStats, req: true }, - ]); - - 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 proto2.util.equals(RtcStats_CandidatePair, a, b); - } -} - -/** - * @generated from message livekit.proto.RtcStats.LocalCandidate - */ -export class RtcStats_LocalCandidate extends Message { - /** - * @generated from field: required livekit.proto.RtcStatsData rtc = 1; - */ - rtc?: RtcStatsData; - - /** - * @generated from field: required livekit.proto.IceCandidateStats candidate = 2; - */ - candidate?: IceCandidateStats; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtcStats.LocalCandidate"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, - { no: 2, name: "candidate", kind: "message", T: IceCandidateStats, req: true }, - ]); - - 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 proto2.util.equals(RtcStats_LocalCandidate, a, b); - } -} - -/** - * @generated from message livekit.proto.RtcStats.RemoteCandidate - */ -export class RtcStats_RemoteCandidate extends Message { - /** - * @generated from field: required livekit.proto.RtcStatsData rtc = 1; - */ - rtc?: RtcStatsData; - - /** - * @generated from field: required livekit.proto.IceCandidateStats candidate = 2; - */ - candidate?: IceCandidateStats; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtcStats.RemoteCandidate"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, - { no: 2, name: "candidate", kind: "message", T: IceCandidateStats, req: true }, - ]); - - 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 proto2.util.equals(RtcStats_RemoteCandidate, a, b); - } -} - -/** - * @generated from message livekit.proto.RtcStats.Certificate - */ -export class RtcStats_Certificate extends Message { - /** - * @generated from field: required livekit.proto.RtcStatsData rtc = 1; - */ - rtc?: RtcStatsData; - - /** - * @generated from field: required livekit.proto.CertificateStats certificate = 2; - */ - certificate?: CertificateStats; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtcStats.Certificate"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, - { no: 2, name: "certificate", kind: "message", T: CertificateStats, req: true }, - ]); - - 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 proto2.util.equals(RtcStats_Certificate, a, b); - } -} - -/** - * @generated from message livekit.proto.RtcStats.Stream - */ -export class RtcStats_Stream extends Message { - /** - * @generated from field: required livekit.proto.RtcStatsData rtc = 1; - */ - rtc?: RtcStatsData; - - /** - * @generated from field: required livekit.proto.StreamStats stream = 2; - */ - stream?: StreamStats; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtcStats.Stream"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, - { no: 2, name: "stream", kind: "message", T: StreamStats, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_Stream { - return new RtcStats_Stream().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_Stream { - return new RtcStats_Stream().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RtcStats_Stream { - return new RtcStats_Stream().fromJsonString(jsonString, options); - } - - static equals(a: RtcStats_Stream | PlainMessage | undefined, b: RtcStats_Stream | PlainMessage | undefined): boolean { - return proto2.util.equals(RtcStats_Stream, a, b); - } -} - -/** - * Deprecated - * - * @generated from message livekit.proto.RtcStats.Track - */ -export class RtcStats_Track extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtcStats.Track"; - static readonly fields: FieldList = proto2.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); - } - - 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 proto2.util.equals(RtcStats_Track, a, b); - } -} - -/** - * @generated from message livekit.proto.RtcStatsData - */ -export class RtcStatsData extends Message { - /** - * @generated from field: required string id = 1; - */ - id?: string; - - /** - * @generated from field: required int64 timestamp = 2; - */ - timestamp?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtcStatsData"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, req: true }, - ]); - - 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 proto2.util.equals(RtcStatsData, a, b); - } -} - -/** - * @generated from message livekit.proto.CodecStats - */ -export class CodecStats extends Message { - /** - * @generated from field: required uint32 payload_type = 1; - */ - payloadType?: number; - - /** - * @generated from field: required string transport_id = 2; - */ - transportId?: string; - - /** - * @generated from field: required string mime_type = 3; - */ - mimeType?: string; - - /** - * @generated from field: required uint32 clock_rate = 4; - */ - clockRate?: number; - - /** - * @generated from field: required uint32 channels = 5; - */ - channels?: number; - - /** - * @generated from field: required string sdp_fmtp_line = 6; - */ - sdpFmtpLine?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.CodecStats"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "payload_type", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 2, name: "transport_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 4, name: "clock_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 5, name: "channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 6, name: "sdp_fmtp_line", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CodecStats { - return new CodecStats().fromBinary(bytes, options); - } - - 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 proto2.util.equals(CodecStats, a, b); - } -} - -/** - * @generated from message livekit.proto.RtpStreamStats - */ -export class RtpStreamStats extends Message { - /** - * @generated from field: required uint32 ssrc = 1; - */ - ssrc?: number; - - /** - * @generated from field: required string kind = 2; - */ - kind?: string; - - /** - * @generated from field: required string transport_id = 3; - */ - transportId?: string; - - /** - * @generated from field: required string codec_id = 4; - */ - codecId?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RtpStreamStats"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "ssrc", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "transport_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 4, name: "codec_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RtpStreamStats { - return new RtpStreamStats().fromBinary(bytes, options); - } - - 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 proto2.util.equals(RtpStreamStats, a, b); - } -} - -/** - * @generated from message livekit.proto.ReceivedRtpStreamStats - */ -export class ReceivedRtpStreamStats extends Message { - /** - * @generated from field: required uint64 packets_received = 1; - */ - packetsReceived?: bigint; - - /** - * @generated from field: required int64 packets_lost = 2; - */ - packetsLost?: bigint; - - /** - * @generated from field: required double jitter = 3; - */ - jitter?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ReceivedRtpStreamStats"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "packets_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "packets_lost", kind: "scalar", T: 3 /* ScalarType.INT64 */, req: true }, - { no: 3, name: "jitter", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - ]); - - 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 proto2.util.equals(ReceivedRtpStreamStats, a, b); - } -} - -/** - * @generated from message livekit.proto.InboundRtpStreamStats - */ -export class InboundRtpStreamStats extends Message { - /** - * @generated from field: required string track_identifier = 1; - */ - trackIdentifier?: string; - - /** - * @generated from field: required string mid = 2; - */ - mid?: string; - - /** - * @generated from field: required string remote_id = 3; - */ - remoteId?: string; - - /** - * @generated from field: required uint32 frames_decoded = 4; - */ - framesDecoded?: number; - - /** - * @generated from field: required uint32 key_frames_decoded = 5; - */ - keyFramesDecoded?: number; - - /** - * @generated from field: required uint32 frames_rendered = 6; - */ - framesRendered?: number; - - /** - * @generated from field: required uint32 frames_dropped = 7; - */ - framesDropped?: number; - - /** - * @generated from field: required uint32 frame_width = 8; - */ - frameWidth?: number; - - /** - * @generated from field: required uint32 frame_height = 9; - */ - frameHeight?: number; - - /** - * @generated from field: required double frames_per_second = 10; - */ - framesPerSecond?: number; - - /** - * @generated from field: required uint64 qp_sum = 11; - */ - qpSum?: bigint; - - /** - * @generated from field: required double total_decode_time = 12; - */ - totalDecodeTime?: number; - - /** - * @generated from field: required double total_inter_frame_delay = 13; - */ - totalInterFrameDelay?: number; - - /** - * @generated from field: required double total_squared_inter_frame_delay = 14; - */ - totalSquaredInterFrameDelay?: number; - - /** - * @generated from field: required uint32 pause_count = 15; - */ - pauseCount?: number; - - /** - * @generated from field: required double total_pause_duration = 16; - */ - totalPauseDuration?: number; - - /** - * @generated from field: required uint32 freeze_count = 17; - */ - freezeCount?: number; - - /** - * @generated from field: required double total_freeze_duration = 18; - */ - totalFreezeDuration?: number; - - /** - * @generated from field: required double last_packet_received_timestamp = 19; - */ - lastPacketReceivedTimestamp?: number; - - /** - * @generated from field: required uint64 header_bytes_received = 20; - */ - headerBytesReceived?: bigint; - - /** - * @generated from field: required uint64 packets_discarded = 21; - */ - packetsDiscarded?: bigint; - - /** - * @generated from field: required uint64 fec_bytes_received = 22; - */ - fecBytesReceived?: bigint; - - /** - * @generated from field: required uint64 fec_packets_received = 23; - */ - fecPacketsReceived?: bigint; - - /** - * @generated from field: required uint64 fec_packets_discarded = 24; - */ - fecPacketsDiscarded?: bigint; - - /** - * @generated from field: required uint64 bytes_received = 25; - */ - bytesReceived?: bigint; - - /** - * @generated from field: required uint32 nack_count = 26; - */ - nackCount?: number; - - /** - * @generated from field: required uint32 fir_count = 27; - */ - firCount?: number; - - /** - * @generated from field: required uint32 pli_count = 28; - */ - pliCount?: number; - - /** - * @generated from field: required double total_processing_delay = 29; - */ - totalProcessingDelay?: number; - - /** - * @generated from field: required double estimated_playout_timestamp = 30; - */ - estimatedPlayoutTimestamp?: number; - - /** - * @generated from field: required double jitter_buffer_delay = 31; - */ - jitterBufferDelay?: number; - - /** - * @generated from field: required double jitter_buffer_target_delay = 32; - */ - jitterBufferTargetDelay?: number; - - /** - * @generated from field: required uint64 jitter_buffer_emitted_count = 33; - */ - jitterBufferEmittedCount?: bigint; - - /** - * @generated from field: required double jitter_buffer_minimum_delay = 34; - */ - jitterBufferMinimumDelay?: number; - - /** - * @generated from field: required uint64 total_samples_received = 35; - */ - totalSamplesReceived?: bigint; - - /** - * @generated from field: required uint64 concealed_samples = 36; - */ - concealedSamples?: bigint; - - /** - * @generated from field: required uint64 silent_concealed_samples = 37; - */ - silentConcealedSamples?: bigint; - - /** - * @generated from field: required uint64 concealment_events = 38; - */ - concealmentEvents?: bigint; - - /** - * @generated from field: required uint64 inserted_samples_for_deceleration = 39; - */ - insertedSamplesForDeceleration?: bigint; - - /** - * @generated from field: required uint64 removed_samples_for_acceleration = 40; - */ - removedSamplesForAcceleration?: bigint; - - /** - * @generated from field: required double audio_level = 41; - */ - audioLevel?: number; - - /** - * @generated from field: required double total_audio_energy = 42; - */ - totalAudioEnergy?: number; - - /** - * @generated from field: required double total_samples_duration = 43; - */ - totalSamplesDuration?: number; - - /** - * @generated from field: required uint64 frames_received = 44; - */ - framesReceived?: bigint; - - /** - * @generated from field: required string decoder_implementation = 45; - */ - decoderImplementation?: string; - - /** - * @generated from field: required string playout_id = 46; - */ - playoutId?: string; - - /** - * @generated from field: required bool power_efficient_decoder = 47; - */ - powerEfficientDecoder?: boolean; - - /** - * @generated from field: required uint64 frames_assembled_from_multiple_packets = 48; - */ - framesAssembledFromMultiplePackets?: bigint; - - /** - * @generated from field: required double total_assembly_time = 49; - */ - totalAssemblyTime?: number; - - /** - * @generated from field: required uint64 retransmitted_packets_received = 50; - */ - retransmittedPacketsReceived?: bigint; - - /** - * @generated from field: required uint64 retransmitted_bytes_received = 51; - */ - retransmittedBytesReceived?: bigint; - - /** - * @generated from field: required uint32 rtx_ssrc = 52; - */ - rtxSsrc?: number; - - /** - * @generated from field: required uint32 fec_ssrc = 53; - */ - fecSsrc?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.InboundRtpStreamStats"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "track_identifier", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "mid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "remote_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 4, name: "frames_decoded", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 5, name: "key_frames_decoded", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 6, name: "frames_rendered", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 7, name: "frames_dropped", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 8, name: "frame_width", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 9, name: "frame_height", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 10, name: "frames_per_second", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 11, name: "qp_sum", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 12, name: "total_decode_time", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 13, name: "total_inter_frame_delay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 14, name: "total_squared_inter_frame_delay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 15, name: "pause_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 16, name: "total_pause_duration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 17, name: "freeze_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 18, name: "total_freeze_duration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 19, name: "last_packet_received_timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 20, name: "header_bytes_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 21, name: "packets_discarded", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 22, name: "fec_bytes_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 23, name: "fec_packets_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 24, name: "fec_packets_discarded", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 25, name: "bytes_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 26, name: "nack_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 27, name: "fir_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 28, name: "pli_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 29, name: "total_processing_delay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 30, name: "estimated_playout_timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 31, name: "jitter_buffer_delay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 32, name: "jitter_buffer_target_delay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 33, name: "jitter_buffer_emitted_count", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 34, name: "jitter_buffer_minimum_delay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 35, name: "total_samples_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 36, name: "concealed_samples", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 37, name: "silent_concealed_samples", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 38, name: "concealment_events", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 39, name: "inserted_samples_for_deceleration", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 40, name: "removed_samples_for_acceleration", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 41, name: "audio_level", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 42, name: "total_audio_energy", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 43, name: "total_samples_duration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 44, name: "frames_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 45, name: "decoder_implementation", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 46, name: "playout_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 47, name: "power_efficient_decoder", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 48, name: "frames_assembled_from_multiple_packets", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 49, name: "total_assembly_time", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 50, name: "retransmitted_packets_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 51, name: "retransmitted_bytes_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 52, name: "rtx_ssrc", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 53, name: "fec_ssrc", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - ]); - - 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 proto2.util.equals(InboundRtpStreamStats, a, b); - } -} - -/** - * @generated from message livekit.proto.SentRtpStreamStats - */ -export class SentRtpStreamStats extends Message { - /** - * @generated from field: required uint64 packets_sent = 1; - */ - packetsSent?: bigint; - - /** - * @generated from field: required uint64 bytes_sent = 2; - */ - bytesSent?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SentRtpStreamStats"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "packets_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "bytes_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SentRtpStreamStats { - return new SentRtpStreamStats().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SentRtpStreamStats { - return new SentRtpStreamStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SentRtpStreamStats { - return new SentRtpStreamStats().fromJsonString(jsonString, options); - } - - static equals(a: SentRtpStreamStats | PlainMessage | undefined, b: SentRtpStreamStats | PlainMessage | undefined): boolean { - return proto2.util.equals(SentRtpStreamStats, a, b); - } -} - -/** - * @generated from message livekit.proto.OutboundRtpStreamStats - */ -export class OutboundRtpStreamStats extends Message { - /** - * @generated from field: required string mid = 1; - */ - mid?: string; - - /** - * @generated from field: required string media_source_id = 2; - */ - mediaSourceId?: string; - - /** - * @generated from field: required string remote_id = 3; - */ - remoteId?: string; - - /** - * @generated from field: required string rid = 4; - */ - rid?: string; - - /** - * @generated from field: required uint64 header_bytes_sent = 5; - */ - headerBytesSent?: bigint; - - /** - * @generated from field: required uint64 retransmitted_packets_sent = 6; - */ - retransmittedPacketsSent?: bigint; - - /** - * @generated from field: required uint64 retransmitted_bytes_sent = 7; - */ - retransmittedBytesSent?: bigint; - - /** - * @generated from field: required uint32 rtx_ssrc = 8; - */ - rtxSsrc?: number; - - /** - * @generated from field: required double target_bitrate = 9; - */ - targetBitrate?: number; - - /** - * @generated from field: required uint64 total_encoded_bytes_target = 10; - */ - totalEncodedBytesTarget?: bigint; - - /** - * @generated from field: required uint32 frame_width = 11; - */ - frameWidth?: number; - - /** - * @generated from field: required uint32 frame_height = 12; - */ - frameHeight?: number; - - /** - * @generated from field: required double frames_per_second = 13; - */ - framesPerSecond?: number; - - /** - * @generated from field: required uint32 frames_sent = 14; - */ - framesSent?: number; - - /** - * @generated from field: required uint32 huge_frames_sent = 15; - */ - hugeFramesSent?: number; - - /** - * @generated from field: required uint32 frames_encoded = 16; - */ - framesEncoded?: number; - - /** - * @generated from field: required uint32 key_frames_encoded = 17; - */ - keyFramesEncoded?: number; - - /** - * @generated from field: required uint64 qp_sum = 18; - */ - qpSum?: bigint; - - /** - * @generated from field: required double total_encode_time = 19; - */ - totalEncodeTime?: number; - - /** - * @generated from field: required double total_packet_send_delay = 20; - */ - totalPacketSendDelay?: number; - - /** - * @generated from field: required livekit.proto.QualityLimitationReason quality_limitation_reason = 21; - */ - qualityLimitationReason?: QualityLimitationReason; - - /** - * @generated from field: map quality_limitation_durations = 22; - */ - qualityLimitationDurations: { [key: string]: number } = {}; - - /** - * @generated from field: required uint32 quality_limitation_resolution_changes = 23; - */ - qualityLimitationResolutionChanges?: number; - - /** - * @generated from field: required uint32 nack_count = 24; - */ - nackCount?: number; - - /** - * @generated from field: required uint32 fir_count = 25; - */ - firCount?: number; - - /** - * @generated from field: required uint32 pli_count = 26; - */ - pliCount?: number; - - /** - * @generated from field: required string encoder_implementation = 27; - */ - encoderImplementation?: string; - - /** - * @generated from field: required bool power_efficient_encoder = 28; - */ - powerEfficientEncoder?: boolean; - - /** - * @generated from field: required bool active = 29; - */ - active?: boolean; - - /** - * @generated from field: required string scalability_mode = 30; - */ - scalabilityMode?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.OutboundRtpStreamStats"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "mid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "media_source_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "remote_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 4, name: "rid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 5, name: "header_bytes_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 6, name: "retransmitted_packets_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 7, name: "retransmitted_bytes_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 8, name: "rtx_ssrc", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 9, name: "target_bitrate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 10, name: "total_encoded_bytes_target", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 11, name: "frame_width", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 12, name: "frame_height", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 13, name: "frames_per_second", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 14, name: "frames_sent", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 15, name: "huge_frames_sent", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 16, name: "frames_encoded", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 17, name: "key_frames_encoded", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 18, name: "qp_sum", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 19, name: "total_encode_time", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 20, name: "total_packet_send_delay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 21, name: "quality_limitation_reason", kind: "enum", T: proto2.getEnumType(QualityLimitationReason), req: true }, - { 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 */, req: true }, - { no: 24, name: "nack_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 25, name: "fir_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 26, name: "pli_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 27, name: "encoder_implementation", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 28, name: "power_efficient_encoder", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 29, name: "active", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 30, name: "scalability_mode", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OutboundRtpStreamStats { - return new OutboundRtpStreamStats().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OutboundRtpStreamStats { - return new OutboundRtpStreamStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OutboundRtpStreamStats { - return new OutboundRtpStreamStats().fromJsonString(jsonString, options); - } - - static equals(a: OutboundRtpStreamStats | PlainMessage | undefined, b: OutboundRtpStreamStats | PlainMessage | undefined): boolean { - return proto2.util.equals(OutboundRtpStreamStats, a, b); - } -} - -/** - * @generated from message livekit.proto.RemoteInboundRtpStreamStats - */ -export class RemoteInboundRtpStreamStats extends Message { - /** - * @generated from field: required string local_id = 1; - */ - localId?: string; - - /** - * @generated from field: required double round_trip_time = 2; - */ - roundTripTime?: number; - - /** - * @generated from field: required double total_round_trip_time = 3; - */ - totalRoundTripTime?: number; - - /** - * @generated from field: required double fraction_lost = 4; - */ - fractionLost?: number; - - /** - * @generated from field: required uint64 round_trip_time_measurements = 5; - */ - roundTripTimeMeasurements?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RemoteInboundRtpStreamStats"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "round_trip_time", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 3, name: "total_round_trip_time", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 4, name: "fraction_lost", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 5, name: "round_trip_time_measurements", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RemoteInboundRtpStreamStats { - return new RemoteInboundRtpStreamStats().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RemoteInboundRtpStreamStats { - return new RemoteInboundRtpStreamStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RemoteInboundRtpStreamStats { - return new RemoteInboundRtpStreamStats().fromJsonString(jsonString, options); - } - - static equals(a: RemoteInboundRtpStreamStats | PlainMessage | undefined, b: RemoteInboundRtpStreamStats | PlainMessage | undefined): boolean { - return proto2.util.equals(RemoteInboundRtpStreamStats, a, b); - } -} - -/** - * @generated from message livekit.proto.RemoteOutboundRtpStreamStats - */ -export class RemoteOutboundRtpStreamStats extends Message { - /** - * @generated from field: required string local_id = 1; - */ - localId?: string; - - /** - * @generated from field: required double remote_timestamp = 2; - */ - remoteTimestamp?: number; - - /** - * @generated from field: required uint64 reports_sent = 3; - */ - reportsSent?: bigint; - - /** - * @generated from field: required double round_trip_time = 4; - */ - roundTripTime?: number; - - /** - * @generated from field: required double total_round_trip_time = 5; - */ - totalRoundTripTime?: number; - - /** - * @generated from field: required uint64 round_trip_time_measurements = 6; - */ - roundTripTimeMeasurements?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.RemoteOutboundRtpStreamStats"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "remote_timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 3, name: "reports_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 4, name: "round_trip_time", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 5, name: "total_round_trip_time", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 6, name: "round_trip_time_measurements", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RemoteOutboundRtpStreamStats { - return new RemoteOutboundRtpStreamStats().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RemoteOutboundRtpStreamStats { - return new RemoteOutboundRtpStreamStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RemoteOutboundRtpStreamStats { - return new RemoteOutboundRtpStreamStats().fromJsonString(jsonString, options); - } - - static equals(a: RemoteOutboundRtpStreamStats | PlainMessage | undefined, b: RemoteOutboundRtpStreamStats | PlainMessage | undefined): boolean { - return proto2.util.equals(RemoteOutboundRtpStreamStats, a, b); - } -} - -/** - * @generated from message livekit.proto.MediaSourceStats - */ -export class MediaSourceStats extends Message { - /** - * @generated from field: required string track_identifier = 1; - */ - trackIdentifier?: string; - - /** - * @generated from field: required string kind = 2; - */ - kind?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.MediaSourceStats"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "track_identifier", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MediaSourceStats { - return new MediaSourceStats().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MediaSourceStats { - return new MediaSourceStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MediaSourceStats { - return new MediaSourceStats().fromJsonString(jsonString, options); - } - - static equals(a: MediaSourceStats | PlainMessage | undefined, b: MediaSourceStats | PlainMessage | undefined): boolean { - return proto2.util.equals(MediaSourceStats, a, b); - } -} - -/** - * @generated from message livekit.proto.AudioSourceStats - */ -export class AudioSourceStats extends Message { - /** - * @generated from field: required double audio_level = 1; - */ - audioLevel?: number; - - /** - * @generated from field: required double total_audio_energy = 2; - */ - totalAudioEnergy?: number; - - /** - * @generated from field: required double total_samples_duration = 3; - */ - totalSamplesDuration?: number; - - /** - * @generated from field: required double echo_return_loss = 4; - */ - echoReturnLoss?: number; - - /** - * @generated from field: required double echo_return_loss_enhancement = 5; - */ - echoReturnLossEnhancement?: number; - - /** - * @generated from field: required double dropped_samples_duration = 6; - */ - droppedSamplesDuration?: number; - - /** - * @generated from field: required uint32 dropped_samples_events = 7; - */ - droppedSamplesEvents?: number; - - /** - * @generated from field: required double total_capture_delay = 8; - */ - totalCaptureDelay?: number; - - /** - * @generated from field: required uint64 total_samples_captured = 9; - */ - totalSamplesCaptured?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.AudioSourceStats"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "audio_level", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 2, name: "total_audio_energy", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 3, name: "total_samples_duration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 4, name: "echo_return_loss", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 5, name: "echo_return_loss_enhancement", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 6, name: "dropped_samples_duration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 7, name: "dropped_samples_events", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 8, name: "total_capture_delay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 9, name: "total_samples_captured", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - 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 proto2.util.equals(AudioSourceStats, a, b); - } -} - -/** - * @generated from message livekit.proto.VideoSourceStats - */ -export class VideoSourceStats extends Message { - /** - * @generated from field: required uint32 width = 1; - */ - width?: number; - - /** - * @generated from field: required uint32 height = 2; - */ - height?: number; - - /** - * @generated from field: required uint32 frames = 3; - */ - frames?: number; - - /** - * @generated from field: required double frames_per_second = 4; - */ - framesPerSecond?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.VideoSourceStats"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 2, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 3, name: "frames", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 4, name: "frames_per_second", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - ]); - - 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); - } - - 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 proto2.util.equals(VideoSourceStats, a, b); - } -} - -/** - * @generated from message livekit.proto.AudioPlayoutStats - */ -export class AudioPlayoutStats extends Message { - /** - * @generated from field: required string kind = 1; - */ - kind?: string; - - /** - * @generated from field: required double synthesized_samples_duration = 2; - */ - synthesizedSamplesDuration?: number; - - /** - * @generated from field: required uint32 synthesized_samples_events = 3; - */ - synthesizedSamplesEvents?: number; - - /** - * @generated from field: required double total_samples_duration = 4; - */ - totalSamplesDuration?: number; - - /** - * @generated from field: required double total_playout_delay = 5; - */ - totalPlayoutDelay?: number; - - /** - * @generated from field: required uint64 total_samples_count = 6; - */ - totalSamplesCount?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.AudioPlayoutStats"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "synthesized_samples_duration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 3, name: "synthesized_samples_events", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 4, name: "total_samples_duration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 5, name: "total_playout_delay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 6, name: "total_samples_count", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - 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 proto2.util.equals(AudioPlayoutStats, a, b); - } -} - -/** - * @generated from message livekit.proto.PeerConnectionStats - */ -export class PeerConnectionStats extends Message { - /** - * @generated from field: required uint32 data_channels_opened = 1; - */ - dataChannelsOpened?: number; - - /** - * @generated from field: required uint32 data_channels_closed = 2; - */ - dataChannelsClosed?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.PeerConnectionStats"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "data_channels_opened", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 2, name: "data_channels_closed", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PeerConnectionStats { - return new PeerConnectionStats().fromBinary(bytes, options); - } - - 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 proto2.util.equals(PeerConnectionStats, a, b); - } -} - -/** - * @generated from message livekit.proto.DataChannelStats - */ -export class DataChannelStats extends Message { - /** - * @generated from field: required string label = 1; - */ - label?: string; - - /** - * @generated from field: required string protocol = 2; - */ - protocol?: string; - - /** - * @generated from field: required int32 data_channel_identifier = 3; - */ - dataChannelIdentifier?: number; - - /** - * @generated from field: optional livekit.proto.DataChannelState state = 4; - */ - state?: DataChannelState; - - /** - * @generated from field: required uint32 messages_sent = 5; - */ - messagesSent?: number; - - /** - * @generated from field: required uint64 bytes_sent = 6; - */ - bytesSent?: bigint; - - /** - * @generated from field: required uint32 messages_received = 7; - */ - messagesReceived?: number; - - /** - * @generated from field: required uint64 bytes_received = 8; - */ - bytesReceived?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.DataChannelStats"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "protocol", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "data_channel_identifier", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true }, - { no: 4, name: "state", kind: "enum", T: proto2.getEnumType(DataChannelState), opt: true }, - { no: 5, name: "messages_sent", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 6, name: "bytes_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 7, name: "messages_received", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 8, name: "bytes_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DataChannelStats { - return new DataChannelStats().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DataChannelStats { - return new DataChannelStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DataChannelStats { - return new DataChannelStats().fromJsonString(jsonString, options); - } - - static equals(a: DataChannelStats | PlainMessage | undefined, b: DataChannelStats | PlainMessage | undefined): boolean { - return proto2.util.equals(DataChannelStats, a, b); - } -} - -/** - * @generated from message livekit.proto.TransportStats - */ -export class TransportStats extends Message { - /** - * @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: required uint64 bytes_received = 4; - */ - bytesReceived?: bigint; - - /** - * @generated from field: required livekit.proto.IceRole ice_role = 5; - */ - iceRole?: IceRole; - - /** - * @generated from field: required string ice_local_username_fragment = 6; - */ - iceLocalUsernameFragment?: string; - - /** - * @generated from field: optional livekit.proto.DtlsTransportState dtls_state = 7; - */ - dtlsState?: DtlsTransportState; - - /** - * @generated from field: optional livekit.proto.IceTransportState ice_state = 8; - */ - iceState?: IceTransportState; - - /** - * @generated from field: required string selected_candidate_pair_id = 9; - */ - selectedCandidatePairId?: string; - - /** - * @generated from field: required string local_certificate_id = 10; - */ - localCertificateId?: string; - - /** - * @generated from field: required string remote_certificate_id = 11; - */ - remoteCertificateId?: string; - - /** - * @generated from field: required string tls_version = 12; - */ - tlsVersion?: string; - - /** - * @generated from field: required string dtls_cipher = 13; - */ - dtlsCipher?: string; - - /** - * @generated from field: required livekit.proto.DtlsRole dtls_role = 14; - */ - dtlsRole?: DtlsRole; - - /** - * @generated from field: required string srtp_cipher = 15; - */ - srtpCipher?: string; - - /** - * @generated from field: required uint32 selected_candidate_pair_changes = 16; - */ - selectedCandidatePairChanges?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TransportStats"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "packets_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "packets_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 3, name: "bytes_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 4, name: "bytes_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 5, name: "ice_role", kind: "enum", T: proto2.getEnumType(IceRole), req: true }, - { no: 6, name: "ice_local_username_fragment", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 7, name: "dtls_state", kind: "enum", T: proto2.getEnumType(DtlsTransportState), opt: true }, - { no: 8, name: "ice_state", kind: "enum", T: proto2.getEnumType(IceTransportState), opt: true }, - { no: 9, name: "selected_candidate_pair_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 10, name: "local_certificate_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 11, name: "remote_certificate_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 12, name: "tls_version", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 13, name: "dtls_cipher", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 14, name: "dtls_role", kind: "enum", T: proto2.getEnumType(DtlsRole), req: true }, - { no: 15, name: "srtp_cipher", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 16, name: "selected_candidate_pair_changes", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - ]); - - 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); - } - - static equals(a: TransportStats | PlainMessage | undefined, b: TransportStats | PlainMessage | undefined): boolean { - return proto2.util.equals(TransportStats, a, b); - } -} - -/** - * @generated from message livekit.proto.CandidatePairStats - */ -export class CandidatePairStats extends Message { - /** - * @generated from field: required string transport_id = 1; - */ - transportId?: string; - - /** - * @generated from field: required string local_candidate_id = 2; - */ - localCandidateId?: string; - - /** - * @generated from field: required string remote_candidate_id = 3; - */ - remoteCandidateId?: string; - - /** - * @generated from field: optional livekit.proto.IceCandidatePairState state = 4; - */ - state?: IceCandidatePairState; - - /** - * @generated from field: required bool nominated = 5; - */ - nominated?: boolean; - - /** - * @generated from field: required uint64 packets_sent = 6; - */ - packetsSent?: bigint; - - /** - * @generated from field: required uint64 packets_received = 7; - */ - packetsReceived?: bigint; - - /** - * @generated from field: required uint64 bytes_sent = 8; - */ - bytesSent?: bigint; - - /** - * @generated from field: required uint64 bytes_received = 9; - */ - bytesReceived?: bigint; - - /** - * @generated from field: required double last_packet_sent_timestamp = 10; - */ - lastPacketSentTimestamp?: number; - - /** - * @generated from field: required double last_packet_received_timestamp = 11; - */ - lastPacketReceivedTimestamp?: number; - - /** - * @generated from field: required double total_round_trip_time = 12; - */ - totalRoundTripTime?: number; - - /** - * @generated from field: required double current_round_trip_time = 13; - */ - currentRoundTripTime?: number; - - /** - * @generated from field: required double available_outgoing_bitrate = 14; - */ - availableOutgoingBitrate?: number; - - /** - * @generated from field: required double available_incoming_bitrate = 15; - */ - availableIncomingBitrate?: number; - - /** - * @generated from field: required uint64 requests_received = 16; - */ - requestsReceived?: bigint; - - /** - * @generated from field: required uint64 requests_sent = 17; - */ - requestsSent?: bigint; - - /** - * @generated from field: required uint64 responses_received = 18; - */ - responsesReceived?: bigint; - - /** - * @generated from field: required uint64 responses_sent = 19; - */ - responsesSent?: bigint; - - /** - * @generated from field: required uint64 consent_requests_sent = 20; - */ - consentRequestsSent?: bigint; - - /** - * @generated from field: required uint32 packets_discarded_on_send = 21; - */ - packetsDiscardedOnSend?: number; - - /** - * @generated from field: required uint64 bytes_discarded_on_send = 22; - */ - bytesDiscardedOnSend?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.CandidatePairStats"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "transport_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "local_candidate_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "remote_candidate_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 4, name: "state", kind: "enum", T: proto2.getEnumType(IceCandidatePairState), opt: true }, - { no: 5, name: "nominated", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 6, name: "packets_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 7, name: "packets_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 8, name: "bytes_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 9, name: "bytes_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 10, name: "last_packet_sent_timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 11, name: "last_packet_received_timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 12, name: "total_round_trip_time", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 13, name: "current_round_trip_time", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 14, name: "available_outgoing_bitrate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 15, name: "available_incoming_bitrate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - { no: 16, name: "requests_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 17, name: "requests_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 18, name: "responses_received", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 19, name: "responses_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 20, name: "consent_requests_sent", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 21, name: "packets_discarded_on_send", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 22, name: "bytes_discarded_on_send", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - 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); - } - - static equals(a: CandidatePairStats | PlainMessage | undefined, b: CandidatePairStats | PlainMessage | undefined): boolean { - return proto2.util.equals(CandidatePairStats, a, b); - } -} - -/** - * @generated from message livekit.proto.IceCandidateStats - */ -export class IceCandidateStats extends Message { - /** - * @generated from field: required string transport_id = 1; - */ - transportId?: string; - - /** - * @generated from field: required string address = 2; - */ - address?: string; - - /** - * @generated from field: required int32 port = 3; - */ - port?: number; - - /** - * @generated from field: required string protocol = 4; - */ - protocol?: string; - - /** - * @generated from field: optional livekit.proto.IceCandidateType candidate_type = 5; - */ - candidateType?: IceCandidateType; - - /** - * @generated from field: required int32 priority = 6; - */ - priority?: number; - - /** - * @generated from field: required string url = 7; - */ - url?: string; - - /** - * @generated from field: optional livekit.proto.IceServerTransportProtocol relay_protocol = 8; - */ - relayProtocol?: IceServerTransportProtocol; - - /** - * @generated from field: required string foundation = 9; - */ - foundation?: string; - - /** - * @generated from field: required string related_address = 10; - */ - relatedAddress?: string; - - /** - * @generated from field: required int32 related_port = 11; - */ - relatedPort?: number; - - /** - * @generated from field: required string username_fragment = 12; - */ - usernameFragment?: string; - - /** - * @generated from field: optional livekit.proto.IceTcpCandidateType tcp_type = 13; - */ - tcpType?: IceTcpCandidateType; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.IceCandidateStats"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "transport_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "port", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true }, - { no: 4, name: "protocol", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 5, name: "candidate_type", kind: "enum", T: proto2.getEnumType(IceCandidateType), opt: true }, - { no: 6, name: "priority", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true }, - { no: 7, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 8, name: "relay_protocol", kind: "enum", T: proto2.getEnumType(IceServerTransportProtocol), opt: true }, - { no: 9, name: "foundation", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 10, name: "related_address", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 11, name: "related_port", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true }, - { no: 12, name: "username_fragment", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 13, name: "tcp_type", kind: "enum", T: proto2.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 proto2.util.equals(IceCandidateStats, a, b); - } -} - -/** - * @generated from message livekit.proto.CertificateStats - */ -export class CertificateStats extends Message { - /** - * @generated from field: required string fingerprint = 1; - */ - fingerprint?: string; - - /** - * @generated from field: required string fingerprint_algorithm = 2; - */ - fingerprintAlgorithm?: string; - - /** - * @generated from field: required string base64_certificate = 3; - */ - base64Certificate?: string; - - /** - * @generated from field: required string issuer_certificate_id = 4; - */ - issuerCertificateId?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.CertificateStats"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "fingerprint", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "fingerprint_algorithm", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "base64_certificate", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 4, name: "issuer_certificate_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CertificateStats { - return new CertificateStats().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CertificateStats { - return new CertificateStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CertificateStats { - return new CertificateStats().fromJsonString(jsonString, options); - } - - static equals(a: CertificateStats | PlainMessage | undefined, b: CertificateStats | PlainMessage | undefined): boolean { - return proto2.util.equals(CertificateStats, a, b); - } -} - -/** - * @generated from message livekit.proto.StreamStats - */ -export class StreamStats extends Message { - /** - * @generated from field: required string id = 1; - */ - id?: string; - - /** - * required int64 timestamp = 3; - * - * @generated from field: required string stream_identifier = 2; - */ - streamIdentifier?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.StreamStats"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "stream_identifier", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): StreamStats { - return new StreamStats().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): StreamStats { - return new StreamStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): StreamStats { - return new StreamStats().fromJsonString(jsonString, options); - } - - static equals(a: StreamStats | PlainMessage | undefined, b: StreamStats | PlainMessage | undefined): boolean { - return proto2.util.equals(StreamStats, a, b); - } -} - diff --git a/packages/livekit-rtc/src/proto/track_pb.ts b/packages/livekit-rtc/src/proto/track_pb.ts deleted file mode 100644 index a2f2267c..00000000 --- a/packages/livekit-rtc/src/proto/track_pb.ts +++ /dev/null @@ -1,1040 +0,0 @@ -// Copyright 2025 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=.js" -// @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, proto2 } from "@bufbuild/protobuf"; -import { RtcStats } from "./stats_pb.js"; -import { EncryptionType } from "./e2ee_pb.js"; -import { FfiOwnedHandle } from "./handle_pb.js"; - -/** - * @generated from enum livekit.proto.TrackKind - */ -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: proto2.getEnumType(TrackKind) -proto2.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: proto2.getEnumType(TrackSource) -proto2.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: proto2.getEnumType(StreamState) -proto2.util.setEnumType(StreamState, "livekit.proto.StreamState", [ - { no: 0, name: "STATE_UNKNOWN" }, - { no: 1, name: "STATE_ACTIVE" }, - { no: 2, name: "STATE_PAUSED" }, -]); - -/** - * @generated from enum livekit.proto.AudioTrackFeature - */ -export enum AudioTrackFeature { - /** - * @generated from enum value: TF_STEREO = 0; - */ - TF_STEREO = 0, - - /** - * @generated from enum value: TF_NO_DTX = 1; - */ - TF_NO_DTX = 1, - - /** - * @generated from enum value: TF_AUTO_GAIN_CONTROL = 2; - */ - TF_AUTO_GAIN_CONTROL = 2, - - /** - * @generated from enum value: TF_ECHO_CANCELLATION = 3; - */ - TF_ECHO_CANCELLATION = 3, - - /** - * @generated from enum value: TF_NOISE_SUPPRESSION = 4; - */ - TF_NOISE_SUPPRESSION = 4, - - /** - * @generated from enum value: TF_ENHANCED_NOISE_CANCELLATION = 5; - */ - TF_ENHANCED_NOISE_CANCELLATION = 5, - - /** - * client will buffer audio once available and send it to the server via bytes stream once connected - * - * @generated from enum value: TF_PRECONNECT_BUFFER = 6; - */ - TF_PRECONNECT_BUFFER = 6, -} -// Retrieve enum metadata with: proto2.getEnumType(AudioTrackFeature) -proto2.util.setEnumType(AudioTrackFeature, "livekit.proto.AudioTrackFeature", [ - { no: 0, name: "TF_STEREO" }, - { no: 1, name: "TF_NO_DTX" }, - { no: 2, name: "TF_AUTO_GAIN_CONTROL" }, - { no: 3, name: "TF_ECHO_CANCELLATION" }, - { no: 4, name: "TF_NOISE_SUPPRESSION" }, - { no: 5, name: "TF_ENHANCED_NOISE_CANCELLATION" }, - { no: 6, name: "TF_PRECONNECT_BUFFER" }, -]); - -/** - * Create a new VideoTrack from a VideoSource - * - * @generated from message livekit.proto.CreateVideoTrackRequest - */ -export class CreateVideoTrackRequest extends Message { - /** - * @generated from field: required string name = 1; - */ - name?: string; - - /** - * @generated from field: required uint64 source_handle = 2; - */ - sourceHandle?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.CreateVideoTrackRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "source_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - 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 proto2.util.equals(CreateVideoTrackRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.CreateVideoTrackResponse - */ -export class CreateVideoTrackResponse extends Message { - /** - * @generated from field: required livekit.proto.OwnedTrack track = 1; - */ - track?: OwnedTrack; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.CreateVideoTrackResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "track", kind: "message", T: OwnedTrack, req: true }, - ]); - - 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 proto2.util.equals(CreateVideoTrackResponse, a, b); - } -} - -/** - * Create a new AudioTrack from a AudioSource - * - * @generated from message livekit.proto.CreateAudioTrackRequest - */ -export class CreateAudioTrackRequest extends Message { - /** - * @generated from field: required string name = 1; - */ - name?: string; - - /** - * @generated from field: required uint64 source_handle = 2; - */ - sourceHandle?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.CreateAudioTrackRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "source_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - 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 proto2.util.equals(CreateAudioTrackRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.CreateAudioTrackResponse - */ -export class CreateAudioTrackResponse extends Message { - /** - * @generated from field: required livekit.proto.OwnedTrack track = 1; - */ - track?: OwnedTrack; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.CreateAudioTrackResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "track", kind: "message", T: OwnedTrack, req: true }, - ]); - - 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 proto2.util.equals(CreateAudioTrackResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.GetStatsRequest - */ -export class GetStatsRequest extends Message { - /** - * @generated from field: required uint64 track_handle = 1; - */ - trackHandle?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.GetStatsRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - 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 proto2.util.equals(GetStatsRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.GetStatsResponse - */ -export class GetStatsResponse extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.GetStatsResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetStatsResponse { - return new GetStatsResponse().fromBinary(bytes, options); - } - - 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 proto2.util.equals(GetStatsResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.GetStatsCallback - */ -export class GetStatsCallback extends Message { - /** - * @generated from field: required uint64 async_id = 1; - */ - asyncId?: bigint; - - /** - * @generated from field: optional string error = 2; - */ - error?: string; - - /** - * @generated from field: repeated livekit.proto.RtcStats stats = 3; - */ - stats: RtcStats[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.GetStatsCallback"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "error", kind: "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); - } - - 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 proto2.util.equals(GetStatsCallback, a, b); - } -} - -/** - * @generated from message livekit.proto.TrackEvent - */ -export class TrackEvent extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TrackEvent"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TrackEvent { - return new TrackEvent().fromBinary(bytes, options); - } - - 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 proto2.util.equals(TrackEvent, a, b); - } -} - -/** - * @generated from message livekit.proto.TrackPublicationInfo - */ -export class TrackPublicationInfo extends Message { - /** - * @generated from field: required string sid = 1; - */ - sid?: string; - - /** - * @generated from field: required string name = 2; - */ - name?: string; - - /** - * @generated from field: required livekit.proto.TrackKind kind = 3; - */ - kind?: TrackKind; - - /** - * @generated from field: required livekit.proto.TrackSource source = 4; - */ - source?: TrackSource; - - /** - * @generated from field: required bool simulcasted = 5; - */ - simulcasted?: boolean; - - /** - * @generated from field: required uint32 width = 6; - */ - width?: number; - - /** - * @generated from field: required uint32 height = 7; - */ - height?: number; - - /** - * @generated from field: required string mime_type = 8; - */ - mimeType?: string; - - /** - * @generated from field: required bool muted = 9; - */ - muted?: boolean; - - /** - * @generated from field: required bool remote = 10; - */ - remote?: boolean; - - /** - * @generated from field: required livekit.proto.EncryptionType encryption_type = 11; - */ - encryptionType?: EncryptionType; - - /** - * @generated from field: repeated livekit.proto.AudioTrackFeature audio_features = 12; - */ - audioFeatures: AudioTrackFeature[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TrackPublicationInfo"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "kind", kind: "enum", T: proto2.getEnumType(TrackKind), req: true }, - { no: 4, name: "source", kind: "enum", T: proto2.getEnumType(TrackSource), req: true }, - { no: 5, name: "simulcasted", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 6, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 7, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 8, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 9, name: "muted", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 10, name: "remote", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 11, name: "encryption_type", kind: "enum", T: proto2.getEnumType(EncryptionType), req: true }, - { no: 12, name: "audio_features", kind: "enum", T: proto2.getEnumType(AudioTrackFeature), repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TrackPublicationInfo { - return new TrackPublicationInfo().fromBinary(bytes, options); - } - - 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 proto2.util.equals(TrackPublicationInfo, a, b); - } -} - -/** - * @generated from message livekit.proto.OwnedTrackPublication - */ -export class OwnedTrackPublication extends Message { - /** - * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; - */ - handle?: FfiOwnedHandle; - - /** - * @generated from field: required livekit.proto.TrackPublicationInfo info = 2; - */ - info?: TrackPublicationInfo; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.OwnedTrackPublication"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, - { no: 2, name: "info", kind: "message", T: TrackPublicationInfo, req: true }, - ]); - - 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 proto2.util.equals(OwnedTrackPublication, a, b); - } -} - -/** - * @generated from message livekit.proto.TrackInfo - */ -export class TrackInfo extends Message { - /** - * @generated from field: required string sid = 1; - */ - sid?: string; - - /** - * @generated from field: required string name = 2; - */ - name?: string; - - /** - * @generated from field: required livekit.proto.TrackKind kind = 3; - */ - kind?: TrackKind; - - /** - * @generated from field: required livekit.proto.StreamState stream_state = 4; - */ - streamState?: StreamState; - - /** - * @generated from field: required bool muted = 5; - */ - muted?: boolean; - - /** - * @generated from field: required bool remote = 6; - */ - remote?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.TrackInfo"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 3, name: "kind", kind: "enum", T: proto2.getEnumType(TrackKind), req: true }, - { no: 4, name: "stream_state", kind: "enum", T: proto2.getEnumType(StreamState), req: true }, - { no: 5, name: "muted", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 6, name: "remote", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TrackInfo { - return new TrackInfo().fromBinary(bytes, options); - } - - 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 proto2.util.equals(TrackInfo, a, b); - } -} - -/** - * @generated from message livekit.proto.OwnedTrack - */ -export class OwnedTrack extends Message { - /** - * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; - */ - handle?: FfiOwnedHandle; - - /** - * @generated from field: required livekit.proto.TrackInfo info = 2; - */ - info?: TrackInfo; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.OwnedTrack"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, - { no: 2, name: "info", kind: "message", T: TrackInfo, req: true }, - ]); - - 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 proto2.util.equals(OwnedTrack, a, b); - } -} - -/** - * Mute/UnMute a track - * - * @generated from message livekit.proto.LocalTrackMuteRequest - */ -export class LocalTrackMuteRequest extends Message { - /** - * @generated from field: required uint64 track_handle = 1; - */ - trackHandle?: bigint; - - /** - * @generated from field: required bool mute = 2; - */ - mute?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.LocalTrackMuteRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "mute", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): LocalTrackMuteRequest { - return new LocalTrackMuteRequest().fromBinary(bytes, options); - } - - 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 proto2.util.equals(LocalTrackMuteRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.LocalTrackMuteResponse - */ -export class LocalTrackMuteResponse extends Message { - /** - * @generated from field: required bool muted = 1; - */ - muted?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.LocalTrackMuteResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "muted", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): LocalTrackMuteResponse { - return new LocalTrackMuteResponse().fromBinary(bytes, options); - } - - 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 proto2.util.equals(LocalTrackMuteResponse, a, b); - } -} - -/** - * Enable/Disable a remote track - * - * @generated from message livekit.proto.EnableRemoteTrackRequest - */ -export class EnableRemoteTrackRequest extends Message { - /** - * @generated from field: required uint64 track_handle = 1; - */ - trackHandle?: bigint; - - /** - * @generated from field: required bool enabled = 2; - */ - enabled?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.EnableRemoteTrackRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): EnableRemoteTrackRequest { - return new EnableRemoteTrackRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): EnableRemoteTrackRequest { - return new EnableRemoteTrackRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): EnableRemoteTrackRequest { - return new EnableRemoteTrackRequest().fromJsonString(jsonString, options); - } - - static equals(a: EnableRemoteTrackRequest | PlainMessage | undefined, b: EnableRemoteTrackRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(EnableRemoteTrackRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.EnableRemoteTrackResponse - */ -export class EnableRemoteTrackResponse extends Message { - /** - * @generated from field: required bool enabled = 1; - */ - enabled?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.EnableRemoteTrackResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): EnableRemoteTrackResponse { - return new EnableRemoteTrackResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): EnableRemoteTrackResponse { - return new EnableRemoteTrackResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): EnableRemoteTrackResponse { - return new EnableRemoteTrackResponse().fromJsonString(jsonString, options); - } - - static equals(a: EnableRemoteTrackResponse | PlainMessage | undefined, b: EnableRemoteTrackResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(EnableRemoteTrackResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.SetTrackSubscriptionPermissionsRequest - */ -export class SetTrackSubscriptionPermissionsRequest extends Message { - /** - * @generated from field: required uint64 local_participant_handle = 1; - */ - localParticipantHandle?: bigint; - - /** - * @generated from field: required bool all_participants_allowed = 2; - */ - allParticipantsAllowed?: boolean; - - /** - * @generated from field: repeated livekit.proto.ParticipantTrackPermission permissions = 3; - */ - permissions: ParticipantTrackPermission[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetTrackSubscriptionPermissionsRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "all_participants_allowed", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 3, name: "permissions", kind: "message", T: ParticipantTrackPermission, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetTrackSubscriptionPermissionsRequest { - return new SetTrackSubscriptionPermissionsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetTrackSubscriptionPermissionsRequest { - return new SetTrackSubscriptionPermissionsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetTrackSubscriptionPermissionsRequest { - return new SetTrackSubscriptionPermissionsRequest().fromJsonString(jsonString, options); - } - - static equals(a: SetTrackSubscriptionPermissionsRequest | PlainMessage | undefined, b: SetTrackSubscriptionPermissionsRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(SetTrackSubscriptionPermissionsRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.ParticipantTrackPermission - */ -export class ParticipantTrackPermission extends Message { - /** - * The participant identity this permission applies to. - * - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * Grant permission to all all tracks. Takes precedence over allowedTrackSids. - * - * @generated from field: optional bool allow_all = 2; - */ - allowAll?: boolean; - - /** - * List of track sids to grant permission to. - * - * @generated from field: repeated string allowed_track_sids = 3; - */ - allowedTrackSids: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ParticipantTrackPermission"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "allow_all", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 3, name: "allowed_track_sids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantTrackPermission { - return new ParticipantTrackPermission().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantTrackPermission { - return new ParticipantTrackPermission().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ParticipantTrackPermission { - return new ParticipantTrackPermission().fromJsonString(jsonString, options); - } - - static equals(a: ParticipantTrackPermission | PlainMessage | undefined, b: ParticipantTrackPermission | PlainMessage | undefined): boolean { - return proto2.util.equals(ParticipantTrackPermission, a, b); - } -} - -/** - * @generated from message livekit.proto.SetTrackSubscriptionPermissionsResponse - */ -export class SetTrackSubscriptionPermissionsResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetTrackSubscriptionPermissionsResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetTrackSubscriptionPermissionsResponse { - return new SetTrackSubscriptionPermissionsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetTrackSubscriptionPermissionsResponse { - return new SetTrackSubscriptionPermissionsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetTrackSubscriptionPermissionsResponse { - return new SetTrackSubscriptionPermissionsResponse().fromJsonString(jsonString, options); - } - - static equals(a: SetTrackSubscriptionPermissionsResponse | PlainMessage | undefined, b: SetTrackSubscriptionPermissionsResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(SetTrackSubscriptionPermissionsResponse, a, b); - } -} - diff --git a/packages/livekit-rtc/src/proto/track_publication_pb.ts b/packages/livekit-rtc/src/proto/track_publication_pb.ts deleted file mode 100644 index 327ebbc9..00000000 --- a/packages/livekit-rtc/src/proto/track_publication_pb.ts +++ /dev/null @@ -1,284 +0,0 @@ -// Copyright 2025 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=.js" -// @generated from file track_publication.proto (package livekit.proto, syntax proto2) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto2 } from "@bufbuild/protobuf"; - -/** - * Video quality for simulcasted tracks. - * - * @generated from enum livekit.proto.VideoQuality - */ -export enum VideoQuality { - /** - * @generated from enum value: VIDEO_QUALITY_LOW = 0; - */ - LOW = 0, - - /** - * @generated from enum value: VIDEO_QUALITY_MEDIUM = 1; - */ - MEDIUM = 1, - - /** - * @generated from enum value: VIDEO_QUALITY_HIGH = 2; - */ - HIGH = 2, -} -// Retrieve enum metadata with: proto2.getEnumType(VideoQuality) -proto2.util.setEnumType(VideoQuality, "livekit.proto.VideoQuality", [ - { no: 0, name: "VIDEO_QUALITY_LOW" }, - { no: 1, name: "VIDEO_QUALITY_MEDIUM" }, - { no: 2, name: "VIDEO_QUALITY_HIGH" }, -]); - -/** - * Enable/Disable a remote track publication - * - * @generated from message livekit.proto.EnableRemoteTrackPublicationRequest - */ -export class EnableRemoteTrackPublicationRequest extends Message { - /** - * @generated from field: required uint64 track_publication_handle = 1; - */ - trackPublicationHandle?: bigint; - - /** - * @generated from field: required bool enabled = 2; - */ - enabled?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.EnableRemoteTrackPublicationRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "track_publication_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): EnableRemoteTrackPublicationRequest { - return new EnableRemoteTrackPublicationRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): EnableRemoteTrackPublicationRequest { - return new EnableRemoteTrackPublicationRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): EnableRemoteTrackPublicationRequest { - return new EnableRemoteTrackPublicationRequest().fromJsonString(jsonString, options); - } - - static equals(a: EnableRemoteTrackPublicationRequest | PlainMessage | undefined, b: EnableRemoteTrackPublicationRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(EnableRemoteTrackPublicationRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.EnableRemoteTrackPublicationResponse - */ -export class EnableRemoteTrackPublicationResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.EnableRemoteTrackPublicationResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): EnableRemoteTrackPublicationResponse { - return new EnableRemoteTrackPublicationResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): EnableRemoteTrackPublicationResponse { - return new EnableRemoteTrackPublicationResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): EnableRemoteTrackPublicationResponse { - return new EnableRemoteTrackPublicationResponse().fromJsonString(jsonString, options); - } - - static equals(a: EnableRemoteTrackPublicationResponse | PlainMessage | undefined, b: EnableRemoteTrackPublicationResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(EnableRemoteTrackPublicationResponse, a, b); - } -} - -/** - * update a remote track publication dimension - * - * @generated from message livekit.proto.UpdateRemoteTrackPublicationDimensionRequest - */ -export class UpdateRemoteTrackPublicationDimensionRequest extends Message { - /** - * @generated from field: required uint64 track_publication_handle = 1; - */ - trackPublicationHandle?: bigint; - - /** - * @generated from field: required uint32 width = 2; - */ - width?: number; - - /** - * @generated from field: required uint32 height = 3; - */ - height?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.UpdateRemoteTrackPublicationDimensionRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "track_publication_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 3, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateRemoteTrackPublicationDimensionRequest { - return new UpdateRemoteTrackPublicationDimensionRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateRemoteTrackPublicationDimensionRequest { - return new UpdateRemoteTrackPublicationDimensionRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UpdateRemoteTrackPublicationDimensionRequest { - return new UpdateRemoteTrackPublicationDimensionRequest().fromJsonString(jsonString, options); - } - - static equals(a: UpdateRemoteTrackPublicationDimensionRequest | PlainMessage | undefined, b: UpdateRemoteTrackPublicationDimensionRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(UpdateRemoteTrackPublicationDimensionRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.UpdateRemoteTrackPublicationDimensionResponse - */ -export class UpdateRemoteTrackPublicationDimensionResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.UpdateRemoteTrackPublicationDimensionResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateRemoteTrackPublicationDimensionResponse { - return new UpdateRemoteTrackPublicationDimensionResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateRemoteTrackPublicationDimensionResponse { - return new UpdateRemoteTrackPublicationDimensionResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UpdateRemoteTrackPublicationDimensionResponse { - return new UpdateRemoteTrackPublicationDimensionResponse().fromJsonString(jsonString, options); - } - - static equals(a: UpdateRemoteTrackPublicationDimensionResponse | PlainMessage | undefined, b: UpdateRemoteTrackPublicationDimensionResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(UpdateRemoteTrackPublicationDimensionResponse, a, b); - } -} - -/** - * For tracks that support simulcasting, adjust subscribed quality. - * - * @generated from message livekit.proto.SetRemoteTrackPublicationQualityRequest - */ -export class SetRemoteTrackPublicationQualityRequest extends Message { - /** - * @generated from field: required uint64 track_publication_handle = 1; - */ - trackPublicationHandle?: bigint; - - /** - * @generated from field: required livekit.proto.VideoQuality quality = 2; - */ - quality?: VideoQuality; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetRemoteTrackPublicationQualityRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "track_publication_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "quality", kind: "enum", T: proto2.getEnumType(VideoQuality), req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetRemoteTrackPublicationQualityRequest { - return new SetRemoteTrackPublicationQualityRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetRemoteTrackPublicationQualityRequest { - return new SetRemoteTrackPublicationQualityRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetRemoteTrackPublicationQualityRequest { - return new SetRemoteTrackPublicationQualityRequest().fromJsonString(jsonString, options); - } - - static equals(a: SetRemoteTrackPublicationQualityRequest | PlainMessage | undefined, b: SetRemoteTrackPublicationQualityRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(SetRemoteTrackPublicationQualityRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.SetRemoteTrackPublicationQualityResponse - */ -export class SetRemoteTrackPublicationQualityResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.SetRemoteTrackPublicationQualityResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetRemoteTrackPublicationQualityResponse { - return new SetRemoteTrackPublicationQualityResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetRemoteTrackPublicationQualityResponse { - return new SetRemoteTrackPublicationQualityResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetRemoteTrackPublicationQualityResponse { - return new SetRemoteTrackPublicationQualityResponse().fromJsonString(jsonString, options); - } - - static equals(a: SetRemoteTrackPublicationQualityResponse | PlainMessage | undefined, b: SetRemoteTrackPublicationQualityResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(SetRemoteTrackPublicationQualityResponse, a, b); - } -} - diff --git a/packages/livekit-rtc/src/proto/video_frame_pb.ts b/packages/livekit-rtc/src/proto/video_frame_pb.ts deleted file mode 100644 index 87f433b3..00000000 --- a/packages/livekit-rtc/src/proto/video_frame_pb.ts +++ /dev/null @@ -1,1236 +0,0 @@ -// Copyright 2025 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=.js" -// @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, proto2 } from "@bufbuild/protobuf"; -import { TrackSource } from "./track_pb.js"; -import { FfiOwnedHandle } from "./handle_pb.js"; - -/** - * @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, - - /** - * @generated from enum value: H265 = 4; - */ - H265 = 4, -} -// Retrieve enum metadata with: proto2.getEnumType(VideoCodec) -proto2.util.setEnumType(VideoCodec, "livekit.proto.VideoCodec", [ - { no: 0, name: "VP8" }, - { no: 1, name: "H264" }, - { no: 2, name: "AV1" }, - { no: 3, name: "VP9" }, - { no: 4, name: "H265" }, -]); - -/** - * @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, -} -// Retrieve enum metadata with: proto2.getEnumType(VideoRotation) -proto2.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" }, -]); - -/** - * Values of this enum must not be changed - * It is used to serialize a rtc.VideoFrame on Python - * - * @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: proto2.getEnumType(VideoBufferType) -proto2.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: proto2.getEnumType(VideoStreamType) -proto2.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: proto2.getEnumType(VideoSourceType) -proto2.util.setEnumType(VideoSourceType, "livekit.proto.VideoSourceType", [ - { no: 0, name: "VIDEO_SOURCE_NATIVE" }, -]); - -/** - * Create a new VideoStream - * VideoStream is used to receive video frames from a track - * - * @generated from message livekit.proto.NewVideoStreamRequest - */ -export class NewVideoStreamRequest extends Message { - /** - * @generated from field: required uint64 track_handle = 1; - */ - trackHandle?: bigint; - - /** - * @generated from field: required livekit.proto.VideoStreamType type = 2; - */ - type?: VideoStreamType; - - /** - * Get the frame on a specific format - * - * @generated from field: optional livekit.proto.VideoBufferType format = 3; - */ - format?: VideoBufferType; - - /** - * if true, stride will be set to width/chroma_width - * - * @generated from field: optional bool normalize_stride = 4; - */ - normalizeStride?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.NewVideoStreamRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "type", kind: "enum", T: proto2.getEnumType(VideoStreamType), req: true }, - { no: 3, name: "format", kind: "enum", T: proto2.getEnumType(VideoBufferType), opt: true }, - { no: 4, name: "normalize_stride", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); - - 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 proto2.util.equals(NewVideoStreamRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.NewVideoStreamResponse - */ -export class NewVideoStreamResponse extends Message { - /** - * @generated from field: required livekit.proto.OwnedVideoStream stream = 1; - */ - stream?: OwnedVideoStream; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.NewVideoStreamResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "stream", kind: "message", T: OwnedVideoStream, req: true }, - ]); - - 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 proto2.util.equals(NewVideoStreamResponse, a, b); - } -} - -/** - * Request a video stream from a participant - * - * @generated from message livekit.proto.VideoStreamFromParticipantRequest - */ -export class VideoStreamFromParticipantRequest extends Message { - /** - * @generated from field: required uint64 participant_handle = 1; - */ - participantHandle?: bigint; - - /** - * @generated from field: required livekit.proto.VideoStreamType type = 2; - */ - type?: VideoStreamType; - - /** - * @generated from field: required livekit.proto.TrackSource track_source = 3; - */ - trackSource?: TrackSource; - - /** - * @generated from field: optional livekit.proto.VideoBufferType format = 4; - */ - format?: VideoBufferType; - - /** - * @generated from field: optional bool normalize_stride = 5; - */ - normalizeStride?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.VideoStreamFromParticipantRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "type", kind: "enum", T: proto2.getEnumType(VideoStreamType), req: true }, - { no: 3, name: "track_source", kind: "enum", T: proto2.getEnumType(TrackSource), req: true }, - { no: 4, name: "format", kind: "enum", T: proto2.getEnumType(VideoBufferType), opt: true }, - { no: 5, name: "normalize_stride", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); - - 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); - } - - 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 proto2.util.equals(VideoStreamFromParticipantRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.VideoStreamFromParticipantResponse - */ -export class VideoStreamFromParticipantResponse extends Message { - /** - * @generated from field: required livekit.proto.OwnedVideoStream stream = 1; - */ - stream?: OwnedVideoStream; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.VideoStreamFromParticipantResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "stream", kind: "message", T: OwnedVideoStream, req: true }, - ]); - - 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 proto2.util.equals(VideoStreamFromParticipantResponse, a, b); - } -} - -/** - * Create a new VideoSource - * VideoSource is used to send video frame to a track - * - * @generated from message livekit.proto.NewVideoSourceRequest - */ -export class NewVideoSourceRequest extends Message { - /** - * @generated from field: required livekit.proto.VideoSourceType type = 1; - */ - type?: VideoSourceType; - - /** - * Used to determine which encodings to use + simulcast layers - * Most of the time it corresponds to the source resolution - * - * @generated from field: required livekit.proto.VideoSourceResolution resolution = 2; - */ - resolution?: VideoSourceResolution; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.NewVideoSourceRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "type", kind: "enum", T: proto2.getEnumType(VideoSourceType), req: true }, - { no: 2, name: "resolution", kind: "message", T: VideoSourceResolution, req: true }, - ]); - - 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 proto2.util.equals(NewVideoSourceRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.NewVideoSourceResponse - */ -export class NewVideoSourceResponse extends Message { - /** - * @generated from field: required livekit.proto.OwnedVideoSource source = 1; - */ - source?: OwnedVideoSource; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.NewVideoSourceResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "source", kind: "message", T: OwnedVideoSource, req: true }, - ]); - - 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 proto2.util.equals(NewVideoSourceResponse, a, b); - } -} - -/** - * Push a frame to a VideoSource - * - * @generated from message livekit.proto.CaptureVideoFrameRequest - */ -export class CaptureVideoFrameRequest extends Message { - /** - * @generated from field: required uint64 source_handle = 1; - */ - sourceHandle?: bigint; - - /** - * @generated from field: required livekit.proto.VideoBufferInfo buffer = 2; - */ - buffer?: VideoBufferInfo; - - /** - * In microseconds - * - * @generated from field: required int64 timestamp_us = 3; - */ - timestampUs?: bigint; - - /** - * @generated from field: required livekit.proto.VideoRotation rotation = 4; - */ - rotation?: VideoRotation; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.CaptureVideoFrameRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "source_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "buffer", kind: "message", T: VideoBufferInfo, req: true }, - { no: 3, name: "timestamp_us", kind: "scalar", T: 3 /* ScalarType.INT64 */, req: true }, - { no: 4, name: "rotation", kind: "enum", T: proto2.getEnumType(VideoRotation), req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CaptureVideoFrameRequest { - return new CaptureVideoFrameRequest().fromBinary(bytes, options); - } - - 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 proto2.util.equals(CaptureVideoFrameRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.CaptureVideoFrameResponse - */ -export class CaptureVideoFrameResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.CaptureVideoFrameResponse"; - static readonly fields: FieldList = proto2.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 proto2.util.equals(CaptureVideoFrameResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.VideoConvertRequest - */ -export class VideoConvertRequest extends Message { - /** - * @generated from field: optional bool flip_y = 1; - */ - flipY?: boolean; - - /** - * @generated from field: required livekit.proto.VideoBufferInfo buffer = 2; - */ - buffer?: VideoBufferInfo; - - /** - * @generated from field: required livekit.proto.VideoBufferType dst_type = 3; - */ - dstType?: VideoBufferType; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.VideoConvertRequest"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "flip_y", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 2, name: "buffer", kind: "message", T: VideoBufferInfo, req: true }, - { no: 3, name: "dst_type", kind: "enum", T: proto2.getEnumType(VideoBufferType), req: true }, - ]); - - 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); - } - - 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 proto2.util.equals(VideoConvertRequest, a, b); - } -} - -/** - * @generated from message livekit.proto.VideoConvertResponse - */ -export class VideoConvertResponse extends Message { - /** - * @generated from oneof livekit.proto.VideoConvertResponse.message - */ - 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 } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.VideoConvertResponse"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "message" }, - { no: 2, name: "buffer", kind: "message", T: OwnedVideoBuffer, oneof: "message" }, - ]); - - 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 proto2.util.equals(VideoConvertResponse, a, b); - } -} - -/** - * @generated from message livekit.proto.VideoResolution - */ -export class VideoResolution extends Message { - /** - * @generated from field: required uint32 width = 1; - */ - width?: number; - - /** - * @generated from field: required uint32 height = 2; - */ - height?: number; - - /** - * @generated from field: required double frame_rate = 3; - */ - frameRate?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.VideoResolution"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 2, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 3, name: "frame_rate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, req: true }, - ]); - - 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 proto2.util.equals(VideoResolution, a, b); - } -} - -/** - * @generated from message livekit.proto.VideoBufferInfo - */ -export class VideoBufferInfo extends Message { - /** - * @generated from field: required livekit.proto.VideoBufferType type = 1; - */ - type?: VideoBufferType; - - /** - * @generated from field: required uint32 width = 2; - */ - width?: number; - - /** - * @generated from field: required uint32 height = 3; - */ - height?: number; - - /** - * @generated from field: required uint64 data_ptr = 4; - */ - dataPtr?: bigint; - - /** - * only for packed formats - * - * @generated from field: optional uint32 stride = 6; - */ - stride?: number; - - /** - * @generated from field: repeated livekit.proto.VideoBufferInfo.ComponentInfo components = 7; - */ - components: VideoBufferInfo_ComponentInfo[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.VideoBufferInfo"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "type", kind: "enum", T: proto2.getEnumType(VideoBufferType), req: true }, - { no: 2, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 3, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 4, name: "data_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 6, name: "stride", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, - { 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 proto2.util.equals(VideoBufferInfo, a, b); - } -} - -/** - * @generated from message livekit.proto.VideoBufferInfo.ComponentInfo - */ -export class VideoBufferInfo_ComponentInfo extends Message { - /** - * @generated from field: required uint64 data_ptr = 1; - */ - dataPtr?: bigint; - - /** - * @generated from field: required uint32 stride = 2; - */ - stride?: number; - - /** - * @generated from field: required uint32 size = 3; - */ - size?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.VideoBufferInfo.ComponentInfo"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "data_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { no: 2, name: "stride", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 3, name: "size", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VideoBufferInfo_ComponentInfo { - return new VideoBufferInfo_ComponentInfo().fromBinary(bytes, options); - } - - 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 proto2.util.equals(VideoBufferInfo_ComponentInfo, a, b); - } -} - -/** - * @generated from message livekit.proto.OwnedVideoBuffer - */ -export class OwnedVideoBuffer extends Message { - /** - * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; - */ - handle?: FfiOwnedHandle; - - /** - * @generated from field: required livekit.proto.VideoBufferInfo info = 2; - */ - info?: VideoBufferInfo; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.OwnedVideoBuffer"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, - { no: 2, name: "info", kind: "message", T: VideoBufferInfo, req: true }, - ]); - - 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 proto2.util.equals(OwnedVideoBuffer, a, b); - } -} - -/** - * @generated from message livekit.proto.VideoStreamInfo - */ -export class VideoStreamInfo extends Message { - /** - * @generated from field: required livekit.proto.VideoStreamType type = 1; - */ - type?: VideoStreamType; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.VideoStreamInfo"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "type", kind: "enum", T: proto2.getEnumType(VideoStreamType), req: true }, - ]); - - 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); - } - - static equals(a: VideoStreamInfo | PlainMessage | undefined, b: VideoStreamInfo | PlainMessage | undefined): boolean { - return proto2.util.equals(VideoStreamInfo, a, b); - } -} - -/** - * @generated from message livekit.proto.OwnedVideoStream - */ -export class OwnedVideoStream extends Message { - /** - * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; - */ - handle?: FfiOwnedHandle; - - /** - * @generated from field: required livekit.proto.VideoStreamInfo info = 2; - */ - info?: VideoStreamInfo; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.OwnedVideoStream"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, - { no: 2, name: "info", kind: "message", T: VideoStreamInfo, req: true }, - ]); - - 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 proto2.util.equals(OwnedVideoStream, a, b); - } -} - -/** - * @generated from message livekit.proto.VideoStreamEvent - */ -export class VideoStreamEvent extends Message { - /** - * @generated from field: required uint64 stream_handle = 1; - */ - streamHandle?: bigint; - - /** - * @generated from oneof livekit.proto.VideoStreamEvent.message - */ - message: { - /** - * @generated from field: livekit.proto.VideoFrameReceived frame_received = 2; - */ - value: VideoFrameReceived; - case: "frameReceived"; - } | { - /** - * @generated from field: livekit.proto.VideoStreamEOS eos = 3; - */ - value: VideoStreamEOS; - case: "eos"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.VideoStreamEvent"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "stream_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, - { 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 proto2.util.equals(VideoStreamEvent, a, b); - } -} - -/** - * @generated from message livekit.proto.VideoFrameReceived - */ -export class VideoFrameReceived extends Message { - /** - * @generated from field: required livekit.proto.OwnedVideoBuffer buffer = 1; - */ - buffer?: OwnedVideoBuffer; - - /** - * In microseconds - * - * @generated from field: required int64 timestamp_us = 2; - */ - timestampUs?: bigint; - - /** - * @generated from field: required livekit.proto.VideoRotation rotation = 3; - */ - rotation?: VideoRotation; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.VideoFrameReceived"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "buffer", kind: "message", T: OwnedVideoBuffer, req: true }, - { no: 2, name: "timestamp_us", kind: "scalar", T: 3 /* ScalarType.INT64 */, req: true }, - { no: 3, name: "rotation", kind: "enum", T: proto2.getEnumType(VideoRotation), req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VideoFrameReceived { - return new VideoFrameReceived().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): VideoFrameReceived { - return new VideoFrameReceived().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): VideoFrameReceived { - return new VideoFrameReceived().fromJsonString(jsonString, options); - } - - static equals(a: VideoFrameReceived | PlainMessage | undefined, b: VideoFrameReceived | PlainMessage | undefined): boolean { - return proto2.util.equals(VideoFrameReceived, a, b); - } -} - -/** - * @generated from message livekit.proto.VideoStreamEOS - */ -export class VideoStreamEOS extends Message { - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.VideoStreamEOS"; - static readonly fields: FieldList = proto2.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 proto2.util.equals(VideoStreamEOS, a, b); - } -} - -/** - * @generated from message livekit.proto.VideoSourceResolution - */ -export class VideoSourceResolution extends Message { - /** - * @generated from field: required uint32 width = 1; - */ - width?: number; - - /** - * @generated from field: required uint32 height = 2; - */ - height?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.VideoSourceResolution"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - { no: 2, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VideoSourceResolution { - return new VideoSourceResolution().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): VideoSourceResolution { - return new VideoSourceResolution().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): VideoSourceResolution { - return new VideoSourceResolution().fromJsonString(jsonString, options); - } - - static equals(a: VideoSourceResolution | PlainMessage | undefined, b: VideoSourceResolution | PlainMessage | undefined): boolean { - return proto2.util.equals(VideoSourceResolution, a, b); - } -} - -/** - * @generated from message livekit.proto.VideoSourceInfo - */ -export class VideoSourceInfo extends Message { - /** - * @generated from field: required livekit.proto.VideoSourceType type = 1; - */ - type?: VideoSourceType; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.VideoSourceInfo"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "type", kind: "enum", T: proto2.getEnumType(VideoSourceType), req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VideoSourceInfo { - return new VideoSourceInfo().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): VideoSourceInfo { - return new VideoSourceInfo().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): VideoSourceInfo { - return new VideoSourceInfo().fromJsonString(jsonString, options); - } - - static equals(a: VideoSourceInfo | PlainMessage | undefined, b: VideoSourceInfo | PlainMessage | undefined): boolean { - return proto2.util.equals(VideoSourceInfo, a, b); - } -} - -/** - * @generated from message livekit.proto.OwnedVideoSource - */ -export class OwnedVideoSource extends Message { - /** - * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; - */ - handle?: FfiOwnedHandle; - - /** - * @generated from field: required livekit.proto.VideoSourceInfo info = 2; - */ - info?: VideoSourceInfo; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.OwnedVideoSource"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, - { no: 2, name: "info", kind: "message", T: VideoSourceInfo, req: true }, - ]); - - 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 proto2.util.equals(OwnedVideoSource, a, b); - } -} - diff --git a/packages/livekit-rtc/src/room.ts b/packages/livekit-rtc/src/room.ts index b68778f7..b1e1468c 100644 --- a/packages/livekit-rtc/src/room.ts +++ b/packages/livekit-rtc/src/room.ts @@ -2,6 +2,27 @@ // // SPDX-License-Identifier: Apache-2.0 import { Mutex } from '@livekit/mutex'; +import { EncryptionState, type EncryptionType } from '@livekit/node-rtc-ffi-bindings'; +import type { FfiEvent } from '@livekit/node-rtc-ffi-bindings'; +import type { DisconnectReason, OwnedParticipant } from '@livekit/node-rtc-ffi-bindings'; +import type { DataStream_Trailer, DisconnectCallback } from '@livekit/node-rtc-ffi-bindings'; +import { + type ConnectCallback, + ConnectRequest, + type ConnectResponse, + type ConnectionQuality, + ConnectionState, + ContinualGatheringPolicy, + type DataPacketKind, + type DataStream_Chunk, + type DataStream_Header, + type DisconnectResponse, + RoomOptions as FfiRoomOptions, + type IceServer, + IceTransportType, + type RoomInfo, +} from '@livekit/node-rtc-ffi-bindings'; +import { TrackKind } from '@livekit/node-rtc-ffi-bindings'; import type { TypedEventEmitter as TypedEmitter } from '@livekit/typed-emitter'; import EventEmitter from 'events'; import { ByteStreamReader, TextStreamReader } from './data_streams/stream_reader.js'; @@ -18,27 +39,6 @@ import { FfiClient, FfiClientEvent, FfiHandle } from './ffi_client.js'; import { log } from './log.js'; import type { Participant } from './participant.js'; import { LocalParticipant, RemoteParticipant } from './participant.js'; -import { EncryptionState, type EncryptionType } from './proto/e2ee_pb.js'; -import type { FfiEvent } from './proto/ffi_pb.js'; -import type { DisconnectReason, OwnedParticipant } from './proto/participant_pb.js'; -import type { DataStream_Trailer, DisconnectCallback } from './proto/room_pb.js'; -import { - type ConnectCallback, - ConnectRequest, - type ConnectResponse, - type ConnectionQuality, - ConnectionState, - ContinualGatheringPolicy, - type DataPacketKind, - type DataStream_Chunk, - type DataStream_Header, - type DisconnectResponse, - RoomOptions as FfiRoomOptions, - type IceServer, - IceTransportType, - type RoomInfo, -} from './proto/room_pb.js'; -import { TrackKind } from './proto/track_pb.js'; import type { LocalTrack, RemoteTrack } from './track.js'; import { RemoteAudioTrack, RemoteVideoTrack } from './track.js'; import type { LocalTrackPublication, TrackPublication } from './track_publication.js'; diff --git a/packages/livekit-rtc/src/rpc.ts b/packages/livekit-rtc/src/rpc.ts index 54ad443b..fd1a5314 100644 --- a/packages/livekit-rtc/src/rpc.ts +++ b/packages/livekit-rtc/src/rpc.ts @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 -import type { RpcError as RpcError_Proto } from './proto/rpc_pb.js'; +import type { RpcError as RpcError_Proto } from '@livekit/node-rtc-ffi-bindings'; /** Parameters for initiating an RPC call */ export interface PerformRpcParams { diff --git a/packages/livekit-rtc/src/track.ts b/packages/livekit-rtc/src/track.ts index 3b81cec8..5391f777 100644 --- a/packages/livekit-rtc/src/track.ts +++ b/packages/livekit-rtc/src/track.ts @@ -1,8 +1,6 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 -import type { AudioSource } from './audio_source.js'; -import { FfiClient, FfiHandle } from './ffi_client.js'; import type { CreateAudioTrackResponse, CreateVideoTrackResponse, @@ -10,8 +8,10 @@ import type { StreamState, TrackInfo, TrackKind, -} from './proto/track_pb.js'; -import { CreateAudioTrackRequest, CreateVideoTrackRequest } from './proto/track_pb.js'; +} from '@livekit/node-rtc-ffi-bindings'; +import { CreateAudioTrackRequest, CreateVideoTrackRequest } from '@livekit/node-rtc-ffi-bindings'; +import type { AudioSource } from './audio_source.js'; +import { FfiClient, FfiHandle } from './ffi_client.js'; import type { VideoSource } from './video_source.js'; export abstract class Track { diff --git a/packages/livekit-rtc/src/track_publication.ts b/packages/livekit-rtc/src/track_publication.ts index 8bc98ee8..d88cfd31 100644 --- a/packages/livekit-rtc/src/track_publication.ts +++ b/packages/livekit-rtc/src/track_publication.ts @@ -1,17 +1,17 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 -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 type { EncryptionType } from '@livekit/node-rtc-ffi-bindings'; +import type { SetSubscribedResponse } from '@livekit/node-rtc-ffi-bindings'; +import { SetSubscribedRequest } from '@livekit/node-rtc-ffi-bindings'; import type { OwnedTrackPublication, TrackKind, TrackPublicationInfo, TrackSource, -} from './proto/track_pb.js'; +} from '@livekit/node-rtc-ffi-bindings'; +import { FfiHandle } from '@livekit/node-rtc-ffi-bindings'; +import { FfiClient } from './ffi_client.js'; import type { Track } from './track.js'; export abstract class TrackPublication { diff --git a/packages/livekit-rtc/src/video_frame.ts b/packages/livekit-rtc/src/video_frame.ts index dd6020da..b1b89758 100644 --- a/packages/livekit-rtc/src/video_frame.ts +++ b/packages/livekit-rtc/src/video_frame.ts @@ -1,13 +1,13 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 -import { FfiClient, FfiHandle, FfiRequest } from './ffi_client.js'; -import type { OwnedVideoBuffer, VideoConvertResponse } from './proto/video_frame_pb.js'; +import type { OwnedVideoBuffer, VideoConvertResponse } from '@livekit/node-rtc-ffi-bindings'; import { VideoBufferInfo, VideoBufferInfo_ComponentInfo, VideoBufferType, -} from './proto/video_frame_pb.js'; +} from '@livekit/node-rtc-ffi-bindings'; +import { FfiClient, FfiHandle, FfiRequest } from './ffi_client.js'; export class VideoFrame { data: Uint8Array; diff --git a/packages/livekit-rtc/src/video_source.ts b/packages/livekit-rtc/src/video_source.ts index 2f944b5a..05028f77 100644 --- a/packages/livekit-rtc/src/video_source.ts +++ b/packages/livekit-rtc/src/video_source.ts @@ -1,18 +1,18 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 -import { FfiClient, FfiHandle } from './ffi_client.js'; import type { CaptureVideoFrameResponse, NewVideoSourceResponse, VideoSourceInfo, -} from './proto/video_frame_pb.js'; +} from '@livekit/node-rtc-ffi-bindings'; import { CaptureVideoFrameRequest, NewVideoSourceRequest, VideoRotation, VideoSourceType, -} from './proto/video_frame_pb.js'; +} from '@livekit/node-rtc-ffi-bindings'; +import { FfiClient, FfiHandle } from './ffi_client.js'; import type { VideoFrame } from './video_frame.js'; export class VideoSource { diff --git a/packages/livekit-rtc/src/video_stream.ts b/packages/livekit-rtc/src/video_stream.ts index 2b856944..e9c3ebc8 100644 --- a/packages/livekit-rtc/src/video_stream.ts +++ b/packages/livekit-rtc/src/video_stream.ts @@ -1,11 +1,11 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. // // SPDX-License-Identifier: Apache-2.0 +import type { NewVideoStreamResponse, VideoRotation } from '@livekit/node-rtc-ffi-bindings'; +import { NewVideoStreamRequest, VideoStreamType } from '@livekit/node-rtc-ffi-bindings'; import type { UnderlyingSource } from 'node:stream/web'; import type { FfiEvent } from './ffi_client.js'; import { FfiClient, FfiClientEvent, FfiHandle } from './ffi_client.js'; -import type { NewVideoStreamResponse, VideoRotation } from './proto/video_frame_pb.js'; -import { NewVideoStreamRequest, VideoStreamType } from './proto/video_frame_pb.js'; import type { Track } from './track.js'; import { VideoFrame } from './video_frame.js';