G0DsDestroyer Posted April 23, 2015 Share Posted April 23, 2015 For the game I am making the level audio is approximately 40 seconds and is set to looping when added in the create method of my game, after it is done playing, it doesn't seem to loop or start playing again, although I haven't waited for an over a minute waiting for it to start again. Also it's a wav file, which I've been told works.I had thought maybe it was some of my other pausing and resuming of the music, but with all those lines taken out and just the below ones, the problem persists. I also printed out level_music.isPlaying and level_music.loop and both are true, but there is no sound playing.. Any help is appreciated, thanks.create: function()...//add musiclevel_music = this.add.audio('level_one');level_music.play('', 0, 0.1, true);//also tried this to see if it made a difference//add musiclevel_music = this.add.audio('level_one');level_music.play();level_music.volume = .1;level_music.loop = true;...} Link to comment Share on other sites More sharing options...
deniz Posted April 23, 2015 Share Posted April 23, 2015 I guess you are using 2.2.2. I encountered same problem today on Chrome (its working fine on safari). Switching to version 2.3 solved the issue. Link to comment Share on other sites More sharing options...
deniz Posted April 23, 2015 Share Posted April 23, 2015 If you have to stick to 2.2.2, here is a workaround: level_music.onLoop.add(function(){ level_music.play();},this); Link to comment Share on other sites More sharing options...
G0DsDestroyer Posted April 23, 2015 Author Share Posted April 23, 2015 Well I tried switching to mp3 format and that didn't change the problem, so I went with your workaround deniz. Thanks for that solution. I'm still wondering why it doesn't work with 2.2.2, since I know someone else using that version of phaser and they don't seem to have a problem. Either way, it work now! Thanks again. Link to comment Share on other sites More sharing options...
Recommended Posts