diff --git a/bigbluebutton-html5/imports/ui/components/audio/device-selector/component.jsx b/bigbluebutton-html5/imports/ui/components/audio/device-selector/component.jsx index 0c1f891a9b69153a7d60855e0d255d5a033df517..d1f85ef2674845925339877993de71c9302b569c 100755 --- a/bigbluebutton-html5/imports/ui/components/audio/device-selector/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/audio/device-selector/component.jsx @@ -39,7 +39,7 @@ class DeviceSelector extends Component { options: devices.map((d, i) => ({ label: d.label || `${this.props.kind} - ${i}`, value: d.deviceId, - })) + })), }); } @@ -64,14 +64,19 @@ class DeviceSelector extends Component { <select {...props} value={value} - onChange={this.handleSelectChange}> - {options.map((option, i) => ( - <option - key={i} - value={option.value}> - {option.label} - </option> - ))} + onChange={this.handleSelectChange} + disabled={!options.length}> + { + options.length ? + options.map((option, i) => ( + <option + key={i} + value={option.value}> + {option.label} + </option> + )) : + <option value="not-found">{`no ${kind} found`}</option> + } </select> ); }