Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes black frame is rendered instead of participant video #504

Open
Roman-hub opened this issue Sep 13, 2024 · 2 comments
Open

Sometimes black frame is rendered instead of participant video #504

Roman-hub opened this issue Sep 13, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Roman-hub
Copy link

Hello, I've noticed that sometimes remote participant does not appear and black frame is rendered instead. And this issue is not persistent, I can reproduce it like 1 out of 10 times.

So the question is, what can I do as a developer when this issue happens? How can I detect that remote video is not rendering in livekit sdk, and somehow try to restart it or reconnect?

I'm subscribed to Room events, but there is no additional event delivered when this issue happens. I get the same RoomEvent.TrackSubscribed as usual, but when I try to display the track as a view, it just appears as a black rectangle.

Also, this issue sometimes happens with local participant as well, but in this case I'm at least able to fix it by enabling and disabling camera. I had to write code like this:

room.connect(credentials.host, credentials.token)

localParticipant.setMicrophoneEnabled(true)
localParticipant.setCameraEnabled(true)

launch {
    fixLocalParticipant(localParticipant)
}

private suspend fun fixLocalParticipant(localParticipant: LocalParticipant) {
    delay(1000)
    localParticipant.setMicrophoneEnabled(false)
    localParticipant.setCameraEnabled(false)
    delay(1000)
    localParticipant.setMicrophoneEnabled(true)
    localParticipant.setCameraEnabled(true)
}

Any help would be much appreciated. Thanks.

@Roman-hub Roman-hub added the bug Something isn't working label Sep 13, 2024
@tuan-jason
Copy link

I got a similar issue here when trying to disconnect/clean up current Room and reconnect to it again.
Subsequent rendering of new VideoTrack leads to black screen.
Any idea?

@omar-harbor
Copy link

Hi,

Is there any news about this? I often face this issue in Android; my only fix for now is to recreate the room, but it looks like it is worsening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants