If you don’t want to read this short story, there are questions below.
I’ve started to rewrite lib-jitsi-meet to dart so that I can use it with Flutter, more natively. As told in another post I started from rewrite of xmpp module. I’ve rewritten most of it so far, and a lot of questions about connecting it with WebRTC came out. I am stuck for a few days and trying to figure out what is necessary or not. I’ve made a simplified diagram of this module, and I have the bottom part mostly done (below XMPP class). When rewriting JitsiConnectionPlugin I stumbled upon JingleSessionPC and its connection the the rest of the tree. Some of those classes seem that are mostly WebRTC wrappers and I am not sure if all of them are necessary, because all of them combined are about 10k line of codes. For now, I want to make it run, and then other features can be added.
- JitsiTrack seems like a wrapper for WebRtc MediaStreamTrack. I looked at the code and it seems that it is not essential, isn’t it? Maybe only some parts are necessary.
- TreacablePeerConnection also looks like a wrapper for RTCPeerConnection. In addition to being wrapper it manages streams from WebRTC, not JitsiTrack, so it seems unnecessary.
- JitsiConference is like the API of this whole library but created in JitsiConnection. Is that right?
- There is also a lot of Maps called options, so finding all its fields is a bit hard, especially that I want to make them into classes. Also I cannot find where they are initialized. If you could tell me where I can find initialisation, it would be helpful.
- What do I really need to run a simple conversation?
I’ve seen some strange dependencies between classes, so I think that some of those “wrappers” can be refactored into a simple one.
I tried to make this post short, so if I made something too short to be understandable, let me know and I will expand my thoughts.