diff options
| author | cashmere <cashmere@autistici.org> | 2026-08-16 06:16:56 +0200 |
|---|---|---|
| committer | cashmere <cashmere@autistici.org> | 2026-08-16 06:16:56 +0200 |
| commit | f1043734438c8518a302f698d9ae6583a75f0c14 (patch) | |
| tree | d3e636a96e6349c1ad17afa7b28c9ffe5c882e37 /apps/web/src/core/managers/timeline-manager.ts | |
| parent | 37d22b1e390bd6cea04bf8e15069281ee125cf10 (diff) | |
| download | opencut-f1043734438c8518a302f698d9ae6583a75f0c14.tar.gz | |
feat: add transitions, track mixing, and voiceover controls
Diffstat (limited to 'apps/web/src/core/managers/timeline-manager.ts')
| -rw-r--r-- | apps/web/src/core/managers/timeline-manager.ts | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/apps/web/src/core/managers/timeline-manager.ts b/apps/web/src/core/managers/timeline-manager.ts index 6fb28625..82987200 100644 --- a/apps/web/src/core/managers/timeline-manager.ts +++ b/apps/web/src/core/managers/timeline-manager.ts @@ -34,6 +34,7 @@ import { RemoveTrackCommand, ToggleTrackMuteCommand, ToggleTrackVisibilityCommand, + UpdateTrackVolumeCommand, InsertElementCommand, DeleteElementsCommand, DuplicateElementsCommand, @@ -178,6 +179,16 @@ export class TimelineManager { const command = new ToggleTrackMuteCommand(trackId); this.editor.command.execute({ command }); } + updateTrackVolume({ + trackId, + volume, + }: { + trackId: string; + volume: number; + }): void { + const command = new UpdateTrackVolumeCommand({ trackId, volume }); + this.editor.command.execute({ command }); + } toggleTrackVisibility({ trackId }: { trackId: string }): void { const command = new ToggleTrackVisibilityCommand(trackId); @@ -841,7 +852,9 @@ export class TimelineManager { }): void { const shouldMute = elements.some(({ trackId, elementId }) => { const element = this.getElementByRef({ trackId, elementId }); - return element && canElementHaveAudio(element) && !isElementMuted({ element }); + return ( + element && canElementHaveAudio(element) && !isElementMuted({ element }) + ); }); const nextUpdates = elements.flatMap(({ trackId, elementId }) => { |
