Use special JitsiTrackError object instead just strings for various types of errors that may happen to JitsiTrack
This commit is contained in:
parent
064917886e
commit
48b219111d
|
@ -977,18 +977,21 @@ export default {
|
|||
this.videoSwitchInProgress = false;
|
||||
this.toggleScreenSharing(false);
|
||||
|
||||
if(err === TrackErrors.CHROME_EXTENSION_USER_CANCELED)
|
||||
if (err.name === TrackErrors.CHROME_EXTENSION_USER_CANCELED) {
|
||||
return;
|
||||
}
|
||||
|
||||
console.error('failed to share local desktop', err);
|
||||
|
||||
if (err === TrackErrors.FIREFOX_EXTENSION_NEEDED) {
|
||||
if (err.name === TrackErrors.FIREFOX_EXTENSION_NEEDED) {
|
||||
APP.UI.showExtensionRequiredDialog(
|
||||
config.desktopSharingFirefoxExtensionURL
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: handle Permission error
|
||||
|
||||
// Handling:
|
||||
// TrackErrors.CHROME_EXTENSION_INSTALLATION_ERROR
|
||||
// TrackErrors.GENERAL
|
||||
|
|
|
@ -36,7 +36,10 @@
|
|||
};
|
||||
navigator.webkitGetUserMedia({
|
||||
audio: false, video: vid_constraint
|
||||
}, callback, errorCallback);
|
||||
}, callback, function (error) {
|
||||
errorCallback &&
|
||||
errorCallback(error, vid_constraint);
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue