Configuring codecs

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:

   https://github.com/w3c/webrtc-pc/pull/326

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 Monday, 12 October 2015 22:09:06 UTC