Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #9284 from samjoch/bug-801895-SoundsUpdateBootSound
Browse files Browse the repository at this point in the history
Bug 801895 - [Sounds] Update Boot Sound r=alive
  • Loading branch information
samjoch committed May 30, 2013
2 parents 71385ac + 0b7f7ea commit 0ec2a25
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/system/index.html
Expand Up @@ -223,6 +223,9 @@
<script defer src="js/window.js"></script>
<script defer src="js/window_manager.js"></script>

<!-- Boot sound -->
<script defer src="js/boot_sound.js"></script>

<!-- Entry Sheet -->
<link rel="stylesheet" type="text/css" href="style/entry_sheet/entry_sheet.css">
<script defer src="js/entry_sheet.js"></script>
Expand Down
22 changes: 22 additions & 0 deletions apps/system/js/boot_sound.js
@@ -0,0 +1,22 @@
var BootSound = (function() {

function playBootupSound(delay) {
var bootupSound = new Audio('./resources/sounds/bootup.ogg');
if (delay === 0) {
bootupSound.play();
} else {
setTimeout(function timeoutPlay() {
bootupSound.play();
}, delay || 500);
}
}

window.addEventListener('ftudone', function ftuDone() {
playBootupSound();
});

window.addEventListener('ftuskip', function skipFTU() {
playBootupSound(1550);
});

})();
Binary file added apps/system/resources/sounds/bootup.ogg
Binary file not shown.

0 comments on commit 0ec2a25

Please sign in to comment.