Earmuff a Call Member

Overview

This guide covers earmuffing members of a conversation.

Before you begin, make sure you added the SDK to your app and you are able to make or receive calls.

Earmuff

Earmuff a member to disables the member from hearing other members. You can earmuff your own member or others.

member.earmuff(true);

//Earmuff my Member
conversation.me.earmuff(true);
private val earmuffListener = object : NexmoRequestListener<Void> {
    override fun onSuccess(result: Void?) {
        Timber.d("Member earmuff enabled")
    }

    override fun onError(error: NexmoApiError) {
        TODO("not implemented")
    }
}

val nexmoMember = call?.allMembers?.firstOrNull()
nexmoMember?.enableEarmuff(earmuffListener)
 private NexmoRequestListener<Void> earmuffListener = new NexmoRequestListener<Void>() {
    @Override
    public void onError(NexmoApiError apiError) {
        Timber.d("Error: Earmuff member " + apiError.getMessage());
    }

    @Override
    public void onSuccess(@Nullable Void result) {
        Timber.d("Member earmuff ");
    }
};

NexmoMember nexmoMember = call.getAllMembers().get(0);
nexmoMember.enableEarmuff(earmuffListener);
member.earmuff(true)

//Earmuff my Member
call.myCallMember.earmuff(true)
[callMember earmuff:YES];

//Earmuff my Member
[myCall.myCallMember earmuff:YES];

Reference