MediaSFU React Native
    Preparing search index...

    Variable MediasfuBroadcastConst

    MediasfuBroadcast: React.FC<MediasfuBroadcastOptions> = ...

    MediasfuBroadcast component provides a one-to-many streaming solution where only the host can broadcast audio/video to a large audience. Ideal for live streams, announcements, and one-way presentations.

    • One-to-Many: Only host can share audio/video (no screen share)
    • Full Screen Host: Host takes 100% of screen real estate
    • View-Only Audience: Participants can watch and chat but not broadcast
    • High Scalability: Optimized for large viewer counts
    • Chat & Polls: Audience engagement through text chat and polls
    • Recording: Capture broadcast for replay
    • Custom Branding: Override UI components and host card
    • Host video: 100% fullscreen
    • No participant grid (view-only mode)
    • Chat overlay optional
    • No screen sharing support

    Automatically sets eventType: 'broadcast' for one-to-many streaming mode.

    • Live announcements
    • Concert/performance streaming
    • Company-wide broadcasts
    • Educational lectures (one-way)

    Component properties

    MediaSFU Broadcast component

    // Basic live broadcast
    import { MediasfuBroadcast } from 'mediasfu-reactnative';

    function App() {
    return (
    <MediasfuBroadcast
    credentials={{
    apiUserName: 'your-api-username',
    apiKey: 'your-api-key'
    }}
    />
    );
    }
    // Branded broadcast with custom host card
    import { MediasfuBroadcast } from 'mediasfu-reactnative';
    import { BroadcastHostCard } from './BroadcastHostCard';

    function App() {
    return (
    <MediasfuBroadcast
    credentials={{
    apiUserName: 'your-api-username',
    apiKey: 'your-api-key'
    }}
    customVideoCard={(props) => (
    <BroadcastHostCard {...props} showViewerCount showLiveIndicator />
    )}
    imgSrc="https://example.com/broadcast-logo.png"
    containerStyle={{
    backgroundColor: '#000'
    }}
    />
    );
    }
    // Broadcast with custom controls and chat overlay
    import { MediasfuBroadcast } from 'mediasfu-reactnative';
    import { BroadcastControls } from './BroadcastControls';
    import { ChatOverlay } from './ChatOverlay';

    function App() {
    return (
    <MediasfuBroadcast
    credentials={{
    apiUserName: 'your-api-username',
    apiKey: 'your-api-key'
    }}
    uiOverrides={{
    controlButtons: BroadcastControls,
    messagesModal: ChatOverlay
    }}
    />
    );
    }