Interact creates a peer to peer connection between your desktop and your mobile device.
See remote controller or drawing board.
$ npm install interact
Interact
is a nodejs server. It's API inherits from express and is very clean and easy. Let's say you want to create a communication channel called foo
:
var app = require('interact')();
//create coomunication channel
app.room('foo', 'view');
see api for more details.
Well, that's it! Nothing more.
Interact
is also a web socket client.
<script src="/interact/interact.js"></script>
Communicate with an interact server is dead simple!
var channel = interact('foo');
channel.emit('next');
channel.on('previous', function() {
//do something
});
My wish is to create an ecosytem of self-contained apps around Interact
. An app is a service that you could reuse multiple times and in separate projects. For example, use your mobile as a remote controller and pair it (thanks to a qrcode) with a web presentation (slides) would be as easy as:
interact('foo')
.use(qrcode)
.use(controller)
.use(slides)
Create an interact room. A room is a peer to peer channel between a client and your server.
app.room('foo', 'view');
The second argument is a view redirection. It's the view the server will serve to the client.