stevenaeola / goats

Creative Commons Zero v1.0 Universal
5 stars 59 forks source link

Play normal or screaming goat sound on click #37

Closed tameTNT closed 3 years ago

tameTNT commented 3 years ago

Resolves #16

In honour of Minecraft 1.17's goats, the site will play one of two goat sounds when the user clicks anywhere on the page.

As with the spawn-chance of a screaming goat in Minecraft, there is a 2% chance that this sound will be a so-called 'screaming goat'. Otherwise it will simply be a normal Minecraft goat sound.

(Sounds are sourced from minecraft.fandom.com/wiki)

The original issue wanted to have the sound play on page load, however, recent changes in web practices have meant that it is no longer possible to play sounds/video/media via js until the user has interacted with the page (this is to prevent annoying autoplay in the background) so playing the sounds on click has to suffice now.

stevenaeola commented 3 years ago

There are merge conflicts. Please could you pull from upstream and resolve the conflicts?