diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-04-07 04:41:27 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-04-07 04:41:27 +0200 |
| commit | cbd1b8212370c67b34a70dccd21bd82de72fead2 (patch) | |
| tree | d97cbee2aae22c22b59c59a50e9f8a6af0ae8ccf /apps/web/src/stores/sounds-store.ts | |
| parent | 4f7d401a974047d37673ee8e3840dceaaddc295c (diff) | |
| download | opencut-cbd1b8212370c67b34a70dccd21bd82de72fead2.tar.gz | |
refactor: structured track layout per scene
Diffstat (limited to 'apps/web/src/stores/sounds-store.ts')
| -rw-r--r-- | apps/web/src/stores/sounds-store.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/web/src/stores/sounds-store.ts b/apps/web/src/stores/sounds-store.ts index b32d77bc..e7622240 100644 --- a/apps/web/src/stores/sounds-store.ts +++ b/apps/web/src/stores/sounds-store.ts @@ -215,7 +215,7 @@ export const useSoundsStore = create<SoundsStore>((set, get) => ({ try {
const editor = EditorCore.getInstance();
const currentTime = editor.playback.getCurrentTime();
- const tracks = editor.timeline.getTracks();
+ const tracks = editor.scenes.getActiveScene().tracks;
const response = await fetch(audioUrl);
if (!response.ok)
@@ -225,7 +225,7 @@ export const useSoundsStore = create<SoundsStore>((set, get) => ({ const audioContext = new AudioContext();
const buffer = await audioContext.decodeAudioData(arrayBuffer);
- const audioTrack = tracks.find((t) => t.type === "audio");
+ const audioTrack = tracks.audio[0];
let trackId: string;
if (audioTrack) {
|
