Our application is very alike to a common video conferencing tool. It offers multiple users to share screens. We get an error when user stops then starts the screen share the second time. I’m currently using livekit 1.2x,
When I trace the issue I see that, the screen share publication drops from local participant. But it remains on remote participants. And somehow, there is no track underneath this publication.
When user shares screen second time, livekit throws a warning “received a second track publication for xxxx with the same source: screen_share” and generates a second publication with proper track in it. When I call participant.getTrack(Track.Source.ScreenShare) function, livekit gives me the first screen share publication that doesn’t have the track in it. And this causes issue on our application.
I compared the process with 0.15x. On 0.15x, when a remote participant stops the screen share, screen share publication is being dropped from both local and remote participants. So not matter how many times a user shares the screen, it causes no issues.