audiocontext - Twilio.Device.setup throws error -
i developing browserphone twilio.js, version 1.4.20.
when token expired, handling twilio.device.offline(), , regenerate token , re-setup twilio.device.
after 6 times re-setup, then, twilio.js throw error.
*failed* construct 'audiocontext': number of hardware contexts provided (6) greater or equal maximum bound (6).
how can prevent error?
i'm using these code.
twilio.device.offline((device) => { if (navigator.online) { twilio.device.destroy(); twilio.device.instance = null; gettoken(device._clientname); } const gettoken = (identity) => { $.ajax({ type: 'post', url: baseurl + '/token/get', data: {'identity': identity} }) .done((data) => { data = json.parse(data); twilio.device.setup(data.token, { closeprotection: true }); };
Comments
Post a Comment