VideoUltra API
    Preparing search index...

    Interface MediaSource

    A media source for the Media panel (stock footage, the host's library). Every call gets an AbortSignal: the editor aborts when the user types on or closes the panel.

    interface MediaSource {
        id: string;
        label: string;
        load(item: MediaSourceItem, signal: AbortSignal): Promise<Blob>;
        search(
            query: { cursor: string | null; text: string },
            signal: AbortSignal,
        ): Promise<{ items: readonly MediaSourceItem[]; next?: string | null }>;
    }
    Index
    id: string
    label: string

    Visible, already translated (the panel's section heading).

    • The file for a result the user adds.

      Parameters

      Returns Promise<Blob>

    • Results for the search box text (empty = browse); cursor from the last page's next.

      Parameters

      • query: { cursor: string | null; text: string }
      • signal: AbortSignal

      Returns Promise<{ items: readonly MediaSourceItem[]; next?: string | null }>