How do I change the Speaker and Mic using UI options

Which Method i can use to change the Selected Mic or Speaker Options

Original Post on Discord

by user 406778568597831690

Hi, are you using a built-in component or something else?

i am trying to figure out the option, I am trying this using HTML, if its possible with Builtin Options or any other NPM package share that it will be great

by user 406778568597831690

We have a VOIP and Screensharing component but they dont expose these options right now.

What’s your goal? Do you want to build an audio/video chat or presentation app?

Here’s how you can get access to the connected devices. What we use for networking the audio and video streams is peerjs (if that is your goal) Choose cameras, microphones and speakers from your web app  |  Blog  |  Chrome for Developers
But perhaps we can add an option to our built-in components

its a simple multiplayer lobby so far but want to give options to choose preferred Device options

by user 406778568597831690

Changing the Speaker requires, the Element as of now i am trying to figure out which element is responsible for audio in the Needle Scene or its the needle Element.

by user 406778568597831690

if you have any information on which HTML Element is handling or How to access Audio Context please share that

by user 406778568597831690

It’s not HTML element - there are two components that you can add to your scene that are currently shipped with Needle Engine: one is named Voip and one is Screensharing

yes, that is integrated but inside VOIP needle is creating the Audio element for web as that is required to play audio but when i search for that component using "document.querySelector(“audio”) its returning undefined, that’s where i am facing issues in order to the input or output device i need to know which element is being used.

or at least i believe that’s the approach, if there is any other approach, please let me know.

by user 406778568597831690