Mutes a participant in a media session if certain conditions are met.
This method checks the current user's level and their co-host responsibilities
to determine if they are allowed to mute a specified participant. If allowed,
the method emits a socket event to mute the participant. If not allowed, an alert
is displayed.
Param: options
The options for muting participants.
Param: options.socket
The socket instance for communication.
Param: options.coHostResponsibility
List of co-host responsibilities.
Param: options.participant
The participant to be muted.
Param: options.member
The current member attempting to mute.
Param: options.islevel
The level of the current member.
Param: options.showAlert
Optional function to show alerts.
Param: options.coHost
The co-host information.
Param: options.roomName
The name of the room.
Returns
A promise that resolves when the participant is muted.
Throws
Will log an error if there is an issue accessing co-host responsibilities.
Mutes a participant in a media session if certain conditions are met.
This method checks the current user's level and their co-host responsibilities to determine if they are allowed to mute a specified participant. If allowed, the method emits a socket event to mute the participant. If not allowed, an alert is displayed.
Param: options
The options for muting participants.
Param: options.socket
The socket instance for communication.
Param: options.coHostResponsibility
List of co-host responsibilities.
Param: options.participant
The participant to be muted.
Param: options.member
The current member attempting to mute.
Param: options.islevel
The level of the current member.
Param: options.showAlert
Optional function to show alerts.
Param: options.coHost
The co-host information.
Param: options.roomName
The name of the room.
Returns
A promise that resolves when the participant is muted.
Throws
Will log an error if there is an issue accessing co-host responsibilities.
Example