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.
- 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
- 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