Error: Failed to start MediaRecorder: Failed to execute 'getUserMedia' on "MediaDevices": getUserMedia is not supported.
Original: https://github.com/MKSx/Send-Audio-Plugin-BetterDiscord Error on line 1026.
UPD: getUserMedia() disabled in discord, alternative:https://github.com/l-Nuril-l/Voice-Messages-Plugin-BetterDiscord
Code with problem:
navigator.mediaDevices.getUserMedia({audio: 'true'}).then(s => {
plugin.media = new MediaRecorder(s);
Logger.log("MediaRecorder started successfully");
})
Basically, better discord is essentially an application running in something like a chrome browser. You can validate this by hitting CTRL
+SHIFT
+I
.
The problem looks like a security issue in chrome related to accessing the microphone. I will also have a look in the following days, but the following solutions might work for you:
I saw that you can potentially add flags to the discord app from the following link: https://www.reddit.com/r/discordapp/comments/91btrn/adding_electron_flags_to_discord_startup/
There a full list of potential command line switches @ https://peter.sh/experiments/chromium-command-line-switches/ .
You probably need to set the correct URL/domain after the parameter, e.g.
Discord.exe --unsafely-treat-insecure-origin-as-secure=
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With