@henbos setCodecPreferences() is used to modify the codecs and order provided by createOffer() and createAnswer(). Since this only affects the potential result of the negotiation, O/A is required for those preferences to influence the codecs in use. In contrast, setParameters() can be used to immediately change the sending codec within the set that the Offerer and Answerer have in common.
By "picking the first codec" I think you mean that the Answerer will send using the first codec in its list. However, since RFC 3264 allows the Answerer to send using any codec in its list, it is legal to call setParameters() to change the sending codec without having to do another O/A negotiation.
--
GitHub Notification of comment by aboba
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2009#issuecomment-431414915 using your GitHub account