Skip to content

Commit

Permalink
Fix 404 audio not playing
Browse files Browse the repository at this point in the history
  • Loading branch information
artemave committed Oct 29, 2023
1 parent 487ae01 commit 31789ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ inputContainer.ontransitionend = function() {
audio.play()

}).catch(() => {
audio.src = 'assets/imperial_march.mp3'
audio.src = '/assets/imperial_march.mp3'

new Promise((resolve) => {
audio.oncanplaythrough = resolve
}).then(() => {
audio.play()
performCrawl([
"Tun dun dun, da da dun, 404",
"404, da da dun, 404",
Expand Down

0 comments on commit 31789ac

Please sign in to comment.