W3C home > Mailing lists > Public > public-webrtc@w3.org > October 2015

Configuring codecs

From: Martin Thomson <martin.thomson@gmail.com>
Date: Mon, 12 Oct 2015 15:08:39 -0700
Message-ID: <CABkgnnW4P89LZMp2JoEB=YvrH+7sKrG+YbO3_5CcYmiWD-ZR+Q@mail.gmail.com>
To: "public-webrtc@w3.org" <public-webrtc@w3.org>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:18:09 UTC