Function RecordingModal

RecordingModal component provides an interface for configuring and controlling recording settings within a modal. This component enables users to customize recording parameters, such as video and display type, background color, custom text, and orientation, and to initiate or confirm the recording process.

import { RecordingModal } from 'mediasfu-reactjs';

// Define the recording parameters
const recordingParams = {
recordPaused: false,
recordingVideoType: "bestDisplay",
recordingDisplayType: "video",
recordingBackgroundColor: "#000000",
recordingNameTagsColor: "#FFFFFF",
recordingOrientationVideo: "landscape",
recordingNameTags: true,
recordingAddText: true,
recordingCustomText: "Sample Text",
recordingCustomTextPosition: "top",
recordingCustomTextColor: "#FF0000",
recordingMediaOptions: "option1",
recordingAudioOptions: "option2",
recordingVideoOptions: "option3",
recordingAddHLS: true,
eventType: "meeting",
updateRecordingVideoType: (value) => console.log(value),
updateRecordingDisplayType: (value) => console.log(value),
updateRecordingBackgroundColor: (value) => console.log(value),
updateRecordingNameTagsColor: (value) => console.log(value),
updateRecordingOrientationVideo: (value) => console.log(value),
updateRecordingNameTags: (value) => console.log(value),
updateRecordingAddText: (value) => console.log(value),
updateRecordingCustomText: (value) => console.log(value),
updateRecordingCustomTextPosition: (value) => console.log(value),
updateRecordingCustomTextColor: (value) => console.log(value),
updateRecordingMediaOptions: (value) => console.log(value),
updateRecordingAudioOptions: (value) => console.log(value),
updateRecordingVideoOptions: (value) => console.log(value),
updateRecordingAddHLS: (value) => console.log(value),
};

// Render the RecordingModal component
<RecordingModal
isRecordingModalVisible={true}
onClose={() => console.log("Modal closed")}
backgroundColor="#83c0e9"
position="bottomRight"
confirmRecording={() => console.log("Recording confirmed")}
startRecording={() => console.log("Recording started")}
parameters={recordingParams}
/>

Properties

propTypes?: WeakValidationMap<RecordingModalOptions>

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<RecordingModalOptions>

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'