diff --git a/.github/workflows/node-builds.yml b/.github/workflows/node-builds.yml index 3033b5877..2999f4556 100644 --- a/.github/workflows/node-builds.yml +++ b/.github/workflows/node-builds.yml @@ -22,7 +22,46 @@ env: APP_NAME: rtc-node jobs: + bump_version: + runs-on: macos-15 + outputs: + commit_sha: ${{ steps.commit.outputs.commit_long_sha }} + steps: + - uses: actions/checkout@v6 + + - uses: pnpm/action-setup@v4 + with: + package_json_file: livekit-ffi-node-bindings/package.json + + - name: Setup node + uses: actions/setup-node@v6 + with: + node-version: 24 + cache: pnpm + cache-dependency-path: livekit-ffi-node-bindings/pnpm-lock.yaml + + - working-directory: livekit-ffi-node-bindings + run: pnpm install + + - name: Set package version from tag + working-directory: livekit-ffi-node-bindings + run: | + # Extract version from tag (e.g., rust-sdks/livekit-ffi@0.12.43 -> 0.12.43) + VERSION=$(echo "${{ env.TAG_NAME }}" | sed 's/.*@//') + echo "Setting package version to $VERSION" + npm version $VERSION --no-git-tag-version + pnpm run ci:version + + - name: Add changes + id: commit + uses: EndBug/add-and-commit@v9 + with: + add: '["**/package.json"]' + default_author: github_actions + message: bump livekit-ffi-node-binding version + build: + needs: bump_version strategy: fail-fast: false matrix: @@ -55,6 +94,8 @@ jobs: - uses: actions/checkout@v6 with: submodules: recursive + ref: ${{ needs.bump_version.outputs.commit_sha }} + fetch-depth: 0 - uses: pnpm/action-setup@v4 with: package_json_file: livekit-ffi-node-bindings/package.json @@ -147,20 +188,32 @@ jobs: working-directory: livekit-ffi-node-bindings run: pnpm build --target ${{ matrix.target }} - - name: Upload artifact + - name: Upload binary artifact uses: actions/upload-artifact@v4 if: github.event_name != 'pull-request' with: - name: bindings-${{ matrix.target }} - path: livekit-ffi-node-bindings/src/napi/${{ env.APP_NAME }}.*.node + name: native-bindings-${{ matrix.target }} + path: livekit-ffi-node-bindings/${{ env.APP_NAME }}.*.node if-no-files-found: error - release: - needs: build - name: Release + - name: Upload JS + uses: actions/upload-artifact@v4 + if: ${{ github.event_name != 'pull-request' && matrix.os == 'macos-15' }} + with: + name: js-bindings + path: livekit-ffi-node-bindings/native.* + if-no-files-found: error + + commit_and_release: + needs: [bump_version, build] + name: Commit and Release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 + + - run: git fetch origin ${{ needs.bump_version.outputs.commit_sha }} + + - run: git reset --hard ${{ needs.bump_version.outputs.commit_sha }} - uses: pnpm/action-setup@v4 with: @@ -176,40 +229,27 @@ jobs: - working-directory: livekit-ffi-node-bindings run: pnpm install - - name: Install Protoc - uses: arduino/setup-protoc@v3 - with: - version: "25.1" - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Download all artifacts + - name: Download native build artifacts uses: actions/download-artifact@v4 with: + pattern: native-bindings-* path: livekit-ffi-node-bindings/artifacts - - name: Set package version from tag - working-directory: livekit-ffi-node-bindings - run: | - # Extract version from tag (e.g., rust-sdks/livekit-ffi@0.12.43 -> 0.12.43) - VERSION=$(echo "${{ env.TAG_NAME }}" | sed 's/.*@//') - echo "Setting package version to $VERSION" - npm version $VERSION --no-git-tag-version - pnpm run version - - - name: Commit and push versioning changes - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git add . - git commit -m "chore: update livekit-ffi-node-bindings version to $(echo "${{ env.TAG_NAME }}" | sed 's/.*@//')" || echo "No changes to commit" - git push origin HEAD + - name: Download js artifacts + uses: actions/download-artifact@v4 + with: + name: js-bindings + path: livekit-ffi-node-bindings - - name: Build TS parts - working-directory: livekit-ffi-node-bindings - run: pnpm build:ts + - name: Add changes + uses: EndBug/add-and-commit@v9 + with: + add: '["livekit-ffi-node-bindings/native.js", "livekit-ffi-node-bindings/native.d.ts"]' + default_author: github_actions + message: update js bindings for release - name: Move artifacts - run: pnpm artifacts + run: pnpm run ci:artifacts working-directory: livekit-ffi-node-bindings - name: List packages @@ -218,4 +258,4 @@ jobs: - name: Publish working-directory: livekit-ffi-node-bindings - run: pnpm publish --tag dev + run: pnpm publish -r diff --git a/Cargo.lock b/Cargo.lock index 4ae7e4886..a987da9e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -273,7 +273,7 @@ version = "0.38.0+1.3.281" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" dependencies = [ - "libloading", + "libloading 0.8.9", ] [[package]] @@ -966,7 +966,7 @@ checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", - "libloading", + "libloading 0.8.9", ] [[package]] @@ -1163,9 +1163,9 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "convert_case" -version = "0.6.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" dependencies = [ "unicode-segmentation", ] @@ -1397,14 +1397,20 @@ dependencies = [ [[package]] name = "ctor" -version = "0.2.9" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" +checksum = "424e0138278faeb2b401f174ad17e715c829512d74f3d1e81eb43365c2e0590e" dependencies = [ - "quote", - "syn 2.0.114", + "ctor-proc-macro", + "dtor", ] +[[package]] +name = "ctor-proc-macro" +version = "0.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1" + [[package]] name = "curl" version = "0.4.49" @@ -1616,7 +1622,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading", + "libloading 0.8.9", ] [[package]] @@ -1640,6 +1646,21 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" +[[package]] +name = "dtor" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "404d02eeb088a82cfd873006cb713fe411306c7d182c344905e101fb1167d301" +dependencies = [ + "dtor-proc-macro", +] + +[[package]] +name = "dtor-proc-macro" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f678cf4a922c215c63e0de95eb1ff08a958a81d47e485cf9da1e27bf6305cfa5" + [[package]] name = "ecolor" version = "0.31.1" @@ -3184,7 +3205,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" dependencies = [ "libc", - "libloading", + "libloading 0.8.9", "pkg-config", ] @@ -3237,6 +3258,16 @@ dependencies = [ "windows-link", ] +[[package]] +name = "libloading" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "754ca22de805bb5744484a5b151a9e1a8e837d5dc232c2d7d8c2e3492edc8b60" +dependencies = [ + "cfg-if 1.0.4", + "windows-link", +] + [[package]] name = "libm" version = "0.2.16" @@ -3334,7 +3365,7 @@ dependencies = [ "chrono", "futures-util", "lazy_static", - "libloading", + "libloading 0.8.9", "libwebrtc", "livekit-api", "livekit-protocol", @@ -3715,15 +3746,17 @@ dependencies = [ [[package]] name = "napi" -version = "2.16.17" +version = "3.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55740c4ae1d8696773c78fdafd5d0e5fe9bc9f1b071c7ba493ba5c413a9184f3" +checksum = "909805cbad4d569e69b80e101290fe72e92b9742ba9e333b0c1e83b22fb7447b" dependencies = [ "bitflags 2.10.0", "ctor", - "napi-derive", + "futures", + "napi-build", "napi-sys", - "once_cell", + "nohash-hasher", + "rustc-hash 2.1.1", "tokio", ] @@ -3735,12 +3768,12 @@ checksum = "d376940fd5b723c6893cd1ee3f33abbfd86acb1cd1ec079f3ab04a2a3bc4d3b1" [[package]] name = "napi-derive" -version = "2.16.13" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cbe2585d8ac223f7d34f13701434b9d5f4eb9c332cccce8dee57ea18ab8ab0c" +checksum = "04ba21bbdf40b33496b4ee6eadfc64d17a6a6cde57cd31549117b0882d1fef86" dependencies = [ - "cfg-if 1.0.4", "convert_case", + "ctor", "napi-derive-backend", "proc-macro2", "quote", @@ -3749,26 +3782,24 @@ dependencies = [ [[package]] name = "napi-derive-backend" -version = "1.0.75" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1639aaa9eeb76e91c6ae66da8ce3e89e921cd3885e99ec85f4abacae72fc91bf" +checksum = "e9a63791e230572c3218a7acd86ca0a0529fc64294bcbea567cf906d7b04e077" dependencies = [ "convert_case", - "once_cell", "proc-macro2", "quote", - "regex", "semver", "syn 2.0.114", ] [[package]] name = "napi-sys" -version = "2.4.0" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427802e8ec3a734331fec1035594a210ce1ff4dc5bc1950530920ab717964ea3" +checksum = "8eb602b84d7c1edae45e50bbf1374696548f36ae179dfa667f577e384bb90c2b" dependencies = [ - "libloading", + "libloading 0.9.0", ] [[package]] @@ -7272,7 +7303,7 @@ dependencies = [ "js-sys", "khronos-egl", "libc", - "libloading", + "libloading 0.8.9", "log", "metal 0.31.0", "naga 24.0.0", @@ -7318,7 +7349,7 @@ dependencies = [ "js-sys", "khronos-egl", "libc", - "libloading", + "libloading 0.8.9", "log", "metal 0.31.0", "naga 25.0.1", @@ -8024,7 +8055,7 @@ dependencies = [ "as-raw-xcb-connection", "gethostname", "libc", - "libloading", + "libloading 0.8.9", "once_cell", "rustix 1.1.3", "x11rb-protocol", diff --git a/livekit-ffi-node-bindings/.gitignore b/livekit-ffi-node-bindings/.gitignore index 921f93694..aafaddeb5 100644 --- a/livekit-ffi-node-bindings/.gitignore +++ b/livekit-ffi-node-bindings/.gitignore @@ -123,7 +123,7 @@ dist .AppleDouble .LSOverride -# Icon must end with two +# Icon must end with two Icon diff --git a/livekit-ffi-node-bindings/Cargo.toml b/livekit-ffi-node-bindings/Cargo.toml index 86b9ba810..e1468c87c 100644 --- a/livekit-ffi-node-bindings/Cargo.toml +++ b/livekit-ffi-node-bindings/Cargo.toml @@ -8,11 +8,12 @@ publish = false crate-type = ["cdylib"] [dependencies] -napi = { version = "2.12.2", default-features = false, features = [ +napi = { version = "3.8.2", default-features = false, features = [ + "compat-mode", "async", "napi6", ] } -napi-derive = "2.12.2" +napi-derive = "3.5.1" livekit-ffi = { path = "../livekit-ffi" } prost = { workspace = true } prost-types = { workspace = true } diff --git a/livekit-ffi-node-bindings/generate_proto.sh b/livekit-ffi-node-bindings/generate_proto.sh index 724f06403..0916c774f 100755 --- a/livekit-ffi-node-bindings/generate_proto.sh +++ b/livekit-ffi-node-bindings/generate_proto.sh @@ -17,15 +17,14 @@ # `brew install protobuf-c && npm install -g @bufbuild/protoc-gen-es@2.2.0` FFI_PROTOCOL=../livekit-ffi/protocol -FFI_OUT_NODE=./src/proto +FFI_OUT_NODE=./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 \ + --es_opt js_import_style=legacy_commonjs \ $FFI_PROTOCOL/audio_frame.proto \ $FFI_PROTOCOL/ffi.proto \ $FFI_PROTOCOL/handle.proto \ diff --git a/livekit-ffi-node-bindings/index.d.ts b/livekit-ffi-node-bindings/index.d.ts new file mode 100644 index 000000000..0dbdc49b2 --- /dev/null +++ b/livekit-ffi-node-bindings/index.d.ts @@ -0,0 +1,32 @@ +// Copyright 2026 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. + +export * from "./native.js"; +export * from "./proto/audio_frame_pb.js"; +export * from "./proto/ffi_pb.js"; +export * from "./proto/handle_pb.js"; +export * from "./proto/participant_pb.js"; +export * from "./proto/room_pb.js"; +export * from "./proto/track_pb.js"; +export * from "./proto/track_publication_pb.js"; +export * from "./proto/video_frame_pb.js"; +export * from "./proto/e2ee_pb.js"; +export * from "./proto/stats_pb.js"; +export * from "./proto/rpc_pb.js"; +export * from "./proto/data_stream_pb.js"; + +/** type only exports */ +import type { PartialMessage } from "@bufbuild/protobuf"; + +export { PartialMessage }; diff --git a/livekit-ffi-node-bindings/index.js b/livekit-ffi-node-bindings/index.js new file mode 100644 index 000000000..f846d135c --- /dev/null +++ b/livekit-ffi-node-bindings/index.js @@ -0,0 +1,31 @@ +// Copyright 2026 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. + +// @ts-check + +module.exports = { + ...require("./native.js"), + ...require("./proto/audio_frame_pb.js"), + ...require("./proto/ffi_pb.js"), + ...require("./proto/handle_pb.js"), + ...require("./proto/participant_pb.js"), + ...require("./proto/room_pb.js"), + ...require("./proto/track_pb.js"), + ...require("./proto/track_publication_pb.js"), + ...require("./proto/video_frame_pb.js"), + ...require("./proto/e2ee_pb.js"), + ...require("./proto/stats_pb.js"), + ...require("./proto/rpc_pb.js"), + ...require("./proto/data_stream_pb.js"), +}; diff --git a/livekit-ffi-node-bindings/native.d.ts b/livekit-ffi-node-bindings/native.d.ts new file mode 100644 index 000000000..a1483a6c7 --- /dev/null +++ b/livekit-ffi-node-bindings/native.d.ts @@ -0,0 +1,17 @@ +/* auto-generated by NAPI-RS */ +/* eslint-disable */ +export declare class FfiHandle { + constructor(handle: bigint) + dispose(): void + get handle(): bigint +} + +export declare function livekitCopyBuffer(ptr: bigint, len: number): Uint8Array + +export declare function livekitDispose(): Promise + +export declare function livekitFfiRequest(data: Uint8Array): Uint8Array + +export declare function livekitInitialize(callback: (data: Uint8Array) => void, captureLogs: boolean, sdkVersion: string): void + +export declare function livekitRetrievePtr(handle: Uint8Array): bigint diff --git a/livekit-ffi-node-bindings/native.js b/livekit-ffi-node-bindings/native.js new file mode 100644 index 000000000..d79a70df2 --- /dev/null +++ b/livekit-ffi-node-bindings/native.js @@ -0,0 +1,584 @@ +// prettier-ignore +/* eslint-disable */ +// @ts-nocheck +/* auto-generated by NAPI-RS */ + +const { readFileSync } = require('node:fs') +let nativeBinding = null +const loadErrors = [] + +const isMusl = () => { + let musl = false + if (process.platform === 'linux') { + musl = isMuslFromFilesystem() + if (musl === null) { + musl = isMuslFromReport() + } + if (musl === null) { + musl = isMuslFromChildProcess() + } + } + return musl +} + +const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-') + +const isMuslFromFilesystem = () => { + try { + return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl') + } catch { + return null + } +} + +const isMuslFromReport = () => { + let report = null + if (typeof process.report?.getReport === 'function') { + process.report.excludeNetwork = true + report = process.report.getReport() + } + if (!report) { + return null + } + if (report.header && report.header.glibcVersionRuntime) { + return false + } + if (Array.isArray(report.sharedObjects)) { + if (report.sharedObjects.some(isFileMusl)) { + return true + } + } + return false +} + +const isMuslFromChildProcess = () => { + try { + return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl') + } catch (e) { + // If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false + return false + } +} + +function requireNative() { + if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) { + try { + return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH); + } catch (err) { + loadErrors.push(err) + } + } else if (process.platform === 'android') { + if (process.arch === 'arm64') { + try { + return require('./rtc-node.android-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-android-arm64') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-android-arm64/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'arm') { + try { + return require('./rtc-node.android-arm-eabi.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-android-arm-eabi') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-android-arm-eabi/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`)) + } + } else if (process.platform === 'win32') { + if (process.arch === 'x64') { + if (process.config?.variables?.shlib_suffix === 'dll.a' || process.config?.variables?.node_target_type === 'shared_library') { + try { + return require('./rtc-node.win32-x64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-win32-x64-gnu') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-win32-x64-gnu/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + try { + return require('./rtc-node.win32-x64-msvc.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-win32-x64-msvc') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-win32-x64-msvc/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } + } else if (process.arch === 'ia32') { + try { + return require('./rtc-node.win32-ia32-msvc.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-win32-ia32-msvc') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-win32-ia32-msvc/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'arm64') { + try { + return require('./rtc-node.win32-arm64-msvc.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-win32-arm64-msvc') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-win32-arm64-msvc/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`)) + } + } else if (process.platform === 'darwin') { + try { + return require('./rtc-node.darwin-universal.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-darwin-universal') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-darwin-universal/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + if (process.arch === 'x64') { + try { + return require('./rtc-node.darwin-x64.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-darwin-x64') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-darwin-x64/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'arm64') { + try { + return require('./rtc-node.darwin-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-darwin-arm64') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-darwin-arm64/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`)) + } + } else if (process.platform === 'freebsd') { + if (process.arch === 'x64') { + try { + return require('./rtc-node.freebsd-x64.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-freebsd-x64') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-freebsd-x64/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'arm64') { + try { + return require('./rtc-node.freebsd-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-freebsd-arm64') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-freebsd-arm64/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`)) + } + } else if (process.platform === 'linux') { + if (process.arch === 'x64') { + if (isMusl()) { + try { + return require('./rtc-node.linux-x64-musl.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-linux-x64-musl') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-linux-x64-musl/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + try { + return require('./rtc-node.linux-x64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-linux-x64-gnu') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-linux-x64-gnu/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } + } else if (process.arch === 'arm64') { + if (isMusl()) { + try { + return require('./rtc-node.linux-arm64-musl.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-linux-arm64-musl') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-linux-arm64-musl/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + try { + return require('./rtc-node.linux-arm64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-linux-arm64-gnu') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-linux-arm64-gnu/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } + } else if (process.arch === 'arm') { + if (isMusl()) { + try { + return require('./rtc-node.linux-arm-musleabihf.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-linux-arm-musleabihf') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-linux-arm-musleabihf/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + try { + return require('./rtc-node.linux-arm-gnueabihf.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-linux-arm-gnueabihf') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-linux-arm-gnueabihf/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } + } else if (process.arch === 'loong64') { + if (isMusl()) { + try { + return require('./rtc-node.linux-loong64-musl.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-linux-loong64-musl') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-linux-loong64-musl/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + try { + return require('./rtc-node.linux-loong64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-linux-loong64-gnu') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-linux-loong64-gnu/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } + } else if (process.arch === 'riscv64') { + if (isMusl()) { + try { + return require('./rtc-node.linux-riscv64-musl.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-linux-riscv64-musl') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-linux-riscv64-musl/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + try { + return require('./rtc-node.linux-riscv64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-linux-riscv64-gnu') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-linux-riscv64-gnu/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } + } else if (process.arch === 'ppc64') { + try { + return require('./rtc-node.linux-ppc64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-linux-ppc64-gnu') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-linux-ppc64-gnu/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 's390x') { + try { + return require('./rtc-node.linux-s390x-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-linux-s390x-gnu') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-linux-s390x-gnu/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`)) + } + } else if (process.platform === 'openharmony') { + if (process.arch === 'arm64') { + try { + return require('./rtc-node.openharmony-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-openharmony-arm64') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-openharmony-arm64/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'x64') { + try { + return require('./rtc-node.openharmony-x64.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-openharmony-x64') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-openharmony-x64/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'arm') { + try { + return require('./rtc-node.openharmony-arm.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('@livekit/rtc-ffi-bindings-openharmony-arm') + const bindingPackageVersion = require('@livekit/rtc-ffi-bindings-openharmony-arm/package.json').version + if (bindingPackageVersion !== '0.12.46-dev.8' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.12.46-dev.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`)) + } + } else { + loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`)) + } +} + +nativeBinding = requireNative() + +if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) { + let wasiBinding = null + let wasiBindingError = null + try { + wasiBinding = require('./rtc-node.wasi.cjs') + nativeBinding = wasiBinding + } catch (err) { + if (process.env.NAPI_RS_FORCE_WASI) { + wasiBindingError = err + } + } + if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) { + try { + wasiBinding = require('@livekit/rtc-ffi-bindings-wasm32-wasi') + nativeBinding = wasiBinding + } catch (err) { + if (process.env.NAPI_RS_FORCE_WASI) { + if (!wasiBindingError) { + wasiBindingError = err + } else { + wasiBindingError.cause = err + } + loadErrors.push(err) + } + } + } + if (process.env.NAPI_RS_FORCE_WASI === 'error' && !wasiBinding) { + const error = new Error('WASI binding not found and NAPI_RS_FORCE_WASI is set to error') + error.cause = wasiBindingError + throw error + } +} + +if (!nativeBinding) { + if (loadErrors.length > 0) { + throw new Error( + `Cannot find native binding. ` + + `npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` + + 'Please try `npm i` again after removing both package-lock.json and node_modules directory.', + { + cause: loadErrors.reduce((err, cur) => { + cur.cause = err + return cur + }), + }, + ) + } + throw new Error(`Failed to load native binding`) +} + +module.exports = nativeBinding +module.exports.FfiHandle = nativeBinding.FfiHandle +module.exports.livekitCopyBuffer = nativeBinding.livekitCopyBuffer +module.exports.livekitDispose = nativeBinding.livekitDispose +module.exports.livekitFfiRequest = nativeBinding.livekitFfiRequest +module.exports.livekitInitialize = nativeBinding.livekitInitialize +module.exports.livekitRetrievePtr = nativeBinding.livekitRetrievePtr diff --git a/livekit-ffi-node-bindings/npm/darwin-arm64/README.md b/livekit-ffi-node-bindings/npm/darwin-arm64/README.md index 0eab86b1a..881aa2fc0 100644 --- a/livekit-ffi-node-bindings/npm/darwin-arm64/README.md +++ b/livekit-ffi-node-bindings/npm/darwin-arm64/README.md @@ -1,3 +1,3 @@ -# `@livekit/rtc-node-darwin-arm64` +# `@livekit/rtc-ffi-bindings-darwin-arm64` -This is the **aarch64-apple-darwin** binary for `@livekit/rtc-node` +This is the **aarch64-apple-darwin** binary for `@livekit/rtc-ffi-bindings` diff --git a/livekit-ffi-node-bindings/npm/darwin-arm64/package.json b/livekit-ffi-node-bindings/npm/darwin-arm64/package.json index 789627e67..fcb423a3f 100644 --- a/livekit-ffi-node-bindings/npm/darwin-arm64/package.json +++ b/livekit-ffi-node-bindings/npm/darwin-arm64/package.json @@ -1,14 +1,6 @@ { - "name": "@livekit/rtc-node-darwin-arm64", - "version": "0.12.43", - "repository": { - "type": "git", - "url": "https://github.com/livekit/node-sdks.git", - "directory": "packages/livekit-rtc/darwin-arm64" - }, - "os": [ - "darwin" - ], + "name": "@livekit/rtc-ffi-bindings-darwin-arm64", + "version": "0.12.46-dev.8", "cpu": [ "arm64" ], @@ -16,8 +8,18 @@ "files": [ "rtc-node.darwin-arm64.node" ], + "description": "LiveKit RTC Node FFI bindings for internal use only", + "author": "LiveKit", "license": "Apache-2.0", "engines": { - "node": ">= 10" - } + "node": ">= 18" + }, + "repository": { + "type": "git", + "url": "https://github.com/livekit/node-sdks.git", + "directory": "packages/livekit-rtc" + }, + "os": [ + "darwin" + ] } \ No newline at end of file diff --git a/livekit-ffi-node-bindings/npm/darwin-x64/README.md b/livekit-ffi-node-bindings/npm/darwin-x64/README.md index d0da20769..7c36beaf3 100644 --- a/livekit-ffi-node-bindings/npm/darwin-x64/README.md +++ b/livekit-ffi-node-bindings/npm/darwin-x64/README.md @@ -1,3 +1,3 @@ -# `@livekit/rtc-node-darwin-x64` +# `@livekit/rtc-ffi-bindings-darwin-x64` -This is the **x86_64-apple-darwin** binary for `@livekit/rtc-node` +This is the **x86_64-apple-darwin** binary for `@livekit/rtc-ffi-bindings` diff --git a/livekit-ffi-node-bindings/npm/darwin-x64/package.json b/livekit-ffi-node-bindings/npm/darwin-x64/package.json index efcdb2542..53464a693 100644 --- a/livekit-ffi-node-bindings/npm/darwin-x64/package.json +++ b/livekit-ffi-node-bindings/npm/darwin-x64/package.json @@ -1,15 +1,6 @@ { - "name": "@livekit/rtc-node-darwin-x64", - "author": "LiveKit", - "version": "0.12.43", - "repository": { - "type": "git", - "url": "https://github.com/livekit/node-sdks.git", - "directory": "packages/livekit-rtc/darwin-x64" - }, - "os": [ - "darwin" - ], + "name": "@livekit/rtc-ffi-bindings-darwin-x64", + "version": "0.12.46-dev.8", "cpu": [ "x64" ], @@ -17,8 +8,18 @@ "files": [ "rtc-node.darwin-x64.node" ], + "description": "LiveKit RTC Node FFI bindings for internal use only", + "author": "LiveKit", "license": "Apache-2.0", "engines": { - "node": ">= 10" - } + "node": ">= 18" + }, + "repository": { + "type": "git", + "url": "https://github.com/livekit/node-sdks.git", + "directory": "packages/livekit-rtc" + }, + "os": [ + "darwin" + ] } \ No newline at end of file diff --git a/livekit-ffi-node-bindings/npm/linux-arm64-gnu/README.md b/livekit-ffi-node-bindings/npm/linux-arm64-gnu/README.md index 0969fffb4..35c49ad95 100644 --- a/livekit-ffi-node-bindings/npm/linux-arm64-gnu/README.md +++ b/livekit-ffi-node-bindings/npm/linux-arm64-gnu/README.md @@ -1,3 +1,3 @@ -# `@livekit/rtc-node-linux-arm64-gnu` +# `@livekit/rtc-ffi-bindings-linux-arm64-gnu` -This is the **aarch64-unknown-linux-gnu** binary for `@livekit/rtc-node` +This is the **aarch64-unknown-linux-gnu** binary for `@livekit/rtc-ffi-bindings` diff --git a/livekit-ffi-node-bindings/npm/linux-arm64-gnu/package.json b/livekit-ffi-node-bindings/npm/linux-arm64-gnu/package.json index fbf535315..a152f66a5 100644 --- a/livekit-ffi-node-bindings/npm/linux-arm64-gnu/package.json +++ b/livekit-ffi-node-bindings/npm/linux-arm64-gnu/package.json @@ -1,15 +1,6 @@ { - "name": "@livekit/rtc-node-linux-arm64-gnu", - "author": "LiveKit", - "version": "0.12.43", - "repository": { - "type": "git", - "url": "https://github.com/livekit/node-sdks.git", - "directory": "packages/livekit-rtc/linux-arm64-gnu" - }, - "os": [ - "linux" - ], + "name": "@livekit/rtc-ffi-bindings-linux-arm64-gnu", + "version": "0.12.46-dev.8", "cpu": [ "arm64" ], @@ -17,10 +8,20 @@ "files": [ "rtc-node.linux-arm64-gnu.node" ], + "description": "LiveKit RTC Node FFI bindings for internal use only", + "author": "LiveKit", "license": "Apache-2.0", "engines": { - "node": ">= 10" + "node": ">= 18" + }, + "repository": { + "type": "git", + "url": "https://github.com/livekit/node-sdks.git", + "directory": "packages/livekit-rtc" }, + "os": [ + "linux" + ], "libc": [ "glibc" ] diff --git a/livekit-ffi-node-bindings/npm/linux-x64-gnu/README.md b/livekit-ffi-node-bindings/npm/linux-x64-gnu/README.md index 0d42861fb..790c3faf8 100644 --- a/livekit-ffi-node-bindings/npm/linux-x64-gnu/README.md +++ b/livekit-ffi-node-bindings/npm/linux-x64-gnu/README.md @@ -1,3 +1,3 @@ -# `@livekit/rtc-node-linux-x64-gnu` +# `@livekit/rtc-ffi-bindings-linux-x64-gnu` -This is the **x86_64-unknown-linux-gnu** binary for `@livekit/rtc-node` +This is the **x86_64-unknown-linux-gnu** binary for `@livekit/rtc-ffi-bindings` diff --git a/livekit-ffi-node-bindings/npm/linux-x64-gnu/package.json b/livekit-ffi-node-bindings/npm/linux-x64-gnu/package.json index a7d720a8b..5317256c9 100644 --- a/livekit-ffi-node-bindings/npm/linux-x64-gnu/package.json +++ b/livekit-ffi-node-bindings/npm/linux-x64-gnu/package.json @@ -1,15 +1,6 @@ { - "name": "@livekit/rtc-node-linux-x64-gnu", - "author": "LiveKit", - "version": "0.12.43", - "repository": { - "type": "git", - "url": "https://github.com/livekit/node-sdks.git", - "directory": "packages/livekit-rtc/linux-x64-gnu" - }, - "os": [ - "linux" - ], + "name": "@livekit/rtc-ffi-bindings-linux-x64-gnu", + "version": "0.12.46-dev.8", "cpu": [ "x64" ], @@ -17,10 +8,20 @@ "files": [ "rtc-node.linux-x64-gnu.node" ], + "description": "LiveKit RTC Node FFI bindings for internal use only", + "author": "LiveKit", "license": "Apache-2.0", "engines": { - "node": ">= 10" + "node": ">= 18" + }, + "repository": { + "type": "git", + "url": "https://github.com/livekit/node-sdks.git", + "directory": "packages/livekit-rtc" }, + "os": [ + "linux" + ], "libc": [ "glibc" ] diff --git a/livekit-ffi-node-bindings/npm/win32-x64-msvc/README.md b/livekit-ffi-node-bindings/npm/win32-x64-msvc/README.md index ed317839a..33b4b60f8 100644 --- a/livekit-ffi-node-bindings/npm/win32-x64-msvc/README.md +++ b/livekit-ffi-node-bindings/npm/win32-x64-msvc/README.md @@ -1,3 +1,3 @@ -# `@livekit/rtc-node-win32-x64-msvc` +# `@livekit/rtc-ffi-bindings-win32-x64-msvc` -This is the **x86_64-pc-windows-msvc** binary for `@livekit/rtc-node` +This is the **x86_64-pc-windows-msvc** binary for `@livekit/rtc-ffi-bindings` diff --git a/livekit-ffi-node-bindings/npm/win32-x64-msvc/package.json b/livekit-ffi-node-bindings/npm/win32-x64-msvc/package.json index a816e126f..1d0714684 100644 --- a/livekit-ffi-node-bindings/npm/win32-x64-msvc/package.json +++ b/livekit-ffi-node-bindings/npm/win32-x64-msvc/package.json @@ -1,15 +1,6 @@ { - "name": "@livekit/rtc-node-win32-x64-msvc", - "author": "LiveKit", - "version": "0.12.43", - "repository": { - "type": "git", - "url": "https://github.com/livekit/node-sdks.git", - "directory": "packages/livekit-rtc/win32-x64-msvc" - }, - "os": [ - "win32" - ], + "name": "@livekit/rtc-ffi-bindings-win32-x64-msvc", + "version": "0.12.46-dev.8", "cpu": [ "x64" ], @@ -17,8 +8,18 @@ "files": [ "rtc-node.win32-x64-msvc.node" ], + "description": "LiveKit RTC Node FFI bindings for internal use only", + "author": "LiveKit", "license": "Apache-2.0", "engines": { - "node": ">= 10" - } + "node": ">= 18" + }, + "repository": { + "type": "git", + "url": "https://github.com/livekit/node-sdks.git", + "directory": "packages/livekit-rtc" + }, + "os": [ + "win32" + ] } \ No newline at end of file diff --git a/livekit-ffi-node-bindings/package.json b/livekit-ffi-node-bindings/package.json index 094afef72..1b445e84b 100644 --- a/livekit-ffi-node-bindings/package.json +++ b/livekit-ffi-node-bindings/package.json @@ -1,33 +1,23 @@ { "name": "@livekit/rtc-ffi-bindings", - "description": "LiveKit RTC Node", + "description": "LiveKit RTC Node FFI bindings for internal use only", "license": "Apache-2.0", "author": "LiveKit", - "version": "0.12.43", - "main": "dist/index.js", - "require": "dist/index.cjs", - "types": "dist/index.d.ts", - "exports": { - ".": { - "import": { - "types": "./dist/index.d.ts", - "default": "./dist/index.js" - }, - "require": { - "types": "./dist/index.d.cts", - "default": "./dist/index.cjs" - } - } - }, - "type": "module", + "version": "0.12.46-dev.8", + "main": "index.js", + "types": "index.d.ts", + "type": "commonjs", "repository": { "type": "git", "url": "https://github.com/livekit/node-sdks.git", "directory": "packages/livekit-rtc" }, "files": [ - "dist", - "src" + "index.js", + "index.d.ts", + "native.js", + "native.d.ts", + "proto" ], "napi": { "name": "rtc-node", @@ -47,29 +37,27 @@ }, "devDependencies": { "@bufbuild/protoc-gen-es": "^1.10.1", - "@napi-rs/cli": "^2.18.0", + "@napi-rs/cli": "^3.5.1", "@types/node": "^22.13.10", "prettier": "^3.0.3", - "tsup": "^8.5.1", "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:*" + "@livekit/rtc-ffi-bindings-darwin-arm64": "workspace:*", + "@livekit/rtc-ffi-bindings-darwin-x64": "workspace:*", + "@livekit/rtc-ffi-bindings-linux-arm64-gnu": "workspace:*", + "@livekit/rtc-ffi-bindings-linux-x64-gnu": "workspace:*", + "@livekit/rtc-ffi-bindings-win32-x64-msvc": "workspace:*" }, "engines": { "node": ">= 18" }, "scripts": { - "build:ts": "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", + "gen:proto": "pnpm exec ./generate_proto.sh", + "build": "napi build --platform --release --dts native.d.ts --js native.js", "build:debug": "napi build --platform", - "universal": "napi universal", - "version": "napi version" + "ci:version": "napi version", + "ci:artifacts": "napi artifacts" }, "packageManager": "pnpm@9.15.9+sha512.68046141893c66fad01c079231128e9afb89ef87e2691d69e4d40eee228988295fd4682181bae55b58418c3a253bde65a505ec7c5f9403ece5cc3cd37dcf2531" } diff --git a/livekit-ffi-node-bindings/pnpm-lock.yaml b/livekit-ffi-node-bindings/pnpm-lock.yaml index c10138ef3..7d800a205 100644 --- a/livekit-ffi-node-bindings/pnpm-lock.yaml +++ b/livekit-ffi-node-bindings/pnpm-lock.yaml @@ -12,19 +12,19 @@ importers: specifier: ^1.10.1 version: 1.10.1 optionalDependencies: - '@livekit/rtc-node-darwin-arm64': + '@livekit/rtc-ffi-bindings-darwin-arm64': specifier: workspace:* version: link:npm/darwin-arm64 - '@livekit/rtc-node-darwin-x64': + '@livekit/rtc-ffi-bindings-darwin-x64': specifier: workspace:* version: link:npm/darwin-x64 - '@livekit/rtc-node-linux-arm64-gnu': + '@livekit/rtc-ffi-bindings-linux-arm64-gnu': specifier: workspace:* version: link:npm/linux-arm64-gnu - '@livekit/rtc-node-linux-x64-gnu': + '@livekit/rtc-ffi-bindings-linux-x64-gnu': specifier: workspace:* version: link:npm/linux-x64-gnu - '@livekit/rtc-node-win32-x64-msvc': + '@livekit/rtc-ffi-bindings-win32-x64-msvc': specifier: workspace:* version: link:npm/win32-x64-msvc devDependencies: @@ -32,17 +32,14 @@ importers: specifier: ^1.10.1 version: 1.10.1(@bufbuild/protobuf@1.10.1) '@napi-rs/cli': - specifier: ^2.18.0 - version: 2.18.4 + specifier: ^3.5.1 + version: 3.5.1(@emnapi/runtime@1.8.1)(@types/node@22.19.3) '@types/node': specifier: ^22.13.10 version: 22.19.3 prettier: specifier: ^3.0.3 version: 3.7.4 - tsup: - specifier: ^8.5.1 - version: 8.5.1(typescript@5.8.2) typescript: specifier: 5.8.2 version: 5.8.2 @@ -75,307 +72,536 @@ packages: '@bufbuild/protoplugin@1.10.1': resolution: {integrity: sha512-LaSbfwabAFIvbVnbn8jWwElRoffCIxhVraO8arliVwWupWezHLXgqPHEYLXZY/SsAR+/YsFBQJa8tAGtNPJyaQ==} - '@esbuild/aix-ppc64@0.27.2': - resolution: {integrity: sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [aix] + '@emnapi/core@1.8.1': + resolution: {integrity: sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg==} - '@esbuild/android-arm64@0.27.2': - resolution: {integrity: sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [android] + '@emnapi/runtime@1.8.1': + resolution: {integrity: sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg==} - '@esbuild/android-arm@0.27.2': - resolution: {integrity: sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==} - engines: {node: '>=18'} + '@emnapi/wasi-threads@1.1.0': + resolution: {integrity: sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==} + + '@inquirer/ansi@2.0.3': + resolution: {integrity: sha512-g44zhR3NIKVs0zUesa4iMzExmZpLUdTLRMCStqX3GE5NT6VkPcxQGJ+uC8tDgBUC/vB1rUhUd55cOf++4NZcmw==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + + '@inquirer/checkbox@5.0.4': + resolution: {integrity: sha512-DrAMU3YBGMUAp6ArwTIp/25CNDtDbxk7UjIrrtM25JVVrlVYlVzHh5HR1BDFu9JMyUoZ4ZanzeaHqNDttf3gVg==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/confirm@6.0.4': + resolution: {integrity: sha512-WdaPe7foUnoGYvXzH4jp4wH/3l+dBhZ3uwhKjXjwdrq5tEIFaANxj6zrGHxLdsIA0yKM0kFPVcEalOZXBB5ISA==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/core@11.1.1': + resolution: {integrity: sha512-hV9o15UxX46OyQAtaoMqAOxGR8RVl1aZtDx1jHbCtSJy1tBdTfKxLPKf7utsE4cRy4tcmCQ4+vdV+ca+oNxqNA==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/editor@5.0.4': + resolution: {integrity: sha512-QI3Jfqcv6UO2/VJaEFONH8Im1ll++Xn/AJTBn9Xf+qx2M+H8KZAdQ5sAe2vtYlo+mLW+d7JaMJB4qWtK4BG3pw==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/expand@5.0.4': + resolution: {integrity: sha512-0I/16YwPPP0Co7a5MsomlZLpch48NzYfToyqYAOWtBmaXSB80RiNQ1J+0xx2eG+Wfxt0nHtpEWSRr6CzNVnOGg==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/external-editor@2.0.3': + resolution: {integrity: sha512-LgyI7Agbda74/cL5MvA88iDpvdXI2KuMBCGRkbCl2Dg1vzHeOgs+s0SDcXV7b+WZJrv2+ERpWSM65Fpi9VfY3w==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/figures@2.0.3': + resolution: {integrity: sha512-y09iGt3JKoOCBQ3w4YrSJdokcD8ciSlMIWsD+auPu+OZpfxLuyz+gICAQ6GCBOmJJt4KEQGHuZSVff2jiNOy7g==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + + '@inquirer/input@5.0.4': + resolution: {integrity: sha512-4B3s3jvTREDFvXWit92Yc6jF1RJMDy2VpSqKtm4We2oVU65YOh2szY5/G14h4fHlyQdpUmazU5MPCFZPRJ0AOw==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/number@4.0.4': + resolution: {integrity: sha512-CmMp9LF5HwE+G/xWsC333TlCzYYbXMkcADkKzcawh49fg2a1ryLc7JL1NJYYt1lJ+8f4slikNjJM9TEL/AljYQ==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/password@5.0.4': + resolution: {integrity: sha512-ZCEPyVYvHK4W4p2Gy6sTp9nqsdHQCfiPXIP9LbJVW4yCinnxL/dDDmPaEZVysGrj8vxVReRnpfS2fOeODe9zjg==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/prompts@8.2.0': + resolution: {integrity: sha512-rqTzOprAj55a27jctS3vhvDDJzYXsr33WXTjODgVOru21NvBo9yIgLIAf7SBdSV0WERVly3dR6TWyp7ZHkvKFA==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/rawlist@5.2.0': + resolution: {integrity: sha512-CciqGoOUMrFo6HxvOtU5uL8fkjCmzyeB6fG7O1vdVAZVSopUBYECOwevDBlqNLyyYmzpm2Gsn/7nLrpruy9RFg==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/search@4.1.0': + resolution: {integrity: sha512-EAzemfiP4IFvIuWnrHpgZs9lAhWDA0GM3l9F4t4mTQ22IFtzfrk8xbkMLcAN7gmVML9O/i+Hzu8yOUyAaL6BKA==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/select@5.0.4': + resolution: {integrity: sha512-s8KoGpPYMEQ6WXc0dT9blX2NtIulMdLOO3LA1UKOiv7KFWzlJ6eLkEYTDBIi+JkyKXyn8t/CD6TinxGjyLt57g==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/type@4.0.3': + resolution: {integrity: sha512-cKZN7qcXOpj1h+1eTTcGDVLaBIHNMT1Rz9JqJP5MnEJ0JhgVWllx7H/tahUp5YEK1qaByH2Itb8wLG/iScD5kw==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@napi-rs/cli@3.5.1': + resolution: {integrity: sha512-XBfLQRDcB3qhu6bazdMJsecWW55kR85l5/k0af9BIBELXQSsCFU0fzug7PX8eQp6vVdm7W/U3z6uP5WmITB2Gw==} + engines: {node: '>= 16'} + hasBin: true + peerDependencies: + '@emnapi/runtime': ^1.7.1 + peerDependenciesMeta: + '@emnapi/runtime': + optional: true + + '@napi-rs/cross-toolchain@1.0.3': + resolution: {integrity: sha512-ENPfLe4937bsKVTDA6zdABx4pq9w0tHqRrJHyaGxgaPq03a2Bd1unD5XSKjXJjebsABJ+MjAv1A2OvCgK9yehg==} + peerDependencies: + '@napi-rs/cross-toolchain-arm64-target-aarch64': ^1.0.3 + '@napi-rs/cross-toolchain-arm64-target-armv7': ^1.0.3 + '@napi-rs/cross-toolchain-arm64-target-ppc64le': ^1.0.3 + '@napi-rs/cross-toolchain-arm64-target-s390x': ^1.0.3 + '@napi-rs/cross-toolchain-arm64-target-x86_64': ^1.0.3 + '@napi-rs/cross-toolchain-x64-target-aarch64': ^1.0.3 + '@napi-rs/cross-toolchain-x64-target-armv7': ^1.0.3 + '@napi-rs/cross-toolchain-x64-target-ppc64le': ^1.0.3 + '@napi-rs/cross-toolchain-x64-target-s390x': ^1.0.3 + '@napi-rs/cross-toolchain-x64-target-x86_64': ^1.0.3 + peerDependenciesMeta: + '@napi-rs/cross-toolchain-arm64-target-aarch64': + optional: true + '@napi-rs/cross-toolchain-arm64-target-armv7': + optional: true + '@napi-rs/cross-toolchain-arm64-target-ppc64le': + optional: true + '@napi-rs/cross-toolchain-arm64-target-s390x': + optional: true + '@napi-rs/cross-toolchain-arm64-target-x86_64': + optional: true + '@napi-rs/cross-toolchain-x64-target-aarch64': + optional: true + '@napi-rs/cross-toolchain-x64-target-armv7': + optional: true + '@napi-rs/cross-toolchain-x64-target-ppc64le': + optional: true + '@napi-rs/cross-toolchain-x64-target-s390x': + optional: true + '@napi-rs/cross-toolchain-x64-target-x86_64': + optional: true + + '@napi-rs/lzma-android-arm-eabi@1.4.5': + resolution: {integrity: sha512-Up4gpyw2SacmyKWWEib06GhiDdF+H+CCU0LAV8pnM4aJIDqKKd5LHSlBht83Jut6frkB0vwEPmAkv4NjQ5u//Q==} + engines: {node: '>= 10'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.27.2': - resolution: {integrity: sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==} - engines: {node: '>=18'} - cpu: [x64] + '@napi-rs/lzma-android-arm64@1.4.5': + resolution: {integrity: sha512-uwa8sLlWEzkAM0MWyoZJg0JTD3BkPknvejAFG2acUA1raXM8jLrqujWCdOStisXhqQjZ2nDMp3FV6cs//zjfuQ==} + engines: {node: '>= 10'} + cpu: [arm64] os: [android] - '@esbuild/darwin-arm64@0.27.2': - resolution: {integrity: sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==} - engines: {node: '>=18'} + '@napi-rs/lzma-darwin-arm64@1.4.5': + resolution: {integrity: sha512-0Y0TQLQ2xAjVabrMDem1NhIssOZzF/y/dqetc6OT8mD3xMTDtF8u5BqZoX3MyPc9FzpsZw4ksol+w7DsxHrpMA==} + engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.27.2': - resolution: {integrity: sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==} - engines: {node: '>=18'} + '@napi-rs/lzma-darwin-x64@1.4.5': + resolution: {integrity: sha512-vR2IUyJY3En+V1wJkwmbGWcYiT8pHloTAWdW4pG24+51GIq+intst6Uf6D/r46citObGZrlX0QvMarOkQeHWpw==} + engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.27.2': - resolution: {integrity: sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==} - engines: {node: '>=18'} - cpu: [arm64] - os: [freebsd] - - '@esbuild/freebsd-x64@0.27.2': - resolution: {integrity: sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==} - engines: {node: '>=18'} + '@napi-rs/lzma-freebsd-x64@1.4.5': + resolution: {integrity: sha512-XpnYQC5SVovO35tF0xGkbHYjsS6kqyNCjuaLQ2dbEblFRr5cAZVvsJ/9h7zj/5FluJPJRDojVNxGyRhTp4z2lw==} + engines: {node: '>= 10'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.27.2': - resolution: {integrity: sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [linux] - - '@esbuild/linux-arm@0.27.2': - resolution: {integrity: sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==} - engines: {node: '>=18'} + '@napi-rs/lzma-linux-arm-gnueabihf@1.4.5': + resolution: {integrity: sha512-ic1ZZMoRfRMwtSwxkyw4zIlbDZGC6davC9r+2oX6x9QiF247BRqqT94qGeL5ZP4Vtz0Hyy7TEViWhx5j6Bpzvw==} + engines: {node: '>= 10'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.27.2': - resolution: {integrity: sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==} - engines: {node: '>=18'} - cpu: [ia32] - os: [linux] - - '@esbuild/linux-loong64@0.27.2': - resolution: {integrity: sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==} - engines: {node: '>=18'} - cpu: [loong64] + '@napi-rs/lzma-linux-arm64-gnu@1.4.5': + resolution: {integrity: sha512-asEp7FPd7C1Yi6DQb45a3KPHKOFBSfGuJWXcAd4/bL2Fjetb2n/KK2z14yfW8YC/Fv6x3rBM0VAZKmJuz4tysg==} + engines: {node: '>= 10'} + cpu: [arm64] os: [linux] - '@esbuild/linux-mips64el@0.27.2': - resolution: {integrity: sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==} - engines: {node: '>=18'} - cpu: [mips64el] + '@napi-rs/lzma-linux-arm64-musl@1.4.5': + resolution: {integrity: sha512-yWjcPDgJ2nIL3KNvi4536dlT/CcCWO0DUyEOlBs/SacG7BeD6IjGh6yYzd3/X1Y3JItCbZoDoLUH8iB1lTXo3w==} + engines: {node: '>= 10'} + cpu: [arm64] os: [linux] - '@esbuild/linux-ppc64@0.27.2': - resolution: {integrity: sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==} - engines: {node: '>=18'} + '@napi-rs/lzma-linux-ppc64-gnu@1.4.5': + resolution: {integrity: sha512-0XRhKuIU/9ZjT4WDIG/qnX7Xz7mSQHYZo9Gb3MP2gcvBgr6BA4zywQ9k3gmQaPn9ECE+CZg2V7DV7kT+x2pUMQ==} + engines: {node: '>= 10'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.27.2': - resolution: {integrity: sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==} - engines: {node: '>=18'} + '@napi-rs/lzma-linux-riscv64-gnu@1.4.5': + resolution: {integrity: sha512-QrqDIPEUUB23GCpyQj/QFyMlr8SGxxyExeZz9OWFnHfb70kXdTLWrHS/hEI1Ru+lSbQ/6xRqeoGyQ4Aqdg+/RA==} + engines: {node: '>= 10'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.27.2': - resolution: {integrity: sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==} - engines: {node: '>=18'} + '@napi-rs/lzma-linux-s390x-gnu@1.4.5': + resolution: {integrity: sha512-k8RVM5aMhW86E9H0QXdquwojew4H3SwPxbRVbl49/COJQWCUjGi79X6mYruMnMPEznZinUiT1jgKbFo2A00NdA==} + engines: {node: '>= 10'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.27.2': - resolution: {integrity: sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==} - engines: {node: '>=18'} + '@napi-rs/lzma-linux-x64-gnu@1.4.5': + resolution: {integrity: sha512-6rMtBgnIq2Wcl1rQdZsnM+rtCcVCbws1nF8S2NzaUsVaZv8bjrPiAa0lwg4Eqnn1d9lgwqT+cZgm5m+//K08Kw==} + engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.27.2': - resolution: {integrity: sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [netbsd] - - '@esbuild/netbsd-x64@0.27.2': - resolution: {integrity: sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==} - engines: {node: '>=18'} - cpu: [x64] - os: [netbsd] - - '@esbuild/openbsd-arm64@0.27.2': - resolution: {integrity: sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openbsd] - - '@esbuild/openbsd-x64@0.27.2': - resolution: {integrity: sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==} - engines: {node: '>=18'} + '@napi-rs/lzma-linux-x64-musl@1.4.5': + resolution: {integrity: sha512-eiadGBKi7Vd0bCArBUOO/qqRYPHt/VQVvGyYvDFt6C2ZSIjlD+HuOl+2oS1sjf4CFjK4eDIog6EdXnL0NE6iyQ==} + engines: {node: '>= 10'} cpu: [x64] - os: [openbsd] - - '@esbuild/openharmony-arm64@0.27.2': - resolution: {integrity: sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openharmony] + os: [linux] - '@esbuild/sunos-x64@0.27.2': - resolution: {integrity: sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==} - engines: {node: '>=18'} - cpu: [x64] - os: [sunos] + '@napi-rs/lzma-wasm32-wasi@1.4.5': + resolution: {integrity: sha512-+VyHHlr68dvey6fXc2hehw9gHVFIW3TtGF1XkcbAu65qVXsA9D/T+uuoRVqhE+JCyFHFrO0ixRbZDRK1XJt1sA==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] - '@esbuild/win32-arm64@0.27.2': - resolution: {integrity: sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==} - engines: {node: '>=18'} + '@napi-rs/lzma-win32-arm64-msvc@1.4.5': + resolution: {integrity: sha512-eewnqvIyyhHi3KaZtBOJXohLvwwN27gfS2G/YDWdfHlbz1jrmfeHAmzMsP5qv8vGB+T80TMHNkro4kYjeh6Deg==} + engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.27.2': - resolution: {integrity: sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==} - engines: {node: '>=18'} + '@napi-rs/lzma-win32-ia32-msvc@1.4.5': + resolution: {integrity: sha512-OeacFVRCJOKNU/a0ephUfYZ2Yt+NvaHze/4TgOwJ0J0P4P7X1mHzN+ig9Iyd74aQDXYqc7kaCXA2dpAOcH87Cg==} + engines: {node: '>= 10'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.27.2': - resolution: {integrity: sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==} - engines: {node: '>=18'} + '@napi-rs/lzma-win32-x64-msvc@1.4.5': + resolution: {integrity: sha512-T4I1SamdSmtyZgDXGAGP+y5LEK5vxHUFwe8mz6D4R7Sa5/WCxTcCIgPJ9BD7RkpO17lzhlaM2vmVvMy96Lvk9Q==} + engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@jridgewell/gen-mapping@0.3.13': - resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} - - '@jridgewell/resolve-uri@3.1.2': - resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} - engines: {node: '>=6.0.0'} - - '@jridgewell/sourcemap-codec@1.5.5': - resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} - - '@jridgewell/trace-mapping@0.3.31': - resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} - - '@napi-rs/cli@2.18.4': - resolution: {integrity: sha512-SgJeA4df9DE2iAEpr3M2H0OKl/yjtg1BnRI5/JyowS71tUWhrfSu2LT0V3vlHET+g1hBVlrO60PmEXwUEKp8Mg==} + '@napi-rs/lzma@1.4.5': + resolution: {integrity: sha512-zS5LuN1OBPAyZpda2ZZgYOEDC+xecUdAGnrvbYzjnLXkrq/OBC3B9qcRvlxbDR3k5H/gVfvef1/jyUqPknqjbg==} engines: {node: '>= 10'} - hasBin: true - '@rollup/rollup-android-arm-eabi@4.55.1': - resolution: {integrity: sha512-9R0DM/ykwfGIlNu6+2U09ga0WXeZ9MRC2Ter8jnz8415VbuIykVuc6bhdrbORFZANDmTDvq26mJrEVTl8TdnDg==} + '@napi-rs/tar-android-arm-eabi@1.1.0': + resolution: {integrity: sha512-h2Ryndraj/YiKgMV/r5by1cDusluYIRT0CaE0/PekQ4u+Wpy2iUVqvzVU98ZPnhXaNeYxEvVJHNGafpOfaD0TA==} + engines: {node: '>= 10'} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.55.1': - resolution: {integrity: sha512-eFZCb1YUqhTysgW3sj/55du5cG57S7UTNtdMjCW7LwVcj3dTTcowCsC8p7uBdzKsZYa8J7IDE8lhMI+HX1vQvg==} + '@napi-rs/tar-android-arm64@1.1.0': + resolution: {integrity: sha512-DJFyQHr1ZxNZorm/gzc1qBNLF/FcKzcH0V0Vwan5P+o0aE2keQIGEjJ09FudkF9v6uOuJjHCVDdK6S6uHtShAw==} + engines: {node: '>= 10'} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.55.1': - resolution: {integrity: sha512-p3grE2PHcQm2e8PSGZdzIhCKbMCw/xi9XvMPErPhwO17vxtvCN5FEA2mSLgmKlCjHGMQTP6phuQTYWUnKewwGg==} + '@napi-rs/tar-darwin-arm64@1.1.0': + resolution: {integrity: sha512-Zz2sXRzjIX4e532zD6xm2SjXEym6MkvfCvL2RMpG2+UwNVDVscHNcz3d47Pf3sysP2e2af7fBB3TIoK2f6trPw==} + engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.55.1': - resolution: {integrity: sha512-rDUjG25C9qoTm+e02Esi+aqTKSBYwVTaoS1wxcN47/Luqef57Vgp96xNANwt5npq9GDxsH7kXxNkJVEsWEOEaQ==} + '@napi-rs/tar-darwin-x64@1.1.0': + resolution: {integrity: sha512-EI+CptIMNweT0ms9S3mkP/q+J6FNZ1Q6pvpJOEcWglRfyfQpLqjlC0O+dptruTPE8VamKYuqdjxfqD8hifZDOA==} + engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.55.1': - resolution: {integrity: sha512-+JiU7Jbp5cdxekIgdte0jfcu5oqw4GCKr6i3PJTlXTCU5H5Fvtkpbs4XJHRmWNXF+hKmn4v7ogI5OQPaupJgOg==} - cpu: [arm64] - os: [freebsd] - - '@rollup/rollup-freebsd-x64@4.55.1': - resolution: {integrity: sha512-V5xC1tOVWtLLmr3YUk2f6EJK4qksksOYiz/TCsFHu/R+woubcLWdC9nZQmwjOAbmExBIVKsm1/wKmEy4z4u4Bw==} + '@napi-rs/tar-freebsd-x64@1.1.0': + resolution: {integrity: sha512-J0PIqX+pl6lBIAckL/c87gpodLbjZB1OtIK+RDscKC9NLdpVv6VGOxzUV/fYev/hctcE8EfkLbgFOfpmVQPg2g==} + engines: {node: '>= 10'} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.55.1': - resolution: {integrity: sha512-Rn3n+FUk2J5VWx+ywrG/HGPTD9jXNbicRtTM11e/uorplArnXZYsVifnPPqNNP5BsO3roI4n8332ukpY/zN7rQ==} - cpu: [arm] - os: [linux] - - '@rollup/rollup-linux-arm-musleabihf@4.55.1': - resolution: {integrity: sha512-grPNWydeKtc1aEdrJDWk4opD7nFtQbMmV7769hiAaYyUKCT1faPRm2av8CX1YJsZ4TLAZcg9gTR1KvEzoLjXkg==} + '@napi-rs/tar-linux-arm-gnueabihf@1.1.0': + resolution: {integrity: sha512-SLgIQo3f3EjkZ82ZwvrEgFvMdDAhsxCYjyoSuWfHCz0U16qx3SuGCp8+FYOPYCECHN3ZlGjXnoAIt9ERd0dEUg==} + engines: {node: '>= 10'} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.55.1': - resolution: {integrity: sha512-a59mwd1k6x8tXKcUxSyISiquLwB5pX+fJW9TkWU46lCqD/GRDe9uDN31jrMmVP3feI3mhAdvcCClhV8V5MhJFQ==} + '@napi-rs/tar-linux-arm64-gnu@1.1.0': + resolution: {integrity: sha512-d014cdle52EGaH6GpYTQOP9Py7glMO1zz/+ynJPjjzYFSxvdYx0byrjumZk2UQdIyGZiJO2MEFpCkEEKFSgPYA==} + engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.55.1': - resolution: {integrity: sha512-puS1MEgWX5GsHSoiAsF0TYrpomdvkaXm0CofIMG5uVkP6IBV+ZO9xhC5YEN49nsgYo1DuuMquF9+7EDBVYu4uA==} + '@napi-rs/tar-linux-arm64-musl@1.1.0': + resolution: {integrity: sha512-L/y1/26q9L/uBqiW/JdOb/Dc94egFvNALUZV2WCGKQXc6UByPBMgdiEyW2dtoYxYYYYc+AKD+jr+wQPcvX2vrQ==} + engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loong64-gnu@4.55.1': - resolution: {integrity: sha512-r3Wv40in+lTsULSb6nnoudVbARdOwb2u5fpeoOAZjFLznp6tDU8kd+GTHmJoqZ9lt6/Sys33KdIHUaQihFcu7g==} - cpu: [loong64] + '@napi-rs/tar-linux-ppc64-gnu@1.1.0': + resolution: {integrity: sha512-EPE1K/80RQvPbLRJDJs1QmCIcH+7WRi0F73+oTe1582y9RtfGRuzAkzeBuAGRXAQEjRQw/RjtNqr6UTJ+8UuWQ==} + engines: {node: '>= 10'} + cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-loong64-musl@4.55.1': - resolution: {integrity: sha512-MR8c0+UxAlB22Fq4R+aQSPBayvYa3+9DrwG/i1TKQXFYEaoW3B5b/rkSRIypcZDdWjWnpcvxbNaAJDcSbJU3Lw==} - cpu: [loong64] + '@napi-rs/tar-linux-s390x-gnu@1.1.0': + resolution: {integrity: sha512-B2jhWiB1ffw1nQBqLUP1h4+J1ovAxBOoe5N2IqDMOc63fsPZKNqF1PvO/dIem8z7LL4U4bsfmhy3gBfu547oNQ==} + engines: {node: '>= 10'} + cpu: [s390x] os: [linux] - '@rollup/rollup-linux-ppc64-gnu@4.55.1': - resolution: {integrity: sha512-3KhoECe1BRlSYpMTeVrD4sh2Pw2xgt4jzNSZIIPLFEsnQn9gAnZagW9+VqDqAHgm1Xc77LzJOo2LdigS5qZ+gw==} - cpu: [ppc64] + '@napi-rs/tar-linux-x64-gnu@1.1.0': + resolution: {integrity: sha512-tbZDHnb9617lTnsDMGo/eAMZxnsQFnaRe+MszRqHguKfMwkisc9CCJnks/r1o84u5fECI+J/HOrKXgczq/3Oww==} + engines: {node: '>= 10'} + cpu: [x64] os: [linux] - '@rollup/rollup-linux-ppc64-musl@4.55.1': - resolution: {integrity: sha512-ziR1OuZx0vdYZZ30vueNZTg73alF59DicYrPViG0NEgDVN8/Jl87zkAPu4u6VjZST2llgEUjaiNl9JM6HH1Vdw==} - cpu: [ppc64] + '@napi-rs/tar-linux-x64-musl@1.1.0': + resolution: {integrity: sha512-dV6cODlzbO8u6Anmv2N/ilQHq/AWz0xyltuXoLU3yUyXbZcnWYZuB2rL8OBGPmqNcD+x9NdScBNXh7vWN0naSQ==} + engines: {node: '>= 10'} + cpu: [x64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.55.1': - resolution: {integrity: sha512-uW0Y12ih2XJRERZ4jAfKamTyIHVMPQnTZcQjme2HMVDAHY4amf5u414OqNYC+x+LzRdRcnIG1YodLrrtA8xsxw==} - cpu: [riscv64] - os: [linux] + '@napi-rs/tar-wasm32-wasi@1.1.0': + resolution: {integrity: sha512-jIa9nb2HzOrfH0F8QQ9g3WE4aMH5vSI5/1NYVNm9ysCmNjCCtMXCAhlI3WKCdm/DwHf0zLqdrrtDFXODcNaqMw==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] - '@rollup/rollup-linux-riscv64-musl@4.55.1': - resolution: {integrity: sha512-u9yZ0jUkOED1BFrqu3BwMQoixvGHGZ+JhJNkNKY/hyoEgOwlqKb62qu+7UjbPSHYjiVy8kKJHvXKv5coH4wDeg==} - cpu: [riscv64] - os: [linux] + '@napi-rs/tar-win32-arm64-msvc@1.1.0': + resolution: {integrity: sha512-vfpG71OB0ijtjemp3WTdmBKJm9R70KM8vsSExMsIQtV0lVzP07oM1CW6JbNRPXNLhRoue9ofYLiUDk8bE0Hckg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] - '@rollup/rollup-linux-s390x-gnu@4.55.1': - resolution: {integrity: sha512-/0PenBCmqM4ZUd0190j7J0UsQ/1nsi735iPRakO8iPciE7BQ495Y6msPzaOmvx0/pn+eJVVlZrNrSh4WSYLxNg==} - cpu: [s390x] - os: [linux] + '@napi-rs/tar-win32-ia32-msvc@1.1.0': + resolution: {integrity: sha512-hGPyPW60YSpOSgzfy68DLBHgi6HxkAM+L59ZZZPMQ0TOXjQg+p2EW87+TjZfJOkSpbYiEkULwa/f4a2hcVjsqQ==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + + '@napi-rs/tar-win32-x64-msvc@1.1.0': + resolution: {integrity: sha512-L6Ed1DxXK9YSCMyvpR8MiNAyKNkQLjsHsHK9E0qnHa8NzLFqzDKhvs5LfnWxM2kJ+F7m/e5n9zPm24kHb3LsVw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + '@napi-rs/tar@1.1.0': + resolution: {integrity: sha512-7cmzIu+Vbupriudo7UudoMRH2OA3cTw67vva8MxeoAe5S7vPFI7z0vp0pMXiA25S8IUJefImQ90FeJjl8fjEaQ==} + engines: {node: '>= 10'} + + '@napi-rs/wasm-runtime@1.1.1': + resolution: {integrity: sha512-p64ah1M1ld8xjWv3qbvFwHiFVWrq1yFvV4f7w+mzaqiR4IlSgkqhcRdHwsGgomwzBH51sRY4NEowLxnaBjcW/A==} + + '@napi-rs/wasm-tools-android-arm-eabi@1.0.1': + resolution: {integrity: sha512-lr07E/l571Gft5v4aA1dI8koJEmF1F0UigBbsqg9OWNzg80H3lDPO+auv85y3T/NHE3GirDk7x/D3sLO57vayw==} + engines: {node: '>= 10'} + cpu: [arm] + os: [android] + + '@napi-rs/wasm-tools-android-arm64@1.0.1': + resolution: {integrity: sha512-WDR7S+aRLV6LtBJAg5fmjKkTZIdrEnnQxgdsb7Cf8pYiMWBHLU+LC49OUVppQ2YSPY0+GeYm9yuZWW3kLjJ7Bg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [android] - '@rollup/rollup-linux-x64-gnu@4.55.1': - resolution: {integrity: sha512-a8G4wiQxQG2BAvo+gU6XrReRRqj+pLS2NGXKm8io19goR+K8lw269eTrPkSdDTALwMmJp4th2Uh0D8J9bEV1vg==} + '@napi-rs/wasm-tools-darwin-arm64@1.0.1': + resolution: {integrity: sha512-qWTI+EEkiN0oIn/N2gQo7+TVYil+AJ20jjuzD2vATS6uIjVz+Updeqmszi7zq7rdFTLp6Ea3/z4kDKIfZwmR9g==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@napi-rs/wasm-tools-darwin-x64@1.0.1': + resolution: {integrity: sha512-bA6hubqtHROR5UI3tToAF/c6TDmaAgF0SWgo4rADHtQ4wdn0JeogvOk50gs2TYVhKPE2ZD2+qqt7oBKB+sxW3A==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@napi-rs/wasm-tools-freebsd-x64@1.0.1': + resolution: {integrity: sha512-90+KLBkD9hZEjPQW1MDfwSt5J1L46EUKacpCZWyRuL6iIEO5CgWU0V/JnEgFsDOGyyYtiTvHc5bUdUTWd4I9Vg==} + engines: {node: '>= 10'} cpu: [x64] + os: [freebsd] + + '@napi-rs/wasm-tools-linux-arm64-gnu@1.0.1': + resolution: {integrity: sha512-rG0QlS65x9K/u3HrKafDf8cFKj5wV2JHGfl8abWgKew0GVPyp6vfsDweOwHbWAjcHtp2LHi6JHoW80/MTHm52Q==} + engines: {node: '>= 10'} + cpu: [arm64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.55.1': - resolution: {integrity: sha512-bD+zjpFrMpP/hqkfEcnjXWHMw5BIghGisOKPj+2NaNDuVT+8Ds4mPf3XcPHuat1tz89WRL+1wbcxKY3WSbiT7w==} + '@napi-rs/wasm-tools-linux-arm64-musl@1.0.1': + resolution: {integrity: sha512-jAasbIvjZXCgX0TCuEFQr+4D6Lla/3AAVx2LmDuMjgG4xoIXzjKWl7c4chuaD+TI+prWT0X6LJcdzFT+ROKGHQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@napi-rs/wasm-tools-linux-x64-gnu@1.0.1': + resolution: {integrity: sha512-Plgk5rPqqK2nocBGajkMVbGm010Z7dnUgq0wtnYRZbzWWxwWcXfZMPa8EYxrK4eE8SzpI7VlZP1tdVsdjgGwMw==} + engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@rollup/rollup-openbsd-x64@4.55.1': - resolution: {integrity: sha512-eLXw0dOiqE4QmvikfQ6yjgkg/xDM+MdU9YJuP4ySTibXU0oAvnEWXt7UDJmD4UkYialMfOGFPJnIHSe/kdzPxg==} + '@napi-rs/wasm-tools-linux-x64-musl@1.0.1': + resolution: {integrity: sha512-GW7AzGuWxtQkyHknHWYFdR0CHmW6is8rG2Rf4V6GNmMpmwtXt/ItWYWtBe4zqJWycMNazpfZKSw/BpT7/MVCXQ==} + engines: {node: '>= 10'} cpu: [x64] - os: [openbsd] + os: [linux] - '@rollup/rollup-openharmony-arm64@4.55.1': - resolution: {integrity: sha512-xzm44KgEP11te3S2HCSyYf5zIzWmx3n8HDCc7EE59+lTcswEWNpvMLfd9uJvVX8LCg9QWG67Xt75AuHn4vgsXw==} - cpu: [arm64] - os: [openharmony] + '@napi-rs/wasm-tools-wasm32-wasi@1.0.1': + resolution: {integrity: sha512-/nQVSTrqSsn7YdAc2R7Ips/tnw5SPUcl3D7QrXCNGPqjbatIspnaexvaOYNyKMU6xPu+pc0BTnKVmqhlJJCPLA==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] - '@rollup/rollup-win32-arm64-msvc@4.55.1': - resolution: {integrity: sha512-yR6Bl3tMC/gBok5cz/Qi0xYnVbIxGx5Fcf/ca0eB6/6JwOY+SRUcJfI0OpeTpPls7f194as62thCt/2BjxYN8g==} + '@napi-rs/wasm-tools-win32-arm64-msvc@1.0.1': + resolution: {integrity: sha512-PFi7oJIBu5w7Qzh3dwFea3sHRO3pojMsaEnUIy22QvsW+UJfNQwJCryVrpoUt8m4QyZXI+saEq/0r4GwdoHYFQ==} + engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.55.1': - resolution: {integrity: sha512-3fZBidchE0eY0oFZBnekYCfg+5wAB0mbpCBuofh5mZuzIU/4jIVkbESmd2dOsFNS78b53CYv3OAtwqkZZmU5nA==} + '@napi-rs/wasm-tools-win32-ia32-msvc@1.0.1': + resolution: {integrity: sha512-gXkuYzxQsgkj05Zaq+KQTkHIN83dFAwMcTKa2aQcpYPRImFm2AQzEyLtpXmyCWzJ0F9ZYAOmbSyrNew8/us6bw==} + engines: {node: '>= 10'} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-gnu@4.55.1': - resolution: {integrity: sha512-xGGY5pXj69IxKb4yv/POoocPy/qmEGhimy/FoTpTSVju3FYXUQQMFCaZZXJVidsmGxRioZAwpThl/4zX41gRKg==} + '@napi-rs/wasm-tools-win32-x64-msvc@1.0.1': + resolution: {integrity: sha512-rEAf05nol3e3eei2sRButmgXP+6ATgm0/38MKhz9Isne82T4rPIMYsCIFj0kOisaGeVwoi2fnm7O9oWp5YVnYQ==} + engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.55.1': - resolution: {integrity: sha512-SPEpaL6DX4rmcXtnhdrQYgzQ5W2uW3SCJch88lB2zImhJRhIIK44fkUrgIV/Q8yUNfw5oyZ5vkeQsZLhCb06lw==} - cpu: [x64] - os: [win32] + '@napi-rs/wasm-tools@1.0.1': + resolution: {integrity: sha512-enkZYyuCdo+9jneCPE/0fjIta4wWnvVN9hBo2HuiMpRF0q3lzv1J6b/cl7i0mxZUKhBrV3aCKDBQnCOhwKbPmQ==} + engines: {node: '>= 10'} - '@types/estree@1.0.8': - resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} + '@octokit/auth-token@6.0.0': + resolution: {integrity: sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w==} + engines: {node: '>= 20'} + + '@octokit/core@7.0.6': + resolution: {integrity: sha512-DhGl4xMVFGVIyMwswXeyzdL4uXD5OGILGX5N8Y+f6W7LhC1Ze2poSNrkF/fedpVDHEEZ+PHFW0vL14I+mm8K3Q==} + engines: {node: '>= 20'} + + '@octokit/endpoint@11.0.2': + resolution: {integrity: sha512-4zCpzP1fWc7QlqunZ5bSEjxc6yLAlRTnDwKtgXfcI/FxxGoqedDG8V2+xJ60bV2kODqcGB+nATdtap/XYq2NZQ==} + engines: {node: '>= 20'} + + '@octokit/graphql@9.0.3': + resolution: {integrity: sha512-grAEuupr/C1rALFnXTv6ZQhFuL1D8G5y8CN04RgrO4FIPMrtm+mcZzFG7dcBm+nq+1ppNixu+Jd78aeJOYxlGA==} + engines: {node: '>= 20'} + + '@octokit/openapi-types@27.0.0': + resolution: {integrity: sha512-whrdktVs1h6gtR+09+QsNk2+FO+49j6ga1c55YZudfEG+oKJVvJLQi3zkOm5JjiUXAagWK2tI2kTGKJ2Ys7MGA==} + + '@octokit/plugin-paginate-rest@14.0.0': + resolution: {integrity: sha512-fNVRE7ufJiAA3XUrha2omTA39M6IXIc6GIZLvlbsm8QOQCYvpq/LkMNGyFlB1d8hTDzsAXa3OKtybdMAYsV/fw==} + engines: {node: '>= 20'} + peerDependencies: + '@octokit/core': '>=6' + + '@octokit/plugin-request-log@6.0.0': + resolution: {integrity: sha512-UkOzeEN3W91/eBq9sPZNQ7sUBvYCqYbrrD8gTbBuGtHEuycE4/awMXcYvx6sVYo7LypPhmQwwpUe4Yyu4QZN5Q==} + engines: {node: '>= 20'} + peerDependencies: + '@octokit/core': '>=6' + + '@octokit/plugin-rest-endpoint-methods@17.0.0': + resolution: {integrity: sha512-B5yCyIlOJFPqUUeiD0cnBJwWJO8lkJs5d8+ze9QDP6SvfiXSz1BF+91+0MeI1d2yxgOhU/O+CvtiZ9jSkHhFAw==} + engines: {node: '>= 20'} + peerDependencies: + '@octokit/core': '>=6' + + '@octokit/request-error@7.1.0': + resolution: {integrity: sha512-KMQIfq5sOPpkQYajXHwnhjCC0slzCNScLHs9JafXc4RAJI+9f+jNDlBNaIMTvazOPLgb4BnlhGJOTbnN0wIjPw==} + engines: {node: '>= 20'} + + '@octokit/request@10.0.7': + resolution: {integrity: sha512-v93h0i1yu4idj8qFPZwjehoJx4j3Ntn+JhXsdJrG9pYaX6j/XRz2RmasMUHtNgQD39nrv/VwTWSqK0RNXR8upA==} + engines: {node: '>= 20'} + + '@octokit/rest@22.0.1': + resolution: {integrity: sha512-Jzbhzl3CEexhnivb1iQ0KJ7s5vvjMWcmRtq5aUsKmKDrRW6z3r84ngmiFKFvpZjpiU/9/S6ITPFRpn5s/3uQJw==} + engines: {node: '>= 20'} + + '@octokit/types@16.0.0': + resolution: {integrity: sha512-sKq+9r1Mm4efXW1FCk7hFSeJo4QKreL/tTbR0rz/qx/r1Oa2VV83LTA/H/MuCOX7uCIJmQVRKBcbmWoySjAnSg==} + + '@tybys/wasm-util@0.10.1': + resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==} '@types/node@22.19.3': resolution: {integrity: sha512-1N9SBnWYOJTrNZCdh/yJE+t910Y128BoyY+zBLWhL3r0TYzlTmFdXrPwHL9DyFZmlEXNQQolTZh3KHV31QDhyA==} @@ -385,38 +611,34 @@ packages: peerDependencies: typescript: '*' - acorn@8.15.0: - resolution: {integrity: sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==} - engines: {node: '>=0.4.0'} - hasBin: true + ansi-regex@6.2.2: + resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==} + engines: {node: '>=12'} - any-promise@1.3.0: - resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} + engines: {node: '>=12'} - bundle-require@5.1.0: - resolution: {integrity: sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - peerDependencies: - esbuild: '>=0.18' + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - cac@6.7.14: - resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} - engines: {node: '>=8'} + before-after-hook@4.0.0: + resolution: {integrity: sha512-q6tR3RPqIB1pMiTRMFcZwuG5T8vwp+vUvEG0vuI6B+Rikh5BfPp2fQ82c925FOs+b0lcFQ8CFrL+KbilfZFhOQ==} - chokidar@4.0.3: - resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} - engines: {node: '>= 14.16.0'} + chardet@2.1.1: + resolution: {integrity: sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==} - commander@4.1.1: - resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} - engines: {node: '>= 6'} + cli-width@4.1.0: + resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} + engines: {node: '>= 12'} - confbox@0.1.8: - resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} + clipanion@4.0.0-rc.4: + resolution: {integrity: sha512-CXkMQxU6s9GklO/1f714dkKBMu1lopS1WFF0B8o4AxPykR1hpozxSiUZ5ZUeBjfPgCWqbcNOtZVFhB8Lkfp1+Q==} + peerDependencies: + typanion: '*' - consola@3.4.2: - resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} - engines: {node: ^14.18.0 || >=16.10.0} + colorette@2.0.20: + resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} debug@4.4.3: resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} @@ -427,160 +649,75 @@ packages: supports-color: optional: true - esbuild@0.27.2: - resolution: {integrity: sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==} - engines: {node: '>=18'} - hasBin: true - - fdir@6.5.0: - resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} - engines: {node: '>=12.0.0'} + emnapi@1.8.1: + resolution: {integrity: sha512-34i2BbgHx1LnEO4JCGQYo6h6s4e4KrdWtdTHfllBNLbXSHPmdIHplxKejfabsRK+ukNciqVdalB+fxMibqHdaQ==} peerDependencies: - picomatch: ^3 || ^4 + node-addon-api: '>= 6.1.0' peerDependenciesMeta: - picomatch: + node-addon-api: optional: true - fix-dts-default-cjs-exports@1.0.1: - resolution: {integrity: sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==} - - fsevents@2.3.3: - resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - - joycon@3.1.1: - resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} - engines: {node: '>=10'} + emoji-regex@10.6.0: + resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==} - lilconfig@3.1.3: - resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} - engines: {node: '>=14'} + es-toolkit@1.44.0: + resolution: {integrity: sha512-6penXeZalaV88MM3cGkFZZfOoLGWshWWfdy0tWw/RlVVyhvMaWSBTOvXNeiW3e5FwdS5ePW0LGEu17zT139ktg==} - lines-and-columns@1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + fast-content-type-parse@3.0.0: + resolution: {integrity: sha512-ZvLdcY8P+N8mGQJahJV5G4U88CSvT1rP8ApL6uETe88MBXrBHAkZlSEySdUlyztF7ccb+Znos3TFqaepHxdhBg==} - load-tsconfig@0.2.5: - resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + get-east-asian-width@1.4.0: + resolution: {integrity: sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==} + engines: {node: '>=18'} - magic-string@0.30.21: - resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + iconv-lite@0.7.2: + resolution: {integrity: sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==} + engines: {node: '>=0.10.0'} - mlly@1.8.0: - resolution: {integrity: sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g==} + js-yaml@4.1.1: + resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} + hasBin: true ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - mz@2.7.0: - resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} - - object-assign@4.1.1: - resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} - engines: {node: '>=0.10.0'} - - pathe@2.0.3: - resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} - - picocolors@1.1.1: - resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} - - picomatch@4.0.3: - resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} - engines: {node: '>=12'} + mute-stream@3.0.0: + resolution: {integrity: sha512-dkEJPVvun4FryqBmZ5KhDo0K9iDXAwn08tMLDinNdRBNPcYEDiWYysLcc6k3mjTMlbP9KyylvRpd4wFtwrT9rw==} + engines: {node: ^20.17.0 || >=22.9.0} - pirates@4.0.7: - resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} - engines: {node: '>= 6'} - - pkg-types@1.3.1: - resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} - - postcss-load-config@6.0.1: - resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==} - engines: {node: '>= 18'} - peerDependencies: - jiti: '>=1.21.0' - postcss: '>=8.0.9' - tsx: ^4.8.1 - yaml: ^2.4.2 - peerDependenciesMeta: - jiti: - optional: true - postcss: - optional: true - tsx: - optional: true - yaml: - optional: true + obug@2.1.1: + resolution: {integrity: sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==} prettier@3.7.4: resolution: {integrity: sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==} engines: {node: '>=14'} hasBin: true - readdirp@4.1.2: - resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} - engines: {node: '>= 14.18.0'} - - resolve-from@5.0.0: - resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} - engines: {node: '>=8'} + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - rollup@4.55.1: - resolution: {integrity: sha512-wDv/Ht1BNHB4upNbK74s9usvl7hObDnvVzknxqY/E/O3X6rW1U1rV1aENEfJ54eFZDTNo7zv1f5N4edCluH7+A==} - engines: {node: '>=18.0.0', npm: '>=8.0.0'} - hasBin: true - - source-map@0.7.6: - resolution: {integrity: sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==} - engines: {node: '>= 12'} - - sucrase@3.35.1: - resolution: {integrity: sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==} - engines: {node: '>=16 || 14 >=14.17'} + semver@7.7.4: + resolution: {integrity: sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==} + engines: {node: '>=10'} hasBin: true - thenify-all@1.6.0: - resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} - engines: {node: '>=0.8'} - - thenify@3.3.1: - resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} - - tinyexec@0.3.2: - resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} - tinyglobby@0.2.15: - resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} - engines: {node: '>=12.0.0'} + string-width@7.2.0: + resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} + engines: {node: '>=18'} - tree-kill@1.2.2: - resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} - hasBin: true + strip-ansi@7.1.2: + resolution: {integrity: sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==} + engines: {node: '>=12'} - ts-interface-checker@0.1.13: - resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - tsup@8.5.1: - resolution: {integrity: sha512-xtgkqwdhpKWr3tKPmCkvYmS9xnQK3m3XgxZHwSUjvfTjp7YfXe5tT3GgWi0F2N+ZSMsOeWeZFh7ZZFg5iPhing==} - engines: {node: '>=18'} - hasBin: true - peerDependencies: - '@microsoft/api-extractor': ^7.36.0 - '@swc/core': ^1 - postcss: ^8.4.12 - typescript: '>=4.5.0' - peerDependenciesMeta: - '@microsoft/api-extractor': - optional: true - '@swc/core': - optional: true - postcss: - optional: true - typescript: - optional: true + typanion@3.14.0: + resolution: {integrity: sha512-ZW/lVMRabETuYCd9O9ZvMhAh8GslSqaUjxmK/JLPCh6l73CvLBiuXswj/+7LdnWOgYsQ130FqLzFz5aGT4I3Ug==} typescript@4.5.2: resolution: {integrity: sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==} @@ -592,12 +729,16 @@ packages: engines: {node: '>=14.17'} hasBin: true - ufo@1.6.2: - resolution: {integrity: sha512-heMioaxBcG9+Znsda5Q8sQbWnLJSl98AFDXTO80wELWEzX3hordXsTdxrIfMQoO9IY1MEnoGoPjpoKpMj+Yx0Q==} - undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + universal-user-agent@7.0.3: + resolution: {integrity: sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==} + + wrap-ansi@9.0.2: + resolution: {integrity: sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==} + engines: {node: '>=18'} + snapshots: '@bufbuild/protobuf@1.10.1': {} @@ -618,176 +759,452 @@ snapshots: transitivePeerDependencies: - supports-color - '@esbuild/aix-ppc64@0.27.2': + '@emnapi/core@1.8.1': + dependencies: + '@emnapi/wasi-threads': 1.1.0 + tslib: 2.8.1 optional: true - '@esbuild/android-arm64@0.27.2': + '@emnapi/runtime@1.8.1': + dependencies: + tslib: 2.8.1 optional: true - '@esbuild/android-arm@0.27.2': + '@emnapi/wasi-threads@1.1.0': + dependencies: + tslib: 2.8.1 optional: true - '@esbuild/android-x64@0.27.2': - optional: true + '@inquirer/ansi@2.0.3': {} - '@esbuild/darwin-arm64@0.27.2': - optional: true + '@inquirer/checkbox@5.0.4(@types/node@22.19.3)': + dependencies: + '@inquirer/ansi': 2.0.3 + '@inquirer/core': 11.1.1(@types/node@22.19.3) + '@inquirer/figures': 2.0.3 + '@inquirer/type': 4.0.3(@types/node@22.19.3) + optionalDependencies: + '@types/node': 22.19.3 - '@esbuild/darwin-x64@0.27.2': - optional: true + '@inquirer/confirm@6.0.4(@types/node@22.19.3)': + dependencies: + '@inquirer/core': 11.1.1(@types/node@22.19.3) + '@inquirer/type': 4.0.3(@types/node@22.19.3) + optionalDependencies: + '@types/node': 22.19.3 - '@esbuild/freebsd-arm64@0.27.2': - optional: true + '@inquirer/core@11.1.1(@types/node@22.19.3)': + dependencies: + '@inquirer/ansi': 2.0.3 + '@inquirer/figures': 2.0.3 + '@inquirer/type': 4.0.3(@types/node@22.19.3) + cli-width: 4.1.0 + mute-stream: 3.0.0 + signal-exit: 4.1.0 + wrap-ansi: 9.0.2 + optionalDependencies: + '@types/node': 22.19.3 - '@esbuild/freebsd-x64@0.27.2': - optional: true + '@inquirer/editor@5.0.4(@types/node@22.19.3)': + dependencies: + '@inquirer/core': 11.1.1(@types/node@22.19.3) + '@inquirer/external-editor': 2.0.3(@types/node@22.19.3) + '@inquirer/type': 4.0.3(@types/node@22.19.3) + optionalDependencies: + '@types/node': 22.19.3 - '@esbuild/linux-arm64@0.27.2': - optional: true + '@inquirer/expand@5.0.4(@types/node@22.19.3)': + dependencies: + '@inquirer/core': 11.1.1(@types/node@22.19.3) + '@inquirer/type': 4.0.3(@types/node@22.19.3) + optionalDependencies: + '@types/node': 22.19.3 + + '@inquirer/external-editor@2.0.3(@types/node@22.19.3)': + dependencies: + chardet: 2.1.1 + iconv-lite: 0.7.2 + optionalDependencies: + '@types/node': 22.19.3 + + '@inquirer/figures@2.0.3': {} + + '@inquirer/input@5.0.4(@types/node@22.19.3)': + dependencies: + '@inquirer/core': 11.1.1(@types/node@22.19.3) + '@inquirer/type': 4.0.3(@types/node@22.19.3) + optionalDependencies: + '@types/node': 22.19.3 + + '@inquirer/number@4.0.4(@types/node@22.19.3)': + dependencies: + '@inquirer/core': 11.1.1(@types/node@22.19.3) + '@inquirer/type': 4.0.3(@types/node@22.19.3) + optionalDependencies: + '@types/node': 22.19.3 + + '@inquirer/password@5.0.4(@types/node@22.19.3)': + dependencies: + '@inquirer/ansi': 2.0.3 + '@inquirer/core': 11.1.1(@types/node@22.19.3) + '@inquirer/type': 4.0.3(@types/node@22.19.3) + optionalDependencies: + '@types/node': 22.19.3 + + '@inquirer/prompts@8.2.0(@types/node@22.19.3)': + dependencies: + '@inquirer/checkbox': 5.0.4(@types/node@22.19.3) + '@inquirer/confirm': 6.0.4(@types/node@22.19.3) + '@inquirer/editor': 5.0.4(@types/node@22.19.3) + '@inquirer/expand': 5.0.4(@types/node@22.19.3) + '@inquirer/input': 5.0.4(@types/node@22.19.3) + '@inquirer/number': 4.0.4(@types/node@22.19.3) + '@inquirer/password': 5.0.4(@types/node@22.19.3) + '@inquirer/rawlist': 5.2.0(@types/node@22.19.3) + '@inquirer/search': 4.1.0(@types/node@22.19.3) + '@inquirer/select': 5.0.4(@types/node@22.19.3) + optionalDependencies: + '@types/node': 22.19.3 + + '@inquirer/rawlist@5.2.0(@types/node@22.19.3)': + dependencies: + '@inquirer/core': 11.1.1(@types/node@22.19.3) + '@inquirer/type': 4.0.3(@types/node@22.19.3) + optionalDependencies: + '@types/node': 22.19.3 + + '@inquirer/search@4.1.0(@types/node@22.19.3)': + dependencies: + '@inquirer/core': 11.1.1(@types/node@22.19.3) + '@inquirer/figures': 2.0.3 + '@inquirer/type': 4.0.3(@types/node@22.19.3) + optionalDependencies: + '@types/node': 22.19.3 + + '@inquirer/select@5.0.4(@types/node@22.19.3)': + dependencies: + '@inquirer/ansi': 2.0.3 + '@inquirer/core': 11.1.1(@types/node@22.19.3) + '@inquirer/figures': 2.0.3 + '@inquirer/type': 4.0.3(@types/node@22.19.3) + optionalDependencies: + '@types/node': 22.19.3 + + '@inquirer/type@4.0.3(@types/node@22.19.3)': + optionalDependencies: + '@types/node': 22.19.3 + + '@napi-rs/cli@3.5.1(@emnapi/runtime@1.8.1)(@types/node@22.19.3)': + dependencies: + '@inquirer/prompts': 8.2.0(@types/node@22.19.3) + '@napi-rs/cross-toolchain': 1.0.3 + '@napi-rs/wasm-tools': 1.0.1 + '@octokit/rest': 22.0.1 + clipanion: 4.0.0-rc.4(typanion@3.14.0) + colorette: 2.0.20 + emnapi: 1.8.1 + es-toolkit: 1.44.0 + js-yaml: 4.1.1 + obug: 2.1.1 + semver: 7.7.4 + typanion: 3.14.0 + optionalDependencies: + '@emnapi/runtime': 1.8.1 + transitivePeerDependencies: + - '@napi-rs/cross-toolchain-arm64-target-aarch64' + - '@napi-rs/cross-toolchain-arm64-target-armv7' + - '@napi-rs/cross-toolchain-arm64-target-ppc64le' + - '@napi-rs/cross-toolchain-arm64-target-s390x' + - '@napi-rs/cross-toolchain-arm64-target-x86_64' + - '@napi-rs/cross-toolchain-x64-target-aarch64' + - '@napi-rs/cross-toolchain-x64-target-armv7' + - '@napi-rs/cross-toolchain-x64-target-ppc64le' + - '@napi-rs/cross-toolchain-x64-target-s390x' + - '@napi-rs/cross-toolchain-x64-target-x86_64' + - '@types/node' + - node-addon-api + - supports-color - '@esbuild/linux-arm@0.27.2': + '@napi-rs/cross-toolchain@1.0.3': + dependencies: + '@napi-rs/lzma': 1.4.5 + '@napi-rs/tar': 1.1.0 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + '@napi-rs/lzma-android-arm-eabi@1.4.5': optional: true - '@esbuild/linux-ia32@0.27.2': + '@napi-rs/lzma-android-arm64@1.4.5': optional: true - '@esbuild/linux-loong64@0.27.2': + '@napi-rs/lzma-darwin-arm64@1.4.5': optional: true - '@esbuild/linux-mips64el@0.27.2': + '@napi-rs/lzma-darwin-x64@1.4.5': optional: true - '@esbuild/linux-ppc64@0.27.2': + '@napi-rs/lzma-freebsd-x64@1.4.5': optional: true - '@esbuild/linux-riscv64@0.27.2': + '@napi-rs/lzma-linux-arm-gnueabihf@1.4.5': optional: true - '@esbuild/linux-s390x@0.27.2': + '@napi-rs/lzma-linux-arm64-gnu@1.4.5': optional: true - '@esbuild/linux-x64@0.27.2': + '@napi-rs/lzma-linux-arm64-musl@1.4.5': optional: true - '@esbuild/netbsd-arm64@0.27.2': + '@napi-rs/lzma-linux-ppc64-gnu@1.4.5': optional: true - '@esbuild/netbsd-x64@0.27.2': + '@napi-rs/lzma-linux-riscv64-gnu@1.4.5': optional: true - '@esbuild/openbsd-arm64@0.27.2': + '@napi-rs/lzma-linux-s390x-gnu@1.4.5': optional: true - '@esbuild/openbsd-x64@0.27.2': + '@napi-rs/lzma-linux-x64-gnu@1.4.5': optional: true - '@esbuild/openharmony-arm64@0.27.2': + '@napi-rs/lzma-linux-x64-musl@1.4.5': optional: true - '@esbuild/sunos-x64@0.27.2': + '@napi-rs/lzma-wasm32-wasi@1.4.5': + dependencies: + '@napi-rs/wasm-runtime': 1.1.1 optional: true - '@esbuild/win32-arm64@0.27.2': + '@napi-rs/lzma-win32-arm64-msvc@1.4.5': optional: true - '@esbuild/win32-ia32@0.27.2': + '@napi-rs/lzma-win32-ia32-msvc@1.4.5': optional: true - '@esbuild/win32-x64@0.27.2': + '@napi-rs/lzma-win32-x64-msvc@1.4.5': optional: true - '@jridgewell/gen-mapping@0.3.13': - dependencies: - '@jridgewell/sourcemap-codec': 1.5.5 - '@jridgewell/trace-mapping': 0.3.31 + '@napi-rs/lzma@1.4.5': + optionalDependencies: + '@napi-rs/lzma-android-arm-eabi': 1.4.5 + '@napi-rs/lzma-android-arm64': 1.4.5 + '@napi-rs/lzma-darwin-arm64': 1.4.5 + '@napi-rs/lzma-darwin-x64': 1.4.5 + '@napi-rs/lzma-freebsd-x64': 1.4.5 + '@napi-rs/lzma-linux-arm-gnueabihf': 1.4.5 + '@napi-rs/lzma-linux-arm64-gnu': 1.4.5 + '@napi-rs/lzma-linux-arm64-musl': 1.4.5 + '@napi-rs/lzma-linux-ppc64-gnu': 1.4.5 + '@napi-rs/lzma-linux-riscv64-gnu': 1.4.5 + '@napi-rs/lzma-linux-s390x-gnu': 1.4.5 + '@napi-rs/lzma-linux-x64-gnu': 1.4.5 + '@napi-rs/lzma-linux-x64-musl': 1.4.5 + '@napi-rs/lzma-wasm32-wasi': 1.4.5 + '@napi-rs/lzma-win32-arm64-msvc': 1.4.5 + '@napi-rs/lzma-win32-ia32-msvc': 1.4.5 + '@napi-rs/lzma-win32-x64-msvc': 1.4.5 + + '@napi-rs/tar-android-arm-eabi@1.1.0': + optional: true - '@jridgewell/resolve-uri@3.1.2': {} + '@napi-rs/tar-android-arm64@1.1.0': + optional: true - '@jridgewell/sourcemap-codec@1.5.5': {} + '@napi-rs/tar-darwin-arm64@1.1.0': + optional: true - '@jridgewell/trace-mapping@0.3.31': - dependencies: - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.5 + '@napi-rs/tar-darwin-x64@1.1.0': + optional: true - '@napi-rs/cli@2.18.4': {} + '@napi-rs/tar-freebsd-x64@1.1.0': + optional: true - '@rollup/rollup-android-arm-eabi@4.55.1': + '@napi-rs/tar-linux-arm-gnueabihf@1.1.0': optional: true - '@rollup/rollup-android-arm64@4.55.1': + '@napi-rs/tar-linux-arm64-gnu@1.1.0': optional: true - '@rollup/rollup-darwin-arm64@4.55.1': + '@napi-rs/tar-linux-arm64-musl@1.1.0': optional: true - '@rollup/rollup-darwin-x64@4.55.1': + '@napi-rs/tar-linux-ppc64-gnu@1.1.0': optional: true - '@rollup/rollup-freebsd-arm64@4.55.1': + '@napi-rs/tar-linux-s390x-gnu@1.1.0': optional: true - '@rollup/rollup-freebsd-x64@4.55.1': + '@napi-rs/tar-linux-x64-gnu@1.1.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.55.1': + '@napi-rs/tar-linux-x64-musl@1.1.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.55.1': + '@napi-rs/tar-wasm32-wasi@1.1.0': + dependencies: + '@napi-rs/wasm-runtime': 1.1.1 optional: true - '@rollup/rollup-linux-arm64-gnu@4.55.1': + '@napi-rs/tar-win32-arm64-msvc@1.1.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.55.1': + '@napi-rs/tar-win32-ia32-msvc@1.1.0': optional: true - '@rollup/rollup-linux-loong64-gnu@4.55.1': + '@napi-rs/tar-win32-x64-msvc@1.1.0': optional: true - '@rollup/rollup-linux-loong64-musl@4.55.1': + '@napi-rs/tar@1.1.0': + optionalDependencies: + '@napi-rs/tar-android-arm-eabi': 1.1.0 + '@napi-rs/tar-android-arm64': 1.1.0 + '@napi-rs/tar-darwin-arm64': 1.1.0 + '@napi-rs/tar-darwin-x64': 1.1.0 + '@napi-rs/tar-freebsd-x64': 1.1.0 + '@napi-rs/tar-linux-arm-gnueabihf': 1.1.0 + '@napi-rs/tar-linux-arm64-gnu': 1.1.0 + '@napi-rs/tar-linux-arm64-musl': 1.1.0 + '@napi-rs/tar-linux-ppc64-gnu': 1.1.0 + '@napi-rs/tar-linux-s390x-gnu': 1.1.0 + '@napi-rs/tar-linux-x64-gnu': 1.1.0 + '@napi-rs/tar-linux-x64-musl': 1.1.0 + '@napi-rs/tar-wasm32-wasi': 1.1.0 + '@napi-rs/tar-win32-arm64-msvc': 1.1.0 + '@napi-rs/tar-win32-ia32-msvc': 1.1.0 + '@napi-rs/tar-win32-x64-msvc': 1.1.0 + + '@napi-rs/wasm-runtime@1.1.1': + dependencies: + '@emnapi/core': 1.8.1 + '@emnapi/runtime': 1.8.1 + '@tybys/wasm-util': 0.10.1 optional: true - '@rollup/rollup-linux-ppc64-gnu@4.55.1': + '@napi-rs/wasm-tools-android-arm-eabi@1.0.1': optional: true - '@rollup/rollup-linux-ppc64-musl@4.55.1': + '@napi-rs/wasm-tools-android-arm64@1.0.1': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.55.1': + '@napi-rs/wasm-tools-darwin-arm64@1.0.1': optional: true - '@rollup/rollup-linux-riscv64-musl@4.55.1': + '@napi-rs/wasm-tools-darwin-x64@1.0.1': optional: true - '@rollup/rollup-linux-s390x-gnu@4.55.1': + '@napi-rs/wasm-tools-freebsd-x64@1.0.1': optional: true - '@rollup/rollup-linux-x64-gnu@4.55.1': + '@napi-rs/wasm-tools-linux-arm64-gnu@1.0.1': optional: true - '@rollup/rollup-linux-x64-musl@4.55.1': + '@napi-rs/wasm-tools-linux-arm64-musl@1.0.1': optional: true - '@rollup/rollup-openbsd-x64@4.55.1': + '@napi-rs/wasm-tools-linux-x64-gnu@1.0.1': optional: true - '@rollup/rollup-openharmony-arm64@4.55.1': + '@napi-rs/wasm-tools-linux-x64-musl@1.0.1': optional: true - '@rollup/rollup-win32-arm64-msvc@4.55.1': + '@napi-rs/wasm-tools-wasm32-wasi@1.0.1': + dependencies: + '@napi-rs/wasm-runtime': 1.1.1 optional: true - '@rollup/rollup-win32-ia32-msvc@4.55.1': + '@napi-rs/wasm-tools-win32-arm64-msvc@1.0.1': optional: true - '@rollup/rollup-win32-x64-gnu@4.55.1': + '@napi-rs/wasm-tools-win32-ia32-msvc@1.0.1': optional: true - '@rollup/rollup-win32-x64-msvc@4.55.1': + '@napi-rs/wasm-tools-win32-x64-msvc@1.0.1': optional: true - '@types/estree@1.0.8': {} + '@napi-rs/wasm-tools@1.0.1': + optionalDependencies: + '@napi-rs/wasm-tools-android-arm-eabi': 1.0.1 + '@napi-rs/wasm-tools-android-arm64': 1.0.1 + '@napi-rs/wasm-tools-darwin-arm64': 1.0.1 + '@napi-rs/wasm-tools-darwin-x64': 1.0.1 + '@napi-rs/wasm-tools-freebsd-x64': 1.0.1 + '@napi-rs/wasm-tools-linux-arm64-gnu': 1.0.1 + '@napi-rs/wasm-tools-linux-arm64-musl': 1.0.1 + '@napi-rs/wasm-tools-linux-x64-gnu': 1.0.1 + '@napi-rs/wasm-tools-linux-x64-musl': 1.0.1 + '@napi-rs/wasm-tools-wasm32-wasi': 1.0.1 + '@napi-rs/wasm-tools-win32-arm64-msvc': 1.0.1 + '@napi-rs/wasm-tools-win32-ia32-msvc': 1.0.1 + '@napi-rs/wasm-tools-win32-x64-msvc': 1.0.1 + + '@octokit/auth-token@6.0.0': {} + + '@octokit/core@7.0.6': + dependencies: + '@octokit/auth-token': 6.0.0 + '@octokit/graphql': 9.0.3 + '@octokit/request': 10.0.7 + '@octokit/request-error': 7.1.0 + '@octokit/types': 16.0.0 + before-after-hook: 4.0.0 + universal-user-agent: 7.0.3 + + '@octokit/endpoint@11.0.2': + dependencies: + '@octokit/types': 16.0.0 + universal-user-agent: 7.0.3 + + '@octokit/graphql@9.0.3': + dependencies: + '@octokit/request': 10.0.7 + '@octokit/types': 16.0.0 + universal-user-agent: 7.0.3 + + '@octokit/openapi-types@27.0.0': {} + + '@octokit/plugin-paginate-rest@14.0.0(@octokit/core@7.0.6)': + dependencies: + '@octokit/core': 7.0.6 + '@octokit/types': 16.0.0 + + '@octokit/plugin-request-log@6.0.0(@octokit/core@7.0.6)': + dependencies: + '@octokit/core': 7.0.6 + + '@octokit/plugin-rest-endpoint-methods@17.0.0(@octokit/core@7.0.6)': + dependencies: + '@octokit/core': 7.0.6 + '@octokit/types': 16.0.0 + + '@octokit/request-error@7.1.0': + dependencies: + '@octokit/types': 16.0.0 + + '@octokit/request@10.0.7': + dependencies: + '@octokit/endpoint': 11.0.2 + '@octokit/request-error': 7.1.0 + '@octokit/types': 16.0.0 + fast-content-type-parse: 3.0.0 + universal-user-agent: 7.0.3 + + '@octokit/rest@22.0.1': + dependencies: + '@octokit/core': 7.0.6 + '@octokit/plugin-paginate-rest': 14.0.0(@octokit/core@7.0.6) + '@octokit/plugin-request-log': 6.0.0(@octokit/core@7.0.6) + '@octokit/plugin-rest-endpoint-methods': 17.0.0(@octokit/core@7.0.6) + + '@octokit/types@16.0.0': + dependencies: + '@octokit/openapi-types': 27.0.0 + + '@tybys/wasm-util@0.10.1': + dependencies: + tslib: 2.8.1 + optional: true '@types/node@22.19.3': dependencies: @@ -800,219 +1217,85 @@ snapshots: transitivePeerDependencies: - supports-color - acorn@8.15.0: {} + ansi-regex@6.2.2: {} - any-promise@1.3.0: {} + ansi-styles@6.2.3: {} - bundle-require@5.1.0(esbuild@0.27.2): - dependencies: - esbuild: 0.27.2 - load-tsconfig: 0.2.5 + argparse@2.0.1: {} - cac@6.7.14: {} + before-after-hook@4.0.0: {} - chokidar@4.0.3: - dependencies: - readdirp: 4.1.2 + chardet@2.1.1: {} - commander@4.1.1: {} + cli-width@4.1.0: {} - confbox@0.1.8: {} + clipanion@4.0.0-rc.4(typanion@3.14.0): + dependencies: + typanion: 3.14.0 - consola@3.4.2: {} + colorette@2.0.20: {} debug@4.4.3: dependencies: ms: 2.1.3 - esbuild@0.27.2: - optionalDependencies: - '@esbuild/aix-ppc64': 0.27.2 - '@esbuild/android-arm': 0.27.2 - '@esbuild/android-arm64': 0.27.2 - '@esbuild/android-x64': 0.27.2 - '@esbuild/darwin-arm64': 0.27.2 - '@esbuild/darwin-x64': 0.27.2 - '@esbuild/freebsd-arm64': 0.27.2 - '@esbuild/freebsd-x64': 0.27.2 - '@esbuild/linux-arm': 0.27.2 - '@esbuild/linux-arm64': 0.27.2 - '@esbuild/linux-ia32': 0.27.2 - '@esbuild/linux-loong64': 0.27.2 - '@esbuild/linux-mips64el': 0.27.2 - '@esbuild/linux-ppc64': 0.27.2 - '@esbuild/linux-riscv64': 0.27.2 - '@esbuild/linux-s390x': 0.27.2 - '@esbuild/linux-x64': 0.27.2 - '@esbuild/netbsd-arm64': 0.27.2 - '@esbuild/netbsd-x64': 0.27.2 - '@esbuild/openbsd-arm64': 0.27.2 - '@esbuild/openbsd-x64': 0.27.2 - '@esbuild/openharmony-arm64': 0.27.2 - '@esbuild/sunos-x64': 0.27.2 - '@esbuild/win32-arm64': 0.27.2 - '@esbuild/win32-ia32': 0.27.2 - '@esbuild/win32-x64': 0.27.2 - - fdir@6.5.0(picomatch@4.0.3): - optionalDependencies: - picomatch: 4.0.3 + emnapi@1.8.1: {} - fix-dts-default-cjs-exports@1.0.1: - dependencies: - magic-string: 0.30.21 - mlly: 1.8.0 - rollup: 4.55.1 + emoji-regex@10.6.0: {} - fsevents@2.3.3: - optional: true - - joycon@3.1.1: {} - - lilconfig@3.1.3: {} + es-toolkit@1.44.0: {} - lines-and-columns@1.2.4: {} + fast-content-type-parse@3.0.0: {} - load-tsconfig@0.2.5: {} + get-east-asian-width@1.4.0: {} - magic-string@0.30.21: + iconv-lite@0.7.2: dependencies: - '@jridgewell/sourcemap-codec': 1.5.5 + safer-buffer: 2.1.2 - mlly@1.8.0: + js-yaml@4.1.1: dependencies: - acorn: 8.15.0 - pathe: 2.0.3 - pkg-types: 1.3.1 - ufo: 1.6.2 + argparse: 2.0.1 ms@2.1.3: {} - mz@2.7.0: - dependencies: - any-promise: 1.3.0 - object-assign: 4.1.1 - thenify-all: 1.6.0 + mute-stream@3.0.0: {} - object-assign@4.1.1: {} + obug@2.1.1: {} - pathe@2.0.3: {} + prettier@3.7.4: {} - picocolors@1.1.1: {} + safer-buffer@2.1.2: {} - picomatch@4.0.3: {} + semver@7.7.4: {} - pirates@4.0.7: {} + signal-exit@4.1.0: {} - pkg-types@1.3.1: + string-width@7.2.0: dependencies: - confbox: 0.1.8 - mlly: 1.8.0 - pathe: 2.0.3 + emoji-regex: 10.6.0 + get-east-asian-width: 1.4.0 + strip-ansi: 7.1.2 - postcss-load-config@6.0.1: + strip-ansi@7.1.2: dependencies: - lilconfig: 3.1.3 - - prettier@3.7.4: {} + ansi-regex: 6.2.2 - readdirp@4.1.2: {} + tslib@2.8.1: + optional: true - resolve-from@5.0.0: {} - - rollup@4.55.1: - dependencies: - '@types/estree': 1.0.8 - optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.55.1 - '@rollup/rollup-android-arm64': 4.55.1 - '@rollup/rollup-darwin-arm64': 4.55.1 - '@rollup/rollup-darwin-x64': 4.55.1 - '@rollup/rollup-freebsd-arm64': 4.55.1 - '@rollup/rollup-freebsd-x64': 4.55.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.55.1 - '@rollup/rollup-linux-arm-musleabihf': 4.55.1 - '@rollup/rollup-linux-arm64-gnu': 4.55.1 - '@rollup/rollup-linux-arm64-musl': 4.55.1 - '@rollup/rollup-linux-loong64-gnu': 4.55.1 - '@rollup/rollup-linux-loong64-musl': 4.55.1 - '@rollup/rollup-linux-ppc64-gnu': 4.55.1 - '@rollup/rollup-linux-ppc64-musl': 4.55.1 - '@rollup/rollup-linux-riscv64-gnu': 4.55.1 - '@rollup/rollup-linux-riscv64-musl': 4.55.1 - '@rollup/rollup-linux-s390x-gnu': 4.55.1 - '@rollup/rollup-linux-x64-gnu': 4.55.1 - '@rollup/rollup-linux-x64-musl': 4.55.1 - '@rollup/rollup-openbsd-x64': 4.55.1 - '@rollup/rollup-openharmony-arm64': 4.55.1 - '@rollup/rollup-win32-arm64-msvc': 4.55.1 - '@rollup/rollup-win32-ia32-msvc': 4.55.1 - '@rollup/rollup-win32-x64-gnu': 4.55.1 - '@rollup/rollup-win32-x64-msvc': 4.55.1 - fsevents: 2.3.3 - - source-map@0.7.6: {} - - sucrase@3.35.1: - dependencies: - '@jridgewell/gen-mapping': 0.3.13 - commander: 4.1.1 - lines-and-columns: 1.2.4 - mz: 2.7.0 - pirates: 4.0.7 - tinyglobby: 0.2.15 - ts-interface-checker: 0.1.13 - - thenify-all@1.6.0: - dependencies: - thenify: 3.3.1 - - thenify@3.3.1: - dependencies: - any-promise: 1.3.0 - - tinyexec@0.3.2: {} - - tinyglobby@0.2.15: - dependencies: - fdir: 6.5.0(picomatch@4.0.3) - picomatch: 4.0.3 - - tree-kill@1.2.2: {} - - ts-interface-checker@0.1.13: {} - - tsup@8.5.1(typescript@5.8.2): - dependencies: - bundle-require: 5.1.0(esbuild@0.27.2) - cac: 6.7.14 - chokidar: 4.0.3 - consola: 3.4.2 - debug: 4.4.3 - esbuild: 0.27.2 - fix-dts-default-cjs-exports: 1.0.1 - joycon: 3.1.1 - picocolors: 1.1.1 - postcss-load-config: 6.0.1 - resolve-from: 5.0.0 - rollup: 4.55.1 - source-map: 0.7.6 - sucrase: 3.35.1 - tinyexec: 0.3.2 - tinyglobby: 0.2.15 - tree-kill: 1.2.2 - optionalDependencies: - typescript: 5.8.2 - transitivePeerDependencies: - - jiti - - supports-color - - tsx - - yaml + typanion@3.14.0: {} typescript@4.5.2: {} typescript@5.8.2: {} - ufo@1.6.2: {} - undici-types@6.21.0: {} + + universal-user-agent@7.0.3: {} + + wrap-ansi@9.0.2: + dependencies: + ansi-styles: 6.2.3 + string-width: 7.2.0 + strip-ansi: 7.1.2 diff --git a/livekit-ffi-node-bindings/proto/audio_frame_pb.d.ts b/livekit-ffi-node-bindings/proto/audio_frame_pb.d.ts new file mode 100644 index 000000000..29303e20c --- /dev/null +++ b/livekit-ffi-node-bindings/proto/audio_frame_pb.d.ts @@ -0,0 +1,1590 @@ +// 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 "js_import_style=legacy_commonjs" +// @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 type { TrackSource } from "./track_pb.js"; +import type { FfiOwnedHandle } from "./handle_pb.js"; + +/** + * @generated from enum livekit.proto.SoxResamplerDataType + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.SoxQualityRecipe + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.SoxFlagBits + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.AudioStreamType + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.AudioSourceType + */ +export declare enum AudioSourceType { + /** + * @generated from enum value: AUDIO_SOURCE_NATIVE = 0; + */ + AUDIO_SOURCE_NATIVE = 0, +} + +/** + * Create a new AudioStream + * AudioStream is used to receive audio frames from a track + * + * @generated from message livekit.proto.NewAudioStreamRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.NewAudioStreamRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): NewAudioStreamRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): NewAudioStreamRequest; + + static fromJsonString(jsonString: string, options?: Partial): NewAudioStreamRequest; + + static equals(a: NewAudioStreamRequest | PlainMessage | undefined, b: NewAudioStreamRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.NewAudioStreamResponse + */ +export declare class NewAudioStreamResponse extends Message { + /** + * @generated from field: required livekit.proto.OwnedAudioStream stream = 1; + */ + stream?: OwnedAudioStream; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.NewAudioStreamResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): NewAudioStreamResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): NewAudioStreamResponse; + + static fromJsonString(jsonString: string, options?: Partial): NewAudioStreamResponse; + + static equals(a: NewAudioStreamResponse | PlainMessage | undefined, b: NewAudioStreamResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.AudioStreamFromParticipantRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.AudioStreamFromParticipantRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AudioStreamFromParticipantRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): AudioStreamFromParticipantRequest; + + static fromJsonString(jsonString: string, options?: Partial): AudioStreamFromParticipantRequest; + + static equals(a: AudioStreamFromParticipantRequest | PlainMessage | undefined, b: AudioStreamFromParticipantRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.AudioStreamFromParticipantResponse + */ +export declare class AudioStreamFromParticipantResponse extends Message { + /** + * @generated from field: required livekit.proto.OwnedAudioStream stream = 1; + */ + stream?: OwnedAudioStream; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.AudioStreamFromParticipantResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AudioStreamFromParticipantResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): AudioStreamFromParticipantResponse; + + static fromJsonString(jsonString: string, options?: Partial): AudioStreamFromParticipantResponse; + + static equals(a: AudioStreamFromParticipantResponse | PlainMessage | undefined, b: AudioStreamFromParticipantResponse | PlainMessage | undefined): boolean; +} + +/** + * Create a new AudioSource + * + * @generated from message livekit.proto.NewAudioSourceRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.NewAudioSourceRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): NewAudioSourceRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): NewAudioSourceRequest; + + static fromJsonString(jsonString: string, options?: Partial): NewAudioSourceRequest; + + static equals(a: NewAudioSourceRequest | PlainMessage | undefined, b: NewAudioSourceRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.NewAudioSourceResponse + */ +export declare class NewAudioSourceResponse extends Message { + /** + * @generated from field: required livekit.proto.OwnedAudioSource source = 1; + */ + source?: OwnedAudioSource; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.NewAudioSourceResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): NewAudioSourceResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): NewAudioSourceResponse; + + static fromJsonString(jsonString: string, options?: Partial): NewAudioSourceResponse; + + static equals(a: NewAudioSourceResponse | PlainMessage | undefined, b: NewAudioSourceResponse | PlainMessage | undefined): boolean; +} + +/** + * 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 declare 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; + + /** + * @generated from field: optional uint64 request_async_id = 3; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.CaptureAudioFrameRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CaptureAudioFrameRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): CaptureAudioFrameRequest; + + static fromJsonString(jsonString: string, options?: Partial): CaptureAudioFrameRequest; + + static equals(a: CaptureAudioFrameRequest | PlainMessage | undefined, b: CaptureAudioFrameRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.CaptureAudioFrameResponse + */ +export declare class CaptureAudioFrameResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.CaptureAudioFrameResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CaptureAudioFrameResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): CaptureAudioFrameResponse; + + static fromJsonString(jsonString: string, options?: Partial): CaptureAudioFrameResponse; + + static equals(a: CaptureAudioFrameResponse | PlainMessage | undefined, b: CaptureAudioFrameResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.CaptureAudioFrameCallback + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.CaptureAudioFrameCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CaptureAudioFrameCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): CaptureAudioFrameCallback; + + static fromJsonString(jsonString: string, options?: Partial): CaptureAudioFrameCallback; + + static equals(a: CaptureAudioFrameCallback | PlainMessage | undefined, b: CaptureAudioFrameCallback | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ClearAudioBufferRequest + */ +export declare class ClearAudioBufferRequest extends Message { + /** + * @generated from field: required uint64 source_handle = 1; + */ + sourceHandle?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ClearAudioBufferRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ClearAudioBufferRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ClearAudioBufferRequest; + + static fromJsonString(jsonString: string, options?: Partial): ClearAudioBufferRequest; + + static equals(a: ClearAudioBufferRequest | PlainMessage | undefined, b: ClearAudioBufferRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ClearAudioBufferResponse + */ +export declare class ClearAudioBufferResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ClearAudioBufferResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ClearAudioBufferResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ClearAudioBufferResponse; + + static fromJsonString(jsonString: string, options?: Partial): ClearAudioBufferResponse; + + static equals(a: ClearAudioBufferResponse | PlainMessage | undefined, b: ClearAudioBufferResponse | PlainMessage | undefined): boolean; +} + +/** + * Create a new AudioResampler + * + * @generated from message livekit.proto.NewAudioResamplerRequest + */ +export declare class NewAudioResamplerRequest extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.NewAudioResamplerRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): NewAudioResamplerRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): NewAudioResamplerRequest; + + static fromJsonString(jsonString: string, options?: Partial): NewAudioResamplerRequest; + + static equals(a: NewAudioResamplerRequest | PlainMessage | undefined, b: NewAudioResamplerRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.NewAudioResamplerResponse + */ +export declare class NewAudioResamplerResponse extends Message { + /** + * @generated from field: required livekit.proto.OwnedAudioResampler resampler = 1; + */ + resampler?: OwnedAudioResampler; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.NewAudioResamplerResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): NewAudioResamplerResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): NewAudioResamplerResponse; + + static fromJsonString(jsonString: string, options?: Partial): NewAudioResamplerResponse; + + static equals(a: NewAudioResamplerResponse | PlainMessage | undefined, b: NewAudioResamplerResponse | PlainMessage | undefined): boolean; +} + +/** + * Remix and resample an audio frame + * + * @generated from message livekit.proto.RemixAndResampleRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RemixAndResampleRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RemixAndResampleRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): RemixAndResampleRequest; + + static fromJsonString(jsonString: string, options?: Partial): RemixAndResampleRequest; + + static equals(a: RemixAndResampleRequest | PlainMessage | undefined, b: RemixAndResampleRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RemixAndResampleResponse + */ +export declare class RemixAndResampleResponse extends Message { + /** + * @generated from field: required livekit.proto.OwnedAudioFrameBuffer buffer = 1; + */ + buffer?: OwnedAudioFrameBuffer; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RemixAndResampleResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RemixAndResampleResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): RemixAndResampleResponse; + + static fromJsonString(jsonString: string, options?: Partial): RemixAndResampleResponse; + + static equals(a: RemixAndResampleResponse | PlainMessage | undefined, b: RemixAndResampleResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.NewApmRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.NewApmRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): NewApmRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): NewApmRequest; + + static fromJsonString(jsonString: string, options?: Partial): NewApmRequest; + + static equals(a: NewApmRequest | PlainMessage | undefined, b: NewApmRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.NewApmResponse + */ +export declare class NewApmResponse extends Message { + /** + * @generated from field: required livekit.proto.OwnedApm apm = 1; + */ + apm?: OwnedApm; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.NewApmResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): NewApmResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): NewApmResponse; + + static fromJsonString(jsonString: string, options?: Partial): NewApmResponse; + + static equals(a: NewApmResponse | PlainMessage | undefined, b: NewApmResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ApmProcessStreamRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ApmProcessStreamRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ApmProcessStreamRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ApmProcessStreamRequest; + + static fromJsonString(jsonString: string, options?: Partial): ApmProcessStreamRequest; + + static equals(a: ApmProcessStreamRequest | PlainMessage | undefined, b: ApmProcessStreamRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ApmProcessStreamResponse + */ +export declare class ApmProcessStreamResponse extends Message { + /** + * @generated from field: optional string error = 1; + */ + error?: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ApmProcessStreamResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ApmProcessStreamResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ApmProcessStreamResponse; + + static fromJsonString(jsonString: string, options?: Partial): ApmProcessStreamResponse; + + static equals(a: ApmProcessStreamResponse | PlainMessage | undefined, b: ApmProcessStreamResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ApmProcessReverseStreamRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ApmProcessReverseStreamRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ApmProcessReverseStreamRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ApmProcessReverseStreamRequest; + + static fromJsonString(jsonString: string, options?: Partial): ApmProcessReverseStreamRequest; + + static equals(a: ApmProcessReverseStreamRequest | PlainMessage | undefined, b: ApmProcessReverseStreamRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ApmProcessReverseStreamResponse + */ +export declare class ApmProcessReverseStreamResponse extends Message { + /** + * @generated from field: optional string error = 1; + */ + error?: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ApmProcessReverseStreamResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ApmProcessReverseStreamResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ApmProcessReverseStreamResponse; + + static fromJsonString(jsonString: string, options?: Partial): ApmProcessReverseStreamResponse; + + static equals(a: ApmProcessReverseStreamResponse | PlainMessage | undefined, b: ApmProcessReverseStreamResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ApmSetStreamDelayRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ApmSetStreamDelayRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ApmSetStreamDelayRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ApmSetStreamDelayRequest; + + static fromJsonString(jsonString: string, options?: Partial): ApmSetStreamDelayRequest; + + static equals(a: ApmSetStreamDelayRequest | PlainMessage | undefined, b: ApmSetStreamDelayRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ApmSetStreamDelayResponse + */ +export declare class ApmSetStreamDelayResponse extends Message { + /** + * @generated from field: optional string error = 1; + */ + error?: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ApmSetStreamDelayResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ApmSetStreamDelayResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ApmSetStreamDelayResponse; + + static fromJsonString(jsonString: string, options?: Partial): ApmSetStreamDelayResponse; + + static equals(a: ApmSetStreamDelayResponse | PlainMessage | undefined, b: ApmSetStreamDelayResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.NewSoxResamplerRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.NewSoxResamplerRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): NewSoxResamplerRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): NewSoxResamplerRequest; + + static fromJsonString(jsonString: string, options?: Partial): NewSoxResamplerRequest; + + static equals(a: NewSoxResamplerRequest | PlainMessage | undefined, b: NewSoxResamplerRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.NewSoxResamplerResponse + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.NewSoxResamplerResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): NewSoxResamplerResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): NewSoxResamplerResponse; + + static fromJsonString(jsonString: string, options?: Partial): NewSoxResamplerResponse; + + static equals(a: NewSoxResamplerResponse | PlainMessage | undefined, b: NewSoxResamplerResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.PushSoxResamplerRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.PushSoxResamplerRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PushSoxResamplerRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): PushSoxResamplerRequest; + + static fromJsonString(jsonString: string, options?: Partial): PushSoxResamplerRequest; + + static equals(a: PushSoxResamplerRequest | PlainMessage | undefined, b: PushSoxResamplerRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.PushSoxResamplerResponse + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.PushSoxResamplerResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PushSoxResamplerResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): PushSoxResamplerResponse; + + static fromJsonString(jsonString: string, options?: Partial): PushSoxResamplerResponse; + + static equals(a: PushSoxResamplerResponse | PlainMessage | undefined, b: PushSoxResamplerResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.FlushSoxResamplerRequest + */ +export declare class FlushSoxResamplerRequest extends Message { + /** + * @generated from field: required uint64 resampler_handle = 1; + */ + resamplerHandle?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.FlushSoxResamplerRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): FlushSoxResamplerRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): FlushSoxResamplerRequest; + + static fromJsonString(jsonString: string, options?: Partial): FlushSoxResamplerRequest; + + static equals(a: FlushSoxResamplerRequest | PlainMessage | undefined, b: FlushSoxResamplerRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.FlushSoxResamplerResponse + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.FlushSoxResamplerResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): FlushSoxResamplerResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): FlushSoxResamplerResponse; + + static fromJsonString(jsonString: string, options?: Partial): FlushSoxResamplerResponse; + + static equals(a: FlushSoxResamplerResponse | PlainMessage | undefined, b: FlushSoxResamplerResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.AudioFrameBufferInfo + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.AudioFrameBufferInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AudioFrameBufferInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): AudioFrameBufferInfo; + + static fromJsonString(jsonString: string, options?: Partial): AudioFrameBufferInfo; + + static equals(a: AudioFrameBufferInfo | PlainMessage | undefined, b: AudioFrameBufferInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.OwnedAudioFrameBuffer + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.OwnedAudioFrameBuffer"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedAudioFrameBuffer; + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedAudioFrameBuffer; + + static fromJsonString(jsonString: string, options?: Partial): OwnedAudioFrameBuffer; + + static equals(a: OwnedAudioFrameBuffer | PlainMessage | undefined, b: OwnedAudioFrameBuffer | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.AudioStreamInfo + */ +export declare class AudioStreamInfo extends Message { + /** + * @generated from field: required livekit.proto.AudioStreamType type = 1; + */ + type?: AudioStreamType; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.AudioStreamInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AudioStreamInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): AudioStreamInfo; + + static fromJsonString(jsonString: string, options?: Partial): AudioStreamInfo; + + static equals(a: AudioStreamInfo | PlainMessage | undefined, b: AudioStreamInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.OwnedAudioStream + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.OwnedAudioStream"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedAudioStream; + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedAudioStream; + + static fromJsonString(jsonString: string, options?: Partial): OwnedAudioStream; + + static equals(a: OwnedAudioStream | PlainMessage | undefined, b: OwnedAudioStream | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.AudioStreamEvent + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.AudioStreamEvent"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AudioStreamEvent; + + static fromJson(jsonValue: JsonValue, options?: Partial): AudioStreamEvent; + + static fromJsonString(jsonString: string, options?: Partial): AudioStreamEvent; + + static equals(a: AudioStreamEvent | PlainMessage | undefined, b: AudioStreamEvent | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.AudioFrameReceived + */ +export declare class AudioFrameReceived extends Message { + /** + * @generated from field: required livekit.proto.OwnedAudioFrameBuffer frame = 1; + */ + frame?: OwnedAudioFrameBuffer; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.AudioFrameReceived"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AudioFrameReceived; + + static fromJson(jsonValue: JsonValue, options?: Partial): AudioFrameReceived; + + static fromJsonString(jsonString: string, options?: Partial): AudioFrameReceived; + + static equals(a: AudioFrameReceived | PlainMessage | undefined, b: AudioFrameReceived | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.AudioStreamEOS + */ +export declare class AudioStreamEOS extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.AudioStreamEOS"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AudioStreamEOS; + + static fromJson(jsonValue: JsonValue, options?: Partial): AudioStreamEOS; + + static fromJsonString(jsonString: string, options?: Partial): AudioStreamEOS; + + static equals(a: AudioStreamEOS | PlainMessage | undefined, b: AudioStreamEOS | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.AudioSourceOptions + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.AudioSourceOptions"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AudioSourceOptions; + + static fromJson(jsonValue: JsonValue, options?: Partial): AudioSourceOptions; + + static fromJsonString(jsonString: string, options?: Partial): AudioSourceOptions; + + static equals(a: AudioSourceOptions | PlainMessage | undefined, b: AudioSourceOptions | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.AudioSourceInfo + */ +export declare class AudioSourceInfo extends Message { + /** + * @generated from field: required livekit.proto.AudioSourceType type = 2; + */ + type?: AudioSourceType; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.AudioSourceInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AudioSourceInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): AudioSourceInfo; + + static fromJsonString(jsonString: string, options?: Partial): AudioSourceInfo; + + static equals(a: AudioSourceInfo | PlainMessage | undefined, b: AudioSourceInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.OwnedAudioSource + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.OwnedAudioSource"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedAudioSource; + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedAudioSource; + + static fromJsonString(jsonString: string, options?: Partial): OwnedAudioSource; + + static equals(a: OwnedAudioSource | PlainMessage | undefined, b: OwnedAudioSource | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.AudioResamplerInfo + */ +export declare class AudioResamplerInfo extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.AudioResamplerInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AudioResamplerInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): AudioResamplerInfo; + + static fromJsonString(jsonString: string, options?: Partial): AudioResamplerInfo; + + static equals(a: AudioResamplerInfo | PlainMessage | undefined, b: AudioResamplerInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.OwnedAudioResampler + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.OwnedAudioResampler"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedAudioResampler; + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedAudioResampler; + + static fromJsonString(jsonString: string, options?: Partial): OwnedAudioResampler; + + static equals(a: OwnedAudioResampler | PlainMessage | undefined, b: OwnedAudioResampler | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.OwnedApm + */ +export declare class OwnedApm extends Message { + /** + * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; + */ + handle?: FfiOwnedHandle; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.OwnedApm"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedApm; + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedApm; + + static fromJsonString(jsonString: string, options?: Partial): OwnedApm; + + static equals(a: OwnedApm | PlainMessage | undefined, b: OwnedApm | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SoxResamplerInfo + */ +export declare class SoxResamplerInfo extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SoxResamplerInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SoxResamplerInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): SoxResamplerInfo; + + static fromJsonString(jsonString: string, options?: Partial): SoxResamplerInfo; + + static equals(a: SoxResamplerInfo | PlainMessage | undefined, b: SoxResamplerInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.OwnedSoxResampler + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.OwnedSoxResampler"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedSoxResampler; + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedSoxResampler; + + static fromJsonString(jsonString: string, options?: Partial): OwnedSoxResampler; + + static equals(a: OwnedSoxResampler | PlainMessage | undefined, b: OwnedSoxResampler | PlainMessage | undefined): boolean; +} + +/** + * Audio Filter Plugin + * + * @generated from message livekit.proto.LoadAudioFilterPluginRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.LoadAudioFilterPluginRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): LoadAudioFilterPluginRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): LoadAudioFilterPluginRequest; + + static fromJsonString(jsonString: string, options?: Partial): LoadAudioFilterPluginRequest; + + static equals(a: LoadAudioFilterPluginRequest | PlainMessage | undefined, b: LoadAudioFilterPluginRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.LoadAudioFilterPluginResponse + */ +export declare class LoadAudioFilterPluginResponse extends Message { + /** + * @generated from field: optional string error = 1; + */ + error?: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.LoadAudioFilterPluginResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): LoadAudioFilterPluginResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): LoadAudioFilterPluginResponse; + + static fromJsonString(jsonString: string, options?: Partial): LoadAudioFilterPluginResponse; + + static equals(a: LoadAudioFilterPluginResponse | PlainMessage | undefined, b: LoadAudioFilterPluginResponse | PlainMessage | undefined): boolean; +} + diff --git a/livekit-ffi-node-bindings/proto/audio_frame_pb.js b/livekit-ffi-node-bindings/proto/audio_frame_pb.js new file mode 100644 index 000000000..17e6d9f0d --- /dev/null +++ b/livekit-ffi-node-bindings/proto/audio_frame_pb.js @@ -0,0 +1,665 @@ +// 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 "js_import_style=legacy_commonjs" +// @generated from file audio_frame.proto (package livekit.proto, syntax proto2) +/* eslint-disable */ +// @ts-nocheck + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +const { proto2 } = require("@bufbuild/protobuf"); +const { TrackSource } = require("./track_pb.js"); +const { FfiOwnedHandle } = require("./handle_pb.js"); + +/** + * @generated from enum livekit.proto.SoxResamplerDataType + */ +const SoxResamplerDataType = /*@__PURE__*/ proto2.makeEnum( + "livekit.proto.SoxResamplerDataType", + [ + {no: 0, name: "SOXR_DATATYPE_INT16I"}, + {no: 1, name: "SOXR_DATATYPE_INT16S"}, + ], +); + +/** + * @generated from enum livekit.proto.SoxQualityRecipe + */ +const SoxQualityRecipe = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const SoxFlagBits = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const AudioStreamType = /*@__PURE__*/ proto2.makeEnum( + "livekit.proto.AudioStreamType", + [ + {no: 0, name: "AUDIO_STREAM_NATIVE"}, + {no: 1, name: "AUDIO_STREAM_HTML"}, + ], +); + +/** + * @generated from enum livekit.proto.AudioSourceType + */ +const AudioSourceType = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const NewAudioStreamRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.NewAudioStreamRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.NewAudioStreamResponse + */ +const NewAudioStreamResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.NewAudioStreamResponse", + () => [ + { no: 1, name: "stream", kind: "message", T: OwnedAudioStream, req: true }, + ], +); + +/** + * @generated from message livekit.proto.AudioStreamFromParticipantRequest + */ +const AudioStreamFromParticipantRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.AudioStreamFromParticipantRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.AudioStreamFromParticipantResponse + */ +const AudioStreamFromParticipantResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.AudioStreamFromParticipantResponse", + () => [ + { no: 1, name: "stream", kind: "message", T: OwnedAudioStream, req: true }, + ], +); + +/** + * Create a new AudioSource + * + * @generated from message livekit.proto.NewAudioSourceRequest + */ +const NewAudioSourceRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.NewAudioSourceRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.NewAudioSourceResponse + */ +const NewAudioSourceResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.NewAudioSourceResponse", + () => [ + { no: 1, name: "source", kind: "message", T: OwnedAudioSource, req: true }, + ], +); + +/** + * 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 + */ +const CaptureAudioFrameRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.CaptureAudioFrameRequest", + () => [ + { no: 1, name: "source_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "buffer", kind: "message", T: AudioFrameBufferInfo, req: true }, + { no: 3, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.CaptureAudioFrameResponse + */ +const CaptureAudioFrameResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.CaptureAudioFrameResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.CaptureAudioFrameCallback + */ +const CaptureAudioFrameCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.CaptureAudioFrameCallback", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.ClearAudioBufferRequest + */ +const ClearAudioBufferRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ClearAudioBufferRequest", + () => [ + { no: 1, name: "source_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.ClearAudioBufferResponse + */ +const ClearAudioBufferResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ClearAudioBufferResponse", + [], +); + +/** + * Create a new AudioResampler + * + * @generated from message livekit.proto.NewAudioResamplerRequest + */ +const NewAudioResamplerRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.NewAudioResamplerRequest", + [], +); + +/** + * @generated from message livekit.proto.NewAudioResamplerResponse + */ +const NewAudioResamplerResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.NewAudioResamplerResponse", + () => [ + { no: 1, name: "resampler", kind: "message", T: OwnedAudioResampler, req: true }, + ], +); + +/** + * Remix and resample an audio frame + * + * @generated from message livekit.proto.RemixAndResampleRequest + */ +const RemixAndResampleRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RemixAndResampleRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.RemixAndResampleResponse + */ +const RemixAndResampleResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RemixAndResampleResponse", + () => [ + { no: 1, name: "buffer", kind: "message", T: OwnedAudioFrameBuffer, req: true }, + ], +); + +/** + * @generated from message livekit.proto.NewApmRequest + */ +const NewApmRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.NewApmRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.NewApmResponse + */ +const NewApmResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.NewApmResponse", + () => [ + { no: 1, name: "apm", kind: "message", T: OwnedApm, req: true }, + ], +); + +/** + * @generated from message livekit.proto.ApmProcessStreamRequest + */ +const ApmProcessStreamRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ApmProcessStreamRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.ApmProcessStreamResponse + */ +const ApmProcessStreamResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ApmProcessStreamResponse", + () => [ + { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.ApmProcessReverseStreamRequest + */ +const ApmProcessReverseStreamRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ApmProcessReverseStreamRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.ApmProcessReverseStreamResponse + */ +const ApmProcessReverseStreamResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ApmProcessReverseStreamResponse", + () => [ + { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.ApmSetStreamDelayRequest + */ +const ApmSetStreamDelayRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ApmSetStreamDelayRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.ApmSetStreamDelayResponse + */ +const ApmSetStreamDelayResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ApmSetStreamDelayResponse", + () => [ + { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.NewSoxResamplerRequest + */ +const NewSoxResamplerRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.NewSoxResamplerRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.NewSoxResamplerResponse + */ +const NewSoxResamplerResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.NewSoxResamplerResponse", + () => [ + { no: 1, name: "resampler", kind: "message", T: OwnedSoxResampler, oneof: "message" }, + { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "message" }, + ], +); + +/** + * @generated from message livekit.proto.PushSoxResamplerRequest + */ +const PushSoxResamplerRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.PushSoxResamplerRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.PushSoxResamplerResponse + */ +const PushSoxResamplerResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.PushSoxResamplerResponse", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.FlushSoxResamplerRequest + */ +const FlushSoxResamplerRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.FlushSoxResamplerRequest", + () => [ + { no: 1, name: "resampler_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.FlushSoxResamplerResponse + */ +const FlushSoxResamplerResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.FlushSoxResamplerResponse", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.AudioFrameBufferInfo + */ +const AudioFrameBufferInfo = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.AudioFrameBufferInfo", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.OwnedAudioFrameBuffer + */ +const OwnedAudioFrameBuffer = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.OwnedAudioFrameBuffer", + () => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: AudioFrameBufferInfo, req: true }, + ], +); + +/** + * @generated from message livekit.proto.AudioStreamInfo + */ +const AudioStreamInfo = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.AudioStreamInfo", + () => [ + { no: 1, name: "type", kind: "enum", T: proto2.getEnumType(AudioStreamType), req: true }, + ], +); + +/** + * @generated from message livekit.proto.OwnedAudioStream + */ +const OwnedAudioStream = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.OwnedAudioStream", + () => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: AudioStreamInfo, req: true }, + ], +); + +/** + * @generated from message livekit.proto.AudioStreamEvent + */ +const AudioStreamEvent = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.AudioStreamEvent", + () => [ + { 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" }, + ], +); + +/** + * @generated from message livekit.proto.AudioFrameReceived + */ +const AudioFrameReceived = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.AudioFrameReceived", + () => [ + { no: 1, name: "frame", kind: "message", T: OwnedAudioFrameBuffer, req: true }, + ], +); + +/** + * @generated from message livekit.proto.AudioStreamEOS + */ +const AudioStreamEOS = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.AudioStreamEOS", + [], +); + +/** + * @generated from message livekit.proto.AudioSourceOptions + */ +const AudioSourceOptions = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.AudioSourceOptions", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.AudioSourceInfo + */ +const AudioSourceInfo = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.AudioSourceInfo", + () => [ + { no: 2, name: "type", kind: "enum", T: proto2.getEnumType(AudioSourceType), req: true }, + ], +); + +/** + * @generated from message livekit.proto.OwnedAudioSource + */ +const OwnedAudioSource = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.OwnedAudioSource", + () => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: AudioSourceInfo, req: true }, + ], +); + +/** + * @generated from message livekit.proto.AudioResamplerInfo + */ +const AudioResamplerInfo = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.AudioResamplerInfo", + [], +); + +/** + * @generated from message livekit.proto.OwnedAudioResampler + */ +const OwnedAudioResampler = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.OwnedAudioResampler", + () => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: AudioResamplerInfo, req: true }, + ], +); + +/** + * @generated from message livekit.proto.OwnedApm + */ +const OwnedApm = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.OwnedApm", + () => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + ], +); + +/** + * @generated from message livekit.proto.SoxResamplerInfo + */ +const SoxResamplerInfo = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SoxResamplerInfo", + [], +); + +/** + * @generated from message livekit.proto.OwnedSoxResampler + */ +const OwnedSoxResampler = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.OwnedSoxResampler", + () => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: SoxResamplerInfo, req: true }, + ], +); + +/** + * Audio Filter Plugin + * + * @generated from message livekit.proto.LoadAudioFilterPluginRequest + */ +const LoadAudioFilterPluginRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.LoadAudioFilterPluginRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.LoadAudioFilterPluginResponse + */ +const LoadAudioFilterPluginResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.LoadAudioFilterPluginResponse", + () => [ + { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ], +); + + +exports.SoxResamplerDataType = SoxResamplerDataType; +exports.SoxQualityRecipe = SoxQualityRecipe; +exports.SoxFlagBits = SoxFlagBits; +exports.AudioStreamType = AudioStreamType; +exports.AudioSourceType = AudioSourceType; +exports.NewAudioStreamRequest = NewAudioStreamRequest; +exports.NewAudioStreamResponse = NewAudioStreamResponse; +exports.AudioStreamFromParticipantRequest = AudioStreamFromParticipantRequest; +exports.AudioStreamFromParticipantResponse = AudioStreamFromParticipantResponse; +exports.NewAudioSourceRequest = NewAudioSourceRequest; +exports.NewAudioSourceResponse = NewAudioSourceResponse; +exports.CaptureAudioFrameRequest = CaptureAudioFrameRequest; +exports.CaptureAudioFrameResponse = CaptureAudioFrameResponse; +exports.CaptureAudioFrameCallback = CaptureAudioFrameCallback; +exports.ClearAudioBufferRequest = ClearAudioBufferRequest; +exports.ClearAudioBufferResponse = ClearAudioBufferResponse; +exports.NewAudioResamplerRequest = NewAudioResamplerRequest; +exports.NewAudioResamplerResponse = NewAudioResamplerResponse; +exports.RemixAndResampleRequest = RemixAndResampleRequest; +exports.RemixAndResampleResponse = RemixAndResampleResponse; +exports.NewApmRequest = NewApmRequest; +exports.NewApmResponse = NewApmResponse; +exports.ApmProcessStreamRequest = ApmProcessStreamRequest; +exports.ApmProcessStreamResponse = ApmProcessStreamResponse; +exports.ApmProcessReverseStreamRequest = ApmProcessReverseStreamRequest; +exports.ApmProcessReverseStreamResponse = ApmProcessReverseStreamResponse; +exports.ApmSetStreamDelayRequest = ApmSetStreamDelayRequest; +exports.ApmSetStreamDelayResponse = ApmSetStreamDelayResponse; +exports.NewSoxResamplerRequest = NewSoxResamplerRequest; +exports.NewSoxResamplerResponse = NewSoxResamplerResponse; +exports.PushSoxResamplerRequest = PushSoxResamplerRequest; +exports.PushSoxResamplerResponse = PushSoxResamplerResponse; +exports.FlushSoxResamplerRequest = FlushSoxResamplerRequest; +exports.FlushSoxResamplerResponse = FlushSoxResamplerResponse; +exports.AudioFrameBufferInfo = AudioFrameBufferInfo; +exports.OwnedAudioFrameBuffer = OwnedAudioFrameBuffer; +exports.AudioStreamInfo = AudioStreamInfo; +exports.OwnedAudioStream = OwnedAudioStream; +exports.AudioStreamEvent = AudioStreamEvent; +exports.AudioFrameReceived = AudioFrameReceived; +exports.AudioStreamEOS = AudioStreamEOS; +exports.AudioSourceOptions = AudioSourceOptions; +exports.AudioSourceInfo = AudioSourceInfo; +exports.OwnedAudioSource = OwnedAudioSource; +exports.AudioResamplerInfo = AudioResamplerInfo; +exports.OwnedAudioResampler = OwnedAudioResampler; +exports.OwnedApm = OwnedApm; +exports.SoxResamplerInfo = SoxResamplerInfo; +exports.OwnedSoxResampler = OwnedSoxResampler; +exports.LoadAudioFilterPluginRequest = LoadAudioFilterPluginRequest; +exports.LoadAudioFilterPluginResponse = LoadAudioFilterPluginResponse; diff --git a/livekit-ffi-node-bindings/proto/data_stream_pb.d.ts b/livekit-ffi-node-bindings/proto/data_stream_pb.d.ts new file mode 100644 index 000000000..6c7628f37 --- /dev/null +++ b/livekit-ffi-node-bindings/proto/data_stream_pb.d.ts @@ -0,0 +1,1940 @@ +// 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 "js_import_style=legacy_commonjs" +// @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 type { FfiOwnedHandle } from "./handle_pb.js"; +import type { EncryptionType } from "./e2ee_pb.js"; + +/** + * A reader for an incoming stream. + * + * @generated from message livekit.proto.OwnedTextStreamReader + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.OwnedTextStreamReader"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedTextStreamReader; + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedTextStreamReader; + + static fromJsonString(jsonString: string, options?: Partial): OwnedTextStreamReader; + + static equals(a: OwnedTextStreamReader | PlainMessage | undefined, b: OwnedTextStreamReader | PlainMessage | undefined): boolean; +} + +/** + * Reads an incoming text stream incrementally. + * + * @generated from message livekit.proto.TextStreamReaderReadIncrementalRequest + */ +export declare class TextStreamReaderReadIncrementalRequest extends Message { + /** + * @generated from field: required uint64 reader_handle = 1; + */ + readerHandle?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TextStreamReaderReadIncrementalRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderReadIncrementalRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderReadIncrementalRequest; + + static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderReadIncrementalRequest; + + static equals(a: TextStreamReaderReadIncrementalRequest | PlainMessage | undefined, b: TextStreamReaderReadIncrementalRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TextStreamReaderReadIncrementalResponse + */ +export declare class TextStreamReaderReadIncrementalResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TextStreamReaderReadIncrementalResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderReadIncrementalResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderReadIncrementalResponse; + + static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderReadIncrementalResponse; + + static equals(a: TextStreamReaderReadIncrementalResponse | PlainMessage | undefined, b: TextStreamReaderReadIncrementalResponse | PlainMessage | undefined): boolean; +} + +/** + * Reads an incoming text stream in its entirety. + * + * @generated from message livekit.proto.TextStreamReaderReadAllRequest + */ +export declare class TextStreamReaderReadAllRequest extends Message { + /** + * @generated from field: required uint64 reader_handle = 1; + */ + readerHandle?: bigint; + + /** + * @generated from field: optional uint64 request_async_id = 2; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TextStreamReaderReadAllRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderReadAllRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderReadAllRequest; + + static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderReadAllRequest; + + static equals(a: TextStreamReaderReadAllRequest | PlainMessage | undefined, b: TextStreamReaderReadAllRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TextStreamReaderReadAllResponse + */ +export declare class TextStreamReaderReadAllResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TextStreamReaderReadAllResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderReadAllResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderReadAllResponse; + + static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderReadAllResponse; + + static equals(a: TextStreamReaderReadAllResponse | PlainMessage | undefined, b: TextStreamReaderReadAllResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TextStreamReaderReadAllCallback + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TextStreamReaderReadAllCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderReadAllCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderReadAllCallback; + + static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderReadAllCallback; + + static equals(a: TextStreamReaderReadAllCallback | PlainMessage | undefined, b: TextStreamReaderReadAllCallback | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TextStreamReaderEvent + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TextStreamReaderEvent"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderEvent; + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderEvent; + + static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderEvent; + + static equals(a: TextStreamReaderEvent | PlainMessage | undefined, b: TextStreamReaderEvent | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TextStreamReaderChunkReceived + */ +export declare class TextStreamReaderChunkReceived extends Message { + /** + * @generated from field: required string content = 1; + */ + content?: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TextStreamReaderChunkReceived"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderChunkReceived; + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderChunkReceived; + + static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderChunkReceived; + + static equals(a: TextStreamReaderChunkReceived | PlainMessage | undefined, b: TextStreamReaderChunkReceived | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TextStreamReaderEOS + */ +export declare class TextStreamReaderEOS extends Message { + /** + * @generated from field: optional livekit.proto.StreamError error = 1; + */ + error?: StreamError; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TextStreamReaderEOS"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamReaderEOS; + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamReaderEOS; + + static fromJsonString(jsonString: string, options?: Partial): TextStreamReaderEOS; + + static equals(a: TextStreamReaderEOS | PlainMessage | undefined, b: TextStreamReaderEOS | PlainMessage | undefined): boolean; +} + +/** + * A reader for an incoming stream. + * + * @generated from message livekit.proto.OwnedByteStreamReader + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.OwnedByteStreamReader"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedByteStreamReader; + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedByteStreamReader; + + static fromJsonString(jsonString: string, options?: Partial): OwnedByteStreamReader; + + static equals(a: OwnedByteStreamReader | PlainMessage | undefined, b: OwnedByteStreamReader | PlainMessage | undefined): boolean; +} + +/** + * Reads an incoming byte stream incrementally. + * + * @generated from message livekit.proto.ByteStreamReaderReadIncrementalRequest + */ +export declare class ByteStreamReaderReadIncrementalRequest extends Message { + /** + * @generated from field: required uint64 reader_handle = 1; + */ + readerHandle?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderReadIncrementalRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderReadIncrementalRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderReadIncrementalRequest; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderReadIncrementalRequest; + + static equals(a: ByteStreamReaderReadIncrementalRequest | PlainMessage | undefined, b: ByteStreamReaderReadIncrementalRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ByteStreamReaderReadIncrementalResponse + */ +export declare class ByteStreamReaderReadIncrementalResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderReadIncrementalResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderReadIncrementalResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderReadIncrementalResponse; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderReadIncrementalResponse; + + static equals(a: ByteStreamReaderReadIncrementalResponse | PlainMessage | undefined, b: ByteStreamReaderReadIncrementalResponse | PlainMessage | undefined): boolean; +} + +/** + * Reads an incoming byte stream in its entirety. + * + * @generated from message livekit.proto.ByteStreamReaderReadAllRequest + */ +export declare class ByteStreamReaderReadAllRequest extends Message { + /** + * @generated from field: required uint64 reader_handle = 1; + */ + readerHandle?: bigint; + + /** + * @generated from field: optional uint64 request_async_id = 2; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderReadAllRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderReadAllRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderReadAllRequest; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderReadAllRequest; + + static equals(a: ByteStreamReaderReadAllRequest | PlainMessage | undefined, b: ByteStreamReaderReadAllRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ByteStreamReaderReadAllResponse + */ +export declare class ByteStreamReaderReadAllResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderReadAllResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderReadAllResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderReadAllResponse; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderReadAllResponse; + + static equals(a: ByteStreamReaderReadAllResponse | PlainMessage | undefined, b: ByteStreamReaderReadAllResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ByteStreamReaderReadAllCallback + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderReadAllCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderReadAllCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderReadAllCallback; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderReadAllCallback; + + static equals(a: ByteStreamReaderReadAllCallback | PlainMessage | undefined, b: ByteStreamReaderReadAllCallback | PlainMessage | undefined): boolean; +} + +/** + * Writes data from an incoming stream to a file as it arrives. + * + * @generated from message livekit.proto.ByteStreamReaderWriteToFileRequest + */ +export declare class ByteStreamReaderWriteToFileRequest extends Message { + /** + * @generated from field: required uint64 reader_handle = 1; + */ + readerHandle?: bigint; + + /** + * @generated from field: optional uint64 request_async_id = 2; + */ + requestAsyncId?: 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderWriteToFileRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderWriteToFileRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderWriteToFileRequest; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderWriteToFileRequest; + + static equals(a: ByteStreamReaderWriteToFileRequest | PlainMessage | undefined, b: ByteStreamReaderWriteToFileRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ByteStreamReaderWriteToFileResponse + */ +export declare class ByteStreamReaderWriteToFileResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderWriteToFileResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderWriteToFileResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderWriteToFileResponse; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderWriteToFileResponse; + + static equals(a: ByteStreamReaderWriteToFileResponse | PlainMessage | undefined, b: ByteStreamReaderWriteToFileResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ByteStreamReaderWriteToFileCallback + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderWriteToFileCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderWriteToFileCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderWriteToFileCallback; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderWriteToFileCallback; + + static equals(a: ByteStreamReaderWriteToFileCallback | PlainMessage | undefined, b: ByteStreamReaderWriteToFileCallback | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ByteStreamReaderEvent + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderEvent"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderEvent; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderEvent; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderEvent; + + static equals(a: ByteStreamReaderEvent | PlainMessage | undefined, b: ByteStreamReaderEvent | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ByteStreamReaderChunkReceived + */ +export declare class ByteStreamReaderChunkReceived extends Message { + /** + * @generated from field: required bytes content = 1; + */ + content?: Uint8Array; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderChunkReceived"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderChunkReceived; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderChunkReceived; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderChunkReceived; + + static equals(a: ByteStreamReaderChunkReceived | PlainMessage | undefined, b: ByteStreamReaderChunkReceived | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ByteStreamReaderEOS + */ +export declare class ByteStreamReaderEOS extends Message { + /** + * @generated from field: optional livekit.proto.StreamError error = 1; + */ + error?: StreamError; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamReaderEOS"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamReaderEOS; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamReaderEOS; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamReaderEOS; + + static equals(a: ByteStreamReaderEOS | PlainMessage | undefined, b: ByteStreamReaderEOS | PlainMessage | undefined): boolean; +} + +/** + * Sends the contents of a file over a data stream. + * + * @generated from message livekit.proto.StreamSendFileRequest + */ +export declare 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; + + /** + * @generated from field: optional uint64 request_async_id = 4; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.StreamSendFileRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendFileRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendFileRequest; + + static fromJsonString(jsonString: string, options?: Partial): StreamSendFileRequest; + + static equals(a: StreamSendFileRequest | PlainMessage | undefined, b: StreamSendFileRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.StreamSendFileResponse + */ +export declare class StreamSendFileResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.StreamSendFileResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendFileResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendFileResponse; + + static fromJsonString(jsonString: string, options?: Partial): StreamSendFileResponse; + + static equals(a: StreamSendFileResponse | PlainMessage | undefined, b: StreamSendFileResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.StreamSendFileCallback + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.StreamSendFileCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendFileCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendFileCallback; + + static fromJsonString(jsonString: string, options?: Partial): StreamSendFileCallback; + + static equals(a: StreamSendFileCallback | PlainMessage | undefined, b: StreamSendFileCallback | PlainMessage | undefined): boolean; +} + +/** + * Sends bytes over a data stream. + * + * @generated from message livekit.proto.StreamSendBytesRequest + */ +export declare 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; + + /** + * @generated from field: optional uint64 request_async_id = 4; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.StreamSendBytesRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendBytesRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendBytesRequest; + + static fromJsonString(jsonString: string, options?: Partial): StreamSendBytesRequest; + + static equals(a: StreamSendBytesRequest | PlainMessage | undefined, b: StreamSendBytesRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.StreamSendBytesResponse + */ +export declare class StreamSendBytesResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.StreamSendBytesResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendBytesResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendBytesResponse; + + static fromJsonString(jsonString: string, options?: Partial): StreamSendBytesResponse; + + static equals(a: StreamSendBytesResponse | PlainMessage | undefined, b: StreamSendBytesResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.StreamSendBytesCallback + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.StreamSendBytesCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendBytesCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendBytesCallback; + + static fromJsonString(jsonString: string, options?: Partial): StreamSendBytesCallback; + + static equals(a: StreamSendBytesCallback | PlainMessage | undefined, b: StreamSendBytesCallback | PlainMessage | undefined): boolean; +} + +/** + * Sends text over a data stream. + * + * @generated from message livekit.proto.StreamSendTextRequest + */ +export declare 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; + + /** + * @generated from field: optional uint64 request_async_id = 4; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.StreamSendTextRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendTextRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendTextRequest; + + static fromJsonString(jsonString: string, options?: Partial): StreamSendTextRequest; + + static equals(a: StreamSendTextRequest | PlainMessage | undefined, b: StreamSendTextRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.StreamSendTextResponse + */ +export declare class StreamSendTextResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.StreamSendTextResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendTextResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendTextResponse; + + static fromJsonString(jsonString: string, options?: Partial): StreamSendTextResponse; + + static equals(a: StreamSendTextResponse | PlainMessage | undefined, b: StreamSendTextResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.StreamSendTextCallback + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.StreamSendTextCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamSendTextCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamSendTextCallback; + + static fromJsonString(jsonString: string, options?: Partial): StreamSendTextCallback; + + static equals(a: StreamSendTextCallback | PlainMessage | undefined, b: StreamSendTextCallback | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.OwnedByteStreamWriter + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.OwnedByteStreamWriter"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedByteStreamWriter; + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedByteStreamWriter; + + static fromJsonString(jsonString: string, options?: Partial): OwnedByteStreamWriter; + + static equals(a: OwnedByteStreamWriter | PlainMessage | undefined, b: OwnedByteStreamWriter | PlainMessage | undefined): boolean; +} + +/** + * Opens an outgoing stream. + * Call must be balanced with a StreamCloseRequest. + * + * @generated from message livekit.proto.ByteStreamOpenRequest + */ +export declare 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; + + /** + * @generated from field: optional uint64 request_async_id = 3; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamOpenRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamOpenRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamOpenRequest; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamOpenRequest; + + static equals(a: ByteStreamOpenRequest | PlainMessage | undefined, b: ByteStreamOpenRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ByteStreamOpenResponse + */ +export declare class ByteStreamOpenResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamOpenResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamOpenResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamOpenResponse; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamOpenResponse; + + static equals(a: ByteStreamOpenResponse | PlainMessage | undefined, b: ByteStreamOpenResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ByteStreamOpenCallback + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamOpenCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamOpenCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamOpenCallback; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamOpenCallback; + + static equals(a: ByteStreamOpenCallback | PlainMessage | undefined, b: ByteStreamOpenCallback | PlainMessage | undefined): boolean; +} + +/** + * Writes data to a stream writer. + * + * @generated from message livekit.proto.ByteStreamWriterWriteRequest + */ +export declare class ByteStreamWriterWriteRequest extends Message { + /** + * @generated from field: required uint64 writer_handle = 1; + */ + writerHandle?: bigint; + + /** + * @generated from field: required bytes bytes = 2; + */ + bytes?: Uint8Array; + + /** + * @generated from field: optional uint64 request_async_id = 3; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamWriterWriteRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamWriterWriteRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamWriterWriteRequest; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamWriterWriteRequest; + + static equals(a: ByteStreamWriterWriteRequest | PlainMessage | undefined, b: ByteStreamWriterWriteRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ByteStreamWriterWriteResponse + */ +export declare class ByteStreamWriterWriteResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamWriterWriteResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamWriterWriteResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamWriterWriteResponse; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamWriterWriteResponse; + + static equals(a: ByteStreamWriterWriteResponse | PlainMessage | undefined, b: ByteStreamWriterWriteResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ByteStreamWriterWriteCallback + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamWriterWriteCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamWriterWriteCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamWriterWriteCallback; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamWriterWriteCallback; + + static equals(a: ByteStreamWriterWriteCallback | PlainMessage | undefined, b: ByteStreamWriterWriteCallback | PlainMessage | undefined): boolean; +} + +/** + * Closes a stream writer. + * + * @generated from message livekit.proto.ByteStreamWriterCloseRequest + */ +export declare class ByteStreamWriterCloseRequest extends Message { + /** + * @generated from field: required uint64 writer_handle = 1; + */ + writerHandle?: bigint; + + /** + * @generated from field: optional string reason = 2; + */ + reason?: string; + + /** + * @generated from field: optional uint64 request_async_id = 3; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamWriterCloseRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamWriterCloseRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamWriterCloseRequest; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamWriterCloseRequest; + + static equals(a: ByteStreamWriterCloseRequest | PlainMessage | undefined, b: ByteStreamWriterCloseRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ByteStreamWriterCloseResponse + */ +export declare class ByteStreamWriterCloseResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamWriterCloseResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamWriterCloseResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamWriterCloseResponse; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamWriterCloseResponse; + + static equals(a: ByteStreamWriterCloseResponse | PlainMessage | undefined, b: ByteStreamWriterCloseResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ByteStreamWriterCloseCallback + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamWriterCloseCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamWriterCloseCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamWriterCloseCallback; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamWriterCloseCallback; + + static equals(a: ByteStreamWriterCloseCallback | PlainMessage | undefined, b: ByteStreamWriterCloseCallback | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.OwnedTextStreamWriter + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.OwnedTextStreamWriter"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedTextStreamWriter; + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedTextStreamWriter; + + static fromJsonString(jsonString: string, options?: Partial): OwnedTextStreamWriter; + + static equals(a: OwnedTextStreamWriter | PlainMessage | undefined, b: OwnedTextStreamWriter | PlainMessage | undefined): boolean; +} + +/** + * Opens an outgoing text stream. + * Call must be balanced with a TextStreamCloseRequest. + * + * @generated from message livekit.proto.TextStreamOpenRequest + */ +export declare 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; + + /** + * @generated from field: optional uint64 request_async_id = 3; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TextStreamOpenRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamOpenRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamOpenRequest; + + static fromJsonString(jsonString: string, options?: Partial): TextStreamOpenRequest; + + static equals(a: TextStreamOpenRequest | PlainMessage | undefined, b: TextStreamOpenRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TextStreamOpenResponse + */ +export declare class TextStreamOpenResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TextStreamOpenResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamOpenResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamOpenResponse; + + static fromJsonString(jsonString: string, options?: Partial): TextStreamOpenResponse; + + static equals(a: TextStreamOpenResponse | PlainMessage | undefined, b: TextStreamOpenResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TextStreamOpenCallback + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TextStreamOpenCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamOpenCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamOpenCallback; + + static fromJsonString(jsonString: string, options?: Partial): TextStreamOpenCallback; + + static equals(a: TextStreamOpenCallback | PlainMessage | undefined, b: TextStreamOpenCallback | PlainMessage | undefined): boolean; +} + +/** + * Writes text to a text stream writer. + * + * @generated from message livekit.proto.TextStreamWriterWriteRequest + */ +export declare class TextStreamWriterWriteRequest extends Message { + /** + * @generated from field: required uint64 writer_handle = 1; + */ + writerHandle?: bigint; + + /** + * @generated from field: required string text = 2; + */ + text?: string; + + /** + * @generated from field: optional uint64 request_async_id = 3; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TextStreamWriterWriteRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamWriterWriteRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamWriterWriteRequest; + + static fromJsonString(jsonString: string, options?: Partial): TextStreamWriterWriteRequest; + + static equals(a: TextStreamWriterWriteRequest | PlainMessage | undefined, b: TextStreamWriterWriteRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TextStreamWriterWriteResponse + */ +export declare class TextStreamWriterWriteResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TextStreamWriterWriteResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamWriterWriteResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamWriterWriteResponse; + + static fromJsonString(jsonString: string, options?: Partial): TextStreamWriterWriteResponse; + + static equals(a: TextStreamWriterWriteResponse | PlainMessage | undefined, b: TextStreamWriterWriteResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TextStreamWriterWriteCallback + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TextStreamWriterWriteCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamWriterWriteCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamWriterWriteCallback; + + static fromJsonString(jsonString: string, options?: Partial): TextStreamWriterWriteCallback; + + static equals(a: TextStreamWriterWriteCallback | PlainMessage | undefined, b: TextStreamWriterWriteCallback | PlainMessage | undefined): boolean; +} + +/** + * Closes a text stream writer. + * + * @generated from message livekit.proto.TextStreamWriterCloseRequest + */ +export declare class TextStreamWriterCloseRequest extends Message { + /** + * @generated from field: required uint64 writer_handle = 1; + */ + writerHandle?: bigint; + + /** + * @generated from field: optional string reason = 2; + */ + reason?: string; + + /** + * @generated from field: optional uint64 request_async_id = 3; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TextStreamWriterCloseRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamWriterCloseRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamWriterCloseRequest; + + static fromJsonString(jsonString: string, options?: Partial): TextStreamWriterCloseRequest; + + static equals(a: TextStreamWriterCloseRequest | PlainMessage | undefined, b: TextStreamWriterCloseRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TextStreamWriterCloseResponse + */ +export declare class TextStreamWriterCloseResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TextStreamWriterCloseResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamWriterCloseResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamWriterCloseResponse; + + static fromJsonString(jsonString: string, options?: Partial): TextStreamWriterCloseResponse; + + static equals(a: TextStreamWriterCloseResponse | PlainMessage | undefined, b: TextStreamWriterCloseResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TextStreamWriterCloseCallback + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TextStreamWriterCloseCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamWriterCloseCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamWriterCloseCallback; + + static fromJsonString(jsonString: string, options?: Partial): TextStreamWriterCloseCallback; + + static equals(a: TextStreamWriterCloseCallback | PlainMessage | undefined, b: TextStreamWriterCloseCallback | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TextStreamInfo + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TextStreamInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamInfo; + + static fromJsonString(jsonString: string, options?: Partial): TextStreamInfo; + + static equals(a: TextStreamInfo | PlainMessage | undefined, b: TextStreamInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from enum livekit.proto.TextStreamInfo.OperationType + */ +export declare 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, +} + +/** + * @generated from message livekit.proto.ByteStreamInfo + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamInfo; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamInfo; + + static equals(a: ByteStreamInfo | PlainMessage | undefined, b: ByteStreamInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.StreamTextOptions + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.StreamTextOptions"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamTextOptions; + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamTextOptions; + + static fromJsonString(jsonString: string, options?: Partial): StreamTextOptions; + + static equals(a: StreamTextOptions | PlainMessage | undefined, b: StreamTextOptions | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.StreamByteOptions + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.StreamByteOptions"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamByteOptions; + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamByteOptions; + + static fromJsonString(jsonString: string, options?: Partial): StreamByteOptions; + + static equals(a: StreamByteOptions | PlainMessage | undefined, b: StreamByteOptions | PlainMessage | undefined): boolean; +} + +/** + * Error pertaining to a stream. + * + * @generated from message livekit.proto.StreamError + */ +export declare class StreamError extends Message { + /** + * TODO(ladvoc): make this an enum. + * + * @generated from field: required string description = 1; + */ + description?: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.StreamError"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamError; + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamError; + + static fromJsonString(jsonString: string, options?: Partial): StreamError; + + static equals(a: StreamError | PlainMessage | undefined, b: StreamError | PlainMessage | undefined): boolean; +} + diff --git a/livekit-ffi-node-bindings/proto/data_stream_pb.js b/livekit-ffi-node-bindings/proto/data_stream_pb.js new file mode 100644 index 000000000..cd503c137 --- /dev/null +++ b/livekit-ffi-node-bindings/proto/data_stream_pb.js @@ -0,0 +1,764 @@ +// 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 "js_import_style=legacy_commonjs" +// @generated from file data_stream.proto (package livekit.proto, syntax proto2) +/* eslint-disable */ +// @ts-nocheck + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +const { proto2 } = require("@bufbuild/protobuf"); +const { FfiOwnedHandle } = require("./handle_pb.js"); +const { EncryptionType } = require("./e2ee_pb.js"); + +/** + * A reader for an incoming stream. + * + * @generated from message livekit.proto.OwnedTextStreamReader + */ +const OwnedTextStreamReader = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.OwnedTextStreamReader", + () => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: TextStreamInfo, req: true }, + ], +); + +/** + * Reads an incoming text stream incrementally. + * + * @generated from message livekit.proto.TextStreamReaderReadIncrementalRequest + */ +const TextStreamReaderReadIncrementalRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TextStreamReaderReadIncrementalRequest", + () => [ + { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.TextStreamReaderReadIncrementalResponse + */ +const TextStreamReaderReadIncrementalResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TextStreamReaderReadIncrementalResponse", + [], +); + +/** + * Reads an incoming text stream in its entirety. + * + * @generated from message livekit.proto.TextStreamReaderReadAllRequest + */ +const TextStreamReaderReadAllRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TextStreamReaderReadAllRequest", + () => [ + { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.TextStreamReaderReadAllResponse + */ +const TextStreamReaderReadAllResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TextStreamReaderReadAllResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.TextStreamReaderReadAllCallback + */ +const TextStreamReaderReadAllCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TextStreamReaderReadAllCallback", + () => [ + { 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" }, + ], +); + +/** + * @generated from message livekit.proto.TextStreamReaderEvent + */ +const TextStreamReaderEvent = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TextStreamReaderEvent", + () => [ + { 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" }, + ], +); + +/** + * @generated from message livekit.proto.TextStreamReaderChunkReceived + */ +const TextStreamReaderChunkReceived = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TextStreamReaderChunkReceived", + () => [ + { no: 1, name: "content", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.TextStreamReaderEOS + */ +const TextStreamReaderEOS = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TextStreamReaderEOS", + () => [ + { no: 1, name: "error", kind: "message", T: StreamError, opt: true }, + ], +); + +/** + * A reader for an incoming stream. + * + * @generated from message livekit.proto.OwnedByteStreamReader + */ +const OwnedByteStreamReader = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.OwnedByteStreamReader", + () => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: ByteStreamInfo, req: true }, + ], +); + +/** + * Reads an incoming byte stream incrementally. + * + * @generated from message livekit.proto.ByteStreamReaderReadIncrementalRequest + */ +const ByteStreamReaderReadIncrementalRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamReaderReadIncrementalRequest", + () => [ + { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.ByteStreamReaderReadIncrementalResponse + */ +const ByteStreamReaderReadIncrementalResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamReaderReadIncrementalResponse", + [], +); + +/** + * Reads an incoming byte stream in its entirety. + * + * @generated from message livekit.proto.ByteStreamReaderReadAllRequest + */ +const ByteStreamReaderReadAllRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamReaderReadAllRequest", + () => [ + { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.ByteStreamReaderReadAllResponse + */ +const ByteStreamReaderReadAllResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamReaderReadAllResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.ByteStreamReaderReadAllCallback + */ +const ByteStreamReaderReadAllCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamReaderReadAllCallback", + () => [ + { 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" }, + ], +); + +/** + * Writes data from an incoming stream to a file as it arrives. + * + * @generated from message livekit.proto.ByteStreamReaderWriteToFileRequest + */ +const ByteStreamReaderWriteToFileRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamReaderWriteToFileRequest", + () => [ + { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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 }, + ], +); + +/** + * @generated from message livekit.proto.ByteStreamReaderWriteToFileResponse + */ +const ByteStreamReaderWriteToFileResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamReaderWriteToFileResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.ByteStreamReaderWriteToFileCallback + */ +const ByteStreamReaderWriteToFileCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamReaderWriteToFileCallback", + () => [ + { 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" }, + ], +); + +/** + * @generated from message livekit.proto.ByteStreamReaderEvent + */ +const ByteStreamReaderEvent = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamReaderEvent", + () => [ + { 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" }, + ], +); + +/** + * @generated from message livekit.proto.ByteStreamReaderChunkReceived + */ +const ByteStreamReaderChunkReceived = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamReaderChunkReceived", + () => [ + { no: 1, name: "content", kind: "scalar", T: 12 /* ScalarType.BYTES */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.ByteStreamReaderEOS + */ +const ByteStreamReaderEOS = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamReaderEOS", + () => [ + { no: 1, name: "error", kind: "message", T: StreamError, opt: true }, + ], +); + +/** + * Sends the contents of a file over a data stream. + * + * @generated from message livekit.proto.StreamSendFileRequest + */ +const StreamSendFileRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.StreamSendFileRequest", + () => [ + { 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 }, + { no: 4, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.StreamSendFileResponse + */ +const StreamSendFileResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.StreamSendFileResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.StreamSendFileCallback + */ +const StreamSendFileCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.StreamSendFileCallback", + () => [ + { 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" }, + ], +); + +/** + * Sends bytes over a data stream. + * + * @generated from message livekit.proto.StreamSendBytesRequest + */ +const StreamSendBytesRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.StreamSendBytesRequest", + () => [ + { 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 }, + { no: 4, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.StreamSendBytesResponse + */ +const StreamSendBytesResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.StreamSendBytesResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.StreamSendBytesCallback + */ +const StreamSendBytesCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.StreamSendBytesCallback", + () => [ + { 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" }, + ], +); + +/** + * Sends text over a data stream. + * + * @generated from message livekit.proto.StreamSendTextRequest + */ +const StreamSendTextRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.StreamSendTextRequest", + () => [ + { 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 }, + { no: 4, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.StreamSendTextResponse + */ +const StreamSendTextResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.StreamSendTextResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.StreamSendTextCallback + */ +const StreamSendTextCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.StreamSendTextCallback", + () => [ + { 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" }, + ], +); + +/** + * @generated from message livekit.proto.OwnedByteStreamWriter + */ +const OwnedByteStreamWriter = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.OwnedByteStreamWriter", + () => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: ByteStreamInfo, req: true }, + ], +); + +/** + * Opens an outgoing stream. + * Call must be balanced with a StreamCloseRequest. + * + * @generated from message livekit.proto.ByteStreamOpenRequest + */ +const ByteStreamOpenRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamOpenRequest", + () => [ + { 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: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.ByteStreamOpenResponse + */ +const ByteStreamOpenResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamOpenResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.ByteStreamOpenCallback + */ +const ByteStreamOpenCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamOpenCallback", + () => [ + { 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" }, + ], +); + +/** + * Writes data to a stream writer. + * + * @generated from message livekit.proto.ByteStreamWriterWriteRequest + */ +const ByteStreamWriterWriteRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamWriterWriteRequest", + () => [ + { 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 }, + { no: 3, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.ByteStreamWriterWriteResponse + */ +const ByteStreamWriterWriteResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamWriterWriteResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.ByteStreamWriterWriteCallback + */ +const ByteStreamWriterWriteCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamWriterWriteCallback", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "error", kind: "message", T: StreamError, opt: true }, + ], +); + +/** + * Closes a stream writer. + * + * @generated from message livekit.proto.ByteStreamWriterCloseRequest + */ +const ByteStreamWriterCloseRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamWriterCloseRequest", + () => [ + { 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 }, + { no: 3, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.ByteStreamWriterCloseResponse + */ +const ByteStreamWriterCloseResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamWriterCloseResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.ByteStreamWriterCloseCallback + */ +const ByteStreamWriterCloseCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamWriterCloseCallback", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "error", kind: "message", T: StreamError, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.OwnedTextStreamWriter + */ +const OwnedTextStreamWriter = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.OwnedTextStreamWriter", + () => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: TextStreamInfo, req: true }, + ], +); + +/** + * Opens an outgoing text stream. + * Call must be balanced with a TextStreamCloseRequest. + * + * @generated from message livekit.proto.TextStreamOpenRequest + */ +const TextStreamOpenRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TextStreamOpenRequest", + () => [ + { 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: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.TextStreamOpenResponse + */ +const TextStreamOpenResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TextStreamOpenResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.TextStreamOpenCallback + */ +const TextStreamOpenCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TextStreamOpenCallback", + () => [ + { 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" }, + ], +); + +/** + * Writes text to a text stream writer. + * + * @generated from message livekit.proto.TextStreamWriterWriteRequest + */ +const TextStreamWriterWriteRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TextStreamWriterWriteRequest", + () => [ + { 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 }, + { no: 3, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.TextStreamWriterWriteResponse + */ +const TextStreamWriterWriteResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TextStreamWriterWriteResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.TextStreamWriterWriteCallback + */ +const TextStreamWriterWriteCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TextStreamWriterWriteCallback", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "error", kind: "message", T: StreamError, opt: true }, + ], +); + +/** + * Closes a text stream writer. + * + * @generated from message livekit.proto.TextStreamWriterCloseRequest + */ +const TextStreamWriterCloseRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TextStreamWriterCloseRequest", + () => [ + { 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 }, + { no: 3, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.TextStreamWriterCloseResponse + */ +const TextStreamWriterCloseResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TextStreamWriterCloseResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.TextStreamWriterCloseCallback + */ +const TextStreamWriterCloseCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TextStreamWriterCloseCallback", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "error", kind: "message", T: StreamError, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.TextStreamInfo + */ +const TextStreamInfo = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TextStreamInfo", + () => [ + { 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 }, + ], +); + +/** + * @generated from enum livekit.proto.TextStreamInfo.OperationType + */ +const TextStreamInfo_OperationType = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const ByteStreamInfo = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamInfo", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.StreamTextOptions + */ +const StreamTextOptions = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.StreamTextOptions", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.StreamByteOptions + */ +const StreamByteOptions = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.StreamByteOptions", + () => [ + { 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 }, + ], +); + +/** + * Error pertaining to a stream. + * + * @generated from message livekit.proto.StreamError + */ +const StreamError = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.StreamError", + () => [ + { no: 1, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ], +); + + +exports.OwnedTextStreamReader = OwnedTextStreamReader; +exports.TextStreamReaderReadIncrementalRequest = TextStreamReaderReadIncrementalRequest; +exports.TextStreamReaderReadIncrementalResponse = TextStreamReaderReadIncrementalResponse; +exports.TextStreamReaderReadAllRequest = TextStreamReaderReadAllRequest; +exports.TextStreamReaderReadAllResponse = TextStreamReaderReadAllResponse; +exports.TextStreamReaderReadAllCallback = TextStreamReaderReadAllCallback; +exports.TextStreamReaderEvent = TextStreamReaderEvent; +exports.TextStreamReaderChunkReceived = TextStreamReaderChunkReceived; +exports.TextStreamReaderEOS = TextStreamReaderEOS; +exports.OwnedByteStreamReader = OwnedByteStreamReader; +exports.ByteStreamReaderReadIncrementalRequest = ByteStreamReaderReadIncrementalRequest; +exports.ByteStreamReaderReadIncrementalResponse = ByteStreamReaderReadIncrementalResponse; +exports.ByteStreamReaderReadAllRequest = ByteStreamReaderReadAllRequest; +exports.ByteStreamReaderReadAllResponse = ByteStreamReaderReadAllResponse; +exports.ByteStreamReaderReadAllCallback = ByteStreamReaderReadAllCallback; +exports.ByteStreamReaderWriteToFileRequest = ByteStreamReaderWriteToFileRequest; +exports.ByteStreamReaderWriteToFileResponse = ByteStreamReaderWriteToFileResponse; +exports.ByteStreamReaderWriteToFileCallback = ByteStreamReaderWriteToFileCallback; +exports.ByteStreamReaderEvent = ByteStreamReaderEvent; +exports.ByteStreamReaderChunkReceived = ByteStreamReaderChunkReceived; +exports.ByteStreamReaderEOS = ByteStreamReaderEOS; +exports.StreamSendFileRequest = StreamSendFileRequest; +exports.StreamSendFileResponse = StreamSendFileResponse; +exports.StreamSendFileCallback = StreamSendFileCallback; +exports.StreamSendBytesRequest = StreamSendBytesRequest; +exports.StreamSendBytesResponse = StreamSendBytesResponse; +exports.StreamSendBytesCallback = StreamSendBytesCallback; +exports.StreamSendTextRequest = StreamSendTextRequest; +exports.StreamSendTextResponse = StreamSendTextResponse; +exports.StreamSendTextCallback = StreamSendTextCallback; +exports.OwnedByteStreamWriter = OwnedByteStreamWriter; +exports.ByteStreamOpenRequest = ByteStreamOpenRequest; +exports.ByteStreamOpenResponse = ByteStreamOpenResponse; +exports.ByteStreamOpenCallback = ByteStreamOpenCallback; +exports.ByteStreamWriterWriteRequest = ByteStreamWriterWriteRequest; +exports.ByteStreamWriterWriteResponse = ByteStreamWriterWriteResponse; +exports.ByteStreamWriterWriteCallback = ByteStreamWriterWriteCallback; +exports.ByteStreamWriterCloseRequest = ByteStreamWriterCloseRequest; +exports.ByteStreamWriterCloseResponse = ByteStreamWriterCloseResponse; +exports.ByteStreamWriterCloseCallback = ByteStreamWriterCloseCallback; +exports.OwnedTextStreamWriter = OwnedTextStreamWriter; +exports.TextStreamOpenRequest = TextStreamOpenRequest; +exports.TextStreamOpenResponse = TextStreamOpenResponse; +exports.TextStreamOpenCallback = TextStreamOpenCallback; +exports.TextStreamWriterWriteRequest = TextStreamWriterWriteRequest; +exports.TextStreamWriterWriteResponse = TextStreamWriterWriteResponse; +exports.TextStreamWriterWriteCallback = TextStreamWriterWriteCallback; +exports.TextStreamWriterCloseRequest = TextStreamWriterCloseRequest; +exports.TextStreamWriterCloseResponse = TextStreamWriterCloseResponse; +exports.TextStreamWriterCloseCallback = TextStreamWriterCloseCallback; +exports.TextStreamInfo = TextStreamInfo; +exports.TextStreamInfo_OperationType = TextStreamInfo_OperationType; +exports.ByteStreamInfo = ByteStreamInfo; +exports.StreamTextOptions = StreamTextOptions; +exports.StreamByteOptions = StreamByteOptions; +exports.StreamError = StreamError; diff --git a/livekit-ffi-node-bindings/proto/e2ee_pb.d.ts b/livekit-ffi-node-bindings/proto/e2ee_pb.d.ts new file mode 100644 index 000000000..6c815b49d --- /dev/null +++ b/livekit-ffi-node-bindings/proto/e2ee_pb.d.ts @@ -0,0 +1,861 @@ +// 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 "js_import_style=legacy_commonjs" +// @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 declare 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, +} + +/** + * @generated from enum livekit.proto.EncryptionState + */ +export declare 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, +} + +/** + * @generated from message livekit.proto.FrameCryptor + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.FrameCryptor"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): FrameCryptor; + + static fromJson(jsonValue: JsonValue, options?: Partial): FrameCryptor; + + static fromJsonString(jsonString: string, options?: Partial): FrameCryptor; + + static equals(a: FrameCryptor | PlainMessage | undefined, b: FrameCryptor | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.KeyProviderOptions + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.KeyProviderOptions"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): KeyProviderOptions; + + static fromJson(jsonValue: JsonValue, options?: Partial): KeyProviderOptions; + + static fromJsonString(jsonString: string, options?: Partial): KeyProviderOptions; + + static equals(a: KeyProviderOptions | PlainMessage | undefined, b: KeyProviderOptions | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.E2eeOptions + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.E2eeOptions"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): E2eeOptions; + + static fromJson(jsonValue: JsonValue, options?: Partial): E2eeOptions; + + static fromJsonString(jsonString: string, options?: Partial): E2eeOptions; + + static equals(a: E2eeOptions | PlainMessage | undefined, b: E2eeOptions | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.E2eeManagerSetEnabledRequest + */ +export declare class E2eeManagerSetEnabledRequest extends Message { + /** + * @generated from field: required bool enabled = 1; + */ + enabled?: boolean; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.E2eeManagerSetEnabledRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): E2eeManagerSetEnabledRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): E2eeManagerSetEnabledRequest; + + static fromJsonString(jsonString: string, options?: Partial): E2eeManagerSetEnabledRequest; + + static equals(a: E2eeManagerSetEnabledRequest | PlainMessage | undefined, b: E2eeManagerSetEnabledRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.E2eeManagerSetEnabledResponse + */ +export declare class E2eeManagerSetEnabledResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.E2eeManagerSetEnabledResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): E2eeManagerSetEnabledResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): E2eeManagerSetEnabledResponse; + + static fromJsonString(jsonString: string, options?: Partial): E2eeManagerSetEnabledResponse; + + static equals(a: E2eeManagerSetEnabledResponse | PlainMessage | undefined, b: E2eeManagerSetEnabledResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.E2eeManagerGetFrameCryptorsRequest + */ +export declare class E2eeManagerGetFrameCryptorsRequest extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.E2eeManagerGetFrameCryptorsRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): E2eeManagerGetFrameCryptorsRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): E2eeManagerGetFrameCryptorsRequest; + + static fromJsonString(jsonString: string, options?: Partial): E2eeManagerGetFrameCryptorsRequest; + + static equals(a: E2eeManagerGetFrameCryptorsRequest | PlainMessage | undefined, b: E2eeManagerGetFrameCryptorsRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.E2eeManagerGetFrameCryptorsResponse + */ +export declare class E2eeManagerGetFrameCryptorsResponse extends Message { + /** + * @generated from field: repeated livekit.proto.FrameCryptor frame_cryptors = 1; + */ + frameCryptors: FrameCryptor[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.E2eeManagerGetFrameCryptorsResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): E2eeManagerGetFrameCryptorsResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): E2eeManagerGetFrameCryptorsResponse; + + static fromJsonString(jsonString: string, options?: Partial): E2eeManagerGetFrameCryptorsResponse; + + static equals(a: E2eeManagerGetFrameCryptorsResponse | PlainMessage | undefined, b: E2eeManagerGetFrameCryptorsResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.FrameCryptorSetEnabledRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.FrameCryptorSetEnabledRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): FrameCryptorSetEnabledRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): FrameCryptorSetEnabledRequest; + + static fromJsonString(jsonString: string, options?: Partial): FrameCryptorSetEnabledRequest; + + static equals(a: FrameCryptorSetEnabledRequest | PlainMessage | undefined, b: FrameCryptorSetEnabledRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.FrameCryptorSetEnabledResponse + */ +export declare class FrameCryptorSetEnabledResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.FrameCryptorSetEnabledResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): FrameCryptorSetEnabledResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): FrameCryptorSetEnabledResponse; + + static fromJsonString(jsonString: string, options?: Partial): FrameCryptorSetEnabledResponse; + + static equals(a: FrameCryptorSetEnabledResponse | PlainMessage | undefined, b: FrameCryptorSetEnabledResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.FrameCryptorSetKeyIndexRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.FrameCryptorSetKeyIndexRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): FrameCryptorSetKeyIndexRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): FrameCryptorSetKeyIndexRequest; + + static fromJsonString(jsonString: string, options?: Partial): FrameCryptorSetKeyIndexRequest; + + static equals(a: FrameCryptorSetKeyIndexRequest | PlainMessage | undefined, b: FrameCryptorSetKeyIndexRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.FrameCryptorSetKeyIndexResponse + */ +export declare class FrameCryptorSetKeyIndexResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.FrameCryptorSetKeyIndexResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): FrameCryptorSetKeyIndexResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): FrameCryptorSetKeyIndexResponse; + + static fromJsonString(jsonString: string, options?: Partial): FrameCryptorSetKeyIndexResponse; + + static equals(a: FrameCryptorSetKeyIndexResponse | PlainMessage | undefined, b: FrameCryptorSetKeyIndexResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SetSharedKeyRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetSharedKeyRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetSharedKeyRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetSharedKeyRequest; + + static fromJsonString(jsonString: string, options?: Partial): SetSharedKeyRequest; + + static equals(a: SetSharedKeyRequest | PlainMessage | undefined, b: SetSharedKeyRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SetSharedKeyResponse + */ +export declare class SetSharedKeyResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetSharedKeyResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetSharedKeyResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetSharedKeyResponse; + + static fromJsonString(jsonString: string, options?: Partial): SetSharedKeyResponse; + + static equals(a: SetSharedKeyResponse | PlainMessage | undefined, b: SetSharedKeyResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RatchetSharedKeyRequest + */ +export declare class RatchetSharedKeyRequest extends Message { + /** + * @generated from field: required int32 key_index = 1; + */ + keyIndex?: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RatchetSharedKeyRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RatchetSharedKeyRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): RatchetSharedKeyRequest; + + static fromJsonString(jsonString: string, options?: Partial): RatchetSharedKeyRequest; + + static equals(a: RatchetSharedKeyRequest | PlainMessage | undefined, b: RatchetSharedKeyRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RatchetSharedKeyResponse + */ +export declare class RatchetSharedKeyResponse extends Message { + /** + * @generated from field: optional bytes new_key = 1; + */ + newKey?: Uint8Array; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RatchetSharedKeyResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RatchetSharedKeyResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): RatchetSharedKeyResponse; + + static fromJsonString(jsonString: string, options?: Partial): RatchetSharedKeyResponse; + + static equals(a: RatchetSharedKeyResponse | PlainMessage | undefined, b: RatchetSharedKeyResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.GetSharedKeyRequest + */ +export declare class GetSharedKeyRequest extends Message { + /** + * @generated from field: required int32 key_index = 1; + */ + keyIndex?: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.GetSharedKeyRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetSharedKeyRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetSharedKeyRequest; + + static fromJsonString(jsonString: string, options?: Partial): GetSharedKeyRequest; + + static equals(a: GetSharedKeyRequest | PlainMessage | undefined, b: GetSharedKeyRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.GetSharedKeyResponse + */ +export declare class GetSharedKeyResponse extends Message { + /** + * @generated from field: optional bytes key = 1; + */ + key?: Uint8Array; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.GetSharedKeyResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetSharedKeyResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetSharedKeyResponse; + + static fromJsonString(jsonString: string, options?: Partial): GetSharedKeyResponse; + + static equals(a: GetSharedKeyResponse | PlainMessage | undefined, b: GetSharedKeyResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SetKeyRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetKeyRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetKeyRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetKeyRequest; + + static fromJsonString(jsonString: string, options?: Partial): SetKeyRequest; + + static equals(a: SetKeyRequest | PlainMessage | undefined, b: SetKeyRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SetKeyResponse + */ +export declare class SetKeyResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetKeyResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetKeyResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetKeyResponse; + + static fromJsonString(jsonString: string, options?: Partial): SetKeyResponse; + + static equals(a: SetKeyResponse | PlainMessage | undefined, b: SetKeyResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RatchetKeyRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RatchetKeyRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RatchetKeyRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): RatchetKeyRequest; + + static fromJsonString(jsonString: string, options?: Partial): RatchetKeyRequest; + + static equals(a: RatchetKeyRequest | PlainMessage | undefined, b: RatchetKeyRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RatchetKeyResponse + */ +export declare class RatchetKeyResponse extends Message { + /** + * @generated from field: optional bytes new_key = 1; + */ + newKey?: Uint8Array; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RatchetKeyResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RatchetKeyResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): RatchetKeyResponse; + + static fromJsonString(jsonString: string, options?: Partial): RatchetKeyResponse; + + static equals(a: RatchetKeyResponse | PlainMessage | undefined, b: RatchetKeyResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.GetKeyRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.GetKeyRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyRequest; + + static fromJsonString(jsonString: string, options?: Partial): GetKeyRequest; + + static equals(a: GetKeyRequest | PlainMessage | undefined, b: GetKeyRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.GetKeyResponse + */ +export declare class GetKeyResponse extends Message { + /** + * @generated from field: optional bytes key = 1; + */ + key?: Uint8Array; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.GetKeyResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyResponse; + + static fromJsonString(jsonString: string, options?: Partial): GetKeyResponse; + + static equals(a: GetKeyResponse | PlainMessage | undefined, b: GetKeyResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.E2eeRequest + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.E2eeRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): E2eeRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): E2eeRequest; + + static fromJsonString(jsonString: string, options?: Partial): E2eeRequest; + + static equals(a: E2eeRequest | PlainMessage | undefined, b: E2eeRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.E2eeResponse + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.E2eeResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): E2eeResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): E2eeResponse; + + static fromJsonString(jsonString: string, options?: Partial): E2eeResponse; + + static equals(a: E2eeResponse | PlainMessage | undefined, b: E2eeResponse | PlainMessage | undefined): boolean; +} + diff --git a/livekit-ffi-node-bindings/proto/e2ee_pb.js b/livekit-ffi-node-bindings/proto/e2ee_pb.js new file mode 100644 index 000000000..511338d6e --- /dev/null +++ b/livekit-ffi-node-bindings/proto/e2ee_pb.js @@ -0,0 +1,353 @@ +// 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 "js_import_style=legacy_commonjs" +// @generated from file e2ee.proto (package livekit.proto, syntax proto2) +/* eslint-disable */ +// @ts-nocheck + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +const { proto2 } = require("@bufbuild/protobuf"); + +/** + * @generated from enum livekit.proto.EncryptionType + */ +const EncryptionType = /*@__PURE__*/ proto2.makeEnum( + "livekit.proto.EncryptionType", + [ + {no: 0, name: "NONE"}, + {no: 1, name: "GCM"}, + {no: 2, name: "CUSTOM"}, + ], +); + +/** + * @generated from enum livekit.proto.EncryptionState + */ +const EncryptionState = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const FrameCryptor = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.FrameCryptor", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.KeyProviderOptions + */ +const KeyProviderOptions = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.KeyProviderOptions", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.E2eeOptions + */ +const E2eeOptions = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.E2eeOptions", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.E2eeManagerSetEnabledRequest + */ +const E2eeManagerSetEnabledRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.E2eeManagerSetEnabledRequest", + () => [ + { no: 1, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.E2eeManagerSetEnabledResponse + */ +const E2eeManagerSetEnabledResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.E2eeManagerSetEnabledResponse", + [], +); + +/** + * @generated from message livekit.proto.E2eeManagerGetFrameCryptorsRequest + */ +const E2eeManagerGetFrameCryptorsRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.E2eeManagerGetFrameCryptorsRequest", + [], +); + +/** + * @generated from message livekit.proto.E2eeManagerGetFrameCryptorsResponse + */ +const E2eeManagerGetFrameCryptorsResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.E2eeManagerGetFrameCryptorsResponse", + () => [ + { no: 1, name: "frame_cryptors", kind: "message", T: FrameCryptor, repeated: true }, + ], +); + +/** + * @generated from message livekit.proto.FrameCryptorSetEnabledRequest + */ +const FrameCryptorSetEnabledRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.FrameCryptorSetEnabledRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.FrameCryptorSetEnabledResponse + */ +const FrameCryptorSetEnabledResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.FrameCryptorSetEnabledResponse", + [], +); + +/** + * @generated from message livekit.proto.FrameCryptorSetKeyIndexRequest + */ +const FrameCryptorSetKeyIndexRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.FrameCryptorSetKeyIndexRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.FrameCryptorSetKeyIndexResponse + */ +const FrameCryptorSetKeyIndexResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.FrameCryptorSetKeyIndexResponse", + [], +); + +/** + * @generated from message livekit.proto.SetSharedKeyRequest + */ +const SetSharedKeyRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetSharedKeyRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.SetSharedKeyResponse + */ +const SetSharedKeyResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetSharedKeyResponse", + [], +); + +/** + * @generated from message livekit.proto.RatchetSharedKeyRequest + */ +const RatchetSharedKeyRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RatchetSharedKeyRequest", + () => [ + { no: 1, name: "key_index", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.RatchetSharedKeyResponse + */ +const RatchetSharedKeyResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RatchetSharedKeyResponse", + () => [ + { no: 1, name: "new_key", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.GetSharedKeyRequest + */ +const GetSharedKeyRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.GetSharedKeyRequest", + () => [ + { no: 1, name: "key_index", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.GetSharedKeyResponse + */ +const GetSharedKeyResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.GetSharedKeyResponse", + () => [ + { no: 1, name: "key", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.SetKeyRequest + */ +const SetKeyRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetKeyRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.SetKeyResponse + */ +const SetKeyResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetKeyResponse", + [], +); + +/** + * @generated from message livekit.proto.RatchetKeyRequest + */ +const RatchetKeyRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RatchetKeyRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.RatchetKeyResponse + */ +const RatchetKeyResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RatchetKeyResponse", + () => [ + { no: 1, name: "new_key", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.GetKeyRequest + */ +const GetKeyRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.GetKeyRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.GetKeyResponse + */ +const GetKeyResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.GetKeyResponse", + () => [ + { no: 1, name: "key", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.E2eeRequest + */ +const E2eeRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.E2eeRequest", + () => [ + { 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" }, + ], +); + +/** + * @generated from message livekit.proto.E2eeResponse + */ +const E2eeResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.E2eeResponse", + () => [ + { 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" }, + ], +); + + +exports.EncryptionType = EncryptionType; +exports.EncryptionState = EncryptionState; +exports.FrameCryptor = FrameCryptor; +exports.KeyProviderOptions = KeyProviderOptions; +exports.E2eeOptions = E2eeOptions; +exports.E2eeManagerSetEnabledRequest = E2eeManagerSetEnabledRequest; +exports.E2eeManagerSetEnabledResponse = E2eeManagerSetEnabledResponse; +exports.E2eeManagerGetFrameCryptorsRequest = E2eeManagerGetFrameCryptorsRequest; +exports.E2eeManagerGetFrameCryptorsResponse = E2eeManagerGetFrameCryptorsResponse; +exports.FrameCryptorSetEnabledRequest = FrameCryptorSetEnabledRequest; +exports.FrameCryptorSetEnabledResponse = FrameCryptorSetEnabledResponse; +exports.FrameCryptorSetKeyIndexRequest = FrameCryptorSetKeyIndexRequest; +exports.FrameCryptorSetKeyIndexResponse = FrameCryptorSetKeyIndexResponse; +exports.SetSharedKeyRequest = SetSharedKeyRequest; +exports.SetSharedKeyResponse = SetSharedKeyResponse; +exports.RatchetSharedKeyRequest = RatchetSharedKeyRequest; +exports.RatchetSharedKeyResponse = RatchetSharedKeyResponse; +exports.GetSharedKeyRequest = GetSharedKeyRequest; +exports.GetSharedKeyResponse = GetSharedKeyResponse; +exports.SetKeyRequest = SetKeyRequest; +exports.SetKeyResponse = SetKeyResponse; +exports.RatchetKeyRequest = RatchetKeyRequest; +exports.RatchetKeyResponse = RatchetKeyResponse; +exports.GetKeyRequest = GetKeyRequest; +exports.GetKeyResponse = GetKeyResponse; +exports.E2eeRequest = E2eeRequest; +exports.E2eeResponse = E2eeResponse; diff --git a/livekit-ffi-node-bindings/src/proto/ffi_pb.ts b/livekit-ffi-node-bindings/proto/ffi_pb.d.ts similarity index 56% rename from livekit-ffi-node-bindings/src/proto/ffi_pb.ts rename to livekit-ffi-node-bindings/proto/ffi_pb.d.ts index 844e39175..558efdb10 100644 --- a/livekit-ffi-node-bindings/src/proto/ffi_pb.ts +++ b/livekit-ffi-node-bindings/proto/ffi_pb.d.ts @@ -12,26 +12,26 @@ // 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 by protoc-gen-es v1.10.1 with parameter "js_import_style=legacy_commonjs" // @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"; +import type { ConnectCallback, ConnectRequest, ConnectResponse, DisconnectCallback, DisconnectRequest, DisconnectResponse, EditChatMessageRequest, GetSessionStatsCallback, GetSessionStatsRequest, GetSessionStatsResponse, PublishDataCallback, PublishDataRequest, PublishDataResponse, PublishSipDtmfCallback, PublishSipDtmfRequest, PublishSipDtmfResponse, PublishTrackCallback, PublishTrackRequest, PublishTrackResponse, PublishTranscriptionCallback, PublishTranscriptionRequest, PublishTranscriptionResponse, RoomEvent, SendChatMessageCallback, SendChatMessageRequest, SendChatMessageResponse, 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 type { CreateAudioTrackRequest, CreateAudioTrackResponse, CreateVideoTrackRequest, CreateVideoTrackResponse, EnableRemoteTrackRequest, EnableRemoteTrackResponse, GetStatsCallback, GetStatsRequest, GetStatsResponse, LocalTrackMuteRequest, LocalTrackMuteResponse, SetTrackSubscriptionPermissionsRequest, SetTrackSubscriptionPermissionsResponse, TrackEvent } from "./track_pb.js"; +import type { CaptureVideoFrameRequest, CaptureVideoFrameResponse, NewVideoSourceRequest, NewVideoSourceResponse, NewVideoStreamRequest, NewVideoStreamResponse, VideoConvertRequest, VideoConvertResponse, VideoStreamEvent, VideoStreamFromParticipantRequest, VideoStreamFromParticipantResponse } from "./video_frame_pb.js"; +import type { 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 type { E2eeRequest, E2eeResponse } from "./e2ee_pb.js"; +import type { PerformRpcCallback, PerformRpcRequest, PerformRpcResponse, RegisterRpcMethodRequest, RegisterRpcMethodResponse, RpcMethodInvocationEvent, RpcMethodInvocationResponseRequest, RpcMethodInvocationResponseResponse, UnregisterRpcMethodRequest, UnregisterRpcMethodResponse } from "./rpc_pb.js"; +import type { EnableRemoteTrackPublicationRequest, EnableRemoteTrackPublicationResponse, SetRemoteTrackPublicationQualityRequest, SetRemoteTrackPublicationQualityResponse, UpdateRemoteTrackPublicationDimensionRequest, UpdateRemoteTrackPublicationDimensionResponse } from "./track_publication_pb.js"; +import type { 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 { +export declare enum LogLevel { /** * @generated from enum value: LOG_ERROR = 0; */ @@ -57,14 +57,6 @@ export enum LogLevel { */ 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 @@ -72,7 +64,7 @@ proto2.util.setEnumType(LogLevel, "livekit.proto.LogLevel", [ * * @generated from message livekit.proto.FfiRequest */ -export class FfiRequest extends Message { +export declare class FfiRequest extends Message { /** * @generated from oneof livekit.proto.FfiRequest.message */ @@ -498,100 +490,21 @@ export class FfiRequest extends Message { */ value: SetRemoteTrackPublicationQualityRequest; case: "setRemoteTrackPublicationQuality"; - } | { case: undefined; value?: undefined } = { case: undefined }; + } | { case: undefined; value?: undefined }; - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } + constructor(data?: PartialMessage); - static readonly runtime: typeof proto2 = proto2; + static readonly runtime: typeof 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); - } + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): FfiRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): FfiRequest; + + static fromJsonString(jsonString: string, options?: Partial): FfiRequest; + + static equals(a: FfiRequest | PlainMessage | undefined, b: FfiRequest | PlainMessage | undefined): boolean; } /** @@ -599,7 +512,7 @@ export class FfiRequest extends Message { * * @generated from message livekit.proto.FfiResponse */ -export class FfiResponse extends Message { +export declare class FfiResponse extends Message { /** * @generated from oneof livekit.proto.FfiResponse.message */ @@ -1019,99 +932,21 @@ export class FfiResponse extends Message { */ value: SetRemoteTrackPublicationQualityResponse; case: "setRemoteTrackPublicationQuality"; - } | { case: undefined; value?: undefined } = { case: undefined }; + } | { case: undefined; value?: undefined }; - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } + constructor(data?: PartialMessage); - static readonly runtime: typeof proto2 = proto2; + static readonly runtime: typeof 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); - } + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): FfiResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): FfiResponse; + + static fromJsonString(jsonString: string, options?: Partial): FfiResponse; + + static equals(a: FfiResponse | PlainMessage | undefined, b: FfiResponse | PlainMessage | undefined): boolean; } /** @@ -1121,7 +956,7 @@ export class FfiResponse extends Message { * * @generated from message livekit.proto.FfiEvent */ -export class FfiEvent extends Message { +export declare class FfiEvent extends Message { /** * @generated from oneof livekit.proto.FfiEvent.message */ @@ -1369,73 +1204,21 @@ export class FfiEvent extends Message { */ value: StreamSendBytesCallback; case: "sendBytes"; - } | { case: undefined; value?: undefined } = { case: undefined }; + } | { case: undefined; value?: undefined }; - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } + constructor(data?: PartialMessage); - static readonly runtime: typeof proto2 = proto2; + static readonly runtime: typeof 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); - } + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): FfiEvent; + + static fromJson(jsonValue: JsonValue, options?: Partial): FfiEvent; + + static fromJsonString(jsonString: string, options?: Partial): FfiEvent; + + static equals(a: FfiEvent | PlainMessage | undefined, b: FfiEvent | PlainMessage | undefined): boolean; } /** @@ -1445,44 +1228,31 @@ export class FfiEvent extends Message { * * @generated from message livekit.proto.DisposeRequest */ -export class DisposeRequest extends Message { +export declare class DisposeRequest extends Message { /** * @generated from field: required bool async = 1; */ async?: boolean; - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } + constructor(data?: PartialMessage); - static readonly runtime: typeof proto2 = proto2; + static readonly runtime: typeof 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 readonly fields: FieldList; - static fromBinary(bytes: Uint8Array, options?: Partial): DisposeRequest { - return new DisposeRequest().fromBinary(bytes, options); - } + static fromBinary(bytes: Uint8Array, options?: Partial): DisposeRequest; - static fromJson(jsonValue: JsonValue, options?: Partial): DisposeRequest { - return new DisposeRequest().fromJson(jsonValue, options); - } + static fromJson(jsonValue: JsonValue, options?: Partial): DisposeRequest; - static fromJsonString(jsonString: string, options?: Partial): DisposeRequest { - return new DisposeRequest().fromJsonString(jsonString, options); - } + static fromJsonString(jsonString: string, options?: Partial): DisposeRequest; - static equals(a: DisposeRequest | PlainMessage | undefined, b: DisposeRequest | PlainMessage | undefined): boolean { - return proto2.util.equals(DisposeRequest, a, b); - } + static equals(a: DisposeRequest | PlainMessage | undefined, b: DisposeRequest | PlainMessage | undefined): boolean; } /** * @generated from message livekit.proto.DisposeResponse */ -export class DisposeResponse extends Message { +export declare class DisposeResponse extends Message { /** * None if sync * @@ -1490,75 +1260,49 @@ export class DisposeResponse extends Message { */ asyncId?: bigint; - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } + constructor(data?: PartialMessage); - static readonly runtime: typeof proto2 = proto2; + static readonly runtime: typeof 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 readonly fields: FieldList; - static fromBinary(bytes: Uint8Array, options?: Partial): DisposeResponse { - return new DisposeResponse().fromBinary(bytes, options); - } + static fromBinary(bytes: Uint8Array, options?: Partial): DisposeResponse; - static fromJson(jsonValue: JsonValue, options?: Partial): DisposeResponse { - return new DisposeResponse().fromJson(jsonValue, options); - } + static fromJson(jsonValue: JsonValue, options?: Partial): DisposeResponse; - static fromJsonString(jsonString: string, options?: Partial): DisposeResponse { - return new DisposeResponse().fromJsonString(jsonString, options); - } + static fromJsonString(jsonString: string, options?: Partial): DisposeResponse; - static equals(a: DisposeResponse | PlainMessage | undefined, b: DisposeResponse | PlainMessage | undefined): boolean { - return proto2.util.equals(DisposeResponse, a, b); - } + static equals(a: DisposeResponse | PlainMessage | undefined, b: DisposeResponse | PlainMessage | undefined): boolean; } /** * @generated from message livekit.proto.DisposeCallback */ -export class DisposeCallback extends Message { +export declare class DisposeCallback extends Message { /** * @generated from field: required uint64 async_id = 1; */ asyncId?: bigint; - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } + constructor(data?: PartialMessage); - static readonly runtime: typeof proto2 = proto2; + static readonly runtime: typeof 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 readonly fields: FieldList; - static fromBinary(bytes: Uint8Array, options?: Partial): DisposeCallback { - return new DisposeCallback().fromBinary(bytes, options); - } + static fromBinary(bytes: Uint8Array, options?: Partial): DisposeCallback; - static fromJson(jsonValue: JsonValue, options?: Partial): DisposeCallback { - return new DisposeCallback().fromJson(jsonValue, options); - } + static fromJson(jsonValue: JsonValue, options?: Partial): DisposeCallback; - static fromJsonString(jsonString: string, options?: Partial): DisposeCallback { - return new DisposeCallback().fromJsonString(jsonString, options); - } + static fromJsonString(jsonString: string, options?: Partial): DisposeCallback; - static equals(a: DisposeCallback | PlainMessage | undefined, b: DisposeCallback | PlainMessage | undefined): boolean { - return proto2.util.equals(DisposeCallback, a, b); - } + static equals(a: DisposeCallback | PlainMessage | undefined, b: DisposeCallback | PlainMessage | undefined): boolean; } /** * @generated from message livekit.proto.LogRecord */ -export class LogRecord extends Message { +export declare class LogRecord extends Message { /** * @generated from field: required livekit.proto.LogLevel level = 1; */ @@ -1591,110 +1335,66 @@ export class LogRecord extends Message { */ message?: string; - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } + constructor(data?: PartialMessage); - static readonly runtime: typeof proto2 = proto2; + static readonly runtime: typeof 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); - } + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): LogRecord; + + static fromJson(jsonValue: JsonValue, options?: Partial): LogRecord; + + static fromJsonString(jsonString: string, options?: Partial): LogRecord; + + static equals(a: LogRecord | PlainMessage | undefined, b: LogRecord | PlainMessage | undefined): boolean; } /** * @generated from message livekit.proto.LogBatch */ -export class LogBatch extends Message { +export declare class LogBatch extends Message { /** * @generated from field: repeated livekit.proto.LogRecord records = 1; */ - records: LogRecord[] = []; + records: LogRecord[]; - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } + constructor(data?: PartialMessage); - static readonly runtime: typeof proto2 = proto2; + static readonly runtime: typeof 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 readonly fields: FieldList; - static fromBinary(bytes: Uint8Array, options?: Partial): LogBatch { - return new LogBatch().fromBinary(bytes, options); - } + static fromBinary(bytes: Uint8Array, options?: Partial): LogBatch; - static fromJson(jsonValue: JsonValue, options?: Partial): LogBatch { - return new LogBatch().fromJson(jsonValue, options); - } + static fromJson(jsonValue: JsonValue, options?: Partial): LogBatch; - static fromJsonString(jsonString: string, options?: Partial): LogBatch { - return new LogBatch().fromJsonString(jsonString, options); - } + static fromJsonString(jsonString: string, options?: Partial): LogBatch; - static equals(a: LogBatch | PlainMessage | undefined, b: LogBatch | PlainMessage | undefined): boolean { - return proto2.util.equals(LogBatch, a, b); - } + static equals(a: LogBatch | PlainMessage | undefined, b: LogBatch | PlainMessage | undefined): boolean; } /** * @generated from message livekit.proto.Panic */ -export class Panic extends Message { +export declare class Panic extends Message { /** * @generated from field: required string message = 1; */ message?: string; - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } + constructor(data?: PartialMessage); - static readonly runtime: typeof proto2 = proto2; + static readonly runtime: typeof 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 readonly fields: FieldList; - static fromBinary(bytes: Uint8Array, options?: Partial): Panic { - return new Panic().fromBinary(bytes, options); - } + static fromBinary(bytes: Uint8Array, options?: Partial): Panic; - static fromJson(jsonValue: JsonValue, options?: Partial): Panic { - return new Panic().fromJson(jsonValue, options); - } + static fromJson(jsonValue: JsonValue, options?: Partial): Panic; - static fromJsonString(jsonString: string, options?: Partial): Panic { - return new Panic().fromJsonString(jsonString, options); - } + static fromJsonString(jsonString: string, options?: Partial): Panic; - static equals(a: Panic | PlainMessage | undefined, b: Panic | PlainMessage | undefined): boolean { - return proto2.util.equals(Panic, a, b); - } + static equals(a: Panic | PlainMessage | undefined, b: Panic | PlainMessage | undefined): boolean; } diff --git a/livekit-ffi-node-bindings/proto/ffi_pb.js b/livekit-ffi-node-bindings/proto/ffi_pb.js new file mode 100644 index 000000000..3165b49cb --- /dev/null +++ b/livekit-ffi-node-bindings/proto/ffi_pb.js @@ -0,0 +1,335 @@ +// 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 "js_import_style=legacy_commonjs" +// @generated from file ffi.proto (package livekit.proto, syntax proto2) +/* eslint-disable */ +// @ts-nocheck + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +const { proto2 } = require("@bufbuild/protobuf"); +const { 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 } = require("./room_pb.js"); +const { CreateAudioTrackRequest, CreateAudioTrackResponse, CreateVideoTrackRequest, CreateVideoTrackResponse, EnableRemoteTrackRequest, EnableRemoteTrackResponse, GetStatsCallback, GetStatsRequest, GetStatsResponse, LocalTrackMuteRequest, LocalTrackMuteResponse, SetTrackSubscriptionPermissionsRequest, SetTrackSubscriptionPermissionsResponse, TrackEvent } = require("./track_pb.js"); +const { CaptureVideoFrameRequest, CaptureVideoFrameResponse, NewVideoSourceRequest, NewVideoSourceResponse, NewVideoStreamRequest, NewVideoStreamResponse, VideoConvertRequest, VideoConvertResponse, VideoStreamEvent, VideoStreamFromParticipantRequest, VideoStreamFromParticipantResponse } = require("./video_frame_pb.js"); +const { 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 } = require("./audio_frame_pb.js"); +const { E2eeRequest, E2eeResponse } = require("./e2ee_pb.js"); +const { PerformRpcCallback, PerformRpcRequest, PerformRpcResponse, RegisterRpcMethodRequest, RegisterRpcMethodResponse, RpcMethodInvocationEvent, RpcMethodInvocationResponseRequest, RpcMethodInvocationResponseResponse, UnregisterRpcMethodRequest, UnregisterRpcMethodResponse } = require("./rpc_pb.js"); +const { EnableRemoteTrackPublicationRequest, EnableRemoteTrackPublicationResponse, SetRemoteTrackPublicationQualityRequest, SetRemoteTrackPublicationQualityResponse, UpdateRemoteTrackPublicationDimensionRequest, UpdateRemoteTrackPublicationDimensionResponse } = require("./track_publication_pb.js"); +const { 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 } = require("./data_stream_pb.js"); + +/** + * @generated from enum livekit.proto.LogLevel + */ +const LogLevel = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const FfiRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.FfiRequest", + () => [ + { 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" }, + ], +); + +/** + * This is the output of livekit_ffi_request function. + * + * @generated from message livekit.proto.FfiResponse + */ +const FfiResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.FfiResponse", + () => [ + { 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" }, + ], +); + +/** + * 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 + */ +const FfiEvent = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.FfiEvent", + () => [ + { 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" }, + ], +); + +/** + * 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 + */ +const DisposeRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.DisposeRequest", + () => [ + { no: 1, name: "async", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.DisposeResponse + */ +const DisposeResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.DisposeResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.DisposeCallback + */ +const DisposeCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.DisposeCallback", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.LogRecord + */ +const LogRecord = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.LogRecord", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.LogBatch + */ +const LogBatch = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.LogBatch", + () => [ + { no: 1, name: "records", kind: "message", T: LogRecord, repeated: true }, + ], +); + +/** + * @generated from message livekit.proto.Panic + */ +const Panic = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.Panic", + () => [ + { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ], +); + + +exports.LogLevel = LogLevel; +exports.FfiRequest = FfiRequest; +exports.FfiResponse = FfiResponse; +exports.FfiEvent = FfiEvent; +exports.DisposeRequest = DisposeRequest; +exports.DisposeResponse = DisposeResponse; +exports.DisposeCallback = DisposeCallback; +exports.LogRecord = LogRecord; +exports.LogBatch = LogBatch; +exports.Panic = Panic; diff --git a/livekit-ffi-node-bindings/src/proto/handle_pb.ts b/livekit-ffi-node-bindings/proto/handle_pb.d.ts similarity index 68% rename from livekit-ffi-node-bindings/src/proto/handle_pb.ts rename to livekit-ffi-node-bindings/proto/handle_pb.d.ts index 597ad3838..e11abfc41 100644 --- a/livekit-ffi-node-bindings/src/proto/handle_pb.ts +++ b/livekit-ffi-node-bindings/proto/handle_pb.d.ts @@ -12,7 +12,7 @@ // 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 by protoc-gen-es v1.10.1 with parameter "js_import_style=legacy_commonjs" // @generated from file handle.proto (package livekit.proto, syntax proto2) /* eslint-disable */ // @ts-nocheck @@ -33,37 +33,24 @@ import { Message, proto2 } from "@bufbuild/protobuf"; * * @generated from message livekit.proto.FfiOwnedHandle */ -export class FfiOwnedHandle extends Message { +export declare class FfiOwnedHandle extends Message { /** * @generated from field: required uint64 id = 1; */ id?: bigint; - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } + constructor(data?: PartialMessage); - static readonly runtime: typeof proto2 = proto2; + static readonly runtime: typeof 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 readonly fields: FieldList; - static fromBinary(bytes: Uint8Array, options?: Partial): FfiOwnedHandle { - return new FfiOwnedHandle().fromBinary(bytes, options); - } + static fromBinary(bytes: Uint8Array, options?: Partial): FfiOwnedHandle; - static fromJson(jsonValue: JsonValue, options?: Partial): FfiOwnedHandle { - return new FfiOwnedHandle().fromJson(jsonValue, options); - } + static fromJson(jsonValue: JsonValue, options?: Partial): FfiOwnedHandle; - static fromJsonString(jsonString: string, options?: Partial): FfiOwnedHandle { - return new FfiOwnedHandle().fromJsonString(jsonString, options); - } + static fromJsonString(jsonString: string, options?: Partial): FfiOwnedHandle; - static equals(a: FfiOwnedHandle | PlainMessage | undefined, b: FfiOwnedHandle | PlainMessage | undefined): boolean { - return proto2.util.equals(FfiOwnedHandle, a, b); - } + static equals(a: FfiOwnedHandle | PlainMessage | undefined, b: FfiOwnedHandle | PlainMessage | undefined): boolean; } diff --git a/livekit-ffi-node-bindings/proto/handle_pb.js b/livekit-ffi-node-bindings/proto/handle_pb.js new file mode 100644 index 000000000..462098e7f --- /dev/null +++ b/livekit-ffi-node-bindings/proto/handle_pb.js @@ -0,0 +1,46 @@ +// 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 "js_import_style=legacy_commonjs" +// @generated from file handle.proto (package livekit.proto, syntax proto2) +/* eslint-disable */ +// @ts-nocheck + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +const { proto2 } = require("@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 + */ +const FfiOwnedHandle = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.FfiOwnedHandle", + () => [ + { no: 1, name: "id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + + +exports.FfiOwnedHandle = FfiOwnedHandle; diff --git a/livekit-ffi-node-bindings/src/proto/participant_pb.ts b/livekit-ffi-node-bindings/proto/participant_pb.d.ts similarity index 58% rename from livekit-ffi-node-bindings/src/proto/participant_pb.ts rename to livekit-ffi-node-bindings/proto/participant_pb.d.ts index da37a92a8..932b8879c 100644 --- a/livekit-ffi-node-bindings/src/proto/participant_pb.ts +++ b/livekit-ffi-node-bindings/proto/participant_pb.d.ts @@ -12,20 +12,20 @@ // 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 by protoc-gen-es v1.10.1 with parameter "js_import_style=legacy_commonjs" // @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"; -import { TrackSource } from "./track_pb.js"; +import type { FfiOwnedHandle } from "./handle_pb.js"; +import type { TrackSource } from "./track_pb.js"; /** * @generated from enum livekit.proto.ParticipantKind */ -export enum ParticipantKind { +export declare enum ParticipantKind { /** * @generated from enum value: PARTICIPANT_KIND_STANDARD = 0; */ @@ -61,21 +61,11 @@ export enum ParticipantKind { */ BRIDGE = 6, } -// 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" }, - { no: 6, name: "PARTICIPANT_KIND_BRIDGE" }, -]); /** * @generated from enum livekit.proto.ParticipantKindDetail */ -export enum ParticipantKindDetail { +export declare enum ParticipantKindDetail { /** * @generated from enum value: PARTICIPANT_KIND_DETAIL_CLOUD_AGENT = 0; */ @@ -101,19 +91,11 @@ export enum ParticipantKindDetail { */ BRIDGE_RTSP = 4, } -// 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" }, - { no: 4, name: "PARTICIPANT_KIND_DETAIL_BRIDGE_RTSP" }, -]); /** * @generated from enum livekit.proto.DisconnectReason */ -export enum DisconnectReason { +export declare enum DisconnectReason { /** * @generated from enum value: UNKNOWN_REASON = 0; */ @@ -220,30 +202,11 @@ export enum DisconnectReason { */ 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 { +export declare class ParticipantInfo extends Message { /** * @generated from field: required string sid = 1; */ @@ -267,7 +230,7 @@ export class ParticipantInfo extends Message { /** * @generated from field: map attributes = 5; */ - attributes: { [key: string]: string } = {}; + attributes: { [key: string]: string }; /** * @generated from field: required livekit.proto.ParticipantKind kind = 6; @@ -282,53 +245,32 @@ export class ParticipantInfo extends Message { /** * @generated from field: repeated livekit.proto.ParticipantKindDetail kind_details = 8; */ - kindDetails: ParticipantKindDetail[] = []; + kindDetails: ParticipantKindDetail[]; /** * @generated from field: optional livekit.proto.ParticipantPermission permission = 9; */ permission?: ParticipantPermission; - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } + constructor(data?: PartialMessage); - static readonly runtime: typeof proto2 = proto2; + static readonly runtime: typeof 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 }, - { no: 9, name: "permission", kind: "message", T: ParticipantPermission, opt: 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); - } + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantInfo; + + static fromJsonString(jsonString: string, options?: Partial): ParticipantInfo; + + static equals(a: ParticipantInfo | PlainMessage | undefined, b: ParticipantInfo | PlainMessage | undefined): boolean; } /** * @generated from message livekit.proto.OwnedParticipant */ -export class OwnedParticipant extends Message { +export declare class OwnedParticipant extends Message { /** * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1; */ @@ -339,33 +281,19 @@ export class OwnedParticipant extends Message { */ info?: ParticipantInfo; - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } + constructor(data?: PartialMessage); - static readonly runtime: typeof proto2 = proto2; + static readonly runtime: typeof 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); - } + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedParticipant; + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedParticipant; + + static fromJsonString(jsonString: string, options?: Partial): OwnedParticipant; + + static equals(a: OwnedParticipant | PlainMessage | undefined, b: OwnedParticipant | PlainMessage | undefined): boolean; } /** @@ -373,7 +301,7 @@ export class OwnedParticipant extends Message { * * @generated from message livekit.proto.ParticipantPermission */ -export class ParticipantPermission extends Message { +export declare class ParticipantPermission extends Message { /** * allow participant to subscribe to other tracks in the room * @@ -400,7 +328,7 @@ export class ParticipantPermission extends Message { * * @generated from field: repeated livekit.proto.TrackSource can_publish_sources = 9; */ - canPublishSources: TrackSource[] = []; + canPublishSources: TrackSource[]; /** * indicates that it's hidden to others @@ -430,38 +358,18 @@ export class ParticipantPermission extends Message { */ canManageAgentSession?: boolean; - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } + constructor(data?: PartialMessage); - static readonly runtime: typeof proto2 = proto2; + static readonly runtime: typeof proto2; static readonly typeName = "livekit.proto.ParticipantPermission"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "can_subscribe", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 2, name: "can_publish", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 3, name: "can_publish_data", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 9, name: "can_publish_sources", kind: "enum", T: proto2.getEnumType(TrackSource), repeated: true }, - { no: 7, name: "hidden", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 10, name: "can_update_metadata", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 12, name: "can_subscribe_metrics", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - { no: 13, name: "can_manage_agent_session", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantPermission { - return new ParticipantPermission().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantPermission { - return new ParticipantPermission().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ParticipantPermission { - return new ParticipantPermission().fromJsonString(jsonString, options); - } - - static equals(a: ParticipantPermission | PlainMessage | undefined, b: ParticipantPermission | PlainMessage | undefined): boolean { - return proto2.util.equals(ParticipantPermission, a, b); - } + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantPermission; + + static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantPermission; + + static fromJsonString(jsonString: string, options?: Partial): ParticipantPermission; + + static equals(a: ParticipantPermission | PlainMessage | undefined, b: ParticipantPermission | PlainMessage | undefined): boolean; } diff --git a/livekit-ffi-node-bindings/proto/participant_pb.js b/livekit-ffi-node-bindings/proto/participant_pb.js new file mode 100644 index 000000000..739cf93c6 --- /dev/null +++ b/livekit-ffi-node-bindings/proto/participant_pb.js @@ -0,0 +1,136 @@ +// 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 "js_import_style=legacy_commonjs" +// @generated from file participant.proto (package livekit.proto, syntax proto2) +/* eslint-disable */ +// @ts-nocheck + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +const { proto2 } = require("@bufbuild/protobuf"); +const { FfiOwnedHandle } = require("./handle_pb.js"); +const { TrackSource } = require("./track_pb.js"); + +/** + * @generated from enum livekit.proto.ParticipantKind + */ +const ParticipantKind = /*@__PURE__*/ proto2.makeEnum( + "livekit.proto.ParticipantKind", + [ + {no: 0, name: "PARTICIPANT_KIND_STANDARD", localName: "STANDARD"}, + {no: 1, name: "PARTICIPANT_KIND_INGRESS", localName: "INGRESS"}, + {no: 2, name: "PARTICIPANT_KIND_EGRESS", localName: "EGRESS"}, + {no: 3, name: "PARTICIPANT_KIND_SIP", localName: "SIP"}, + {no: 4, name: "PARTICIPANT_KIND_AGENT", localName: "AGENT"}, + {no: 5, name: "PARTICIPANT_KIND_CONNECTOR", localName: "CONNECTOR"}, + {no: 6, name: "PARTICIPANT_KIND_BRIDGE", localName: "BRIDGE"}, + ], +); + +/** + * @generated from enum livekit.proto.ParticipantKindDetail + */ +const ParticipantKindDetail = /*@__PURE__*/ proto2.makeEnum( + "livekit.proto.ParticipantKindDetail", + [ + {no: 0, name: "PARTICIPANT_KIND_DETAIL_CLOUD_AGENT", localName: "CLOUD_AGENT"}, + {no: 1, name: "PARTICIPANT_KIND_DETAIL_FORWARDED", localName: "FORWARDED"}, + {no: 2, name: "PARTICIPANT_KIND_DETAIL_CONNECTOR_WHATSAPP", localName: "CONNECTOR_WHATSAPP"}, + {no: 3, name: "PARTICIPANT_KIND_DETAIL_CONNECTOR_TWILIO", localName: "CONNECTOR_TWILIO"}, + {no: 4, name: "PARTICIPANT_KIND_DETAIL_BRIDGE_RTSP", localName: "BRIDGE_RTSP"}, + ], +); + +/** + * @generated from enum livekit.proto.DisconnectReason + */ +const DisconnectReason = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const ParticipantInfo = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ParticipantInfo", + () => [ + { 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 }, + { no: 9, name: "permission", kind: "message", T: ParticipantPermission, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.OwnedParticipant + */ +const OwnedParticipant = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.OwnedParticipant", + () => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: ParticipantInfo, req: true }, + ], +); + +/** + * copied from livekit-protocol/protocol/protobufs/livekit_models.proto and removed deprecated fields + * + * @generated from message livekit.proto.ParticipantPermission + */ +const ParticipantPermission = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ParticipantPermission", + () => [ + { no: 1, name: "can_subscribe", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, + { no: 2, name: "can_publish", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, + { no: 3, name: "can_publish_data", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, + { no: 9, name: "can_publish_sources", kind: "enum", T: proto2.getEnumType(TrackSource), repeated: true }, + { no: 7, name: "hidden", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, + { no: 10, name: "can_update_metadata", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, + { no: 12, name: "can_subscribe_metrics", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, + { no: 13, name: "can_manage_agent_session", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, + ], +); + + +exports.ParticipantKind = ParticipantKind; +exports.ParticipantKindDetail = ParticipantKindDetail; +exports.DisconnectReason = DisconnectReason; +exports.ParticipantInfo = ParticipantInfo; +exports.OwnedParticipant = OwnedParticipant; +exports.ParticipantPermission = ParticipantPermission; diff --git a/livekit-ffi-node-bindings/proto/room_pb.d.ts b/livekit-ffi-node-bindings/proto/room_pb.d.ts new file mode 100644 index 000000000..14d81e121 --- /dev/null +++ b/livekit-ffi-node-bindings/proto/room_pb.d.ts @@ -0,0 +1,4086 @@ +// 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 "js_import_style=legacy_commonjs" +// @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 type { DisconnectReason, OwnedParticipant, ParticipantInfo, ParticipantPermission } from "./participant_pb.js"; +import type { OwnedTrack, OwnedTrackPublication, TrackSource } from "./track_pb.js"; +import type { RtcStats } from "./stats_pb.js"; +import type { VideoCodec } from "./video_frame_pb.js"; +import type { E2eeOptions, EncryptionState } from "./e2ee_pb.js"; +import type { FfiOwnedHandle } from "./handle_pb.js"; +import type { OwnedByteStreamReader, OwnedTextStreamReader } from "./data_stream_pb.js"; + +/** + * @generated from enum livekit.proto.IceTransportType + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.ContinualGatheringPolicy + */ +export declare enum ContinualGatheringPolicy { + /** + * @generated from enum value: GATHER_ONCE = 0; + */ + GATHER_ONCE = 0, + + /** + * @generated from enum value: GATHER_CONTINUALLY = 1; + */ + GATHER_CONTINUALLY = 1, +} + +/** + * @generated from enum livekit.proto.ConnectionQuality + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.ConnectionState + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.DataPacketKind + */ +export declare enum DataPacketKind { + /** + * @generated from enum value: KIND_LOSSY = 0; + */ + KIND_LOSSY = 0, + + /** + * @generated from enum value: KIND_RELIABLE = 1; + */ + KIND_RELIABLE = 1, +} + +/** + * Connect to a new LiveKit room + * + * @generated from message livekit.proto.ConnectRequest + */ +export declare 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; + + /** + * @generated from field: optional uint64 request_async_id = 4; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ConnectRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ConnectRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ConnectRequest; + + static fromJsonString(jsonString: string, options?: Partial): ConnectRequest; + + static equals(a: ConnectRequest | PlainMessage | undefined, b: ConnectRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ConnectResponse + */ +export declare class ConnectResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ConnectResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ConnectResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ConnectResponse; + + static fromJsonString(jsonString: string, options?: Partial): ConnectResponse; + + static equals(a: ConnectResponse | PlainMessage | undefined, b: ConnectResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ConnectCallback + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ConnectCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ConnectCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): ConnectCallback; + + static fromJsonString(jsonString: string, options?: Partial): ConnectCallback; + + static equals(a: ConnectCallback | PlainMessage | undefined, b: ConnectCallback | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ConnectCallback.ParticipantWithTracks + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ConnectCallback.ParticipantWithTracks"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ConnectCallback_ParticipantWithTracks; + + static fromJson(jsonValue: JsonValue, options?: Partial): ConnectCallback_ParticipantWithTracks; + + static fromJsonString(jsonString: string, options?: Partial): ConnectCallback_ParticipantWithTracks; + + static equals(a: ConnectCallback_ParticipantWithTracks | PlainMessage | undefined, b: ConnectCallback_ParticipantWithTracks | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ConnectCallback.Result + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ConnectCallback.Result"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ConnectCallback_Result; + + static fromJson(jsonValue: JsonValue, options?: Partial): ConnectCallback_Result; + + static fromJsonString(jsonString: string, options?: Partial): ConnectCallback_Result; + + static equals(a: ConnectCallback_Result | PlainMessage | undefined, b: ConnectCallback_Result | PlainMessage | undefined): boolean; +} + +/** + * Disconnect from the a room + * + * @generated from message livekit.proto.DisconnectRequest + */ +export declare class DisconnectRequest extends Message { + /** + * @generated from field: required uint64 room_handle = 1; + */ + roomHandle?: bigint; + + /** + * @generated from field: optional uint64 request_async_id = 2; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.DisconnectRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DisconnectRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): DisconnectRequest; + + static fromJsonString(jsonString: string, options?: Partial): DisconnectRequest; + + static equals(a: DisconnectRequest | PlainMessage | undefined, b: DisconnectRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.DisconnectResponse + */ +export declare class DisconnectResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.DisconnectResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DisconnectResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): DisconnectResponse; + + static fromJsonString(jsonString: string, options?: Partial): DisconnectResponse; + + static equals(a: DisconnectResponse | PlainMessage | undefined, b: DisconnectResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.DisconnectCallback + */ +export declare class DisconnectCallback extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.DisconnectCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DisconnectCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): DisconnectCallback; + + static fromJsonString(jsonString: string, options?: Partial): DisconnectCallback; + + static equals(a: DisconnectCallback | PlainMessage | undefined, b: DisconnectCallback | PlainMessage | undefined): boolean; +} + +/** + * Publish a track to the room + * + * @generated from message livekit.proto.PublishTrackRequest + */ +export declare 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; + + /** + * @generated from field: optional uint64 request_async_id = 4; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.PublishTrackRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PublishTrackRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): PublishTrackRequest; + + static fromJsonString(jsonString: string, options?: Partial): PublishTrackRequest; + + static equals(a: PublishTrackRequest | PlainMessage | undefined, b: PublishTrackRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.PublishTrackResponse + */ +export declare class PublishTrackResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.PublishTrackResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PublishTrackResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): PublishTrackResponse; + + static fromJsonString(jsonString: string, options?: Partial): PublishTrackResponse; + + static equals(a: PublishTrackResponse | PlainMessage | undefined, b: PublishTrackResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.PublishTrackCallback + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.PublishTrackCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PublishTrackCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): PublishTrackCallback; + + static fromJsonString(jsonString: string, options?: Partial): PublishTrackCallback; + + static equals(a: PublishTrackCallback | PlainMessage | undefined, b: PublishTrackCallback | PlainMessage | undefined): boolean; +} + +/** + * Unpublish a track from the room + * + * @generated from message livekit.proto.UnpublishTrackRequest + */ +export declare 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; + + /** + * @generated from field: optional uint64 request_async_id = 4; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.UnpublishTrackRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UnpublishTrackRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): UnpublishTrackRequest; + + static fromJsonString(jsonString: string, options?: Partial): UnpublishTrackRequest; + + static equals(a: UnpublishTrackRequest | PlainMessage | undefined, b: UnpublishTrackRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.UnpublishTrackResponse + */ +export declare class UnpublishTrackResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.UnpublishTrackResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UnpublishTrackResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): UnpublishTrackResponse; + + static fromJsonString(jsonString: string, options?: Partial): UnpublishTrackResponse; + + static equals(a: UnpublishTrackResponse | PlainMessage | undefined, b: UnpublishTrackResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.UnpublishTrackCallback + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.UnpublishTrackCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UnpublishTrackCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): UnpublishTrackCallback; + + static fromJsonString(jsonString: string, options?: Partial): UnpublishTrackCallback; + + static equals(a: UnpublishTrackCallback | PlainMessage | undefined, b: UnpublishTrackCallback | PlainMessage | undefined): boolean; +} + +/** + * Publish data to other participants + * + * @generated from message livekit.proto.PublishDataRequest + */ +export declare 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[]; + + /** + * @generated from field: optional uint64 request_async_id = 8; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.PublishDataRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PublishDataRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): PublishDataRequest; + + static fromJsonString(jsonString: string, options?: Partial): PublishDataRequest; + + static equals(a: PublishDataRequest | PlainMessage | undefined, b: PublishDataRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.PublishDataResponse + */ +export declare class PublishDataResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.PublishDataResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PublishDataResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): PublishDataResponse; + + static fromJsonString(jsonString: string, options?: Partial): PublishDataResponse; + + static equals(a: PublishDataResponse | PlainMessage | undefined, b: PublishDataResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.PublishDataCallback + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.PublishDataCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PublishDataCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): PublishDataCallback; + + static fromJsonString(jsonString: string, options?: Partial): PublishDataCallback; + + static equals(a: PublishDataCallback | PlainMessage | undefined, b: PublishDataCallback | PlainMessage | undefined): boolean; +} + +/** + * Publish transcription messages to room + * + * @generated from message livekit.proto.PublishTranscriptionRequest + */ +export declare 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[]; + + /** + * @generated from field: optional uint64 request_async_id = 5; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.PublishTranscriptionRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PublishTranscriptionRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): PublishTranscriptionRequest; + + static fromJsonString(jsonString: string, options?: Partial): PublishTranscriptionRequest; + + static equals(a: PublishTranscriptionRequest | PlainMessage | undefined, b: PublishTranscriptionRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.PublishTranscriptionResponse + */ +export declare class PublishTranscriptionResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.PublishTranscriptionResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PublishTranscriptionResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): PublishTranscriptionResponse; + + static fromJsonString(jsonString: string, options?: Partial): PublishTranscriptionResponse; + + static equals(a: PublishTranscriptionResponse | PlainMessage | undefined, b: PublishTranscriptionResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.PublishTranscriptionCallback + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.PublishTranscriptionCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PublishTranscriptionCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): PublishTranscriptionCallback; + + static fromJsonString(jsonString: string, options?: Partial): PublishTranscriptionCallback; + + static equals(a: PublishTranscriptionCallback | PlainMessage | undefined, b: PublishTranscriptionCallback | PlainMessage | undefined): boolean; +} + +/** + * Publish Sip DTMF messages to other participants + * + * @generated from message livekit.proto.PublishSipDtmfRequest + */ +export declare 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[]; + + /** + * @generated from field: optional uint64 request_async_id = 5; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.PublishSipDtmfRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PublishSipDtmfRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): PublishSipDtmfRequest; + + static fromJsonString(jsonString: string, options?: Partial): PublishSipDtmfRequest; + + static equals(a: PublishSipDtmfRequest | PlainMessage | undefined, b: PublishSipDtmfRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.PublishSipDtmfResponse + */ +export declare class PublishSipDtmfResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.PublishSipDtmfResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PublishSipDtmfResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): PublishSipDtmfResponse; + + static fromJsonString(jsonString: string, options?: Partial): PublishSipDtmfResponse; + + static equals(a: PublishSipDtmfResponse | PlainMessage | undefined, b: PublishSipDtmfResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.PublishSipDtmfCallback + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.PublishSipDtmfCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PublishSipDtmfCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): PublishSipDtmfCallback; + + static fromJsonString(jsonString: string, options?: Partial): PublishSipDtmfCallback; + + static equals(a: PublishSipDtmfCallback | PlainMessage | undefined, b: PublishSipDtmfCallback | PlainMessage | undefined): boolean; +} + +/** + * Change the local participant's metadata + * + * @generated from message livekit.proto.SetLocalMetadataRequest + */ +export declare class SetLocalMetadataRequest extends Message { + /** + * @generated from field: required uint64 local_participant_handle = 1; + */ + localParticipantHandle?: bigint; + + /** + * @generated from field: required string metadata = 2; + */ + metadata?: string; + + /** + * @generated from field: optional uint64 request_async_id = 3; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetLocalMetadataRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalMetadataRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalMetadataRequest; + + static fromJsonString(jsonString: string, options?: Partial): SetLocalMetadataRequest; + + static equals(a: SetLocalMetadataRequest | PlainMessage | undefined, b: SetLocalMetadataRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SetLocalMetadataResponse + */ +export declare class SetLocalMetadataResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetLocalMetadataResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalMetadataResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalMetadataResponse; + + static fromJsonString(jsonString: string, options?: Partial): SetLocalMetadataResponse; + + static equals(a: SetLocalMetadataResponse | PlainMessage | undefined, b: SetLocalMetadataResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SetLocalMetadataCallback + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetLocalMetadataCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalMetadataCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalMetadataCallback; + + static fromJsonString(jsonString: string, options?: Partial): SetLocalMetadataCallback; + + static equals(a: SetLocalMetadataCallback | PlainMessage | undefined, b: SetLocalMetadataCallback | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SendChatMessageRequest + */ +export declare 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; + + /** + * @generated from field: optional uint64 request_async_id = 5; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SendChatMessageRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SendChatMessageRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): SendChatMessageRequest; + + static fromJsonString(jsonString: string, options?: Partial): SendChatMessageRequest; + + static equals(a: SendChatMessageRequest | PlainMessage | undefined, b: SendChatMessageRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.EditChatMessageRequest + */ +export declare 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; + + /** + * @generated from field: optional uint64 request_async_id = 6; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.EditChatMessageRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): EditChatMessageRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): EditChatMessageRequest; + + static fromJsonString(jsonString: string, options?: Partial): EditChatMessageRequest; + + static equals(a: EditChatMessageRequest | PlainMessage | undefined, b: EditChatMessageRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SendChatMessageResponse + */ +export declare class SendChatMessageResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SendChatMessageResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SendChatMessageResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): SendChatMessageResponse; + + static fromJsonString(jsonString: string, options?: Partial): SendChatMessageResponse; + + static equals(a: SendChatMessageResponse | PlainMessage | undefined, b: SendChatMessageResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SendChatMessageCallback + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SendChatMessageCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SendChatMessageCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): SendChatMessageCallback; + + static fromJsonString(jsonString: string, options?: Partial): SendChatMessageCallback; + + static equals(a: SendChatMessageCallback | PlainMessage | undefined, b: SendChatMessageCallback | PlainMessage | undefined): boolean; +} + +/** + * Change the local participant's attributes + * + * @generated from message livekit.proto.SetLocalAttributesRequest + */ +export declare 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[]; + + /** + * @generated from field: optional uint64 request_async_id = 3; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetLocalAttributesRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalAttributesRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalAttributesRequest; + + static fromJsonString(jsonString: string, options?: Partial): SetLocalAttributesRequest; + + static equals(a: SetLocalAttributesRequest | PlainMessage | undefined, b: SetLocalAttributesRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.AttributesEntry + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.AttributesEntry"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AttributesEntry; + + static fromJson(jsonValue: JsonValue, options?: Partial): AttributesEntry; + + static fromJsonString(jsonString: string, options?: Partial): AttributesEntry; + + static equals(a: AttributesEntry | PlainMessage | undefined, b: AttributesEntry | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SetLocalAttributesResponse + */ +export declare class SetLocalAttributesResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetLocalAttributesResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalAttributesResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalAttributesResponse; + + static fromJsonString(jsonString: string, options?: Partial): SetLocalAttributesResponse; + + static equals(a: SetLocalAttributesResponse | PlainMessage | undefined, b: SetLocalAttributesResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SetLocalAttributesCallback + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetLocalAttributesCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalAttributesCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalAttributesCallback; + + static fromJsonString(jsonString: string, options?: Partial): SetLocalAttributesCallback; + + static equals(a: SetLocalAttributesCallback | PlainMessage | undefined, b: SetLocalAttributesCallback | PlainMessage | undefined): boolean; +} + +/** + * Change the local participant's name + * + * @generated from message livekit.proto.SetLocalNameRequest + */ +export declare class SetLocalNameRequest extends Message { + /** + * @generated from field: required uint64 local_participant_handle = 1; + */ + localParticipantHandle?: bigint; + + /** + * @generated from field: required string name = 2; + */ + name?: string; + + /** + * @generated from field: optional uint64 request_async_id = 3; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetLocalNameRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalNameRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalNameRequest; + + static fromJsonString(jsonString: string, options?: Partial): SetLocalNameRequest; + + static equals(a: SetLocalNameRequest | PlainMessage | undefined, b: SetLocalNameRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SetLocalNameResponse + */ +export declare class SetLocalNameResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetLocalNameResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalNameResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalNameResponse; + + static fromJsonString(jsonString: string, options?: Partial): SetLocalNameResponse; + + static equals(a: SetLocalNameResponse | PlainMessage | undefined, b: SetLocalNameResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SetLocalNameCallback + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetLocalNameCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetLocalNameCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetLocalNameCallback; + + static fromJsonString(jsonString: string, options?: Partial): SetLocalNameCallback; + + static equals(a: SetLocalNameCallback | PlainMessage | undefined, b: SetLocalNameCallback | PlainMessage | undefined): boolean; +} + +/** + * Change the "desire" to subs2ribe to a track + * + * @generated from message livekit.proto.SetSubscribedRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetSubscribedRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetSubscribedRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetSubscribedRequest; + + static fromJsonString(jsonString: string, options?: Partial): SetSubscribedRequest; + + static equals(a: SetSubscribedRequest | PlainMessage | undefined, b: SetSubscribedRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SetSubscribedResponse + */ +export declare class SetSubscribedResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetSubscribedResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetSubscribedResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetSubscribedResponse; + + static fromJsonString(jsonString: string, options?: Partial): SetSubscribedResponse; + + static equals(a: SetSubscribedResponse | PlainMessage | undefined, b: SetSubscribedResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.GetSessionStatsRequest + */ +export declare class GetSessionStatsRequest extends Message { + /** + * @generated from field: required uint64 room_handle = 1; + */ + roomHandle?: bigint; + + /** + * @generated from field: optional uint64 request_async_id = 2; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.GetSessionStatsRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetSessionStatsRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetSessionStatsRequest; + + static fromJsonString(jsonString: string, options?: Partial): GetSessionStatsRequest; + + static equals(a: GetSessionStatsRequest | PlainMessage | undefined, b: GetSessionStatsRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.GetSessionStatsResponse + */ +export declare class GetSessionStatsResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.GetSessionStatsResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetSessionStatsResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetSessionStatsResponse; + + static fromJsonString(jsonString: string, options?: Partial): GetSessionStatsResponse; + + static equals(a: GetSessionStatsResponse | PlainMessage | undefined, b: GetSessionStatsResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.GetSessionStatsCallback + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.GetSessionStatsCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetSessionStatsCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetSessionStatsCallback; + + static fromJsonString(jsonString: string, options?: Partial): GetSessionStatsCallback; + + static equals(a: GetSessionStatsCallback | PlainMessage | undefined, b: GetSessionStatsCallback | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.GetSessionStatsCallback.Result + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.GetSessionStatsCallback.Result"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetSessionStatsCallback_Result; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetSessionStatsCallback_Result; + + static fromJsonString(jsonString: string, options?: Partial): GetSessionStatsCallback_Result; + + static equals(a: GetSessionStatsCallback_Result | PlainMessage | undefined, b: GetSessionStatsCallback_Result | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.VideoEncoding + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.VideoEncoding"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): VideoEncoding; + + static fromJson(jsonValue: JsonValue, options?: Partial): VideoEncoding; + + static fromJsonString(jsonString: string, options?: Partial): VideoEncoding; + + static equals(a: VideoEncoding | PlainMessage | undefined, b: VideoEncoding | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.AudioEncoding + */ +export declare class AudioEncoding extends Message { + /** + * @generated from field: required uint64 max_bitrate = 1; + */ + maxBitrate?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.AudioEncoding"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AudioEncoding; + + static fromJson(jsonValue: JsonValue, options?: Partial): AudioEncoding; + + static fromJsonString(jsonString: string, options?: Partial): AudioEncoding; + + static equals(a: AudioEncoding | PlainMessage | undefined, b: AudioEncoding | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TrackPublishOptions + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TrackPublishOptions"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TrackPublishOptions; + + static fromJson(jsonValue: JsonValue, options?: Partial): TrackPublishOptions; + + static fromJsonString(jsonString: string, options?: Partial): TrackPublishOptions; + + static equals(a: TrackPublishOptions | PlainMessage | undefined, b: TrackPublishOptions | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.IceServer + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.IceServer"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): IceServer; + + static fromJson(jsonValue: JsonValue, options?: Partial): IceServer; + + static fromJsonString(jsonString: string, options?: Partial): IceServer; + + static equals(a: IceServer | PlainMessage | undefined, b: IceServer | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RtcConfig + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtcConfig"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtcConfig; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtcConfig; + + static fromJsonString(jsonString: string, options?: Partial): RtcConfig; + + static equals(a: RtcConfig | PlainMessage | undefined, b: RtcConfig | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RoomOptions + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RoomOptions"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RoomOptions; + + static fromJson(jsonValue: JsonValue, options?: Partial): RoomOptions; + + static fromJsonString(jsonString: string, options?: Partial): RoomOptions; + + static equals(a: RoomOptions | PlainMessage | undefined, b: RoomOptions | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TranscriptionSegment + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TranscriptionSegment"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TranscriptionSegment; + + static fromJson(jsonValue: JsonValue, options?: Partial): TranscriptionSegment; + + static fromJsonString(jsonString: string, options?: Partial): TranscriptionSegment; + + static equals(a: TranscriptionSegment | PlainMessage | undefined, b: TranscriptionSegment | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.BufferInfo + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.BufferInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): BufferInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): BufferInfo; + + static fromJsonString(jsonString: string, options?: Partial): BufferInfo; + + static equals(a: BufferInfo | PlainMessage | undefined, b: BufferInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.OwnedBuffer + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.OwnedBuffer"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedBuffer; + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedBuffer; + + static fromJsonString(jsonString: string, options?: Partial): OwnedBuffer; + + static equals(a: OwnedBuffer | PlainMessage | undefined, b: OwnedBuffer | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RoomEvent + */ +export declare 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.ParticipantPermissionChanged participant_permission_changed = 41; + */ + value: ParticipantPermissionChanged; + case: "participantPermissionChanged"; + } | { + /** + * @generated from field: livekit.proto.TokenRefreshed token_refreshed = 40; + */ + value: TokenRefreshed; + case: "tokenRefreshed"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RoomEvent"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RoomEvent; + + static fromJson(jsonValue: JsonValue, options?: Partial): RoomEvent; + + static fromJsonString(jsonString: string, options?: Partial): RoomEvent; + + static equals(a: RoomEvent | PlainMessage | undefined, b: RoomEvent | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RoomInfo + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RoomInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RoomInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): RoomInfo; + + static fromJsonString(jsonString: string, options?: Partial): RoomInfo; + + static equals(a: RoomInfo | PlainMessage | undefined, b: RoomInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.OwnedRoom + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.OwnedRoom"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedRoom; + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedRoom; + + static fromJsonString(jsonString: string, options?: Partial): OwnedRoom; + + static equals(a: OwnedRoom | PlainMessage | undefined, b: OwnedRoom | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ParticipantsUpdated + */ +export declare class ParticipantsUpdated extends Message { + /** + * @generated from field: repeated livekit.proto.ParticipantInfo participants = 1; + */ + participants: ParticipantInfo[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ParticipantsUpdated"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantsUpdated; + + static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantsUpdated; + + static fromJsonString(jsonString: string, options?: Partial): ParticipantsUpdated; + + static equals(a: ParticipantsUpdated | PlainMessage | undefined, b: ParticipantsUpdated | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ParticipantConnected + */ +export declare class ParticipantConnected extends Message { + /** + * @generated from field: required livekit.proto.OwnedParticipant info = 1; + */ + info?: OwnedParticipant; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ParticipantConnected"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantConnected; + + static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantConnected; + + static fromJsonString(jsonString: string, options?: Partial): ParticipantConnected; + + static equals(a: ParticipantConnected | PlainMessage | undefined, b: ParticipantConnected | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ParticipantDisconnected + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ParticipantDisconnected"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantDisconnected; + + static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantDisconnected; + + static fromJsonString(jsonString: string, options?: Partial): ParticipantDisconnected; + + static equals(a: ParticipantDisconnected | PlainMessage | undefined, b: ParticipantDisconnected | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.LocalTrackPublished + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.LocalTrackPublished"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): LocalTrackPublished; + + static fromJson(jsonValue: JsonValue, options?: Partial): LocalTrackPublished; + + static fromJsonString(jsonString: string, options?: Partial): LocalTrackPublished; + + static equals(a: LocalTrackPublished | PlainMessage | undefined, b: LocalTrackPublished | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.LocalTrackUnpublished + */ +export declare class LocalTrackUnpublished extends Message { + /** + * @generated from field: required string publication_sid = 1; + */ + publicationSid?: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.LocalTrackUnpublished"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): LocalTrackUnpublished; + + static fromJson(jsonValue: JsonValue, options?: Partial): LocalTrackUnpublished; + + static fromJsonString(jsonString: string, options?: Partial): LocalTrackUnpublished; + + static equals(a: LocalTrackUnpublished | PlainMessage | undefined, b: LocalTrackUnpublished | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.LocalTrackSubscribed + */ +export declare class LocalTrackSubscribed extends Message { + /** + * @generated from field: required string track_sid = 2; + */ + trackSid?: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.LocalTrackSubscribed"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): LocalTrackSubscribed; + + static fromJson(jsonValue: JsonValue, options?: Partial): LocalTrackSubscribed; + + static fromJsonString(jsonString: string, options?: Partial): LocalTrackSubscribed; + + static equals(a: LocalTrackSubscribed | PlainMessage | undefined, b: LocalTrackSubscribed | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TrackPublished + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TrackPublished"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TrackPublished; + + static fromJson(jsonValue: JsonValue, options?: Partial): TrackPublished; + + static fromJsonString(jsonString: string, options?: Partial): TrackPublished; + + static equals(a: TrackPublished | PlainMessage | undefined, b: TrackPublished | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TrackUnpublished + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TrackUnpublished"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TrackUnpublished; + + static fromJson(jsonValue: JsonValue, options?: Partial): TrackUnpublished; + + static fromJsonString(jsonString: string, options?: Partial): TrackUnpublished; + + static equals(a: TrackUnpublished | PlainMessage | undefined, b: TrackUnpublished | PlainMessage | undefined): boolean; +} + +/** + * 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 declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TrackSubscribed"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TrackSubscribed; + + static fromJson(jsonValue: JsonValue, options?: Partial): TrackSubscribed; + + static fromJsonString(jsonString: string, options?: Partial): TrackSubscribed; + + static equals(a: TrackSubscribed | PlainMessage | undefined, b: TrackSubscribed | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TrackUnsubscribed + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TrackUnsubscribed"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TrackUnsubscribed; + + static fromJson(jsonValue: JsonValue, options?: Partial): TrackUnsubscribed; + + static fromJsonString(jsonString: string, options?: Partial): TrackUnsubscribed; + + static equals(a: TrackUnsubscribed | PlainMessage | undefined, b: TrackUnsubscribed | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TrackSubscriptionFailed + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TrackSubscriptionFailed"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TrackSubscriptionFailed; + + static fromJson(jsonValue: JsonValue, options?: Partial): TrackSubscriptionFailed; + + static fromJsonString(jsonString: string, options?: Partial): TrackSubscriptionFailed; + + static equals(a: TrackSubscriptionFailed | PlainMessage | undefined, b: TrackSubscriptionFailed | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TrackMuted + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TrackMuted"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TrackMuted; + + static fromJson(jsonValue: JsonValue, options?: Partial): TrackMuted; + + static fromJsonString(jsonString: string, options?: Partial): TrackMuted; + + static equals(a: TrackMuted | PlainMessage | undefined, b: TrackMuted | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TrackUnmuted + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TrackUnmuted"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TrackUnmuted; + + static fromJson(jsonValue: JsonValue, options?: Partial): TrackUnmuted; + + static fromJsonString(jsonString: string, options?: Partial): TrackUnmuted; + + static equals(a: TrackUnmuted | PlainMessage | undefined, b: TrackUnmuted | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.E2eeStateChanged + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.E2eeStateChanged"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): E2eeStateChanged; + + static fromJson(jsonValue: JsonValue, options?: Partial): E2eeStateChanged; + + static fromJsonString(jsonString: string, options?: Partial): E2eeStateChanged; + + static equals(a: E2eeStateChanged | PlainMessage | undefined, b: E2eeStateChanged | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ActiveSpeakersChanged + */ +export declare class ActiveSpeakersChanged extends Message { + /** + * @generated from field: repeated string participant_identities = 1; + */ + participantIdentities: string[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ActiveSpeakersChanged"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ActiveSpeakersChanged; + + static fromJson(jsonValue: JsonValue, options?: Partial): ActiveSpeakersChanged; + + static fromJsonString(jsonString: string, options?: Partial): ActiveSpeakersChanged; + + static equals(a: ActiveSpeakersChanged | PlainMessage | undefined, b: ActiveSpeakersChanged | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RoomMetadataChanged + */ +export declare class RoomMetadataChanged extends Message { + /** + * @generated from field: required string metadata = 1; + */ + metadata?: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RoomMetadataChanged"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RoomMetadataChanged; + + static fromJson(jsonValue: JsonValue, options?: Partial): RoomMetadataChanged; + + static fromJsonString(jsonString: string, options?: Partial): RoomMetadataChanged; + + static equals(a: RoomMetadataChanged | PlainMessage | undefined, b: RoomMetadataChanged | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RoomSidChanged + */ +export declare class RoomSidChanged extends Message { + /** + * @generated from field: required string sid = 1; + */ + sid?: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RoomSidChanged"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RoomSidChanged; + + static fromJson(jsonValue: JsonValue, options?: Partial): RoomSidChanged; + + static fromJsonString(jsonString: string, options?: Partial): RoomSidChanged; + + static equals(a: RoomSidChanged | PlainMessage | undefined, b: RoomSidChanged | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ParticipantMetadataChanged + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ParticipantMetadataChanged"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantMetadataChanged; + + static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantMetadataChanged; + + static fromJsonString(jsonString: string, options?: Partial): ParticipantMetadataChanged; + + static equals(a: ParticipantMetadataChanged | PlainMessage | undefined, b: ParticipantMetadataChanged | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ParticipantAttributesChanged + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ParticipantAttributesChanged"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantAttributesChanged; + + static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantAttributesChanged; + + static fromJsonString(jsonString: string, options?: Partial): ParticipantAttributesChanged; + + static equals(a: ParticipantAttributesChanged | PlainMessage | undefined, b: ParticipantAttributesChanged | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ParticipantEncryptionStatusChanged + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ParticipantEncryptionStatusChanged"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantEncryptionStatusChanged; + + static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantEncryptionStatusChanged; + + static fromJsonString(jsonString: string, options?: Partial): ParticipantEncryptionStatusChanged; + + static equals(a: ParticipantEncryptionStatusChanged | PlainMessage | undefined, b: ParticipantEncryptionStatusChanged | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ParticipantNameChanged + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ParticipantNameChanged"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantNameChanged; + + static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantNameChanged; + + static fromJsonString(jsonString: string, options?: Partial): ParticipantNameChanged; + + static equals(a: ParticipantNameChanged | PlainMessage | undefined, b: ParticipantNameChanged | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ParticipantPermissionChanged + */ +export declare class ParticipantPermissionChanged extends Message { + /** + * @generated from field: required string participant_identity = 1; + */ + participantIdentity?: string; + + /** + * @generated from field: optional livekit.proto.ParticipantPermission permission = 2; + */ + permission?: ParticipantPermission; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ParticipantPermissionChanged"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantPermissionChanged; + + static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantPermissionChanged; + + static fromJsonString(jsonString: string, options?: Partial): ParticipantPermissionChanged; + + static equals(a: ParticipantPermissionChanged | PlainMessage | undefined, b: ParticipantPermissionChanged | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ConnectionQualityChanged + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ConnectionQualityChanged"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ConnectionQualityChanged; + + static fromJson(jsonValue: JsonValue, options?: Partial): ConnectionQualityChanged; + + static fromJsonString(jsonString: string, options?: Partial): ConnectionQualityChanged; + + static equals(a: ConnectionQualityChanged | PlainMessage | undefined, b: ConnectionQualityChanged | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.UserPacket + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.UserPacket"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UserPacket; + + static fromJson(jsonValue: JsonValue, options?: Partial): UserPacket; + + static fromJsonString(jsonString: string, options?: Partial): UserPacket; + + static equals(a: UserPacket | PlainMessage | undefined, b: UserPacket | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ChatMessage + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ChatMessage"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ChatMessage; + + static fromJson(jsonValue: JsonValue, options?: Partial): ChatMessage; + + static fromJsonString(jsonString: string, options?: Partial): ChatMessage; + + static equals(a: ChatMessage | PlainMessage | undefined, b: ChatMessage | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ChatMessageReceived + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ChatMessageReceived"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ChatMessageReceived; + + static fromJson(jsonValue: JsonValue, options?: Partial): ChatMessageReceived; + + static fromJsonString(jsonString: string, options?: Partial): ChatMessageReceived; + + static equals(a: ChatMessageReceived | PlainMessage | undefined, b: ChatMessageReceived | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SipDTMF + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SipDTMF"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SipDTMF; + + static fromJson(jsonValue: JsonValue, options?: Partial): SipDTMF; + + static fromJsonString(jsonString: string, options?: Partial): SipDTMF; + + static equals(a: SipDTMF | PlainMessage | undefined, b: SipDTMF | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.DataPacketReceived + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.DataPacketReceived"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DataPacketReceived; + + static fromJson(jsonValue: JsonValue, options?: Partial): DataPacketReceived; + + static fromJsonString(jsonString: string, options?: Partial): DataPacketReceived; + + static equals(a: DataPacketReceived | PlainMessage | undefined, b: DataPacketReceived | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TranscriptionReceived + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TranscriptionReceived"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TranscriptionReceived; + + static fromJson(jsonValue: JsonValue, options?: Partial): TranscriptionReceived; + + static fromJsonString(jsonString: string, options?: Partial): TranscriptionReceived; + + static equals(a: TranscriptionReceived | PlainMessage | undefined, b: TranscriptionReceived | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ConnectionStateChanged + */ +export declare class ConnectionStateChanged extends Message { + /** + * @generated from field: required livekit.proto.ConnectionState state = 1; + */ + state?: ConnectionState; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ConnectionStateChanged"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ConnectionStateChanged; + + static fromJson(jsonValue: JsonValue, options?: Partial): ConnectionStateChanged; + + static fromJsonString(jsonString: string, options?: Partial): ConnectionStateChanged; + + static equals(a: ConnectionStateChanged | PlainMessage | undefined, b: ConnectionStateChanged | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.Connected + */ +export declare class Connected extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.Connected"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Connected; + + static fromJson(jsonValue: JsonValue, options?: Partial): Connected; + + static fromJsonString(jsonString: string, options?: Partial): Connected; + + static equals(a: Connected | PlainMessage | undefined, b: Connected | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.Disconnected + */ +export declare class Disconnected extends Message { + /** + * @generated from field: required livekit.proto.DisconnectReason reason = 1; + */ + reason?: DisconnectReason; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.Disconnected"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Disconnected; + + static fromJson(jsonValue: JsonValue, options?: Partial): Disconnected; + + static fromJsonString(jsonString: string, options?: Partial): Disconnected; + + static equals(a: Disconnected | PlainMessage | undefined, b: Disconnected | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.Reconnecting + */ +export declare class Reconnecting extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.Reconnecting"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Reconnecting; + + static fromJson(jsonValue: JsonValue, options?: Partial): Reconnecting; + + static fromJsonString(jsonString: string, options?: Partial): Reconnecting; + + static equals(a: Reconnecting | PlainMessage | undefined, b: Reconnecting | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.Reconnected + */ +export declare class Reconnected extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.Reconnected"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Reconnected; + + static fromJson(jsonValue: JsonValue, options?: Partial): Reconnected; + + static fromJsonString(jsonString: string, options?: Partial): Reconnected; + + static equals(a: Reconnected | PlainMessage | undefined, b: Reconnected | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TokenRefreshed + */ +export declare class TokenRefreshed extends Message { + /** + * @generated from field: required string token = 1; + */ + token?: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TokenRefreshed"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TokenRefreshed; + + static fromJson(jsonValue: JsonValue, options?: Partial): TokenRefreshed; + + static fromJsonString(jsonString: string, options?: Partial): TokenRefreshed; + + static equals(a: TokenRefreshed | PlainMessage | undefined, b: TokenRefreshed | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RoomEOS + */ +export declare class RoomEOS extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RoomEOS"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RoomEOS; + + static fromJson(jsonValue: JsonValue, options?: Partial): RoomEOS; + + static fromJsonString(jsonString: string, options?: Partial): RoomEOS; + + static equals(a: RoomEOS | PlainMessage | undefined, b: RoomEOS | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.DataStream + */ +export declare class DataStream extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.DataStream"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DataStream; + + static fromJson(jsonValue: JsonValue, options?: Partial): DataStream; + + static fromJsonString(jsonString: string, options?: Partial): DataStream; + + static equals(a: DataStream | PlainMessage | undefined, b: DataStream | PlainMessage | undefined): boolean; +} + +/** + * enum for operation types (specific to TextHeader) + * + * @generated from enum livekit.proto.DataStream.OperationType + */ +export declare 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, +} + +/** + * header properties specific to text streams + * + * @generated from message livekit.proto.DataStream.TextHeader + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.DataStream.TextHeader"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DataStream_TextHeader; + + static fromJson(jsonValue: JsonValue, options?: Partial): DataStream_TextHeader; + + static fromJsonString(jsonString: string, options?: Partial): DataStream_TextHeader; + + static equals(a: DataStream_TextHeader | PlainMessage | undefined, b: DataStream_TextHeader | PlainMessage | undefined): boolean; +} + +/** + * header properties specific to byte or file streams + * + * @generated from message livekit.proto.DataStream.ByteHeader + */ +export declare class DataStream_ByteHeader extends Message { + /** + * @generated from field: required string name = 1; + */ + name?: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.DataStream.ByteHeader"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DataStream_ByteHeader; + + static fromJson(jsonValue: JsonValue, options?: Partial): DataStream_ByteHeader; + + static fromJsonString(jsonString: string, options?: Partial): DataStream_ByteHeader; + + static equals(a: DataStream_ByteHeader | PlainMessage | undefined, b: DataStream_ByteHeader | PlainMessage | undefined): boolean; +} + +/** + * main DataStream.Header that contains a oneof for specific headers + * + * @generated from message livekit.proto.DataStream.Header + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.DataStream.Header"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DataStream_Header; + + static fromJson(jsonValue: JsonValue, options?: Partial): DataStream_Header; + + static fromJsonString(jsonString: string, options?: Partial): DataStream_Header; + + static equals(a: DataStream_Header | PlainMessage | undefined, b: DataStream_Header | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.DataStream.Chunk + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.DataStream.Chunk"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DataStream_Chunk; + + static fromJson(jsonValue: JsonValue, options?: Partial): DataStream_Chunk; + + static fromJsonString(jsonString: string, options?: Partial): DataStream_Chunk; + + static equals(a: DataStream_Chunk | PlainMessage | undefined, b: DataStream_Chunk | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.DataStream.Trailer + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.DataStream.Trailer"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DataStream_Trailer; + + static fromJson(jsonValue: JsonValue, options?: Partial): DataStream_Trailer; + + static fromJsonString(jsonString: string, options?: Partial): DataStream_Trailer; + + static equals(a: DataStream_Trailer | PlainMessage | undefined, b: DataStream_Trailer | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.DataStreamHeaderReceived + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.DataStreamHeaderReceived"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DataStreamHeaderReceived; + + static fromJson(jsonValue: JsonValue, options?: Partial): DataStreamHeaderReceived; + + static fromJsonString(jsonString: string, options?: Partial): DataStreamHeaderReceived; + + static equals(a: DataStreamHeaderReceived | PlainMessage | undefined, b: DataStreamHeaderReceived | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.DataStreamChunkReceived + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.DataStreamChunkReceived"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DataStreamChunkReceived; + + static fromJson(jsonValue: JsonValue, options?: Partial): DataStreamChunkReceived; + + static fromJsonString(jsonString: string, options?: Partial): DataStreamChunkReceived; + + static equals(a: DataStreamChunkReceived | PlainMessage | undefined, b: DataStreamChunkReceived | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.DataStreamTrailerReceived + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.DataStreamTrailerReceived"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DataStreamTrailerReceived; + + static fromJson(jsonValue: JsonValue, options?: Partial): DataStreamTrailerReceived; + + static fromJsonString(jsonString: string, options?: Partial): DataStreamTrailerReceived; + + static equals(a: DataStreamTrailerReceived | PlainMessage | undefined, b: DataStreamTrailerReceived | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SendStreamHeaderRequest + */ +export declare 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; + + /** + * @generated from field: optional uint64 request_async_id = 5; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SendStreamHeaderRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SendStreamHeaderRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): SendStreamHeaderRequest; + + static fromJsonString(jsonString: string, options?: Partial): SendStreamHeaderRequest; + + static equals(a: SendStreamHeaderRequest | PlainMessage | undefined, b: SendStreamHeaderRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SendStreamChunkRequest + */ +export declare 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; + + /** + * @generated from field: optional uint64 request_async_id = 5; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SendStreamChunkRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SendStreamChunkRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): SendStreamChunkRequest; + + static fromJsonString(jsonString: string, options?: Partial): SendStreamChunkRequest; + + static equals(a: SendStreamChunkRequest | PlainMessage | undefined, b: SendStreamChunkRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SendStreamTrailerRequest + */ +export declare 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; + + /** + * @generated from field: optional uint64 request_async_id = 5; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SendStreamTrailerRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SendStreamTrailerRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): SendStreamTrailerRequest; + + static fromJsonString(jsonString: string, options?: Partial): SendStreamTrailerRequest; + + static equals(a: SendStreamTrailerRequest | PlainMessage | undefined, b: SendStreamTrailerRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SendStreamHeaderResponse + */ +export declare class SendStreamHeaderResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SendStreamHeaderResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SendStreamHeaderResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): SendStreamHeaderResponse; + + static fromJsonString(jsonString: string, options?: Partial): SendStreamHeaderResponse; + + static equals(a: SendStreamHeaderResponse | PlainMessage | undefined, b: SendStreamHeaderResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SendStreamChunkResponse + */ +export declare class SendStreamChunkResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SendStreamChunkResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SendStreamChunkResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): SendStreamChunkResponse; + + static fromJsonString(jsonString: string, options?: Partial): SendStreamChunkResponse; + + static equals(a: SendStreamChunkResponse | PlainMessage | undefined, b: SendStreamChunkResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SendStreamTrailerResponse + */ +export declare class SendStreamTrailerResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SendStreamTrailerResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SendStreamTrailerResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): SendStreamTrailerResponse; + + static fromJsonString(jsonString: string, options?: Partial): SendStreamTrailerResponse; + + static equals(a: SendStreamTrailerResponse | PlainMessage | undefined, b: SendStreamTrailerResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SendStreamHeaderCallback + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SendStreamHeaderCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SendStreamHeaderCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): SendStreamHeaderCallback; + + static fromJsonString(jsonString: string, options?: Partial): SendStreamHeaderCallback; + + static equals(a: SendStreamHeaderCallback | PlainMessage | undefined, b: SendStreamHeaderCallback | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SendStreamChunkCallback + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SendStreamChunkCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SendStreamChunkCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): SendStreamChunkCallback; + + static fromJsonString(jsonString: string, options?: Partial): SendStreamChunkCallback; + + static equals(a: SendStreamChunkCallback | PlainMessage | undefined, b: SendStreamChunkCallback | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SendStreamTrailerCallback + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SendStreamTrailerCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SendStreamTrailerCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): SendStreamTrailerCallback; + + static fromJsonString(jsonString: string, options?: Partial): SendStreamTrailerCallback; + + static equals(a: SendStreamTrailerCallback | PlainMessage | undefined, b: SendStreamTrailerCallback | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SetDataChannelBufferedAmountLowThresholdRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetDataChannelBufferedAmountLowThresholdRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetDataChannelBufferedAmountLowThresholdRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetDataChannelBufferedAmountLowThresholdRequest; + + static fromJsonString(jsonString: string, options?: Partial): SetDataChannelBufferedAmountLowThresholdRequest; + + static equals(a: SetDataChannelBufferedAmountLowThresholdRequest | PlainMessage | undefined, b: SetDataChannelBufferedAmountLowThresholdRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SetDataChannelBufferedAmountLowThresholdResponse + */ +export declare class SetDataChannelBufferedAmountLowThresholdResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetDataChannelBufferedAmountLowThresholdResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetDataChannelBufferedAmountLowThresholdResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetDataChannelBufferedAmountLowThresholdResponse; + + static fromJsonString(jsonString: string, options?: Partial): SetDataChannelBufferedAmountLowThresholdResponse; + + static equals(a: SetDataChannelBufferedAmountLowThresholdResponse | PlainMessage | undefined, b: SetDataChannelBufferedAmountLowThresholdResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.DataChannelBufferedAmountLowThresholdChanged + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.DataChannelBufferedAmountLowThresholdChanged"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DataChannelBufferedAmountLowThresholdChanged; + + static fromJson(jsonValue: JsonValue, options?: Partial): DataChannelBufferedAmountLowThresholdChanged; + + static fromJsonString(jsonString: string, options?: Partial): DataChannelBufferedAmountLowThresholdChanged; + + static equals(a: DataChannelBufferedAmountLowThresholdChanged | PlainMessage | undefined, b: DataChannelBufferedAmountLowThresholdChanged | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ByteStreamOpened + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ByteStreamOpened"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ByteStreamOpened; + + static fromJson(jsonValue: JsonValue, options?: Partial): ByteStreamOpened; + + static fromJsonString(jsonString: string, options?: Partial): ByteStreamOpened; + + static equals(a: ByteStreamOpened | PlainMessage | undefined, b: ByteStreamOpened | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TextStreamOpened + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TextStreamOpened"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TextStreamOpened; + + static fromJson(jsonValue: JsonValue, options?: Partial): TextStreamOpened; + + static fromJsonString(jsonString: string, options?: Partial): TextStreamOpened; + + static equals(a: TextStreamOpened | PlainMessage | undefined, b: TextStreamOpened | PlainMessage | undefined): boolean; +} + diff --git a/livekit-ffi-node-bindings/proto/room_pb.js b/livekit-ffi-node-bindings/proto/room_pb.js new file mode 100644 index 000000000..579d0474d --- /dev/null +++ b/livekit-ffi-node-bindings/proto/room_pb.js @@ -0,0 +1,1601 @@ +// 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 "js_import_style=legacy_commonjs" +// @generated from file room.proto (package livekit.proto, syntax proto2) +/* eslint-disable */ +// @ts-nocheck + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +const { proto2 } = require("@bufbuild/protobuf"); +const { DisconnectReason, OwnedParticipant, ParticipantInfo, ParticipantPermission } = require("./participant_pb.js"); +const { OwnedTrack, OwnedTrackPublication, TrackSource } = require("./track_pb.js"); +const { RtcStats } = require("./stats_pb.js"); +const { VideoCodec } = require("./video_frame_pb.js"); +const { E2eeOptions, EncryptionState } = require("./e2ee_pb.js"); +const { FfiOwnedHandle } = require("./handle_pb.js"); +const { OwnedByteStreamReader, OwnedTextStreamReader } = require("./data_stream_pb.js"); + +/** + * @generated from enum livekit.proto.IceTransportType + */ +const IceTransportType = /*@__PURE__*/ proto2.makeEnum( + "livekit.proto.IceTransportType", + [ + {no: 0, name: "TRANSPORT_RELAY"}, + {no: 1, name: "TRANSPORT_NOHOST"}, + {no: 2, name: "TRANSPORT_ALL"}, + ], +); + +/** + * @generated from enum livekit.proto.ContinualGatheringPolicy + */ +const ContinualGatheringPolicy = /*@__PURE__*/ proto2.makeEnum( + "livekit.proto.ContinualGatheringPolicy", + [ + {no: 0, name: "GATHER_ONCE"}, + {no: 1, name: "GATHER_CONTINUALLY"}, + ], +); + +/** + * @generated from enum livekit.proto.ConnectionQuality + */ +const ConnectionQuality = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const ConnectionState = /*@__PURE__*/ proto2.makeEnum( + "livekit.proto.ConnectionState", + [ + {no: 0, name: "CONN_DISCONNECTED"}, + {no: 1, name: "CONN_CONNECTED"}, + {no: 2, name: "CONN_RECONNECTING"}, + ], +); + +/** + * @generated from enum livekit.proto.DataPacketKind + */ +const DataPacketKind = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const ConnectRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ConnectRequest", + () => [ + { 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 }, + { no: 4, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.ConnectResponse + */ +const ConnectResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ConnectResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.ConnectCallback + */ +const ConnectCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ConnectCallback", + () => [ + { 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" }, + ], +); + +/** + * @generated from message livekit.proto.ConnectCallback.ParticipantWithTracks + */ +const ConnectCallback_ParticipantWithTracks = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ConnectCallback.ParticipantWithTracks", + () => [ + { no: 1, name: "participant", kind: "message", T: OwnedParticipant, req: true }, + { no: 2, name: "publications", kind: "message", T: OwnedTrackPublication, repeated: true }, + ], + {localName: "ConnectCallback_ParticipantWithTracks"}, +); + +/** + * @generated from message livekit.proto.ConnectCallback.Result + */ +const ConnectCallback_Result = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ConnectCallback.Result", + () => [ + { 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 }, + ], + {localName: "ConnectCallback_Result"}, +); + +/** + * Disconnect from the a room + * + * @generated from message livekit.proto.DisconnectRequest + */ +const DisconnectRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.DisconnectRequest", + () => [ + { no: 1, name: "room_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.DisconnectResponse + */ +const DisconnectResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.DisconnectResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.DisconnectCallback + */ +const DisconnectCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.DisconnectCallback", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * Publish a track to the room + * + * @generated from message livekit.proto.PublishTrackRequest + */ +const PublishTrackRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.PublishTrackRequest", + () => [ + { 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 }, + { no: 4, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.PublishTrackResponse + */ +const PublishTrackResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.PublishTrackResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.PublishTrackCallback + */ +const PublishTrackCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.PublishTrackCallback", + () => [ + { 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" }, + ], +); + +/** + * Unpublish a track from the room + * + * @generated from message livekit.proto.UnpublishTrackRequest + */ +const UnpublishTrackRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.UnpublishTrackRequest", + () => [ + { 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 }, + { no: 4, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.UnpublishTrackResponse + */ +const UnpublishTrackResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.UnpublishTrackResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.UnpublishTrackCallback + */ +const UnpublishTrackCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.UnpublishTrackCallback", + () => [ + { 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 }, + ], +); + +/** + * Publish data to other participants + * + * @generated from message livekit.proto.PublishDataRequest + */ +const PublishDataRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.PublishDataRequest", + () => [ + { 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 }, + { no: 8, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.PublishDataResponse + */ +const PublishDataResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.PublishDataResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.PublishDataCallback + */ +const PublishDataCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.PublishDataCallback", + () => [ + { 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 }, + ], +); + +/** + * Publish transcription messages to room + * + * @generated from message livekit.proto.PublishTranscriptionRequest + */ +const PublishTranscriptionRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.PublishTranscriptionRequest", + () => [ + { 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 }, + { no: 5, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.PublishTranscriptionResponse + */ +const PublishTranscriptionResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.PublishTranscriptionResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.PublishTranscriptionCallback + */ +const PublishTranscriptionCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.PublishTranscriptionCallback", + () => [ + { 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 }, + ], +); + +/** + * Publish Sip DTMF messages to other participants + * + * @generated from message livekit.proto.PublishSipDtmfRequest + */ +const PublishSipDtmfRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.PublishSipDtmfRequest", + () => [ + { 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 }, + { no: 5, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.PublishSipDtmfResponse + */ +const PublishSipDtmfResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.PublishSipDtmfResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.PublishSipDtmfCallback + */ +const PublishSipDtmfCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.PublishSipDtmfCallback", + () => [ + { 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 }, + ], +); + +/** + * Change the local participant's metadata + * + * @generated from message livekit.proto.SetLocalMetadataRequest + */ +const SetLocalMetadataRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetLocalMetadataRequest", + () => [ + { 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 }, + { no: 3, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.SetLocalMetadataResponse + */ +const SetLocalMetadataResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetLocalMetadataResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.SetLocalMetadataCallback + */ +const SetLocalMetadataCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetLocalMetadataCallback", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.SendChatMessageRequest + */ +const SendChatMessageRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SendChatMessageRequest", + () => [ + { 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 }, + { no: 5, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.EditChatMessageRequest + */ +const EditChatMessageRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.EditChatMessageRequest", + () => [ + { 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 }, + { no: 6, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.SendChatMessageResponse + */ +const SendChatMessageResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SendChatMessageResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.SendChatMessageCallback + */ +const SendChatMessageCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SendChatMessageCallback", + () => [ + { 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" }, + ], +); + +/** + * Change the local participant's attributes + * + * @generated from message livekit.proto.SetLocalAttributesRequest + */ +const SetLocalAttributesRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetLocalAttributesRequest", + () => [ + { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "attributes", kind: "message", T: AttributesEntry, repeated: true }, + { no: 3, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.AttributesEntry + */ +const AttributesEntry = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.AttributesEntry", + () => [ + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.SetLocalAttributesResponse + */ +const SetLocalAttributesResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetLocalAttributesResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.SetLocalAttributesCallback + */ +const SetLocalAttributesCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetLocalAttributesCallback", + () => [ + { 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 }, + ], +); + +/** + * Change the local participant's name + * + * @generated from message livekit.proto.SetLocalNameRequest + */ +const SetLocalNameRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetLocalNameRequest", + () => [ + { 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 }, + { no: 3, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.SetLocalNameResponse + */ +const SetLocalNameResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetLocalNameResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.SetLocalNameCallback + */ +const SetLocalNameCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetLocalNameCallback", + () => [ + { 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 }, + ], +); + +/** + * Change the "desire" to subs2ribe to a track + * + * @generated from message livekit.proto.SetSubscribedRequest + */ +const SetSubscribedRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetSubscribedRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.SetSubscribedResponse + */ +const SetSubscribedResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetSubscribedResponse", + [], +); + +/** + * @generated from message livekit.proto.GetSessionStatsRequest + */ +const GetSessionStatsRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.GetSessionStatsRequest", + () => [ + { no: 1, name: "room_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.GetSessionStatsResponse + */ +const GetSessionStatsResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.GetSessionStatsResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.GetSessionStatsCallback + */ +const GetSessionStatsCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.GetSessionStatsCallback", + () => [ + { 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" }, + ], +); + +/** + * @generated from message livekit.proto.GetSessionStatsCallback.Result + */ +const GetSessionStatsCallback_Result = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.GetSessionStatsCallback.Result", + () => [ + { no: 1, name: "publisher_stats", kind: "message", T: RtcStats, repeated: true }, + { no: 2, name: "subscriber_stats", kind: "message", T: RtcStats, repeated: true }, + ], + {localName: "GetSessionStatsCallback_Result"}, +); + +/** + * @generated from message livekit.proto.VideoEncoding + */ +const VideoEncoding = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.VideoEncoding", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.AudioEncoding + */ +const AudioEncoding = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.AudioEncoding", + () => [ + { no: 1, name: "max_bitrate", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.TrackPublishOptions + */ +const TrackPublishOptions = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TrackPublishOptions", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.IceServer + */ +const IceServer = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.IceServer", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.RtcConfig + */ +const RtcConfig = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtcConfig", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.RoomOptions + */ +const RoomOptions = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RoomOptions", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.TranscriptionSegment + */ +const TranscriptionSegment = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TranscriptionSegment", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.BufferInfo + */ +const BufferInfo = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.BufferInfo", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.OwnedBuffer + */ +const OwnedBuffer = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.OwnedBuffer", + () => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "data", kind: "message", T: BufferInfo, req: true }, + ], +); + +/** + * @generated from message livekit.proto.RoomEvent + */ +const RoomEvent = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RoomEvent", + () => [ + { 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: 41, name: "participant_permission_changed", kind: "message", T: ParticipantPermissionChanged, oneof: "message" }, + { no: 40, name: "token_refreshed", kind: "message", T: TokenRefreshed, oneof: "message" }, + ], +); + +/** + * @generated from message livekit.proto.RoomInfo + */ +const RoomInfo = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RoomInfo", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.OwnedRoom + */ +const OwnedRoom = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.OwnedRoom", + () => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: RoomInfo, req: true }, + ], +); + +/** + * @generated from message livekit.proto.ParticipantsUpdated + */ +const ParticipantsUpdated = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ParticipantsUpdated", + () => [ + { no: 1, name: "participants", kind: "message", T: ParticipantInfo, repeated: true }, + ], +); + +/** + * @generated from message livekit.proto.ParticipantConnected + */ +const ParticipantConnected = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ParticipantConnected", + () => [ + { no: 1, name: "info", kind: "message", T: OwnedParticipant, req: true }, + ], +); + +/** + * @generated from message livekit.proto.ParticipantDisconnected + */ +const ParticipantDisconnected = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ParticipantDisconnected", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.LocalTrackPublished + */ +const LocalTrackPublished = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.LocalTrackPublished", + () => [ + { no: 1, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.LocalTrackUnpublished + */ +const LocalTrackUnpublished = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.LocalTrackUnpublished", + () => [ + { no: 1, name: "publication_sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.LocalTrackSubscribed + */ +const LocalTrackSubscribed = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.LocalTrackSubscribed", + () => [ + { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.TrackPublished + */ +const TrackPublished = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TrackPublished", + () => [ + { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + { no: 2, name: "publication", kind: "message", T: OwnedTrackPublication, req: true }, + ], +); + +/** + * @generated from message livekit.proto.TrackUnpublished + */ +const TrackUnpublished = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TrackUnpublished", + () => [ + { 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 }, + ], +); + +/** + * 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 + */ +const TrackSubscribed = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TrackSubscribed", + () => [ + { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + { no: 2, name: "track", kind: "message", T: OwnedTrack, req: true }, + ], +); + +/** + * @generated from message livekit.proto.TrackUnsubscribed + */ +const TrackUnsubscribed = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TrackUnsubscribed", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.TrackSubscriptionFailed + */ +const TrackSubscriptionFailed = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TrackSubscriptionFailed", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.TrackMuted + */ +const TrackMuted = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TrackMuted", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.TrackUnmuted + */ +const TrackUnmuted = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TrackUnmuted", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.E2eeStateChanged + */ +const E2eeStateChanged = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.E2eeStateChanged", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.ActiveSpeakersChanged + */ +const ActiveSpeakersChanged = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ActiveSpeakersChanged", + () => [ + { no: 1, name: "participant_identities", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ], +); + +/** + * @generated from message livekit.proto.RoomMetadataChanged + */ +const RoomMetadataChanged = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RoomMetadataChanged", + () => [ + { no: 1, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.RoomSidChanged + */ +const RoomSidChanged = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RoomSidChanged", + () => [ + { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.ParticipantMetadataChanged + */ +const ParticipantMetadataChanged = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ParticipantMetadataChanged", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.ParticipantAttributesChanged + */ +const ParticipantAttributesChanged = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ParticipantAttributesChanged", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.ParticipantEncryptionStatusChanged + */ +const ParticipantEncryptionStatusChanged = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ParticipantEncryptionStatusChanged", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.ParticipantNameChanged + */ +const ParticipantNameChanged = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ParticipantNameChanged", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.ParticipantPermissionChanged + */ +const ParticipantPermissionChanged = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ParticipantPermissionChanged", + () => [ + { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + { no: 2, name: "permission", kind: "message", T: ParticipantPermission, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.ConnectionQualityChanged + */ +const ConnectionQualityChanged = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ConnectionQualityChanged", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.UserPacket + */ +const UserPacket = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.UserPacket", + () => [ + { no: 1, name: "data", kind: "message", T: OwnedBuffer, req: true }, + { no: 2, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.ChatMessage + */ +const ChatMessage = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ChatMessage", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.ChatMessageReceived + */ +const ChatMessageReceived = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ChatMessageReceived", + () => [ + { no: 1, name: "message", kind: "message", T: ChatMessage, req: true }, + { no: 2, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.SipDTMF + */ +const SipDTMF = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SipDTMF", + () => [ + { no: 1, name: "code", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, + { no: 2, name: "digit", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.DataPacketReceived + */ +const DataPacketReceived = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.DataPacketReceived", + () => [ + { 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" }, + ], +); + +/** + * @generated from message livekit.proto.TranscriptionReceived + */ +const TranscriptionReceived = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TranscriptionReceived", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.ConnectionStateChanged + */ +const ConnectionStateChanged = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ConnectionStateChanged", + () => [ + { no: 1, name: "state", kind: "enum", T: proto2.getEnumType(ConnectionState), req: true }, + ], +); + +/** + * @generated from message livekit.proto.Connected + */ +const Connected = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.Connected", + [], +); + +/** + * @generated from message livekit.proto.Disconnected + */ +const Disconnected = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.Disconnected", + () => [ + { no: 1, name: "reason", kind: "enum", T: proto2.getEnumType(DisconnectReason), req: true }, + ], +); + +/** + * @generated from message livekit.proto.Reconnecting + */ +const Reconnecting = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.Reconnecting", + [], +); + +/** + * @generated from message livekit.proto.Reconnected + */ +const Reconnected = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.Reconnected", + [], +); + +/** + * @generated from message livekit.proto.TokenRefreshed + */ +const TokenRefreshed = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TokenRefreshed", + () => [ + { no: 1, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.RoomEOS + */ +const RoomEOS = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RoomEOS", + [], +); + +/** + * @generated from message livekit.proto.DataStream + */ +const DataStream = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.DataStream", + [], +); + +/** + * enum for operation types (specific to TextHeader) + * + * @generated from enum livekit.proto.DataStream.OperationType + */ +const DataStream_OperationType = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const DataStream_TextHeader = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.DataStream.TextHeader", + () => [ + { 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 }, + ], + {localName: "DataStream_TextHeader"}, +); + +/** + * header properties specific to byte or file streams + * + * @generated from message livekit.proto.DataStream.ByteHeader + */ +const DataStream_ByteHeader = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.DataStream.ByteHeader", + () => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ], + {localName: "DataStream_ByteHeader"}, +); + +/** + * main DataStream.Header that contains a oneof for specific headers + * + * @generated from message livekit.proto.DataStream.Header + */ +const DataStream_Header = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.DataStream.Header", + () => [ + { 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" }, + ], + {localName: "DataStream_Header"}, +); + +/** + * @generated from message livekit.proto.DataStream.Chunk + */ +const DataStream_Chunk = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.DataStream.Chunk", + () => [ + { 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 }, + ], + {localName: "DataStream_Chunk"}, +); + +/** + * @generated from message livekit.proto.DataStream.Trailer + */ +const DataStream_Trailer = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.DataStream.Trailer", + () => [ + { 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 */} }, + ], + {localName: "DataStream_Trailer"}, +); + +/** + * @generated from message livekit.proto.DataStreamHeaderReceived + */ +const DataStreamHeaderReceived = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.DataStreamHeaderReceived", + () => [ + { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + { no: 2, name: "header", kind: "message", T: DataStream_Header, req: true }, + ], +); + +/** + * @generated from message livekit.proto.DataStreamChunkReceived + */ +const DataStreamChunkReceived = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.DataStreamChunkReceived", + () => [ + { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + { no: 2, name: "chunk", kind: "message", T: DataStream_Chunk, req: true }, + ], +); + +/** + * @generated from message livekit.proto.DataStreamTrailerReceived + */ +const DataStreamTrailerReceived = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.DataStreamTrailerReceived", + () => [ + { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + { no: 2, name: "trailer", kind: "message", T: DataStream_Trailer, req: true }, + ], +); + +/** + * @generated from message livekit.proto.SendStreamHeaderRequest + */ +const SendStreamHeaderRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SendStreamHeaderRequest", + () => [ + { 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 }, + { no: 5, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.SendStreamChunkRequest + */ +const SendStreamChunkRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SendStreamChunkRequest", + () => [ + { 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 }, + { no: 5, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.SendStreamTrailerRequest + */ +const SendStreamTrailerRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SendStreamTrailerRequest", + () => [ + { 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 }, + { no: 5, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.SendStreamHeaderResponse + */ +const SendStreamHeaderResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SendStreamHeaderResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.SendStreamChunkResponse + */ +const SendStreamChunkResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SendStreamChunkResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.SendStreamTrailerResponse + */ +const SendStreamTrailerResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SendStreamTrailerResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.SendStreamHeaderCallback + */ +const SendStreamHeaderCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SendStreamHeaderCallback", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.SendStreamChunkCallback + */ +const SendStreamChunkCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SendStreamChunkCallback", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.SendStreamTrailerCallback + */ +const SendStreamTrailerCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SendStreamTrailerCallback", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.SetDataChannelBufferedAmountLowThresholdRequest + */ +const SetDataChannelBufferedAmountLowThresholdRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetDataChannelBufferedAmountLowThresholdRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.SetDataChannelBufferedAmountLowThresholdResponse + */ +const SetDataChannelBufferedAmountLowThresholdResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetDataChannelBufferedAmountLowThresholdResponse", + [], +); + +/** + * @generated from message livekit.proto.DataChannelBufferedAmountLowThresholdChanged + */ +const DataChannelBufferedAmountLowThresholdChanged = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.DataChannelBufferedAmountLowThresholdChanged", + () => [ + { no: 1, name: "kind", kind: "enum", T: proto2.getEnumType(DataPacketKind), req: true }, + { no: 2, name: "threshold", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.ByteStreamOpened + */ +const ByteStreamOpened = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ByteStreamOpened", + () => [ + { no: 1, name: "reader", kind: "message", T: OwnedByteStreamReader, req: true }, + { no: 2, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.TextStreamOpened + */ +const TextStreamOpened = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TextStreamOpened", + () => [ + { no: 1, name: "reader", kind: "message", T: OwnedTextStreamReader, req: true }, + { no: 2, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + ], +); + + +exports.IceTransportType = IceTransportType; +exports.ContinualGatheringPolicy = ContinualGatheringPolicy; +exports.ConnectionQuality = ConnectionQuality; +exports.ConnectionState = ConnectionState; +exports.DataPacketKind = DataPacketKind; +exports.ConnectRequest = ConnectRequest; +exports.ConnectResponse = ConnectResponse; +exports.ConnectCallback = ConnectCallback; +exports.ConnectCallback_ParticipantWithTracks = ConnectCallback_ParticipantWithTracks; +exports.ConnectCallback_Result = ConnectCallback_Result; +exports.DisconnectRequest = DisconnectRequest; +exports.DisconnectResponse = DisconnectResponse; +exports.DisconnectCallback = DisconnectCallback; +exports.PublishTrackRequest = PublishTrackRequest; +exports.PublishTrackResponse = PublishTrackResponse; +exports.PublishTrackCallback = PublishTrackCallback; +exports.UnpublishTrackRequest = UnpublishTrackRequest; +exports.UnpublishTrackResponse = UnpublishTrackResponse; +exports.UnpublishTrackCallback = UnpublishTrackCallback; +exports.PublishDataRequest = PublishDataRequest; +exports.PublishDataResponse = PublishDataResponse; +exports.PublishDataCallback = PublishDataCallback; +exports.PublishTranscriptionRequest = PublishTranscriptionRequest; +exports.PublishTranscriptionResponse = PublishTranscriptionResponse; +exports.PublishTranscriptionCallback = PublishTranscriptionCallback; +exports.PublishSipDtmfRequest = PublishSipDtmfRequest; +exports.PublishSipDtmfResponse = PublishSipDtmfResponse; +exports.PublishSipDtmfCallback = PublishSipDtmfCallback; +exports.SetLocalMetadataRequest = SetLocalMetadataRequest; +exports.SetLocalMetadataResponse = SetLocalMetadataResponse; +exports.SetLocalMetadataCallback = SetLocalMetadataCallback; +exports.SendChatMessageRequest = SendChatMessageRequest; +exports.EditChatMessageRequest = EditChatMessageRequest; +exports.SendChatMessageResponse = SendChatMessageResponse; +exports.SendChatMessageCallback = SendChatMessageCallback; +exports.SetLocalAttributesRequest = SetLocalAttributesRequest; +exports.AttributesEntry = AttributesEntry; +exports.SetLocalAttributesResponse = SetLocalAttributesResponse; +exports.SetLocalAttributesCallback = SetLocalAttributesCallback; +exports.SetLocalNameRequest = SetLocalNameRequest; +exports.SetLocalNameResponse = SetLocalNameResponse; +exports.SetLocalNameCallback = SetLocalNameCallback; +exports.SetSubscribedRequest = SetSubscribedRequest; +exports.SetSubscribedResponse = SetSubscribedResponse; +exports.GetSessionStatsRequest = GetSessionStatsRequest; +exports.GetSessionStatsResponse = GetSessionStatsResponse; +exports.GetSessionStatsCallback = GetSessionStatsCallback; +exports.GetSessionStatsCallback_Result = GetSessionStatsCallback_Result; +exports.VideoEncoding = VideoEncoding; +exports.AudioEncoding = AudioEncoding; +exports.TrackPublishOptions = TrackPublishOptions; +exports.IceServer = IceServer; +exports.RtcConfig = RtcConfig; +exports.RoomOptions = RoomOptions; +exports.TranscriptionSegment = TranscriptionSegment; +exports.BufferInfo = BufferInfo; +exports.OwnedBuffer = OwnedBuffer; +exports.RoomEvent = RoomEvent; +exports.RoomInfo = RoomInfo; +exports.OwnedRoom = OwnedRoom; +exports.ParticipantsUpdated = ParticipantsUpdated; +exports.ParticipantConnected = ParticipantConnected; +exports.ParticipantDisconnected = ParticipantDisconnected; +exports.LocalTrackPublished = LocalTrackPublished; +exports.LocalTrackUnpublished = LocalTrackUnpublished; +exports.LocalTrackSubscribed = LocalTrackSubscribed; +exports.TrackPublished = TrackPublished; +exports.TrackUnpublished = TrackUnpublished; +exports.TrackSubscribed = TrackSubscribed; +exports.TrackUnsubscribed = TrackUnsubscribed; +exports.TrackSubscriptionFailed = TrackSubscriptionFailed; +exports.TrackMuted = TrackMuted; +exports.TrackUnmuted = TrackUnmuted; +exports.E2eeStateChanged = E2eeStateChanged; +exports.ActiveSpeakersChanged = ActiveSpeakersChanged; +exports.RoomMetadataChanged = RoomMetadataChanged; +exports.RoomSidChanged = RoomSidChanged; +exports.ParticipantMetadataChanged = ParticipantMetadataChanged; +exports.ParticipantAttributesChanged = ParticipantAttributesChanged; +exports.ParticipantEncryptionStatusChanged = ParticipantEncryptionStatusChanged; +exports.ParticipantNameChanged = ParticipantNameChanged; +exports.ParticipantPermissionChanged = ParticipantPermissionChanged; +exports.ConnectionQualityChanged = ConnectionQualityChanged; +exports.UserPacket = UserPacket; +exports.ChatMessage = ChatMessage; +exports.ChatMessageReceived = ChatMessageReceived; +exports.SipDTMF = SipDTMF; +exports.DataPacketReceived = DataPacketReceived; +exports.TranscriptionReceived = TranscriptionReceived; +exports.ConnectionStateChanged = ConnectionStateChanged; +exports.Connected = Connected; +exports.Disconnected = Disconnected; +exports.Reconnecting = Reconnecting; +exports.Reconnected = Reconnected; +exports.TokenRefreshed = TokenRefreshed; +exports.RoomEOS = RoomEOS; +exports.DataStream = DataStream; +exports.DataStream_OperationType = DataStream_OperationType; +exports.DataStream_TextHeader = DataStream_TextHeader; +exports.DataStream_ByteHeader = DataStream_ByteHeader; +exports.DataStream_Header = DataStream_Header; +exports.DataStream_Chunk = DataStream_Chunk; +exports.DataStream_Trailer = DataStream_Trailer; +exports.DataStreamHeaderReceived = DataStreamHeaderReceived; +exports.DataStreamChunkReceived = DataStreamChunkReceived; +exports.DataStreamTrailerReceived = DataStreamTrailerReceived; +exports.SendStreamHeaderRequest = SendStreamHeaderRequest; +exports.SendStreamChunkRequest = SendStreamChunkRequest; +exports.SendStreamTrailerRequest = SendStreamTrailerRequest; +exports.SendStreamHeaderResponse = SendStreamHeaderResponse; +exports.SendStreamChunkResponse = SendStreamChunkResponse; +exports.SendStreamTrailerResponse = SendStreamTrailerResponse; +exports.SendStreamHeaderCallback = SendStreamHeaderCallback; +exports.SendStreamChunkCallback = SendStreamChunkCallback; +exports.SendStreamTrailerCallback = SendStreamTrailerCallback; +exports.SetDataChannelBufferedAmountLowThresholdRequest = SetDataChannelBufferedAmountLowThresholdRequest; +exports.SetDataChannelBufferedAmountLowThresholdResponse = SetDataChannelBufferedAmountLowThresholdResponse; +exports.DataChannelBufferedAmountLowThresholdChanged = DataChannelBufferedAmountLowThresholdChanged; +exports.ByteStreamOpened = ByteStreamOpened; +exports.TextStreamOpened = TextStreamOpened; diff --git a/livekit-ffi-node-bindings/proto/rpc_pb.d.ts b/livekit-ffi-node-bindings/proto/rpc_pb.d.ts new file mode 100644 index 000000000..782de701f --- /dev/null +++ b/livekit-ffi-node-bindings/proto/rpc_pb.d.ts @@ -0,0 +1,384 @@ +// 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 "js_import_style=legacy_commonjs" +// @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 declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RpcError"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RpcError; + + static fromJson(jsonValue: JsonValue, options?: Partial): RpcError; + + static fromJsonString(jsonString: string, options?: Partial): RpcError; + + static equals(a: RpcError | PlainMessage | undefined, b: RpcError | PlainMessage | undefined): boolean; +} + +/** + * FFI Requests + * + * @generated from message livekit.proto.PerformRpcRequest + */ +export declare 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; + + /** + * @generated from field: optional uint64 request_async_id = 6; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.PerformRpcRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PerformRpcRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): PerformRpcRequest; + + static fromJsonString(jsonString: string, options?: Partial): PerformRpcRequest; + + static equals(a: PerformRpcRequest | PlainMessage | undefined, b: PerformRpcRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RegisterRpcMethodRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RegisterRpcMethodRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RegisterRpcMethodRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): RegisterRpcMethodRequest; + + static fromJsonString(jsonString: string, options?: Partial): RegisterRpcMethodRequest; + + static equals(a: RegisterRpcMethodRequest | PlainMessage | undefined, b: RegisterRpcMethodRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.UnregisterRpcMethodRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.UnregisterRpcMethodRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UnregisterRpcMethodRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): UnregisterRpcMethodRequest; + + static fromJsonString(jsonString: string, options?: Partial): UnregisterRpcMethodRequest; + + static equals(a: UnregisterRpcMethodRequest | PlainMessage | undefined, b: UnregisterRpcMethodRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RpcMethodInvocationResponseRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RpcMethodInvocationResponseRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RpcMethodInvocationResponseRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): RpcMethodInvocationResponseRequest; + + static fromJsonString(jsonString: string, options?: Partial): RpcMethodInvocationResponseRequest; + + static equals(a: RpcMethodInvocationResponseRequest | PlainMessage | undefined, b: RpcMethodInvocationResponseRequest | PlainMessage | undefined): boolean; +} + +/** + * FFI Responses + * + * @generated from message livekit.proto.PerformRpcResponse + */ +export declare class PerformRpcResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.PerformRpcResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PerformRpcResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): PerformRpcResponse; + + static fromJsonString(jsonString: string, options?: Partial): PerformRpcResponse; + + static equals(a: PerformRpcResponse | PlainMessage | undefined, b: PerformRpcResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RegisterRpcMethodResponse + */ +export declare class RegisterRpcMethodResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RegisterRpcMethodResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RegisterRpcMethodResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): RegisterRpcMethodResponse; + + static fromJsonString(jsonString: string, options?: Partial): RegisterRpcMethodResponse; + + static equals(a: RegisterRpcMethodResponse | PlainMessage | undefined, b: RegisterRpcMethodResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.UnregisterRpcMethodResponse + */ +export declare class UnregisterRpcMethodResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.UnregisterRpcMethodResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UnregisterRpcMethodResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): UnregisterRpcMethodResponse; + + static fromJsonString(jsonString: string, options?: Partial): UnregisterRpcMethodResponse; + + static equals(a: UnregisterRpcMethodResponse | PlainMessage | undefined, b: UnregisterRpcMethodResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RpcMethodInvocationResponseResponse + */ +export declare class RpcMethodInvocationResponseResponse extends Message { + /** + * @generated from field: optional string error = 1; + */ + error?: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RpcMethodInvocationResponseResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RpcMethodInvocationResponseResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): RpcMethodInvocationResponseResponse; + + static fromJsonString(jsonString: string, options?: Partial): RpcMethodInvocationResponseResponse; + + static equals(a: RpcMethodInvocationResponseResponse | PlainMessage | undefined, b: RpcMethodInvocationResponseResponse | PlainMessage | undefined): boolean; +} + +/** + * FFI Callbacks + * + * @generated from message livekit.proto.PerformRpcCallback + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.PerformRpcCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PerformRpcCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): PerformRpcCallback; + + static fromJsonString(jsonString: string, options?: Partial): PerformRpcCallback; + + static equals(a: PerformRpcCallback | PlainMessage | undefined, b: PerformRpcCallback | PlainMessage | undefined): boolean; +} + +/** + * FFI Events + * + * @generated from message livekit.proto.RpcMethodInvocationEvent + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RpcMethodInvocationEvent"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RpcMethodInvocationEvent; + + static fromJson(jsonValue: JsonValue, options?: Partial): RpcMethodInvocationEvent; + + static fromJsonString(jsonString: string, options?: Partial): RpcMethodInvocationEvent; + + static equals(a: RpcMethodInvocationEvent | PlainMessage | undefined, b: RpcMethodInvocationEvent | PlainMessage | undefined): boolean; +} + diff --git a/livekit-ffi-node-bindings/proto/rpc_pb.js b/livekit-ffi-node-bindings/proto/rpc_pb.js new file mode 100644 index 000000000..05d3dc8e3 --- /dev/null +++ b/livekit-ffi-node-bindings/proto/rpc_pb.js @@ -0,0 +1,170 @@ +// 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 "js_import_style=legacy_commonjs" +// @generated from file rpc.proto (package livekit.proto, syntax proto2) +/* eslint-disable */ +// @ts-nocheck + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +const { proto2 } = require("@bufbuild/protobuf"); + +/** + * @generated from message livekit.proto.RpcError + */ +const RpcError = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RpcError", + () => [ + { 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 }, + ], +); + +/** + * FFI Requests + * + * @generated from message livekit.proto.PerformRpcRequest + */ +const PerformRpcRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.PerformRpcRequest", + () => [ + { 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 }, + { no: 6, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.RegisterRpcMethodRequest + */ +const RegisterRpcMethodRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RegisterRpcMethodRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.UnregisterRpcMethodRequest + */ +const UnregisterRpcMethodRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.UnregisterRpcMethodRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.RpcMethodInvocationResponseRequest + */ +const RpcMethodInvocationResponseRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RpcMethodInvocationResponseRequest", + () => [ + { 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 }, + ], +); + +/** + * FFI Responses + * + * @generated from message livekit.proto.PerformRpcResponse + */ +const PerformRpcResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.PerformRpcResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.RegisterRpcMethodResponse + */ +const RegisterRpcMethodResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RegisterRpcMethodResponse", + [], +); + +/** + * @generated from message livekit.proto.UnregisterRpcMethodResponse + */ +const UnregisterRpcMethodResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.UnregisterRpcMethodResponse", + [], +); + +/** + * @generated from message livekit.proto.RpcMethodInvocationResponseResponse + */ +const RpcMethodInvocationResponseResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RpcMethodInvocationResponseResponse", + () => [ + { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ], +); + +/** + * FFI Callbacks + * + * @generated from message livekit.proto.PerformRpcCallback + */ +const PerformRpcCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.PerformRpcCallback", + () => [ + { 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 }, + ], +); + +/** + * FFI Events + * + * @generated from message livekit.proto.RpcMethodInvocationEvent + */ +const RpcMethodInvocationEvent = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RpcMethodInvocationEvent", + () => [ + { 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 }, + ], +); + + +exports.RpcError = RpcError; +exports.PerformRpcRequest = PerformRpcRequest; +exports.RegisterRpcMethodRequest = RegisterRpcMethodRequest; +exports.UnregisterRpcMethodRequest = UnregisterRpcMethodRequest; +exports.RpcMethodInvocationResponseRequest = RpcMethodInvocationResponseRequest; +exports.PerformRpcResponse = PerformRpcResponse; +exports.RegisterRpcMethodResponse = RegisterRpcMethodResponse; +exports.UnregisterRpcMethodResponse = UnregisterRpcMethodResponse; +exports.RpcMethodInvocationResponseResponse = RpcMethodInvocationResponseResponse; +exports.PerformRpcCallback = PerformRpcCallback; +exports.RpcMethodInvocationEvent = RpcMethodInvocationEvent; diff --git a/livekit-ffi-node-bindings/proto/stats_pb.d.ts b/livekit-ffi-node-bindings/proto/stats_pb.d.ts new file mode 100644 index 000000000..a726eebdd --- /dev/null +++ b/livekit-ffi-node-bindings/proto/stats_pb.d.ts @@ -0,0 +1,2280 @@ +// 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 "js_import_style=legacy_commonjs" +// @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 declare 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, +} + +/** + * @generated from enum livekit.proto.QualityLimitationReason + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.IceRole + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.DtlsTransportState + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.IceTransportState + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.DtlsRole + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.IceCandidatePairState + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.IceCandidateType + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.IceServerTransportProtocol + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.IceTcpCandidateType + */ +export declare 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, +} + +/** + * @generated from message livekit.proto.RtcStats + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtcStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats; + + static fromJsonString(jsonString: string, options?: Partial): RtcStats; + + static equals(a: RtcStats | PlainMessage | undefined, b: RtcStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RtcStats.Codec + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtcStats.Codec"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_Codec; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_Codec; + + static fromJsonString(jsonString: string, options?: Partial): RtcStats_Codec; + + static equals(a: RtcStats_Codec | PlainMessage | undefined, b: RtcStats_Codec | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RtcStats.InboundRtp + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtcStats.InboundRtp"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_InboundRtp; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_InboundRtp; + + static fromJsonString(jsonString: string, options?: Partial): RtcStats_InboundRtp; + + static equals(a: RtcStats_InboundRtp | PlainMessage | undefined, b: RtcStats_InboundRtp | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RtcStats.OutboundRtp + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtcStats.OutboundRtp"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_OutboundRtp; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_OutboundRtp; + + static fromJsonString(jsonString: string, options?: Partial): RtcStats_OutboundRtp; + + static equals(a: RtcStats_OutboundRtp | PlainMessage | undefined, b: RtcStats_OutboundRtp | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RtcStats.RemoteInboundRtp + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtcStats.RemoteInboundRtp"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_RemoteInboundRtp; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_RemoteInboundRtp; + + static fromJsonString(jsonString: string, options?: Partial): RtcStats_RemoteInboundRtp; + + static equals(a: RtcStats_RemoteInboundRtp | PlainMessage | undefined, b: RtcStats_RemoteInboundRtp | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RtcStats.RemoteOutboundRtp + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtcStats.RemoteOutboundRtp"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_RemoteOutboundRtp; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_RemoteOutboundRtp; + + static fromJsonString(jsonString: string, options?: Partial): RtcStats_RemoteOutboundRtp; + + static equals(a: RtcStats_RemoteOutboundRtp | PlainMessage | undefined, b: RtcStats_RemoteOutboundRtp | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RtcStats.MediaSource + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtcStats.MediaSource"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_MediaSource; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_MediaSource; + + static fromJsonString(jsonString: string, options?: Partial): RtcStats_MediaSource; + + static equals(a: RtcStats_MediaSource | PlainMessage | undefined, b: RtcStats_MediaSource | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RtcStats.MediaPlayout + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtcStats.MediaPlayout"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_MediaPlayout; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_MediaPlayout; + + static fromJsonString(jsonString: string, options?: Partial): RtcStats_MediaPlayout; + + static equals(a: RtcStats_MediaPlayout | PlainMessage | undefined, b: RtcStats_MediaPlayout | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RtcStats.PeerConnection + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtcStats.PeerConnection"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_PeerConnection; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_PeerConnection; + + static fromJsonString(jsonString: string, options?: Partial): RtcStats_PeerConnection; + + static equals(a: RtcStats_PeerConnection | PlainMessage | undefined, b: RtcStats_PeerConnection | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RtcStats.DataChannel + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtcStats.DataChannel"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_DataChannel; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_DataChannel; + + static fromJsonString(jsonString: string, options?: Partial): RtcStats_DataChannel; + + static equals(a: RtcStats_DataChannel | PlainMessage | undefined, b: RtcStats_DataChannel | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RtcStats.Transport + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtcStats.Transport"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_Transport; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_Transport; + + static fromJsonString(jsonString: string, options?: Partial): RtcStats_Transport; + + static equals(a: RtcStats_Transport | PlainMessage | undefined, b: RtcStats_Transport | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RtcStats.CandidatePair + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtcStats.CandidatePair"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_CandidatePair; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_CandidatePair; + + static fromJsonString(jsonString: string, options?: Partial): RtcStats_CandidatePair; + + static equals(a: RtcStats_CandidatePair | PlainMessage | undefined, b: RtcStats_CandidatePair | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RtcStats.LocalCandidate + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtcStats.LocalCandidate"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_LocalCandidate; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_LocalCandidate; + + static fromJsonString(jsonString: string, options?: Partial): RtcStats_LocalCandidate; + + static equals(a: RtcStats_LocalCandidate | PlainMessage | undefined, b: RtcStats_LocalCandidate | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RtcStats.RemoteCandidate + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtcStats.RemoteCandidate"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_RemoteCandidate; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_RemoteCandidate; + + static fromJsonString(jsonString: string, options?: Partial): RtcStats_RemoteCandidate; + + static equals(a: RtcStats_RemoteCandidate | PlainMessage | undefined, b: RtcStats_RemoteCandidate | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RtcStats.Certificate + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtcStats.Certificate"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_Certificate; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_Certificate; + + static fromJsonString(jsonString: string, options?: Partial): RtcStats_Certificate; + + static equals(a: RtcStats_Certificate | PlainMessage | undefined, b: RtcStats_Certificate | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RtcStats.Stream + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtcStats.Stream"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_Stream; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_Stream; + + static fromJsonString(jsonString: string, options?: Partial): RtcStats_Stream; + + static equals(a: RtcStats_Stream | PlainMessage | undefined, b: RtcStats_Stream | PlainMessage | undefined): boolean; +} + +/** + * Deprecated + * + * @generated from message livekit.proto.RtcStats.Track + */ +export declare class RtcStats_Track extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtcStats.Track"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtcStats_Track; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtcStats_Track; + + static fromJsonString(jsonString: string, options?: Partial): RtcStats_Track; + + static equals(a: RtcStats_Track | PlainMessage | undefined, b: RtcStats_Track | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RtcStatsData + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtcStatsData"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtcStatsData; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtcStatsData; + + static fromJsonString(jsonString: string, options?: Partial): RtcStatsData; + + static equals(a: RtcStatsData | PlainMessage | undefined, b: RtcStatsData | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.CodecStats + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.CodecStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CodecStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): CodecStats; + + static fromJsonString(jsonString: string, options?: Partial): CodecStats; + + static equals(a: CodecStats | PlainMessage | undefined, b: CodecStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RtpStreamStats + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RtpStreamStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RtpStreamStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): RtpStreamStats; + + static fromJsonString(jsonString: string, options?: Partial): RtpStreamStats; + + static equals(a: RtpStreamStats | PlainMessage | undefined, b: RtpStreamStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ReceivedRtpStreamStats + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ReceivedRtpStreamStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ReceivedRtpStreamStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): ReceivedRtpStreamStats; + + static fromJsonString(jsonString: string, options?: Partial): ReceivedRtpStreamStats; + + static equals(a: ReceivedRtpStreamStats | PlainMessage | undefined, b: ReceivedRtpStreamStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.InboundRtpStreamStats + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.InboundRtpStreamStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): InboundRtpStreamStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): InboundRtpStreamStats; + + static fromJsonString(jsonString: string, options?: Partial): InboundRtpStreamStats; + + static equals(a: InboundRtpStreamStats | PlainMessage | undefined, b: InboundRtpStreamStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SentRtpStreamStats + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SentRtpStreamStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SentRtpStreamStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): SentRtpStreamStats; + + static fromJsonString(jsonString: string, options?: Partial): SentRtpStreamStats; + + static equals(a: SentRtpStreamStats | PlainMessage | undefined, b: SentRtpStreamStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.OutboundRtpStreamStats + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.OutboundRtpStreamStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): OutboundRtpStreamStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): OutboundRtpStreamStats; + + static fromJsonString(jsonString: string, options?: Partial): OutboundRtpStreamStats; + + static equals(a: OutboundRtpStreamStats | PlainMessage | undefined, b: OutboundRtpStreamStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RemoteInboundRtpStreamStats + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RemoteInboundRtpStreamStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RemoteInboundRtpStreamStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): RemoteInboundRtpStreamStats; + + static fromJsonString(jsonString: string, options?: Partial): RemoteInboundRtpStreamStats; + + static equals(a: RemoteInboundRtpStreamStats | PlainMessage | undefined, b: RemoteInboundRtpStreamStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.RemoteOutboundRtpStreamStats + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.RemoteOutboundRtpStreamStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RemoteOutboundRtpStreamStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): RemoteOutboundRtpStreamStats; + + static fromJsonString(jsonString: string, options?: Partial): RemoteOutboundRtpStreamStats; + + static equals(a: RemoteOutboundRtpStreamStats | PlainMessage | undefined, b: RemoteOutboundRtpStreamStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.MediaSourceStats + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.MediaSourceStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MediaSourceStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): MediaSourceStats; + + static fromJsonString(jsonString: string, options?: Partial): MediaSourceStats; + + static equals(a: MediaSourceStats | PlainMessage | undefined, b: MediaSourceStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.AudioSourceStats + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.AudioSourceStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AudioSourceStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): AudioSourceStats; + + static fromJsonString(jsonString: string, options?: Partial): AudioSourceStats; + + static equals(a: AudioSourceStats | PlainMessage | undefined, b: AudioSourceStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.VideoSourceStats + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.VideoSourceStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): VideoSourceStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): VideoSourceStats; + + static fromJsonString(jsonString: string, options?: Partial): VideoSourceStats; + + static equals(a: VideoSourceStats | PlainMessage | undefined, b: VideoSourceStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.AudioPlayoutStats + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.AudioPlayoutStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AudioPlayoutStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): AudioPlayoutStats; + + static fromJsonString(jsonString: string, options?: Partial): AudioPlayoutStats; + + static equals(a: AudioPlayoutStats | PlainMessage | undefined, b: AudioPlayoutStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.PeerConnectionStats + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.PeerConnectionStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PeerConnectionStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): PeerConnectionStats; + + static fromJsonString(jsonString: string, options?: Partial): PeerConnectionStats; + + static equals(a: PeerConnectionStats | PlainMessage | undefined, b: PeerConnectionStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.DataChannelStats + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.DataChannelStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DataChannelStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): DataChannelStats; + + static fromJsonString(jsonString: string, options?: Partial): DataChannelStats; + + static equals(a: DataChannelStats | PlainMessage | undefined, b: DataChannelStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TransportStats + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TransportStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TransportStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): TransportStats; + + static fromJsonString(jsonString: string, options?: Partial): TransportStats; + + static equals(a: TransportStats | PlainMessage | undefined, b: TransportStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.CandidatePairStats + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.CandidatePairStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CandidatePairStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): CandidatePairStats; + + static fromJsonString(jsonString: string, options?: Partial): CandidatePairStats; + + static equals(a: CandidatePairStats | PlainMessage | undefined, b: CandidatePairStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.IceCandidateStats + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.IceCandidateStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): IceCandidateStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): IceCandidateStats; + + static fromJsonString(jsonString: string, options?: Partial): IceCandidateStats; + + static equals(a: IceCandidateStats | PlainMessage | undefined, b: IceCandidateStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.CertificateStats + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.CertificateStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CertificateStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): CertificateStats; + + static fromJsonString(jsonString: string, options?: Partial): CertificateStats; + + static equals(a: CertificateStats | PlainMessage | undefined, b: CertificateStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.StreamStats + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.StreamStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamStats; + + static fromJsonString(jsonString: string, options?: Partial): StreamStats; + + static equals(a: StreamStats | PlainMessage | undefined, b: StreamStats | PlainMessage | undefined): boolean; +} + diff --git a/livekit-ffi-node-bindings/proto/stats_pb.js b/livekit-ffi-node-bindings/proto/stats_pb.js new file mode 100644 index 000000000..29e76a385 --- /dev/null +++ b/livekit-ffi-node-bindings/proto/stats_pb.js @@ -0,0 +1,808 @@ +// 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 "js_import_style=legacy_commonjs" +// @generated from file stats.proto (package livekit.proto, syntax proto2) +/* eslint-disable */ +// @ts-nocheck + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +const { proto2 } = require("@bufbuild/protobuf"); + +/** + * @generated from enum livekit.proto.DataChannelState + */ +const DataChannelState = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const QualityLimitationReason = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const IceRole = /*@__PURE__*/ proto2.makeEnum( + "livekit.proto.IceRole", + [ + {no: 0, name: "ICE_UNKNOWN"}, + {no: 1, name: "ICE_CONTROLLING"}, + {no: 2, name: "ICE_CONTROLLED"}, + ], +); + +/** + * @generated from enum livekit.proto.DtlsTransportState + */ +const DtlsTransportState = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const IceTransportState = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const DtlsRole = /*@__PURE__*/ proto2.makeEnum( + "livekit.proto.DtlsRole", + [ + {no: 0, name: "DTLS_CLIENT"}, + {no: 1, name: "DTLS_SERVER"}, + {no: 2, name: "DTLS_UNKNOWN"}, + ], +); + +/** + * @generated from enum livekit.proto.IceCandidatePairState + */ +const IceCandidatePairState = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const IceCandidateType = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const IceServerTransportProtocol = /*@__PURE__*/ proto2.makeEnum( + "livekit.proto.IceServerTransportProtocol", + [ + {no: 0, name: "TRANSPORT_UDP"}, + {no: 1, name: "TRANSPORT_TCP"}, + {no: 2, name: "TRANSPORT_TLS"}, + ], +); + +/** + * @generated from enum livekit.proto.IceTcpCandidateType + */ +const IceTcpCandidateType = /*@__PURE__*/ proto2.makeEnum( + "livekit.proto.IceTcpCandidateType", + [ + {no: 0, name: "CANDIDATE_ACTIVE"}, + {no: 1, name: "CANDIDATE_PASSIVE"}, + {no: 2, name: "CANDIDATE_SO"}, + ], +); + +/** + * @generated from message livekit.proto.RtcStats + */ +const RtcStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtcStats", + () => [ + { 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" }, + ], +); + +/** + * @generated from message livekit.proto.RtcStats.Codec + */ +const RtcStats_Codec = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtcStats.Codec", + () => [ + { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, + { no: 2, name: "codec", kind: "message", T: CodecStats, req: true }, + ], + {localName: "RtcStats_Codec"}, +); + +/** + * @generated from message livekit.proto.RtcStats.InboundRtp + */ +const RtcStats_InboundRtp = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtcStats.InboundRtp", + () => [ + { 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 }, + ], + {localName: "RtcStats_InboundRtp"}, +); + +/** + * @generated from message livekit.proto.RtcStats.OutboundRtp + */ +const RtcStats_OutboundRtp = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtcStats.OutboundRtp", + () => [ + { 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 }, + ], + {localName: "RtcStats_OutboundRtp"}, +); + +/** + * @generated from message livekit.proto.RtcStats.RemoteInboundRtp + */ +const RtcStats_RemoteInboundRtp = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtcStats.RemoteInboundRtp", + () => [ + { 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 }, + ], + {localName: "RtcStats_RemoteInboundRtp"}, +); + +/** + * @generated from message livekit.proto.RtcStats.RemoteOutboundRtp + */ +const RtcStats_RemoteOutboundRtp = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtcStats.RemoteOutboundRtp", + () => [ + { 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 }, + ], + {localName: "RtcStats_RemoteOutboundRtp"}, +); + +/** + * @generated from message livekit.proto.RtcStats.MediaSource + */ +const RtcStats_MediaSource = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtcStats.MediaSource", + () => [ + { 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 }, + ], + {localName: "RtcStats_MediaSource"}, +); + +/** + * @generated from message livekit.proto.RtcStats.MediaPlayout + */ +const RtcStats_MediaPlayout = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtcStats.MediaPlayout", + () => [ + { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, + { no: 2, name: "audio_playout", kind: "message", T: AudioPlayoutStats, req: true }, + ], + {localName: "RtcStats_MediaPlayout"}, +); + +/** + * @generated from message livekit.proto.RtcStats.PeerConnection + */ +const RtcStats_PeerConnection = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtcStats.PeerConnection", + () => [ + { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, + { no: 2, name: "pc", kind: "message", T: PeerConnectionStats, req: true }, + ], + {localName: "RtcStats_PeerConnection"}, +); + +/** + * @generated from message livekit.proto.RtcStats.DataChannel + */ +const RtcStats_DataChannel = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtcStats.DataChannel", + () => [ + { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, + { no: 2, name: "dc", kind: "message", T: DataChannelStats, req: true }, + ], + {localName: "RtcStats_DataChannel"}, +); + +/** + * @generated from message livekit.proto.RtcStats.Transport + */ +const RtcStats_Transport = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtcStats.Transport", + () => [ + { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, + { no: 2, name: "transport", kind: "message", T: TransportStats, req: true }, + ], + {localName: "RtcStats_Transport"}, +); + +/** + * @generated from message livekit.proto.RtcStats.CandidatePair + */ +const RtcStats_CandidatePair = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtcStats.CandidatePair", + () => [ + { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, + { no: 2, name: "candidate_pair", kind: "message", T: CandidatePairStats, req: true }, + ], + {localName: "RtcStats_CandidatePair"}, +); + +/** + * @generated from message livekit.proto.RtcStats.LocalCandidate + */ +const RtcStats_LocalCandidate = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtcStats.LocalCandidate", + () => [ + { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, + { no: 2, name: "candidate", kind: "message", T: IceCandidateStats, req: true }, + ], + {localName: "RtcStats_LocalCandidate"}, +); + +/** + * @generated from message livekit.proto.RtcStats.RemoteCandidate + */ +const RtcStats_RemoteCandidate = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtcStats.RemoteCandidate", + () => [ + { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, + { no: 2, name: "candidate", kind: "message", T: IceCandidateStats, req: true }, + ], + {localName: "RtcStats_RemoteCandidate"}, +); + +/** + * @generated from message livekit.proto.RtcStats.Certificate + */ +const RtcStats_Certificate = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtcStats.Certificate", + () => [ + { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, + { no: 2, name: "certificate", kind: "message", T: CertificateStats, req: true }, + ], + {localName: "RtcStats_Certificate"}, +); + +/** + * @generated from message livekit.proto.RtcStats.Stream + */ +const RtcStats_Stream = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtcStats.Stream", + () => [ + { no: 1, name: "rtc", kind: "message", T: RtcStatsData, req: true }, + { no: 2, name: "stream", kind: "message", T: StreamStats, req: true }, + ], + {localName: "RtcStats_Stream"}, +); + +/** + * Deprecated + * + * @generated from message livekit.proto.RtcStats.Track + */ +const RtcStats_Track = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtcStats.Track", + [], + {localName: "RtcStats_Track"}, +); + +/** + * @generated from message livekit.proto.RtcStatsData + */ +const RtcStatsData = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtcStatsData", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + { no: 2, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.CodecStats + */ +const CodecStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.CodecStats", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.RtpStreamStats + */ +const RtpStreamStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RtpStreamStats", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.ReceivedRtpStreamStats + */ +const ReceivedRtpStreamStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ReceivedRtpStreamStats", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.InboundRtpStreamStats + */ +const InboundRtpStreamStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.InboundRtpStreamStats", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.SentRtpStreamStats + */ +const SentRtpStreamStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SentRtpStreamStats", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.OutboundRtpStreamStats + */ +const OutboundRtpStreamStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.OutboundRtpStreamStats", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.RemoteInboundRtpStreamStats + */ +const RemoteInboundRtpStreamStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RemoteInboundRtpStreamStats", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.RemoteOutboundRtpStreamStats + */ +const RemoteOutboundRtpStreamStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.RemoteOutboundRtpStreamStats", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.MediaSourceStats + */ +const MediaSourceStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.MediaSourceStats", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.AudioSourceStats + */ +const AudioSourceStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.AudioSourceStats", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.VideoSourceStats + */ +const VideoSourceStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.VideoSourceStats", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.AudioPlayoutStats + */ +const AudioPlayoutStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.AudioPlayoutStats", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.PeerConnectionStats + */ +const PeerConnectionStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.PeerConnectionStats", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.DataChannelStats + */ +const DataChannelStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.DataChannelStats", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.TransportStats + */ +const TransportStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TransportStats", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.CandidatePairStats + */ +const CandidatePairStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.CandidatePairStats", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.IceCandidateStats + */ +const IceCandidateStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.IceCandidateStats", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.CertificateStats + */ +const CertificateStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.CertificateStats", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.StreamStats + */ +const StreamStats = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.StreamStats", + () => [ + { 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 }, + ], +); + + +exports.DataChannelState = DataChannelState; +exports.QualityLimitationReason = QualityLimitationReason; +exports.IceRole = IceRole; +exports.DtlsTransportState = DtlsTransportState; +exports.IceTransportState = IceTransportState; +exports.DtlsRole = DtlsRole; +exports.IceCandidatePairState = IceCandidatePairState; +exports.IceCandidateType = IceCandidateType; +exports.IceServerTransportProtocol = IceServerTransportProtocol; +exports.IceTcpCandidateType = IceTcpCandidateType; +exports.RtcStats = RtcStats; +exports.RtcStats_Codec = RtcStats_Codec; +exports.RtcStats_InboundRtp = RtcStats_InboundRtp; +exports.RtcStats_OutboundRtp = RtcStats_OutboundRtp; +exports.RtcStats_RemoteInboundRtp = RtcStats_RemoteInboundRtp; +exports.RtcStats_RemoteOutboundRtp = RtcStats_RemoteOutboundRtp; +exports.RtcStats_MediaSource = RtcStats_MediaSource; +exports.RtcStats_MediaPlayout = RtcStats_MediaPlayout; +exports.RtcStats_PeerConnection = RtcStats_PeerConnection; +exports.RtcStats_DataChannel = RtcStats_DataChannel; +exports.RtcStats_Transport = RtcStats_Transport; +exports.RtcStats_CandidatePair = RtcStats_CandidatePair; +exports.RtcStats_LocalCandidate = RtcStats_LocalCandidate; +exports.RtcStats_RemoteCandidate = RtcStats_RemoteCandidate; +exports.RtcStats_Certificate = RtcStats_Certificate; +exports.RtcStats_Stream = RtcStats_Stream; +exports.RtcStats_Track = RtcStats_Track; +exports.RtcStatsData = RtcStatsData; +exports.CodecStats = CodecStats; +exports.RtpStreamStats = RtpStreamStats; +exports.ReceivedRtpStreamStats = ReceivedRtpStreamStats; +exports.InboundRtpStreamStats = InboundRtpStreamStats; +exports.SentRtpStreamStats = SentRtpStreamStats; +exports.OutboundRtpStreamStats = OutboundRtpStreamStats; +exports.RemoteInboundRtpStreamStats = RemoteInboundRtpStreamStats; +exports.RemoteOutboundRtpStreamStats = RemoteOutboundRtpStreamStats; +exports.MediaSourceStats = MediaSourceStats; +exports.AudioSourceStats = AudioSourceStats; +exports.VideoSourceStats = VideoSourceStats; +exports.AudioPlayoutStats = AudioPlayoutStats; +exports.PeerConnectionStats = PeerConnectionStats; +exports.DataChannelStats = DataChannelStats; +exports.TransportStats = TransportStats; +exports.CandidatePairStats = CandidatePairStats; +exports.IceCandidateStats = IceCandidateStats; +exports.CertificateStats = CertificateStats; +exports.StreamStats = StreamStats; diff --git a/livekit-ffi-node-bindings/proto/track_pb.d.ts b/livekit-ffi-node-bindings/proto/track_pb.d.ts new file mode 100644 index 000000000..89cb7e8b8 --- /dev/null +++ b/livekit-ffi-node-bindings/proto/track_pb.d.ts @@ -0,0 +1,742 @@ +// 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 "js_import_style=legacy_commonjs" +// @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 type { RtcStats } from "./stats_pb.js"; +import type { EncryptionType } from "./e2ee_pb.js"; +import type { FfiOwnedHandle } from "./handle_pb.js"; + +/** + * @generated from enum livekit.proto.TrackKind + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.TrackSource + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.StreamState + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.AudioTrackFeature + */ +export declare 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, +} + +/** + * Create a new VideoTrack from a VideoSource + * + * @generated from message livekit.proto.CreateVideoTrackRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.CreateVideoTrackRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateVideoTrackRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateVideoTrackRequest; + + static fromJsonString(jsonString: string, options?: Partial): CreateVideoTrackRequest; + + static equals(a: CreateVideoTrackRequest | PlainMessage | undefined, b: CreateVideoTrackRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.CreateVideoTrackResponse + */ +export declare class CreateVideoTrackResponse extends Message { + /** + * @generated from field: required livekit.proto.OwnedTrack track = 1; + */ + track?: OwnedTrack; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.CreateVideoTrackResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateVideoTrackResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateVideoTrackResponse; + + static fromJsonString(jsonString: string, options?: Partial): CreateVideoTrackResponse; + + static equals(a: CreateVideoTrackResponse | PlainMessage | undefined, b: CreateVideoTrackResponse | PlainMessage | undefined): boolean; +} + +/** + * Create a new AudioTrack from a AudioSource + * + * @generated from message livekit.proto.CreateAudioTrackRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.CreateAudioTrackRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateAudioTrackRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateAudioTrackRequest; + + static fromJsonString(jsonString: string, options?: Partial): CreateAudioTrackRequest; + + static equals(a: CreateAudioTrackRequest | PlainMessage | undefined, b: CreateAudioTrackRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.CreateAudioTrackResponse + */ +export declare class CreateAudioTrackResponse extends Message { + /** + * @generated from field: required livekit.proto.OwnedTrack track = 1; + */ + track?: OwnedTrack; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.CreateAudioTrackResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateAudioTrackResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateAudioTrackResponse; + + static fromJsonString(jsonString: string, options?: Partial): CreateAudioTrackResponse; + + static equals(a: CreateAudioTrackResponse | PlainMessage | undefined, b: CreateAudioTrackResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.GetStatsRequest + */ +export declare class GetStatsRequest extends Message { + /** + * @generated from field: required uint64 track_handle = 1; + */ + trackHandle?: bigint; + + /** + * @generated from field: optional uint64 request_async_id = 2; + */ + requestAsyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.GetStatsRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetStatsRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetStatsRequest; + + static fromJsonString(jsonString: string, options?: Partial): GetStatsRequest; + + static equals(a: GetStatsRequest | PlainMessage | undefined, b: GetStatsRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.GetStatsResponse + */ +export declare class GetStatsResponse extends Message { + /** + * @generated from field: required uint64 async_id = 1; + */ + asyncId?: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.GetStatsResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetStatsResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetStatsResponse; + + static fromJsonString(jsonString: string, options?: Partial): GetStatsResponse; + + static equals(a: GetStatsResponse | PlainMessage | undefined, b: GetStatsResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.GetStatsCallback + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.GetStatsCallback"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetStatsCallback; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetStatsCallback; + + static fromJsonString(jsonString: string, options?: Partial): GetStatsCallback; + + static equals(a: GetStatsCallback | PlainMessage | undefined, b: GetStatsCallback | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TrackEvent + */ +export declare class TrackEvent extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TrackEvent"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TrackEvent; + + static fromJson(jsonValue: JsonValue, options?: Partial): TrackEvent; + + static fromJsonString(jsonString: string, options?: Partial): TrackEvent; + + static equals(a: TrackEvent | PlainMessage | undefined, b: TrackEvent | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TrackPublicationInfo + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TrackPublicationInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TrackPublicationInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): TrackPublicationInfo; + + static fromJsonString(jsonString: string, options?: Partial): TrackPublicationInfo; + + static equals(a: TrackPublicationInfo | PlainMessage | undefined, b: TrackPublicationInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.OwnedTrackPublication + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.OwnedTrackPublication"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedTrackPublication; + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedTrackPublication; + + static fromJsonString(jsonString: string, options?: Partial): OwnedTrackPublication; + + static equals(a: OwnedTrackPublication | PlainMessage | undefined, b: OwnedTrackPublication | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.TrackInfo + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.TrackInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TrackInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): TrackInfo; + + static fromJsonString(jsonString: string, options?: Partial): TrackInfo; + + static equals(a: TrackInfo | PlainMessage | undefined, b: TrackInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.OwnedTrack + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.OwnedTrack"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedTrack; + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedTrack; + + static fromJsonString(jsonString: string, options?: Partial): OwnedTrack; + + static equals(a: OwnedTrack | PlainMessage | undefined, b: OwnedTrack | PlainMessage | undefined): boolean; +} + +/** + * Mute/UnMute a track + * + * @generated from message livekit.proto.LocalTrackMuteRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.LocalTrackMuteRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): LocalTrackMuteRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): LocalTrackMuteRequest; + + static fromJsonString(jsonString: string, options?: Partial): LocalTrackMuteRequest; + + static equals(a: LocalTrackMuteRequest | PlainMessage | undefined, b: LocalTrackMuteRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.LocalTrackMuteResponse + */ +export declare class LocalTrackMuteResponse extends Message { + /** + * @generated from field: required bool muted = 1; + */ + muted?: boolean; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.LocalTrackMuteResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): LocalTrackMuteResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): LocalTrackMuteResponse; + + static fromJsonString(jsonString: string, options?: Partial): LocalTrackMuteResponse; + + static equals(a: LocalTrackMuteResponse | PlainMessage | undefined, b: LocalTrackMuteResponse | PlainMessage | undefined): boolean; +} + +/** + * Enable/Disable a remote track + * + * @generated from message livekit.proto.EnableRemoteTrackRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.EnableRemoteTrackRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): EnableRemoteTrackRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): EnableRemoteTrackRequest; + + static fromJsonString(jsonString: string, options?: Partial): EnableRemoteTrackRequest; + + static equals(a: EnableRemoteTrackRequest | PlainMessage | undefined, b: EnableRemoteTrackRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.EnableRemoteTrackResponse + */ +export declare class EnableRemoteTrackResponse extends Message { + /** + * @generated from field: required bool enabled = 1; + */ + enabled?: boolean; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.EnableRemoteTrackResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): EnableRemoteTrackResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): EnableRemoteTrackResponse; + + static fromJsonString(jsonString: string, options?: Partial): EnableRemoteTrackResponse; + + static equals(a: EnableRemoteTrackResponse | PlainMessage | undefined, b: EnableRemoteTrackResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SetTrackSubscriptionPermissionsRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetTrackSubscriptionPermissionsRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetTrackSubscriptionPermissionsRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetTrackSubscriptionPermissionsRequest; + + static fromJsonString(jsonString: string, options?: Partial): SetTrackSubscriptionPermissionsRequest; + + static equals(a: SetTrackSubscriptionPermissionsRequest | PlainMessage | undefined, b: SetTrackSubscriptionPermissionsRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.ParticipantTrackPermission + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.ParticipantTrackPermission"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantTrackPermission; + + static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantTrackPermission; + + static fromJsonString(jsonString: string, options?: Partial): ParticipantTrackPermission; + + static equals(a: ParticipantTrackPermission | PlainMessage | undefined, b: ParticipantTrackPermission | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SetTrackSubscriptionPermissionsResponse + */ +export declare class SetTrackSubscriptionPermissionsResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetTrackSubscriptionPermissionsResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetTrackSubscriptionPermissionsResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetTrackSubscriptionPermissionsResponse; + + static fromJsonString(jsonString: string, options?: Partial): SetTrackSubscriptionPermissionsResponse; + + static equals(a: SetTrackSubscriptionPermissionsResponse | PlainMessage | undefined, b: SetTrackSubscriptionPermissionsResponse | PlainMessage | undefined): boolean; +} + diff --git a/livekit-ffi-node-bindings/proto/track_pb.js b/livekit-ffi-node-bindings/proto/track_pb.js new file mode 100644 index 000000000..4a150c747 --- /dev/null +++ b/livekit-ffi-node-bindings/proto/track_pb.js @@ -0,0 +1,328 @@ +// 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 "js_import_style=legacy_commonjs" +// @generated from file track.proto (package livekit.proto, syntax proto2) +/* eslint-disable */ +// @ts-nocheck + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +const { proto2 } = require("@bufbuild/protobuf"); +const { RtcStats } = require("./stats_pb.js"); +const { EncryptionType } = require("./e2ee_pb.js"); +const { FfiOwnedHandle } = require("./handle_pb.js"); + +/** + * @generated from enum livekit.proto.TrackKind + */ +const TrackKind = /*@__PURE__*/ proto2.makeEnum( + "livekit.proto.TrackKind", + [ + {no: 0, name: "KIND_UNKNOWN"}, + {no: 1, name: "KIND_AUDIO"}, + {no: 2, name: "KIND_VIDEO"}, + ], +); + +/** + * @generated from enum livekit.proto.TrackSource + */ +const TrackSource = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const StreamState = /*@__PURE__*/ proto2.makeEnum( + "livekit.proto.StreamState", + [ + {no: 0, name: "STATE_UNKNOWN"}, + {no: 1, name: "STATE_ACTIVE"}, + {no: 2, name: "STATE_PAUSED"}, + ], +); + +/** + * @generated from enum livekit.proto.AudioTrackFeature + */ +const AudioTrackFeature = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const CreateVideoTrackRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.CreateVideoTrackRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.CreateVideoTrackResponse + */ +const CreateVideoTrackResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.CreateVideoTrackResponse", + () => [ + { no: 1, name: "track", kind: "message", T: OwnedTrack, req: true }, + ], +); + +/** + * Create a new AudioTrack from a AudioSource + * + * @generated from message livekit.proto.CreateAudioTrackRequest + */ +const CreateAudioTrackRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.CreateAudioTrackRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.CreateAudioTrackResponse + */ +const CreateAudioTrackResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.CreateAudioTrackResponse", + () => [ + { no: 1, name: "track", kind: "message", T: OwnedTrack, req: true }, + ], +); + +/** + * @generated from message livekit.proto.GetStatsRequest + */ +const GetStatsRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.GetStatsRequest", + () => [ + { no: 1, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + { no: 2, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, + ], +); + +/** + * @generated from message livekit.proto.GetStatsResponse + */ +const GetStatsResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.GetStatsResponse", + () => [ + { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.GetStatsCallback + */ +const GetStatsCallback = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.GetStatsCallback", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.TrackEvent + */ +const TrackEvent = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TrackEvent", + [], +); + +/** + * @generated from message livekit.proto.TrackPublicationInfo + */ +const TrackPublicationInfo = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TrackPublicationInfo", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.OwnedTrackPublication + */ +const OwnedTrackPublication = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.OwnedTrackPublication", + () => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: TrackPublicationInfo, req: true }, + ], +); + +/** + * @generated from message livekit.proto.TrackInfo + */ +const TrackInfo = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.TrackInfo", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.OwnedTrack + */ +const OwnedTrack = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.OwnedTrack", + () => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: TrackInfo, req: true }, + ], +); + +/** + * Mute/UnMute a track + * + * @generated from message livekit.proto.LocalTrackMuteRequest + */ +const LocalTrackMuteRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.LocalTrackMuteRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.LocalTrackMuteResponse + */ +const LocalTrackMuteResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.LocalTrackMuteResponse", + () => [ + { no: 1, name: "muted", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, + ], +); + +/** + * Enable/Disable a remote track + * + * @generated from message livekit.proto.EnableRemoteTrackRequest + */ +const EnableRemoteTrackRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.EnableRemoteTrackRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.EnableRemoteTrackResponse + */ +const EnableRemoteTrackResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.EnableRemoteTrackResponse", + () => [ + { no: 1, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.SetTrackSubscriptionPermissionsRequest + */ +const SetTrackSubscriptionPermissionsRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetTrackSubscriptionPermissionsRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.ParticipantTrackPermission + */ +const ParticipantTrackPermission = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.ParticipantTrackPermission", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.SetTrackSubscriptionPermissionsResponse + */ +const SetTrackSubscriptionPermissionsResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetTrackSubscriptionPermissionsResponse", + [], +); + + +exports.TrackKind = TrackKind; +exports.TrackSource = TrackSource; +exports.StreamState = StreamState; +exports.AudioTrackFeature = AudioTrackFeature; +exports.CreateVideoTrackRequest = CreateVideoTrackRequest; +exports.CreateVideoTrackResponse = CreateVideoTrackResponse; +exports.CreateAudioTrackRequest = CreateAudioTrackRequest; +exports.CreateAudioTrackResponse = CreateAudioTrackResponse; +exports.GetStatsRequest = GetStatsRequest; +exports.GetStatsResponse = GetStatsResponse; +exports.GetStatsCallback = GetStatsCallback; +exports.TrackEvent = TrackEvent; +exports.TrackPublicationInfo = TrackPublicationInfo; +exports.OwnedTrackPublication = OwnedTrackPublication; +exports.TrackInfo = TrackInfo; +exports.OwnedTrack = OwnedTrack; +exports.LocalTrackMuteRequest = LocalTrackMuteRequest; +exports.LocalTrackMuteResponse = LocalTrackMuteResponse; +exports.EnableRemoteTrackRequest = EnableRemoteTrackRequest; +exports.EnableRemoteTrackResponse = EnableRemoteTrackResponse; +exports.SetTrackSubscriptionPermissionsRequest = SetTrackSubscriptionPermissionsRequest; +exports.ParticipantTrackPermission = ParticipantTrackPermission; +exports.SetTrackSubscriptionPermissionsResponse = SetTrackSubscriptionPermissionsResponse; diff --git a/livekit-ffi-node-bindings/proto/track_publication_pb.d.ts b/livekit-ffi-node-bindings/proto/track_publication_pb.d.ts new file mode 100644 index 000000000..40a2bd284 --- /dev/null +++ b/livekit-ffi-node-bindings/proto/track_publication_pb.d.ts @@ -0,0 +1,199 @@ +// 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 "js_import_style=legacy_commonjs" +// @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 declare 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, +} + +/** + * Enable/Disable a remote track publication + * + * @generated from message livekit.proto.EnableRemoteTrackPublicationRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.EnableRemoteTrackPublicationRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): EnableRemoteTrackPublicationRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): EnableRemoteTrackPublicationRequest; + + static fromJsonString(jsonString: string, options?: Partial): EnableRemoteTrackPublicationRequest; + + static equals(a: EnableRemoteTrackPublicationRequest | PlainMessage | undefined, b: EnableRemoteTrackPublicationRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.EnableRemoteTrackPublicationResponse + */ +export declare class EnableRemoteTrackPublicationResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.EnableRemoteTrackPublicationResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): EnableRemoteTrackPublicationResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): EnableRemoteTrackPublicationResponse; + + static fromJsonString(jsonString: string, options?: Partial): EnableRemoteTrackPublicationResponse; + + static equals(a: EnableRemoteTrackPublicationResponse | PlainMessage | undefined, b: EnableRemoteTrackPublicationResponse | PlainMessage | undefined): boolean; +} + +/** + * update a remote track publication dimension + * + * @generated from message livekit.proto.UpdateRemoteTrackPublicationDimensionRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.UpdateRemoteTrackPublicationDimensionRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateRemoteTrackPublicationDimensionRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateRemoteTrackPublicationDimensionRequest; + + static fromJsonString(jsonString: string, options?: Partial): UpdateRemoteTrackPublicationDimensionRequest; + + static equals(a: UpdateRemoteTrackPublicationDimensionRequest | PlainMessage | undefined, b: UpdateRemoteTrackPublicationDimensionRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.UpdateRemoteTrackPublicationDimensionResponse + */ +export declare class UpdateRemoteTrackPublicationDimensionResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.UpdateRemoteTrackPublicationDimensionResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateRemoteTrackPublicationDimensionResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateRemoteTrackPublicationDimensionResponse; + + static fromJsonString(jsonString: string, options?: Partial): UpdateRemoteTrackPublicationDimensionResponse; + + static equals(a: UpdateRemoteTrackPublicationDimensionResponse | PlainMessage | undefined, b: UpdateRemoteTrackPublicationDimensionResponse | PlainMessage | undefined): boolean; +} + +/** + * For tracks that support simulcasting, adjust subscribed quality. + * + * @generated from message livekit.proto.SetRemoteTrackPublicationQualityRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetRemoteTrackPublicationQualityRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetRemoteTrackPublicationQualityRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetRemoteTrackPublicationQualityRequest; + + static fromJsonString(jsonString: string, options?: Partial): SetRemoteTrackPublicationQualityRequest; + + static equals(a: SetRemoteTrackPublicationQualityRequest | PlainMessage | undefined, b: SetRemoteTrackPublicationQualityRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.SetRemoteTrackPublicationQualityResponse + */ +export declare class SetRemoteTrackPublicationQualityResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.SetRemoteTrackPublicationQualityResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SetRemoteTrackPublicationQualityResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): SetRemoteTrackPublicationQualityResponse; + + static fromJsonString(jsonString: string, options?: Partial): SetRemoteTrackPublicationQualityResponse; + + static equals(a: SetRemoteTrackPublicationQualityResponse | PlainMessage | undefined, b: SetRemoteTrackPublicationQualityResponse | PlainMessage | undefined): boolean; +} + diff --git a/livekit-ffi-node-bindings/proto/track_publication_pb.js b/livekit-ffi-node-bindings/proto/track_publication_pb.js new file mode 100644 index 000000000..49aeae836 --- /dev/null +++ b/livekit-ffi-node-bindings/proto/track_publication_pb.js @@ -0,0 +1,110 @@ +// 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 "js_import_style=legacy_commonjs" +// @generated from file track_publication.proto (package livekit.proto, syntax proto2) +/* eslint-disable */ +// @ts-nocheck + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +const { proto2 } = require("@bufbuild/protobuf"); + +/** + * Video quality for simulcasted tracks. + * + * @generated from enum livekit.proto.VideoQuality + */ +const VideoQuality = /*@__PURE__*/ proto2.makeEnum( + "livekit.proto.VideoQuality", + [ + {no: 0, name: "VIDEO_QUALITY_LOW", localName: "LOW"}, + {no: 1, name: "VIDEO_QUALITY_MEDIUM", localName: "MEDIUM"}, + {no: 2, name: "VIDEO_QUALITY_HIGH", localName: "HIGH"}, + ], +); + +/** + * Enable/Disable a remote track publication + * + * @generated from message livekit.proto.EnableRemoteTrackPublicationRequest + */ +const EnableRemoteTrackPublicationRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.EnableRemoteTrackPublicationRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.EnableRemoteTrackPublicationResponse + */ +const EnableRemoteTrackPublicationResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.EnableRemoteTrackPublicationResponse", + [], +); + +/** + * update a remote track publication dimension + * + * @generated from message livekit.proto.UpdateRemoteTrackPublicationDimensionRequest + */ +const UpdateRemoteTrackPublicationDimensionRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.UpdateRemoteTrackPublicationDimensionRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.UpdateRemoteTrackPublicationDimensionResponse + */ +const UpdateRemoteTrackPublicationDimensionResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.UpdateRemoteTrackPublicationDimensionResponse", + [], +); + +/** + * For tracks that support simulcasting, adjust subscribed quality. + * + * @generated from message livekit.proto.SetRemoteTrackPublicationQualityRequest + */ +const SetRemoteTrackPublicationQualityRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetRemoteTrackPublicationQualityRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.SetRemoteTrackPublicationQualityResponse + */ +const SetRemoteTrackPublicationQualityResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.SetRemoteTrackPublicationQualityResponse", + [], +); + + +exports.VideoQuality = VideoQuality; +exports.EnableRemoteTrackPublicationRequest = EnableRemoteTrackPublicationRequest; +exports.EnableRemoteTrackPublicationResponse = EnableRemoteTrackPublicationResponse; +exports.UpdateRemoteTrackPublicationDimensionRequest = UpdateRemoteTrackPublicationDimensionRequest; +exports.UpdateRemoteTrackPublicationDimensionResponse = UpdateRemoteTrackPublicationDimensionResponse; +exports.SetRemoteTrackPublicationQualityRequest = SetRemoteTrackPublicationQualityRequest; +exports.SetRemoteTrackPublicationQualityResponse = SetRemoteTrackPublicationQualityResponse; diff --git a/livekit-ffi-node-bindings/proto/video_frame_pb.d.ts b/livekit-ffi-node-bindings/proto/video_frame_pb.d.ts new file mode 100644 index 000000000..14f952268 --- /dev/null +++ b/livekit-ffi-node-bindings/proto/video_frame_pb.d.ts @@ -0,0 +1,882 @@ +// 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 "js_import_style=legacy_commonjs" +// @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 type { TrackSource } from "./track_pb.js"; +import type { FfiOwnedHandle } from "./handle_pb.js"; + +/** + * @generated from enum livekit.proto.VideoCodec + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.VideoRotation + */ +export declare 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, +} + +/** + * 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 declare 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, +} + +/** + * @generated from enum livekit.proto.VideoStreamType + */ +export declare 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, +} + +/** + * @generated from enum livekit.proto.VideoSourceType + */ +export declare enum VideoSourceType { + /** + * @generated from enum value: VIDEO_SOURCE_NATIVE = 0; + */ + VIDEO_SOURCE_NATIVE = 0, +} + +/** + * Create a new VideoStream + * VideoStream is used to receive video frames from a track + * + * @generated from message livekit.proto.NewVideoStreamRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.NewVideoStreamRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): NewVideoStreamRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): NewVideoStreamRequest; + + static fromJsonString(jsonString: string, options?: Partial): NewVideoStreamRequest; + + static equals(a: NewVideoStreamRequest | PlainMessage | undefined, b: NewVideoStreamRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.NewVideoStreamResponse + */ +export declare class NewVideoStreamResponse extends Message { + /** + * @generated from field: required livekit.proto.OwnedVideoStream stream = 1; + */ + stream?: OwnedVideoStream; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.NewVideoStreamResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): NewVideoStreamResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): NewVideoStreamResponse; + + static fromJsonString(jsonString: string, options?: Partial): NewVideoStreamResponse; + + static equals(a: NewVideoStreamResponse | PlainMessage | undefined, b: NewVideoStreamResponse | PlainMessage | undefined): boolean; +} + +/** + * Request a video stream from a participant + * + * @generated from message livekit.proto.VideoStreamFromParticipantRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.VideoStreamFromParticipantRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): VideoStreamFromParticipantRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): VideoStreamFromParticipantRequest; + + static fromJsonString(jsonString: string, options?: Partial): VideoStreamFromParticipantRequest; + + static equals(a: VideoStreamFromParticipantRequest | PlainMessage | undefined, b: VideoStreamFromParticipantRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.VideoStreamFromParticipantResponse + */ +export declare class VideoStreamFromParticipantResponse extends Message { + /** + * @generated from field: required livekit.proto.OwnedVideoStream stream = 1; + */ + stream?: OwnedVideoStream; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.VideoStreamFromParticipantResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): VideoStreamFromParticipantResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): VideoStreamFromParticipantResponse; + + static fromJsonString(jsonString: string, options?: Partial): VideoStreamFromParticipantResponse; + + static equals(a: VideoStreamFromParticipantResponse | PlainMessage | undefined, b: VideoStreamFromParticipantResponse | PlainMessage | undefined): boolean; +} + +/** + * Create a new VideoSource + * VideoSource is used to send video frame to a track + * + * @generated from message livekit.proto.NewVideoSourceRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.NewVideoSourceRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): NewVideoSourceRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): NewVideoSourceRequest; + + static fromJsonString(jsonString: string, options?: Partial): NewVideoSourceRequest; + + static equals(a: NewVideoSourceRequest | PlainMessage | undefined, b: NewVideoSourceRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.NewVideoSourceResponse + */ +export declare class NewVideoSourceResponse extends Message { + /** + * @generated from field: required livekit.proto.OwnedVideoSource source = 1; + */ + source?: OwnedVideoSource; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.NewVideoSourceResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): NewVideoSourceResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): NewVideoSourceResponse; + + static fromJsonString(jsonString: string, options?: Partial): NewVideoSourceResponse; + + static equals(a: NewVideoSourceResponse | PlainMessage | undefined, b: NewVideoSourceResponse | PlainMessage | undefined): boolean; +} + +/** + * Push a frame to a VideoSource + * + * @generated from message livekit.proto.CaptureVideoFrameRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.CaptureVideoFrameRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CaptureVideoFrameRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): CaptureVideoFrameRequest; + + static fromJsonString(jsonString: string, options?: Partial): CaptureVideoFrameRequest; + + static equals(a: CaptureVideoFrameRequest | PlainMessage | undefined, b: CaptureVideoFrameRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.CaptureVideoFrameResponse + */ +export declare class CaptureVideoFrameResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.CaptureVideoFrameResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CaptureVideoFrameResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): CaptureVideoFrameResponse; + + static fromJsonString(jsonString: string, options?: Partial): CaptureVideoFrameResponse; + + static equals(a: CaptureVideoFrameResponse | PlainMessage | undefined, b: CaptureVideoFrameResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.VideoConvertRequest + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.VideoConvertRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): VideoConvertRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): VideoConvertRequest; + + static fromJsonString(jsonString: string, options?: Partial): VideoConvertRequest; + + static equals(a: VideoConvertRequest | PlainMessage | undefined, b: VideoConvertRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.VideoConvertResponse + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.VideoConvertResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): VideoConvertResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): VideoConvertResponse; + + static fromJsonString(jsonString: string, options?: Partial): VideoConvertResponse; + + static equals(a: VideoConvertResponse | PlainMessage | undefined, b: VideoConvertResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.VideoResolution + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.VideoResolution"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): VideoResolution; + + static fromJson(jsonValue: JsonValue, options?: Partial): VideoResolution; + + static fromJsonString(jsonString: string, options?: Partial): VideoResolution; + + static equals(a: VideoResolution | PlainMessage | undefined, b: VideoResolution | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.VideoBufferInfo + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.VideoBufferInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): VideoBufferInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): VideoBufferInfo; + + static fromJsonString(jsonString: string, options?: Partial): VideoBufferInfo; + + static equals(a: VideoBufferInfo | PlainMessage | undefined, b: VideoBufferInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.VideoBufferInfo.ComponentInfo + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.VideoBufferInfo.ComponentInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): VideoBufferInfo_ComponentInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): VideoBufferInfo_ComponentInfo; + + static fromJsonString(jsonString: string, options?: Partial): VideoBufferInfo_ComponentInfo; + + static equals(a: VideoBufferInfo_ComponentInfo | PlainMessage | undefined, b: VideoBufferInfo_ComponentInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.OwnedVideoBuffer + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.OwnedVideoBuffer"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedVideoBuffer; + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedVideoBuffer; + + static fromJsonString(jsonString: string, options?: Partial): OwnedVideoBuffer; + + static equals(a: OwnedVideoBuffer | PlainMessage | undefined, b: OwnedVideoBuffer | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.VideoStreamInfo + */ +export declare class VideoStreamInfo extends Message { + /** + * @generated from field: required livekit.proto.VideoStreamType type = 1; + */ + type?: VideoStreamType; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.VideoStreamInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): VideoStreamInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): VideoStreamInfo; + + static fromJsonString(jsonString: string, options?: Partial): VideoStreamInfo; + + static equals(a: VideoStreamInfo | PlainMessage | undefined, b: VideoStreamInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.OwnedVideoStream + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.OwnedVideoStream"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedVideoStream; + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedVideoStream; + + static fromJsonString(jsonString: string, options?: Partial): OwnedVideoStream; + + static equals(a: OwnedVideoStream | PlainMessage | undefined, b: OwnedVideoStream | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.VideoStreamEvent + */ +export declare 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 }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.VideoStreamEvent"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): VideoStreamEvent; + + static fromJson(jsonValue: JsonValue, options?: Partial): VideoStreamEvent; + + static fromJsonString(jsonString: string, options?: Partial): VideoStreamEvent; + + static equals(a: VideoStreamEvent | PlainMessage | undefined, b: VideoStreamEvent | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.VideoFrameReceived + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.VideoFrameReceived"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): VideoFrameReceived; + + static fromJson(jsonValue: JsonValue, options?: Partial): VideoFrameReceived; + + static fromJsonString(jsonString: string, options?: Partial): VideoFrameReceived; + + static equals(a: VideoFrameReceived | PlainMessage | undefined, b: VideoFrameReceived | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.VideoStreamEOS + */ +export declare class VideoStreamEOS extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.VideoStreamEOS"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): VideoStreamEOS; + + static fromJson(jsonValue: JsonValue, options?: Partial): VideoStreamEOS; + + static fromJsonString(jsonString: string, options?: Partial): VideoStreamEOS; + + static equals(a: VideoStreamEOS | PlainMessage | undefined, b: VideoStreamEOS | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.VideoSourceResolution + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.VideoSourceResolution"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): VideoSourceResolution; + + static fromJson(jsonValue: JsonValue, options?: Partial): VideoSourceResolution; + + static fromJsonString(jsonString: string, options?: Partial): VideoSourceResolution; + + static equals(a: VideoSourceResolution | PlainMessage | undefined, b: VideoSourceResolution | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.VideoSourceInfo + */ +export declare class VideoSourceInfo extends Message { + /** + * @generated from field: required livekit.proto.VideoSourceType type = 1; + */ + type?: VideoSourceType; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.VideoSourceInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): VideoSourceInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): VideoSourceInfo; + + static fromJsonString(jsonString: string, options?: Partial): VideoSourceInfo; + + static equals(a: VideoSourceInfo | PlainMessage | undefined, b: VideoSourceInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.proto.OwnedVideoSource + */ +export declare 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); + + static readonly runtime: typeof proto2; + static readonly typeName = "livekit.proto.OwnedVideoSource"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): OwnedVideoSource; + + static fromJson(jsonValue: JsonValue, options?: Partial): OwnedVideoSource; + + static fromJsonString(jsonString: string, options?: Partial): OwnedVideoSource; + + static equals(a: OwnedVideoSource | PlainMessage | undefined, b: OwnedVideoSource | PlainMessage | undefined): boolean; +} + diff --git a/livekit-ffi-node-bindings/proto/video_frame_pb.js b/livekit-ffi-node-bindings/proto/video_frame_pb.js new file mode 100644 index 000000000..a6b174c4f --- /dev/null +++ b/livekit-ffi-node-bindings/proto/video_frame_pb.js @@ -0,0 +1,384 @@ +// 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 "js_import_style=legacy_commonjs" +// @generated from file video_frame.proto (package livekit.proto, syntax proto2) +/* eslint-disable */ +// @ts-nocheck + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +const { proto2 } = require("@bufbuild/protobuf"); +const { TrackSource } = require("./track_pb.js"); +const { FfiOwnedHandle } = require("./handle_pb.js"); + +/** + * @generated from enum livekit.proto.VideoCodec + */ +const VideoCodec = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const VideoRotation = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const VideoBufferType = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const VideoStreamType = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const VideoSourceType = /*@__PURE__*/ proto2.makeEnum( + "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 + */ +const NewVideoStreamRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.NewVideoStreamRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.NewVideoStreamResponse + */ +const NewVideoStreamResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.NewVideoStreamResponse", + () => [ + { no: 1, name: "stream", kind: "message", T: OwnedVideoStream, req: true }, + ], +); + +/** + * Request a video stream from a participant + * + * @generated from message livekit.proto.VideoStreamFromParticipantRequest + */ +const VideoStreamFromParticipantRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.VideoStreamFromParticipantRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.VideoStreamFromParticipantResponse + */ +const VideoStreamFromParticipantResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.VideoStreamFromParticipantResponse", + () => [ + { no: 1, name: "stream", kind: "message", T: OwnedVideoStream, req: true }, + ], +); + +/** + * Create a new VideoSource + * VideoSource is used to send video frame to a track + * + * @generated from message livekit.proto.NewVideoSourceRequest + */ +const NewVideoSourceRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.NewVideoSourceRequest", + () => [ + { no: 1, name: "type", kind: "enum", T: proto2.getEnumType(VideoSourceType), req: true }, + { no: 2, name: "resolution", kind: "message", T: VideoSourceResolution, req: true }, + ], +); + +/** + * @generated from message livekit.proto.NewVideoSourceResponse + */ +const NewVideoSourceResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.NewVideoSourceResponse", + () => [ + { no: 1, name: "source", kind: "message", T: OwnedVideoSource, req: true }, + ], +); + +/** + * Push a frame to a VideoSource + * + * @generated from message livekit.proto.CaptureVideoFrameRequest + */ +const CaptureVideoFrameRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.CaptureVideoFrameRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.CaptureVideoFrameResponse + */ +const CaptureVideoFrameResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.CaptureVideoFrameResponse", + [], +); + +/** + * @generated from message livekit.proto.VideoConvertRequest + */ +const VideoConvertRequest = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.VideoConvertRequest", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.VideoConvertResponse + */ +const VideoConvertResponse = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.VideoConvertResponse", + () => [ + { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "message" }, + { no: 2, name: "buffer", kind: "message", T: OwnedVideoBuffer, oneof: "message" }, + ], +); + +/** + * @generated from message livekit.proto.VideoResolution + */ +const VideoResolution = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.VideoResolution", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.VideoBufferInfo + */ +const VideoBufferInfo = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.VideoBufferInfo", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.VideoBufferInfo.ComponentInfo + */ +const VideoBufferInfo_ComponentInfo = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.VideoBufferInfo.ComponentInfo", + () => [ + { 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 }, + ], + {localName: "VideoBufferInfo_ComponentInfo"}, +); + +/** + * @generated from message livekit.proto.OwnedVideoBuffer + */ +const OwnedVideoBuffer = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.OwnedVideoBuffer", + () => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: VideoBufferInfo, req: true }, + ], +); + +/** + * @generated from message livekit.proto.VideoStreamInfo + */ +const VideoStreamInfo = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.VideoStreamInfo", + () => [ + { no: 1, name: "type", kind: "enum", T: proto2.getEnumType(VideoStreamType), req: true }, + ], +); + +/** + * @generated from message livekit.proto.OwnedVideoStream + */ +const OwnedVideoStream = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.OwnedVideoStream", + () => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: VideoStreamInfo, req: true }, + ], +); + +/** + * @generated from message livekit.proto.VideoStreamEvent + */ +const VideoStreamEvent = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.VideoStreamEvent", + () => [ + { 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" }, + ], +); + +/** + * @generated from message livekit.proto.VideoFrameReceived + */ +const VideoFrameReceived = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.VideoFrameReceived", + () => [ + { 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 }, + ], +); + +/** + * @generated from message livekit.proto.VideoStreamEOS + */ +const VideoStreamEOS = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.VideoStreamEOS", + [], +); + +/** + * @generated from message livekit.proto.VideoSourceResolution + */ +const VideoSourceResolution = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.VideoSourceResolution", + () => [ + { no: 1, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, + { no: 2, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true }, + ], +); + +/** + * @generated from message livekit.proto.VideoSourceInfo + */ +const VideoSourceInfo = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.VideoSourceInfo", + () => [ + { no: 1, name: "type", kind: "enum", T: proto2.getEnumType(VideoSourceType), req: true }, + ], +); + +/** + * @generated from message livekit.proto.OwnedVideoSource + */ +const OwnedVideoSource = /*@__PURE__*/ proto2.makeMessageType( + "livekit.proto.OwnedVideoSource", + () => [ + { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true }, + { no: 2, name: "info", kind: "message", T: VideoSourceInfo, req: true }, + ], +); + + +exports.VideoCodec = VideoCodec; +exports.VideoRotation = VideoRotation; +exports.VideoBufferType = VideoBufferType; +exports.VideoStreamType = VideoStreamType; +exports.VideoSourceType = VideoSourceType; +exports.NewVideoStreamRequest = NewVideoStreamRequest; +exports.NewVideoStreamResponse = NewVideoStreamResponse; +exports.VideoStreamFromParticipantRequest = VideoStreamFromParticipantRequest; +exports.VideoStreamFromParticipantResponse = VideoStreamFromParticipantResponse; +exports.NewVideoSourceRequest = NewVideoSourceRequest; +exports.NewVideoSourceResponse = NewVideoSourceResponse; +exports.CaptureVideoFrameRequest = CaptureVideoFrameRequest; +exports.CaptureVideoFrameResponse = CaptureVideoFrameResponse; +exports.VideoConvertRequest = VideoConvertRequest; +exports.VideoConvertResponse = VideoConvertResponse; +exports.VideoResolution = VideoResolution; +exports.VideoBufferInfo = VideoBufferInfo; +exports.VideoBufferInfo_ComponentInfo = VideoBufferInfo_ComponentInfo; +exports.OwnedVideoBuffer = OwnedVideoBuffer; +exports.VideoStreamInfo = VideoStreamInfo; +exports.OwnedVideoStream = OwnedVideoStream; +exports.VideoStreamEvent = VideoStreamEvent; +exports.VideoFrameReceived = VideoFrameReceived; +exports.VideoStreamEOS = VideoStreamEOS; +exports.VideoSourceResolution = VideoSourceResolution; +exports.VideoSourceInfo = VideoSourceInfo; +exports.OwnedVideoSource = OwnedVideoSource; diff --git a/livekit-ffi-node-bindings/src/index.ts b/livekit-ffi-node-bindings/src/index.ts deleted file mode 100644 index 2c583ebd6..000000000 --- a/livekit-ffi-node-bindings/src/index.ts +++ /dev/null @@ -1,20 +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. - -// SPDX-FileCopyrightText: 2024 LiveKit, Inc. -// -// SPDX-License-Identifier: Apache-2.0 - -export * from "./napi/native.js"; -export * from "./proto/index.js"; diff --git a/livekit-ffi-node-bindings/src/napi/native.cjs b/livekit-ffi-node-bindings/src/napi/native.cjs deleted file mode 100644 index 886b0145d..000000000 --- a/livekit-ffi-node-bindings/src/napi/native.cjs +++ /dev/null @@ -1,338 +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-ffi-bindings-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-ffi-bindings-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-ffi-bindings-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-ffi-bindings-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-ffi-bindings-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-ffi-bindings-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-ffi-bindings-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-ffi-bindings-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-ffi-bindings-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-ffi-bindings-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-ffi-bindings-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-ffi-bindings-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-ffi-bindings-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-ffi-bindings-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-ffi-bindings-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-ffi-bindings-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-ffi-bindings-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-ffi-bindings-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/livekit-ffi-node-bindings/src/napi/native.d.ts b/livekit-ffi-node-bindings/src/napi/native.d.ts deleted file mode 100644 index 5b130faa7..000000000 --- a/livekit-ffi-node-bindings/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/livekit-ffi-node-bindings/src/napi/native.js b/livekit-ffi-node-bindings/src/napi/native.js deleted file mode 100644 index 2b53da1ef..000000000 --- a/livekit-ffi-node-bindings/src/napi/native.js +++ /dev/null @@ -1,12 +0,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/livekit-ffi-node-bindings/src/nodejs.rs b/livekit-ffi-node-bindings/src/nodejs.rs index ec6ba4749..cad119579 100644 --- a/livekit-ffi-node-bindings/src/nodejs.rs +++ b/livekit-ffi-node-bindings/src/nodejs.rs @@ -15,10 +15,8 @@ use livekit_ffi::{proto, server, FFI_SERVER}; use napi::{ bindgen_prelude::*, - threadsafe_function::{ - ErrorStrategy, ThreadSafeCallContext, ThreadsafeFunction, ThreadsafeFunctionCallMode, - }, - JsFunction, Status, + threadsafe_function::{ThreadSafeCallContext, ThreadsafeFunction, ThreadsafeFunctionCallMode}, + Status, }; use napi_derive::napi; use prost::Message; @@ -27,12 +25,13 @@ 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| { +fn livekit_initialize(cb: Function, capture_logs: bool, sdk_version: String) { + let tsfn: ThreadsafeFunction = cb + .build_threadsafe_function::() + .build_callback(|ctx: ThreadSafeCallContext| { let data = ctx.value.encode_to_vec(); let buf = Uint8Array::new(data); - Ok(vec![buf]) + Ok(buf) }) .unwrap(); diff --git a/livekit-ffi-node-bindings/src/proto/audio_frame_pb.ts b/livekit-ffi-node-bindings/src/proto/audio_frame_pb.ts deleted file mode 100644 index f9b6be034..000000000 --- a/livekit-ffi-node-bindings/src/proto/audio_frame_pb.ts +++ /dev/null @@ -1,2276 +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; - - /** - * @generated from field: optional uint64 request_async_id = 3; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 3, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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/livekit-ffi-node-bindings/src/proto/data_stream_pb.ts b/livekit-ffi-node-bindings/src/proto/data_stream_pb.ts deleted file mode 100644 index 6e4302781..000000000 --- a/livekit-ffi-node-bindings/src/proto/data_stream_pb.ts +++ /dev/null @@ -1,2746 +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; - - /** - * @generated from field: optional uint64 request_async_id = 2; - */ - requestAsyncId?: 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 }, - { no: 2, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * @generated from field: optional uint64 request_async_id = 2; - */ - requestAsyncId?: 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 }, - { no: 2, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * @generated from field: optional uint64 request_async_id = 2; - */ - requestAsyncId?: 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: 2, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * @generated from field: optional uint64 request_async_id = 4; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 4, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * @generated from field: optional uint64 request_async_id = 4; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 4, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * @generated from field: optional uint64 request_async_id = 4; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 4, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * @generated from field: optional uint64 request_async_id = 3; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 3, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * @generated from field: optional uint64 request_async_id = 3; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 3, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * @generated from field: optional uint64 request_async_id = 3; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 3, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, 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; - - /** - * @generated from field: optional uint64 request_async_id = 3; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 3, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * @generated from field: optional uint64 request_async_id = 3; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 3, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * @generated from field: optional uint64 request_async_id = 3; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 3, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, 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/livekit-ffi-node-bindings/src/proto/e2ee_pb.ts b/livekit-ffi-node-bindings/src/proto/e2ee_pb.ts deleted file mode 100644 index 9994f3d6d..000000000 --- a/livekit-ffi-node-bindings/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/livekit-ffi-node-bindings/src/proto/index.ts b/livekit-ffi-node-bindings/src/proto/index.ts deleted file mode 100644 index 72a283812..000000000 --- a/livekit-ffi-node-bindings/src/proto/index.ts +++ /dev/null @@ -1,46 +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. - -/* - * 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. - */ - -// SPDX-FileCopyrightText: 2024 LiveKit, Inc. -// -// SPDX-License-Identifier: Apache-2.0 - -export * from './audio_frame_pb.js'; -export * from './ffi_pb.js'; -export * from './handle_pb.js'; -export * from './participant_pb.js'; -export * from './room_pb.js'; -export * from './track_pb.js'; -export * from './track_publication_pb.js'; -export * from './video_frame_pb.js'; -export * from './e2ee_pb.js'; -export * from './stats_pb.js'; -export * from './rpc_pb.js'; -export * from './data_stream_pb.js'; diff --git a/livekit-ffi-node-bindings/src/proto/room_pb.ts b/livekit-ffi-node-bindings/src/proto/room_pb.ts deleted file mode 100644 index cdd7924eb..000000000 --- a/livekit-ffi-node-bindings/src/proto/room_pb.ts +++ /dev/null @@ -1,5823 +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, ParticipantPermission } 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; - - /** - * @generated from field: optional uint64 request_async_id = 4; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 4, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * @generated from field: optional uint64 request_async_id = 2; - */ - requestAsyncId?: 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 }, - { no: 2, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * @generated from field: optional uint64 request_async_id = 4; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 4, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * @generated from field: optional uint64 request_async_id = 4; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 4, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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[] = []; - - /** - * @generated from field: optional uint64 request_async_id = 8; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 8, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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[] = []; - - /** - * @generated from field: optional uint64 request_async_id = 5; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 5, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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[] = []; - - /** - * @generated from field: optional uint64 request_async_id = 5; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 5, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * @generated from field: optional uint64 request_async_id = 3; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 3, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * @generated from field: optional uint64 request_async_id = 5; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 5, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, 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; - - /** - * @generated from field: optional uint64 request_async_id = 6; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 6, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, 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[] = []; - - /** - * @generated from field: optional uint64 request_async_id = 3; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 3, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * @generated from field: optional uint64 request_async_id = 3; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 3, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * @generated from field: optional uint64 request_async_id = 2; - */ - requestAsyncId?: 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 }, - { no: 2, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * use single peer connection for both publish/subscribe (default: false) - * - * @generated from field: optional bool single_peer_connection = 8; - */ - singlePeerConnection?: boolean; - - /** - * timeout in milliseconds for each signal connection attempt (default: 5000) - * - * @generated from field: optional uint64 connect_timeout_ms = 9; - */ - connectTimeoutMs?: bigint; - - 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 }, - { no: 8, name: "single_peer_connection", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 9, name: "connect_timeout_ms", kind: "scalar", T: 4 /* ScalarType.UINT64 */, 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.ParticipantPermissionChanged participant_permission_changed = 41; - */ - value: ParticipantPermissionChanged; - case: "participantPermissionChanged"; - } | { - /** - * @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: 41, name: "participant_permission_changed", kind: "message", T: ParticipantPermissionChanged, 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.ParticipantPermissionChanged - */ -export class ParticipantPermissionChanged extends Message { - /** - * @generated from field: required string participant_identity = 1; - */ - participantIdentity?: string; - - /** - * @generated from field: optional livekit.proto.ParticipantPermission permission = 2; - */ - permission?: ParticipantPermission; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "livekit.proto.ParticipantPermissionChanged"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, - { no: 2, name: "permission", kind: "message", T: ParticipantPermission, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantPermissionChanged { - return new ParticipantPermissionChanged().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantPermissionChanged { - return new ParticipantPermissionChanged().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ParticipantPermissionChanged { - return new ParticipantPermissionChanged().fromJsonString(jsonString, options); - } - - static equals(a: ParticipantPermissionChanged | PlainMessage | undefined, b: ParticipantPermissionChanged | PlainMessage | undefined): boolean { - return proto2.util.equals(ParticipantPermissionChanged, 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; - - /** - * @generated from field: optional uint64 request_async_id = 5; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 5, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * @generated from field: optional uint64 request_async_id = 5; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 5, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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; - - /** - * @generated from field: optional uint64 request_async_id = 5; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 5, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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/livekit-ffi-node-bindings/src/proto/rpc_pb.ts b/livekit-ffi-node-bindings/src/proto/rpc_pb.ts deleted file mode 100644 index a6d1f9c89..000000000 --- a/livekit-ffi-node-bindings/src/proto/rpc_pb.ts +++ /dev/null @@ -1,545 +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; - - /** - * @generated from field: optional uint64 request_async_id = 6; - */ - requestAsyncId?: bigint; - - 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 }, - { no: 6, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, 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/livekit-ffi-node-bindings/src/proto/stats_pb.ts b/livekit-ffi-node-bindings/src/proto/stats_pb.ts deleted file mode 100644 index 3315e83b8..000000000 --- a/livekit-ffi-node-bindings/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/livekit-ffi-node-bindings/src/proto/track_pb.ts b/livekit-ffi-node-bindings/src/proto/track_pb.ts deleted file mode 100644 index 53e85c6c1..000000000 --- a/livekit-ffi-node-bindings/src/proto/track_pb.ts +++ /dev/null @@ -1,1046 +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; - - /** - * @generated from field: optional uint64 request_async_id = 2; - */ - requestAsyncId?: 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 }, - { no: 2, name: "request_async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: 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/livekit-ffi-node-bindings/src/proto/track_publication_pb.ts b/livekit-ffi-node-bindings/src/proto/track_publication_pb.ts deleted file mode 100644 index 327ebbc91..000000000 --- a/livekit-ffi-node-bindings/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/livekit-ffi-node-bindings/src/proto/video_frame_pb.ts b/livekit-ffi-node-bindings/src/proto/video_frame_pb.ts deleted file mode 100644 index 1a051773c..000000000 --- a/livekit-ffi-node-bindings/src/proto/video_frame_pb.ts +++ /dev/null @@ -1,1242 +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; - - /** - * @generated from field: optional bool is_screencast = 3; - */ - isScreencast?: boolean; - - 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 }, - { no: 3, name: "is_screencast", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: 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/livekit-ffi-node-bindings/tsconfig.json b/livekit-ffi-node-bindings/tsconfig.json deleted file mode 100644 index b62db525e..000000000 --- a/livekit-ffi-node-bindings/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "lib": ["es2015"], - "target": "es2015" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, - "module": "node16" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, - "declaration": true, - "declarationMap": true, - "sourceMap": true, - "moduleResolution": "node16", - "strict": true /* Enable all strict type-checking options. */, - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, - "skipLibCheck": false /* Skip type checking of declaration files. */, - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, - "verbatimModuleSyntax": true, - "isolatedModules": true, - "noUncheckedIndexedAccess": true, - "outDir": "dist", - "declarationDir": "dist" - }, - "include": ["src/**/*.ts"], - "exclude": ["src/**/*.test.ts", "tsup.config.ts"] -} diff --git a/livekit-ffi-node-bindings/tsup.config.ts b/livekit-ffi-node-bindings/tsup.config.ts deleted file mode 100644 index f493e641e..000000000 --- a/livekit-ffi-node-bindings/tsup.config.ts +++ /dev/null @@ -1,60 +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. - -import type { Options } from "tsup"; - -const defaultOptions: Options = { - entry: ["src/**/*.ts", "!src/**/*.test.ts"], - format: ["cjs", "esm"], - splitting: false, - sourcemap: true, - dts: true, - clean: true, - bundle: false, - target: "node16", - external: [/\.\/.*\.cjs/, /\.\/.*.node/], - esbuildOptions: (options, context) => { - if (context.format === "esm") { - options.packages = "external"; - } - }, - plugins: [ - { - // https://github.com/egoist/tsup/issues/953#issuecomment-2294998890 - // ensuring that all local requires/imports in `.cjs` files import from `.cjs` files. - // require('./path') → require('./path.cjs') in `.cjs` files - // require('../path') → require('../path.cjs') in `.cjs` files - // from './path' → from './path.cjs' in `.cjs` files - // from '../path' → from '../path.cjs' in `.cjs` files - name: "fix-cjs-imports", - renderChunk(code) { - if (this.format === "cjs") { - const regexCjs = - /require\((?['"])(?\.[^'"]+)\.js['"]\)/g; - const regexDynamic = - /import\((?['"])(?\.[^'"]+)\.js['"]\)/g; - const regexEsm = - /from(?[\s]*)(?['"])(?\.[^'"]+)\.js['"]/g; - return { - code: code - .replace(regexCjs, "require($$.cjs$)") - .replace(regexDynamic, "import($$.cjs$)") - .replace(regexEsm, "from$$$.cjs$"), - }; - } - }, - }, - ], -}; -export default defaultOptions;