Hi All,
I want to give option to select Audio output devices for user. For Microphone, I used Microphone class to list out the devices and set it as selected. But I could not found any class to get speaker devices list. Please guide me to do that or let me know about the feasibility.
Thanks in advance.
1 Like
Hello, Did you found any way for getting the list of speaker devices list. If so, please provide it.
Thanks in advance
Hi all,
To recap, I’m looking for a way to provide users with the option to select their audio output device within a Unity WebGL application. While I have successfully used the Microphone class to list and select microphone devices, I have not found a similar solution for speaker devices.
If anyone has any insights, suggestions, or alternative approaches that might help me achieve this functionality in Unity WebGL, I would greatly appreciate your input. Even if you don’t have a direct solution, any guidance or pointers in the right direction would be valuable.
Thank in advance and I’m looking forward to your responses and appreciate your support.
Unity always uses the default output device and there’s no way to change that.
It is possible when using plugins like FMOD or Wwise but their WebGL support is limited and I don’t know if they support changing output devices there.
The main issue is the limited API support in browsers. There has been some work but part of the API is only supported in Firefox nightly, another part is in Chrome but not in Firefox/Safari. These APIs also require to ask for permission first and would need to have a specific permission flow and handling in your app.
In short, no, there’s no way to change audio output in Unity WebGL. You could implement your own audio engine in JavaScript or try to hack Unity to implement the experimental APIs mentioned above but that would be anything but simple – and still only work in some browsers.