Comments (16)
I don't quite get what you're asking, can you explain
from emulatorjs.
im trying to use play() and pause() functions on my own buttons and in different situations.
but i dont know whats the according name of these functions
from emulatorjs.
So you would like the ability to call the play/pause function?
from emulatorjs.
yes exactly
from emulatorjs.
okie, Give me some time and I'll get that to you
from emulatorjs.
Any progress on this? Thanks Ethan
from emulatorjs.
Sorry, havent had too much time to look at this. I haven't been able to locate the location of the pause/play functions. sorry. I'll let you know when I find it
from emulatorjs.
You can use jquery and run $("[data-btn='play']").trigger("click");
That will toggle play and pause.
from emulatorjs.
You can use jquery and run
$("[data-btn='play']").trigger("click");
That will toggle play and pause.
Thats nice!
Anyway to call netplay join function with parameters from javascript?
from emulatorjs.
You first have to set the players name.
You can do that with $("[data-btn='netplay']").trigger("click");$(".ejs--158ea9dd34e3e7af2d837f8b05babb").attr("hidden","");$(".ejs--71527b6509aa48afce3ce1a11c02f0").val("players name");setTimeout(function(){$(".ejs--71527b6509aa48afce3ce1a11c02f0").trigger("click");}, 1000);
There has to be a current room for it to work So would you create a room and then join or what?
from emulatorjs.
Do you what to do if room not found or too many players create new one?
from emulatorjs.
im live fetching rooms as you pointed so i can disable the ones maxed out.
from emulatorjs.
$(".ejs--158ea9dd34e3e7af2d837f8b05babb").attr("hidden","");
this working but despite filling input with provided players name joins/creates game and players name remains undefined.
from emulatorjs.
click submit playersname was missing
adding this $('.ejs--319bcec5dee9444e1a2a53d6503b7c').first().trigger("click");
solves the issue.
from emulatorjs.
On the latest version (I just pushed) you can call these functions
play: window.EJS_MODULE.resumeMainLoop();
pause: window.EJS_MODULE.pauseMainLoop();
The play/pause button in the UI will not change
@imneckro Can I close?
from emulatorjs.
@ethanaobrien Great Ethan thanks a lot. Yes go ahead!
from emulatorjs.
Related Issues (20)
- [REQUEST] Make the demo work without a web server HOT 1
- [Request] Add option to add your own BIOS in demo HOT 3
- [Bug] errors download 100% HOT 3
- [Request] Allow PSX core to set between Dualshock/Standard controller HOT 1
- [Request] Make canvas the exact size of the native resolution, and let us size it ourselves using css transforms. HOT 2
- [Bug] All NDS roms freeze after rom load HOT 8
- [enhancement] add 3D Anaglyph preset color Setting
- [Bug] emulator does not work with controllers that use axis for direction. HOT 5
- 7z files of arcade Rom are disabled in Fbneo? HOT 1
- [Bug] version 4.0.10 after, the NDS console pointer cannot be moved. (mobile) HOT 1
- Cheat screen with black background
- [enhancement] Mouse Controls? HOT 4
- Did you add the game speed control setting to EmulatorJS? and if so Where did you put it? HOT 1
- [Feature-MirrorMode] Add mirror screen for head-to-head 2 or 4 players on big tablet touchscreen
- [Bug] "Start Creating" button not working in code editor
- [Bug] Degraded performance on mobile browsers since version 4.0.10 HOT 2
- [Bug] Impossible to Download the "the default fileset" HOT 3
- EmulatorJS V3 HOT 2
- Do we have Docker?
- new MAME cores
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emulatorjs.