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?