You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on my personal website with vanilla javascript HTML and CSS to fill some holes I've got regarding tags and styling to name a few. Right now I'm trying to add some cool sound design to it with the Web Audio API but I'm not able to create an audio context. On Firefox my console reports the following:
Uncaught DOMException: An invalid or illegal string was specified
I've run the website on Edge as well, it doesn't throw the same exception though but same luck, I can't create an audio context. I've also removed defer from my <script> tag to check if my issue comes down to execution order but again I'm no able to create the audio context.
My last try was to simulate the issue with another project that scoped the problem and I couldn't get any better result or a clue that pointed me what I did wrong.
There's not much code to share because this is step one for my sound design implementation stage. I've got this so far:
What baffles me is a previous project I worked on with React.js didn't have the same problem. Is there anything with vanilla Javascript/HTML/CSS that I should be aware of? Could you point out what I'm missing please?
BTW CSS works perfectly and some non audio related interaction inside the interaction file runs smoothly. Adding the line that creates the AudioContext is causing the issue. Also, adding const audioCtxt = new AudioContext(); inside <script> tag in index.html doesn't throw the exception.
The text was updated successfully, but these errors were encountered:
I'm working on my personal website with vanilla javascript HTML and CSS to fill some holes I've got regarding tags and styling to name a few. Right now I'm trying to add some cool sound design to it with the Web Audio API but I'm not able to create an audio context. On Firefox my console reports the following:
I've run the website on Edge as well, it doesn't throw the same exception though but same luck, I can't create an audio context. I've also removed defer from my <script> tag to check if my issue comes down to execution order but again I'm no able to create the audio context.
My last try was to simulate the issue with another project that scoped the problem and I couldn't get any better result or a clue that pointed me what I did wrong.
There's not much code to share because this is step one for my sound design implementation stage. I've got this so far:
index.html
interaction.js
const audioCtxt = new AudioContext();
What baffles me is a previous project I worked on with React.js didn't have the same problem. Is there anything with vanilla Javascript/HTML/CSS that I should be aware of? Could you point out what I'm missing please?
BTW CSS works perfectly and some non audio related interaction inside the interaction file runs smoothly. Adding the line that creates the AudioContext is causing the issue. Also, adding const audioCtxt = new AudioContext(); inside <script> tag in index.html doesn't throw the exception.
The text was updated successfully, but these errors were encountered: