|
|
|
@ -10,6 +10,7 @@ import { |
|
|
|
|
setAudioOutputDevice as setAudioOutputDeviceAction |
|
|
|
|
} from '../../../../base/devices'; |
|
|
|
|
import { connect } from '../../../../base/redux'; |
|
|
|
|
import { SMALL_MOBILE_WIDTH } from '../../../../base/responsive-ui/constants'; |
|
|
|
|
import { |
|
|
|
|
getCurrentMicDeviceId, |
|
|
|
|
getCurrentOutputDeviceId |
|
|
|
@ -36,6 +37,11 @@ type Props = AudioSettingsContentProps & { |
|
|
|
|
* Callback executed when the popup closes. |
|
|
|
|
*/ |
|
|
|
|
onClose: Function, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* The popup placement enum value. |
|
|
|
|
*/ |
|
|
|
|
popupPlacement: string |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -52,7 +58,8 @@ function AudioSettingsPopup({ |
|
|
|
|
setAudioInputDevice, |
|
|
|
|
setAudioOutputDevice, |
|
|
|
|
onClose, |
|
|
|
|
outputDevices |
|
|
|
|
outputDevices, |
|
|
|
|
popupPlacement |
|
|
|
|
}: Props) { |
|
|
|
|
return ( |
|
|
|
|
<div className = 'audio-preview'> |
|
|
|
@ -66,7 +73,7 @@ function AudioSettingsPopup({ |
|
|
|
|
setAudioOutputDevice = { setAudioOutputDevice } /> } |
|
|
|
|
isOpen = { isOpen } |
|
|
|
|
onClose = { onClose } |
|
|
|
|
placement = 'top-start'> |
|
|
|
|
placement = { popupPlacement }> |
|
|
|
|
{children} |
|
|
|
|
</InlineDialog> |
|
|
|
|
</div> |
|
|
|
@ -80,7 +87,10 @@ function AudioSettingsPopup({ |
|
|
|
|
* @returns {Object} |
|
|
|
|
*/ |
|
|
|
|
function mapStateToProps(state) { |
|
|
|
|
const { clientWidth } = state['features/base/responsive-ui']; |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
popupPlacement: clientWidth <= SMALL_MOBILE_WIDTH ? 'auto' : 'top-start', |
|
|
|
|
currentMicDeviceId: getCurrentMicDeviceId(state), |
|
|
|
|
currentOutputDeviceId: getCurrentOutputDeviceId(state), |
|
|
|
|
isOpen: getAudioSettingsVisibility(state), |
|
|
|
|