UNPKG

use-ffmpeg

Version:

A React hook for browser-based media processing using FFmpeg WASM - handles video and other file formats conversion with ease

13 lines 702 B
import type { UseFFmpeg } from "../types/useFFmpeg"; /** * Custom React hook for loading FFmpeg and performing file transcoding operations. * * Provides methods for initializing FFmpeg and transcoding files using FFmpeg once it is loaded. * * @returns {UseFFmpeg} An object containing: * - `loaded` (boolean): Indicates whether FFmpeg is loaded and ready to use. * - `loadFFmpeg(baseUrl?: string, mt?: boolean): Promise<void>`: A function to load FFmpeg. * - `transcode(file: File, outputFileFullName: string, cmdOptions?: string[]): Promise<Buffer>`: A function to transcode files using FFmpeg. */ export declare const useFFmpeg: () => UseFFmpeg; //# sourceMappingURL=useFFmpeg.d.ts.map