diff options
Diffstat (limited to 'apps/web/src/core')
| -rw-r--r-- | apps/web/src/core/managers/audio-manager.ts | 1 | ||||
| -rw-r--r-- | apps/web/src/core/managers/timeline-manager.ts | 15 |
2 files changed, 15 insertions, 1 deletions
diff --git a/apps/web/src/core/managers/audio-manager.ts b/apps/web/src/core/managers/audio-manager.ts index d0716aad..59e3ba80 100644 --- a/apps/web/src/core/managers/audio-manager.ts +++ b/apps/web/src/core/managers/audio-manager.ts @@ -497,6 +497,7 @@ export class AudioManager { const points = buildAudioGainAutomation({ element: clip.timelineElement, fromLocalTime: startLocalTime, + trackVolume: clip.trackVolume, toLocalTime: clip.duration, }); 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 }) => { |
