0

I want to edit the Microphone signal used by BigBlueButton conference and disable the Automatic Gain Control and Echo Cancelling.

However, I don't have information about the MediaStream instance used in the conference page. So, first issue is whether it is possible to find such active stream on the page? to later apply constraints to it. There is this question that says it is not possible to find active streams. But time has past and maybe options have changed. Plus, there might some other ways to get to this stream object.

Other than that, maybe there is a possibility to change the browsers' own flags for these AGC or AEC from a JS script or extension? (and not from the browser itself)

In a more specific detail of this issue: inside the BBB distribution I have looked for the js files ( sip.js and bbb_webrtc_bridge_sip.js) that use the getUserMedia method and I have edited them to give it the desired constraints, but to no avail. If someone knows about this specific platform I would like to ask for your help.

Note: In the mentioned page, there is an audio object that proves a srcObject which resolves to a MediaStream, I can access this and apply limited actions to it, but only in the echo test. Once past this test and inside the actual conference, access to this audio object has no effect.

Roberto Becerra
  • 111
  • 1
  • 6

1 Answers1

2

Solution turned out to not access the MediaStream from a new JS script or extension but, in as in the specifics of the issue: from inside BigBlueButton JS files:

sip.js and bbb_wertc_bridge_sip.js files mentioned above belonged to the flash client, now out of use favouring the html5 client, so the right file to edit was:

/usr/share/meteor/bundle/programs/web.browser/app/compatibility/sip.js

and so what I did was to look for the instances of constraints or where the media stream is created, and inserted custom constraints and forced them in:

line 11941->. mediaHint = Object.keys(mediaHint || {}).length ? mediaHint : this.mediaHint;

replaced with-> mediaHint = this.mediaHint to force the entry into the following condition that creates a new stream with my own constraints in:

line 11956->

var constraints = mediaHint.constraints ||
(this.mediaHint && this.mediaHint.constraints) ||
{audio: true, video: true};

inserted my own constraints:

var constraints = {
                   audio: {
                          autoGainControl: false,
                          echoCancellation: false,
                          noiseSuppression: false,
                   },
                   video:false
};

This works and now these constraints disable AGC, AEC and NS.

Roberto Becerra
  • 111
  • 1
  • 6