Im looking to use Javascript to read events from a usb device other than a keyboard or mouse. Specifically, I want to use a usb gaming controller to read events. If this isnt possible with Javascript, is there anything else thats on the browser and client side that would allow me to do this? Im not above having the user accept permission for something, install a plugin, or limit them to a particular browser.
Thanks in advance
You can use the Gamepad API that exists for this very reason.
Related
I would like to access a special hardware (a penta scanner, for the wisest ;) ) from a web page.
The aim is to retrieve the information from the scanner and compute it on server side.
The problem here, is that I have to summon functions from a DLL that has to be on the client side. I have two leads for that:
Develop a COM DLL and use ActiveX
Try to get through a homemade extension for a web browser in order to communicate with the local DLLs.
I've tried the first option, and I got stuck and I've posted another thread about it. Anyway, even if it works, there are too many constraints about it (as to use IE or the fact that even Microsoft is not fond of this feature and banned it from edge).
The second method is something that I found on another forum but, I do not understand how I can interact with a browser extension (whatever the browser).
So what I am asking is:
Is it possible to use a web browser extension as a medium to a local DLL and if so, would you be so kind as to give a hint about how to do ar anything that might look like a start about how to do it (even just some key words to use on google, since mine didn't get anything)....
Thanks.
Based on my understanding, the motive to develop an Extensions is to enhance the feature and functionality for particular web browser.
You cannot control any hardware devices like printer or scanner with it.
So if your goal is to control the scanner from your web page with the help of any kind of extension than I think you cannot do this with Extension.
I need to connect android/iPhone device via USB with a PC. An program written in NodeJS should be able to detect the device and get information and perform some operation on the device like reboot and reset.
Anyway, I've tried some libraries like node-usb but I'm not able to send command to the device or perform any task like that.
For iOS there's some library libimobiledevice but couldn't find any nodeJs wrapper.
Maybe I'm missing something here, any help will be appreciated.
Thanks is advance.
Don't know for iOs, but I don't think it is possible in Android. The reason is with permissions: it would rather be a bug then a feature if someone could just plug in a USB and shutdown your device without asking.
So, maybe if you would ask permissions for access and such, maybe.
Android App with Popup is possible.
And that is with Apps, not with NodeJS, it's not native to either iOs or Android.
Right now we have a Windows app that continuously reads a USB-attached scale and displays (and uses) the value.
Can I do this via a web page? Someone mentioned a "javascript input event listener", maybe? Does anyone have a simple HTML example?
thanks
I doubt you would be able to get information from hardware using a browser without using a java applet or something similar.
You could write a web interface that communicates with a process running on the machine, but you would not be able to access the hardware directly through the browser.
For more information regarding the protections surrounding browsers, look here:
http://www.australianscience.com.au/research/google/35779.pdf
My suggestion:
If you have a windows application but you want to run the interface in the browser, do something like VLC (http://www.howtogeek.com/117261/how-to-activate-vlcs-web-interface-control-vlc-from-a-browser-use-any-smartphone-as-a-remote/)
Please i need a javascript code button, to check how many devices are connected to the Laptop, and if a particular or certain device is connected Let it open any application.
There's no way you can do this with JavaScript due to security restrictions and API limitations. I guess that you're looking for some Java solution.
via Javascript you can get a lot of information about your hardware and other components about your system, like shown here
With mobile devices you are not getting that much information. I'n not asking how to find out the mobile device name, that's easy, or even the udid. I want to know, if I can access some device characteristics, like some sort of installed plugins used by the browser, or new developments on this topic.
On this site I discovered, that I can access the battery status, Or with window.navigator.mozVibrate([200]); I can activate the vibrate function. So far both work only on firefox mobile (android).
An interesting information would be about the built in camera, something like how much megapixel does it have, or does it have a flash light? Or what kind of cpu (single-, dual-, or quad-core) is built in?
To sum it up: what hardware information can I get about a mobile device (iOS/Android/Windows Phone) via javascript?
Thanks for any hints!
You may be able to get a limited set of information about the device by using PhoneGap i.e. placing the PhoneGap script on your server and checking the appropriate values if the device is mobile. Check this link: http://docs.phonegap.com/en/2.0.0/cordova_device_device.md.html#Device