イヤーマフ・ア・コール会員

このガイドでは、通話のイヤーマフについて説明します。始める前に、あなたのアプリにSDKが追加されていることを確認してください。アンドロイド, iOS, JS)で、次のことができる。 作る または 受け取る のコール。

イヤーマフ

イヤーマフにより、通話相手の声が聞こえなくなる。

//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 (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
    }
}

参考