Try to correct non playing background music on Chrome...

This commit is contained in:
Guillaume DE LA RUE 2011-02-13 14:51:16 +01:00
parent 590ba65d18
commit 38f42409a8
3 changed files with 13 additions and 7 deletions

View file

@ -73,7 +73,7 @@
<!-- The footer... --> <!-- The footer... -->
<footer id="credits" class=""> <footer id="credits" class="">
<strong>HTML5 Game Jam 2011</strong><br> <strong>HTML5 Game Jam 2011</strong><br>
<strong><a href="https://github.com/glenux/wyrian" target="_blank" title="View Project on GitHub" class="game">..:: Wyrian v<span id="version">0.2b</span> ::..</a></strong> | <a href="http://www.html5place.com/" title="View my Website" class="author">Guillaume DE LA RUE</a><br>Thanks to <a href="https://github.com/glenux" target="_blank" title="View profile of Glenux on GitHub" class="quote">Glenux</a> for design and Matthieu Bosquet<br>And everyone present at the HTML5 Game Jam :) <strong><a href="https://github.com/glenux/wyrian" target="_blank" title="View Project on GitHub" class="game">..:: Wyrian v<span id="version">0.2d</span> ::..</a></strong> | <a href="http://www.html5place.com/" title="View my Website" class="author">Guillaume DE LA RUE</a><br>Thanks to <a href="https://github.com/glenux" target="_blank" title="View profile of Glenux on GitHub" class="quote">Glenux</a> for design and Matthieu Bosquet<br>And everyone present at the HTML5 Game Jam :)
</footer> </footer>
<!-- Main JS Libs --> <!-- Main JS Libs -->
@ -101,5 +101,8 @@
})(); })();
</script> </script>
<!-- 1x1 stat pixel -->
<img src="/t/?action=WyrianGame&u=http%3A%2F%2Fwww.html5place.com%2Flab%2Fwyrian%2F" />
</body> </body>
</html> </html>

View file

@ -30,7 +30,7 @@ jQuery(document).ready(function() {
function() { function() {
// -- Init Stage or show IE popup // -- Init Stage or show IE popup
if ( ! $.browser.msie || ( $.browser.version >= 9 ) ) { if ( ! $.browser.msie || ( $.browser.msie && $.browser.version >= 9 ) ) {
Game.init() ; Game.init() ;
} else { } else {
alert('Sorry but this game only works in good navigators. Please download Google Chrome or Firefox' ) ; alert('Sorry but this game only works in good navigators. Please download Google Chrome or Firefox' ) ;

View file

@ -19,14 +19,17 @@
// -- Background Music // -- Background Music
soundManager.createSound({ soundManager.createSound({
id: 'music', id: 'music',
url: '/audio/bg_music.ogg', url: 'audio/bg_music.ogg',
autoLoad: true, autoLoad: true,
autoPlay: false, autoPlay: false,
multiShot: false, multiShot: false,
volume: 10, volume: 10,
loop: true, loop: true,
onload: function() { onload: function() {
this.play() ; var soundObj = this;
setTimeout(function() {
soundObj.play() ;
}, 1000) ;
}, },
onfinish: function() { onfinish: function() {
this.play(); this.play();
@ -36,7 +39,7 @@
// -- Click // -- Click
soundManager.createSound({ soundManager.createSound({
id: 'click', id: 'click',
url: '/audio/click.ogg', url: 'audio/click.ogg',
autoLoad: true, autoLoad: true,
autoPlay: false, autoPlay: false,
multiShot: false, multiShot: false,
@ -46,7 +49,7 @@
// -- Fire // -- Fire
soundManager.createSound({ soundManager.createSound({
id: 'shoot', id: 'shoot',
url: '/audio/big_laser.ogg', url: 'audio/big_laser.ogg',
autoLoad: true, autoLoad: true,
autoPlay: false, autoPlay: false,
multiShot: true, multiShot: true,
@ -56,7 +59,7 @@
// -- Explode // -- Explode
soundManager.createSound({ soundManager.createSound({
id: 'explode', id: 'explode',
url: '/audio/explode.ogg', url: 'audio/explode.ogg',
autoLoad: true, autoLoad: true,
autoPlay: false, autoPlay: false,
multiShot: true, multiShot: true,