Skip to content

Commit

Permalink
Multiple background kiosk musics
Browse files Browse the repository at this point in the history
  • Loading branch information
megastary committed Mar 26, 2024
1 parent 4b02e91 commit 0a3f164
Show file tree
Hide file tree
Showing 14 changed files with 5 additions and 2 deletions.
File renamed without changes.
Binary file added public/audio/10_kiosk_shop_theme.mp3
Binary file not shown.
Binary file added public/audio/1_kiosk_shop_theme.mp3
Binary file not shown.
Binary file added public/audio/2_kiosk_shop_theme.mp3
Binary file not shown.
Binary file added public/audio/3_kiosk_shop_theme.mp3
Binary file not shown.
Binary file added public/audio/4_kiosk_shop_theme.mp3
Binary file not shown.
Binary file added public/audio/5_kiosk_shop_theme.mp3
Binary file not shown.
Binary file added public/audio/6_kiosk_shop_theme.mp3
Binary file not shown.
Binary file added public/audio/7_kiosk_shop_theme.mp3
Binary file not shown.
Binary file added public/audio/8_kiosk_shop_theme.mp3
Binary file not shown.
Binary file added public/audio/9_kiosk_shop_theme.mp3
Binary file not shown.
1 change: 0 additions & 1 deletion public/javascripts/kiosk_keypad.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,5 @@ document.addEventListener("keydown", function (e) {
} else if (e.key.length === 1) {
addTextToScreen(e.key);
}
console.log("IR scan textInput", e);
e.preventDefault();
});
5 changes: 4 additions & 1 deletion public/javascripts/kiosk_shop.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ function submitFromModal(ctx, keepShopping) {
// On page load start timer, play background music and make product card clickable
document.addEventListener("DOMContentLoaded", function () {
var shopInterval;
const backgroundMusic = new Audio("/audio/kiosk_shop_theme.mp3");
const randomNumber = Math.floor(Math.random() * 11);
const backgroundMusic = new Audio(
`/audio/${randomNumber}_kiosk_shop_theme.mp3`
);

// Play background theme music
backgroundMusic.volume = 0.3;
Expand Down
1 change: 1 addition & 0 deletions views/partials/kiosk_purchase_modal.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
src=""
class="img-fluid"
alt="Product image"
style="max-height: 80vh;"
/>
</div>
</div>
Expand Down

0 comments on commit 0a3f164

Please sign in to comment.