Posted May 13, 2024 by jdcarling
#music
I updated the Mobile.js file so that that music will actually play on iPhone. I have tested it on several and the music now plays.
The music already worked on Android/Samsung/Google.
This game has music made for each level by Alexbit, also there is an intro, win loss etc.. so I really think it helps give the best experience of the game having the sound effects and music.
I hope this makes the mobile experience even better.
you still need to tap the screen/expand for the music to start playing so you don't have music blast unintendid..
the code is from nekobungi commented on Jul 24 2020/1 on github I think.
1. Open the exported folder after "Export Web" is done
2. Open js/other/mobile.js with any text editor
3. Comment-out the following lines: line 91, 95, 100, 101, 102, 103, 104, 105
// window.audioContext.resume().then(() => {
settings[0] = true;
gameboy.initSound();
soundReady = true;
// });
}
}
}
// var soundInitTimer = setInterval(function() {
// if (GameBoyEmulatorInitialized()) {
// initSound();
// clearTimeout(soundInitTimer);
// }
// }, 16);