Skip to content

Installation

PackagePurpose
@hyperserve/video-uploaderCore: hooks, state machine, validation, shared theme
@hyperserve/video-uploader-reactWeb UI: DropZone, FileList, FileItem, etc.
@hyperserve/video-uploader-react-nativeReact Native UI: FilePicker, FileList, FileItem, etc.
@hyperserve/video-uploader-adapter-hyperserveOfficial Hyperserve adapter

The core package is always required. Pick the UI package for your platform, or use neither for fully headless usage.

Terminal window
npm install @hyperserve/video-uploader @hyperserve/video-uploader-react

Peer dependencies: React 18+ and React DOM 18+.

Terminal window
npm install @hyperserve/video-uploader @hyperserve/video-uploader-react-native

Peer dependencies: React 18+.

These are optional peer dependencies. The library gracefully degrades without them.

PackagePurposeWithout it
expo-video-metadatamaxDuration validationSkips validation, warns once
expo-video-thumbnailsThumbnail generationthumbnailUri stays null
expo-videoIn-app playback of ready videosFalls back to the thumbnail image
react-native-background-uploadTrue background upload with progressFalls back to fetch with estimated progress

If you are uploading to Hyperserve, install the official adapter package:

Terminal window
npm install @hyperserve/video-uploader-adapter-hyperserve

When developing against a local clone of universal-video-uploader (for example, to test a fix before publishing), npm github: URLs do not target subdirectories of a monorepo. Use a file: reference in your consumer app’s package.json instead:

{
"dependencies": {
"@hyperserve/video-uploader": "file:../path/to/universal-video-uploader/packages/core",
"@hyperserve/video-uploader-react": "file:../path/to/universal-video-uploader/packages/react",
"@hyperserve/video-uploader-adapter-hyperserve": "file:../path/to/universal-video-uploader/packages/upload-adapter-hyperserve"
}
}

Run bun build (or npm run build) inside the cloned repo before installing. The file: reference resolves to the package’s built output, so re-run the build after each change.

For published preview builds (for example, from a pull request), use pkg.pr.new URLs.