|
@@ -19,6 +19,7 @@ class JitsiMediaDevices extends Listenable {
|
19
|
19
|
*/
|
20
|
20
|
constructor() {
|
21
|
21
|
super();
|
|
22
|
+ this._initialized = false;
|
22
|
23
|
this._permissions = {};
|
23
|
24
|
}
|
24
|
25
|
|
|
@@ -26,6 +27,11 @@ class JitsiMediaDevices extends Listenable {
|
26
|
27
|
* Initialize. Start listening for device changes and initialize permissions checks.
|
27
|
28
|
*/
|
28
|
29
|
init() {
|
|
30
|
+ if (this._initialized) {
|
|
31
|
+ return;
|
|
32
|
+ }
|
|
33
|
+ this._initialized = true;
|
|
34
|
+
|
29
|
35
|
RTC.addListener(
|
30
|
36
|
RTCEvents.DEVICE_LIST_CHANGED,
|
31
|
37
|
devices =>
|