Html audio not working, readyState is always HAVE_NOTHING

Hello All,

I am using CodePen and just trying to add a simple HTMLAudioElement with the property controls enable.
for unknown reason the audio is not loaded and its readyState is HAVE_NOTHING.

<audio id="beeps" scr="https://raw.githubusercontent.com/freeCodeCamp/cdn/master/build/testable-projects-fcc/audio/BeepSound.wav" crossOrigin="anonymous" controls></audio>


Any Ideas?

CodePen page

Many thanks in advance,

Hey!

Seems like you have a typo in your source attribute. Its “src” instead of “scr”.

Works for me after I changed that.
Good luck!

Thank you very much Erma32,

A typical case of inattention on my part. I do feel ashamed of myself right now.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.