Skip to content

Studio: audio clip waveform never renders — clip-content renderer hits the selector-thumbnail branch before the tag==="audio" waveform branch (0.7.21) #1807

Description

@nicolasfilippini

Version: 0.7.21 (served Studio bundle)

Summary
The audio-clip waveform component is never mounted on the timeline. The clip-content renderer checks if (activePreviewUrl && clip.duration>0) return <SelectorThumbnail .../> before if (clip.tag==="audio") return <Waveform .../>. Since activePreviewUrl is always set while a composition is open, audio clips always render a selector-cropped thumbnail of the comp. For an <audio> element that crop is empty, so the clip block is blank — and the /waveform/* endpoint is never even requested.

Repro

  1. A composition with an <audio class="clip" data-start data-duration data-track-index> element on its own lane.
  2. Open it in the Studio timeline.

Expected
The audio clip block shows the waveform (the /api/projects/:id/waveform/* route returns peaks and the waveform component exists).

Actual
The block is flat/empty. DevTools network shows only /thumbnail/...?selector=%23<audio-id> (empty crop), never /waveform/.... The mounted node is the selector-thumbnail component (hidden <img> + tiled thumbnails), not the waveform component (no <canvas>/bars).

Mechanism (served 0.7.21 bundle, clip-content renderer)
Branch order is: sub-composition → if (activePreviewUrl && duration>0) selectorThumbnailif (tag==="audio") waveform. activePreviewUrl is non-null whenever a comp is active, so the audio/waveform branch is structurally unreachable.

Suggested fix
Move the tag==="audio" waveform branch above the generic activePreviewUrl && duration>0 selector-thumbnail branch (order: sub-comp → audio waveform → generic selector preview). The server-side waveform route works (returns ~4000 peaks, cached); only the client branch order needs reordering.

Confirmed by live DOM inspection: no <canvas>/waveform bars in the audio clip block, only the selector-thumbnail nodes; /waveform/ never requested.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions