Table of Contents
Mute / Unmute Audio in a Stream
Use await EnxRtc.muteSelfAudio() method to mute and unmute audio from Local Stream. When a user mutes or unmutes audio from own Published Stream, Self user notified with event onAudioEvent and all other connected users of the room are notified with event listeners onRemoteStreamAudioMute and onRemoteStreamAudioUnMute callbacks respectively. Listen to these events to update related UI elements.
Methods: static Future<void> muteSelfAudio(bool isMute) – Pass true to mute, false to unmute audio
Parameters: @param {Boolean} audio – Pass true to mute, false to unmute audio
Event Listeners:
-
onRemoteStreamAudioMute– To all participants notifying user has muted audio -
onRemoteStreamAudioUnMute– To all participants notifying user has unmuted audio onAudioEvent– To self that audio is either muted or unmuted
EnxRtc.muteSelfAudio(true); // Muting Audio
EnxRtc.onAudioEvent = (Map<dynamic,dynamic> map) {
};
EnxRtc.onRemoteStreamAudioMute=(Map<dynamic,dynamic> map) {
};
EnxRtc.onRemoteStreamAudioUnMute=(Map<dynamic,dynamic> map) {
};
Mute / Unmute Video in a Stream
Use await EnxRtc.muteSelfVideo() method to mute and unmute video from Local Stream. When a user mutes or unmutes video from own Published Stream, self user notified with event onVideoEvent and all all other connected users of the room are notified with onRemoteStreamVideoMute and onRemoteStreamVideoUnMute callbacks respectively.
Methods: static Future<void> muteSelfVideo(bool isMute) – Pass true to mute, false to unmute video
Parameters: @param {Boolean} isMute– Pass true to mute, false to unmute audio
Event Listeners:
onRemoteStreamVideoMute– To all participants notifying user has muted videoonRemoteStreamVideoUnMute– To all participants notifying user has unmuted videoonVideoEvent– To self that video is either muted or unmuted
EnxRtc.muteSelfVideo(true); // Muting Video
EnxRtc.onVideoEvent = (Map<dynamic,dynamic> map) {
};
EnxRtc.onRemoteStreamVideoMute=(Map<dynamic,dynamic> map) {
};
EnxRtc.onRemoteStreamVideoUnMute=(Map<dynamic,dynamic> map) {
};
