Problème understanding configuration overriding

Hi,

First message here so let me first thank you for Jitsi being open source. This is amazing.

But althought I am starting to get a propper grasp of the ways things work (on the client side) I have been scratiching my head the past few days trying to figure out how configuration works.

The way I figured things out, looking at the code, in the case of the iframe API:

The configOverwrite parameter of the configuration object passed as a second parameter to the JitsiMeetExternalAPI constructor is URL encoded in the url of the iframe.

Then, in the Jitsi index page loaded in the iframe, a config object is set globaly by importing the config.js scrypt.

Then the jitsi-meet library takes the parameters of configOverwrite that it took from the URL and, if they are whitelisted, overrides the matching parameters in the config global object.

Same for interfaceConfig and loggingConfig.

And then the client starts running and the different configuration are used.

I’ve seen all of this in the code.
And in react/features/base/config/functions.any.js, in the overrideConfigJSON, I logged and inspected the configuration objects the parameters are properly overriden.

Yet, once I launch a room, the configuration do not seem impacted…

Let me take a simple example, with disableReactions:

If I set it in my config.js, it works.
true => I have reactions enabled, false => I don’t.
Fine.

But whatever I pass in the config to JitsiMeetExternalAPI, it doesn’t matter.
I see it overriden after overrideConfigJSON has been called, but once I check a place it is supposed to be used, in react/features/reactions/functions.any.ts then I get:

export function isReactionsEnabled(state: any): boolean {
    const { disableReactions } = state['features/base/config'];
    console.warn( "disableReactions:", disableReactions ); // => same as config.js, not configOverride
    [ ... ]
}

I really don’t understand why…
Maybe it’s a reat thing I do not understand?
Please help me understand.

Thanks alot.

Hello and welcome to our community!

Your understanding is correct.

Can you share the ode snippet you are using to set the config options with the iframe API? Also, do you see somrthing to the tune of “overriding config with {…}” in the logs?

Hi Saghul and thank you for answering.

So, I was trying to change the config to its minimum with disableReactions set to illustrate… and it worked as expected.

Which drove down some more into madness…

But I figured the issue was a conflict with another parameter and tried commenting them one by one.

As it turns out the issue was with “enableWelcomePage”.

Does using the welcome page for some reason overrides the configuration mechanics?

For now I don’t need it, so I can just disable it, but I’d like to undertsand.

Thanks.

I don’t think that option should have any specific effect. If you are using your own deployment and modified config.js, any chance you made a JS syntax error and thus the whole file wasn’t processed?