-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Description
via https://groups.google.com/forum/#!topic/gamejs/wFmkvKyiC6g
The Sound.stop() doesn't work as described in API.
function muteSound(sound) {
sound.stop();
}
bgMusic = new gamejs.audio.Sound(document.getElementById("bgMusic"));
muteSound(bgMusic);
So, it cause an error "audio.stop is not a function".
The solution is to use standard JavaScript methods.
bgMusic = document.getElementById("bgMusic");
muteSound(bgMusic);
function muteSound(sound) {
sound.pause();
}
Metadata
Metadata
Assignees
Labels
No labels