MenuMenu

Getting Started guide for RTCMultiConnection

Learn how to use RTCMultiConnection

It is recommended to watch this YouTube video that explains how to test and use built-in demos.

Remember: Use this chrome extension for HTTP-websites. LocalHost is excluded, though.

Simple Video Chat Demo

<script src="https://muazkhan.com:9001/dist/RTCMultiConnection.min.js"></script>
<script src="https://muazkhan.com:9001/socket.io/socket.io.js"></script>

<script>
var connection = new RTCMultiConnection();

// this line is VERY_important
connection.socketURL = 'https://muazkhan.com:9001/';

// if you want audio+video conferencing
connection.session = {
    audio: true,
    video: true
};

connection.openOrJoin('your-room-id');
</script>

Simple Text Chat Demo

<script src="https://muazkhan.com:9001/dist/RTCMultiConnection.min.js"></script>
<script src="https://muazkhan.com:9001/socket.io/socket.io.js"></script>

<script>
var connection = new RTCMultiConnection();

// this line is VERY_important
connection.socketURL = 'https://muazkhan.com:9001/';

// if you want text chat
connection.session = {
    data: true
};

connection.onopen = function(event) {
    connection.send('hello everyone');
};

connection.onmessage = function(event) {
    alert(event.userid + ' said: ' + event.data);
};

connection.openOrJoin('your-room-id');
</script>
For more information: docs/getting-started.md

Video presentation