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

    Function StreamingControls

    • Streaming controls with go-live/stop button, duration display, RTMP URL input, and pulsing "LIVE" indicator badge.

      When idle, displays a "Go Live" button with an optional RTMP URL input. While a stream start is in progress, an activity indicator replaces the button. During streaming, a pulsing "LIVE" badge is shown alongside a stop button and elapsed-time display in MM:SS format.

      Errors are displayed below the controls and can be dismissed by tapping them (if onClearError is provided).

      Parameters

      Returns Element

      import { StreamingControls } from '@hiyve/rn-capture';
      import { useStreaming } from '@hiyve/rn-react';

      function StreamingPanel() {
      const {
      isStreaming, isStreamingStarting, streamingDuration, error,
      startStreaming, stopStreaming, clearError,
      } = useStreaming();

      return (
      <StreamingControls
      isStreaming={isStreaming}
      isStreamingStarting={isStreamingStarting}
      streamingDuration={streamingDuration}
      error={error}
      onStartStreaming={startStreaming}
      onStopStreaming={stopStreaming}
      onClearError={clearError}
      showRtmpInput
      />
      );
      }