Annotations
The annotations example demonstrates time-synchronized text annotations with full editing capabilities, keyboard navigation, and Aeneas-format JSON import/export. View Live Demo →What It Demonstrates
- Time-synced annotations - Text segments aligned to audio timeline
- Keyboard navigation - Arrow keys to move between annotations
- Drag-to-adjust - Resize annotation boundaries by dragging
- Inline editing - Click to edit annotation text
- Continuous play - Auto-play next annotation
- Link endpoints - Adjusting one annotation moves adjacent ones
- JSON import/export - Aeneas-format compatibility
- Custom actions - Add buttons for split, delete, adjust timing
Complete Example
Key Features
Annotation Data Structure
Annotations use a simple format:Aeneas Format Support
Import Aeneas-format JSON:Drag-to-Adjust Boundaries
Enable draggable annotation boundaries:Each annotation has two draggable handles (start and end). Dragging adjusts the annotation boundaries in real-time.
Keyboard Navigation
Navigate annotations with keyboard:| Key | Action |
|---|---|
| A | Add annotation at playhead |
| ArrowUp | Select previous annotation |
| ArrowDown | Select next annotation |
| Enter | Play selected annotation |
| Space | Play/pause |
Link Endpoints
When enabled, adjusting one annotation moves adjacent annotations:Continuous Play
Auto-play the next annotation when current one finishes:Annotation Actions
Add custom action buttons:JSON Import/Export
Export annotations to JSON:Adding Annotations Programmatically
Add new annotations at runtime:Inline Text Editing
Edit annotation text by clicking when editable:Source Code
View the complete source code:- Example component:
website/src/components/examples/AnnotationsExample.tsx - Annotations package:
packages/annotations/src/ - E2E tests:
e2e/annotations.spec.ts