Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@audiolion
Last active January 21, 2019 23:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save audiolion/0a866b11c182092f578f0ece98018367 to your computer and use it in GitHub Desktop.
Save audiolion/0a866b11c182092f578f0ece98018367 to your computer and use it in GitHub Desktop.
show code that is producing twilio client error
state = {
device: new Twilio.Device();
};
state.device = state.device.setup(token, { allowIncomingWhileBusy: true });
resumeTwilioDevice = async () => {
if (state.device.audio &&
state.device.audio._audioContext &&
state.device.audio._audioContext.state === 'suspended'
) {
state.device.audio._audioContext.resume();
}
};
// what I expected to be able to do was
resumeTwilioDevice = async () => {
if (state.device.audioContext &&
state.device.audioContext.state === 'suspended'
) {
state.device.audioContext.resume();
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment