0.0.3 • Published 12 years ago

hellortc v0.0.3

Weekly downloads
10
License
-
Repository
github
Last release
12 years ago

helloRTC

Example

Server

npm install hellortc

var app = require('http').createServer(handler)
	, io = require('socket.io').listen(app)
	, hellortc = require('hellortc').createServer(io);

app.listen(3000);

function handler(req, res) {
	res.writeHead(200);
	res.end();
}

Client

Sending a call:

var hello = new Hello({
	remote: document.getElementById('remove-video'),
	local: document.getElementById('local-video')
});
hello.register(0);
hello.call(1);

Receiving a call:

var hello = new Hello({
	remote: document.getElementById('remove-video'),
	local: document.getElementById('local-video')
});
hello.register(1);
hello.on('call', function(uid) {
	hello.answer(uid);
});
0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago