Create Room
Create rooms for interactive livestreaming with co-hosting capabilities, configure participants, and obtain broadcaster credentials for streaming.Creating a Room
Basic Co-Hosts Room
Create a room for collaborative broadcasting with multiple participants:Room with Live Chat Channel
To enable live chat for viewer interaction, you must create a live channel after creating the room and livestream post. The channel requires both thepostId and roomId to be properly linked.
Channels are not automatically created. You must manually create the channel after the post is created, passing both the
postId and roomId.Room with Thumbnail
Upload and attach a thumbnail image:Parameters
title
title
Type:
Required: Yes
Description: Room title/nameGuidelines:
stringRequired: Yes
Description: Room title/nameGuidelines:
- Clear and descriptive
- Indicates content or purpose
- Recommended max: 100 characters
description
description
Type:
Required: No
Description: Detailed room descriptionGuidelines:
stringRequired: No
Description: Detailed room descriptionGuidelines:
- Provide context about the stream
- Mention topics to be covered
- Include any prerequisites
thumbnailFileId
thumbnailFileId
Type:
Required: No
Description: File ID of uploaded thumbnailUsage:
stringRequired: No
Description: File ID of uploaded thumbnailUsage:
- Upload image using FileRepository
- Use returned fileId in room creation
metadata
metadata
Type:
Required: No
Description: Custom metadata for the roomUse Cases:
objectRequired: No
Description: Custom metadata for the roomUse Cases:
- Store custom properties
- Link to external systems
- Track categories or tags
channelEnabled
channelEnabled
Type:
Required: No
Default:
Description: Indicates the room supports integrated chatBehavior:
booleanRequired: No
Default:
falseDescription: Indicates the room supports integrated chatBehavior:
- When
true, signals that the room supports live chat - You must manually create the live channel after creating the post
- Use
postIdandroomIdwhen creating the channel - See Room with Live Chat Channel for full workflow
parentRoomId
parentRoomId
Type:
Required: No
Description: ID of parent room for hierarchical relationshipsUse Cases:
stringRequired: No
Description: ID of parent room for hierarchical relationshipsUse Cases:
- Breakout sessions
- Multi-language streams
- Regional broadcasts
Getting Broadcaster Data
After creating a room, obtain streaming credentials:Broadcaster Credentials: The broadcast data contains credentials needed to start streaming. Use LiveKit SDK with the
coHostToken and coHostUrl to connect to the streaming server.Creating Livestream Post
Link the room to a post for social distribution:Complete Workflow Example
Full room creation, post, channel, and streaming setup:Best Practices
Room Configuration
Room Configuration
Configure rooms appropriately:
- Always enable channels for viewer interaction
- Upload thumbnails before creating posts
- Set clear, descriptive titles
- Include relevant metadata for filtering
- Validate participant list before creation
Participant Management
Participant Management
Handle participants effectively:
- Include all co-hosts in initial creation
- Limit participants to reasonable number (3-5)
- Verify user IDs exist before adding
- Update participant list as needed
Error Handling
Error Handling
Implement robust error handling:
Resource Cleanup
Resource Cleanup
Clean up resources appropriately:
- Delete rooms after streaming ends
- Stop streaming before deleting
- Handle interrupted streams
- Check room status before operations