Skip to content

Commit

Permalink
Add message when mutedByOthers event received (#232)
Browse files Browse the repository at this point in the history
* add message when mutedByOthers event received

* improve concatenation

* remove console log
  • Loading branch information
allchiang-msft authored Jun 14, 2024
1 parent 0fc41fc commit 5d0152c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Project/src/MakeCall/CallCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,14 @@ export default class CallCard extends React.Component {
}
});

this.call.on('mutedByOthers', () => {
const messageBarText = 'You have been muted by someone else. Unmute to speak.';
this.setState(prevState => ({
...prevState,
callMessage: `${prevState.callMessage ? prevState.callMessage + `\n` : ``} ${messageBarText}.`
}));
});

const handleParticipant = (participant) => {
if (!this.state.remoteParticipants.find((p) => { return p === participant })) {
this.setState(prevState => ({
Expand Down

0 comments on commit 5d0152c

Please sign in to comment.