diff --git a/Project/src/MakeCall/CallCard.js b/Project/src/MakeCall/CallCard.js index 957970b..636f9ef 100644 --- a/Project/src/MakeCall/CallCard.js +++ b/Project/src/MakeCall/CallCard.js @@ -1390,11 +1390,14 @@ export default class CallCard extends React.Component { } handleVideoPin = (streamTuple, e) => { - // e.preventDefault(); const checked = e.target.checked; const allRemoteParticipantStreams = this.state.allRemoteParticipantStreams; // If there is already 2 streams pinned and the user is trying to pin another stream, return if (allRemoteParticipantStreams.filter(streamTuple => streamTuple.isPinned).length >= 2 && checked) { + allRemoteParticipantStreams.find(v => v === streamTuple).isPinned = false; + this.setState({ + allRemoteParticipantStreams: allRemoteParticipantStreams, + }); return; } @@ -2121,13 +2124,14 @@ export default class CallCard extends React.Component {