Hey y’all, having the same need on my end. I found this. I have not tested it and won’t be testing it right away, but I found that it does compile. It looks like you need to wrap all of your pre-existing Microphone code in platform directives and use this for WebGL. It’s free and MIT.
Thanks for the heads up. I recently rewrote our WebGL webcam backend. On the web, both webcam and microphones are accessed using the same JS API, so that rewrite might help out adding microphone support as well.
Added a TODO to investigate this.
Note that supporting extremely low latency timing sensitive recording on the web will be a no-go. On the web there is currently no good solution for a “realtime audio thread” that native C/C++/C# code could feasibly port to (there’s the now deprecated ScriptProcessorNode and new upcoming AudioWorklet, but they are not portability solutions, also not yet supported in all browsers).
This is great news. There is a large group awaiting this feature. Any timelines when you think this might become available? Web makes corporates adopt solutions more easily due to higher security. In this absence of it my solution takes the standalone exe, or native app approach which is a hindrance. Looking forward to this feature in Unity.
+1, Looking forward for the support from Unity on this issue. Have been building WebGL based collaboration tool and usage of microphone is vital. We might have to switch to other tool or build target because of this issue
I see you really meant it!
After 10 years, this is a bit ridiculous. I have very little hope this will be of any use, but please. Consider doing it. I also wanted it.
A really great way that’ll help us prioritize supporting microphone for WebGL is adding/voting for it in productboard here: Platforms roadmap | Unity that way we can make a case for dedicating resources to it, especially given all the other big features we’re working on.