v144 · webrtc

RTCDegradationPreference enum value "maintain-framerate-and-resolution"

"maintain-framerate-and-resolution" disables WebRTC's internal video adaptation. This enables the application to implement its own adaptation logic and prevents interference from the internal adaptation. From https://www.w3.org/TR/mst-content-hint/#dom-rtcdegradationpreference-maintain-framerate-and-resolution: Maintain framerate and resolution regardl

concepts

  1. Send Mode

    A new RTCDegradationPreference value that tells WebRTC to keep both framerate AND resolution when downscaling under pressure, sacrificing encoding quality instead.

  2. Call Quality Compare

    All four degradationPreference values, with the use-case trade-off the WG documented, plus a setParameters() probe against your camera.

  3. Custom Adaptor

    Switch off the internal adapter and run your own. Drag the bandwidth slider, pick a strategy — maintain-framerate, maintain-resolution, balanced, or freeze-low — and see what gets sacrificed.

  4. Network Simulator

    Run a 6-step bandwidth simulation (100% → 50% → 25% → 10% → 50% → 100%) with your chosen degradation preference and watch an animated timeline show what the encoder sacrifices at each step.

why it shipped

WebRTC has an internal video adaptation mechanism that optimizes video quality and performance by adjusting encoding settings. This mechanism relies on hardcoded logic and thresholds, which may not yield optimal results across diverse use cases. Application may benefit from implementing and using its own, external adaptation. For the external adaptation to work properly, the internal one needs to be disabled. "maintain-framerate-and-resolution" allows to disable the WebRTC's internal adaptation.

references