MediaSFU React Native
    Preparing search index...

    Variable PreJoinPageConst

    PreJoinPage: React.FC<PreJoinPageOptions> = ...

    PreJoinPage component allows users to either create a new room or join an existing one.

    The properties for the PreJoinPage component.

    Various parameters required for the component.

    Function to show alert messages.

    Function to update the loading modal visibility.

    Function to connect to the socket.

    Function to connect to the local socket.

    Function to update the socket.

    Function to update the local socket.

    Function to update the validation status.

    The source URL for the logo image.

    The user credentials containing the API username and API key.

    Flag to determine if the component should return the UI.

    The options for creating/joining a room without UI.

    The link to the local server.

    Flag to determine if the component should connect to MediaSFU.

    Function to create a room on MediaSFU.

    Function to join a room on MediaSFU.

    The rendered PreJoinPage component.

    import React from 'react';
    import { PreJoinPage } from 'mediasfu-reactnative';
    import { JoinLocalRoomOptions } from 'mediasfu-reactnative';

    function App() {
    * const showAlertFunction = (message: string) => console.log(message);
    const updateLoadingFunction = (visible: boolean) => console.log(`Loading: ${visible}`);
    const connectSocketFunction = () => {}; // Connect socket function
    const updateSocketFunction = (socket: Socket) => {}; // Update socket function
    const updateValidatedFunction = (validated: boolean) => {}; // Update validated function
    const updateApiUserNameFunction = (userName: string) => {}; // Update API username function
    const updateApiTokenFunction = (token: string) => {}; // Update API token function
    const updateLinkFunction = (link: string) => {}; // Update link function
    const updateRoomNameFunction = (roomName: string) => {}; // Update room name function
    const updateMemberFunction = (member: string) => {}; // Update member function

    return (
    <PreJoinPage
    parameters={{
    showAlert: showAlertFunction,
    updateIsLoadingModalVisible: updateLoadingFunction,
    connectSocket: connectSocketFunction,
    updateSocket: updateSocketFunction,
    updateValidated: updateValidatedFunction,
    updateApiUserName: updateApiUserNameFunction,
    updateApiToken: updateApiTokenFunction,
    updateLink: updateLinkFunction,
    updateRoomName: updateRoomNameFunction,
    updateMember: updateMemberFunction,
    imgSrc: 'https://example.com/logo.png'
    }}
    credentials={{
    apiUserName: 'user123',
    apiKey: 'apikey123'
    }}
    returnUI={true}
    noUIPreJoinOptions={{
    action: 'create',
    capacity: 10,
    duration: 15,
    eventType: 'broadcast',
    userName: 'Prince',
    }}
    connectMediaSFU={true}
    localLink='http://localhost:3000'
    />
    );
    };


    export default App;