Fetching contributors…
Cannot retrieve contributors at this time
executable file 128 lines (86 sloc) 3.96 KB

How to use?

Please make sure you've installed RTCMultiConnection.

All files from /dist directory are available on CDN:

<!-- or -->
<script src="/dist/RTCMultiConnection.min.js"></script>

<!-- Heroku Link -->
<script src=""></script>

<!-- or specific version -->
<script src=""></script>

<!-- or CDN -->
<script src=""></script>

<!-- another CDN -->
<script src=""></script>

<!-- another CDN -->
<script src=""></script>

If you're sharing files, you also need to link:

<script src=""></script>

You can link multiple files from dev directory. Order doesn't matters.


<script src=""></script>

Set different socket URL

By default, RTCMultiConnection uses default port of your domain.

You can use custom ports either via config.json file:

  "socketURL": "",
  "socketMessageEvent": "RTCMultiConnection-Message"

Or simply override in your HTML code:

connection.socketURL = '';

// if your server is already having "message" event
// then you can use something else, unique.
connection.socketMessageEvent = 'unique-message';

For testing purpose, you can use this as well:

  "socketURL": "",
  "socketMessageEvent": "RTCMultiConnection-Message"


connection.socketURL = '';

Here is a demo explaining how to use above socketURL:

Integrate in your own applications?

// node.js code

If you're using express.js:

var fs = require('fs');

var options = {
    key: fs.readFileSync('fake-keys/privatekey.pem'),
    cert: fs.readFileSync('fake-keys/certificate.pem')

var express = require("express"),
    http = require("https"), // Use HTTPs here -------------
    app = express(),
    server = http.createServer(options, app);



Other Documents

  1. Installation Guide
  2. How to Use?
  3. API Reference
  4. Upgrade from v2 to v3
  5. How to write iOS/Android applications?
  6. Tips & Tricks



RTCMultiConnection is released under MIT licence . Copyright (c) Muaz Khan.