Skip to main content

Documentation Index

Fetch the complete documentation index at: https://learn.social.plus/llms.txt

Use this file to discover all available pages before exploring further.

Your First Live Stream

This tutorial will guide you through creating a basic live streaming feature. You’ll learn how to set up broadcasting, handle stream states, and implement basic playback functionality.

What You’ll Build

By the end of this tutorial, you’ll have:
  • ✅ A camera preview for broadcasting
  • ✅ Stream creation and management
  • ✅ Basic broadcast controls (start/stop)
  • ✅ Stream state monitoring
  • ✅ Simple stream viewing capability

Prerequisites

  • SDK installed and configured
  • User authentication working
  • Required permissions granted (camera, microphone)

Step 1: Create the Stream

First, create a stream object that represents your live broadcast:

    Step 2: Set Up Camera Preview

    Create a camera preview that users will see before going live:

      Step 3: Implement Stream Controls

      Add functionality to start and stop broadcasting:

        Step 4: Handle Stream States

        Monitor and respond to different streaming states:

          Step 5: Basic Stream Viewing

          Create a simple viewer component to watch live streams:

            Testing Your Implementation

            1. Test Camera Preview

            • Verify camera preview appears correctly
            • Test camera switching (front/back)
            • Check aspect ratio (should be 16:9)

            2. Test Stream Creation

            • Verify streams are created successfully
            • Check stream metadata (title, description)
            • Test error handling for failed creation

            3. Test Broadcasting

            • Start broadcast and verify connection
            • Monitor state changes
            • Test broadcast stop functionality

            4. Test Viewing

            • Load and play live streams
            • Test viewer error handling
            • Verify playback quality

            Next Steps

            Congratulations! You’ve built your first live streaming feature. Here’s what to explore next:
            1. Core Concepts - Understand streaming fundamentals
            2. Broadcasting Features - Add advanced broadcasting capabilities
            3. Playback Controls - Enhance the viewing experience
            4. Push Notifications - Notify users about stream events

            Troubleshooting

            Common Issues

            Camera Not Working
            • Check camera permissions
            • Verify device camera availability
            • Test on different devices
            Stream Won’t Start
            • Verify authentication is working
            • Check network connectivity
            • Monitor console/logs for errors
            Poor Video Quality
            • Check network bandwidth
            • Adjust video resolution settings
            • Test on different network conditions
            Playback Issues
            • Verify stream URL is accessible
            • Check supported video formats
            • Test with different players
            For more help, see our Troubleshooting Guide.