Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
creaktive opened this issue Mar 8, 2022 · 1 comment

Comments

@creaktive
Copy link

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 added a commit to creaktive/pianolizer that referenced this issue Mar 10, 2022
First of all, Safari needs the permission to access microphone even to
process <audio> elements. Even with the permission granted, there are
clicks and pops and generally sluggish experience. Microphone source
seems to work alright, however.

There are multiple known bugs in createMediaElementSource()
implementation of Safari; maybe when these are fixed it will work
properly:

https://bugs.webkit.org/buglist.cgi?quicksearch=createMediaElementSource

In the meanwhile, the workaround is to ask for microphone permission and
hope for the best:

mdn/webaudio-examples#56
@creaktive
Copy link
Author

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

@github-actions github-actions bot added the idle Issues and pull requests with no activity for three months. label Dec 28, 2022
@caugner caugner added ex: media-source-buffer and removed idle Issues and pull requests with no activity for three months. labels Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants