mdn / webaudio-examples

Code examples that accompany the MDN Web Docs pages relating to Web Audio.
https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API
Creative Commons Zero v1.0 Universal
1.28k stars 433 forks source link

createMediaElementSource() requires prior call to getUserMedia() using Safari #56

Open creaktive opened 2 years ago

creaktive commented 2 years ago

media-source-buffer stays silent on Safari, unless this line is added (and the permission to use microphone is granted):

navigator.mediaDevices.getUserMedia({ audio: true, video: false });

I could not figure out whether this is a bug on Safari, or is it an undocumented behavior.

creaktive commented 2 years ago

Worth mentioning: even with the microphone permission granted, the sound clicks and pops so it is overall barely usable. These are known bugs, possibly unrelated to the permission: https://bugs.webkit.org/buglist.cgi?quicksearch=createMediaElementSource