Overriding features without change in sources

Is there a way to ovverride features present in /etc/usr/share/jitsi-meet/interface_config.js without needing to edit it at every update?

I think that being forced to make our own customizations at every upgrade is a bad behaviour, because someone could make a forced swap with his old file, creating potential unwanted bugs (imagine if there’s a new parameter and you overwrite the file with an old custom one where that parameter isn’t present.

Thanks in advance

1 Like

Err…I’m afraid to post this abomination, but here is what I have in my config.js (yes, really and it even works)

document.addEventListener(‘DOMContentLoaded’, function() {
interfaceConfig.GENERATE_ROOMNAMES_ON_WELCOME_PAGE = false;
}, false);

I’m unsure if this is really better since I have no clue how Jitsi (or jitsi debian packaging) manages config.js changes when upgrading. I have already done several upgrades with that (Jitsi debian ‘stable’ packages change fast these days) without a problem, but this proves nothing. I have not searched but I would be surprised if it was documented.
Also I have not tested with any other changes to interface_config.js. Absolutely no warranty.

Ok @gpatel-fr , where did you put that string?
Did you made a different file or what? Could you explain a bit further the steps to do it?

document.addEventListener(‘DOMContentLoaded’, function() {
interfaceConfig.GENERATE_ROOMNAMES_ON_WELCOME_PAGE = false;
}, false);

var config = {
// Connection
//

to explain a bit, I noticed in the debug browser console that config;js and interface_config.js where loaded in the index.html file, in this order. So the Javascript snippet is waiting for the document to be fully loaded and then patch the interface_config.

I still don’t understand where you put those strings.

at the beginning of the yoursite-config.js file before the var config = line.

I agree with you and I am looking for a solution. Dears Jitis Devs, please look to this.

For example I want to override the:

  • DISABLE_VIDEO_BACKGROUND: false,
  • DISPLAY_WELCOME_PAGE_CONTENT: true,

Ok, so following your sample I should change the file:

/etc/jitsi/meet/mydoimain.ext-config.js

I’d need to put in line 2, before var config = { that’s on line 3

document.addEventListener(‘DOMContentLoaded’, function() {
interfaceConfig.DISABLE_VIDEO_BACKGROUND: true;
DISPLAY_WELCOME_PAGE_CONTENT: false;
}, false);

Doing this I should had set DISABLE_VIDEO_BACKGROUD to true and DISPLAY_WELCOME_PAGE_CONTENT to false
Is this right?

as I said I have not tested anything else that what I have shown…
Anyway, yes and no, the interfaceConfig. prefix should be set for every option, so I’d expect the first line to be used, not the second.

document.addEventListener(‘DOMContentLoaded’, function() {
interfaceConfig.DISABLE_VIDEO_BACKGROUND: true;
interfaceConfig.DISPLAY_WELCOME_PAGE_CONTENT: false;
}, false);

Seems correct now?

well how about trying it :slight_smile:

right, I’ll try it

Move your /usr/share/jitsi-meet/interface_config.js
to: /etc/jitsi/meet/interface_config.[your.domain.com].js

Edit /etc/nginx/sites-available/[your.domain.com].conf

Add a new location for this file:

	location = /interface_config.js {
        alias /etc/jitsi/meet/interface_config.[your.domain.com].js;
    }

service nginx restart

Your site will be served from the new file and not overwritten after upgrade.

(Apache2 will have similar functionality but that’s to you to research :smirk:)

MIND: When new required fields get introduced in this file, the site will break, but this is not very likely to happen soon (I think)…

That’s why it isn’t an affordable solution at all and I need to override them on the go.
Doing this is the same as copy paste the file edited before upgrade :laughing: