0

I am trying to get my feet wet with AudioContext and so far I am not able to get a single sound to play.

here is my simple example

var context = new AudioContext()
var o = context.createOscillator()
o.type = "sine"
o.connect(context.destination)
o.start()

From everything I have seen, this should work, but I am not getting any sound. Where am I going wrong?

Chaim Friedman
  • 6,124
  • 4
  • 33
  • 61
  • Did you open your web console? Don't you have a warning saying something like *The audiocontext was blocked because there wasn't any user interaction*? – Kaiido Jan 06 '20 at 05:11
  • thanks! I had warning off and only errors and info on in my console, that was indeed the issue! – Chaim Friedman Jan 06 '20 at 05:15

0 Answers0