diff --git a/public_html/js/Views.js b/public_html/js/Views.js
index b000209..b545a5f 100644
--- a/public_html/js/Views.js
+++ b/public_html/js/Views.js
@@ -393,6 +393,8 @@ Views.prototype.music = function (name, fade) {
if (fade.fadeIn) {
$(this.musicPlayerAudio).prop("volume", 0.0);
$(this.musicPlayerAudio).animate({volume: 1.0}, fade.duration * 1000);
+ } else {
+ $(this.musicPlayerAudio).prop("volume", 1.0);
}
} catch (e) {
console.log("music: " + name + " " + e);
@@ -426,6 +428,8 @@ Views.prototype.sound = function (name, fade) {
if (fade.fadeIn) {
$(this.soundPlayerAudio).prop("volume", 0.0);
$(this.soundPlayerAudio).animate({volume: 1.0}, fade.duration * 1000);
+ } else {
+ $(this.soundPlayerAudio).prop("volume", 1.0);
}
} catch (e) {
console.log("sound: " + name + " " + e);
@@ -457,6 +461,8 @@ Views.prototype.soundLoop = function (name, fade) {
if (fade.fadeIn) {
$(this.soundLoopPlayerAudio).prop("volume", 0.0);
$(this.soundLoopPlayerAudio).animate({volume: 1.0}, fade.duration * 1000);
+ } else {
+ $(this.soundLoopPlayerAudio).prop("volume", 1.0);
}
} catch (e) {
console.log("soundloop: " + name + " " + e);
@@ -481,7 +487,6 @@ Views.prototype.ambience = function (name, fade) {
this.stopAmbience(this.ambiencePlayerAudio.fade);
this.ambiencePlayerAudio.src = PathResolver.ambience(name);
this.ambiencePlayerAudio.fade = fade;
- var views = this;
this.ambiencePlayerAudio.addEventListener('ended', function () {
this.currentTime = 0;
this.play();
@@ -490,6 +495,8 @@ Views.prototype.ambience = function (name, fade) {
if (fade.fadeIn) {
$(this.ambiencePlayerAudio).prop("volume", 0.0);
$(this.ambiencePlayerAudio).animate({volume: 1.0}, fade.duration * 1000);
+ } else {
+ $(this.ambiencePlayerAudio).prop("volume", 1.0);
}
} catch (e) {
console.log("ambience: " + name + " " + e);