Skip to content
Snippets Groups Projects
Commit 1fb73d61 authored by Mario Jr's avatar Mario Jr
Browse files

fix: prevent an extra audio channel to be created when skipCheckOnJoin is true

When setting skipCheckOnJoin to true, an extra audio channel is created in
FreeSWITCH, after user accepts the echo test. The extra channel is removed
when user leaves the room, but this still may affect performance.
parent 0338d736
No related branches found
No related tags found
No related merge requests found
......@@ -26,12 +26,15 @@ export const joinMicrophone = (skipEchoTest = false) => {
Storage.setItem(CLIENT_DID_USER_SELECTED_LISTEN_ONLY_KEY, false);
const call = new Promise((resolve, reject) => {
if (skipEchoTest) {
resolve(Service.joinMicrophone());
} else {
resolve(Service.transferCall());
try {
if (skipEchoTest && !Service.isConnected()) {
return resolve(Service.joinMicrophone());
}
return resolve(Service.transferCall());
} catch {
return reject(Service.exitAudio);
}
reject(Service.exitAudio);
});
return call.then(() => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment