VideoUltra API
    Preparing search index...

    Interface AudioLibrary

    A music & sound-effects source for the Audio panel — pass it as audioLibrary on <VideoEditor />. Every call gets an AbortSignal: the editor aborts when the user types on, switches category or closes the panel.

    const library: AudioLibrary = {
    categories: [{ id: 'chill', label: 'Chill' }],
    search: async ({ text, category, cursor }, signal) => {
    const res = await fetch(`/api/sounds?q=${text}&c=${category ?? ''}&page=${cursor ?? ''}`, { signal });
    return res.json(); // { tracks: [...], next }
    },
    load: async (track, signal) => (await fetch(`/api/sounds/${track.id}/file`, { signal })).blob(),
    };
    <VideoEditor audioLibrary={library} />
    interface AudioLibrary {
        categories?: readonly AudioLibraryCategory[];
        notice?: string;
        title?: string;
        load(track: AudioLibraryTrack, signal: AbortSignal): Promise<Blob>;
        search(
            query: AudioLibraryQuery,
            signal: AbortSignal,
        ): Promise<AudioLibraryPage>;
    }
    Index
    categories?: readonly AudioLibraryCategory[]

    Category chips; the editor puts "All" first.

    notice?: string

    One line under the list, e.g. "Music by Example Audio · free for any use".

    title?: string

    Heading of the library section (default: the audioLibrary label, "Music & sounds").

    • The full audio file to add to the project (any format the editor imports).

      Parameters

      Returns Promise<Blob>