MenuMenu

RTCMultiConnection.autoCloseEntireSession

Use this boolean to force closing entire session (room) as soon as the moderator (initaitor or room-manager) leaves

Set boolean

connection.autoCloseEntireSession = true;

Description

parameterdescription
autoCloseEntireSession It is a boolean, that can be either "true" or "false"

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();

// set this line to close room as soon as owner leaves
connection.autoCloseEntireSession = true;

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

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

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