Currently libnice does not seem to select candidates based on their "goodness" but just seems to take whatever comes first. IIRC the RFC defines a rating algorithm which should be implemented, e.g. local network candidates should be preferred over indirect ones, etc.
This should already happen. Each candidate has a different priority. When creating candidate pairs (matching a local and a remote candidate), the pair's priority is the product of the priorities of the local and remote candidates. The highest priority pair is then selected. So it should prefer the "best" candidate that works. Or do you mean something else ?
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.