twilio / twilio-video-app-react

A collaboration application built with the twilio-video.js SDK and React.js
Apache License 2.0
1.81k stars 728 forks source link

Camera light remains open once user disconnects from the room #818

Open SanjayBikhchandani opened 1 year ago

SanjayBikhchandani commented 1 year ago

Describe the bug When a user leaves the room where their virtual background was enabled, the camera light keeps remaining open for around 20 Seconds

To Reproduce Steps to reproduce the behavior:

  1. Run this demo app
  2. Join any room with a Video disabled
  3. Now select any of the virtual background
  4. Enable video
  5. Leave the room
  6. Camera light will remain open for almost 15-20 seconds

Expected behavior Video should be switched off as soon as the user leaves the room.

Environment (please complete the following information):

SanjayBikhchandani commented 1 year ago

@manjeshbhargav Can you please help us with this issue, Many of the users are facing this issue in our app and we've not found any solution as of yet.

mcarrerasm commented 1 year ago

Hi @SanjayBikhchandani,

I was trying to reproduce the issue step by step following the instructions you provided, but unfortunately, I wasn't able to do so.

Could you please confirm the version of Windows that you were testing and the Chrome version?

I was using Windows 11 Pro and the latest version of Chrome, 118.0.0.

When you disconnect the participant, are you using the disconnect button or closing the Chrome window/tab?

Is this happening to the same user or device or this is happening with all participants/devices?

Looking forward for your response!

SanjayBikhchandani commented 1 year ago

Hello @mcarrerasm ,

Thank you for your response. I appreciate your efforts in trying to reproduce the issue. To clarify, the issue I encountered was on a system running Windows 11 Home with Chrome version 118.0.5993.70.

To disconnect the participant, I used the "disconnect" button within the application, not by closing the Chrome window or tab.

I understand your concern about whether this issue is specific to a particular user or device. At this point, it's not entirely clear if it affects a specific user or device.

I'm attaching a screen recording of the issue here screen-recorder-mon-oct-23-2023-10-48-03.webm

mcarrerasm commented 1 year ago

Hi @SanjayBikhchandani,

Thank you for the video; it's really helpful for continuing troubleshooting.

In the video you shared, I noticed that the camera icon disappears after 20 seconds of disconnecting from the room. I also noticed that there are several extensions installed in your Chrome instance.

Do you think it's possible that one of these extensions is using the Camera or Microphone?

Would you please run Chrome without extensions, try again, and then share the results with us?

Have you tried using another device with the same configuration (Windows and Chrome) and compared the results?

SanjayBikhchandani commented 1 year ago

Hi @mcarrerasm,

I was able to reproduce this issue in Firefox as well as Chrome Incognito mode, so I don't think it is related to any extensions. I can reproduce it almost 90% of the time.

Unfortunately, I don't have any device with the same configuration. However, we were able to reproduce this issue once with a Mac today.

Also, one thing to note here is that it only happens when a Virtual background is applied to the video. So, is that the issue here?

spalmertwilio commented 1 year ago

Hi @SanjayBikhchandani,

Do you mind providing specs on the device(s) you are using. We'd appreciate if you would take screenshots of the performance monitor reports generated while using your video app and reproducing the light issue. https://www.groovypost.com/howto/use-performance-monitor-on-windows-11/

Or if you prefer, to perform this on a MAC with the activity monitor. https://support.apple.com/guide/activity-monitor/welcome/mac

Maybe even consider capturing a HAR Analyzer https://toolbox.googleapps.com/apps/har_analyzer/

As we don't have other folks reporting this issue, and we cannot reproduce, we're trying to figure out what is unique to your environment. Are you behind a VPN or a Proxy?