GoogleChromeLabs / audioworklet-polyfill

🔊 Polyfill AudioWorklet using the legacy ScriptProcessor API.
https://googlechromelabs.github.io/audioworklet-polyfill/
Apache License 2.0
195 stars 20 forks source link

Error in iOS Safari 12 #24

Open hgcummings opened 4 years ago

hgcummings commented 4 years ago

On iOS Safari 12, audio processors can't extend AudioWorkletProcessor because it's not a class with a prototype object.

Error and stack trace

TypeError: The value of the superclass's prototype property is not an object.

  1. Eval Code
  2. eval
  3. about:blank:2:2231
  4. (anonymous function) — index.js:86
  5. promiseReactionJob

This is the offending line https://github.com/GoogleChromeLabs/audioworklet-polyfill/blob/master/src/index.js#L86. which is (unsurprisingly) the line that evals the processor.