Skip to content

Latest commit

 

History

History
 
 

socket.io

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

WebRTC One-to-One video sharing using Socket.io / Demo

This WebRTC Experiment is using socket.io over node.js for signalig.


Use your own socket.io implementation!

If you want to install/use your own socket.io implementation; visit this link.

connection.openSignalingChannel = function(config) {
   var URL = 'http://domain.com:8888/';
   var channel = config.channel || this.channel || 'default-channel';
   var sender = Math.round(Math.random() * 60535) + 5000;
   
   io.connect(URL).emit('new-channel', {
      channel: channel,
      sender : sender
   });
   
   var socket = io.connect(URL + channel);
   socket.channel = channel;
   
   socket.on('connect', function () {
      if (config.callback) config.callback(socket);
   });
   
   socket.send = function (message) {
        socket.emit('message', {
            sender: sender,
            data  : message
        });
    };
   
   socket.on('message', config.onmessage);
};

Browser Support

This One-to-one WebRTC video chat using socket.io experiment works fine on following web-browsers:

Browser Support
Firefox Stable / Aurora / Nightly
Google Chrome Stable / Canary / Beta / Dev
Internet Explorer / IE Chrome Frame
Android Chrome Beta

License

WebRTC one-to-one video sharing using socket.io is released under MIT licence . Copyright (c) 2013 Muaz Khan.