|
|
@ -8,6 +8,7 @@ import { |
|
|
|
setVideoInputDeviceAndUpdateSettings |
|
|
|
setVideoInputDeviceAndUpdateSettings |
|
|
|
} from '../../../../base/devices'; |
|
|
|
} from '../../../../base/devices'; |
|
|
|
import { connect } from '../../../../base/redux'; |
|
|
|
import { connect } from '../../../../base/redux'; |
|
|
|
|
|
|
|
import { SMALL_MOBILE_WIDTH } from '../../../../base/responsive-ui/constants'; |
|
|
|
import { getCurrentCameraDeviceId } from '../../../../base/settings'; |
|
|
|
import { getCurrentCameraDeviceId } from '../../../../base/settings'; |
|
|
|
import { toggleVideoSettings } from '../../../actions'; |
|
|
|
import { toggleVideoSettings } from '../../../actions'; |
|
|
|
import { getVideoSettingsVisibility } from '../../../functions'; |
|
|
|
import { getVideoSettingsVisibility } from '../../../functions'; |
|
|
@ -31,6 +32,11 @@ type Props = VideoSettingsProps & { |
|
|
|
* Callback executed when the popup closes. |
|
|
|
* Callback executed when the popup closes. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
onClose: Function, |
|
|
|
onClose: Function, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* The popup placement enum value. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
popupPlacement: string |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -43,6 +49,7 @@ function VideoSettingsPopup({ |
|
|
|
children, |
|
|
|
children, |
|
|
|
isOpen, |
|
|
|
isOpen, |
|
|
|
onClose, |
|
|
|
onClose, |
|
|
|
|
|
|
|
popupPlacement, |
|
|
|
setVideoInputDevice, |
|
|
|
setVideoInputDevice, |
|
|
|
videoDeviceIds |
|
|
|
videoDeviceIds |
|
|
|
}: Props) { |
|
|
|
}: Props) { |
|
|
@ -56,7 +63,7 @@ function VideoSettingsPopup({ |
|
|
|
videoDeviceIds = { videoDeviceIds } /> } |
|
|
|
videoDeviceIds = { videoDeviceIds } /> } |
|
|
|
isOpen = { isOpen } |
|
|
|
isOpen = { isOpen } |
|
|
|
onClose = { onClose } |
|
|
|
onClose = { onClose } |
|
|
|
placement = 'top-start'> |
|
|
|
placement = { popupPlacement }> |
|
|
|
{ children } |
|
|
|
{ children } |
|
|
|
</InlineDialog> |
|
|
|
</InlineDialog> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -71,9 +78,12 @@ function VideoSettingsPopup({ |
|
|
|
* @returns {Object} |
|
|
|
* @returns {Object} |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function mapStateToProps(state) { |
|
|
|
function mapStateToProps(state) { |
|
|
|
|
|
|
|
const { clientWidth } = state['features/base/responsive-ui']; |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
currentCameraDeviceId: getCurrentCameraDeviceId(state), |
|
|
|
currentCameraDeviceId: getCurrentCameraDeviceId(state), |
|
|
|
isOpen: getVideoSettingsVisibility(state), |
|
|
|
isOpen: getVideoSettingsVisibility(state), |
|
|
|
|
|
|
|
popupPlacement: clientWidth <= SMALL_MOBILE_WIDTH ? 'auto' : 'top-start', |
|
|
|
videoDeviceIds: getVideoDeviceIds(state) |
|
|
|
videoDeviceIds: getVideoDeviceIds(state) |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|