sessionid | RTCMultiConnection

It is same as "roomid". It is a readonly property.

Usage

var roomid = 'room-id';
connection.open(roomid, function() {
    alert(connection.sesssionid === roomid); // true
});

Description

parameterdescription
sessionid it is a readonly string

Check if room creator left

connection.onleave = function(event) {
    if (event.userid === connection.sessionid) {
        alert('Room creator left');
    }
};

connection.onstreamended = function(event) {
    if (event.userid === connection.sessionid) {
        alert('A stream between you and room creator is closed');
    }
};

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
};

connection.openOrJoin('your-room-id', function() {
    alert(connection.sessionid);
});
</script>