Open henbos opened 1 year ago
Note that when failing to change a codec with setParameters (other proposal), we already know what to do which is to reject the promise and revert to doing whatever you did before setParameters. But the missing piece is what to do when errors happen later, on the fly, or when relying on SDP list and not using setParameters for codec selection
In WebCodecs, we have both output and error callbacks which are set when the encoder/decoder is initialized.
Comment from Virtual Interim:
This issue was discussed in WebRTC January 2023 meeting – 17 January 2023 (Issue #127: How to deal with encoder errors? 🎞︎)
See this discussion, but the spec does not say what to do with encoder errors, and an implementation detail of libwebrtc appears to be to fallback on other codecs in the list of negotiated codecs.
If we can't think of a sensible default behavior, we may consider setting active=false and then notifying the app via a callback.