Create new instance of Fishjam Client.
Example usage:
const fishjamClient = new FishjamClient({
fishjamUrl: fastify.config.FISHJAM_URL,
managementToken: fastify.config.FISHJAM_MANAGEMENT_TOKEN,
});
Creates a broadcast viewer token for the given room.
a broadcast viewer token
Create a new room. All peers connected to the same room will be able to send/receive streams to each other.
Delete an existing room. All peers connected to this room will be disconnected and removed.
Get a list of all existing rooms.
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.
refreshed peer token
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.