Skip to main content

Function: Recorder()

function Recorder(params: {
fileOptions?: FilePickerAcceptType;
recorderOptions?: MediaRecorderOptions;
streamOptions?: {
frameRequestRate: number;
};
defaultFilename?: string;
onSuccess?: (filename: string) => void;
onCancel?: () => void;
children?: (props: { recordTime: number }) => ReactNode;
}): ReactNode;

Defined in: livelink.react/sources/components/utils/Recorder.tsx:28

Experimental

A React component that provides video recording functionality from a canvas element.

Parameters

ParameterTypeDescription
params{ fileOptions?: FilePickerAcceptType; recorderOptions?: MediaRecorderOptions; streamOptions?: { frameRequestRate: number; }; defaultFilename?: string; onSuccess?: (filename: string) => void; onCancel?: () => void; children?: (props: { recordTime: number; }) => ReactNode; }
params.fileOptions?FilePickerAcceptTypeConfiguration for the file picker when saving recordings
params.recorderOptions?MediaRecorderOptionsConfiguration options for the MediaRecorder
params.streamOptions?{ frameRequestRate: number; }Configuration for the canvas stream capture
params.streamOptions.frameRequestRatenumberDesired frame rate for video capture
params.defaultFilename?stringDefault filename for the recording. If not provided, generates a timestamped filename with scene name
params.onSuccess?(filename: string) => voidCallback function executed when recording is successfully completed and saved
params.onCancel?() => voidCallback function executed when recording is cancelled by the user
params.children?(props: { recordTime: number; }) => ReactNodeRender function that receives recording state and returns React elements

Returns

ReactNode