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);

val earmuffListener = object : NexmoRequestListener<NexmoCallMember> {
    override fun onSuccess(callMember: NexmoCallMember?) {
        Log.d("TAG", "Member earmuff enabled $callMember")
    }

    override fun onError(apiError: NexmoApiError) {
        Log.d("TAG", "Error: Earmuff member ${apiError.message}")
    }
}

// Earmuff member
call?.callMembers?.firstOrNull()?.earmuff(true, earmuffListener)

// Earmuff my member
call?.myCallMember?.earmuff(true, earmuffListener)
 NexmoRequestListener<NexmoCallMember> earmuffListener = new NexmoRequestListener<NexmoCallMember>() {
    @Override
    public void onSuccess(NexmoCallMember callMember) {
        Log.d("TAG", "Member earmuff " + callMember);
    }

    @Override
    public void onError(NexmoApiError apiError) {
        Log.d("TAG", "Error: Earmuff member " + apiError.getMessage());
    }
};

// Earmuff member
NexmoCallMember callMember = call.getCallMembers().iterator().next();
callMember.earmuff(true, earmuffListener);

// Earmuff my member
call.getMyCallMember().earmuff(true, earmuffListener);
member.earmuff(true)

//Earmuff my Member
call.myCallMember.earmuff(true)

[callMember earmuff:YES];

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