Fixed reference to setMuted not being updated.

This commit is contained in:
flash 2024-07-01 14:57:23 +00:00
parent afe5acd328
commit cd16a5d1b5

View file

@ -25,7 +25,7 @@ const MamiYouAreAnIdiot = function(sndLibrary, views) {
onViewPush: async () => { onViewPush: async () => {
try { try {
soundSrc = await sndLibrary.loadSource('misc:youare'); soundSrc = await sndLibrary.loadSource('misc:youare');
soundSrc.setMuted(true); soundSrc.muted = true;
soundSrc.setLoop(true, 0.21, 5); soundSrc.setLoop(true, 0.21, 5);
soundSrc.play(); soundSrc.play();
} catch(ex) { } catch(ex) {
@ -34,11 +34,11 @@ const MamiYouAreAnIdiot = function(sndLibrary, views) {
}, },
onViewForeground: async () => { onViewForeground: async () => {
if(soundSrc !== undefined) if(soundSrc !== undefined)
soundSrc.setMuted(false); soundSrc.muted = false;
}, },
onViewBackground: async () => { onViewBackground: async () => {
if(soundSrc !== undefined) if(soundSrc !== undefined)
soundSrc.setMuted(true); soundSrc.muted = true;
}, },
onViewPop: async () => { onViewPop: async () => {
if(soundSrc !== undefined) if(soundSrc !== undefined)