fix(remotecontrol): Handle screen sharing cancel
This commit is contained in:
parent
2818520c8f
commit
5ef914602f
|
@ -1520,6 +1520,8 @@ export default {
|
||||||
// asynchronous, but does not return a Promise and is not part of
|
// asynchronous, but does not return a Promise and is not part of
|
||||||
// the current Promise chain.
|
// the current Promise chain.
|
||||||
this._handleScreenSharingError(error);
|
this._handleScreenSharingError(error);
|
||||||
|
|
||||||
|
return Promise.reject(error);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1548,7 +1550,7 @@ export default {
|
||||||
// again switching to the screen sharing.
|
// again switching to the screen sharing.
|
||||||
APP.UI.showExtensionInlineInstallationDialog(
|
APP.UI.showExtensionInlineInstallationDialog(
|
||||||
() => {
|
() => {
|
||||||
this.toggleScreenSharing();
|
this.toggleScreenSharing().catch(() => {});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,9 @@ function shouldBeEnabled() {
|
||||||
*/
|
*/
|
||||||
function toggleScreenSharing() {
|
function toggleScreenSharing() {
|
||||||
if (APP.conference.isDesktopSharingEnabled) {
|
if (APP.conference.isDesktopSharingEnabled) {
|
||||||
APP.conference.toggleScreenSharing();
|
|
||||||
|
// eslint-disable-next-line no-empty-function
|
||||||
|
APP.conference.toggleScreenSharing().catch(() => {});
|
||||||
} else {
|
} else {
|
||||||
initialScreenSharingState = !initialScreenSharingState;
|
initialScreenSharingState = !initialScreenSharingState;
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,7 +153,9 @@ const buttons: Object = {
|
||||||
shortcutAttr: 'toggleDesktopSharingPopover',
|
shortcutAttr: 'toggleDesktopSharingPopover',
|
||||||
shortcutFunc() {
|
shortcutFunc() {
|
||||||
JitsiMeetJS.analytics.sendEvent('shortcut.screen.toggled');
|
JitsiMeetJS.analytics.sendEvent('shortcut.screen.toggled');
|
||||||
APP.conference.toggleScreenSharing();
|
|
||||||
|
// eslint-disable-next-line no-empty-function
|
||||||
|
APP.conference.toggleScreenSharing().catch(() => {});
|
||||||
},
|
},
|
||||||
shortcutDescription: 'keyboardShortcuts.toggleScreensharing',
|
shortcutDescription: 'keyboardShortcuts.toggleScreensharing',
|
||||||
tooltipKey: 'toolbar.sharescreen'
|
tooltipKey: 'toolbar.sharescreen'
|
||||||
|
|
Loading…
Reference in New Issue