Hey there, we use a bunch of Livekit's React compo...
# sdk-web
g
Hey there, we use a bunch of Livekit's React components. However, since a recent update to Chrome, we've noticed that we can't change device source when using the
MediaDeviceSelect
or the
LocalTrack.setDeviceId
method. Safari & Firefox still work as expected. I'm curious if you're aware of this, and have any tips for how we can work around the issue? I'm keen to continue using these components, and am very hesitant to have to rip them out / use our own custom components. πŸ™
πŸ‘€ 1
b
Hi @tall-belgium-91876 we are also seeing this issue with the
useMediaDeviceSelect
hook, after getting the first device, switching will not work until chrome mic permissions are manually reset
If possible, could you include a livekit client dev to this thread that might be able to help us create a workaround?
h
I'm also a livekit user, but I didn't got users reporting this issue on our app yet. Do you see any error or log message when trying to switch media devices? It will help me to look at our errors and logs and see if it happening to our users as well
p
Hi! could you share which versions of react components and livekit-client you are using? Chrome changed their getUserMedia handling and we’ve addressed this some time ago by defaulting to
exact
device matching in our components and the underlying livekit-client lib.
πŸ‘€ 1
πŸ’― 1
πŸ™Œ 1
g
hello! Thanks for getting back to me/us! The packages we're using are:
Copy code
"livekit-client": "2.7.5",
    "@livekit/components-react": "2.8.1",
I can see that we are a few versions behind, I'll update out packages and see if the issue is resolved πŸ™
hey @polite-kilobyte-67570 - I've upgraded the two packages above, and the device change issue - while inside of a room - has been fixed - thank you! However, we also use the
setDeviceId
when working with a LocalTrack, and it still has the issue mentioned.
p
thanks for confirming! Due to Chrome’s change, you currently have to provide the
exact
constraint manually to
setDeviceId
. Which would look something like
Copy code
setDeviceId({ exact: "myDeviceId" });
πŸ™ 2
πŸ™Œ 2
g
that worked πŸŽ‰ thanks so much @polite-kilobyte-67570 πŸ™
πŸ™Œ 1