Use initial audio/video device ids
This commit is contained in:
parent
e6c93c6b80
commit
f0d5977e88
1 changed files with 9 additions and 5 deletions
14
src/Room.jsx
14
src/Room.jsx
|
@ -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(() => {
|
||||
|
|
Loading…
Reference in a new issue