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

[Safari] Can't find variable: AudioContext #5

Closed
ptrkrlsrd opened this issue May 9, 2016 · 1 comment
Closed

[Safari] Can't find variable: AudioContext #5

ptrkrlsrd opened this issue May 9, 2016 · 1 comment

Comments

@ptrkrlsrd
Copy link

Hey! When testing the website I'm getting an error in the console saying "Can't find variable: AudioContext".

I haven't tested it yet, but I think you can fix it by replacing AudioContext with webkitAudioContext when the client is using the desktop version of Safari.

amaneureka added a commit that referenced this issue May 9, 2016
@amaneureka
Copy link
Owner

Thanks!

I fixed it by adding following code block

var AudioContext = window.AudioContext          // Default
              || window.webkitAudioContext;  // Safari and old versions of Chrome
this.audioContext = new AudioContext();```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants