Function ConfigureWhiteboardModal

ConfigureWhiteboard provides a modal interface for configuring whiteboard settings, including assigning participants, validating settings, and starting or stopping a whiteboard session.

import { ConfigureWhiteboard } from 'mediasfu-reactjs';
import { io } from 'socket.io-client';

const parameters = {
participants: [{ id: "1", name: "John Doe", islevel: "1", useBoard: false }],
socket: io("http://localhost:3000"),
itemPageLimit: 10,
islevel: "2",
roomName: "Room 1",
eventType: "meeting",
shareScreenStarted: false,
shared: false,
breakOutRoomStarted: false,
breakOutRoomEnded: true,
recordStarted: false,
recordResumed: false,
recordPaused: false,
recordStopped: false,
recordingMediaOptions: "video",
canStartWhiteboard: true,
whiteboardStarted: false,
whiteboardEnded: true,
hostLabel: "Host",
updateWhiteboardStarted: (started) => console.log("Whiteboard started:", started),
updateWhiteboardEnded: (ended) => console.log("Whiteboard ended:", ended),
updateWhiteboardUsers: (users) => console.log("Whiteboard users updated:", users),
updateCanStartWhiteboard: (canStart) => console.log("Can start whiteboard:", canStart),
updateIsConfigureWhiteboardModalVisible: (isVisible) => console.log("Whiteboard modal visibility:", isVisible),
onScreenChanges: ({ changed }) => console.log("Screen changed:", changed),
captureCanvasStream: () => console.log("Canvas stream captured"),
prepopulateUserMedia: ({ name }) => console.log("Prepopulating user media for:", name),
rePort: ({ restart }) => console.log("Report with restart:", restart),
showAlert: ({ message, type }) => console.log(`${type}: ${message}`),
};

<ConfigureWhiteboard
isVisible={true}
onConfigureWhiteboardClose={() => console.log("Whiteboard modal closed")}
parameters={parameters}
/>

Properties

propTypes?: WeakValidationMap<ConfigureWhiteboardModalOptions>

Used to declare the types of the props accepted by the component. These types will be checked during rendering and in development only.

We recommend using TypeScript instead of checking prop types at runtime.

contextTypes?: ValidationMap<any>

Lets you specify which legacy context is consumed by this component.

defaultProps?: Partial<ConfigureWhiteboardModalOptions>

Used to define default values for the props accepted by the component.

type Props = { name?: string }

const MyComponent: FC<Props> = (props) => {
return <div>{props.name}</div>
}

MyComponent.defaultProps = {
name: 'John Doe'
}
displayName?: string

Used in debugging messages. You might want to set it explicitly if you want to display a different name for debugging purposes.


const MyComponent: FC = () => {
return <div>Hello!</div>
}

MyComponent.displayName = 'MyAwesomeComponent'