React Native View Recorder
Examples

Standard Recording

Record a React Native view with animated content to MP4 video

Use useViewRecorder and RecordingView to capture any React Native view. This example records a gradient countdown animation at 60 fps and encodes it to an MP4 file.

Notes

  1. useViewRecorder() creates a session with a unique sessionId
  2. RecordingView wraps the content and links to the session via sessionId
  3. recorder.record() captures frames one by one, calling onFrame before each capture so you can update the UI
  4. The native encoder (AVAssetWriter on iOS, MediaCodec on Android) produces an H.264/HEVC MP4
  5. The returned promise resolves with the output file path when encoding completes

On this page