keithclark / ZzFXM

A super small music generator for use in size-limited JavaScript productions
https://keithclark.github.io/ZzFXM/
MIT License
418 stars 33 forks source link

Use "window" instead of "top" for AudioContext #26

Closed jdnichollsc closed 3 years ago

jdnichollsc commented 3 years ago

I was testing from Codepen, and getting the following issue:

Uncaught DOMException: Blocked a frame with origin "https://cdpn.io" from accessing a cross-origin frame.

And this was solved using window instead, e.g: https://codepen.io/jdnichollsc/pen/KKMRPrr

Also ZzFX use window too: https://github.com/KilledByAPixel/ZzFX/blob/master/ZzFX.js#L306

Thanks!

jdnichollsc commented 3 years ago

@KilledByAPixel what do you think about this little change? :)

vmoratog commented 3 years ago

I'm getting the same issue, can you merge this change?

keithclark commented 3 years ago

Thanks for this. Apologies for the delay!

jdnichollsc commented 3 years ago

No problem mate, thanks for your help!