MenuMenu

RTCMultiConnection.candidates

Manage STUN, TURN and host ip-addresses usage

Usage

connection.candidates = {
    turn: true,
    stun: true,
    host: false
};

Description

parameterdescription
turn Enable or disable "relay" ip-addresses
stun Enable or disable (peer) "reflexive" ip-addresses
host Enable or disable local ip-addresses

Demo

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

<script>
var connection = new RTCMultiConnection();

// this line is VERY_important
connection.socketURL = 'https://rtcmulticonnection.herokuapp.com:443/';

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

// enable only relay ip-addresses
connection.candidates = {
    turn: true,
    stun: false,
    host: false
};

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