Lib-jitsi-meet react port - switch local video tracks not working

As a first post just wanted to salute you all, and thanks for the support.

I’ve been trying to use the repo - GitHub - fpw23/telimed: telimed demo using jitsi - to create a react app using lib-jitsi-meet. As he did, Jitsi API ojects are attached to window object and the react components reach them from there.

I’ve published it in a new repo > GitHub - tiagogcunha/jitsi-lib-react-ready, and the online Demo is available - link in repo

The problem is that the video switch is not working.

  1. When switching from the default source to none the video is mutted but when setting the default video source back it doesn’t re-attach
  2. When accessing from mobile (where you have the front and back camera) it doesn’t allow you to switch between these two.

The code to update the video tracks is in LocalTracks.js

     let setTrack = _.find(this.trackList, (t) => {
        return t.deviceId === deviceId;
      });
      if (setTrack) {
        // eslint-disable-next-line default-case
        switch (setTrack.getType()) {
          case "video":
            if (setTrack && this.videoRef.current) {
              setTrack.attach(this.videoRef.current);
              setTrack.addEventListener(
                window.JitsiMeetJS.events.track.LOCAL_TRACK_STOPPED,
                this.onTrackStoppedEvent
              );
              setTrack.addEventListener(
                window.JitsiMeetJS.events.track.TRACK_VIDEOTYPE_CHANGED,
                this.onTrackVideoOutputChangedEvent
              );
            }
            break;

Can you please help me to understand what am I doing wrong here?
Thanks

For one, that repo is not maintained by Jitsi, so it might be a bit of a challenge to get assistance other than from the owner of the repo. And two, the repo is over 2yrs old - so much has changed in Jitsi since then. You can see that even the owner’s own POC doesn’t work (anymore). You’d be best served to work on the official Jitsi repos:

That was actually a pretty good tip since I stopped messing around with react and went back to plain JS with the lib-jitsi-meet and easily could achieve what I wanted. I’m not sure if someone else will stumble on this but for me it’s a closed issue. Thanks