Leave a session 🔗

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

session.disconnect();

This action will trigger the following events:

  • sessionDisconnected: dispatched by Session object of the local user that is leaving. Automatically cleans all remote videos.
  • streamDestroyed: dispatched by Publisher object of the local user that is leaving (only if publishing). Automatically cleans the local video.
  • streamDestroyed: dispatched by Session object of every other remote user connected to the session. Automatically cleans the remote video.
  • connectionDestroyed: dispatched by Session object of every other remote user connected to the session.