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... -->
<footer id="credits" class="">
<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>
<!-- Main JS Libs -->
@ -100,6 +100,9 @@
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- 1x1 stat pixel -->
<img src="/t/?action=WyrianGame&u=http%3A%2F%2Fwww.html5place.com%2Flab%2Fwyrian%2F" />
</body>
</html>

View file

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

View file

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