Earmuff a Call Member
This guide covers earmuffing a call. Before you begin, make sure you added the SDK to your app and (Android, iOS, JS) and you are able to make or receive calls.
Earmuff
Earmuff stops the call member from hearing other members.
//Enable earmuff myself (can not hear others)
// After creating a session
client.enableEarmuff(callId)
.then(() => {
console.log("Success enabling earmuff.");
})
.catch(error => {
console.error("Error enabling earmuff: ", error);
});
client.enableEarmuff(callID) {
error ->
when {
error != null -> {
// Handle earmuff error
}
}
}
client.enableEarmuff(callID) { error in
if error != nil {
// Handle earmuff error
}
}
Disable Earmuff
Disabling earmuff allows a previously earmuffed call member to hear other members.
//Disable Earmuff (can hear others)
// After creating a session
client.disableEarmuff(callId)
.then(() => {
console.log("Success disabling earmuff.");
})
.catch(error => {
console.error("Error disabling earmuff: ", error);
});
client.disableEarmuff(callID) {
error ->
when {
error != null -> {
// Handle disable earmuff error
}
}
}
client.disableEarmuff(callID) { error in
if error != nil {
// Handle disable earmuff error
}
}