chore: update @livekit/rtc-ffi-bindings to v0.12.68#688
Conversation
Updates FFI bindings to include: - Add MaintainFramerateAndResolution to DegradationPreference enum (aligns with WebRTC M144) - DISABLED is deprecated, use MAINTAIN_FRAMERATE_AND_RESOLUTION instead Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Add a DegradationPreference enum that matches the Rust API: - Balanced: Balance between framerate and resolution degradation - MaintainFramerate: Degrade framerate to maintain resolution - MaintainResolution: Degrade resolution to maintain framerate - MaintainFramerateAndResolution: Maintain both, drop frames before encoding The deprecated 'Disabled' value is intentionally excluded since it has been removed from WebRTC M144 and replaced with MaintainFramerateAndResolution. Also updates @livekit/rtc-ffi-bindings to v0.12.68. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
be4a42b to
f0fc8d8
Compare
| * Maintain both framerate and resolution. Frames may be dropped before encoding | ||
| * if necessary to avoid overusing network and encoder resources. | ||
| */ | ||
| MaintainFramerateAndResolution = 4, |
There was a problem hiding this comment.
🚩 DegradationPreference enum value 4 skips value 3 — intentional but worth confirming
The DegradationPreference enum assigns values 0, 1, 2, 4 — skipping 3 (packages/livekit-rtc/src/types.ts:17-26). In WebRTC's libwebrtc, value 3 is typically DISABLED. The skip to 4 for MaintainFramerateAndResolution likely aligns with a newer LiveKit-specific proto definition (the FFI bindings were bumped from 0.12.60 to 0.12.68 in this PR). Since the FFI bindings aren't available for inspection in the repo itself, it's worth confirming that value 4 matches the proto/FFI definition exactly.
Was this helpful? React with 👍 or 👎 to provide feedback.
The docstrings for MaintainFramerate and MaintainResolution were swapped. Per the W3C WebRTC spec: - MaintainFramerate: Degrade resolution to maintain framerate (prioritize smooth motion) - MaintainResolution: Degrade framerate to maintain resolution (prioritize image clarity) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
| IceTransportType, | ||
| TrackPublishOptions, | ||
| } from '@livekit/rtc-ffi-bindings'; | ||
| export { DegradationPreference } from './types.js'; |
There was a problem hiding this comment.
🚩 New enum defined locally rather than re-exported from ffi-bindings
Most enums in the public API (e.g., TrackKind, TrackSource, ConnectionQuality) are re-exported from @livekit/rtc-ffi-bindings (packages/livekit-rtc/src/index.ts:17-39), but DegradationPreference is defined locally in types.ts and exported from there. This is a deliberate pattern choice — possibly because the ffi-bindings don't expose this enum, or because the SDK wants to present a simplified subset. Worth confirming this is intentional, as a locally-defined enum could drift out of sync with the underlying bindings if the protobuf definition changes.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Updates @livekit/rtc-ffi-bindings to v0.12.68.
Changes
MaintainFramerateAndResolutiontoDegradationPreferenceenum (aligns with WebRTC M144)DISABLEDis deprecated, useMAINTAIN_FRAMERATE_AND_RESOLUTIONinstead🤖 Generated with Claude Code