1 decade ago by Zheref
Hello,
I'm trying to play some background music with ImpactJS but it's only working in Internet Explorer. It doesn't work with Chrome and Firefox. I don't know what I'm doing bad. I thank any help. Next is the snippet I'm using to fo that:
InstartiusSplash = ig.Game.extend
(
{
image: new ig.Image('media/image.jpg'),
init: function()
{
ig.music.add('intro.*');
ig.music.volume = 1;
ig.music.play();
... the rest
I've already tried many things. But nothing works. I have both ogg and mp3 files in the folder. Besides my Chrome and Firefox plays perfectly html audio with the new html5 audio tags and by opening my ogg and mp3 files directly with the browser.
I'm trying to play some background music with ImpactJS but it's only working in Internet Explorer. It doesn't work with Chrome and Firefox. I don't know what I'm doing bad. I thank any help. Next is the snippet I'm using to fo that:
InstartiusSplash = ig.Game.extend
(
{
image: new ig.Image('media/image.jpg'),
init: function()
{
ig.music.add('intro.*');
ig.music.volume = 1;
ig.music.play();
... the rest
I've already tried many things. But nothing works. I have both ogg and mp3 files in the folder. Besides my Chrome and Firefox plays perfectly html audio with the new html5 audio tags and by opening my ogg and mp3 files directly with the browser.