This repository has been archived on 2025-10-28. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
vikunja-frontend/src/helpers/playPop.ts

17 lines
354 B
TypeScript

import popSoundFile from '@/assets/audio/pop.mp3'
export const playSoundWhenDoneKey = 'playSoundWhenTaskDone'
export function playPop() {
const enabled = localStorage.getItem(playSoundWhenDoneKey) === 'true'
if (!enabled) {
return
}
playPopSound()
}
export function playPopSound() {
const popSound = new Audio(popSoundFile)
popSound.play()
}