mirror of
https://github.com/suitenumerique/meet.git
synced 2026-09-02 05:38:02 +00:00
✨(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:
committed by
aleb_the_flash
parent
26bd947541
commit
6a76041a70
@@ -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 }
|
||||
}
|
||||
Reference in New Issue
Block a user