Переглянути джерело

fix(remotecontrol): Handle screen sharing cancel

j8
hristoterezov 8 роки тому
джерело
коміт
5ef914602f

+ 3
- 1
conference.js Переглянути файл

@@ -1520,6 +1520,8 @@ export default {
1520 1520
             // asynchronous, but does not return a Promise and is not part of
1521 1521
             // the current Promise chain.
1522 1522
             this._handleScreenSharingError(error);
1523
+
1524
+            return Promise.reject(error);
1523 1525
         });
1524 1526
     },
1525 1527
 
@@ -1548,7 +1550,7 @@ export default {
1548 1550
             // again switching to the screen sharing.
1549 1551
             APP.UI.showExtensionInlineInstallationDialog(
1550 1552
                 () => {
1551
-                    this.toggleScreenSharing();
1553
+                    this.toggleScreenSharing().catch(() => {});
1552 1554
                 }
1553 1555
             );
1554 1556
 

+ 3
- 1
modules/API/API.js Переглянути файл

@@ -131,7 +131,9 @@ function shouldBeEnabled() {
131 131
  */
132 132
 function toggleScreenSharing() {
133 133
     if (APP.conference.isDesktopSharingEnabled) {
134
-        APP.conference.toggleScreenSharing();
134
+
135
+        // eslint-disable-next-line no-empty-function
136
+        APP.conference.toggleScreenSharing().catch(() => {});
135 137
     } else {
136 138
         initialScreenSharingState = !initialScreenSharingState;
137 139
     }

+ 3
- 1
react/features/toolbox/defaultToolbarButtons.js Переглянути файл

@@ -153,7 +153,9 @@ const buttons: Object = {
153 153
         shortcutAttr: 'toggleDesktopSharingPopover',
154 154
         shortcutFunc() {
155 155
             JitsiMeetJS.analytics.sendEvent('shortcut.screen.toggled');
156
-            APP.conference.toggleScreenSharing();
156
+
157
+            // eslint-disable-next-line no-empty-function
158
+            APP.conference.toggleScreenSharing().catch(() => {});
157 159
         },
158 160
         shortcutDescription: 'keyboardShortcuts.toggleScreensharing',
159 161
         tooltipKey: 'toolbar.sharescreen'

Завантаження…
Відмінити
Зберегти