Re: Configuring codecs

A few questions:

1.  This will work with createAnswer, correct?

2.  Does this applies to all RtpSenders?   What if the app wants different
codecs for different RtpSenders?

3.  If {codecs: ...} is not provided in a subsequent createOffer, does it
use the last given value or revert to the default?

4.  Did you consider put {codecs: ...} on addTransceiver or addTrack?  It
might make sense there as a per-RtpSender option that is set once rather
than for each call to createOffer.  On the other hand, it's not as easy to
use that for controlling what happens in createAnswer.

On Mon, Oct 12, 2015 at 3:08 PM, Martin Thomson <>

> We now have a tool for configuring the codecs that we use once they
> are negotiated.  However, we don't have a way to guide the negotiation
> part.  Until:
> Now, all you need to do is acquire some capabilities...
> var codecs = RTCRtpSender.getCapabilities().codecs;
> ...filter and reorder...
> codecs = codecs.filter(isCodecGood);
> codecs.sort(whichCodecIsBetter);
> ...and then
> pc.createOffer({codecs: codecs})
>   .then(profit)

Received on Tuesday, 13 October 2015 05:05:13 UTC