RTCMultiConnection-v1.4 All-in-One test ® Muaz Khan
Copyright © 2013 Muaz Khan<@muazkh> » @WebRTC Experiments » Google+ » What's New?
WebRTC DataChannel
Text Chat |
Share Files |
- Mesh networking model is implemented to open multiple interconnected peer connections
- Maximum peer connections limit is 256 (on chrome)
Feedback
How to use RTCMultiConnection?
// https://www.webrtc-experiment.com/RTCMultiConnection-v1.4.js var connection = new RTCMultiConnection(); // easiest way to customize what you need! connection.session = { audio: true, video: true }; // on getting local or remote media stream connection.onstream = function(e) { document.body.appendChild(e.mediaElement); }; // remove video if someone leaves connection.onstreamended = function(e) { if(e.mediaElement.parentNode) { e.mediaElement.parentNode.removeChild(e.mediaElement); } }; // check existing sessions connection.connect(); // open new session document.getElementById('open-new-session').onclick = function() { connection.open(); };