소스 검색

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

j8
hristoterezov 10 년 전
부모
커밋
d25a9b0e41
3개의 변경된 파일17개의 추가작업 그리고 7개의 파일을 삭제
  1. 1
    1
      index.html
  2. 8
    3
      libs/app.bundle.js
  3. 8
    3
      modules/desktopsharing/desktopsharing.js

+ 1
- 1
index.html 파일 보기

19
     <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
19
     <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
20
     <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
20
     <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
21
     <script src="interface_config.js?v=5"></script>
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
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
23
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
24
     <link rel="stylesheet" href="css/font.css?v=6"/>
24
     <link rel="stylesheet" href="css/font.css?v=6"/>
25
     <link rel="stylesheet" href="css/toastr.css?v=1">
25
     <link rel="stylesheet" href="css/toastr.css?v=1">

+ 8
- 3
libs/app.bundle.js 파일 보기

9577
     $("link[rel=chrome-webstore-item]").attr("href", getWebStoreInstallUrl());
9577
     $("link[rel=chrome-webstore-item]").attr("href", getWebStoreInstallUrl());
9578
 }
9578
 }
9579
 
9579
 
9580
-function getSwitchStreamFailed(error) {
9580
+function getVideoStreamFailed(error) {
9581
     console.error("Failed to obtain the stream to switch to", error);
9581
     console.error("Failed to obtain the stream to switch to", error);
9582
     switchInProgress = false;
9582
     switchInProgress = false;
9583
     isUsingScreenStream = false;
9583
     isUsingScreenStream = false;
9584
     newStreamCreated(null);
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
 function streamSwitchDone() {
9592
 function streamSwitchDone() {
9588
     switchInProgress = false;
9593
     switchInProgress = false;
9589
     eventEmitter.emit(
9594
     eventEmitter.emit(
9683
                     );
9688
                     );
9684
                     newStreamCreated(stream);
9689
                     newStreamCreated(stream);
9685
                 },
9690
                 },
9686
-                getSwitchStreamFailed);
9691
+                getDesktopStreamFailed);
9687
         } else {
9692
         } else {
9688
             // Disable screen stream
9693
             // Disable screen stream
9689
             APP.RTC.getUserMediaWithConstraints(
9694
             APP.RTC.getUserMediaWithConstraints(
9693
                     isUsingScreenStream = false;
9698
                     isUsingScreenStream = false;
9694
                     newStreamCreated(stream);
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 파일 보기

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

Loading…
취소
저장