Hiyve Components - v1.0.0
    Preparing search index...

    Function useStreaming

    • Access streaming state and controls.

      Returns {
          clearError: () => void;
          error: string | null;
          featuredUserId: string | null;
          getStreamingUrls: () => Promise<string | null>;
          isStreaming: boolean;
          isStreamingStarting: boolean;
          startStreaming: (options?: StreamingOptions) => Promise<void>;
          stopStreaming: () => Promise<void>;
          streamingDuration: number;
          streamingId: string | null;
          streamingStartTime: Date | null;
          streamingUrl: string | null;
          switchStreamingUser: (userId: string) => Promise<void>;
      }

      Object containing streaming state, computed duration, and actions

      • clearError: () => void
      • error: string | null
      • featuredUserId: string | null
      • getStreamingUrls: () => Promise<string | null>
      • isStreaming: boolean
      • isStreamingStarting: boolean
      • startStreaming: (options?: StreamingOptions) => Promise<void>
      • stopStreaming: () => Promise<void>
      • streamingDuration: number
      • streamingId: string | null
      • streamingStartTime: Date | null
      • streamingUrl: string | null
      • switchStreamingUser: (userId: string) => Promise<void>

      Includes a computed streamingDuration that updates every second while streaming is active.