Embed a Nintendo DS emulator easily. (Embeddable version of DeSmuME-wasm and based on desmond)
<html>
<body>
<div id="msg-layer" hidden="">
<p id="msg-text"></p>
</div>
<DS4WEB-player id="player"></DS4WEB-player>
<script src="path/to/DS4WEB.min.js"></script>
<script>
document.getElementById("player").loadURL("path/to/game.nds");
</script>
</body>
</html>To run a function after the file loads, you may attach a function as the second argument. You can also enable microphone using it.
To use the microphone, you have to use the "enableMicrophone" function inside of the callback function. Here is an example:
<!doctype html>
<html>
<body>
<div id="msg-layer" hidden="">
<p id="msg-text"></p>
</div>
<DS4WEB-player id="player"></DS4WEB-player>
<script src="path/to/DS4WEB.min.js"></script>
<script>
var player = document.getElementById("player");
player.loadURL("path/to/game.nds", () => {
player.enableMicrophone();
});
</script>
</body>
</html>Just save in the game and wait a few seconds. An auto-saving banner will appear, and your saved data will automatically be stored in the web app's local storage.