diff --git a/conference.js b/conference.js index ea74a557a..7c6a6f249 100644 --- a/conference.js +++ b/conference.js @@ -293,8 +293,13 @@ function createLocalTracks (options, checkForPermissionPrompt) { firefox_fake_device: config.firefox_fake_device, desktopSharingExtensionExternalInstallation: options.desktopSharingExtensionExternalInstallation - }, checkForPermissionPrompt) - .catch(function (err) { + }, checkForPermissionPrompt).then( (tracks) => { + tracks.forEach((track) => { + track.on(TrackEvents.NO_DATA_FROM_SOURCE, + APP.UI.showTrackNotWorkingDialog.bind(null, track)); + }); + return tracks; + }).catch(function (err) { console.error( 'failed to create local tracks', options.devices, err); return Promise.reject(err); @@ -865,8 +870,6 @@ export default { return promise.then(function () { if (stream) { - stream.on(TrackEvents.TRACK_AUDIO_NOT_WORKING, - APP.UI.showAudioNotWorkingDialog); return room.addTrack(stream); } }).then(() => { diff --git a/lang/main.json b/lang/main.json index dcd406475..1ab1db251 100644 --- a/lang/main.json +++ b/lang/main.json @@ -277,6 +277,7 @@ "micNotFoundError": "Microphone was not found.", "micConstraintFailedError": "Yor microphone does not satisfy some of required constraints.", "micNotSendingData": "We are unable to access your microphone. Please select another device from the settings menu or try to restart the application.", + "cameraNotSendingData": "We are unable to access your camera. Please check if another application is using this device, select another device from the settings menu or try to restart the application.", "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 25da99633..79eb79df4 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -1443,12 +1443,13 @@ UI.showDeviceErrorDialog = function (micError, cameraError) { /** * Shows error dialog that informs the user that no data is received from the - * microphone. + * device. */ -UI.showAudioNotWorkingDialog = function () { +UI.showTrackNotWorkingDialog = function (stream) { messageHandler.openMessageDialog( "dialog.error", - "dialog.micNotSendingData", + stream.isAudioTrack()? "dialog.micNotSendingData" : + "dialog.cameraNotSendingData", null, null); };