(frontend) add "mute all participants" feature for admins

Implement admin capability to mute everyone's microphone in large rooms
where participants forget to mute themselves and are hard to identify
quickly.

Feature requested by @arnaud-robin. Provides instant room-wide muting
without individual confirmation popups, enabling efficient moderation
in busy conference scenarios.
This commit is contained in:
lebaudantoine
2025-08-27 17:57:42 +02:00
committed by aleb_the_flash
parent 26bd947541
commit 6a76041a70
8 changed files with 73 additions and 2 deletions
@@ -0,0 +1,19 @@
import { Participant } from 'livekit-client'
import { useMuteParticipant } from './muteParticipant'
export const useMuteParticipants = () => {
const { muteParticipant } = useMuteParticipant()
const muteParticipants = (participants: Array<Participant>) => {
try {
const promises = participants.map((participant) =>
muteParticipant(participant)
)
return Promise.all(promises)
} catch (error) {
console.error('An error occurred while muting participants :', error)
throw new Error('An error occurred while muting participants.')
}
}
return { muteParticipants }
}