youyudehexie / n-dual

node.js dual screen

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#N-dual.js

##Control Web Application with phone or pad

Create by youyudehexie

Refer to controldeck.js, remote.js

##Getting Started

  1. Go to http://ndual.whattoc.com/example1 to view demo1
  2. Scan the qrcode on screen with your phone and jump to the url
  3. Wait for a few second, you can control your web application by drag.

Attention:

1.wechat bowser performance is terrible, please use chrome.

##Make your own

<script src="/socket.io/socket.io.js"></script>
<script src="/ndual.js"></script>
<script>
    Ndual(function(message){
        if(message === 'dragright') Reveal.navigateRight(); //doSomething you want to do,here is an example 
        else if (message === 'dragleft') Reveal.navigateLeft();
    })
</script>

the phone controller will send message to your application.you can catch the message and do something you wantto do.such as click something, move element.

##Example

##Download

https://github.com/youyudehexie/n-dual/tree/master/public/build

##My Seed Project

https://github.com/youyudehexie/ndual-seed

About

node.js dual screen

License:MIT License


Languages

Language:JavaScript 75.5%Language:CSS 23.9%Language:F# 0.4%Language:Erlang 0.3%Language:PHP 0.0%