Sfoglia il codice sorgente

Fixes issue with desktop sharing when the user click Cancel on the popup window.

j8
hristoterezov 10 anni fa
parent
commit
d25a9b0e41
3 ha cambiato i file con 17 aggiunte e 7 eliminazioni
  1. 1
    1
      index.html
  2. 8
    3
      libs/app.bundle.js
  3. 8
    3
      modules/desktopsharing/desktopsharing.js

+ 1
- 1
index.html Vedi File

@@ -19,7 +19,7 @@
19 19
     <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
20 20
     <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
21 21
     <script src="interface_config.js?v=5"></script>
22
-    <script src="libs/app.bundle.js?v=49"></script>
22
+    <script src="libs/app.bundle.js?v=50"></script>
23 23
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
24 24
     <link rel="stylesheet" href="css/font.css?v=6"/>
25 25
     <link rel="stylesheet" href="css/toastr.css?v=1">

+ 8
- 3
libs/app.bundle.js Vedi File

@@ -9577,13 +9577,18 @@ function initInlineInstalls()
9577 9577
     $("link[rel=chrome-webstore-item]").attr("href", getWebStoreInstallUrl());
9578 9578
 }
9579 9579
 
9580
-function getSwitchStreamFailed(error) {
9580
+function getVideoStreamFailed(error) {
9581 9581
     console.error("Failed to obtain the stream to switch to", error);
9582 9582
     switchInProgress = false;
9583 9583
     isUsingScreenStream = false;
9584 9584
     newStreamCreated(null);
9585 9585
 }
9586 9586
 
9587
+function getDesktopStreamFailed(error) {
9588
+    console.error("Failed to obtain the stream to switch to", error);
9589
+    switchInProgress = false;
9590
+}
9591
+
9587 9592
 function streamSwitchDone() {
9588 9593
     switchInProgress = false;
9589 9594
     eventEmitter.emit(
@@ -9683,7 +9688,7 @@ module.exports = {
9683 9688
                     );
9684 9689
                     newStreamCreated(stream);
9685 9690
                 },
9686
-                getSwitchStreamFailed);
9691
+                getDesktopStreamFailed);
9687 9692
         } else {
9688 9693
             // Disable screen stream
9689 9694
             APP.RTC.getUserMediaWithConstraints(
@@ -9693,7 +9698,7 @@ module.exports = {
9693 9698
                     isUsingScreenStream = false;
9694 9699
                     newStreamCreated(stream);
9695 9700
                 },
9696
-                getSwitchStreamFailed, config.resolution || '360'
9701
+                getVideoStreamFailed, config.resolution || '360'
9697 9702
             );
9698 9703
         }
9699 9704
     }

+ 8
- 3
modules/desktopsharing/desktopsharing.js Vedi File

@@ -237,13 +237,18 @@ function initInlineInstalls()
237 237
     $("link[rel=chrome-webstore-item]").attr("href", getWebStoreInstallUrl());
238 238
 }
239 239
 
240
-function getSwitchStreamFailed(error) {
240
+function getVideoStreamFailed(error) {
241 241
     console.error("Failed to obtain the stream to switch to", error);
242 242
     switchInProgress = false;
243 243
     isUsingScreenStream = false;
244 244
     newStreamCreated(null);
245 245
 }
246 246
 
247
+function getDesktopStreamFailed(error) {
248
+    console.error("Failed to obtain the stream to switch to", error);
249
+    switchInProgress = false;
250
+}
251
+
247 252
 function streamSwitchDone() {
248 253
     switchInProgress = false;
249 254
     eventEmitter.emit(
@@ -343,7 +348,7 @@ module.exports = {
343 348
                     );
344 349
                     newStreamCreated(stream);
345 350
                 },
346
-                getSwitchStreamFailed);
351
+                getDesktopStreamFailed);
347 352
         } else {
348 353
             // Disable screen stream
349 354
             APP.RTC.getUserMediaWithConstraints(
@@ -353,7 +358,7 @@ module.exports = {
353 358
                     isUsingScreenStream = false;
354 359
                     newStreamCreated(stream);
355 360
                 },
356
-                getSwitchStreamFailed, config.resolution || '360'
361
+                getVideoStreamFailed, config.resolution || '360'
357 362
             );
358 363
         }
359 364
     }

Loading…
Annulla
Salva