aws / amazon-chime-sdk-component-library-react

Amazon Chime React Component Library with integrations with the Amazon Chime SDK.
Apache License 2.0
263 stars 159 forks source link

Two instances of LocalVideo affect each other #434

Open arty-name opened 3 years ago

arty-name commented 3 years ago

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):

p-foucht commented 3 years ago

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.

arty-name commented 3 years ago

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.