VRFS-633 another bug fix

This commit is contained in:
Brian Smith 2013-09-09 20:47:01 -04:00
parent 4b17892f2c
commit 0da48eb447
1 changed files with 9 additions and 2 deletions

View File

@ -767,11 +767,18 @@
var $option1 = $('#voice-chat-type > option[value="1"]');
// remove Session Audio option from voice chat if none are available
if (chatUnassignedList.length === 0 && originalVoiceChat != VOICE_CHAT.SESSION) {
// remove Session Audio option from voice chat if none are available and not already assigned
if (unusedAudioOutputs.length === 0 && chatAssignedList.length === 0) {
logger.debug("Removing Option 1 from Voice Chat dropdown.");
$option1.remove();
}
// add it if it doesn't exist
else {
if ($option1.length === 0) {
logger.debug("Adding Option 1 back to Voice Chat dropdown.");
$('#voice-chat-type').prepend('<option value="1">Use an input on my session audio device for chat</option>');
}
}
}
this.initialize = function() {