Is it possible to change the Twilio Browser Client ringtone?

拈花ヽ惹草 提交于 2019-12-01 23:36:07

问题


I did not find it in Twilio documentation that I can change it.

Does anyone has a solution to this problem?

Perhaps it is possible to replace the mp3 file that is downloaded to the browser and used as a ringtone.

I need this, because my clients are somewhat annoyed by the default ringtone of Twilio browser client.


回答1:


It is possible to change default incoming ringtone with some workaround.

Following Twilio client API: https://www.twilio.com/docs/client/device#sounds you can disable incoming ringtone calling Twilio.Device.sounds.incoming(false). Then you will need to hookup to event Twilio.Device.incoming and manually start you ringtone and hookup to other events to stop playing music when call is answered/cancelled.




回答2:


Twilio Customer Support here, its not possible to change the ringtone at this time however you could use and have a recording of the ring tone you need until the other leg of the call has a status of 'answered'

In the meantime I have added this as a feature request, though I cannot give a firm estimation as to when it might be implemented.

Any further questions ping help@twilio.com




回答3:


Yes it is possible to change incoming call ringtone, You can add this code it's working for me also

first add ringtone url like this

 var audio = new Audio('/app-assets/audio/Ringback.wav'); 

than add this code when call was coming

audio.loop = true;
audio.play();

and on answer or reject you can stop ring

audio.pause();
audio.currentTime = 0;


来源:https://stackoverflow.com/questions/29900057/is-it-possible-to-change-the-twilio-browser-client-ringtone

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