Skip to main content
The Vidinfra Uploader SDK is a modern TypeScript based library built for reliable large video uploads. It supports multipart uploads, progress tracking, drag and drop handling, and upload lifecycle control to simplify video ingestion workflows.

Features

  • Video Upload- Handles large video files through multipart upload. Uploads are split into smaller parts, improving stability on slow or unstable networks.
  • Progress Tracking- Reports real-time progress as each part uploads. You get uploaded bytes, overall percentage, estimated speed, and expected completion time.
  • Drag & Drop- Includes optional helpers for building a drag-and-drop upload zone. Works with standard DOM elements and requires minimal setup.
  • Pause and Resume- Upload sessions can be paused at any time. The SDK keeps track of completed parts so the process can resume without starting over.
  • Batch Upload- Accepts one or many files in a single call. Each upload runs independently, allowing you to manage or track them individually.
  • Secure by Design- Uses short-lived tokens to authenticate requests. Upload endpoints never expose secret keys.
  • Customizable- Ships with minimal UI helpers so you can apply your own styling or integrate it into an existing design system.
  • Responsive- Supports desktop and mobile environments with no additional configuration.
  • Universal Build- Distributed in CommonJS, ESM, and UMD formats. You can use it in modern bundlers, Node.js environments, or direct browser imports.
  • TypeScript Support- Full TypeScript support with accurate type definitions for safer and cleaner integration.

Installation

This section provides the installation commands for adding the Vidinfra Uploader SDK to a project using npm, yarn, or pnpm. It’s the initial setup step required before using the uploader.
Or,
Or,

Quick Start

ES Modules (Modern Bundlers)

This section shows how to initialize the Vidinfra Uploader SDK inside a modern JavaScript project. It sets the upload endpoint, JWT token, target element, and metadata. It also listens for a successful upload and logs when the file is complete.

UMD (Browser Script Tag)

This code block loads the Vidinfra Uploader in a browser using a script tag, applies the stylesheet, creates an uploader element, and initializes the uploader with the upload endpoint and token.

Configuration

This section explains the available settings for the Vidinfra Uploader. It shows the required fields and the optional options you can use to control metadata, upload behavior, and UI targets.

Supported File Formats

The Vidinfra Uploader accepts a wide range of video and audio formats. These formats are commonly used across recording tools, editing software, and streaming workflows, ensuring smooth uploads from most devices.

Videos

Audio

Theming

This code block shows how to customize the uploader’s colors and fonts. It lets you match the Vidinfra Uploader UI with your brand styling.

Branding

This code block controls the “Powered by Vidinfra” footer. You can keep it visible or turn it off by setting branding to true or false. Configure the “Powered by VidInfra” footer:

API Reference

Methods

This section lists the main methods of the Vidinfra Uploader. It explains how to control uploads, manage files, check the uploader state, update options, and remove the uploader when you’re done.

Events

This section shows all events you can listen to in the Vidinfra Uploader. It covers file-added, upload progress, success, errors, completion, and pause/resume/cancel actions so you can react to each step of the upload flow.

Response Structure

This section explains what data you get back after a successful upload. It returns the upload URL and the S3 details such as key, full file location, and video ID.

Package Formats

This table shows all build formats included in the Vidinfra Uploader package. It explains which file to use for Node.js, modern bundlers, browsers, UMD script tags, development builds, and TypeScript types. This section shows two CDN options (unpkg and jsDelivr) for loading the Vidinfra Uploader directly in the browser using a <script> tag.

Framework Examples

This section lists example integrations for popular frameworks, showing how to use the Vidinfra Uploader in React, Vue, Svelte, Next.js, Laravel, and WordPress.
This example shows how to set up the Vidinfra Uploader inside a React component. It initializes the uploader in useEffect, stores the instance, and destroys it when the component unmounts.
This example shows how to initialize the Vidinfra Uploader in a Vue 3 component. It creates the uploader in onMounted and attaches it to a div in the template.
This example shows how to set up the Vidinfra Uploader in a Svelte component. It loads the uploader inside onMount and connects it to the uploader div.
This example shows how to load the Vidinfra Uploader in a Next.js client component. It imports the uploader dynamically inside useEffect and attaches it to the uploader div.
This example shows how to use the Vidinfra Uploader in a Laravel project. The Blade file loads the script, and the JavaScript file initializes the uploader using values from environment variables.
This example shows how to use the Vidinfra Uploader in WordPress. It enqueues the uploader script and stylesheet, then initializes the uploader in a shortcode or template using values from WordPress settings.

Browser Support

The Vidinfra Uploader works on all major modern browsers. For the best performance, use the latest stable version of:
  • Chrome
  • Firefox
  • Safari
  • Edge
Older or unsupported browsers may not run advanced upload features like multipart uploads or drag-and-drop.