exitSpace (Javascript)

- Declaration

public async exitSpace(spaceConnection: CavrnusSpaceConnection): Promise<void>

- Description

Exits a space when given an active space connection.

- Sample

import { CavrnusSpatialConnector } from "../services/csc"; const csc = new CavrnusSpatialConnector(); const spaceUsers: CavrnusSpace[] = []; async function bindJoinableSpaces() { try { await csc.authenticateAsGuest("https://cav.dev.cavrn.us", "guest"); const spaceConnection = await csc.joinSpace(roomId.value); await csc.exitSpace(spaceConnection); } catch (err) { throw err; } }