Is there a way to choose codecs in WebRTC PeerConnection?
问题 Hey I would like to know if there is any way to choose codecs when creating the offer/answer in WebRTC. There are currently not many video codecs to choose from, but there are audio codecs like Opus, PCMU, PCMA etc. 回答1: In general, yes. Here is example of how to prefer Opus codec during establishing conneciton. You should call 'preferOpus' from a callback function for createAnswer or createOffer. var preferOpus = function(sdp) { var sdpLines = sdp.split('\r\n'); for (var i = 0; i < sdpLines