Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async _createWebphone(provisionData) {
await this._removeWebphone();
this._webphone = new RingCentralWebphone(provisionData, {
appKey: this._appKey,
appName: this._appName,
appVersion: this._appVersion,
uuid: this._auth.endpointId,
logLevel: this._webphoneLogLevel, // error 0, warn 1, log: 2, debug: 3
audioHelper: {
enabled: true, // enables audio feedback when web phone is ringing or making a call
},
media: {
remote: this._remoteVideo,
local: this._localVideo,
},
enableQos: isChrome(),
enableMidLinesInSDP: isEnableMidLinesInSDP(),
...this._webphoneSDKOptions,
});
async function initPhoneInstance() {
const info = await this[symbols.platform]
.post('/client-info/sip-provision', {
sipInfo: [{ transport: 'WSS' }],
})
.then(res => res.json());
return new RingCentralWebphone(info, {
logLevel: 0,
audioHelper: {
enabled: true,
},
});
}