Skip to content

feat: add MaintainFramerateAndResolution to DegradationPreference enum - #1200

Merged
xianshijing-lk merged 2 commits into
mainfrom
sxian/update-degradation-preference-enum
Jun 30, 2026
Merged

feat: add MaintainFramerateAndResolution to DegradationPreference enum#1200
xianshijing-lk merged 2 commits into
mainfrom
sxian/update-degradation-preference-enum

Conversation

@xianshijing-lk

Copy link
Copy Markdown
Contributor

Summary

Aligns the DegradationPreference enum with WebRTC M144 changes:

  • Add MAINTAIN_FRAMERATE_AND_RESOLUTION as the new recommended value
  • Deprecate DISABLED (maps to MAINTAIN_FRAMERATE_AND_RESOLUTION for backwards compatibility)

Reference: https://github.com/webrtc-sdk/webrtc/blob/m144_release/api/rtp_parameters.h#L125

Changes

  • room.proto: Add DEGRADATION_PREFERENCE_MAINTAIN_FRAMERATE_AND_RESOLUTION enum value
  • webrtc-sys: Rename Disabled to MaintainFramerateAndResolution in the repr(i32) enum
  • libwebrtc: Add MaintainFramerateAndResolution variant, deprecate Disabled as a const alias
  • livekit-ffi: Update conversion to handle both old DISABLED and new MAINTAIN_FRAMERATE_AND_RESOLUTION proto values

Backwards Compatibility

  • Existing code using DISABLED will continue to work (mapped to MaintainFramerateAndResolution)
  • FFI clients can use either value, both map to the same internal behavior

Test plan

  • cargo build -p livekit-ffi passes
  • cargo build -p livekit passes
  • cargo test -p livekit --lib -- degradation passes

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Changeset

The following package versions will be affected by this PR:

Package Bump
libwebrtc minor
livekit minor
livekit-ffi minor
webrtc-sys minor

@github-actions
github-actions Bot requested review from 1egoman and lukasIO as code owners June 30, 2026 03:20
Aligns the DegradationPreference enum with WebRTC M144 changes:
- Add MAINTAIN_FRAMERATE_AND_RESOLUTION as the new recommended value
- Deprecate DISABLED (maps to MAINTAIN_FRAMERATE_AND_RESOLUTION for backwards compatibility)

Changes:
- room.proto: Add DEGRADATION_PREFERENCE_MAINTAIN_FRAMERATE_AND_RESOLUTION
- webrtc-sys: Rename Disabled to MaintainFramerateAndResolution in enum
- libwebrtc: Add MaintainFramerateAndResolution variant, deprecate Disabled as const alias
- livekit-ffi: Update conversion to handle both old and new proto values

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@xianshijing-lk
xianshijing-lk force-pushed the sxian/update-degradation-preference-enum branch from ffef361 to 3271ab9 Compare June 30, 2026 03:21
@xianshijing-lk
xianshijing-lk merged commit db712fa into main Jun 30, 2026
5 checks passed
@xianshijing-lk
xianshijing-lk deleted the sxian/update-degradation-preference-enum branch June 30, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants