Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion main.js
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are good, but there should be a check to see if the sound is playable before calling play.

Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
let lamp = document.getElementById("lavalamp");
let lampContainer = document.getElementById("lamp-container");

const vineBoom = new Audio('vine_boom.mp3');
vineBoom.load();

lamp.addEventListener("click", function() {
// Play vine boom sound
const vineBoom = new Audio('vine_boom.mp3');
vineBoom.play();

// Create explosion element
Expand Down
Binary file modified vine_boom.mp3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was the vine boom mp3 modified?

Binary file not shown.