feat(UI): Add UI support for camera issue detection
This commit is contained in:
parent
84983c341e
commit
abe216a0bb
|
@ -293,8 +293,13 @@ function createLocalTracks (options, checkForPermissionPrompt) {
|
||||||
firefox_fake_device: config.firefox_fake_device,
|
firefox_fake_device: config.firefox_fake_device,
|
||||||
desktopSharingExtensionExternalInstallation:
|
desktopSharingExtensionExternalInstallation:
|
||||||
options.desktopSharingExtensionExternalInstallation
|
options.desktopSharingExtensionExternalInstallation
|
||||||
}, checkForPermissionPrompt)
|
}, checkForPermissionPrompt).then( (tracks) => {
|
||||||
.catch(function (err) {
|
tracks.forEach((track) => {
|
||||||
|
track.on(TrackEvents.NO_DATA_FROM_SOURCE,
|
||||||
|
APP.UI.showTrackNotWorkingDialog.bind(null, track));
|
||||||
|
});
|
||||||
|
return tracks;
|
||||||
|
}).catch(function (err) {
|
||||||
console.error(
|
console.error(
|
||||||
'failed to create local tracks', options.devices, err);
|
'failed to create local tracks', options.devices, err);
|
||||||
return Promise.reject(err);
|
return Promise.reject(err);
|
||||||
|
@ -865,8 +870,6 @@ export default {
|
||||||
|
|
||||||
return promise.then(function () {
|
return promise.then(function () {
|
||||||
if (stream) {
|
if (stream) {
|
||||||
stream.on(TrackEvents.TRACK_AUDIO_NOT_WORKING,
|
|
||||||
APP.UI.showAudioNotWorkingDialog);
|
|
||||||
return room.addTrack(stream);
|
return room.addTrack(stream);
|
||||||
}
|
}
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
|
|
@ -277,6 +277,7 @@
|
||||||
"micNotFoundError": "Microphone was not found.",
|
"micNotFoundError": "Microphone was not found.",
|
||||||
"micConstraintFailedError": "Yor microphone does not satisfy some of required constraints.",
|
"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.",
|
"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",
|
"goToStore": "Go to the webstore",
|
||||||
"externalInstallationTitle": "Extension required",
|
"externalInstallationTitle": "Extension required",
|
||||||
"externalInstallationMsg": "You need to install our desktop sharing extension."
|
"externalInstallationMsg": "You need to install our desktop sharing extension."
|
||||||
|
|
|
@ -1443,12 +1443,13 @@ UI.showDeviceErrorDialog = function (micError, cameraError) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows error dialog that informs the user that no data is received from the
|
* 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(
|
messageHandler.openMessageDialog(
|
||||||
"dialog.error",
|
"dialog.error",
|
||||||
"dialog.micNotSendingData",
|
stream.isAudioTrack()? "dialog.micNotSendingData" :
|
||||||
|
"dialog.cameraNotSendingData",
|
||||||
null,
|
null,
|
||||||
null);
|
null);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue