January 30, 2021
Playing a sound with pure javascript is surprisingly easy. First, you need a URL to the audio file you want to play. We'll use this one:
https://www.w3schools.com/html/horse.mp3
Now, all it takes is two lines of code to play that sound file:
const sound = new Audio("https://www.w3schools.com/html/horse.mp3");
sound.play();
Tufts Meal Plan Wrapped
Mar 2, 2024
Building an e-ink picture frame that displays an iCloud photo album
Jan 9, 2024
2023 in review
Jan 5, 2024
Subscribe to my newsletter for a monthly round-up of new blog posts and projects Iām working on!