|
|
@@ -93,10 +93,12 @@ export const AudioFilePreview = React.forwardRef<AudioFilePreviewDerivedComponen |
|
|
|
className="w-full h-full bg-black flex flex-col items-stretch" |
|
|
|
data-testid="preview" |
|
|
|
> |
|
|
|
<div className="w-full flex-auto relative"> |
|
|
|
<div |
|
|
|
className="w-full flex-auto relative" |
|
|
|
key={`${fileWithMetadata?.url ?? ''}:${fileWithMetadata?.type ?? ''}`} |
|
|
|
> |
|
|
|
<audio |
|
|
|
{...etcProps} |
|
|
|
key={`${fileWithMetadata?.url ?? ''}:${fileWithMetadata?.type ?? ''}`} |
|
|
|
controls={!enhanced} |
|
|
|
ref={mediaControllerRef} |
|
|
|
onLoadedMetadata={refreshControls} |
|
|
@@ -115,7 +117,7 @@ export const AudioFilePreview = React.forwardRef<AudioFilePreviewDerivedComponen |
|
|
|
<> |
|
|
|
<WaveformCanvas |
|
|
|
className={clsx( |
|
|
|
'sm:absolute w-full sm:h-full top-0 left-0 block object-center object-contain flex-auto aspect-video sm:aspect-auto bg-primary/10', |
|
|
|
'sm:absolute w-full sm:h-full top-0 left-0 block object-center object-contain flex-auto aspect-video sm:aspect-auto bg-primary/10 cursor-text', |
|
|
|
visualizationMode !== 'waveform' && 'opacity-0', |
|
|
|
)} |
|
|
|
ref={mediaControllerRef} |
|
|
@@ -164,7 +166,7 @@ export const AudioFilePreview = React.forwardRef<AudioFilePreviewDerivedComponen |
|
|
|
/> |
|
|
|
<span |
|
|
|
className={clsx( |
|
|
|
'block uppercase font-bold h-[1.1em] w-full whitespace-nowrap overflow-hidden text-ellipsis font-semi-expanded text-primary', |
|
|
|
'flex items-center uppercase font-bold h-full w-full whitespace-nowrap overflow-hidden text-ellipsis font-semi-expanded text-primary cursor-pointer', |
|
|
|
'peer-focus/waveform:text-secondary', |
|
|
|
'peer-active/waveform:text-tertiary', |
|
|
|
'peer-checked/waveform:text-tertiary', |
|
|
@@ -188,7 +190,7 @@ export const AudioFilePreview = React.forwardRef<AudioFilePreviewDerivedComponen |
|
|
|
/> |
|
|
|
<span |
|
|
|
className={clsx( |
|
|
|
'block uppercase font-bold h-[1.1em] w-full whitespace-nowrap overflow-hidden text-ellipsis font-semi-expanded text-primary', |
|
|
|
'flex items-center uppercase font-bold h-full w-full whitespace-nowrap overflow-hidden text-ellipsis font-semi-expanded text-primary cursor-pointer', |
|
|
|
'peer-focus/waveform:text-secondary', |
|
|
|
'peer-active/waveform:text-tertiary', |
|
|
|
'peer-checked/waveform:text-tertiary', |
|
|
@@ -299,7 +301,7 @@ export const AudioFilePreview = React.forwardRef<AudioFilePreviewDerivedComponen |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
<div |
|
|
|
className="flex-shrink-0 w-12" |
|
|
|
className="flex-shrink-0 w-12 flex items-center" |
|
|
|
> |
|
|
|
<Slider |
|
|
|
ref={volumeRef} |
|
|
|