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,
|
||||
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(() => {
|
||||
|
|
|
@ -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."
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue