Fixed duped audio
Some checks failed
Deploy to Firebase Hosting on merge / build_and_deploy (push) Has been cancelled

This commit is contained in:
Jarrod Norwell 2024-11-07 22:27:30 +08:00
parent d683b92130
commit cf55b6f84b

View File

@ -12,7 +12,7 @@ export default function NextCore() {
const audio = new Audio("https://quicksounds.com/uploads/tracks/528054973_948104858_1761723949.mp3") const audio = new Audio("https://quicksounds.com/uploads/tracks/528054973_948104858_1761723949.mp3")
function play() { function play() {
if (audio.duration <= 0 && audio.paused) { if (audio.paused) {
audio.play() audio.play()
} }
} }