Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

drop-in client code for webrtc.io

branch: master

remove .swap

latest commit 481a74694f
Dennis Mårtensson authored August 03, 2012
Octocat-spinner-32 example remove .swap August 03, 2012
Octocat-spinner-32 lib remove .swap August 03, 2012
Octocat-spinner-32 README.md add readme for seting the STUN server July 30, 2012
Octocat-spinner-32 package.json Turn into npm library. August 02, 2012
README.md

webrtc.io

A library that is to webRTC like socket.io is to WebSockets.

This will eventually be bundled with the server code.

Installation

Currently, webrtc.io depends on socket.io, so include the socket.io client as well. After including socket.io-client, drop in lib/io.js. You'll also need a webrtc.io server running.

Now you can start using webRTC commands with our abstraction.

Usage

rtc.createStream('DOM_id');
rtc.connect('http://yourserveraddress');
rtc.on('ready', function() {
  // all streams are loaded
});

You can set the STUN server by calling rtc.SERVER = "STUN stun.l.google.com:19302" and set your server. The default STUN server used by the library is one from google.

Something went wrong with that request. Please try again.