This message was deleted.
# helpdesk
s
This message was deleted.
d
Hey Dennis, take a look at PreJoin example. Basically, before the user connects to the session, you'd need to remember their preferred deviceIds in your component. Then pass it to the Room component once a user connects.
s
Thanks @dry-elephant-14928 for answering. Maybe I’m blind, but in that example is no audio output device used or changeable, right?
d
Hey Dennis, you are not.. Handling audio output should be similar though (persisting the state and setting it once the user joined the room). Am I misunderstanding what you are looking to do?
s
How can I get and change the output device (for local tracks) while NOT being in a room?
p
within a browser you (currently) do not have the ability to set a general audio output device from js. The output device will always be tied to existing audio elements/streams. What @dry-elephant-14928 is suggesting to let users choose a desired output device ahead of time, and once you have your room set up, set that user preference on the room.
s
So I can’t test the chosen output device before joining a room?
p
you can in theory, you just have to actually create an audio track, attach it to an audio element and set the desired device there, although you are right, our APIs currently do not support that usecase very well, it would be more low level.
s
Thanks 🙏 @polite-kilobyte-67570 I think that was/is my question. Do you know how to do it even it is outside of scope currently of your library? Are there plans so support that because I think that is not a edge case scenario “testing my chosen output device before joining a room”? If you don’t have plans to integrate it or I’m not able to create a pull request to do that (also an option) maybe documenting that low level way is also worth it somewhere.
p
In order to prevent loopbacks, I think most of the applications around don’t actually use the mic input to test output devices, but some pre-recorded sound to play back via the selected output. A rather complete example that’s more low level would be this one: https://webrtc.github.io/samples/src/content/devices/multi/
🙏 1
s
Thank you very much 🙂 I will implement this and test it. Really cool!Thanks 🙏 I still think it would be useful for your users to either implement something like this in the/an example and/or document it somewhere. Such a feature always comes more or stands out you so that one has a better UX.
👍 1