How to access jitsi-meet API inside of dev environment?

I’m trying to determine if it’s possible to access the Jitsi Meet API inside of my React app. I’ve trying importing it after including the entire Jitsi repo as a folder inside my project, since the external_api.js has a lot of dependencies inside the repo, multiple levels up, but this doesn’t work.

I can’t actually see any of the methods inside VS Code, for example.

The bigger problem is that I can’t use any of of the methods inside React without being able to import the library somehow.

Suggestions?

The external API is designed to be dynamically loaded from your deployment, either by using a script tag or something like load-script2.

The reason for this is that Jitsi Meet is composed of a number of moving parts, so you should use the external API implementation that matches your backend.

That said, we take backwards compatibility seriously, so you shouldn’r run into problems due to API breakage.

You are welcome to use https://meet.jit.si/external_api.js for development.

Cheers,

@saghul I think you was not on the last community call and we were discussing this and as we were not able to come to an agreement or something we said we will continue here.
So we already have said what you posted.

I was thinking on the subject. Is it possible to create a dummy package (automated) that covers the API and that to be used just as dev dependency for development and in release the script will be used, is this possible at all? And that dummy thing can be published …
WDYT?

Oh, sorry about that!

Not only I like it, but I already did that in the past! https://github.com/saghul/jitsi-meet-api I’d be more than happy to do something similar!

At a quick glance this seems like it might suit the need. It would be trivial to turn this into an NPM package, but if not, if it can be called inside my app so that I can interact with it inside React that would be a massive improvement.

The original idea was to turn it into an npm package indeed. When I proposed this almost 3 years ago it was met with mixed feelings so it got shelved, but looks like now might be the time to do something about it.

1 Like