Added language provider, fixed race condition on emulator
This commit is contained in:
@ -34,6 +34,10 @@
|
||||
<script type="text/javascript" language="javascript">
|
||||
let scriptElement = null;
|
||||
|
||||
let initInterval = setInterval(() => {
|
||||
send({ message: 'iframe_loaded' });
|
||||
}, 500);
|
||||
|
||||
EJS_player = "#game";
|
||||
EJS_pathtodata = "https://cdn.emulatorjs.org/stable/data/";
|
||||
EJS_language = "en-US";
|
||||
@ -77,6 +81,8 @@
|
||||
scriptElement = document.createElement('script');
|
||||
scriptElement.src = 'https://cdn.emulatorjs.org/stable/data/loader.js';
|
||||
document.body.appendChild(scriptElement);
|
||||
|
||||
clearInterval(initInterval);
|
||||
}
|
||||
|
||||
const send = data => {
|
||||
@ -145,7 +151,7 @@
|
||||
|
||||
EJS_onGameStart = () => {
|
||||
send({ message: 'start' });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user