← Back to release summary

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

Ecosystem

Explainers: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/RTCRtpReceiverDecoderFallback/explainer.md

View on chromestatus.com