How to customize existing code without requiring a lot of changes?


I am looking at different approaches on how we can customize existing code.
Here’s a scenario, where i had to customize end meeting functionality.

I have a requirement to customize the hangup functionality. I want to override the existing functionality in runtime.
I can see, that I can access the hangup functionality in global scope via APP.conference.hangup.
How can I safely override this functionality?
I have looked at Monkey patching, but not sure of the impact.
Appreciate your suggestions / ideas on this.

Thank you.

My suggestion about modifying the code: don’t.

There are lots of example of modifying Jtisi-meet code, the problem is not of writing the code, it’s of maintaining it to stay compatible with the changes in the open source version.
If you don’t maintain it, at some point your modified version will lack important changes or worse security fixes that will be available for free in the open source version. The problem is that you can’t safely override a functionality, the Jitsi-meet Js code has no plugin capability.

So unless you have lots of (human) resources, don’t try to change the Jitsi-meet Javascript code.

Customize with the Jitsi-meet web api, write additional code where there are the possibility of writing plugins (Prosody lua code for example), or use external code connecting to Jitsi-meet through a REST api.

If you absolutely need changes in the JS code, consider to submit them to the open source project if they are of general use, this will solve the maintenance problem.

1 Like