Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

9 years ago by dungeonmaster

crushRock : new ig.Sound( 'media/rock.ogg',false ),

Later in the game, I only want to play this sound, if it's not already being played. So I need something like this:

if (!this.crushRock.isBeingPlayed()) {
 this.crushRock.play();
} else {
// Do nothing
}

So is there a way to understand, if this sound is currently being played or not ?

9 years ago by Joncom

Edit: Never mind. The information I gave was completely incorrect.

9 years ago by dungeonmaster

Found this, will test:
http://stackoverflow.com/questions/9437228/html5-check-if-audio-is-playing
Page 1 of 1
« first « previous next › last »