Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const connectAndCall = () => {
const newClient = new TelnyxRTC({
env: environment,
credentials: {
username,
password,
},
remoteElement: () => mediaRef.current,
useMic: true,
useSpeaker: true,
useCamera: false,
})
.on('registered', () => {
setRegistered(true);
setRegistering(false);
startCall();
})
const connectAndCall = () => {
const newClient = new TelnyxRTC({
env: environment,
credentials: {
username,
password,
},
remoteElement: () => mediaRef.current,
useMic: true,
useSpeaker: true,
useCamera: false,
})
.on('registered', () => {
setRegistered(true);
setRegistering(false);
startCall();
})