Fixes issue with available devices icons

This commit is contained in:
hristoterezov 2015-03-27 15:56:17 +02:00
parent 58cc21d417
commit 0e0f7d7ccb
3 changed files with 13 additions and 5 deletions

View File

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

View File

@ -927,8 +927,12 @@ var RTC = {
}
},
setDeviceAvailability: function (devices) {
this.devices.audio = (devices && devices.audio === true);
this.devices.video = (devices && devices.video === true);
if(!devices)
return;
if(devices.audio === true || devices.audio === false)
this.devices.audio = devices.audio;
if(devices.video === true || devices.video === false)
this.devices.video = devices.video;
eventEmitter.emit(RTCEvents.AVAILABLE_DEVICES_CHANGED, this.devices);
}
};

View File

@ -232,8 +232,12 @@ var RTC = {
}
},
setDeviceAvailability: function (devices) {
this.devices.audio = (devices && devices.audio === true);
this.devices.video = (devices && devices.video === true);
if(!devices)
return;
if(devices.audio === true || devices.audio === false)
this.devices.audio = devices.audio;
if(devices.video === true || devices.video === false)
this.devices.video = devices.video;
eventEmitter.emit(RTCEvents.AVAILABLE_DEVICES_CHANGED, this.devices);
}
};