Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/gen-node-proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
paths:
- livekit-ffi/**
- livekit-ffi-node-bindings/**
- Cargo.lock
- Cargo.toml
- .github/**
workflow_dispatch:
workflow_call:

Expand All @@ -24,16 +27,14 @@ jobs:
generate_protobuf:
runs-on: ubuntu-latest
name: Generating protobuf
if: github.event_name == 'pull_request'

defaults:
run:
working-directory: ${{ env.PACKAGE_DIR }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
ref: ${{ github.event.pull_request.head.ref }}
ref: ${{ github.event.pull_request.head.ref || github.ref }}

- name: Install Protoc
uses: arduino/setup-protoc@v3
Expand All @@ -60,6 +61,6 @@ jobs:
- name: Add changes
uses: EndBug/add-and-commit@v9
with:
add: '["livekit-ffi-node-bindings/src/proto"]'
add: '["livekit-ffi-node-bindings/proto"]'
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong path was configured here effectively skipping protobuf generation

default_author: github_actions
message: generated protobuf
2 changes: 1 addition & 1 deletion .github/workflows/node-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
cp /tmp/protoc /usr/local/bin/protoc
chmod +x /usr/local/bin/protoc

yum install -y openssl-devel libX11-devel mesa-libGL-devel libXext-devel libva-devel libdrm-devel clang clang-devel
yum install -y openssl-devel libX11-devel mesa-libGL-devel libXext-devel libva-devel libdrm-devel clang clang-devel lld
yum install -y gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-libstdc++-devel libstdc++-devel
source /opt/rh/gcc-toolset-12/enable
gcc --version
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ jobs:

- uses: dtolnay/rust-toolchain@stable

- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@113a77a4ce971c41332f2129c3d995df993cf746 # v1.17.8

- name: Install cargo-release
run: cargo install cargo-release
run: cargo binstall cargo-release@1.1.2 --no-confirm

- name: Publish to crates.io
run: cargo release publish --workspace --no-confirm --no-verify ${{ inputs.dry_run != true && '--execute' || '' }}
Expand Down
20 changes: 20 additions & 0 deletions livekit-ffi-node-bindings/proto/audio_frame_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,16 @@ export declare class NewAudioStreamRequest extends Message<NewAudioStreamRequest
*/
frameSizeMs?: number;

/**
* Maximum number of queued WebRTC sink frames. Each frame is typically 10 ms
* of decoded PCM audio on the receive path. Omit this field to use the
* default bounded queue size of 10 frames. Set it to 0 to request unbounded
* buffering.
*
* @generated from field: optional uint32 queue_size_frames = 8;
*/
queueSizeFrames?: number;

constructor(data?: PartialMessage<NewAudioStreamRequest>);

static readonly runtime: typeof proto2;
Expand Down Expand Up @@ -268,6 +278,16 @@ export declare class AudioStreamFromParticipantRequest extends Message<AudioStre
*/
frameSizeMs?: number;

/**
* Maximum number of queued WebRTC sink frames. Each frame is typically 10 ms
* of decoded PCM audio on the receive path. Omit this field to use the
* default bounded queue size of 10 frames. Set it to 0 to request unbounded
* buffering.
*
* @generated from field: optional uint32 queue_size_frames = 10;
*/
queueSizeFrames?: number;

constructor(data?: PartialMessage<AudioStreamFromParticipantRequest>);

static readonly runtime: typeof proto2;
Expand Down
2 changes: 2 additions & 0 deletions livekit-ffi-node-bindings/proto/audio_frame_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ const NewAudioStreamRequest = /*@__PURE__*/ proto2.makeMessageType(
{ 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 },
{ no: 8, name: "queue_size_frames", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
],
);

Expand Down Expand Up @@ -128,6 +129,7 @@ const AudioStreamFromParticipantRequest = /*@__PURE__*/ proto2.makeMessageType(
{ 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 },
{ no: 10, name: "queue_size_frames", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
],
);

Expand Down
25 changes: 25 additions & 0 deletions livekit-ffi-node-bindings/proto/e2ee_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ export declare enum EncryptionType {
CUSTOM = 2,
}

/**
* @generated from enum livekit.proto.KeyDerivationFunction
*/
export declare enum KeyDerivationFunction {
/**
* @generated from enum value: PBKDF2 = 0;
*/
PBKDF2 = 0,

/**
* @generated from enum value: HKDF = 1;
*/
HKDF = 1,
}

/**
* @generated from enum livekit.proto.EncryptionState
*/
Expand Down Expand Up @@ -147,6 +162,16 @@ export declare class KeyProviderOptions extends Message<KeyProviderOptions> {
*/
failureTolerance?: number;

/**
* @generated from field: required int32 key_ring_size = 5;
*/
keyRingSize?: number;

/**
* @generated from field: required livekit.proto.KeyDerivationFunction key_derivation_function = 6;
*/
keyDerivationFunction?: KeyDerivationFunction;

constructor(data?: PartialMessage<KeyProviderOptions>);

static readonly runtime: typeof proto2;
Expand Down
14 changes: 14 additions & 0 deletions livekit-ffi-node-bindings/proto/e2ee_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ const EncryptionType = /*@__PURE__*/ proto2.makeEnum(
],
);

/**
* @generated from enum livekit.proto.KeyDerivationFunction
*/
const KeyDerivationFunction = /*@__PURE__*/ proto2.makeEnum(
"livekit.proto.KeyDerivationFunction",
[
{no: 0, name: "PBKDF2"},
{no: 1, name: "HKDF"},
],
);

/**
* @generated from enum livekit.proto.EncryptionState
*/
Expand Down Expand Up @@ -73,6 +84,8 @@ const KeyProviderOptions = /*@__PURE__*/ proto2.makeMessageType(
{ 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 },
{ no: 5, name: "key_ring_size", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true },
{ no: 6, name: "key_derivation_function", kind: "enum", T: proto2.getEnumType(KeyDerivationFunction), req: true },
],
);

Expand Down Expand Up @@ -325,6 +338,7 @@ const E2eeResponse = /*@__PURE__*/ proto2.makeMessageType(


exports.EncryptionType = EncryptionType;
exports.KeyDerivationFunction = KeyDerivationFunction;
exports.EncryptionState = EncryptionState;
exports.FrameCryptor = FrameCryptor;
exports.KeyProviderOptions = KeyProviderOptions;
Expand Down
5 changes: 5 additions & 0 deletions livekit-ffi-node-bindings/proto/participant_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ export declare enum DisconnectReason {
* @generated from enum value: MEDIA_FAILURE = 15;
*/
MEDIA_FAILURE = 15,

/**
* @generated from enum value: AGENT_ERROR = 16;
*/
AGENT_ERROR = 16,
}

/**
Expand Down
1 change: 1 addition & 0 deletions livekit-ffi-node-bindings/proto/participant_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const DisconnectReason = /*@__PURE__*/ proto2.makeEnum(
{no: 13, name: "SIP_TRUNK_FAILURE"},
{no: 14, name: "CONNECTION_TIMEOUT"},
{no: 15, name: "MEDIA_FAILURE"},
{no: 16, name: "AGENT_ERROR"},
],
);

Expand Down
19 changes: 19 additions & 0 deletions livekit-ffi-node-bindings/proto/room_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,11 @@ export declare class DisconnectRequest extends Message<DisconnectRequest> {
*/
requestAsyncId?: bigint;

/**
* @generated from field: optional livekit.proto.DisconnectReason reason = 3;
*/
reason?: DisconnectReason;

constructor(data?: PartialMessage<DisconnectRequest>);

static readonly runtime: typeof proto2;
Expand Down Expand Up @@ -1744,6 +1749,20 @@ export declare class RoomOptions extends Message<RoomOptions> {
*/
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<RoomOptions>);

static readonly runtime: typeof proto2;
Expand Down
3 changes: 3 additions & 0 deletions livekit-ffi-node-bindings/proto/room_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ const DisconnectRequest = /*@__PURE__*/ proto2.makeMessageType(
() => [
{ 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 },
{ no: 3, name: "reason", kind: "enum", T: proto2.getEnumType(DisconnectReason), opt: true },
],
);

Expand Down Expand Up @@ -679,6 +680,8 @@ const RoomOptions = /*@__PURE__*/ proto2.makeMessageType(
{ 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 },
],
);

Expand Down
7 changes: 6 additions & 1 deletion livekit-ffi-node-bindings/proto/video_frame_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,17 @@ export declare class NewVideoSourceRequest extends Message<NewVideoSourceRequest

/**
* Used to determine which encodings to use + simulcast layers
* Most of the time it corresponds to the source resolution
* 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<NewVideoSourceRequest>);

static readonly runtime: typeof proto2;
Expand Down
1 change: 1 addition & 0 deletions livekit-ffi-node-bindings/proto/video_frame_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ const NewVideoSourceRequest = /*@__PURE__*/ proto2.makeMessageType(
() => [
{ 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 },
],
);

Expand Down
Loading