Improved audio player

This commit is contained in:
2018-03-11 04:51:10 +01:00
parent 42c16053a9
commit 5c9fe711c9
3 changed files with 5 additions and 1 deletions

View File

@ -23,6 +23,9 @@ export function playAudio(arn: AnimeNotifier, button: HTMLButtonElement) {
audioNode.buffer = buffer
audioNode.connect(audioContext.destination)
audioNode.start(0)
audioNode.onended = () => {
document.getElementById("audio-player").classList.add("fade-out")
}
}, console.error)
}
request.send()