Merge pull request #13034 from ramonlsouza/issue-12475

fix: incorrect layout when a focused webcam is unshared
This commit is contained in:
Pedro Beschorner Marin 2021-08-19 14:49:23 -03:00 committed by GitHub
commit ab7820fc1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,6 +118,7 @@ class VideoList extends Component {
}
componentDidUpdate(prevProps) {
const { focusedId } = this.state;
const { layoutType, cameraDock, streams } = this.props;
const { width: cameraDockWidth, height: cameraDockHeight } = cameraDock;
const {
@ -127,6 +128,11 @@ class VideoList extends Component {
} = prevProps;
const { width: prevCameraDockWidth, height: prevCameraDockHeight } = prevCameraDock;
const focusedStream = streams.filter((item) => item.stream === focusedId);
if (focusedId && focusedStream.length === 0) {
this.handleVideoFocus(focusedId);
}
if (layoutType !== prevLayoutType
|| cameraDockWidth !== prevCameraDockWidth
|| cameraDockHeight !== prevCameraDockHeight