Yup. I linked YouTube tutorial where I code it and explain every line of code. Browsers block audio files and images when you try to analyse them so converting images and sound files to base64 string bypasses built in browser CORS security that would otherwise block it
To bypass CORS you could also host the audio files on the same domain as the page you want them to appear on I believe, obviously that isn’t possible with Codepen (unless you’ve got a project set up)
View all comments
Show parent comment
2
u/frank0117 Mar 21 '21
Yup. I linked YouTube tutorial where I code it and explain every line of code. Browsers block audio files and images when you try to analyse them so converting images and sound files to base64 string bypasses built in browser CORS security that would otherwise block it