amazon-chime-sdk-component-library-react
amazon-chime-sdk-component-library-react copied to clipboard
Two instances of LocalVideo affect each other
Describe the bug
Hiding one instance of LocalVideo
hides another instance of LocalVideo
To Reproduce Steps to reproduce the behavior:
- Display two instances of
LocalVideo
- Remove one of them from React tree
- Look at the other instance: it is invisible because a class with
display: none
is added to it - Add the first one back to the tree
- 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:
After hiding the right instance:
Desktop (please complete the following information):
- OS: Ubuntu
- Browser: Firefox
- Version: 2.0.1
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.
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.