Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor() {
this.client = Voximplant.getInstance();
// Connection to the Voximplant Cloud is stayed alive on reloading of the app's
// JavaScript code. Calling "disconnect" API here makes the SDK and app states
// synchronized.
PushManager.init();
(async() => {
try {
this.client.disconnect();
} catch (e) {
}
})();
this.client.on(Voximplant.ClientEvents.ConnectionClosed, this._connectionClosed);
}
(async() => {
this.call = await Voximplant.getInstance().call(this.callTo, callSettings);
this.setupListeners();
let callManager = CallManager.getInstance();
callManager.addCall(this.call);
if (callSettings.setupCallKit) {
callManager.startOutgoingCallViaCallKit(this.isVideoCall, this.callTo);
}
})();
}
constructor() {
this.client = Voximplant.getInstance();
this.currentAppState = AppState.currentState;
if (Platform.OS === 'ios') {
this.callKitManager = CallKitManager.getInstance();
}
}