Production vs Development Workflows
The src and assetId properties serve different architectural needs: real-time preview requires flexibility, while production rendering requires parallel processing capabilities.
The Challenge: Different Requirements for Different Contexts
Audio playback has fundamentally different requirements in development vs. production.
Development/Preview needs:
- Work with arbitrary audio URLs (user uploads, external sources)
- Immediate feedback without preprocessing
- Flexibility to test with any audio source
Production rendering needs:
- Parallel processing across a worker fleet
- Precise segment-level access for efficiency
- Guaranteed availability and consistency
A single approach can't satisfy both needs without compromising one or the other.
Development and Preview: src
The src attribute enables instant playback of arbitrary audio URLs through JIT transcoding:
<ef-audio src="https://example.com/audio.mp3"></ef-audio>
No preprocessing required — provide any audio URL and it works within seconds. This is ideal for development, testing, and real-time preview interfaces where users need instant feedback. It is not suitable for production rendering due to parallel processing requirements.
Production Rendering: assetId
The assetId attribute enables parallel rendering across a worker fleet:
<ef-audio assetid="upload-123abc"></ef-audio>
Why parallel rendering requires assetId:
Production rendering splits the timeline across multiple workers. Each worker renders a small slice of the timeline independently. This requires each worker to load only the exact segment of audio needed for its slice — not the full file. This segment-level precision requires assets that have been processed and segmented by Editframe's infrastructure, which raw src URLs don't provide.
Benefits of parallel rendering:
- Speed: Multiple workers render simultaneously instead of sequentially
- Efficiency: Each worker loads only the exact segment needed for its slice
- Scalability: More workers reduce render time linearly
When to Use Each
src | assetId | |
|---|---|---|
| Use case | Development, preview, testing | Production rendering jobs |
| Preprocessing | None required | Requires upload to Editframe |
| Parallel rendering | Not supported | Full support |
| Seeking | JIT, fast | Segment-precise |