Developer docs

A place in your app.

Start with the local evaluation package. Fayblu is a native React Native SDK for iOS and Android; it requires a native build.

01 / Installation

The package is currently distributed as a local evaluation archive, not a public npm release. Once you have the archive:

Terminal
npm install ./fayblu-video-editor-0.1.0.tgz
npm install react-native-safe-area-context
cd ios && pod install

The example baseline is React Native 0.85 and React 19.2. Broader version compatibility has not been established. Use safe-area-context 5.x and rebuild both native apps after installation.

02 / Permissions & presentation

Configure microphone access for voice-over recording. On iOS, include a meaningful NSMicrophoneUsageDescription. On Android, declare android.permission.RECORD_AUDIO and handle the runtime permission flow.

Video selection uses the system picker. For Android content URIs supplied by your app, retain a readable grant until import finishes. Present the editor in a portrait-locked route or activity with a SafeAreaProvider.

03 / Add the editor

React Native
import { VideoEditor, editorThemes } from '@fayblu/video-editor';
import { SafeAreaProvider } from 'react-native-safe-area-context';

<SafeAreaProvider>
  <VideoEditor
    licenseKey={FAYBLU_LICENSE_KEY}
    editorName="My Editor"
    theme={editorThemes.ocean}
    onExport={(uri, duration) => {
      // Local MP4 URI; duration in seconds.
      // Your app owns saving or uploading the file.
    }}
    onError={(error) => console.warn(error.message)}
    onExit={() => { /* dismiss your editor route */ }}
  />
</SafeAreaProvider>

Keep the editor mounted through export if your app needs the completion callback. Your host app controls navigation and any subsequent saving or uploading.

04 / Props & callbacks

initialVideoUri

Optional local file:// URI, or a readable Android content:// URI. Read once on mount; remount to load a different initial source.

onExport(uri, duration)

Receives a completed local MP4 URI and output duration in seconds. It does not upload or save to the photo library.

initializeFayblu({ licenseKey })

Call during async app startup. Resolves when access is validated; rejects with LICENSE_FAILED on failure.

licenseKey

Optional after initialization; otherwise provide the account key on VideoEditor.

onError(error)

Receives SDK failures. Normal picker cancellation and discarded takes are not errors.

errorPresentation

Use default for SDK error messages, or custom with onError for host-managed messages. Confirmation dialogs and OS permission prompts still apply.

onChange(edit)

Observes committed edit state, including an initial null state. Session references are temporary and are not a saved-project format.

theme

Pass an editorThemes preset or override semantic colors. Omit it for the neutral dark default.

editorName

Optional header name, blank by default. Limited to 24 characters and one line to preserve the editor layout.

onExit()

Signals an accepted editor exit after any discard confirmation. Your app dismisses the route or modal.

05 / Match your app

Choose one of five built-in themes: Light, Midnight, Lime, Ocean, or Sunset. Import editorThemes from the SDK and pass a preset directly to the editor. Omit the theme prop to keep the neutral dark default.

Theme presets
import { VideoEditor, editorThemes } from '@fayblu/video-editor';

<VideoEditor theme={editorThemes.ocean} />

// Also available:
// editorThemes.light
// editorThemes.midnight
// editorThemes.lime
// editorThemes.sunset

Make a preset your own by overriding individual tokens. Pair your accent with a readable foreground. Changing themes while mounted preserves the video and edits.

Customize a preset
<VideoEditor
  theme={{
    ...editorThemes.midnight,
    accent: '#A78BFA',
    onAccent: '#17102B',
    cornerRadius: 10,
  }}
/>

The video canvas remains black. System pickers and alerts follow the platform appearance; your app controls the status bar styling.

06 / File ownership & export

Source media is copied to temporary session storage. Completed exports are separate files in the app-private FaybluExports directory. Your app owns retaining, moving, uploading and deleting those outputs.

Temporary session references cannot be reused after cleanup. Export is not a guaranteed background job, and there is no public export cancellation or persistent draft recovery API.

07 / Commercial licensing

Create a key under Dashboard → Licenses after preparing an evaluation or subscribing to a registered app. Call await initializeFayblu({ licenseKey }) during app startup, then render VideoEditor without the key prop. You can also pass licenseKey directly. A fresh startup validation opens the editor immediately; backgrounding, expiry or failed checks may require waiting for revalidation. One key covers your paid apps; each platform identifier must match the installed app. Online checks are required, with no saved offline license. Your license key connects the SDK to Fayblu’s online validation service.