-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Safari Issue: Can't find variable: AudioContext #7
Comments
Ps.. So nicely done this package.. Love it! |
Are you using the node, or the web version? |
CDN. If I copy down the bundle and add |
I just made a quick CodeSandBox: https://codesandbox.io/s/playing-with-the-wavejs-package-zfgio using the NPM package. If you open it up in Chrome - No issues, In ssafari, you'll see the error again regarding AudioContext. |
I'm having the same problem after adding the audio context fix, but I don't
have a apple device to debug the problem. Are there any errors after you
fix the problem?
…On Wed, Jul 1, 2020, 11:10 PM Corfitz ***@***.***> wrote:
CDN. If I copy down the bundle and add var AudioContext =
window.AudioContext || window.webkitAudioContext; at the very top, the
error goes away... Unfortunately, this causes some audio issues, as to now,
the sound is eliminated.. And - it is JUST Safari...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG22BHM36PAGIZJ274Z3RMDRZQQEHANCNFSM4ONPMYXQ>
.
|
Fixing one seemed to have created a new :P I have tested the bundle with the fix here https://codesandbox.io/s/snowy-snow-p569j?file=/bundle.js , and the error does indeed go away in Safari - though now weird stuff happens where the audio doesn't even play. |
Okay Ill be working on a solution in the next few days. |
Have a look at #8 :D You may have to package the repo yourself for release. Not sure how to... |
Okay I setup a development workflow and uploaded my source files. Look at the bottom of the readme to see details on how to work with the source files. I also worked for a while on the ios issue. Im not sure if I solved the issue because I dont have anyway of testing but I did implement something that should of fixed it. The audioContext is muted by safari, and is only unmuted when a user gesture happens. But you must also create the audioContext when the user event happens, and try to play a sound so safari unmutes. Hopefully the issue is now solved. |
Great stuff this.. I have had a little browse-through... I looked into the react-test - which is failing due to the The Safari issue has been resolved, but testing on the iPhone doesn't seem to work well.. Not sure if this is a localhost issue or bug in code, so will get back to you on that.. Great job solving the Safari bug.. cheers.. |
Oh.. Guess we can actually close this issue now then |
Apparently safari needs
webkit
prefix.amaneureka/T-Rex#5 (comment)
The text was updated successfully, but these errors were encountered: