fix: default audio waveform color from timeline theme
This commit is contained in:
parent
94eed96cad
commit
b1d0b10354
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import { useCallback, useEffect, useLayoutEffect, useRef } from "react";
|
import { useCallback, useEffect, useLayoutEffect, useRef } from "react";
|
||||||
import { useResizeObserver } from "@/hooks/use-resize-observer";
|
import { useResizeObserver } from "@/hooks/use-resize-observer";
|
||||||
|
import { TIMELINE_AUDIO_WAVEFORM_COLOR } from "./theme";
|
||||||
import {
|
import {
|
||||||
buildWaveformSampleBuckets,
|
buildWaveformSampleBuckets,
|
||||||
sampleSourceWaveformSummary,
|
sampleSourceWaveformSummary,
|
||||||
|
|
@ -64,7 +65,7 @@ export function AudioWaveform({
|
||||||
clipDurationSec,
|
clipDurationSec,
|
||||||
retime,
|
retime,
|
||||||
sourceStartSec,
|
sourceStartSec,
|
||||||
color,
|
color = TIMELINE_AUDIO_WAVEFORM_COLOR,
|
||||||
burnColor = WAVEFORM_BURN_COLOR,
|
burnColor = WAVEFORM_BURN_COLOR,
|
||||||
className = "",
|
className = "",
|
||||||
}: AudioWaveformProps) {
|
}: AudioWaveformProps) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
import type { TrackType } from "@/lib/timeline";
|
import type { TrackType } from "@/lib/timeline";
|
||||||
|
|
||||||
|
export const TIMELINE_AUDIO_WAVEFORM_COLOR = "rgba(255, 255, 255, 0.7)";
|
||||||
|
|
||||||
export const TIMELINE_TRACK_THEME: Record<
|
export const TIMELINE_TRACK_THEME: Record<
|
||||||
TrackType,
|
TrackType,
|
||||||
{
|
{
|
||||||
|
|
@ -11,7 +13,7 @@ export const TIMELINE_TRACK_THEME: Record<
|
||||||
text: { elementClassName: "bg-[#5DBAA0]" },
|
text: { elementClassName: "bg-[#5DBAA0]" },
|
||||||
audio: {
|
audio: {
|
||||||
elementClassName: "bg-[#8F5DBA]",
|
elementClassName: "bg-[#8F5DBA]",
|
||||||
waveformColor: "rgba(255, 255, 255, 0.7)",
|
waveformColor: TIMELINE_AUDIO_WAVEFORM_COLOR,
|
||||||
},
|
},
|
||||||
graphic: { elementClassName: "bg-[#BA5D7A]" },
|
graphic: { elementClassName: "bg-[#BA5D7A]" },
|
||||||
effect: { elementClassName: "bg-[#5d93ba]" },
|
effect: { elementClassName: "bg-[#5d93ba]" },
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue