Przeglądaj źródła

Fixes issue with available devices icons

master
hristoterezov 10 lat temu
rodzic
commit
0e0f7d7ccb
3 zmienionych plików z 13 dodań i 5 usunięć
  1. 1
    1
      index.html
  2. 6
    2
      libs/app.bundle.js
  3. 6
    2
      modules/RTC/RTC.js

+ 1
- 1
index.html Wyświetl plik

@@ -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=48"></script>
22
+    <script src="libs/app.bundle.js?v=49"></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">

+ 6
- 2
libs/app.bundle.js Wyświetl plik

@@ -927,8 +927,12 @@ var RTC = {
927 927
         }
928 928
     },
929 929
     setDeviceAvailability: function (devices) {
930
-        this.devices.audio = (devices && devices.audio === true);
931
-        this.devices.video = (devices && devices.video === true);
930
+        if(!devices)
931
+            return;
932
+        if(devices.audio === true || devices.audio === false)
933
+            this.devices.audio = devices.audio;
934
+        if(devices.video === true || devices.video === false)
935
+            this.devices.video = devices.video;
932 936
         eventEmitter.emit(RTCEvents.AVAILABLE_DEVICES_CHANGED, this.devices);
933 937
     }
934 938
 };

+ 6
- 2
modules/RTC/RTC.js Wyświetl plik

@@ -232,8 +232,12 @@ var RTC = {
232 232
         }
233 233
     },
234 234
     setDeviceAvailability: function (devices) {
235
-        this.devices.audio = (devices && devices.audio === true);
236
-        this.devices.video = (devices && devices.video === true);
235
+        if(!devices)
236
+            return;
237
+        if(devices.audio === true || devices.audio === false)
238
+            this.devices.audio = devices.audio;
239
+        if(devices.video === true || devices.video === false)
240
+            this.devices.video = devices.video;
237 241
         eventEmitter.emit(RTCEvents.AVAILABLE_DEVICES_CHANGED, this.devices);
238 242
     }
239 243
 };

Ładowanie…
Anuluj
Zapisz