awaitAnySpaceConnection (Javascript)

- Declaration

public awaitAnySpaceConnection(): Promise<string>

- Description

Returns a promise of the space ID when any space is joined.

- Sample

import { CavrnusSpatialConnector } from "../services/csc"; function async joinSpace() { const csc = new CavrnusSpatialConnector(); try { const spaceId = await csc.awaitAnySpaceConnection(); const spaceConnection = await csc.joinSpace(roomId); } catch (err) { throw err; } }