Duplicate participant video and black Screen use lib-jitsi-meet.js

Hi,

I try example https://github.com/jitsi/lib-jitsi-meet/tree/master/doc/example. but when participant has 3,participan 1 always duplicate remote video from participant 2, and participant 2 always duplicate remote video from participant 1. The duplicate video always black screen.

Participant 3 view run normally, with 1 local video and 2 remote video (participant 1&2).

But paticipan 1 has 4 view. with 1 local video, 1 remote video from participant 2, 1 duplicate remote video from participant 2 (blank screen) and 1 remote video from participant 3.

And participant 2 has 4 view too. with 1 local video, 1 remote video from participant 1, 1 duplicate remote video from participant 1 (blank screen) and 1 remote video from participant 3.

This view in participant 1 & 2, always show duplicate and black screen

This view in participant 3, run normally with 3 video

How to fix it? Thanks before
@damencho @saghul

Yeah, I have the same problem too in the base example.

It seems that tracks are added, then removed and then added again without removing the html element, so that’s the reason of the black screen. Something triggers the TRACK_REMOVED event.

Connection Success!
example.js:151 user join
example.js:114 conference joined!

local tracks added

example.js:73 track added!!!LocalTrack[1,audio]
example.js:73 track added!!!LocalTrack[2,video]
index.js:44 SdpSimulcast: using 3 layers
index.js:44 SdpSimulcast: using 3 layers
index.js:159 Imploding SIM group: 614657343 2883170017 3643274575

remote tracks added

example.js:73 track added!!!RemoteTrack[userID: 88e3c183, type: audio, ssrc: 2176385682, p2p: false, status: readyState: live, muted: false, enabled: true]
example.js:73 track added!!!RemoteTrack[userID: 88e3c183, type: video, ssrc: 614657343, p2p: false, status: readyState: live, muted: false, enabled: true]
index.js:419 SdpSimulcast: current ssrc cache:  []
index.js:420 SdpSimulcast: parsed primary ssrc 101911161
index.js:429 SdpSimulcast: Have not seen primary ssrc before, generating source data
JitsiRemoteTrack.js:212 (TIME) Render audio:	 2057.925000000978
JitsiRemoteTrack.js:231 (TIME) TTFM audio:	 747.1550000045681

remote tracks removed

example.js:145 track removed!!!RemoteTrack[userID: 88e3c183, type: audio, ssrc: 2176385682, p2p: false, status: readyState: live, muted: false, enabled: true]
example.js:145 track removed!!!RemoteTrack[userID: 88e3c183, type: video, ssrc: 614657343, p2p: false, status: readyState: live, muted: false, enabled: true]

same remote tracks added again

example.js:73 track added!!!RemoteTrack[userID: 88e3c183, type: audio, ssrc: 1274324758, p2p: true, status: readyState: live, muted: false, enabled: true]
example.js:73 track added!!!RemoteTrack[userID: 88e3c183, type: video, ssrc: 195555739, p2p: true, status: readyState: live, muted: false, enabled: true]

Do you have solved the problem? @nulele

Can you help us @damencho?

Hi @Rabihi_Awaludin,

I didn’t solve the problem but I’ve understood that the first time, tracks are added as p2p = false, while the second time are added as p2p = true. That’s makes sense in case of a two participants connection. I only have to find a way to remove unused tracks.

Thanks

Can you help us @damencho?

@andrecampll @nulele you should listen to JitsiMeetJS.events.conference.TRACK_REMOVED and remove track from your storage. This event will fire for unused track with or without p2p

Hi,
has anyone come with a solution for this problem ?
I don’t understand the principle by which Jitsi seems to create TWO video tracks instead of one for each new participant joining: one is active and the other is freezed (later it becomes black).

I manage to remove tracks on TRACK_REMOVED trigger; but if there are only 2 participants, there’s actually a problem with p2p tracks resulting in this behaviour :

  1. first user connects;
  2. second user connects and can see the first user BUT first user cannot see the second user;
  3. third user connects and everyone can see everyone (probably because of a p2p switch whose functioning I don’t grasp entirely)

So as of now I solved by putting, in confOptions, p2p { enabled: false } and it SEEMS to work.

Is there any better way to handle this problem without removing the p2p ? Like for instance knowing if a track is p2p or not and only removing one of the two ?

Thanks in advance

Hi,

we have same problem, we use jitsi docker server and when we enable p2p sometime one of participant haven’t video and sound.

It’s ok when we disable p2p.

Thanks