mute Participants
Mutes a participant in the room if the current member has the necessary permissions.
This function checks if the current member has the required permissions based on their level and co-host responsibilities. If authorized, it emits a socket event to mute the participant.
Example:
val options = MuteParticipantsOptions(
socket = socketInstance,
coHostResponsibility = listOf(CoHostResponsibility(name = "media", value = true)),
participant = Participant(id = "123", name = "John Doe", muted = false, islevel = "1"),
member = "currentMember",
islevel = "2",
showAlert = { alert -> Logger.d("MuteParticipants", alert.message) },
coHost = "coHostMember",
roomName = "room1"
)
muteParticipants(options)Content copied to clipboard