RecordingModal component displays a modal with settings for configuring and managing recordings. It includes sections for both standard and advanced recording options, allowing users to specify video types, display options, background colors, custom text, and other recording parameters.

import React from 'react';
import { RecordingModal } from 'mediasfu-reactnative';

const recordingParameters = {
recordPaused: false,
recordingVideoType: 'fullDisplay',
recordingDisplayType: 'video',
recordingBackgroundColor: '#ffffff',
recordingNameTagsColor: '#000000',
recordingOrientationVideo: 'landscape',
recordingNameTags: true,
recordingAddText: false,
recordingCustomText: '',
recordingCustomTextPosition: 'top',
recordingCustomTextColor: '#000000',
recordingMediaOptions: 'default',
recordingAudioOptions: 'default',
recordingVideoOptions: 'default',
recordingAddHLS: false,
eventType: 'conference',
updateRecordingVideoType: (value) => {},
updateRecordingDisplayType: (value) => {},
updateRecordingBackgroundColor: (value) => {},
updateRecordingNameTagsColor: (value) => {},
updateRecordingOrientationVideo: (value) => {},
updateRecordingNameTags: (value) => {},
updateRecordingAddText: (value) => {},
updateRecordingCustomText: (value) => {},
updateRecordingCustomTextPosition: (value) => {},
updateRecordingCustomTextColor: (value) => {},
updateRecordingMediaOptions: (value) => {},
updateRecordingAudioOptions: (value) => {},
updateRecordingVideoOptions: (value) => {},
updateRecordingAddHLS: (value) => {},
};

function App() {
return (
<RecordingModal
isRecordingModalVisible={true}
onClose={() => console.log('Modal closed')}
confirmRecording={() => console.log('Confirm recording settings')}
startRecording={() => console.log('Start recording')}
parameters={recordingParameters}
/>
);
}

export default App;

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'