Class Space

A Space is where participants meet. Participants can publish their own tracks and subscribe to other publishers.

A space emits SpaceEvent as a way to relay state updates.


  • EventEmitter
    • Space


  • Space is used to interact with a Space created first using the Mux Spaces Server API. Once you have created a Space on the server, you can get started by using this class.


    • jwt: string

      A JSON Web Token (JWT) with a sub of the Mux Space ID and an aud value that is an array containing any of the following strings:

      • pub - publishing of streams.
      • sub - subscribing to streams.
    • Optional options: SpaceOptionsParams

      An optional set of Space Options

    Returns Space


broadcasting: boolean

A boolean indicating whether the Space is currently being broadcast.

jwt: string
localParticipant?: LocalParticipant

The local participant in the Space. This will be set after a successful join.

sessionId?: string


Generated using TypeDoc