remove focus state if camera is unshared
This commit is contained in:
parent
9fd28639e5
commit
5ed9639601
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user