Leave a session

By calling session.disconnect method you can leave the session.


sessionDisconnected event will be triggered by session object. The default behaviour is the deletion of all HTML video elements associated to this particular session. To avoid this, call event.preventDefault() method:

session.on('sessionDisconnected', function (event) {
    // Do wahtever you want when the user leaves the session