React Video Editor Documentation
What is an Adapter?
Understand the adapter concept in React Video Editor
What is an Adapter?
Adapters in React Video Editor are components that handle different types of media sources and provide a unified interface for the editor.
Overview
Adapters act as bridges between your media sources (videos, images, sounds) and the React Video Editor. They handle:
- Media loading and parsing
- Format conversion
- Metadata extraction
- Error handling
Types of Adapters
React Video Editor supports three main types of adapters:
Video Adapters
Handle video files and streams from various sources like:
- Local files
- Remote URLs
- Pexels API
- Custom video providers
Image Adapters
Manage image assets for overlays, thumbnails, and backgrounds:
- Local image files
- Remote image URLs
- Pexels stock photos
- Custom image providers
Sound Adapters
Process audio content for background music and sound effects:
- Local audio files
- Remote audio URLs
- Audio streaming services
- Custom audio providers
Why Use Adapters?
Adapters provide several benefits:
- Consistency: Unified API regardless of media source
- Flexibility: Easy to switch between different media providers
- Extensibility: Create custom adapters for your specific needs
- Error Handling: Centralized error management for media loading
Creating Custom Adapters
You can create custom adapters by implementing the adapter interface. See the individual adapter sections for examples.