diff --git a/src/mami.js/main.js b/src/mami.js/main.js index a427803..1bf1ea0 100644 --- a/src/mami.js/main.js +++ b/src/mami.js/main.js @@ -185,7 +185,7 @@ window.Umi = { UI: {}, Protocol: { SockChat: { Protocol: {} } } }; if(!settings.get('tmpSkipDomainPopUpThing')) await (() => { return new Promise((resolve) => { - views.push(new MamiDomainTransition(() => { + views.push(new MamiDomainTransition(soundCtx.library, () => { (new MamiSettingsBackup(settings)).importUpload(document.body); }, () => { settings.set('tmpSkipDomainPopUpThing', true); diff --git a/src/mami.js/ui/domaintrans.jsx b/src/mami.js/ui/domaintrans.jsx index dc9440a..44fa8a6 100644 --- a/src/mami.js/ui/domaintrans.jsx +++ b/src/mami.js/ui/domaintrans.jsx @@ -1,7 +1,7 @@ #include common.js #include rng.js -const MamiDomainTransition = function(onImport, onDismiss) { +const MamiDomainTransition = function(soundLib, onImport, onDismiss) { if(typeof onImport !== 'function') throw 'onImport must be a function'; if(typeof onDismiss !== 'function') @@ -56,8 +56,8 @@ const MamiDomainTransition = function(onImport, onDismiss) { ; const soundRNG = new MamiRNG(); - const soundNames = mami.sound.library.names(); - const playRandomSound = () => mami.sound.library.play(soundNames[soundRNG.next(soundNames.length)]); + const soundNames = soundLib.names(); + const playRandomSound = () => soundLib.play(soundNames[soundRNG.next(soundNames.length)]); for(let i = 0; i < 10; ++i) eggsTarget.appendChild( playRandomSound()} />);