Installation
Packages
Section titled “Packages”| Package | Purpose |
|---|---|
@hyperserve/video-uploader | Core: hooks, state machine, validation, shared theme |
@hyperserve/video-uploader-react | Web UI: DropZone, FileList, FileItem, etc. |
@hyperserve/video-uploader-react-native | React Native UI: FilePicker, FileList, FileItem, etc. |
@hyperserve/video-uploader-adapter-hyperserve | Official Hyperserve adapter |
The core package is always required. Pick the UI package for your platform, or use neither for fully headless usage.
Web (React)
Section titled “Web (React)”npm install @hyperserve/video-uploader @hyperserve/video-uploader-reactyarn add @hyperserve/video-uploader @hyperserve/video-uploader-reactpnpm add @hyperserve/video-uploader @hyperserve/video-uploader-reactbun add @hyperserve/video-uploader @hyperserve/video-uploader-reactPeer dependencies: React 18+ and React DOM 18+.
React Native
Section titled “React Native”npm install @hyperserve/video-uploader @hyperserve/video-uploader-react-nativeyarn add @hyperserve/video-uploader @hyperserve/video-uploader-react-nativepnpm add @hyperserve/video-uploader @hyperserve/video-uploader-react-nativebun add @hyperserve/video-uploader @hyperserve/video-uploader-react-nativePeer dependencies: React 18+.
Optional native dependencies
Section titled “Optional native dependencies”These are optional peer dependencies. The library gracefully degrades without them.
| Package | Purpose | Without it |
|---|---|---|
expo-video-metadata | maxDuration validation | Skips validation, warns once |
expo-video-thumbnails | Thumbnail generation | thumbnailUri stays null |
expo-video | In-app playback of ready videos | Falls back to the thumbnail image |
react-native-background-upload | True background upload with progress | Falls back to fetch with estimated progress |
Hyperserve Adapter
Section titled “Hyperserve Adapter”If you are uploading to Hyperserve, install the official adapter package:
npm install @hyperserve/video-uploader-adapter-hyperserveyarn add @hyperserve/video-uploader-adapter-hyperservepnpm add @hyperserve/video-uploader-adapter-hyperservebun add @hyperserve/video-uploader-adapter-hyperserveLocal development against a checkout
Section titled “Local development against a checkout”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.