Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
docs(editor): correct the timelineStartSec comments — the head is raw, not output
Etienne Lescot59f6036eb6e7
diff --git a/src/lib/ai-edition/schema/index.ts b/src/lib/ai-edition/schema/index.tsindex ba6b188bf..d7fd4763c 100644--- a/src/lib/ai-edition/schema/index.ts+++ b/src/lib/ai-edition/schema/index.ts@@ -1037,9 +1037,12 @@ export function ensureDocument(value: unknown): AxcutDocument {/*** Build a timeline audio track for an imported audio asset (issue #350). The- * head is placed at `timelineStartSec` (output-timeline seconds) and the track- * spans the whole source file until the user trims it. Parsed through the schema- * so every default (gain, trim) is applied in one place.+ * head is placed at `timelineStartSec` (RAW/document timeline seconds — the same+ * clock the ruler, playhead and clip `timelineStartSec` use, NOT the+ * trim-compressed output programme; the export projects it with+ * `projectRawTimelineSecToPlayback`) and the track spans the whole source file+ * until the user trims it. Parsed through the schema so every default (gain,+ * trim) is applied in one place.*/export function createAudioTrack(input: {assetId: string;diff --git a/src/lib/ai-edition/store/projectStore.ts b/src/lib/ai-edition/store/projectStore.tsindex 1b8217753..c878e1d35 100644--- a/src/lib/ai-edition/store/projectStore.ts+++ b/src/lib/ai-edition/store/projectStore.ts@@ -410,8 +410,9 @@ export const useProjectStore = create<ProjectState>((set, get) => ({const track = createAudioTrack({assetId,durationSec: asset.durationSec ?? 0,- // Default to the playhead (output-timeline seconds), matching the- // timeline hook's placement.+ // Default to the playhead (RAW/document timeline seconds — the clock the+ // ruler and playhead use, NOT the trim-compressed output programme),+ // matching the timeline hook's placement.timelineStartSec: timelineStartSec ?? get().currentTimeSec,label: asset.label,});diff --git a/src/lib/ai-edition/store/useTimeline.ts b/src/lib/ai-edition/store/useTimeline.tsindex 55ed7d5ec..06d580831 100644--- a/src/lib/ai-edition/store/useTimeline.ts+++ b/src/lib/ai-edition/store/useTimeline.ts@@ -1261,10 +1261,12 @@ export function useTimeline() {// anchoring — each just writes `document.audioTracks` through the pure ops.// Place a new track for an imported audio asset, its head at the playhead (in- // output-timeline seconds) unless the caller says otherwise. Delegates to the- // store op, which also selects the new track and returns its id (or null). On- // success, retire the hook-local region/clip selection so the new audio-track- // selection isn't held CONCURRENTLY with a stale region/clip one.+ // RAW/document timeline seconds — the clock the ruler and playhead use, NOT the+ // trim-compressed output programme the export mixes onto) unless the caller says+ // otherwise. Delegates to the store op, which also selects the new track and+ // returns its id (or null). On success, retire the hook-local region/clip+ // selection so the new audio-track selection isn't held CONCURRENTLY with a+ // stale region/clip one.const addAudioTrack = useCallback(async (assetId: string, timelineStartSec?: number): Promise<string | null> => {const id = await storeAddAudioTrack(assetId, timelineStartSec ?? playheadSec());