AlexB Posted April 16, 2015 Share Posted April 16, 2015 This issue just started happening, but it's affected more than one machine, all using Chrome on Mac OSX. If you paste the following code in the Phaser examples and run it, using Firefox or Safari, the sound will loop. Using the latest Chrome it only plays once. Any ideas?var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render });function preload() { game.load.image('greenie', 'assets/sprites/wizball.png'); game.load.audio('wizball', ['assets/audio/SoundEffects/sword.mp3', 'assets/audio/oedipus_wizball_highscore.ogg']);}var s;var music;function create() { game.stage.backgroundColor = '#182d3b'; game.input.touch.preventDefault = false; music = game.add.audio('wizball', 0.1, true); music.play(); s = game.add.sprite(game.world.centerX, game.world.centerY, 'greenie'); s.anchor.set(0.5); game.input.onDown.add(restartMusic, this);}function restartMusic() { music.restart();}function update() { s.rotation += 0.01;}function render() { game.debug.soundInfo(music, 20, 32);} Link to comment Share on other sites More sharing options...
AlexB Posted April 17, 2015 Author Share Posted April 17, 2015 This must have been a bug with the last commit of 2.2. On both machines, we deleted the bower folder for Phaser, removed the entry in bower.json for 2.2, and did a new install from 2.3. Now both machines are working correctly. I'm still not sure why the examples runner isn't working correctly, but maybe it's still running an older version of the library or there was a temporary bug that was fixed. Anyway, this is working now. Link to comment Share on other sites More sharing options...
Recommended Posts