aview-widget
v1.0.0
Published
Aview upload widget for embedding in web applications
Maintainers
Readme
aview-widget
A React component library for embedding Aview's video/audio upload and translation functionality directly into your web applications.
Features
- 🎯 Easy Integration: Drop-in React component ready to use
- 📱 Responsive Design: Works seamlessly on desktop and mobile
- 🎬 Media Support: Handles video and audio file uploads
- 🌍 Multi-language: Select multiple target languages for translation
- ⚡ TypeScript: Full TypeScript support with type definitions
- 🎛️ Customizable: Configurable file type restrictions and callbacks
- 🎨 Beautiful UI: Modern gradient design with inline styles
Installation
npm install aview-widgetBasic Usage
import React from "react";
import AviewUpload from "aview-widget";
const App = () => {
return <AviewUpload creatorKey="your-creator-key" />;
};
export default App;API Reference
Required Props
creatorKey(string): Your API creator key that will be sent asapi-creator-idin request headers
Optional Props
allowedFileTypes("video" | "audio" | "all"): Restrict file uploads to specific media types (default: "all")"video": Only accept video files"audio": Only accept audio files"all": Accept both video and audio files
Examples
Basic Example
import AviewUpload from "aview-widget";
<AviewUpload creatorKey="your-creator-key" />;Video Files Only
<AviewUpload creatorKey="your-creator-key" allowedFileTypes="video" />Audio Files Only
<AviewUpload creatorKey="your-creator-key" allowedFileTypes="audio" />How It Works
- Upload: Users can upload video/audio files or paste a URL
- Language Selection: Select target languages for translation from a dynamically loaded list
- Submit: The widget automatically sends the file and selected languages to the Aview API
- Callbacks: Get notified of success or errors through callback functions
TypeScript Support
The library is written in TypeScript and includes type definitions:
License
Copyright © 2025 Aview. All rights reserved.
This is proprietary software. Unauthorized copying, modification, distribution, or use of this software is strictly prohibited without explicit written permission from Aview.
