GithubHelp home page GithubHelp logo

leobel96 / stellarpad Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 758 KB

Use your touch device as a wireless Graphic Tablet

License: MIT License

JavaScript 73.55% CSS 14.98% HTML 11.47%
graphic javascript webrtc stylus tablet socket-io html css pwa electronjs

stellarpad's Introduction

Why?

I have an Ipad Pro and I really felt the necessity to use it as graphic tablet for my PC with my favourite softwares. At the moment only macOS natively supports this function and the third-party alternative are pretty expensive and closed-source. So I asked myself: why not developing a simple, open and cross-platform alternative? Why not take advantage of all the modern web technologies (see chapter "A little bit of technical information")?

Structure

Stellar Pad consists of 3 main parts:

  • Server: a simple server application currently hosted on glitch.com. Its purpouse is to serve videoReceiver and handle initial handshake
  • videoSender: an electron application intended to be installed on the device (i.e. PC) that will send the video stream and will be controlled by the videoReceiver. Only Windows and Linux supported at the moment
  • videoReceiver: a PWA (Progressive Web Application) intended to be installed on the device that will receive the video stream and will control the videoSender

Usage

videoSender

videoSender can be found in the realeases: download it according to your OS. A portable x64 version for Windows and portable AppImage version for Linux are present; simply run them.

videoReceiver

The videoReceiver is a PWA and can be reached visiting https://stellarpad.glitch.me. Once correctly opened the website, you will be asked to install the PWA; simply follow the passages and a Stellar Pad icon will be added to your homescreen (like a classic application). ⚠IMPORTANT⚠: some internet providers block Glitch (why?). If you encounter any problem with https://stellarpad.glitch.me (website unreachable or blank page), it is possible you have to change your DNS on both videoSender device and videoReceiver device .

Supported devices

videoReceiver has been tested on an Ipad Pro 2nd generation and on an Android 10 smartphone but should work on all recent iOS and Android devices while videoSender has been tested on a Windows 10 laptop and an Ubuntu laptop but should work on all recent Windows and Linux devices.

A little bit of technical information

The communication between videoReceiver and videoSender uses a local WebRTC for both video and data (finger/stylus movements). In order to initialize the WebRTC, many passages are required. Due to the fact that both PWA and WebRTC require a secure HTTPS connection, an external secure server had to be implemented in order to guarantee a secure handshake (obtain HTTPS certificates for local domains is a mess). The connection between videoReceiver, videoSender and server is established using Socket.io: a pretty fast and easy to handle real-time engine. After the handshake both videoReceiver and videoSender disconnect from server and all the packets remain within local network. When a stylus or finger moves on the videoReceiver's screen, a movement message is sent to videoSender through WebRTC datachannel and, then, mouse is moved using pretty fast C functions called though Foreign Function Interface (FFI). In this way, even if video latency is not very low, mouse latency is kept very low and is nearly negligible.

Disclaimer

Stellar Pad is an amateur project developed by me in my spare time. It is distributed as-is and I assume no responsibility for any problem/damage it could provide. Use at your own risk.

stellarpad's People

Contributors

leobel96 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

stellarpad's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.