Coding a Jitsi Meet KaiOS client

Hello there and thanks for coding and also hosting such a great project!
I’m trying to code a Jitsi Meet KaiOS client. So I have a few questions and I need some hints…

  1. Where is the protocol documented?
  2. KaiOS is a web OS but also supports UDP sockets and I’ve read here that “if the client can use udp, it likely can connect to jvb too”. So what does it mean? I can write a client which uses UDP sockets and join a Jitsi meeting? Is it better to use UDP?
  3. For NPM projects, which lib-jitsi-meet on npmjs.com should I use if I wish to do that and go that way?
  4. I’ve written something using @lyno/lib-jitsi-meet and here’s the source code using InfernoJS. You can join potatoishere(on meet.jit.si) meeting with Firefox 48 which current KaiOS versions are based on(KaiOS 3.0 will be based on latest version of Firefox) and listen to the conversation in the meeting, when I test it on a real KaiOS device I never get JitsiMeetJS.events.conference.TRACK_ADDED and thus no sound. Even through it joins the conference and can do other stuff such as reading chat and sending text messages. The logs are here. Why my web client would never receive such an event?

Thank you in advance.

When you have a situation like that where it seems like chat works but audio and video don’t, it’s often because of problems with UDP/10000 connectivity. Make sure port 10000/UDP is actually open and properly forwarded if you’re behind a NAT. Make sure there’s no firewall blocking the required ports. If you’ve confirmed all that and still have problems, take a look at the Advanced Section of the Quick Install Guide.

Thank you for your reply Freddie!
I think you have misunderstood something: I’m using meet.jit.si and not my own server so doesn’t that mean I don’t need to config any NAT or Firewall myself?
And as far as I know the web client uses WebRTC, since on browsers you cannot use UDP socket. Am I wrong?

Oops! My apologies; indeed, I thought you were hosting your own server. And no, you don’t need to configure NAT. That said though, you may still have issues connecting if you have a Firewall/antivirus in place.

As far as coding a client, you might want to take a look at the Jitsi Electron app. Perhaps that could give you some inspiration.

Does Jitsi Electron use UDP to connect or just WebRTC?

Webrtc uses UDP by default.

Oh okay. So there is no such thing as using UDP sockets directly to connect as far as I understand.

Thus I’ll focus on making this thing with lib-jitsi-meet work. When I open test.webrtc.org with my KaiOS web browser, everything works fine except that Reflexive connectivity(srflx) doesn’t pass the test.

How can I find out if this affects my client or not?

Do you same with chrome for the same network? This will affect the ability to use p2p

But if for some reason KaiOS web browser is not able to send udp … this will be also indication for that. And then you will be able to use tcp turn connections, but then quality for sure will not be optimal …

Sorry for the late reply. I was learning WebRTC in the past days so that it can help me figure out where the problem is in my setup. I also have coded a simple web app connecting two clients together for a voice chat which works fine under KaiOS with UDP.

So from my understanding, we need to exchange ICE candidates and it seems that KaiOS doesn’t gather any. When I search for sendIceCandidate I only see

[modules/xmpp/JingleSessionPC.js] <sendIceCandidate>:  sendIceCandidate: last candidate. 

Which means no candidate was gathered. What the reason could be?
By the way, both Firefox desktop and KaiOS are on the same network now.
I’ll try to figure out why, but any hint will help me.

Also I no longer can connect to wss://meet.jit.si/xmpp-connection?room=potatoishere using my client. I get 403. Since I haven’t changed anything regarding this in my code, has something on the server side changed?

Yep, you should be using the iframe API there as per the terms and conditions of that service.

You may want to try https://jaas.8x8.vc though. We can probably help you achieve the same thing there.

Do you mean that I should create a JaaS dev package for testing my client?
I hope that was not what you meant because it seems that I need to have a credit card even for the free package and I being in Iran, don’t have any credit card which has some kind of international use.

You can use the iframe API.

I don’ think I can do that on KaiOS. Also KaiOS needs a custom GUI which works fine on those small screens.
And I don’t see much point in creating a client in which you can’t connect to running Jitsi Meet instances.
By the way, what does ToS of meet.jit.si says regarding third party clients? Users may not use them and only the web interface at meet.jit.si (or the Electron client)?