Skip to main content
Create live streaming posts that enable real-time video broadcasting to your community. Live stream posts combine video streaming with interactive features like comments and reactions.

Real-time Broadcasting

Stream live video content directly to your community feeds

Interactive Engagement

Enable live comment, reactions, and real-time viewer interaction

Overview

Live stream posts enable real-time video broadcasting with interactive community engagement. Create streams with live chat, reactions, and viewer participation features.

Parameters

ParameterTypeRequiredDescription
textStringPost content (max 20,000 characters)
streamIdStringID of the created live stream
targetTypeEnumTarget destination (community or user feed)
targetIdStringTarget ID (null for own feed)
tagsArray<String>Searchable tags for categorization
metadataObjectCustom fields for extended functionality
func createLivestreamPost(stream: AmityStream) async {
    // Build your post structure
    let builder = AmityLiveStreamPostBuilder(
        streamId: stream.streamId,
        text: "Check out this live session!"
    )
    // Create a live stream post on the current user feed.
    do {
        let post = try await postRepository.createLiveStreamPost(builder, targetId: nil, targetType: .user, metadata: nil, mentionees: nil)
    } catch {
        // Handle error here
    }
}

Best Practices

  • Test your streaming setup before going live
  • Prepare an engaging title and description
  • Announce the stream in advance to build audience
  • Have a clear agenda or topic for the session
  • Interact with viewers through live comments
  • Respond to comments and questions in real-time
  • Use polls and reactions to gauge audience interest
  • Encourage participation with calls-to-action
  • Ensure stable internet connection for smooth streaming
  • Use good lighting and clear audio
  • Test camera and microphone before starting
  • Have backup plans for technical issues
  • Keep streams focused and valuable for your audience
  • Maintain appropriate length for your content type
  • Consider recording for those who miss the live session
  • Follow up with post-stream content or summaries

Troubleshooting

Problem: Live stream creation fails before post creationSolutions:
  • Verify Video SDK is properly initialized
  • Check streaming permissions and credentials
  • Ensure device has camera and microphone access
  • Validate network connectivity for streaming
Problem: Post creation fails with invalid stream IDSolutions:
  • Verify stream was created successfully
  • Check stream ID is correctly passed to post creation
  • Ensure stream hasn’t been deleted or expired
  • Confirm user has permission to create live stream posts
Problem: Poor video quality or connection dropsSolutions:
  • Check internet bandwidth and stability
  • Adjust video resolution and bitrate settings
  • Use wired connection when possible
  • Implement adaptive bitrate streaming
// Configure stream quality based on connection
const streamConfig = {
  resolution: networkQuality > 0.8 ? '1080p' : '720p',
  bitrate: networkQuality > 0.8 ? 2500 : 1500,
  frameRate: 30
};
Problem: Chat or reactions not working during live streamSolutions:
  • Verify real-time features are enabled
  • Check user permissions for chat participation
  • Ensure proper WebSocket connections
  • Test interaction features before going live
// Enable real-time features for live stream
const streamSettings = {
  chatEnabled: true,
  reactionsEnabled: true,
  viewerCount: true,
  moderationEnabled: true
};

Common Use Cases

Educational Content

Live tutorials, workshops, and educational sessions

Product Demos

Feature showcases, product launches, and demonstrations

Community Events

Q&A sessions, meetups, and community gatherings

Behind the Scenes

Process sharing, team updates, and informal content