Realtime/Working WebRTC Experiments and WebSync! Demos
WebSync is used as signaling gateway for/with:
- RTCMultiConnection.js
- DataChanel.js
- Video-Conferencing experiment
- Plugin-free screen sharing experiment
and many others. Try a few demos: http://websync.somee.com/
=
Please visit main repository for other WebRTC experiments:
https://github.com/muaz-khan/WebRTC-Experiment
=
This repository contains two directories:
- Deployment-Package
- Source-Code
"Deployment-Package" directory can be deployed on any IIS +=7 web-server.
"Source-Code" is written in C# and ASP.NET WebForms.
=
<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');
client.setAutoDisconnect({
synchronous: true
});
client.connect({
onSuccess: function () {
client.join({
channel: '/chat',
userId: username,
userNickname: username,
onReceive: function (event) {
var message = JSON.parse(event.getData().text);
if (channels[message.channel] && channels[message.channel].onmessage) {
channels[message.channel].onmessage(message.message);
}
}
});
}
});
connection.openSignalingChannel = function (config) {
var channel = config.channel || this.channel;
channels[channel] = config;
if (config.onopen) setTimeout(config.onopen, 1000);
return {
send: function (message) {
client.publish({
channel: '/chat',
data: {
username: username,
text: JSON.stringify({
message: message,
channel: channel
})
}
});
}
};
};
// end-using WebSync for signaling
// ------------------------------------------------------------------
// check existing sessions
connection.connect();
// open new session
document.getElementById('open-new-session').onclick = function() {
connection.open();
};
=
Demos using WebSync for Signaling
- RTCMultiConnection All-in-One Demo
- DataChannel.js » A WebRTC Library for Data Sharing
- Video Conferencing
- Plugin-free Screen Sharing
- Admin/Guest audio/video calling using RTCMultiConnection
- WebRTC Group File Sharing using RTCDataChannel APIs!
=
Muaz Khan (muazkh@gmail.com) - @muazkh / @WebRTCWeb
=
This repository's main URL is:
https://github.com/muaz-khan/WebSync-Signaling
=
WebRTC Experiments are released under MIT licence . Copyright (c) 2013 Muaz Khan.