MediaSFU React Native
    Preparing search index...

    Variable MediasfuChatConst

    MediasfuChat: React.FC<MediasfuChatOptions> = ...

    MediasfuChat component provides a simple two-person video chat experience optimized for one-on-one conversations with side-by-side video layout.

    • Two-Person Limit: Maximum 2 participants with audio/video
    • Side-by-Side Layout: Equal split-screen view for both participants
    • Text Chat: Real-time messaging alongside video
    • No Screen Share: Focused on face-to-face conversation
    • Recording: Capture chat sessions
    • Simple Controls: Minimal UI for quick start
    • Custom Cards: Override video card appearance
    • 50/50 split screen for 2 participants
    • No grid pagination (max 2 people)
    • Chat overlay available
    • No screen sharing support

    Automatically sets eventType: 'chat' for two-person video chat mode.

    • One-on-one consultations
    • Customer support video calls
    • Personal video chats
    • Quick meetings between 2 people

    Component properties

    MediaSFU Chat component

    // Basic two-person video chat
    import { MediasfuChat } from 'mediasfu-reactnative';

    function App() {
    return (
    <MediasfuChat
    credentials={{
    apiUserName: 'your-api-username',
    apiKey: 'your-api-key'
    }}
    />
    );
    }
    // Chat with custom video cards and branding
    import { MediasfuChat } from 'mediasfu-reactnative';
    import { ChatVideoCard } from './ChatVideoCard';

    function App() {
    return (
    <MediasfuChat
    credentials={{
    apiUserName: 'your-api-username',
    apiKey: 'your-api-key'
    }}
    customVideoCard={(props) => (
    <ChatVideoCard {...props} showNameAlways roundedCorners />
    )}
    imgSrc="https://example.com/chat-icon.png"
    containerStyle={{
    backgroundColor: '#f5f5f5'
    }}
    />
    );
    }
    // Chat with custom prejoin and UI overrides
    import { MediasfuChat } from 'mediasfu-reactnative';
    import { SimplePrejoin } from './SimplePrejoin';
    import { MinimalControls } from './MinimalControls';

    function App() {
    return (
    <MediasfuChat
    PrejoinPage={SimplePrejoin}
    credentials={{
    apiUserName: 'your-api-username',
    apiKey: 'your-api-key'
    }}
    uiOverrides={{
    controlButtons: MinimalControls,
    messagesModal: CustomChatOverlay
    }}
    />
    );
    }