swrtc-signal-server
A not-garbage recode of signalmaster for SimpleWebRtc
Last updated 4 years ago by nfour .
Original npm · Tarball · package.json
$ cnpm install swrtc-signal-server 
SYNC missed versions from official npm registry.

swrtc-signal-server

This library mimics the signal-server signalmaster for SimpleWebRTC with some important changes.

  • Supports socket.io >= 1.3.0
  • Sane API

Why

SimpleWebRtc is garbage in terms of code quality, API and documentation. We all know that, but it's the least garbage library for webrtc which is being currently maintained (as of July 2015).

It is programmatic friendly and not tied to a .json file.

SignalServer  = require 'swrtc-signal-server'
SocketIo      = require 'socket.io'
http          = require 'http'

server = new http.Server (req, res) ->
	res.writeHead 404
	res.end('404')
	
server.listen 1300

io = SocketIo.listen server

swrtc = new SignalServer {
	rooms:
		maxClients: 0
		
	turnservers: []
	stunservers: []
	
	io: io
}

#
# or
#

swrtc = new SignalServer {
	server: server = new require('http').Server().listen()
	# or
	server: { host: '0.0.0.0', port: 1300 }
	
	io: require('socket.io')( server )
	# or
	io: null # Will use the above http server or config
}

# Woo...

Eventually when a better library surfaces/I create it out of searing frustration, this library can then be trashed.

Further API

View the source code for more information.

Install

npm install swrtc-signal-server

Current Tags

  • 0.3.3                                ...           latest (4 years ago)

9 Versions

  • 0.3.3                                ...           4 years ago
  • 0.3.2                                ...           4 years ago
  • 0.3.1                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.3                                ...           4 years ago
  • 0.2.2                                ...           4 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 19
Dependencies (3)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |