p5.js-sound icon indicating copy to clipboard operation
p5.js-sound copied to clipboard

p5.sound.js >= 1.4.0 iframe with srcdoc on safari causes exception and breaks

Open jon-playful-software opened this issue 3 years ago • 0 comments

When trying to utilize p5.js and p5.sound.js >= 1.4.0 inside an iframe populated by srcdoc it works on Firefox and on Chrome, but fails on Safari. 1.3.0

Repro CodePen

Opening that codepen should work nicely on Firefox and Chrome (are the browsers i tested) But on Safari (I'm on 15.4) the 1.3.1 should load properly while the 1.4.2 throws an exception and gets stuck on the loading screen.

Unfortunately, the error thrown it's super helpful:

Unhandled Promise Rejection: AbortError: Cross-origin script load denied by Cross-Origin Resource Sharing policy.

jon-playful-software avatar Sep 07 '22 23:09 jon-playful-software