https://github.com/evanw/mobile-touchpads
Use one or more iPhones as remote touchpads in an HTML page
https://github.com/evanw/mobile-touchpads
Last synced: 2 months ago
JSON representation
Use one or more iPhones as remote touchpads in an HTML page
- Host: GitHub
- URL: https://github.com/evanw/mobile-touchpads
- Owner: evanw
- Created: 2014-10-20T02:24:36.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-20T02:52:53.000Z (over 10 years ago)
- Last Synced: 2025-04-11T00:12:45.417Z (2 months ago)
- Language: JavaScript
- Size: 102 KB
- Stars: 14
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This enables you to use one or more iPhones as remote touchpads in an HTML page. Run the "mobile-touchpads.js" script and include this HTML in your page:
This exposes a simple API off of `window.touchpads`:
touchpads.status // Either "Connecting...", "Connected", or "Disconnected"
touchpads.onstatuschange // Set this callback to be notified when touchpads.status changestouchpads.devices // [{ width: number, height: number, touches: [{ x: number, y: number }] }]
touchpads.onupdate // Set this callback to be notified when touchpads.devices changesUsing Safari on your iPhone, visit the page `http://[YOUR_IP]:7550/` and add it to your home screen. On OS X, you can find your IP address by option-clicking on the network icon in the menu bar.
Create your own WiFi network between your computer and your iPhone for best results, since it avoids other WiFi traffic. To install this so it's always running on OS X, run `npm install -g mobile-touchpads` and follow instructions in `com.madebyevan.mobile-touchpads.plist`.