AskForMediaAccess - How to use in Linux?

Hi,
I’m looking into the doc regarding media access (microphone), and this API systemPreferences.askForMediaAccess says it only supports macOS.
I was wondering if there is any way to make this work on Windows and Linux.