diff --git a/bigbluebutton-html5/imports/api/1.1/audio/client/manager/index.js b/bigbluebutton-html5/imports/api/1.1/audio/client/manager/index.js index 9b80d69c1963bb2bdc7abf61c6a2f0a3adfe0bc5..62033062abb93c795f872fbcb691a5d3521edd12 100644 --- a/bigbluebutton-html5/imports/api/1.1/audio/client/manager/index.js +++ b/bigbluebutton-html5/imports/api/1.1/audio/client/manager/index.js @@ -28,7 +28,7 @@ export default class AudioManager { AudioManager.fetchServers().then(({ error, stunServers, turnServers }) => { if (error) { //We need to alert the user about this problem by some gui message. - console.err("Couldn't fetch the stuns/turns servers!"); + console.error("Couldn't fetch the stuns/turns servers!"); return; } @@ -43,9 +43,9 @@ export default class AudioManager { // We use on the SIP an String Array, while in the server, it comes as // an Array of objects, we need to map from Array<Object> to Array<String> - static mapToArray({ returnCode, stunServers, turnServers }) { + static mapToArray({ response, stunServers, turnServers }) { const promise = new Promise((resolve) => { - if (returnCode === 'FAILED') { + if (response) { resolve({ error: 404, stunServers: [], turnServers: [] }); } resolve({ @@ -61,6 +61,6 @@ export default class AudioManager { return fetch(url) .then(response => response.json()) - .then(response => AudioManager.mapToArray(response)); + .then(json => AudioManager.mapToArray(json)); } }