WebSync is used as signaling gateway with/for WebRTC-Experiments e.g. RTCMultiConnection.js, DataChannel.js, Plugin-free screen sharing, and video conferencing. This repository is a sub part of https://github.com/muaz-khan/WebRTC-Experiment
JavaScript ASP C#
Latest commit 91fa6fe Jan 19, 2014 @muaz-khan WebSync is used as signaling gateway for https://www.webrtc-experimen…

This repository is a sub part of
https://github.com/muaz-khan/WebRTC-Experiment. You'll see how
websync/c#/ASP.NET can be used for webrtc signaling.


Realtime/Working WebRTC Experiments and WebSync! Demos

WebSync is used as signaling gateway for/with:

  1. RTCMultiConnection.js
  2. DataChanel.js
  3. Video-Conferencing experiment
  4. Plugin-free screen sharing experiment

and many others. Try a few demos: http://websync.somee.com/

Please visit main repository for other WebRTC experiments:


This repository contains two directories:

  1. Deployment-Package
  2. Source-Code

"Deployment-Package" directory can be deployed on any IIS +=7 web-server.

"Source-Code" is written in C# and ASP.NET WebForms.

How to use WebSync for signaling?

<script src="fm.js"> </script>
<script src="fm.websync.js"> </script>
<script src="fm.websync.subscribers.js"> </script>
<script src="fm.websync.chat.js"> </script>
// www.RTCMultiConnection.org/latest.js

var connection = new RTCMultiConnection();

// ------------------------------------------------------------------
// start-using WebSync for signaling
var channels = {};
var username = Math.round(Math.random() * 60535) + 5000;

var client = new fm.websync.client('websync.ashx');

    synchronous: true

    onSuccess: function () {
            channel: '/chat',
            userId: username,
            userNickname: username,
            onReceive: function (event) {
                var message = JSON.parse(event.getData().text);
                if (channels[message.channel] && channels[message.channel].onmessage) {

connection.openSignalingChannel = function (config) {
    var channel = config.channel || this.channel;
    channels[channel] = config;

    if (config.onopen) setTimeout(config.onopen, 1000);
    return {
        send: function (message) {
                channel: '/chat',
                data: {
                    username: username,
                    text: JSON.stringify({
                        message: message,
                        channel: channel
// end-using WebSync for signaling
// ------------------------------------------------------------------

// check existing sessions

// open new session
document.getElementById('open-new-session').onclick = function() {

Demos using WebSync for Signaling

  1. RTCMultiConnection All-in-One Demo
  2. DataChannel.js » A WebRTC Library for Data Sharing
  3. Video Conferencing
  4. Plugin-free Screen Sharing
  5. Admin/Guest audio/video calling using RTCMultiConnection
  6. WebRTC Group File Sharing using RTCDataChannel APIs!

Muaz Khan (muazkh@gmail.com) - @muazkh / @WebRTCWeb

This repository's main URL is:



WebRTC Experiments are released under MIT licence . Copyright (c) 2013 Muaz Khan.