this.on = !!this.fluidbook.settings.soundOn;
this.audios = {};
this.playing = null;
+ this.simpleTheme = this.fluidbook.settings.simpleSoundTheme;
this.preloadSounds();
this.initEvents();
},
preloadSounds: function () {
- var sounds = ['empty', 'cover-flip', 'page-flip-1', 'page-flip-2'];
+ var sounds;
+ if (this.simpleTheme) {
+ sounds = ['empty', 'flip'];
+ } else {
+ sounds = ['empty', 'cover-flip', 'page-flip-1', 'page-flip-2'];
+ }
var $this = this;
$.each(sounds, function (k, v) {
var src;
}
var sound = '';
- if (data.turningPages.indexOf(1) >= 0 || data.turningPages.indexOf(last) >= 0) {
- sound = 'cover-flip';
+ if (this.simpleTheme) {
+ sound = 'flip';
} else {
- sound = 'page-flip-' + (Math.round(Math.random() + 1));
+ if (data.turningPages.indexOf(1) >= 0 || data.turningPages.indexOf(last) >= 0) {
+ sound = 'cover-flip';
+ } else {
+ sound = 'page-flip-' + (Math.round(Math.random() + 1));
+ }
}
var transitionDuration = this.fluidbook.pagetransitions.getTransitionDuration(page);