Twilio Client “Mute” button not working

我的未来我决定 提交于 2019-12-24 18:27:57

问题


I am having a problem "Muting" an outgoing call through Twilio Client. I am able to mute calls when I receive an incoming call, however, when I make an outgoing call, the mute button does not work. I have tried everything I can think of to make this mute button work but nothing I do works. Here is a link with the code:

<script type="text/javascript">
function call() {
     //Get the phone number to connect the call to
     params = {"PhoneNumber": $("#number").val()};
     Twilio.Device.connect(params);

     $("#mute").click(function() {
        conn.mute();
     });

 }
</script>

<button id="mute">
     Mute
</button>

Please help with this. It has been driving me crazy. I cannot figure this out! Thanks


回答1:


Shouldn't you be setting conn = Twilio.Device.connect(params);?

https://www.twilio.com/docs/api/client/device#connect



来源:https://stackoverflow.com/questions/11300530/twilio-client-mute-button-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!