MediaSFU React Native
    Preparing search index...

    Variable MediasfuGenericConst

    MediasfuGeneric: React.FC<MediasfuGenericOptions> = ...

    MediasfuGeneric component provides a flexible foundation for building real-time media collaboration experiences. It supports audio/video conferencing, screen sharing, chat, polls, breakout rooms, and recording capabilities with full WebRTC/Mediasoup integration.

    • Real-time Media: Audio, video, and screen sharing with adaptive quality
    • Interactive Tools: Chat, polls, breakout rooms, whiteboard
    • Recording: Cloud recording with custom layouts and orientations
    • Flexible UI: Complete UI override system for custom branding
    • Custom Cards: Replace default video/audio card components
    • Seed Data: Pre-populate state for testing or demos
    • Local Mode: Run against local MediaSFU Community Edition server
    • MediaSFU Cloud: Seamless integration with hosted MediaSFU service
    1. MediaSFU Cloud (default): connectMediaSFU: true with credentials
    2. Community Edition: localLink pointing to self-hosted server
    3. Local UI Mode: useLocalUIMode: true for offline testing
    • customVideoCard: Custom render function for video participants
    • customAudioCard: Custom render function for audio-only participants
    • customMiniCard: Custom render function for minimized cards
    • uiOverrides: Replace entire UI components (modals, grids, controls)
    • PrejoinPage: Custom prejoin/welcome screen

    Component properties

    MediaSFU Generic component

    // Basic MediaSFU Cloud connection
    import { MediasfuGeneric } from 'mediasfu-reactnative';

    function App() {
    return (
    <MediasfuGeneric
    credentials={{
    apiUserName: 'your-api-username',
    apiKey: 'your-api-key'
    }}
    />
    );
    }
    // Community Edition with custom video cards
    import { MediasfuGeneric } from 'mediasfu-reactnative';
    import { CustomVideoCard } from './CustomVideoCard';

    function App() {
    return (
    <MediasfuGeneric
    localLink="http://localhost:3000"
    connectMediaSFU={false}
    customVideoCard={(props) => (
    <CustomVideoCard {...props} borderColor="#00ff00" />
    )}
    />
    );
    }
    // Testing with seed data and UI overrides
    import { MediasfuGeneric } from 'mediasfu-reactnative';
    import { CustomMainGrid } from './CustomMainGrid';

    function App() {
    const seedData = {
    member: 'John Doe',
    host: 'Jane Smith',
    eventType: 'conference',
    participants: [
    { name: 'Jane Smith', audioID: 'audio1', videoID: 'video1' },
    { name: 'John Doe', audioID: 'audio2', videoID: '' }
    ]
    };

    return (
    <MediasfuGeneric
    useSeed
    seedData={seedData}
    useLocalUIMode
    uiOverrides={{
    mainGrid: CustomMainGrid
    }}
    containerStyle={{ backgroundColor: '#1a1a1a' }}
    />
    );
    }