Overview
The Editor structure defines a complete video or image composition with multiple layers, channels, and segments. It provides frame-accurate control over timing, positioning, effects, and layering.Video vs Image Output:
- Video Rendering: Supports all segment types (video, audio, text, image, nested editors)
- Image Rendering: Only supports text and image segments (renders a static frame at time 0)
Editor Configuration
Root Properties
Channel Structure
Channels are independent layers that can contain multiple segments. All segments within a channel play sequentially, while segments across different channels play simultaneously.Segment Types
Base Segment Properties
All segment types inherit these properties:Visual Segment Properties
Video, image, text, and editor segments include these positioning properties:Video Segment
Displays video content with optional audio. Additional Properties:
Example:
Image Segment
Displays static images or animated GIFs. Additional Properties:
Example:
Text Segment
Rich text overlays with full typography and styling control. Typography Properties:
Alignment Properties:
Text Wrapping Properties:
Color Properties:
Example:
Audio Segment
Background audio or music tracks. Audio segments don’t have visual properties. Properties:
Example:
Editor Segment (Nested Composition)
Nest entire editor configurations within segments for complex compositions. Additional Properties:
Example:
Time Value Format
Time values can be specified as absolute (milliseconds) or relative (percentage):- Offset:
{ type: "absolute", value: 1000 }= start 1 second after previous segment - Duration:
{ type: "relative", value: 0.5 }= last for 50% of total video duration
Timing & Duration Calculation
How Segment Timing Works
- Sequential within channels: Segments in the same channel play one after another
- Parallel across channels: Segments in different channels play simultaneously
- Offset delays: Each segment can delay relative to the previous one
Duration Calculation Rules
Example Timeline
Positioning & Transform Properties
Position
Size
Transforms
Fit Modes
Controls how media (video/image) fits within specified width/height bounds.cover (Default for video)
- Behavior: Fills entire area, crops overflow
- Use case: Full-screen backgrounds
- Aspect ratio: Maintained
- Example: 16:9 video in 9:16 canvas → sides cropped
contain (Default for image)
- Behavior: Fits entire media, may have letterboxing
- Use case: Logos, overlays that must be fully visible
- Aspect ratio: Maintained
- Example: Square image in rectangular area → bars on sides or top/bottom
fill
- Behavior: Stretches to fill entire area
- Use case: Rare - usually avoid as it distorts
- Aspect ratio: Not maintained
- Example: Any aspect ratio → stretched to match bounds exactly
Text Styling Reference
Font Options
Font Weight Options
Text Alignment
Text Wrapping Modes
Color Format
All colors use hex format with optional alpha channel:#FFFFFF- White#000000- Black#FF0000- Red#00000080- 50% transparent black#FFFFFF00- Fully transparent white
Complete Example: Multi-Layer Video
Complete Example: Static Image
Best Practices
Layering
- Use
zIndexto control stacking order - Background elements:
zIndex: 0 - Mid-layer elements:
zIndex: 5 - Text/overlays:
zIndex: 10+ - Keep zIndex values spaced for easy insertion
Performance
- Limit segments: < 50 per composition
- Optimize source media: compress before upload
- Use appropriate resolutions:
- TikTok/Instagram: 1080x1920 (9:16)
- YouTube Shorts: 1080x1920 (9:16)
- Square: 1080x1080 (1:1)
Timing
- Use
offsetfor staggered animations - Combine absolute and relative times for flexibility
- Test edge cases (segment boundaries, overlaps)
Text Rendering
- Readability: Use high contrast (white text on dark bg or vice versa)
- Stroke: Add
strokeWidth: 3-5for text on video backgrounds - Font size: Minimum 40px for mobile readability
- Line count: Keep under 3 lines for best engagement
- Emojis: Fully supported, render correctly
Color Selection
- Text on video: White with black stroke (
color: "#FFFFFF",strokeColor: "#000000") - Backgrounds: Use semi-transparent (
#00000080for 50% black) - Highlights: Brand colors with full opacity
- Test: Verify colors on different screens/backgrounds
Media Sources
- URLs must be publicly accessible: No auth required
- Supported formats:
- Video: MP4, MOV, WebM
- Image: PNG, JPEG, GIF, WebP
- Audio: MP3, WAV, OGG
- HTTPS required: All source URLs must use HTTPS
- CORS: Ensure proper CORS headers on your media server
Common Patterns
Full-Screen Video Background
Centered Logo Overlay
Bottom-Third Text Banner
Fade In Effect (Manual)
Troubleshooting
Text Not Appearing
- Check
zIndex- must be higher than background elements - Verify
opacityis > 0 - Ensure
colorcontrasts with background - Check timing - verify segment is active during playback
Media Not Loading
- Verify URL is publicly accessible (test in browser)
- Check CORS headers on media server
- Ensure HTTPS (not HTTP)
- Verify file format is supported
Unexpected Timing
- Review
offsetvalues - they’re relative to previous segment - Check
startTrimandendTrimvalues - Verify
durationoverrides if specified - Remember: segments in same channel are sequential, different channels are parallel
Quality Issues
- Use higher resolution source media
- Avoid over-scaling (
scale> 2.0) - Use
fit: 'contain'instead offillto avoid distortion - Ensure FPS matches source media (typically 30fps)
