this.on = false;
$(".icon-sound-on").hide();
$(".icon-sound-off").show();
- this.stopAllSounds();
},
playSoundForPage: function (data) {
return;
}
- this.stopAllSounds();
var page = data.page;
if (page % 2 === 1) {
} else {
sound = 'page-flip-' + (Math.round(Math.random() + 1));
}
+
+ console.log(sound);
try {
this.audios[sound].volume = 1;
+ this.audios[sound].fastSeek(0);
this.audios[sound].play();
- this.playing = this.audios[sound];
} catch (e) {
console.log(e);
}
},
-
- stopAllSounds: function () {
- try {
- if (this.playing !== null) {
- this.playing.pause();
- this.playing = null;
- }
- } catch (e) {
-
- }
- },
};
\ No newline at end of file