amazon-chime-sdk-component-library-react icon indicating copy to clipboard operation
amazon-chime-sdk-component-library-react copied to clipboard

Two instances of LocalVideo affect each other

Open arty-name opened this issue 3 years ago • 2 comments

Describe the bug Hiding one instance of LocalVideo hides another instance of LocalVideo

To Reproduce Steps to reproduce the behavior:

  1. Display two instances of LocalVideo
  2. Remove one of them from React tree
  3. Look at the other instance: it is invisible because a class with display: none is added to it
  4. Add the first one back to the tree
  5. Look at the other instance: it is visible again.

Expected behavior Hiding or showing one instance of LocalVideo should not affect the other one

Screenshots Before hiding the right instance: Screenshot_2021-02-22 Generic Client UI Base After hiding the right instance: Screenshot_2021-02-22 Generic Client UI Base

Desktop (please complete the following information):

  • OS: Ubuntu
  • Browser: Firefox
  • Version: 2.0.1

arty-name avatar Feb 22 '21 16:02 arty-name

Hi @arty-name

Yeah, this is a bit of a limitation on the SDK side, as it currently doesn't handle binding multiple Video elements per MediaStream currently. I've just filed a ticket in the SDK about this enhancement.

There's a bit of a workaround, but it's not ideal. You can get the VideoTile directly from the SDK and clone the MediaStream, as referenced here.

I'll keep this ticket open until it's properly supported.

p-foucht avatar Feb 22 '21 18:02 p-foucht

Thank you @p-foucht!

Yeah, I was thinking something like this could be the case, but it wasn’t mentioned in the react library docs, so I reported it anyways. It’s very nice of you to provide a ready workaround, but it would be simpler for me to just remove the LocalVideo from the right side for the time being.

arty-name avatar Feb 22 '21 20:02 arty-name