RTCRtpReceiver Decoder State Changed and Error Events
- Category
- WebRTC
- Type
- New or changed feature
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
Summary
Adds decoderstatechange and decodererror events to RTCRtpReceiver so applications can detect runtime decoder changes and terminal decoding failures. decoderstatechange reports when the codec or decoder implementation changes, while decodererror reports an unrecoverable failure as an EncodingError. These events let applications adapt playback, inform users, and diagnose problems without repeatedly polling statistics.
Motivation
WebRTC applications cannot directly observe codec changes or terminal decoder failures as they occur. Developers must poll getStats() and infer failures from indirect signals, which produces unreliable heuristics and can create compatibility problems. When hardware decoding fails and no software decoder is available, as can occur with H.265, playback stops and only the application can ask the remote endpoint to send a different codec. Event-driven notifications let applications recover promptly by renegotiating codecs or adjusting playback, inform users, and diagnose changes that can affect latency, quality, and power consumption.
Standards & signals
- Specification: https://github.com/w3c/webrtc-extensions/pull/261
- Firefox: No signal
- Safari: No signal
- Web developers: No signals
- Tracking bug: https://issues.chromium.org/issues/546181655
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=rtcrtpreceiver-decoder-state-changed-and-error-events
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+RTCRtpReceiver%20Decoder%20State%20Changed%20and%20Error%20Events
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=RTCRtpReceiver%20Decoder%20State%20Changed%20and%20Error%20Events
- Baseline status: https://webstatus.dev/?q=RTCRtpReceiver%20Decoder%20State%20Changed%20and%20Error%20Events
Explainers: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/RTCRtpReceiverDecoderFallback/explainer.md