From 4c9b6ce193565fa08701c4ceed6280766222e5f9 Mon Sep 17 00:00:00 2001 From: hristoterezov Date: Thu, 1 Sep 2016 12:57:21 -0500 Subject: [PATCH] Shows dialog when lib-jitsi-meet report microphone issues --- conference.js | 5 ++++- lang/main.json | 1 + modules/UI/UI.js | 12 ++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/conference.js b/conference.js index 93b1978e9c..8ef7cd52e2 100644 --- a/conference.js +++ b/conference.js @@ -857,6 +857,8 @@ export default { return promise.then(function () { if (stream) { + stream.on(TrackEvents.TRACK_AUDIO_NOT_WORKING, + APP.UI.showAudioNotWorkingDialog); return room.addTrack(stream); } }).then(() => { @@ -1162,7 +1164,8 @@ export default { }); room.on(ConferenceEvents.LOCK_STATE_CHANGED, (state, error) => { - console.log("Received channel password lock change: ", state, error); + console.log("Received channel password lock change: ", state, + error); APP.UI.markRoomLocked(state); }); diff --git a/lang/main.json b/lang/main.json index 3eadf80cf3..cd17490547 100644 --- a/lang/main.json +++ b/lang/main.json @@ -263,6 +263,7 @@ "micPermissionDeniedError": "You have not granted permission to use your microphone. You can still join the conference but others won't hear you. Use the camera button in the address bar to fix this.", "micNotFoundError": "Microphone was not found.", "micConstraintFailedError": "Yor microphone does not satisfy some of required constraints.", + "micNotSendingData": "Your microphone is not sending data. Please select another device from the settings menu or try to restart your browser / device.", "goToStore": "Go to the webstore", "externalInstallationTitle": "Extension required", "externalInstallationMsg": "You need to install our desktop sharing extension." diff --git a/modules/UI/UI.js b/modules/UI/UI.js index 2eeb5b4492..a1d0936c78 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -1392,6 +1392,18 @@ UI.showDeviceErrorDialog = function (micError, cameraError) { } }; +/** + * Shows error dialog that informs the user that no data is received from the + * microphone. + */ +UI.showAudioNotWorkingDialog = function () { + messageHandler.openMessageDialog( + "dialog.error", + "dialog.micNotSendingData", + null, + null); +}; + UI.updateDevicesAvailability = function (id, devices) { VideoLayout.setDeviceAvailabilityIcons(id, devices); };