Configuration options for joining the room.
The payload containing the room details and action (join
or create
).
The API username, used for authentication.
The API key, used for authentication.
Optional
localThe local link for Community Edition users. If provided, it overrides the default API URL.
A promise resolving to an object containing the API response:
data
: The response object, either CreateJoinRoomResponse
or CreateJoinRoomError
.success
: Boolean indicating whether the operation was successful.
Asynchronously joins a room on MediaSFU.
This function sends a POST request to the MediaSFU API to join an existing room. It validates the provided credentials and constructs the appropriate API endpoint, including support for the Community Edition via a custom
localLink
.Throws
Throws an error if the request fails or if the provided credentials are invalid.
Example