ef-audio
Plays an audio file. Renders no visual output.
Set fft-size if you want to pair the element with ef-waveform for visualization.
Attributes
| Attribute | React prop | Type | Default | Description |
|---|---|---|---|---|
duration | duration | string | — | How long this element is active (CSS time, e.g. `"5s"`). |
fft-decay | fftDecay | number | 8 | Decay frames averaged into {@link getFrequencyData} (default 8). |
fft-gain | fftGain | number | 3 | Linear gain applied before frequency analysis (default 3.0). |
fft-size | fftSize | number | 128 | FFT window size for {@link getFrequencyData}/{@link getTimeDomainData} (rounded to a power of two, default 128). |
file-id | fileId | string | null | — | Cloud file identifier — resolves to `${apiHost}/api/v1/files/${fileId}`, taking priority over `src`. |
interpolate-frequencies | interpolateFrequencies | boolean | false | Smooths {@link getFrequencyData} bins by interpolating between FFT bands instead of nearest-neighbor sampling. |
loop | loop | boolean | false | Loop attribute — when this temporal is a self-driving root under a {@link PlaybackController}, the controller wraps back to `0` instead of pausing at `duration`. |
mute | muted | boolean | false | Mutes this element's audio. |
offset | offset | number | — | Start offset (seconds) within a parallel (`fixed`/`contain`/`fit`) parent timegroup. |
sourcein | sourcein | string | — | Start time within the source file (CSS time, e.g. `"1.5s"`). |
sourceout | sourceout | string | — | End time within the source file (CSS time, e.g. `"1.5s"`). |
src | src | string | — | URL of the source audio file. |
trimend | trimend | string | — | Trims this much off the end of the source (CSS time). |
trimstart | trimstart | string | — | Trims this much off the start of the source (CSS time). |
volume | volume | number | 1 | Audio volume (0.0 to 1.0). |
Events
| Event | Detail | Description |
|---|---|---|
child-duration-changed | { duration: number } | Fires on the nearest context-providing ancestor, when a nested media element's duration becomes known or changes. |