Skip to content

Commit

Permalink
Merge pull request #93 from JessamineCodes/experiment-final-fanfare
Browse files Browse the repository at this point in the history
Experiment final fanfare
  • Loading branch information
JessamineCodes authored Mar 17, 2023
2 parents f4bd9db + 6720e33 commit a1dcf69
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/assets/config/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
// = link WinSound.mp3
// = link WrongSound.mp3
// = link NextSound.mp3
// = link GraduationSound.mp3
Binary file added app/assets/media/GraduationSound.mp3
Binary file not shown.
18 changes: 18 additions & 0 deletions app/views/pages/graduation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,21 @@
<% end %>
<h2 class="mt-4">You've graduated spy school!</h2>
</div>


<%= audio_tag "GraduationSound.mp3", id:"graduationSound", autoplay: true %>
<%# <script type="text/javascript">
console.log('updated') %>
<%# //Option 1 - doesn't work - poss due to chrome autoplay rules
// window.onload = (event) => {
// const graduationSound = document.querySelector("#graduationSound")
// graduationSound.muted = true;
// graduationSound.play()
// }
// Option 2 - ditto
// document.addEventListener("load", (evgit5ent) => {
// const graduationSound = document.getElementById("graduationSound")
// // graduationSound.muted = true;
// graduationSound.play()
// }) %>
<%# // </script> %>

0 comments on commit a1dcf69

Please sign in to comment.