Enable HD Audio Dynamically

In this topic they discuss enabling HD Audio by settings values in config.js

We need to set HD Audio based upon a user setting so setting it in a config file won’t work. We need to set it dynamically.

I already tried adding

audioQuality: {
    stereo: true,
    opusMaxAverageBitrate: 510000 // Value to fit the 6000 to 510000 range.
}

to the connection options but it doesn’t seem to trigger the SDP munging in

TraceablePeerConnection.prototype.setRemoteDescription

I already added the HQ Audio constraints when creating the tracks. Is there a way that I can set those audio settings through lib-jitsi-meet? Or somehow trigger the SDP munging in the function _mungeOpus(description)

When you’re using lib-jitsi-meet there are three places config settings get passed: the JitsiConnection constructor, JitsiConnection.initJitsiConference(), and JitsiMeetJS.createLocalTracks().

jitsi-meet takes settings from config.js and, depending on their purpose, passes them (occasionally under a different name!) to one of these three functions.

I think audioQuality needs to be passed to initJitsiConference().

That did it! Thank you!