Title
In this tutorial it will be shown how to:
Muting audio on TelephonyConversation will cause
"onConversationUpdated" event to be fired. First it needs to
be checked if conversation has canMuteAudio capability,
and if it does, then call TelephonyConversation.muteAudio as it is shown in the snippet below:
var conversation;
// ...
// Here we choose on which conversation we want to mute audio.
// ...
if(conversation.capabilities.canMuteAudio)
{
// Mute audio.
conversation.muteAudio();
}
Unmuting audio on TelephonyConversation is done almost the same, after which
"onConversationUpdated" event is fired. First it needs to
be checked if conversation has canUnmuteAudio capability,
and if it does, then call TelephonyConversation.unmuteAudio as it is shown in the snippet below:
var conversation;
// ...
// Here we choose on which conversation we want to mute audio.
// ...
if(conversation.capabilities.canUnmuteAudio)
{
// Unmute audio.
conversation.unmuteAudio();
}
It should be noted that TelephonyConversationStates.isAudioMuted
state will be changed whenever audio is muted/unmuted.