Editor cannot add a second overlapping audio region on a separate track
Describe the bug
The editor cannot add a second audio region when the playhead is already inside an existing audio region, even though the timeline already supports multiple audio rows internally.
To Reproduce
- Open a video in the editor.
- Add one audio region that spans across the current playhead position.
- Try to add another audio file while the playhead is still inside that existing region.
- The editor blocks the add with "Cannot place audio here" instead of creating a second audio region on another track.
Expected behavior
If multiple audio tracks are supported, adding a second audio region should be able to place it on a separate audio track instead of rejecting it just because track 0 already overlaps at the current position.
Additional context
Current source already has the concept of multiple audio rows (AudioRegion.trackIndex and getAudioTrackRowId(...) in the timeline), but the Add Audio flow in TimelineEditor still:
- always calls
onAudioAdded(...)without atrackIndex, so new regions default to track 0 - rejects the add whenever the current playhead is inside any existing audio region, before a different track can even be considered
That matches the symptom reported in #319 where adding another audio track only works after cutting the first track or placing the new audio beside it.
Opened #324 for this. The fix keeps the current add-audio flow but places the new region on the first non-overlapping audio track instead of rejecting it as soon as the playhead is already inside another audio region.
Current main now includes this fix: added audio is placed on an available audio track instead of being blocked by an overlapping region on another track, and audio drag/resize validation is track-aware.
Closing this as fixed. If this still reproduces on the latest build, we can reopen with the new repro details.