steep-balloon-41261
09/20/2023, 2:55 PMglamorous-nightfall-51273
09/20/2023, 2:57 PMsetIsMuteDisabled(disabled: boolean) {
if (disabled === this.isMuteDisabled) {
return;
}
this.isMuteDisabled = disabled;
this.emit(ParticipantEvent.IsMuteDisabledChanged, disabled);
}glamorous-nightfall-51273
09/20/2023, 2:58 PMexport function useIsMuteDisabled(participant?: Participant) {
const p = useEnsureParticipant(participant);
const observable = React.useMemo(() => createIsMuteDisabledObserver(p), [p]);
const isMuteDisabled = useObservableState(observable, p.isMuteDisabled);
return isMuteDisabled;
}
export function createIsMuteDisabledObserver(participant: Participant) {
return participantEventSelector(participant, ParticipantEvent.IsMuteDisabledChanged).pipe(
map(([isMuteDisabled]) => isMuteDisabled),
);
}glamorous-nightfall-51273
09/20/2023, 3:01 PMconst isMuteDisabled = useIsMuteDisabled(room?.localParticipant)
4.b.
for (let remoteParticipant of room?.participants.values()){
remoteParticipant.setIsMuteDisabled(true)
}
4.c.
for (let remoteParticipant of room?.participants.values()){
remoteParticipant.setIsMuteDisabled(false)
}glamorous-nightfall-51273
09/20/2023, 3:10 PMbrief-refrigerator-69901
09/20/2023, 5:58 PMacoustic-engineer-41666
09/20/2023, 6:31 PMglamorous-nightfall-51273
09/21/2023, 2:01 PMbrief-refrigerator-69901
09/21/2023, 2:06 PM