How to play a notification sound on websites? code example
Example: How to play a notification sound on websites?
function playSound(url) {
const audio = new Audio(url);
audio.play();
}
<button onclick="playSound('https://your-file.mp3');">Play</button>