Client class that allows to manage Rooms and Peers for a Fishjam App. It requires the Fishjam URL and management token that can be retrieved from the Fishjam Dashboard.

Constructors

Methods

  • Create a new peer assigned to a room.

    Parameters

    • roomId: RoomId
    • options: PeerOptionsWebRTC = {}

    Returns Promise<{ peer: Peer; peerToken: string }>

  • Refresh the peer token for an already existing peer. If an already created peer has not been connected to the room for more than 24 hours, the token will become invalid. This method can be used to generate a new peer token for the existing peer.

    Parameters

    Returns Promise<string>

    refreshed peer token