WebRTC signalling for Meteor with Reactivity!
Demo - in examples/app
Shared
stream = new Meteor.Stream('signalling');
Server
var allowAll = function () { return true; };
stream.permissions.read(allowAll);
stream.permissions.write(allowAll);
Client
var signallingChannelName = "uniqueStringTokenForThisSignallingChannel";
var rtcPeerConnectionConfig = {};
// Config passed to getUserMedia()
//
// Could be null, then no media will be requested, i.e., for when you only
// want data channels, or one way video/audio calls.
var mediaConfig = {
video: true,
audio: true
};
var webRTCSignaller = SingleWebRTCSignallerFactory.create(
stream,
signallingChannelName,
'master',
servers,
config,
mediaConfig
);
// Creates the rtcPeerConnection
webRTCSignaller.start();
// ... Whenever someone wants to inititate a call (make a connection)
webRTCSignaller.createOffer();
// Then if you have written similar code for a client using the same
// signallingChannelName then it should connect for a call.
For more see the app in the example directorty, which is also running on the demo site