Use initial audio/video device ids

This commit is contained in:
Robert Long 2021-11-24 12:44:09 -08:00
parent e6c93c6b80
commit f0d5977e88

View File

@ -286,11 +286,15 @@ function RoomSetupView({
function useMediaHandler(client) {
const [{ audioInput, videoInput, audioInputs, videoInputs }, setState] =
useState({
audioInput: null,
videoInput: null,
audioInputs: [],
videoInputs: [],
useState(() => {
const mediaHandler = client.getMediaHandler();
return {
audioInput: mediaHandler.audioInput,
videoInput: mediaHandler.videoInput,
audioInputs: [],
videoInputs: [],
};
});
useEffect(() => {