I'm currently trying to create an audio visualizer in JavaScript and this error keeps getting thrown:
Uncaught TypeError: Failed to execute 'createMediaElementSource' on 'AudioContext': parameter 1 is not of type 'HTMLMediaElement'.
I'm not quite sure how to fix the error, I've been looking all over the internet for answers but nothing has seemed to help me.
The music does play when you hit play, but I need my visualizer to accept data from the audio element so that I can have a visualizer that works.
This is a link to my code, you can access it by right-clicking and hitting inspect.