From 6426a4d89e0c44a7bc92a0b254a51263f678cbac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5var=20Aamb=C3=B8=20Fosstveit?= Date: Fri, 22 May 2020 19:22:42 +0200 Subject: [PATCH] Hide advanced video settings by default, ref #415 --- app/src/components/Settings/MediaSettings.js | 478 ++++++++++--------- app/src/translations/cn.json | 1 + app/src/translations/cs.json | 1 + app/src/translations/de.json | 1 + app/src/translations/dk.json | 1 + app/src/translations/el.json | 1 + app/src/translations/en.json | 1 + app/src/translations/es.json | 1 + app/src/translations/fr.json | 1 + app/src/translations/hr.json | 1 + app/src/translations/hu.json | 1 + app/src/translations/it.json | 1 + app/src/translations/lv.json | 1 + app/src/translations/nb.json | 1 + app/src/translations/pl.json | 1 + app/src/translations/pt.json | 1 + app/src/translations/ro.json | 1 + app/src/translations/tr.json | 1 + app/src/translations/tw.json | 1 + app/src/translations/uk.json | 1 + 20 files changed, 261 insertions(+), 236 deletions(-) diff --git a/app/src/components/Settings/MediaSettings.js b/app/src/components/Settings/MediaSettings.js index ae73613..a4e057f 100644 --- a/app/src/components/Settings/MediaSettings.js +++ b/app/src/components/Settings/MediaSettings.js @@ -95,6 +95,9 @@ const MediaSettings = ({ { const intl = useIntl(); + const [ audioSettingsOpen, setAudioSettingsOpen ] = React.useState(false); + const [ videoSettingsOpen, setVideoSettingsOpen ] = React.useState(false); + const resolutions = [ { value : 'low', label : intl.formatMessage({ @@ -152,13 +155,6 @@ const MediaSettings = ({ else audioOutputDevices = []; - const [ open, setOpen ] = React.useState(true); - - const advancedAudioSettings = () => - { - setOpen(!open); - }; - return (
@@ -205,118 +201,130 @@ const MediaSettings = ({ } - - - { - if (event.target.value) - roomClient.updateWebcam({ newFrameRate: event.target.value }); - }} - name='Frame rate' - autoWidth - className={classes.selectEmpty} - > - { [ 1, 5, 10, 15, 20, 25, 30 ].map((frameRate) => - { - return ( - - {frameRate} - - ); - })} - - - - - - - - - - - - - - - - - + {videoSettingsOpen ? : } + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -357,10 +365,8 @@ const MediaSettings = ({ } -
- { 'audioOutputSupportedBrowsers' in window.config && - window.config.audioOutputSupportedBrowsers.includes(me.browser.name) && -
+ { 'audioOutputSupportedBrowsers' in window.config && + window.config.audioOutputSupportedBrowsers.includes(me.browser.name) &&