diff --git a/packages/flat-components/src/components/DeviceTestPage/index.tsx b/packages/flat-components/src/components/DeviceTestPage/index.tsx index dba1fd7877d..d10fc14a757 100644 --- a/packages/flat-components/src/components/DeviceTestPage/index.tsx +++ b/packages/flat-components/src/components/DeviceTestPage/index.tsx @@ -24,6 +24,7 @@ export interface DeviceTestPanelProps { isSpeakerAccessible: boolean; isMicrophoneAccessible: boolean; cameraVideoStreamRef: React.RefObject; + isTurnOffDeviceTest: boolean; setSpeakerDevice: (deviceID: string) => void; setCameraDevice: (deviceID: string) => void; setMicrophoneDevice: (deviceID: string) => void; @@ -31,6 +32,10 @@ export interface DeviceTestPanelProps { stopSpeakerTest: () => void; toggleDeviceTest: () => void; joinRoom: () => void; + autoMicOn: boolean; + autoCameraOn: boolean; + toggleAutoMicOn: () => void; + toggleAutoCameraOn: () => void; } export const DeviceTestPanel: React.FC = ({ @@ -47,6 +52,7 @@ export const DeviceTestPanel: React.FC = ({ isSpeakerAccessible, isMicrophoneAccessible, cameraVideoStreamRef, + isTurnOffDeviceTest, setCameraDevice, setMicrophoneDevice, setSpeakerDevice, @@ -54,6 +60,10 @@ export const DeviceTestPanel: React.FC = ({ stopSpeakerTest, toggleDeviceTest, joinRoom, + autoMicOn, + autoCameraOn, + toggleAutoMicOn, + toggleAutoCameraOn, }) => { const t = useTranslate(); return ( @@ -87,11 +97,24 @@ export const DeviceTestPanel: React.FC = ({ microphoneVolume={microphoneVolume} setMicrophoneDevice={setMicrophoneDevice} /> +
+
+ {t("join-options")} +
+ + {t("turn-on-the-microphone")} + + + {t("turn-on-the-camera")} + +
- {t("close-tip")} + + {t("close-tip")} +
,
+
+
{t("join-options")}
+ + preferencesStore.updateAutoMicOn(!preferencesStore.autoMicOn) + } + > + {t("turn-on-the-microphone")} + + + preferencesStore.updateAutoCameraOn(!preferencesStore.autoCameraOn) + } + > + {t("turn-on-the-camera")} + +
{t("device-test-option")}